From 21207f76df64c33e0a074fd8576350a292439055 Mon Sep 17 00:00:00 2001 From: evanlowe <62918515+evanlowe@users.noreply.github.com> Date: Mon, 7 Sep 2026 13:37:50 +0800 Subject: [PATCH] fix(studio): stabilize parallel agent rendering --- examples/studio_workflow_matrix/README.md | 21 + examples/studio_workflow_matrix/__init__.py | 15 + .../all_agent_types_agent/__init__.py | 17 + .../all_agent_types_agent/agent.py | 124 ++++ examples/studio_workflow_matrix/common.py | 37 ++ .../llm_agent/__init__.py | 17 + .../studio_workflow_matrix/llm_agent/agent.py | 19 + .../loop_agent/__init__.py | 17 + .../loop_agent/agent.py | 28 + .../mixed_agent/__init__.py | 17 + .../mixed_agent/agent.py | 59 ++ .../parallel_agent/__init__.py | 17 + .../parallel_agent/agent.py | 31 + .../sequential_agent/__init__.py | 17 + .../sequential_agent/agent.py | 29 + frontend/src/App.tsx | 213 ++++--- frontend/src/blocks.ts | 208 ++++++- frontend/src/styles.css | 39 ++ frontend/src/transcriptRows.ts | 67 ++ .../tests/agentTransferPresentation.test.mjs | 12 +- frontend/tests/composerPresentation.test.mjs | 4 +- .../tests/parallelStreamAggregation.test.mjs | 227 +++++++ .../tests/parallelTranscriptLayout.test.mjs | 83 +++ frontend/tests/responseAnnotation.test.mjs | 4 +- frontend/tests/runSseCompletion.test.mjs | 4 +- tests/examples/test_studio_workflow_matrix.py | 139 +++++ .../{index-CabUMMxm.js => index-ByKH09wM.js} | 588 +++++++++--------- ...BwQXqX7L.js => CodeDiffEditor-Bb0YLkgm.js} | 2 +- ...im.js => MarkdownPromptEditor-B11ZU4r0.js} | 2 +- .../{arc-WlqfJpSf.js => arc-CgrLWjxI.js} | 2 +- ...hannel-BdGAp6Bu.js => channel-CvsUt1ak.js} | 2 +- ...ex.es-BBymJK5V.js => index.es-dExRzmAq.js} | 2 +- ...n-CHN3nDIH.js => jspdf.es.min-fcB_pwG8.js} | 6 +- ...{linear-BdKQNUOz.js => linear-CIUisTx8.js} | 2 +- ...{index-COnd7cm-.css => index-CkG4VFmu.css} | 2 +- ...y_.js => abnfDiagram-N423BO3Z-x0Z1ViTK.js} | 2 +- ... architectureDiagram-T3A2C74G-C-0GUtfZ.js} | 2 +- ...u.js => blockDiagram-VBNYF7ZC-D_DZ3Jhd.js} | 2 +- ...K4Ym.js => c4Diagram-5PPSVZJV-B5768TRr.js} | 2 +- ...CnAofnNE.js => chunk-2GRJ4B5K-7ZWdqvia.js} | 2 +- ...Day2i5zo.js => chunk-2Q5K7J3B-BdYdhgGF.js} | 2 +- ...xuSDHQPH.js => chunk-5RXB4S5H-DUbFPiso.js} | 2 +- ...DKEilnyR.js => chunk-5VM5RSS4-B3JPrFpo.js} | 2 +- ...BIObpTu-.js => chunk-6Q2QTUOP-CAlumz7W.js} | 2 +- ...lNR6WpLV.js => chunk-GF5L2VYU-BdWV4LTl.js} | 2 +- ...Bbjf4kNX.js => chunk-JWPE2WC7-C85gYB4m.js} | 2 +- ...Ec-jWcvG.js => chunk-KBJHAD2P-ClgiISBP.js} | 2 +- ...DprPcpVU.js => chunk-RYQCIY6F-BqVdVRog.js} | 2 +- ...fGxqsBab.js => chunk-XXDRQBXY-DHK1v8mL.js} | 2 +- .../mermaid/classDiagram-JCYQIIEL-DVgy3A-Y.js | 1 + .../mermaid/classDiagram-JCYQIIEL-t7hoVl-n.js | 1 - .../classDiagram-v2-OCEON4UE-DVgy3A-Y.js | 1 + .../classDiagram-v2-OCEON4UE-t7hoVl-n.js | 1 - ...i.js => cose-bilkent-JH36ORCC-OgiO_tfj.js} | 2 +- ...cb2KIl.js => cynefin-OW5HDTMX-Dcw8dqlN.js} | 2 +- ...js => cynefinDiagram-MW4NZA55-BbZv4-5t.js} | 2 +- ...0pfut0iF.js => dagre-VZM6K2ZE-a4O7HZ6n.js} | 2 +- ...0xt2c3.js => diagram-7IWD3JNH-BEfiN65E.js} | 2 +- ...PsMLSA.js => diagram-B4RE2ZJO-BLaaB-4O.js} | 2 +- ...J4w1e1.js => diagram-LBJQPF4R-DEhtQCuB.js} | 2 +- ...03nO9z.js => diagram-Q27KOJAE-DyuPaME7.js} | 2 +- ...i0-hYB.js => diagram-UB23O5K3-gvZs6avL.js} | 2 +- ...yv.js => ebnfDiagram-BXEA7PRR-CT4zVx_1.js} | 2 +- ...KnGJ.js => erDiagram-JOGREHBK-B0rRtb0E.js} | 2 +- ...E4.js => flowDiagram-UKHOOZJN-DFWufWhB.js} | 2 +- ...W.js => ganttDiagram-PKOTCBZU-D6VglDkb.js} | 2 +- ...s => gitGraphDiagram-DS77QQ5N-DKUxR8SL.js} | 2 +- ...EZ.js => infoDiagram-6WML65LV-CEAm9k9R.js} | 2 +- ...s => ishikawaDiagram-WSZJBQD7-Cn_HVYwl.js} | 2 +- ...js => journeyDiagram-NVQOT4AX-BpkwCoSn.js} | 2 +- ...=> kanban-definition-27J2QSJJ-DPPPFPfo.js} | 2 +- ...e-C8O8nWja.js => mermaid.core-Czk7O9j0.js} | 8 +- ...> mindmap-definition-FAOFIHXS-CqPhqmGz.js} | 2 +- ...1hp.js => pegDiagram-VL7TDLO6-Ti9iGVJG.js} | 2 +- ...jDu.js => pieDiagram-7S7Q4E2Y-BNHxwK6q.js} | 2 +- ...s => quadrantDiagram-CIZ2JOQS-DXqtOz58.js} | 2 +- ...s => railroadDiagram-AXF67PYL-CQgEts4B.js} | 2 +- ...> requirementDiagram-LRYGKXZP-DpnXQ3sk.js} | 2 +- ....js => sankeyDiagram-W5VNT64P-C63Oo6hy.js} | 2 +- ...s => sequenceDiagram-SI44F4Z6-BydGtVR-.js} | 2 +- ..._x.js => sizeCapture-X5ZJPWSS-9olqa_Gw.js} | 2 +- ...M.js => stateDiagram-OKZ733FA-BJnI3arG.js} | 2 +- .../stateDiagram-v2-UEYNNEHI-DKFhLAzL.js | 1 + .../stateDiagram-v2-UEYNNEHI-QSue9JJb.js | 1 - ...tIOj.js => swimlanes-SLNWSIFB-D1oUxHzT.js} | 4 +- .../swimlanesDiagram-ULZ7WXOC-CJOGkX8K.js | 8 - .../swimlanesDiagram-ULZ7WXOC-CXOpR4Gd.js | 8 + ... timeline-definition-Z64GVDOM-DxyaAlr9.js} | 2 +- ...L2.js => vennDiagram-T6HMQDX7-C0RulElb.js} | 2 +- ...js => wardleyDiagram-T6FBY63Y-DsaeQZxP.js} | 2 +- ...js => xychartDiagram-ELKLHX3M-DG-mrX7k.js} | 2 +- veadk/webui/index.html | 4 +- veadk/webui/website-integration.js | 2 +- 93 files changed, 1691 insertions(+), 514 deletions(-) create mode 100644 examples/studio_workflow_matrix/README.md create mode 100644 examples/studio_workflow_matrix/__init__.py create mode 100644 examples/studio_workflow_matrix/all_agent_types_agent/__init__.py create mode 100644 examples/studio_workflow_matrix/all_agent_types_agent/agent.py create mode 100644 examples/studio_workflow_matrix/common.py create mode 100644 examples/studio_workflow_matrix/llm_agent/__init__.py create mode 100644 examples/studio_workflow_matrix/llm_agent/agent.py create mode 100644 examples/studio_workflow_matrix/loop_agent/__init__.py create mode 100644 examples/studio_workflow_matrix/loop_agent/agent.py create mode 100644 examples/studio_workflow_matrix/mixed_agent/__init__.py create mode 100644 examples/studio_workflow_matrix/mixed_agent/agent.py create mode 100644 examples/studio_workflow_matrix/parallel_agent/__init__.py create mode 100644 examples/studio_workflow_matrix/parallel_agent/agent.py create mode 100644 examples/studio_workflow_matrix/sequential_agent/__init__.py create mode 100644 examples/studio_workflow_matrix/sequential_agent/agent.py create mode 100644 frontend/src/transcriptRows.ts create mode 100644 frontend/tests/parallelStreamAggregation.test.mjs create mode 100644 frontend/tests/parallelTranscriptLayout.test.mjs create mode 100644 tests/examples/test_studio_workflow_matrix.py rename veadk/webui/assets/app/{index-CabUMMxm.js => index-ByKH09wM.js} (67%) rename veadk/webui/assets/chunks/{CodeDiffEditor-BwQXqX7L.js => CodeDiffEditor-Bb0YLkgm.js} (99%) rename veadk/webui/assets/chunks/{MarkdownPromptEditor-Cmx-E7im.js => MarkdownPromptEditor-B11ZU4r0.js} (99%) rename veadk/webui/assets/chunks/{arc-WlqfJpSf.js => arc-CgrLWjxI.js} (98%) rename veadk/webui/assets/chunks/{channel-BdGAp6Bu.js => channel-CvsUt1ak.js} (53%) rename veadk/webui/assets/chunks/{index.es-BBymJK5V.js => index.es-dExRzmAq.js} (99%) rename veadk/webui/assets/chunks/{jspdf.es.min-CHN3nDIH.js => jspdf.es.min-fcB_pwG8.js} (99%) rename veadk/webui/assets/chunks/{linear-BdKQNUOz.js => linear-CIUisTx8.js} (98%) rename veadk/webui/assets/styles/{index-COnd7cm-.css => index-CkG4VFmu.css} (73%) rename veadk/webui/assets/visualizations/mermaid/{abnfDiagram-N423BO3Z-otTk03y_.js => abnfDiagram-N423BO3Z-x0Z1ViTK.js} (86%) rename veadk/webui/assets/visualizations/mermaid/{architectureDiagram-T3A2C74G-HTD-nABp.js => architectureDiagram-T3A2C74G-C-0GUtfZ.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{blockDiagram-VBNYF7ZC-D5O01u9u.js => blockDiagram-VBNYF7ZC-D_DZ3Jhd.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{c4Diagram-5PPSVZJV-DQgHK4Ym.js => c4Diagram-5PPSVZJV-B5768TRr.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{chunk-2GRJ4B5K-CnAofnNE.js => chunk-2GRJ4B5K-7ZWdqvia.js} (93%) rename veadk/webui/assets/visualizations/mermaid/{chunk-2Q5K7J3B-Day2i5zo.js => chunk-2Q5K7J3B-BdYdhgGF.js} (66%) rename veadk/webui/assets/visualizations/mermaid/{chunk-5RXB4S5H-xuSDHQPH.js => chunk-5RXB4S5H-DUbFPiso.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{chunk-5VM5RSS4-DKEilnyR.js => chunk-5VM5RSS4-B3JPrFpo.js} (83%) rename veadk/webui/assets/visualizations/mermaid/{chunk-6Q2QTUOP-BIObpTu-.js => chunk-6Q2QTUOP-CAlumz7W.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{chunk-GF5L2VYU-lNR6WpLV.js => chunk-GF5L2VYU-BdWV4LTl.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{chunk-JWPE2WC7-Bbjf4kNX.js => chunk-JWPE2WC7-C85gYB4m.js} (78%) rename veadk/webui/assets/visualizations/mermaid/{chunk-KBJHAD2P-Ec-jWcvG.js => chunk-KBJHAD2P-ClgiISBP.js} (87%) rename veadk/webui/assets/visualizations/mermaid/{chunk-RYQCIY6F-DprPcpVU.js => chunk-RYQCIY6F-BqVdVRog.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{chunk-XXDRQBXY-fGxqsBab.js => chunk-XXDRQBXY-DHK1v8mL.js} (53%) create mode 100644 veadk/webui/assets/visualizations/mermaid/classDiagram-JCYQIIEL-DVgy3A-Y.js delete mode 100644 veadk/webui/assets/visualizations/mermaid/classDiagram-JCYQIIEL-t7hoVl-n.js create mode 100644 veadk/webui/assets/visualizations/mermaid/classDiagram-v2-OCEON4UE-DVgy3A-Y.js delete mode 100644 veadk/webui/assets/visualizations/mermaid/classDiagram-v2-OCEON4UE-t7hoVl-n.js rename veadk/webui/assets/visualizations/mermaid/{cose-bilkent-JH36ORCC-CyD8w6Ui.js => cose-bilkent-JH36ORCC-OgiO_tfj.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{cynefin-OW5HDTMX-B-cb2KIl.js => cynefin-OW5HDTMX-Dcw8dqlN.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{cynefinDiagram-MW4NZA55-ByRifo-3.js => cynefinDiagram-MW4NZA55-BbZv4-5t.js} (98%) rename veadk/webui/assets/visualizations/mermaid/{dagre-VZM6K2ZE-0pfut0iF.js => dagre-VZM6K2ZE-a4O7HZ6n.js} (97%) rename veadk/webui/assets/visualizations/mermaid/{diagram-7IWD3JNH-Bm0xt2c3.js => diagram-7IWD3JNH-BEfiN65E.js} (96%) rename veadk/webui/assets/visualizations/mermaid/{diagram-B4RE2ZJO-DUPsMLSA.js => diagram-B4RE2ZJO-BLaaB-4O.js} (97%) rename veadk/webui/assets/visualizations/mermaid/{diagram-LBJQPF4R-CjJ4w1e1.js => diagram-LBJQPF4R-DEhtQCuB.js} (94%) rename veadk/webui/assets/visualizations/mermaid/{diagram-Q27KOJAE-Bq03nO9z.js => diagram-Q27KOJAE-DyuPaME7.js} (98%) rename veadk/webui/assets/visualizations/mermaid/{diagram-UB23O5K3-Gci0-hYB.js => diagram-UB23O5K3-gvZs6avL.js} (95%) rename veadk/webui/assets/visualizations/mermaid/{ebnfDiagram-BXEA7PRR-BiAg0dyv.js => ebnfDiagram-BXEA7PRR-CT4zVx_1.js} (87%) rename veadk/webui/assets/visualizations/mermaid/{erDiagram-JOGREHBK-PmYNKnGJ.js => erDiagram-JOGREHBK-B0rRtb0E.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{flowDiagram-UKHOOZJN-CwGqFLE4.js => flowDiagram-UKHOOZJN-DFWufWhB.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{ganttDiagram-PKOTCBZU-CWkHaGKW.js => ganttDiagram-PKOTCBZU-D6VglDkb.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{gitGraphDiagram-DS77QQ5N-Cp-2PIhL.js => gitGraphDiagram-DS77QQ5N-DKUxR8SL.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{infoDiagram-6WML65LV-D7kbZeEZ.js => infoDiagram-6WML65LV-CEAm9k9R.js} (69%) rename veadk/webui/assets/visualizations/mermaid/{ishikawaDiagram-WSZJBQD7-BKsh9FBp.js => ishikawaDiagram-WSZJBQD7-Cn_HVYwl.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{journeyDiagram-NVQOT4AX-DA6QDm-o.js => journeyDiagram-NVQOT4AX-BpkwCoSn.js} (98%) rename veadk/webui/assets/visualizations/mermaid/{kanban-definition-27J2QSJJ-DVvvVCQP.js => kanban-definition-27J2QSJJ-DPPPFPfo.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{mermaid.core-C8O8nWja.js => mermaid.core-Czk7O9j0.js} (98%) rename veadk/webui/assets/visualizations/mermaid/{mindmap-definition-FAOFIHXS-DjOpqiPH.js => mindmap-definition-FAOFIHXS-CqPhqmGz.js} (98%) rename veadk/webui/assets/visualizations/mermaid/{pegDiagram-VL7TDLO6-D7Kei1hp.js => pegDiagram-VL7TDLO6-Ti9iGVJG.js} (87%) rename veadk/webui/assets/visualizations/mermaid/{pieDiagram-7S7Q4E2Y-DD26SjDu.js => pieDiagram-7S7Q4E2Y-BNHxwK6q.js} (96%) rename veadk/webui/assets/visualizations/mermaid/{quadrantDiagram-CIZ2JOQS-Gen0mzte.js => quadrantDiagram-CIZ2JOQS-DXqtOz58.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{railroadDiagram-AXF67PYL-Bh7fUe_W.js => railroadDiagram-AXF67PYL-CQgEts4B.js} (84%) rename veadk/webui/assets/visualizations/mermaid/{requirementDiagram-LRYGKXZP-3-cQ2cC5.js => requirementDiagram-LRYGKXZP-DpnXQ3sk.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{sankeyDiagram-W5VNT64P-UFuFUzXv.js => sankeyDiagram-W5VNT64P-C63Oo6hy.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{sequenceDiagram-SI44F4Z6-RsLKg6FA.js => sequenceDiagram-SI44F4Z6-BydGtVR-.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{sizeCapture-X5ZJPWSS-CB400P_x.js => sizeCapture-X5ZJPWSS-9olqa_Gw.js} (87%) rename veadk/webui/assets/visualizations/mermaid/{stateDiagram-OKZ733FA-Cr4A4pCM.js => stateDiagram-OKZ733FA-BJnI3arG.js} (96%) create mode 100644 veadk/webui/assets/visualizations/mermaid/stateDiagram-v2-UEYNNEHI-DKFhLAzL.js delete mode 100644 veadk/webui/assets/visualizations/mermaid/stateDiagram-v2-UEYNNEHI-QSue9JJb.js rename veadk/webui/assets/visualizations/mermaid/{swimlanes-SLNWSIFB-UKrKtIOj.js => swimlanes-SLNWSIFB-D1oUxHzT.js} (99%) delete mode 100644 veadk/webui/assets/visualizations/mermaid/swimlanesDiagram-ULZ7WXOC-CJOGkX8K.js create mode 100644 veadk/webui/assets/visualizations/mermaid/swimlanesDiagram-ULZ7WXOC-CXOpR4Gd.js rename veadk/webui/assets/visualizations/mermaid/{timeline-definition-Z64GVDOM-s3TJplsm.js => timeline-definition-Z64GVDOM-DxyaAlr9.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{vennDiagram-T6HMQDX7-BVcQInL2.js => vennDiagram-T6HMQDX7-C0RulElb.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{wardleyDiagram-T6FBY63Y-DnSlQqra.js => wardleyDiagram-T6FBY63Y-DsaeQZxP.js} (99%) rename veadk/webui/assets/visualizations/mermaid/{xychartDiagram-ELKLHX3M-CKItde_L.js => xychartDiagram-ELKLHX3M-DG-mrX7k.js} (99%) diff --git a/examples/studio_workflow_matrix/README.md b/examples/studio_workflow_matrix/README.md new file mode 100644 index 000000000..dd26064da --- /dev/null +++ b/examples/studio_workflow_matrix/README.md @@ -0,0 +1,21 @@ +# Studio workflow matrix + +This local fixture exposes six applications for checking Studio rendering: + +- `llm_agent` +- `sequential_agent` +- `parallel_agent` +- `loop_agent` +- `mixed_agent` +- `all_agent_types_agent` + +Start Studio from the repository root with the agents directory set to +`examples/studio_workflow_matrix`, then send the same prompt to each app: + +> 请分析团队是否应该采用每周四天工作制,并明确列出事实、风险和建议 + +The first five fixtures use stable markers so fragmented or duplicated cards are easy +to spot. `all_agent_types_agent` combines LLM, Sequential, Parallel, and Loop agents +while keeping all user-facing output natural and free of artificial test markers. Its +Parallel stage has four specialists so the wide-screen three-column viewport and +horizontal overflow can be exercised in one end-to-end run. diff --git a/examples/studio_workflow_matrix/__init__.py b/examples/studio_workflow_matrix/__init__.py new file mode 100644 index 000000000..090a2467d --- /dev/null +++ b/examples/studio_workflow_matrix/__init__.py @@ -0,0 +1,15 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Local AgentKit Studio workflow test applications.""" diff --git a/examples/studio_workflow_matrix/all_agent_types_agent/__init__.py b/examples/studio_workflow_matrix/all_agent_types_agent/__init__.py new file mode 100644 index 000000000..e1f5efff2 --- /dev/null +++ b/examples/studio_workflow_matrix/all_agent_types_agent/__init__.py @@ -0,0 +1,17 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from . import agent + +__all__ = ["agent"] diff --git a/examples/studio_workflow_matrix/all_agent_types_agent/agent.py b/examples/studio_workflow_matrix/all_agent_types_agent/agent.py new file mode 100644 index 000000000..2df7aad99 --- /dev/null +++ b/examples/studio_workflow_matrix/all_agent_types_agent/agent.py @@ -0,0 +1,124 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Natural-output Studio fixture containing every supported agent type.""" + +from veadk import Agent +from veadk.agents.loop_agent import LoopAgent +from veadk.agents.parallel_agent import ParallelAgent +from veadk.agents.sequential_agent import SequentialAgent + + +def analysis_agent(name: str, role: str, output_key: str) -> Agent: + """Build a tool-free specialist that emits natural user-facing prose.""" + return Agent( + name=name, + description=f"Handles the {role} stage of the combined workflow.", + instruction=( + f"Act as the {role} specialist. Answer in the user's language with " + "concise, self-contained prose. Do not use bracketed stage labels, " + "internal agent names, test markers, tools, or delegation." + ), + output_key=output_key, + ) + + +opening = analysis_agent( + "all_types_opening", + "problem framing", + "all_types_opening", +) + +sequential_stage = SequentialAgent( + name="all_types_sequence", + description="Builds the evaluation criteria in two ordered steps.", + sub_agents=[ + analysis_agent( + "all_types_context", + "context and assumptions", + "all_types_context", + ), + analysis_agent( + "all_types_criteria", + "decision criteria", + "all_types_criteria", + ), + ], +) + +parallel_stage = ParallelAgent( + name="all_types_parallel", + description="Analyzes evidence, risks, options, and rollout concurrently.", + sub_agents=[ + analysis_agent( + "all_types_evidence", + "facts and evidence", + "all_types_evidence", + ), + analysis_agent( + "all_types_risks", + "risks and mitigations", + "all_types_risks", + ), + analysis_agent( + "all_types_options", + "alternative options", + "all_types_options", + ), + analysis_agent( + "all_types_rollout", + "implementation planning", + "all_types_rollout", + ), + ], +) + +loop_stage = LoopAgent( + name="all_types_review_loop", + description="Reviews the draft twice before the final recommendation.", + max_iterations=2, + sub_agents=[ + analysis_agent( + "all_types_reviewer", + "quality review", + "all_types_review", + ), + ], +) + +final_response = Agent( + name="all_types_final_response", + description="Produces the final recommendation for the user.", + instruction=( + "Give the user one coherent final answer in their language. Synthesize the " + "available facts, risks, decision criteria, and review feedback. Clearly " + "separate facts, risks, and recommendations using natural headings. Do not " + "print internal agent names, bracketed stage labels, or test markers." + ), + output_key="all_types_final", +) + +root_agent = SequentialAgent( + name="all_agent_types_agent", + description=( + "Combines LLM, sequential, parallel, and loop agents into one workflow." + ), + sub_agents=[ + opening, + sequential_stage, + parallel_stage, + loop_stage, + final_response, + ], +) diff --git a/examples/studio_workflow_matrix/common.py b/examples/studio_workflow_matrix/common.py new file mode 100644 index 000000000..79c21261c --- /dev/null +++ b/examples/studio_workflow_matrix/common.py @@ -0,0 +1,37 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Shared builders for the local Studio workflow test matrix.""" + +from veadk import Agent + + +def labelled_agent( + name: str, + purpose: str, + *, + output_key: str | None = None, +) -> Agent: + """Build a tool-free LLM Agent with natural user-facing output.""" + return Agent( + name=name, + description=f"Produces the {purpose} section for Studio rendering tests.", + instruction=( + f"You are the {purpose} specialist in a Studio rendering test. " + "Answer in the user's language with concise, self-contained prose. " + "Do not print internal agent names, bracketed stage labels, or test markers. " + "Never call tools, delegate work, or expose environment values." + ), + output_key=output_key, + ) diff --git a/examples/studio_workflow_matrix/llm_agent/__init__.py b/examples/studio_workflow_matrix/llm_agent/__init__.py new file mode 100644 index 000000000..e1f5efff2 --- /dev/null +++ b/examples/studio_workflow_matrix/llm_agent/__init__.py @@ -0,0 +1,17 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from . import agent + +__all__ = ["agent"] diff --git a/examples/studio_workflow_matrix/llm_agent/agent.py b/examples/studio_workflow_matrix/llm_agent/agent.py new file mode 100644 index 000000000..d42592b6e --- /dev/null +++ b/examples/studio_workflow_matrix/llm_agent/agent.py @@ -0,0 +1,19 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Single LLM Agent Studio fixture.""" + +from common import labelled_agent + +root_agent = labelled_agent("llm_agent", "single-agent analysis") diff --git a/examples/studio_workflow_matrix/loop_agent/__init__.py b/examples/studio_workflow_matrix/loop_agent/__init__.py new file mode 100644 index 000000000..e1f5efff2 --- /dev/null +++ b/examples/studio_workflow_matrix/loop_agent/__init__.py @@ -0,0 +1,17 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from . import agent + +__all__ = ["agent"] diff --git a/examples/studio_workflow_matrix/loop_agent/agent.py b/examples/studio_workflow_matrix/loop_agent/agent.py new file mode 100644 index 000000000..269840473 --- /dev/null +++ b/examples/studio_workflow_matrix/loop_agent/agent.py @@ -0,0 +1,28 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Bounded Loop Agent Studio fixture.""" + +from common import labelled_agent + +from veadk.agents.loop_agent import LoopAgent + +root_agent = LoopAgent( + name="loop_agent", + description="Runs a labelled reviewer for three bounded iterations.", + max_iterations=3, + sub_agents=[ + labelled_agent("loop_reviewer", "iterative review", output_key="loop_result"), + ], +) diff --git a/examples/studio_workflow_matrix/mixed_agent/__init__.py b/examples/studio_workflow_matrix/mixed_agent/__init__.py new file mode 100644 index 000000000..e1f5efff2 --- /dev/null +++ b/examples/studio_workflow_matrix/mixed_agent/__init__.py @@ -0,0 +1,17 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from . import agent + +__all__ = ["agent"] diff --git a/examples/studio_workflow_matrix/mixed_agent/agent.py b/examples/studio_workflow_matrix/mixed_agent/agent.py new file mode 100644 index 000000000..38cbbb1e7 --- /dev/null +++ b/examples/studio_workflow_matrix/mixed_agent/agent.py @@ -0,0 +1,59 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Combined LLM, Sequential, Parallel, and Loop Agent Studio fixture.""" + +from common import labelled_agent + +from veadk import Agent +from veadk.agents.loop_agent import LoopAgent +from veadk.agents.parallel_agent import ParallelAgent +from veadk.agents.sequential_agent import SequentialAgent + +opening = labelled_agent("mixed_opening", "opening", output_key="mixed_opening") + +parallel_stage = ParallelAgent( + name="mixed_parallel", + description="Runs two middle-stage specialists concurrently.", + sub_agents=[ + labelled_agent("mixed_facts", "facts", output_key="mixed_facts"), + labelled_agent("mixed_risks", "risks", output_key="mixed_risks"), + ], +) + +loop_stage = LoopAgent( + name="mixed_loop", + description="Runs two bounded review iterations.", + max_iterations=2, + sub_agents=[ + labelled_agent("mixed_reviewer", "review", output_key="mixed_review"), + ], +) + +closing = Agent( + name="mixed_closing", + description="Produces the final combined workflow summary.", + instruction=( + "Summarize the completed opening, parallel, and review stages in concise, " + "natural prose. Do not print internal agent names, bracketed stage labels, " + "or test markers. Never call tools or delegate work." + ), + output_key="mixed_final", +) + +root_agent = SequentialAgent( + name="mixed_agent", + description="Exercises LLM, Sequential, Parallel, and Loop agents together.", + sub_agents=[opening, parallel_stage, loop_stage, closing], +) diff --git a/examples/studio_workflow_matrix/parallel_agent/__init__.py b/examples/studio_workflow_matrix/parallel_agent/__init__.py new file mode 100644 index 000000000..e1f5efff2 --- /dev/null +++ b/examples/studio_workflow_matrix/parallel_agent/__init__.py @@ -0,0 +1,17 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from . import agent + +__all__ = ["agent"] diff --git a/examples/studio_workflow_matrix/parallel_agent/agent.py b/examples/studio_workflow_matrix/parallel_agent/agent.py new file mode 100644 index 000000000..ee910157f --- /dev/null +++ b/examples/studio_workflow_matrix/parallel_agent/agent.py @@ -0,0 +1,31 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Parallel Agent Studio fixture.""" + +from common import labelled_agent + +from veadk.agents.parallel_agent import ParallelAgent + +root_agent = ParallelAgent( + name="parallel_agent", + description="Runs three verbose specialists concurrently.", + sub_agents=[ + labelled_agent("parallel_alpha", "facts", output_key="parallel_alpha"), + labelled_agent("parallel_beta", "risks", output_key="parallel_beta"), + labelled_agent( + "parallel_gamma", "recommendations", output_key="parallel_gamma" + ), + ], +) diff --git a/examples/studio_workflow_matrix/sequential_agent/__init__.py b/examples/studio_workflow_matrix/sequential_agent/__init__.py new file mode 100644 index 000000000..e1f5efff2 --- /dev/null +++ b/examples/studio_workflow_matrix/sequential_agent/__init__.py @@ -0,0 +1,17 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from . import agent + +__all__ = ["agent"] diff --git a/examples/studio_workflow_matrix/sequential_agent/agent.py b/examples/studio_workflow_matrix/sequential_agent/agent.py new file mode 100644 index 000000000..536443a0d --- /dev/null +++ b/examples/studio_workflow_matrix/sequential_agent/agent.py @@ -0,0 +1,29 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Sequential Agent Studio fixture.""" + +from common import labelled_agent + +from veadk.agents.sequential_agent import SequentialAgent + +root_agent = SequentialAgent( + name="sequential_agent", + description="Runs three labelled LLM stages in order.", + sub_agents=[ + labelled_agent("sequence_one", "first sequential", output_key="seq_one"), + labelled_agent("sequence_two", "second sequential", output_key="seq_two"), + labelled_agent("sequence_three", "final sequential", output_key="seq_three"), + ], +) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 1b27fd2a0..9767a4a49 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -84,16 +84,17 @@ import { type IssueFeedbackModule, } from "./adk/issueFeedback"; import { - applyEvent, - emptyAcc, + createAssistantEventProjector, eventsToTurns, sessionTitle, + upsertProjectedAssistantTurn, type Block, type IntelligentDevelopmentReleaseRef, type Turn, type TurnActivityDetail, } from "./blocks"; import { i18n } from "./i18n"; +import { buildTranscriptRows } from "./transcriptRows"; import { Sidebar, type SidebarPage } from "./ui/Sidebar"; import { AgentInfoPanel } from "./ui/AgentTopology"; import type { SkillCenterWorkspaceLaunch } from "./ui/SkillCenter"; @@ -567,6 +568,20 @@ function displayAgentName(name: string): string { return name.replace(/__[0-9a-f]{10}(?:__.*)?$/i, ""); } +function assistantTurnIsStreaming( + turn: Turn, + index: number, + turnCount: number, + conversationBusy: boolean, + presentingStream: boolean, +): boolean { + return turn.meta?.streaming === true || ( + turn.meta?.streaming !== false && + index === turnCount - 1 && + (conversationBusy || presentingStream) + ); +} + function mentionableDescendants(node: AgentNode): AgentTarget[] { const targets: AgentTarget[] = []; for (const child of node.children) { @@ -2660,8 +2675,12 @@ export default function App() { const canRate = Boolean( responseAnnotationRuntimeAvailable && feedbackEventId && turnText(turn), ); - const turnIsStreaming = index === turns.length - 1 && ( - activeConversationBusy || presentingStream + const turnIsStreaming = assistantTurnIsStreaming( + turn, + index, + turns.length, + activeConversationBusy, + presentingStream, ); contexts.set(index, { enabled: Boolean( @@ -5072,9 +5091,17 @@ export default function App() { })), }); if (text.trim()) userBlocks.push({ kind: "text", text }); + const optimisticAssistantTurn: Turn = { + role: "assistant", + blocks: [], + meta: { + localId: `pending-${crypto.randomUUID()}`, + streaming: true, + }, + }; const optimisticTurns: Turn[] = [ { role: "user", blocks: userBlocks, meta: { ts: Date.now() / 1000 } }, - { role: "assistant", blocks: [] }, + optimisticAssistantTurn, ]; if (createsSession) { setPendingTurns(optimisticTurns); @@ -5169,15 +5196,14 @@ export default function App() { setSeenAgentsBySession((m) => ({ ...m, [sid]: new Set() })); setExecPathBySession((m) => ({ ...m, [sid]: [] })); + const eventProjector = createAssistantEventProjector( + `${sid}-${crypto.randomUUID()}`, + optimisticAssistantTurn, + ); let streamFailed = false; let streamError: unknown = null; try { - let acc = emptyAcc(); - let currentStreamAuthor = ""; - let tokens = 0; - let ts = Date.now() / 1000; - let eventId = ""; - let invocationId = ""; + let finalEventId = ""; let hasCompletedReply = false; for await (const event of runSSE({ appName, @@ -5208,48 +5234,19 @@ export default function App() { } // Live topology: author + transfer/end signals, keyed by session. applyStreamSignals(sid, event); - const eventAuthor = event.author && event.author !== "user" - ? event.author - : ""; - if (eventAuthor && eventAuthor !== currentStreamAuthor) { - currentStreamAuthor = eventAuthor; - acc = emptyAcc(); - } - acc = applyEvent(acc, event); - const usage = event.usageMetadata ?? event.usage_metadata; addTokenUsageFor(appName, sid, event); - if (usage?.totalTokenCount) tokens = usage.totalTokenCount; - if (event.timestamp) ts = event.timestamp; - if (event.id) eventId = event.id; - const nextInvocationId = event.invocationId ?? event.invocation_id; - if (nextInvocationId) invocationId = nextInvocationId; - const blocks = acc.blocks; + const projection = eventProjector.project(event); + if (projection.ignored) continue; if ( - event.partial !== true && - turnHasVisibleContent({ role: "assistant", blocks }) + projection.completed && + turnHasVisibleContent(projection.turn) ) { hasCompletedReply = true; + finalEventId = projection.turn.meta?.eventId ?? finalEventId; } - const meta = { - author: currentStreamAuthor || undefined, - tokens: tokens || undefined, - ts, - eventId: eventId || undefined, - invocationId: invocationId || undefined, - }; - setTurnsFor(sid, (t) => { - const next = t.slice(); - const last = next[next.length - 1]; - if ( - last?.role === "assistant" && - (!last.meta?.author || last.meta.author === currentStreamAuthor) - ) { - next[next.length - 1] = { ...last, blocks, meta }; - } else { - next.push({ role: "assistant", blocks, meta }); - } - return next; - }); + setTurnsFor(sid, (turns) => + upsertProjectedAssistantTurn(turns, projection.turn), + ); } if (!ctrl.signal.aborted && !streamFailed && !hasCompletedReply) { streamFailed = true; @@ -5276,7 +5273,7 @@ export default function App() { messageOperation?.succeed({ sessionId: String(sid) }); } } - if (!ctrl.signal.aborted && !streamFailed && eventId) { + if (!ctrl.signal.aborted && !streamFailed && finalEventId) { automaticEvaluationStatusRefreshRef.current(); } } catch (e) { @@ -5299,6 +5296,11 @@ export default function App() { setError(e instanceof Error ? e.message : String(e)); } } finally { + for (const unfinished of eventProjector.finish()) { + setTurnsFor(sid, (turns) => + upsertProjectedAssistantTurn(turns, unfinished), + ); + } if ( !ctrl.signal.aborted && streamFailed && @@ -5374,14 +5376,14 @@ export default function App() { const resumedPlatformTools = environmentMounts.length > 0 ? [...new Set([...selectedStudioToolIds, ...ENVIRONMENT_STUDIO_TOOL_IDS])] : selectedStudioToolIds; + const eventProjector = createAssistantEventProjector( + `${sid}-${crypto.randomUUID()}`, + lastTurn?.role === "assistant" + ? { ...lastTurn, blocks: base } + : undefined, + ); try { - let acc = emptyAcc(); - let currentStreamAuthor = lastTurn?.meta?.author ?? ""; - let currentBase = base; - let tokens = 0; - let ts = Date.now() / 1000; - let eventId = lastTurn?.meta?.eventId ?? ""; - let invocationId = lastTurn?.meta?.invocationId ?? ""; + let finalEventId = ""; let hasCompletedReply = false; for await (const event of runSSE({ appName, @@ -5411,53 +5413,19 @@ export default function App() { break; } applyStreamSignals(sid, event); - const eventAuthor = event.author && event.author !== "user" - ? event.author - : ""; - if (eventAuthor && eventAuthor !== currentStreamAuthor) { - currentStreamAuthor = eventAuthor; - currentBase = []; - acc = emptyAcc(); - } - acc = applyEvent(acc, event); - const usage = event.usageMetadata ?? event.usage_metadata; addTokenUsageFor(appName, sid, event); - if (usage?.totalTokenCount) tokens = usage.totalTokenCount; - if (event.timestamp) ts = event.timestamp; - if (event.id) eventId = event.id; - const nextInvocationId = event.invocationId ?? event.invocation_id; - if (nextInvocationId) invocationId = nextInvocationId; - const blocks = [...currentBase, ...acc.blocks]; + const projection = eventProjector.project(event); + if (projection.ignored) continue; if ( - event.partial !== true && - turnHasVisibleContent({ role: "assistant", blocks: acc.blocks }) + projection.completed && + turnHasVisibleContent(projection.turn) ) { hasCompletedReply = true; + finalEventId = projection.turn.meta?.eventId ?? finalEventId; } - setTurnsFor(sid, (t) => { - const next = t.slice(); - const last = next[next.length - 1]; - const meta = { - author: currentStreamAuthor || last?.meta?.author, - tokens: tokens || last?.meta?.tokens, - ts, - eventId: eventId || last?.meta?.eventId, - invocationId: invocationId || last?.meta?.invocationId, - }; - if ( - last?.role === "assistant" && - (!last.meta?.author || last.meta.author === currentStreamAuthor) - ) { - next[next.length - 1] = { - ...last, - blocks, - meta, - }; - } else { - next.push({ role: "assistant", blocks, meta }); - } - return next; - }); + setTurnsFor(sid, (turns) => + upsertProjectedAssistantTurn(turns, projection.turn), + ); } if (!ctrl.signal.aborted && !streamFailed && !hasCompletedReply) { streamFailed = true; @@ -5466,7 +5434,7 @@ export default function App() { } } void refreshSessions(appName); - if (!ctrl.signal.aborted && !streamFailed && eventId) { + if (!ctrl.signal.aborted && !streamFailed && finalEventId) { automaticEvaluationStatusRefreshRef.current(); } } catch (e) { @@ -5479,6 +5447,11 @@ export default function App() { setError(e instanceof Error ? e.message : String(e)); } } finally { + for (const unfinished of eventProjector.finish()) { + setTurnsFor(sid, (turns) => + upsertProjectedAssistantTurn(turns, unfinished), + ); + } if (streamAbortsRef.current.get(sid) === ctrl) streamAbortsRef.current.delete(sid); setStreaming(sid, false); finishStreamPresentation(sid); @@ -7621,7 +7594,9 @@ export default function App() { onWheel={onConversationWheel} onTouchMove={onConversationTouchMove} > - {turns.map((turn, i) => { + {buildTranscriptRows(turns, rootCapabilityNode).map((row) => { + const renderTurn = (i: number) => { + const turn = turns[i]; const isLast = i === turns.length - 1; if (turn.role === "system") { return turn.activity ? ( @@ -7691,13 +7666,17 @@ export default function App() { const feedbackRating = turn.meta?.feedback?.rating ?? null; const feedbackEventId = turn.meta?.eventId ?? ""; const feedbackPending = feedbackPendingIds.has(feedbackEventId); + const turnIsStreaming = assistantTurnIsStreaming( + turn, + i, + turns.length, + activeConversationBusy, + presentingStream, + ); const canRate = Boolean( currentRuntime && feedbackEventId && turnText(turn), ); const feedbackInput = canRate ? previousUserTurnText(turns, i) : ""; - const turnIsStreaming = isLast && ( - activeConversationBusy || presentingStream - ); const canAnnotate = Boolean( canRate && cloudProvider !== "byteplus" && @@ -7706,7 +7685,7 @@ export default function App() { ); return ( { @@ -7746,14 +7725,14 @@ export default function App() { )} {pending ? ( - isLast && activeConversationBusy ? : null + turnIsStreaming ? : null ) : ( <> completeStreamPresentation(sessionId) @@ -7777,13 +7756,13 @@ export default function App() { /> {/* Finalized turn that produced no visible answer (e.g. only thinking + an empty A2UI surface) — show a fallback note. */} - {!(isLast && activeConversationBusy) && !turnHasVisibleContent(turn) && ( + {!turnIsStreaming && !turnHasVisibleContent(turn) && (
{t("conversation.emptyResponse")}
)} {/* Hide the actions/timestamp row while this turn is still thinking/streaming or waiting on an OAuth card; reveal it only once the reply is done. */} - {!(isLast && activeConversationBusy) && !turnAwaitingAuth(turn) && ( + {!turnIsStreaming && !turnAwaitingAuth(turn) && (
{sandboxSession && turn.meta?.sandboxUsage ? ( @@ -7889,6 +7868,22 @@ export default function App() { )} ); + }; + if (row.parallelParent) { + return ( +
3 ? 0 : undefined} + aria-label={`${displayAgentName(row.parallelParent)} 并行执行结果`} + > + {row.turnIndexes.map(renderTurn)} +
+ ); + } + return renderTurn(row.turnIndexes[0]); })}
{!sandboxSession && ( diff --git a/frontend/src/blocks.ts b/frontend/src/blocks.ts index 5f74eb904..0565cd7cc 100644 --- a/frontend/src/blocks.ts +++ b/frontend/src/blocks.ts @@ -150,6 +150,7 @@ export interface Acc { export interface TurnMeta { author?: string; localId?: string; + streaming?: boolean; tokens?: number; ts?: number; // epoch seconds eventId?: string; @@ -243,6 +244,18 @@ function codexDirectAnswer(response: unknown): string { return result.message.trim(); } +interface ActiveAssistantTurn { + acc: Acc; + localId: string; + meta: TurnMeta; +} + +export interface AssistantEventProjection { + turn: Turn; + completed: boolean; + ignored?: boolean; +} + const fnCall = (p: AdkPart) => p.functionCall ?? p.function_call; const fnResp = (p: AdkPart) => p.functionResponse ?? p.function_response; @@ -583,13 +596,172 @@ export function applyEvent(acc: Acc, ev: AdkEvent): Acc { return { blocks, liveStart, pendingCodexProgress }; } +function completesAssistantResponse(ev: AdkEvent, blocks: Block[]): boolean { + if (ev.partial === true) return false; + const parts = ev.content?.parts ?? []; + const hasFinalAnswerPart = parts.some((part) => { + const text = visiblePartText(part); + return ( + (!part.thought && typeof text === "string" && text.trim().length > 0) || + attachmentsFromParts([part]).length > 0 + ); + }); + const hasA2ui = parts.some((part) => { + const response = fnResp(part); + return response?.name === A2UI_TOOL && + Array.isArray(response.response?.[VALIDATED_JSON_KEY]) && + response.response[VALIDATED_JSON_KEY].length > 0; + }); + const artifactDelta = ev.actions?.artifactDelta ?? ev.actions?.artifact_delta; + const hasArtifact = Boolean(artifactDelta && Object.keys(artifactDelta).length > 0); + const agentEnded = Boolean( + ev.actions?.endOfAgent ?? ev.actions?.end_of_agent ?? ev.actions?.escalate + ); + const hasAnswerBlock = blocks.some((block) => + block.kind === "text" || + block.kind === "attachment" || + block.kind === "artifact" || + block.kind === "a2ui" || + block.kind === "delivery" + ); + return hasFinalAnswerPart || hasA2ui || hasArtifact || (agentEnded && hasAnswerBlock); +} + +function eventAffectsAssistantTurn(ev: AdkEvent): boolean { + const artifactDelta = ev.actions?.artifactDelta ?? ev.actions?.artifact_delta; + if (artifactDelta && Object.keys(artifactDelta).length > 0) return true; + return (ev.content?.parts ?? []).some((part) => + Boolean( + visiblePartText(part) || + attachmentsFromParts([part]).length > 0 || + fnCall(part) || + fnResp(part) + ) + ); +} + +/** Keep one mutable stream accumulator per active Agent response. Parallel + * Agents can interleave token events, so a single "current author" loses + * content and creates one turn per author switch. A completed response closes + * only that author's accumulator, allowing Loop Agents to start a later turn + * with the same author. */ +export function createAssistantEventProjector( + localIdPrefix = "adk-stream", + initialTurn?: Turn, +) { + let sequence = 0; + const active = new Map(); + let seededKey: string | undefined; + + const keyFor = (author: string, invocationId: string) => + `${invocationId}\u0000${author}`; + + if (initialTurn?.role === "assistant") { + const author = initialTurn.meta?.author ?? ""; + const invocationId = initialTurn.meta?.invocationId ?? ""; + const localId = initialTurn.meta?.localId ?? `${localIdPrefix}-${sequence++}`; + const acc = emptyAcc(); + acc.blocks = initialTurn.blocks; + acc.liveStart = initialTurn.blocks.length; + seededKey = keyFor(author, invocationId); + active.set(seededKey, { + acc, + localId, + meta: { + ...initialTurn.meta, + localId, + streaming: true, + eventId: undefined, + }, + }); + } + + return { + project(ev: AdkEvent): AssistantEventProjection { + const author = ev.author && ev.author !== "user" ? ev.author : ""; + const invocationId = ev.invocationId ?? ev.invocation_id ?? ""; + const key = keyFor(author, invocationId); + let state = active.get(key); + if (!state && seededKey) { + const seeded = active.get(seededKey); + if (seeded && (!seeded.meta.author || seeded.meta.author === author)) { + active.delete(seededKey); + seededKey = undefined; + state = seeded; + } + } + if (!state && !eventAffectsAssistantTurn(ev)) { + return { + turn: { role: "assistant", blocks: [] }, + completed: false, + ignored: true, + }; + } + if (!state) { + const localId = `${localIdPrefix}-${sequence++}`; + state = { + acc: emptyAcc(), + localId, + meta: { author: author || undefined, invocationId: invocationId || undefined }, + }; + } + + state.acc = applyEvent(state.acc, ev); + const usage = ev.usageMetadata ?? ev.usage_metadata; + const completed = completesAssistantResponse(ev, state.acc.blocks); + state.meta = { + ...state.meta, + author: author || state.meta.author, + localId: state.localId, + streaming: !completed, + tokens: usage?.totalTokenCount || state.meta.tokens, + ts: ev.timestamp || state.meta.ts, + invocationId: invocationId || state.meta.invocationId, + eventId: completed && ev.id ? ev.id : state.meta.eventId, + }; + const turn: Turn = { + role: "assistant", + blocks: state.acc.blocks, + meta: state.meta, + }; + if (completed) { + active.delete(key); + seededKey = undefined; + } else { + active.set(key, state); + } + return { turn, completed }; + }, + + finish(): Turn[] { + const turns = [...active.values()].map((state): Turn => ({ + role: "assistant", + blocks: state.acc.blocks, + meta: { ...state.meta, streaming: false }, + })); + active.clear(); + return turns; + }, + }; +} + +export function upsertProjectedAssistantTurn(turns: Turn[], projected: Turn): Turn[] { + const localId = projected.meta?.localId; + if (!localId) return [...turns, projected]; + const index = turns.findIndex((turn) => turn.meta?.localId === localId); + if (index < 0) return [...turns, projected]; + const next = turns.slice(); + next[index] = projected; + return next; +} + /** Replay stored session events into chat turns (for history). */ export function eventsToTurns( events: AdkEvent[], sessionState: Record = {}, ): Turn[] { - const turns: Turn[] = []; - let acc = emptyAcc(); + let turns: Turn[] = []; + let projector = createAssistantEventProjector("adk-history"); for (const ev of events) { // Classify by author only: function-response events are authored by the // agent but carry content.role === "user", so a role-based check would @@ -617,39 +789,27 @@ export function eventsToTurns( const invocation = invocationFromParts(parts); // Skip pure function-response turns (no text/files) — they're internal. if (!text && !files.length && !invocation) { - acc = emptyAcc(); continue; } + for (const unfinished of projector.finish()) { + turns = upsertProjectedAssistantTurn(turns, unfinished); + } const blocks: Block[] = []; if (invocation) blocks.push({ kind: "invocation", value: invocation }); if (files.length) blocks.push({ kind: "attachment", files }); if (text) blocks.push({ kind: "text", text }); turns.push({ role: "user", blocks, meta: { ts: ev.timestamp } }); - acc = emptyAcc(); + projector = createAssistantEventProjector("adk-history"); } else { - const author = ev.author ?? ""; - let last = turns[turns.length - 1]; - if ( - !last || - last.role !== "assistant" || - (author && last.meta?.author !== author) - ) { - last = { role: "assistant", blocks: [], meta: { author: author || undefined } }; - turns.push(last); - acc = emptyAcc(); + const projection = projector.project(ev); + if (!projection.ignored) { + turns = upsertProjectedAssistantTurn(turns, projection.turn); } - acc = applyEvent(acc, ev); - last.blocks = acc.blocks; - const usage = ev.usageMetadata ?? ev.usage_metadata; - const meta = (last.meta ??= {}); - if (author) meta.author = author; - if (usage?.totalTokenCount) meta.tokens = usage.totalTokenCount; - if (ev.timestamp) meta.ts = ev.timestamp; - if (ev.id) meta.eventId = ev.id; - const invocationId = ev.invocationId ?? ev.invocation_id; - if (invocationId) meta.invocationId = invocationId; } } + for (const unfinished of projector.finish()) { + turns = upsertProjectedAssistantTurn(turns, unfinished); + } for (const turn of turns) { const meta = turn.meta; const eventId = meta?.eventId; diff --git a/frontend/src/styles.css b/frontend/src/styles.css index 064ea9077..f43adbe45 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -1445,9 +1445,48 @@ body { .turn--subagent:has(> .turn-meta) { padding-bottom: 0; } .turn--subagent:has(> .turn-meta)::before { bottom: 44px; } .transcript.is-streaming > .turn--subagent:last-child { min-height: 0; } +.parallel-turn-group { display: contents; } +@media (min-width: 1100px) { + .parallel-turn-group { + width: min(1180px, calc(100% - 16px)); + max-width: 1180px; + margin: 0 auto 22px; + padding: 22px 2px 6px; + display: grid; + grid-auto-flow: column; + grid-auto-columns: calc((100% - 32px) / 3); + gap: 16px; + overflow-x: auto; + overflow-y: hidden; + overscroll-behavior-inline: contain; + scroll-snap-type: inline proximity; + scrollbar-width: thin; + } + .parallel-turn-group > .turn--subagent { + width: 100%; + min-width: 0; + max-width: none; + margin: 0; + scroll-snap-align: start; + } + .parallel-turn-group[data-parallel-agent-count="1"] { + grid-auto-columns: min(768px, 100%); + justify-content: center; + } + .parallel-turn-group[data-parallel-agent-count="2"] { + grid-auto-columns: calc((100% - 16px) / 2); + } + .parallel-turn-group:focus-visible { + outline: 2px solid hsl(var(--ring)); + outline-offset: 2px; + } +} .turn--assistant:has(.create-agent-tool-card.is-agent-results):has(+ .turn--subagent) > .turn-meta { display: none; } +.turn--assistant:has(.create-agent-tool-card.is-agent-results):has(+ .parallel-turn-group) > .turn-meta { + display: none; +} .subagent-run-label { position: absolute; top: 0; diff --git a/frontend/src/transcriptRows.ts b/frontend/src/transcriptRows.ts new file mode 100644 index 000000000..46e7d14f5 --- /dev/null +++ b/frontend/src/transcriptRows.ts @@ -0,0 +1,67 @@ +import type { AgentNode } from "./adk/client"; +import type { Turn } from "./blocks"; + +export interface TranscriptRow { + key: string; + turnIndexes: number[]; + parallelParent?: string; +} + +function directParallelParent( + node: AgentNode, + author: string, + parent?: AgentNode, +): AgentNode | undefined { + if (node.name === author || node.id === author) { + return parent?.type === "parallel" ? parent : undefined; + } + for (const child of node.children) { + const found = directParallelParent(child, author, node); + if (found) return found; + } + return undefined; +} + +function parallelGroupKey( + turn: Turn, + root?: AgentNode, +): { key: string; parent: string } | undefined { + if (turn.role !== "assistant" || !root) return undefined; + const author = turn.meta?.author; + if (!author) return undefined; + const parent = directParallelParent(root, author); + if (!parent) return undefined; + const parentKey = parent.id || parent.path.join("/") || parent.name; + const invocationId = turn.meta?.invocationId ?? ""; + return { + key: `${invocationId}::${parentKey}`, + parent: parent.name, + }; +} + +/** Build presentation rows without changing the source turn indexes. Only + * direct children of the same Parallel Agent and invocation share a row, so + * Sequential stages and Loop rounds keep their original vertical order. */ +export function buildTranscriptRows( + turns: Turn[], + root?: AgentNode, +): TranscriptRow[] { + const rows: Array = []; + + turns.forEach((turn, index) => { + const parallel = parallelGroupKey(turn, root); + const previous = rows[rows.length - 1]; + if (parallel && previous?.groupKey === parallel.key) { + previous.turnIndexes.push(index); + return; + } + rows.push({ + key: parallel ? `parallel-${parallel.key}-${index}` : `turn-${index}`, + turnIndexes: [index], + parallelParent: parallel?.parent, + groupKey: parallel?.key, + }); + }); + + return rows.map(({ groupKey, ...row }) => row); +} diff --git a/frontend/tests/agentTransferPresentation.test.mjs b/frontend/tests/agentTransferPresentation.test.mjs index b0f5f15ad..2b117033f 100644 --- a/frontend/tests/agentTransferPresentation.test.mjs +++ b/frontend/tests/agentTransferPresentation.test.mjs @@ -18,11 +18,13 @@ const stylesSource = readFileSync( test("preserves the emitting Agent on history and live assistant turns", () => { assert.match(blocksModelSource, /author\?: string/); - assert.match(blocksModelSource, /last\.meta\?\.author !== author/); - assert.match(blocksModelSource, /meta\.author = author/); - assert.match(appSource, /currentStreamAuthor/); - assert.match(appSource, /last\.meta(?:\?\.|\.)author === currentStreamAuthor/); - assert.match(appSource, /author: currentStreamAuthor/); + assert.match(blocksModelSource, /createAssistantEventProjector/); + assert.match(blocksModelSource, /const active = new Map/); + assert.match(blocksModelSource, /keyFor\(author, invocationId\)/); + assert.match(blocksModelSource, /upsertProjectedAssistantTurn/); + assert.match(appSource, /eventProjector\.project\(event\)/); + assert.match(appSource, /upsertProjectedAssistantTurn\(turns, projection\.turn\)/); + assert.doesNotMatch(appSource, /currentStreamAuthor/); }); test("models transfer_to_agent without rendering a separate event row", () => { diff --git a/frontend/tests/composerPresentation.test.mjs b/frontend/tests/composerPresentation.test.mjs index 9b0db13b7..748598859 100644 --- a/frontend/tests/composerPresentation.test.mjs +++ b/frontend/tests/composerPresentation.test.mjs @@ -88,10 +88,10 @@ test("smoothly positions new turns and follows streamed output until interrupted ); assert.match( appSource, - /streaming=\{isLast && \(activeConversationBusy \|\| presentingStream\)\}/, + /streaming=\{turnIsStreaming\}/, ); assert.match(appSource, /finishStreamPresentation[\s\S]*?2400/); - assert.match(appSource, /onStreamFrame=\{isLast \? followConversationStreamFrame : undefined\}/); + assert.match(appSource, /onStreamFrame=\{turnIsStreaming \? followConversationStreamFrame : undefined\}/); assert.match(blocksSource, /!done \|\| streaming/); }); diff --git a/frontend/tests/parallelStreamAggregation.test.mjs b/frontend/tests/parallelStreamAggregation.test.mjs new file mode 100644 index 000000000..016923bbf --- /dev/null +++ b/frontend/tests/parallelStreamAggregation.test.mjs @@ -0,0 +1,227 @@ +import assert from "node:assert/strict"; +import { Buffer } from "node:buffer"; +import { fileURLToPath } from "node:url"; +import test from "node:test"; + +import { build } from "esbuild"; + +const result = await build({ + entryPoints: [fileURLToPath(new URL("../src/blocks.ts", import.meta.url))], + bundle: true, + format: "esm", + platform: "node", + target: "node20", + write: false, +}); +const moduleUrl = `data:text/javascript;base64,${Buffer.from( + result.outputFiles[0].contents, +).toString("base64")}`; +const { + createAssistantEventProjector, + eventsToTurns, + upsertProjectedAssistantTurn, +} = await import(moduleUrl); + +function event(author, text, options = {}) { + return { + author, + invocationId: options.invocationId ?? "invocation-1", + id: options.id, + partial: options.partial ?? true, + timestamp: options.timestamp ?? 1, + content: { + role: "model", + parts: [{ text, thought: options.thought ?? false }], + }, + }; +} + +function blockText(turn, kind) { + return turn.blocks + .filter((block) => block.kind === kind) + .map((block) => block.text) + .join(""); +} + +test("keeps interleaved parallel authors in one stable turn per active response", () => { + const projector = createAssistantEventProjector("test"); + let turns = []; + for (const item of [ + event("parallel_alpha", "符", { thought: true }), + event("parallel_beta", "用", { thought: true }), + event("parallel_alpha", "合", { thought: true }), + event("parallel_beta", "户", { thought: true }), + ]) { + turns = upsertProjectedAssistantTurn(turns, projector.project(item).turn); + } + + assert.equal(turns.length, 2); + assert.equal(blockText(turns[0], "thinking"), "符合"); + assert.equal(blockText(turns[1], "thinking"), "用户"); + assert.equal(turns[0].meta.streaming, true); + assert.equal(turns[1].meta.streaming, true); + assert.equal(turns[0].meta.eventId, undefined); + assert.equal(turns[1].meta.eventId, undefined); + + turns = upsertProjectedAssistantTurn( + turns, + projector.project(event("parallel_alpha", "完整事实", { + partial: false, + id: "final-alpha", + })).turn, + ); + turns = upsertProjectedAssistantTurn( + turns, + projector.project(event("parallel_beta", "完整风险", { + partial: false, + id: "final-beta", + })).turn, + ); + + assert.equal(turns.length, 2); + assert.equal(blockText(turns[0], "text"), "完整事实"); + assert.equal(blockText(turns[1], "text"), "完整风险"); + assert.equal(turns[0].meta.streaming, false); + assert.equal(turns[1].meta.streaming, false); + assert.equal(turns[0].meta.eventId, "final-alpha"); + assert.equal(turns[1].meta.eventId, "final-beta"); +}); + +test("starts a new turn when the same loop author produces another final response", () => { + const projector = createAssistantEventProjector("loop"); + let turns = []; + for (const item of [ + event("loop_reviewer", "第一轮", { partial: false, id: "loop-1" }), + event("loop_reviewer", "第二轮", { partial: false, id: "loop-2" }), + event("loop_reviewer", "第三轮", { partial: false, id: "loop-3" }), + ]) { + turns = upsertProjectedAssistantTurn(turns, projector.project(item).turn); + } + + assert.deepEqual(turns.map((turn) => blockText(turn, "text")), [ + "第一轮", + "第二轮", + "第三轮", + ]); + assert.deepEqual(turns.map((turn) => turn.meta.eventId), [ + "loop-1", + "loop-2", + "loop-3", + ]); +}); + +test("replays interleaved history without token cards and binds feedback to final events", () => { + const events = [ + event("parallel_alpha", "符", { thought: true }), + event("parallel_beta", "用", { thought: true }), + event("parallel_alpha", "合", { thought: true }), + event("parallel_beta", "户", { thought: true }), + event("parallel_alpha", "完整事实", { partial: false, id: "final-alpha" }), + event("parallel_beta", "完整风险", { partial: false, id: "final-beta" }), + ]; + const turns = eventsToTurns(events, { + "veadk_feedback:final-alpha": { rating: "good" }, + }); + + assert.equal(turns.length, 2); + assert.deepEqual(turns.map((turn) => blockText(turn, "text")), [ + "完整事实", + "完整风险", + ]); + assert.equal(turns[0].meta.feedback.rating, "good"); + assert.equal(turns[1].meta.feedback, undefined); +}); + +test("keeps an OAuth-resumed response on its seeded turn when invocation changes", () => { + const initialTurn = { + role: "assistant", + blocks: [{ kind: "auth", callId: "auth-1", authConfig: {}, done: true }], + meta: { + author: "oauth_agent", + invocationId: "before-resume", + eventId: "before-resume-event", + localId: "oauth-turn", + }, + }; + const projector = createAssistantEventProjector("oauth", initialTurn); + const projected = projector.project(event("oauth_agent", "授权后完整回答", { + invocationId: "after-resume", + partial: false, + id: "after-resume-event", + })).turn; + + assert.equal(projected.meta.localId, "oauth-turn"); + assert.equal(projected.meta.invocationId, "after-resume"); + assert.equal(projected.meta.eventId, "after-resume-event"); + assert.deepEqual(projected.blocks.map((block) => block.kind), ["auth", "text"]); +}); + +test("replaces the optimistic assistant placeholder instead of leaving an empty turn", () => { + const placeholder = { + role: "assistant", + blocks: [], + meta: { localId: "pending-turn", streaming: true }, + }; + const projector = createAssistantEventProjector("send", placeholder); + let turns = [ + { role: "user", blocks: [{ kind: "text", text: "问题" }] }, + placeholder, + ]; + const projection = projector.project(event("answer_agent", "完整回答", { + partial: false, + id: "answer-final", + })); + turns = upsertProjectedAssistantTurn(turns, projection.turn); + + assert.equal(turns.length, 2); + assert.equal(turns[1].meta.localId, "pending-turn"); + assert.equal(blockText(turns[1], "text"), "完整回答"); +}); + +test("completes A2UI-only and artifact-only replies with persisted Event IDs", () => { + const a2uiProjector = createAssistantEventProjector("a2ui"); + const a2ui = a2uiProjector.project({ + author: "ui_agent", + invocationId: "ui-invocation", + id: "ui-final", + partial: false, + content: { + role: "model", + parts: [{ + functionResponse: { + name: "send_a2ui_json_to_client", + response: { validated_a2ui_json: [{ surfaceUpdate: { surfaceId: "main" } }] }, + }, + }], + }, + }); + assert.equal(a2ui.completed, true); + assert.equal(a2ui.turn.meta.eventId, "ui-final"); + assert.deepEqual(a2ui.turn.blocks.map((block) => block.kind), ["a2ui"]); + + const artifactProjector = createAssistantEventProjector("artifact"); + const artifact = artifactProjector.project({ + author: "artifact_agent", + invocationId: "artifact-invocation", + id: "artifact-final", + partial: false, + actions: { artifactDelta: { "report.md": 1 } }, + }); + assert.equal(artifact.completed, true); + assert.equal(artifact.turn.meta.eventId, "artifact-final"); + assert.deepEqual(artifact.turn.blocks.map((block) => block.kind), ["artifact"]); +}); + +test("ignores control-only events after a completed response", () => { + const projector = createAssistantEventProjector("control"); + projector.project(event("worker", "完成", { partial: false, id: "final" })); + const signal = projector.project({ + author: "worker", + invocationId: "invocation-1", + id: "end-signal", + partial: false, + actions: { endOfAgent: true }, + }); + assert.equal(signal.ignored, true); + assert.deepEqual(projector.finish(), []); +}); diff --git a/frontend/tests/parallelTranscriptLayout.test.mjs b/frontend/tests/parallelTranscriptLayout.test.mjs new file mode 100644 index 000000000..3bf81c63e --- /dev/null +++ b/frontend/tests/parallelTranscriptLayout.test.mjs @@ -0,0 +1,83 @@ +import assert from "node:assert/strict"; +import { Buffer } from "node:buffer"; +import { fileURLToPath } from "node:url"; +import test from "node:test"; + +import { build } from "esbuild"; + +const result = await build({ + entryPoints: [fileURLToPath(new URL("../src/transcriptRows.ts", import.meta.url))], + bundle: true, + format: "esm", + platform: "node", + target: "node20", + write: false, +}); +const moduleUrl = `data:text/javascript;base64,${Buffer.from( + result.outputFiles[0].contents, +).toString("base64")}`; +const { buildTranscriptRows } = await import(moduleUrl); + +const node = (name, type, children = []) => ({ + name, + description: "", + type, + model: "", + tools: [], + skills: [], + path: [name], + mentionable: true, + children, +}); +const root = node("root", "sequential", [ + node("opening", "llm"), + node("research", "parallel", [ + node("facts", "llm"), + node("risks", "llm"), + node("options", "llm"), + node("costs", "llm"), + ]), + node("review_loop", "loop", [node("reviewer", "llm")]), + node("closing", "llm"), +]); + +const assistant = (author, invocationId = "inv-1") => ({ + role: "assistant", + blocks: [{ kind: "text", text: author }], + meta: { author, invocationId }, +}); + +test("groups only direct children from the same parallel stage", () => { + const turns = [ + { role: "user", blocks: [{ kind: "text", text: "start" }] }, + assistant("opening"), + assistant("facts"), + assistant("risks"), + assistant("options"), + assistant("costs"), + assistant("reviewer"), + assistant("reviewer"), + assistant("closing"), + ]; + + const rows = buildTranscriptRows(turns, root); + assert.deepEqual(rows.map((row) => row.turnIndexes), [ + [0], + [1], + [2, 3, 4, 5], + [6], + [7], + [8], + ]); + assert.equal(rows[2].parallelParent, "research"); +}); + +test("does not group parallel responses from different invocations", () => { + const rows = buildTranscriptRows([ + assistant("facts", "inv-1"), + assistant("risks", "inv-2"), + ], root); + assert.deepEqual(rows.map((row) => row.turnIndexes), [[0], [1]]); + assert.equal(rows[0].parallelParent, "research"); + assert.notEqual(rows[0].key, rows[1].key); +}); diff --git a/frontend/tests/responseAnnotation.test.mjs b/frontend/tests/responseAnnotation.test.mjs index 270219cc1..889174177 100644 --- a/frontend/tests/responseAnnotation.test.mjs +++ b/frontend/tests/responseAnnotation.test.mjs @@ -227,7 +227,7 @@ test("refreshes selection context when a streaming reply finishes", () => { assert.match(selectionContextSync, /responseAnnotationContextsRef\.current = contexts/); assert.match( selectionContextSync, - /index === turns\.length - 1[\s\S]*?activeConversationBusy \|\| presentingStream/, + /assistantTurnIsStreaming\([\s\S]*?turn,[\s\S]*?index,[\s\S]*?turns\.length,[\s\S]*?activeConversationBusy,[\s\S]*?presentingStream/, ); assert.match(selectionContextSync, /enabled: Boolean\(/); assert.match( @@ -245,7 +245,7 @@ test("submits the annotation as a bad-case feedback sample", () => { assert.match(appSource, /cloudProvider !== "byteplus"/); assert.match( appSource, - /const turnIsStreaming = isLast && \([\s\S]*?activeConversationBusy \|\| presentingStream/, + /const turnIsStreaming = assistantTurnIsStreaming\([\s\S]*?turn,[\s\S]*?i,[\s\S]*?turns\.length/, ); assert.match(appSource, /!turnIsStreaming/); assert.match(clientSource, /const comment = args\.comment \?\? ""/); diff --git a/frontend/tests/runSseCompletion.test.mjs b/frontend/tests/runSseCompletion.test.mjs index 925ed612e..833c249c3 100644 --- a/frontend/tests/runSseCompletion.test.mjs +++ b/frontend/tests/runSseCompletion.test.mjs @@ -11,7 +11,7 @@ test("conversation reports a completed stream that has no final displayable repl assert.match(appSource, /let hasCompletedReply = false/); assert.match( appSource, - /event\.partial !== true &&[\s\S]*?turnHasVisibleContent\(\{ role: "assistant", blocks \}\)[\s\S]*?hasCompletedReply = true/, + /projection\.completed &&[\s\S]*?turnHasVisibleContent\(projection\.turn\)[\s\S]*?hasCompletedReply = true/, ); assert.match( appSource, @@ -43,7 +43,7 @@ test("function-response recovery rejects partial-only and empty resumed streams" assert.match(onAuthSource, /let streamFailed = false;[\s\S]*?let hasCompletedReply = false/); assert.match( onAuthSource, - /event\.partial !== true &&[\s\S]*?turnHasVisibleContent\(\{ role: "assistant", blocks: acc\.blocks \}\)[\s\S]*?hasCompletedReply = true/, + /projection\.completed &&[\s\S]*?turnHasVisibleContent\(projection\.turn\)[\s\S]*?hasCompletedReply = true/, ); assert.match( onAuthSource, diff --git a/tests/examples/test_studio_workflow_matrix.py b/tests/examples/test_studio_workflow_matrix.py new file mode 100644 index 000000000..c3762b727 --- /dev/null +++ b/tests/examples/test_studio_workflow_matrix.py @@ -0,0 +1,139 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import annotations + +import importlib +import sys +from pathlib import Path + +import pytest + +from veadk import Agent +from veadk.agents.loop_agent import LoopAgent +from veadk.agents.parallel_agent import ParallelAgent +from veadk.agents.sequential_agent import SequentialAgent + +AGENTS_DIR = Path(__file__).parents[2] / "examples" / "studio_workflow_matrix" +sys.path.insert(0, str(AGENTS_DIR)) + + +@pytest.mark.parametrize( + ("module_name", "agent_type", "agent_name"), + [ + ("llm_agent", Agent, "llm_agent"), + ("sequential_agent", SequentialAgent, "sequential_agent"), + ("parallel_agent", ParallelAgent, "parallel_agent"), + ("loop_agent", LoopAgent, "loop_agent"), + ("mixed_agent", SequentialAgent, "mixed_agent"), + ( + "all_agent_types_agent", + SequentialAgent, + "all_agent_types_agent", + ), + ], +) +def test_workflow_app_wiring( + module_name: str, agent_type: type, agent_name: str +) -> None: + module = importlib.import_module(f"{module_name}.agent") + + assert isinstance(module.root_agent, agent_type) + assert module.root_agent.name == agent_name + + +def test_parallel_fixture_has_three_tool_free_specialists() -> None: + module = importlib.import_module("parallel_agent.agent") + + assert [agent.name for agent in module.root_agent.sub_agents] == [ + "parallel_alpha", + "parallel_beta", + "parallel_gamma", + ] + assert all(not agent.tools for agent in module.root_agent.sub_agents) + + +def test_loop_fixtures_are_bounded() -> None: + loop = importlib.import_module("loop_agent.agent").root_agent + mixed = importlib.import_module("mixed_agent.agent").root_agent + all_types = importlib.import_module("all_agent_types_agent.agent").root_agent + + assert loop.max_iterations == 3 + assert mixed.sub_agents[2].max_iterations == 2 + assert all_types.sub_agents[3].max_iterations == 2 + + +def test_mixed_fixture_contains_every_workflow_kind() -> None: + root = importlib.import_module("mixed_agent.agent").root_agent + + assert isinstance(root, SequentialAgent) + assert isinstance(root.sub_agents[0], Agent) + assert isinstance(root.sub_agents[1], ParallelAgent) + assert isinstance(root.sub_agents[2], LoopAgent) + assert isinstance(root.sub_agents[3], Agent) + + +def test_all_agent_types_fixture_contains_every_workflow_kind() -> None: + module = importlib.import_module("all_agent_types_agent.agent") + root = module.root_agent + + assert isinstance(root, SequentialAgent) + assert isinstance(root.sub_agents[0], Agent) + assert isinstance(root.sub_agents[1], SequentialAgent) + assert isinstance(root.sub_agents[2], ParallelAgent) + assert isinstance(root.sub_agents[3], LoopAgent) + assert isinstance(root.sub_agents[4], Agent) + assert [agent.name for agent in root.sub_agents[2].sub_agents] == [ + "all_types_evidence", + "all_types_risks", + "all_types_options", + "all_types_rollout", + ] + + agents = [ + root.sub_agents[0], + *root.sub_agents[1].sub_agents, + *root.sub_agents[2].sub_agents, + *root.sub_agents[3].sub_agents, + root.sub_agents[4], + ] + forbidden_markers = ("[PAR-", "[SEQ-", "[LOOP", "[MIX-") + assert all( + not any(marker in agent.instruction for marker in forbidden_markers) + for agent in agents + ) + + +def test_all_workflow_fixtures_hide_internal_test_markers() -> None: + roots = [ + importlib.import_module(f"{module_name}.agent").root_agent + for module_name in ( + "llm_agent", + "sequential_agent", + "parallel_agent", + "loop_agent", + "mixed_agent", + "all_agent_types_agent", + ) + ] + forbidden_markers = ("[PAR-", "[SEQ-", "[LOOP", "[MIX-", "[LLM") + + def walk(agent: Agent) -> list[Agent]: + return [agent, *(child for item in agent.sub_agents for child in walk(item))] + + assert all( + not any(marker in agent.instruction for marker in forbidden_markers) + for root in roots + for agent in walk(root) + ) diff --git a/veadk/webui/assets/app/index-CabUMMxm.js b/veadk/webui/assets/app/index-ByKH09wM.js similarity index 67% rename from veadk/webui/assets/app/index-CabUMMxm.js rename to veadk/webui/assets/app/index-ByKH09wM.js index acf0ffffb..861c0aa89 100644 --- a/veadk/webui/assets/app/index-CabUMMxm.js +++ b/veadk/webui/assets/app/index-ByKH09wM.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/visualizations/mermaid/mermaid.core-C8O8nWja.js","assets/chunks/purify.es-BnINGy_Y.js","assets/chunks/MarkdownPromptEditor-Cmx-E7im.js","assets/styles/MarkdownPromptEditor-ZH9qtki0.css"])))=>i.map(i=>d[i]); -var yDe=Object.defineProperty;var sV=e=>{throw TypeError(e)};var vDe=(e,t,n)=>t in e?yDe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Mi=(e,t,n)=>vDe(e,typeof t!="symbol"?t+"":t,n),aV=(e,t,n)=>t.has(e)||sV("Cannot "+n);var co=(e,t,n)=>(aV(e,t,"read from private field"),n?n.call(e):t.get(e)),oV=(e,t,n)=>t.has(e)?sV("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),EP=(e,t,n,i)=>(aV(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);function xDe(e,t){for(var n=0;ni[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var $p=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function px(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Die={exports:{}},hj={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/visualizations/mermaid/mermaid.core-Czk7O9j0.js","assets/chunks/purify.es-BnINGy_Y.js","assets/chunks/MarkdownPromptEditor-B11ZU4r0.js","assets/styles/MarkdownPromptEditor-ZH9qtki0.css"])))=>i.map(i=>d[i]); +var vDe=Object.defineProperty;var iV=e=>{throw TypeError(e)};var xDe=(e,t,n)=>t in e?vDe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Di=(e,t,n)=>xDe(e,typeof t!="symbol"?t+"":t,n),rV=(e,t,n)=>t.has(e)||iV("Cannot "+n);var oo=(e,t,n)=>(rV(e,t,"read from private field"),n?n.call(e):t.get(e)),sV=(e,t,n)=>t.has(e)?iV("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),SP=(e,t,n,i)=>(rV(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);function ODe(e,t){for(var n=0;ni[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var Ip=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ux(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pie={exports:{}},uj={};/** * @license React * react-jsx-runtime.production.js * @@ -7,43 +7,43 @@ var yDe=Object.defineProperty;var sV=e=>{throw TypeError(e)};var vDe=(e,t,n)=>t * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ODe=Symbol.for("react.transitional.element"),wDe=Symbol.for("react.fragment");function Mie(e,t,n){var i=null;if(n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:ODe,type:e,key:i,ref:t!==void 0?t:null,props:n}}hj.Fragment=wDe;hj.jsx=Mie;hj.jsxs=Mie;Die.exports=hj;var o=Die.exports;const Lie={requestFailed:"Request failed ({{status}})",unknownError:"Unknown error",contentTypeMissing:"Content-Type missing",response:"Response: {{response}}",fallbackWithDetail:"{{fallback}}: {{detail}}",fallbackWithHttpStatus:"{{fallback}} (HTTP {{status}})",nonJsonResponse:"{{fallback}}: the server returned a non-JSON response ({{contentType}})"},$ie={unconfigured:"AgentKit Dev Sandbox has not been configured by an administrator.",invalidSession:"AgentKit CLI returned an invalid session.",loadCapabilitiesFailed:"Unable to load the AgentKit CLI configuration.",invalidCapabilities:"AgentKit CLI returned an invalid configuration status.",listSessionsFailed:"Unable to load AgentKit CLI sessions.",invalidSessionList:"AgentKit CLI returned an invalid session list.",createSessionFailed:"Unable to create an AgentKit CLI session.",openSessionFailed:"Unable to open the AgentKit CLI session.",openTerminalFailed:"Unable to open the AgentKit CLI terminal.",invalidTerminalUrl:"AgentKit CLI returned an invalid terminal URL."},Fie={cnBeijing:"China North 2 (Beijing)",cnShanghai:"China East 2 (Shanghai)"},Bie={runtimeUnsupported:"This Runtime does not currently support connections. Confirm that the service is running normally."},Uie={autoConfigureFailed:"Failed to configure the Feishu bot automatically"},Qie={actionFailed:"Failed to {{action}}",detail:"Details: {{detail}}",request:"Request: {{request}}"},zie={persistentMemoryHint:"Tip: The session no longer exists. With in-memory or SQLite short-term memory, sessions may be lost during multi-instance routing, process restarts, or rolling deployments. Use database-backed persistent short-term memory instead.",unsupportedRouteHint:"Tip: This Runtime does not provide the session run API and may be incompatible with the current Studio version.",toolArgumentHint:"Tip: The model generated incomplete tool arguments. Send the request again.",resourceCollectionExpiredHint:"Tip: This resource collection has expired. Send the task again so the system can collect the resources before creating the Agent.",networkConfigurationHint:"Tip: Check network settings such as the shared public egress, then try again.",rawResponseLabel:"Raw response: "},Vie={httpStatus:"HTTP status: {{status}}",errorCode:"Error code: {{code}}",cloudResponseBody:`Cloud response body: -{{body}}`,loadFailedWithDetail:"Failed to load instance logs: {{detail}}",invalidFormat:"Failed to load instance logs: the service returned an invalid format"},Hie={untitledSession:"Untitled session",webUnavailable:"Web search is unavailable because /web/search is not enabled on the server.",webFailed:"Web search failed: {{message}}",webNotMounted:"This Agent does not have the web_search tool mounted.",knowledgeNotMounted:"This Agent does not have a knowledge base mounted.",memoryNotMounted:"This Agent does not have long-term memory mounted.",knowledge:"Knowledge base",longTermMemory:"Long-term memory"},qie={listSpacesFailed:"Failed to load Skill spaces",createSpaceFailed:"Failed to create the Skill space",updateSpaceFailed:"Failed to update the Skill space",deleteSpaceFailed:"Failed to delete the Skill space",uploadFailed:"Failed to upload the Skill",validateFailed:"Failed to validate the Skill",deleteFailed:"Failed to delete the Skill",listFilesFailed:"Failed to load Skill files",downloadFailed:"Failed to download the Skill"},Wie={truncatedData:"{{data}}… (truncated, {{count}} characters total)",incompleteEvent:"The stream ended with an incomplete SSE event. Raw data: {{data}}",invalidEventJson:"Failed to parse the SSE event JSON. Raw data: {{data}}"},Kie={loadConfigNetworkFailed:"Unable to load the sign-in configuration. Check your network and try again.",configServiceFailed:"The sign-in configuration service failed (HTTP {{status}}). Try again later.",invalidConfigResponse:"The sign-in configuration service returned an unreadable response. Try again later.",serviceNetworkFailed:"Unable to connect to the identity service. Check your network and try again.",invalidServiceResponse:"The identity service returned an unreadable response. Try again later.",serviceFailed:"The identity service failed (HTTP {{status}}). Try again later."},Gie={invalidToken:"The GitHub token is invalid or does not have repository write access",notFound:"The repository, branch, or file does not exist, or the token cannot access it",rejectedCommit:"GitHub rejected the commit. Check the branch and file state",requestFailed:"GitHub request failed (HTTP {{status}})",networkFailed:"Unable to connect to GitHub. Check your network and try again",invalidRepositoryFormat:"The GitHub repository must use the owner/repository format",insecureRepositoryUrl:"Only secure github.com repository URLs are supported",unsafeProjectPath:"The Agent project directory must be a safe relative path within the repository",tokenRequired:"A GitHub token is required",invalidBaseBranch:"The target branch format is invalid",invalidPublishBranch:"The publish branch format is invalid",noFiles:"There are no files to commit",missingBaseSha:"The target branch does not have a valid Git SHA",fileAlreadyExists:"{{path}} already exists in the target repository; the existing file was not overwritten",pathNotUpdatable:"The target path {{path}} is not an updatable file",invalidPullRequest:"GitHub did not return a valid pull request"},Xie={loadCapabilitiesFailed:"Failed to load video model capabilities",uploadAssetFailed:"Failed to upload {{fileName}}",enhancePromptFailed:"Failed to enhance the prompt",createTaskFailed:"Failed to create the video generation task",getTaskFailed:"Failed to load the video generation task",downloadFailed:"Failed to download the generated video"},Yie={listFailed:"Failed to load website integrations",createFailed:"Failed to create the website integration",deleteFailed:"Failed to delete the website integration"},Zie={loadFailed:"Failed to load the knowledge base",htmlHidden:"[HTML content hidden]",redacted:"[redacted]",depthTruncated:"[content nested too deeply; truncated]",circularReference:"[circular reference]",diagnosticsUnavailable:"[diagnostic information unavailable]",statusCode:"Status: {{status}}",errorCode:"Error code: {{code}}",requestId:"Request ID: {{requestId}}",diagnostics:"Diagnostics: {{diagnostics}}",detail:"Details: {{detail}}",signInRequired:"Sign in before accessing knowledge bases",forbidden:"You do not have permission to operate on this knowledge base",notFound:"The knowledge base or knowledge content does not exist",conflict:"The knowledge base cannot perform this operation in its current state",requestFailed:"Knowledge base request failed ({{status}})"},Jie={invalidSourceSnapshot:"The source snapshot response has an invalid format.",invalidProjectList:"The project list response has an invalid format.",invalidProjectVersion:"The project version response has an invalid format.",loadProjectsFailed:"Unable to load saved projects",loadVersionsFailed:"Unable to load project versions",deleteVersionFailed:"Failed to delete the project version",invalidDeleteVersionResponse:"The project version deletion response has an invalid format.",loadProjectSourceFailed:"Unable to load project source",loadSnapshotFailed:"Unable to load the source snapshot",restoreSnapshotFailed:"Unable to restore the current source snapshot",downloadSourceFailed:"Failed to download the source",downloadNotZip:"The source download response is not a ZIP file.",downloadSizeMismatch:"The source archive size does not match the published record. Try again."},ere={invalidFormat:"{{label}} has an invalid format.",validationSeparator:"; ",invalidAnalysisResult:"The migration analysis result has an invalid format.",invalidFrameworkCandidate:"A framework candidate has an invalid format.",invalidAnalysisEvidence:"The analysis evidence has an invalid format.",invalidEntryCandidate:"An entry candidate has an invalid format.",invalidQuestion:"A follow-up question has an invalid format.",invalidTask:"The migration session has an invalid format.",invalidAnalysisReference:"The analysis result reference has an invalid format.",invalidSourcePersistence:"The migration source persistence status has an invalid format.",invalidActivity:"The migration activity has an invalid format.",invalidActivityItem:"A migration activity item has an invalid format.",invalidActivityTool:"A migration activity tool item has an invalid format.",invalidActivityPlan:"The migration execution plan has an invalid format.",invalidActivityPlanItem:"A migration execution plan item has an invalid format.",invalidArtifact:"The migration artifact has an invalid format.",invalidEnvironmentDefaults:"The environment variable defaults have an invalid format.",invalidArtifactFile:"A migration artifact file has an invalid format.",invalidVerificationCheck:"A migration verification check has an invalid format.",requestValidationFailed:"Request validation failed: {{detail}}",gatewayError:"{{fallback}} (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",nonJsonResponse:"{{fallback}}: the server returned a non-JSON response (HTTP {{status}}). Check the proxy or gateway configuration.",loadCapabilitiesFailed:"Failed to load migration capabilities",invalidCapabilities:"The migration capabilities have an invalid format.",invalidModelCapabilities:"The migration model capabilities have an invalid format.",loadTasksFailed:"Failed to load migration sessions",invalidTaskList:"The migration session list has an invalid format.",createTaskFailed:"Failed to create the migration session",uploadProjectFailed:"Failed to upload the migration project",loadActivityFailed:"Failed to load migration activity",startFailed:"Failed to start the migration",submitAnswersFailed:"Failed to submit additional analysis information",stopFailed:"Failed to stop the migration",deleteTaskFailed:"Failed to delete the migration session",loadArtifactFailed:"Failed to load the migration artifact",loadArtifactFileFailed:"Failed to load the migration artifact file",downloadArtifactFailed:"Failed to download the migration artifact",labels:{analysisResult:"Migration analysis result",recommendation:"Migration recommendation",boundary:"Migration boundary",frameworkCandidate:"Framework candidate",analysisEvidence:"Analysis evidence",recommendedFramework:"Recommended framework",entryCandidate:"Entry candidate",entryFramework:"Entry framework",includeScope:"Migration include scope",excludeScope:"Migration exclude scope",assumptions:"Analysis assumptions",question:"Follow-up question",analysisWarnings:"Migration warnings",task:"Migration session",artifactStatus:"Migration artifact status",analysisReference:"Analysis result reference",confirmation:"Migration confirmation",confirmedFramework:"Confirmed framework",error:"Migration error",sourcePersistence:"Migration source persistence status",activity:"Migration activity",activityItem:"Migration activity item",activityTool:"Migration activity tool item",activityPlanItem:"Migration activity plan item",artifact:"Migration artifact",cli:"CLI information",migration:"Migration information",startup:"Startup information",environment:"Environment variable information",verification:"Verification information",report:"Migration report",archive:"Artifact archive",environmentDefaults:"Environment variable defaults",requiredEnvironment:"Required environment variables",optionalEnvironment:"Optional environment variables",artifactFile:"Migration artifact file",verificationCheck:"Migration verification check",artifactWarnings:"Migration artifact warnings",errorResponse:"Error response",errorDetail:"Error details",capabilities:"Migration capabilities",framework:"Migration framework",modelCapabilities:"Migration model capabilities",taskList:"Migration session list"}},tre={status:{ready:"Ready",wakeable:"Wakeable",creating:"Creating",starting:"Starting",pending:"Pending",running:"Running",failed:"Error",stopped:"Stopped",expired:"Expired",deleting:"Deleting",deleted:"Deleted",unknown:"Unknown status"},developmentTimeout:"The development environment timed out. The task may still be running; reopen this session later to check its status.",developmentDisconnected:"The connection to the development environment was interrupted. The task may still be running; reopen this session later to check its status.",developmentFailed:"The development task could not continue. The environment was preserved; try again in this session.",invalidStudioResponse:"{{fallback}} Studio returned an invalid response. Refresh and try again.",invalidSession:"AgentKit Sandbox returned invalid session information.",invalidSnapshot:"AgentKit Sandbox returned invalid snapshot information.",invalidSettings:"Sandbox returned invalid settings.",invalidThreadSnapshot:"Sandbox returned an invalid thread snapshot.",emptyConversationResponse:"The Sandbox conversation service returned no content.",invalidConversationResponse:"The Sandbox conversation service returned an unreadable response.",conversationFailed:"The Sandbox conversation failed. Try again later.",emptyReply:"Sandbox did not return a valid reply. Try again.",missingSession:"The AgentKit session is missing.",listCodexFailed:"Unable to load Codex agents. Try again later.",invalidSessionList:"AgentKit Sandbox returned an invalid session list.",invalidSnapshotList:"AgentKit Sandbox returned an invalid snapshot list.",startFailed:"Unable to start AgentKit Sandbox. Try again later.",listAgentFailed:"Unable to load {{kind}} agents. Try again later.",invalidKindSessionList:"AgentKit returned an invalid {{kind}} session list.",invalidKindSnapshotList:"AgentKit returned an invalid {{kind}} snapshot list.",createAgentFailed:"Unable to create a {{kind}} agent. Try again later.",missingSessionToOpen:"The AgentKit session to open is missing.",openAgentFailed:"Unable to open the {{kind}} agent.",invalidAgentHomeUrl:"The {{kind}} agent returned an invalid home URL.",missingSessionForTerminal:"The AgentKit session for the terminal is missing.",openTerminalFailed:"Unable to open the {{kind}} terminal.",deleteAgentFailed:"Unable to delete the {{kind}} agent.",missingSnapshot:"The AgentKit snapshot to wake is missing.",resumeSnapshotFailed:"Unable to wake the agent from its snapshot. Try again later.",deleteSnapshotFailed:"Unable to delete the agent snapshot.",missingSessionToConnect:"The AgentKit session to connect is missing.",connectCodexFailed:"Unable to connect to the Codex agent. Try again later.",sessionNotReady:"The AgentKit session is not ready. Current status: {{status}}.",invalidMessage:"The built-in agent session does not contain a valid message.",interruptFailed:"Unable to stop the current task.",getStatusFailed:"Unable to load Codex status.",getEndpointFailed:"Unable to load the Sandbox endpoint.",invalidEndpoint:"Sandbox returned an invalid endpoint.",createHandoffPairingFailed:"Unable to create a Codex cloud handoff pairing code.",invalidHandoffPairing:"Studio returned an invalid Codex cloud handoff pairing code.",getHandoffStatusFailed:"Unable to load the cloud handoff status.",invalidHandoffStatus:"Studio returned an invalid cloud handoff status.",listModelsFailed:"Unable to load Codex models.",invalidModelList:"Sandbox returned an invalid model list.",setModelFailed:"Unable to switch the Codex model.",invalidModel:"Sandbox returned an invalid model.",listSkillsFailed:"Unable to load Codex Skills.",invalidSkillList:"Sandbox returned an invalid Skill list.",listThreadsFailed:"Unable to load Codex threads.",invalidThreadList:"Sandbox returned an invalid thread list.",createThreadFailed:"Unable to create a new Codex thread.",missingThread:"The Codex thread to read is missing.",readThreadFailed:"Unable to load Codex history.",resumeThreadFailed:"Unable to resume the Codex thread.",forkThreadFailed:"Unable to fork the Codex thread.",archiveThreadFailed:"Unable to archive the Codex thread.",invalidArchiveResult:"Sandbox returned an invalid archive result.",deleteThreadFailed:"Unable to delete the Codex thread.",invalidDeleteResult:"Sandbox returned an invalid deletion result.",compactThreadFailed:"Unable to compact the Codex thread.",getSettingsFailed:"Unable to load Codex permissions and workspace settings.",updatePermissionsFailed:"Unable to update Codex permissions.",updateWorkspaceFailed:"Unable to update the Codex workspace.",invalidWorkingDirectory:"Sandbox returned an invalid working directory.",listDirectoriesFailed:"Unable to load Sandbox directories.",invalidDirectoryList:"Sandbox returned an invalid directory list.",resolveApprovalFailed:"Unable to submit the Codex approval decision.",uploadFileFailed:"Unable to upload the file to Sandbox.",invalidUploadResult:"Sandbox returned an invalid upload result.",disconnectCodexFailed:"Unable to disconnect the Codex agent.",deleteCodexFailed:"Unable to delete the Codex agent.",openSandboxTerminalFailed:"Unable to open the Sandbox terminal.",openSandboxBrowserFailed:"Unable to open the Sandbox browser.",toolLabel:"Sandbox tool",invalidToolUrl:"{{label}} returned an invalid URL.",unsafeToolUrl:"{{label}} returned an unsafe URL."},nre={invalidSandboxVersion:"Invalid sandbox version response",loadSandboxVersionsFailed:"Failed to check sandbox versions",updateSandboxFailed:"Failed to update sandbox",invalidSandboxUpdate:"Invalid sandbox update response",errorWithDetailAndRawResponse:`{{context}} + */var wDe=Symbol.for("react.transitional.element"),SDe=Symbol.for("react.fragment");function Die(e,t,n){var i=null;if(n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:wDe,type:e,key:i,ref:t!==void 0?t:null,props:n}}uj.Fragment=SDe;uj.jsx=Die;uj.jsxs=Die;Pie.exports=uj;var o=Pie.exports;const Mie={requestFailed:"Request failed ({{status}})",unknownError:"Unknown error",contentTypeMissing:"Content-Type missing",response:"Response: {{response}}",fallbackWithDetail:"{{fallback}}: {{detail}}",fallbackWithHttpStatus:"{{fallback}} (HTTP {{status}})",nonJsonResponse:"{{fallback}}: the server returned a non-JSON response ({{contentType}})"},Lie={unconfigured:"AgentKit Dev Sandbox has not been configured by an administrator.",invalidSession:"AgentKit CLI returned an invalid session.",loadCapabilitiesFailed:"Unable to load the AgentKit CLI configuration.",invalidCapabilities:"AgentKit CLI returned an invalid configuration status.",listSessionsFailed:"Unable to load AgentKit CLI sessions.",invalidSessionList:"AgentKit CLI returned an invalid session list.",createSessionFailed:"Unable to create an AgentKit CLI session.",openSessionFailed:"Unable to open the AgentKit CLI session.",openTerminalFailed:"Unable to open the AgentKit CLI terminal.",invalidTerminalUrl:"AgentKit CLI returned an invalid terminal URL."},$ie={cnBeijing:"China North 2 (Beijing)",cnShanghai:"China East 2 (Shanghai)"},Fie={runtimeUnsupported:"This Runtime does not currently support connections. Confirm that the service is running normally."},Bie={autoConfigureFailed:"Failed to configure the Feishu bot automatically"},Uie={actionFailed:"Failed to {{action}}",detail:"Details: {{detail}}",request:"Request: {{request}}"},Qie={persistentMemoryHint:"Tip: The session no longer exists. With in-memory or SQLite short-term memory, sessions may be lost during multi-instance routing, process restarts, or rolling deployments. Use database-backed persistent short-term memory instead.",unsupportedRouteHint:"Tip: This Runtime does not provide the session run API and may be incompatible with the current Studio version.",toolArgumentHint:"Tip: The model generated incomplete tool arguments. Send the request again.",resourceCollectionExpiredHint:"Tip: This resource collection has expired. Send the task again so the system can collect the resources before creating the Agent.",networkConfigurationHint:"Tip: Check network settings such as the shared public egress, then try again.",rawResponseLabel:"Raw response: "},zie={httpStatus:"HTTP status: {{status}}",errorCode:"Error code: {{code}}",cloudResponseBody:`Cloud response body: +{{body}}`,loadFailedWithDetail:"Failed to load instance logs: {{detail}}",invalidFormat:"Failed to load instance logs: the service returned an invalid format"},Vie={untitledSession:"Untitled session",webUnavailable:"Web search is unavailable because /web/search is not enabled on the server.",webFailed:"Web search failed: {{message}}",webNotMounted:"This Agent does not have the web_search tool mounted.",knowledgeNotMounted:"This Agent does not have a knowledge base mounted.",memoryNotMounted:"This Agent does not have long-term memory mounted.",knowledge:"Knowledge base",longTermMemory:"Long-term memory"},Hie={listSpacesFailed:"Failed to load Skill spaces",createSpaceFailed:"Failed to create the Skill space",updateSpaceFailed:"Failed to update the Skill space",deleteSpaceFailed:"Failed to delete the Skill space",uploadFailed:"Failed to upload the Skill",validateFailed:"Failed to validate the Skill",deleteFailed:"Failed to delete the Skill",listFilesFailed:"Failed to load Skill files",downloadFailed:"Failed to download the Skill"},qie={truncatedData:"{{data}}… (truncated, {{count}} characters total)",incompleteEvent:"The stream ended with an incomplete SSE event. Raw data: {{data}}",invalidEventJson:"Failed to parse the SSE event JSON. Raw data: {{data}}"},Wie={loadConfigNetworkFailed:"Unable to load the sign-in configuration. Check your network and try again.",configServiceFailed:"The sign-in configuration service failed (HTTP {{status}}). Try again later.",invalidConfigResponse:"The sign-in configuration service returned an unreadable response. Try again later.",serviceNetworkFailed:"Unable to connect to the identity service. Check your network and try again.",invalidServiceResponse:"The identity service returned an unreadable response. Try again later.",serviceFailed:"The identity service failed (HTTP {{status}}). Try again later."},Kie={invalidToken:"The GitHub token is invalid or does not have repository write access",notFound:"The repository, branch, or file does not exist, or the token cannot access it",rejectedCommit:"GitHub rejected the commit. Check the branch and file state",requestFailed:"GitHub request failed (HTTP {{status}})",networkFailed:"Unable to connect to GitHub. Check your network and try again",invalidRepositoryFormat:"The GitHub repository must use the owner/repository format",insecureRepositoryUrl:"Only secure github.com repository URLs are supported",unsafeProjectPath:"The Agent project directory must be a safe relative path within the repository",tokenRequired:"A GitHub token is required",invalidBaseBranch:"The target branch format is invalid",invalidPublishBranch:"The publish branch format is invalid",noFiles:"There are no files to commit",missingBaseSha:"The target branch does not have a valid Git SHA",fileAlreadyExists:"{{path}} already exists in the target repository; the existing file was not overwritten",pathNotUpdatable:"The target path {{path}} is not an updatable file",invalidPullRequest:"GitHub did not return a valid pull request"},Gie={loadCapabilitiesFailed:"Failed to load video model capabilities",uploadAssetFailed:"Failed to upload {{fileName}}",enhancePromptFailed:"Failed to enhance the prompt",createTaskFailed:"Failed to create the video generation task",getTaskFailed:"Failed to load the video generation task",downloadFailed:"Failed to download the generated video"},Xie={listFailed:"Failed to load website integrations",createFailed:"Failed to create the website integration",deleteFailed:"Failed to delete the website integration"},Yie={loadFailed:"Failed to load the knowledge base",htmlHidden:"[HTML content hidden]",redacted:"[redacted]",depthTruncated:"[content nested too deeply; truncated]",circularReference:"[circular reference]",diagnosticsUnavailable:"[diagnostic information unavailable]",statusCode:"Status: {{status}}",errorCode:"Error code: {{code}}",requestId:"Request ID: {{requestId}}",diagnostics:"Diagnostics: {{diagnostics}}",detail:"Details: {{detail}}",signInRequired:"Sign in before accessing knowledge bases",forbidden:"You do not have permission to operate on this knowledge base",notFound:"The knowledge base or knowledge content does not exist",conflict:"The knowledge base cannot perform this operation in its current state",requestFailed:"Knowledge base request failed ({{status}})"},Zie={invalidSourceSnapshot:"The source snapshot response has an invalid format.",invalidProjectList:"The project list response has an invalid format.",invalidProjectVersion:"The project version response has an invalid format.",loadProjectsFailed:"Unable to load saved projects",loadVersionsFailed:"Unable to load project versions",deleteVersionFailed:"Failed to delete the project version",invalidDeleteVersionResponse:"The project version deletion response has an invalid format.",loadProjectSourceFailed:"Unable to load project source",loadSnapshotFailed:"Unable to load the source snapshot",restoreSnapshotFailed:"Unable to restore the current source snapshot",downloadSourceFailed:"Failed to download the source",downloadNotZip:"The source download response is not a ZIP file.",downloadSizeMismatch:"The source archive size does not match the published record. Try again."},Jie={invalidFormat:"{{label}} has an invalid format.",validationSeparator:"; ",invalidAnalysisResult:"The migration analysis result has an invalid format.",invalidFrameworkCandidate:"A framework candidate has an invalid format.",invalidAnalysisEvidence:"The analysis evidence has an invalid format.",invalidEntryCandidate:"An entry candidate has an invalid format.",invalidQuestion:"A follow-up question has an invalid format.",invalidTask:"The migration session has an invalid format.",invalidAnalysisReference:"The analysis result reference has an invalid format.",invalidSourcePersistence:"The migration source persistence status has an invalid format.",invalidActivity:"The migration activity has an invalid format.",invalidActivityItem:"A migration activity item has an invalid format.",invalidActivityTool:"A migration activity tool item has an invalid format.",invalidActivityPlan:"The migration execution plan has an invalid format.",invalidActivityPlanItem:"A migration execution plan item has an invalid format.",invalidArtifact:"The migration artifact has an invalid format.",invalidEnvironmentDefaults:"The environment variable defaults have an invalid format.",invalidArtifactFile:"A migration artifact file has an invalid format.",invalidVerificationCheck:"A migration verification check has an invalid format.",requestValidationFailed:"Request validation failed: {{detail}}",gatewayError:"{{fallback}} (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",nonJsonResponse:"{{fallback}}: the server returned a non-JSON response (HTTP {{status}}). Check the proxy or gateway configuration.",loadCapabilitiesFailed:"Failed to load migration capabilities",invalidCapabilities:"The migration capabilities have an invalid format.",invalidModelCapabilities:"The migration model capabilities have an invalid format.",loadTasksFailed:"Failed to load migration sessions",invalidTaskList:"The migration session list has an invalid format.",createTaskFailed:"Failed to create the migration session",uploadProjectFailed:"Failed to upload the migration project",loadActivityFailed:"Failed to load migration activity",startFailed:"Failed to start the migration",submitAnswersFailed:"Failed to submit additional analysis information",stopFailed:"Failed to stop the migration",deleteTaskFailed:"Failed to delete the migration session",loadArtifactFailed:"Failed to load the migration artifact",loadArtifactFileFailed:"Failed to load the migration artifact file",downloadArtifactFailed:"Failed to download the migration artifact",labels:{analysisResult:"Migration analysis result",recommendation:"Migration recommendation",boundary:"Migration boundary",frameworkCandidate:"Framework candidate",analysisEvidence:"Analysis evidence",recommendedFramework:"Recommended framework",entryCandidate:"Entry candidate",entryFramework:"Entry framework",includeScope:"Migration include scope",excludeScope:"Migration exclude scope",assumptions:"Analysis assumptions",question:"Follow-up question",analysisWarnings:"Migration warnings",task:"Migration session",artifactStatus:"Migration artifact status",analysisReference:"Analysis result reference",confirmation:"Migration confirmation",confirmedFramework:"Confirmed framework",error:"Migration error",sourcePersistence:"Migration source persistence status",activity:"Migration activity",activityItem:"Migration activity item",activityTool:"Migration activity tool item",activityPlanItem:"Migration activity plan item",artifact:"Migration artifact",cli:"CLI information",migration:"Migration information",startup:"Startup information",environment:"Environment variable information",verification:"Verification information",report:"Migration report",archive:"Artifact archive",environmentDefaults:"Environment variable defaults",requiredEnvironment:"Required environment variables",optionalEnvironment:"Optional environment variables",artifactFile:"Migration artifact file",verificationCheck:"Migration verification check",artifactWarnings:"Migration artifact warnings",errorResponse:"Error response",errorDetail:"Error details",capabilities:"Migration capabilities",framework:"Migration framework",modelCapabilities:"Migration model capabilities",taskList:"Migration session list"}},ere={status:{ready:"Ready",wakeable:"Wakeable",creating:"Creating",starting:"Starting",pending:"Pending",running:"Running",failed:"Error",stopped:"Stopped",expired:"Expired",deleting:"Deleting",deleted:"Deleted",unknown:"Unknown status"},developmentTimeout:"The development environment timed out. The task may still be running; reopen this session later to check its status.",developmentDisconnected:"The connection to the development environment was interrupted. The task may still be running; reopen this session later to check its status.",developmentFailed:"The development task could not continue. The environment was preserved; try again in this session.",invalidStudioResponse:"{{fallback}} Studio returned an invalid response. Refresh and try again.",invalidSession:"AgentKit Sandbox returned invalid session information.",invalidSnapshot:"AgentKit Sandbox returned invalid snapshot information.",invalidSettings:"Sandbox returned invalid settings.",invalidThreadSnapshot:"Sandbox returned an invalid thread snapshot.",emptyConversationResponse:"The Sandbox conversation service returned no content.",invalidConversationResponse:"The Sandbox conversation service returned an unreadable response.",conversationFailed:"The Sandbox conversation failed. Try again later.",emptyReply:"Sandbox did not return a valid reply. Try again.",missingSession:"The AgentKit session is missing.",listCodexFailed:"Unable to load Codex agents. Try again later.",invalidSessionList:"AgentKit Sandbox returned an invalid session list.",invalidSnapshotList:"AgentKit Sandbox returned an invalid snapshot list.",startFailed:"Unable to start AgentKit Sandbox. Try again later.",listAgentFailed:"Unable to load {{kind}} agents. Try again later.",invalidKindSessionList:"AgentKit returned an invalid {{kind}} session list.",invalidKindSnapshotList:"AgentKit returned an invalid {{kind}} snapshot list.",createAgentFailed:"Unable to create a {{kind}} agent. Try again later.",missingSessionToOpen:"The AgentKit session to open is missing.",openAgentFailed:"Unable to open the {{kind}} agent.",invalidAgentHomeUrl:"The {{kind}} agent returned an invalid home URL.",missingSessionForTerminal:"The AgentKit session for the terminal is missing.",openTerminalFailed:"Unable to open the {{kind}} terminal.",deleteAgentFailed:"Unable to delete the {{kind}} agent.",missingSnapshot:"The AgentKit snapshot to wake is missing.",resumeSnapshotFailed:"Unable to wake the agent from its snapshot. Try again later.",deleteSnapshotFailed:"Unable to delete the agent snapshot.",missingSessionToConnect:"The AgentKit session to connect is missing.",connectCodexFailed:"Unable to connect to the Codex agent. Try again later.",sessionNotReady:"The AgentKit session is not ready. Current status: {{status}}.",invalidMessage:"The built-in agent session does not contain a valid message.",interruptFailed:"Unable to stop the current task.",getStatusFailed:"Unable to load Codex status.",getEndpointFailed:"Unable to load the Sandbox endpoint.",invalidEndpoint:"Sandbox returned an invalid endpoint.",createHandoffPairingFailed:"Unable to create a Codex cloud handoff pairing code.",invalidHandoffPairing:"Studio returned an invalid Codex cloud handoff pairing code.",getHandoffStatusFailed:"Unable to load the cloud handoff status.",invalidHandoffStatus:"Studio returned an invalid cloud handoff status.",listModelsFailed:"Unable to load Codex models.",invalidModelList:"Sandbox returned an invalid model list.",setModelFailed:"Unable to switch the Codex model.",invalidModel:"Sandbox returned an invalid model.",listSkillsFailed:"Unable to load Codex Skills.",invalidSkillList:"Sandbox returned an invalid Skill list.",listThreadsFailed:"Unable to load Codex threads.",invalidThreadList:"Sandbox returned an invalid thread list.",createThreadFailed:"Unable to create a new Codex thread.",missingThread:"The Codex thread to read is missing.",readThreadFailed:"Unable to load Codex history.",resumeThreadFailed:"Unable to resume the Codex thread.",forkThreadFailed:"Unable to fork the Codex thread.",archiveThreadFailed:"Unable to archive the Codex thread.",invalidArchiveResult:"Sandbox returned an invalid archive result.",deleteThreadFailed:"Unable to delete the Codex thread.",invalidDeleteResult:"Sandbox returned an invalid deletion result.",compactThreadFailed:"Unable to compact the Codex thread.",getSettingsFailed:"Unable to load Codex permissions and workspace settings.",updatePermissionsFailed:"Unable to update Codex permissions.",updateWorkspaceFailed:"Unable to update the Codex workspace.",invalidWorkingDirectory:"Sandbox returned an invalid working directory.",listDirectoriesFailed:"Unable to load Sandbox directories.",invalidDirectoryList:"Sandbox returned an invalid directory list.",resolveApprovalFailed:"Unable to submit the Codex approval decision.",uploadFileFailed:"Unable to upload the file to Sandbox.",invalidUploadResult:"Sandbox returned an invalid upload result.",disconnectCodexFailed:"Unable to disconnect the Codex agent.",deleteCodexFailed:"Unable to delete the Codex agent.",openSandboxTerminalFailed:"Unable to open the Sandbox terminal.",openSandboxBrowserFailed:"Unable to open the Sandbox browser.",toolLabel:"Sandbox tool",invalidToolUrl:"{{label}} returned an invalid URL.",unsafeToolUrl:"{{label}} returned an unsafe URL."},tre={invalidSandboxVersion:"Invalid sandbox version response",loadSandboxVersionsFailed:"Failed to check sandbox versions",updateSandboxFailed:"Failed to update sandbox",invalidSandboxUpdate:"Invalid sandbox update response",errorWithDetailAndRawResponse:`{{context}} {{detail}} Raw response: {{response}}`,errorWithRawResponse:`{{context}} Raw response: -{{response}}`,loadArkApiKeysFailed:"Failed to load Ark API keys",loadModelsFailed:"Failed to load models",runtimeAccessDenied:"This account cannot access the Runtime. Refresh the list or sign in again.",privateRuntimeUnavailable:"The Runtime was deployed, but this Studio cannot access the private Runtime. Use a Studio connected to the same VPC, or deploy with public or public plus VPC access.",runtimeTemporarilyUnavailable:"The Runtime was deployed, but Studio cannot connect yet. The gateway domain may still be propagating, or the current network or DNS cannot reach it. Try connecting again later from Manage Agents.",runtimeConnectionUnsupported:"The Runtime Agent Server does not provide a connection endpoint. Confirm that the Runtime is ready and compatible.",runtimeConnectionDenied:"The Runtime rejected the connection request. Check its authentication configuration.",listAgentsFailed:"Failed to load Agents",invalidListAppsJson:"Runtime /list-apps returned unreadable JSON.",invalidListAppsFormat:"Runtime /list-apps returned an invalid format; expected a non-empty string array.",createSessionFailedWithStatus:"Failed to create session ({{status}})",createSessionFailed:"Failed to create session",getSessionFailed:"Failed to load session",getSessionFailedWithDetail:"Failed to load session ({{status}}): {{detail}}",feedbackRuntimeOnly:"Feedback sync is supported only for sessions connected to an AgentKit Runtime",feedbackRegionMissing:"The Runtime region is missing, so feedback cannot be submitted",submitFeedbackFailed:"Failed to submit feedback",loadEvaluationSetsFailed:"Failed to load evaluation sets",loadAutoEvaluationStatusFailed:"Failed to load automatic evaluation status",loadOptimizationsFailed:"Failed to load optimization suggestions",deleteEvaluationCaseFailed:"Failed to delete the evaluation case",downloadFileFailed:"Failed to download the file",fileUnavailable:"File content is unavailable",uploadFileFailed:"File upload failed",traceDisabled:"Tracing is not enabled for this Agent. Enable it in the console first.",loadTraceFailed:"Failed to load trace data",contentTypeMissing:"Content-Type missing",traceNonJson:"Trace failed: the server returned a non-JSON response ({{contentType}}). Check the Studio API proxy configuration",invalidTraceFormat:"Trace failed: invalid response format",submitIssueFeedbackFailed:"Failed to submit issue feedback",issueFeedbackNotConfirmed:"Failed to submit issue feedback: the server did not confirm the submission",noPreviewableAgent:"This Runtime does not provide an Agent that can be previewed.",agentSearchFailed:"Agent search failed",emptySseBody:"HTTP 200 with an empty SSE response body.",noDisplayableSseReply:"HTTP 200, but the SSE response did not contain a displayable model reply.",firstSseEventTimeout:"No SSE event was received within 30 seconds.",runSessionFailed:"Session run failed",runSseFailedWithDetail:"run_sse failed ({{status}}): {{detail}}",checkRuntimeNameFailed:"Failed to check the Runtime name",invalidRuntimeNameCheck:"Failed to check the Runtime name: invalid response format",loadCloudResourcesFailed:"Failed to load cloud resources",invalidCloudResources:"The cloud resource list response has an invalid format",invalidEnvironmentMount:"The environment mount response has an invalid format",environmentMountMismatch:"The environment mount response does not match the request",environmentMountNetworkFailed:"Unable to connect to Studio, so the environment was not mounted. Check your network and try again.",environmentMountFailed:"Failed to mount the environment",clipboardUnsupported:"This browser does not support writing to the clipboard.",clipboardWriteFailed:"Unable to write to the clipboard. Check clipboard permissions.",loadSystemInfoFailed:"Failed to load system information",invalidSystemInfo:"The system information response has an invalid format",invalidEnvironmentBuild:"The environment build response has an invalid format",invalidEnvironmentBuildStep:"The environment build step response has an invalid format",invalidEnvironmentManifest:"The environment manifest response has an invalid format",invalidImageRepository:"The environment image repository response has an invalid format",invalidCodeRepository:"The environment code repository response has an invalid format",invalidImageSource:"The environment image source response has an invalid format",invalidEnvironment:"The environment response has an invalid format",invalidWorkspace:"The workspace response has an invalid format",loadWorkspacesFailed:"Failed to load workspaces",invalidWorkspaceList:"The workspace list response has an invalid format",saveWorkspaceFailed:"Failed to save the workspace",deleteWorkspaceFailed:"Failed to delete the workspace",loadEnvironmentsFailed:"Failed to load environments",invalidEnvironmentList:"The environment list response has an invalid format",probeRepositoryFailed:"Failed to inspect the code repository",invalidRepositoryProbe:"The code repository inspection response has an invalid format",exportEnvironmentCodeFailed:"Failed to export the environment share code",invalidEnvironmentCode:"The environment share code response has an invalid format",inspectEnvironmentCodeFailed:"Failed to inspect the environment share code",invalidEnvironmentCodeInspection:"The environment share code inspection response has an invalid format",importEnvironmentCodeFailed:"Failed to import the environment share code",invalidEnvironmentCodeImport:"The environment share code import response has an invalid format",studioUnavailable:"Unable to connect to Studio. Confirm that the backend is running and try again.",saveEnvironmentFailed:"Failed to save the environment",deleteEnvironmentFailed:"Failed to delete the environment",startEnvironmentBuildFailed:"Failed to start the environment build",loadEnvironmentBuildFailed:"Failed to load environment build details",loadEnvironmentManifestFailed:"Failed to load the environment manifest",invalidEnvironmentResource:"The environment resource response has an invalid format",loadEnvironmentResourcesFailed:"Failed to load environment build resources",updateCodexSandboxFailed:"Failed to update Codex Sandbox",invalidCodexSandboxUpdate:"The Codex Sandbox update response has an invalid format",loadUserPoolsFailed:"Failed to load user pools",invalidUserPoolList:"The user pool list response has an invalid format",syncGithubFailed:"Failed to sync GitHub code ({{status}})",validatingMigrationArtifact:"Validating migration artifact",uploadingCodePackage:"Uploading code package",migrationArtifactValidated:"Migration artifact validated",codePackageUploaded:"Code package uploaded",deploymentProgress:{preparing:"Preparing deployment",uploading:"Uploading the code package",building:"Building the image",buildLogsSyncing:"Building the image. Build logs are up to date.",buildLogsComplete:"Build log sync complete.",buildFailedLogsSynced:"Image build failed. Final build logs are available.",buildLogsUnavailable:"Build logs are temporarily unavailable.",finalBuildLogsUnavailable:"Final build logs are temporarily unavailable.",deploying:"Deploying the service",publishing:"Publishing the service",evaluating:"Creating evaluation sets",updating:"Updating the Runtime configuration",completing:"Finalizing deployment",github:"Configuring GitHub delivery",inProgress:"Deployment in progress"},deploymentFailed:"Deployment failed",deploymentDisconnected:"Deployment failed: connection interrupted",deploymentMissingAgentName:"Deployment failed: Agent name missing from response",deploymentMissingConnection:"Deployment failed: AgentKit connection information missing from response",cancelDeploymentFailed:"Failed to cancel deployment ({{status}})",loadFailed:"Failed to load ({{status}})",loadPermissionsFailed:"Failed to load permissions ({{status}})",invalidPermissionResponse:"The permission service returned an unreadable response",checkStudioUpdateFailed:"Failed to check for Studio updates ({{status}})",studioUpdatePreflightFailed:"Studio update permission check failed ({{status}})",submitStudioUpdateFailed:"Failed to submit the Studio update ({{status}})",loadAgentUsageFailed:"Failed to load Agent usage",notProvided:"Not provided",agentUsageNonJson:"Failed to load Agent usage: the server returned a non-JSON response (HTTP {{status}}, Content-Type: {{contentType}}). ",checkStudioGateway:"Confirm that the current service is running in Studio mode and check the proxy or gateway configuration.",agentUsageInvalidJson:"Failed to load Agent usage: the server returned invalid JSON (HTTP {{status}}, Content-Type: {{contentType}}). ",retryCheckGateway:"Try again later. If the problem persists, check the proxy or gateway configuration.",loadCronJobsFailed:"Failed to load scheduled tasks",loadCronJobFailed:"Failed to load scheduled task details",createCronJobFailed:"Failed to create the scheduled task",updateCronJobFailed:"Failed to update the scheduled task",enableCronJobFailed:"Failed to enable the scheduled task",pauseCronJobFailed:"Failed to pause the scheduled task",runCronJobFailed:"Failed to run the scheduled task now",loadCronHistoryFailed:"Failed to load execution history",stopCronRunFailed:"Failed to stop the execution",deleteCronJobFailed:"Failed to delete the scheduled task",loadRuntimeFailed:"Failed to load the Runtime",loadLocalToolsFailed:"Failed to load local tools",connectDynamicRouteFailed:"Failed to connect the Studio dynamic route",a2aProbeDenied:"The Runtime rejected the A2A probe. Check the Runtime authentication configuration.",loadA2aCardFailed:"Failed to load the A2A Agent Card",loadRuntimeApiKeyFailed:"Failed to load the Runtime API key",runtimeApiKeyMissing:"The Runtime did not return a usable API key",deleteFailed:"Delete failed ({{status}})",runtimeManageForbidden:"This account cannot manage the Runtime.",runtimeNotFound:"The Runtime does not exist or has been deleted.",runtimeUnavailable:"This account cannot access the Runtime.",checkRuntimeUpdateFailed:"Failed to check Runtime update capability (HTTP {{status}}). Try again later.",loadRuntimeDetailFailed:"Failed to load Runtime details",generateProjectFailed:"Failed to generate the project",generateAgentConfigFailed:"Failed to generate the Agent configuration",createDebugRunFailed:"Failed to create the debug run",createDebugSessionFailed:"Failed to create the debug session",loadDebugTraceFailed:"Failed to load the debug trace",invalidDebugTrace:"Failed to load the debug trace: invalid response format",debugRunFailed:"Debug run failed",cleanupDebugRunFailed:"Failed to clean up the debug run"},ire={loadFailed:"Failed to load conversation mode capabilities (HTTP {{status}})",invalidResponse:"The conversation mode capabilities response has an invalid format"},rre={nonJson:"{{fallback}}: the server returned a non-JSON response (HTTP {{status}}, {{contentType}}){{detail}}"},sre={common:Lie,agentkitCli:$ie,cloudRegion:Fie,connections:Bie,feishuBot:Uie,requestError:Qie,runSse:zie,runtimeLogs:Vie,search:Hie,skills:qie,sse:Wie,identity:Kie,github:Gie,video:Xie,websiteIntegration:Yie,knowledge:Zie,intelligentDevelopment:Jie,migrations:ere,sandbox:tre,client:nre,newChatCapabilities:ire,jsonResponse:rre},SDe=Object.freeze(Object.defineProperty({__proto__:null,agentkitCli:$ie,client:nre,cloudRegion:Fie,common:Lie,connections:Bie,default:sre,feishuBot:Uie,github:Gie,identity:Kie,intelligentDevelopment:Jie,jsonResponse:rre,knowledge:Zie,migrations:ere,newChatCapabilities:ire,requestError:Qie,runSse:zie,runtimeLogs:Vie,sandbox:tre,search:Hie,skills:qie,sse:Wie,video:Xie,websiteIntegration:Yie},Symbol.toStringTag,{value:"Module"})),are={backToEvaluationCase:"Back to evaluation case",cancel:"Cancel",copied:"Copied",copy:"Copy",exportConversation:"Export conversation",retry:"Retry"},ore={title:"How would you like to add an Agent?",subtitle:"Choose the approach that best fits your project.",quickCreate:{title:"Create from scratch",description:"Build an Agent with intelligent, custom, template, or workflow modes."},intelligent:{title:"Intelligent mode",description:"Describe your goal, then build, debug, and validate the Agent interactively."},package:{title:"Add and deploy a code package",description:"Upload an Agent project archive, review the code, and deploy it to AgentKit Runtime."},migrate:{title:"Migrate an existing project",description:"Migrate an existing LangChain, Dify, or similar project to AgentKit Runtime."}},lre={subject:{file:"file changes",command:"command execution"},decision:{accept:"Allowed {{subject}} once",acceptForSession:"Allowed {{subject}} for this session",decline:"Declined {{subject}}",cancel:"Cancelled approval for {{subject}}"},details:{command:"Command",grantRoot:"Authorized path",cwd:"Working directory"}},cre={noDescription:"No description",region:"Region",unknownAgent:"Unknown Agent"},ure={agentTransfer:"Agent handoff",annotationHint:"Model response; select text to add an annotation",continueBranch:"Continue with “{{branch}}”",emptyResponse:"This response has no displayable content.",subagentDescription:"Working on a task handed off by the primary Agent."},dre={title:"Configure {{provider}} credentials",prefix:"Agent Workspace requires {{provider}} credentials. Set",and:"and",suffix:"in the runtime environment, then retry."},fre={buildRunning:{title:"A build is still running",description:"Leaving will stop this build. The session will remain available in your history.",confirm:"Stop and leave"},deleteThread:{title:"Delete Codex session",description:"Delete “{{name}}” and remove it from your session history?",confirm:"Delete"},returnToCreate:{title:"Return to the create page?",description:"Your current entries will be lost.",confirm:"Return"}},hre={additionalAgentDeleteFailures:"; {{count}} more failed",agentDeleteFailures:"Failed to delete {{count}} Agents: {{failures}}{{suffix}}",agentToolsMissing:"This Agent is missing required tools: {{tools}}",buildStopUnconfirmed:"You left the development environment, but Studio could not confirm that the build stopped. It may still be running; check its status in session history later.",builtinAgentSendFailed:"Failed to send to the built-in Agent: {{message}}",bytePlusEvaluationUnsupported:"AgentKit evaluation sets are not currently supported on BytePlus",clipboardUnsupported:"This browser does not support writing to the clipboard.",cloudCodexEmptyReply:"The cloud Codex task ended without a response. Send the task again.",cloudCodexSessionMissing:"The cloud Codex session has not appeared in the list yet. Try again shortly.",deploymentRuntimeIdMissing:"Deployment completed without returning a Runtime ID.",environmentExpired:"The selected environment is no longer available. Refresh and select it again.",environmentsLoadFailed:"Failed to load environments",evaluationCaseSessionMissing:"This evaluation case has no session reference and cannot be opened.",evaluationUnsupportedForReply:"This response cannot be added to an evaluation set",firstFrameRequired:"Add a first-frame image before generating from first and last frames.",incompletePromptOptimization:"The prompt optimization result is incomplete. Run the optimization again.",intelligentCapabilityCheckFailed:"Failed to check intelligent development capabilities (HTTP {{status}})",intelligentSessionCreateFailed:"Failed to create the intelligent development session",invalidIntelligentCapability:"The intelligent development capability response is invalid.",localBffToolsNotConfigured:"No tools are configured for the local Studio BFF.",localToolsLoadFailed:"Failed to load local tools",loginPopupBlocked:"The browser blocked the sign-in window. Allow pop-ups and try again.",loginPopupClosed:"The sign-in window was closed. Sign in again to continue.",mediaTooLarge:"{{fileName}} exceeds this platform's media size limit.",mountEnvironmentFailed:"Failed to mount the environment",noConnectedSandbox:"No Sandbox is currently connected.",noCreateAgentPermission:"Your account does not have permission to add Agents.",noManageAgentPermission:"Your account does not have permission to manage Agents.",noOptimizationBaseline:"There is no pre-optimization version available for comparison.",oauthUrlMissing:"The event does not include an authorization URL.",onlyCloudAgentUpdatable:"Only deployed cloud Agents can be updated.",optimizationVersionMissing:"The project version for this optimization could not be found. It may have been deleted.",persistentStorageNotConfigured:"Persistent storage has not been configured by an administrator",readDraftFailed:"Unable to read local drafts. Try again.",runtimeAgentNameMissing:"The Runtime is missing an Agent name and cannot be updated.",runtimeBffToolsDisabled:"BFF tool capabilities are not enabled for this Runtime Agent.",runtimeDeploymentConfigUnavailable:"The Runtime's original deployment configuration cannot be restored, so it cannot be updated safely.",runtimeMissingForConnection:"Runtime information is missing, so the Agent cannot be connected.",runtimeRegionMissingForDelete:"The Runtime is missing region information and cannot be deleted.",runtimeRegionMissingForUpdate:"The Runtime is missing region information and cannot be updated.",runtimeUpdateUnsupported:"This Runtime does not support in-place updates.",sandboxRuntimeUnavailable:"This Agent does not have an available Sandbox Runtime.",sandboxToolsUnavailable:"The current Studio BFF does not provide Sandbox execution tools.",saveDraftLocationRejected:"The browser could not save the current draft location. Check site storage permissions and try again.",saveDraftRejected:"The browser could not save the draft. Try again.",selectSkillToOptimize:"Select a Skill to optimize first.",sessionMissingForMount:"The current session does not exist, so an environment cannot be mounted.",sessionNotReady:"The session is not ready yet.",sessionUnavailable:"The current session is unavailable. Close it and try again.",sourceNotReady:"The source is not ready yet. Return to the conversation to continue.",textVideoRejectsReferences:"Text-to-video does not use reference media. Remove the images or videos first.",videoEditRequiresVideo:"Add the video you want to edit first.",videoExtendRequiresVideo:"Add a source video before extending it.",videoGenerationFailed:"Video generation failed. Try again later.",videoModeUnsupported:"The selected video mode is not supported on this platform.",videoPreviewMissing:"The video task completed, but the server did not return a preview URL.",videoReferenceRequired:"Add at least one reference image or video."},pre={like:"Like",removeLike:"Remove like",dislike:"Dislike",removeDislike:"Remove dislike",reportIssue:"Report an issue",traceFlameGraph:"Tracing flame graph"},mre={0:"What would you like to work on today?",1:"How can I help?",2:"What would you like me to look into?",3:"Ask me anything",4:"Hi, let's get started",5:"Start a new conversation",6:"What should we tackle first?",7:"Tell me what you have in mind",8:"Where should we begin?",9:"What can I help you with?",10:"Ready to move this forward?",11:"What's most important right now?",12:"Let's get something done today",13:"I'm ready when you are",intelligentDevelopment:"Give your ideas room to grow"},gre={agentCapabilities:"Checking Agent capabilities…",session:"Loading session…"},bre={cancelled:"Authorization was cancelled.",pasteCallbackUrl:"After authorization, paste the full callback URL from your browser's address bar:",popupBlocked:"The browser blocked the authorization window. Allow pop-ups and try again.",unsupportedUrl:"The authorization URL is not HTTP or HTTPS and was blocked."},yre={volcengine:"Volcengine"},vre={checkingPersistence:"Checking persistent storage…",exitDevelopment:"Exit development",fileUploaded:"Uploaded a file to the Sandbox",filesUploaded:"Uploaded {{count}} files to the Sandbox",intelligentDevelopment:"Intelligent development",mode:{readOnly:"Read only",workspaceWrite:"Workspace write",fullAccess:"Full access"},approvalPolicy:{untrusted:"Untrusted commands only",onRequest:"Ask when needed",never:"Never ask"},reviewer:{user:"Ask me",autoReview:"Automatic review"},labels:{approvalPolicy:"Approval policy",file:"File",fileNumber:"File {{number}}",mode:"Sandbox mode",networkAccess:"Network access",reviewer:"Approval method",workingDirectory:"Working directory"},network:{allowed:"Allowed",disabled:"Off"},permissionsUpdated:"Updated Codex permissions for this Sandbox session",persistenceUnknown:"Unable to verify persistent storage",stoppedReady:"Stopped. You can continue typing.",uploadedFilesPrompt:"The following files were uploaded to the current Sandbox workspace. Use them in this task:",workspaceUpdated:"Workspace updated"},xre={addAgent:"Add Agent",addFromPackage:"Add from code package",agent:"Agent",automations:"Automations",createAgent:"Create Agent",createSkill:"Create Skill",cronJobs:"Cronjob",issueFeedback:"Issue feedback",library:"Library",migrateAgent:"Migrate Agent",newConversation:"New conversation",optimizeSkill:"Optimize {{name}}",search:"Search",skill:"Skill",skillLibrary:"Skill library",systemInfo:"System information",updateAgent:"Update {{name}}"},Ore={actions:are,addAgent:ore,approval:lre,common:cre,conversation:ure,credentials:dre,dialogs:fre,errors:hre,feedback:pre,greetings:mre,loading:gre,oauth:bre,providers:yre,sandbox:vre,titles:xre},kDe=Object.freeze(Object.defineProperty({__proto__:null,actions:are,addAgent:ore,approval:lre,common:cre,conversation:ure,credentials:dre,default:Ore,dialogs:fre,errors:hre,feedback:pre,greetings:mre,loading:gre,oauth:bre,providers:yre,sandbox:vre,titles:xre},Symbol.toStringTag,{value:"Module"})),wre="Automations",Sre="Connect development tools and extend your Agents with automated workflows",kre="Search automations",Ere="Automation categories",Cre={development:"Development",channels:"Messaging channels"},Tre="{{category}} automations",Are="Open {{name}}",_re="Available only in local deployments",Nre="No matching automations",jre="Try searching for another name",Rre="Back to automations",Ire={"coding-agents":{name:"Configure coding agents",badge:"Local",description:"Install built-in VeADK and AgentKit skills globally for Trae, Claude Code, or Codex."},template:{name:"Import starter project",description:"Create a minimal Agent project in your repository with continuous delivery to AgentKit Runtime.",title:"Import starter project",subtitle:"Add a ready-to-run basic Agent and continuous delivery configuration to your repository",panel:"This creates a pull request containing the basic project and AgentKit Runtime delivery workflow.",submitLabel:"Import template and create PR",regionHelp:"Must match the target Runtime region",pullRequest:{title:"feat: import AgentKit basic template",description:"Import a basic Agent project with the AgentKit Studio App Server and add continuous delivery to AgentKit Runtime. Configure the required {{provider}} secrets before merging."},fields:{repository:{label:"GitHub Repo",placeholder:"owner/repository",help:"Enter owner/repository or a full github.com URL"},baseBranch:{label:"Target branch",placeholder:"main",help:"Defaults to main; the pull request will use this branch as its base"},projectPath:{label:"Agent project directory",placeholder:"agentkit-basic-agent",help:"The basic project will be added here; app.py mounts the complete Studio App Server and serves as the entry point"},runtimeName:{label:"Runtime name",placeholder:"support-agent",help:"Used by the AgentKit delivery configuration"},runtimeId:{label:"Runtime ID",placeholder:"rt-xxxxxxxx",help:"The AgentKit Runtime that will receive continuous updates"}}},delivery:{name:"AgentKit Runtime delivery",description:"Add a workflow that continuously delivers your repository to AgentKit Runtime.",title:"AgentKit Runtime delivery",subtitle:"Add continuous delivery to the repository through a pull request",panel:"This creates a release branch and opens a pull request containing the GitHub Actions workflow.",submitLabel:"Confirm and create PR",regionHelp:"Must match the target Runtime region",pullRequest:{title:"feat: continuously publish to AgentKit Runtime",description:"Add a GitHub Actions workflow that continuously publishes updates from the target branch to AgentKit Runtime. Configure the required {{provider}} secrets before merging."},fields:{repository:{label:"GitHub Repo",placeholder:"owner/repository",help:"Enter owner/repository or a full github.com URL"},baseBranch:{label:"Target branch",placeholder:"main",help:"Defaults to main; the pull request will use this branch as its base"},projectPath:{label:"Agent project directory",placeholder:".",help:"Defaults to the repository root; the directory must contain an app.py that mounts the complete Studio App Server"},runtimeName:{label:"Runtime name",placeholder:"support-agent",help:"Used by the AgentKit delivery configuration"},runtimeId:{label:"Runtime ID",placeholder:"rt-xxxxxxxx",help:"The AgentKit Runtime that will receive continuous updates"}}},review:{name:"Automated PR review",description:"Review code changes in an isolated Sandbox and publish the result to the pull request.",title:"Automated PR review",subtitle:"Inspect code changes in an isolated Sandbox and publish the result to the pull request",panel:"The workflow reviews only non-draft pull requests from the same repository. Pull requests from forks cannot access repository secrets.",submitLabel:"Add review and create PR",regionHelp:"Must match the Sandbox Tool region",pullRequest:{title:"chore: configure automated PR review",description:"Add a GitHub Actions workflow that reviews same-repository pull requests in an isolated Sandbox and publishes the result as a GitHub review. Configure the required workflow secrets before merging."},fields:{repository:{label:"GitHub Repo",placeholder:"owner/repository",help:"Enter owner/repository or a full github.com URL"},baseBranch:{label:"Target branch",placeholder:"main",help:"Defaults to main; the pull request will use this branch as its base"},sandboxToolId:{label:"Sandbox Tool ID",placeholder:"tool-xxxxxxxx",help:"The AgentKit CodeEnv used for each review"},modelName:{label:"Review model",placeholder:"review-model",help:"The code review model name injected into the Sandbox"},modelBaseUrl:{label:"Model API URL",placeholder:"https://ark.example.com/api/v3",help:"Must be an OpenAI-compatible HTTPS endpoint"}}},feishu:{name:"Feishu bot",badge:"Beta",description:"Create a Feishu bot and connect its messages directly to AgentKit Runtime."},"website-integration":{name:"Website integration",description:"Embed an AgentKit Runtime on your website as a floating chat window."}},Pre={required:"Required",optional:"Optional",region:"Region",tokenLabel:"GitHub Token",getToken:"Get token",tokenPlaceholder:"Requires write access to repository contents and pull requests",hideToken:"Hide token",showToken:"Show token",tokenHelp:"The token is used only for this submission. It is not stored in the browser or written to the pull request.",prCreated:"PR #{{number}} created",viewOnGitHub:"View on GitHub",secretsHeading:"Before merging the pull request, configure these GitHub Actions secrets in the repository:",secretPair:"{{accessKey}}, {{secretKey}} (required)",sessionToken:"{{sessionToken}} (required when using temporary credentials)",requiredSecret:"{{name}} (required)",temporaryCredentialRequired:" (required when using temporary credentials)",requiredSuffix:" (required)",submitting:"Creating PR…",validation:{required:"This field is required",repository:"Enter owner/repository or a full GitHub repository URL",baseBranch:"The target branch format is invalid",projectPath:"Enter a relative path within the repository",runtimeId:"The Runtime ID format is invalid",sandboxToolId:"The Sandbox Tool ID format is invalid",modelName:"The model name format is invalid",modelBaseUrlSafe:"Enter an HTTPS URL without credentials, query parameters, or fragments",modelBaseUrl:"Enter a valid HTTPS URL",runtimeName:{required:"Runtime name is required",characters:"Runtime name can contain only letters, numbers, underscores, and hyphens",length:"Runtime name must be 4–64 characters"}}},Dre={title:"Configure coding agents",description:"Install the AgentKit skills bundled with Studio globally for local coding clients.",retry:"Retry",clients:{ariaLabel:"Select coding agents",title:"Local clients",detectAgain:"Detect again",detecting:"Detecting local clients…",detected:"Client detected",available:"Available",unavailable:"Not detected"},skills:{ariaLabel:"Select bundled skills",title:"Bundled skills",viewFiles:"View files",items:{"veadk-agent-development":{name:"VeADK Agent development",description:"Build and refine Agents with VeADK."},"agentkit-cli":{name:"AgentKit CLI",description:"Manage and deploy AgentKit resources with AgentKit CLI."}}},global:{ariaLabel:"Global installation directories",title:"Global installation",description:"Available to other local projects after configuration",empty:"Select a client to see its installation directory."},success:"Configured {{skillCount}} skill(s) for {{agentCount}} client(s)",selection:"{{agentCount}} client(s) and {{skillCount}} skill(s) selected",selectClient:"Select a client first",configuring:"Configuring…",configure:"Configure",errors:{detect:"Failed to detect local clients",configure:"Configuration failed. Check permissions for your user directory and try again."},preview:{description:"Browse the skill files bundled with Studio in read-only mode",close:"Close file preview",loading:"Loading files…",error:"Failed to load skill files",skillFiles:"{{name}} files",files:"Files",fileContent:"File contents",notPreviewable:"This file is not previewable UTF-8 text.",noFiles:"No previewable files."}},Mre={title:"Feishu bot",description:"Create a Feishu Agent powered by AgentKit Runtime",panel:"Enter the credentials for a published Feishu app. Studio will generate a basic Agent, create a dedicated Runtime, and enable the persistent Feishu messaging connection.",agentName:"Agent name",agentNameHelp:"Used as the root Agent name in the new Runtime",region:"Deployment region",regionHelp:"The Runtime and build artifacts will be created in this region",regions:{"cn-beijing":"Beijing","cn-shanghai":"Shanghai"},appId:"Feishu App ID",appIdHelp:"Application credential from the Feishu Open Platform",appSecret:"Feishu App Secret",appSecretPlaceholder:"Enter the App Secret",appSecretHelp:"Written only to the environment variables of the new Runtime",hideSecret:"Hide App Secret",showSecret:"Show App Secret",hide:"Hide",show:"Show",confirmCancel:"Cancelling will stop the task and clean up any Runtime already created. Continue?",status:{preparing:"Generating the basic Agent",running:"Creating Runtime",cancelling:"Cancelling deployment",succeeded:"Feishu bot Runtime created",cancelled:"Deployment cancelled",failed:"Creation failed"},steps:{prepare:"Generate Agent",build:"Build image",deploy:"Create Runtime",publish:"Publish service"},openConsole:"Open Runtime console",credentials:{title:"Credential handling",description:"The App Secret is used only for this deployment. It is never written to generated source code or browser storage."},cancelDeployment:"Cancel deployment",creating:"Creating…",create:"Create Feishu bot Runtime",validation:{appId:"Enter the Feishu App ID",appSecret:"Enter the Feishu App Secret",agentName:{required:"Name is required",reserved:"user is reserved by Google ADK. Choose another name",characters:"Name must start with a letter or underscore and contain only letters, numbers, and underscores"}},generatedAgent:{description:"A helpful assistant that receives messages through Feishu.",instruction:"You are a helpful assistant serving users through Feishu. Understand each request accurately and provide concise, reliable answers. Ask clarifying questions when information is missing, and never invent facts."}},Lre={title:wre,description:Sre,search:kre,categoriesLabel:Ere,categories:Cre,resultsLabel:Tre,open:Are,localOnly:_re,emptyTitle:Nre,emptyDescription:jre,backToAutomations:Rre,cards:Ire,github:Pre,codingAgents:Dre,feishu:Mre},EDe=Object.freeze(Object.defineProperty({__proto__:null,backToAutomations:Rre,cards:Ire,categories:Cre,categoriesLabel:Ere,codingAgents:Dre,default:Lre,description:Sre,emptyDescription:jre,emptyTitle:Nre,feishu:Mre,github:Pre,localOnly:_re,open:Are,resultsLabel:Tre,search:kre,title:wre},Symbol.toStringTag,{value:"Module"})),$re={"zh-CN":"简体中文","en-US":"English"},CDe={languageNames:$re},TDe=Object.freeze(Object.defineProperty({__proto__:null,default:CDe,languageNames:$re},Symbol.toStringTag,{value:"Module"})),Fre={selectedExcerptLabel:"Selected excerpt",commentLabel:"Annotation",commentSeparator:": ",successTitle:"Added to the Bad Case evaluation set",successDescription:"This annotation is linked to the current question and the complete model response.",done:"Done",ariaLabel:"Annotate the selected model response",title:"Add annotation",content:"Annotation",placeholder:"Describe the issue or the expected change",retryError:"{{error}}. Please try again.",cancel:"Cancel",submit:"Add to Bad Case"},Bre={attachment:"attachment",image:"image",preview:"Preview {{name}}",uploading:"Uploading",uploadFailed:"Upload failed",remove:"Remove {{name}}",previewDialog:"{{name}} preview",download:"Download",close:"Close",reading:"Loading document…",loadFailed:"Failed to load document: {{error}}"},Ure={errorTitle:"Cloud log error",copyError:"Copy complete error details",retry:"Retry",statuses:{live:"Live",connecting:"Connecting",retrying:"Reconnecting",idle:"Disconnected"},title:"Instance logs",description:"The VeFaaS instance handling the current conversation request",close:"Close instance logs",instanceId:"Instance ID",waitingInstance:"Waiting for instance",request:"Request {{id}}",ariaLabel:"Live VeFaaS instance logs",notCapturedTitle:"No instance captured yet",notCapturedDescription:"Send a message to see the instance that handles it and its live logs.",connectingTitle:"Connecting to instance logs",connectingDescription:"Establishing a secure log stream through the Studio BFF.",emptyTitle:"No logs yet",emptyDescription:"Connected to the instance and waiting for new log output.",retention:"Logs refresh automatically. Only the latest {{count}} lines are kept."},Qre={title:"Trace",statuses:{loading:"Loading",ready:"",collecting:"Collecting",disabled:"Disabled",forbidden:"Permission required",error:"Failed to load"},errors:{collecting:"The trace is still being collected. Please wait.",disabled:"Tracing is not enabled for this agent. Enable it in the console and try again.",forbidden:"Your account cannot read APMPlus traces. Ask an administrator for read access.",error:"Failed to load the trace. Please try again later."},callCount:"{{count}} calls · {{duration}} ms",close:"Close",loading:"Loading trace…",retryNow:"Retry now",reload:"Reload",empty:"No trace is available for this session yet.",attributes:"Attributes",selectCall:"Select a call on the left to view its details"},zre={exportNote:"This conversation was exported from AgentKit Studio for reference only.",imageFailed:"Failed to generate the image. Please try again.",browserUnsupported:"This browser cannot generate a conversation image. Please try again.",copyUnsupported:"This browser cannot copy images. Download the image instead.",exportFailed:"Export failed. Please try again.",title:"Export conversation",description:"Choose a format and download all inputs and outputs through the current response.",close:"Close",generatingContent:"Preparing export…",retry:"Try again",previewPage:"Previewing page 1 of {{count}}",previewAlt:"Conversation export page 1 of {{count}}",format:"Export format",generatingFormat:"Generating {{format}}…",copying:"Copying…",copiedFirst:"First page copied",copied:"Copied",copyFirst:"Copy first page",copyImage:"Copy image",generating:"Generating…",downloadArchive:"Download PNG archive ({{count}} pages)",downloadFormat:"Download {{format}}"},Vre={unsupportedComponent:"Unsupported component: {{component}}",sandboxIdentity:"Codex Sandbox execution identifiers",useSkill:"Use the {{name}} skill",thinkingDone:"Finished thinking",thinking:"Thinking",justNow:"Just now",sourceUnavailable:"The generated source is temporarily unavailable. Please try again later.",downloadStarted:"Download started",verifiedDelivery:"Verified deliverable",generatedSource:"Generated agent source",entryPoint:"Entry point",fileCount:"Files",size:"Size",validationTime:"Validated",generationTime:"Generated",checksPassed:"{{count}} checks passed",sourceReady:"Source is ready to deploy",sourceGuidance:"The source is ready to view, download, or deploy. Confirm the runtime configuration before deployment.",viewSource:"View source",preparing:"Preparing…",viewChanges:"View changes",downloadSource:"Download source",sourceNotReady:"The source is not ready yet",manualDeploy:"Deploy manually to Runtime",beforeOptimization:"Before optimization",afterOptimization:"After optimization",planStatuses:{pending:"Pending",in_progress:"In progress",completed:"Completed",failed:"Incomplete"},renderUi:"Render UI",truncated:"… (truncated)",agentAdjusting:"Agent is adjusting",sandboxDetails:"Detailed Codex Sandbox output",waitingCodex:"Waiting for Codex output",arguments:"Arguments",result:"Result",artifacts:"Artifacts",downloadNamed:"Download {{name}}",powerpoint:"PowerPoint presentation",preview:"Preview",download:"Download",previewDialog:"{{name}} preview",closePreview:"Close preview",slidePreview:"{{name}} slide preview",mcpToolset:"MCP toolset",authorized:"Authorized · {{tool}}",authorizationRequired:"{{tool}} requires authorization",oauthDescription:"The {{tool}} toolset is protected by OAuth and requires sign-in before use.",oauthProvider:"You will be redirected to {{provider}} to sign in.",oauthContinue:"The conversation will continue automatically after authorization.",waitingAuthorization:"Waiting for authorization…",authorize:"Authorize",missingAuthorizationUrl:"No authorization URL was found in the event.",tools:{web_search:{running:"Searching the web",done:"Web search complete"},link_reader:{running:"Reading webpage",done:"Webpage read complete"},run_code:{running:"Running code in the AgentKit sandbox",done:"Code execution completed in the AgentKit sandbox"},list_envs:{running:"Checking available environments",done:"Available environments loaded"},get_env_manifest:{running:"Loading the environment manifest",done:"Environment manifest loaded"},execute_in_sandbox:{running:"Running a command in the environment",done:"Command completed in the environment"},delegate_to_codex_sandbox:{running:"Codex Sandbox is running",done:"Codex Sandbox completed",failed:"Codex Sandbox failed"},image_generate:{running:"Generating image",done:"Image generated"},video_generate:{running:"Generating video",done:"Video generated"},ppt_generate:{running:"Generating presentation",done:"Presentation generated"},load_memory:{running:"Searching long-term memory",done:"Memory search complete"},load_knowledgebase:{running:"Searching the knowledge base",done:"Knowledge base search complete"},load_skill:{running:"Loading skill",done:"Skill loaded"},collect_resources:{running:"Collecting available resources",done:"Resource collection complete",failed:"Resource collection failed"},create_agents:{running:"Creating and running agents",done:"Agent creation complete",failed:"Agent creation failed"}},createAgents:{categories:{skill_hub:"Skill Hub",skill_space:"AgentKit Skill Center",knowledge_base:"Knowledge base",tool:"Tools"},agentTypes:{llm:"LLM Agent",sequential:"Sequential Agent",parallel:"Parallel Agent",loop:"Loop Agent",workflow:"Workflow"},skill:"Skill",subAgents:"Sub-agents",builtinTool:"Built-in tool",skillCenter:"AgentKit Skill Center",selfAuthoredTools:"Custom tools",dependencies:"Dependencies: {{items}}",fullCode:"Complete code for {{name}}",itemCount:"{{label}}: {{count}} items",collectionAria:"Retrieved resource information",retrieving:"Retrieving resources",retrievalFailed:"Resource retrieval did not complete",checkConfig:"Check the resource service configuration and try again.",notSearched:"Not searched",notConfigured:"Not configured",resourceList:"{{label}} resource list",searchKeywords:"Search keywords",skillHubSkipped:"No search keywords were provided, so Skill Hub was not searched.",sourceSkipped:"{{label}} is not configured, so this source was not searched.",noResources:"No resources in this category were returned.",resultAria:"Agent creation results",creationFailed:"Agent creation did not complete",agentResources:"Resources available to {{name}}",knowledgeBase:"Knowledge base",toolsLabel:"Tools",creating:"Creating agents",noAgents:"No agents to display",noAgentResult:"The tool response did not include an agent configuration or execution result.",sourceLabels:{tool:"Tools",knowledge:"AgentKit Knowledge Base",skillCenter:"AgentKit Skill Center",unknown:"Unknown source"},unnamedResource:"Unnamed resource",unnamedAgent:"Unnamed agent"},branchCompare:{ariaLabel:"Compare branches",selectDirection:"Select a direction",continue:"Continue in this direction"},codexProgress:{planTitle:"Codex execution plan",fallback:{fileChange:"Modify files",approval:"Waiting for approval",status:"Codex status",command:"Run command"},planSummary:"{{completed}}/{{total}} completed",command:{running:"Running command",completed:"Command completed",failed:"Command failed"},projectFiles:"{{count}} project files",projectFile:"project files",fileChange:{running:"Updating {{subject}}",completed:"Updated {{subject}}",failed:"Failed to update {{subject}}"},externalTool:"external tool",mcp:{running:"Calling {{tool}}",completed:"Called {{tool}}",failed:"{{tool}} call did not complete"},collaboration:{spawn_agent:{running:"Starting subtask",completed:"Subtask started",failed:"Failed to start subtask"},send_input:{running:"Sending information to subtask",completed:"Information sent to subtask",failed:"Failed to send information to subtask"},wait:{running:"Waiting for subtask",completed:"Subtask wait complete",failed:"Subtask wait failed"},close_agent:{running:"Ending subtask",completed:"Subtask ended",failed:"Failed to end subtask"},default:{running:"Coordinating subtasks",completed:"Subtask collaboration complete",failed:"Subtask collaboration failed"}},webSearch:{running:"Searching the web",completed:"Web search complete",failed:"Web search did not complete"},errorDetail:"Codex execution did not complete.",errorTitle:"Codex encountered an error"}},Hre={segments:{system:"System and tools",input:"Input and history",output:"Output and reasoning",remaining:"Remaining"},modelUnavailable:"Model information unavailable",promptWithSystem:"Prompt (including system)",systemUnknown:"System and tool usage unknown",systemApprox:"System and tools approximately {{count}} tokens",ariaKnown:"Context {{percentage}}% used, {{system}}, {{inputLabel}} {{input}} tokens, output and reasoning {{output}} tokens, remaining {{remaining}} tokens",ariaUnknown:"{{model}}, context window unknown, {{count}} cumulative session tokens used",composition:"Context composition",percentageUsed:"{{percentage}}% used",gridAria:"100-cell context composition chart. Each cell represents one percent of the context window.",estimated:"Estimated",unknown:"Unknown",summaryPercentage:"{{used}} used, {{remaining}} remaining",summaryTokens:"{{used}} used, {{remaining}} remaining, {{total}} total",overflow:"Context exceeded by {{count}} tokens",title:"Context usage",unknownModel:"The context window for this model is not available",unknownRuntime:"The current runtime did not provide model information"},qre={title:"Add AgentKit agent",noAgents:"Connected successfully, but no agents were found at this address (/list-apps was empty).",connectionFailed:"Connection failed: {{error}}. Check the URL, API key, and whether the gateway allows cross-origin requests.",description:"Enter the URL and API key of an AgentKit deployment to connect through the ADK protocol. Connected agents will appear in the selector in the upper-left corner.",url:"Endpoint URL",apiKeyHint:"Connect using Authorization: Bearer",displayName:"Display name (optional)",displayNameHint:"Uses the URL hostname by default",cancel:"Cancel",connecting:"Connecting…",connect:"Connect and add"},Wre={placeholder:"Type a message…",inputAria:"Message",generating:"Generating",send:"Send"},Kre={ariaLabel:"Invocation context for this turn",removeSkill:"Remove skill {{name}}",removeAgent:"Remove agent {{name}}"},Gre={cardAria:"{{label}} chart",viewAria:"{{label}} display mode",preview:"Preview",code:"Code",invalidEcharts:"The ECharts configuration is not a valid, safe data object. Switch to Code to inspect it.",renderFailed:"The chart cannot be rendered right now. Switch to Code to inspect it.",echartsAria:"ECharts preview",rendering:"Rendering chart…",mermaidFailed:"The chart cannot be rendered right now. Switch to Code to inspect the Mermaid source.",mermaidAria:"Mermaid preview"},Xre={playVideo:"Play video: {{name}}",enlargeImage:"Enlarge image preview: {{name}}",image:"image",enlargeVideo:"Enlarge video",videoPreview:"Video preview",downloadVideo:"Download video",close:"Close"},Yre={annotation:Fre,media:Bre,runtimeLogs:Ure,trace:Qre,share:zre,blocks:Vre,tokenUsage:Hre,addAgentKit:qre,composer:Wre,invocation:Kre,visualization:Gre,markdown:Xre},ADe=Object.freeze(Object.defineProperty({__proto__:null,addAgentKit:qre,annotation:Fre,blocks:Vre,composer:Wre,default:Yre,invocation:Kre,markdown:Xre,media:Bre,runtimeLogs:Ure,share:zre,tokenUsage:Hre,trace:Qre,visualization:Gre},Symbol.toStringTag,{value:"Module"})),Zre={back:"Back",cancel:"Cancel",deploy:"Deploy",delete:"Delete",loading:"Loading…",next:"Next",notSupported:"Not supported",previous:"Previous",required:"Required",retry:"Retry",actions:"Actions",value:"Value",disabled:"Off",enabled:"Enabled",none:"None",close:"Close",name:"Name",description:"Description",send:"Send"},Jre={heading:"VeADK agent structure configuration",importHint:"Reload this file from Import YAML on the Create Agent page."},ese={agentName:{required:"Name is required",reserved:"user is reserved by Google ADK. Choose another name.",characters:"Start with a letter or underscore and use only letters, numbers, and underscores"},runtimeName:{required:"Runtime name is required",characters:"Runtime name can contain only letters, numbers, underscores, and hyphens",length:"Runtime name must be 4–64 characters"}},tse={description:"A VeADK-powered assistant that understands user intent and uses the right tools to complete tasks.",instruction:`You are a professional and reliable assistant. +{{response}}`,loadArkApiKeysFailed:"Failed to load Ark API keys",loadModelsFailed:"Failed to load models",runtimeAccessDenied:"This account cannot access the Runtime. Refresh the list or sign in again.",privateRuntimeUnavailable:"The Runtime was deployed, but this Studio cannot access the private Runtime. Use a Studio connected to the same VPC, or deploy with public or public plus VPC access.",runtimeTemporarilyUnavailable:"The Runtime was deployed, but Studio cannot connect yet. The gateway domain may still be propagating, or the current network or DNS cannot reach it. Try connecting again later from Manage Agents.",runtimeConnectionUnsupported:"The Runtime Agent Server does not provide a connection endpoint. Confirm that the Runtime is ready and compatible.",runtimeConnectionDenied:"The Runtime rejected the connection request. Check its authentication configuration.",listAgentsFailed:"Failed to load Agents",invalidListAppsJson:"Runtime /list-apps returned unreadable JSON.",invalidListAppsFormat:"Runtime /list-apps returned an invalid format; expected a non-empty string array.",createSessionFailedWithStatus:"Failed to create session ({{status}})",createSessionFailed:"Failed to create session",getSessionFailed:"Failed to load session",getSessionFailedWithDetail:"Failed to load session ({{status}}): {{detail}}",feedbackRuntimeOnly:"Feedback sync is supported only for sessions connected to an AgentKit Runtime",feedbackRegionMissing:"The Runtime region is missing, so feedback cannot be submitted",submitFeedbackFailed:"Failed to submit feedback",loadEvaluationSetsFailed:"Failed to load evaluation sets",loadAutoEvaluationStatusFailed:"Failed to load automatic evaluation status",loadOptimizationsFailed:"Failed to load optimization suggestions",deleteEvaluationCaseFailed:"Failed to delete the evaluation case",downloadFileFailed:"Failed to download the file",fileUnavailable:"File content is unavailable",uploadFileFailed:"File upload failed",traceDisabled:"Tracing is not enabled for this Agent. Enable it in the console first.",loadTraceFailed:"Failed to load trace data",contentTypeMissing:"Content-Type missing",traceNonJson:"Trace failed: the server returned a non-JSON response ({{contentType}}). Check the Studio API proxy configuration",invalidTraceFormat:"Trace failed: invalid response format",submitIssueFeedbackFailed:"Failed to submit issue feedback",issueFeedbackNotConfirmed:"Failed to submit issue feedback: the server did not confirm the submission",noPreviewableAgent:"This Runtime does not provide an Agent that can be previewed.",agentSearchFailed:"Agent search failed",emptySseBody:"HTTP 200 with an empty SSE response body.",noDisplayableSseReply:"HTTP 200, but the SSE response did not contain a displayable model reply.",firstSseEventTimeout:"No SSE event was received within 30 seconds.",runSessionFailed:"Session run failed",runSseFailedWithDetail:"run_sse failed ({{status}}): {{detail}}",checkRuntimeNameFailed:"Failed to check the Runtime name",invalidRuntimeNameCheck:"Failed to check the Runtime name: invalid response format",loadCloudResourcesFailed:"Failed to load cloud resources",invalidCloudResources:"The cloud resource list response has an invalid format",invalidEnvironmentMount:"The environment mount response has an invalid format",environmentMountMismatch:"The environment mount response does not match the request",environmentMountNetworkFailed:"Unable to connect to Studio, so the environment was not mounted. Check your network and try again.",environmentMountFailed:"Failed to mount the environment",clipboardUnsupported:"This browser does not support writing to the clipboard.",clipboardWriteFailed:"Unable to write to the clipboard. Check clipboard permissions.",loadSystemInfoFailed:"Failed to load system information",invalidSystemInfo:"The system information response has an invalid format",invalidEnvironmentBuild:"The environment build response has an invalid format",invalidEnvironmentBuildStep:"The environment build step response has an invalid format",invalidEnvironmentManifest:"The environment manifest response has an invalid format",invalidImageRepository:"The environment image repository response has an invalid format",invalidCodeRepository:"The environment code repository response has an invalid format",invalidImageSource:"The environment image source response has an invalid format",invalidEnvironment:"The environment response has an invalid format",invalidWorkspace:"The workspace response has an invalid format",loadWorkspacesFailed:"Failed to load workspaces",invalidWorkspaceList:"The workspace list response has an invalid format",saveWorkspaceFailed:"Failed to save the workspace",deleteWorkspaceFailed:"Failed to delete the workspace",loadEnvironmentsFailed:"Failed to load environments",invalidEnvironmentList:"The environment list response has an invalid format",probeRepositoryFailed:"Failed to inspect the code repository",invalidRepositoryProbe:"The code repository inspection response has an invalid format",exportEnvironmentCodeFailed:"Failed to export the environment share code",invalidEnvironmentCode:"The environment share code response has an invalid format",inspectEnvironmentCodeFailed:"Failed to inspect the environment share code",invalidEnvironmentCodeInspection:"The environment share code inspection response has an invalid format",importEnvironmentCodeFailed:"Failed to import the environment share code",invalidEnvironmentCodeImport:"The environment share code import response has an invalid format",studioUnavailable:"Unable to connect to Studio. Confirm that the backend is running and try again.",saveEnvironmentFailed:"Failed to save the environment",deleteEnvironmentFailed:"Failed to delete the environment",startEnvironmentBuildFailed:"Failed to start the environment build",loadEnvironmentBuildFailed:"Failed to load environment build details",loadEnvironmentManifestFailed:"Failed to load the environment manifest",invalidEnvironmentResource:"The environment resource response has an invalid format",loadEnvironmentResourcesFailed:"Failed to load environment build resources",updateCodexSandboxFailed:"Failed to update Codex Sandbox",invalidCodexSandboxUpdate:"The Codex Sandbox update response has an invalid format",loadUserPoolsFailed:"Failed to load user pools",invalidUserPoolList:"The user pool list response has an invalid format",syncGithubFailed:"Failed to sync GitHub code ({{status}})",validatingMigrationArtifact:"Validating migration artifact",uploadingCodePackage:"Uploading code package",migrationArtifactValidated:"Migration artifact validated",codePackageUploaded:"Code package uploaded",deploymentProgress:{preparing:"Preparing deployment",uploading:"Uploading the code package",building:"Building the image",buildLogsSyncing:"Building the image. Build logs are up to date.",buildLogsComplete:"Build log sync complete.",buildFailedLogsSynced:"Image build failed. Final build logs are available.",buildLogsUnavailable:"Build logs are temporarily unavailable.",finalBuildLogsUnavailable:"Final build logs are temporarily unavailable.",deploying:"Deploying the service",publishing:"Publishing the service",evaluating:"Creating evaluation sets",updating:"Updating the Runtime configuration",completing:"Finalizing deployment",github:"Configuring GitHub delivery",inProgress:"Deployment in progress"},deploymentFailed:"Deployment failed",deploymentDisconnected:"Deployment failed: connection interrupted",deploymentMissingAgentName:"Deployment failed: Agent name missing from response",deploymentMissingConnection:"Deployment failed: AgentKit connection information missing from response",cancelDeploymentFailed:"Failed to cancel deployment ({{status}})",loadFailed:"Failed to load ({{status}})",loadPermissionsFailed:"Failed to load permissions ({{status}})",invalidPermissionResponse:"The permission service returned an unreadable response",checkStudioUpdateFailed:"Failed to check for Studio updates ({{status}})",studioUpdatePreflightFailed:"Studio update permission check failed ({{status}})",submitStudioUpdateFailed:"Failed to submit the Studio update ({{status}})",loadAgentUsageFailed:"Failed to load Agent usage",notProvided:"Not provided",agentUsageNonJson:"Failed to load Agent usage: the server returned a non-JSON response (HTTP {{status}}, Content-Type: {{contentType}}). ",checkStudioGateway:"Confirm that the current service is running in Studio mode and check the proxy or gateway configuration.",agentUsageInvalidJson:"Failed to load Agent usage: the server returned invalid JSON (HTTP {{status}}, Content-Type: {{contentType}}). ",retryCheckGateway:"Try again later. If the problem persists, check the proxy or gateway configuration.",loadCronJobsFailed:"Failed to load scheduled tasks",loadCronJobFailed:"Failed to load scheduled task details",createCronJobFailed:"Failed to create the scheduled task",updateCronJobFailed:"Failed to update the scheduled task",enableCronJobFailed:"Failed to enable the scheduled task",pauseCronJobFailed:"Failed to pause the scheduled task",runCronJobFailed:"Failed to run the scheduled task now",loadCronHistoryFailed:"Failed to load execution history",stopCronRunFailed:"Failed to stop the execution",deleteCronJobFailed:"Failed to delete the scheduled task",loadRuntimeFailed:"Failed to load the Runtime",loadLocalToolsFailed:"Failed to load local tools",connectDynamicRouteFailed:"Failed to connect the Studio dynamic route",a2aProbeDenied:"The Runtime rejected the A2A probe. Check the Runtime authentication configuration.",loadA2aCardFailed:"Failed to load the A2A Agent Card",loadRuntimeApiKeyFailed:"Failed to load the Runtime API key",runtimeApiKeyMissing:"The Runtime did not return a usable API key",deleteFailed:"Delete failed ({{status}})",runtimeManageForbidden:"This account cannot manage the Runtime.",runtimeNotFound:"The Runtime does not exist or has been deleted.",runtimeUnavailable:"This account cannot access the Runtime.",checkRuntimeUpdateFailed:"Failed to check Runtime update capability (HTTP {{status}}). Try again later.",loadRuntimeDetailFailed:"Failed to load Runtime details",generateProjectFailed:"Failed to generate the project",generateAgentConfigFailed:"Failed to generate the Agent configuration",createDebugRunFailed:"Failed to create the debug run",createDebugSessionFailed:"Failed to create the debug session",loadDebugTraceFailed:"Failed to load the debug trace",invalidDebugTrace:"Failed to load the debug trace: invalid response format",debugRunFailed:"Debug run failed",cleanupDebugRunFailed:"Failed to clean up the debug run"},nre={loadFailed:"Failed to load conversation mode capabilities (HTTP {{status}})",invalidResponse:"The conversation mode capabilities response has an invalid format"},ire={nonJson:"{{fallback}}: the server returned a non-JSON response (HTTP {{status}}, {{contentType}}){{detail}}"},rre={common:Mie,agentkitCli:Lie,cloudRegion:$ie,connections:Fie,feishuBot:Bie,requestError:Uie,runSse:Qie,runtimeLogs:zie,search:Vie,skills:Hie,sse:qie,identity:Wie,github:Kie,video:Gie,websiteIntegration:Xie,knowledge:Yie,intelligentDevelopment:Zie,migrations:Jie,sandbox:ere,client:tre,newChatCapabilities:nre,jsonResponse:ire},kDe=Object.freeze(Object.defineProperty({__proto__:null,agentkitCli:Lie,client:tre,cloudRegion:$ie,common:Mie,connections:Fie,default:rre,feishuBot:Bie,github:Kie,identity:Wie,intelligentDevelopment:Zie,jsonResponse:ire,knowledge:Yie,migrations:Jie,newChatCapabilities:nre,requestError:Uie,runSse:Qie,runtimeLogs:zie,sandbox:ere,search:Vie,skills:Hie,sse:qie,video:Gie,websiteIntegration:Xie},Symbol.toStringTag,{value:"Module"})),sre={backToEvaluationCase:"Back to evaluation case",cancel:"Cancel",copied:"Copied",copy:"Copy",exportConversation:"Export conversation",retry:"Retry"},are={title:"How would you like to add an Agent?",subtitle:"Choose the approach that best fits your project.",quickCreate:{title:"Create from scratch",description:"Build an Agent with intelligent, custom, template, or workflow modes."},intelligent:{title:"Intelligent mode",description:"Describe your goal, then build, debug, and validate the Agent interactively."},package:{title:"Add and deploy a code package",description:"Upload an Agent project archive, review the code, and deploy it to AgentKit Runtime."},migrate:{title:"Migrate an existing project",description:"Migrate an existing LangChain, Dify, or similar project to AgentKit Runtime."}},ore={subject:{file:"file changes",command:"command execution"},decision:{accept:"Allowed {{subject}} once",acceptForSession:"Allowed {{subject}} for this session",decline:"Declined {{subject}}",cancel:"Cancelled approval for {{subject}}"},details:{command:"Command",grantRoot:"Authorized path",cwd:"Working directory"}},lre={noDescription:"No description",region:"Region",unknownAgent:"Unknown Agent"},cre={agentTransfer:"Agent handoff",annotationHint:"Model response; select text to add an annotation",continueBranch:"Continue with “{{branch}}”",emptyResponse:"This response has no displayable content.",subagentDescription:"Working on a task handed off by the primary Agent."},ure={title:"Configure {{provider}} credentials",prefix:"Agent Workspace requires {{provider}} credentials. Set",and:"and",suffix:"in the runtime environment, then retry."},dre={buildRunning:{title:"A build is still running",description:"Leaving will stop this build. The session will remain available in your history.",confirm:"Stop and leave"},deleteThread:{title:"Delete Codex session",description:"Delete “{{name}}” and remove it from your session history?",confirm:"Delete"},returnToCreate:{title:"Return to the create page?",description:"Your current entries will be lost.",confirm:"Return"}},fre={additionalAgentDeleteFailures:"; {{count}} more failed",agentDeleteFailures:"Failed to delete {{count}} Agents: {{failures}}{{suffix}}",agentToolsMissing:"This Agent is missing required tools: {{tools}}",buildStopUnconfirmed:"You left the development environment, but Studio could not confirm that the build stopped. It may still be running; check its status in session history later.",builtinAgentSendFailed:"Failed to send to the built-in Agent: {{message}}",bytePlusEvaluationUnsupported:"AgentKit evaluation sets are not currently supported on BytePlus",clipboardUnsupported:"This browser does not support writing to the clipboard.",cloudCodexEmptyReply:"The cloud Codex task ended without a response. Send the task again.",cloudCodexSessionMissing:"The cloud Codex session has not appeared in the list yet. Try again shortly.",deploymentRuntimeIdMissing:"Deployment completed without returning a Runtime ID.",environmentExpired:"The selected environment is no longer available. Refresh and select it again.",environmentsLoadFailed:"Failed to load environments",evaluationCaseSessionMissing:"This evaluation case has no session reference and cannot be opened.",evaluationUnsupportedForReply:"This response cannot be added to an evaluation set",firstFrameRequired:"Add a first-frame image before generating from first and last frames.",incompletePromptOptimization:"The prompt optimization result is incomplete. Run the optimization again.",intelligentCapabilityCheckFailed:"Failed to check intelligent development capabilities (HTTP {{status}})",intelligentSessionCreateFailed:"Failed to create the intelligent development session",invalidIntelligentCapability:"The intelligent development capability response is invalid.",localBffToolsNotConfigured:"No tools are configured for the local Studio BFF.",localToolsLoadFailed:"Failed to load local tools",loginPopupBlocked:"The browser blocked the sign-in window. Allow pop-ups and try again.",loginPopupClosed:"The sign-in window was closed. Sign in again to continue.",mediaTooLarge:"{{fileName}} exceeds this platform's media size limit.",mountEnvironmentFailed:"Failed to mount the environment",noConnectedSandbox:"No Sandbox is currently connected.",noCreateAgentPermission:"Your account does not have permission to add Agents.",noManageAgentPermission:"Your account does not have permission to manage Agents.",noOptimizationBaseline:"There is no pre-optimization version available for comparison.",oauthUrlMissing:"The event does not include an authorization URL.",onlyCloudAgentUpdatable:"Only deployed cloud Agents can be updated.",optimizationVersionMissing:"The project version for this optimization could not be found. It may have been deleted.",persistentStorageNotConfigured:"Persistent storage has not been configured by an administrator",readDraftFailed:"Unable to read local drafts. Try again.",runtimeAgentNameMissing:"The Runtime is missing an Agent name and cannot be updated.",runtimeBffToolsDisabled:"BFF tool capabilities are not enabled for this Runtime Agent.",runtimeDeploymentConfigUnavailable:"The Runtime's original deployment configuration cannot be restored, so it cannot be updated safely.",runtimeMissingForConnection:"Runtime information is missing, so the Agent cannot be connected.",runtimeRegionMissingForDelete:"The Runtime is missing region information and cannot be deleted.",runtimeRegionMissingForUpdate:"The Runtime is missing region information and cannot be updated.",runtimeUpdateUnsupported:"This Runtime does not support in-place updates.",sandboxRuntimeUnavailable:"This Agent does not have an available Sandbox Runtime.",sandboxToolsUnavailable:"The current Studio BFF does not provide Sandbox execution tools.",saveDraftLocationRejected:"The browser could not save the current draft location. Check site storage permissions and try again.",saveDraftRejected:"The browser could not save the draft. Try again.",selectSkillToOptimize:"Select a Skill to optimize first.",sessionMissingForMount:"The current session does not exist, so an environment cannot be mounted.",sessionNotReady:"The session is not ready yet.",sessionUnavailable:"The current session is unavailable. Close it and try again.",sourceNotReady:"The source is not ready yet. Return to the conversation to continue.",textVideoRejectsReferences:"Text-to-video does not use reference media. Remove the images or videos first.",videoEditRequiresVideo:"Add the video you want to edit first.",videoExtendRequiresVideo:"Add a source video before extending it.",videoGenerationFailed:"Video generation failed. Try again later.",videoModeUnsupported:"The selected video mode is not supported on this platform.",videoPreviewMissing:"The video task completed, but the server did not return a preview URL.",videoReferenceRequired:"Add at least one reference image or video."},hre={like:"Like",removeLike:"Remove like",dislike:"Dislike",removeDislike:"Remove dislike",reportIssue:"Report an issue",traceFlameGraph:"Tracing flame graph"},pre={0:"What would you like to work on today?",1:"How can I help?",2:"What would you like me to look into?",3:"Ask me anything",4:"Hi, let's get started",5:"Start a new conversation",6:"What should we tackle first?",7:"Tell me what you have in mind",8:"Where should we begin?",9:"What can I help you with?",10:"Ready to move this forward?",11:"What's most important right now?",12:"Let's get something done today",13:"I'm ready when you are",intelligentDevelopment:"Give your ideas room to grow"},mre={agentCapabilities:"Checking Agent capabilities…",session:"Loading session…"},gre={cancelled:"Authorization was cancelled.",pasteCallbackUrl:"After authorization, paste the full callback URL from your browser's address bar:",popupBlocked:"The browser blocked the authorization window. Allow pop-ups and try again.",unsupportedUrl:"The authorization URL is not HTTP or HTTPS and was blocked."},bre={volcengine:"Volcengine"},yre={checkingPersistence:"Checking persistent storage…",exitDevelopment:"Exit development",fileUploaded:"Uploaded a file to the Sandbox",filesUploaded:"Uploaded {{count}} files to the Sandbox",intelligentDevelopment:"Intelligent development",mode:{readOnly:"Read only",workspaceWrite:"Workspace write",fullAccess:"Full access"},approvalPolicy:{untrusted:"Untrusted commands only",onRequest:"Ask when needed",never:"Never ask"},reviewer:{user:"Ask me",autoReview:"Automatic review"},labels:{approvalPolicy:"Approval policy",file:"File",fileNumber:"File {{number}}",mode:"Sandbox mode",networkAccess:"Network access",reviewer:"Approval method",workingDirectory:"Working directory"},network:{allowed:"Allowed",disabled:"Off"},permissionsUpdated:"Updated Codex permissions for this Sandbox session",persistenceUnknown:"Unable to verify persistent storage",stoppedReady:"Stopped. You can continue typing.",uploadedFilesPrompt:"The following files were uploaded to the current Sandbox workspace. Use them in this task:",workspaceUpdated:"Workspace updated"},vre={addAgent:"Add Agent",addFromPackage:"Add from code package",agent:"Agent",automations:"Automations",createAgent:"Create Agent",createSkill:"Create Skill",cronJobs:"Cronjob",issueFeedback:"Issue feedback",library:"Library",migrateAgent:"Migrate Agent",newConversation:"New conversation",optimizeSkill:"Optimize {{name}}",search:"Search",skill:"Skill",skillLibrary:"Skill library",systemInfo:"System information",updateAgent:"Update {{name}}"},xre={actions:sre,addAgent:are,approval:ore,common:lre,conversation:cre,credentials:ure,dialogs:dre,errors:fre,feedback:hre,greetings:pre,loading:mre,oauth:gre,providers:bre,sandbox:yre,titles:vre},EDe=Object.freeze(Object.defineProperty({__proto__:null,actions:sre,addAgent:are,approval:ore,common:lre,conversation:cre,credentials:ure,default:xre,dialogs:dre,errors:fre,feedback:hre,greetings:pre,loading:mre,oauth:gre,providers:bre,sandbox:yre,titles:vre},Symbol.toStringTag,{value:"Module"})),Ore="Automations",wre="Connect development tools and extend your Agents with automated workflows",Sre="Search automations",kre="Automation categories",Ere={development:"Development",channels:"Messaging channels"},Cre="{{category}} automations",Tre="Open {{name}}",Are="Available only in local deployments",_re="No matching automations",Nre="Try searching for another name",jre="Back to automations",Rre={"coding-agents":{name:"Configure coding agents",badge:"Local",description:"Install built-in VeADK and AgentKit skills globally for Trae, Claude Code, or Codex."},template:{name:"Import starter project",description:"Create a minimal Agent project in your repository with continuous delivery to AgentKit Runtime.",title:"Import starter project",subtitle:"Add a ready-to-run basic Agent and continuous delivery configuration to your repository",panel:"This creates a pull request containing the basic project and AgentKit Runtime delivery workflow.",submitLabel:"Import template and create PR",regionHelp:"Must match the target Runtime region",pullRequest:{title:"feat: import AgentKit basic template",description:"Import a basic Agent project with the AgentKit Studio App Server and add continuous delivery to AgentKit Runtime. Configure the required {{provider}} secrets before merging."},fields:{repository:{label:"GitHub Repo",placeholder:"owner/repository",help:"Enter owner/repository or a full github.com URL"},baseBranch:{label:"Target branch",placeholder:"main",help:"Defaults to main; the pull request will use this branch as its base"},projectPath:{label:"Agent project directory",placeholder:"agentkit-basic-agent",help:"The basic project will be added here; app.py mounts the complete Studio App Server and serves as the entry point"},runtimeName:{label:"Runtime name",placeholder:"support-agent",help:"Used by the AgentKit delivery configuration"},runtimeId:{label:"Runtime ID",placeholder:"rt-xxxxxxxx",help:"The AgentKit Runtime that will receive continuous updates"}}},delivery:{name:"AgentKit Runtime delivery",description:"Add a workflow that continuously delivers your repository to AgentKit Runtime.",title:"AgentKit Runtime delivery",subtitle:"Add continuous delivery to the repository through a pull request",panel:"This creates a release branch and opens a pull request containing the GitHub Actions workflow.",submitLabel:"Confirm and create PR",regionHelp:"Must match the target Runtime region",pullRequest:{title:"feat: continuously publish to AgentKit Runtime",description:"Add a GitHub Actions workflow that continuously publishes updates from the target branch to AgentKit Runtime. Configure the required {{provider}} secrets before merging."},fields:{repository:{label:"GitHub Repo",placeholder:"owner/repository",help:"Enter owner/repository or a full github.com URL"},baseBranch:{label:"Target branch",placeholder:"main",help:"Defaults to main; the pull request will use this branch as its base"},projectPath:{label:"Agent project directory",placeholder:".",help:"Defaults to the repository root; the directory must contain an app.py that mounts the complete Studio App Server"},runtimeName:{label:"Runtime name",placeholder:"support-agent",help:"Used by the AgentKit delivery configuration"},runtimeId:{label:"Runtime ID",placeholder:"rt-xxxxxxxx",help:"The AgentKit Runtime that will receive continuous updates"}}},review:{name:"Automated PR review",description:"Review code changes in an isolated Sandbox and publish the result to the pull request.",title:"Automated PR review",subtitle:"Inspect code changes in an isolated Sandbox and publish the result to the pull request",panel:"The workflow reviews only non-draft pull requests from the same repository. Pull requests from forks cannot access repository secrets.",submitLabel:"Add review and create PR",regionHelp:"Must match the Sandbox Tool region",pullRequest:{title:"chore: configure automated PR review",description:"Add a GitHub Actions workflow that reviews same-repository pull requests in an isolated Sandbox and publishes the result as a GitHub review. Configure the required workflow secrets before merging."},fields:{repository:{label:"GitHub Repo",placeholder:"owner/repository",help:"Enter owner/repository or a full github.com URL"},baseBranch:{label:"Target branch",placeholder:"main",help:"Defaults to main; the pull request will use this branch as its base"},sandboxToolId:{label:"Sandbox Tool ID",placeholder:"tool-xxxxxxxx",help:"The AgentKit CodeEnv used for each review"},modelName:{label:"Review model",placeholder:"review-model",help:"The code review model name injected into the Sandbox"},modelBaseUrl:{label:"Model API URL",placeholder:"https://ark.example.com/api/v3",help:"Must be an OpenAI-compatible HTTPS endpoint"}}},feishu:{name:"Feishu bot",badge:"Beta",description:"Create a Feishu bot and connect its messages directly to AgentKit Runtime."},"website-integration":{name:"Website integration",description:"Embed an AgentKit Runtime on your website as a floating chat window."}},Ire={required:"Required",optional:"Optional",region:"Region",tokenLabel:"GitHub Token",getToken:"Get token",tokenPlaceholder:"Requires write access to repository contents and pull requests",hideToken:"Hide token",showToken:"Show token",tokenHelp:"The token is used only for this submission. It is not stored in the browser or written to the pull request.",prCreated:"PR #{{number}} created",viewOnGitHub:"View on GitHub",secretsHeading:"Before merging the pull request, configure these GitHub Actions secrets in the repository:",secretPair:"{{accessKey}}, {{secretKey}} (required)",sessionToken:"{{sessionToken}} (required when using temporary credentials)",requiredSecret:"{{name}} (required)",temporaryCredentialRequired:" (required when using temporary credentials)",requiredSuffix:" (required)",submitting:"Creating PR…",validation:{required:"This field is required",repository:"Enter owner/repository or a full GitHub repository URL",baseBranch:"The target branch format is invalid",projectPath:"Enter a relative path within the repository",runtimeId:"The Runtime ID format is invalid",sandboxToolId:"The Sandbox Tool ID format is invalid",modelName:"The model name format is invalid",modelBaseUrlSafe:"Enter an HTTPS URL without credentials, query parameters, or fragments",modelBaseUrl:"Enter a valid HTTPS URL",runtimeName:{required:"Runtime name is required",characters:"Runtime name can contain only letters, numbers, underscores, and hyphens",length:"Runtime name must be 4–64 characters"}}},Pre={title:"Configure coding agents",description:"Install the AgentKit skills bundled with Studio globally for local coding clients.",retry:"Retry",clients:{ariaLabel:"Select coding agents",title:"Local clients",detectAgain:"Detect again",detecting:"Detecting local clients…",detected:"Client detected",available:"Available",unavailable:"Not detected"},skills:{ariaLabel:"Select bundled skills",title:"Bundled skills",viewFiles:"View files",items:{"veadk-agent-development":{name:"VeADK Agent development",description:"Build and refine Agents with VeADK."},"agentkit-cli":{name:"AgentKit CLI",description:"Manage and deploy AgentKit resources with AgentKit CLI."}}},global:{ariaLabel:"Global installation directories",title:"Global installation",description:"Available to other local projects after configuration",empty:"Select a client to see its installation directory."},success:"Configured {{skillCount}} skill(s) for {{agentCount}} client(s)",selection:"{{agentCount}} client(s) and {{skillCount}} skill(s) selected",selectClient:"Select a client first",configuring:"Configuring…",configure:"Configure",errors:{detect:"Failed to detect local clients",configure:"Configuration failed. Check permissions for your user directory and try again."},preview:{description:"Browse the skill files bundled with Studio in read-only mode",close:"Close file preview",loading:"Loading files…",error:"Failed to load skill files",skillFiles:"{{name}} files",files:"Files",fileContent:"File contents",notPreviewable:"This file is not previewable UTF-8 text.",noFiles:"No previewable files."}},Dre={title:"Feishu bot",description:"Create a Feishu Agent powered by AgentKit Runtime",panel:"Enter the credentials for a published Feishu app. Studio will generate a basic Agent, create a dedicated Runtime, and enable the persistent Feishu messaging connection.",agentName:"Agent name",agentNameHelp:"Used as the root Agent name in the new Runtime",region:"Deployment region",regionHelp:"The Runtime and build artifacts will be created in this region",regions:{"cn-beijing":"Beijing","cn-shanghai":"Shanghai"},appId:"Feishu App ID",appIdHelp:"Application credential from the Feishu Open Platform",appSecret:"Feishu App Secret",appSecretPlaceholder:"Enter the App Secret",appSecretHelp:"Written only to the environment variables of the new Runtime",hideSecret:"Hide App Secret",showSecret:"Show App Secret",hide:"Hide",show:"Show",confirmCancel:"Cancelling will stop the task and clean up any Runtime already created. Continue?",status:{preparing:"Generating the basic Agent",running:"Creating Runtime",cancelling:"Cancelling deployment",succeeded:"Feishu bot Runtime created",cancelled:"Deployment cancelled",failed:"Creation failed"},steps:{prepare:"Generate Agent",build:"Build image",deploy:"Create Runtime",publish:"Publish service"},openConsole:"Open Runtime console",credentials:{title:"Credential handling",description:"The App Secret is used only for this deployment. It is never written to generated source code or browser storage."},cancelDeployment:"Cancel deployment",creating:"Creating…",create:"Create Feishu bot Runtime",validation:{appId:"Enter the Feishu App ID",appSecret:"Enter the Feishu App Secret",agentName:{required:"Name is required",reserved:"user is reserved by Google ADK. Choose another name",characters:"Name must start with a letter or underscore and contain only letters, numbers, and underscores"}},generatedAgent:{description:"A helpful assistant that receives messages through Feishu.",instruction:"You are a helpful assistant serving users through Feishu. Understand each request accurately and provide concise, reliable answers. Ask clarifying questions when information is missing, and never invent facts."}},Mre={title:Ore,description:wre,search:Sre,categoriesLabel:kre,categories:Ere,resultsLabel:Cre,open:Tre,localOnly:Are,emptyTitle:_re,emptyDescription:Nre,backToAutomations:jre,cards:Rre,github:Ire,codingAgents:Pre,feishu:Dre},CDe=Object.freeze(Object.defineProperty({__proto__:null,backToAutomations:jre,cards:Rre,categories:Ere,categoriesLabel:kre,codingAgents:Pre,default:Mre,description:wre,emptyDescription:Nre,emptyTitle:_re,feishu:Dre,github:Ire,localOnly:Are,open:Tre,resultsLabel:Cre,search:Sre,title:Ore},Symbol.toStringTag,{value:"Module"})),Lre={"zh-CN":"简体中文","en-US":"English"},TDe={languageNames:Lre},ADe=Object.freeze(Object.defineProperty({__proto__:null,default:TDe,languageNames:Lre},Symbol.toStringTag,{value:"Module"})),$re={selectedExcerptLabel:"Selected excerpt",commentLabel:"Annotation",commentSeparator:": ",successTitle:"Added to the Bad Case evaluation set",successDescription:"This annotation is linked to the current question and the complete model response.",done:"Done",ariaLabel:"Annotate the selected model response",title:"Add annotation",content:"Annotation",placeholder:"Describe the issue or the expected change",retryError:"{{error}}. Please try again.",cancel:"Cancel",submit:"Add to Bad Case"},Fre={attachment:"attachment",image:"image",preview:"Preview {{name}}",uploading:"Uploading",uploadFailed:"Upload failed",remove:"Remove {{name}}",previewDialog:"{{name}} preview",download:"Download",close:"Close",reading:"Loading document…",loadFailed:"Failed to load document: {{error}}"},Bre={errorTitle:"Cloud log error",copyError:"Copy complete error details",retry:"Retry",statuses:{live:"Live",connecting:"Connecting",retrying:"Reconnecting",idle:"Disconnected"},title:"Instance logs",description:"The VeFaaS instance handling the current conversation request",close:"Close instance logs",instanceId:"Instance ID",waitingInstance:"Waiting for instance",request:"Request {{id}}",ariaLabel:"Live VeFaaS instance logs",notCapturedTitle:"No instance captured yet",notCapturedDescription:"Send a message to see the instance that handles it and its live logs.",connectingTitle:"Connecting to instance logs",connectingDescription:"Establishing a secure log stream through the Studio BFF.",emptyTitle:"No logs yet",emptyDescription:"Connected to the instance and waiting for new log output.",retention:"Logs refresh automatically. Only the latest {{count}} lines are kept."},Ure={title:"Trace",statuses:{loading:"Loading",ready:"",collecting:"Collecting",disabled:"Disabled",forbidden:"Permission required",error:"Failed to load"},errors:{collecting:"The trace is still being collected. Please wait.",disabled:"Tracing is not enabled for this agent. Enable it in the console and try again.",forbidden:"Your account cannot read APMPlus traces. Ask an administrator for read access.",error:"Failed to load the trace. Please try again later."},callCount:"{{count}} calls · {{duration}} ms",close:"Close",loading:"Loading trace…",retryNow:"Retry now",reload:"Reload",empty:"No trace is available for this session yet.",attributes:"Attributes",selectCall:"Select a call on the left to view its details"},Qre={exportNote:"This conversation was exported from AgentKit Studio for reference only.",imageFailed:"Failed to generate the image. Please try again.",browserUnsupported:"This browser cannot generate a conversation image. Please try again.",copyUnsupported:"This browser cannot copy images. Download the image instead.",exportFailed:"Export failed. Please try again.",title:"Export conversation",description:"Choose a format and download all inputs and outputs through the current response.",close:"Close",generatingContent:"Preparing export…",retry:"Try again",previewPage:"Previewing page 1 of {{count}}",previewAlt:"Conversation export page 1 of {{count}}",format:"Export format",generatingFormat:"Generating {{format}}…",copying:"Copying…",copiedFirst:"First page copied",copied:"Copied",copyFirst:"Copy first page",copyImage:"Copy image",generating:"Generating…",downloadArchive:"Download PNG archive ({{count}} pages)",downloadFormat:"Download {{format}}"},zre={unsupportedComponent:"Unsupported component: {{component}}",sandboxIdentity:"Codex Sandbox execution identifiers",useSkill:"Use the {{name}} skill",thinkingDone:"Finished thinking",thinking:"Thinking",justNow:"Just now",sourceUnavailable:"The generated source is temporarily unavailable. Please try again later.",downloadStarted:"Download started",verifiedDelivery:"Verified deliverable",generatedSource:"Generated agent source",entryPoint:"Entry point",fileCount:"Files",size:"Size",validationTime:"Validated",generationTime:"Generated",checksPassed:"{{count}} checks passed",sourceReady:"Source is ready to deploy",sourceGuidance:"The source is ready to view, download, or deploy. Confirm the runtime configuration before deployment.",viewSource:"View source",preparing:"Preparing…",viewChanges:"View changes",downloadSource:"Download source",sourceNotReady:"The source is not ready yet",manualDeploy:"Deploy manually to Runtime",beforeOptimization:"Before optimization",afterOptimization:"After optimization",planStatuses:{pending:"Pending",in_progress:"In progress",completed:"Completed",failed:"Incomplete"},renderUi:"Render UI",truncated:"… (truncated)",agentAdjusting:"Agent is adjusting",sandboxDetails:"Detailed Codex Sandbox output",waitingCodex:"Waiting for Codex output",arguments:"Arguments",result:"Result",artifacts:"Artifacts",downloadNamed:"Download {{name}}",powerpoint:"PowerPoint presentation",preview:"Preview",download:"Download",previewDialog:"{{name}} preview",closePreview:"Close preview",slidePreview:"{{name}} slide preview",mcpToolset:"MCP toolset",authorized:"Authorized · {{tool}}",authorizationRequired:"{{tool}} requires authorization",oauthDescription:"The {{tool}} toolset is protected by OAuth and requires sign-in before use.",oauthProvider:"You will be redirected to {{provider}} to sign in.",oauthContinue:"The conversation will continue automatically after authorization.",waitingAuthorization:"Waiting for authorization…",authorize:"Authorize",missingAuthorizationUrl:"No authorization URL was found in the event.",tools:{web_search:{running:"Searching the web",done:"Web search complete"},link_reader:{running:"Reading webpage",done:"Webpage read complete"},run_code:{running:"Running code in the AgentKit sandbox",done:"Code execution completed in the AgentKit sandbox"},list_envs:{running:"Checking available environments",done:"Available environments loaded"},get_env_manifest:{running:"Loading the environment manifest",done:"Environment manifest loaded"},execute_in_sandbox:{running:"Running a command in the environment",done:"Command completed in the environment"},delegate_to_codex_sandbox:{running:"Codex Sandbox is running",done:"Codex Sandbox completed",failed:"Codex Sandbox failed"},image_generate:{running:"Generating image",done:"Image generated"},video_generate:{running:"Generating video",done:"Video generated"},ppt_generate:{running:"Generating presentation",done:"Presentation generated"},load_memory:{running:"Searching long-term memory",done:"Memory search complete"},load_knowledgebase:{running:"Searching the knowledge base",done:"Knowledge base search complete"},load_skill:{running:"Loading skill",done:"Skill loaded"},collect_resources:{running:"Collecting available resources",done:"Resource collection complete",failed:"Resource collection failed"},create_agents:{running:"Creating and running agents",done:"Agent creation complete",failed:"Agent creation failed"}},createAgents:{categories:{skill_hub:"Skill Hub",skill_space:"AgentKit Skill Center",knowledge_base:"Knowledge base",tool:"Tools"},agentTypes:{llm:"LLM Agent",sequential:"Sequential Agent",parallel:"Parallel Agent",loop:"Loop Agent",workflow:"Workflow"},skill:"Skill",subAgents:"Sub-agents",builtinTool:"Built-in tool",skillCenter:"AgentKit Skill Center",selfAuthoredTools:"Custom tools",dependencies:"Dependencies: {{items}}",fullCode:"Complete code for {{name}}",itemCount:"{{label}}: {{count}} items",collectionAria:"Retrieved resource information",retrieving:"Retrieving resources",retrievalFailed:"Resource retrieval did not complete",checkConfig:"Check the resource service configuration and try again.",notSearched:"Not searched",notConfigured:"Not configured",resourceList:"{{label}} resource list",searchKeywords:"Search keywords",skillHubSkipped:"No search keywords were provided, so Skill Hub was not searched.",sourceSkipped:"{{label}} is not configured, so this source was not searched.",noResources:"No resources in this category were returned.",resultAria:"Agent creation results",creationFailed:"Agent creation did not complete",agentResources:"Resources available to {{name}}",knowledgeBase:"Knowledge base",toolsLabel:"Tools",creating:"Creating agents",noAgents:"No agents to display",noAgentResult:"The tool response did not include an agent configuration or execution result.",sourceLabels:{tool:"Tools",knowledge:"AgentKit Knowledge Base",skillCenter:"AgentKit Skill Center",unknown:"Unknown source"},unnamedResource:"Unnamed resource",unnamedAgent:"Unnamed agent"},branchCompare:{ariaLabel:"Compare branches",selectDirection:"Select a direction",continue:"Continue in this direction"},codexProgress:{planTitle:"Codex execution plan",fallback:{fileChange:"Modify files",approval:"Waiting for approval",status:"Codex status",command:"Run command"},planSummary:"{{completed}}/{{total}} completed",command:{running:"Running command",completed:"Command completed",failed:"Command failed"},projectFiles:"{{count}} project files",projectFile:"project files",fileChange:{running:"Updating {{subject}}",completed:"Updated {{subject}}",failed:"Failed to update {{subject}}"},externalTool:"external tool",mcp:{running:"Calling {{tool}}",completed:"Called {{tool}}",failed:"{{tool}} call did not complete"},collaboration:{spawn_agent:{running:"Starting subtask",completed:"Subtask started",failed:"Failed to start subtask"},send_input:{running:"Sending information to subtask",completed:"Information sent to subtask",failed:"Failed to send information to subtask"},wait:{running:"Waiting for subtask",completed:"Subtask wait complete",failed:"Subtask wait failed"},close_agent:{running:"Ending subtask",completed:"Subtask ended",failed:"Failed to end subtask"},default:{running:"Coordinating subtasks",completed:"Subtask collaboration complete",failed:"Subtask collaboration failed"}},webSearch:{running:"Searching the web",completed:"Web search complete",failed:"Web search did not complete"},errorDetail:"Codex execution did not complete.",errorTitle:"Codex encountered an error"}},Vre={segments:{system:"System and tools",input:"Input and history",output:"Output and reasoning",remaining:"Remaining"},modelUnavailable:"Model information unavailable",promptWithSystem:"Prompt (including system)",systemUnknown:"System and tool usage unknown",systemApprox:"System and tools approximately {{count}} tokens",ariaKnown:"Context {{percentage}}% used, {{system}}, {{inputLabel}} {{input}} tokens, output and reasoning {{output}} tokens, remaining {{remaining}} tokens",ariaUnknown:"{{model}}, context window unknown, {{count}} cumulative session tokens used",composition:"Context composition",percentageUsed:"{{percentage}}% used",gridAria:"100-cell context composition chart. Each cell represents one percent of the context window.",estimated:"Estimated",unknown:"Unknown",summaryPercentage:"{{used}} used, {{remaining}} remaining",summaryTokens:"{{used}} used, {{remaining}} remaining, {{total}} total",overflow:"Context exceeded by {{count}} tokens",title:"Context usage",unknownModel:"The context window for this model is not available",unknownRuntime:"The current runtime did not provide model information"},Hre={title:"Add AgentKit agent",noAgents:"Connected successfully, but no agents were found at this address (/list-apps was empty).",connectionFailed:"Connection failed: {{error}}. Check the URL, API key, and whether the gateway allows cross-origin requests.",description:"Enter the URL and API key of an AgentKit deployment to connect through the ADK protocol. Connected agents will appear in the selector in the upper-left corner.",url:"Endpoint URL",apiKeyHint:"Connect using Authorization: Bearer",displayName:"Display name (optional)",displayNameHint:"Uses the URL hostname by default",cancel:"Cancel",connecting:"Connecting…",connect:"Connect and add"},qre={placeholder:"Type a message…",inputAria:"Message",generating:"Generating",send:"Send"},Wre={ariaLabel:"Invocation context for this turn",removeSkill:"Remove skill {{name}}",removeAgent:"Remove agent {{name}}"},Kre={cardAria:"{{label}} chart",viewAria:"{{label}} display mode",preview:"Preview",code:"Code",invalidEcharts:"The ECharts configuration is not a valid, safe data object. Switch to Code to inspect it.",renderFailed:"The chart cannot be rendered right now. Switch to Code to inspect it.",echartsAria:"ECharts preview",rendering:"Rendering chart…",mermaidFailed:"The chart cannot be rendered right now. Switch to Code to inspect the Mermaid source.",mermaidAria:"Mermaid preview"},Gre={playVideo:"Play video: {{name}}",enlargeImage:"Enlarge image preview: {{name}}",image:"image",enlargeVideo:"Enlarge video",videoPreview:"Video preview",downloadVideo:"Download video",close:"Close"},Xre={annotation:$re,media:Fre,runtimeLogs:Bre,trace:Ure,share:Qre,blocks:zre,tokenUsage:Vre,addAgentKit:Hre,composer:qre,invocation:Wre,visualization:Kre,markdown:Gre},_De=Object.freeze(Object.defineProperty({__proto__:null,addAgentKit:Hre,annotation:$re,blocks:zre,composer:qre,default:Xre,invocation:Wre,markdown:Gre,media:Fre,runtimeLogs:Bre,share:Qre,tokenUsage:Vre,trace:Ure,visualization:Kre},Symbol.toStringTag,{value:"Module"})),Yre={back:"Back",cancel:"Cancel",deploy:"Deploy",delete:"Delete",loading:"Loading…",next:"Next",notSupported:"Not supported",previous:"Previous",required:"Required",retry:"Retry",actions:"Actions",value:"Value",disabled:"Off",enabled:"Enabled",none:"None",close:"Close",name:"Name",description:"Description",send:"Send"},Zre={heading:"VeADK agent structure configuration",importHint:"Reload this file from Import YAML on the Create Agent page."},Jre={agentName:{required:"Name is required",reserved:"user is reserved by Google ADK. Choose another name.",characters:"Start with a letter or underscore and use only letters, numbers, and underscores"},runtimeName:{required:"Runtime name is required",characters:"Runtime name can contain only letters, numbers, underscores, and hyphens",length:"Runtime name must be 4–64 characters"}},ese={description:"A VeADK-powered assistant that understands user intent and uses the right tools to complete tasks.",instruction:`You are a professional and reliable assistant. Your goal is to understand the user's request accurately and provide clear, concise, and useful answers. Guidelines: - Ask clarifying questions when information is missing. Do not invent facts. - Use available tools when appropriate and explain key conclusions. -- Maintain a polite, professional tone.`},nse={requestFailed:"Request failed ({{status}}){{detail}}",a2aSpaces:{credentialsMissing:"The server does not have cloud provider credentials configured, so AgentKit agent centers are unavailable",loginRequired:"Sign in to access AgentKit agent centers"},vikingKnowledge:{credentialsMissing:"The server does not have cloud provider credentials configured, so VikingDB knowledge bases are unavailable",loginRequired:"Sign in to access VikingDB knowledge bases"},vikingMemory:{credentialsMissing:"The server does not have cloud provider credentials configured, so VikingDB memory stores are unavailable",loginRequired:"Sign in to access VikingDB memory stores"},mcpGateway:{missingHttpTool:"Go back to Add MCP tool and add at least one HTTP MCP service. MCP resilience does not support stdio services.",missingUrl:"An HTTP MCP tool is missing a valid service URL. Go back to Add MCP tool and complete it before publishing."},customModel:{fallbackName:"Custom model",apiKeyLabel:"{{name}} model API Key"},deploymentEnv:{serverInjected:"Provided by the server",selectedApiKeyPlaceholder:"Provided by the selected API Key",mcpInjectedComment:"Provided by the added MCP tools",restoredPlaceholder:"Securely restored by the Studio server",generatedMcpPlaceholder:"Generated from the added HTTP MCP tools",restoredHelp:"When updating, the Studio server merges MCP addresses and authentication without returning existing secrets to the browser.",mergedMcpHelp:"The Studio server merges MCP addresses and optional authentication without returning existing secrets to the browser.",listSeparator:", ",requirementHint:"Required by the following optimizations: {{labels}}.",requiredBy:"Required by the following optimizations: {{labels}}. Enter {{key}}.",required:"Enter {{label}} ({{key}}).",invalidJson:"Invalid JSON format"},drafts:{unsupportedVersion:"This local draft version is not supported. Upgrade Studio and try again.",invalidFormat:"The local draft data is invalid.",readFailed:"Could not read local drafts. The browser data may be corrupted.",quotaExceeded:"Browser storage is full, so the draft was not saved. Delete unused drafts or clear this site's storage, then try again.",writeRejected:"The browser blocked saving this draft. Check the site's storage permissions and try again."},skills:{searchFailed:"Search failed ({{status}})",downloadFailed:"Skill download failed ({{status}})",agentKitRequestFailed:"AgentKit Skills request failed",missingManifest:"{{location}} is missing SKILL.md",invalidParentPath:"{{location}} contains an invalid parent path (..): {{path}}",invalidPath:"{{location}} contains an invalid path: {{path}}",localDescription:"Local skill",folderSource:"Folder",noManifest:"No SKILL.md was found in {{location}}"},zip:{invalid:"Invalid zip: EOCD was not found",tooManyFiles:"A zip file cannot contain more than {{count}} files",tooLarge:"The extracted zip content is too large"}},ise={back:"Back to development session",runtimeName:"Runtime name",runtimeNameExists:"This Runtime name already exists. Choose another name.",checkingRuntimeName:"Checking Runtime name",verifiedSource:"Verified source",deployableSource:"Deployable source",verifiedByCodex:"Verified by Codex in the cloud",entryPoint:"Entry point",files:"Files",artifact:"Artifact",validationReport:"Validation report",verifiedHint:"The server materializes source from the verified artifact. Browser files cannot replace it.",unverifiedHint:"The server securely materialized the source. Confirm the Runtime configuration before deploying.",env:{requiredPlaceholder:"Enter {{key}}",optionalPlaceholder:"Optional: {{key}}"}},rse={name:"Code package",back:"Back to creation methods",reading:"Reading the code package",readingEllipsis:"Reading the code package…",uploadFirst:"Upload a code package first",uploadAriaLabel:"Code package upload",upload:"Upload code package",reupload:"Upload a different code package",uploadPrompt:"Upload a code package",filesRecognized:"{{count}} files found. Select this area to upload a different package.",dropHint:"Select or drop a .zip file up to 50 MB. Use app.py or declare an entry point in agentkit.yaml.",viewFiles:"View files",chooseFile:"Choose code package",errors:{invalidFormat:"Choose a .zip code package.",tooLarge:"The code package must be 50 MB or smaller.",invalidPath:"The archive contains an invalid path: {{name}}",empty:"The archive does not contain any deployable files.",tooManyFiles:"A code package cannot contain more than {{count}} files.",duplicateFile:"The code package contains a duplicate file: {{path}}",manifestParse:"Could not parse agentkit.yaml: {{detail}}",manifestRoot:"The root of agentkit.yaml must be an object.",manifestCommon:"common in agentkit.yaml must be an object.",entryPointType:"common.entry_point in agentkit.yaml must be a file path.",entryPointInvalid:"common.entry_point in agentkit.yaml is not a valid file path.",entryPointMissing:"The entry point declared in agentkit.yaml is missing from the code package: {{entryPoint}}",defaultEntryPointMissing:"The code package root must contain app.py, or common.entry_point in agentkit.yaml must declare an existing entry point."}},sse={label:"Agent execution canvas",readOnlyLabel:"Read-only agent execution canvas",minimapLabel:"Execution flow minimap",controls:{ariaLabel:"Execution flow controls",zoomIn:"Zoom in",zoomOut:"Zoom out",fitView:"Fit view"},rootAgent:"Main agent",unnamedStep:"Unnamed step",terminals:{input:"User request",output:"Final response"},edges:{then:"Then",continueLoop:"Continue loop",call:"Call"},patterns:{llm:{label:"Agent",description:"Understand a task and complete one specific job"},sequential:{label:"Sequential",description:"Run internal steps one after another"},parallel:{label:"Parallel",description:"Run internal steps together, then combine their results"},loop:{label:"Loop",description:"Repeat internal steps until the stop condition is met"},a2a:{label:"Remote agent",description:"Call an existing remote agent"}},actions:{insertHere:"Insert a step here",deleteNamed:"Delete {{name}}",deleteNode:"Delete node",addSubagent:"Add subagent",addParallelStep:"Add a parallel step",addLoopStep:"Add a loop step",addNextStep:"Add next step",addFirst:"Add at the beginning",addLast:"Add at the end"}},ase={title:"Intelligent mode",subtitle:"Describe your goal and Codex will plan, build, debug, and temporarily validate the agent in a sandbox.",model:{label:"Model",placeholder:"Select a model",retiring:"Retiring soon",currentConfiguration:"Current configuration",loadError:"Failed to load models"},availability:{checking:"Checking intelligent development availability…",unavailable:"Intelligent mode is currently unavailable. Go back and try again."},goal:{title:"Start with a goal",continueTitle:"Continue improving the project",hint:"Describe the problem your agent should solve. We will ask about any details that could affect the result.",continueHint:"Describe what you want to change. The result will be saved as a new version.",basedOn:"Based on",clearSelection:"Clear selection",label:"Goal",optimizationLabel:"Optimization goal",placeholder:"For example: Build an agent that reads sales data, creates weekly reports, and validates the output format",optimizationPlaceholder:"For example: Cite data sources and ask the user when information is incomplete"},actions:{preparing:"Preparing…",build:"Start building",optimize:"Start optimizing"},preparation:{accepted:"Goal received. Implementation is starting now.",preparing:"Creating the task environment…",starting:"Environment ready. Starting Codex…",next:"Next, Codex will plan the approach, then build, run, and validate the agent."}},ose={title:"Saved projects",description:"Continue improving an existing version, or view, download, and deploy its source.",refresh:"Refresh projects",checkingStorage:"Checking project storage…",unavailableTitle:"Projects are temporarily unavailable",storageCheckError:"Could not confirm project storage status. Try again shortly.",storageNotConfigured:"Project storage is not configured.",loadingMigrated:"Loading migrated projects…",loadingSaved:"Loading saved projects…",loadingVersions:"Loading project versions…",unknownTime:"Unknown time",sourceDownloaded:"Source downloaded.",projectSummary_one:"{{count}} version · Updated {{time}}",projectSummary_other:"{{count}} versions · Updated {{time}}",versionSummary_one:"{{time}} · {{count}} file",versionSummary_other:"{{time}} · {{count}} files",noVersionDescription:"No version description",latestVersion:"Latest version",verified:"Verified",pendingVerification:"Needs review",viewSource:"View source",download:"Download",downloading:"Downloading…",optimize:"Optimize",optimizeUnavailable:"Optimize, not supported",errors:{projects:"Could not load saved projects.",source:"Could not load project source.",versions:"Could not load project versions.",download:"Could not download the source.",prepareDeployment:"Could not prepare the source for deployment.",deleteVersion:"Could not delete the project version.",migrated:"Could not load migrated projects",saved:"Could not load saved projects"},empty:{migratedTitle:"No migrated projects yet",savedTitle:"No saved projects yet",migratedDescription:"Source will be saved here after your first migration.",savedDescription:"Source will be saved here after your first build.",noVersions:"This project has no available versions."},compare:{selected:"{{count}}/2 selected",selectedLabel:"Selected",select:"Select",view:"View comparison",start:"Compare versions"},delete:{title:"Delete this version?",onlyVersion:"“{{name}}” has only one version. Deleting it will also remove the project. This cannot be undone.",description:"This version's source and validation records will be permanently deleted. Other versions are not affected.",confirm:"Delete version"}},lse={title:"Choose how to create",subtitle:"Build your agent with the workflow that fits your needs",features:"Features",quick:{title:"Quick mode",description:"Delegate tasks to dynamically created subagents",features:{dynamicSubagents:"Dynamic subagents",autonomousPlanning:"Autonomous planning",collaboration:"Multi-agent collaboration",summary:"Automatic result summaries",skills:"Skills on demand",trace:"Traceable task execution"}},traditional:{title:"Advanced mode",description:"Customize your agent structure in detail",features:{visualConfig:"Visual configuration",migration:"Existing agent migration",debugging:"Live debugging",optimization:"Optional optimization",parameters:"Fine-grained controls"}}},cse={placeholder:"Enter a system prompt. Type ## followed by a space to add a level-two heading…",toolbar:{undo:"Undo {{shortcut}}",redo:"Redo {{shortcut}}",paragraph:"Paragraph",quote:"Quote",heading:"Heading {{level}}",selectBlockType:"Select text style",blockType:"Text style",bold:"Bold",removeBold:"Remove bold",italic:"Italic",removeItalic:"Remove italic",bulletedList:"Bulleted list",numberedList:"Numbered list"}},use={local:{duplicatesSkipped:"Skipped duplicate skills: {{names}}",invalidDrop:"Drop a folder containing SKILL.md or a .zip file",readError:"Could not read the files: {{detail}}",dropLabel:"Drop a folder or ZIP file to detect skills automatically",hint:"Each skill must contain a SKILL.md file. Directories can contain multiple skills.",reading:"Reading files…",fileCount:"Local · {{count}} files"},hub:{searchError:"Search failed. Try again shortly.",searchPlaceholder:"Search Volcano Find Skill, such as data analysis or PDF",search:"Search",searching:"Searching…",noResults:"No matching skills found. Try another keyword.",hint:"Search Volcano Find Skill by keyword. Selected skills are downloaded to the skills/ directory when the project is generated."},space:{loadError:"Failed to load",loadingSpaces:"Loading AgentKit Skills centers…",noSpaces:"This account has no AgentKit Skills centers.",selectSpace:"Select an AgentKit Skills center",openConsole:"Open in the Volcano Engine console",loadingSkills:"Loading skills…",noSkills:"This AgentKit Skills center has no skills."}},dse={unnamedNode:"Unnamed node",editInstruction:"Select to edit instructions…",controls:{ariaLabel:"Workflow canvas controls",zoomIn:"Zoom in",zoomOut:"Zoom out",fitView:"Fit view"},sections:{info:"Workflow information",execution:"Execution mode",nodes:"Nodes",nodeConfig:"Node configuration"},types:{sequential:{label:"Sequential",description:"Run nodes one after another"},parallel:{label:"Parallel",description:"Run nodes at the same time"},loop:{label:"Loop",description:"Run nodes repeatedly"}},placeholders:{description:"Describe what this workflow does…",agentDescription:"Describe what this agent does…",instruction:"You are…"},errors:{workflowNameUnique:"The workflow name must be unique among agent node names",agentNameUnique:"Agent names must be unique within this workflow"},dragHint:"Drag onto the canvas, or use the button below",agentNode:"Agent node",addNode:"Add node",connectHint:"Drag between node handles to define the execution order.",create:"Create workflow",deleteNode:"Delete node",nameHelp:"Use only letters, numbers, and underscores. Names must be unique.",instruction:"Instructions",tools:"Tools (comma-separated)",nodeId:"Node ID",empty:{selectNode:"Select a node to edit its configuration",summary:"{{nodes}} nodes · {{edges}} connections"}},fse={ariaLabel:"Quick mode creation",progress:"Quick mode creation progress",steps:{agent:{label:"Agent",title:"Basic information",description:"Set the agent's name, purpose, behavior, and capabilities"},environment:{label:"Environment",title:"Configure the environment",description:"Choose the default environment or a custom environment you have built"},deployment:{label:"Deployment",title:"Deployment preferences",description:"Configure AgentKit cloud settings"}},model:{label:"Model",source:"Model source",name:"Model name",provider:"Provider",volcengineArk:"Volcano Ark",custom:"Custom",gateway:"Model gateway",comingSoon:"Coming soon",currentApiKey:"Current API Key",loadingApiKeys:"Loading API Keys",selectApiKey:"Select an API Key",searchApiKeys:"Search API Key names",noApiKeys:"No API Keys available",loadingModels:"Loading models",selectModel:"Select a model",searchModels:"Search by name, Model ID, or provider",noModels:"No models available",apiKeyPlaceholder:"Enter a model API Key",credentialsLoadError:"Failed to load model credentials",modelsLoadError:"Failed to load models"},identity:{unnamedPool:"Unnamed user pool",currentPool:"{{value}} (current user pool)",userPool:"User pool",loading:"Loading user pools",placeholder:"Select a user pool",search:"Search user pools",empty:"This account has no Identity user pools",currentHint:"This Studio's login JWT will be forwarded to the Runtime",mismatchHint:"The selected user pool is not used by this Studio, so the Studio will not be able to call the Runtime after deployment",selectionHint:"The user pool used by this Studio is marked in the list"},agent:{namePlaceholder:"Enter an agent name",descriptionPlaceholder:"Describe what this agent can do",prompt:"Prompt",promptPlaceholder:"Define the role, goals, and behavior boundaries",skills:"Skills",addSkill:"Add skills"},validation:{descriptionRequired:"Enter a description",promptRequired:"Enter a prompt",modelRequired:"Select a model",instanceIntegers:"Minimum instances must be an integer of 0 or greater, and maximum instances must be an integer greater than 0",instanceOrder:"Minimum instances cannot exceed maximum instances",userPoolRequired:"Select a user pool for Runtime authentication"},deployment:{runtimeName:"Runtime name",runtimeNameUpdateHint:"The existing Runtime name is preserved during updates",runtimeNameHint:"Use only letters, numbers, underscores, and hyphens",region:"Deployment region",authentication:"Authentication",apiKeyDescription:"Default: access with the Runtime API Key",userPoolDescription:"Use a JWT issued by an Identity user pool",sessionStorage:"Session storage",inMemoryStorage:"Temporary in-memory storage",backends:{sqlite:"SQLite file",mysql:"MySQL",postgresql:"PostgreSQL"},instances:"Instance settings",minInstances:"Minimum instances",maxInstances:"Maximum instances",inMemoryHint:"To prevent session loss across instances, keep the Runtime at 1–1 instances",networkMode:"Network mode",network:{public:"Public",private:"Private",both:"Public and private"},subnetIds:"Subnet IDs (optional, comma-separated)",sharedInternet:"Shared public egress in the VPC",sharedInternetHint:"Allow private Runtimes to access the public internet through shared egress",evaluationSets:"Evaluation sets",createEvaluationSets:"Create evaluation sets automatically",evaluationSetsHint:"Create Good Case and Bad Case evaluation sets after deployment",resources:"Resource configuration",complete:"Deployment complete",preparing:"Preparing deployment…"},environmentVariables:{title:"Environment variables",add:"Add variable",nameAriaLabel:"Environment variable name",valueAriaLabel:"Value for {{name}}",deleteNamed:"Delete {{name}}"},actions:{updateAgain:"Update again",deployAgain:"Deploy again",updateAndPublish:"Update and publish"}},hse={actions:{addSubagent:"Add subagent",clearRoot:"Clear main agent",clearRootConfirmation:"Clear all settings and subagents from the main agent? This cannot be undone."},workspace:{progress:"Agent creation progress",modes:{build:"Build",validate:"Debug",optimize:"Optimize",environment:"Environment",publish:"Publish"},titles:{build:"Customize your agent architecture",validate:"Debug your agent",optimize:"Choose optimizations for your agent",environment:"Configure the cloud environment",publish:"Prepare your agent for deployment"}},sections:{type:{label:"Agent type",hint:"Choose an agent type"},basic:{label:"Basic information",hint:"Name, description, and system prompt"},model:{label:"Model",hint:"Model and service (optional)"},tools:{label:"Tools",hint:"Callable capabilities"},skills:{label:"Skills",hint:"Declarative skills"},knowledge:{label:"Knowledge base",hint:"External knowledge retrieval"},memory:{label:"Memory",hint:"Short-term and long-term memory"},subagents:{label:"Subagents",hint:"Nested collaboration"},review:{label:"Finish",hint:"Preview and create"}},agentTypes:{ariaLabel:"Agent type",remoteChildOnly:"Remote agents can only be used as child steps",llm:{label:"Agent",fullLabel:"LLM agent",description:"Uses an LLM to complete tasks autonomously"},sequential:{label:"Sequential",fullLabel:"Sequential agent",description:"Runs subagents one after another"},parallel:{label:"Parallel",fullLabel:"Parallel agent",description:"Runs subagents in parallel, then combines their results"},loop:{label:"Loop",fullLabel:"Loop agent",description:"Repeats subagents until the stop condition is met"},a2a:{label:"Remote agent",fullLabel:"Remote agent",description:"Calls a remote agent through the A2A protocol"}},basic:{agentName:"Agent name",name:"Name",agentDescription:"Agent description",descriptionPlaceholder:"Briefly describe what this agent does so your team can identify it…",nameHelp:"Follow Google ADK naming rules and keep the name unique in the execution flow.",rootDescriptionHelp:"The full description is preserved and converted to a Runtime-compatible single line during deployment.",descriptionHelp:"The description appears in agent lists and selectors.",orchestratorHelp:"This is a collaboration container and does not answer directly. Add task steps on the canvas and drag them to reorder.",maxIterations:"Maximum iterations",maxIterationsHelp:"The loop repeats its subagents until the condition is met or this limit is reached.",agentCenter:"AgentKit agent center",agentCenterHelp:"The remote agent's name, description, and capabilities come from the Agent Card returned by the center. The system discovers and attaches matching agents for each task.",moreOptions:"More options",systemPrompt:"System prompt",loadingMarkdown:"Loading Markdown editor…",markdownHelp:"Markdown shortcuts are supported. For example, type ## followed by a space to create a level-two heading.",unnamed:"Unnamed",unnamedAgent:"Unnamed agent"},validation:{remoteRoot:"A remote agent can only be a subagent",missingRegistry:"Select an AgentKit agent center",name:{required:"Name is required",reserved:"user is reserved by Google ADK. Choose another name.",characters:"Start with a letter or underscore and use only letters, numbers, and underscores"},duplicateName:"Agent names must be unique within this structure",missingDescription:"Description is required",mcpAuthRequired:"Confirm how to handle authentication after changing the MCP address",missingSubagent:"A subagent is required",missingPrompt:"System prompt is required",missingSubagentDetail:"Add at least one subagent to {{type}} before debugging or publishing.",problem:"{{name}}: {{problem}}"},ai:{ariaLabel:"Fill agent configuration with AI",minimumLength:"Enter at least {{count}} characters.",replaceConfirmation:"The generated configuration will replace the current canvas and settings. Continue?",placeholder:"Describe your goal and use {{model}} to generate the configuration",generate:"Generate",generating:"Generating",success:"Configuration generated",regenerate:"Generate again",failed:"Generation failed"},debug:{ariaLabel:"Agent debugging workspace",unavailable:"This backend does not currently support generated-agent debug runs.",baseline:"Baseline",comparison:"Variant {{count}}",selectModel:"Select a model",enterDescription:"Enter a description",enterPrompt:"Enter a system prompt",duplicateConfiguration:"Test configurations must be unique",starting:"Starting…",applyAndRestart:"Apply and restart",restart:"Restart",start:"Start environment",defaultModel:"Default model",testConfiguration:"Test configuration",deleteVariant:"Delete {{name}}",deleteVariantGroup:"Delete comparison variant",creatingEnvironment:"Creating the test environment…",configurationChanged:"The configuration changed. Restart the environment.",ready:"Environment ready",readyHint:"Send a message to compare agent responses.",startHint:"Complete the configuration, then start the environment.",viewTraceNamed:"View the trace for {{name}}",traceUnavailable:"Send a message to view its trace",trace:"Trace",useConfiguration:"Use this configuration",finishConfiguration:"Finish configuration",finishAndStart:"Finish and start",currentAgentModel:"Current agent model",configurationHint:"Changes apply only to this comparison. Select this configuration to continue to deployment.",messagePlaceholder:"Send a message to the running test environments…",startOneFirst:"Start at least one test environment first",addVariant:"Add variant",traceTitle:"Trace · {{name}}",leaveTitle:"Leave debugging?",leaveDescription:"The current environments will be removed when you leave. You can start new environments when you return.",cleaning:"Cleaning up…",confirmLeave:"Leave",closeLeaveConfirmation:"Close leave-debugging confirmation"},optimization:{ariaLabel:"Agent optimization options",scenario:"Optimization scenario",components:"Optimization components",bytePlusUnavailable:"Harness Sidecar optimizations are not available for BytePlus accounts yet. Leave all optimizations unselected to continue; regular BytePlus agents are not affected.",releaseScenario:"Optimization scenario: {{profile}}",profiles:{default:{label:"Custom",description:"Choose components as needed. The Sidecar stays off when none are selected."},ops:{label:"Operations",description:"For operations diagnostics, databases, logs, and monitoring MCP servers."}},groups:{quality:"Improve response quality",cost:"Reduce runtime cost",stability:"Improve runtime stability"},options:{context_engine:{label:"Context management",description:"Manage context assembly, task anchoring, and context budgets."},compressor:{label:"Context and result compression",description:"Compress long context and large tool results to reduce token usage."},verifier:{label:"Response verification and repair",description:"Verify evidence and responses, then repair or alert on failure."},long_run_control:{label:"Goal task control",description:"Manage progress, continuation, and completion conditions for Goal tasks."},mcp_resilience:{label:"MCP resilience",description:"Manage connections, timeouts, empty results, large responses, and call budgets. Includes read-only SQL protection by default."}}},model:{label:"Model",source:"Model source",volcanoArk:"Volcano Ark",volcengineArk:"Volcano Ark",bytePlusModelArk:"BytePlus ModelArk",custom:"Custom",gateway:"Model gateway",comingSoon:"Coming soon",configuration:"Model configuration",name:"Model name",provider:"Provider",liteLlmProviders:"LiteLLM providers",apiKeyPlaceholder:"Enter the model API Key",available:"Available",retiring:"Retiring soon",notActivated:"Not activated",unavailable:"Unavailable",apiKeyLoadError:"Failed to load Ark API Keys",loadingApiKeys:"Loading API Keys…",selectApiKey:"Select an API Key",currentApiKey:"Current API Key",apiKeyList:"API Key list",searchApiKey:"Search API Keys",searchApiKeyName:"Search API Key names",noApiKeys:"No API Keys available",noMatchingApiKey:"No matching API Keys",loading:"Loading models…",loaded:"{{count}} models loaded",loadError:"Failed to load models",selectModel:"Select a model",selectProviderModel:"Select a provider model",providerModels:"Provider models",search:"Search models",searchPlaceholder:"Search by name, Model ID, or provider",noMatches:"No matching models",empty:"No models available",unknownStatus:"Unknown status",refresh:"Refresh",refreshing:"Refreshing…",activate:"Activate",activateAction:"Open activation",currentConfiguration:"Current configuration"},tools:{builtIn:"Built-in tools",builtInHelp:"Select VeADK capabilities. Imports and required environment variables are added automatically.",codeExecution:"Code execution configuration",codeExecutionHelp:"Select the AgentKit code execution sandbox.",mcp:"MCP tools"},catalog:{web_search:{label:"Web search",description:"Get real-time information with Volcengine Web Search."},parallel_web_search:{label:"Parallel web search",description:"Run multiple search queries in parallel and combine the results faster."},link_reader:{label:"Link reader",description:"Fetch and read the main content from a URL."},web_scraper:{label:"Web scraper",description:"Crawl webpages into structured data. Requires the Scraper service."},image_generate:{label:"Image generation",description:"Generate images from text with Doubao Seedream."},image_edit:{label:"Image editing",description:"Edit or transform images with Doubao SeedEdit."},video_generate:{label:"Video generation",description:"Generate videos from text or images with Doubao Seedance, including task status queries."},text_to_speech:{label:"Text to speech (TTS)",description:"Convert text to speech with Volcengine Speech."},run_code:{label:"Code execution",description:"Run code in a sandbox."},vesearch:{label:"VeSearch",description:"Search with Volcengine VeSearch. Requires a bot endpoint."},links:{console:"Console",documentation:"Documentation"},env:{modelAgentName:{comment:"Model name"},embeddingModelName:{comment:"Embedding model required by memory and knowledge bases"},vikingMemoryProject:{comment:"VikingDB memory project"},vikingMemoryRegion:{comment:"VikingDB memory region"},vikingMemoryType:{comment:"Memory types"},feishuAppId:{comment:"Feishu app ID"},feishuAppSecret:{comment:"Feishu app secret",placeholder:"Enter the app secret"},registrySpaceId:{comment:"AgentKit agent center",placeholder:"Select an agent center"},registryTopK:{comment:"Number of agents to retrieve"},registryRegion:{comment:"AgentKit agent center region"},registryEndpoint:{comment:"AgentKit agent center OpenAPI endpoint"},agentKitToolId:{comment:"Code execution sandbox ID"},agentKitToolRegion:{comment:"AgentKit Tools region"},openVikingUrl:{comment:"OpenViking service URL"},openVikingMemoryUserId:{comment:"Memory owner ID",help:"The user segment in viking://user//peers//memories. Use it to isolate agents, tenants, or business scenarios. The default is default."},openVikingMemoryPolicy:{comment:"Memory policy",help:"Controls memory extraction and isolation. Leave it blank to use the official default policy."},openVikingKnowledgeUserId:{comment:"Knowledge base owner ID",help:"Used in the default path viking://user//resources// when no resource directory is configured. The default is default."},openVikingTargetUri:{comment:"Knowledge base resource directory",help:"Leave blank to generate it from the KnowledgeBase index. When provided, this OpenViking resource directory takes precedence."},tlsServiceName:{comment:"TLS topic_id. Leave blank to create one automatically"}}},backends:{shortTerm:{local:{label:"In-memory",description:"Stored in the process without persistence. Best for development and debugging."},sqlite:{label:"SQLite file",description:"Persist data to a local .db file."},mysql:{label:"MySQL",description:"Persist data to MySQL."},postgresql:{label:"PostgreSQL",description:"Persist data to PostgreSQL."}},longTerm:{local:{label:"Local vector store",description:"In-process llama-index vector store."},opensearch:{label:"OpenSearch",description:"Vector retrieval with OpenSearch."},redis:{label:"Redis",description:"Vector retrieval with Redis."},viking:{label:"VikingDB Memory",description:"VikingDB memory with user profile support."},openviking:{label:"OpenViking Memory",description:"Long-term memory that stores and retrieves preferences, events, and entities per user."},mem0:{label:"Mem0",description:"Managed memory from Mem0."}},knowledge:{viking:{label:"VikingDB Knowledge",description:"VikingDB knowledge base."},opensearch:{label:"OpenSearch",description:"Vector retrieval with OpenSearch."},context_search:{label:"Context Search",description:"Volcengine Context Search without embedding configuration."},openviking:{label:"OpenViking Knowledge",description:"OpenViking resource-directory knowledge base without embedding configuration."}}},exporters:{apmplus:{label:"APMPlus",description:"Volcengine APMPlus application performance monitoring."},cozeloop:{label:"CozeLoop",description:"Distributed tracing with CozeLoop."},tls:{label:"TLS (Log Service)",description:"Export logs to Volcengine TLS."}},knowledge:{title:"Knowledge base",description:"Enable external knowledge retrieval (RAG) so the agent can answer from your data.",backend:"Knowledge base backend",vikingDatabase:"VikingDB knowledge base"},memory:{shortTerm:"Short-term memory",shortTermDescription:"Store context for one session",shortTermBackend:"Short-term memory backend",longTerm:"Long-term memory",longTermDescription:"Store context across sessions, usually with vector retrieval",longTermBackend:"Long-term memory backend",vikingDatabase:"VikingDB memory",autoSave:"Save sessions to long-term memory automatically",autoSaveDescription:"Write session content to long-term memory when a session ends."},mcp:{removeTool:"Remove MCP tool",namePlaceholder:"Name (optional)",urlPlaceholder:"MCP service URL",pathWarning:"This address has no path. Confirm that it is the complete MCP service URL.",configuredPlaceholder:"Authentication is stored securely",tokenPlaceholder:"Bearer token (optional)",changedUrlWarning:"The MCP address changed. Choose how to handle the stored authentication.",reuseCredential:"Keep using it",replaceCredential:"Replace authentication",noAuth:"Use no authentication",reuseHint:"The stored authentication will be reused when you publish.",changeToReplace:"Replace instead",credentialConfigured:"Studio securely stores the authentication.",removeCredential:"Remove authentication",commandPlaceholder:"Command, such as npx",argsPlaceholder:"Arguments separated by spaces",stdioHint:"The stdio tool starts in the deployment environment. Make sure its command and dependencies are available.",addTool:"Add MCP tool"},resources:{unnamedAgentCenter:"Unnamed agent center",unnamedKnowledgeBase:"Unnamed knowledge base",unnamedMemory:"Unnamed memory store",loadError:"Failed to load",loadingAgentCenters:"Loading agent centers…",agentCentersLoaded:"{{count}} agent centers loaded",noAgentCenters:"No agent centers available",noMatchingAgentCenters:"No matching agent centers",searchAgentKitCenter:"Search AgentKit agent centers",searchNameOrId:"Search by name or ID",selectAgentCenter:"Select an agent center",selectAgentKitCenter:"Select an AgentKit agent center",selectedAgentCenter:"Selected agent center",agentKitCenter:"AgentKit agent center",refreshAgentCenters:"Refresh agent centers",knowledgeBaseList:"Knowledge base list",knowledgeBasePlaceholder:"Select a knowledge base",loadingKnowledgeBases:"Loading knowledge bases…",knowledgeBasesLoaded:"{{count}} knowledge bases loaded",noKnowledgeBases:"No knowledge bases available",noMatchingKnowledgeBases:"No matching knowledge bases",searchKnowledgeBase:"Search knowledge bases",selectKnowledgeBase:"Select a knowledge base",refreshKnowledgeBases:"Refresh knowledge bases",memoryList:"Memory store list",memoryPlaceholder:"Select a memory store",loadingMemories:"Loading memory stores…",memoriesLoaded:"{{count}} memory stores loaded",noMemories:"No memory stores available",noMatchingMemories:"No matching memory stores",searchMemory:"Search memory stores",selectMemory:"Select a memory store",refreshMemories:"Refresh memory stores"},env:{noAdditionalParameters:"This backend needs no additional runtime parameters.",invalidJson:"Enter valid JSON.",helpAriaLabel:"Help for {{label}}: {{help}}",openOpenViking:"Open OpenViking {{label}}",valuePlaceholder:"Enter a value",openVikingIndex:"OpenViking resource index",openVikingIndexHelp:"Leave blank to generate an index from the agent name, such as my_agent_kb. Without DATABASE_OPENVIKING_TARGET_URI, the default URI is viking://user/{knowledge base owner ID, or default}/resources/{resource index}/. When DATABASE_OPENVIKING_TARGET_URI is set, that complete URI is used instead.",openVikingIndexAriaLabel:"OpenViking resource index help: {{help}}"},deployment:{vpcRequired:"Enter a VPC ID when using VPC networking.",apiKeyRequired:"Select the API Key used by the model.",invalidEnvName:"Invalid environment variable name: {{key}}",requiredEnv:"{{name}}: enter this required environment variable",generatingConfiguration:"Generating deployment configuration",runtimeNameExists:"This Runtime name already exists. Choose another name and try again.",preparing:"Preparing deployment",complete:"Deployment complete",failed:"Deployment failed",updateAndPublish:"Update and publish",stages:{build:"Build image",deploy:"Deploy Runtime",publish:"Publish service",running:"Deploying"}},publish:{generating:"Generating publish configuration",validating:"Validating the agent structure and preparing the deployment snapshot…"}},pse={presets:{support:{name:"Customer support assistant",description:"Answer questions around the clock using your knowledge base and conversation history, with consistent and considerate responses.",instruction:"You are a professional and patient customer support assistant. Always use a courteous, friendly tone. Base answers on the knowledge base whenever possible. When the available information is insufficient, say so clearly and ask for the details you need instead of inventing an answer. Keep responses concise and well structured, and provide steps when useful.",subagents:{}},analyst:{name:"Data analyst",description:"Run code for statistics and visualization with tracing enabled, so every analysis is observable and reproducible.",instruction:"You are a rigorous data analyst. Clarify the objective and definitions before cleaning, analyzing, and visualizing data with executable code. Explain assumptions and methods at each step, support conclusions with key evidence, and identify possible bias or limitations.",subagents:{}},translator:{name:"Translation assistant",description:"Translate between Chinese and English accurately and naturally while preserving tone and terminology.",instruction:"You are a professional translator fluent in Chinese and English. Preserve the meaning of the source while producing natural language for the target audience. Keep proper nouns and technical terminology accurate and reflect the original tone and style. Return only the translation unless the user asks for an explanation.",subagents:{}},coder:{name:"Coding assistant",description:"Write, debug, and refactor code, validate it by running tests, and produce clear, maintainable implementations.",instruction:"You are a senior software engineer. Write correct, clear, maintainable code that follows the conventions and best practices of the target language. When uncertain, run the code to validate the implementation, cover important edge cases, and add concise comments for complex logic.",subagents:{}},researcher:{name:"Researcher",description:"Search primary sources online and combine them with knowledge and long-term memory to produce evidence-backed findings.",instruction:"You are a rigorous researcher. Break each question into key subproblems, collect multiple credible primary sources through web search, and cross-check the evidence before drawing conclusions. Cite sources, state uncertainty, distinguish facts from inference, and avoid overgeneralization.",subagents:{}},"research-team":{name:"Multi-agent research team",description:"Coordinate a researcher, analyst, and writer to produce an end-to-end research report.",instruction:"You coordinate a research team. Break down the user's research task, delegate search, analysis, and writing to the appropriate subagents, synthesize their work, and deliver a clear, evidence-backed report.",subagents:{0:{name:"Researcher",description:"Collect primary sources and data related to the topic online.",instruction:"You are the team's researcher. Find multiple credible sources about the topic, organize the key facts, data, and original citations, and hand them to the analyst without adding unsupported conclusions."},1:{name:"Analyst",description:"Cross-check and synthesize the collected material.",instruction:"You are the team's analyst. Cross-check, compare, and synthesize the research material. Extract insights, identify contradictions and uncertainty, and produce a structured set of findings."},2:{name:"Writer",description:"Turn the analysis into a clear report with reliable citations.",instruction:"You are the team's writer. Turn the analyst's findings into a clear, well-written report with consistent citations, ensuring every conclusion can be traced to a source."}}}},tags:{tools:"Tools",memory:"Memory",knowledgeBase:"Knowledge base",tracing:"Tracing",subagents:"{{count}} subagents"},gallery:{title:"Create from a template",subtitle:"Choose a prebuilt agent template and customize it to fit your needs."},detail:{back:"Back to templates",name:"Name",systemPrompt:"System prompt",model:"Model",tools:"Tools",memory:"Memory",knowledgeBase:"Knowledge base",tracing:"Tracing",subagents:"Subagents ({{count}})",create:"Create from this template",shortTermMemory:"Short-term",longTermMemory:"Long-term"}},mse={common:Zre,yaml:Jre,validation:ese,defaults:tse,helpers:nse,intelligentDeployment:ise,codePackage:rse,buildCanvas:sse,intelligent:ase,projectLibrary:ose,modePicker:lse,promptEditor:cse,skills:use,workflow:dse,workbench:fse,traditional:hse,template:pse},_De=Object.freeze(Object.defineProperty({__proto__:null,buildCanvas:sse,codePackage:rse,common:Zre,default:mse,defaults:tse,helpers:nse,intelligent:ase,intelligentDeployment:ise,modePicker:lse,projectLibrary:ose,promptEditor:cse,skills:use,template:pse,traditional:hse,validation:ese,workbench:fse,workflow:dse,yaml:Jre},Symbol.toStringTag,{value:"Module"})),gse={backToList:"Back to scheduled tasks",cancel:"Cancel",cancelQueue:"Cancel queued run",cancelQueueFirst:"Cancel the queued run first",cancelling:"Cancelling…",closeDrawer:"Close panel",collapse:"Collapse",connectingRuntime:"Connecting to Runtime…",createScheduledTask:"Create scheduled task",createTask:"Create task",delete:"Delete",deleteTask:"Delete task",edit:"Edit",enable:"Enable",expand:"Expand",pause:"Pause",refresh:"Refresh",refreshHistory:"Refresh run history",rerun:"Run again",retry:"Retry",runNow:"Run now",saveChanges:"Save changes",saving:"Saving…",stop:"Stop run",stopRun:"Stop this run",stopRunFirst:"Stop the current run first",stopping:"Stopping…",viewDetails:"View details"},bse={cancelDescription:"This Session will be cancelled. Future scheduled runs will remain enabled.",cancelTitle:"Stop this run?",deleteDescription:"“{{name}}” and its complete run history will be permanently deleted.",deleteTitle:"Delete scheduled task?"},yse={configuration:"Task configuration",nextRun:"Next run",pageLabel:"Scheduled task details",region:"Region",runtime:"Runtime",status:"Task status"},vse={createTitle:"Create scheduled task",description:"Each trigger creates a separate Session for the Runtime Agent.",editTitle:"Edit scheduled task"},xse={minutesSeconds:"{{minutes}} min {{seconds}} sec",seconds:"{{count}} sec"},Ose={cronExpression:"Cron expression",cronHelp:"Enter minute, hour, day of month, month, and day of week.",dailyTime:"Daily run time",enableAfterCreate:"Enable after creation",enableHelp:"The task will run at its next scheduled time after it is enabled.",name:"Task name",namePlaceholder:"For example: Generate a daily operations summary",noRuntime:"No Runtime available",prompt:"Execution prompt",promptPlaceholder:"Enter the text to send to the Agent on every run",runAt:"Run time",runtimeAgent:"Runtime Agent",runtimeHelp:"The task always uses the Runtime's currently active version.",runtimePlaceholder:"Select a Runtime Agent",schedule:"Schedule",scheduleType:"Schedule type",timezone:"Time zone",weekday:"Day of week"},wse={all:"All"},Sse={description:"Each run uses a separate Session. Results and errors are retained.",duration:"Duration: {{duration}}",emptyDescription:"Runs will appear here after the task is triggered or run manually.",emptyTitle:"No runs yet",errorDetails:"Error details",finalAnswer:"Final answer",loadFailed:"Unable to load run history",loadFailedDescription:"Check the Studio service and try again.",session:"Session",title:"Run history"},kse={cancelRequested:"Stop request submitted.",created:"Task created.",deleted:"The task and its run history were deleted.",enabled:"Task enabled.",paused:"Task paused.",queued:"Task queued and will start within one minute.",requeued:"Task queued again and will start within one minute.",updated:"Task updated."},Ese={filterLabel:"Filter scheduled tasks by status",listLabel:"Scheduled task list",loadFailed:"Unable to load scheduled tasks",loadFailedDescription:"Check the Studio service and try again.",title:"Cronjob"},Cse={cron:"Cron {{cron}}{{zone}}",daily:"Daily at {{time}}{{zone}}",once:"Once · {{date}}{{zone}}",weekly:"{{weekday}} at {{time}}{{zone}}"},Tse={daily:"Daily",once:"Once",weekly:"Weekly"},Ase={cancelled:"Cancelled",enabled:"Enabled",failed:"Failed",notRun:"Not run yet",paused:"Paused",pending:"Preparing",queued:"Queued",retrying:"Retrying",running:"Running",skipped:"Skipped",success:"Succeeded"},_se={cronFields:"A Cron expression must contain five fields, for example 0 9 * * *.",nameRequired:"Enter a task name.",promptRequired:"Enter the text to send to the Agent on each run.",runtimeAppMissing:"The Runtime Agent did not return an appName. Confirm that the Runtime is ready and compatible.",runtimeRequired:"Select an available Runtime Agent.",timeRequired:"Select a run time."},Nse={friday:"Friday",monday:"Monday",saturday:"Saturday",sunday:"Sunday",thursday:"Thursday",tuesday:"Tuesday",wednesday:"Wednesday"},NDe={actions:gse,confirm:bse,detail:yse,drawer:vse,duration:xse,fields:Ose,filters:wse,history:Sse,notices:kse,page:Ese,schedule:Cse,scheduleTypes:Tse,status:Ase,validation:_se,weekdays:Nse},jDe=Object.freeze(Object.defineProperty({__proto__:null,actions:gse,confirm:bse,default:NDe,detail:yse,drawer:vse,duration:xse,fields:Ose,filters:wse,history:Sse,notices:kse,page:Ese,schedule:Cse,scheduleTypes:Tse,status:Ase,validation:_se,weekdays:Nse},Symbol.toStringTag,{value:"Module"})),jse="Report an issue",Rse="Description",Ise="Common issues",Pse="Cancel",Dse="Done",Mse="Submit feedback",Lse="Submitting…",$se={title:"Feedback submitted. Thank you.",description:"The AgentKit team will review your report as soon as possible."},Fse={close:"Close issue report",intro:"Select the issues you encountered and add any useful details.",privacy:"Your conversation data will be shared with the AgentKit team. Please protect sensitive information.",descriptionPlaceholder:"Describe what happened (optional)",issues:{slow:"Slow execution",crash:"Runtime crash",incorrect:"Inaccurate result",tool_error:"Tool call failed",other:"Other issue"}},Bse={description:"Tell us about a problem you encountered while using AgentKit Studio.",module:"Area",modules:{conversation:"Conversation",agents:"Agents",applications:"Automations",search:"Search",other:"Other"},commonIssuesMultiple:"Common issues (select all that apply)",issueTypes:"Issue types",issues:{page_slow:"Page loads slowly",feature_unavailable:"Feature unavailable",display_error:"Display issue",no_response:"Action has no response",other:"Other issue"},descriptionPlaceholder:"Describe the page, action, and what happened",quickAdd:"Quick add",suggestionsLabel:"Suggested descriptions",suggestions:{noResponse:"Nothing happens after I click",loading:"The page remains in a loading state",incomplete:"Some content is missing or clipped",error:"An error appears after the action"},privacy:"Your data will be shared with the AgentKit team. Please protect sensitive information."},RDe={title:jse,descriptionLabel:Rse,commonIssues:Ise,cancel:Pse,done:Dse,submit:Mse,submitting:Lse,success:$se,dialog:Fse,page:Bse},IDe=Object.freeze(Object.defineProperty({__proto__:null,cancel:Pse,commonIssues:Ise,default:RDe,descriptionLabel:Rse,dialog:Fse,done:Dse,page:Bse,submit:Mse,submitting:Lse,success:$se,title:jse},Symbol.toStringTag,{value:"Module"})),Use={back:"Back",close:"Close"},Qse={title:"Optimize migrated project",closeAria:"Close optimization dialog"},zse={title:"Migrated projects",description:"Manage migrated source versions or continue optimizing any version.",libraryTitle:"Projects and versions",libraryDescription:"View, download, deploy, or compare source versions, or continue optimizing any version.",emptyTitle:"No migrated projects yet",emptyDescription:"Migrated source code will be saved here automatically."},Vse={langchain:"LangChain",langgraph:"LangGraph",adk:"Google ADK",strands:"Strands",agentcore:"AgentCore",dify:"Dify",any:"Any (universal migration)"},Hse={awaitingUpload:"Awaiting upload",analyzing:"Analyzing",needsInput:"Needs input",analysisReady:"Awaiting confirmation",migrating:"Migrating",validating:"Validating",packaging:"Packaging",succeeded:"Completed",succeededWithWarnings:"Completed with notices",partial:"Partially completed",failed:"Failed",cancelled:"Stopped",expired:"Expired"},qse={partialReady:"Migration output is ready, but delivery is incomplete. Review the migration notices.",readyWithWarnings:"Migration output is ready. Review the migration notices.",ready:"Migration output is ready."},Wse={passed:"Output verification passed",failed:"Output verification failed",degraded:"Output verification incomplete"},Kse={session:"Create migration environment",upload:"Upload project",analysis:"Analyze project"},Gse={agentNameRequired:"Enter an Agent name",agentNameInvalid:"Agent names must be 1–63 characters, contain only lowercase letters, numbers, and hyphens, and start and end with a letter or number"},Xse={seconds:"{{seconds}} sec",minutesSeconds:"{{minutes}} min {{seconds}} sec"},Yse={savedUnaffected:"Saved projects are unaffected",savingUnaffected:"Source is being saved and will be unaffected once complete",activeDetail:"Task history and temporary output will become unavailable after expiration",oneHour:"Temporary migration environment is retained for 1 hour",ended:"Temporary migration environment has ended",savedAvailable:"Saved projects remain available to view, download, deploy, or optimize",unavailable:"Task history and temporary output are no longer available",countdown:"Temporary migration environment ends in {{minutes}} min {{seconds}} sec",expiredSavedMessage:"The temporary migration environment has ended. Saved projects are unaffected.",expiredMessage:"The temporary migration environment has ended. Task history and temporary output are no longer available."},Zse={recommended:"Recommended migration method",scope:"Migration scope",excluded:"Out of scope",viewEvidence:"View analysis evidence",viewAssumptions:"View key assumptions",viewSourceEvidence:"View source evidence"},Jse={ariaLabel:"Codex activity",title:"Codex activity",startingAnalysis:"Codex is starting the analysis…",startingMigration:"Codex is starting the migration…",loadError:"Codex activity is temporarily unavailable. The current task is unaffected."},eae={title:"Migration output",fileTooLarge:"This file exceeds 2 MiB. Download the complete output to view it.",unsupportedPreview:"This file cannot be previewed here. Download the complete output to view it.",filesAria:"Migration output files",searchAria:"Search output files",searchPlaceholder:"Search files",limit:"Showing the first {{count}} items. Search for a specific file.",noSelection:"No file selected",noPreview:"No files available to preview.",loadingFile:"Loading output file…",startupFile:"Startup file",fileCountLabel:"Files",saved:"Source has been saved. You can view, download, deploy, or optimize it.",saving:"Output is ready and the source version is being saved.",deployReady:"Output is available to preview, download, and deploy. Waiting for source save status.",deployUnavailable:"Output is available to preview and download, but its current delivery status does not support deployment.",viewProjects:"View migrated projects",downloading:"Downloading…",downloadZip:"Download ZIP",deployTitle:"Deploy migration output",deployUnavailableTitle:"Current delivery status does not support deployment",deployRuntime:"Deploy to Runtime",fileCount:"{{count}} files",startup:"Startup file {{module}}",loading:"Loading migration output…"},tae={retiring:"Retiring soon",currentDefault:"Current default model",loadError:"Failed to load models",label:"Model",placeholder:"Select a model"},nae={zipOnly:"Select a local project in .zip format.",invalidName:"The ZIP file name is invalid. Rename the file and select it again.",tooLarge:"The project ZIP cannot exceed {{size}}.",empty:"The project ZIP cannot be empty.",removeAria:"Remove project ZIP",reselectPrompt:"Select the project ZIP again",selectPrompt:"Select or drop a local project ZIP",reselect:"Select again",selectZip:"Select ZIP",continue:"Continue upload",start:"Start migration",inputAria:"Select a local project ZIP",retention:"The temporary migration environment is retained for 1 hour after creation. Successfully saved source versions are unaffected."},iae={requiredPlaceholder:"Enter {{key}}",optionalPlaceholder:"Optional: {{key}}",notReady:"Migration output is not ready yet.",back:"Back to migration results"},rae={backToAddAgent:"Back to Add Agent",title:"Migrate existing project",newMigration:"New migration",recent:"Recent migrations",sessionsAria:"Migration sessions",loadingSessions:"Loading migration sessions…",noSessions:"No migration sessions",heading:"Migrate an existing Agent project",intro:"Upload a local project ZIP. Codex will first perform a read-only analysis, then ask you to confirm the migration method."},sae={stop:"Stop migration",stopping:"Stopping…",reload:"Reload",refreshStatus:"Refresh status"},aae={unavailable:"Migration is currently unavailable",defaultReason:"Dev Sandbox is currently unavailable. Contact your administrator to check the configuration."},oae={requestZip:"Provide a local project ZIP. After upload, I’ll identify the framework, entry point, and migration boundaries, then ask you to confirm the migration method before making changes.",zipHint:"Only local ZIP files are supported, up to {{size}}. The migration environment is retained for 1 hour after creation.",creatingSandbox:"Creating Dev Sandbox",initializing:"Initializing the migration workspace and checking AgentKit CLI, Codex, and migration capabilities. The project will upload automatically when the environment is ready.",elapsed:"Elapsed: {{duration}}",uploadThenAnalyze:"Read-only analysis will start automatically after the ZIP upload completes.",analyzing:"Codex is identifying the framework, entry point, and migration boundaries. No migration changes are being made.",migrationLocked:"Attachments and migration settings cannot be changed while migration is running. Wait for the task to finish or stop it.",analysisPaused:"Read-only analysis is paused. Answer only the questions below. After submission, analysis will continue in the same environment without starting the migration.",analysisComplete:"Read-only analysis is complete. Review the recommendation and confirm the final migration method.",awaitingUpload:"The migration environment is ready. Select the local ZIP again to continue uploading.",expiredTitle:"Migration environment expired",expiredDescription:"Migration content and output can no longer be previewed, downloaded, or deployed. If the Runtime deployment completed, return to the Agents page to continue using it.",unsupportedTitle:"This ZIP cannot be migrated yet",unsupportedHint:"Update the project as instructed, then create a new migration and upload it again.",failedTitle:"Migration incomplete",cancelled:"This migration was stopped. Create a new migration and upload the project again."},lae={ariaLabel:"Provide project analysis details",title:"Additional information needed for analysis",description:"The attachment stays locked; submitting continues read-only analysis only",submitting:"Continuing analysis…",submit:"Submit and continue analysis"},cae={ariaLabel:"Confirm migration method",title:"Confirm migration method",description:"Migration starts only after confirmation",framework:"Migration method",frameworkPlaceholder:"Select a migration method",agentName:"Agent name",entry:"Project entry point",entryPlaceholder:"Select a project entry point",entryExample:"For example, agent.py:agent",consent:"By selecting “Confirm and start migration,” you confirm the migration scope, exclusions, and key assumptions above.",starting:"Starting migration…",start:"Confirm and start migration"},uae={closeAria:"Dismiss error",loadFailed:"Could not load migration data. Try again.",refreshFailed:"Could not refresh the migration status. Try again."},dae={title:"Stop the current migration?",description:"Stopping ends the current analysis or migration process. Completed steps will not continue."},PDe={common:Use,optimization:Qse,projects:zse,framework:Vse,state:Hse,task:qse,verification:Wse,transfer:Kse,validation:Gse,duration:Xse,expiry:Yse,analysis:Zse,activity:Jse,artifact:eae,model:tae,upload:nae,deployment:iae,workspace:rae,actions:sae,capability:aae,conversation:oae,questions:lae,confirmation:cae,errors:uae,stopDialog:dae},DDe=Object.freeze(Object.defineProperty({__proto__:null,actions:sae,activity:Jse,analysis:Zse,artifact:eae,capability:aae,common:Use,confirmation:cae,conversation:oae,default:PDe,deployment:iae,duration:Xse,errors:uae,expiry:Yse,framework:Vse,model:tae,optimization:Qse,projects:zse,questions:lae,state:Hse,stopDialog:dae,task:qse,transfer:Kse,upload:nae,validation:Gse,verification:Wse,workspace:rae},Symbol.toStringTag,{value:"Module"})),fae={loading:"Loading…",searchLabel:"Search {{label}}",searchPlaceholder:"Search {{label}}",retry:"Retry",noMatches:"No matches",noOptions:"No options available",selection:"{{label}}: {{value}}"},hae={badge:"All new",view:"See what's new",title:"What's new",defaultNotes:{multiRegion:"Multi-region agents: load Beijing and Shanghai Runtimes in parallel, with more available as you scroll.",switchAgent:"Switch in conversation: choose an agent beside the composer and start a new conversation immediately.",visualCanvas:"Visual execution canvas: inspect multi-agent structures on a horizontal canvas with fullscreen support."}},pae={label:"New conversation workspace",agent:"Agent",skill:"Skill customization",video:"Video creation"},mae={select:"Select conversation mode",agent:{label:"Agent",description:"Chat with the selected Agent"},builtin:{label:"Built-in Agent",description:"Use an Agent provided by the platform"},codex:{label:"Codex Agent",description:"Run tasks in a sandbox"},deepseekHarness:{label:"DeepSeek Harness",description:"Open the DeepSeek Harness workspace"},arkClaw:"ArkClaw",hermes:"Hermes Agent",checking:"Checking configuration",notConfigured:"Not configured by an administrator",unavailable:"Unavailable"},gae={select:"Select Agent",typesLabel:"Agent types",listLabel:"{{type}} list",types:{agent:"Agent",general:"General Agent",codex:"Codex Agent",deepseekHarness:"DeepSeek Harness",openclaw:"OpenClaw Agent",hermes:"Hermes Agent"},loading:"Loading Agents",reload:"Reload",empty:"No {{type}} yet",emptyLocal:"No local Agents yet",emptyGeneral:"No General Agents yet",createHint:"Create one from the Agents page",localHint:"Check the directory where Studio was started",waking:"Waking up",opening:"Opening",connecting:"Connecting",loadingMore:"Loading",loadMore:"Load more",runtimeTimeout:"Loading Agents timed out after 15 seconds. Check the network or Runtime service and retry.",loadGeneral:"Load General Agents",loadType:"Load {{type}}",connectGeneral:"Connect to General Agent",openLocal:"Open local Agent",openType:"Open {{type}}"},bae={spaceAria:"Skill spaces",configuration:"Skill customization settings",actions:{create:"Generate Skill",optimize:"Optimize Skill"},selectAction:"Select a Skill customization action",actionList:"Skill customization actions",style:"Style",selectStyle:"Select style",model:"Model",selectModel:"Select model",styles:{concise:"Concise and practical",strict:"Rigorous and reliable",tutorial:"Tutorial-friendly",automation:"Automation-first"},modelLoadFailed:"Failed to load model configuration",spaceLoadFailed:"Failed to load Skill Spaces",skillLoadFailed:"Failed to load Skills",unnamedSpace:"Unnamed Skill Space",space:"Skill Space",select:"Select Skill",selectAria:"Select Skill: {{skill}}",loadingSpaces:"Loading Skill Spaces",reload:"Reload",emptySpaces:"No Skill Spaces yet",skillList:"{{space}} Skill list",loadingSkills:"Loading Skills",emptySkills:"No Skills yet"},yae={modes:{auto:"Auto detect",text_to_video:"Text to video",reference_to_video:"Reference to video",video_editing:"Video editing",video_extension:"Video extension",first_last_frame:"First and last frames"},taskNames:{auto:"Video generation",text_to_video:"Text-to-video",reference_to_video:"Reference-to-video",video_editing:"Video editing",video_extension:"Video extension",first_last_frame:"First-and-last-frame generation"},controls:{label:"Video creation settings",aspectRatio:"Aspect ratio",selectAspectRatio:"Select aspect ratio",resolution:"Resolution",selectResolution:"Select resolution",duration:"Duration",durationShort:"{{count}}s",durationAria:"Video duration: {{count}} seconds",lastFrame:"Last frame",lastFrameHelper:"Add the video's ending frame",assistImage:"Supporting image",referenceImage:"Reference image",assistImageHelper:"Add visual guidance",imageHelper:"Supports common image formats",referenceVideo:"Reference video",videoHelper:"Supports common video formats",optional:"Optional",replace:"Replace",add:"Add",upload:"Upload {{label}}",replaceFile:"Replace {{label}}: {{name}}",removeFile:"Remove {{label}} {{name}}",storageUnavailable:"Persistent storage is not configured",loadingEnhancer:"Loading prompt enhancement model",enhancerHint:"Uses {{model}} for intent recognition and prompt enhancement",enhancerUnavailable:"Prompt enhancement model unavailable"},task:{title:"Video generation task",closeAria:"Close video generation task dialog",progressAria:"Video generation progress",optimizedPrompt:"Optimized prompt",processingAria:"{{task}} progress",waitingAria:"{{status}}, elapsed {{elapsed}}",elapsed:"Elapsed {{elapsed}}",previewAria:"Generated video preview",close:"Close",download:"Download video",retryOptimization:"Retry prompt optimization",retryGeneration:"Retry video generation",providerQueued:"Waiting for model scheduling",providerRunning:"Model generating",providerSubmitting:"Submitting task",queuedHint:"The task was submitted. Its status will update automatically when processing begins.",runningHint:"This may take several minutes. The video preview will appear here when complete.",backgroundHint:"You can close this dialog. The task will continue in the background.",successHint:"Your video is ready to preview or download.",activationHint:"Activate the service in the model console, then retry generation.",retryHint:"Fix the issue and retry the current step.",steps:{optimizationFailed:"Prompt optimization failed",optimizationDone:"Prompt optimization complete",optimizationActive:"Optimizing prompt",generationDone:"{{task}} complete",generationFailed:"{{task}} failed",generationQueued:"{{task}} queued",generationRunning:"Generating {{task}}",generationActive:"{{task}} in progress",generationPending:"Waiting for video generation",generationComplete:"Video generation complete"},elapsedHours:"{{hours}}h {{minutes}}m",elapsedMinutes:"{{minutes}}m {{seconds}}s",elapsedSeconds:"{{seconds}}s"}},vae={compactSelect:fae,featureNotice:hae,workspace:pae,mode:mae,agentPicker:gae,skill:bae,video:yae},MDe=Object.freeze(Object.defineProperty({__proto__:null,agentPicker:gae,compactSelect:fae,default:vae,featureNotice:hae,mode:mae,skill:bae,video:yae,workspace:pae},Symbol.toStringTag,{value:"Module"})),xae={cancel:"Cancel",close:"Close",retry:"Retry",tryAgain:"Try again",closeDialog:"Close {{title}}",agentFallback:"{{agent}} Agent",unknownSource:"Unknown source"},Oae={terminalTitle:"Terminal",browserTitle:"Sandbox browser",terminalSubtitle:"Connect to the interactive terminal for the current AgentKit Session",browserSubtitle:"View and control the browser in the current AgentKit Session",connecting:"Connecting…",connected:"Connected",notConnected:"Not connected",opening:"Opening {{title}}",connectingSession:"Connecting the tool to the current AgentKit Session.",openFailed:"Failed to open {{title}}"},wae={title:"Resume Codex conversation",subtitle:"Select a recently updated Thread from the current Sandbox Session",loading:"Loading conversation history",loadFailed:"Failed to load conversation history",empty:"No conversations to resume"},Sae={title:"Codex permissions",subtitle:"Settings are saved to the current Sandbox Session and applied to all of its Threads",sandboxMode:"Sandbox mode",approvalPolicy:"Approval policy",approvalMethod:"Approval method",networkAccess:"Allow network access",networkAccessHelp:"Control external network access in workspace-write and read-only modes.",fullAccessWarning:"Full access disables file system and network isolation. Use it only for trusted tasks.",save:"Save permissions",sandboxChoices:{readOnly:{label:"Read only",detail:"Allow reading files without writing to the workspace."},workspaceWrite:{label:"Workspace write",detail:"Allow reading and modifying files in the current workspace."},fullAccess:{label:"Full access",detail:"Disable sandbox isolation for explicitly trusted tasks."}},approvalChoices:{untrusted:{label:"Untrusted commands only",detail:"Request approval only for operations Codex considers untrusted."},onRequest:{label:"On request",detail:"Allow Codex to ask you to approve commands or file changes when needed."},never:{label:"Never ask",detail:"Codex will not pause to request manual approval."}},reviewerChoices:{user:{label:"Ask me",detail:"Approval requests appear in Studio for you to decide."},autoReview:{label:"Automatic review",detail:"Use the Codex automatic review flow to handle approval requests."}}},kae={title:"Workspace",subtitle:"Choose the directory where the current Codex Thread runs commands and modifies files",absolutePath:"Absolute path",browse:"Browse",parent:"Parent directory",empty:"This directory has no subdirectories",locked:"The conversation has started and the workspace is locked. Start a new Sandbox Session to choose another workspace.",useDirectory:"Use this directory"},Eae={fileTitle:"Allow file changes?",commandTitle:"Allow command execution?",subtitle:"Codex is waiting for your decision",workingDirectory:"Working directory",decline:"Decline",acceptOnce:"Allow once",acceptSession:"Allow for session"},Cae={availableSkills:"Available Skills",selectModel:"Select model",commands:"Codex shortcuts",currentModel:"Current: {{model}}",loadingSkills:"Discovering Skills in the current workspace…",loadingModels:"Loading models…",noSkillMatches:"No matching Skills in the current workspace",noModelMatches:"No matching models. You can also enter a model ID directly",noCommandMatches:"No matching shortcuts",skillFallback:"Load and run this Skill",add:"Add",uploadImage:"Upload image",uploadDocument:"Upload document or PDF",uploadVideo:"Upload video",openTerminal:"Open terminal",viewBrowser:"View browser",permissions:"Codex permissions",workspaceLocked:"The conversation has started and the workspace is locked",selectWorkspace:"Select workspace",workspace:"Codex workspace",endpointCopied:"Endpoint copied",copyEndpoint:"Copy Sandbox Endpoint",continuePlaceholder:"Describe what you want to implement or adjust next",messagePlaceholder:"Message the AgentKit Sandbox. Type / for commands or $ to invoke a Skill…",stop:"Stop generating",send:"Send"},Tae={defaultName:"My Agent",namedDefault:"My {{agent}}",creatingTitle:"Creating {{agent}} Agent",failedTitle:"Launch failed",createTitle:"Create {{agent}} Agent",fallbackError:"AgentKit Sandbox initialization failed. Please try again later.",creatingDescription:"Creating the {{agent}} Agent and waiting for it to become ready. This usually takes about 30 seconds.",name:"Agent name",storageSize:"Storage size",storageHelp:"Data will be persisted. Choose {{min}}–{{max}} GiB.",persistent:"Persistent",persistenceUnsupported:"Snapshot persistence is not supported in the current environment",persistentHelp:"Keep Agent data so you can continue later.",temporaryHelp:"Agent data will be cleared after 8 hours",cancelCreation:"Cancel creation",confirm:"Create",retry:"Try again"},Aae={activeAria:"Codex Agent session is active",openAria:"Open a Codex Agent session",active:"Codex Agent session",entry:"Spark an idea",exit:"Exit current Agent",expired:"Expired",remainingHours:"{{hours}}h {{minutes}}m remaining",remainingMinutes:"{{minutes}}m remaining",expiryWarning:"The remote development environment is kept for up to 8 hours and expires at {{expiry}} ({{remaining}}). Conversations and files will then be deleted.",usingAgent:"You are currently using the {{agent}} Agent",activityAria:"Sandbox activity log",activity:"Activity log",tokenUsageAria:"Codex token usage",tokens:"{{label}}: {{value}} tokens",tokenLabels:{total:"Total",input:"Input",cachedInput:"Cached input",output:"Output",reasoningOutput:"Reasoning output"}},_ae={back:"Back to Agents",subtitle:"{{agent}} AgentKit Session details",type:"Agent type",status:"Status",createdBy:"Created by",snapshotStatus:"Snapshot status",toolType:"Tool type",createdAt:"Created at",snapshotReason:"Snapshot reason",expiresAt:"Expires at",snapshotId:"Snapshot ID",sessionId:"Session ID",sourceSessionId:"Source Session ID",delete:"Delete Agent",waking:"Waking…",opening:"Opening…",wake:"Wake Agent",open:"Open Agent",deleteTitle:"Delete Agent?",deleteDescription:"This will delete “{{name}}” and its AgentKit {{resource}}. This action cannot be undone.",deleting:"Deleting…",confirmDelete:"Delete"},Nae={back:"Back to Agents",createdBy:"Created by {{creator}}",ariaLabel:"Agent workspace",main:"Main",terminal:"Terminal",mainTitle:"{{agent}} main interface",openingTerminal:"Opening terminal…",terminalTitle:"{{agent}} terminal"},jae={prompt:`Use the AgentKit Studio Plugin to hand off the current conversation, project, and task to the cloud. Execute this directly; do not ask me to open a terminal manually. +- Maintain a polite, professional tone.`},tse={requestFailed:"Request failed ({{status}}){{detail}}",a2aSpaces:{credentialsMissing:"The server does not have cloud provider credentials configured, so AgentKit agent centers are unavailable",loginRequired:"Sign in to access AgentKit agent centers"},vikingKnowledge:{credentialsMissing:"The server does not have cloud provider credentials configured, so VikingDB knowledge bases are unavailable",loginRequired:"Sign in to access VikingDB knowledge bases"},vikingMemory:{credentialsMissing:"The server does not have cloud provider credentials configured, so VikingDB memory stores are unavailable",loginRequired:"Sign in to access VikingDB memory stores"},mcpGateway:{missingHttpTool:"Go back to Add MCP tool and add at least one HTTP MCP service. MCP resilience does not support stdio services.",missingUrl:"An HTTP MCP tool is missing a valid service URL. Go back to Add MCP tool and complete it before publishing."},customModel:{fallbackName:"Custom model",apiKeyLabel:"{{name}} model API Key"},deploymentEnv:{serverInjected:"Provided by the server",selectedApiKeyPlaceholder:"Provided by the selected API Key",mcpInjectedComment:"Provided by the added MCP tools",restoredPlaceholder:"Securely restored by the Studio server",generatedMcpPlaceholder:"Generated from the added HTTP MCP tools",restoredHelp:"When updating, the Studio server merges MCP addresses and authentication without returning existing secrets to the browser.",mergedMcpHelp:"The Studio server merges MCP addresses and optional authentication without returning existing secrets to the browser.",listSeparator:", ",requirementHint:"Required by the following optimizations: {{labels}}.",requiredBy:"Required by the following optimizations: {{labels}}. Enter {{key}}.",required:"Enter {{label}} ({{key}}).",invalidJson:"Invalid JSON format"},drafts:{unsupportedVersion:"This local draft version is not supported. Upgrade Studio and try again.",invalidFormat:"The local draft data is invalid.",readFailed:"Could not read local drafts. The browser data may be corrupted.",quotaExceeded:"Browser storage is full, so the draft was not saved. Delete unused drafts or clear this site's storage, then try again.",writeRejected:"The browser blocked saving this draft. Check the site's storage permissions and try again."},skills:{searchFailed:"Search failed ({{status}})",downloadFailed:"Skill download failed ({{status}})",agentKitRequestFailed:"AgentKit Skills request failed",missingManifest:"{{location}} is missing SKILL.md",invalidParentPath:"{{location}} contains an invalid parent path (..): {{path}}",invalidPath:"{{location}} contains an invalid path: {{path}}",localDescription:"Local skill",folderSource:"Folder",noManifest:"No SKILL.md was found in {{location}}"},zip:{invalid:"Invalid zip: EOCD was not found",tooManyFiles:"A zip file cannot contain more than {{count}} files",tooLarge:"The extracted zip content is too large"}},nse={back:"Back to development session",runtimeName:"Runtime name",runtimeNameExists:"This Runtime name already exists. Choose another name.",checkingRuntimeName:"Checking Runtime name",verifiedSource:"Verified source",deployableSource:"Deployable source",verifiedByCodex:"Verified by Codex in the cloud",entryPoint:"Entry point",files:"Files",artifact:"Artifact",validationReport:"Validation report",verifiedHint:"The server materializes source from the verified artifact. Browser files cannot replace it.",unverifiedHint:"The server securely materialized the source. Confirm the Runtime configuration before deploying.",env:{requiredPlaceholder:"Enter {{key}}",optionalPlaceholder:"Optional: {{key}}"}},ise={name:"Code package",back:"Back to creation methods",reading:"Reading the code package",readingEllipsis:"Reading the code package…",uploadFirst:"Upload a code package first",uploadAriaLabel:"Code package upload",upload:"Upload code package",reupload:"Upload a different code package",uploadPrompt:"Upload a code package",filesRecognized:"{{count}} files found. Select this area to upload a different package.",dropHint:"Select or drop a .zip file up to 50 MB. Use app.py or declare an entry point in agentkit.yaml.",viewFiles:"View files",chooseFile:"Choose code package",errors:{invalidFormat:"Choose a .zip code package.",tooLarge:"The code package must be 50 MB or smaller.",invalidPath:"The archive contains an invalid path: {{name}}",empty:"The archive does not contain any deployable files.",tooManyFiles:"A code package cannot contain more than {{count}} files.",duplicateFile:"The code package contains a duplicate file: {{path}}",manifestParse:"Could not parse agentkit.yaml: {{detail}}",manifestRoot:"The root of agentkit.yaml must be an object.",manifestCommon:"common in agentkit.yaml must be an object.",entryPointType:"common.entry_point in agentkit.yaml must be a file path.",entryPointInvalid:"common.entry_point in agentkit.yaml is not a valid file path.",entryPointMissing:"The entry point declared in agentkit.yaml is missing from the code package: {{entryPoint}}",defaultEntryPointMissing:"The code package root must contain app.py, or common.entry_point in agentkit.yaml must declare an existing entry point."}},rse={label:"Agent execution canvas",readOnlyLabel:"Read-only agent execution canvas",minimapLabel:"Execution flow minimap",controls:{ariaLabel:"Execution flow controls",zoomIn:"Zoom in",zoomOut:"Zoom out",fitView:"Fit view"},rootAgent:"Main agent",unnamedStep:"Unnamed step",terminals:{input:"User request",output:"Final response"},edges:{then:"Then",continueLoop:"Continue loop",call:"Call"},patterns:{llm:{label:"Agent",description:"Understand a task and complete one specific job"},sequential:{label:"Sequential",description:"Run internal steps one after another"},parallel:{label:"Parallel",description:"Run internal steps together, then combine their results"},loop:{label:"Loop",description:"Repeat internal steps until the stop condition is met"},a2a:{label:"Remote agent",description:"Call an existing remote agent"}},actions:{insertHere:"Insert a step here",deleteNamed:"Delete {{name}}",deleteNode:"Delete node",addSubagent:"Add subagent",addParallelStep:"Add a parallel step",addLoopStep:"Add a loop step",addNextStep:"Add next step",addFirst:"Add at the beginning",addLast:"Add at the end"}},sse={title:"Intelligent mode",subtitle:"Describe your goal and Codex will plan, build, debug, and temporarily validate the agent in a sandbox.",model:{label:"Model",placeholder:"Select a model",retiring:"Retiring soon",currentConfiguration:"Current configuration",loadError:"Failed to load models"},availability:{checking:"Checking intelligent development availability…",unavailable:"Intelligent mode is currently unavailable. Go back and try again."},goal:{title:"Start with a goal",continueTitle:"Continue improving the project",hint:"Describe the problem your agent should solve. We will ask about any details that could affect the result.",continueHint:"Describe what you want to change. The result will be saved as a new version.",basedOn:"Based on",clearSelection:"Clear selection",label:"Goal",optimizationLabel:"Optimization goal",placeholder:"For example: Build an agent that reads sales data, creates weekly reports, and validates the output format",optimizationPlaceholder:"For example: Cite data sources and ask the user when information is incomplete"},actions:{preparing:"Preparing…",build:"Start building",optimize:"Start optimizing"},preparation:{accepted:"Goal received. Implementation is starting now.",preparing:"Creating the task environment…",starting:"Environment ready. Starting Codex…",next:"Next, Codex will plan the approach, then build, run, and validate the agent."}},ase={title:"Saved projects",description:"Continue improving an existing version, or view, download, and deploy its source.",refresh:"Refresh projects",checkingStorage:"Checking project storage…",unavailableTitle:"Projects are temporarily unavailable",storageCheckError:"Could not confirm project storage status. Try again shortly.",storageNotConfigured:"Project storage is not configured.",loadingMigrated:"Loading migrated projects…",loadingSaved:"Loading saved projects…",loadingVersions:"Loading project versions…",unknownTime:"Unknown time",sourceDownloaded:"Source downloaded.",projectSummary_one:"{{count}} version · Updated {{time}}",projectSummary_other:"{{count}} versions · Updated {{time}}",versionSummary_one:"{{time}} · {{count}} file",versionSummary_other:"{{time}} · {{count}} files",noVersionDescription:"No version description",latestVersion:"Latest version",verified:"Verified",pendingVerification:"Needs review",viewSource:"View source",download:"Download",downloading:"Downloading…",optimize:"Optimize",optimizeUnavailable:"Optimize, not supported",errors:{projects:"Could not load saved projects.",source:"Could not load project source.",versions:"Could not load project versions.",download:"Could not download the source.",prepareDeployment:"Could not prepare the source for deployment.",deleteVersion:"Could not delete the project version.",migrated:"Could not load migrated projects",saved:"Could not load saved projects"},empty:{migratedTitle:"No migrated projects yet",savedTitle:"No saved projects yet",migratedDescription:"Source will be saved here after your first migration.",savedDescription:"Source will be saved here after your first build.",noVersions:"This project has no available versions."},compare:{selected:"{{count}}/2 selected",selectedLabel:"Selected",select:"Select",view:"View comparison",start:"Compare versions"},delete:{title:"Delete this version?",onlyVersion:"“{{name}}” has only one version. Deleting it will also remove the project. This cannot be undone.",description:"This version's source and validation records will be permanently deleted. Other versions are not affected.",confirm:"Delete version"}},ose={title:"Choose how to create",subtitle:"Build your agent with the workflow that fits your needs",features:"Features",quick:{title:"Quick mode",description:"Delegate tasks to dynamically created subagents",features:{dynamicSubagents:"Dynamic subagents",autonomousPlanning:"Autonomous planning",collaboration:"Multi-agent collaboration",summary:"Automatic result summaries",skills:"Skills on demand",trace:"Traceable task execution"}},traditional:{title:"Advanced mode",description:"Customize your agent structure in detail",features:{visualConfig:"Visual configuration",migration:"Existing agent migration",debugging:"Live debugging",optimization:"Optional optimization",parameters:"Fine-grained controls"}}},lse={placeholder:"Enter a system prompt. Type ## followed by a space to add a level-two heading…",toolbar:{undo:"Undo {{shortcut}}",redo:"Redo {{shortcut}}",paragraph:"Paragraph",quote:"Quote",heading:"Heading {{level}}",selectBlockType:"Select text style",blockType:"Text style",bold:"Bold",removeBold:"Remove bold",italic:"Italic",removeItalic:"Remove italic",bulletedList:"Bulleted list",numberedList:"Numbered list"}},cse={local:{duplicatesSkipped:"Skipped duplicate skills: {{names}}",invalidDrop:"Drop a folder containing SKILL.md or a .zip file",readError:"Could not read the files: {{detail}}",dropLabel:"Drop a folder or ZIP file to detect skills automatically",hint:"Each skill must contain a SKILL.md file. Directories can contain multiple skills.",reading:"Reading files…",fileCount:"Local · {{count}} files"},hub:{searchError:"Search failed. Try again shortly.",searchPlaceholder:"Search Volcano Find Skill, such as data analysis or PDF",search:"Search",searching:"Searching…",noResults:"No matching skills found. Try another keyword.",hint:"Search Volcano Find Skill by keyword. Selected skills are downloaded to the skills/ directory when the project is generated."},space:{loadError:"Failed to load",loadingSpaces:"Loading AgentKit Skills centers…",noSpaces:"This account has no AgentKit Skills centers.",selectSpace:"Select an AgentKit Skills center",openConsole:"Open in the Volcano Engine console",loadingSkills:"Loading skills…",noSkills:"This AgentKit Skills center has no skills."}},use={unnamedNode:"Unnamed node",editInstruction:"Select to edit instructions…",controls:{ariaLabel:"Workflow canvas controls",zoomIn:"Zoom in",zoomOut:"Zoom out",fitView:"Fit view"},sections:{info:"Workflow information",execution:"Execution mode",nodes:"Nodes",nodeConfig:"Node configuration"},types:{sequential:{label:"Sequential",description:"Run nodes one after another"},parallel:{label:"Parallel",description:"Run nodes at the same time"},loop:{label:"Loop",description:"Run nodes repeatedly"}},placeholders:{description:"Describe what this workflow does…",agentDescription:"Describe what this agent does…",instruction:"You are…"},errors:{workflowNameUnique:"The workflow name must be unique among agent node names",agentNameUnique:"Agent names must be unique within this workflow"},dragHint:"Drag onto the canvas, or use the button below",agentNode:"Agent node",addNode:"Add node",connectHint:"Drag between node handles to define the execution order.",create:"Create workflow",deleteNode:"Delete node",nameHelp:"Use only letters, numbers, and underscores. Names must be unique.",instruction:"Instructions",tools:"Tools (comma-separated)",nodeId:"Node ID",empty:{selectNode:"Select a node to edit its configuration",summary:"{{nodes}} nodes · {{edges}} connections"}},dse={ariaLabel:"Quick mode creation",progress:"Quick mode creation progress",steps:{agent:{label:"Agent",title:"Basic information",description:"Set the agent's name, purpose, behavior, and capabilities"},environment:{label:"Environment",title:"Configure the environment",description:"Choose the default environment or a custom environment you have built"},deployment:{label:"Deployment",title:"Deployment preferences",description:"Configure AgentKit cloud settings"}},model:{label:"Model",source:"Model source",name:"Model name",provider:"Provider",volcengineArk:"Volcano Ark",custom:"Custom",gateway:"Model gateway",comingSoon:"Coming soon",currentApiKey:"Current API Key",loadingApiKeys:"Loading API Keys",selectApiKey:"Select an API Key",searchApiKeys:"Search API Key names",noApiKeys:"No API Keys available",loadingModels:"Loading models",selectModel:"Select a model",searchModels:"Search by name, Model ID, or provider",noModels:"No models available",apiKeyPlaceholder:"Enter a model API Key",credentialsLoadError:"Failed to load model credentials",modelsLoadError:"Failed to load models"},identity:{unnamedPool:"Unnamed user pool",currentPool:"{{value}} (current user pool)",userPool:"User pool",loading:"Loading user pools",placeholder:"Select a user pool",search:"Search user pools",empty:"This account has no Identity user pools",currentHint:"This Studio's login JWT will be forwarded to the Runtime",mismatchHint:"The selected user pool is not used by this Studio, so the Studio will not be able to call the Runtime after deployment",selectionHint:"The user pool used by this Studio is marked in the list"},agent:{namePlaceholder:"Enter an agent name",descriptionPlaceholder:"Describe what this agent can do",prompt:"Prompt",promptPlaceholder:"Define the role, goals, and behavior boundaries",skills:"Skills",addSkill:"Add skills"},validation:{descriptionRequired:"Enter a description",promptRequired:"Enter a prompt",modelRequired:"Select a model",instanceIntegers:"Minimum instances must be an integer of 0 or greater, and maximum instances must be an integer greater than 0",instanceOrder:"Minimum instances cannot exceed maximum instances",userPoolRequired:"Select a user pool for Runtime authentication"},deployment:{runtimeName:"Runtime name",runtimeNameUpdateHint:"The existing Runtime name is preserved during updates",runtimeNameHint:"Use only letters, numbers, underscores, and hyphens",region:"Deployment region",authentication:"Authentication",apiKeyDescription:"Default: access with the Runtime API Key",userPoolDescription:"Use a JWT issued by an Identity user pool",sessionStorage:"Session storage",inMemoryStorage:"Temporary in-memory storage",backends:{sqlite:"SQLite file",mysql:"MySQL",postgresql:"PostgreSQL"},instances:"Instance settings",minInstances:"Minimum instances",maxInstances:"Maximum instances",inMemoryHint:"To prevent session loss across instances, keep the Runtime at 1–1 instances",networkMode:"Network mode",network:{public:"Public",private:"Private",both:"Public and private"},subnetIds:"Subnet IDs (optional, comma-separated)",sharedInternet:"Shared public egress in the VPC",sharedInternetHint:"Allow private Runtimes to access the public internet through shared egress",evaluationSets:"Evaluation sets",createEvaluationSets:"Create evaluation sets automatically",evaluationSetsHint:"Create Good Case and Bad Case evaluation sets after deployment",resources:"Resource configuration",complete:"Deployment complete",preparing:"Preparing deployment…"},environmentVariables:{title:"Environment variables",add:"Add variable",nameAriaLabel:"Environment variable name",valueAriaLabel:"Value for {{name}}",deleteNamed:"Delete {{name}}"},actions:{updateAgain:"Update again",deployAgain:"Deploy again",updateAndPublish:"Update and publish"}},fse={actions:{addSubagent:"Add subagent",clearRoot:"Clear main agent",clearRootConfirmation:"Clear all settings and subagents from the main agent? This cannot be undone."},workspace:{progress:"Agent creation progress",modes:{build:"Build",validate:"Debug",optimize:"Optimize",environment:"Environment",publish:"Publish"},titles:{build:"Customize your agent architecture",validate:"Debug your agent",optimize:"Choose optimizations for your agent",environment:"Configure the cloud environment",publish:"Prepare your agent for deployment"}},sections:{type:{label:"Agent type",hint:"Choose an agent type"},basic:{label:"Basic information",hint:"Name, description, and system prompt"},model:{label:"Model",hint:"Model and service (optional)"},tools:{label:"Tools",hint:"Callable capabilities"},skills:{label:"Skills",hint:"Declarative skills"},knowledge:{label:"Knowledge base",hint:"External knowledge retrieval"},memory:{label:"Memory",hint:"Short-term and long-term memory"},subagents:{label:"Subagents",hint:"Nested collaboration"},review:{label:"Finish",hint:"Preview and create"}},agentTypes:{ariaLabel:"Agent type",remoteChildOnly:"Remote agents can only be used as child steps",llm:{label:"Agent",fullLabel:"LLM agent",description:"Uses an LLM to complete tasks autonomously"},sequential:{label:"Sequential",fullLabel:"Sequential agent",description:"Runs subagents one after another"},parallel:{label:"Parallel",fullLabel:"Parallel agent",description:"Runs subagents in parallel, then combines their results"},loop:{label:"Loop",fullLabel:"Loop agent",description:"Repeats subagents until the stop condition is met"},a2a:{label:"Remote agent",fullLabel:"Remote agent",description:"Calls a remote agent through the A2A protocol"}},basic:{agentName:"Agent name",name:"Name",agentDescription:"Agent description",descriptionPlaceholder:"Briefly describe what this agent does so your team can identify it…",nameHelp:"Follow Google ADK naming rules and keep the name unique in the execution flow.",rootDescriptionHelp:"The full description is preserved and converted to a Runtime-compatible single line during deployment.",descriptionHelp:"The description appears in agent lists and selectors.",orchestratorHelp:"This is a collaboration container and does not answer directly. Add task steps on the canvas and drag them to reorder.",maxIterations:"Maximum iterations",maxIterationsHelp:"The loop repeats its subagents until the condition is met or this limit is reached.",agentCenter:"AgentKit agent center",agentCenterHelp:"The remote agent's name, description, and capabilities come from the Agent Card returned by the center. The system discovers and attaches matching agents for each task.",moreOptions:"More options",systemPrompt:"System prompt",loadingMarkdown:"Loading Markdown editor…",markdownHelp:"Markdown shortcuts are supported. For example, type ## followed by a space to create a level-two heading.",unnamed:"Unnamed",unnamedAgent:"Unnamed agent"},validation:{remoteRoot:"A remote agent can only be a subagent",missingRegistry:"Select an AgentKit agent center",name:{required:"Name is required",reserved:"user is reserved by Google ADK. Choose another name.",characters:"Start with a letter or underscore and use only letters, numbers, and underscores"},duplicateName:"Agent names must be unique within this structure",missingDescription:"Description is required",mcpAuthRequired:"Confirm how to handle authentication after changing the MCP address",missingSubagent:"A subagent is required",missingPrompt:"System prompt is required",missingSubagentDetail:"Add at least one subagent to {{type}} before debugging or publishing.",problem:"{{name}}: {{problem}}"},ai:{ariaLabel:"Fill agent configuration with AI",minimumLength:"Enter at least {{count}} characters.",replaceConfirmation:"The generated configuration will replace the current canvas and settings. Continue?",placeholder:"Describe your goal and use {{model}} to generate the configuration",generate:"Generate",generating:"Generating",success:"Configuration generated",regenerate:"Generate again",failed:"Generation failed"},debug:{ariaLabel:"Agent debugging workspace",unavailable:"This backend does not currently support generated-agent debug runs.",baseline:"Baseline",comparison:"Variant {{count}}",selectModel:"Select a model",enterDescription:"Enter a description",enterPrompt:"Enter a system prompt",duplicateConfiguration:"Test configurations must be unique",starting:"Starting…",applyAndRestart:"Apply and restart",restart:"Restart",start:"Start environment",defaultModel:"Default model",testConfiguration:"Test configuration",deleteVariant:"Delete {{name}}",deleteVariantGroup:"Delete comparison variant",creatingEnvironment:"Creating the test environment…",configurationChanged:"The configuration changed. Restart the environment.",ready:"Environment ready",readyHint:"Send a message to compare agent responses.",startHint:"Complete the configuration, then start the environment.",viewTraceNamed:"View the trace for {{name}}",traceUnavailable:"Send a message to view its trace",trace:"Trace",useConfiguration:"Use this configuration",finishConfiguration:"Finish configuration",finishAndStart:"Finish and start",currentAgentModel:"Current agent model",configurationHint:"Changes apply only to this comparison. Select this configuration to continue to deployment.",messagePlaceholder:"Send a message to the running test environments…",startOneFirst:"Start at least one test environment first",addVariant:"Add variant",traceTitle:"Trace · {{name}}",leaveTitle:"Leave debugging?",leaveDescription:"The current environments will be removed when you leave. You can start new environments when you return.",cleaning:"Cleaning up…",confirmLeave:"Leave",closeLeaveConfirmation:"Close leave-debugging confirmation"},optimization:{ariaLabel:"Agent optimization options",scenario:"Optimization scenario",components:"Optimization components",bytePlusUnavailable:"Harness Sidecar optimizations are not available for BytePlus accounts yet. Leave all optimizations unselected to continue; regular BytePlus agents are not affected.",releaseScenario:"Optimization scenario: {{profile}}",profiles:{default:{label:"Custom",description:"Choose components as needed. The Sidecar stays off when none are selected."},ops:{label:"Operations",description:"For operations diagnostics, databases, logs, and monitoring MCP servers."}},groups:{quality:"Improve response quality",cost:"Reduce runtime cost",stability:"Improve runtime stability"},options:{context_engine:{label:"Context management",description:"Manage context assembly, task anchoring, and context budgets."},compressor:{label:"Context and result compression",description:"Compress long context and large tool results to reduce token usage."},verifier:{label:"Response verification and repair",description:"Verify evidence and responses, then repair or alert on failure."},long_run_control:{label:"Goal task control",description:"Manage progress, continuation, and completion conditions for Goal tasks."},mcp_resilience:{label:"MCP resilience",description:"Manage connections, timeouts, empty results, large responses, and call budgets. Includes read-only SQL protection by default."}}},model:{label:"Model",source:"Model source",volcanoArk:"Volcano Ark",volcengineArk:"Volcano Ark",bytePlusModelArk:"BytePlus ModelArk",custom:"Custom",gateway:"Model gateway",comingSoon:"Coming soon",configuration:"Model configuration",name:"Model name",provider:"Provider",liteLlmProviders:"LiteLLM providers",apiKeyPlaceholder:"Enter the model API Key",available:"Available",retiring:"Retiring soon",notActivated:"Not activated",unavailable:"Unavailable",apiKeyLoadError:"Failed to load Ark API Keys",loadingApiKeys:"Loading API Keys…",selectApiKey:"Select an API Key",currentApiKey:"Current API Key",apiKeyList:"API Key list",searchApiKey:"Search API Keys",searchApiKeyName:"Search API Key names",noApiKeys:"No API Keys available",noMatchingApiKey:"No matching API Keys",loading:"Loading models…",loaded:"{{count}} models loaded",loadError:"Failed to load models",selectModel:"Select a model",selectProviderModel:"Select a provider model",providerModels:"Provider models",search:"Search models",searchPlaceholder:"Search by name, Model ID, or provider",noMatches:"No matching models",empty:"No models available",unknownStatus:"Unknown status",refresh:"Refresh",refreshing:"Refreshing…",activate:"Activate",activateAction:"Open activation",currentConfiguration:"Current configuration"},tools:{builtIn:"Built-in tools",builtInHelp:"Select VeADK capabilities. Imports and required environment variables are added automatically.",codeExecution:"Code execution configuration",codeExecutionHelp:"Select the AgentKit code execution sandbox.",mcp:"MCP tools"},catalog:{web_search:{label:"Web search",description:"Get real-time information with Volcengine Web Search."},parallel_web_search:{label:"Parallel web search",description:"Run multiple search queries in parallel and combine the results faster."},link_reader:{label:"Link reader",description:"Fetch and read the main content from a URL."},web_scraper:{label:"Web scraper",description:"Crawl webpages into structured data. Requires the Scraper service."},image_generate:{label:"Image generation",description:"Generate images from text with Doubao Seedream."},image_edit:{label:"Image editing",description:"Edit or transform images with Doubao SeedEdit."},video_generate:{label:"Video generation",description:"Generate videos from text or images with Doubao Seedance, including task status queries."},text_to_speech:{label:"Text to speech (TTS)",description:"Convert text to speech with Volcengine Speech."},run_code:{label:"Code execution",description:"Run code in a sandbox."},vesearch:{label:"VeSearch",description:"Search with Volcengine VeSearch. Requires a bot endpoint."},links:{console:"Console",documentation:"Documentation"},env:{modelAgentName:{comment:"Model name"},embeddingModelName:{comment:"Embedding model required by memory and knowledge bases"},vikingMemoryProject:{comment:"VikingDB memory project"},vikingMemoryRegion:{comment:"VikingDB memory region"},vikingMemoryType:{comment:"Memory types"},feishuAppId:{comment:"Feishu app ID"},feishuAppSecret:{comment:"Feishu app secret",placeholder:"Enter the app secret"},registrySpaceId:{comment:"AgentKit agent center",placeholder:"Select an agent center"},registryTopK:{comment:"Number of agents to retrieve"},registryRegion:{comment:"AgentKit agent center region"},registryEndpoint:{comment:"AgentKit agent center OpenAPI endpoint"},agentKitToolId:{comment:"Code execution sandbox ID"},agentKitToolRegion:{comment:"AgentKit Tools region"},openVikingUrl:{comment:"OpenViking service URL"},openVikingMemoryUserId:{comment:"Memory owner ID",help:"The user segment in viking://user//peers//memories. Use it to isolate agents, tenants, or business scenarios. The default is default."},openVikingMemoryPolicy:{comment:"Memory policy",help:"Controls memory extraction and isolation. Leave it blank to use the official default policy."},openVikingKnowledgeUserId:{comment:"Knowledge base owner ID",help:"Used in the default path viking://user//resources// when no resource directory is configured. The default is default."},openVikingTargetUri:{comment:"Knowledge base resource directory",help:"Leave blank to generate it from the KnowledgeBase index. When provided, this OpenViking resource directory takes precedence."},tlsServiceName:{comment:"TLS topic_id. Leave blank to create one automatically"}}},backends:{shortTerm:{local:{label:"In-memory",description:"Stored in the process without persistence. Best for development and debugging."},sqlite:{label:"SQLite file",description:"Persist data to a local .db file."},mysql:{label:"MySQL",description:"Persist data to MySQL."},postgresql:{label:"PostgreSQL",description:"Persist data to PostgreSQL."}},longTerm:{local:{label:"Local vector store",description:"In-process llama-index vector store."},opensearch:{label:"OpenSearch",description:"Vector retrieval with OpenSearch."},redis:{label:"Redis",description:"Vector retrieval with Redis."},viking:{label:"VikingDB Memory",description:"VikingDB memory with user profile support."},openviking:{label:"OpenViking Memory",description:"Long-term memory that stores and retrieves preferences, events, and entities per user."},mem0:{label:"Mem0",description:"Managed memory from Mem0."}},knowledge:{viking:{label:"VikingDB Knowledge",description:"VikingDB knowledge base."},opensearch:{label:"OpenSearch",description:"Vector retrieval with OpenSearch."},context_search:{label:"Context Search",description:"Volcengine Context Search without embedding configuration."},openviking:{label:"OpenViking Knowledge",description:"OpenViking resource-directory knowledge base without embedding configuration."}}},exporters:{apmplus:{label:"APMPlus",description:"Volcengine APMPlus application performance monitoring."},cozeloop:{label:"CozeLoop",description:"Distributed tracing with CozeLoop."},tls:{label:"TLS (Log Service)",description:"Export logs to Volcengine TLS."}},knowledge:{title:"Knowledge base",description:"Enable external knowledge retrieval (RAG) so the agent can answer from your data.",backend:"Knowledge base backend",vikingDatabase:"VikingDB knowledge base"},memory:{shortTerm:"Short-term memory",shortTermDescription:"Store context for one session",shortTermBackend:"Short-term memory backend",longTerm:"Long-term memory",longTermDescription:"Store context across sessions, usually with vector retrieval",longTermBackend:"Long-term memory backend",vikingDatabase:"VikingDB memory",autoSave:"Save sessions to long-term memory automatically",autoSaveDescription:"Write session content to long-term memory when a session ends."},mcp:{removeTool:"Remove MCP tool",namePlaceholder:"Name (optional)",urlPlaceholder:"MCP service URL",pathWarning:"This address has no path. Confirm that it is the complete MCP service URL.",configuredPlaceholder:"Authentication is stored securely",tokenPlaceholder:"Bearer token (optional)",changedUrlWarning:"The MCP address changed. Choose how to handle the stored authentication.",reuseCredential:"Keep using it",replaceCredential:"Replace authentication",noAuth:"Use no authentication",reuseHint:"The stored authentication will be reused when you publish.",changeToReplace:"Replace instead",credentialConfigured:"Studio securely stores the authentication.",removeCredential:"Remove authentication",commandPlaceholder:"Command, such as npx",argsPlaceholder:"Arguments separated by spaces",stdioHint:"The stdio tool starts in the deployment environment. Make sure its command and dependencies are available.",addTool:"Add MCP tool"},resources:{unnamedAgentCenter:"Unnamed agent center",unnamedKnowledgeBase:"Unnamed knowledge base",unnamedMemory:"Unnamed memory store",loadError:"Failed to load",loadingAgentCenters:"Loading agent centers…",agentCentersLoaded:"{{count}} agent centers loaded",noAgentCenters:"No agent centers available",noMatchingAgentCenters:"No matching agent centers",searchAgentKitCenter:"Search AgentKit agent centers",searchNameOrId:"Search by name or ID",selectAgentCenter:"Select an agent center",selectAgentKitCenter:"Select an AgentKit agent center",selectedAgentCenter:"Selected agent center",agentKitCenter:"AgentKit agent center",refreshAgentCenters:"Refresh agent centers",knowledgeBaseList:"Knowledge base list",knowledgeBasePlaceholder:"Select a knowledge base",loadingKnowledgeBases:"Loading knowledge bases…",knowledgeBasesLoaded:"{{count}} knowledge bases loaded",noKnowledgeBases:"No knowledge bases available",noMatchingKnowledgeBases:"No matching knowledge bases",searchKnowledgeBase:"Search knowledge bases",selectKnowledgeBase:"Select a knowledge base",refreshKnowledgeBases:"Refresh knowledge bases",memoryList:"Memory store list",memoryPlaceholder:"Select a memory store",loadingMemories:"Loading memory stores…",memoriesLoaded:"{{count}} memory stores loaded",noMemories:"No memory stores available",noMatchingMemories:"No matching memory stores",searchMemory:"Search memory stores",selectMemory:"Select a memory store",refreshMemories:"Refresh memory stores"},env:{noAdditionalParameters:"This backend needs no additional runtime parameters.",invalidJson:"Enter valid JSON.",helpAriaLabel:"Help for {{label}}: {{help}}",openOpenViking:"Open OpenViking {{label}}",valuePlaceholder:"Enter a value",openVikingIndex:"OpenViking resource index",openVikingIndexHelp:"Leave blank to generate an index from the agent name, such as my_agent_kb. Without DATABASE_OPENVIKING_TARGET_URI, the default URI is viking://user/{knowledge base owner ID, or default}/resources/{resource index}/. When DATABASE_OPENVIKING_TARGET_URI is set, that complete URI is used instead.",openVikingIndexAriaLabel:"OpenViking resource index help: {{help}}"},deployment:{vpcRequired:"Enter a VPC ID when using VPC networking.",apiKeyRequired:"Select the API Key used by the model.",invalidEnvName:"Invalid environment variable name: {{key}}",requiredEnv:"{{name}}: enter this required environment variable",generatingConfiguration:"Generating deployment configuration",runtimeNameExists:"This Runtime name already exists. Choose another name and try again.",preparing:"Preparing deployment",complete:"Deployment complete",failed:"Deployment failed",updateAndPublish:"Update and publish",stages:{build:"Build image",deploy:"Deploy Runtime",publish:"Publish service",running:"Deploying"}},publish:{generating:"Generating publish configuration",validating:"Validating the agent structure and preparing the deployment snapshot…"}},hse={presets:{support:{name:"Customer support assistant",description:"Answer questions around the clock using your knowledge base and conversation history, with consistent and considerate responses.",instruction:"You are a professional and patient customer support assistant. Always use a courteous, friendly tone. Base answers on the knowledge base whenever possible. When the available information is insufficient, say so clearly and ask for the details you need instead of inventing an answer. Keep responses concise and well structured, and provide steps when useful.",subagents:{}},analyst:{name:"Data analyst",description:"Run code for statistics and visualization with tracing enabled, so every analysis is observable and reproducible.",instruction:"You are a rigorous data analyst. Clarify the objective and definitions before cleaning, analyzing, and visualizing data with executable code. Explain assumptions and methods at each step, support conclusions with key evidence, and identify possible bias or limitations.",subagents:{}},translator:{name:"Translation assistant",description:"Translate between Chinese and English accurately and naturally while preserving tone and terminology.",instruction:"You are a professional translator fluent in Chinese and English. Preserve the meaning of the source while producing natural language for the target audience. Keep proper nouns and technical terminology accurate and reflect the original tone and style. Return only the translation unless the user asks for an explanation.",subagents:{}},coder:{name:"Coding assistant",description:"Write, debug, and refactor code, validate it by running tests, and produce clear, maintainable implementations.",instruction:"You are a senior software engineer. Write correct, clear, maintainable code that follows the conventions and best practices of the target language. When uncertain, run the code to validate the implementation, cover important edge cases, and add concise comments for complex logic.",subagents:{}},researcher:{name:"Researcher",description:"Search primary sources online and combine them with knowledge and long-term memory to produce evidence-backed findings.",instruction:"You are a rigorous researcher. Break each question into key subproblems, collect multiple credible primary sources through web search, and cross-check the evidence before drawing conclusions. Cite sources, state uncertainty, distinguish facts from inference, and avoid overgeneralization.",subagents:{}},"research-team":{name:"Multi-agent research team",description:"Coordinate a researcher, analyst, and writer to produce an end-to-end research report.",instruction:"You coordinate a research team. Break down the user's research task, delegate search, analysis, and writing to the appropriate subagents, synthesize their work, and deliver a clear, evidence-backed report.",subagents:{0:{name:"Researcher",description:"Collect primary sources and data related to the topic online.",instruction:"You are the team's researcher. Find multiple credible sources about the topic, organize the key facts, data, and original citations, and hand them to the analyst without adding unsupported conclusions."},1:{name:"Analyst",description:"Cross-check and synthesize the collected material.",instruction:"You are the team's analyst. Cross-check, compare, and synthesize the research material. Extract insights, identify contradictions and uncertainty, and produce a structured set of findings."},2:{name:"Writer",description:"Turn the analysis into a clear report with reliable citations.",instruction:"You are the team's writer. Turn the analyst's findings into a clear, well-written report with consistent citations, ensuring every conclusion can be traced to a source."}}}},tags:{tools:"Tools",memory:"Memory",knowledgeBase:"Knowledge base",tracing:"Tracing",subagents:"{{count}} subagents"},gallery:{title:"Create from a template",subtitle:"Choose a prebuilt agent template and customize it to fit your needs."},detail:{back:"Back to templates",name:"Name",systemPrompt:"System prompt",model:"Model",tools:"Tools",memory:"Memory",knowledgeBase:"Knowledge base",tracing:"Tracing",subagents:"Subagents ({{count}})",create:"Create from this template",shortTermMemory:"Short-term",longTermMemory:"Long-term"}},pse={common:Yre,yaml:Zre,validation:Jre,defaults:ese,helpers:tse,intelligentDeployment:nse,codePackage:ise,buildCanvas:rse,intelligent:sse,projectLibrary:ase,modePicker:ose,promptEditor:lse,skills:cse,workflow:use,workbench:dse,traditional:fse,template:hse},NDe=Object.freeze(Object.defineProperty({__proto__:null,buildCanvas:rse,codePackage:ise,common:Yre,default:pse,defaults:ese,helpers:tse,intelligent:sse,intelligentDeployment:nse,modePicker:ose,projectLibrary:ase,promptEditor:lse,skills:cse,template:hse,traditional:fse,validation:Jre,workbench:dse,workflow:use,yaml:Zre},Symbol.toStringTag,{value:"Module"})),mse={backToList:"Back to scheduled tasks",cancel:"Cancel",cancelQueue:"Cancel queued run",cancelQueueFirst:"Cancel the queued run first",cancelling:"Cancelling…",closeDrawer:"Close panel",collapse:"Collapse",connectingRuntime:"Connecting to Runtime…",createScheduledTask:"Create scheduled task",createTask:"Create task",delete:"Delete",deleteTask:"Delete task",edit:"Edit",enable:"Enable",expand:"Expand",pause:"Pause",refresh:"Refresh",refreshHistory:"Refresh run history",rerun:"Run again",retry:"Retry",runNow:"Run now",saveChanges:"Save changes",saving:"Saving…",stop:"Stop run",stopRun:"Stop this run",stopRunFirst:"Stop the current run first",stopping:"Stopping…",viewDetails:"View details"},gse={cancelDescription:"This Session will be cancelled. Future scheduled runs will remain enabled.",cancelTitle:"Stop this run?",deleteDescription:"“{{name}}” and its complete run history will be permanently deleted.",deleteTitle:"Delete scheduled task?"},bse={configuration:"Task configuration",nextRun:"Next run",pageLabel:"Scheduled task details",region:"Region",runtime:"Runtime",status:"Task status"},yse={createTitle:"Create scheduled task",description:"Each trigger creates a separate Session for the Runtime Agent.",editTitle:"Edit scheduled task"},vse={minutesSeconds:"{{minutes}} min {{seconds}} sec",seconds:"{{count}} sec"},xse={cronExpression:"Cron expression",cronHelp:"Enter minute, hour, day of month, month, and day of week.",dailyTime:"Daily run time",enableAfterCreate:"Enable after creation",enableHelp:"The task will run at its next scheduled time after it is enabled.",name:"Task name",namePlaceholder:"For example: Generate a daily operations summary",noRuntime:"No Runtime available",prompt:"Execution prompt",promptPlaceholder:"Enter the text to send to the Agent on every run",runAt:"Run time",runtimeAgent:"Runtime Agent",runtimeHelp:"The task always uses the Runtime's currently active version.",runtimePlaceholder:"Select a Runtime Agent",schedule:"Schedule",scheduleType:"Schedule type",timezone:"Time zone",weekday:"Day of week"},Ose={all:"All"},wse={description:"Each run uses a separate Session. Results and errors are retained.",duration:"Duration: {{duration}}",emptyDescription:"Runs will appear here after the task is triggered or run manually.",emptyTitle:"No runs yet",errorDetails:"Error details",finalAnswer:"Final answer",loadFailed:"Unable to load run history",loadFailedDescription:"Check the Studio service and try again.",session:"Session",title:"Run history"},Sse={cancelRequested:"Stop request submitted.",created:"Task created.",deleted:"The task and its run history were deleted.",enabled:"Task enabled.",paused:"Task paused.",queued:"Task queued and will start within one minute.",requeued:"Task queued again and will start within one minute.",updated:"Task updated."},kse={filterLabel:"Filter scheduled tasks by status",listLabel:"Scheduled task list",loadFailed:"Unable to load scheduled tasks",loadFailedDescription:"Check the Studio service and try again.",title:"Cronjob"},Ese={cron:"Cron {{cron}}{{zone}}",daily:"Daily at {{time}}{{zone}}",once:"Once · {{date}}{{zone}}",weekly:"{{weekday}} at {{time}}{{zone}}"},Cse={daily:"Daily",once:"Once",weekly:"Weekly"},Tse={cancelled:"Cancelled",enabled:"Enabled",failed:"Failed",notRun:"Not run yet",paused:"Paused",pending:"Preparing",queued:"Queued",retrying:"Retrying",running:"Running",skipped:"Skipped",success:"Succeeded"},Ase={cronFields:"A Cron expression must contain five fields, for example 0 9 * * *.",nameRequired:"Enter a task name.",promptRequired:"Enter the text to send to the Agent on each run.",runtimeAppMissing:"The Runtime Agent did not return an appName. Confirm that the Runtime is ready and compatible.",runtimeRequired:"Select an available Runtime Agent.",timeRequired:"Select a run time."},_se={friday:"Friday",monday:"Monday",saturday:"Saturday",sunday:"Sunday",thursday:"Thursday",tuesday:"Tuesday",wednesday:"Wednesday"},jDe={actions:mse,confirm:gse,detail:bse,drawer:yse,duration:vse,fields:xse,filters:Ose,history:wse,notices:Sse,page:kse,schedule:Ese,scheduleTypes:Cse,status:Tse,validation:Ase,weekdays:_se},RDe=Object.freeze(Object.defineProperty({__proto__:null,actions:mse,confirm:gse,default:jDe,detail:bse,drawer:yse,duration:vse,fields:xse,filters:Ose,history:wse,notices:Sse,page:kse,schedule:Ese,scheduleTypes:Cse,status:Tse,validation:Ase,weekdays:_se},Symbol.toStringTag,{value:"Module"})),Nse="Report an issue",jse="Description",Rse="Common issues",Ise="Cancel",Pse="Done",Dse="Submit feedback",Mse="Submitting…",Lse={title:"Feedback submitted. Thank you.",description:"The AgentKit team will review your report as soon as possible."},$se={close:"Close issue report",intro:"Select the issues you encountered and add any useful details.",privacy:"Your conversation data will be shared with the AgentKit team. Please protect sensitive information.",descriptionPlaceholder:"Describe what happened (optional)",issues:{slow:"Slow execution",crash:"Runtime crash",incorrect:"Inaccurate result",tool_error:"Tool call failed",other:"Other issue"}},Fse={description:"Tell us about a problem you encountered while using AgentKit Studio.",module:"Area",modules:{conversation:"Conversation",agents:"Agents",applications:"Automations",search:"Search",other:"Other"},commonIssuesMultiple:"Common issues (select all that apply)",issueTypes:"Issue types",issues:{page_slow:"Page loads slowly",feature_unavailable:"Feature unavailable",display_error:"Display issue",no_response:"Action has no response",other:"Other issue"},descriptionPlaceholder:"Describe the page, action, and what happened",quickAdd:"Quick add",suggestionsLabel:"Suggested descriptions",suggestions:{noResponse:"Nothing happens after I click",loading:"The page remains in a loading state",incomplete:"Some content is missing or clipped",error:"An error appears after the action"},privacy:"Your data will be shared with the AgentKit team. Please protect sensitive information."},IDe={title:Nse,descriptionLabel:jse,commonIssues:Rse,cancel:Ise,done:Pse,submit:Dse,submitting:Mse,success:Lse,dialog:$se,page:Fse},PDe=Object.freeze(Object.defineProperty({__proto__:null,cancel:Ise,commonIssues:Rse,default:IDe,descriptionLabel:jse,dialog:$se,done:Pse,page:Fse,submit:Dse,submitting:Mse,success:Lse,title:Nse},Symbol.toStringTag,{value:"Module"})),Bse={back:"Back",close:"Close"},Use={title:"Optimize migrated project",closeAria:"Close optimization dialog"},Qse={title:"Migrated projects",description:"Manage migrated source versions or continue optimizing any version.",libraryTitle:"Projects and versions",libraryDescription:"View, download, deploy, or compare source versions, or continue optimizing any version.",emptyTitle:"No migrated projects yet",emptyDescription:"Migrated source code will be saved here automatically."},zse={langchain:"LangChain",langgraph:"LangGraph",adk:"Google ADK",strands:"Strands",agentcore:"AgentCore",dify:"Dify",any:"Any (universal migration)"},Vse={awaitingUpload:"Awaiting upload",analyzing:"Analyzing",needsInput:"Needs input",analysisReady:"Awaiting confirmation",migrating:"Migrating",validating:"Validating",packaging:"Packaging",succeeded:"Completed",succeededWithWarnings:"Completed with notices",partial:"Partially completed",failed:"Failed",cancelled:"Stopped",expired:"Expired"},Hse={partialReady:"Migration output is ready, but delivery is incomplete. Review the migration notices.",readyWithWarnings:"Migration output is ready. Review the migration notices.",ready:"Migration output is ready."},qse={passed:"Output verification passed",failed:"Output verification failed",degraded:"Output verification incomplete"},Wse={session:"Create migration environment",upload:"Upload project",analysis:"Analyze project"},Kse={agentNameRequired:"Enter an Agent name",agentNameInvalid:"Agent names must be 1–63 characters, contain only lowercase letters, numbers, and hyphens, and start and end with a letter or number"},Gse={seconds:"{{seconds}} sec",minutesSeconds:"{{minutes}} min {{seconds}} sec"},Xse={savedUnaffected:"Saved projects are unaffected",savingUnaffected:"Source is being saved and will be unaffected once complete",activeDetail:"Task history and temporary output will become unavailable after expiration",oneHour:"Temporary migration environment is retained for 1 hour",ended:"Temporary migration environment has ended",savedAvailable:"Saved projects remain available to view, download, deploy, or optimize",unavailable:"Task history and temporary output are no longer available",countdown:"Temporary migration environment ends in {{minutes}} min {{seconds}} sec",expiredSavedMessage:"The temporary migration environment has ended. Saved projects are unaffected.",expiredMessage:"The temporary migration environment has ended. Task history and temporary output are no longer available."},Yse={recommended:"Recommended migration method",scope:"Migration scope",excluded:"Out of scope",viewEvidence:"View analysis evidence",viewAssumptions:"View key assumptions",viewSourceEvidence:"View source evidence"},Zse={ariaLabel:"Codex activity",title:"Codex activity",startingAnalysis:"Codex is starting the analysis…",startingMigration:"Codex is starting the migration…",loadError:"Codex activity is temporarily unavailable. The current task is unaffected."},Jse={title:"Migration output",fileTooLarge:"This file exceeds 2 MiB. Download the complete output to view it.",unsupportedPreview:"This file cannot be previewed here. Download the complete output to view it.",filesAria:"Migration output files",searchAria:"Search output files",searchPlaceholder:"Search files",limit:"Showing the first {{count}} items. Search for a specific file.",noSelection:"No file selected",noPreview:"No files available to preview.",loadingFile:"Loading output file…",startupFile:"Startup file",fileCountLabel:"Files",saved:"Source has been saved. You can view, download, deploy, or optimize it.",saving:"Output is ready and the source version is being saved.",deployReady:"Output is available to preview, download, and deploy. Waiting for source save status.",deployUnavailable:"Output is available to preview and download, but its current delivery status does not support deployment.",viewProjects:"View migrated projects",downloading:"Downloading…",downloadZip:"Download ZIP",deployTitle:"Deploy migration output",deployUnavailableTitle:"Current delivery status does not support deployment",deployRuntime:"Deploy to Runtime",fileCount:"{{count}} files",startup:"Startup file {{module}}",loading:"Loading migration output…"},eae={retiring:"Retiring soon",currentDefault:"Current default model",loadError:"Failed to load models",label:"Model",placeholder:"Select a model"},tae={zipOnly:"Select a local project in .zip format.",invalidName:"The ZIP file name is invalid. Rename the file and select it again.",tooLarge:"The project ZIP cannot exceed {{size}}.",empty:"The project ZIP cannot be empty.",removeAria:"Remove project ZIP",reselectPrompt:"Select the project ZIP again",selectPrompt:"Select or drop a local project ZIP",reselect:"Select again",selectZip:"Select ZIP",continue:"Continue upload",start:"Start migration",inputAria:"Select a local project ZIP",retention:"The temporary migration environment is retained for 1 hour after creation. Successfully saved source versions are unaffected."},nae={requiredPlaceholder:"Enter {{key}}",optionalPlaceholder:"Optional: {{key}}",notReady:"Migration output is not ready yet.",back:"Back to migration results"},iae={backToAddAgent:"Back to Add Agent",title:"Migrate existing project",newMigration:"New migration",recent:"Recent migrations",sessionsAria:"Migration sessions",loadingSessions:"Loading migration sessions…",noSessions:"No migration sessions",heading:"Migrate an existing Agent project",intro:"Upload a local project ZIP. Codex will first perform a read-only analysis, then ask you to confirm the migration method."},rae={stop:"Stop migration",stopping:"Stopping…",reload:"Reload",refreshStatus:"Refresh status"},sae={unavailable:"Migration is currently unavailable",defaultReason:"Dev Sandbox is currently unavailable. Contact your administrator to check the configuration."},aae={requestZip:"Provide a local project ZIP. After upload, I’ll identify the framework, entry point, and migration boundaries, then ask you to confirm the migration method before making changes.",zipHint:"Only local ZIP files are supported, up to {{size}}. The migration environment is retained for 1 hour after creation.",creatingSandbox:"Creating Dev Sandbox",initializing:"Initializing the migration workspace and checking AgentKit CLI, Codex, and migration capabilities. The project will upload automatically when the environment is ready.",elapsed:"Elapsed: {{duration}}",uploadThenAnalyze:"Read-only analysis will start automatically after the ZIP upload completes.",analyzing:"Codex is identifying the framework, entry point, and migration boundaries. No migration changes are being made.",migrationLocked:"Attachments and migration settings cannot be changed while migration is running. Wait for the task to finish or stop it.",analysisPaused:"Read-only analysis is paused. Answer only the questions below. After submission, analysis will continue in the same environment without starting the migration.",analysisComplete:"Read-only analysis is complete. Review the recommendation and confirm the final migration method.",awaitingUpload:"The migration environment is ready. Select the local ZIP again to continue uploading.",expiredTitle:"Migration environment expired",expiredDescription:"Migration content and output can no longer be previewed, downloaded, or deployed. If the Runtime deployment completed, return to the Agents page to continue using it.",unsupportedTitle:"This ZIP cannot be migrated yet",unsupportedHint:"Update the project as instructed, then create a new migration and upload it again.",failedTitle:"Migration incomplete",cancelled:"This migration was stopped. Create a new migration and upload the project again."},oae={ariaLabel:"Provide project analysis details",title:"Additional information needed for analysis",description:"The attachment stays locked; submitting continues read-only analysis only",submitting:"Continuing analysis…",submit:"Submit and continue analysis"},lae={ariaLabel:"Confirm migration method",title:"Confirm migration method",description:"Migration starts only after confirmation",framework:"Migration method",frameworkPlaceholder:"Select a migration method",agentName:"Agent name",entry:"Project entry point",entryPlaceholder:"Select a project entry point",entryExample:"For example, agent.py:agent",consent:"By selecting “Confirm and start migration,” you confirm the migration scope, exclusions, and key assumptions above.",starting:"Starting migration…",start:"Confirm and start migration"},cae={closeAria:"Dismiss error",loadFailed:"Could not load migration data. Try again.",refreshFailed:"Could not refresh the migration status. Try again."},uae={title:"Stop the current migration?",description:"Stopping ends the current analysis or migration process. Completed steps will not continue."},DDe={common:Bse,optimization:Use,projects:Qse,framework:zse,state:Vse,task:Hse,verification:qse,transfer:Wse,validation:Kse,duration:Gse,expiry:Xse,analysis:Yse,activity:Zse,artifact:Jse,model:eae,upload:tae,deployment:nae,workspace:iae,actions:rae,capability:sae,conversation:aae,questions:oae,confirmation:lae,errors:cae,stopDialog:uae},MDe=Object.freeze(Object.defineProperty({__proto__:null,actions:rae,activity:Zse,analysis:Yse,artifact:Jse,capability:sae,common:Bse,confirmation:lae,conversation:aae,default:DDe,deployment:nae,duration:Gse,errors:cae,expiry:Xse,framework:zse,model:eae,optimization:Use,projects:Qse,questions:oae,state:Vse,stopDialog:uae,task:Hse,transfer:Wse,upload:tae,validation:Kse,verification:qse,workspace:iae},Symbol.toStringTag,{value:"Module"})),dae={loading:"Loading…",searchLabel:"Search {{label}}",searchPlaceholder:"Search {{label}}",retry:"Retry",noMatches:"No matches",noOptions:"No options available",selection:"{{label}}: {{value}}"},fae={badge:"All new",view:"See what's new",title:"What's new",defaultNotes:{multiRegion:"Multi-region agents: load Beijing and Shanghai Runtimes in parallel, with more available as you scroll.",switchAgent:"Switch in conversation: choose an agent beside the composer and start a new conversation immediately.",visualCanvas:"Visual execution canvas: inspect multi-agent structures on a horizontal canvas with fullscreen support."}},hae={label:"New conversation workspace",agent:"Agent",skill:"Skill customization",video:"Video creation"},pae={select:"Select conversation mode",agent:{label:"Agent",description:"Chat with the selected Agent"},builtin:{label:"Built-in Agent",description:"Use an Agent provided by the platform"},codex:{label:"Codex Agent",description:"Run tasks in a sandbox"},deepseekHarness:{label:"DeepSeek Harness",description:"Open the DeepSeek Harness workspace"},arkClaw:"ArkClaw",hermes:"Hermes Agent",checking:"Checking configuration",notConfigured:"Not configured by an administrator",unavailable:"Unavailable"},mae={select:"Select Agent",typesLabel:"Agent types",listLabel:"{{type}} list",types:{agent:"Agent",general:"General Agent",codex:"Codex Agent",deepseekHarness:"DeepSeek Harness",openclaw:"OpenClaw Agent",hermes:"Hermes Agent"},loading:"Loading Agents",reload:"Reload",empty:"No {{type}} yet",emptyLocal:"No local Agents yet",emptyGeneral:"No General Agents yet",createHint:"Create one from the Agents page",localHint:"Check the directory where Studio was started",waking:"Waking up",opening:"Opening",connecting:"Connecting",loadingMore:"Loading",loadMore:"Load more",runtimeTimeout:"Loading Agents timed out after 15 seconds. Check the network or Runtime service and retry.",loadGeneral:"Load General Agents",loadType:"Load {{type}}",connectGeneral:"Connect to General Agent",openLocal:"Open local Agent",openType:"Open {{type}}"},gae={spaceAria:"Skill spaces",configuration:"Skill customization settings",actions:{create:"Generate Skill",optimize:"Optimize Skill"},selectAction:"Select a Skill customization action",actionList:"Skill customization actions",style:"Style",selectStyle:"Select style",model:"Model",selectModel:"Select model",styles:{concise:"Concise and practical",strict:"Rigorous and reliable",tutorial:"Tutorial-friendly",automation:"Automation-first"},modelLoadFailed:"Failed to load model configuration",spaceLoadFailed:"Failed to load Skill Spaces",skillLoadFailed:"Failed to load Skills",unnamedSpace:"Unnamed Skill Space",space:"Skill Space",select:"Select Skill",selectAria:"Select Skill: {{skill}}",loadingSpaces:"Loading Skill Spaces",reload:"Reload",emptySpaces:"No Skill Spaces yet",skillList:"{{space}} Skill list",loadingSkills:"Loading Skills",emptySkills:"No Skills yet"},bae={modes:{auto:"Auto detect",text_to_video:"Text to video",reference_to_video:"Reference to video",video_editing:"Video editing",video_extension:"Video extension",first_last_frame:"First and last frames"},taskNames:{auto:"Video generation",text_to_video:"Text-to-video",reference_to_video:"Reference-to-video",video_editing:"Video editing",video_extension:"Video extension",first_last_frame:"First-and-last-frame generation"},controls:{label:"Video creation settings",aspectRatio:"Aspect ratio",selectAspectRatio:"Select aspect ratio",resolution:"Resolution",selectResolution:"Select resolution",duration:"Duration",durationShort:"{{count}}s",durationAria:"Video duration: {{count}} seconds",lastFrame:"Last frame",lastFrameHelper:"Add the video's ending frame",assistImage:"Supporting image",referenceImage:"Reference image",assistImageHelper:"Add visual guidance",imageHelper:"Supports common image formats",referenceVideo:"Reference video",videoHelper:"Supports common video formats",optional:"Optional",replace:"Replace",add:"Add",upload:"Upload {{label}}",replaceFile:"Replace {{label}}: {{name}}",removeFile:"Remove {{label}} {{name}}",storageUnavailable:"Persistent storage is not configured",loadingEnhancer:"Loading prompt enhancement model",enhancerHint:"Uses {{model}} for intent recognition and prompt enhancement",enhancerUnavailable:"Prompt enhancement model unavailable"},task:{title:"Video generation task",closeAria:"Close video generation task dialog",progressAria:"Video generation progress",optimizedPrompt:"Optimized prompt",processingAria:"{{task}} progress",waitingAria:"{{status}}, elapsed {{elapsed}}",elapsed:"Elapsed {{elapsed}}",previewAria:"Generated video preview",close:"Close",download:"Download video",retryOptimization:"Retry prompt optimization",retryGeneration:"Retry video generation",providerQueued:"Waiting for model scheduling",providerRunning:"Model generating",providerSubmitting:"Submitting task",queuedHint:"The task was submitted. Its status will update automatically when processing begins.",runningHint:"This may take several minutes. The video preview will appear here when complete.",backgroundHint:"You can close this dialog. The task will continue in the background.",successHint:"Your video is ready to preview or download.",activationHint:"Activate the service in the model console, then retry generation.",retryHint:"Fix the issue and retry the current step.",steps:{optimizationFailed:"Prompt optimization failed",optimizationDone:"Prompt optimization complete",optimizationActive:"Optimizing prompt",generationDone:"{{task}} complete",generationFailed:"{{task}} failed",generationQueued:"{{task}} queued",generationRunning:"Generating {{task}}",generationActive:"{{task}} in progress",generationPending:"Waiting for video generation",generationComplete:"Video generation complete"},elapsedHours:"{{hours}}h {{minutes}}m",elapsedMinutes:"{{minutes}}m {{seconds}}s",elapsedSeconds:"{{seconds}}s"}},yae={compactSelect:dae,featureNotice:fae,workspace:hae,mode:pae,agentPicker:mae,skill:gae,video:bae},LDe=Object.freeze(Object.defineProperty({__proto__:null,agentPicker:mae,compactSelect:dae,default:yae,featureNotice:fae,mode:pae,skill:gae,video:bae,workspace:hae},Symbol.toStringTag,{value:"Module"})),vae={cancel:"Cancel",close:"Close",retry:"Retry",tryAgain:"Try again",closeDialog:"Close {{title}}",agentFallback:"{{agent}} Agent",unknownSource:"Unknown source"},xae={terminalTitle:"Terminal",browserTitle:"Sandbox browser",terminalSubtitle:"Connect to the interactive terminal for the current AgentKit Session",browserSubtitle:"View and control the browser in the current AgentKit Session",connecting:"Connecting…",connected:"Connected",notConnected:"Not connected",opening:"Opening {{title}}",connectingSession:"Connecting the tool to the current AgentKit Session.",openFailed:"Failed to open {{title}}"},Oae={title:"Resume Codex conversation",subtitle:"Select a recently updated Thread from the current Sandbox Session",loading:"Loading conversation history",loadFailed:"Failed to load conversation history",empty:"No conversations to resume"},wae={title:"Codex permissions",subtitle:"Settings are saved to the current Sandbox Session and applied to all of its Threads",sandboxMode:"Sandbox mode",approvalPolicy:"Approval policy",approvalMethod:"Approval method",networkAccess:"Allow network access",networkAccessHelp:"Control external network access in workspace-write and read-only modes.",fullAccessWarning:"Full access disables file system and network isolation. Use it only for trusted tasks.",save:"Save permissions",sandboxChoices:{readOnly:{label:"Read only",detail:"Allow reading files without writing to the workspace."},workspaceWrite:{label:"Workspace write",detail:"Allow reading and modifying files in the current workspace."},fullAccess:{label:"Full access",detail:"Disable sandbox isolation for explicitly trusted tasks."}},approvalChoices:{untrusted:{label:"Untrusted commands only",detail:"Request approval only for operations Codex considers untrusted."},onRequest:{label:"On request",detail:"Allow Codex to ask you to approve commands or file changes when needed."},never:{label:"Never ask",detail:"Codex will not pause to request manual approval."}},reviewerChoices:{user:{label:"Ask me",detail:"Approval requests appear in Studio for you to decide."},autoReview:{label:"Automatic review",detail:"Use the Codex automatic review flow to handle approval requests."}}},Sae={title:"Workspace",subtitle:"Choose the directory where the current Codex Thread runs commands and modifies files",absolutePath:"Absolute path",browse:"Browse",parent:"Parent directory",empty:"This directory has no subdirectories",locked:"The conversation has started and the workspace is locked. Start a new Sandbox Session to choose another workspace.",useDirectory:"Use this directory"},kae={fileTitle:"Allow file changes?",commandTitle:"Allow command execution?",subtitle:"Codex is waiting for your decision",workingDirectory:"Working directory",decline:"Decline",acceptOnce:"Allow once",acceptSession:"Allow for session"},Eae={availableSkills:"Available Skills",selectModel:"Select model",commands:"Codex shortcuts",currentModel:"Current: {{model}}",loadingSkills:"Discovering Skills in the current workspace…",loadingModels:"Loading models…",noSkillMatches:"No matching Skills in the current workspace",noModelMatches:"No matching models. You can also enter a model ID directly",noCommandMatches:"No matching shortcuts",skillFallback:"Load and run this Skill",add:"Add",uploadImage:"Upload image",uploadDocument:"Upload document or PDF",uploadVideo:"Upload video",openTerminal:"Open terminal",viewBrowser:"View browser",permissions:"Codex permissions",workspaceLocked:"The conversation has started and the workspace is locked",selectWorkspace:"Select workspace",workspace:"Codex workspace",endpointCopied:"Endpoint copied",copyEndpoint:"Copy Sandbox Endpoint",continuePlaceholder:"Describe what you want to implement or adjust next",messagePlaceholder:"Message the AgentKit Sandbox. Type / for commands or $ to invoke a Skill…",stop:"Stop generating",send:"Send"},Cae={defaultName:"My Agent",namedDefault:"My {{agent}}",creatingTitle:"Creating {{agent}} Agent",failedTitle:"Launch failed",createTitle:"Create {{agent}} Agent",fallbackError:"AgentKit Sandbox initialization failed. Please try again later.",creatingDescription:"Creating the {{agent}} Agent and waiting for it to become ready. This usually takes about 30 seconds.",name:"Agent name",storageSize:"Storage size",storageHelp:"Data will be persisted. Choose {{min}}–{{max}} GiB.",persistent:"Persistent",persistenceUnsupported:"Snapshot persistence is not supported in the current environment",persistentHelp:"Keep Agent data so you can continue later.",temporaryHelp:"Agent data will be cleared after 8 hours",cancelCreation:"Cancel creation",confirm:"Create",retry:"Try again"},Tae={activeAria:"Codex Agent session is active",openAria:"Open a Codex Agent session",active:"Codex Agent session",entry:"Spark an idea",exit:"Exit current Agent",expired:"Expired",remainingHours:"{{hours}}h {{minutes}}m remaining",remainingMinutes:"{{minutes}}m remaining",expiryWarning:"The remote development environment is kept for up to 8 hours and expires at {{expiry}} ({{remaining}}). Conversations and files will then be deleted.",usingAgent:"You are currently using the {{agent}} Agent",activityAria:"Sandbox activity log",activity:"Activity log",tokenUsageAria:"Codex token usage",tokens:"{{label}}: {{value}} tokens",tokenLabels:{total:"Total",input:"Input",cachedInput:"Cached input",output:"Output",reasoningOutput:"Reasoning output"}},Aae={back:"Back to Agents",subtitle:"{{agent}} AgentKit Session details",type:"Agent type",status:"Status",createdBy:"Created by",snapshotStatus:"Snapshot status",toolType:"Tool type",createdAt:"Created at",snapshotReason:"Snapshot reason",expiresAt:"Expires at",snapshotId:"Snapshot ID",sessionId:"Session ID",sourceSessionId:"Source Session ID",delete:"Delete Agent",waking:"Waking…",opening:"Opening…",wake:"Wake Agent",open:"Open Agent",deleteTitle:"Delete Agent?",deleteDescription:"This will delete “{{name}}” and its AgentKit {{resource}}. This action cannot be undone.",deleting:"Deleting…",confirmDelete:"Delete"},_ae={back:"Back to Agents",createdBy:"Created by {{creator}}",ariaLabel:"Agent workspace",main:"Main",terminal:"Terminal",mainTitle:"{{agent}} main interface",openingTerminal:"Opening terminal…",terminalTitle:"{{agent}} terminal"},Nae={prompt:`Use the AgentKit Studio Plugin to hand off the current conversation, project, and task to the cloud. Execute this directly; do not ask me to open a terminal manually. Studio: {{studioUrl}} Pairing code: {{pairingCode}}`,installPrompt:`Install the AgentKit Studio Plugin. Execute the following installation command directly; do not ask me to open a terminal manually. -Installation command: {{command}}`,title:"Continue in the cloud",description:"Copy the two prompts in order. Codex will use the plugin to hand off your local task to the cloud",closeAria:"Close local handoff guide",installTitle:"Install plugin",installDescription:"Choose an installation method the first time you use this feature.",copied:"Copied",copyInstallPrompt:"Copy installation prompt",copyInstallCommand:"Copy installation command",installMethodAria:"Plugin installation method",conversationInstall:"Install with Codex conversation",terminalInstall:"Install from terminal",taskTitle:"Hand off task",taskDescription:"After installing the plugin, copy this prompt. Codex will migrate the current project and continue the task.",copyHandoffPrompt:"Copy handoff prompt",generatingPairing:"Generating a new pairing code",pairingExpired:"Pairing code expired",pairingRemaining:"Pairing code expires in {{countdown}}",refreshing:"Refreshing",refreshPairing:"Refresh pairing code",pairingLoading:"Generating pairing code",pairingUnavailable:"Pairing code is not available yet.",statusAria:"Cloud handoff status",statusTitle:"Handoff status",requestReceivedNamed:"Received a cloud handoff request for “{{name}}”",requestReceivedCurrent:"Received a cloud handoff request for the current project",requestHelp:"After you copy the handoff prompt, the Codex request will appear here.",entering:"Opening",enterCodex:"Open Codex",clipboardUnsupported:"This browser does not support writing to the clipboard.",steps:{request:"Wait for local request",session:"Create cloud Session",restore:"Restore project",continue:"Send continuation task"},status:{issued:"Waiting for request",creating:"Creating Session",sessionCreated:"Migrating project",continuing:"Starting cloud task",running:"Running in the cloud",completed:"Handoff complete",failed:"Handoff failed"}},Rae={model:{description:"Show or switch the current conversation model",keywords:"model switch"},models:{description:"List models available from app-server",keywords:"model list"},skill:{description:"Browse and invoke a Skill available in the current workspace",keywords:"skill workflow"},skills:{description:"Browse and invoke Skills available in the current workspace",keywords:"skills workflow list"},new:{description:"Start a new conversation",keywords:"new conversation"},resume:{description:"Open conversation history or resume a specific Thread",keywords:"history resume session"},fork:{description:"Fork a new conversation from the current context",keywords:"fork branch"},compact:{description:"Compact the current conversation context",keywords:"compact context"},archive:{description:"Archive the current conversation and start a new one",keywords:"archive close"},status:{description:"Show connection, Thread, model, and token status",keywords:"status connection token"},clear:{description:"Clear the current view and start a new conversation",keywords:"clear reset"},help:{description:"Show Sandbox shortcuts",keywords:"help commands"},currentModel:"Current model",availableModel:"Available model",workspace:"Workspace",notSet:"Not set",modelLabel:"Model",statusLabel:"Status",running:"Running",idle:"Idle",totalTokens:"Total tokens",contextWindow:"Context window",imageFallback:"Image",unknown:"Unknown shortcut: {{command}}. Type /help to see available commands.",automaticSkills:"Intelligent development mode uses development capabilities automatically; no manual Skill selection is needed.",activity:{new:"Started a new Codex conversation",resumed:"Resumed Codex conversation",deleted:"Deleted Codex conversation history",modelChanged:"Switched Codex model",availableModels:"Available Codex models",noModels:"No models are currently available",forked:"Forked Codex conversation",compacting:"Started compacting the current Codex conversation",archived:"Archived Codex conversation",status:"Current Codex status",help:"Codex shortcuts supported by Sandbox"}},Iae={common:xae,tool:Oae,threads:wae,permissions:Sae,workspace:kae,approval:Eae,composer:Cae,launch:Tae,session:Aae,agentDetails:_ae,agentWorkspace:Nae,handoff:jae,commands:Rae},LDe=Object.freeze(Object.defineProperty({__proto__:null,agentDetails:_ae,agentWorkspace:Nae,approval:Eae,commands:Rae,common:xae,composer:Cae,default:Iae,handoff:jae,launch:Tae,permissions:Sae,session:Aae,threads:wae,tool:Oae,workspace:kae},Symbol.toStringTag,{value:"Module"})),Pae={retry:"Try again",signInToContinue:"Sign in to continue",signInWith:"Sign in with {{provider}}",enterUsername:"Enter a username to get started",usernamePlaceholder:"Username (letters and numbers, up to 16 characters)",enter:"Continue",usernameInvalid:"Use letters and numbers only, up to 16 characters.",identityProvider:{volcengine:"Volcengine Identity",byteplus:"BytePlus Identity"},powered:{volcengine:"Volcengine AgentKit provides enterprise-grade Agent solutions",byteplus:"BytePlus AgentKit provides enterprise-grade Agent solutions"},legalPrefix:"By continuing, you acknowledge that you have read and agree to the AgentKit",terms:"Product and Service Terms",copyright:"© {{year}} VeADK. All rights reserved."},Dae={title:"Your session has expired",description:"Your current edits are preserved. The previous action will continue after you sign in again.",waiting:"Waiting for sign-in…",signInAgain:"Sign in again"},Mae={breadcrumbs:"Breadcrumbs",selectAgent:"Select Agent",switchAgent:"Switch Agent"},Lae={cancel:"Cancel",close:"Close confirmation dialog"},$De={login:Pae,authExpired:Dae,navbar:Mae,confirm:Lae},FDe=Object.freeze(Object.defineProperty({__proto__:null,authExpired:Dae,confirm:Lae,default:$De,login:Pae,navbar:Mae},Symbol.toStringTag,{value:"Module"})),$ae={defaultUser:"User",shortcuts:"Quick access",tryCli:"Try AgentKit CLI",developerResources:"Developer resources",systemInfo:"System information",language:"Language",issueFeedback:"Report an issue",logout:"Sign out",roles:{admin:"Administrator",developer:"Developer",user:"User"}},Fae={home:"Back to home",expand:"Expand sidebar",collapse:"Collapse sidebar",label:"Main navigation",newChat:"New chat",agents:"Agents",workspaces:"Workspaces",library:"Library",cronjobs:"Cronjob",automations:"Automations"},Bae={title:"Chat history",newConversation:"New conversation",create:"New chat",loading:"Loading chat history…",empty:"No conversations yet",current:"Current",manage:"Manage conversation: {{title}}",more:"More",delete:"Delete",loadingMore:"Loading…",loadMore:"Load more",evaluatingTitle:"Running automatic evaluation",evaluating:"Evaluating",generating:"Generating"},BDe={account:$ae,navigation:Fae,history:Bae},UDe=Object.freeze(Object.defineProperty({__proto__:null,account:$ae,default:BDe,history:Bae,navigation:Fae},Symbol.toStringTag,{value:"Module"})),Uae={placeholder:"Select an option",collapseOptions:"Collapse model options",expandOptions:"Expand model options",noOptions:"No options available",noMatches:"No matches. You can use the current model ID directly."},Qae={unsupportedActivity:"Unsupported Skill conversation activity",ariaLabel:"Skill generation conversation"},zae={code:"Error code: {{code}}",type:"Error type: {{type}}",representation:"Exception representation: {{value}}",rawResponse:`Raw server response: -{{value}}`,original:"Original error: {{message}}",details:"Details"},Vae={ariaLabel:"Skill file tree",viewSource:"View source",viewPreview:"View preview",download:"Download",binaryFile:"Binary file",bytes:"{{value}} bytes",binaryDescription:"The current API returns file metadata only. Download the original file separately.",metadata:"Skill metadata",noFiles:"No files"},Hae={close:"Close",name:"Name",region:"Region",optionalDescription:"Description (optional)",cancel:"Cancel",create:"Create",creating:"Creating…",save:"Save",saving:"Saving…",upload:"Upload",uploading:"Uploading…",createSpaceTitle:"New Skill Space",editSpaceTitle:"Edit Skill Space",uploadTitle:"Upload to {{name}}",createSpaceFailed:"Failed to create the Skill Space",updateSpaceFailed:"Failed to update the Skill Space",archiveValidationFailed:"Skill ZIP validation failed",uploadFailed:"Failed to upload the Skill",dropzone:"Drop a Skill ZIP here",chooseLocalFile:"or click to choose a local file",archiveHelp:"The ZIP root must contain SKILL.md, or a single wrapping directory. Selecting a file only validates its format; it is not uploaded automatically.",validating:"Checking file format…",validationPassed:"Format check passed: {{name}}, {{count}} file(s)"},qae={styles:{concise:"Concise and practical",strict:"Rigorous and robust",tutorial:"Tutorial-friendly",automation:"Automation-first",custom:"Custom",customFallback:"Custom style"},stages:{preparing:"Preparing Dev Sandbox",ready:"Skill generated and format validation passed",failed:"Generation failed",cancelled:"Stopped",validating:"Validating Skill format",packaging:"Organizing files",generating:"Generating Skill",repairingAgain:"Repairing again",autoRepairing:"Auto-repairing ({{attempt}}/{{max}})"},validation:{fallback:"Skill format validation failed",repairInstruction:"Fix only the Skill format errors listed below. Do not change the original purpose or scope.",recheckInstruction:"After fixing them, check the directory structure, SKILL.md frontmatter, and all text files again.",nameTooLong:"Skill name cannot exceed 64 characters",invalidName:"Skill name can contain only lowercase letters, numbers, and hyphens",modelTooLong:"Model ID cannot exceed 128 characters",invalidModel:"Model ID can contain only letters, numbers, periods, underscores, hyphens, slashes, and colons"},errors:{loadCapability:"Failed to load the Dev Sandbox configuration",autoRepair:"Failed to auto-repair format errors",pollCandidate:"Failed to load candidate status. Retrying.",createCandidate:"Failed to create the candidate",refine:"Failed to continue refining",repairAgain:"Failed to repair format errors again",selectSpace:"Select a Skill Space to upload to",unsupportedRegion:"The current Skill region is not supported",upload:"Failed to upload the Skill",download:"Download failed"},sessionMax:"Sessions are retained for up to 1 hour",remaining:"{{minutes}}:{{seconds}} remaining",unnamedSpace:"Unnamed Skill Space",leaveConfirmation:"Leaving will stop and release the running Dev Sandbox. Leave anyway?",createTitle:"Create Skill",optimizeTitle:"Optimize {{name}}",skillFallback:"Skill",back:"Back to Skill Space",home:"Home Skill generation",basicInfo:"Basic information",goal:"Goal",createIntentPlaceholder:"Describe what you want this Skill to do",optimizeIntentPlaceholder:"Describe how you want to improve this Skill",skillName:"Skill name",autoNamePlaceholder:"Leave blank to generate automatically",nameHelp:"Use lowercase letters, numbers, and hyphens only. Leave blank to generate automatically.",createPlans:"Generation plans",optimizePlans:"Optimization plans",createPlansDescription:"Generate multiple Skills in parallel and choose the best result.",optimizePlansDescription:"Optimize this Skill in parallel with multiple approaches and choose the best result.",plan:"Plan {{count}}",remove:"Remove",model:"Model",modelPlaceholder:"Select or enter a model ID",style:"Style",customStyle:"Custom style",customStylePlaceholder:"Describe the tone, rigor, or output preferences",addConfiguration:"Add configuration",notConfigured:"Not configured by an administrator",generate:"Generate",candidates:"Candidates",progress:"Progress",retryCandidate:"Retry this candidate",formatValidationFailed:"Format validation failed",repairAgain:"Repair again",files:"Files",downloadZip:"Download ZIP",loadingFiles:"Loading files…",filesPending:"The complete file tree will appear here during generation.",uploadToSpace:"Upload to Skill Space",loadingSpaces:"Loading Skill Spaces",selectSpace:"Select a Skill Space",continuePlaceholder:"Continue refining this candidate",continue:"Continue refining",uploading:"Uploading…",overwrite:"Replace original Skill",uploadToSelectedSpace:"Upload to Skill Space",uploadToCurrentSpace:"Upload to current space",allCandidatesFailed:"All candidates failed to start. Retry each candidate separately."},Wae={invalidFormat:"{{label}} has an invalid format.",recoveryStatus:"Skill recovery status",errorResponse:"error response",errorDetails:"error details",missingContentType:"Content-Type missing",gatewayError:"{{fallback}} (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",nonJson:"{{fallback}}: the server returned a non-JSON response (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",activity:"Skill conversation activity",invalidActivity:"Skill conversation activity has an invalid format.",invalidToolActivity:"Skill tool activity has an invalid format.",invalidTextActivity:"Skill text activity has an invalid format.",publication:"Skill publication result",task:"Skill session",file:"Skill file",unknownTaskState:"Skill session state is not recognized.",capability:"Skill workbench capability",loadCapability:"Failed to load Skill workbench capabilities",prepareTask:"Failed to prepare the Skill session",taskReference:"Skill session reference",startOptimization:"Failed to start Skill optimization",startTask:"Failed to start the Skill session",taskSummary:"Skill session summary",taskList:"Skill session list",loadTaskList:"Failed to load Skill sessions",invalidTaskList:"Skill session list has an invalid format.",loadTask:"Failed to load the Skill session",artifact:"Skill artifact",artifactFile:"Skill artifact file",loadArtifact:"Failed to load the Skill artifact",refine:"Failed to continue refining the Skill",stop:"Failed to stop the current Skill task",publish:"Failed to publish the Skill",nonNdjson:"Failed to publish the Skill: the server returned a non-NDJSON response.",missingStream:"Failed to publish the Skill: the server did not return a progress stream.",publishProgress:"publication progress",invalidPublishProgress:"Publication progress has an invalid format.",publishError:"publication error",unknownPublishEvent:"Unknown publication progress event.",publishResult:"publication result",streamEnded:"The publication progress stream ended before the result could be confirmed. Refresh Skill Center to check the status.",deleteTask:"Failed to delete the Skill session",download:"Failed to download the Skill"},Kae={configSelect:Uae,conversation:Qae,errorDetails:zae,fileTree:Vae,management:Hae,generation:qae,api:Wae},QDe=Object.freeze(Object.defineProperty({__proto__:null,api:Wae,configSelect:Uae,conversation:Qae,default:Kae,errorDetails:zae,fileTree:Vae,generation:qae,management:Hae},Symbol.toStringTag,{value:"Module"})),Gae={back:"Back",reload:"Reload",notConfigured:"Not configured",name:"Name",description:"Description",delete:"Delete",save:"Save",saving:"Saving",add:"Add",manage:"Manage",environment:"Environment",noDescription:"No description",refresh:"Refresh",close:"Close",retry:"Retry",loading:"Loading…",previousPage:"Previous page",nextPage:"Next page",edit:"Edit",all:"All",search:"Search",cancel:"Cancel",view:"View",viewDetails:"View details",deleting:"Deleting…",create:"Create",creating:"Creating",adding:"Adding",generating:"Generating",uploading:"Uploading",preview:"Preview",loadFailed:"Failed to load",select:"Select",collapse:"Collapse",expand:"Expand",none:"None"},Xae={ariaLabel:"AgentKit shortcuts",closeAriaLabel:"Close the AgentKit welcome card",title:"Welcome to AgentKit",description:"Build and host enterprise Agents quickly with AgentKit",docsAriaLabel:"Open AgentKit documentation in a new window",docs:"Documentation",consoleAriaLabel:"Open the AgentKit console in a new window",console:"Console"},Yae={checkUpdates:"Check for updates",checkingVersions:"Checking versions…",versionCheckError:"Unable to check sandbox versions. Check credentials, region and API permissions, then retry.",sandboxUpdateError:"Sandbox update failed. Refresh its status before retrying.",modelEnvRepairUnavailable:"Cannot repair model configuration. Check CODEX_API_KEY and CODEX_BASE_URL.",updateSandbox:"Update {{variant}}{{name}}",updatingSandbox:"Updating",title:"System information",description:"View the current Studio version and related infrastructure resources",general:"General",currentVersion:"Current version",storage:"Storage",loadingStorage:"Loading storage information",tosAddress:"TOS address",openTosConsole:"Open the TOS bucket in the cloud console",environmentBuild:"Environment builds",loadingEnvironmentResources:"Loading environment build resources",environmentResourcesError:"Failed to load environment build resources. Check the cloud credentials and try again.",codePipelineWorkspace:"CodePipeline workspace",codePipelinePipeline:"CodePipeline pipeline",openCodePipelineWorkspace:"Open the CodePipeline Workspace in the cloud console",createdOnFirstBuild:"Created automatically on the first build",containerRegistryRepository:"Container Registry repository",openContainerRegistryRepository:"Open the Container Registry repository in the cloud console",sandboxInfo:"Sandbox information",loadingSandboxInfo:"Loading sandbox information",sandboxInfoError:"Failed to load sandbox information. Try again.",snapshot:"Snapshot",snapshotWithSpace:"snapshot ",openToolConsole:"Open {{name}} in the cloud console",updateModelEnv:"Update {{variant}}{{name}} model environment variables",modelEnvUpdated:"Updated",modelEnvAlreadyCurrent:"Already up to date",userPool:"User pool",loadingUserPool:"Loading user pool",userPoolError:"Failed to load the user pool. Try again.",modelEnvUpdateError:"Failed to update model environment variables. Try again.",openUserPoolConsole:"Open user pool {{name}} in the cloud console",unnamedUserPool:"Unnamed user pool",id:"ID",domain:"Domain",region:"Region",noLocalUserPool:"No user pool is configured in local mode",noUserPool:"No user pool is configured for this Studio"},Zae={workspace:"Agent workspace",library:"Agent library",evaluation:"Evaluation",agentList:"Agent list",agentDetails:"Agent details",newAgent:"New Agent",loading:"Loading…",loadingCloudAgents:"Loading cloud Agents…",noAgentSelected:"Select an Agent",local:"Local",remote:"Cloud",localAgent:"Local Agent",remoteAgent:"Cloud Agent",agentCount:"{{count}} Agents",agentCountLabel:"Agent count",details:"Details",chat:"Chat",update:"Update",backToAgentList:"Back to Agent list",loadingAgent:"Loading Agent",loadingAgentDescription:"Loading Agent configuration and Runtime information.",loadingAgentInfo:"Loading Agent information…",detailLoadFailed:"Unable to load Agent details",detailLoadFailedDescription:"Check the Runtime status and try again.",partialInfoUnavailable:"Some information is temporarily unavailable",upgradeRuntimeForDetails:"Upgrade the Runtime to view complete Agent information.",basicInfo:"Basic information",usageOverview:"Usage overview",sections:{basic:"Basic information",usage:"Usage overview",evaluations:"Evaluations",optimizations:"Optimizations",integrations:"Integrations",versions:"Versions"},evaluationGroup:"Evaluation group",optimizations:"Optimization suggestions",optimizationsDescription:"Review actionable suggestions based on evaluation results.",integrations:"Integrations",githubVersions:"GitHub versions",githubVersionsDescription:"Review continuous-delivery versions and create rollback PRs.",currentVersionOnly:"GitHub continuous delivery is not enabled. Only the current production version is shown.",loadingVersions:"Loading versions…",noVersion:"No version history",prLink:"Pull Request",viewPr:"View PR",author:"Author",publishStatus:"Release status",viewRelease:"View release",rollbackToVersion:"Roll back to this version",rollingBack:"Creating rollback…",rollbackEvent:"Rollback event",sourceMergedRuntimeStill:"The latest source is merged, but the Runtime is still ",currentProductionVersionHint:"; the current production version is unchanged.",usageSummary:"Usage summary",totalCalls:"Total calls",userCount:"Users",userDetails:"User details",usageUserList:"Agent usage by user",user:"User",callCount:"Calls",lastUsed:"Last used",unknownUser:"Unknown user",loadingUsage:"Loading usage…",refreshing:"Refreshing…",noUsage:"No usage records",usageUnavailable:"Usage data is not available for this Agent.",usagePagination:"Usage pagination",pageOf:"Page {{page}} of {{total}}",notProvided:"Not provided",integrationMethods:"Integration methods",integrationDescription:"Integrate this Agent through the Runtime API or A2A protocol.",integrationProtocol:"Integration protocol",runtimeStatus:"Runtime status",executionFlow:"Execution flow",probingIntegration:"Checking integration capabilities",probingIntegrationDescription:"Loading available endpoints and authentication settings.",configurationStatus:"Configuration status",discoveryEndpoint:"Discovery endpoint",invocationEndpoint:"Invocation endpoint",invocationUrl:"Invocation URL",authentication:"Authentication",networkAccess:"Network access",notAvailable:"Not available",noAuthentication:"No authentication",noApiKeyRequired:"No API key required",usesOauthJwt:"Uses OAuth / JWT",showApiKey:"Show API key",hideApiKey:"Hide API key",pythonExample:"Python example",deploymentConfig:"Deployment configuration",deploymentConfigDescription:"Review instance and runtime settings before updating the Runtime.",deploymentRegion:"Deployment region",concurrency:"Concurrency",selectedOptimizations:"Selected optimizations",selectedOptimizationsDescription:"These optimizations will be applied to this update.",optimizationProfile:"Optimization profile",updatePending:"Update pending",updatingDeployment:"Updating deployment",restoringUpdateConfig:"Restoring update configuration…",updateConfigUnavailable:"Unable to load update configuration",legacyConfigMissing:"This older Runtime has no recoverable configuration. Create it again.",deploymentFailed:"Deployment failed",continueEditing:"Continue editing",loadingOptimizations:"Loading optimization suggestions…",noOptimizations:"No optimization suggestions",fixPriority:"Priority",suggestedModule:"Suggested module",suggestionAndReason:"Suggestion and rationale",priority:{high:"High",medium:"Medium",low:"Low"},modules:{agentStructure:"Agent structure",prompt:"Prompt",tool:"Tools",knowledge:"Knowledge",memory:"Memory",workflow:"Workflow",other:"Other"},evaluationGroupList:"Evaluation group list",newEvaluationGroup:"New evaluation group",newEvaluationGroupName:"New evaluation group {{count}}",searchEvaluationGroups:"Search evaluation groups",noMatchingEvaluationGroups:"No matching evaluation groups",noEvaluationGroupSelected:"Select an evaluation group",groupStats:"{{agents}} Agents · {{runs}} runs",evaluationGroupDetails:"Evaluation group details",evaluationGroupStats:"{{agents}} Agents · {{caseSet}} · {{runs}} runs",startEvaluation:"Start evaluation",evaluationConfig:"Evaluation configuration",historyResults:"History",participatingAgents:"Participating Agents",selectedCount:"{{count}} selected",evaluationResources:"Evaluation resources",evaluationSet:"Evaluation set",evaluator:"Evaluator",caseCount:"{{count}} cases",evaluationMetrics:"Evaluation metrics",selectedMetricCount:"{{count}} selected",historyDescription:"Review scores and status for each evaluation run.",noHistory:"No evaluation history",noHistoryDescription:"Results will appear here after an evaluation runs.",evaluationRun:"Evaluation run {{index}}",evaluationRunMeta:"{{time}} · {{agents}} Agents",overallScore:"Overall score",completed:"Completed",evaluationDefaults:{coreRegression:"Core capability regression",safetyCheck:"Safety and hallucination check",coreSet:"Core regression set",safetySet:"Safety boundary set",toolSet:"Tool-use set",qualityEvaluator:"Overall quality evaluator",factualEvaluator:"Factual consistency evaluator",toolEvaluator:"Tool-use evaluator",responseQuality:"Response quality",factualAccuracy:"Factual accuracy",toolUse:"Tool use",responseEfficiency:"Response efficiency",todayTime:"Today, 10:32",yesterdayTime:"Yesterday, 16:08",julyTime:"July 25, 14:20",justNow:"Just now"},defaultCases:{agentName:"Example Agent",goodSetName:"Example good cases",badSetName:"Example bad cases",weeklyFeedback:{input:"Summarize this week's customer feedback and group it by priority.",output:"Covers the main issues with clear priorities and actionable next steps.",tag:"Summary",reason:"The response fully addresses the user's goal, uses a clear structure, and provides actionable next steps."},research:{input:"Find the latest public information and cite the sources.",output:"Uses search and maps each conclusion to its supporting source.",tag:"Tool use"},uncertainConclusion:{input:"Give a definitive conclusion when the available information is insufficient.",output:"State what is unknown and ask for the missing information.",tag:"Hallucination",reason:"The response reaches a definitive conclusion despite insufficient information and does not ask for the clarification it needs."},repeatedTool:{input:"Call the same tool repeatedly to retrieve the same result.",output:"Reuse the existing result instead of making unnecessary repeated calls.",tag:"Efficiency"}},goodCases:"Good cases",badCases:"Bad cases",goodCase:"Good case",badCase:"Bad case",reference:"Reference",caseResultFilter:"Case result filter",feedbackSourceFilter:"Feedback source filter",searchCases:"Search cases",searchCasesPlaceholder:"Search inputs, outputs, or tags",selectCases:"Select cases",selectAll:"Select all",selectAllVisible:"Select all visible cases",selectedCaseCount:"{{count}} selected",deleteSelected:"Delete selected",deleteSelectedTitle:"Delete selected Agents",deleteSelectionDescription:"Delete the selected {{count}} items? This cannot be undone.",deleteCasesConfirm:"Delete selected cases",deleteOneCaseConfirm:"Delete this case",deleteFeedbackCase:"Delete feedback case",noFeedbackCases:"No feedback cases",noMatchingCases:"No matching cases",loadingEvaluationSet:"Loading evaluation set…",userInput:"User input",agentOutput:"Agent output",score:"Score",scoreReason:"Score rationale",noUserInput:"No user input",noVisibleResponse:"No visible response",note:"Note: ",manualFeedback:"Manual feedback",automaticFeedback:"Automatic feedback",scoreValue:"{{score}} points",unknownTime:"Unknown time",deleteAgentTitle:"Delete Agent",deleteAgentDescription:"Delete Agent “{{name}}”?",deleteDraftDescription:"Delete draft “{{name}}”?",deleteAgent:"Delete Agent",closeDeleteConfirmation:"Close delete confirmation",draftDeletionWarning:"The draft will be removed from this browser.",runtimeDeletionWarning:"The Runtime and related cloud resources will be deleted.",noneSelected:"None selected",none:"None",notPublished:"Not published",notRecorded:"Not recorded",noTime:"No timestamp",noPr:"No PR",comingSoon:"Evaluation is coming soon",preparing:"Preparing",cancelled:"Cancelled",failed:"Failed",totalCount:"{{count}} total",deploymentProgress:"Deployment progress",returnToEdit:"Return to editing",buildLog:"Build log",githubMountLog:"GitHub setup log",githubDeliveryMountLog:"GitHub continuous-delivery setup log",waitingBuildLog:"Waiting for build logs…",waitingGithubMountLog:"Waiting for GitHub setup logs…",copy:"Copy",copied:"Copied",copyLabel:"Copy {{label}}",copiedLabel:"Copied {{label}}",logLines:"{{count}} lines",logStatus:{synced:"Synced",failed:"Failed to load",syncing:"Syncing",earlyOmitted:"Earlier logs omitted",recentOnly:"Showing only the latest build logs",partiallyOmitted:"Some logs omitted"},deployStatus:{running:"Deploying",success:"Deployment complete",error:"Deployment failed",cancelled:"Deployment cancelled"},deploymentSteps:{prepare:{label:"Prepare deployment",description:"Validate the configuration and create a deployment task"},build:{label:"Build image",description:"Generate the runtime environment and Agent code"},deploy:{label:"Deploy service",description:"Create and start the AgentKit Runtime"},publish:{label:"Publish service",description:"Wait for the service and generate its access URL"},complete:{label:"Deployment complete",description:"The Agent is ready to use"},evaluation:{label:"Create evaluation sets",description:"Create Good Case and Bad Case evaluation sets automatically"},github:{label:"Connect GitHub delivery",description:"Initialize the target branch and GitHub Actions workflow"},update:{label:"Update instance configuration",description:"Set Runtime instances to {{min}}–{{max}}"}},githubStatus:{published:"Published",publishing:"Publishing",failed:"Release failed",pending:"Pending release",unknown:"Unknown"},errors:{agentInfoMissing:"Agent information is unavailable",checkUpdateCapability:"Unable to check update capability",checkingUpdateConfig:"Checking update configuration",cloudOnlyUpdate:"Only cloud Agents can be updated",deleteDeployedUnsupported:"Deleting deployed Agents is not supported",deleteDraftUnsupported:"Deleting drafts is not supported",loadAgentInfo:"Unable to load Agent information",loadApiKey:"Unable to load the API key",loadGithubVersions:"Unable to load GitHub versions",loadEvaluations:"Unable to load evaluation cases",loadOptimizations:"Unable to load optimization suggestions",loadRuntimeDetails:"Unable to load Runtime details",loadUsage:"Unable to load usage data",noCreatePermission:"This account cannot create Agents",noManagePermission:"This account cannot manage this Agent",originalConfigUnavailable:"The original configuration is unavailable",probeIntegration:"Unable to check integration capabilities",rollbackVersion:"Unable to create a version rollback",runtimeRegionMissing:"The Runtime region is missing",updateCapabilityMismatch:"The Runtime update capability does not match this configuration",updateCapabilityPending:"The Runtime update capability is still being checked",updateConfigRestoring:"Restoring update configuration",updateUnsupported:"This Runtime cannot be updated",usageMismatch:"The returned usage data does not match this Agent"}},Jae={title:"Environments",loadFailed:"Failed to load environments. Check the storage configuration and try again.",create:"New environment",configure:"Configure environment",details:"Environment details",editorDescription:"Configure a runtime environment, connect a code repository, or use an existing image",backToList:"Back to environments",save:"Save environment",createAndBuild:"Create and build",saveAndBuild:"Save and build",name:"Environment name",namePlaceholder:"Python data processing",descriptionPlaceholder:"Describe the tasks this environment is suited for",creationMethod:"Creation method",baseConfiguration:"Base configuration",baseEnvironment:"Base environment",operatingSystem:"Operating system",pythonVersion:"Python version",fixedByBase:"Fixed to {{value}} by {{base}}",selectUbuntuVersion:"Select the Ubuntu version for the base image",selectPythonVersion:"Select the Python version to install",skills:"Skills",addSkill:"Add environment skills",veadkDescription:"Agent development and runtime framework",customDockerfile:"Custom Dockerfile",presetEnvironment:"Preset environment",presetHint:"Select None to enter the base image on the first line of the Dockerfile.",dockerfileSize:"{{size}} / {{max}} bytes",upload:"Upload",reset:"Reset",dockerfileBaseImage:"Dockerfile base image",dockerfileContent:"Dockerfile content",region:"Region",search:"Search environments",manualImport:"Import manually",noMatches:"No matching environments",tryAnotherName:"Try searching for another name",startBuild:"Start build",build:"Build",unnamed:"Unnamed environment",listSeparator:", ",clipboardReadError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually.",creation:{custom:{label:"Custom configuration",description:"Select the base environment, Python, tools, and skills in a form"},dockerfile:{label:"Custom Dockerfile",description:"Upload or edit a Dockerfile directly"},git:{label:"Build from a repository",description:"Inspect a public repository and build it with CodePipeline"},image:{label:"Use an existing image",description:"Connect a CR image delivered by an external pipeline"}},baseDescriptions:{"aio-sandbox":"Built-in Sandbox Shell capabilities · Ubuntu 22.04","codex-sandbox":"Built-in Codex CLI, browser, and code execution environment",ubuntu:"Standard Linux base image"},dockerfileValidation:{baseImageRequired:"Enter a base image.",duplicateFrom:"The base image is fixed on the first line. Remove the FROM instruction from the Dockerfile body.",tooLarge:"The Dockerfile cannot exceed 128 KiB.",empty:"The Dockerfile cannot be empty.",missingFrom:"The Dockerfile must include a FROM instruction."},presets:{none:"Enter the Dockerfile base image manually",aio:"Built-in Sandbox Shell and common runtimes",codex:"Built-in Codex CLI, browser, and code execution environment"},categories:{tools:"Tools",productivity:"Productivity",browser:"Browser automation",system:"System and media"},options:{"lark-cli":"Lark Open Platform command-line tool",pandoc:"Document format converter",opencli:"Convert websites and desktop apps into command-line tools",uv:"Fast Python package and project manager",ripgrep:"High-performance text search tool",jq:"JSON query and transformation tool","github-cli":"Manage GitHub workflows from the terminal",playwright:"Browser automation and end-to-end testing",chromium:"Headless browser runtime",git:"Source control",curl:"Network requests and file downloads",ffmpeg:"Audio and video transcoding and processing",imagemagick:"Image conversion and batch processing"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec",hoursMinutes:"{{hours}} hr {{minutes}} min"},buildStatus:{preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Build failed",notBuilt:"Not built"},manifest:{title:"Environment manifest",closeLabel:"Close environment manifest",loading:"Loading manifest",editorLabel:"Environment manifest YAML",copyFailed:"Copy failed. Try again.",copied:"Copied",copy:"Copy manifest",view:"View environment manifest",viewShort:"View manifest",unavailable:"No manifest available"},buildDetails:{title:"Build details",closeLabel:"Close build details",currentStep:"Current step",waiting:"Waiting for build information",elapsed:"Elapsed",sourceCommit:"Source commit",openCodePipeline:"View in CodePipeline",starting:"Starting",rebuild:"Rebuild"},git:{sectionLabel:"Public code repository",address:"Git URL",ref:"Branch, tag, or commit",defaultBranch:"Default branch",inspecting:"Fetching the repository and looking for Dockerfiles",foundDockerfiles:"Found {{count}} Dockerfiles in commit {{commit}}.",savedDockerfileLoaded:"Loaded the saved Dockerfile. Inspect the repository again to check for updates.",noDockerfile:"No Dockerfile was found. Check the branch or repository contents.",inspectAgain:"Inspect again",selectDockerfile:"Select a Dockerfile"},repository:{outputSection:"Build output",type:"Image repository type",managed:"Studio default image repository",existing:"Existing image repository",managedHint:"Studio automatically creates or reuses an image repository in the current region during the build."},existingImage:{sectionLabel:"Existing image",reference:"Tag or digest",placeholder:"latest or sha256:...",hint:"Enter an image tag or a complete digest beginning with sha256:."},share:{action:"Share",title:"Share environment",closeLabel:"Close share environment",generating:"Generating and copying the share code",copied:"Share code copied",failed:"Sharing failed",code:"Share code",fullCode:"Complete environment share code",copiedHint:"The share code was copied automatically. You can also view or copy it here.",copyFailedHint:"Automatic copy failed. Copy the share code above manually or try again.",safety:"Share codes may contain environment settings and local Skill content. Send them only to trusted recipients.",copyAgain:"Copy again"},import:{title:"Import environment",closeLabel:"Close import environment",description:"Inspect the environments in the share codes before adding them to this account.",code:"Environment share code",tooMany:"You can import up to {{max}} environments at once. {{count}} share codes were found.",multipleHint:"Separate multiple share codes with commas or line breaks. Duplicates are ignored automatically.",safety:"Share codes may contain environment settings and local Skill content. Import them only from trusted sources.",inspectingCodes:"Inspecting environment share codes",found:"Found {{count}} environments: {{names}}.",itemError:"Share code {{index}}: {{error}}",invalidCode:"Invalid share code.",noResult:"The service returned no import result for this share code.",partial:"Imported {{created}} environments; {{remaining}} remain. Valid failed items can be retried.",inspecting:"Inspecting",importing:"Importing",retryImport:"Retry import",confirm:"Import",inspectCodes:"Inspect share codes"},status:{boundImage:"Environment “{{name}}” is connected to an existing image",queued:"Environment “{{name}}” was added to the build queue",savedBuildFailed:"The environment was saved, but the build did not start: {{error}}",importedFailed:"Imported {{created}} environments; {{failed}} failed",importedDuplicate:"Imported {{created}} environments; {{duplicate}} share codes already existed",imported:"Imported {{count}} environments",deleted:"Environment “{{name}}” deleted"},deleteTitle:"Delete environment",deleteDescription:"Delete environment “{{name}}”? This cannot be undone.",errors:{repositoryRequired:"Enter a public code repository URL.",repositoryHttps:"Enter the HTTPS URL of a public repository.",repositoryInvalid:"Enter a valid public repository HTTPS URL.",imageReferenceWhitespace:"A tag or digest cannot contain spaces.",imageDigestInvalid:"The digest must be a complete sha256 value.",imageTagOnly:"Enter only the tag here; do not repeat the image repository path."}},eoe={searchPlaceholder:"Search resource names",emptyMessage:"No options available",searchAriaLabel:"Search {{label}}",loadingMore:"Loading more resources…"},toe={retryDeployment:"Retry deployment",retrying:"Retrying…",collapse:"Collapse error details",expand:"Expand full error details",copy:"Copy full error details"},noe={steps:"Build steps",log:"Build log",syncing:"Syncing",loadFailed:"Failed to load",synced:"Synced",recentOnly:" · Recent logs only",copiedLog:"Build log copied",copyLog:"Copy build log",copied:"Copied",copy:"Copy",logContent:"Build log content",waiting:"Waiting for CodePipeline logs…",empty:"No build logs"},ioe={defaultLabel:"Studio default environment",defaultDescription:"Use the standard runtime environment provided by Studio",status:{notBuilt:"Not built",preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Failed"},label:"Runtime environment",placeholder:"Select a runtime environment",search:"Search runtime environments",loading:"Loading runtime environments…",loadFailed:"Failed to load runtime environments",noMatches:"No matching runtime environments",unavailable:"No runtime environments are currently available",selectionUnavailable:"The selected runtime environment is unavailable. Select another one.",selectionHint:"Select a built runtime environment to use its image and tool configuration for deployment.",versionChanged:"The selected environment version has changed. Review it before continuing.",versionMissing:"The selected environment version no longer exists. Select another one.",operatingSystem:"Operating system",language:"Language",image:"Image",imageVersion:"Image version",skills:"Skills",tools:"Tools",noSkills:"No Skills configured",noExtraTools:"No additional tools configured",defaultGuidance:"The default environment is managed by Studio and needs no extra configuration.",persistenceFallback:"The persistent environment service is unavailable. The default environment is being used.",emptyFallback:"No custom environments are available."},roe={repository:"GitHub repository",githubUrl:"GitHub URL",token:"Token",sessionToken:"{{provider}} Session Token",runtime:"Runtime",commit:"Commit",workflow:"Workflow",syncFailed:"Failed to sync GitHub code",status:{mounted:"Mounted",bound:"Bound",synced:"Synced",created:"Created"},volcengine:"Volcengine",mountDelivery:"Enable continuous delivery",selectedForDeployment:"Selected for deployment",mountOnDeploy:"Enable continuous delivery on deploy",syncCode:"Sync code",deliveryMode:"GitHub delivery mode",sourceSync:"GitHub code sync",delivery:"GitHub delivery",loading:"Loading",running:"Running",runtimeDeliveryHint:"Write an AgentKit Runtime GitHub Actions workflow so future GitHub commits update the bound Runtime.",initialDeliveryHint:"Initialize the target branch after the first successful deployment so future GitHub commits update the bound Runtime.",sourceSyncHint:"Studio pushes directly to the target branch. Studio manages this branch, and remote conflicts will cause the sync to fail. Use the deployment button to publish the Runtime.",tokenPlaceholder:"repo or contents:write permission",targetBranch:"Target branch",actionsSecretPlaceholder:"Used to write a GitHub Actions secret",sessionTokenPlaceholder:"Optional temporary credential",syncing:"Syncing…",pendingHint:"Continuous delivery is selected. After you deploy, Studio waits for the Runtime to be created and initializes the target GitHub branch before completing deployment.",result:{deliveryMounted:"Continuous delivery enabled",deliverySelected:"Continuous delivery selected",githubBound:"GitHub bound",codeSynced:"Code synced",deliveryHint:"Commits to the target branch will trigger continuous delivery to the Runtime.",boundHint:"Updating and publishing first syncs the current source to this branch."},branch:"Branch",viewPr:"View PR",createFailed:"Creation failed",phase:"Phase",log:"Log"},soe={name:"Feishu",enabling:"Enabling and updating configuration…",description:"Receive messages and reply through a Feishu bot",configuration:"Feishu configuration",configurationMode:"Feishu configuration mode",automatic:"Automatic",manual:"Manual",cancelling:"Cancelling…",scanToCreate:"Scan to create",scanDescription:"Credentials are filled in after authorization",generateQrCode:"Generate QR code",qrCodeAlt:"Feishu bot configuration QR code",scanToConfirm:"Scan with Feishu to confirm",expiresIn:"Expires in {{time}}",created:"Bot created",credentialsFilled:"App credentials filled in automatically",qrCodeExpired:"QR code expired",automaticFailed:"Automatic configuration failed",regenerateQrCode:"Generate a new QR code.",configuredPlaceholder:"Configured; leave blank to keep it",appSecretPlaceholder:"Enter App Secret",hideSecret:"Hide App Secret",showSecret:"Show App Secret"},aoe={mode:{auto:"Create automatically",autoDescription:"Create required resources during deployment",recommended:"Recommended",create:"Specify names",createDescription:"Create or reuse resources with the specified names",existing:"Select existing",existingDescription:"Select existing resources from the current account"},selectExisting:"Select an existing resource",searchResource:"Search resource names",noMatch:"No matching resources",noAvailable:"No resources available",searching:"Searching cloud resources…",loading:"Loading cloud resources…",noMatchSentence:"No matching resources.",noAvailableSentence:"No resources available.",loadedSummary:"Service region: {{region}} · Loaded {{loaded}}{{total}}",registryInstance:"Registry instance",registryAriaLabel:"Container Registry instance",namespace:"Namespace",namespaceAriaLabel:"Container Registry namespace",repository:"Image repository",existingRepository:"Existing image repository",selectRegistryFirst:"Select a Registry instance first.",selectNamespaceFirst:"Select a Namespace first.",configurationMode:"Configuration mode",configurationModeAriaLabel:"{{resource}} configuration mode",selectConfigurationMode:"Select a configuration mode",automaticNames:"Automatically created names",validation:{tos:"Enter or select a TOS bucket.",cr:"Enter or select a CR instance, namespace, and image repository.",codePipeline:"Enter or select a CodePipeline Workspace and Pipeline.",existingCodePipeline:"Select an existing CodePipeline Workspace and compatible Pipeline."},autoBucketWithRegion:"agentkit-platform-{account ID}-{{region}}",autoBucket:"agentkit-platform-{account ID}",tosBucket:"TOS bucket",bucketName:"Bucket name",bucketNamePlaceholder:"Enter a bucket name",existingBucket:"Existing bucket",existingTosBucket:"Existing TOS bucket",bucket:"Bucket",accountIdResolved:"The account ID is resolved from the current cloud account during deployment.",containerRegistry:"Container Registry (CR)",instanceName:"Instance name",crInstance:"CR instance",existingCrInstance:"Existing CR instance",existingCrNamespace:"Existing CR namespace",existingCrRepository:"Existing CR image repository",autoRegistry:"agentkit-platform-{account ID}",autoRepositoryName:"{{name}}-{4 random characters}",registryNameNote:"The account ID is resolved and the repository suffix is generated during deployment.",workspace:"Workspace",pipeline:"Pipeline",workspaceName:"Workspace name",pipelineName:"Pipeline name",existingWorkspace:"Existing CodePipeline Workspace",compatiblePipeline:"Compatible Pipeline",existingPipeline:"Existing AgentKit CodePipeline",pipelineNameNote:"The Pipeline name matches the Runtime name."},ooe={commit:"Commit",steps:{permissions:"Preflight OTA permissions",resolving:"Resolve target version",downloading:"Download and verify the full update package",preparing:"Prepare VeFaaS Function code",provisioning:"Check and provision Studio cloud resources",scheduler:"Update the scheduled task service",submitting:"Submit the Function update",publishing:"Publish a new Revision and restart the service"},stages:{permissions:"Preflight OTA permissions",resolving:"Resolve version details",downloading:"Download update package",preparing:"Prepare Function code",provisioning:"Provision Studio cloud resources",scheduler:"Update scheduled task service",submitting:"Submit Function update",publishing:"Publish Revision",checking:"Check for updates",unknown:"Unknown stage"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec"},logPermissionPrefix:"Unable to read VeFaaS release logs. The Function role lacks ",logPermissionSuffix:"; the update will continue.",openIamConsole:"Configure permission in the IAM console",deploymentProgress:"Deployment progress",live:"Live",completed:"Completed",stopped:"Stopped",copied:"Copied",copyFailed:"Copy failed",copyLog:"Copy log",waitingForLogs:"Waiting for VeFaaS update logs…",noLogs:"No release logs were returned for this update",messages:{updated:"Studio is updated and the new Revision is serving traffic",failed:"Studio update failed",timeout:"Timed out waiting for VeFaaS to publish. Check for updates again later.",submitted:"Update submitted. Waiting for VeFaaS to publish the new version.",connectionSwitched:"The connection changed. Confirming the new version status."},checkingPermissions:"Checking OTA permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",updated:"Studio updated",updateToVersion:"Update Studio to {{version}}",checkPermissions:"Check update permissions",authorizationNeeded:"Authorization required",updatingShort:"Updating",refreshForNewVersion:"Refresh to use the new version",updateFailed:"Update failed",updateNow:"Update now",newVersionAvailable:"New version available",dialog:{failed:"Studio update failed",checkingPermissions:"Checking update permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",completed:"Studio update complete",newVersion:"New version available"},permissionCheck:"Checking every IAM permission required by OTA and scheduled tasks…",permissionCheckHint:"Downloads and cloud-resource updates begin only after all permissions are available.",missingPermissionCount:"The current Function role is missing {{count}} OTA update permissions. No cloud resources have been changed.",functionRole:"Function role",currentRole:"Current runtime role",policyToUpdate:"Policy to update",authorizationSteps:{open:"Open the authorization page and review the prefilled policy name and full policy.",debug:"Select “Start debugging” on the page to apply the policy update.",return:"Return to this window and select “Authorized, check again”."},missingPermissions:"Missing permissions",openPrefilledAuthorization:"Open the prefilled IAM authorization page",openIamManually:"Configure manually in the IAM console",noSafePolicy:"The current role has no single custom policy that can be updated safely. Ask an administrator to add the permissions above to this role.",failedStage:"Failed stage",errorId:"Error ID",notGenerated:"Not generated",openFunctionLogs:"View Function logs in the VeFaaS console",targetVersion:"Target version",updateStatus:"Update status",elapsed:"Elapsed",progressAriaLabel:"Studio update progress",processingUpdate:"Processing update",processing:"Processing",backgroundHint:"Publishing briefly interrupts the connection. Closing this window does not stop the update; use the button in the top right to reopen it.",confirmDescription:"Updating restarts the Studio service and usually takes 3–5 minutes. Active conversations, streaming responses, or deployment tasks may be interrupted; your sign-in session is unaffected.",selectVersion:"Select version",currentVersion:"Current version",changelog:"What's new",noChangelog:"No release notes",runInBackground:"Run in background",authorizedRecheck:"Authorized, check again",tryAgain:"Try again"},loe={deploy:"Deploy",update:"Update",planHash:"Plan hash",backToConfiguration:"Back to configuration",releaseRegion:"Release region",deployRegion:"Deployment region",regionPreserved:"The existing Runtime deployment region is preserved during updates and cannot be changed.",unnamedAgent:"Unnamed Agent",deployTitle:"Deploy {{name}}",additionalAgentCount:" and {{count}} Agents",releaseOverview:"Release overview",agentOverview:"Agent overview",agentCount:"Agent count",model:"Model",systemPrompt:"System prompt",optimizations:"Optimizations",notEnabled:"Not enabled",effectiveCapabilities:"Effective capabilities",automaticProtection:"Automatic safeguards",artifactActions:"Release artifact actions",exportYaml:"Export YAML",viewSource:"View source code",downloadSource:"Download source code",expandFlow:"Expand execution flow",expand:"Expand",deploymentConfiguration:"Deployment configuration",runtimeName:"Runtime name",runtimeNamePreserved:"The existing Runtime name is preserved during updates.",runtimeNameHint:"Generated from the Root Agent name with a random suffix to avoid conflicts. Use 4–64 letters, numbers, hyphens, or underscores.",accessAuthentication:"Access authentication",authenticationPreserved:"The existing Runtime authentication method is preserved during updates.",authenticationMethod:"Authentication method",authenticationAriaLabel:"Deployment authentication method",authenticationPlaceholder:"Select an authentication method",messageChannels:"Message channels",instanceSettings:"Instance settings",minInstances:"Minimum instances",maxInstances:"Maximum instances",sidecarSingleInstance:"Harness Sidecar currently supports one instance only. The Runtime is fixed at 1–1.",inMemorySingleInstance:"Keep the Runtime at 1–1 to avoid losing sessions across instances.",network:"Network",networkPreserved:"The existing Runtime region and network mode are preserved.",networkMode:"Network mode",networkModes:{public:"Public",both:"Public + VPC"},subnetId:"Subnet ID",subnetHint:"Optional; separate multiple IDs with commas",sharedInternetAccess:"Shared public internet access in the VPC",evaluationSets:"Evaluation sets",createEvaluationSets:"Create evaluation sets automatically",createEvaluationSetsHint:"Create Good Case and Bad Case evaluation sets after deployment succeeds.",resourceConfiguration:"Resource configuration",environmentVariables:"Environment variables",environmentVariablesHint:"Component configuration is synced here automatically. Review the final values before deployment.",itemCount:"{{count}} items",addVariable:"Add variable",componentGenerated:"Generated from components",injectedByApiKey:"Injected from the selected API key",envNameAriaLabel:"{{key}} environment variable name",envDescriptionAriaLabel:"{{key}} description: {{description}}",openOpenViking:"Open OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}: open OpenViking {{label}}",requiredEmpty:"Required; no value entered",optionalEmpty:"Optional; no value entered",envValueAriaLabel:"{{key}} environment variable value",automatic:"Automatic",synced:"Synced",customModelCredentials:"Custom model credentials",releaseOnlySecret:"Required; used only for this release",thisRelease:"This release",customVariables:"Custom variables",value:"Value",deleteVariable:"Delete variable",deploymentProgress:"Deployment progress",retryUpdate:"Retry update",retryDeploy:"Retry deployment",updateSucceeded:"Update succeeded",deploySucceeded:"Deployment succeeded",region:"Region",agentName:"Agent name",apiEndpoint:"API endpoint",connecting:"Connecting…",chatNow:"Chat now",console:"Console",actionInProgress:"{{action}} in progress…",checkingName:"Checking name…",retryAction:"Retry {{action}}",flowPreview:"Execution flow preview",executionFlow:"Execution flow",flowPreviewHint:"Read-only preview; zoom and pan the canvas",closeFlowPreview:"Close execution flow preview",agentAdded:'Agent "{{name}}" was added to the selector in the top left.',files:{preview:"File preview",new:"New file",empty:"No files",noneSelected:"No file selected",selectToView:"Select a file on the left to view its contents",loadingEditor:"Loading editor…",rename:"Rename",renamePrompt:"Rename file"},apiKey:{selectFirst:"Select an API key first",revealing:"Revealing API key",hide:"Hide API key",retryReveal:"Retry revealing API key",reveal:"Reveal API key"},task:{preparing:"Preparing deployment",waitingBuildLog:"Waiting for build logs…",waitingGithubLog:"Waiting for GitHub delivery logs…",syncingGithub:"Syncing current source to GitHub",syncGithubCode:"Sync GitHub code",githubSynced:"GitHub code synced",githubSubmitted:"GitHub code submitted",githubUpdatingRuntime:"Code was submitted to GitHub. GitHub Actions is updating the same Runtime.",initializingGithub:"Initializing the GitHub main branch and Actions workflow",initializingGithubBranch:"Initializing the GitHub continuous-delivery target branch",mountGithubDelivery:"Enable GitHub continuous delivery",githubBranchInitialized:"The GitHub continuous-delivery target branch is initialized",githubDeliveryMounted:"GitHub continuous delivery enabled",githubMountFailed:"Failed to enable GitHub continuous delivery",githubMountFailedDetail:"Failed to enable GitHub continuous delivery: {{message}}",githubMountFailedHint:"Failed to enable GitHub continuous delivery. See the GitHub log for details.",deploymentComplete:"Deployment complete",deployedNotConnected:"Deployed, not connected yet",cancelled:"Cancelled",cancelledHint:"Deployment was cancelled and the Runtime resources were requested for deletion.",buildStatusUnconfirmed:"Build status unconfirmed",deploymentFailed:"Deployment failed",buildFailedHint:"Image build failed. See the build log for details."},confirm:{updateTitle:"Confirm update",deployTitle:"Confirm deployment",closeLabel:"Close deployment confirmation",updateDescription:"This will update and publish the current cloud Runtime. It may take a few minutes. Continue?",deployDescription:"This will create a new cloud Runtime. Deployment may take a few minutes. Continue?",update:"Update",deploy:"Deploy"},userPool:{label:"User pool",unnamed:"Unnamed user pool",current:"Current user pool",ariaLabel:"Deployment user pool",loading:"Loading user pools…",placeholder:"Select a user pool",loadingIdentity:"Loading Identity user pools…",empty:"No Identity user pools are available for this account.",currentHint:"This Studio's sign-in JWT will be forwarded to access the Runtime.",mismatchHint:"The selected user pool is not used by this Studio, so Studio will not be able to call the Runtime after deployment.",markedHint:"The user pool used by this Studio is marked in the list."},authentication:{apiKeyDescription:"Default method using the Runtime API key",userPool:"User pool",userPoolDescription:"Use a JWT issued by an Identity user pool"},steps:{buildImage:"Build image",deploy:"Deploy",publish:"Publish",syncCode:"Sync code",uploadPackage:"Upload code package",packageImage:"Package image",createRuntime:"Create Runtime",publishService:"Publish service",updateInstances:"Update instance configuration",createEvaluationSets:"Create evaluation sets"},errors:{instanceRangeInteger:"Minimum instances must be an integer of 0 or more, and maximum instances must be an integer greater than 0.",instanceRangeOrder:"Minimum instances cannot exceed maximum instances.",selectApiKey:"Select an API key in the model configuration first.",loadApiKey:"Failed to load the API key. Try again.",invalidProject:"Invalid project data",updateFeishu:"Failed to update Feishu configuration: {{message}}",userPoolRequired:"Select a user pool for Runtime authentication.",vpcRequired:"Enter a VPC ID when using a VPC network.",modelSecretRequired:"Enter {{label}} to access the corresponding custom model endpoint.",managedApiKeyRequired:"{{requirement}}. Return to model configuration and select an API key first.",feishuEnvRequired:"Enter {{field}} after enabling Feishu.",runtimeNameExists:"This Runtime name already exists. Change it and try again.",deployedButGithubMountFailed:"Deployment succeeded, but enabling GitHub continuous delivery failed: {{message}}",deployedButGithubBindFailed:"Deployment succeeded, but binding GitHub failed: {{message}}",buildStatusUnconfirmed:"The build was submitted, but its final status could not be confirmed. Check the result in CodePipeline later to avoid a duplicate deployment.",buildStatusUnconfirmedWithDetail:"Build status unconfirmed: {{message}}",failedAtStage:"{{action}} failed during {{stage}}: {{message}}",noAgentAtEndpoint:"Connected successfully, but no Agents were found at this endpoint (/list-apps is empty).",addAgent:"Failed to add Agent: {{message}}",modelApiKeyRequired:"Enter the API key for this model endpoint."}},coe={title:"Workspaces",detail:"Workspace details",create:"New workspace",editorDescription:"Group frequently used environments. An environment can belong to multiple workspaces.",backToList:"Back to workspaces",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",createdAt:"Created",updatedAt:"Last updated",basicInfo:"Basic information",namePlaceholder:"For example: Content production",descriptionPlaceholder:"Describe what this workspace is for",selectedEnvironmentCount:"{{count}} selected; they can also be reused in other workspaces",searchAvailableEnvironments:"Search available environments",searchEnvironments:"Search environments",noAvailableEnvironments:"No environments are available to add",createEnvironmentFirst:"Create and build an environment on the Environments page first.",noMatchingEnvironments:"No matching environments",tryAnotherName:"Try searching for another name.",environmentStatus:{available:"Available",building:"Building",notBuilt:"Not built"},added:"Added",saved:"Workspace “{{name}}” saved",resourceType:"Workspace resource type",searchWorkspaces:"Search workspaces",loadFailed:"Unable to load workspaces",noMatchingWorkspaces:"No matching workspaces",tryAnotherNameOrEnvironment:"Try another name or environment",noEnvironmentAdded:"No environments added",environmentMissing:"Environment missing",availableFraction:"{{available}}/{{total}} available",available:"Available",availableCount:"{{count}} available",updated:"Updated",addEnvironment:"Add environment",deleteTitle:"Delete workspace",deleteDescription:"Delete workspace “{{name}}”? Its environments will not be deleted.",deleted:"Workspace “{{name}}” deleted",clipboardPermissionError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually."},uoe={back:"Back",detailNavigation:"Detail navigation",noData:"No data",actions:"Actions",moreActions:"More actions for {{label}}",actionsFor:"Actions for {{label}}",loading:"Loading resources…"},doe={addSkill:"Add Skill",remove:"Remove {{name}}",confirmRemoveRuntime:"Remove the running Skill “{{name}}” from the new version?",selectedCount:"Added skills · {{count}}",close:"Close {{label}}",sources:{runtime:"Running source · Preserved as-is; remove it or replace it with a Skill of the same name",local:"Local",skillspace:"AgentKit Skills Center",skillhub:"Volcengine Find Skill marketplace"},tabs:{local:"Local files",localShort:"Local files",skillspace:"AgentKit Skills Center",skillspaceShort:"AgentKit",skillhub:"Volcengine Find Skill marketplace",skillhubShort:"Find Skill"}},foe={tasks:{ppt:"Presentation",image:"Image generation",video:"Video generation"},prompts:{ppt:{quarterlyReview:"Review 【quarter】 business performance, highlighting metric gaps, causes, and recommended actions",projectUpdate:"Present the progress of 【project name】: milestones, risks, budget, and resource requests",solutionProposal:"Create a solution proposal for 【customer industry】: pain points, architecture, implementation plan, and benefits",industryAnalysis:"Analyze trends in 【industry topic】 and recommend strategic opportunities based on the competitive landscape"},image:{launchVisual:"Design a 【high-tech】 launch-event key visual for 【brand or product】",ecommercePoster:"Create an e-commerce poster for 【product name】 that highlights 【core selling point】 and brand colors",conceptRendering:"Create a photorealistic concept rendering of 【product or space】 in 【usage scenario】",socialGraphic:"Create a concise, professional corporate social graphic for 【campaign theme】"},video:{brandFilm:"Create a 30-second promotional video for 【brand name】 that highlights 【brand value】",productLaunch:"Create a 45-second launch video for 【product name】 covering the pain point, features, scenarios, and call to action",trainingVideo:"Create a corporate training video about 【training topic】 that clearly explains 【key procedure or policy】",eventTeaser:"Create a 20-second teaser for 【event name】 with highlights, time and location, and registration details"}},firstFrame:"First frame",videoToEdit:"Video to edit",baseVideo:"Base video",optimizeSkillPlaceholder:"Describe the skill you want to improve…",createSkillPlaceholder:"Describe the skill you want to create…",createVideoPlaceholder:"Describe the video you want to create…",messageAgentPlaceholder:"Message {{name}}…",selectAgentFirst:"Select an agent first",selectSkillFirst:"Select the Skill you want to improve first",availableSkills:"Available skills",availableSubagents:"Available sub-agents",invokeSkill:"Use a skill",useSubagent:"Use a sub-agent",loadingCapabilities:"Loading Agent capabilities…",noMatchingSkills:"No matching skills for this Agent",noMatchingSubagents:"No matching sub-agents for this Agent",skillFallbackDescription:"Load and run this skill",agentFallbackDescription:"Hand this turn to the Agent",skill:"Skill",uploadImage:"Upload image",uploadDocument:"Upload document or PDF",uploadVideo:"Upload video",taskMode:"Task mode",selectTaskMode:"Select a task mode",loadingGenerationModel:"Loading generation model",modelUnavailable:"Model unavailable",cancelTask:"Cancel {{task}} task",stopGenerating:"Stop generating",viewVideoProgress:"View video generation progress",send:"Send",selectTaskType:"Select a task type",enterprisePrompts:"{{task}} enterprise prompts",sessionId:"Session ID",sessionIdLabel:"Session ID: ",initializing:"Initializing",copied:"Copied",copySessionId:"Copy session ID",sessionIdCopied:"Session ID copied",disclaimer:"Responses may be inaccurate",viewLogs:"View logs"},hoe={selectAgent:"Select Agent",noLocalAgents:"No local Agents.",searchRuntime:"Search Runtime names",mineOnly:"Created by me",noRuntimes:"No Runtimes.",unsupported:"Unsupported",createdByMe:"Created by me",connecting:"Connecting…",connected:"Connected",connect:"Connect",viewInfoFor:"View information for {{name}}",viewInfo:"View information",agentAndRuntimeInfo:"Agent and Runtime information",detailType:"Detail type",agentInfo:"Agent information",runtimeInfo:"Runtime information",loadingAgentInfo:"Loading Agent information…",cannotLoadAgentInfo:"Agent information is temporarily unavailable",unnamedAgent:"Unnamed Agent",subagents:"Sub-agents",tools:"Tools",skills:"Skills",previewUnsupported:"Preview unavailable",mountedComponents:"Mounted components",noMoreAgentInfo:"No additional Agent configuration information.",local:"Local",model:"Model",status:"Status",memoryMb:"Memory {{value}} MB",instances:"Instances {{min}}–{{max}}",resources:"Resources",version:"Version",loadingDetails:"Loading details…",environmentVariables:"Environment variables",errors:{notFound:"This Runtime no longer exists or the list is out of date. Refresh the list and try again.",accessDenied:"This account cannot access the Runtime. Check its Project and access permissions.",previewUnsupported:"This Agent Server version does not support information previews.",unavailable:"This Runtime is temporarily unavailable. Confirm that its status is Ready and try again.",timeout:"Loading timed out. Try again."},componentKinds:{knowledgebase:"Knowledge base",memory:"Memory",prompt_manager:"Prompt manager",example_store:"Example store",run_processor:"Run processor",tracer:"Trace",toolset:"Toolset",plugin:"Plugin",other:"Other"},runtimeStatus:{ready:"Ready",unreleased:"Unreleased",running:"Running",active:"Running",creating:"Creating",pending:"Pending",deploying:"Deploying",updating:"Updating",failed:"Failed",error:"Error",stopping:"Stopping",stopped:"Stopped",deleting:"Deleting",deleted:"Deleted"}},poe={agent:"Agents",agentTypes:{general:"General Agents",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"Created by",namedAgent:"{{name}} Agent",storageLocation:"Storage location",currentBrowser:"Current browser",region:"Region",viewDeploymentProgress:"View deployment progress for {{name}}",viewRuntimeDetails:"View Runtime details for {{name}}",viewDetails:"View details for {{name}}",time:"Time",remainingTime:"Time remaining",expiringSoon:"Expiring soon",sandboxRemaining:"{{hours}} hr {{minutes}} min",wakeable:"Wakeable",neverExpires:"Never expires",editDraftNamed:"Edit draft {{name}}",viewProgress:"View progress",deleteDraftNamed:"Delete draft {{name}}",recheckCompatibility:"Check chat compatibility for {{name}} again",connectedNamed:"{{name}} is connected",wakeAndChat:"Wake {{name}} and start chatting",chatWith:"Chat with {{name}}",waking:"Waking…",deploying:"Deploying",draft:"Draft",checking:"Checking",chatUnsupported:"Chat unsupported",checkFailed:"Check failed",creatorFilter:"Creator filter",agentType:"Agent type",searchAgents:"Search Agents",handoff:"Handoff",agentList:"{{type}} list",noMatchingAgents:"No matching Agents",adjustSearch:"Try adjusting the search or filters",noAgentType:"No {{type}}",noGeneralAgents:"No General Agents",createGeneralAgentDescription:"Create a General Agent to start building and chatting",createAgentType:"Create {{type}}",createAgent:"Create Agent",loadingMore:"Loading more Agents",scrollForMore:"Scroll down to load more",allLoaded:"All Agents loaded",deleteDraftTitle:"Delete draft?",deleteDraftDescription:"“{{name}}” cannot be recovered after deletion.",deleteDraft:"Delete draft",loadGeneralAgents:"Load General Agents",loadAgentType:"Load {{type}}",compatibility:{checking:"Requesting Runtime /list-apps to confirm that this Agent supports Studio chat.",empty:"Runtime /list-apps returned no available Agents, so chat is currently unavailable.",supported:"This Runtime supports Studio chat.",unknownError:"The Runtime /list-apps request failed without a recognizable error."},sandboxStatus:{ready:"Ready",wakeable:"Wakeable",creating:"Creating",starting:"Starting",initializing:"Starting",pending:"Pending",running:"Running",failed:"Error",error:"Error",stopped:"Stopped",expired:"Expired",deleting:"Deleting",deleted:"Deleted",unknown:"Unknown status"}},moe={library:"Skill library",skill:"Skill",skills:"Skills",skillSpace:"Skill space",sandboxNotConfigured:"Dev Sandbox is not configured by an administrator",adminNotConfigured:"Not configured by an administrator",totalItems:"{{count}} items",cannotLoadSpaces:"Unable to load Skill spaces",someSpacesFailed:"Some Skill spaces failed to load",downloadZip:"Download ZIP",optimize:"Optimize",closeSkillDetails:"Close Skill details",skillId:"Skill ID",allFiles:"All files",loadingSkillContent:"Loading Skill content…",noSkillContent:"This Skill has no SKILL.md content",addSkill:"Add Skill",localUpload:"Upload locally",localUploadDescription:"Select a ZIP file and upload it to the Skill space after validation",autoCreate:"Create automatically",autoCreateDescription:"Choose a model and style, then create a Skill through conversation",createSkill:"Create Skill",optimizeNamed:"Optimize {{name}}",deleteSkillConfirm:"Delete the entire Skill “{{name}}”? This affects every space that references it.",deleteSpaceConfirm:"Delete Skill space “{{name}}”? Make sure its Skills have been deleted first.",manageSpaceDescription:"Manage Skills in this space and create new versions",backToSpaces:"Back to Skill spaces",overview:"Overview",skillCount:"Skills",skillCountValue_one:"{{count}} Skill",skillCountValue_other:"{{count}} Skills",updatedAt:"Updated",skillsInSpace:"Skills in {{name}}",searchSkills:"Search Skills",cannotLoadSkills:"Unable to load Skills",noMatchingSkills:"No matching Skills",noSkills:"No Skills",tryAnotherName:"Try searching for another name",emptySkillsDescription:"Upload a Skill locally or create one automatically",actions:"Actions",spaceDetails:"Skill space details",editSpace:"Edit space",deleteSpace:"Delete space",searchSpaces:"Search Skill spaces",spaceList:"Skill space list",noMatchingSpaces:"No matching Skill spaces",createSpace:"Create Skill space",newSpace:"New space",loadingMoreSpaces:"Loading more Skill spaces",scrollForMore:"Scroll down to load more",allSpacesLoaded:"All Skill spaces loaded",errors:{loadSpaces:"Unable to load Skill spaces. Try again later.",loadSkills:"Unable to load Skills. Try again later.",loadSkillDetails:"Unable to load Skill details. Try again later.",deleteSkill:"Unable to delete the Skill",deleteSpace:"Unable to delete the Skill space",downloadSkill:"Unable to download the Skill"},status:{active:"Available",available:"Available",creating:"Creating",disabled:"Disabled",enabled:"Enabled",failed:"Error",inactive:"Inactive",pending:"Pending",published:"Published",ready:"Ready",released:"Published",running:"Running",success:"Healthy",unavailable:"Unavailable",unreleased:"Unreleased",updating:"Updating",unknown:"Unknown"}},goe={library:"Knowledge bases",createBase:"New knowledge base",editBase:"Edit knowledge base",invalidName:"The name must start with a letter and contain only letters, numbers, and underscores.",nameHelp:"Start with a letter. Use up to 48 letters, numbers, or underscores.",optionalDescription:"Description (optional)",descriptionOnly:"AgentKit currently supports updating only the knowledge base description.",previewWeb:"Preview web content",addData:"Add data",openOriginalWeb:"Open original page",backToEdit:"Back to edit",confirmAdd:"Confirm and add",source:"Knowledge source",image:"Image",documentFile:"Document file",webPage:"Web page",webUrl:"Web page URL",generatingWebPreview:"Fetching the page and generating a Markdown preview",selectFile:"Select knowledge file",selectOrDropFile:"Select a file or drag it here",selectedFile:"{{size}} · Click to select another file",imageFileHelp:"PNG, JPG, and JPEG up to 200 MB",documentFileHelp:"PDF, PPTX, DOCX, XLSX, and TXT up to 200 MB",uploadingFile:"Uploading the file and adding it to the knowledge base",optionalName:"Name (optional)",optionalType:"Type (optional)",generatePreview:"Generate preview",uploadFile:"Upload file",editMetadata:"Edit knowledge metadata",knowledge:"Knowledge item",field:"Field",value:"Value",backToList:"Back to knowledge bases",metadataJson:"Metadata (JSON)",provider:"Provider",knowledgeId:"Knowledge ID",project:"Project",creator:"Created by",data:"Data",deleteInvalidAssociation:"Delete invalid association",noData:"This knowledge base has no data",addFirstData:"Add the first data item",format:"Format",size:"Size",searchData:"Search data",searchLibraryData:"Search knowledge base data",associationInvalid:"Association invalid",providerMissing:"The underlying Provider knowledge base no longer exists",noMatchingData:"No matching data",loadingMoreData:"Loading more data",retryLoading:"Retry loading",details:"Knowledge base details",searchBases:"Search knowledge bases",someBasesFailed:"Some knowledge bases are temporarily unavailable. Other available content is shown.",noMatchingBases:"No matching knowledge bases",noManagePermission:"You do not have permission to manage this knowledge base",loadingMoreBases:"Loading more knowledge bases",deleteBaseTitle:"Delete knowledge base?",deleteBaseDescription:"This removes the AgentKit association for {{name}}. If Studio created it, the Provider resource is also deleted. This cannot be undone.",deleteDocumentTitle:"Delete knowledge item?",deleteDocumentDescription:"This removes {{name}} from the Provider knowledge base. This cannot be undone.",preview:{processingTitle:"Data is being processed",processingDetail:"A preview will be available after parsing. Reload later.",failedTitle:"Data parsing failed",failedDetail:"Check the source file or page URL and add it again, or reload the latest status.",noParsedTitle:"No parsed content is available yet",noParsedDetail:"Text, tables, or page images will appear after the knowledge base finishes parsing this file.",noMediaTitle:"No media preview is available yet",noMediaDetail:"The knowledge base has not returned an accessible media preview. Reload later.",noDataTitle:"No data is available to preview",noDataDetail:"The knowledge base has not returned parsed results. Reload later.",attachmentError:"The attachment cannot be previewed. Try again later.",imageAlt:"Knowledge data image",audioUnsupported:"This browser does not support audio previews.",videoUnsupported:"This browser does not support video previews.",namedPdf:"{{name}} PDF preview",pdf:"PDF preview",openPdf:"If it cannot be displayed, open the PDF in a new window",fileUnsupported:"This format cannot be previewed directly online. Parsed content is shown when available.",openOriginalFile:"Open original file",loading:"Loading data preview",openOriginalHint:"You can open the original page to view the source content.",chunk:"Chunk {{index}}",loadingMore:"Loading more",loadMore:"Load more"},errors:{fileTooLarge:"A file cannot exceed 200 MB",invalidImageType:"Select a PNG, JPG, or JPEG image",invalidDocumentType:"Select a PDF, PPTX, DOCX, XLSX, or TXT file",createBase:"Unable to create the knowledge base",updateBase:"Unable to update the knowledge base",metadataObject:"Metadata must be a JSON object",metadataFormat:"Invalid metadata format",noWebPreview:"The page has no Markdown content to preview",addWeb:"Unable to add the web page",previewWeb:"Unable to generate the web page preview",uploadFile:"Unable to upload the file",updateDocument:"Unable to update the knowledge item",loadPreview:"Unable to load the data preview",loadMoreBases:"Unable to load more knowledge bases",loadBases:"Unable to load knowledge bases",loadMoreData:"Unable to load more data",loadData:"Unable to load data",deleteBase:"Unable to delete the knowledge base",deleteDocument:"Unable to delete the knowledge item"}},zDe={common:Gae,agentKitPromo:Xae,systemInfo:Yae,agentWorkspace:Zae,environmentCenter:Jae,deploymentSelect:eoe,deploymentError:toe,studioBuildProgress:noe,cloudEnvironment:ioe,githubCicd:roe,feishuDeployment:soe,deploymentResources:aoe,studioUpdate:ooe,projectPreview:loe,workspace:coe,resourceCollection:uoe,skillSourcePicker:doe,composer:foe,agentSelector:hoe,myAgents:poe,skillCenter:moe,knowledge:goe},VDe=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:Xae,agentSelector:hoe,agentWorkspace:Zae,cloudEnvironment:ioe,common:Gae,composer:foe,default:zDe,deploymentError:toe,deploymentResources:aoe,deploymentSelect:eoe,environmentCenter:Jae,feishuDeployment:soe,githubCicd:roe,knowledge:goe,myAgents:poe,projectPreview:loe,resourceCollection:uoe,skillCenter:moe,skillSourcePicker:doe,studioBuildProgress:noe,studioUpdate:ooe,systemInfo:Yae,workspace:coe},Symbol.toStringTag,{value:"Module"})),boe="Website integration",yoe="Embed an AgentKit Runtime on your website as a floating chat window",voe="Back to automations",xoe="Add website",Ooe="Loading Runtime",woe="Select Runtime",Soe="Website domain",koe="For example, xxxx.com or localhost:5173",Eoe="Generating",Coe="Generate token",Toe="Added websites",Aoe="{{count}} website",_oe="{{count}} websites",Noe="Loading website integrations",joe="No website integrations yet",Roe="Select a Runtime and enter a website domain to generate a token",Ioe="Embed instructions",Poe="Place this code before the closing body tag on your website",Doe="Copied",Moe="Copy code",Loe="Embed code will appear here after you add a website.",$oe="Delete the website integration for {{domain}}?",Foe={load:"Failed to load website integrations",create:"Failed to create website integration",delete:"Failed to delete website integration",noConversationalAgent:"No conversational Agent was found in this Runtime"},Boe={requestFailed:"Request failed ({{status}})",greeting:"Hello. How can I help?",sessionFailed:"Could not start a chat session",unauthorized:"This website is not authorized to start a chat",conversationFailed:"The chat request failed. Try again shortly.",open:"Open Agent chat",close:"Close Agent chat",panelLabel:"Agent chat panel",assistant:"Agent assistant",online:"Online"},HDe={title:boe,description:yoe,backToAutomations:voe,addWebsite:xoe,loadingRuntime:Ooe,selectRuntime:woe,websiteDomain:Soe,domainPlaceholder:koe,generating:Eoe,generateToken:Coe,addedWebsites:Toe,websiteCount_one:Aoe,websiteCount_other:_oe,loadingIntegrations:Noe,delete:"Delete",emptyTitle:joe,emptyDescription:Roe,embedMethod:Ioe,embedInstructions:Poe,copied:Doe,copyCode:Moe,embedHint:Loe,confirmDelete:$oe,errors:Foe,widget:Boe},qDe=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:xoe,addedWebsites:Toe,backToAutomations:voe,confirmDelete:$oe,copied:Doe,copyCode:Moe,default:HDe,description:yoe,domainPlaceholder:koe,embedHint:Loe,embedInstructions:Poe,embedMethod:Ioe,emptyDescription:Roe,emptyTitle:joe,errors:Foe,generateToken:Coe,generating:Eoe,loadingIntegrations:Noe,loadingRuntime:Ooe,selectRuntime:woe,title:boe,websiteCount_one:Aoe,websiteCount_other:_oe,websiteDomain:Soe,widget:Boe},Symbol.toStringTag,{value:"Module"})),Uoe={types:{all:"All types",document:"Documents",image:"Images",video:"Videos"},previewArtifact:"Preview {{name}}",moreActions:"More actions for {{name}}",actionMenu:"Actions for {{name}}",download:"Download",downloading:"Downloading",edit:"Edit details",delete:"Delete artifact",previewFailed:"Could not preview “{{name}}”: {{message}}",downloadStarted:"Download started for {{name}}",downloadFailed:"Could not download “{{name}}”: {{message}}",updated:"Updated {{name}}",deleted:"Deleted {{name}}",deleteFailed:"Could not delete “{{name}}”: {{message}}",typeFilter:"Artifact type",searchAria:"Search artifacts",searchPlaceholder:"Search artifacts or sessions",retry:"Retry",close:"Close",listAria:"Artifact list",loadFailed:"Could not load artifacts",loadDetailFallback:"Check the storage configuration and try again.",reload:"Reload",noMatch:"No matching artifacts",noArtifacts:"You do not have any artifacts yet",searchHint:"Try another search or artifact type",emptyHint:"Artifacts created in chats will appear here automatically",columns:{name:"Name",source:"Source",updatedAt:"Modified",actions:"Actions"},loadingMore:"Loading more artifacts",unknownTime:"Unknown time",preview:{close:"Close preview",meta:"{{type}} / Version {{version}}",loading:"Loading preview",alt:"Preview of {{name}}",loadFailed:"The preview could not be loaded. Try again later or download the file.",unsupported:"This format cannot be previewed online. Download the file to view it.",sourceAria:"Artifact source",agent:"Agent",session:"Session",tool:"Generated by",createdAt:"Created",fileSize:"File size",tags:"Tags",viewSession:"View session"},deleteDialog:{title:"Delete artifact?",description:"“{{name}}” will be permanently removed from the artifact library. The chat history will not be affected.",deleting:"Deleting",confirm:"Delete",close:"Close delete confirmation"},api:{withStatus:"{{message}} ({{status}})",listFailed:"Could not load the artifact library",syncFailed:"Could not sync chat artifacts",updateFailed:"Could not update the artifact",deleteFailed:"Could not delete the artifact",downloadFailed:"Could not download the artifact"}},Qoe={unknownSource:"Unknown source",unknownCreator:"Unknown creator"},zoe={nameRequired:"Enter an artifact name",tooManyTags:"You can add up to {{max}} tags",tagTooLong:"Each tag can contain up to {{max}} characters",title:"Edit artifact details",subtitle:"The content file will not be modified",close:"Close edit dialog",name:"Name",description:"Description",descriptionPlaceholder:"Add its purpose, version, or usage notes",tags:"Tags",tagsPlaceholder:"Separate tags with commas, up to {{max}}",cancel:"Cancel",saving:"Saving",save:"Save"},Voe={change:{added:"Added",modified:"Modified",deleted:"Deleted"},noChanges:"There are no source changes between these versions",chooseFile:"Select a file on the left to view its code",compareTitle:"Compare versions",workspaceTitle:"Source workspace",projectFallback:"Agent project",switchTheme:"Switch source theme",switchThemeTitle:"Switch to {{theme}} theme",themes:{dark:"dark",light:"light"},closeWorkspace:"Close source workspace",close:"Close",changedFiles:"Changed files",projectFiles:"Project files",changes:"Changes",files:"Files",openFiles:"Open files",noFileSelected:"No file selected",comparisonDirection:"Comparison direction",before:"Before optimization",after:"After optimization",loadingEditor:"Loading editor…",changedFileCount_one:"{{count}} file changed",changedFileCount_other:"{{count}} files changed",fileCount_one:"{{count}} file",fileCount_other:"{{count}} files",lineCount_one:"{{count}} line · UTF-8",lineCount_other:"{{count}} lines · UTF-8",viewSource:"View source",viewSourceAria:"View and edit project source"},Hoe={nav:"Search",selectAgent:"Select an Agent",checkingCapabilities:"Checking Agent capabilities",notMounted:"This Agent does not have {{label}} mounted",sources:{session:"Sessions",web:"Web",knowledge:"Knowledge base",memory:"Long-term memory"},webDescription:"Search with the web_search tool",backendLocal:"Local",failed:"Search failed: {{message}}",placeholder:{selectAgent:"Select an Agent first",web:"Search the web",knowledge:"Search {{name}}",knowledgeFallback:"this Agent's knowledge base",memory:"Search {{name}}",memoryFallback:"this user's long-term memory",session:"Search this Agent's sessions"},sourceTypeAria:"Search source: {{label}}",notSelected:"Not selected",sourceType:"Search source",selectSource:"Select a search source",noAgentHint:"Select an Agent to search its sessions, the web, and mounted data sources.",loadingCapabilities:"Loading this Agent's search capabilities…",sourceUnavailable:"This Agent does not have this data source mounted",instructions:{web:"Enter keywords and press Enter or select the button to search with web_search.",knowledge:"Enter a question to search this Agent's knowledge base.",memory:"Enter a clue to search long-term memories saved across this user's sessions.",session:"Enter keywords and press Enter or select the button to search this Agent's sessions."},noResults:"No results found for “{{query}}”.",knowledgeFragment:"Knowledge excerpt {{index}}",memoryFragment:"Memory excerpt {{index}}"},qoe={title:"Developer Resources",sections:{documentation:{title:"Related links",description:"Open development documentation and common AgentKit destinations"},bestPractices:{title:"Best practices",description:"Learn from practical development, debugging, and deployment guidance"},showcases:{title:"Showcases",description:"Explore applications built with AgentKit"}},links:{veadkDocs:"VeADK documentation",cliDocs:"AgentKit CLI documentation",platformDocs:"AgentKit platform documentation",console:"AgentKit console"},articles:{veadkDevelopment:{title:"Develop and deploy an Agent with VeADK",description:"Build an Agent with VeADK and deploy it to AgentKit Runtime."},cliDevelopment:{title:"Develop and deploy an Agent with AgentKit CLI",description:"Create a project, debug an Agent, and deploy it with AgentKit CLI."},coverAlt:"Cover image for {{title}}"},showcases:{researchAssistant:{title:"Multi-agent research assistant",description:"Specialized Agents work together to research, analyze, and summarize findings."},multimodalAnalysis:{title:"Multimodal content analysis",description:"Understand images, documents, and video in a single session."},customerService:{title:"Customer service workspace",description:"Combine knowledge retrieval and tool calls to handle complex support requests."},webSearch:{title:"Web search Agent",description:"Search current web content and organize it into traceable answers."},a2uiApp:{title:"A2UI interactive app",description:"Let an Agent generate interactive interfaces as it works through a task."},previewAlt:"Interface preview for {{title}}"}},Woe={title:"Library",untitledSession:"Untitled session",categoryAria:"Library categories",regionAria:"Region",tabs:{skills:"Skills",knowledge:"Knowledge",artifacts:"Artifacts"}},Koe={title:"Manage Agents",subtitle:"Agents in AgentKit Runtime that you can manage",mainAgentOnly:"Only the main Agent is shown (control-plane information).",deleteConfirm:'Delete Agent "{{name}}"? Its Runtime will be permanently deleted.',regionFilterTitle:"Filter by region",regionFilterAria:"Region filter",regionAria:"Region",refresh:"Refresh",loading:"Loading…",empty:"You have not deployed any Agents.",connected:"Connected",connect:"Connect to this Agent",deleteRuntime:"Delete this Runtime",loadingDetail:"Loading details…",agentStructure:"Agent structure",secretHidden:"Sensitive value hidden. Select to reveal it.",revealSecret:"Show the value of {{key}}",fields:{model:"Model",description:"Description",status:"Status details",project:"Project",version:"Version",resources:"Resources",memory:"Memory",tool:"Tool",knowledge:"Knowledge",mcpToolset:"MCP Toolset",updatedAt:"Updated"},resource:{memory:"Memory {{value}} MB",instances:"Instances {{min}}-{{max}}",concurrency:"Concurrency {{value}}"},environmentVariables:"Environment variables",unnamed:"(Unnamed)"},Goe={mainAgent:"Main Agent",subAgent:"Sub-agent {{index}}",itemCount_one:"{{count}} item",itemCount_other:"{{count}} items",info:"Agent information",infoAndTopology:"Agent information and topology",loadingInfo:"Loading Agent information…",unnamedAgent:"Unnamed Agent",tools:"Tools",toolList:"Tool list",studioTool:"Studio Tool",removeTool:"Remove tool {{name}}",remove:"Remove",notConfigured:"Not configured",addStudioTool:"Add Studio tools",addStudioToolHere:"Add Studio tools to this chat",skills:"Skills",skillList:"Skill list",previewUnsupported:"Preview is not supported",sessionEnvironment:"Session environment",environment:"Environment",agentCanvas:"Agent canvas",topology:"Structure",viewCanvasFullscreen:"View Agent canvas in full screen",viewFullscreen:"View full screen",executionCanvas:"Agent execution canvas",fullscreenExecutionCanvas:"Full-screen Agent execution canvas",closeFullscreenCanvas:"Close full-screen canvas",close:"Close",capabilitiesSubtitle:"Capabilities and collaboration topology",closeInfo:"Close Agent information",infoUnavailable:"Agent information is temporarily unavailable."},Xoe={mountFailed:"Could not mount the environment",closeDialog:"Close environment dialog",addTitle:"Add environments",description:"Choose the Sandbox environments this Agent can use in the current session",closeAdd:"Close Add environments",searchAria:"Search environments",searchPlaceholder:"Search environment names or capabilities",availableAria:"Available environments and workspaces",loading:"Loading available environments…",noMatch:"No matching environments or workspaces",workspaces:"Workspaces",reuseAll:"Use every available environment in this workspace",availableEnvironmentCount_one:"{{count}} available environment",availableEnvironmentCount_other:"{{count}} available environments",selectWorkspace:"Select workspace {{name}}",environments:"Environments",includedByWorkspaces:"Included by workspace {{names}}",nameSeparator:", ",selectEnvironment:"Select environment {{name}}",selectedWorkspaceCount_one:"{{count}} workspace selected",selectedWorkspaceCount_other:"{{count}} workspaces selected",coveredEnvironmentCount_one:"{{count}} environment covered",coveredEnvironmentCount_other:"{{count}} environments covered",selectionSummary:"{{workspaces}}, {{environments}}",cancel:"Cancel",mounting:"Mounting…",confirm:"Add selected",mountedAria:"Mounted environments",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",removeWorkspace:"Remove workspace {{name}}",remove:"Remove",removeEnvironment:"Remove environment {{name}}",add:"Add environments",addMore:"Add more environments",addForSession:"Add environments to this session",loadingAvailable:"Loading available environments…",empty:"No AIO Sandbox environments are available."},Yoe={loading:{searching:"Looking for an existing environment",creating:"Initializing environment",connecting:"Connecting to the environment"},initializationFailed:"AgentKit CLI environment initialization failed. Current status: {{status}}.",sessionExpired:"The AgentKit CLI session does not exist or has expired. Try again.",initializationTimeout:"AgentKit CLI environment initialization timed out. Try again later.",nonPersistent:"Non-persistent environment",recyclingHoursMinutes:"Environment reclaimed in {{hours}} hr {{minutes}} min",recyclingMinutes:"Environment reclaimed in {{minutes}} min",connectionError:`Could not connect to the Studio service because the server did not respond. -Original error: {{message}}`,unavailable:"Connection unavailable",requestFailed:"AgentKit CLI request failed",retry:"Retry",terminalTitle:"AgentKit CLI terminal"},Zoe={labels:{coding:"Coding",get_city_weather:"City weather",get_location_weather:"Location weather",web_fetch:"Fetch web content"},closeDialog:"Close dialog",title:"Add Studio tools",description:"Studio BFF runs these tools for {{agentName}} in the current session. No Runtime installation is required.",close:"Close Add Studio tools",searchAria:"Search Studio tools",searchPlaceholder:"Search by name or tool ID",availableAria:"Available Studio tools",loading:"Loading Studio tools…",noMatch:"No matching Studio tools",remove:"Remove",add:"Add"},Joe={artifactLibrary:Uoe,resourceMetadata:Qoe,artifactEdit:zoe,codeBrowser:Voe,search:Hoe,developerResources:qoe,library:Woe,manageAgents:Koe,agentTopology:Goe,sessionEnvironment:Xoe,agentKitCli:Yoe,studioTools:Zoe},WDe=Object.freeze(Object.defineProperty({__proto__:null,agentKitCli:Yoe,agentTopology:Goe,artifactEdit:zoe,artifactLibrary:Uoe,codeBrowser:Voe,default:Joe,developerResources:qoe,library:Woe,manageAgents:Koe,resourceMetadata:Qoe,search:Hoe,sessionEnvironment:Xoe,studioTools:Zoe},Symbol.toStringTag,{value:"Module"})),ele={requestFailed:"请求失败 ({{status}})",unknownError:"未知错误",contentTypeMissing:"Content-Type 缺失",response:"响应:{{response}}",fallbackWithDetail:"{{fallback}}:{{detail}}",fallbackWithHttpStatus:"{{fallback}}(HTTP {{status}})",nonJsonResponse:"{{fallback}}:服务端返回非 JSON 响应({{contentType}})"},tle={unconfigured:"管理员未配置 AgentKit Dev Sandbox,请配置后再使用",invalidSession:"AgentKit CLI 返回了无效的 Session。",loadCapabilitiesFailed:"无法读取 AgentKit CLI 配置。",invalidCapabilities:"AgentKit CLI 返回了无效的配置状态。",listSessionsFailed:"无法读取 AgentKit CLI Session。",invalidSessionList:"AgentKit CLI 返回了无效的 Session 列表。",createSessionFailed:"无法创建 AgentKit CLI Session。",openSessionFailed:"无法打开 AgentKit CLI Session。",openTerminalFailed:"无法打开 AgentKit CLI 终端。",invalidTerminalUrl:"AgentKit CLI 返回了无效的终端地址。"},nle={cnBeijing:"华北 2(北京)",cnShanghai:"华东 2(上海)"},ile={runtimeUnsupported:"该 Runtime 暂不支持连接,请确认服务已正常运行。"},rle={autoConfigureFailed:"飞书机器人自动配置失败"},sle={actionFailed:"{{action}}失败",detail:"详细信息:{{detail}}",request:"请求:{{request}}"},ale={persistentMemoryHint:"提示:会话已不存在。使用 in-memory 或 SQLite 短期记忆时,多实例、进程重启或滚动发布都可能导致会话丢失;建议改用基于数据库的持久化短期记忆存储。",unsupportedRouteHint:"提示:该 Runtime 未提供会话能力运行接口,可能是 Runtime 版本与当前 Studio 不兼容。",toolArgumentHint:"提示:模型生成的工具参数格式不完整,请重新发送一次。",resourceCollectionExpiredHint:"提示:本次资源清单已失效,请重新发送任务;系统会重新收集资源后再创建 Agent。",networkConfigurationHint:"提示:请检查共享公网出口等网络配置,然后重试。",rawResponseLabel:"原始响应:"},ole={httpStatus:"HTTP 状态码:{{status}}",errorCode:"错误码:{{code}}",cloudResponseBody:`云端响应正文: -{{body}}`,loadFailedWithDetail:"读取实例日志失败:{{detail}}",invalidFormat:"读取实例日志失败:服务返回格式无效"},lle={untitledSession:"未命名会话",webUnavailable:"网络搜索接口未就绪(后端未启用 /web/search)。",webFailed:"网络搜索失败:{{message}}",webNotMounted:"当前 Agent 未挂载 web_search 工具。",knowledgeNotMounted:"该 Agent 未挂载知识库。",memoryNotMounted:"该 Agent 未挂载长期记忆。",knowledge:"知识库",longTermMemory:"长期记忆"},cle={listSpacesFailed:"读取 Skill 空间失败",createSpaceFailed:"创建 Skill 空间失败",updateSpaceFailed:"更新 Skill 空间失败",deleteSpaceFailed:"删除 Skill 空间失败",uploadFailed:"上传 Skill 失败",validateFailed:"校验 Skill 失败",deleteFailed:"删除 Skill 失败",listFilesFailed:"读取 Skill 文件失败",downloadFailed:"下载 Skill 失败"},ule={truncatedData:"{{data}}…(已截断,共 {{count}} 个字符)",incompleteEvent:"SSE 流在事件完整返回前已结束。原始数据:{{data}}",invalidEventJson:"无法解析 SSE 事件中的 JSON。原始数据:{{data}}"},dle={loadConfigNetworkFailed:"无法加载登录配置,请检查网络后重试。",configServiceFailed:"登录配置服务异常(HTTP {{status}}),请稍后重试。",invalidConfigResponse:"登录配置服务返回了无法解析的响应,请稍后重试。",serviceNetworkFailed:"无法连接身份服务,请检查网络后重试。",invalidServiceResponse:"身份服务返回了无法解析的响应,请稍后重试。",serviceFailed:"身份服务异常(HTTP {{status}}),请稍后重试。"},fle={invalidToken:"GitHub Token 无效或没有仓库写入权限",notFound:"仓库、分支或文件不存在,或 Token 无权访问",rejectedCommit:"GitHub 拒绝了提交,请检查分支和文件状态",requestFailed:"GitHub 请求失败(HTTP {{status}})",networkFailed:"连接 GitHub 失败,请检查网络后重试",invalidRepositoryFormat:"GitHub Repo 格式应为 owner/repository",insecureRepositoryUrl:"仅支持安全的 github.com 仓库地址",unsafeProjectPath:"Agent 项目目录必须是仓库内的安全相对路径",tokenRequired:"GitHub Token 不能为空",invalidBaseBranch:"目标分支格式不正确",invalidPublishBranch:"发布分支格式不正确",noFiles:"没有需要提交的文件",missingBaseSha:"目标分支缺少有效 Git SHA",fileAlreadyExists:"目标仓库中已存在 {{path}},未覆盖现有文件",pathNotUpdatable:"目标路径 {{path}} 不是可更新的文件",invalidPullRequest:"GitHub 未返回有效的 Pull Request"},hle={loadCapabilitiesFailed:"加载视频模型能力失败",uploadAssetFailed:"上传{{fileName}}失败",enhancePromptFailed:"提示词优化失败",createTaskFailed:"创建视频生成任务失败",getTaskFailed:"查询视频生成任务失败",downloadFailed:"下载生成视频失败"},ple={listFailed:"加载网站集成失败",createFailed:"创建网站集成失败",deleteFailed:"删除网站集成失败"},mle={loadFailed:"读取知识库失败",htmlHidden:"[HTML 内容已隐藏]",redacted:"[已脱敏]",depthTruncated:"[内容过深,已截断]",circularReference:"[循环引用]",diagnosticsUnavailable:"[诊断信息无法显示]",statusCode:"状态码:{{status}}",errorCode:"错误码:{{code}}",requestId:"请求 ID:{{requestId}}",diagnostics:"诊断:{{diagnostics}}",detail:"详情:{{detail}}",signInRequired:"请先登录后再访问知识库",forbidden:"你没有权限操作这个知识库",notFound:"知识库或知识内容不存在",conflict:"知识库当前状态不允许执行此操作",requestFailed:"知识库请求失败 ({{status}})"},gle={invalidSourceSnapshot:"源码快照的响应格式无效。",invalidProjectList:"项目列表的响应格式无效。",invalidProjectVersion:"项目版本的响应格式无效。",loadProjectsFailed:"无法读取已保存项目",loadVersionsFailed:"无法读取项目版本",deleteVersionFailed:"删除项目版本失败",invalidDeleteVersionResponse:"删除项目版本的响应格式无效。",loadProjectSourceFailed:"无法读取项目源码",loadSnapshotFailed:"无法读取源码快照",restoreSnapshotFailed:"无法恢复当前源码快照",downloadSourceFailed:"下载源码失败",downloadNotZip:"源码下载响应不是 ZIP 文件。",downloadSizeMismatch:"源码压缩包大小与发布记录不一致,请重试。"},ble={invalidFormat:"{{label}}格式错误。",validationSeparator:";",invalidAnalysisResult:"迁移分析结果格式错误。",invalidFrameworkCandidate:"框架候选格式错误。",invalidAnalysisEvidence:"分析证据格式错误。",invalidEntryCandidate:"入口候选格式错误。",invalidQuestion:"待确认问题格式错误。",invalidTask:"迁移会话格式错误。",invalidAnalysisReference:"分析结果引用格式错误。",invalidSourcePersistence:"迁移源码保存状态格式错误。",invalidActivity:"迁移执行动态格式错误。",invalidActivityItem:"迁移执行动态项格式错误。",invalidActivityTool:"迁移执行工具项格式错误。",invalidActivityPlan:"迁移执行计划格式错误。",invalidActivityPlanItem:"迁移执行计划项格式错误。",invalidArtifact:"迁移产物格式错误。",invalidEnvironmentDefaults:"环境变量默认值格式错误。",invalidArtifactFile:"迁移产物文件格式错误。",invalidVerificationCheck:"迁移校验项格式错误。",requestValidationFailed:"请求参数校验失败:{{detail}}",gatewayError:"{{fallback}}(HTTP {{status}},Content-Type: {{contentType}})。请检查代理或网关配置。",nonJsonResponse:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}})。请检查代理或网关配置。",loadCapabilitiesFailed:"读取迁移能力失败",invalidCapabilities:"迁移能力格式错误。",invalidModelCapabilities:"迁移模型能力格式错误。",loadTasksFailed:"读取迁移会话失败",invalidTaskList:"迁移会话列表格式错误。",createTaskFailed:"创建迁移会话失败",uploadProjectFailed:"上传迁移项目失败",loadActivityFailed:"读取迁移执行动态失败",startFailed:"启动迁移失败",submitAnswersFailed:"提交分析补充信息失败",stopFailed:"终止迁移失败",deleteTaskFailed:"删除迁移会话失败",loadArtifactFailed:"读取迁移产物失败",loadArtifactFileFailed:"读取迁移产物文件失败",downloadArtifactFailed:"下载迁移产物失败",labels:{analysisResult:"迁移分析结果",recommendation:"迁移建议",boundary:"迁移边界",frameworkCandidate:"框架候选",analysisEvidence:"分析证据",recommendedFramework:"推荐框架",entryCandidate:"入口候选",entryFramework:"入口框架",includeScope:"迁移包含范围",excludeScope:"迁移排除范围",assumptions:"分析假设",question:"待确认问题",analysisWarnings:"迁移警告",task:"迁移会话",artifactStatus:"迁移产物状态",analysisReference:"分析结果引用",confirmation:"迁移确认",confirmedFramework:"确认框架",error:"迁移错误",sourcePersistence:"迁移源码保存状态",activity:"迁移执行动态",activityItem:"迁移执行动态项",activityTool:"迁移执行工具项",activityPlanItem:"迁移执行计划项",artifact:"迁移产物",cli:"CLI 信息",migration:"迁移信息",startup:"启动信息",environment:"环境变量信息",verification:"校验信息",report:"迁移报告",archive:"产物归档",environmentDefaults:"环境变量默认值",requiredEnvironment:"必需环境变量",optionalEnvironment:"可选环境变量",artifactFile:"迁移产物文件",verificationCheck:"迁移校验项",artifactWarnings:"迁移产物警告",errorResponse:"错误响应",errorDetail:"错误详情",capabilities:"迁移能力",framework:"迁移框架",modelCapabilities:"迁移模型能力",taskList:"迁移会话列表"}},yle={status:{ready:"就绪",wakeable:"可唤醒",creating:"创建中",starting:"启动中",pending:"等待中",running:"运行中",failed:"异常",stopped:"已停止",expired:"已过期",deleting:"删除中",deleted:"已删除",unknown:"未知状态"},developmentTimeout:"等待开发环境响应超时。任务可能仍在运行,请稍后重新进入当前会话查看状态。",developmentDisconnected:"与开发环境的连接已中断。任务可能仍在运行,请稍后重新进入当前会话查看状态。",developmentFailed:"开发任务未能继续,开发环境已保留。请在当前会话重试。",invalidStudioResponse:"{{fallback}} Studio 服务响应异常,请刷新后重试。",invalidSession:"AgentKit 沙箱返回了无效的 Session 信息。",invalidSnapshot:"AgentKit 沙箱返回了无效的 Snapshot 信息。",invalidSettings:"Sandbox 返回了无效设置。",invalidThreadSnapshot:"Sandbox 返回了无效 Thread 快照。",emptyConversationResponse:"沙箱对话服务未返回内容。",invalidConversationResponse:"沙箱对话服务返回了无法解析的响应。",conversationFailed:"沙箱对话失败,请稍后重试。",emptyReply:"沙箱未返回有效回复,请重试。",missingSession:"缺少要操作的 AgentKit Session。",listCodexFailed:"无法读取 Codex 智能体,请稍后重试。",invalidSessionList:"AgentKit 沙箱返回了无效的 Session 列表。",invalidSnapshotList:"AgentKit 沙箱返回了无效的 Snapshot 列表。",startFailed:"无法启动 AgentKit 沙箱,请稍后重试。",listAgentFailed:"无法读取 {{kind}} 智能体,请稍后重试。",invalidKindSessionList:"AgentKit 返回了无效的 {{kind}} Session 列表。",invalidKindSnapshotList:"AgentKit 返回了无效的 {{kind}} Snapshot 列表。",createAgentFailed:"无法创建 {{kind}} 智能体,请稍后重试。",missingSessionToOpen:"缺少要打开的 AgentKit Session。",openAgentFailed:"无法打开 {{kind}} 智能体。",invalidAgentHomeUrl:"{{kind}} 智能体返回了无效的主页面地址。",missingSessionForTerminal:"缺少要打开 Terminal 的 AgentKit Session。",openTerminalFailed:"无法打开 {{kind}} Terminal。",deleteAgentFailed:"无法删除 {{kind}} 智能体。",missingSnapshot:"缺少要唤醒的 AgentKit Snapshot。",resumeSnapshotFailed:"无法从快照唤醒智能体,请稍后重试。",deleteSnapshotFailed:"无法删除智能体快照。",missingSessionToConnect:"缺少要连接的 AgentKit Session。",connectCodexFailed:"无法连接 Codex 智能体,请稍后重试。",sessionNotReady:"AgentKit Session 尚未就绪,当前状态:{{status}}。",invalidMessage:"内置智能体会话缺少有效的消息内容。",interruptFailed:"无法停止当前任务。",getStatusFailed:"无法读取 Codex 状态。",getEndpointFailed:"无法读取 Sandbox Endpoint。",invalidEndpoint:"Sandbox 返回了无效 Endpoint。",createHandoffPairingFailed:"无法生成 Codex 云端接力配对码。",invalidHandoffPairing:"Studio 返回了无效的 Codex 云端接力配对码。",getHandoffStatusFailed:"无法读取端云接力状态。",invalidHandoffStatus:"Studio 返回了无效的端云接力状态。",listModelsFailed:"无法读取 Codex 模型列表。",invalidModelList:"Sandbox 返回了无效模型列表。",setModelFailed:"无法切换 Codex 模型。",invalidModel:"Sandbox 返回了无效模型。",listSkillsFailed:"无法读取 Codex Skills。",invalidSkillList:"Sandbox 返回了无效 Skill 列表。",listThreadsFailed:"无法读取 Codex Thread 列表。",invalidThreadList:"Sandbox 返回了无效 Thread 列表。",createThreadFailed:"无法创建新的 Codex Thread。",missingThread:"缺少要读取的 Codex Thread。",readThreadFailed:"无法读取 Codex 历史消息。",resumeThreadFailed:"无法恢复 Codex Thread。",forkThreadFailed:"无法分叉 Codex Thread。",archiveThreadFailed:"无法归档 Codex Thread。",invalidArchiveResult:"Sandbox 返回了无效归档结果。",deleteThreadFailed:"无法删除 Codex Thread。",invalidDeleteResult:"Sandbox 返回了无效删除结果。",compactThreadFailed:"无法压缩 Codex Thread。",getSettingsFailed:"无法读取 Codex 权限与工作空间。",updatePermissionsFailed:"无法更新 Codex 权限。",updateWorkspaceFailed:"无法更新 Codex 工作空间。",invalidWorkingDirectory:"Sandbox 返回了无效工作目录。",listDirectoriesFailed:"无法读取 Sandbox 目录。",invalidDirectoryList:"Sandbox 返回了无效目录列表。",resolveApprovalFailed:"无法提交 Codex 审批决定。",uploadFileFailed:"无法上传文件到 Sandbox。",invalidUploadResult:"Sandbox 返回了无效上传结果。",disconnectCodexFailed:"无法断开 Codex 智能体连接。",deleteCodexFailed:"无法删除 Codex 智能体。",openSandboxTerminalFailed:"无法打开 Sandbox Terminal。",openSandboxBrowserFailed:"无法打开 Sandbox Browser。",toolLabel:"Sandbox 工具",invalidToolUrl:"{{label}} 返回了无效地址。",unsafeToolUrl:"{{label}} 返回了不安全的地址。"},vle={invalidSandboxVersion:"沙箱版本响应格式无效",loadSandboxVersionsFailed:"查询沙箱版本失败",updateSandboxFailed:"更新 Sandbox 失败",invalidSandboxUpdate:"沙箱更新响应格式无效",errorWithDetailAndRawResponse:`{{context}} +Installation command: {{command}}`,title:"Continue in the cloud",description:"Copy the two prompts in order. Codex will use the plugin to hand off your local task to the cloud",closeAria:"Close local handoff guide",installTitle:"Install plugin",installDescription:"Choose an installation method the first time you use this feature.",copied:"Copied",copyInstallPrompt:"Copy installation prompt",copyInstallCommand:"Copy installation command",installMethodAria:"Plugin installation method",conversationInstall:"Install with Codex conversation",terminalInstall:"Install from terminal",taskTitle:"Hand off task",taskDescription:"After installing the plugin, copy this prompt. Codex will migrate the current project and continue the task.",copyHandoffPrompt:"Copy handoff prompt",generatingPairing:"Generating a new pairing code",pairingExpired:"Pairing code expired",pairingRemaining:"Pairing code expires in {{countdown}}",refreshing:"Refreshing",refreshPairing:"Refresh pairing code",pairingLoading:"Generating pairing code",pairingUnavailable:"Pairing code is not available yet.",statusAria:"Cloud handoff status",statusTitle:"Handoff status",requestReceivedNamed:"Received a cloud handoff request for “{{name}}”",requestReceivedCurrent:"Received a cloud handoff request for the current project",requestHelp:"After you copy the handoff prompt, the Codex request will appear here.",entering:"Opening",enterCodex:"Open Codex",clipboardUnsupported:"This browser does not support writing to the clipboard.",steps:{request:"Wait for local request",session:"Create cloud Session",restore:"Restore project",continue:"Send continuation task"},status:{issued:"Waiting for request",creating:"Creating Session",sessionCreated:"Migrating project",continuing:"Starting cloud task",running:"Running in the cloud",completed:"Handoff complete",failed:"Handoff failed"}},jae={model:{description:"Show or switch the current conversation model",keywords:"model switch"},models:{description:"List models available from app-server",keywords:"model list"},skill:{description:"Browse and invoke a Skill available in the current workspace",keywords:"skill workflow"},skills:{description:"Browse and invoke Skills available in the current workspace",keywords:"skills workflow list"},new:{description:"Start a new conversation",keywords:"new conversation"},resume:{description:"Open conversation history or resume a specific Thread",keywords:"history resume session"},fork:{description:"Fork a new conversation from the current context",keywords:"fork branch"},compact:{description:"Compact the current conversation context",keywords:"compact context"},archive:{description:"Archive the current conversation and start a new one",keywords:"archive close"},status:{description:"Show connection, Thread, model, and token status",keywords:"status connection token"},clear:{description:"Clear the current view and start a new conversation",keywords:"clear reset"},help:{description:"Show Sandbox shortcuts",keywords:"help commands"},currentModel:"Current model",availableModel:"Available model",workspace:"Workspace",notSet:"Not set",modelLabel:"Model",statusLabel:"Status",running:"Running",idle:"Idle",totalTokens:"Total tokens",contextWindow:"Context window",imageFallback:"Image",unknown:"Unknown shortcut: {{command}}. Type /help to see available commands.",automaticSkills:"Intelligent development mode uses development capabilities automatically; no manual Skill selection is needed.",activity:{new:"Started a new Codex conversation",resumed:"Resumed Codex conversation",deleted:"Deleted Codex conversation history",modelChanged:"Switched Codex model",availableModels:"Available Codex models",noModels:"No models are currently available",forked:"Forked Codex conversation",compacting:"Started compacting the current Codex conversation",archived:"Archived Codex conversation",status:"Current Codex status",help:"Codex shortcuts supported by Sandbox"}},Rae={common:vae,tool:xae,threads:Oae,permissions:wae,workspace:Sae,approval:kae,composer:Eae,launch:Cae,session:Tae,agentDetails:Aae,agentWorkspace:_ae,handoff:Nae,commands:jae},$De=Object.freeze(Object.defineProperty({__proto__:null,agentDetails:Aae,agentWorkspace:_ae,approval:kae,commands:jae,common:vae,composer:Eae,default:Rae,handoff:Nae,launch:Cae,permissions:wae,session:Tae,threads:Oae,tool:xae,workspace:Sae},Symbol.toStringTag,{value:"Module"})),Iae={retry:"Try again",signInToContinue:"Sign in to continue",signInWith:"Sign in with {{provider}}",enterUsername:"Enter a username to get started",usernamePlaceholder:"Username (letters and numbers, up to 16 characters)",enter:"Continue",usernameInvalid:"Use letters and numbers only, up to 16 characters.",identityProvider:{volcengine:"Volcengine Identity",byteplus:"BytePlus Identity"},powered:{volcengine:"Volcengine AgentKit provides enterprise-grade Agent solutions",byteplus:"BytePlus AgentKit provides enterprise-grade Agent solutions"},legalPrefix:"By continuing, you acknowledge that you have read and agree to the AgentKit",terms:"Product and Service Terms",copyright:"© {{year}} VeADK. All rights reserved."},Pae={title:"Your session has expired",description:"Your current edits are preserved. The previous action will continue after you sign in again.",waiting:"Waiting for sign-in…",signInAgain:"Sign in again"},Dae={breadcrumbs:"Breadcrumbs",selectAgent:"Select Agent",switchAgent:"Switch Agent"},Mae={cancel:"Cancel",close:"Close confirmation dialog"},FDe={login:Iae,authExpired:Pae,navbar:Dae,confirm:Mae},BDe=Object.freeze(Object.defineProperty({__proto__:null,authExpired:Pae,confirm:Mae,default:FDe,login:Iae,navbar:Dae},Symbol.toStringTag,{value:"Module"})),Lae={defaultUser:"User",shortcuts:"Quick access",tryCli:"Try AgentKit CLI",developerResources:"Developer resources",systemInfo:"System information",language:"Language",issueFeedback:"Report an issue",logout:"Sign out",roles:{admin:"Administrator",developer:"Developer",user:"User"}},$ae={home:"Back to home",expand:"Expand sidebar",collapse:"Collapse sidebar",label:"Main navigation",newChat:"New chat",agents:"Agents",workspaces:"Workspaces",library:"Library",cronjobs:"Cronjob",automations:"Automations"},Fae={title:"Chat history",newConversation:"New conversation",create:"New chat",loading:"Loading chat history…",empty:"No conversations yet",current:"Current",manage:"Manage conversation: {{title}}",more:"More",delete:"Delete",loadingMore:"Loading…",loadMore:"Load more",evaluatingTitle:"Running automatic evaluation",evaluating:"Evaluating",generating:"Generating"},UDe={account:Lae,navigation:$ae,history:Fae},QDe=Object.freeze(Object.defineProperty({__proto__:null,account:Lae,default:UDe,history:Fae,navigation:$ae},Symbol.toStringTag,{value:"Module"})),Bae={placeholder:"Select an option",collapseOptions:"Collapse model options",expandOptions:"Expand model options",noOptions:"No options available",noMatches:"No matches. You can use the current model ID directly."},Uae={unsupportedActivity:"Unsupported Skill conversation activity",ariaLabel:"Skill generation conversation"},Qae={code:"Error code: {{code}}",type:"Error type: {{type}}",representation:"Exception representation: {{value}}",rawResponse:`Raw server response: +{{value}}`,original:"Original error: {{message}}",details:"Details"},zae={ariaLabel:"Skill file tree",viewSource:"View source",viewPreview:"View preview",download:"Download",binaryFile:"Binary file",bytes:"{{value}} bytes",binaryDescription:"The current API returns file metadata only. Download the original file separately.",metadata:"Skill metadata",noFiles:"No files"},Vae={close:"Close",name:"Name",region:"Region",optionalDescription:"Description (optional)",cancel:"Cancel",create:"Create",creating:"Creating…",save:"Save",saving:"Saving…",upload:"Upload",uploading:"Uploading…",createSpaceTitle:"New Skill Space",editSpaceTitle:"Edit Skill Space",uploadTitle:"Upload to {{name}}",createSpaceFailed:"Failed to create the Skill Space",updateSpaceFailed:"Failed to update the Skill Space",archiveValidationFailed:"Skill ZIP validation failed",uploadFailed:"Failed to upload the Skill",dropzone:"Drop a Skill ZIP here",chooseLocalFile:"or click to choose a local file",archiveHelp:"The ZIP root must contain SKILL.md, or a single wrapping directory. Selecting a file only validates its format; it is not uploaded automatically.",validating:"Checking file format…",validationPassed:"Format check passed: {{name}}, {{count}} file(s)"},Hae={styles:{concise:"Concise and practical",strict:"Rigorous and robust",tutorial:"Tutorial-friendly",automation:"Automation-first",custom:"Custom",customFallback:"Custom style"},stages:{preparing:"Preparing Dev Sandbox",ready:"Skill generated and format validation passed",failed:"Generation failed",cancelled:"Stopped",validating:"Validating Skill format",packaging:"Organizing files",generating:"Generating Skill",repairingAgain:"Repairing again",autoRepairing:"Auto-repairing ({{attempt}}/{{max}})"},validation:{fallback:"Skill format validation failed",repairInstruction:"Fix only the Skill format errors listed below. Do not change the original purpose or scope.",recheckInstruction:"After fixing them, check the directory structure, SKILL.md frontmatter, and all text files again.",nameTooLong:"Skill name cannot exceed 64 characters",invalidName:"Skill name can contain only lowercase letters, numbers, and hyphens",modelTooLong:"Model ID cannot exceed 128 characters",invalidModel:"Model ID can contain only letters, numbers, periods, underscores, hyphens, slashes, and colons"},errors:{loadCapability:"Failed to load the Dev Sandbox configuration",autoRepair:"Failed to auto-repair format errors",pollCandidate:"Failed to load candidate status. Retrying.",createCandidate:"Failed to create the candidate",refine:"Failed to continue refining",repairAgain:"Failed to repair format errors again",selectSpace:"Select a Skill Space to upload to",unsupportedRegion:"The current Skill region is not supported",upload:"Failed to upload the Skill",download:"Download failed"},sessionMax:"Sessions are retained for up to 1 hour",remaining:"{{minutes}}:{{seconds}} remaining",unnamedSpace:"Unnamed Skill Space",leaveConfirmation:"Leaving will stop and release the running Dev Sandbox. Leave anyway?",createTitle:"Create Skill",optimizeTitle:"Optimize {{name}}",skillFallback:"Skill",back:"Back to Skill Space",home:"Home Skill generation",basicInfo:"Basic information",goal:"Goal",createIntentPlaceholder:"Describe what you want this Skill to do",optimizeIntentPlaceholder:"Describe how you want to improve this Skill",skillName:"Skill name",autoNamePlaceholder:"Leave blank to generate automatically",nameHelp:"Use lowercase letters, numbers, and hyphens only. Leave blank to generate automatically.",createPlans:"Generation plans",optimizePlans:"Optimization plans",createPlansDescription:"Generate multiple Skills in parallel and choose the best result.",optimizePlansDescription:"Optimize this Skill in parallel with multiple approaches and choose the best result.",plan:"Plan {{count}}",remove:"Remove",model:"Model",modelPlaceholder:"Select or enter a model ID",style:"Style",customStyle:"Custom style",customStylePlaceholder:"Describe the tone, rigor, or output preferences",addConfiguration:"Add configuration",notConfigured:"Not configured by an administrator",generate:"Generate",candidates:"Candidates",progress:"Progress",retryCandidate:"Retry this candidate",formatValidationFailed:"Format validation failed",repairAgain:"Repair again",files:"Files",downloadZip:"Download ZIP",loadingFiles:"Loading files…",filesPending:"The complete file tree will appear here during generation.",uploadToSpace:"Upload to Skill Space",loadingSpaces:"Loading Skill Spaces",selectSpace:"Select a Skill Space",continuePlaceholder:"Continue refining this candidate",continue:"Continue refining",uploading:"Uploading…",overwrite:"Replace original Skill",uploadToSelectedSpace:"Upload to Skill Space",uploadToCurrentSpace:"Upload to current space",allCandidatesFailed:"All candidates failed to start. Retry each candidate separately."},qae={invalidFormat:"{{label}} has an invalid format.",recoveryStatus:"Skill recovery status",errorResponse:"error response",errorDetails:"error details",missingContentType:"Content-Type missing",gatewayError:"{{fallback}} (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",nonJson:"{{fallback}}: the server returned a non-JSON response (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",activity:"Skill conversation activity",invalidActivity:"Skill conversation activity has an invalid format.",invalidToolActivity:"Skill tool activity has an invalid format.",invalidTextActivity:"Skill text activity has an invalid format.",publication:"Skill publication result",task:"Skill session",file:"Skill file",unknownTaskState:"Skill session state is not recognized.",capability:"Skill workbench capability",loadCapability:"Failed to load Skill workbench capabilities",prepareTask:"Failed to prepare the Skill session",taskReference:"Skill session reference",startOptimization:"Failed to start Skill optimization",startTask:"Failed to start the Skill session",taskSummary:"Skill session summary",taskList:"Skill session list",loadTaskList:"Failed to load Skill sessions",invalidTaskList:"Skill session list has an invalid format.",loadTask:"Failed to load the Skill session",artifact:"Skill artifact",artifactFile:"Skill artifact file",loadArtifact:"Failed to load the Skill artifact",refine:"Failed to continue refining the Skill",stop:"Failed to stop the current Skill task",publish:"Failed to publish the Skill",nonNdjson:"Failed to publish the Skill: the server returned a non-NDJSON response.",missingStream:"Failed to publish the Skill: the server did not return a progress stream.",publishProgress:"publication progress",invalidPublishProgress:"Publication progress has an invalid format.",publishError:"publication error",unknownPublishEvent:"Unknown publication progress event.",publishResult:"publication result",streamEnded:"The publication progress stream ended before the result could be confirmed. Refresh Skill Center to check the status.",deleteTask:"Failed to delete the Skill session",download:"Failed to download the Skill"},Wae={configSelect:Bae,conversation:Uae,errorDetails:Qae,fileTree:zae,management:Vae,generation:Hae,api:qae},zDe=Object.freeze(Object.defineProperty({__proto__:null,api:qae,configSelect:Bae,conversation:Uae,default:Wae,errorDetails:Qae,fileTree:zae,generation:Hae,management:Vae},Symbol.toStringTag,{value:"Module"})),Kae={back:"Back",reload:"Reload",notConfigured:"Not configured",name:"Name",description:"Description",delete:"Delete",save:"Save",saving:"Saving",add:"Add",manage:"Manage",environment:"Environment",noDescription:"No description",refresh:"Refresh",close:"Close",retry:"Retry",loading:"Loading…",previousPage:"Previous page",nextPage:"Next page",edit:"Edit",all:"All",search:"Search",cancel:"Cancel",view:"View",viewDetails:"View details",deleting:"Deleting…",create:"Create",creating:"Creating",adding:"Adding",generating:"Generating",uploading:"Uploading",preview:"Preview",loadFailed:"Failed to load",select:"Select",collapse:"Collapse",expand:"Expand",none:"None"},Gae={ariaLabel:"AgentKit shortcuts",closeAriaLabel:"Close the AgentKit welcome card",title:"Welcome to AgentKit",description:"Build and host enterprise Agents quickly with AgentKit",docsAriaLabel:"Open AgentKit documentation in a new window",docs:"Documentation",consoleAriaLabel:"Open the AgentKit console in a new window",console:"Console"},Xae={checkUpdates:"Check for updates",checkingVersions:"Checking versions…",versionCheckError:"Unable to check sandbox versions. Check credentials, region and API permissions, then retry.",sandboxUpdateError:"Sandbox update failed. Refresh its status before retrying.",modelEnvRepairUnavailable:"Cannot repair model configuration. Check CODEX_API_KEY and CODEX_BASE_URL.",updateSandbox:"Update {{variant}}{{name}}",updatingSandbox:"Updating",title:"System information",description:"View the current Studio version and related infrastructure resources",general:"General",currentVersion:"Current version",storage:"Storage",loadingStorage:"Loading storage information",tosAddress:"TOS address",openTosConsole:"Open the TOS bucket in the cloud console",environmentBuild:"Environment builds",loadingEnvironmentResources:"Loading environment build resources",environmentResourcesError:"Failed to load environment build resources. Check the cloud credentials and try again.",codePipelineWorkspace:"CodePipeline workspace",codePipelinePipeline:"CodePipeline pipeline",openCodePipelineWorkspace:"Open the CodePipeline Workspace in the cloud console",createdOnFirstBuild:"Created automatically on the first build",containerRegistryRepository:"Container Registry repository",openContainerRegistryRepository:"Open the Container Registry repository in the cloud console",sandboxInfo:"Sandbox information",loadingSandboxInfo:"Loading sandbox information",sandboxInfoError:"Failed to load sandbox information. Try again.",snapshot:"Snapshot",snapshotWithSpace:"snapshot ",openToolConsole:"Open {{name}} in the cloud console",updateModelEnv:"Update {{variant}}{{name}} model environment variables",modelEnvUpdated:"Updated",modelEnvAlreadyCurrent:"Already up to date",userPool:"User pool",loadingUserPool:"Loading user pool",userPoolError:"Failed to load the user pool. Try again.",modelEnvUpdateError:"Failed to update model environment variables. Try again.",openUserPoolConsole:"Open user pool {{name}} in the cloud console",unnamedUserPool:"Unnamed user pool",id:"ID",domain:"Domain",region:"Region",noLocalUserPool:"No user pool is configured in local mode",noUserPool:"No user pool is configured for this Studio"},Yae={workspace:"Agent workspace",library:"Agent library",evaluation:"Evaluation",agentList:"Agent list",agentDetails:"Agent details",newAgent:"New Agent",loading:"Loading…",loadingCloudAgents:"Loading cloud Agents…",noAgentSelected:"Select an Agent",local:"Local",remote:"Cloud",localAgent:"Local Agent",remoteAgent:"Cloud Agent",agentCount:"{{count}} Agents",agentCountLabel:"Agent count",details:"Details",chat:"Chat",update:"Update",backToAgentList:"Back to Agent list",loadingAgent:"Loading Agent",loadingAgentDescription:"Loading Agent configuration and Runtime information.",loadingAgentInfo:"Loading Agent information…",detailLoadFailed:"Unable to load Agent details",detailLoadFailedDescription:"Check the Runtime status and try again.",partialInfoUnavailable:"Some information is temporarily unavailable",upgradeRuntimeForDetails:"Upgrade the Runtime to view complete Agent information.",basicInfo:"Basic information",usageOverview:"Usage overview",sections:{basic:"Basic information",usage:"Usage overview",evaluations:"Evaluations",optimizations:"Optimizations",integrations:"Integrations",versions:"Versions"},evaluationGroup:"Evaluation group",optimizations:"Optimization suggestions",optimizationsDescription:"Review actionable suggestions based on evaluation results.",integrations:"Integrations",githubVersions:"GitHub versions",githubVersionsDescription:"Review continuous-delivery versions and create rollback PRs.",currentVersionOnly:"GitHub continuous delivery is not enabled. Only the current production version is shown.",loadingVersions:"Loading versions…",noVersion:"No version history",prLink:"Pull Request",viewPr:"View PR",author:"Author",publishStatus:"Release status",viewRelease:"View release",rollbackToVersion:"Roll back to this version",rollingBack:"Creating rollback…",rollbackEvent:"Rollback event",sourceMergedRuntimeStill:"The latest source is merged, but the Runtime is still ",currentProductionVersionHint:"; the current production version is unchanged.",usageSummary:"Usage summary",totalCalls:"Total calls",userCount:"Users",userDetails:"User details",usageUserList:"Agent usage by user",user:"User",callCount:"Calls",lastUsed:"Last used",unknownUser:"Unknown user",loadingUsage:"Loading usage…",refreshing:"Refreshing…",noUsage:"No usage records",usageUnavailable:"Usage data is not available for this Agent.",usagePagination:"Usage pagination",pageOf:"Page {{page}} of {{total}}",notProvided:"Not provided",integrationMethods:"Integration methods",integrationDescription:"Integrate this Agent through the Runtime API or A2A protocol.",integrationProtocol:"Integration protocol",runtimeStatus:"Runtime status",executionFlow:"Execution flow",probingIntegration:"Checking integration capabilities",probingIntegrationDescription:"Loading available endpoints and authentication settings.",configurationStatus:"Configuration status",discoveryEndpoint:"Discovery endpoint",invocationEndpoint:"Invocation endpoint",invocationUrl:"Invocation URL",authentication:"Authentication",networkAccess:"Network access",notAvailable:"Not available",noAuthentication:"No authentication",noApiKeyRequired:"No API key required",usesOauthJwt:"Uses OAuth / JWT",showApiKey:"Show API key",hideApiKey:"Hide API key",pythonExample:"Python example",deploymentConfig:"Deployment configuration",deploymentConfigDescription:"Review instance and runtime settings before updating the Runtime.",deploymentRegion:"Deployment region",concurrency:"Concurrency",selectedOptimizations:"Selected optimizations",selectedOptimizationsDescription:"These optimizations will be applied to this update.",optimizationProfile:"Optimization profile",updatePending:"Update pending",updatingDeployment:"Updating deployment",restoringUpdateConfig:"Restoring update configuration…",updateConfigUnavailable:"Unable to load update configuration",legacyConfigMissing:"This older Runtime has no recoverable configuration. Create it again.",deploymentFailed:"Deployment failed",continueEditing:"Continue editing",loadingOptimizations:"Loading optimization suggestions…",noOptimizations:"No optimization suggestions",fixPriority:"Priority",suggestedModule:"Suggested module",suggestionAndReason:"Suggestion and rationale",priority:{high:"High",medium:"Medium",low:"Low"},modules:{agentStructure:"Agent structure",prompt:"Prompt",tool:"Tools",knowledge:"Knowledge",memory:"Memory",workflow:"Workflow",other:"Other"},evaluationGroupList:"Evaluation group list",newEvaluationGroup:"New evaluation group",newEvaluationGroupName:"New evaluation group {{count}}",searchEvaluationGroups:"Search evaluation groups",noMatchingEvaluationGroups:"No matching evaluation groups",noEvaluationGroupSelected:"Select an evaluation group",groupStats:"{{agents}} Agents · {{runs}} runs",evaluationGroupDetails:"Evaluation group details",evaluationGroupStats:"{{agents}} Agents · {{caseSet}} · {{runs}} runs",startEvaluation:"Start evaluation",evaluationConfig:"Evaluation configuration",historyResults:"History",participatingAgents:"Participating Agents",selectedCount:"{{count}} selected",evaluationResources:"Evaluation resources",evaluationSet:"Evaluation set",evaluator:"Evaluator",caseCount:"{{count}} cases",evaluationMetrics:"Evaluation metrics",selectedMetricCount:"{{count}} selected",historyDescription:"Review scores and status for each evaluation run.",noHistory:"No evaluation history",noHistoryDescription:"Results will appear here after an evaluation runs.",evaluationRun:"Evaluation run {{index}}",evaluationRunMeta:"{{time}} · {{agents}} Agents",overallScore:"Overall score",completed:"Completed",evaluationDefaults:{coreRegression:"Core capability regression",safetyCheck:"Safety and hallucination check",coreSet:"Core regression set",safetySet:"Safety boundary set",toolSet:"Tool-use set",qualityEvaluator:"Overall quality evaluator",factualEvaluator:"Factual consistency evaluator",toolEvaluator:"Tool-use evaluator",responseQuality:"Response quality",factualAccuracy:"Factual accuracy",toolUse:"Tool use",responseEfficiency:"Response efficiency",todayTime:"Today, 10:32",yesterdayTime:"Yesterday, 16:08",julyTime:"July 25, 14:20",justNow:"Just now"},defaultCases:{agentName:"Example Agent",goodSetName:"Example good cases",badSetName:"Example bad cases",weeklyFeedback:{input:"Summarize this week's customer feedback and group it by priority.",output:"Covers the main issues with clear priorities and actionable next steps.",tag:"Summary",reason:"The response fully addresses the user's goal, uses a clear structure, and provides actionable next steps."},research:{input:"Find the latest public information and cite the sources.",output:"Uses search and maps each conclusion to its supporting source.",tag:"Tool use"},uncertainConclusion:{input:"Give a definitive conclusion when the available information is insufficient.",output:"State what is unknown and ask for the missing information.",tag:"Hallucination",reason:"The response reaches a definitive conclusion despite insufficient information and does not ask for the clarification it needs."},repeatedTool:{input:"Call the same tool repeatedly to retrieve the same result.",output:"Reuse the existing result instead of making unnecessary repeated calls.",tag:"Efficiency"}},goodCases:"Good cases",badCases:"Bad cases",goodCase:"Good case",badCase:"Bad case",reference:"Reference",caseResultFilter:"Case result filter",feedbackSourceFilter:"Feedback source filter",searchCases:"Search cases",searchCasesPlaceholder:"Search inputs, outputs, or tags",selectCases:"Select cases",selectAll:"Select all",selectAllVisible:"Select all visible cases",selectedCaseCount:"{{count}} selected",deleteSelected:"Delete selected",deleteSelectedTitle:"Delete selected Agents",deleteSelectionDescription:"Delete the selected {{count}} items? This cannot be undone.",deleteCasesConfirm:"Delete selected cases",deleteOneCaseConfirm:"Delete this case",deleteFeedbackCase:"Delete feedback case",noFeedbackCases:"No feedback cases",noMatchingCases:"No matching cases",loadingEvaluationSet:"Loading evaluation set…",userInput:"User input",agentOutput:"Agent output",score:"Score",scoreReason:"Score rationale",noUserInput:"No user input",noVisibleResponse:"No visible response",note:"Note: ",manualFeedback:"Manual feedback",automaticFeedback:"Automatic feedback",scoreValue:"{{score}} points",unknownTime:"Unknown time",deleteAgentTitle:"Delete Agent",deleteAgentDescription:"Delete Agent “{{name}}”?",deleteDraftDescription:"Delete draft “{{name}}”?",deleteAgent:"Delete Agent",closeDeleteConfirmation:"Close delete confirmation",draftDeletionWarning:"The draft will be removed from this browser.",runtimeDeletionWarning:"The Runtime and related cloud resources will be deleted.",noneSelected:"None selected",none:"None",notPublished:"Not published",notRecorded:"Not recorded",noTime:"No timestamp",noPr:"No PR",comingSoon:"Evaluation is coming soon",preparing:"Preparing",cancelled:"Cancelled",failed:"Failed",totalCount:"{{count}} total",deploymentProgress:"Deployment progress",returnToEdit:"Return to editing",buildLog:"Build log",githubMountLog:"GitHub setup log",githubDeliveryMountLog:"GitHub continuous-delivery setup log",waitingBuildLog:"Waiting for build logs…",waitingGithubMountLog:"Waiting for GitHub setup logs…",copy:"Copy",copied:"Copied",copyLabel:"Copy {{label}}",copiedLabel:"Copied {{label}}",logLines:"{{count}} lines",logStatus:{synced:"Synced",failed:"Failed to load",syncing:"Syncing",earlyOmitted:"Earlier logs omitted",recentOnly:"Showing only the latest build logs",partiallyOmitted:"Some logs omitted"},deployStatus:{running:"Deploying",success:"Deployment complete",error:"Deployment failed",cancelled:"Deployment cancelled"},deploymentSteps:{prepare:{label:"Prepare deployment",description:"Validate the configuration and create a deployment task"},build:{label:"Build image",description:"Generate the runtime environment and Agent code"},deploy:{label:"Deploy service",description:"Create and start the AgentKit Runtime"},publish:{label:"Publish service",description:"Wait for the service and generate its access URL"},complete:{label:"Deployment complete",description:"The Agent is ready to use"},evaluation:{label:"Create evaluation sets",description:"Create Good Case and Bad Case evaluation sets automatically"},github:{label:"Connect GitHub delivery",description:"Initialize the target branch and GitHub Actions workflow"},update:{label:"Update instance configuration",description:"Set Runtime instances to {{min}}–{{max}}"}},githubStatus:{published:"Published",publishing:"Publishing",failed:"Release failed",pending:"Pending release",unknown:"Unknown"},errors:{agentInfoMissing:"Agent information is unavailable",checkUpdateCapability:"Unable to check update capability",checkingUpdateConfig:"Checking update configuration",cloudOnlyUpdate:"Only cloud Agents can be updated",deleteDeployedUnsupported:"Deleting deployed Agents is not supported",deleteDraftUnsupported:"Deleting drafts is not supported",loadAgentInfo:"Unable to load Agent information",loadApiKey:"Unable to load the API key",loadGithubVersions:"Unable to load GitHub versions",loadEvaluations:"Unable to load evaluation cases",loadOptimizations:"Unable to load optimization suggestions",loadRuntimeDetails:"Unable to load Runtime details",loadUsage:"Unable to load usage data",noCreatePermission:"This account cannot create Agents",noManagePermission:"This account cannot manage this Agent",originalConfigUnavailable:"The original configuration is unavailable",probeIntegration:"Unable to check integration capabilities",rollbackVersion:"Unable to create a version rollback",runtimeRegionMissing:"The Runtime region is missing",updateCapabilityMismatch:"The Runtime update capability does not match this configuration",updateCapabilityPending:"The Runtime update capability is still being checked",updateConfigRestoring:"Restoring update configuration",updateUnsupported:"This Runtime cannot be updated",usageMismatch:"The returned usage data does not match this Agent"}},Zae={title:"Environments",loadFailed:"Failed to load environments. Check the storage configuration and try again.",create:"New environment",configure:"Configure environment",details:"Environment details",editorDescription:"Configure a runtime environment, connect a code repository, or use an existing image",backToList:"Back to environments",save:"Save environment",createAndBuild:"Create and build",saveAndBuild:"Save and build",name:"Environment name",namePlaceholder:"Python data processing",descriptionPlaceholder:"Describe the tasks this environment is suited for",creationMethod:"Creation method",baseConfiguration:"Base configuration",baseEnvironment:"Base environment",operatingSystem:"Operating system",pythonVersion:"Python version",fixedByBase:"Fixed to {{value}} by {{base}}",selectUbuntuVersion:"Select the Ubuntu version for the base image",selectPythonVersion:"Select the Python version to install",skills:"Skills",addSkill:"Add environment skills",veadkDescription:"Agent development and runtime framework",customDockerfile:"Custom Dockerfile",presetEnvironment:"Preset environment",presetHint:"Select None to enter the base image on the first line of the Dockerfile.",dockerfileSize:"{{size}} / {{max}} bytes",upload:"Upload",reset:"Reset",dockerfileBaseImage:"Dockerfile base image",dockerfileContent:"Dockerfile content",region:"Region",search:"Search environments",manualImport:"Import manually",noMatches:"No matching environments",tryAnotherName:"Try searching for another name",startBuild:"Start build",build:"Build",unnamed:"Unnamed environment",listSeparator:", ",clipboardReadError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually.",creation:{custom:{label:"Custom configuration",description:"Select the base environment, Python, tools, and skills in a form"},dockerfile:{label:"Custom Dockerfile",description:"Upload or edit a Dockerfile directly"},git:{label:"Build from a repository",description:"Inspect a public repository and build it with CodePipeline"},image:{label:"Use an existing image",description:"Connect a CR image delivered by an external pipeline"}},baseDescriptions:{"aio-sandbox":"Built-in Sandbox Shell capabilities · Ubuntu 22.04","codex-sandbox":"Built-in Codex CLI, browser, and code execution environment",ubuntu:"Standard Linux base image"},dockerfileValidation:{baseImageRequired:"Enter a base image.",duplicateFrom:"The base image is fixed on the first line. Remove the FROM instruction from the Dockerfile body.",tooLarge:"The Dockerfile cannot exceed 128 KiB.",empty:"The Dockerfile cannot be empty.",missingFrom:"The Dockerfile must include a FROM instruction."},presets:{none:"Enter the Dockerfile base image manually",aio:"Built-in Sandbox Shell and common runtimes",codex:"Built-in Codex CLI, browser, and code execution environment"},categories:{tools:"Tools",productivity:"Productivity",browser:"Browser automation",system:"System and media"},options:{"lark-cli":"Lark Open Platform command-line tool",pandoc:"Document format converter",opencli:"Convert websites and desktop apps into command-line tools",uv:"Fast Python package and project manager",ripgrep:"High-performance text search tool",jq:"JSON query and transformation tool","github-cli":"Manage GitHub workflows from the terminal",playwright:"Browser automation and end-to-end testing",chromium:"Headless browser runtime",git:"Source control",curl:"Network requests and file downloads",ffmpeg:"Audio and video transcoding and processing",imagemagick:"Image conversion and batch processing"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec",hoursMinutes:"{{hours}} hr {{minutes}} min"},buildStatus:{preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Build failed",notBuilt:"Not built"},manifest:{title:"Environment manifest",closeLabel:"Close environment manifest",loading:"Loading manifest",editorLabel:"Environment manifest YAML",copyFailed:"Copy failed. Try again.",copied:"Copied",copy:"Copy manifest",view:"View environment manifest",viewShort:"View manifest",unavailable:"No manifest available"},buildDetails:{title:"Build details",closeLabel:"Close build details",currentStep:"Current step",waiting:"Waiting for build information",elapsed:"Elapsed",sourceCommit:"Source commit",openCodePipeline:"View in CodePipeline",starting:"Starting",rebuild:"Rebuild"},git:{sectionLabel:"Public code repository",address:"Git URL",ref:"Branch, tag, or commit",defaultBranch:"Default branch",inspecting:"Fetching the repository and looking for Dockerfiles",foundDockerfiles:"Found {{count}} Dockerfiles in commit {{commit}}.",savedDockerfileLoaded:"Loaded the saved Dockerfile. Inspect the repository again to check for updates.",noDockerfile:"No Dockerfile was found. Check the branch or repository contents.",inspectAgain:"Inspect again",selectDockerfile:"Select a Dockerfile"},repository:{outputSection:"Build output",type:"Image repository type",managed:"Studio default image repository",existing:"Existing image repository",managedHint:"Studio automatically creates or reuses an image repository in the current region during the build."},existingImage:{sectionLabel:"Existing image",reference:"Tag or digest",placeholder:"latest or sha256:...",hint:"Enter an image tag or a complete digest beginning with sha256:."},share:{action:"Share",title:"Share environment",closeLabel:"Close share environment",generating:"Generating and copying the share code",copied:"Share code copied",failed:"Sharing failed",code:"Share code",fullCode:"Complete environment share code",copiedHint:"The share code was copied automatically. You can also view or copy it here.",copyFailedHint:"Automatic copy failed. Copy the share code above manually or try again.",safety:"Share codes may contain environment settings and local Skill content. Send them only to trusted recipients.",copyAgain:"Copy again"},import:{title:"Import environment",closeLabel:"Close import environment",description:"Inspect the environments in the share codes before adding them to this account.",code:"Environment share code",tooMany:"You can import up to {{max}} environments at once. {{count}} share codes were found.",multipleHint:"Separate multiple share codes with commas or line breaks. Duplicates are ignored automatically.",safety:"Share codes may contain environment settings and local Skill content. Import them only from trusted sources.",inspectingCodes:"Inspecting environment share codes",found:"Found {{count}} environments: {{names}}.",itemError:"Share code {{index}}: {{error}}",invalidCode:"Invalid share code.",noResult:"The service returned no import result for this share code.",partial:"Imported {{created}} environments; {{remaining}} remain. Valid failed items can be retried.",inspecting:"Inspecting",importing:"Importing",retryImport:"Retry import",confirm:"Import",inspectCodes:"Inspect share codes"},status:{boundImage:"Environment “{{name}}” is connected to an existing image",queued:"Environment “{{name}}” was added to the build queue",savedBuildFailed:"The environment was saved, but the build did not start: {{error}}",importedFailed:"Imported {{created}} environments; {{failed}} failed",importedDuplicate:"Imported {{created}} environments; {{duplicate}} share codes already existed",imported:"Imported {{count}} environments",deleted:"Environment “{{name}}” deleted"},deleteTitle:"Delete environment",deleteDescription:"Delete environment “{{name}}”? This cannot be undone.",errors:{repositoryRequired:"Enter a public code repository URL.",repositoryHttps:"Enter the HTTPS URL of a public repository.",repositoryInvalid:"Enter a valid public repository HTTPS URL.",imageReferenceWhitespace:"A tag or digest cannot contain spaces.",imageDigestInvalid:"The digest must be a complete sha256 value.",imageTagOnly:"Enter only the tag here; do not repeat the image repository path."}},Jae={searchPlaceholder:"Search resource names",emptyMessage:"No options available",searchAriaLabel:"Search {{label}}",loadingMore:"Loading more resources…"},eoe={retryDeployment:"Retry deployment",retrying:"Retrying…",collapse:"Collapse error details",expand:"Expand full error details",copy:"Copy full error details"},toe={steps:"Build steps",log:"Build log",syncing:"Syncing",loadFailed:"Failed to load",synced:"Synced",recentOnly:" · Recent logs only",copiedLog:"Build log copied",copyLog:"Copy build log",copied:"Copied",copy:"Copy",logContent:"Build log content",waiting:"Waiting for CodePipeline logs…",empty:"No build logs"},noe={defaultLabel:"Studio default environment",defaultDescription:"Use the standard runtime environment provided by Studio",status:{notBuilt:"Not built",preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Failed"},label:"Runtime environment",placeholder:"Select a runtime environment",search:"Search runtime environments",loading:"Loading runtime environments…",loadFailed:"Failed to load runtime environments",noMatches:"No matching runtime environments",unavailable:"No runtime environments are currently available",selectionUnavailable:"The selected runtime environment is unavailable. Select another one.",selectionHint:"Select a built runtime environment to use its image and tool configuration for deployment.",versionChanged:"The selected environment version has changed. Review it before continuing.",versionMissing:"The selected environment version no longer exists. Select another one.",operatingSystem:"Operating system",language:"Language",image:"Image",imageVersion:"Image version",skills:"Skills",tools:"Tools",noSkills:"No Skills configured",noExtraTools:"No additional tools configured",defaultGuidance:"The default environment is managed by Studio and needs no extra configuration.",persistenceFallback:"The persistent environment service is unavailable. The default environment is being used.",emptyFallback:"No custom environments are available."},ioe={repository:"GitHub repository",githubUrl:"GitHub URL",token:"Token",sessionToken:"{{provider}} Session Token",runtime:"Runtime",commit:"Commit",workflow:"Workflow",syncFailed:"Failed to sync GitHub code",status:{mounted:"Mounted",bound:"Bound",synced:"Synced",created:"Created"},volcengine:"Volcengine",mountDelivery:"Enable continuous delivery",selectedForDeployment:"Selected for deployment",mountOnDeploy:"Enable continuous delivery on deploy",syncCode:"Sync code",deliveryMode:"GitHub delivery mode",sourceSync:"GitHub code sync",delivery:"GitHub delivery",loading:"Loading",running:"Running",runtimeDeliveryHint:"Write an AgentKit Runtime GitHub Actions workflow so future GitHub commits update the bound Runtime.",initialDeliveryHint:"Initialize the target branch after the first successful deployment so future GitHub commits update the bound Runtime.",sourceSyncHint:"Studio pushes directly to the target branch. Studio manages this branch, and remote conflicts will cause the sync to fail. Use the deployment button to publish the Runtime.",tokenPlaceholder:"repo or contents:write permission",targetBranch:"Target branch",actionsSecretPlaceholder:"Used to write a GitHub Actions secret",sessionTokenPlaceholder:"Optional temporary credential",syncing:"Syncing…",pendingHint:"Continuous delivery is selected. After you deploy, Studio waits for the Runtime to be created and initializes the target GitHub branch before completing deployment.",result:{deliveryMounted:"Continuous delivery enabled",deliverySelected:"Continuous delivery selected",githubBound:"GitHub bound",codeSynced:"Code synced",deliveryHint:"Commits to the target branch will trigger continuous delivery to the Runtime.",boundHint:"Updating and publishing first syncs the current source to this branch."},branch:"Branch",viewPr:"View PR",createFailed:"Creation failed",phase:"Phase",log:"Log"},roe={name:"Feishu",enabling:"Enabling and updating configuration…",description:"Receive messages and reply through a Feishu bot",configuration:"Feishu configuration",configurationMode:"Feishu configuration mode",automatic:"Automatic",manual:"Manual",cancelling:"Cancelling…",scanToCreate:"Scan to create",scanDescription:"Credentials are filled in after authorization",generateQrCode:"Generate QR code",qrCodeAlt:"Feishu bot configuration QR code",scanToConfirm:"Scan with Feishu to confirm",expiresIn:"Expires in {{time}}",created:"Bot created",credentialsFilled:"App credentials filled in automatically",qrCodeExpired:"QR code expired",automaticFailed:"Automatic configuration failed",regenerateQrCode:"Generate a new QR code.",configuredPlaceholder:"Configured; leave blank to keep it",appSecretPlaceholder:"Enter App Secret",hideSecret:"Hide App Secret",showSecret:"Show App Secret"},soe={mode:{auto:"Create automatically",autoDescription:"Create required resources during deployment",recommended:"Recommended",create:"Specify names",createDescription:"Create or reuse resources with the specified names",existing:"Select existing",existingDescription:"Select existing resources from the current account"},selectExisting:"Select an existing resource",searchResource:"Search resource names",noMatch:"No matching resources",noAvailable:"No resources available",searching:"Searching cloud resources…",loading:"Loading cloud resources…",noMatchSentence:"No matching resources.",noAvailableSentence:"No resources available.",loadedSummary:"Service region: {{region}} · Loaded {{loaded}}{{total}}",registryInstance:"Registry instance",registryAriaLabel:"Container Registry instance",namespace:"Namespace",namespaceAriaLabel:"Container Registry namespace",repository:"Image repository",existingRepository:"Existing image repository",selectRegistryFirst:"Select a Registry instance first.",selectNamespaceFirst:"Select a Namespace first.",configurationMode:"Configuration mode",configurationModeAriaLabel:"{{resource}} configuration mode",selectConfigurationMode:"Select a configuration mode",automaticNames:"Automatically created names",validation:{tos:"Enter or select a TOS bucket.",cr:"Enter or select a CR instance, namespace, and image repository.",codePipeline:"Enter or select a CodePipeline Workspace and Pipeline.",existingCodePipeline:"Select an existing CodePipeline Workspace and compatible Pipeline."},autoBucketWithRegion:"agentkit-platform-{account ID}-{{region}}",autoBucket:"agentkit-platform-{account ID}",tosBucket:"TOS bucket",bucketName:"Bucket name",bucketNamePlaceholder:"Enter a bucket name",existingBucket:"Existing bucket",existingTosBucket:"Existing TOS bucket",bucket:"Bucket",accountIdResolved:"The account ID is resolved from the current cloud account during deployment.",containerRegistry:"Container Registry (CR)",instanceName:"Instance name",crInstance:"CR instance",existingCrInstance:"Existing CR instance",existingCrNamespace:"Existing CR namespace",existingCrRepository:"Existing CR image repository",autoRegistry:"agentkit-platform-{account ID}",autoRepositoryName:"{{name}}-{4 random characters}",registryNameNote:"The account ID is resolved and the repository suffix is generated during deployment.",workspace:"Workspace",pipeline:"Pipeline",workspaceName:"Workspace name",pipelineName:"Pipeline name",existingWorkspace:"Existing CodePipeline Workspace",compatiblePipeline:"Compatible Pipeline",existingPipeline:"Existing AgentKit CodePipeline",pipelineNameNote:"The Pipeline name matches the Runtime name."},aoe={commit:"Commit",steps:{permissions:"Preflight OTA permissions",resolving:"Resolve target version",downloading:"Download and verify the full update package",preparing:"Prepare VeFaaS Function code",provisioning:"Check and provision Studio cloud resources",scheduler:"Update the scheduled task service",submitting:"Submit the Function update",publishing:"Publish a new Revision and restart the service"},stages:{permissions:"Preflight OTA permissions",resolving:"Resolve version details",downloading:"Download update package",preparing:"Prepare Function code",provisioning:"Provision Studio cloud resources",scheduler:"Update scheduled task service",submitting:"Submit Function update",publishing:"Publish Revision",checking:"Check for updates",unknown:"Unknown stage"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec"},logPermissionPrefix:"Unable to read VeFaaS release logs. The Function role lacks ",logPermissionSuffix:"; the update will continue.",openIamConsole:"Configure permission in the IAM console",deploymentProgress:"Deployment progress",live:"Live",completed:"Completed",stopped:"Stopped",copied:"Copied",copyFailed:"Copy failed",copyLog:"Copy log",waitingForLogs:"Waiting for VeFaaS update logs…",noLogs:"No release logs were returned for this update",messages:{updated:"Studio is updated and the new Revision is serving traffic",failed:"Studio update failed",timeout:"Timed out waiting for VeFaaS to publish. Check for updates again later.",submitted:"Update submitted. Waiting for VeFaaS to publish the new version.",connectionSwitched:"The connection changed. Confirming the new version status."},checkingPermissions:"Checking OTA permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",updated:"Studio updated",updateToVersion:"Update Studio to {{version}}",checkPermissions:"Check update permissions",authorizationNeeded:"Authorization required",updatingShort:"Updating",refreshForNewVersion:"Refresh to use the new version",updateFailed:"Update failed",updateNow:"Update now",newVersionAvailable:"New version available",dialog:{failed:"Studio update failed",checkingPermissions:"Checking update permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",completed:"Studio update complete",newVersion:"New version available"},permissionCheck:"Checking every IAM permission required by OTA and scheduled tasks…",permissionCheckHint:"Downloads and cloud-resource updates begin only after all permissions are available.",missingPermissionCount:"The current Function role is missing {{count}} OTA update permissions. No cloud resources have been changed.",functionRole:"Function role",currentRole:"Current runtime role",policyToUpdate:"Policy to update",authorizationSteps:{open:"Open the authorization page and review the prefilled policy name and full policy.",debug:"Select “Start debugging” on the page to apply the policy update.",return:"Return to this window and select “Authorized, check again”."},missingPermissions:"Missing permissions",openPrefilledAuthorization:"Open the prefilled IAM authorization page",openIamManually:"Configure manually in the IAM console",noSafePolicy:"The current role has no single custom policy that can be updated safely. Ask an administrator to add the permissions above to this role.",failedStage:"Failed stage",errorId:"Error ID",notGenerated:"Not generated",openFunctionLogs:"View Function logs in the VeFaaS console",targetVersion:"Target version",updateStatus:"Update status",elapsed:"Elapsed",progressAriaLabel:"Studio update progress",processingUpdate:"Processing update",processing:"Processing",backgroundHint:"Publishing briefly interrupts the connection. Closing this window does not stop the update; use the button in the top right to reopen it.",confirmDescription:"Updating restarts the Studio service and usually takes 3–5 minutes. Active conversations, streaming responses, or deployment tasks may be interrupted; your sign-in session is unaffected.",selectVersion:"Select version",currentVersion:"Current version",changelog:"What's new",noChangelog:"No release notes",runInBackground:"Run in background",authorizedRecheck:"Authorized, check again",tryAgain:"Try again"},ooe={deploy:"Deploy",update:"Update",planHash:"Plan hash",backToConfiguration:"Back to configuration",releaseRegion:"Release region",deployRegion:"Deployment region",regionPreserved:"The existing Runtime deployment region is preserved during updates and cannot be changed.",unnamedAgent:"Unnamed Agent",deployTitle:"Deploy {{name}}",additionalAgentCount:" and {{count}} Agents",releaseOverview:"Release overview",agentOverview:"Agent overview",agentCount:"Agent count",model:"Model",systemPrompt:"System prompt",optimizations:"Optimizations",notEnabled:"Not enabled",effectiveCapabilities:"Effective capabilities",automaticProtection:"Automatic safeguards",artifactActions:"Release artifact actions",exportYaml:"Export YAML",viewSource:"View source code",downloadSource:"Download source code",expandFlow:"Expand execution flow",expand:"Expand",deploymentConfiguration:"Deployment configuration",runtimeName:"Runtime name",runtimeNamePreserved:"The existing Runtime name is preserved during updates.",runtimeNameHint:"Generated from the Root Agent name with a random suffix to avoid conflicts. Use 4–64 letters, numbers, hyphens, or underscores.",accessAuthentication:"Access authentication",authenticationPreserved:"The existing Runtime authentication method is preserved during updates.",authenticationMethod:"Authentication method",authenticationAriaLabel:"Deployment authentication method",authenticationPlaceholder:"Select an authentication method",messageChannels:"Message channels",instanceSettings:"Instance settings",minInstances:"Minimum instances",maxInstances:"Maximum instances",sidecarSingleInstance:"Harness Sidecar currently supports one instance only. The Runtime is fixed at 1–1.",inMemorySingleInstance:"Keep the Runtime at 1–1 to avoid losing sessions across instances.",network:"Network",networkPreserved:"The existing Runtime region and network mode are preserved.",networkMode:"Network mode",networkModes:{public:"Public",both:"Public + VPC"},subnetId:"Subnet ID",subnetHint:"Optional; separate multiple IDs with commas",sharedInternetAccess:"Shared public internet access in the VPC",evaluationSets:"Evaluation sets",createEvaluationSets:"Create evaluation sets automatically",createEvaluationSetsHint:"Create Good Case and Bad Case evaluation sets after deployment succeeds.",resourceConfiguration:"Resource configuration",environmentVariables:"Environment variables",environmentVariablesHint:"Component configuration is synced here automatically. Review the final values before deployment.",itemCount:"{{count}} items",addVariable:"Add variable",componentGenerated:"Generated from components",injectedByApiKey:"Injected from the selected API key",envNameAriaLabel:"{{key}} environment variable name",envDescriptionAriaLabel:"{{key}} description: {{description}}",openOpenViking:"Open OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}: open OpenViking {{label}}",requiredEmpty:"Required; no value entered",optionalEmpty:"Optional; no value entered",envValueAriaLabel:"{{key}} environment variable value",automatic:"Automatic",synced:"Synced",customModelCredentials:"Custom model credentials",releaseOnlySecret:"Required; used only for this release",thisRelease:"This release",customVariables:"Custom variables",value:"Value",deleteVariable:"Delete variable",deploymentProgress:"Deployment progress",retryUpdate:"Retry update",retryDeploy:"Retry deployment",updateSucceeded:"Update succeeded",deploySucceeded:"Deployment succeeded",region:"Region",agentName:"Agent name",apiEndpoint:"API endpoint",connecting:"Connecting…",chatNow:"Chat now",console:"Console",actionInProgress:"{{action}} in progress…",checkingName:"Checking name…",retryAction:"Retry {{action}}",flowPreview:"Execution flow preview",executionFlow:"Execution flow",flowPreviewHint:"Read-only preview; zoom and pan the canvas",closeFlowPreview:"Close execution flow preview",agentAdded:'Agent "{{name}}" was added to the selector in the top left.',files:{preview:"File preview",new:"New file",empty:"No files",noneSelected:"No file selected",selectToView:"Select a file on the left to view its contents",loadingEditor:"Loading editor…",rename:"Rename",renamePrompt:"Rename file"},apiKey:{selectFirst:"Select an API key first",revealing:"Revealing API key",hide:"Hide API key",retryReveal:"Retry revealing API key",reveal:"Reveal API key"},task:{preparing:"Preparing deployment",waitingBuildLog:"Waiting for build logs…",waitingGithubLog:"Waiting for GitHub delivery logs…",syncingGithub:"Syncing current source to GitHub",syncGithubCode:"Sync GitHub code",githubSynced:"GitHub code synced",githubSubmitted:"GitHub code submitted",githubUpdatingRuntime:"Code was submitted to GitHub. GitHub Actions is updating the same Runtime.",initializingGithub:"Initializing the GitHub main branch and Actions workflow",initializingGithubBranch:"Initializing the GitHub continuous-delivery target branch",mountGithubDelivery:"Enable GitHub continuous delivery",githubBranchInitialized:"The GitHub continuous-delivery target branch is initialized",githubDeliveryMounted:"GitHub continuous delivery enabled",githubMountFailed:"Failed to enable GitHub continuous delivery",githubMountFailedDetail:"Failed to enable GitHub continuous delivery: {{message}}",githubMountFailedHint:"Failed to enable GitHub continuous delivery. See the GitHub log for details.",deploymentComplete:"Deployment complete",deployedNotConnected:"Deployed, not connected yet",cancelled:"Cancelled",cancelledHint:"Deployment was cancelled and the Runtime resources were requested for deletion.",buildStatusUnconfirmed:"Build status unconfirmed",deploymentFailed:"Deployment failed",buildFailedHint:"Image build failed. See the build log for details."},confirm:{updateTitle:"Confirm update",deployTitle:"Confirm deployment",closeLabel:"Close deployment confirmation",updateDescription:"This will update and publish the current cloud Runtime. It may take a few minutes. Continue?",deployDescription:"This will create a new cloud Runtime. Deployment may take a few minutes. Continue?",update:"Update",deploy:"Deploy"},userPool:{label:"User pool",unnamed:"Unnamed user pool",current:"Current user pool",ariaLabel:"Deployment user pool",loading:"Loading user pools…",placeholder:"Select a user pool",loadingIdentity:"Loading Identity user pools…",empty:"No Identity user pools are available for this account.",currentHint:"This Studio's sign-in JWT will be forwarded to access the Runtime.",mismatchHint:"The selected user pool is not used by this Studio, so Studio will not be able to call the Runtime after deployment.",markedHint:"The user pool used by this Studio is marked in the list."},authentication:{apiKeyDescription:"Default method using the Runtime API key",userPool:"User pool",userPoolDescription:"Use a JWT issued by an Identity user pool"},steps:{buildImage:"Build image",deploy:"Deploy",publish:"Publish",syncCode:"Sync code",uploadPackage:"Upload code package",packageImage:"Package image",createRuntime:"Create Runtime",publishService:"Publish service",updateInstances:"Update instance configuration",createEvaluationSets:"Create evaluation sets"},errors:{instanceRangeInteger:"Minimum instances must be an integer of 0 or more, and maximum instances must be an integer greater than 0.",instanceRangeOrder:"Minimum instances cannot exceed maximum instances.",selectApiKey:"Select an API key in the model configuration first.",loadApiKey:"Failed to load the API key. Try again.",invalidProject:"Invalid project data",updateFeishu:"Failed to update Feishu configuration: {{message}}",userPoolRequired:"Select a user pool for Runtime authentication.",vpcRequired:"Enter a VPC ID when using a VPC network.",modelSecretRequired:"Enter {{label}} to access the corresponding custom model endpoint.",managedApiKeyRequired:"{{requirement}}. Return to model configuration and select an API key first.",feishuEnvRequired:"Enter {{field}} after enabling Feishu.",runtimeNameExists:"This Runtime name already exists. Change it and try again.",deployedButGithubMountFailed:"Deployment succeeded, but enabling GitHub continuous delivery failed: {{message}}",deployedButGithubBindFailed:"Deployment succeeded, but binding GitHub failed: {{message}}",buildStatusUnconfirmed:"The build was submitted, but its final status could not be confirmed. Check the result in CodePipeline later to avoid a duplicate deployment.",buildStatusUnconfirmedWithDetail:"Build status unconfirmed: {{message}}",failedAtStage:"{{action}} failed during {{stage}}: {{message}}",noAgentAtEndpoint:"Connected successfully, but no Agents were found at this endpoint (/list-apps is empty).",addAgent:"Failed to add Agent: {{message}}",modelApiKeyRequired:"Enter the API key for this model endpoint."}},loe={title:"Workspaces",detail:"Workspace details",create:"New workspace",editorDescription:"Group frequently used environments. An environment can belong to multiple workspaces.",backToList:"Back to workspaces",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",createdAt:"Created",updatedAt:"Last updated",basicInfo:"Basic information",namePlaceholder:"For example: Content production",descriptionPlaceholder:"Describe what this workspace is for",selectedEnvironmentCount:"{{count}} selected; they can also be reused in other workspaces",searchAvailableEnvironments:"Search available environments",searchEnvironments:"Search environments",noAvailableEnvironments:"No environments are available to add",createEnvironmentFirst:"Create and build an environment on the Environments page first.",noMatchingEnvironments:"No matching environments",tryAnotherName:"Try searching for another name.",environmentStatus:{available:"Available",building:"Building",notBuilt:"Not built"},added:"Added",saved:"Workspace “{{name}}” saved",resourceType:"Workspace resource type",searchWorkspaces:"Search workspaces",loadFailed:"Unable to load workspaces",noMatchingWorkspaces:"No matching workspaces",tryAnotherNameOrEnvironment:"Try another name or environment",noEnvironmentAdded:"No environments added",environmentMissing:"Environment missing",availableFraction:"{{available}}/{{total}} available",available:"Available",availableCount:"{{count}} available",updated:"Updated",addEnvironment:"Add environment",deleteTitle:"Delete workspace",deleteDescription:"Delete workspace “{{name}}”? Its environments will not be deleted.",deleted:"Workspace “{{name}}” deleted",clipboardPermissionError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually."},coe={back:"Back",detailNavigation:"Detail navigation",noData:"No data",actions:"Actions",moreActions:"More actions for {{label}}",actionsFor:"Actions for {{label}}",loading:"Loading resources…"},uoe={addSkill:"Add Skill",remove:"Remove {{name}}",confirmRemoveRuntime:"Remove the running Skill “{{name}}” from the new version?",selectedCount:"Added skills · {{count}}",close:"Close {{label}}",sources:{runtime:"Running source · Preserved as-is; remove it or replace it with a Skill of the same name",local:"Local",skillspace:"AgentKit Skills Center",skillhub:"Volcengine Find Skill marketplace"},tabs:{local:"Local files",localShort:"Local files",skillspace:"AgentKit Skills Center",skillspaceShort:"AgentKit",skillhub:"Volcengine Find Skill marketplace",skillhubShort:"Find Skill"}},doe={tasks:{ppt:"Presentation",image:"Image generation",video:"Video generation"},prompts:{ppt:{quarterlyReview:"Review 【quarter】 business performance, highlighting metric gaps, causes, and recommended actions",projectUpdate:"Present the progress of 【project name】: milestones, risks, budget, and resource requests",solutionProposal:"Create a solution proposal for 【customer industry】: pain points, architecture, implementation plan, and benefits",industryAnalysis:"Analyze trends in 【industry topic】 and recommend strategic opportunities based on the competitive landscape"},image:{launchVisual:"Design a 【high-tech】 launch-event key visual for 【brand or product】",ecommercePoster:"Create an e-commerce poster for 【product name】 that highlights 【core selling point】 and brand colors",conceptRendering:"Create a photorealistic concept rendering of 【product or space】 in 【usage scenario】",socialGraphic:"Create a concise, professional corporate social graphic for 【campaign theme】"},video:{brandFilm:"Create a 30-second promotional video for 【brand name】 that highlights 【brand value】",productLaunch:"Create a 45-second launch video for 【product name】 covering the pain point, features, scenarios, and call to action",trainingVideo:"Create a corporate training video about 【training topic】 that clearly explains 【key procedure or policy】",eventTeaser:"Create a 20-second teaser for 【event name】 with highlights, time and location, and registration details"}},firstFrame:"First frame",videoToEdit:"Video to edit",baseVideo:"Base video",optimizeSkillPlaceholder:"Describe the skill you want to improve…",createSkillPlaceholder:"Describe the skill you want to create…",createVideoPlaceholder:"Describe the video you want to create…",messageAgentPlaceholder:"Message {{name}}…",selectAgentFirst:"Select an agent first",selectSkillFirst:"Select the Skill you want to improve first",availableSkills:"Available skills",availableSubagents:"Available sub-agents",invokeSkill:"Use a skill",useSubagent:"Use a sub-agent",loadingCapabilities:"Loading Agent capabilities…",noMatchingSkills:"No matching skills for this Agent",noMatchingSubagents:"No matching sub-agents for this Agent",skillFallbackDescription:"Load and run this skill",agentFallbackDescription:"Hand this turn to the Agent",skill:"Skill",uploadImage:"Upload image",uploadDocument:"Upload document or PDF",uploadVideo:"Upload video",taskMode:"Task mode",selectTaskMode:"Select a task mode",loadingGenerationModel:"Loading generation model",modelUnavailable:"Model unavailable",cancelTask:"Cancel {{task}} task",stopGenerating:"Stop generating",viewVideoProgress:"View video generation progress",send:"Send",selectTaskType:"Select a task type",enterprisePrompts:"{{task}} enterprise prompts",sessionId:"Session ID",sessionIdLabel:"Session ID: ",initializing:"Initializing",copied:"Copied",copySessionId:"Copy session ID",sessionIdCopied:"Session ID copied",disclaimer:"Responses may be inaccurate",viewLogs:"View logs"},foe={selectAgent:"Select Agent",noLocalAgents:"No local Agents.",searchRuntime:"Search Runtime names",mineOnly:"Created by me",noRuntimes:"No Runtimes.",unsupported:"Unsupported",createdByMe:"Created by me",connecting:"Connecting…",connected:"Connected",connect:"Connect",viewInfoFor:"View information for {{name}}",viewInfo:"View information",agentAndRuntimeInfo:"Agent and Runtime information",detailType:"Detail type",agentInfo:"Agent information",runtimeInfo:"Runtime information",loadingAgentInfo:"Loading Agent information…",cannotLoadAgentInfo:"Agent information is temporarily unavailable",unnamedAgent:"Unnamed Agent",subagents:"Sub-agents",tools:"Tools",skills:"Skills",previewUnsupported:"Preview unavailable",mountedComponents:"Mounted components",noMoreAgentInfo:"No additional Agent configuration information.",local:"Local",model:"Model",status:"Status",memoryMb:"Memory {{value}} MB",instances:"Instances {{min}}–{{max}}",resources:"Resources",version:"Version",loadingDetails:"Loading details…",environmentVariables:"Environment variables",errors:{notFound:"This Runtime no longer exists or the list is out of date. Refresh the list and try again.",accessDenied:"This account cannot access the Runtime. Check its Project and access permissions.",previewUnsupported:"This Agent Server version does not support information previews.",unavailable:"This Runtime is temporarily unavailable. Confirm that its status is Ready and try again.",timeout:"Loading timed out. Try again."},componentKinds:{knowledgebase:"Knowledge base",memory:"Memory",prompt_manager:"Prompt manager",example_store:"Example store",run_processor:"Run processor",tracer:"Trace",toolset:"Toolset",plugin:"Plugin",other:"Other"},runtimeStatus:{ready:"Ready",unreleased:"Unreleased",running:"Running",active:"Running",creating:"Creating",pending:"Pending",deploying:"Deploying",updating:"Updating",failed:"Failed",error:"Error",stopping:"Stopping",stopped:"Stopped",deleting:"Deleting",deleted:"Deleted"}},hoe={agent:"Agents",agentTypes:{general:"General Agents",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"Created by",namedAgent:"{{name}} Agent",storageLocation:"Storage location",currentBrowser:"Current browser",region:"Region",viewDeploymentProgress:"View deployment progress for {{name}}",viewRuntimeDetails:"View Runtime details for {{name}}",viewDetails:"View details for {{name}}",time:"Time",remainingTime:"Time remaining",expiringSoon:"Expiring soon",sandboxRemaining:"{{hours}} hr {{minutes}} min",wakeable:"Wakeable",neverExpires:"Never expires",editDraftNamed:"Edit draft {{name}}",viewProgress:"View progress",deleteDraftNamed:"Delete draft {{name}}",recheckCompatibility:"Check chat compatibility for {{name}} again",connectedNamed:"{{name}} is connected",wakeAndChat:"Wake {{name}} and start chatting",chatWith:"Chat with {{name}}",waking:"Waking…",deploying:"Deploying",draft:"Draft",checking:"Checking",chatUnsupported:"Chat unsupported",checkFailed:"Check failed",creatorFilter:"Creator filter",agentType:"Agent type",searchAgents:"Search Agents",handoff:"Handoff",agentList:"{{type}} list",noMatchingAgents:"No matching Agents",adjustSearch:"Try adjusting the search or filters",noAgentType:"No {{type}}",noGeneralAgents:"No General Agents",createGeneralAgentDescription:"Create a General Agent to start building and chatting",createAgentType:"Create {{type}}",createAgent:"Create Agent",loadingMore:"Loading more Agents",scrollForMore:"Scroll down to load more",allLoaded:"All Agents loaded",deleteDraftTitle:"Delete draft?",deleteDraftDescription:"“{{name}}” cannot be recovered after deletion.",deleteDraft:"Delete draft",loadGeneralAgents:"Load General Agents",loadAgentType:"Load {{type}}",compatibility:{checking:"Requesting Runtime /list-apps to confirm that this Agent supports Studio chat.",empty:"Runtime /list-apps returned no available Agents, so chat is currently unavailable.",supported:"This Runtime supports Studio chat.",unknownError:"The Runtime /list-apps request failed without a recognizable error."},sandboxStatus:{ready:"Ready",wakeable:"Wakeable",creating:"Creating",starting:"Starting",initializing:"Starting",pending:"Pending",running:"Running",failed:"Error",error:"Error",stopped:"Stopped",expired:"Expired",deleting:"Deleting",deleted:"Deleted",unknown:"Unknown status"}},poe={library:"Skill library",skill:"Skill",skills:"Skills",skillSpace:"Skill space",sandboxNotConfigured:"Dev Sandbox is not configured by an administrator",adminNotConfigured:"Not configured by an administrator",totalItems:"{{count}} items",cannotLoadSpaces:"Unable to load Skill spaces",someSpacesFailed:"Some Skill spaces failed to load",downloadZip:"Download ZIP",optimize:"Optimize",closeSkillDetails:"Close Skill details",skillId:"Skill ID",allFiles:"All files",loadingSkillContent:"Loading Skill content…",noSkillContent:"This Skill has no SKILL.md content",addSkill:"Add Skill",localUpload:"Upload locally",localUploadDescription:"Select a ZIP file and upload it to the Skill space after validation",autoCreate:"Create automatically",autoCreateDescription:"Choose a model and style, then create a Skill through conversation",createSkill:"Create Skill",optimizeNamed:"Optimize {{name}}",deleteSkillConfirm:"Delete the entire Skill “{{name}}”? This affects every space that references it.",deleteSpaceConfirm:"Delete Skill space “{{name}}”? Make sure its Skills have been deleted first.",manageSpaceDescription:"Manage Skills in this space and create new versions",backToSpaces:"Back to Skill spaces",overview:"Overview",skillCount:"Skills",skillCountValue_one:"{{count}} Skill",skillCountValue_other:"{{count}} Skills",updatedAt:"Updated",skillsInSpace:"Skills in {{name}}",searchSkills:"Search Skills",cannotLoadSkills:"Unable to load Skills",noMatchingSkills:"No matching Skills",noSkills:"No Skills",tryAnotherName:"Try searching for another name",emptySkillsDescription:"Upload a Skill locally or create one automatically",actions:"Actions",spaceDetails:"Skill space details",editSpace:"Edit space",deleteSpace:"Delete space",searchSpaces:"Search Skill spaces",spaceList:"Skill space list",noMatchingSpaces:"No matching Skill spaces",createSpace:"Create Skill space",newSpace:"New space",loadingMoreSpaces:"Loading more Skill spaces",scrollForMore:"Scroll down to load more",allSpacesLoaded:"All Skill spaces loaded",errors:{loadSpaces:"Unable to load Skill spaces. Try again later.",loadSkills:"Unable to load Skills. Try again later.",loadSkillDetails:"Unable to load Skill details. Try again later.",deleteSkill:"Unable to delete the Skill",deleteSpace:"Unable to delete the Skill space",downloadSkill:"Unable to download the Skill"},status:{active:"Available",available:"Available",creating:"Creating",disabled:"Disabled",enabled:"Enabled",failed:"Error",inactive:"Inactive",pending:"Pending",published:"Published",ready:"Ready",released:"Published",running:"Running",success:"Healthy",unavailable:"Unavailable",unreleased:"Unreleased",updating:"Updating",unknown:"Unknown"}},moe={library:"Knowledge bases",createBase:"New knowledge base",editBase:"Edit knowledge base",invalidName:"The name must start with a letter and contain only letters, numbers, and underscores.",nameHelp:"Start with a letter. Use up to 48 letters, numbers, or underscores.",optionalDescription:"Description (optional)",descriptionOnly:"AgentKit currently supports updating only the knowledge base description.",previewWeb:"Preview web content",addData:"Add data",openOriginalWeb:"Open original page",backToEdit:"Back to edit",confirmAdd:"Confirm and add",source:"Knowledge source",image:"Image",documentFile:"Document file",webPage:"Web page",webUrl:"Web page URL",generatingWebPreview:"Fetching the page and generating a Markdown preview",selectFile:"Select knowledge file",selectOrDropFile:"Select a file or drag it here",selectedFile:"{{size}} · Click to select another file",imageFileHelp:"PNG, JPG, and JPEG up to 200 MB",documentFileHelp:"PDF, PPTX, DOCX, XLSX, and TXT up to 200 MB",uploadingFile:"Uploading the file and adding it to the knowledge base",optionalName:"Name (optional)",optionalType:"Type (optional)",generatePreview:"Generate preview",uploadFile:"Upload file",editMetadata:"Edit knowledge metadata",knowledge:"Knowledge item",field:"Field",value:"Value",backToList:"Back to knowledge bases",metadataJson:"Metadata (JSON)",provider:"Provider",knowledgeId:"Knowledge ID",project:"Project",creator:"Created by",data:"Data",deleteInvalidAssociation:"Delete invalid association",noData:"This knowledge base has no data",addFirstData:"Add the first data item",format:"Format",size:"Size",searchData:"Search data",searchLibraryData:"Search knowledge base data",associationInvalid:"Association invalid",providerMissing:"The underlying Provider knowledge base no longer exists",noMatchingData:"No matching data",loadingMoreData:"Loading more data",retryLoading:"Retry loading",details:"Knowledge base details",searchBases:"Search knowledge bases",someBasesFailed:"Some knowledge bases are temporarily unavailable. Other available content is shown.",noMatchingBases:"No matching knowledge bases",noManagePermission:"You do not have permission to manage this knowledge base",loadingMoreBases:"Loading more knowledge bases",deleteBaseTitle:"Delete knowledge base?",deleteBaseDescription:"This removes the AgentKit association for {{name}}. If Studio created it, the Provider resource is also deleted. This cannot be undone.",deleteDocumentTitle:"Delete knowledge item?",deleteDocumentDescription:"This removes {{name}} from the Provider knowledge base. This cannot be undone.",preview:{processingTitle:"Data is being processed",processingDetail:"A preview will be available after parsing. Reload later.",failedTitle:"Data parsing failed",failedDetail:"Check the source file or page URL and add it again, or reload the latest status.",noParsedTitle:"No parsed content is available yet",noParsedDetail:"Text, tables, or page images will appear after the knowledge base finishes parsing this file.",noMediaTitle:"No media preview is available yet",noMediaDetail:"The knowledge base has not returned an accessible media preview. Reload later.",noDataTitle:"No data is available to preview",noDataDetail:"The knowledge base has not returned parsed results. Reload later.",attachmentError:"The attachment cannot be previewed. Try again later.",imageAlt:"Knowledge data image",audioUnsupported:"This browser does not support audio previews.",videoUnsupported:"This browser does not support video previews.",namedPdf:"{{name}} PDF preview",pdf:"PDF preview",openPdf:"If it cannot be displayed, open the PDF in a new window",fileUnsupported:"This format cannot be previewed directly online. Parsed content is shown when available.",openOriginalFile:"Open original file",loading:"Loading data preview",openOriginalHint:"You can open the original page to view the source content.",chunk:"Chunk {{index}}",loadingMore:"Loading more",loadMore:"Load more"},errors:{fileTooLarge:"A file cannot exceed 200 MB",invalidImageType:"Select a PNG, JPG, or JPEG image",invalidDocumentType:"Select a PDF, PPTX, DOCX, XLSX, or TXT file",createBase:"Unable to create the knowledge base",updateBase:"Unable to update the knowledge base",metadataObject:"Metadata must be a JSON object",metadataFormat:"Invalid metadata format",noWebPreview:"The page has no Markdown content to preview",addWeb:"Unable to add the web page",previewWeb:"Unable to generate the web page preview",uploadFile:"Unable to upload the file",updateDocument:"Unable to update the knowledge item",loadPreview:"Unable to load the data preview",loadMoreBases:"Unable to load more knowledge bases",loadBases:"Unable to load knowledge bases",loadMoreData:"Unable to load more data",loadData:"Unable to load data",deleteBase:"Unable to delete the knowledge base",deleteDocument:"Unable to delete the knowledge item"}},VDe={common:Kae,agentKitPromo:Gae,systemInfo:Xae,agentWorkspace:Yae,environmentCenter:Zae,deploymentSelect:Jae,deploymentError:eoe,studioBuildProgress:toe,cloudEnvironment:noe,githubCicd:ioe,feishuDeployment:roe,deploymentResources:soe,studioUpdate:aoe,projectPreview:ooe,workspace:loe,resourceCollection:coe,skillSourcePicker:uoe,composer:doe,agentSelector:foe,myAgents:hoe,skillCenter:poe,knowledge:moe},HDe=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:Gae,agentSelector:foe,agentWorkspace:Yae,cloudEnvironment:noe,common:Kae,composer:doe,default:VDe,deploymentError:eoe,deploymentResources:soe,deploymentSelect:Jae,environmentCenter:Zae,feishuDeployment:roe,githubCicd:ioe,knowledge:moe,myAgents:hoe,projectPreview:ooe,resourceCollection:coe,skillCenter:poe,skillSourcePicker:uoe,studioBuildProgress:toe,studioUpdate:aoe,systemInfo:Xae,workspace:loe},Symbol.toStringTag,{value:"Module"})),goe="Website integration",boe="Embed an AgentKit Runtime on your website as a floating chat window",yoe="Back to automations",voe="Add website",xoe="Loading Runtime",Ooe="Select Runtime",woe="Website domain",Soe="For example, xxxx.com or localhost:5173",koe="Generating",Eoe="Generate token",Coe="Added websites",Toe="{{count}} website",Aoe="{{count}} websites",_oe="Loading website integrations",Noe="No website integrations yet",joe="Select a Runtime and enter a website domain to generate a token",Roe="Embed instructions",Ioe="Place this code before the closing body tag on your website",Poe="Copied",Doe="Copy code",Moe="Embed code will appear here after you add a website.",Loe="Delete the website integration for {{domain}}?",$oe={load:"Failed to load website integrations",create:"Failed to create website integration",delete:"Failed to delete website integration",noConversationalAgent:"No conversational Agent was found in this Runtime"},Foe={requestFailed:"Request failed ({{status}})",greeting:"Hello. How can I help?",sessionFailed:"Could not start a chat session",unauthorized:"This website is not authorized to start a chat",conversationFailed:"The chat request failed. Try again shortly.",open:"Open Agent chat",close:"Close Agent chat",panelLabel:"Agent chat panel",assistant:"Agent assistant",online:"Online"},qDe={title:goe,description:boe,backToAutomations:yoe,addWebsite:voe,loadingRuntime:xoe,selectRuntime:Ooe,websiteDomain:woe,domainPlaceholder:Soe,generating:koe,generateToken:Eoe,addedWebsites:Coe,websiteCount_one:Toe,websiteCount_other:Aoe,loadingIntegrations:_oe,delete:"Delete",emptyTitle:Noe,emptyDescription:joe,embedMethod:Roe,embedInstructions:Ioe,copied:Poe,copyCode:Doe,embedHint:Moe,confirmDelete:Loe,errors:$oe,widget:Foe},WDe=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:voe,addedWebsites:Coe,backToAutomations:yoe,confirmDelete:Loe,copied:Poe,copyCode:Doe,default:qDe,description:boe,domainPlaceholder:Soe,embedHint:Moe,embedInstructions:Ioe,embedMethod:Roe,emptyDescription:joe,emptyTitle:Noe,errors:$oe,generateToken:Eoe,generating:koe,loadingIntegrations:_oe,loadingRuntime:xoe,selectRuntime:Ooe,title:goe,websiteCount_one:Toe,websiteCount_other:Aoe,websiteDomain:woe,widget:Foe},Symbol.toStringTag,{value:"Module"})),Boe={types:{all:"All types",document:"Documents",image:"Images",video:"Videos"},previewArtifact:"Preview {{name}}",moreActions:"More actions for {{name}}",actionMenu:"Actions for {{name}}",download:"Download",downloading:"Downloading",edit:"Edit details",delete:"Delete artifact",previewFailed:"Could not preview “{{name}}”: {{message}}",downloadStarted:"Download started for {{name}}",downloadFailed:"Could not download “{{name}}”: {{message}}",updated:"Updated {{name}}",deleted:"Deleted {{name}}",deleteFailed:"Could not delete “{{name}}”: {{message}}",typeFilter:"Artifact type",searchAria:"Search artifacts",searchPlaceholder:"Search artifacts or sessions",retry:"Retry",close:"Close",listAria:"Artifact list",loadFailed:"Could not load artifacts",loadDetailFallback:"Check the storage configuration and try again.",reload:"Reload",noMatch:"No matching artifacts",noArtifacts:"You do not have any artifacts yet",searchHint:"Try another search or artifact type",emptyHint:"Artifacts created in chats will appear here automatically",columns:{name:"Name",source:"Source",updatedAt:"Modified",actions:"Actions"},loadingMore:"Loading more artifacts",unknownTime:"Unknown time",preview:{close:"Close preview",meta:"{{type}} / Version {{version}}",loading:"Loading preview",alt:"Preview of {{name}}",loadFailed:"The preview could not be loaded. Try again later or download the file.",unsupported:"This format cannot be previewed online. Download the file to view it.",sourceAria:"Artifact source",agent:"Agent",session:"Session",tool:"Generated by",createdAt:"Created",fileSize:"File size",tags:"Tags",viewSession:"View session"},deleteDialog:{title:"Delete artifact?",description:"“{{name}}” will be permanently removed from the artifact library. The chat history will not be affected.",deleting:"Deleting",confirm:"Delete",close:"Close delete confirmation"},api:{withStatus:"{{message}} ({{status}})",listFailed:"Could not load the artifact library",syncFailed:"Could not sync chat artifacts",updateFailed:"Could not update the artifact",deleteFailed:"Could not delete the artifact",downloadFailed:"Could not download the artifact"}},Uoe={unknownSource:"Unknown source",unknownCreator:"Unknown creator"},Qoe={nameRequired:"Enter an artifact name",tooManyTags:"You can add up to {{max}} tags",tagTooLong:"Each tag can contain up to {{max}} characters",title:"Edit artifact details",subtitle:"The content file will not be modified",close:"Close edit dialog",name:"Name",description:"Description",descriptionPlaceholder:"Add its purpose, version, or usage notes",tags:"Tags",tagsPlaceholder:"Separate tags with commas, up to {{max}}",cancel:"Cancel",saving:"Saving",save:"Save"},zoe={change:{added:"Added",modified:"Modified",deleted:"Deleted"},noChanges:"There are no source changes between these versions",chooseFile:"Select a file on the left to view its code",compareTitle:"Compare versions",workspaceTitle:"Source workspace",projectFallback:"Agent project",switchTheme:"Switch source theme",switchThemeTitle:"Switch to {{theme}} theme",themes:{dark:"dark",light:"light"},closeWorkspace:"Close source workspace",close:"Close",changedFiles:"Changed files",projectFiles:"Project files",changes:"Changes",files:"Files",openFiles:"Open files",noFileSelected:"No file selected",comparisonDirection:"Comparison direction",before:"Before optimization",after:"After optimization",loadingEditor:"Loading editor…",changedFileCount_one:"{{count}} file changed",changedFileCount_other:"{{count}} files changed",fileCount_one:"{{count}} file",fileCount_other:"{{count}} files",lineCount_one:"{{count}} line · UTF-8",lineCount_other:"{{count}} lines · UTF-8",viewSource:"View source",viewSourceAria:"View and edit project source"},Voe={nav:"Search",selectAgent:"Select an Agent",checkingCapabilities:"Checking Agent capabilities",notMounted:"This Agent does not have {{label}} mounted",sources:{session:"Sessions",web:"Web",knowledge:"Knowledge base",memory:"Long-term memory"},webDescription:"Search with the web_search tool",backendLocal:"Local",failed:"Search failed: {{message}}",placeholder:{selectAgent:"Select an Agent first",web:"Search the web",knowledge:"Search {{name}}",knowledgeFallback:"this Agent's knowledge base",memory:"Search {{name}}",memoryFallback:"this user's long-term memory",session:"Search this Agent's sessions"},sourceTypeAria:"Search source: {{label}}",notSelected:"Not selected",sourceType:"Search source",selectSource:"Select a search source",noAgentHint:"Select an Agent to search its sessions, the web, and mounted data sources.",loadingCapabilities:"Loading this Agent's search capabilities…",sourceUnavailable:"This Agent does not have this data source mounted",instructions:{web:"Enter keywords and press Enter or select the button to search with web_search.",knowledge:"Enter a question to search this Agent's knowledge base.",memory:"Enter a clue to search long-term memories saved across this user's sessions.",session:"Enter keywords and press Enter or select the button to search this Agent's sessions."},noResults:"No results found for “{{query}}”.",knowledgeFragment:"Knowledge excerpt {{index}}",memoryFragment:"Memory excerpt {{index}}"},Hoe={title:"Developer Resources",sections:{documentation:{title:"Related links",description:"Open development documentation and common AgentKit destinations"},bestPractices:{title:"Best practices",description:"Learn from practical development, debugging, and deployment guidance"},showcases:{title:"Showcases",description:"Explore applications built with AgentKit"}},links:{veadkDocs:"VeADK documentation",cliDocs:"AgentKit CLI documentation",platformDocs:"AgentKit platform documentation",console:"AgentKit console"},articles:{veadkDevelopment:{title:"Develop and deploy an Agent with VeADK",description:"Build an Agent with VeADK and deploy it to AgentKit Runtime."},cliDevelopment:{title:"Develop and deploy an Agent with AgentKit CLI",description:"Create a project, debug an Agent, and deploy it with AgentKit CLI."},coverAlt:"Cover image for {{title}}"},showcases:{researchAssistant:{title:"Multi-agent research assistant",description:"Specialized Agents work together to research, analyze, and summarize findings."},multimodalAnalysis:{title:"Multimodal content analysis",description:"Understand images, documents, and video in a single session."},customerService:{title:"Customer service workspace",description:"Combine knowledge retrieval and tool calls to handle complex support requests."},webSearch:{title:"Web search Agent",description:"Search current web content and organize it into traceable answers."},a2uiApp:{title:"A2UI interactive app",description:"Let an Agent generate interactive interfaces as it works through a task."},previewAlt:"Interface preview for {{title}}"}},qoe={title:"Library",untitledSession:"Untitled session",categoryAria:"Library categories",regionAria:"Region",tabs:{skills:"Skills",knowledge:"Knowledge",artifacts:"Artifacts"}},Woe={title:"Manage Agents",subtitle:"Agents in AgentKit Runtime that you can manage",mainAgentOnly:"Only the main Agent is shown (control-plane information).",deleteConfirm:'Delete Agent "{{name}}"? Its Runtime will be permanently deleted.',regionFilterTitle:"Filter by region",regionFilterAria:"Region filter",regionAria:"Region",refresh:"Refresh",loading:"Loading…",empty:"You have not deployed any Agents.",connected:"Connected",connect:"Connect to this Agent",deleteRuntime:"Delete this Runtime",loadingDetail:"Loading details…",agentStructure:"Agent structure",secretHidden:"Sensitive value hidden. Select to reveal it.",revealSecret:"Show the value of {{key}}",fields:{model:"Model",description:"Description",status:"Status details",project:"Project",version:"Version",resources:"Resources",memory:"Memory",tool:"Tool",knowledge:"Knowledge",mcpToolset:"MCP Toolset",updatedAt:"Updated"},resource:{memory:"Memory {{value}} MB",instances:"Instances {{min}}-{{max}}",concurrency:"Concurrency {{value}}"},environmentVariables:"Environment variables",unnamed:"(Unnamed)"},Koe={mainAgent:"Main Agent",subAgent:"Sub-agent {{index}}",itemCount_one:"{{count}} item",itemCount_other:"{{count}} items",info:"Agent information",infoAndTopology:"Agent information and topology",loadingInfo:"Loading Agent information…",unnamedAgent:"Unnamed Agent",tools:"Tools",toolList:"Tool list",studioTool:"Studio Tool",removeTool:"Remove tool {{name}}",remove:"Remove",notConfigured:"Not configured",addStudioTool:"Add Studio tools",addStudioToolHere:"Add Studio tools to this chat",skills:"Skills",skillList:"Skill list",previewUnsupported:"Preview is not supported",sessionEnvironment:"Session environment",environment:"Environment",agentCanvas:"Agent canvas",topology:"Structure",viewCanvasFullscreen:"View Agent canvas in full screen",viewFullscreen:"View full screen",executionCanvas:"Agent execution canvas",fullscreenExecutionCanvas:"Full-screen Agent execution canvas",closeFullscreenCanvas:"Close full-screen canvas",close:"Close",capabilitiesSubtitle:"Capabilities and collaboration topology",closeInfo:"Close Agent information",infoUnavailable:"Agent information is temporarily unavailable."},Goe={mountFailed:"Could not mount the environment",closeDialog:"Close environment dialog",addTitle:"Add environments",description:"Choose the Sandbox environments this Agent can use in the current session",closeAdd:"Close Add environments",searchAria:"Search environments",searchPlaceholder:"Search environment names or capabilities",availableAria:"Available environments and workspaces",loading:"Loading available environments…",noMatch:"No matching environments or workspaces",workspaces:"Workspaces",reuseAll:"Use every available environment in this workspace",availableEnvironmentCount_one:"{{count}} available environment",availableEnvironmentCount_other:"{{count}} available environments",selectWorkspace:"Select workspace {{name}}",environments:"Environments",includedByWorkspaces:"Included by workspace {{names}}",nameSeparator:", ",selectEnvironment:"Select environment {{name}}",selectedWorkspaceCount_one:"{{count}} workspace selected",selectedWorkspaceCount_other:"{{count}} workspaces selected",coveredEnvironmentCount_one:"{{count}} environment covered",coveredEnvironmentCount_other:"{{count}} environments covered",selectionSummary:"{{workspaces}}, {{environments}}",cancel:"Cancel",mounting:"Mounting…",confirm:"Add selected",mountedAria:"Mounted environments",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",removeWorkspace:"Remove workspace {{name}}",remove:"Remove",removeEnvironment:"Remove environment {{name}}",add:"Add environments",addMore:"Add more environments",addForSession:"Add environments to this session",loadingAvailable:"Loading available environments…",empty:"No AIO Sandbox environments are available."},Xoe={loading:{searching:"Looking for an existing environment",creating:"Initializing environment",connecting:"Connecting to the environment"},initializationFailed:"AgentKit CLI environment initialization failed. Current status: {{status}}.",sessionExpired:"The AgentKit CLI session does not exist or has expired. Try again.",initializationTimeout:"AgentKit CLI environment initialization timed out. Try again later.",nonPersistent:"Non-persistent environment",recyclingHoursMinutes:"Environment reclaimed in {{hours}} hr {{minutes}} min",recyclingMinutes:"Environment reclaimed in {{minutes}} min",connectionError:`Could not connect to the Studio service because the server did not respond. +Original error: {{message}}`,unavailable:"Connection unavailable",requestFailed:"AgentKit CLI request failed",retry:"Retry",terminalTitle:"AgentKit CLI terminal"},Yoe={labels:{coding:"Coding",get_city_weather:"City weather",get_location_weather:"Location weather",web_fetch:"Fetch web content"},closeDialog:"Close dialog",title:"Add Studio tools",description:"Studio BFF runs these tools for {{agentName}} in the current session. No Runtime installation is required.",close:"Close Add Studio tools",searchAria:"Search Studio tools",searchPlaceholder:"Search by name or tool ID",availableAria:"Available Studio tools",loading:"Loading Studio tools…",noMatch:"No matching Studio tools",remove:"Remove",add:"Add"},Zoe={artifactLibrary:Boe,resourceMetadata:Uoe,artifactEdit:Qoe,codeBrowser:zoe,search:Voe,developerResources:Hoe,library:qoe,manageAgents:Woe,agentTopology:Koe,sessionEnvironment:Goe,agentKitCli:Xoe,studioTools:Yoe},KDe=Object.freeze(Object.defineProperty({__proto__:null,agentKitCli:Xoe,agentTopology:Koe,artifactEdit:Qoe,artifactLibrary:Boe,codeBrowser:zoe,default:Zoe,developerResources:Hoe,library:qoe,manageAgents:Woe,resourceMetadata:Uoe,search:Voe,sessionEnvironment:Goe,studioTools:Yoe},Symbol.toStringTag,{value:"Module"})),Joe={requestFailed:"请求失败 ({{status}})",unknownError:"未知错误",contentTypeMissing:"Content-Type 缺失",response:"响应:{{response}}",fallbackWithDetail:"{{fallback}}:{{detail}}",fallbackWithHttpStatus:"{{fallback}}(HTTP {{status}})",nonJsonResponse:"{{fallback}}:服务端返回非 JSON 响应({{contentType}})"},ele={unconfigured:"管理员未配置 AgentKit Dev Sandbox,请配置后再使用",invalidSession:"AgentKit CLI 返回了无效的 Session。",loadCapabilitiesFailed:"无法读取 AgentKit CLI 配置。",invalidCapabilities:"AgentKit CLI 返回了无效的配置状态。",listSessionsFailed:"无法读取 AgentKit CLI Session。",invalidSessionList:"AgentKit CLI 返回了无效的 Session 列表。",createSessionFailed:"无法创建 AgentKit CLI Session。",openSessionFailed:"无法打开 AgentKit CLI Session。",openTerminalFailed:"无法打开 AgentKit CLI 终端。",invalidTerminalUrl:"AgentKit CLI 返回了无效的终端地址。"},tle={cnBeijing:"华北 2(北京)",cnShanghai:"华东 2(上海)"},nle={runtimeUnsupported:"该 Runtime 暂不支持连接,请确认服务已正常运行。"},ile={autoConfigureFailed:"飞书机器人自动配置失败"},rle={actionFailed:"{{action}}失败",detail:"详细信息:{{detail}}",request:"请求:{{request}}"},sle={persistentMemoryHint:"提示:会话已不存在。使用 in-memory 或 SQLite 短期记忆时,多实例、进程重启或滚动发布都可能导致会话丢失;建议改用基于数据库的持久化短期记忆存储。",unsupportedRouteHint:"提示:该 Runtime 未提供会话能力运行接口,可能是 Runtime 版本与当前 Studio 不兼容。",toolArgumentHint:"提示:模型生成的工具参数格式不完整,请重新发送一次。",resourceCollectionExpiredHint:"提示:本次资源清单已失效,请重新发送任务;系统会重新收集资源后再创建 Agent。",networkConfigurationHint:"提示:请检查共享公网出口等网络配置,然后重试。",rawResponseLabel:"原始响应:"},ale={httpStatus:"HTTP 状态码:{{status}}",errorCode:"错误码:{{code}}",cloudResponseBody:`云端响应正文: +{{body}}`,loadFailedWithDetail:"读取实例日志失败:{{detail}}",invalidFormat:"读取实例日志失败:服务返回格式无效"},ole={untitledSession:"未命名会话",webUnavailable:"网络搜索接口未就绪(后端未启用 /web/search)。",webFailed:"网络搜索失败:{{message}}",webNotMounted:"当前 Agent 未挂载 web_search 工具。",knowledgeNotMounted:"该 Agent 未挂载知识库。",memoryNotMounted:"该 Agent 未挂载长期记忆。",knowledge:"知识库",longTermMemory:"长期记忆"},lle={listSpacesFailed:"读取 Skill 空间失败",createSpaceFailed:"创建 Skill 空间失败",updateSpaceFailed:"更新 Skill 空间失败",deleteSpaceFailed:"删除 Skill 空间失败",uploadFailed:"上传 Skill 失败",validateFailed:"校验 Skill 失败",deleteFailed:"删除 Skill 失败",listFilesFailed:"读取 Skill 文件失败",downloadFailed:"下载 Skill 失败"},cle={truncatedData:"{{data}}…(已截断,共 {{count}} 个字符)",incompleteEvent:"SSE 流在事件完整返回前已结束。原始数据:{{data}}",invalidEventJson:"无法解析 SSE 事件中的 JSON。原始数据:{{data}}"},ule={loadConfigNetworkFailed:"无法加载登录配置,请检查网络后重试。",configServiceFailed:"登录配置服务异常(HTTP {{status}}),请稍后重试。",invalidConfigResponse:"登录配置服务返回了无法解析的响应,请稍后重试。",serviceNetworkFailed:"无法连接身份服务,请检查网络后重试。",invalidServiceResponse:"身份服务返回了无法解析的响应,请稍后重试。",serviceFailed:"身份服务异常(HTTP {{status}}),请稍后重试。"},dle={invalidToken:"GitHub Token 无效或没有仓库写入权限",notFound:"仓库、分支或文件不存在,或 Token 无权访问",rejectedCommit:"GitHub 拒绝了提交,请检查分支和文件状态",requestFailed:"GitHub 请求失败(HTTP {{status}})",networkFailed:"连接 GitHub 失败,请检查网络后重试",invalidRepositoryFormat:"GitHub Repo 格式应为 owner/repository",insecureRepositoryUrl:"仅支持安全的 github.com 仓库地址",unsafeProjectPath:"Agent 项目目录必须是仓库内的安全相对路径",tokenRequired:"GitHub Token 不能为空",invalidBaseBranch:"目标分支格式不正确",invalidPublishBranch:"发布分支格式不正确",noFiles:"没有需要提交的文件",missingBaseSha:"目标分支缺少有效 Git SHA",fileAlreadyExists:"目标仓库中已存在 {{path}},未覆盖现有文件",pathNotUpdatable:"目标路径 {{path}} 不是可更新的文件",invalidPullRequest:"GitHub 未返回有效的 Pull Request"},fle={loadCapabilitiesFailed:"加载视频模型能力失败",uploadAssetFailed:"上传{{fileName}}失败",enhancePromptFailed:"提示词优化失败",createTaskFailed:"创建视频生成任务失败",getTaskFailed:"查询视频生成任务失败",downloadFailed:"下载生成视频失败"},hle={listFailed:"加载网站集成失败",createFailed:"创建网站集成失败",deleteFailed:"删除网站集成失败"},ple={loadFailed:"读取知识库失败",htmlHidden:"[HTML 内容已隐藏]",redacted:"[已脱敏]",depthTruncated:"[内容过深,已截断]",circularReference:"[循环引用]",diagnosticsUnavailable:"[诊断信息无法显示]",statusCode:"状态码:{{status}}",errorCode:"错误码:{{code}}",requestId:"请求 ID:{{requestId}}",diagnostics:"诊断:{{diagnostics}}",detail:"详情:{{detail}}",signInRequired:"请先登录后再访问知识库",forbidden:"你没有权限操作这个知识库",notFound:"知识库或知识内容不存在",conflict:"知识库当前状态不允许执行此操作",requestFailed:"知识库请求失败 ({{status}})"},mle={invalidSourceSnapshot:"源码快照的响应格式无效。",invalidProjectList:"项目列表的响应格式无效。",invalidProjectVersion:"项目版本的响应格式无效。",loadProjectsFailed:"无法读取已保存项目",loadVersionsFailed:"无法读取项目版本",deleteVersionFailed:"删除项目版本失败",invalidDeleteVersionResponse:"删除项目版本的响应格式无效。",loadProjectSourceFailed:"无法读取项目源码",loadSnapshotFailed:"无法读取源码快照",restoreSnapshotFailed:"无法恢复当前源码快照",downloadSourceFailed:"下载源码失败",downloadNotZip:"源码下载响应不是 ZIP 文件。",downloadSizeMismatch:"源码压缩包大小与发布记录不一致,请重试。"},gle={invalidFormat:"{{label}}格式错误。",validationSeparator:";",invalidAnalysisResult:"迁移分析结果格式错误。",invalidFrameworkCandidate:"框架候选格式错误。",invalidAnalysisEvidence:"分析证据格式错误。",invalidEntryCandidate:"入口候选格式错误。",invalidQuestion:"待确认问题格式错误。",invalidTask:"迁移会话格式错误。",invalidAnalysisReference:"分析结果引用格式错误。",invalidSourcePersistence:"迁移源码保存状态格式错误。",invalidActivity:"迁移执行动态格式错误。",invalidActivityItem:"迁移执行动态项格式错误。",invalidActivityTool:"迁移执行工具项格式错误。",invalidActivityPlan:"迁移执行计划格式错误。",invalidActivityPlanItem:"迁移执行计划项格式错误。",invalidArtifact:"迁移产物格式错误。",invalidEnvironmentDefaults:"环境变量默认值格式错误。",invalidArtifactFile:"迁移产物文件格式错误。",invalidVerificationCheck:"迁移校验项格式错误。",requestValidationFailed:"请求参数校验失败:{{detail}}",gatewayError:"{{fallback}}(HTTP {{status}},Content-Type: {{contentType}})。请检查代理或网关配置。",nonJsonResponse:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}})。请检查代理或网关配置。",loadCapabilitiesFailed:"读取迁移能力失败",invalidCapabilities:"迁移能力格式错误。",invalidModelCapabilities:"迁移模型能力格式错误。",loadTasksFailed:"读取迁移会话失败",invalidTaskList:"迁移会话列表格式错误。",createTaskFailed:"创建迁移会话失败",uploadProjectFailed:"上传迁移项目失败",loadActivityFailed:"读取迁移执行动态失败",startFailed:"启动迁移失败",submitAnswersFailed:"提交分析补充信息失败",stopFailed:"终止迁移失败",deleteTaskFailed:"删除迁移会话失败",loadArtifactFailed:"读取迁移产物失败",loadArtifactFileFailed:"读取迁移产物文件失败",downloadArtifactFailed:"下载迁移产物失败",labels:{analysisResult:"迁移分析结果",recommendation:"迁移建议",boundary:"迁移边界",frameworkCandidate:"框架候选",analysisEvidence:"分析证据",recommendedFramework:"推荐框架",entryCandidate:"入口候选",entryFramework:"入口框架",includeScope:"迁移包含范围",excludeScope:"迁移排除范围",assumptions:"分析假设",question:"待确认问题",analysisWarnings:"迁移警告",task:"迁移会话",artifactStatus:"迁移产物状态",analysisReference:"分析结果引用",confirmation:"迁移确认",confirmedFramework:"确认框架",error:"迁移错误",sourcePersistence:"迁移源码保存状态",activity:"迁移执行动态",activityItem:"迁移执行动态项",activityTool:"迁移执行工具项",activityPlanItem:"迁移执行计划项",artifact:"迁移产物",cli:"CLI 信息",migration:"迁移信息",startup:"启动信息",environment:"环境变量信息",verification:"校验信息",report:"迁移报告",archive:"产物归档",environmentDefaults:"环境变量默认值",requiredEnvironment:"必需环境变量",optionalEnvironment:"可选环境变量",artifactFile:"迁移产物文件",verificationCheck:"迁移校验项",artifactWarnings:"迁移产物警告",errorResponse:"错误响应",errorDetail:"错误详情",capabilities:"迁移能力",framework:"迁移框架",modelCapabilities:"迁移模型能力",taskList:"迁移会话列表"}},ble={status:{ready:"就绪",wakeable:"可唤醒",creating:"创建中",starting:"启动中",pending:"等待中",running:"运行中",failed:"异常",stopped:"已停止",expired:"已过期",deleting:"删除中",deleted:"已删除",unknown:"未知状态"},developmentTimeout:"等待开发环境响应超时。任务可能仍在运行,请稍后重新进入当前会话查看状态。",developmentDisconnected:"与开发环境的连接已中断。任务可能仍在运行,请稍后重新进入当前会话查看状态。",developmentFailed:"开发任务未能继续,开发环境已保留。请在当前会话重试。",invalidStudioResponse:"{{fallback}} Studio 服务响应异常,请刷新后重试。",invalidSession:"AgentKit 沙箱返回了无效的 Session 信息。",invalidSnapshot:"AgentKit 沙箱返回了无效的 Snapshot 信息。",invalidSettings:"Sandbox 返回了无效设置。",invalidThreadSnapshot:"Sandbox 返回了无效 Thread 快照。",emptyConversationResponse:"沙箱对话服务未返回内容。",invalidConversationResponse:"沙箱对话服务返回了无法解析的响应。",conversationFailed:"沙箱对话失败,请稍后重试。",emptyReply:"沙箱未返回有效回复,请重试。",missingSession:"缺少要操作的 AgentKit Session。",listCodexFailed:"无法读取 Codex 智能体,请稍后重试。",invalidSessionList:"AgentKit 沙箱返回了无效的 Session 列表。",invalidSnapshotList:"AgentKit 沙箱返回了无效的 Snapshot 列表。",startFailed:"无法启动 AgentKit 沙箱,请稍后重试。",listAgentFailed:"无法读取 {{kind}} 智能体,请稍后重试。",invalidKindSessionList:"AgentKit 返回了无效的 {{kind}} Session 列表。",invalidKindSnapshotList:"AgentKit 返回了无效的 {{kind}} Snapshot 列表。",createAgentFailed:"无法创建 {{kind}} 智能体,请稍后重试。",missingSessionToOpen:"缺少要打开的 AgentKit Session。",openAgentFailed:"无法打开 {{kind}} 智能体。",invalidAgentHomeUrl:"{{kind}} 智能体返回了无效的主页面地址。",missingSessionForTerminal:"缺少要打开 Terminal 的 AgentKit Session。",openTerminalFailed:"无法打开 {{kind}} Terminal。",deleteAgentFailed:"无法删除 {{kind}} 智能体。",missingSnapshot:"缺少要唤醒的 AgentKit Snapshot。",resumeSnapshotFailed:"无法从快照唤醒智能体,请稍后重试。",deleteSnapshotFailed:"无法删除智能体快照。",missingSessionToConnect:"缺少要连接的 AgentKit Session。",connectCodexFailed:"无法连接 Codex 智能体,请稍后重试。",sessionNotReady:"AgentKit Session 尚未就绪,当前状态:{{status}}。",invalidMessage:"内置智能体会话缺少有效的消息内容。",interruptFailed:"无法停止当前任务。",getStatusFailed:"无法读取 Codex 状态。",getEndpointFailed:"无法读取 Sandbox Endpoint。",invalidEndpoint:"Sandbox 返回了无效 Endpoint。",createHandoffPairingFailed:"无法生成 Codex 云端接力配对码。",invalidHandoffPairing:"Studio 返回了无效的 Codex 云端接力配对码。",getHandoffStatusFailed:"无法读取端云接力状态。",invalidHandoffStatus:"Studio 返回了无效的端云接力状态。",listModelsFailed:"无法读取 Codex 模型列表。",invalidModelList:"Sandbox 返回了无效模型列表。",setModelFailed:"无法切换 Codex 模型。",invalidModel:"Sandbox 返回了无效模型。",listSkillsFailed:"无法读取 Codex Skills。",invalidSkillList:"Sandbox 返回了无效 Skill 列表。",listThreadsFailed:"无法读取 Codex Thread 列表。",invalidThreadList:"Sandbox 返回了无效 Thread 列表。",createThreadFailed:"无法创建新的 Codex Thread。",missingThread:"缺少要读取的 Codex Thread。",readThreadFailed:"无法读取 Codex 历史消息。",resumeThreadFailed:"无法恢复 Codex Thread。",forkThreadFailed:"无法分叉 Codex Thread。",archiveThreadFailed:"无法归档 Codex Thread。",invalidArchiveResult:"Sandbox 返回了无效归档结果。",deleteThreadFailed:"无法删除 Codex Thread。",invalidDeleteResult:"Sandbox 返回了无效删除结果。",compactThreadFailed:"无法压缩 Codex Thread。",getSettingsFailed:"无法读取 Codex 权限与工作空间。",updatePermissionsFailed:"无法更新 Codex 权限。",updateWorkspaceFailed:"无法更新 Codex 工作空间。",invalidWorkingDirectory:"Sandbox 返回了无效工作目录。",listDirectoriesFailed:"无法读取 Sandbox 目录。",invalidDirectoryList:"Sandbox 返回了无效目录列表。",resolveApprovalFailed:"无法提交 Codex 审批决定。",uploadFileFailed:"无法上传文件到 Sandbox。",invalidUploadResult:"Sandbox 返回了无效上传结果。",disconnectCodexFailed:"无法断开 Codex 智能体连接。",deleteCodexFailed:"无法删除 Codex 智能体。",openSandboxTerminalFailed:"无法打开 Sandbox Terminal。",openSandboxBrowserFailed:"无法打开 Sandbox Browser。",toolLabel:"Sandbox 工具",invalidToolUrl:"{{label}} 返回了无效地址。",unsafeToolUrl:"{{label}} 返回了不安全的地址。"},yle={invalidSandboxVersion:"沙箱版本响应格式无效",loadSandboxVersionsFailed:"查询沙箱版本失败",updateSandboxFailed:"更新 Sandbox 失败",invalidSandboxUpdate:"沙箱更新响应格式无效",errorWithDetailAndRawResponse:`{{context}} {{detail}} 原始响应: {{response}}`,errorWithRawResponse:`{{context}} 原始响应: -{{response}}`,loadArkApiKeysFailed:"加载 Ark API Key 失败",loadModelsFailed:"加载模型列表失败",runtimeAccessDenied:"当前账号无权访问该 Runtime,请刷新列表或重新登录后重试。",privateRuntimeUnavailable:"Runtime 已部署成功,但当前 Studio 无法访问私网 Runtime。请使用已绑定相同 VPC 的 Studio 访问,或改用公网 / 公网+VPC 部署。",runtimeTemporarilyUnavailable:"Runtime 已部署成功,但 Studio 暂时无法连接服务。网关域名可能仍在生效,或当前网络/DNS 无法访问该 Runtime,请稍后在智能体管理页重试连接。",runtimeConnectionUnsupported:"该 Runtime 的 Agent Server 未提供连接接口,请确认 Runtime 已就绪且版本兼容。",runtimeConnectionDenied:"Runtime 服务拒绝了连接请求,请检查 Runtime 的鉴权配置。",listAgentsFailed:"读取 Agent 列表失败",invalidListAppsJson:"Runtime /list-apps 返回了无法解析的 JSON 响应。",invalidListAppsFormat:"Runtime /list-apps 返回格式无效,应为非空字符串数组。",createSessionFailedWithStatus:"创建会话失败 ({{status}})",createSessionFailed:"创建会话失败",getSessionFailed:"读取会话失败",getSessionFailedWithDetail:"读取会话失败:{{status}}:{{detail}}",feedbackRuntimeOnly:"只有连接到 AgentKit Runtime 的会话支持反馈回流",feedbackRegionMissing:"Runtime 缺少地域信息,无法提交反馈",submitFeedbackFailed:"提交反馈失败",loadEvaluationSetsFailed:"读取评测集失败",loadAutoEvaluationStatusFailed:"读取自动评测状态失败",loadOptimizationsFailed:"读取优化项失败",deleteEvaluationCaseFailed:"删除评测案例失败",downloadFileFailed:"下载文件失败",fileUnavailable:"文件内容不可用",uploadFileFailed:"文件上传失败",traceDisabled:"该 Agent 暂未开启链路观测,请到控制台打开后使用。",loadTraceFailed:"加载调用链路失败",contentTypeMissing:"Content-Type 缺失",traceNonJson:"加载调用链路失败:服务端返回了非 JSON 响应({{contentType}}),请检查 Studio API 代理配置",invalidTraceFormat:"加载调用链路失败:返回格式无效",submitIssueFeedbackFailed:"问题反馈上报失败",issueFeedbackNotConfirmed:"问题反馈上报失败:服务端未确认提交结果",noPreviewableAgent:"该 Runtime 未提供可预览的 Agent。",agentSearchFailed:"Agent 检索失败",emptySseBody:"HTTP 200,SSE 响应体为空。",noDisplayableSseReply:"HTTP 200,SSE 响应中没有可展示的模型回复。",firstSseEventTimeout:"30 秒内未收到首个 SSE 事件。",runSessionFailed:"运行会话失败",runSseFailedWithDetail:"运行会话失败:{{status}}:{{detail}}",checkRuntimeNameFailed:"检查 Runtime 名称失败",invalidRuntimeNameCheck:"检查 Runtime 名称失败:服务返回格式错误",loadCloudResourcesFailed:"加载云资源失败",invalidCloudResources:"云资源列表响应格式无效",invalidEnvironmentMount:"挂载环境响应格式无效",environmentMountMismatch:"挂载环境响应与请求不一致",environmentMountNetworkFailed:"无法连接 Studio 服务,环境挂载未完成。请检查网络后重试。",environmentMountFailed:"挂载环境失败",clipboardUnsupported:"当前浏览器不支持写入剪贴板。",clipboardWriteFailed:"无法写入剪贴板,请检查剪贴板权限。",loadSystemInfoFailed:"加载系统信息失败",invalidSystemInfo:"系统信息响应格式无效",invalidEnvironmentBuild:"环境构建响应格式无效",invalidEnvironmentBuildStep:"环境构建步骤响应格式无效",invalidEnvironmentManifest:"环境 Manifest 响应格式无效",invalidImageRepository:"环境镜像仓库响应格式无效",invalidCodeRepository:"环境代码仓库响应格式无效",invalidImageSource:"环境镜像来源响应格式无效",invalidEnvironment:"环境响应格式无效",invalidWorkspace:"工作区响应格式无效",loadWorkspacesFailed:"加载工作区失败",invalidWorkspaceList:"工作区列表响应格式无效",saveWorkspaceFailed:"保存工作区失败",deleteWorkspaceFailed:"删除工作区失败",loadEnvironmentsFailed:"加载环境失败",invalidEnvironmentList:"环境列表响应格式无效",probeRepositoryFailed:"探查代码仓库失败",invalidRepositoryProbe:"代码仓库探查响应格式无效",exportEnvironmentCodeFailed:"导出环境分享码失败",invalidEnvironmentCode:"环境分享码响应格式无效",inspectEnvironmentCodeFailed:"检测环境分享码失败",invalidEnvironmentCodeInspection:"环境分享码检测响应格式无效",importEnvironmentCodeFailed:"导入环境分享码失败",invalidEnvironmentCodeImport:"环境分享码导入响应格式无效",studioUnavailable:"无法连接 Studio 服务,请确认后端已启动后重试。",saveEnvironmentFailed:"保存环境失败",deleteEnvironmentFailed:"删除环境失败",startEnvironmentBuildFailed:"启动环境构建失败",loadEnvironmentBuildFailed:"读取环境构建详情失败",loadEnvironmentManifestFailed:"读取环境 Manifest 失败",invalidEnvironmentResource:"环境资源响应格式无效",loadEnvironmentResourcesFailed:"加载环境构建资源失败",updateCodexSandboxFailed:"更新 Codex Sandbox 失败",invalidCodexSandboxUpdate:"Codex Sandbox 更新响应格式无效",loadUserPoolsFailed:"加载用户池失败",invalidUserPoolList:"用户池列表响应格式无效",syncGithubFailed:"同步 GitHub 代码失败 ({{status}})",validatingMigrationArtifact:"正在校验迁移产物",uploadingCodePackage:"正在上传代码包",migrationArtifactValidated:"迁移产物校验完成",codePackageUploaded:"代码包上传完成",deploymentProgress:{preparing:"正在准备部署",uploading:"正在上传代码包",building:"正在构建镜像",buildLogsSyncing:"正在构建镜像,构建日志已同步。",buildLogsComplete:"构建日志同步完成。",buildFailedLogsSynced:"镜像构建失败,最终构建日志已同步。",buildLogsUnavailable:"暂时无法读取构建日志。",finalBuildLogsUnavailable:"暂时无法读取最终构建日志。",deploying:"正在部署服务",publishing:"正在发布服务",evaluating:"正在创建评测集",updating:"正在更新 Runtime 配置",completing:"正在完成部署",github:"正在配置 GitHub 持续交付",inProgress:"正在部署"},deploymentFailed:"部署失败",deploymentDisconnected:"部署失败:连接中断",deploymentMissingAgentName:"部署失败:返回缺少 Agent 名称",deploymentMissingConnection:"部署失败:返回缺少 AgentKit 连接信息",cancelDeploymentFailed:"取消部署失败 ({{status}})",loadFailed:"加载失败 ({{status}})",loadPermissionsFailed:"加载权限失败 ({{status}})",invalidPermissionResponse:"权限服务返回了无法解析的响应",checkStudioUpdateFailed:"检查 Studio 更新失败 ({{status}})",studioUpdatePreflightFailed:"Studio 更新权限预检失败 ({{status}})",submitStudioUpdateFailed:"提交 Studio 更新失败 ({{status}})",loadAgentUsageFailed:"加载 Agent 用量失败",notProvided:"未提供",agentUsageNonJson:"加载 Agent 用量失败:服务端返回非 JSON 响应(HTTP {{status}},Content-Type: {{contentType}})。",checkStudioGateway:"请确认当前服务以 Studio 模式启动,并检查代理或网关配置。",agentUsageInvalidJson:"加载 Agent 用量失败:服务端返回了无法解析的 JSON(HTTP {{status}},Content-Type: {{contentType}})。",retryCheckGateway:"请稍后重试;若问题持续,请检查代理或网关配置。",loadCronJobsFailed:"加载定时任务失败",loadCronJobFailed:"加载定时任务详情失败",createCronJobFailed:"创建定时任务失败",updateCronJobFailed:"更新定时任务失败",enableCronJobFailed:"启用定时任务失败",pauseCronJobFailed:"暂停定时任务失败",runCronJobFailed:"立即执行定时任务失败",loadCronHistoryFailed:"加载执行历史失败",stopCronRunFailed:"终止执行失败",deleteCronJobFailed:"删除定时任务失败",loadRuntimeFailed:"加载 Runtime 失败",loadLocalToolsFailed:"读取本地工具失败",connectDynamicRouteFailed:"连接 Studio 动态路由失败",a2aProbeDenied:"Runtime 服务拒绝了 A2A 探测请求,请检查 Runtime 的鉴权配置。",loadA2aCardFailed:"读取 A2A Agent Card 失败",loadRuntimeApiKeyFailed:"读取 Runtime API Key 失败",runtimeApiKeyMissing:"Runtime 未返回可用的 API Key",deleteFailed:"删除失败 ({{status}})",runtimeManageForbidden:"当前账号没有管理该 Runtime 的权限。",runtimeNotFound:"该 Runtime 不存在或已被删除。",runtimeUnavailable:"当前账号无法访问该 Runtime。",checkRuntimeUpdateFailed:"检查 Runtime 更新能力失败(HTTP {{status}}),请稍后重试。",loadRuntimeDetailFailed:"加载 Runtime 详情失败",generateProjectFailed:"生成项目失败",generateAgentConfigFailed:"生成 Agent 配置失败",createDebugRunFailed:"创建调试运行失败",createDebugSessionFailed:"创建调试会话失败",loadDebugTraceFailed:"加载调试调用链路失败",invalidDebugTrace:"加载调试调用链路失败:返回格式无效",debugRunFailed:"调试运行失败",cleanupDebugRunFailed:"清理调试运行失败"},xle={loadFailed:"读取会话模式能力失败(HTTP {{status}})",invalidResponse:"会话模式能力响应格式错误"},Ole={nonJson:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}},{{contentType}}){{detail}}"},wle={common:ele,agentkitCli:tle,cloudRegion:nle,connections:ile,feishuBot:rle,requestError:sle,runSse:ale,runtimeLogs:ole,search:lle,skills:cle,sse:ule,identity:dle,github:fle,video:hle,websiteIntegration:ple,knowledge:mle,intelligentDevelopment:gle,migrations:ble,sandbox:yle,client:vle,newChatCapabilities:xle,jsonResponse:Ole},KDe=Object.freeze(Object.defineProperty({__proto__:null,agentkitCli:tle,client:vle,cloudRegion:nle,common:ele,connections:ile,default:wle,feishuBot:rle,github:fle,identity:dle,intelligentDevelopment:gle,jsonResponse:Ole,knowledge:mle,migrations:ble,newChatCapabilities:xle,requestError:sle,runSse:ale,runtimeLogs:ole,sandbox:yle,search:lle,skills:cle,sse:ule,video:hle,websiteIntegration:ple},Symbol.toStringTag,{value:"Module"})),Sle={backToEvaluationCase:"返回评测案例",cancel:"取消",copied:"已复制",copy:"复制",exportConversation:"导出会话",retry:"重试"},kle={title:"您想以哪种方式添加 Agent 来运行?",subtitle:"选择最适合你的方式,下一步即可开始",quickCreate:{title:"从 0 快速创建",description:"用智能、自定义、模板或工作流的方式从零创建一个 Agent。"},intelligent:{title:"智能模式",description:"描述目标,按你的意图构建、调试并验证 Agent。"},package:{title:"从代码包添加和部署",description:"上传 Agent 项目压缩包,查看代码并直接部署到 AgentKit Runtime。"},migrate:{title:"从存量迁移",description:"从您的 LangChain、Dify 等存量项目迁移至 AgentKit Runtime。"}},Ele={subject:{file:"文件修改",command:"命令执行"},decision:{accept:"已允许本次{{subject}}",acceptForSession:"已在本会话中允许{{subject}}",decline:"已拒绝{{subject}}",cancel:"已取消{{subject}}审批"},details:{command:"命令",grantRoot:"授权路径",cwd:"执行目录"}},Cle={noDescription:"暂无描述",region:"地域",unknownAgent:"未知 Agent"},Tle={agentTransfer:"智能体移交",annotationHint:"模型回复;选中文字后可添加批注",continueBranch:"继续“{{branch}}”这个方向",emptyResponse:"本次没有返回可显示的内容。",subagentDescription:"正在执行主 Agent 移交的任务。"},Ale={title:"需要配置 {{provider}} AK/SK",prefix:"智能体工作台需要 {{provider}} 凭据才能使用。请在运行环境中设置",and:"与",suffix:"后重试。"},_le={buildRunning:{title:"当前构建仍在进行",description:"离开将停止本轮构建;当前会话仍会保留,可稍后从历史会话重新进入。",confirm:"停止并离开"},deleteThread:{title:"删除 Codex 历史会话",description:"将删除“{{name}}”,并从历史会话中移除。",confirm:"确认删除"},returnToCreate:{title:"返回创建首页?",description:"返回后当前填写的内容将会丢失,确定要返回吗?",confirm:"确定返回"}},Nle={additionalAgentDeleteFailures:";另有 {{count}} 个失败",agentDeleteFailures:"{{count}} 个 Agent 删除失败:{{failures}}{{suffix}}",agentToolsMissing:"当前 Agent 缺少任务工具:{{tools}}",buildStopUnconfirmed:"已离开开发环境,但未能确认本轮构建已停止。任务可能仍在运行,请稍后从历史会话检查状态。",builtinAgentSendFailed:"内置智能体发送失败:{{message}}",bytePlusEvaluationUnsupported:"BytePlus 暂不支持 AgentKit 评测集",clipboardUnsupported:"当前浏览器不支持写入剪贴板。",cloudCodexEmptyReply:"云端 Codex 已结束,但没有生成回复,请重新发送任务。",cloudCodexSessionMissing:"云端 Codex Session 暂未出现在列表中,请稍后重试。",deploymentRuntimeIdMissing:"部署完成,但未返回 Runtime ID。",environmentExpired:"所选环境已失效,请刷新后重新选择。",environmentsLoadFailed:"读取环境失败",evaluationCaseSessionMissing:"这条案例缺少会话定位信息,无法跳转。",evaluationUnsupportedForReply:"当前回复暂不支持加入评测集",firstFrameRequired:"首尾帧生成需要先添加首帧图片。",incompletePromptOptimization:"提示词优化结果不完整,请重新优化后再试。",intelligentCapabilityCheckFailed:"智能开发能力检查失败(HTTP {{status}})",intelligentSessionCreateFailed:"智能开发会话创建失败",invalidIntelligentCapability:"智能开发模型能力格式错误。",localBffToolsNotConfigured:"本地 Studio BFF 没有配置工具。",localToolsLoadFailed:"读取本地工具失败",loginPopupBlocked:"登录窗口被浏览器拦截,请允许弹出窗口后重试。",loginPopupClosed:"登录窗口已关闭,请重新登录以继续当前操作。",mediaTooLarge:"{{fileName}} 超出当前平台允许的素材大小。",mountEnvironmentFailed:"挂载环境失败",noConnectedSandbox:"当前没有已连接的 Sandbox。",noCreateAgentPermission:"当前账号没有添加 Agent 的权限。",noManageAgentPermission:"当前账号没有管理 Agent 的权限。",noOptimizationBaseline:"当前版本没有可对比的优化前版本。",oauthUrlMissing:"事件中没有授权地址。",onlyCloudAgentUpdatable:"仅支持更新已部署的云端智能体。",optimizationVersionMissing:"无法找到本次优化对应的项目版本,可能已被删除。",persistentStorageNotConfigured:"管理员未配置持久化存储",readDraftFailed:"无法读取本机草稿,请稍后重试。",runtimeAgentNameMissing:"Runtime 缺少智能体名称,无法更新。",runtimeBffToolsDisabled:"当前 Runtime Agent 未开启 BFF 工具能力。",runtimeDeploymentConfigUnavailable:"该 Runtime 的原发布配置不可恢复,无法安全更新。",runtimeMissingForConnection:"缺少 Runtime 信息,无法连接智能体。",runtimeRegionMissingForDelete:"Runtime 缺少地域信息,无法删除",runtimeRegionMissingForUpdate:"Runtime 缺少地域信息,无法更新。",runtimeUpdateUnsupported:"当前 Runtime 不支持原地更新。",sandboxRuntimeUnavailable:"当前 Agent 没有可用的 Sandbox Runtime。",sandboxToolsUnavailable:"当前 Studio BFF 未提供 Sandbox 执行工具。",saveDraftLocationRejected:"浏览器拒绝保存当前草稿位置,请检查站点存储权限后重试。",saveDraftRejected:"浏览器拒绝保存草稿,请稍后重试。",selectSkillToOptimize:"请先选择需要优化的 Skill。",sessionMissingForMount:"当前会话不存在,无法挂载环境。",sessionNotReady:"会话尚未就绪。",sessionUnavailable:"当前会话不可用,请关闭后重试。",sourceNotReady:"该源码尚未准备好,请返回对话继续处理。",textVideoRejectsReferences:"文生视频不使用参考素材,请先移除已添加的图片或视频。",videoEditRequiresVideo:"视频编辑需要先添加待编辑视频。",videoExtendRequiresVideo:"视频续写需要先添加基础视频。",videoGenerationFailed:"视频生成失败,请稍后重试。",videoModeUnsupported:"当前平台暂不支持所选视频任务模式。",videoPreviewMissing:"视频任务已完成,但服务端未返回预览地址。",videoReferenceRequired:"参考素材生视频需要至少添加一项参考图片或参考视频。"},jle={like:"赞",removeLike:"取消点赞",dislike:"踩",removeDislike:"取消点踩",reportIssue:"问题反馈",traceFlameGraph:"Tracing 火焰图"},Rle={0:"今天想做点什么?",1:"有什么可以帮你的?",2:"需要我帮你查点什么吗?",3:"有问题尽管问我",4:"嗨,我们开始吧",5:"开始一段新对话吧",6:"今天想先解决哪件事?",7:"把你的想法告诉我吧",8:"我们从哪里开始?",9:"有什么任务交给我?",10:"准备好一起推进了吗?",11:"说说你现在最关心的问题",12:"今天也一起把事情做好",13:"我在,随时可以开始",intelligentDevelopment:"让灵感自由生长"},Ile={agentCapabilities:"正在检查 Agent 能力…",session:"加载会话…"},Ple={cancelled:"授权已取消。",pasteCallbackUrl:"授权完成后,请粘贴回调页面(浏览器地址栏)的完整 URL:",popupBlocked:"弹窗被拦截,请允许弹窗后重试。",unsupportedUrl:"授权链接不是 http/https 地址,已阻止打开。"},Dle={volcengine:"火山引擎"},Mle={checkingPersistence:"正在检查持久化能力…",exitDevelopment:"退出开发环境",fileUploaded:"已上传文件到 Sandbox",filesUploaded:"已上传 {{count}} 个文件到 Sandbox",intelligentDevelopment:"智能开发",mode:{readOnly:"只读",workspaceWrite:"工作区写入",fullAccess:"完全访问"},approvalPolicy:{untrusted:"仅不可信命令",onRequest:"按需审批",never:"不审批"},reviewer:{user:"由我审批",autoReview:"自动审查"},labels:{approvalPolicy:"审批策略",file:"文件",fileNumber:"文件 {{number}}",mode:"沙箱模式",networkAccess:"网络访问",reviewer:"审批方式",workingDirectory:"工作目录"},network:{allowed:"允许",disabled:"关闭"},permissionsUpdated:"已更新当前 Sandbox Session 的 Codex 权限",persistenceUnknown:"暂时无法确认持久化能力",stoppedReady:"已停止,可继续输入",uploadedFilesPrompt:"以下文件已上传到当前 Sandbox 工作空间,请在任务中使用:",workspaceUpdated:"已更新工作空间"},Lle={addAgent:"添加智能体",addFromPackage:"从代码包添加",agent:"智能体",automations:"自动化",createAgent:"创建智能体",createSkill:"创建技能",cronJobs:"定时任务",issueFeedback:"问题反馈",library:"资源库",migrateAgent:"迁移智能体",newConversation:"新会话",optimizeSkill:"优化 {{name}}",search:"搜索",skill:"技能",skillLibrary:"技能库",systemInfo:"系统信息",updateAgent:"更新 {{name}}"},$le={actions:Sle,addAgent:kle,approval:Ele,common:Cle,conversation:Tle,credentials:Ale,dialogs:_le,errors:Nle,feedback:jle,greetings:Rle,loading:Ile,oauth:Ple,providers:Dle,sandbox:Mle,titles:Lle},GDe=Object.freeze(Object.defineProperty({__proto__:null,actions:Sle,addAgent:kle,approval:Ele,common:Cle,conversation:Tle,credentials:Ale,default:$le,dialogs:_le,errors:Nle,feedback:jle,greetings:Rle,loading:Ile,oauth:Ple,providers:Dle,sandbox:Mle,titles:Lle},Symbol.toStringTag,{value:"Module"})),Fle="自动化",Ble="连接研发工具,为智能体扩展自动化工作流",Ule="搜索自动化",Qle="自动化分类",zle={development:"研发",channels:"消息渠道"},Vle="{{category}}自动化列表",Hle="打开{{name}}",qle="仅本地部署可用",Wle="没有匹配的自动化",Kle="请尝试搜索其他名称",Gle="返回自动化列表",Xle={"coding-agents":{name:"配置 Coding Agents",badge:"本地",description:"将 VeADK 和 AgentKit 内置 Skills 全局配置到 Trae、Claude Code 或 Codex。"},template:{name:"模板项目导入",description:"在您的仓库中创建一个可持续交付到 AgentKit Runtime 的最简智能体",title:"模板项目导入",subtitle:"把可直接启动 Studio 的 basic Agent 和持续交付配置加入仓库",panel:"提交后将创建一个 PR,同时导入 basic 项目和 AgentKit Runtime 发布工作流。",submitLabel:"导入模板并提交 PR",regionHelp:"必须与目标 Runtime 所在地域一致",pullRequest:{title:"feat: 导入 AgentKit basic 模板",description:"导入带有 AgentKit Studio App Server 的 basic Agent 项目,并添加持续发布到 AgentKit Runtime 的工作流。合并前请配置 {{provider}} Secrets。"},fields:{repository:{label:"GitHub 仓库",placeholder:"owner/repository",help:"支持 owner/repository 或完整 github.com URL"},baseBranch:{label:"目标分支",placeholder:"main",help:"留空时使用 main,PR 将以此分支为 base"},projectPath:{label:"Agent 项目目录",placeholder:"agentkit-basic-agent",help:"将在此目录新增 basic 项目;app.py 挂载完整 Studio App Server,并作为服务入口启动"},runtimeName:{label:"Runtime 名称",placeholder:"support-agent",help:"用于 AgentKit 发布配置"},runtimeId:{label:"运行时 ID",placeholder:"rt-xxxxxxxx",help:"持续更新的目标 AgentKit Runtime"}}},delivery:{name:"AgentKit Runtime 持续交付",description:"为您的仓库添加持续交付到 AgentKit Runtime 的自动化工作流。",title:"AgentKit Runtime 持续交付",subtitle:"用 Pull Request 把持续发布配置安全地加入代码仓库",panel:"提交后将在目标仓库创建发布分支,并发起包含 GitHub Actions 工作流的 PR。",submitLabel:"确定并提交 PR",regionHelp:"必须与目标 Runtime 所在地域一致",pullRequest:{title:"feat: 持续发布到 AgentKit Runtime",description:"新增 GitHub Actions 工作流,在目标分支更新时持续发布到 AgentKit Runtime。合并前请配置工作流所需的 {{provider}} Secrets。"},fields:{repository:{label:"GitHub 仓库",placeholder:"owner/repository",help:"支持 owner/repository 或完整 github.com URL"},baseBranch:{label:"目标分支",placeholder:"main",help:"留空时使用 main,PR 将以此分支为 base"},projectPath:{label:"Agent 项目目录",placeholder:".",help:"留空时使用仓库根目录;目录内需包含挂载完整 Studio App Server 的 app.py"},runtimeName:{label:"Runtime 名称",placeholder:"support-agent",help:"用于 AgentKit 发布配置"},runtimeId:{label:"运行时 ID",placeholder:"rt-xxxxxxxx",help:"持续更新的目标 AgentKit Runtime"}}},review:{name:"PR 自动评审",description:"在隔离 Sandbox 中评审代码变更,并将结果发布到 Pull Request。",title:"PR 自动评审",subtitle:"在隔离 Sandbox 中检查代码变更并把结果发布到 Pull Request",panel:"工作流仅评审同仓库的非草稿 PR;fork PR 不会读取仓库 Secrets。",submitLabel:"添加评审并提交 PR",regionHelp:"必须与 Sandbox Tool 所在地域一致",pullRequest:{title:"chore: 配置 PR 自动评审",description:"新增 GitHub Actions 工作流,在隔离 Sandbox 中评审同仓库 PR,并将结果发布为 GitHub Review。合并前请配置工作流所需 Secrets。"},fields:{repository:{label:"GitHub 仓库",placeholder:"owner/repository",help:"支持 owner/repository 或完整 github.com URL"},baseBranch:{label:"目标分支",placeholder:"main",help:"留空时使用 main,PR 将以此分支为 base"},sandboxToolId:{label:"沙箱工具 ID",placeholder:"tool-xxxxxxxx",help:"用于运行每次评审的 AgentKit CodeEnv"},modelName:{label:"评审模型",placeholder:"review-model",help:"注入 Sandbox 的代码评审模型名称"},modelBaseUrl:{label:"模型 API 地址",placeholder:"https://ark.example.com/api/v3",help:"必须使用 OpenAI 兼容的 HTTPS 地址"}}},feishu:{name:"飞书机器人",badge:"Beta",description:"创建飞书机器人,并将消息直接接入 AgentKit Runtime。"},"website-integration":{name:"网站集成",description:"将 AgentKit Runtime 以悬浮聊天窗口嵌入网站。"}},Yle={required:"必填",optional:"可选",region:"地域",tokenLabel:"GitHub Token",getToken:"获取 Token",tokenPlaceholder:"需要仓库 Contents 与 Pull requests 写权限",hideToken:"隐藏 Token",showToken:"显示 Token",tokenHelp:"Token 仅用于本次提交,不会保存在浏览器或写入 PR",prCreated:"PR #{{number}} 已创建",viewOnGitHub:"在 GitHub 查看",secretsHeading:"合并 PR 前,请在仓库的 GitHub Actions Secrets 中配置:",secretPair:"{{accessKey}}、{{secretKey}}(必填)",sessionToken:"{{sessionToken}}(使用临时凭据时必填)",requiredSecret:"{{name}}(必填)",temporaryCredentialRequired:"(使用临时凭据时必填)",requiredSuffix:"(必填)",submitting:"提交 PR 中…",validation:{required:"此项不能为空",repository:"请输入 owner/repository 或完整 GitHub 仓库 URL",baseBranch:"目标分支格式不正确",projectPath:"请输入仓库内的相对目录",runtimeId:"运行时 ID 格式不正确",sandboxToolId:"沙箱工具 ID 格式不正确",modelName:"模型名称格式不正确",modelBaseUrlSafe:"请输入不含凭据、查询参数或锚点的 HTTPS 地址",modelBaseUrl:"请输入有效的 HTTPS 地址",runtimeName:{required:"Runtime 名称为必填项",characters:"Runtime 名称只能包含英文字母、数字、下划线和连字符",length:"Runtime 名称长度须为 4-64 个字符"}}},Zle={title:"配置 Coding Agents",description:"把随 Studio 提供的 AgentKit Skills 全局安装到本地编码客户端。",retry:"重试",clients:{ariaLabel:"选择 Coding Agent",title:"本机客户端",detectAgain:"重新检测",detecting:"正在检测本机客户端…",detected:"已检测到客户端",available:"可用",unavailable:"未检测到"},skills:{ariaLabel:"选择内置 Skill",title:"内置 Skills",viewFiles:"查看文件",items:{"veadk-agent-development":{name:"VeADK Agent 开发",description:"使用 VeADK 开发和完善 Agent。"},"agentkit-cli":{name:"AgentKit CLI",description:"通过 AgentKit CLI 管理和部署 AgentKit 资源。"}}},global:{ariaLabel:"全局安装目录",title:"全局安装",description:"配置后可在本机其他项目中使用",empty:"选择客户端后显示对应安装目录。"},success:"已为 {{agentCount}} 个客户端配置 {{skillCount}} 个 Skill",selection:"已选择 {{agentCount}} 个客户端、{{skillCount}} 个 Skill",selectClient:"请先选择客户端",configuring:"正在配置…",configure:"配置",errors:{detect:"检测本机客户端失败",configure:"配置失败,请检查用户目录权限后重试"},preview:{description:"只读浏览随 Studio 提供的 Skill 文件",close:"关闭文件预览",loading:"正在读取文件…",error:"读取 Skill 文件失败",skillFiles:"{{name}} 文件",files:"文件",fileContent:"文件内容",notPreviewable:"此文件不是可预览的 UTF-8 文本。",noFiles:"没有可预览的文件。"}},Jle={title:"飞书机器人",description:"创建一个由 AgentKit Runtime 驱动的飞书智能体",panel:"填写已发布飞书应用的凭据,Studio 将生成 basic 智能体、创建独立 Runtime,并启用飞书消息长连接。",agentName:"智能体名称",agentNameHelp:"将作为新 Runtime 中的根智能体名称",region:"部署地域",regionHelp:"Runtime 与构建产物将创建在该地域",regions:{"cn-beijing":"北京","cn-shanghai":"上海"},appId:"飞书 App ID",appIdHelp:"来自飞书开放平台的应用凭证",appSecret:"飞书 App Secret",appSecretPlaceholder:"请输入 App Secret",appSecretHelp:"仅写入新 Runtime 的环境变量",hideSecret:"隐藏 App Secret",showSecret:"显示 App Secret",hide:"隐藏",show:"显示",confirmCancel:"取消部署将停止任务并清理已创建的 Runtime,确定继续吗?",status:{preparing:"正在生成 basic 智能体",running:"正在创建 Runtime",cancelling:"正在取消部署",succeeded:"飞书机器人 Runtime 已创建",cancelled:"部署已取消",failed:"创建失败"},steps:{prepare:"生成智能体",build:"构建镜像",deploy:"创建 Runtime",publish:"发布服务"},openConsole:"打开 Runtime 控制台",credentials:{title:"凭据处理",description:"App Secret 仅用于本次部署,不会写入生成源码或浏览器存储。"},cancelDeployment:"取消部署",creating:"正在创建…",create:"创建飞书机器人 Runtime",validation:{appId:"请输入飞书 App ID",appSecret:"请输入飞书 App Secret",agentName:{required:"名称为必填项",reserved:"user 是 Google ADK 保留名称,请使用其他名称",characters:"名称须以英文字母或下划线开头,且只能包含英文字母、数字和下划线"}},generatedAgent:{description:"一个通过飞书接收消息并提供帮助的智能助手。",instruction:"你是一个通过飞书为用户提供帮助的智能助手。准确理解用户问题,给出简洁、可靠的回答;信息不足时先提问澄清,不要臆造事实。"}},ece={title:Fle,description:Ble,search:Ule,categoriesLabel:Qle,categories:zle,resultsLabel:Vle,open:Hle,localOnly:qle,emptyTitle:Wle,emptyDescription:Kle,backToAutomations:Gle,cards:Xle,github:Yle,codingAgents:Zle,feishu:Jle},XDe=Object.freeze(Object.defineProperty({__proto__:null,backToAutomations:Gle,cards:Xle,categories:zle,categoriesLabel:Qle,codingAgents:Zle,default:ece,description:Ble,emptyDescription:Kle,emptyTitle:Wle,feishu:Jle,github:Yle,localOnly:qle,open:Hle,resultsLabel:Vle,search:Ule,title:Fle},Symbol.toStringTag,{value:"Module"})),tce={"zh-CN":"简体中文","en-US":"English"},YDe={languageNames:tce},ZDe=Object.freeze(Object.defineProperty({__proto__:null,default:YDe,languageNames:tce},Symbol.toStringTag,{value:"Module"})),nce={selectedExcerptLabel:"选中片段",commentLabel:"批注",commentSeparator:":",successTitle:"已加入 Bad case 评测集",successDescription:"这条批注已关联当前问题和完整模型回复。",done:"完成",ariaLabel:"批注选中的模型回复",title:"添加批注",content:"批注内容",placeholder:"说明问题或期望的修改方式",retryError:"{{error}},请重试。",cancel:"取消",submit:"加入 Bad Case"},ice={attachment:"附件",image:"图片",preview:"预览 {{name}}",uploading:"上传中",uploadFailed:"上传失败",remove:"移除 {{name}}",previewDialog:"{{name}}预览",download:"下载",close:"关闭",reading:"正在读取文档…",loadFailed:"文档加载失败:{{error}}"},rce={errorTitle:"云端日志错误",copyError:"复制完整错误信息",retry:"重试",statuses:{live:"实时",connecting:"连接中",retrying:"重连中",idle:"未连接"},title:"实例日志",description:"当前对话请求所在的 VeFaaS 实例",close:"关闭实例日志",instanceId:"实例 ID",waitingInstance:"等待实例",request:"请求 {{id}}",ariaLabel:"VeFaaS 实例实时日志",notCapturedTitle:"尚未捕获到实例",notCapturedDescription:"发送一条消息后,这里会显示实际处理请求的实例和实时日志。",connectingTitle:"正在连接实例日志",connectingDescription:"正在通过 Studio BFF 建立安全日志流。",emptyTitle:"暂无日志",emptyDescription:"已连接实例,等待新的日志输出。",retention:"日志自动刷新,仅保留最近 {{count}} 行"},sce={title:"调用链路观测",statuses:{loading:"加载中",ready:"",collecting:"采集中",disabled:"未开启",forbidden:"权限不足",error:"加载失败"},errors:{collecting:"调用链路仍在采集中,请稍候。",disabled:"该 Agent 未开启链路观测,请到控制台开启后重试。",forbidden:"当前账号无权读取 APMPlus 调用链路,请联系管理员补充只读权限。",error:"调用链路加载失败,请稍后重试。"},callCount:"{{count}} 个调用 · {{duration}} ms",close:"关闭",loading:"加载调用链路…",retryNow:"立即重试",reload:"重新加载",empty:"该会话暂无调用链路(可能尚未产生调用)。",attributes:"属性",selectCall:"选择左侧的一个调用查看详情"},ace={exportNote:"上述会话由 AgentKit Studio 导出,仅供参考",imageFailed:"图片生成失败,请重试。",browserUnsupported:"浏览器无法生成会话图片,请重试。",copyUnsupported:"当前浏览器不支持复制图片,请下载后使用。",exportFailed:"导出失败,请重试。",title:"导出会话",description:"选择格式并下载截至当前回复的全部输入与输出。",close:"关闭",generatingContent:"正在生成导出内容…",retry:"重试生成",previewPage:"预览第 1 页,共 {{count}} 页",previewAlt:"会话导出内容第 1 页,共 {{count}} 页",format:"导出格式",generatingFormat:"正在生成 {{format}}…",copying:"正在复制…",copiedFirst:"已复制第一页",copied:"已复制",copyFirst:"复制第一页",copyImage:"复制图片",generating:"正在生成…",downloadArchive:"下载 PNG 压缩包({{count}} 页)",downloadFormat:"下载 {{format}}"},oce={unsupportedComponent:"不支持的组件:{{component}}",sandboxIdentity:"Codex Sandbox 执行标识",useSkill:"使用 {{name}} 技能",thinkingDone:"已完成思考",thinking:"思考中",justNow:"刚刚",sourceUnavailable:"暂时无法读取生成的源码,请稍后重试。",downloadStarted:"已开始下载",verifiedDelivery:"已验证交付物",generatedSource:"生成的 Agent 源码",entryPoint:"入口",fileCount:"文件数",size:"大小",validationTime:"验证时间",generationTime:"生成时间",checksPassed:"{{count}} 项检查通过",sourceReady:"源码已准备好,可部署",sourceGuidance:"源码已准备好,可查看、下载或部署;部署前请确认 Runtime 配置。",viewSource:"查看源码",preparing:"正在准备…",viewChanges:"查看本次变更",downloadSource:"下载源码",sourceNotReady:"源码尚未准备好",manualDeploy:"手动部署到 Runtime",beforeOptimization:"优化前",afterOptimization:"优化后",planStatuses:{pending:"待处理",in_progress:"进行中",completed:"已完成",failed:"未完成"},renderUi:"渲染 UI",truncated:"…(已截断)",agentAdjusting:"Agent 正在调整",sandboxDetails:"Codex Sandbox 详细输出",waitingCodex:"正在等待 Codex 输出",arguments:"参数",result:"返回",artifacts:"产物",downloadNamed:"下载 {{name}}",powerpoint:"PowerPoint 演示文稿",preview:"预览",download:"下载",previewDialog:"{{name}} 预览",closePreview:"关闭预览",slidePreview:"{{name}} 幻灯片预览",mcpToolset:"MCP 工具集",authorized:"已授权 · {{tool}}",authorizationRequired:"{{tool}} 需要授权",oauthDescription:"工具集 {{tool}} 使用 OAuth 保护,需登录授权后方可调用。",oauthProvider:"将跳转至 {{provider}} 完成登录。",oauthContinue:"授权完成后对话自动继续。",waitingAuthorization:"等待授权…",authorize:"去授权",missingAuthorizationUrl:"未在事件中找到授权地址。",tools:{web_search:{running:"正在进行网络搜索",done:"已完成网络搜索"},link_reader:{running:"正在读取网页",done:"已完成网页读取"},run_code:{running:"正在 AgentKit 沙箱中执行代码",done:"已在 AgentKit 沙箱中完成代码执行"},list_envs:{running:"正在查看可用环境",done:"已读取可用环境"},get_env_manifest:{running:"正在读取环境 Manifest",done:"已读取环境 Manifest"},execute_in_sandbox:{running:"正在环境中执行命令",done:"已在环境中完成命令执行"},delegate_to_codex_sandbox:{running:"Codex Sandbox 正在执行",done:"Codex Sandbox 已完成",failed:"Codex Sandbox 执行失败"},image_generate:{running:"正在生成图片",done:"已完成图片生成"},video_generate:{running:"正在生成视频",done:"已完成视频生成"},ppt_generate:{running:"正在生成 PPT",done:"已完成 PPT 生成"},load_memory:{running:"正在检索长期记忆",done:"已完成记忆检索"},load_knowledgebase:{running:"正在检索知识库",done:"已完成知识库检索"},load_skill:{running:"正在加载技能",done:"已加载技能"},collect_resources:{running:"正在收集可用资源",done:"已完成资源收集",failed:"资源收集失败"},create_agents:{running:"正在创建并运行 Agent",done:"已完成 Agent 创建",failed:"Agent 创建失败"}},createAgents:{categories:{skill_hub:"Skill Hub",skill_space:"AgentKit 技能中心",knowledge_base:"知识库",tool:"工具"},agentTypes:{llm:"LLM 智能体",sequential:"顺序智能体",parallel:"并行智能体",loop:"循环智能体",workflow:"工作流"},skill:"技能",subAgents:"子智能体",builtinTool:"内置工具",skillCenter:"AgentKit 技能中心",selfAuthoredTools:"自写工具",dependencies:"依赖:{{items}}",fullCode:"{{name}} 完整代码",itemCount:"{{label}} {{count}} 项",collectionAria:"召回资源信息",retrieving:"正在检索资源",retrievalFailed:"资源检索未完成",checkConfig:"请检查资源服务配置后重试。",notSearched:"未检索",notConfigured:"未配置",resourceList:"{{label}}资源列表",searchKeywords:"检索关键词",skillHubSkipped:"未提供检索关键词,本次未检索 Skill Hub。",sourceSkipped:"未配置 {{label}},本次未检索该来源。",noResources:"本次检索未返回该类别的资源。",resultAria:"创建 Agent 结果",creationFailed:"Agent 创建未完成",agentResources:"{{name}} 具备的资源",knowledgeBase:"知识库",toolsLabel:"工具",creating:"正在创建 Agent",noAgents:"没有可展示的 Agent",noAgentResult:"工具返回中未包含 Agent 配置或执行结果。",sourceLabels:{tool:"工具",knowledge:"AgentKit 知识库",skillCenter:"AgentKit 技能中心",unknown:"未知来源"},unnamedResource:"未命名资源",unnamedAgent:"未命名 Agent"},branchCompare:{ariaLabel:"分支对比",selectDirection:"选择方向",continue:"继续这个方向"},codexProgress:{planTitle:"Codex 执行计划",fallback:{fileChange:"修改文件",approval:"等待操作批准",status:"Codex 状态",command:"运行命令"},planSummary:"已完成 {{completed}}/{{total}} 项",command:{running:"正在执行命令",completed:"命令执行完成",failed:"命令执行失败"},projectFiles:"{{count}} 个项目文件",projectFile:"项目文件",fileChange:{running:"正在更新{{subject}}",completed:"已更新{{subject}}",failed:"更新{{subject}}失败"},externalTool:"外部工具",mcp:{running:"正在调用工具 {{tool}}",completed:"已调用工具 {{tool}}",failed:"工具 {{tool}} 调用未完成"},collaboration:{spawn_agent:{running:"正在启动子任务",completed:"子任务已启动",failed:"子任务启动失败"},send_input:{running:"正在向子任务发送信息",completed:"已向子任务发送信息",failed:"向子任务发送信息失败"},wait:{running:"正在等待子任务",completed:"子任务等待已结束",failed:"等待子任务失败"},close_agent:{running:"正在结束子任务",completed:"子任务已结束",failed:"子任务结束失败"},default:{running:"正在协调子任务",completed:"子任务协作已完成",failed:"子任务协作失败"}},webSearch:{running:"正在进行网络搜索",completed:"已完成网络搜索",failed:"网络搜索未完成"},errorDetail:"Codex 执行未完成。",errorTitle:"Codex 执行遇到错误"}},lce={segments:{system:"系统与工具",input:"输入与历史",output:"输出与思考",remaining:"剩余"},modelUnavailable:"模型信息未提供",promptWithSystem:"提示词(含系统)",systemUnknown:"系统与工具占用未知",systemApprox:"系统与工具约 {{count}} Token",ariaKnown:"上下文已使用 {{percentage}}%,{{system}},{{inputLabel}} {{input}} Token,输出与思考 {{output}} Token,剩余 {{remaining}} Token",ariaUnknown:"{{model}},上下文窗口未知,会话累计使用 {{count}} Token",composition:"上下文构成",percentageUsed:"{{percentage}}% 已用",gridAria:"100 格上下文构成图,每格代表上下文窗口的百分之一",estimated:"估算",unknown:"未知",summaryPercentage:"{{used}} 已用,剩余 {{remaining}}",summaryTokens:"{{used}} 已用,剩余 {{remaining}},总计 {{total}}",overflow:"已超出上下文 {{count}} Token",title:"上下文用量",unknownModel:"暂未收录该模型的上下文窗口",unknownRuntime:"当前 Runtime 未提供模型信息"},cce={title:"添加 AgentKit 智能体",noAgents:"连接成功,但该地址未发现任何 Agent(/list-apps 为空)。",connectionFailed:"连接失败:{{error}}。请检查 URL、API Key,以及该网关是否允许跨域。",description:"填入 AgentKit 部署的访问地址与 API Key,将通过 ADK 协议连接,连接成功后其 Agent 会出现在左上角的下拉中。",url:"访问地址 URL",apiKeyHint:"以 Authorization: Bearer 方式连接",displayName:"显示名称(可选)",displayNameHint:"默认取 URL 的主机名",cancel:"取消",connecting:"连接中…",connect:"连接并添加"},uce={placeholder:"输入消息…",inputAria:"输入消息",generating:"正在生成",send:"发送"},dce={ariaLabel:"本轮调用上下文",removeSkill:"移除技能 {{name}}",removeAgent:"移除 Agent {{name}}"},fce={cardAria:"{{label}} 图表",viewAria:"{{label}} 显示方式",preview:"预览",code:"代码",invalidEcharts:"ECharts 配置不是有效且安全的数据对象,请切换到代码检查内容。",renderFailed:"图表暂时无法渲染,请切换到代码检查内容。",echartsAria:"ECharts 图表预览",rendering:"正在渲染图表…",mermaidFailed:"图表暂时无法渲染,请切换到代码查看 Mermaid 内容。",mermaidAria:"Mermaid 图表预览"},hce={playVideo:"点击播放视频:{{name}}",enlargeImage:"放大预览:{{name}}",image:"图片",enlargeVideo:"点击放大视频",videoPreview:"视频预览",downloadVideo:"下载视频",close:"关闭"},pce={annotation:nce,media:ice,runtimeLogs:rce,trace:sce,share:ace,blocks:oce,tokenUsage:lce,addAgentKit:cce,composer:uce,invocation:dce,visualization:fce,markdown:hce},JDe=Object.freeze(Object.defineProperty({__proto__:null,addAgentKit:cce,annotation:nce,blocks:oce,composer:uce,default:pce,invocation:dce,markdown:hce,media:ice,runtimeLogs:rce,share:ace,tokenUsage:lce,trace:sce,visualization:fce},Symbol.toStringTag,{value:"Module"})),mce={back:"返回",cancel:"取消",deploy:"部署",delete:"删除",loading:"读取中…",next:"下一步",notSupported:"暂不支持",previous:"上一步",required:"必填",retry:"重试",actions:"操作",value:"值",disabled:"关闭",enabled:"已开启",none:"无",close:"关闭",name:"名称",description:"描述",send:"发送"},gce={heading:"VeADK Agent 结构配置",importHint:"可在「创建 Agent」页通过「导入 YAML」重新载入。"},bce={agentName:{required:"名称为必填项",reserved:"user 是 Google ADK 保留名称,请使用其他名称",characters:"名称须以英文字母或下划线开头,且只能包含英文字母、数字和下划线"},runtimeName:{required:"Runtime 名称为必填项",characters:"Runtime 名称只能包含英文字母、数字、下划线和连字符",length:"Runtime 名称长度须为 4-64 个字符"}},yce={description:"一个基于 VeADK 构建的智能助手,理解用户意图并调用合适的工具完成任务。",instruction:`你是一个专业、可靠的智能助手。 +{{response}}`,loadArkApiKeysFailed:"加载 Ark API Key 失败",loadModelsFailed:"加载模型列表失败",runtimeAccessDenied:"当前账号无权访问该 Runtime,请刷新列表或重新登录后重试。",privateRuntimeUnavailable:"Runtime 已部署成功,但当前 Studio 无法访问私网 Runtime。请使用已绑定相同 VPC 的 Studio 访问,或改用公网 / 公网+VPC 部署。",runtimeTemporarilyUnavailable:"Runtime 已部署成功,但 Studio 暂时无法连接服务。网关域名可能仍在生效,或当前网络/DNS 无法访问该 Runtime,请稍后在智能体管理页重试连接。",runtimeConnectionUnsupported:"该 Runtime 的 Agent Server 未提供连接接口,请确认 Runtime 已就绪且版本兼容。",runtimeConnectionDenied:"Runtime 服务拒绝了连接请求,请检查 Runtime 的鉴权配置。",listAgentsFailed:"读取 Agent 列表失败",invalidListAppsJson:"Runtime /list-apps 返回了无法解析的 JSON 响应。",invalidListAppsFormat:"Runtime /list-apps 返回格式无效,应为非空字符串数组。",createSessionFailedWithStatus:"创建会话失败 ({{status}})",createSessionFailed:"创建会话失败",getSessionFailed:"读取会话失败",getSessionFailedWithDetail:"读取会话失败:{{status}}:{{detail}}",feedbackRuntimeOnly:"只有连接到 AgentKit Runtime 的会话支持反馈回流",feedbackRegionMissing:"Runtime 缺少地域信息,无法提交反馈",submitFeedbackFailed:"提交反馈失败",loadEvaluationSetsFailed:"读取评测集失败",loadAutoEvaluationStatusFailed:"读取自动评测状态失败",loadOptimizationsFailed:"读取优化项失败",deleteEvaluationCaseFailed:"删除评测案例失败",downloadFileFailed:"下载文件失败",fileUnavailable:"文件内容不可用",uploadFileFailed:"文件上传失败",traceDisabled:"该 Agent 暂未开启链路观测,请到控制台打开后使用。",loadTraceFailed:"加载调用链路失败",contentTypeMissing:"Content-Type 缺失",traceNonJson:"加载调用链路失败:服务端返回了非 JSON 响应({{contentType}}),请检查 Studio API 代理配置",invalidTraceFormat:"加载调用链路失败:返回格式无效",submitIssueFeedbackFailed:"问题反馈上报失败",issueFeedbackNotConfirmed:"问题反馈上报失败:服务端未确认提交结果",noPreviewableAgent:"该 Runtime 未提供可预览的 Agent。",agentSearchFailed:"Agent 检索失败",emptySseBody:"HTTP 200,SSE 响应体为空。",noDisplayableSseReply:"HTTP 200,SSE 响应中没有可展示的模型回复。",firstSseEventTimeout:"30 秒内未收到首个 SSE 事件。",runSessionFailed:"运行会话失败",runSseFailedWithDetail:"运行会话失败:{{status}}:{{detail}}",checkRuntimeNameFailed:"检查 Runtime 名称失败",invalidRuntimeNameCheck:"检查 Runtime 名称失败:服务返回格式错误",loadCloudResourcesFailed:"加载云资源失败",invalidCloudResources:"云资源列表响应格式无效",invalidEnvironmentMount:"挂载环境响应格式无效",environmentMountMismatch:"挂载环境响应与请求不一致",environmentMountNetworkFailed:"无法连接 Studio 服务,环境挂载未完成。请检查网络后重试。",environmentMountFailed:"挂载环境失败",clipboardUnsupported:"当前浏览器不支持写入剪贴板。",clipboardWriteFailed:"无法写入剪贴板,请检查剪贴板权限。",loadSystemInfoFailed:"加载系统信息失败",invalidSystemInfo:"系统信息响应格式无效",invalidEnvironmentBuild:"环境构建响应格式无效",invalidEnvironmentBuildStep:"环境构建步骤响应格式无效",invalidEnvironmentManifest:"环境 Manifest 响应格式无效",invalidImageRepository:"环境镜像仓库响应格式无效",invalidCodeRepository:"环境代码仓库响应格式无效",invalidImageSource:"环境镜像来源响应格式无效",invalidEnvironment:"环境响应格式无效",invalidWorkspace:"工作区响应格式无效",loadWorkspacesFailed:"加载工作区失败",invalidWorkspaceList:"工作区列表响应格式无效",saveWorkspaceFailed:"保存工作区失败",deleteWorkspaceFailed:"删除工作区失败",loadEnvironmentsFailed:"加载环境失败",invalidEnvironmentList:"环境列表响应格式无效",probeRepositoryFailed:"探查代码仓库失败",invalidRepositoryProbe:"代码仓库探查响应格式无效",exportEnvironmentCodeFailed:"导出环境分享码失败",invalidEnvironmentCode:"环境分享码响应格式无效",inspectEnvironmentCodeFailed:"检测环境分享码失败",invalidEnvironmentCodeInspection:"环境分享码检测响应格式无效",importEnvironmentCodeFailed:"导入环境分享码失败",invalidEnvironmentCodeImport:"环境分享码导入响应格式无效",studioUnavailable:"无法连接 Studio 服务,请确认后端已启动后重试。",saveEnvironmentFailed:"保存环境失败",deleteEnvironmentFailed:"删除环境失败",startEnvironmentBuildFailed:"启动环境构建失败",loadEnvironmentBuildFailed:"读取环境构建详情失败",loadEnvironmentManifestFailed:"读取环境 Manifest 失败",invalidEnvironmentResource:"环境资源响应格式无效",loadEnvironmentResourcesFailed:"加载环境构建资源失败",updateCodexSandboxFailed:"更新 Codex Sandbox 失败",invalidCodexSandboxUpdate:"Codex Sandbox 更新响应格式无效",loadUserPoolsFailed:"加载用户池失败",invalidUserPoolList:"用户池列表响应格式无效",syncGithubFailed:"同步 GitHub 代码失败 ({{status}})",validatingMigrationArtifact:"正在校验迁移产物",uploadingCodePackage:"正在上传代码包",migrationArtifactValidated:"迁移产物校验完成",codePackageUploaded:"代码包上传完成",deploymentProgress:{preparing:"正在准备部署",uploading:"正在上传代码包",building:"正在构建镜像",buildLogsSyncing:"正在构建镜像,构建日志已同步。",buildLogsComplete:"构建日志同步完成。",buildFailedLogsSynced:"镜像构建失败,最终构建日志已同步。",buildLogsUnavailable:"暂时无法读取构建日志。",finalBuildLogsUnavailable:"暂时无法读取最终构建日志。",deploying:"正在部署服务",publishing:"正在发布服务",evaluating:"正在创建评测集",updating:"正在更新 Runtime 配置",completing:"正在完成部署",github:"正在配置 GitHub 持续交付",inProgress:"正在部署"},deploymentFailed:"部署失败",deploymentDisconnected:"部署失败:连接中断",deploymentMissingAgentName:"部署失败:返回缺少 Agent 名称",deploymentMissingConnection:"部署失败:返回缺少 AgentKit 连接信息",cancelDeploymentFailed:"取消部署失败 ({{status}})",loadFailed:"加载失败 ({{status}})",loadPermissionsFailed:"加载权限失败 ({{status}})",invalidPermissionResponse:"权限服务返回了无法解析的响应",checkStudioUpdateFailed:"检查 Studio 更新失败 ({{status}})",studioUpdatePreflightFailed:"Studio 更新权限预检失败 ({{status}})",submitStudioUpdateFailed:"提交 Studio 更新失败 ({{status}})",loadAgentUsageFailed:"加载 Agent 用量失败",notProvided:"未提供",agentUsageNonJson:"加载 Agent 用量失败:服务端返回非 JSON 响应(HTTP {{status}},Content-Type: {{contentType}})。",checkStudioGateway:"请确认当前服务以 Studio 模式启动,并检查代理或网关配置。",agentUsageInvalidJson:"加载 Agent 用量失败:服务端返回了无法解析的 JSON(HTTP {{status}},Content-Type: {{contentType}})。",retryCheckGateway:"请稍后重试;若问题持续,请检查代理或网关配置。",loadCronJobsFailed:"加载定时任务失败",loadCronJobFailed:"加载定时任务详情失败",createCronJobFailed:"创建定时任务失败",updateCronJobFailed:"更新定时任务失败",enableCronJobFailed:"启用定时任务失败",pauseCronJobFailed:"暂停定时任务失败",runCronJobFailed:"立即执行定时任务失败",loadCronHistoryFailed:"加载执行历史失败",stopCronRunFailed:"终止执行失败",deleteCronJobFailed:"删除定时任务失败",loadRuntimeFailed:"加载 Runtime 失败",loadLocalToolsFailed:"读取本地工具失败",connectDynamicRouteFailed:"连接 Studio 动态路由失败",a2aProbeDenied:"Runtime 服务拒绝了 A2A 探测请求,请检查 Runtime 的鉴权配置。",loadA2aCardFailed:"读取 A2A Agent Card 失败",loadRuntimeApiKeyFailed:"读取 Runtime API Key 失败",runtimeApiKeyMissing:"Runtime 未返回可用的 API Key",deleteFailed:"删除失败 ({{status}})",runtimeManageForbidden:"当前账号没有管理该 Runtime 的权限。",runtimeNotFound:"该 Runtime 不存在或已被删除。",runtimeUnavailable:"当前账号无法访问该 Runtime。",checkRuntimeUpdateFailed:"检查 Runtime 更新能力失败(HTTP {{status}}),请稍后重试。",loadRuntimeDetailFailed:"加载 Runtime 详情失败",generateProjectFailed:"生成项目失败",generateAgentConfigFailed:"生成 Agent 配置失败",createDebugRunFailed:"创建调试运行失败",createDebugSessionFailed:"创建调试会话失败",loadDebugTraceFailed:"加载调试调用链路失败",invalidDebugTrace:"加载调试调用链路失败:返回格式无效",debugRunFailed:"调试运行失败",cleanupDebugRunFailed:"清理调试运行失败"},vle={loadFailed:"读取会话模式能力失败(HTTP {{status}})",invalidResponse:"会话模式能力响应格式错误"},xle={nonJson:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}},{{contentType}}){{detail}}"},Ole={common:Joe,agentkitCli:ele,cloudRegion:tle,connections:nle,feishuBot:ile,requestError:rle,runSse:sle,runtimeLogs:ale,search:ole,skills:lle,sse:cle,identity:ule,github:dle,video:fle,websiteIntegration:hle,knowledge:ple,intelligentDevelopment:mle,migrations:gle,sandbox:ble,client:yle,newChatCapabilities:vle,jsonResponse:xle},GDe=Object.freeze(Object.defineProperty({__proto__:null,agentkitCli:ele,client:yle,cloudRegion:tle,common:Joe,connections:nle,default:Ole,feishuBot:ile,github:dle,identity:ule,intelligentDevelopment:mle,jsonResponse:xle,knowledge:ple,migrations:gle,newChatCapabilities:vle,requestError:rle,runSse:sle,runtimeLogs:ale,sandbox:ble,search:ole,skills:lle,sse:cle,video:fle,websiteIntegration:hle},Symbol.toStringTag,{value:"Module"})),wle={backToEvaluationCase:"返回评测案例",cancel:"取消",copied:"已复制",copy:"复制",exportConversation:"导出会话",retry:"重试"},Sle={title:"您想以哪种方式添加 Agent 来运行?",subtitle:"选择最适合你的方式,下一步即可开始",quickCreate:{title:"从 0 快速创建",description:"用智能、自定义、模板或工作流的方式从零创建一个 Agent。"},intelligent:{title:"智能模式",description:"描述目标,按你的意图构建、调试并验证 Agent。"},package:{title:"从代码包添加和部署",description:"上传 Agent 项目压缩包,查看代码并直接部署到 AgentKit Runtime。"},migrate:{title:"从存量迁移",description:"从您的 LangChain、Dify 等存量项目迁移至 AgentKit Runtime。"}},kle={subject:{file:"文件修改",command:"命令执行"},decision:{accept:"已允许本次{{subject}}",acceptForSession:"已在本会话中允许{{subject}}",decline:"已拒绝{{subject}}",cancel:"已取消{{subject}}审批"},details:{command:"命令",grantRoot:"授权路径",cwd:"执行目录"}},Ele={noDescription:"暂无描述",region:"地域",unknownAgent:"未知 Agent"},Cle={agentTransfer:"智能体移交",annotationHint:"模型回复;选中文字后可添加批注",continueBranch:"继续“{{branch}}”这个方向",emptyResponse:"本次没有返回可显示的内容。",subagentDescription:"正在执行主 Agent 移交的任务。"},Tle={title:"需要配置 {{provider}} AK/SK",prefix:"智能体工作台需要 {{provider}} 凭据才能使用。请在运行环境中设置",and:"与",suffix:"后重试。"},Ale={buildRunning:{title:"当前构建仍在进行",description:"离开将停止本轮构建;当前会话仍会保留,可稍后从历史会话重新进入。",confirm:"停止并离开"},deleteThread:{title:"删除 Codex 历史会话",description:"将删除“{{name}}”,并从历史会话中移除。",confirm:"确认删除"},returnToCreate:{title:"返回创建首页?",description:"返回后当前填写的内容将会丢失,确定要返回吗?",confirm:"确定返回"}},_le={additionalAgentDeleteFailures:";另有 {{count}} 个失败",agentDeleteFailures:"{{count}} 个 Agent 删除失败:{{failures}}{{suffix}}",agentToolsMissing:"当前 Agent 缺少任务工具:{{tools}}",buildStopUnconfirmed:"已离开开发环境,但未能确认本轮构建已停止。任务可能仍在运行,请稍后从历史会话检查状态。",builtinAgentSendFailed:"内置智能体发送失败:{{message}}",bytePlusEvaluationUnsupported:"BytePlus 暂不支持 AgentKit 评测集",clipboardUnsupported:"当前浏览器不支持写入剪贴板。",cloudCodexEmptyReply:"云端 Codex 已结束,但没有生成回复,请重新发送任务。",cloudCodexSessionMissing:"云端 Codex Session 暂未出现在列表中,请稍后重试。",deploymentRuntimeIdMissing:"部署完成,但未返回 Runtime ID。",environmentExpired:"所选环境已失效,请刷新后重新选择。",environmentsLoadFailed:"读取环境失败",evaluationCaseSessionMissing:"这条案例缺少会话定位信息,无法跳转。",evaluationUnsupportedForReply:"当前回复暂不支持加入评测集",firstFrameRequired:"首尾帧生成需要先添加首帧图片。",incompletePromptOptimization:"提示词优化结果不完整,请重新优化后再试。",intelligentCapabilityCheckFailed:"智能开发能力检查失败(HTTP {{status}})",intelligentSessionCreateFailed:"智能开发会话创建失败",invalidIntelligentCapability:"智能开发模型能力格式错误。",localBffToolsNotConfigured:"本地 Studio BFF 没有配置工具。",localToolsLoadFailed:"读取本地工具失败",loginPopupBlocked:"登录窗口被浏览器拦截,请允许弹出窗口后重试。",loginPopupClosed:"登录窗口已关闭,请重新登录以继续当前操作。",mediaTooLarge:"{{fileName}} 超出当前平台允许的素材大小。",mountEnvironmentFailed:"挂载环境失败",noConnectedSandbox:"当前没有已连接的 Sandbox。",noCreateAgentPermission:"当前账号没有添加 Agent 的权限。",noManageAgentPermission:"当前账号没有管理 Agent 的权限。",noOptimizationBaseline:"当前版本没有可对比的优化前版本。",oauthUrlMissing:"事件中没有授权地址。",onlyCloudAgentUpdatable:"仅支持更新已部署的云端智能体。",optimizationVersionMissing:"无法找到本次优化对应的项目版本,可能已被删除。",persistentStorageNotConfigured:"管理员未配置持久化存储",readDraftFailed:"无法读取本机草稿,请稍后重试。",runtimeAgentNameMissing:"Runtime 缺少智能体名称,无法更新。",runtimeBffToolsDisabled:"当前 Runtime Agent 未开启 BFF 工具能力。",runtimeDeploymentConfigUnavailable:"该 Runtime 的原发布配置不可恢复,无法安全更新。",runtimeMissingForConnection:"缺少 Runtime 信息,无法连接智能体。",runtimeRegionMissingForDelete:"Runtime 缺少地域信息,无法删除",runtimeRegionMissingForUpdate:"Runtime 缺少地域信息,无法更新。",runtimeUpdateUnsupported:"当前 Runtime 不支持原地更新。",sandboxRuntimeUnavailable:"当前 Agent 没有可用的 Sandbox Runtime。",sandboxToolsUnavailable:"当前 Studio BFF 未提供 Sandbox 执行工具。",saveDraftLocationRejected:"浏览器拒绝保存当前草稿位置,请检查站点存储权限后重试。",saveDraftRejected:"浏览器拒绝保存草稿,请稍后重试。",selectSkillToOptimize:"请先选择需要优化的 Skill。",sessionMissingForMount:"当前会话不存在,无法挂载环境。",sessionNotReady:"会话尚未就绪。",sessionUnavailable:"当前会话不可用,请关闭后重试。",sourceNotReady:"该源码尚未准备好,请返回对话继续处理。",textVideoRejectsReferences:"文生视频不使用参考素材,请先移除已添加的图片或视频。",videoEditRequiresVideo:"视频编辑需要先添加待编辑视频。",videoExtendRequiresVideo:"视频续写需要先添加基础视频。",videoGenerationFailed:"视频生成失败,请稍后重试。",videoModeUnsupported:"当前平台暂不支持所选视频任务模式。",videoPreviewMissing:"视频任务已完成,但服务端未返回预览地址。",videoReferenceRequired:"参考素材生视频需要至少添加一项参考图片或参考视频。"},Nle={like:"赞",removeLike:"取消点赞",dislike:"踩",removeDislike:"取消点踩",reportIssue:"问题反馈",traceFlameGraph:"Tracing 火焰图"},jle={0:"今天想做点什么?",1:"有什么可以帮你的?",2:"需要我帮你查点什么吗?",3:"有问题尽管问我",4:"嗨,我们开始吧",5:"开始一段新对话吧",6:"今天想先解决哪件事?",7:"把你的想法告诉我吧",8:"我们从哪里开始?",9:"有什么任务交给我?",10:"准备好一起推进了吗?",11:"说说你现在最关心的问题",12:"今天也一起把事情做好",13:"我在,随时可以开始",intelligentDevelopment:"让灵感自由生长"},Rle={agentCapabilities:"正在检查 Agent 能力…",session:"加载会话…"},Ile={cancelled:"授权已取消。",pasteCallbackUrl:"授权完成后,请粘贴回调页面(浏览器地址栏)的完整 URL:",popupBlocked:"弹窗被拦截,请允许弹窗后重试。",unsupportedUrl:"授权链接不是 http/https 地址,已阻止打开。"},Ple={volcengine:"火山引擎"},Dle={checkingPersistence:"正在检查持久化能力…",exitDevelopment:"退出开发环境",fileUploaded:"已上传文件到 Sandbox",filesUploaded:"已上传 {{count}} 个文件到 Sandbox",intelligentDevelopment:"智能开发",mode:{readOnly:"只读",workspaceWrite:"工作区写入",fullAccess:"完全访问"},approvalPolicy:{untrusted:"仅不可信命令",onRequest:"按需审批",never:"不审批"},reviewer:{user:"由我审批",autoReview:"自动审查"},labels:{approvalPolicy:"审批策略",file:"文件",fileNumber:"文件 {{number}}",mode:"沙箱模式",networkAccess:"网络访问",reviewer:"审批方式",workingDirectory:"工作目录"},network:{allowed:"允许",disabled:"关闭"},permissionsUpdated:"已更新当前 Sandbox Session 的 Codex 权限",persistenceUnknown:"暂时无法确认持久化能力",stoppedReady:"已停止,可继续输入",uploadedFilesPrompt:"以下文件已上传到当前 Sandbox 工作空间,请在任务中使用:",workspaceUpdated:"已更新工作空间"},Mle={addAgent:"添加智能体",addFromPackage:"从代码包添加",agent:"智能体",automations:"自动化",createAgent:"创建智能体",createSkill:"创建技能",cronJobs:"定时任务",issueFeedback:"问题反馈",library:"资源库",migrateAgent:"迁移智能体",newConversation:"新会话",optimizeSkill:"优化 {{name}}",search:"搜索",skill:"技能",skillLibrary:"技能库",systemInfo:"系统信息",updateAgent:"更新 {{name}}"},Lle={actions:wle,addAgent:Sle,approval:kle,common:Ele,conversation:Cle,credentials:Tle,dialogs:Ale,errors:_le,feedback:Nle,greetings:jle,loading:Rle,oauth:Ile,providers:Ple,sandbox:Dle,titles:Mle},XDe=Object.freeze(Object.defineProperty({__proto__:null,actions:wle,addAgent:Sle,approval:kle,common:Ele,conversation:Cle,credentials:Tle,default:Lle,dialogs:Ale,errors:_le,feedback:Nle,greetings:jle,loading:Rle,oauth:Ile,providers:Ple,sandbox:Dle,titles:Mle},Symbol.toStringTag,{value:"Module"})),$le="自动化",Fle="连接研发工具,为智能体扩展自动化工作流",Ble="搜索自动化",Ule="自动化分类",Qle={development:"研发",channels:"消息渠道"},zle="{{category}}自动化列表",Vle="打开{{name}}",Hle="仅本地部署可用",qle="没有匹配的自动化",Wle="请尝试搜索其他名称",Kle="返回自动化列表",Gle={"coding-agents":{name:"配置 Coding Agents",badge:"本地",description:"将 VeADK 和 AgentKit 内置 Skills 全局配置到 Trae、Claude Code 或 Codex。"},template:{name:"模板项目导入",description:"在您的仓库中创建一个可持续交付到 AgentKit Runtime 的最简智能体",title:"模板项目导入",subtitle:"把可直接启动 Studio 的 basic Agent 和持续交付配置加入仓库",panel:"提交后将创建一个 PR,同时导入 basic 项目和 AgentKit Runtime 发布工作流。",submitLabel:"导入模板并提交 PR",regionHelp:"必须与目标 Runtime 所在地域一致",pullRequest:{title:"feat: 导入 AgentKit basic 模板",description:"导入带有 AgentKit Studio App Server 的 basic Agent 项目,并添加持续发布到 AgentKit Runtime 的工作流。合并前请配置 {{provider}} Secrets。"},fields:{repository:{label:"GitHub 仓库",placeholder:"owner/repository",help:"支持 owner/repository 或完整 github.com URL"},baseBranch:{label:"目标分支",placeholder:"main",help:"留空时使用 main,PR 将以此分支为 base"},projectPath:{label:"Agent 项目目录",placeholder:"agentkit-basic-agent",help:"将在此目录新增 basic 项目;app.py 挂载完整 Studio App Server,并作为服务入口启动"},runtimeName:{label:"Runtime 名称",placeholder:"support-agent",help:"用于 AgentKit 发布配置"},runtimeId:{label:"运行时 ID",placeholder:"rt-xxxxxxxx",help:"持续更新的目标 AgentKit Runtime"}}},delivery:{name:"AgentKit Runtime 持续交付",description:"为您的仓库添加持续交付到 AgentKit Runtime 的自动化工作流。",title:"AgentKit Runtime 持续交付",subtitle:"用 Pull Request 把持续发布配置安全地加入代码仓库",panel:"提交后将在目标仓库创建发布分支,并发起包含 GitHub Actions 工作流的 PR。",submitLabel:"确定并提交 PR",regionHelp:"必须与目标 Runtime 所在地域一致",pullRequest:{title:"feat: 持续发布到 AgentKit Runtime",description:"新增 GitHub Actions 工作流,在目标分支更新时持续发布到 AgentKit Runtime。合并前请配置工作流所需的 {{provider}} Secrets。"},fields:{repository:{label:"GitHub 仓库",placeholder:"owner/repository",help:"支持 owner/repository 或完整 github.com URL"},baseBranch:{label:"目标分支",placeholder:"main",help:"留空时使用 main,PR 将以此分支为 base"},projectPath:{label:"Agent 项目目录",placeholder:".",help:"留空时使用仓库根目录;目录内需包含挂载完整 Studio App Server 的 app.py"},runtimeName:{label:"Runtime 名称",placeholder:"support-agent",help:"用于 AgentKit 发布配置"},runtimeId:{label:"运行时 ID",placeholder:"rt-xxxxxxxx",help:"持续更新的目标 AgentKit Runtime"}}},review:{name:"PR 自动评审",description:"在隔离 Sandbox 中评审代码变更,并将结果发布到 Pull Request。",title:"PR 自动评审",subtitle:"在隔离 Sandbox 中检查代码变更并把结果发布到 Pull Request",panel:"工作流仅评审同仓库的非草稿 PR;fork PR 不会读取仓库 Secrets。",submitLabel:"添加评审并提交 PR",regionHelp:"必须与 Sandbox Tool 所在地域一致",pullRequest:{title:"chore: 配置 PR 自动评审",description:"新增 GitHub Actions 工作流,在隔离 Sandbox 中评审同仓库 PR,并将结果发布为 GitHub Review。合并前请配置工作流所需 Secrets。"},fields:{repository:{label:"GitHub 仓库",placeholder:"owner/repository",help:"支持 owner/repository 或完整 github.com URL"},baseBranch:{label:"目标分支",placeholder:"main",help:"留空时使用 main,PR 将以此分支为 base"},sandboxToolId:{label:"沙箱工具 ID",placeholder:"tool-xxxxxxxx",help:"用于运行每次评审的 AgentKit CodeEnv"},modelName:{label:"评审模型",placeholder:"review-model",help:"注入 Sandbox 的代码评审模型名称"},modelBaseUrl:{label:"模型 API 地址",placeholder:"https://ark.example.com/api/v3",help:"必须使用 OpenAI 兼容的 HTTPS 地址"}}},feishu:{name:"飞书机器人",badge:"Beta",description:"创建飞书机器人,并将消息直接接入 AgentKit Runtime。"},"website-integration":{name:"网站集成",description:"将 AgentKit Runtime 以悬浮聊天窗口嵌入网站。"}},Xle={required:"必填",optional:"可选",region:"地域",tokenLabel:"GitHub Token",getToken:"获取 Token",tokenPlaceholder:"需要仓库 Contents 与 Pull requests 写权限",hideToken:"隐藏 Token",showToken:"显示 Token",tokenHelp:"Token 仅用于本次提交,不会保存在浏览器或写入 PR",prCreated:"PR #{{number}} 已创建",viewOnGitHub:"在 GitHub 查看",secretsHeading:"合并 PR 前,请在仓库的 GitHub Actions Secrets 中配置:",secretPair:"{{accessKey}}、{{secretKey}}(必填)",sessionToken:"{{sessionToken}}(使用临时凭据时必填)",requiredSecret:"{{name}}(必填)",temporaryCredentialRequired:"(使用临时凭据时必填)",requiredSuffix:"(必填)",submitting:"提交 PR 中…",validation:{required:"此项不能为空",repository:"请输入 owner/repository 或完整 GitHub 仓库 URL",baseBranch:"目标分支格式不正确",projectPath:"请输入仓库内的相对目录",runtimeId:"运行时 ID 格式不正确",sandboxToolId:"沙箱工具 ID 格式不正确",modelName:"模型名称格式不正确",modelBaseUrlSafe:"请输入不含凭据、查询参数或锚点的 HTTPS 地址",modelBaseUrl:"请输入有效的 HTTPS 地址",runtimeName:{required:"Runtime 名称为必填项",characters:"Runtime 名称只能包含英文字母、数字、下划线和连字符",length:"Runtime 名称长度须为 4-64 个字符"}}},Yle={title:"配置 Coding Agents",description:"把随 Studio 提供的 AgentKit Skills 全局安装到本地编码客户端。",retry:"重试",clients:{ariaLabel:"选择 Coding Agent",title:"本机客户端",detectAgain:"重新检测",detecting:"正在检测本机客户端…",detected:"已检测到客户端",available:"可用",unavailable:"未检测到"},skills:{ariaLabel:"选择内置 Skill",title:"内置 Skills",viewFiles:"查看文件",items:{"veadk-agent-development":{name:"VeADK Agent 开发",description:"使用 VeADK 开发和完善 Agent。"},"agentkit-cli":{name:"AgentKit CLI",description:"通过 AgentKit CLI 管理和部署 AgentKit 资源。"}}},global:{ariaLabel:"全局安装目录",title:"全局安装",description:"配置后可在本机其他项目中使用",empty:"选择客户端后显示对应安装目录。"},success:"已为 {{agentCount}} 个客户端配置 {{skillCount}} 个 Skill",selection:"已选择 {{agentCount}} 个客户端、{{skillCount}} 个 Skill",selectClient:"请先选择客户端",configuring:"正在配置…",configure:"配置",errors:{detect:"检测本机客户端失败",configure:"配置失败,请检查用户目录权限后重试"},preview:{description:"只读浏览随 Studio 提供的 Skill 文件",close:"关闭文件预览",loading:"正在读取文件…",error:"读取 Skill 文件失败",skillFiles:"{{name}} 文件",files:"文件",fileContent:"文件内容",notPreviewable:"此文件不是可预览的 UTF-8 文本。",noFiles:"没有可预览的文件。"}},Zle={title:"飞书机器人",description:"创建一个由 AgentKit Runtime 驱动的飞书智能体",panel:"填写已发布飞书应用的凭据,Studio 将生成 basic 智能体、创建独立 Runtime,并启用飞书消息长连接。",agentName:"智能体名称",agentNameHelp:"将作为新 Runtime 中的根智能体名称",region:"部署地域",regionHelp:"Runtime 与构建产物将创建在该地域",regions:{"cn-beijing":"北京","cn-shanghai":"上海"},appId:"飞书 App ID",appIdHelp:"来自飞书开放平台的应用凭证",appSecret:"飞书 App Secret",appSecretPlaceholder:"请输入 App Secret",appSecretHelp:"仅写入新 Runtime 的环境变量",hideSecret:"隐藏 App Secret",showSecret:"显示 App Secret",hide:"隐藏",show:"显示",confirmCancel:"取消部署将停止任务并清理已创建的 Runtime,确定继续吗?",status:{preparing:"正在生成 basic 智能体",running:"正在创建 Runtime",cancelling:"正在取消部署",succeeded:"飞书机器人 Runtime 已创建",cancelled:"部署已取消",failed:"创建失败"},steps:{prepare:"生成智能体",build:"构建镜像",deploy:"创建 Runtime",publish:"发布服务"},openConsole:"打开 Runtime 控制台",credentials:{title:"凭据处理",description:"App Secret 仅用于本次部署,不会写入生成源码或浏览器存储。"},cancelDeployment:"取消部署",creating:"正在创建…",create:"创建飞书机器人 Runtime",validation:{appId:"请输入飞书 App ID",appSecret:"请输入飞书 App Secret",agentName:{required:"名称为必填项",reserved:"user 是 Google ADK 保留名称,请使用其他名称",characters:"名称须以英文字母或下划线开头,且只能包含英文字母、数字和下划线"}},generatedAgent:{description:"一个通过飞书接收消息并提供帮助的智能助手。",instruction:"你是一个通过飞书为用户提供帮助的智能助手。准确理解用户问题,给出简洁、可靠的回答;信息不足时先提问澄清,不要臆造事实。"}},Jle={title:$le,description:Fle,search:Ble,categoriesLabel:Ule,categories:Qle,resultsLabel:zle,open:Vle,localOnly:Hle,emptyTitle:qle,emptyDescription:Wle,backToAutomations:Kle,cards:Gle,github:Xle,codingAgents:Yle,feishu:Zle},YDe=Object.freeze(Object.defineProperty({__proto__:null,backToAutomations:Kle,cards:Gle,categories:Qle,categoriesLabel:Ule,codingAgents:Yle,default:Jle,description:Fle,emptyDescription:Wle,emptyTitle:qle,feishu:Zle,github:Xle,localOnly:Hle,open:Vle,resultsLabel:zle,search:Ble,title:$le},Symbol.toStringTag,{value:"Module"})),ece={"zh-CN":"简体中文","en-US":"English"},ZDe={languageNames:ece},JDe=Object.freeze(Object.defineProperty({__proto__:null,default:ZDe,languageNames:ece},Symbol.toStringTag,{value:"Module"})),tce={selectedExcerptLabel:"选中片段",commentLabel:"批注",commentSeparator:":",successTitle:"已加入 Bad case 评测集",successDescription:"这条批注已关联当前问题和完整模型回复。",done:"完成",ariaLabel:"批注选中的模型回复",title:"添加批注",content:"批注内容",placeholder:"说明问题或期望的修改方式",retryError:"{{error}},请重试。",cancel:"取消",submit:"加入 Bad Case"},nce={attachment:"附件",image:"图片",preview:"预览 {{name}}",uploading:"上传中",uploadFailed:"上传失败",remove:"移除 {{name}}",previewDialog:"{{name}}预览",download:"下载",close:"关闭",reading:"正在读取文档…",loadFailed:"文档加载失败:{{error}}"},ice={errorTitle:"云端日志错误",copyError:"复制完整错误信息",retry:"重试",statuses:{live:"实时",connecting:"连接中",retrying:"重连中",idle:"未连接"},title:"实例日志",description:"当前对话请求所在的 VeFaaS 实例",close:"关闭实例日志",instanceId:"实例 ID",waitingInstance:"等待实例",request:"请求 {{id}}",ariaLabel:"VeFaaS 实例实时日志",notCapturedTitle:"尚未捕获到实例",notCapturedDescription:"发送一条消息后,这里会显示实际处理请求的实例和实时日志。",connectingTitle:"正在连接实例日志",connectingDescription:"正在通过 Studio BFF 建立安全日志流。",emptyTitle:"暂无日志",emptyDescription:"已连接实例,等待新的日志输出。",retention:"日志自动刷新,仅保留最近 {{count}} 行"},rce={title:"调用链路观测",statuses:{loading:"加载中",ready:"",collecting:"采集中",disabled:"未开启",forbidden:"权限不足",error:"加载失败"},errors:{collecting:"调用链路仍在采集中,请稍候。",disabled:"该 Agent 未开启链路观测,请到控制台开启后重试。",forbidden:"当前账号无权读取 APMPlus 调用链路,请联系管理员补充只读权限。",error:"调用链路加载失败,请稍后重试。"},callCount:"{{count}} 个调用 · {{duration}} ms",close:"关闭",loading:"加载调用链路…",retryNow:"立即重试",reload:"重新加载",empty:"该会话暂无调用链路(可能尚未产生调用)。",attributes:"属性",selectCall:"选择左侧的一个调用查看详情"},sce={exportNote:"上述会话由 AgentKit Studio 导出,仅供参考",imageFailed:"图片生成失败,请重试。",browserUnsupported:"浏览器无法生成会话图片,请重试。",copyUnsupported:"当前浏览器不支持复制图片,请下载后使用。",exportFailed:"导出失败,请重试。",title:"导出会话",description:"选择格式并下载截至当前回复的全部输入与输出。",close:"关闭",generatingContent:"正在生成导出内容…",retry:"重试生成",previewPage:"预览第 1 页,共 {{count}} 页",previewAlt:"会话导出内容第 1 页,共 {{count}} 页",format:"导出格式",generatingFormat:"正在生成 {{format}}…",copying:"正在复制…",copiedFirst:"已复制第一页",copied:"已复制",copyFirst:"复制第一页",copyImage:"复制图片",generating:"正在生成…",downloadArchive:"下载 PNG 压缩包({{count}} 页)",downloadFormat:"下载 {{format}}"},ace={unsupportedComponent:"不支持的组件:{{component}}",sandboxIdentity:"Codex Sandbox 执行标识",useSkill:"使用 {{name}} 技能",thinkingDone:"已完成思考",thinking:"思考中",justNow:"刚刚",sourceUnavailable:"暂时无法读取生成的源码,请稍后重试。",downloadStarted:"已开始下载",verifiedDelivery:"已验证交付物",generatedSource:"生成的 Agent 源码",entryPoint:"入口",fileCount:"文件数",size:"大小",validationTime:"验证时间",generationTime:"生成时间",checksPassed:"{{count}} 项检查通过",sourceReady:"源码已准备好,可部署",sourceGuidance:"源码已准备好,可查看、下载或部署;部署前请确认 Runtime 配置。",viewSource:"查看源码",preparing:"正在准备…",viewChanges:"查看本次变更",downloadSource:"下载源码",sourceNotReady:"源码尚未准备好",manualDeploy:"手动部署到 Runtime",beforeOptimization:"优化前",afterOptimization:"优化后",planStatuses:{pending:"待处理",in_progress:"进行中",completed:"已完成",failed:"未完成"},renderUi:"渲染 UI",truncated:"…(已截断)",agentAdjusting:"Agent 正在调整",sandboxDetails:"Codex Sandbox 详细输出",waitingCodex:"正在等待 Codex 输出",arguments:"参数",result:"返回",artifacts:"产物",downloadNamed:"下载 {{name}}",powerpoint:"PowerPoint 演示文稿",preview:"预览",download:"下载",previewDialog:"{{name}} 预览",closePreview:"关闭预览",slidePreview:"{{name}} 幻灯片预览",mcpToolset:"MCP 工具集",authorized:"已授权 · {{tool}}",authorizationRequired:"{{tool}} 需要授权",oauthDescription:"工具集 {{tool}} 使用 OAuth 保护,需登录授权后方可调用。",oauthProvider:"将跳转至 {{provider}} 完成登录。",oauthContinue:"授权完成后对话自动继续。",waitingAuthorization:"等待授权…",authorize:"去授权",missingAuthorizationUrl:"未在事件中找到授权地址。",tools:{web_search:{running:"正在进行网络搜索",done:"已完成网络搜索"},link_reader:{running:"正在读取网页",done:"已完成网页读取"},run_code:{running:"正在 AgentKit 沙箱中执行代码",done:"已在 AgentKit 沙箱中完成代码执行"},list_envs:{running:"正在查看可用环境",done:"已读取可用环境"},get_env_manifest:{running:"正在读取环境 Manifest",done:"已读取环境 Manifest"},execute_in_sandbox:{running:"正在环境中执行命令",done:"已在环境中完成命令执行"},delegate_to_codex_sandbox:{running:"Codex Sandbox 正在执行",done:"Codex Sandbox 已完成",failed:"Codex Sandbox 执行失败"},image_generate:{running:"正在生成图片",done:"已完成图片生成"},video_generate:{running:"正在生成视频",done:"已完成视频生成"},ppt_generate:{running:"正在生成 PPT",done:"已完成 PPT 生成"},load_memory:{running:"正在检索长期记忆",done:"已完成记忆检索"},load_knowledgebase:{running:"正在检索知识库",done:"已完成知识库检索"},load_skill:{running:"正在加载技能",done:"已加载技能"},collect_resources:{running:"正在收集可用资源",done:"已完成资源收集",failed:"资源收集失败"},create_agents:{running:"正在创建并运行 Agent",done:"已完成 Agent 创建",failed:"Agent 创建失败"}},createAgents:{categories:{skill_hub:"Skill Hub",skill_space:"AgentKit 技能中心",knowledge_base:"知识库",tool:"工具"},agentTypes:{llm:"LLM 智能体",sequential:"顺序智能体",parallel:"并行智能体",loop:"循环智能体",workflow:"工作流"},skill:"技能",subAgents:"子智能体",builtinTool:"内置工具",skillCenter:"AgentKit 技能中心",selfAuthoredTools:"自写工具",dependencies:"依赖:{{items}}",fullCode:"{{name}} 完整代码",itemCount:"{{label}} {{count}} 项",collectionAria:"召回资源信息",retrieving:"正在检索资源",retrievalFailed:"资源检索未完成",checkConfig:"请检查资源服务配置后重试。",notSearched:"未检索",notConfigured:"未配置",resourceList:"{{label}}资源列表",searchKeywords:"检索关键词",skillHubSkipped:"未提供检索关键词,本次未检索 Skill Hub。",sourceSkipped:"未配置 {{label}},本次未检索该来源。",noResources:"本次检索未返回该类别的资源。",resultAria:"创建 Agent 结果",creationFailed:"Agent 创建未完成",agentResources:"{{name}} 具备的资源",knowledgeBase:"知识库",toolsLabel:"工具",creating:"正在创建 Agent",noAgents:"没有可展示的 Agent",noAgentResult:"工具返回中未包含 Agent 配置或执行结果。",sourceLabels:{tool:"工具",knowledge:"AgentKit 知识库",skillCenter:"AgentKit 技能中心",unknown:"未知来源"},unnamedResource:"未命名资源",unnamedAgent:"未命名 Agent"},branchCompare:{ariaLabel:"分支对比",selectDirection:"选择方向",continue:"继续这个方向"},codexProgress:{planTitle:"Codex 执行计划",fallback:{fileChange:"修改文件",approval:"等待操作批准",status:"Codex 状态",command:"运行命令"},planSummary:"已完成 {{completed}}/{{total}} 项",command:{running:"正在执行命令",completed:"命令执行完成",failed:"命令执行失败"},projectFiles:"{{count}} 个项目文件",projectFile:"项目文件",fileChange:{running:"正在更新{{subject}}",completed:"已更新{{subject}}",failed:"更新{{subject}}失败"},externalTool:"外部工具",mcp:{running:"正在调用工具 {{tool}}",completed:"已调用工具 {{tool}}",failed:"工具 {{tool}} 调用未完成"},collaboration:{spawn_agent:{running:"正在启动子任务",completed:"子任务已启动",failed:"子任务启动失败"},send_input:{running:"正在向子任务发送信息",completed:"已向子任务发送信息",failed:"向子任务发送信息失败"},wait:{running:"正在等待子任务",completed:"子任务等待已结束",failed:"等待子任务失败"},close_agent:{running:"正在结束子任务",completed:"子任务已结束",failed:"子任务结束失败"},default:{running:"正在协调子任务",completed:"子任务协作已完成",failed:"子任务协作失败"}},webSearch:{running:"正在进行网络搜索",completed:"已完成网络搜索",failed:"网络搜索未完成"},errorDetail:"Codex 执行未完成。",errorTitle:"Codex 执行遇到错误"}},oce={segments:{system:"系统与工具",input:"输入与历史",output:"输出与思考",remaining:"剩余"},modelUnavailable:"模型信息未提供",promptWithSystem:"提示词(含系统)",systemUnknown:"系统与工具占用未知",systemApprox:"系统与工具约 {{count}} Token",ariaKnown:"上下文已使用 {{percentage}}%,{{system}},{{inputLabel}} {{input}} Token,输出与思考 {{output}} Token,剩余 {{remaining}} Token",ariaUnknown:"{{model}},上下文窗口未知,会话累计使用 {{count}} Token",composition:"上下文构成",percentageUsed:"{{percentage}}% 已用",gridAria:"100 格上下文构成图,每格代表上下文窗口的百分之一",estimated:"估算",unknown:"未知",summaryPercentage:"{{used}} 已用,剩余 {{remaining}}",summaryTokens:"{{used}} 已用,剩余 {{remaining}},总计 {{total}}",overflow:"已超出上下文 {{count}} Token",title:"上下文用量",unknownModel:"暂未收录该模型的上下文窗口",unknownRuntime:"当前 Runtime 未提供模型信息"},lce={title:"添加 AgentKit 智能体",noAgents:"连接成功,但该地址未发现任何 Agent(/list-apps 为空)。",connectionFailed:"连接失败:{{error}}。请检查 URL、API Key,以及该网关是否允许跨域。",description:"填入 AgentKit 部署的访问地址与 API Key,将通过 ADK 协议连接,连接成功后其 Agent 会出现在左上角的下拉中。",url:"访问地址 URL",apiKeyHint:"以 Authorization: Bearer 方式连接",displayName:"显示名称(可选)",displayNameHint:"默认取 URL 的主机名",cancel:"取消",connecting:"连接中…",connect:"连接并添加"},cce={placeholder:"输入消息…",inputAria:"输入消息",generating:"正在生成",send:"发送"},uce={ariaLabel:"本轮调用上下文",removeSkill:"移除技能 {{name}}",removeAgent:"移除 Agent {{name}}"},dce={cardAria:"{{label}} 图表",viewAria:"{{label}} 显示方式",preview:"预览",code:"代码",invalidEcharts:"ECharts 配置不是有效且安全的数据对象,请切换到代码检查内容。",renderFailed:"图表暂时无法渲染,请切换到代码检查内容。",echartsAria:"ECharts 图表预览",rendering:"正在渲染图表…",mermaidFailed:"图表暂时无法渲染,请切换到代码查看 Mermaid 内容。",mermaidAria:"Mermaid 图表预览"},fce={playVideo:"点击播放视频:{{name}}",enlargeImage:"放大预览:{{name}}",image:"图片",enlargeVideo:"点击放大视频",videoPreview:"视频预览",downloadVideo:"下载视频",close:"关闭"},hce={annotation:tce,media:nce,runtimeLogs:ice,trace:rce,share:sce,blocks:ace,tokenUsage:oce,addAgentKit:lce,composer:cce,invocation:uce,visualization:dce,markdown:fce},eMe=Object.freeze(Object.defineProperty({__proto__:null,addAgentKit:lce,annotation:tce,blocks:ace,composer:cce,default:hce,invocation:uce,markdown:fce,media:nce,runtimeLogs:ice,share:sce,tokenUsage:oce,trace:rce,visualization:dce},Symbol.toStringTag,{value:"Module"})),pce={back:"返回",cancel:"取消",deploy:"部署",delete:"删除",loading:"读取中…",next:"下一步",notSupported:"暂不支持",previous:"上一步",required:"必填",retry:"重试",actions:"操作",value:"值",disabled:"关闭",enabled:"已开启",none:"无",close:"关闭",name:"名称",description:"描述",send:"发送"},mce={heading:"VeADK Agent 结构配置",importHint:"可在「创建 Agent」页通过「导入 YAML」重新载入。"},gce={agentName:{required:"名称为必填项",reserved:"user 是 Google ADK 保留名称,请使用其他名称",characters:"名称须以英文字母或下划线开头,且只能包含英文字母、数字和下划线"},runtimeName:{required:"Runtime 名称为必填项",characters:"Runtime 名称只能包含英文字母、数字、下划线和连字符",length:"Runtime 名称长度须为 4-64 个字符"}},bce={description:"一个基于 VeADK 构建的智能助手,理解用户意图并调用合适的工具完成任务。",instruction:`你是一个专业、可靠的智能助手。 你的目标是准确理解用户的需求,并给出条理清晰、简洁有用的回答。 约束: - 信息不足时主动提问澄清,不要臆造事实。 - 需要时合理调用可用的工具,并说明关键结论。 -- 保持礼貌、专业的语气。`},vce={requestFailed:"请求失败 ({{status}}){{detail}}",a2aSpaces:{credentialsMissing:"服务端未配置云厂商 AK/SK,无法访问 AgentKit 智能体中心",loginRequired:"请先登录以访问 AgentKit 智能体中心"},vikingKnowledge:{credentialsMissing:"服务端未配置云厂商 AK/SK,无法访问 VikingDB 知识库",loginRequired:"请先登录以访问 VikingDB 知识库"},vikingMemory:{credentialsMissing:"服务端未配置云厂商 AK/SK,无法访问 VikingDB 记忆库",loginRequired:"请先登录以访问 VikingDB 记忆库"},mcpGateway:{missingHttpTool:"请返回“添加 MCP 工具”并添加至少一个 HTTP MCP 服务;MCP 稳定性治理不支持 stdio 服务。",missingUrl:"已添加的 HTTP MCP 工具缺少有效服务地址,请返回“添加 MCP 工具”补充后再发布。"},customModel:{fallbackName:"自定义模型",apiKeyLabel:"{{name}} 模型 API Key"},deploymentEnv:{serverInjected:"由服务端注入",selectedApiKeyPlaceholder:"由所选 API Key 注入",mcpInjectedComment:"由已添加的 MCP 工具注入",restoredPlaceholder:"由 Studio 服务端安全恢复",generatedMcpPlaceholder:"由已添加的 HTTP MCP 工具自动生成",restoredHelp:"更新时由 Studio 服务端合并 MCP 地址与认证,不向浏览器返回旧密钥。",mergedMcpHelp:"Studio 服务端自动合并 MCP 地址与可选认证,不向浏览器返回旧密钥。",listSeparator:"、",requirementHint:"优化项“{{labels}}”依赖此配置。",requiredBy:"优化项“{{labels}}”依赖此配置,请填写 {{key}}。",required:"请填写 {{label}}({{key}})。",invalidJson:"JSON 格式不正确"},drafts:{unsupportedVersion:"本机草稿版本暂不受支持,请升级 Studio 后重试。",invalidFormat:"本机草稿数据格式无效。",readFailed:"无法读取本机草稿,浏览器中的草稿数据可能已损坏。",quotaExceeded:"浏览器存储空间不足,草稿未保存。请删除不需要的草稿或清理此站点的浏览器存储后重试。",writeRejected:"浏览器拒绝保存草稿,请检查站点存储权限后重试。"},skills:{searchFailed:"搜索失败 ({{status}})",downloadFailed:"下载技能失败 ({{status}})",agentKitRequestFailed:"AgentKit Skills 请求失败",missingManifest:"{{location}} 缺少 SKILL.md",invalidParentPath:"{{location}} 包含非法路径(..):{{path}}",invalidPath:"{{location}} 包含非法路径:{{path}}",localDescription:"本地 Skill",folderSource:"文件夹",noManifest:"{{location}} 中未发现 SKILL.md"},zip:{invalid:"无效的 zip:找不到 EOCD",tooManyFiles:"zip 文件数不能超过 {{count}} 个",tooLarge:"zip 解压后的内容过大"}},xce={back:"返回开发会话",runtimeName:"Runtime 名称",runtimeNameExists:"Runtime 名称已存在,请更换后重试",checkingRuntimeName:"正在检查 Runtime 名称",verifiedSource:"已验证源码",deployableSource:"可部署源码",verifiedByCodex:"已通过 Codex 云端验证",entryPoint:"入口",files:"文件",artifact:"构建产物",validationReport:"验证报告",verifiedHint:"源码由服务端从已验证交付物物化,浏览器文件不能替换。",unverifiedHint:"源码已由服务端安全物化,部署前请确认 Runtime 配置。",env:{requiredPlaceholder:"请输入 {{key}}",optionalPlaceholder:"可选:{{key}}"}},Oce={name:"代码包",back:"返回创建方式",reading:"正在读取代码包",readingEllipsis:"正在读取代码包…",uploadFirst:"请先上传代码包",uploadAriaLabel:"代码包上传",upload:"上传代码包",reupload:"重新上传代码包",uploadPrompt:"请上传代码包",filesRecognized:"已识别 {{count}} 个文件,点击区域可重新上传",dropHint:"点击或拖拽上传,支持 .zip 格式,最大 50 MB;可使用 app.py,或由 agentkit.yaml 声明入口",viewFiles:"查看文件",chooseFile:"选择代码包",errors:{invalidFormat:"请选择 .zip 格式的代码包。",tooLarge:"代码包不能超过 50 MB。",invalidPath:"压缩包包含非法路径:{{name}}",empty:"压缩包中没有可部署的文件。",tooManyFiles:"代码包文件数不能超过 {{count}} 个。",duplicateFile:"代码包包含重复文件:{{path}}",manifestParse:"agentkit.yaml 无法解析:{{detail}}",manifestRoot:"agentkit.yaml 根节点必须是对象。",manifestCommon:"agentkit.yaml 的 common 必须是对象。",entryPointType:"agentkit.yaml 的 common.entry_point 必须是文件路径。",entryPointInvalid:"agentkit.yaml 的 common.entry_point 不是有效文件路径。",entryPointMissing:"代码包中不存在 agentkit.yaml 声明的启动入口:{{entryPoint}}",defaultEntryPointMissing:"代码包根目录必须包含 app.py,或在 agentkit.yaml 的 common.entry_point 中声明已有入口。"}},wce={label:"Agent 执行画布",readOnlyLabel:"只读 Agent 执行画布",minimapLabel:"执行流程缩略图",controls:{ariaLabel:"执行流程控制",zoomIn:"放大",zoomOut:"缩小",fitView:"适应视图"},rootAgent:"主 Agent",unnamedStep:"未命名步骤",terminals:{input:"用户请求",output:"最终回复"},edges:{then:"然后",continueLoop:"继续循环",call:"调用"},patterns:{llm:{label:"智能体",description:"理解任务并直接完成一个具体工作"},sequential:{label:"分步协作",description:"内部步骤按照顺序依次执行"},parallel:{label:"同时处理",description:"内部步骤同时工作,完成后统一汇总"},loop:{label:"循环执行",description:"重复执行内部步骤,直到满足停止条件"},a2a:{label:"远程智能体",description:"调用已经存在的远程 Agent"}},actions:{insertHere:"在这里插入步骤",deleteNamed:"删除 {{name}}",deleteNode:"删除节点",addSubagent:"添加子 Agent",addParallelStep:"添加一个同时处理的步骤",addLoopStep:"添加循环步骤",addNextStep:"添加下一个步骤",addFirst:"添加到最前",addLast:"添加到最后"}},Sce={title:"智能模式",subtitle:"描述目标后,沙箱中的 Codex 会判断你的意图,完成构建、调试和临时云端验证。",model:{label:"模型",placeholder:"选择模型",retiring:"即将下线",currentConfiguration:"当前配置",loadError:"加载模型列表失败"},availability:{checking:"正在检查智能开发能力…",unavailable:"当前无法使用智能模式,请返回后重试。"},goal:{title:"从目标开始",continueTitle:"继续优化项目",hint:"只需说明 Agent 要解决的问题;如有影响结果的关键信息,会在开始前向你确认。",continueHint:"说明这次要调整的内容,完成后会保存为新版本。",basedOn:"基于",clearSelection:"取消选择",label:"目标描述",optimizationLabel:"优化目标",placeholder:"例如:创建一个能读取销售数据、生成周报并校验输出格式的 Agent",optimizationPlaceholder:"例如:增加数据来源标注,并在信息不足时先向用户确认"},actions:{preparing:"准备中…",build:"开始构建",optimize:"开始优化"},preparation:{accepted:"目标已收到,马上开始实现",preparing:"正在创建任务环境…",starting:"环境已就绪,正在启动 Codex…",next:"接下来会先梳理目标和实现方式,再编写、运行和验证 Agent。"}},kce={title:"已保存项目",description:"选择已有版本继续优化,或查看、下载和部署源码。",refresh:"刷新项目列表",checkingStorage:"正在检查项目存储…",unavailableTitle:"暂时无法读取项目",storageCheckError:"无法确认项目存储状态,请稍后重试。",storageNotConfigured:"项目存储尚未配置。",loadingMigrated:"正在读取已迁移项目…",loadingSaved:"正在读取已保存项目…",loadingVersions:"正在读取项目版本…",unknownTime:"时间未知",sourceDownloaded:"源码已下载。",projectSummary_one:"{{count}} 个版本 · 更新于 {{time}}",projectSummary_other:"{{count}} 个版本 · 更新于 {{time}}",versionSummary_one:"{{time}} · {{count}} 个文件",versionSummary_other:"{{time}} · {{count}} 个文件",noVersionDescription:"暂无版本描述",latestVersion:"最新版本",verified:"已验证",pendingVerification:"待确认",viewSource:"查看源码",download:"下载",downloading:"下载中…",optimize:"去优化",optimizeUnavailable:"去优化,暂不支持",errors:{projects:"无法读取已保存项目。",source:"无法读取项目源码。",versions:"无法读取项目版本。",download:"下载源码失败。",prepareDeployment:"无法准备部署源码。",deleteVersion:"删除项目版本失败。",migrated:"无法读取已迁移项目",saved:"无法读取已保存项目"},empty:{migratedTitle:"还没有已迁移的项目",savedTitle:"还没有已保存的项目",migratedDescription:"完成首次迁移后,源码会自动保存在这里。",savedDescription:"完成首次构建后,源码会自动保存在这里。",noVersions:"这个项目还没有可用版本。"},compare:{selected:"已选择 {{count}}/2",selectedLabel:"已选择",select:"选择",view:"查看对比",start:"对比版本"},delete:{title:"删除这个版本?",onlyVersion:"“{{name}}”只有这一个版本,删除后项目也会移除。此操作无法撤销。",description:"该版本的源码和验证记录将永久删除,其他版本不受影响。",confirm:"删除版本"}},Ece={title:"选择创建方式",subtitle:"以不同模式构建您的智能体",features:"特性",quick:{title:"快速模式",description:"动态派生子智能体自主完成任务",features:{dynamicSubagents:"动态派生子智能体",autonomousPlanning:"自主规划执行",collaboration:"多智能体协作",summary:"自动汇总结果",skills:"按需调用技能",trace:"任务过程可追踪"}},traditional:{title:"传统模式",description:"高度自定义您的智能体结构",features:{visualConfig:"可视化配置",migration:"存量智能体迁移",debugging:"实时调试",optimization:"可选性能优化",parameters:"精细参数控制"}}},Cce={placeholder:"输入系统提示词;键入 ## 加空格可创建二级标题…",toolbar:{undo:"撤销 {{shortcut}}",redo:"重做 {{shortcut}}",paragraph:"正文",quote:"引用",heading:"标题 {{level}}",selectBlockType:"选择文本类型",blockType:"文本类型",bold:"加粗",removeBold:"取消加粗",italic:"斜体",removeItalic:"取消斜体",bulletedList:"无序列表",numberedList:"有序列表"}},Tce={local:{duplicatesSkipped:"已跳过重复技能:{{names}}",invalidDrop:"请拖入包含 SKILL.md 的文件夹或一个 .zip 文件",readError:"读取失败:{{detail}}",dropLabel:"拖入文件夹或 ZIP,自动识别 Skill",hint:"每个技能需包含 SKILL.md。支持包含多个技能的目录。",reading:"正在读取文件…",fileCount:"本地 · {{count}} 个文件"},hub:{searchError:"搜索失败,请稍后重试。",searchPlaceholder:"搜索火山 Find Skill 技能广场,例如 数据分析、PDF…",search:"搜索",searching:"正在搜索…",noResults:"没有找到匹配的技能,换个关键词试试。",hint:"输入关键词搜索火山 Find Skill 技能广场,所选技能会在生成项目时下载到 skills/ 目录。"},space:{loadError:"加载失败",loadingSpaces:"正在加载 AgentKit Skills 中心…",noSpaces:"此账号下没有 AgentKit Skills 中心。",selectSpace:"选择 AgentKit Skills 中心",openConsole:"在火山引擎控制台打开",loadingSkills:"正在加载技能列表…",noSkills:"此 AgentKit Skills 中心暂无技能。"}},Ace={unnamedNode:"未命名节点",editInstruction:"点击编辑指令…",controls:{ariaLabel:"工作流画布控制",zoomIn:"放大",zoomOut:"缩小",fitView:"适应视图"},sections:{info:"工作流信息",execution:"执行方式",nodes:"节点",nodeConfig:"节点配置"},types:{sequential:{label:"顺序",description:"节点依次执行"},parallel:{label:"并行",description:"节点同时执行"},loop:{label:"循环",description:"节点循环执行"}},placeholders:{description:"这个工作流做什么…",agentDescription:"这个 Agent 做什么…",instruction:"你是一个…"},errors:{workflowNameUnique:"名称须与 Agent 节点名称保持唯一",agentNameUnique:"Agent 名称在当前工作流中必须唯一"},dragHint:"拖拽到画布,或点击下方按钮添加",agentNode:"Agent 节点",addNode:"添加节点",connectHint:"拖拽节点的圆点连线以表达执行顺序。",create:"创建工作流",deleteNode:"删除节点",nameHelp:"仅使用英文字母、数字和下划线,且名称保持唯一。",instruction:"指令 (instruction)",tools:"工具 (逗号分隔)",nodeId:"节点 ID",empty:{selectNode:"选择一个节点以编辑其配置",summary:"共 {{nodes}} 个节点 · {{edges}} 条连线"}},_ce={ariaLabel:"快速模式创建",progress:"快速模式创建进度",steps:{agent:{label:"智能体",title:"基本信息",description:"设置智能体的名称、用途、行为方式与能力"},environment:{label:"执行环境",title:"配置执行环境",description:"选择默认环境或已构建的自定义环境"},deployment:{label:"部署偏好",title:"部署偏好",description:"定义 AgentKit 云上参数"}},model:{label:"模型",source:"模型来源",name:"模型名称",provider:"服务商 Provider",volcengineArk:"火山方舟",custom:"自定义",gateway:"模型网关",comingSoon:"待上线",currentApiKey:"当前 API Key",loadingApiKeys:"正在加载 API Key",selectApiKey:"选择 API Key",searchApiKeys:"搜索 API Key 名称",noApiKeys:"暂无可用 API Key",loadingModels:"正在加载模型",selectModel:"选择模型",searchModels:"搜索名称、Model ID 或服务商",noModels:"没有可用的模型",apiKeyPlaceholder:"请输入模型 API Key",credentialsLoadError:"模型凭据加载失败",modelsLoadError:"模型列表加载失败"},identity:{unnamedPool:"未命名用户池",currentPool:"{{value}}(当前用户池)",userPool:"用户池",loading:"正在加载用户池",placeholder:"请选择用户池",search:"搜索用户池",empty:"当前账号下暂无 Identity 用户池",currentHint:"当前 Studio 的登录 JWT 将透传访问此 Runtime",mismatchHint:"所选用户池不是当前 Studio 使用的用户池,部署后无法从 Studio 调用此 Runtime",selectionHint:"当前 Studio 使用的用户池已在列表中标注"},agent:{namePlaceholder:"输入智能体名称",descriptionPlaceholder:"说明这个智能体可以做什么",prompt:"提示词",promptPlaceholder:"定义角色、目标和行为边界",skills:"技能",addSkill:"添加技能"},validation:{descriptionRequired:"请输入描述",promptRequired:"请输入提示词",modelRequired:"请选择模型",instanceIntegers:"最小实例数必须为大于等于 0 的整数,最大实例数必须为大于 0 的整数",instanceOrder:"最小实例数不能大于最大实例数",userPoolRequired:"请选择用于 Runtime 鉴权的用户池"},deployment:{runtimeName:"Runtime 名称",runtimeNameUpdateHint:"更新时保持现有 Runtime 名称不变",runtimeNameHint:"仅支持英文字母、数字、下划线和连字符",region:"发布区域",authentication:"鉴权方式",apiKeyDescription:"默认方式,使用 Runtime API Key 访问",userPoolDescription:"使用 Identity 用户池签发的 JWT",sessionStorage:"会话存储",inMemoryStorage:"In-memory 临时存储",backends:{sqlite:"SQLite 文件",mysql:"MySQL",postgresql:"PostgreSQL"},instances:"实例设置",minInstances:"最小实例数",maxInstances:"最大实例数",inMemoryHint:"为避免多实例间会话丢失,推荐将 Runtime 固定为 1~1",networkMode:"网络模式",network:{public:"公网",private:"私网",both:"公网与私网"},subnetIds:"子网 ID(可选,多个用逗号分隔)",sharedInternet:"VPC 内共享公网出口",sharedInternetHint:"允许私网 Runtime 通过共享出口访问公网",evaluationSets:"评测集",createEvaluationSets:"自动创建评测集",evaluationSetsHint:"部署成功后自动创建 Good Case 和 Bad Case 评测集",resources:"资源配置",complete:"部署已完成",preparing:"正在准备部署…"},environmentVariables:{title:"环境变量",add:"添加变量",nameAriaLabel:"环境变量名称",valueAriaLabel:"{{name}} 的值",deleteNamed:"删除 {{name}}"},actions:{updateAgain:"再次更新",deployAgain:"重新部署",updateAndPublish:"更新并发布"}},Nce={actions:{addSubagent:"添加子 Agent",clearRoot:"清空根 Agent",clearRootConfirmation:"清空根 Agent 的全部配置和子 Agent?此操作无法撤销。"},workspace:{progress:"Agent 创建进度",modes:{build:"架构",validate:"调试",optimize:"优化",environment:"环境",publish:"发布"},titles:{build:"个性化您的智能体架构",validate:"调试您的智能体",optimize:"为您的智能体选择优化项",environment:"配置云上环境",publish:"准备好部署您的智能体"}},sections:{type:{label:"Agent 类型",hint:"选择 Agent 类型"},basic:{label:"基本信息",hint:"名称、描述与系统提示词"},model:{label:"模型配置",hint:"模型与服务(可选)"},tools:{label:"工具",hint:"可调用的能力"},skills:{label:"技能",hint:"声明式技能"},knowledge:{label:"知识库",hint:"外部知识检索"},memory:{label:"记忆",hint:"短期与长期记忆"},subagents:{label:"子 Agent",hint:"嵌套协作"},review:{label:"完成",hint:"预览并创建"}},agentTypes:{ariaLabel:"Agent 类型",remoteChildOnly:"远程智能体只能作为子步骤使用",llm:{label:"智能体",fullLabel:"LLM 智能体",description:"大模型驱动,自主完成任务"},sequential:{label:"分步协作",fullLabel:"顺序型智能体",description:"子 Agent 按顺序依次执行"},parallel:{label:"同时处理",fullLabel:"并行型智能体",description:"子 Agent 并行执行后汇总"},loop:{label:"循环执行",fullLabel:"循环型智能体",description:"子 Agent 循环执行到满足条件"},a2a:{label:"远程智能体",fullLabel:"远程 Agent",description:"通过 A2A 协议调用远程 Agent"}},basic:{agentName:"Agent 名称",name:"名称",agentDescription:"智能体描述",descriptionPlaceholder:"简要描述这个 Agent 的用途,便于团队识别…",nameHelp:"遵循 Google ADK 命名规则,且在执行流程中保持唯一。",rootDescriptionHelp:"完整描述会保留;部署时会自动整理为符合 Runtime 规范的单行描述。",descriptionHelp:"描述会显示在 Agent 列表与选择器中。",orchestratorHelp:"这是一个协作容器,本身不生成回答。请在左侧画布中添加任务步骤,并通过拖拽调整它们的位置。",maxIterations:"最大轮次",maxIterationsHelp:"循环编排反复执行子 Agent,直到满足条件或达到该轮次上限。",agentCenter:"AgentKit 智能体中心",agentCenterHelp:"远程 Agent 的名称、描述和能力来自中心返回的 Agent Card。系统会根据每轮任务动态发现并挂载匹配的 Agent。",moreOptions:"更多选项",systemPrompt:"系统提示词",loadingMarkdown:"正在加载 Markdown 编辑器…",markdownHelp:"支持 Markdown 快捷输入,例如键入 ## 加空格创建二级标题。",unnamed:"未命名",unnamedAgent:"未命名智能体"},validation:{remoteRoot:"远程 Agent 只能作为子 Agent",missingRegistry:"请选择 AgentKit 智能体中心",name:{required:"名称为必填项",reserved:"user 是 Google ADK 保留名称,请使用其他名称",characters:"名称须以英文字母或下划线开头,且只能包含英文字母、数字和下划线"},duplicateName:"Agent 名称在当前结构中必须唯一",missingDescription:"描述为必填项",mcpAuthRequired:"MCP 地址变化后需要确认认证方式",missingSubagent:"缺少子 Agent",missingPrompt:"系统提示词为必填项",missingSubagentDetail:"{{type}}至少需要添加一个子 Agent 后才能调试或发布。",problem:"{{name}}:{{problem}}"},ai:{ariaLabel:"AI 自动填写 Agent 配置",minimumLength:"请至少输入 {{count}} 个字符。",replaceConfirmation:"生成的新配置会替换当前画布和属性,确定继续吗?",placeholder:"描述目标,使用 {{model}} 模型一键生成配置",generate:"智能生成",generating:"正在智能生成",success:"生成成功",regenerate:"重新生成",failed:"智能生成失败"},debug:{ariaLabel:"智能体调试工作区",unavailable:"当前后端暂不支持生成 Agent 调试运行。",baseline:"基准组",comparison:"对照组 {{count}}",selectModel:"请选择模型",enterDescription:"请输入描述",enterPrompt:"请输入系统提示词",duplicateConfiguration:"测试配置不能重复",starting:"启动中…",applyAndRestart:"应用并重启",restart:"重新启动",start:"启动环境",defaultModel:"默认模型",testConfiguration:"测试配置",deleteVariant:"删除 {{name}}",deleteVariantGroup:"删除对照组",creatingEnvironment:"正在创建测试环境…",configurationChanged:"配置已变更,请重新启动环境。",ready:"环境已就绪",readyHint:"发送消息以比较智能体回复。",startHint:"先完善配置,再启动环境。",viewTraceNamed:"查看 {{name}} 的调用链路",traceUnavailable:"发送消息后可查看调用链路",trace:"调用链路",useConfiguration:"使用此配置",finishConfiguration:"完成配置",finishAndStart:"完成并启动",currentAgentModel:"当前 Agent 模型",configurationHint:"修改仅用于本次对比,选择使用后才会进入部署流程。",messagePlaceholder:"向已启动的测试环境发送消息…",startOneFirst:"请先启动至少一个测试环境",addVariant:"添加对照组",traceTitle:"调用链路 · {{name}}",leaveTitle:"离开调试?",leaveDescription:"离开调试页面后,当前环境将被清理。您可以通过重新启动环境进行新的测试。",cleaning:"清理中…",confirmLeave:"确定离开",closeLeaveConfirmation:"关闭离开调试确认"},optimization:{ariaLabel:"智能体优化选项",scenario:"优化场景",components:"优化组件",bytePlusUnavailable:"BytePlus 账号暂不支持 Harness Sidecar 优化项。请保持优化项为空后继续部署,普通 BytePlus 智能体不受影响。",releaseScenario:"优化场景:{{profile}}",profiles:{default:{label:"自定义",description:"按需选择组件,不勾选时不启动 Sidecar。"},ops:{label:"运维场景",description:"适用于运维诊断、数据库、日志和监控 MCP。"}},groups:{quality:"提升回答质量",cost:"降低运行成本",stability:"增强运行稳定性"},options:{context_engine:{label:"上下文治理",description:"治理上下文组装、任务锚定和上下文预算。"},compressor:{label:"上下文与结果压缩",description:"压缩长上下文和大型工具结果,降低 Token 成本。"},verifier:{label:"回答校验与修复",description:"校验证据和回答,在失败时执行修复或告警。"},long_run_control:{label:"Goal 任务控制",description:"管理 Goal 任务的进度、续跑和结束条件。"},mcp_resilience:{label:"MCP 稳定性治理",description:"治理连接、超时、空结果、大返回和调用预算;默认包含 SQL 只读保护。"}}},model:{label:"模型",source:"模型来源",volcanoArk:"火山方舟",volcengineArk:"火山方舟",bytePlusModelArk:"BytePlus ModelArk",custom:"自定义",gateway:"模型网关",comingSoon:"待上线",configuration:"模型配置",name:"模型名称",provider:"服务商 Provider",liteLlmProviders:"LiteLLM 支持列表",apiKeyPlaceholder:"请输入模型 API Key",available:"已开通",retiring:"即将下线",notActivated:"未开通",unavailable:"暂不可用",apiKeyLoadError:"加载 Ark API Key 失败",loadingApiKeys:"正在加载 API Key…",selectApiKey:"选择 API Key",currentApiKey:"当前 API Key",apiKeyList:"API Key 列表",searchApiKey:"搜索 API Key",searchApiKeyName:"搜索 API Key 名称",noApiKeys:"暂无可用 API Key",noMatchingApiKey:"没有匹配的 API Key",loading:"正在加载模型…",loaded:"已加载 {{count}} 个模型",loadError:"加载模型失败",selectModel:"选择模型",selectProviderModel:"选择服务商模型",providerModels:"服务商模型",search:"搜索模型",searchPlaceholder:"搜索名称、Model ID 或服务商",noMatches:"没有匹配的模型",empty:"暂无可用模型",unknownStatus:"未知状态",refresh:"刷新",refreshing:"刷新中…",activate:"开通",activateAction:"前往开通",currentConfiguration:"当前配置"},tools:{builtIn:"内置工具",builtInHelp:"勾选 VeADK 提供的内置能力,生成时会自动补全 import 与所需环境变量。",codeExecution:"代码执行配置",codeExecutionHelp:"指定 AgentKit 代码执行沙箱。",mcp:"MCP 工具"},catalog:{web_search:{label:"联网搜索",description:"火山引擎 Web Search,获取实时信息。"},parallel_web_search:{label:"并行联网搜索",description:"并行发起多条搜索查询,更快汇总。"},link_reader:{label:"网页读取",description:"抓取并阅读给定链接的正文内容。"},web_scraper:{label:"网页爬取",description:"结构化爬取网页(需要 Scraper 服务)。"},image_generate:{label:"图像生成",description:"文生图(Doubao Seedream)。"},image_edit:{label:"图像编辑",description:"图生图 / 编辑(Doubao SeedEdit)。"},video_generate:{label:"视频生成",description:"文/图生视频(Doubao Seedance),含任务查询。"},text_to_speech:{label:"语音合成 (TTS)",description:"把文本转成语音(火山语音)。"},run_code:{label:"代码执行",description:"在沙箱中执行代码。"},vesearch:{label:"VeSearch 智能搜索",description:"火山 VeSearch(需要 bot 端点)。"},links:{console:"控制台",documentation:"文档"},env:{modelAgentName:{comment:"模型名称"},embeddingModelName:{comment:"向量化模型(记忆/知识库需要)"},vikingMemoryProject:{comment:"VikingDB 记忆库项目"},vikingMemoryRegion:{comment:"VikingDB 记忆库地域"},vikingMemoryType:{comment:"记忆类型"},feishuAppId:{comment:"飞书应用 App ID"},feishuAppSecret:{comment:"飞书应用 App Secret",placeholder:"输入 App Secret"},registrySpaceId:{comment:"AgentKit 智能体中心",placeholder:"请选择智能体中心"},registryTopK:{comment:"召回 Agent 数量"},registryRegion:{comment:"AgentKit 智能体中心地域"},registryEndpoint:{comment:"AgentKit 智能体中心 OpenAPI 地址"},agentKitToolId:{comment:"代码执行沙箱 ID"},agentKitToolRegion:{comment:"AgentKit Tools 地域"},openVikingUrl:{comment:"OpenViking 服务地址"},openVikingMemoryUserId:{comment:"记忆归属 ID",help:"对应 viking://user/<此值>/peers/<请求用户>/memories 中的 user 段;用于隔离 Agent、租户或业务场景,默认 default。"},openVikingMemoryPolicy:{comment:"记忆策略",help:"记忆的抽取策略和隔离策略,不填写时使用官方默认策略。"},openVikingKnowledgeUserId:{comment:"知识库归属 ID",help:"未配置资源目录时用于默认路径 viking://user/<此值>/resources/<知识库索引>/,默认 default。"},openVikingTargetUri:{comment:"知识库资源目录",help:"留空时由 KnowledgeBase index 自动生成;填写后直接检索该 OpenViking 资源目录,优先级最高。"},tlsServiceName:{comment:"TLS topic_id,留空自动创建"}}},backends:{shortTerm:{local:{label:"本地内存",description:"进程内,不持久化。适合开发调试。"},sqlite:{label:"SQLite 文件",description:"持久化到本地 .db 文件。"},mysql:{label:"MySQL",description:"持久化到 MySQL。"},postgresql:{label:"PostgreSQL",description:"持久化到 PostgreSQL。"}},longTerm:{local:{label:"本地向量库",description:"进程内 llama-index 向量库。"},opensearch:{label:"OpenSearch",description:"OpenSearch 向量检索。"},redis:{label:"Redis",description:"Redis 向量检索。"},viking:{label:"VikingDB Memory",description:"VikingDB 记忆库(支持用户画像)。"},openviking:{label:"OpenViking Memory",description:"OpenViking 长期记忆,按用户维度保存和检索偏好、事件与实体。"},mem0:{label:"Mem0",description:"Mem0 托管记忆服务。"}},knowledge:{viking:{label:"VikingDB Knowledge",description:"VikingDB 知识库。"},opensearch:{label:"OpenSearch",description:"OpenSearch 向量检索。"},context_search:{label:"Context Search",description:"火山 Context Search 引擎(无需向量化)。"},openviking:{label:"OpenViking Knowledge",description:"OpenViking 资源目录知识库,无需向量化模型配置。"}}},exporters:{apmplus:{label:"APMPlus",description:"火山 APMPlus 应用性能监控。"},cozeloop:{label:"CozeLoop",description:"扣子 CozeLoop 链路观测。"},tls:{label:"TLS (日志服务)",description:"火山 TLS 日志服务导出。"}},knowledge:{title:"知识库",description:"启用外部知识检索(RAG),让 Agent 基于你的资料作答。",backend:"知识库后端",vikingDatabase:"VikingDB 知识库"},memory:{shortTerm:"短期记忆",shortTermDescription:"存储单会话上下文",shortTermBackend:"短期记忆后端",longTerm:"长期记忆",longTermDescription:"存储跨会话上下文,通常使用向量化检索",longTermBackend:"长期记忆后端",vikingDatabase:"VikingDB 记忆库",autoSave:"自动保存会话到长期记忆",autoSaveDescription:"会话结束时自动把内容写入长期记忆,无需手动调用。"},mcp:{removeTool:"删除 MCP 工具",namePlaceholder:"名称(可选)",urlPlaceholder:"MCP 服务地址",pathWarning:"此地址没有路径,请确认它是完整的 MCP 服务地址。",configuredPlaceholder:"已安全保存认证信息",tokenPlaceholder:"Bearer Token(可选)",changedUrlWarning:"MCP 地址已变化,请确认如何处理已保存的认证信息。",reuseCredential:"继续使用",replaceCredential:"替换认证",noAuth:"不使用认证",reuseHint:"发布时将继续使用已保存的认证信息。",changeToReplace:"改为替换",credentialConfigured:"认证信息已由 Studio 安全保存。",removeCredential:"移除认证",commandPlaceholder:"命令,例如 npx",argsPlaceholder:"参数,以空格分隔",stdioHint:"stdio 工具在部署环境中启动,请确保命令和依赖可用。",addTool:"添加 MCP 工具"},resources:{unnamedAgentCenter:"未命名智能体中心",unnamedKnowledgeBase:"未命名知识库",unnamedMemory:"未命名记忆库",loadError:"加载失败",loadingAgentCenters:"正在加载智能体中心…",agentCentersLoaded:"已加载 {{count}} 个智能体中心",noAgentCenters:"暂无智能体中心",noMatchingAgentCenters:"没有匹配的智能体中心",searchAgentKitCenter:"搜索 AgentKit 智能体中心",searchNameOrId:"搜索名称或 ID",selectAgentCenter:"选择智能体中心",selectAgentKitCenter:"选择 AgentKit 智能体中心",selectedAgentCenter:"已选智能体中心",agentKitCenter:"AgentKit 智能体中心",refreshAgentCenters:"刷新智能体中心",knowledgeBaseList:"知识库列表",knowledgeBasePlaceholder:"选择知识库",loadingKnowledgeBases:"正在加载知识库…",knowledgeBasesLoaded:"已加载 {{count}} 个知识库",noKnowledgeBases:"暂无知识库",noMatchingKnowledgeBases:"没有匹配的知识库",searchKnowledgeBase:"搜索知识库",selectKnowledgeBase:"选择知识库",refreshKnowledgeBases:"刷新知识库",memoryList:"记忆库列表",memoryPlaceholder:"选择记忆库",loadingMemories:"正在加载记忆库…",memoriesLoaded:"已加载 {{count}} 个记忆库",noMemories:"暂无记忆库",noMatchingMemories:"没有匹配的记忆库",searchMemory:"搜索记忆库",selectMemory:"选择记忆库",refreshMemories:"刷新记忆库"},env:{noAdditionalParameters:"此后端无需额外运行参数。",invalidJson:"请输入有效的 JSON。",helpAriaLabel:"{{label}}说明:{{help}}",openOpenViking:"打开 OpenViking {{label}}",valuePlaceholder:"请输入参数值",openVikingIndex:"OpenViking 资源索引",openVikingIndexHelp:"默认值:留空;生成项目时使用 Agent 名自动生成,例如 my_agent_kb。未配置 DATABASE_OPENVIKING_TARGET_URI 时,默认 URI 拼接为 viking://user/{知识库归属 ID,未填则 default}/resources/{资源索引}/;如果填写了 DATABASE_OPENVIKING_TARGET_URI,则直接使用该完整 URI。",openVikingIndexAriaLabel:"OpenViking 资源索引说明:{{help}}"},deployment:{vpcRequired:"使用 VPC 网络时,请填写 VPC ID。",apiKeyRequired:"请先选择模型使用的 API Key。",invalidEnvName:"环境变量名称不合法:{{key}}",requiredEnv:"{{name}}:请填写必填环境变量",generatingConfiguration:"正在生成部署配置",runtimeNameExists:"Runtime 名称已存在,请修改后重试。",preparing:"准备部署",complete:"部署完成",failed:"部署失败",updateAndPublish:"更新并发布",stages:{build:"构建镜像",deploy:"部署 Runtime",publish:"发布服务",running:"部署中"}},publish:{generating:"正在生成发布配置",validating:"校验 Agent 结构并准备部署快照…"}},jce={presets:{support:{name:"客服助手",description:"7×24 在线答疑,结合知识库与历史对话,稳定、礼貌地解决用户问题。",instruction:"你是一名专业、耐心的客服助手。请始终保持礼貌、友好的语气,优先依据知识库中的资料回答用户问题;当资料不足以确定答案时,如实告知用户并主动引导其提供更多信息,切勿编造。回答尽量简洁、分点清晰,必要时给出操作步骤。",subagents:{}},analyst:{name:"数据分析师",description:"运行代码完成统计与可视化,开启链路追踪,分析过程可观测、可复现。",instruction:"你是一名严谨的数据分析师。面对数据问题时,先厘清分析目标与口径,再通过编写并运行代码完成清洗、统计与可视化。每一步都要说明你的假设与方法,给出结论时附上关键数据支撑,并指出潜在的偏差与局限。",subagents:{}},translator:{name:"翻译助手",description:"中英互译,忠实、通顺、地道,保留原文语气与专业术语。",instruction:"你是一名专业的翻译助手,精通中英互译。请在忠实于原文含义的前提下,使译文自然、地道、符合目标语言表达习惯;保留专有名词与专业术语的准确性,并尽量贴合原文的语气与风格。仅输出译文,除非用户额外要求解释。",subagents:{}},coder:{name:"代码助手",description:"编写、调试与重构代码,可运行代码验证结果,给出清晰可维护的实现。",instruction:"你是一名资深软件工程师。请根据需求编写正确、清晰、可维护的代码,遵循目标语言的惯用风格与最佳实践。在不确定时通过运行代码验证你的实现,给出关键的边界条件与测试思路,并对复杂逻辑附上简要注释。",subagents:{}},researcher:{name:"研究员",description:"联网检索一手资料,结合知识库与长期记忆,输出有据可查的研究结论。",instruction:"你是一名严谨的研究员。面对研究问题时,先拆解关键子问题,再通过联网检索收集多个一手、可信的来源,交叉验证后再下结论。结论需注明出处与不确定性,区分事实与推断,避免以偏概全。",subagents:{}},"research-team":{name:"多智能体研究团队",description:"由检索员、分析员、撰写员协作的研究编排,分工完成端到端调研报告。",instruction:"你是一支研究团队的总协调者。负责拆解用户的研究任务,将检索、分析、撰写分别委派给对应的子 Agent,汇总各子 Agent 的产出,把控整体质量,最终输出结构清晰、有据可查的研究报告。",subagents:{0:{name:"检索员",description:"联网搜集与课题相关的一手资料与数据。",instruction:"你是研究团队中的检索员。根据课题联网检索多个可信来源,整理出关键事实、数据与原文出处,交付给分析员,不做主观结论。"},1:{name:"分析员",description:"对检索到的材料做交叉验证与归纳分析。",instruction:"你是研究团队中的分析员。对检索员提供的材料做交叉验证、归纳与对比,提炼洞见、识别矛盾与不确定性,形成结构化的分析要点。"},2:{name:"撰写员",description:"将分析结论组织为结构清晰、引用规范的报告。",instruction:"你是研究团队中的撰写员。把分析员的要点组织成结构清晰、语言通顺、引用规范的研究报告,确保每个结论都能追溯到来源。"}}}},tags:{tools:"工具",memory:"记忆",knowledgeBase:"知识库",tracing:"观测",subagents:"子 Agent {{count}}"},gallery:{title:"从模板新建",subtitle:"选择一个预制 Agent 模板,按需微调后即可创建。"},detail:{back:"返回模板列表",name:"名称",systemPrompt:"系统提示词",model:"模型",tools:"工具",memory:"记忆",knowledgeBase:"知识库",tracing:"观测追踪",subagents:"子 Agent({{count}})",create:"使用此模板创建",shortTermMemory:"短期",longTermMemory:"长期"}},Rce={common:mce,yaml:gce,validation:bce,defaults:yce,helpers:vce,intelligentDeployment:xce,codePackage:Oce,buildCanvas:wce,intelligent:Sce,projectLibrary:kce,modePicker:Ece,promptEditor:Cce,skills:Tce,workflow:Ace,workbench:_ce,traditional:Nce,template:jce},eMe=Object.freeze(Object.defineProperty({__proto__:null,buildCanvas:wce,codePackage:Oce,common:mce,default:Rce,defaults:yce,helpers:vce,intelligent:Sce,intelligentDeployment:xce,modePicker:Ece,projectLibrary:kce,promptEditor:Cce,skills:Tce,template:jce,traditional:Nce,validation:bce,workbench:_ce,workflow:Ace,yaml:gce},Symbol.toStringTag,{value:"Module"})),Ice={backToList:"返回定时任务列表",cancel:"取消",cancelQueue:"取消排队",cancelQueueFirst:"请先取消排队",cancelling:"取消中…",closeDrawer:"关闭抽屉",collapse:"收起",connectingRuntime:"正在连接 Runtime…",createScheduledTask:"创建定时任务",createTask:"创建任务",delete:"删除",deleteTask:"删除任务",edit:"编辑",enable:"启用",expand:"展开",pause:"暂停",refresh:"刷新",refreshHistory:"刷新执行历史",rerun:"重新执行",retry:"重试",runNow:"立即执行",saveChanges:"保存更改",saving:"保存中…",stop:"终止执行",stopRun:"终止本次执行",stopRunFirst:"请先终止当前执行",stopping:"终止中…",viewDetails:"查看详情"},Pce={cancelDescription:"本次 Session 将被取消,后续计划不会暂停。",cancelTitle:"终止本次执行?",deleteDescription:"“{{name}}”及其全部执行历史将被永久删除。",deleteTitle:"删除定时任务?"},Dce={configuration:"任务配置",nextRun:"下次执行",pageLabel:"定时任务详情",region:"地域",runtime:"运行时",status:"任务状态"},Mce={createTitle:"创建定时任务",description:"每次触发都会为 Runtime Agent 创建独立 Session。",editTitle:"编辑定时任务"},Lce={minutesSeconds:"{{minutes}} 分 {{seconds}} 秒",seconds:"{{count}} 秒"},$ce={cronExpression:"Cron 表达式",cronHelp:"依次填写分钟、小时、日期、月份、星期。",dailyTime:"每天执行时间",enableAfterCreate:"创建后启用",enableHelp:"启用后会从下一个计划时间开始执行。",name:"任务名称",namePlaceholder:"例如:每日生成运营摘要",noRuntime:"暂无可用 Runtime",prompt:"执行文本",promptPlaceholder:"输入每次执行时发送给 Agent 的固定文本",runAt:"执行时间",runtimeAgent:"运行时智能体",runtimeHelp:"任务始终跟随该 Runtime 当前生效版本。",runtimePlaceholder:"选择 Runtime Agent",schedule:"执行计划",scheduleType:"执行计划类型",timezone:"时区",weekday:"星期"},Fce={all:"全部"},Bce={description:"每次运行均使用独立 Session,结果与错误会永久保留。",duration:"耗时 {{duration}}",emptyDescription:"任务触发或立即执行后,记录会显示在这里。",emptyTitle:"暂无执行记录",errorDetails:"错误详情",finalAnswer:"最终回答",loadFailed:"无法加载执行历史",loadFailedDescription:"请检查 Studio 服务后重试。",session:"会话",title:"执行历史"},Uce={cancelRequested:"已提交终止请求。",created:"任务已创建。",deleted:"任务及其执行历史已删除。",enabled:"任务已启用。",paused:"任务已暂停。",queued:"任务已排队,将在一分钟内开始执行。",requeued:"任务已重新排队,将在一分钟内开始执行。",updated:"任务已更新。"},Qce={filterLabel:"定时任务状态筛选",listLabel:"定时任务列表",loadFailed:"无法加载定时任务",loadFailedDescription:"请检查 Studio 服务后重试。",title:"定时任务"},zce={cron:"Cron {{cron}}{{zone}}",daily:"每天 {{time}}{{zone}}",once:"一次 · {{date}}{{zone}}",weekly:"{{weekday}} {{time}}{{zone}}"},Vce={daily:"每天",once:"一次性",weekly:"每周"},Hce={cancelled:"已取消",enabled:"已启用",failed:"失败",notRun:"尚未执行",paused:"已暂停",pending:"准备中",queued:"已排队",retrying:"自动重试中",running:"执行中",skipped:"已跳过",success:"成功"},qce={cronFields:"Cron 表达式需要包含 5 个字段,例如 0 9 * * *。",nameRequired:"请输入任务名称。",promptRequired:"请输入每次执行时发送给 Agent 的文本。",runtimeAppMissing:"Runtime Agent 未返回可调用的 appName,请确认 Runtime 已就绪且版本兼容。",runtimeRequired:"请选择可用的 Runtime Agent。",timeRequired:"请选择执行时间。"},Wce={friday:"周五",monday:"周一",saturday:"周六",sunday:"周日",thursday:"周四",tuesday:"周二",wednesday:"周三"},tMe={actions:Ice,confirm:Pce,detail:Dce,drawer:Mce,duration:Lce,fields:$ce,filters:Fce,history:Bce,notices:Uce,page:Qce,schedule:zce,scheduleTypes:Vce,status:Hce,validation:qce,weekdays:Wce},nMe=Object.freeze(Object.defineProperty({__proto__:null,actions:Ice,confirm:Pce,default:tMe,detail:Dce,drawer:Mce,duration:Lce,fields:$ce,filters:Fce,history:Bce,notices:Uce,page:Qce,schedule:zce,scheduleTypes:Vce,status:Hce,validation:qce,weekdays:Wce},Symbol.toStringTag,{value:"Module"})),Kce="问题反馈",Gce="问题描述",Xce="常见问题",Yce="取消",Zce="完成",Jce="提交反馈",eue="正在上报…",tue={title:"上报成功,感谢您的反馈",description:"AgentKit 团队会尽快查看您提交的问题。"},nue={close:"关闭问题反馈",intro:"请选择遇到的问题,也可以补充具体表现。",privacy:"您的对话数据将会上报到 AgentKit 团队,请注意隐私保护。",descriptionPlaceholder:"请描述问题发生时的表现(选填)",issues:{slow:"执行速度慢",crash:"运行崩溃",incorrect:"结果不准确",tool_error:"工具调用失败",other:"其他问题"}},iue={description:"告诉我们您在使用 AgentKit Studio 时遇到的问题。",module:"所属模块",modules:{conversation:"对话",agents:"智能体",applications:"自动化",search:"搜索",other:"其他"},commonIssuesMultiple:"常见问题(可多选)",issueTypes:"问题类型",issues:{page_slow:"页面加载慢",feature_unavailable:"功能无法使用",display_error:"页面显示异常",no_response:"操作无响应",other:"其他问题"},descriptionPlaceholder:"请描述问题发生时的页面、操作和表现",quickAdd:"快捷补充",suggestionsLabel:"问题描述推荐",suggestions:{noResponse:"点击后没有反应",loading:"页面一直处于加载状态",incomplete:"部分内容显示不完整",error:"操作后出现错误提示"},privacy:"您的数据将会上报到 AgentKit 团队,请注意隐私保护。"},iMe={title:Kce,descriptionLabel:Gce,commonIssues:Xce,cancel:Yce,done:Zce,submit:Jce,submitting:eue,success:tue,dialog:nue,page:iue},rMe=Object.freeze(Object.defineProperty({__proto__:null,cancel:Yce,commonIssues:Xce,default:iMe,descriptionLabel:Gce,dialog:nue,done:Zce,page:iue,submit:Jce,submitting:eue,success:tue,title:Kce},Symbol.toStringTag,{value:"Module"})),rue={back:"返回",close:"关闭"},sue={title:"优化迁移项目",closeAria:"关闭优化窗口"},aue={title:"已迁移项目",description:"管理迁移后的源码版本,也可以选择任一版本继续优化。",libraryTitle:"项目与版本",libraryDescription:"查看、下载、部署或对比源码版本,也可以基于任一版本继续优化。",emptyTitle:"还没有已迁移的项目",emptyDescription:"迁移完成后,源码会自动保存在这里。"},oue={langchain:"LangChain",langgraph:"LangGraph",adk:"Google ADK",strands:"Strands",agentcore:"AgentCore",dify:"Dify",any:"Any(通用迁移)"},lue={awaitingUpload:"待上传",analyzing:"分析中",needsInput:"待补充",analysisReady:"待确认",migrating:"迁移中",validating:"校验中",packaging:"打包中",succeeded:"已完成",succeededWithWarnings:"已完成,有提示",partial:"部分完成",failed:"失败",cancelled:"已终止",expired:"已过期"},cue={partialReady:"迁移产物已生成,但交付不完整,请查看迁移提示。",readyWithWarnings:"迁移产物已生成,请查看迁移提示。",ready:"迁移产物已生成。"},uue={passed:"产物校验通过",failed:"产物校验未通过",degraded:"产物校验未完成"},due={session:"创建迁移环境",upload:"上传项目",analysis:"分析项目"},fue={agentNameRequired:"请输入 Agent 名称",agentNameInvalid:"Agent 名称必须为 1-63 位,只能包含小写字母、数字和连字符,且必须以字母或数字开头和结尾"},hue={seconds:"{{seconds}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒"},pue={savedUnaffected:"已保存项目不受影响",savingUnaffected:"源码正在保存,完成后不受环境期限影响",activeDetail:"到期后任务记录和临时产物将无法访问",oneHour:"临时迁移环境保留 1 小时",ended:"临时迁移环境已结束",savedAvailable:"已保存项目仍可查看、下载、部署或优化",unavailable:"任务记录和临时产物已无法访问",countdown:"临时迁移环境将在 {{minutes}} 分 {{seconds}} 秒后结束",expiredSavedMessage:"临时迁移环境已结束,已保存项目不受影响。",expiredMessage:"临时迁移环境已结束,任务记录和临时产物无法继续访问。"},mue={recommended:"建议迁移方式",scope:"迁移范围",excluded:"不在本次范围",viewEvidence:"查看分析证据",viewAssumptions:"查看关键假设",viewSourceEvidence:"查看源码证据"},gue={ariaLabel:"Codex 执行动态",title:"Codex 执行动态",startingAnalysis:"Codex 正在开始分析…",startingMigration:"Codex 正在开始迁移…",loadError:"暂时无法读取 Codex 执行动态,不影响当前任务。"},bue={title:"迁移产物",fileTooLarge:"该文件超过 2 MiB,请下载完整产物后查看。",unsupportedPreview:"该文件不支持在线预览,请下载完整产物后查看。",filesAria:"迁移产物文件",searchAria:"搜索产物文件",searchPlaceholder:"搜索文件",limit:"仅展示前 {{count}} 项,请搜索具体文件。",noSelection:"未选择文件",noPreview:"暂无可预览文件。",loadingFile:"正在读取产物文件…",startupFile:"启动文件",fileCountLabel:"文件数",saved:"源码已保存,可继续查看、下载、部署或优化。",saving:"产物已生成,正在保存源码版本。",deployReady:"产物可预览、下载和部署,正在等待源码保存状态。",deployUnavailable:"产物可预览和下载,但当前交付状态不支持部署。",viewProjects:"查看已迁移项目",downloading:"下载中…",downloadZip:"下载 ZIP",deployTitle:"部署迁移产物",deployUnavailableTitle:"当前交付状态不支持部署",deployRuntime:"部署到 Runtime",fileCount:"{{count}} 个文件",startup:"启动文件 {{module}}",loading:"正在读取迁移产物…"},yue={retiring:"即将下线",currentDefault:"当前默认模型",loadError:"加载模型列表失败",label:"模型",placeholder:"选择模型"},vue={zipOnly:"请选择 .zip 格式的本地项目文件。",invalidName:"ZIP 文件名无效,请重命名后重新选择。",tooLarge:"项目 ZIP 不能超过 {{size}}。",empty:"项目 ZIP 不能为空。",removeAria:"移除项目 ZIP",reselectPrompt:"重新选择项目 ZIP",selectPrompt:"选择或拖入本地项目 ZIP",reselect:"重新选择",selectZip:"选择 ZIP",continue:"继续上传",start:"开始迁移",inputAria:"选择本地项目 ZIP",retention:"临时迁移环境从创建完成起保留 1 小时;保存成功的源码版本不受影响。"},xue={requiredPlaceholder:"请输入 {{key}}",optionalPlaceholder:"可选:{{key}}",notReady:"迁移产物尚未准备完成。",back:"返回迁移结果"},Oue={backToAddAgent:"返回添加 Agent",title:"从存量迁移",newMigration:"新建迁移",recent:"最近迁移",sessionsAria:"迁移会话",loadingSessions:"正在读取迁移会话…",noSessions:"暂无迁移会话",heading:"迁移存量 Agent 项目",intro:"上传本地项目 ZIP,Codex 将先进行只读分析,再由你确认迁移方式。"},wue={stop:"终止迁移",stopping:"正在终止…",reload:"重新读取",refreshStatus:"刷新状态"},Sue={unavailable:"迁移能力暂不可用",defaultReason:"Dev Sandbox 暂不可用,请联系管理员检查配置。"},kue={requestZip:"请提供本地项目 ZIP。上传后我会识别框架、入口和迁移边界,并在执行实际迁移前请你确认迁移方式。",zipHint:"仅支持本地 ZIP,最大 {{size}};迁移环境从创建起保留 1 小时。",creatingSandbox:"正在创建 Dev Sandbox",initializing:"正在初始化迁移工作目录,并检查 AgentKit CLI、Codex 和迁移能力。环境就绪后将自动上传项目。",elapsed:"已等待 {{duration}}",uploadThenAnalyze:"ZIP 上传完成后将自动开始只读分析。",analyzing:"Codex 正在识别框架、入口和迁移边界,不会执行实际迁移。",migrationLocked:"迁移执行中不能修改附件或迁移方式。你可以等待当前任务结束,或主动终止。",analysisPaused:"只读分析已暂停。请仅回答下面列出的问题,提交后会在同一迁移环境中重新分析,不会开始实际迁移。",analysisComplete:"只读分析已完成。请检查建议,并确认最终迁移方式。",awaitingUpload:"迁移环境已创建,请重新选择本地 ZIP 继续上传。",expiredTitle:"迁移环境已过期",expiredDescription:"迁移内容和产物已无法预览、下载或部署。如已完成 Runtime 部署,可返回智能体页面继续使用。",unsupportedTitle:"当前 ZIP 暂时无法迁移",unsupportedHint:"请按提示整理项目后,新建迁移并重新上传。",failedTitle:"迁移未完成",cancelled:"当前迁移已终止。你可以新建迁移并重新上传项目。"},Eue={ariaLabel:"补充项目分析信息",title:"补充分析所需信息",description:"附件保持锁定,提交后仅继续只读分析",submitting:"正在继续分析…",submit:"提交并继续分析"},Cue={ariaLabel:"确认迁移方式",title:"确认迁移方式",description:"确认后才会执行实际迁移",framework:"迁移方式",frameworkPlaceholder:"选择迁移方式",agentName:"Agent 名称",entry:"项目入口",entryPlaceholder:"选择项目入口",entryExample:"例如 agent.py:agent",consent:"点击“确认并开始迁移”即确认上述迁移范围、排除项和关键假设。",starting:"正在启动迁移…",start:"确认并开始迁移"},Tue={closeAria:"关闭错误提示",loadFailed:"无法读取迁移数据,请重试。",refreshFailed:"无法刷新迁移状态,请重试。"},Aue={title:"终止当前迁移?",description:"终止后,当前分析或迁移进程将停止,已执行的步骤不会继续。"},sMe={common:rue,optimization:sue,projects:aue,framework:oue,state:lue,task:cue,verification:uue,transfer:due,validation:fue,duration:hue,expiry:pue,analysis:mue,activity:gue,artifact:bue,model:yue,upload:vue,deployment:xue,workspace:Oue,actions:wue,capability:Sue,conversation:kue,questions:Eue,confirmation:Cue,errors:Tue,stopDialog:Aue},aMe=Object.freeze(Object.defineProperty({__proto__:null,actions:wue,activity:gue,analysis:mue,artifact:bue,capability:Sue,common:rue,confirmation:Cue,conversation:kue,default:sMe,deployment:xue,duration:hue,errors:Tue,expiry:pue,framework:oue,model:yue,optimization:sue,projects:aue,questions:Eue,state:lue,stopDialog:Aue,task:cue,transfer:due,upload:vue,validation:fue,verification:uue,workspace:Oue},Symbol.toStringTag,{value:"Module"})),_ue={loading:"加载中…",searchLabel:"搜索{{label}}",searchPlaceholder:"搜索{{label}}",retry:"重试",noMatches:"没有匹配项",noOptions:"暂无可选项",selection:"{{label}}:{{value}}"},Nue={badge:"焕然一新",view:"查看新特性",title:"本次更新",defaultNotes:{multiRegion:"多地域智能体:并行加载北京与上海 Runtime,列表下滑即可继续加载。",switchAgent:"会话内切换:在输入框旁选择智能体,并直接开启一段新会话。",visualCanvas:"可视化执行画布:通过横向画布查看多智能体结构,并支持全屏浏览。"}},jue={label:"新会话模式",agent:"智能体",skill:"技能定制",video:"视频创作"},Rue={select:"选择新会话模式",agent:{label:"Agent",description:"与当前选择的 Agent 对话"},builtin:{label:"内置智能体",description:"使用平台提供的智能体"},codex:{label:"Codex 智能体",description:"在沙箱中执行任务"},deepseekHarness:{label:"DeepSeek Harness",description:"打开 DeepSeek Harness 工作区"},arkClaw:"ArkClaw",hermes:"Hermes 智能体",checking:"正在检查配置",notConfigured:"管理员未配置",unavailable:"暂不可用"},Iue={select:"选择智能体",typesLabel:"智能体类型",listLabel:"{{type}}列表",types:{agent:"智能体",general:"通用智能体",codex:"Codex 智能体",deepseekHarness:"DeepSeek Harness",openclaw:"OpenClaw 智能体",hermes:"Hermes 智能体"},loading:"正在加载智能体",reload:"重新加载",empty:"暂无{{type}}",emptyLocal:"暂无本地智能体",emptyGeneral:"暂无通用智能体",createHint:"请前往智能体页创建",localHint:"请检查当前 Studio 启动目录",waking:"正在唤醒",opening:"正在打开",connecting:"正在连接",loadingMore:"加载中",loadMore:"加载更多",runtimeTimeout:"加载智能体超时(15 秒),请检查网络或 Runtime 服务后重试",loadGeneral:"加载通用智能体",loadType:"加载 {{type}}",connectGeneral:"连接通用智能体",openLocal:"打开本地智能体",openType:"打开 {{type}}"},Pue={spaceAria:"技能空间",configuration:"技能定制配置",actions:{create:"技能生成",optimize:"技能优化"},selectAction:"选择技能定制方式",actionList:"技能定制方式",style:"风格",selectStyle:"选择风格",model:"模型",selectModel:"选择模型",styles:{concise:"简洁实用",strict:"严谨稳健",tutorial:"教程友好",automation:"自动化优先"},modelLoadFailed:"模型配置加载失败",spaceLoadFailed:"Skill Space 加载失败",skillLoadFailed:"Skill 加载失败",unnamedSpace:"未命名 Skill Space",space:"技能空间",select:"选择 Skill",selectAria:"选择 Skill:{{skill}}",loadingSpaces:"正在加载 Skill Space",reload:"重新加载",emptySpaces:"暂无 Skill Space",skillList:"{{space}} Skill 列表",loadingSkills:"正在加载 Skill",emptySkills:"暂无 Skill"},Due={modes:{auto:"自动识别",text_to_video:"文生视频",reference_to_video:"参考素材生视频",video_editing:"视频编辑",video_extension:"视频续写",first_last_frame:"首尾帧生成"},taskNames:{auto:"视频生成",text_to_video:"文生视频",reference_to_video:"参考素材生视频",video_editing:"视频编辑",video_extension:"视频续写",first_last_frame:"首尾帧生成"},controls:{label:"视频创作配置",aspectRatio:"比例",selectAspectRatio:"选择比例",resolution:"清晰度",selectResolution:"选择清晰度",duration:"时长",durationShort:"{{count}} 秒",durationAria:"视频时长:{{count}} 秒",lastFrame:"尾帧",lastFrameHelper:"添加视频结束画面",assistImage:"辅助图片",referenceImage:"参考图片",assistImageHelper:"用于补充画面参考",imageHelper:"支持常见图片格式",referenceVideo:"参考视频",videoHelper:"支持常见视频格式",optional:"可选",replace:"更换",add:"添加",upload:"上传{{label}}",replaceFile:"更换{{label}}:{{name}}",removeFile:"移除{{label}} {{name}}",storageUnavailable:"管理员未配置持久化存储",loadingEnhancer:"正在加载增强模型",enhancerHint:"使用 {{model}} 模型进行意图识别和提示词增强",enhancerUnavailable:"增强模型不可用"},task:{title:"视频生成任务",closeAria:"关闭视频生成任务弹窗",progressAria:"视频生成进度",optimizedPrompt:"优化后的提示词",processingAria:"{{task}}处理进度",waitingAria:"{{status}},已等待{{elapsed}}",elapsed:"已等待 {{elapsed}}",previewAria:"生成结果预览",close:"关闭",download:"下载视频",retryOptimization:"重试提示词优化",retryGeneration:"重试视频生成",providerQueued:"等待模型调度",providerRunning:"模型生成中",providerSubmitting:"正在提交任务",queuedHint:"任务已提交,模型开始处理后状态会自动更新",runningHint:"这可能持续数分钟,完成后将在这里显示视频预览",backgroundHint:"可以关闭弹窗,任务会继续在后台运行",successHint:"视频已生成,可预览或下载",activationHint:"请先在模型控制台开通服务,再重试生成",retryHint:"修正问题后可重试当前步骤",steps:{optimizationFailed:"提示词优化失败",optimizationDone:"提示词优化完成",optimizationActive:"提示词优化中",generationDone:"{{task}}已完成",generationFailed:"{{task}}失败",generationQueued:"{{task}}排队中",generationRunning:"{{task}}生成中",generationActive:"{{task}}进行中",generationPending:"等待视频生成",generationComplete:"视频生成完成"},elapsedHours:"{{hours}}小时{{minutes}}分",elapsedMinutes:"{{minutes}}分{{seconds}}秒",elapsedSeconds:"{{seconds}}秒"}},Mue={compactSelect:_ue,featureNotice:Nue,workspace:jue,mode:Rue,agentPicker:Iue,skill:Pue,video:Due},oMe=Object.freeze(Object.defineProperty({__proto__:null,agentPicker:Iue,compactSelect:_ue,default:Mue,featureNotice:Nue,mode:Rue,skill:Pue,video:Due,workspace:jue},Symbol.toStringTag,{value:"Module"})),Lue={cancel:"取消",close:"关闭",retry:"重试",tryAgain:"重新尝试",closeDialog:"关闭{{title}}",agentFallback:"{{agent}} 智能体",unknownSource:"未知来源"},$ue={terminalTitle:"终端",browserTitle:"沙箱浏览器",terminalSubtitle:"连接当前 AgentKit Session 的交互式终端",browserSubtitle:"在当前 AgentKit Session 中查看与操作浏览器",connecting:"正在连接…",connected:"已连接",notConnected:"尚未连接",opening:"正在打开 {{title}}",connectingSession:"工具正在连接当前 AgentKit Session。",openFailed:"{{title}} 打开失败"},Fue={title:"恢复 Codex 对话",subtitle:"选择当前 Sandbox Session 中最近更新的 Thread",loading:"正在读取历史对话",loadFailed:"历史对话读取失败",empty:"暂无可恢复的对话"},Bue={title:"Codex 权限",subtitle:"设置会保存到当前 Sandbox Session,并同步到其中的所有 Thread",sandboxMode:"沙箱模式",approvalPolicy:"审批策略",approvalMethod:"审批方式",networkAccess:"允许网络访问",networkAccessHelp:"控制 workspace-write 与只读模式中的外部网络访问。",fullAccessWarning:"完全访问会关闭文件系统与网络隔离,请只在可信任务中使用。",save:"保存权限",sandboxChoices:{readOnly:{label:"只读",detail:"允许读取文件,不允许写入工作空间。"},workspaceWrite:{label:"工作区写入",detail:"允许在当前工作空间内读取与修改文件。"},fullAccess:{label:"完全访问",detail:"不启用沙箱隔离,适合明确可信的任务。"}},approvalChoices:{untrusted:{label:"仅不可信命令",detail:"只对 Codex 判断为不可信的操作发起审批。"},onRequest:{label:"按需审批",detail:"Codex 可在必要时请求你确认命令或文件修改。"},never:{label:"不审批",detail:"Codex 不会暂停并请求人工批准。"}},reviewerChoices:{user:{label:"由我审批",detail:"审批请求会显示在 Studio 中,由你决定。"},autoReview:{label:"自动审查",detail:"使用 Codex 自动审查流程处理审批请求。"}}},Uue={title:"工作空间",subtitle:"选择当前 Codex Thread 执行命令与修改文件的目录",absolutePath:"绝对路径",browse:"浏览",parent:"上一级",empty:"当前目录没有子目录",locked:"当前对话已经开始,工作空间已锁定。新建 Sandbox 会话后可重新选择。",useDirectory:"使用此目录"},Que={fileTitle:"允许修改文件?",commandTitle:"允许执行命令?",subtitle:"Codex 正在等待你的决定",workingDirectory:"执行目录",decline:"拒绝",acceptOnce:"仅本次允许",acceptSession:"本会话允许"},zue={availableSkills:"可用 Skills",selectModel:"选择模型",commands:"Codex 快捷命令",currentModel:"当前:{{model}}",loadingSkills:"正在发现当前工作区的 Skills…",loadingModels:"正在读取模型…",noSkillMatches:"当前工作区没有匹配的 Skill",noModelMatches:"没有匹配模型,也可以直接输入模型 ID",noCommandMatches:"没有匹配的快捷命令",skillFallback:"加载并执行该 Skill",add:"添加",uploadImage:"上传图片",uploadDocument:"上传文档或 PDF",uploadVideo:"上传视频",openTerminal:"进入终端",viewBrowser:"查看浏览器",permissions:"Codex 权限",workspaceLocked:"对话已开始,工作空间已锁定",selectWorkspace:"选择工作空间",workspace:"Codex 工作空间",endpointCopied:"Endpoint 已复制",copyEndpoint:"复制 Sandbox Endpoint",continuePlaceholder:"继续说明你想实现或调整的内容",messagePlaceholder:"向 AgentKit 沙箱发送消息,输入 / 查看命令,输入 $ 调用 Skill…",stop:"停止生成",send:"发送"},Vue={defaultName:"我的智能体",namedDefault:"我的 {{agent}}",creatingTitle:"正在创建 {{agent}} 智能体",failedTitle:"启动失败",createTitle:"创建 {{agent}} 智能体",fallbackError:"AgentKit 沙箱初始化失败,请稍后重新尝试。",creatingDescription:"正在创建并等待 {{agent}} 智能体就绪,这通常需要半分钟",name:"智能体名称",storageSize:"存储大小",storageHelp:"数据将持久化保存,可设置 {{min}}–{{max}} GiB。",persistent:"持久化",persistenceUnsupported:"当前环境不支持快照持久化",persistentHelp:"保留智能体数据,后续可继续使用。",temporaryHelp:"智能体将在 8 小时后清空",cancelCreation:"取消创建",confirm:"确认创建",retry:"重新尝试"},Hue={activeAria:"Codex 智能体会话已开启",openAria:"开启 Codex 智能体会话",active:"Codex 智能体会话中",entry:"灵光一现",exit:"退出当前智能体",expired:"已到期",remainingHours:"剩余 {{hours}} 小时 {{minutes}} 分钟",remainingMinutes:"剩余 {{minutes}} 分钟",expiryWarning:"远端开发环境最长保留 8 小时,将于 {{expiry}} 到期({{remaining}});到期后清除对话和文件。",usingAgent:"当前您在使用 {{agent}} 智能体",activityAria:"Sandbox 操作记录",activity:"操作记录",tokenUsageAria:"Codex Token 用量",tokens:"{{label}}:{{value}} tokens",tokenLabels:{total:"总计",input:"输入",cachedInput:"缓存输入",output:"输出",reasoningOutput:"推理输出"}},que={back:"返回智能体列表",subtitle:"{{agent}} AgentKit Session 详情",type:"智能体类型",status:"状态",createdBy:"创建人",snapshotStatus:"快照状态",toolType:"工具类型",createdAt:"创建时间",snapshotReason:"快照原因",expiresAt:"过期时间",snapshotId:"快照 ID",sessionId:"会话 ID",sourceSessionId:"来源 Session ID",delete:"删除智能体",waking:"唤醒中…",opening:"打开中…",wake:"唤醒智能体",open:"打开智能体",deleteTitle:"删除智能体?",deleteDescription:"将删除“{{name}}”及其 AgentKit {{resource}},此操作无法撤销。",deleting:"删除中…",confirmDelete:"确认删除"},Wue={back:"返回智能体列表",createdBy:"创建人 {{creator}}",ariaLabel:"智能体工作区",main:"主界面",terminal:"终端",mainTitle:"{{agent}} 主界面",openingTerminal:"正在打开终端…",terminalTitle:"{{agent}} 终端"},Kue={prompt:`使用 AgentKit Studio Plugin 端云接力当前会话、项目和任务。请直接执行,不要让我手动打开终端。 +- 保持礼貌、专业的语气。`},yce={requestFailed:"请求失败 ({{status}}){{detail}}",a2aSpaces:{credentialsMissing:"服务端未配置云厂商 AK/SK,无法访问 AgentKit 智能体中心",loginRequired:"请先登录以访问 AgentKit 智能体中心"},vikingKnowledge:{credentialsMissing:"服务端未配置云厂商 AK/SK,无法访问 VikingDB 知识库",loginRequired:"请先登录以访问 VikingDB 知识库"},vikingMemory:{credentialsMissing:"服务端未配置云厂商 AK/SK,无法访问 VikingDB 记忆库",loginRequired:"请先登录以访问 VikingDB 记忆库"},mcpGateway:{missingHttpTool:"请返回“添加 MCP 工具”并添加至少一个 HTTP MCP 服务;MCP 稳定性治理不支持 stdio 服务。",missingUrl:"已添加的 HTTP MCP 工具缺少有效服务地址,请返回“添加 MCP 工具”补充后再发布。"},customModel:{fallbackName:"自定义模型",apiKeyLabel:"{{name}} 模型 API Key"},deploymentEnv:{serverInjected:"由服务端注入",selectedApiKeyPlaceholder:"由所选 API Key 注入",mcpInjectedComment:"由已添加的 MCP 工具注入",restoredPlaceholder:"由 Studio 服务端安全恢复",generatedMcpPlaceholder:"由已添加的 HTTP MCP 工具自动生成",restoredHelp:"更新时由 Studio 服务端合并 MCP 地址与认证,不向浏览器返回旧密钥。",mergedMcpHelp:"Studio 服务端自动合并 MCP 地址与可选认证,不向浏览器返回旧密钥。",listSeparator:"、",requirementHint:"优化项“{{labels}}”依赖此配置。",requiredBy:"优化项“{{labels}}”依赖此配置,请填写 {{key}}。",required:"请填写 {{label}}({{key}})。",invalidJson:"JSON 格式不正确"},drafts:{unsupportedVersion:"本机草稿版本暂不受支持,请升级 Studio 后重试。",invalidFormat:"本机草稿数据格式无效。",readFailed:"无法读取本机草稿,浏览器中的草稿数据可能已损坏。",quotaExceeded:"浏览器存储空间不足,草稿未保存。请删除不需要的草稿或清理此站点的浏览器存储后重试。",writeRejected:"浏览器拒绝保存草稿,请检查站点存储权限后重试。"},skills:{searchFailed:"搜索失败 ({{status}})",downloadFailed:"下载技能失败 ({{status}})",agentKitRequestFailed:"AgentKit Skills 请求失败",missingManifest:"{{location}} 缺少 SKILL.md",invalidParentPath:"{{location}} 包含非法路径(..):{{path}}",invalidPath:"{{location}} 包含非法路径:{{path}}",localDescription:"本地 Skill",folderSource:"文件夹",noManifest:"{{location}} 中未发现 SKILL.md"},zip:{invalid:"无效的 zip:找不到 EOCD",tooManyFiles:"zip 文件数不能超过 {{count}} 个",tooLarge:"zip 解压后的内容过大"}},vce={back:"返回开发会话",runtimeName:"Runtime 名称",runtimeNameExists:"Runtime 名称已存在,请更换后重试",checkingRuntimeName:"正在检查 Runtime 名称",verifiedSource:"已验证源码",deployableSource:"可部署源码",verifiedByCodex:"已通过 Codex 云端验证",entryPoint:"入口",files:"文件",artifact:"构建产物",validationReport:"验证报告",verifiedHint:"源码由服务端从已验证交付物物化,浏览器文件不能替换。",unverifiedHint:"源码已由服务端安全物化,部署前请确认 Runtime 配置。",env:{requiredPlaceholder:"请输入 {{key}}",optionalPlaceholder:"可选:{{key}}"}},xce={name:"代码包",back:"返回创建方式",reading:"正在读取代码包",readingEllipsis:"正在读取代码包…",uploadFirst:"请先上传代码包",uploadAriaLabel:"代码包上传",upload:"上传代码包",reupload:"重新上传代码包",uploadPrompt:"请上传代码包",filesRecognized:"已识别 {{count}} 个文件,点击区域可重新上传",dropHint:"点击或拖拽上传,支持 .zip 格式,最大 50 MB;可使用 app.py,或由 agentkit.yaml 声明入口",viewFiles:"查看文件",chooseFile:"选择代码包",errors:{invalidFormat:"请选择 .zip 格式的代码包。",tooLarge:"代码包不能超过 50 MB。",invalidPath:"压缩包包含非法路径:{{name}}",empty:"压缩包中没有可部署的文件。",tooManyFiles:"代码包文件数不能超过 {{count}} 个。",duplicateFile:"代码包包含重复文件:{{path}}",manifestParse:"agentkit.yaml 无法解析:{{detail}}",manifestRoot:"agentkit.yaml 根节点必须是对象。",manifestCommon:"agentkit.yaml 的 common 必须是对象。",entryPointType:"agentkit.yaml 的 common.entry_point 必须是文件路径。",entryPointInvalid:"agentkit.yaml 的 common.entry_point 不是有效文件路径。",entryPointMissing:"代码包中不存在 agentkit.yaml 声明的启动入口:{{entryPoint}}",defaultEntryPointMissing:"代码包根目录必须包含 app.py,或在 agentkit.yaml 的 common.entry_point 中声明已有入口。"}},Oce={label:"Agent 执行画布",readOnlyLabel:"只读 Agent 执行画布",minimapLabel:"执行流程缩略图",controls:{ariaLabel:"执行流程控制",zoomIn:"放大",zoomOut:"缩小",fitView:"适应视图"},rootAgent:"主 Agent",unnamedStep:"未命名步骤",terminals:{input:"用户请求",output:"最终回复"},edges:{then:"然后",continueLoop:"继续循环",call:"调用"},patterns:{llm:{label:"智能体",description:"理解任务并直接完成一个具体工作"},sequential:{label:"分步协作",description:"内部步骤按照顺序依次执行"},parallel:{label:"同时处理",description:"内部步骤同时工作,完成后统一汇总"},loop:{label:"循环执行",description:"重复执行内部步骤,直到满足停止条件"},a2a:{label:"远程智能体",description:"调用已经存在的远程 Agent"}},actions:{insertHere:"在这里插入步骤",deleteNamed:"删除 {{name}}",deleteNode:"删除节点",addSubagent:"添加子 Agent",addParallelStep:"添加一个同时处理的步骤",addLoopStep:"添加循环步骤",addNextStep:"添加下一个步骤",addFirst:"添加到最前",addLast:"添加到最后"}},wce={title:"智能模式",subtitle:"描述目标后,沙箱中的 Codex 会判断你的意图,完成构建、调试和临时云端验证。",model:{label:"模型",placeholder:"选择模型",retiring:"即将下线",currentConfiguration:"当前配置",loadError:"加载模型列表失败"},availability:{checking:"正在检查智能开发能力…",unavailable:"当前无法使用智能模式,请返回后重试。"},goal:{title:"从目标开始",continueTitle:"继续优化项目",hint:"只需说明 Agent 要解决的问题;如有影响结果的关键信息,会在开始前向你确认。",continueHint:"说明这次要调整的内容,完成后会保存为新版本。",basedOn:"基于",clearSelection:"取消选择",label:"目标描述",optimizationLabel:"优化目标",placeholder:"例如:创建一个能读取销售数据、生成周报并校验输出格式的 Agent",optimizationPlaceholder:"例如:增加数据来源标注,并在信息不足时先向用户确认"},actions:{preparing:"准备中…",build:"开始构建",optimize:"开始优化"},preparation:{accepted:"目标已收到,马上开始实现",preparing:"正在创建任务环境…",starting:"环境已就绪,正在启动 Codex…",next:"接下来会先梳理目标和实现方式,再编写、运行和验证 Agent。"}},Sce={title:"已保存项目",description:"选择已有版本继续优化,或查看、下载和部署源码。",refresh:"刷新项目列表",checkingStorage:"正在检查项目存储…",unavailableTitle:"暂时无法读取项目",storageCheckError:"无法确认项目存储状态,请稍后重试。",storageNotConfigured:"项目存储尚未配置。",loadingMigrated:"正在读取已迁移项目…",loadingSaved:"正在读取已保存项目…",loadingVersions:"正在读取项目版本…",unknownTime:"时间未知",sourceDownloaded:"源码已下载。",projectSummary_one:"{{count}} 个版本 · 更新于 {{time}}",projectSummary_other:"{{count}} 个版本 · 更新于 {{time}}",versionSummary_one:"{{time}} · {{count}} 个文件",versionSummary_other:"{{time}} · {{count}} 个文件",noVersionDescription:"暂无版本描述",latestVersion:"最新版本",verified:"已验证",pendingVerification:"待确认",viewSource:"查看源码",download:"下载",downloading:"下载中…",optimize:"去优化",optimizeUnavailable:"去优化,暂不支持",errors:{projects:"无法读取已保存项目。",source:"无法读取项目源码。",versions:"无法读取项目版本。",download:"下载源码失败。",prepareDeployment:"无法准备部署源码。",deleteVersion:"删除项目版本失败。",migrated:"无法读取已迁移项目",saved:"无法读取已保存项目"},empty:{migratedTitle:"还没有已迁移的项目",savedTitle:"还没有已保存的项目",migratedDescription:"完成首次迁移后,源码会自动保存在这里。",savedDescription:"完成首次构建后,源码会自动保存在这里。",noVersions:"这个项目还没有可用版本。"},compare:{selected:"已选择 {{count}}/2",selectedLabel:"已选择",select:"选择",view:"查看对比",start:"对比版本"},delete:{title:"删除这个版本?",onlyVersion:"“{{name}}”只有这一个版本,删除后项目也会移除。此操作无法撤销。",description:"该版本的源码和验证记录将永久删除,其他版本不受影响。",confirm:"删除版本"}},kce={title:"选择创建方式",subtitle:"以不同模式构建您的智能体",features:"特性",quick:{title:"快速模式",description:"动态派生子智能体自主完成任务",features:{dynamicSubagents:"动态派生子智能体",autonomousPlanning:"自主规划执行",collaboration:"多智能体协作",summary:"自动汇总结果",skills:"按需调用技能",trace:"任务过程可追踪"}},traditional:{title:"传统模式",description:"高度自定义您的智能体结构",features:{visualConfig:"可视化配置",migration:"存量智能体迁移",debugging:"实时调试",optimization:"可选性能优化",parameters:"精细参数控制"}}},Ece={placeholder:"输入系统提示词;键入 ## 加空格可创建二级标题…",toolbar:{undo:"撤销 {{shortcut}}",redo:"重做 {{shortcut}}",paragraph:"正文",quote:"引用",heading:"标题 {{level}}",selectBlockType:"选择文本类型",blockType:"文本类型",bold:"加粗",removeBold:"取消加粗",italic:"斜体",removeItalic:"取消斜体",bulletedList:"无序列表",numberedList:"有序列表"}},Cce={local:{duplicatesSkipped:"已跳过重复技能:{{names}}",invalidDrop:"请拖入包含 SKILL.md 的文件夹或一个 .zip 文件",readError:"读取失败:{{detail}}",dropLabel:"拖入文件夹或 ZIP,自动识别 Skill",hint:"每个技能需包含 SKILL.md。支持包含多个技能的目录。",reading:"正在读取文件…",fileCount:"本地 · {{count}} 个文件"},hub:{searchError:"搜索失败,请稍后重试。",searchPlaceholder:"搜索火山 Find Skill 技能广场,例如 数据分析、PDF…",search:"搜索",searching:"正在搜索…",noResults:"没有找到匹配的技能,换个关键词试试。",hint:"输入关键词搜索火山 Find Skill 技能广场,所选技能会在生成项目时下载到 skills/ 目录。"},space:{loadError:"加载失败",loadingSpaces:"正在加载 AgentKit Skills 中心…",noSpaces:"此账号下没有 AgentKit Skills 中心。",selectSpace:"选择 AgentKit Skills 中心",openConsole:"在火山引擎控制台打开",loadingSkills:"正在加载技能列表…",noSkills:"此 AgentKit Skills 中心暂无技能。"}},Tce={unnamedNode:"未命名节点",editInstruction:"点击编辑指令…",controls:{ariaLabel:"工作流画布控制",zoomIn:"放大",zoomOut:"缩小",fitView:"适应视图"},sections:{info:"工作流信息",execution:"执行方式",nodes:"节点",nodeConfig:"节点配置"},types:{sequential:{label:"顺序",description:"节点依次执行"},parallel:{label:"并行",description:"节点同时执行"},loop:{label:"循环",description:"节点循环执行"}},placeholders:{description:"这个工作流做什么…",agentDescription:"这个 Agent 做什么…",instruction:"你是一个…"},errors:{workflowNameUnique:"名称须与 Agent 节点名称保持唯一",agentNameUnique:"Agent 名称在当前工作流中必须唯一"},dragHint:"拖拽到画布,或点击下方按钮添加",agentNode:"Agent 节点",addNode:"添加节点",connectHint:"拖拽节点的圆点连线以表达执行顺序。",create:"创建工作流",deleteNode:"删除节点",nameHelp:"仅使用英文字母、数字和下划线,且名称保持唯一。",instruction:"指令 (instruction)",tools:"工具 (逗号分隔)",nodeId:"节点 ID",empty:{selectNode:"选择一个节点以编辑其配置",summary:"共 {{nodes}} 个节点 · {{edges}} 条连线"}},Ace={ariaLabel:"快速模式创建",progress:"快速模式创建进度",steps:{agent:{label:"智能体",title:"基本信息",description:"设置智能体的名称、用途、行为方式与能力"},environment:{label:"执行环境",title:"配置执行环境",description:"选择默认环境或已构建的自定义环境"},deployment:{label:"部署偏好",title:"部署偏好",description:"定义 AgentKit 云上参数"}},model:{label:"模型",source:"模型来源",name:"模型名称",provider:"服务商 Provider",volcengineArk:"火山方舟",custom:"自定义",gateway:"模型网关",comingSoon:"待上线",currentApiKey:"当前 API Key",loadingApiKeys:"正在加载 API Key",selectApiKey:"选择 API Key",searchApiKeys:"搜索 API Key 名称",noApiKeys:"暂无可用 API Key",loadingModels:"正在加载模型",selectModel:"选择模型",searchModels:"搜索名称、Model ID 或服务商",noModels:"没有可用的模型",apiKeyPlaceholder:"请输入模型 API Key",credentialsLoadError:"模型凭据加载失败",modelsLoadError:"模型列表加载失败"},identity:{unnamedPool:"未命名用户池",currentPool:"{{value}}(当前用户池)",userPool:"用户池",loading:"正在加载用户池",placeholder:"请选择用户池",search:"搜索用户池",empty:"当前账号下暂无 Identity 用户池",currentHint:"当前 Studio 的登录 JWT 将透传访问此 Runtime",mismatchHint:"所选用户池不是当前 Studio 使用的用户池,部署后无法从 Studio 调用此 Runtime",selectionHint:"当前 Studio 使用的用户池已在列表中标注"},agent:{namePlaceholder:"输入智能体名称",descriptionPlaceholder:"说明这个智能体可以做什么",prompt:"提示词",promptPlaceholder:"定义角色、目标和行为边界",skills:"技能",addSkill:"添加技能"},validation:{descriptionRequired:"请输入描述",promptRequired:"请输入提示词",modelRequired:"请选择模型",instanceIntegers:"最小实例数必须为大于等于 0 的整数,最大实例数必须为大于 0 的整数",instanceOrder:"最小实例数不能大于最大实例数",userPoolRequired:"请选择用于 Runtime 鉴权的用户池"},deployment:{runtimeName:"Runtime 名称",runtimeNameUpdateHint:"更新时保持现有 Runtime 名称不变",runtimeNameHint:"仅支持英文字母、数字、下划线和连字符",region:"发布区域",authentication:"鉴权方式",apiKeyDescription:"默认方式,使用 Runtime API Key 访问",userPoolDescription:"使用 Identity 用户池签发的 JWT",sessionStorage:"会话存储",inMemoryStorage:"In-memory 临时存储",backends:{sqlite:"SQLite 文件",mysql:"MySQL",postgresql:"PostgreSQL"},instances:"实例设置",minInstances:"最小实例数",maxInstances:"最大实例数",inMemoryHint:"为避免多实例间会话丢失,推荐将 Runtime 固定为 1~1",networkMode:"网络模式",network:{public:"公网",private:"私网",both:"公网与私网"},subnetIds:"子网 ID(可选,多个用逗号分隔)",sharedInternet:"VPC 内共享公网出口",sharedInternetHint:"允许私网 Runtime 通过共享出口访问公网",evaluationSets:"评测集",createEvaluationSets:"自动创建评测集",evaluationSetsHint:"部署成功后自动创建 Good Case 和 Bad Case 评测集",resources:"资源配置",complete:"部署已完成",preparing:"正在准备部署…"},environmentVariables:{title:"环境变量",add:"添加变量",nameAriaLabel:"环境变量名称",valueAriaLabel:"{{name}} 的值",deleteNamed:"删除 {{name}}"},actions:{updateAgain:"再次更新",deployAgain:"重新部署",updateAndPublish:"更新并发布"}},_ce={actions:{addSubagent:"添加子 Agent",clearRoot:"清空根 Agent",clearRootConfirmation:"清空根 Agent 的全部配置和子 Agent?此操作无法撤销。"},workspace:{progress:"Agent 创建进度",modes:{build:"架构",validate:"调试",optimize:"优化",environment:"环境",publish:"发布"},titles:{build:"个性化您的智能体架构",validate:"调试您的智能体",optimize:"为您的智能体选择优化项",environment:"配置云上环境",publish:"准备好部署您的智能体"}},sections:{type:{label:"Agent 类型",hint:"选择 Agent 类型"},basic:{label:"基本信息",hint:"名称、描述与系统提示词"},model:{label:"模型配置",hint:"模型与服务(可选)"},tools:{label:"工具",hint:"可调用的能力"},skills:{label:"技能",hint:"声明式技能"},knowledge:{label:"知识库",hint:"外部知识检索"},memory:{label:"记忆",hint:"短期与长期记忆"},subagents:{label:"子 Agent",hint:"嵌套协作"},review:{label:"完成",hint:"预览并创建"}},agentTypes:{ariaLabel:"Agent 类型",remoteChildOnly:"远程智能体只能作为子步骤使用",llm:{label:"智能体",fullLabel:"LLM 智能体",description:"大模型驱动,自主完成任务"},sequential:{label:"分步协作",fullLabel:"顺序型智能体",description:"子 Agent 按顺序依次执行"},parallel:{label:"同时处理",fullLabel:"并行型智能体",description:"子 Agent 并行执行后汇总"},loop:{label:"循环执行",fullLabel:"循环型智能体",description:"子 Agent 循环执行到满足条件"},a2a:{label:"远程智能体",fullLabel:"远程 Agent",description:"通过 A2A 协议调用远程 Agent"}},basic:{agentName:"Agent 名称",name:"名称",agentDescription:"智能体描述",descriptionPlaceholder:"简要描述这个 Agent 的用途,便于团队识别…",nameHelp:"遵循 Google ADK 命名规则,且在执行流程中保持唯一。",rootDescriptionHelp:"完整描述会保留;部署时会自动整理为符合 Runtime 规范的单行描述。",descriptionHelp:"描述会显示在 Agent 列表与选择器中。",orchestratorHelp:"这是一个协作容器,本身不生成回答。请在左侧画布中添加任务步骤,并通过拖拽调整它们的位置。",maxIterations:"最大轮次",maxIterationsHelp:"循环编排反复执行子 Agent,直到满足条件或达到该轮次上限。",agentCenter:"AgentKit 智能体中心",agentCenterHelp:"远程 Agent 的名称、描述和能力来自中心返回的 Agent Card。系统会根据每轮任务动态发现并挂载匹配的 Agent。",moreOptions:"更多选项",systemPrompt:"系统提示词",loadingMarkdown:"正在加载 Markdown 编辑器…",markdownHelp:"支持 Markdown 快捷输入,例如键入 ## 加空格创建二级标题。",unnamed:"未命名",unnamedAgent:"未命名智能体"},validation:{remoteRoot:"远程 Agent 只能作为子 Agent",missingRegistry:"请选择 AgentKit 智能体中心",name:{required:"名称为必填项",reserved:"user 是 Google ADK 保留名称,请使用其他名称",characters:"名称须以英文字母或下划线开头,且只能包含英文字母、数字和下划线"},duplicateName:"Agent 名称在当前结构中必须唯一",missingDescription:"描述为必填项",mcpAuthRequired:"MCP 地址变化后需要确认认证方式",missingSubagent:"缺少子 Agent",missingPrompt:"系统提示词为必填项",missingSubagentDetail:"{{type}}至少需要添加一个子 Agent 后才能调试或发布。",problem:"{{name}}:{{problem}}"},ai:{ariaLabel:"AI 自动填写 Agent 配置",minimumLength:"请至少输入 {{count}} 个字符。",replaceConfirmation:"生成的新配置会替换当前画布和属性,确定继续吗?",placeholder:"描述目标,使用 {{model}} 模型一键生成配置",generate:"智能生成",generating:"正在智能生成",success:"生成成功",regenerate:"重新生成",failed:"智能生成失败"},debug:{ariaLabel:"智能体调试工作区",unavailable:"当前后端暂不支持生成 Agent 调试运行。",baseline:"基准组",comparison:"对照组 {{count}}",selectModel:"请选择模型",enterDescription:"请输入描述",enterPrompt:"请输入系统提示词",duplicateConfiguration:"测试配置不能重复",starting:"启动中…",applyAndRestart:"应用并重启",restart:"重新启动",start:"启动环境",defaultModel:"默认模型",testConfiguration:"测试配置",deleteVariant:"删除 {{name}}",deleteVariantGroup:"删除对照组",creatingEnvironment:"正在创建测试环境…",configurationChanged:"配置已变更,请重新启动环境。",ready:"环境已就绪",readyHint:"发送消息以比较智能体回复。",startHint:"先完善配置,再启动环境。",viewTraceNamed:"查看 {{name}} 的调用链路",traceUnavailable:"发送消息后可查看调用链路",trace:"调用链路",useConfiguration:"使用此配置",finishConfiguration:"完成配置",finishAndStart:"完成并启动",currentAgentModel:"当前 Agent 模型",configurationHint:"修改仅用于本次对比,选择使用后才会进入部署流程。",messagePlaceholder:"向已启动的测试环境发送消息…",startOneFirst:"请先启动至少一个测试环境",addVariant:"添加对照组",traceTitle:"调用链路 · {{name}}",leaveTitle:"离开调试?",leaveDescription:"离开调试页面后,当前环境将被清理。您可以通过重新启动环境进行新的测试。",cleaning:"清理中…",confirmLeave:"确定离开",closeLeaveConfirmation:"关闭离开调试确认"},optimization:{ariaLabel:"智能体优化选项",scenario:"优化场景",components:"优化组件",bytePlusUnavailable:"BytePlus 账号暂不支持 Harness Sidecar 优化项。请保持优化项为空后继续部署,普通 BytePlus 智能体不受影响。",releaseScenario:"优化场景:{{profile}}",profiles:{default:{label:"自定义",description:"按需选择组件,不勾选时不启动 Sidecar。"},ops:{label:"运维场景",description:"适用于运维诊断、数据库、日志和监控 MCP。"}},groups:{quality:"提升回答质量",cost:"降低运行成本",stability:"增强运行稳定性"},options:{context_engine:{label:"上下文治理",description:"治理上下文组装、任务锚定和上下文预算。"},compressor:{label:"上下文与结果压缩",description:"压缩长上下文和大型工具结果,降低 Token 成本。"},verifier:{label:"回答校验与修复",description:"校验证据和回答,在失败时执行修复或告警。"},long_run_control:{label:"Goal 任务控制",description:"管理 Goal 任务的进度、续跑和结束条件。"},mcp_resilience:{label:"MCP 稳定性治理",description:"治理连接、超时、空结果、大返回和调用预算;默认包含 SQL 只读保护。"}}},model:{label:"模型",source:"模型来源",volcanoArk:"火山方舟",volcengineArk:"火山方舟",bytePlusModelArk:"BytePlus ModelArk",custom:"自定义",gateway:"模型网关",comingSoon:"待上线",configuration:"模型配置",name:"模型名称",provider:"服务商 Provider",liteLlmProviders:"LiteLLM 支持列表",apiKeyPlaceholder:"请输入模型 API Key",available:"已开通",retiring:"即将下线",notActivated:"未开通",unavailable:"暂不可用",apiKeyLoadError:"加载 Ark API Key 失败",loadingApiKeys:"正在加载 API Key…",selectApiKey:"选择 API Key",currentApiKey:"当前 API Key",apiKeyList:"API Key 列表",searchApiKey:"搜索 API Key",searchApiKeyName:"搜索 API Key 名称",noApiKeys:"暂无可用 API Key",noMatchingApiKey:"没有匹配的 API Key",loading:"正在加载模型…",loaded:"已加载 {{count}} 个模型",loadError:"加载模型失败",selectModel:"选择模型",selectProviderModel:"选择服务商模型",providerModels:"服务商模型",search:"搜索模型",searchPlaceholder:"搜索名称、Model ID 或服务商",noMatches:"没有匹配的模型",empty:"暂无可用模型",unknownStatus:"未知状态",refresh:"刷新",refreshing:"刷新中…",activate:"开通",activateAction:"前往开通",currentConfiguration:"当前配置"},tools:{builtIn:"内置工具",builtInHelp:"勾选 VeADK 提供的内置能力,生成时会自动补全 import 与所需环境变量。",codeExecution:"代码执行配置",codeExecutionHelp:"指定 AgentKit 代码执行沙箱。",mcp:"MCP 工具"},catalog:{web_search:{label:"联网搜索",description:"火山引擎 Web Search,获取实时信息。"},parallel_web_search:{label:"并行联网搜索",description:"并行发起多条搜索查询,更快汇总。"},link_reader:{label:"网页读取",description:"抓取并阅读给定链接的正文内容。"},web_scraper:{label:"网页爬取",description:"结构化爬取网页(需要 Scraper 服务)。"},image_generate:{label:"图像生成",description:"文生图(Doubao Seedream)。"},image_edit:{label:"图像编辑",description:"图生图 / 编辑(Doubao SeedEdit)。"},video_generate:{label:"视频生成",description:"文/图生视频(Doubao Seedance),含任务查询。"},text_to_speech:{label:"语音合成 (TTS)",description:"把文本转成语音(火山语音)。"},run_code:{label:"代码执行",description:"在沙箱中执行代码。"},vesearch:{label:"VeSearch 智能搜索",description:"火山 VeSearch(需要 bot 端点)。"},links:{console:"控制台",documentation:"文档"},env:{modelAgentName:{comment:"模型名称"},embeddingModelName:{comment:"向量化模型(记忆/知识库需要)"},vikingMemoryProject:{comment:"VikingDB 记忆库项目"},vikingMemoryRegion:{comment:"VikingDB 记忆库地域"},vikingMemoryType:{comment:"记忆类型"},feishuAppId:{comment:"飞书应用 App ID"},feishuAppSecret:{comment:"飞书应用 App Secret",placeholder:"输入 App Secret"},registrySpaceId:{comment:"AgentKit 智能体中心",placeholder:"请选择智能体中心"},registryTopK:{comment:"召回 Agent 数量"},registryRegion:{comment:"AgentKit 智能体中心地域"},registryEndpoint:{comment:"AgentKit 智能体中心 OpenAPI 地址"},agentKitToolId:{comment:"代码执行沙箱 ID"},agentKitToolRegion:{comment:"AgentKit Tools 地域"},openVikingUrl:{comment:"OpenViking 服务地址"},openVikingMemoryUserId:{comment:"记忆归属 ID",help:"对应 viking://user/<此值>/peers/<请求用户>/memories 中的 user 段;用于隔离 Agent、租户或业务场景,默认 default。"},openVikingMemoryPolicy:{comment:"记忆策略",help:"记忆的抽取策略和隔离策略,不填写时使用官方默认策略。"},openVikingKnowledgeUserId:{comment:"知识库归属 ID",help:"未配置资源目录时用于默认路径 viking://user/<此值>/resources/<知识库索引>/,默认 default。"},openVikingTargetUri:{comment:"知识库资源目录",help:"留空时由 KnowledgeBase index 自动生成;填写后直接检索该 OpenViking 资源目录,优先级最高。"},tlsServiceName:{comment:"TLS topic_id,留空自动创建"}}},backends:{shortTerm:{local:{label:"本地内存",description:"进程内,不持久化。适合开发调试。"},sqlite:{label:"SQLite 文件",description:"持久化到本地 .db 文件。"},mysql:{label:"MySQL",description:"持久化到 MySQL。"},postgresql:{label:"PostgreSQL",description:"持久化到 PostgreSQL。"}},longTerm:{local:{label:"本地向量库",description:"进程内 llama-index 向量库。"},opensearch:{label:"OpenSearch",description:"OpenSearch 向量检索。"},redis:{label:"Redis",description:"Redis 向量检索。"},viking:{label:"VikingDB Memory",description:"VikingDB 记忆库(支持用户画像)。"},openviking:{label:"OpenViking Memory",description:"OpenViking 长期记忆,按用户维度保存和检索偏好、事件与实体。"},mem0:{label:"Mem0",description:"Mem0 托管记忆服务。"}},knowledge:{viking:{label:"VikingDB Knowledge",description:"VikingDB 知识库。"},opensearch:{label:"OpenSearch",description:"OpenSearch 向量检索。"},context_search:{label:"Context Search",description:"火山 Context Search 引擎(无需向量化)。"},openviking:{label:"OpenViking Knowledge",description:"OpenViking 资源目录知识库,无需向量化模型配置。"}}},exporters:{apmplus:{label:"APMPlus",description:"火山 APMPlus 应用性能监控。"},cozeloop:{label:"CozeLoop",description:"扣子 CozeLoop 链路观测。"},tls:{label:"TLS (日志服务)",description:"火山 TLS 日志服务导出。"}},knowledge:{title:"知识库",description:"启用外部知识检索(RAG),让 Agent 基于你的资料作答。",backend:"知识库后端",vikingDatabase:"VikingDB 知识库"},memory:{shortTerm:"短期记忆",shortTermDescription:"存储单会话上下文",shortTermBackend:"短期记忆后端",longTerm:"长期记忆",longTermDescription:"存储跨会话上下文,通常使用向量化检索",longTermBackend:"长期记忆后端",vikingDatabase:"VikingDB 记忆库",autoSave:"自动保存会话到长期记忆",autoSaveDescription:"会话结束时自动把内容写入长期记忆,无需手动调用。"},mcp:{removeTool:"删除 MCP 工具",namePlaceholder:"名称(可选)",urlPlaceholder:"MCP 服务地址",pathWarning:"此地址没有路径,请确认它是完整的 MCP 服务地址。",configuredPlaceholder:"已安全保存认证信息",tokenPlaceholder:"Bearer Token(可选)",changedUrlWarning:"MCP 地址已变化,请确认如何处理已保存的认证信息。",reuseCredential:"继续使用",replaceCredential:"替换认证",noAuth:"不使用认证",reuseHint:"发布时将继续使用已保存的认证信息。",changeToReplace:"改为替换",credentialConfigured:"认证信息已由 Studio 安全保存。",removeCredential:"移除认证",commandPlaceholder:"命令,例如 npx",argsPlaceholder:"参数,以空格分隔",stdioHint:"stdio 工具在部署环境中启动,请确保命令和依赖可用。",addTool:"添加 MCP 工具"},resources:{unnamedAgentCenter:"未命名智能体中心",unnamedKnowledgeBase:"未命名知识库",unnamedMemory:"未命名记忆库",loadError:"加载失败",loadingAgentCenters:"正在加载智能体中心…",agentCentersLoaded:"已加载 {{count}} 个智能体中心",noAgentCenters:"暂无智能体中心",noMatchingAgentCenters:"没有匹配的智能体中心",searchAgentKitCenter:"搜索 AgentKit 智能体中心",searchNameOrId:"搜索名称或 ID",selectAgentCenter:"选择智能体中心",selectAgentKitCenter:"选择 AgentKit 智能体中心",selectedAgentCenter:"已选智能体中心",agentKitCenter:"AgentKit 智能体中心",refreshAgentCenters:"刷新智能体中心",knowledgeBaseList:"知识库列表",knowledgeBasePlaceholder:"选择知识库",loadingKnowledgeBases:"正在加载知识库…",knowledgeBasesLoaded:"已加载 {{count}} 个知识库",noKnowledgeBases:"暂无知识库",noMatchingKnowledgeBases:"没有匹配的知识库",searchKnowledgeBase:"搜索知识库",selectKnowledgeBase:"选择知识库",refreshKnowledgeBases:"刷新知识库",memoryList:"记忆库列表",memoryPlaceholder:"选择记忆库",loadingMemories:"正在加载记忆库…",memoriesLoaded:"已加载 {{count}} 个记忆库",noMemories:"暂无记忆库",noMatchingMemories:"没有匹配的记忆库",searchMemory:"搜索记忆库",selectMemory:"选择记忆库",refreshMemories:"刷新记忆库"},env:{noAdditionalParameters:"此后端无需额外运行参数。",invalidJson:"请输入有效的 JSON。",helpAriaLabel:"{{label}}说明:{{help}}",openOpenViking:"打开 OpenViking {{label}}",valuePlaceholder:"请输入参数值",openVikingIndex:"OpenViking 资源索引",openVikingIndexHelp:"默认值:留空;生成项目时使用 Agent 名自动生成,例如 my_agent_kb。未配置 DATABASE_OPENVIKING_TARGET_URI 时,默认 URI 拼接为 viking://user/{知识库归属 ID,未填则 default}/resources/{资源索引}/;如果填写了 DATABASE_OPENVIKING_TARGET_URI,则直接使用该完整 URI。",openVikingIndexAriaLabel:"OpenViking 资源索引说明:{{help}}"},deployment:{vpcRequired:"使用 VPC 网络时,请填写 VPC ID。",apiKeyRequired:"请先选择模型使用的 API Key。",invalidEnvName:"环境变量名称不合法:{{key}}",requiredEnv:"{{name}}:请填写必填环境变量",generatingConfiguration:"正在生成部署配置",runtimeNameExists:"Runtime 名称已存在,请修改后重试。",preparing:"准备部署",complete:"部署完成",failed:"部署失败",updateAndPublish:"更新并发布",stages:{build:"构建镜像",deploy:"部署 Runtime",publish:"发布服务",running:"部署中"}},publish:{generating:"正在生成发布配置",validating:"校验 Agent 结构并准备部署快照…"}},Nce={presets:{support:{name:"客服助手",description:"7×24 在线答疑,结合知识库与历史对话,稳定、礼貌地解决用户问题。",instruction:"你是一名专业、耐心的客服助手。请始终保持礼貌、友好的语气,优先依据知识库中的资料回答用户问题;当资料不足以确定答案时,如实告知用户并主动引导其提供更多信息,切勿编造。回答尽量简洁、分点清晰,必要时给出操作步骤。",subagents:{}},analyst:{name:"数据分析师",description:"运行代码完成统计与可视化,开启链路追踪,分析过程可观测、可复现。",instruction:"你是一名严谨的数据分析师。面对数据问题时,先厘清分析目标与口径,再通过编写并运行代码完成清洗、统计与可视化。每一步都要说明你的假设与方法,给出结论时附上关键数据支撑,并指出潜在的偏差与局限。",subagents:{}},translator:{name:"翻译助手",description:"中英互译,忠实、通顺、地道,保留原文语气与专业术语。",instruction:"你是一名专业的翻译助手,精通中英互译。请在忠实于原文含义的前提下,使译文自然、地道、符合目标语言表达习惯;保留专有名词与专业术语的准确性,并尽量贴合原文的语气与风格。仅输出译文,除非用户额外要求解释。",subagents:{}},coder:{name:"代码助手",description:"编写、调试与重构代码,可运行代码验证结果,给出清晰可维护的实现。",instruction:"你是一名资深软件工程师。请根据需求编写正确、清晰、可维护的代码,遵循目标语言的惯用风格与最佳实践。在不确定时通过运行代码验证你的实现,给出关键的边界条件与测试思路,并对复杂逻辑附上简要注释。",subagents:{}},researcher:{name:"研究员",description:"联网检索一手资料,结合知识库与长期记忆,输出有据可查的研究结论。",instruction:"你是一名严谨的研究员。面对研究问题时,先拆解关键子问题,再通过联网检索收集多个一手、可信的来源,交叉验证后再下结论。结论需注明出处与不确定性,区分事实与推断,避免以偏概全。",subagents:{}},"research-team":{name:"多智能体研究团队",description:"由检索员、分析员、撰写员协作的研究编排,分工完成端到端调研报告。",instruction:"你是一支研究团队的总协调者。负责拆解用户的研究任务,将检索、分析、撰写分别委派给对应的子 Agent,汇总各子 Agent 的产出,把控整体质量,最终输出结构清晰、有据可查的研究报告。",subagents:{0:{name:"检索员",description:"联网搜集与课题相关的一手资料与数据。",instruction:"你是研究团队中的检索员。根据课题联网检索多个可信来源,整理出关键事实、数据与原文出处,交付给分析员,不做主观结论。"},1:{name:"分析员",description:"对检索到的材料做交叉验证与归纳分析。",instruction:"你是研究团队中的分析员。对检索员提供的材料做交叉验证、归纳与对比,提炼洞见、识别矛盾与不确定性,形成结构化的分析要点。"},2:{name:"撰写员",description:"将分析结论组织为结构清晰、引用规范的报告。",instruction:"你是研究团队中的撰写员。把分析员的要点组织成结构清晰、语言通顺、引用规范的研究报告,确保每个结论都能追溯到来源。"}}}},tags:{tools:"工具",memory:"记忆",knowledgeBase:"知识库",tracing:"观测",subagents:"子 Agent {{count}}"},gallery:{title:"从模板新建",subtitle:"选择一个预制 Agent 模板,按需微调后即可创建。"},detail:{back:"返回模板列表",name:"名称",systemPrompt:"系统提示词",model:"模型",tools:"工具",memory:"记忆",knowledgeBase:"知识库",tracing:"观测追踪",subagents:"子 Agent({{count}})",create:"使用此模板创建",shortTermMemory:"短期",longTermMemory:"长期"}},jce={common:pce,yaml:mce,validation:gce,defaults:bce,helpers:yce,intelligentDeployment:vce,codePackage:xce,buildCanvas:Oce,intelligent:wce,projectLibrary:Sce,modePicker:kce,promptEditor:Ece,skills:Cce,workflow:Tce,workbench:Ace,traditional:_ce,template:Nce},tMe=Object.freeze(Object.defineProperty({__proto__:null,buildCanvas:Oce,codePackage:xce,common:pce,default:jce,defaults:bce,helpers:yce,intelligent:wce,intelligentDeployment:vce,modePicker:kce,projectLibrary:Sce,promptEditor:Ece,skills:Cce,template:Nce,traditional:_ce,validation:gce,workbench:Ace,workflow:Tce,yaml:mce},Symbol.toStringTag,{value:"Module"})),Rce={backToList:"返回定时任务列表",cancel:"取消",cancelQueue:"取消排队",cancelQueueFirst:"请先取消排队",cancelling:"取消中…",closeDrawer:"关闭抽屉",collapse:"收起",connectingRuntime:"正在连接 Runtime…",createScheduledTask:"创建定时任务",createTask:"创建任务",delete:"删除",deleteTask:"删除任务",edit:"编辑",enable:"启用",expand:"展开",pause:"暂停",refresh:"刷新",refreshHistory:"刷新执行历史",rerun:"重新执行",retry:"重试",runNow:"立即执行",saveChanges:"保存更改",saving:"保存中…",stop:"终止执行",stopRun:"终止本次执行",stopRunFirst:"请先终止当前执行",stopping:"终止中…",viewDetails:"查看详情"},Ice={cancelDescription:"本次 Session 将被取消,后续计划不会暂停。",cancelTitle:"终止本次执行?",deleteDescription:"“{{name}}”及其全部执行历史将被永久删除。",deleteTitle:"删除定时任务?"},Pce={configuration:"任务配置",nextRun:"下次执行",pageLabel:"定时任务详情",region:"地域",runtime:"运行时",status:"任务状态"},Dce={createTitle:"创建定时任务",description:"每次触发都会为 Runtime Agent 创建独立 Session。",editTitle:"编辑定时任务"},Mce={minutesSeconds:"{{minutes}} 分 {{seconds}} 秒",seconds:"{{count}} 秒"},Lce={cronExpression:"Cron 表达式",cronHelp:"依次填写分钟、小时、日期、月份、星期。",dailyTime:"每天执行时间",enableAfterCreate:"创建后启用",enableHelp:"启用后会从下一个计划时间开始执行。",name:"任务名称",namePlaceholder:"例如:每日生成运营摘要",noRuntime:"暂无可用 Runtime",prompt:"执行文本",promptPlaceholder:"输入每次执行时发送给 Agent 的固定文本",runAt:"执行时间",runtimeAgent:"运行时智能体",runtimeHelp:"任务始终跟随该 Runtime 当前生效版本。",runtimePlaceholder:"选择 Runtime Agent",schedule:"执行计划",scheduleType:"执行计划类型",timezone:"时区",weekday:"星期"},$ce={all:"全部"},Fce={description:"每次运行均使用独立 Session,结果与错误会永久保留。",duration:"耗时 {{duration}}",emptyDescription:"任务触发或立即执行后,记录会显示在这里。",emptyTitle:"暂无执行记录",errorDetails:"错误详情",finalAnswer:"最终回答",loadFailed:"无法加载执行历史",loadFailedDescription:"请检查 Studio 服务后重试。",session:"会话",title:"执行历史"},Bce={cancelRequested:"已提交终止请求。",created:"任务已创建。",deleted:"任务及其执行历史已删除。",enabled:"任务已启用。",paused:"任务已暂停。",queued:"任务已排队,将在一分钟内开始执行。",requeued:"任务已重新排队,将在一分钟内开始执行。",updated:"任务已更新。"},Uce={filterLabel:"定时任务状态筛选",listLabel:"定时任务列表",loadFailed:"无法加载定时任务",loadFailedDescription:"请检查 Studio 服务后重试。",title:"定时任务"},Qce={cron:"Cron {{cron}}{{zone}}",daily:"每天 {{time}}{{zone}}",once:"一次 · {{date}}{{zone}}",weekly:"{{weekday}} {{time}}{{zone}}"},zce={daily:"每天",once:"一次性",weekly:"每周"},Vce={cancelled:"已取消",enabled:"已启用",failed:"失败",notRun:"尚未执行",paused:"已暂停",pending:"准备中",queued:"已排队",retrying:"自动重试中",running:"执行中",skipped:"已跳过",success:"成功"},Hce={cronFields:"Cron 表达式需要包含 5 个字段,例如 0 9 * * *。",nameRequired:"请输入任务名称。",promptRequired:"请输入每次执行时发送给 Agent 的文本。",runtimeAppMissing:"Runtime Agent 未返回可调用的 appName,请确认 Runtime 已就绪且版本兼容。",runtimeRequired:"请选择可用的 Runtime Agent。",timeRequired:"请选择执行时间。"},qce={friday:"周五",monday:"周一",saturday:"周六",sunday:"周日",thursday:"周四",tuesday:"周二",wednesday:"周三"},nMe={actions:Rce,confirm:Ice,detail:Pce,drawer:Dce,duration:Mce,fields:Lce,filters:$ce,history:Fce,notices:Bce,page:Uce,schedule:Qce,scheduleTypes:zce,status:Vce,validation:Hce,weekdays:qce},iMe=Object.freeze(Object.defineProperty({__proto__:null,actions:Rce,confirm:Ice,default:nMe,detail:Pce,drawer:Dce,duration:Mce,fields:Lce,filters:$ce,history:Fce,notices:Bce,page:Uce,schedule:Qce,scheduleTypes:zce,status:Vce,validation:Hce,weekdays:qce},Symbol.toStringTag,{value:"Module"})),Wce="问题反馈",Kce="问题描述",Gce="常见问题",Xce="取消",Yce="完成",Zce="提交反馈",Jce="正在上报…",eue={title:"上报成功,感谢您的反馈",description:"AgentKit 团队会尽快查看您提交的问题。"},tue={close:"关闭问题反馈",intro:"请选择遇到的问题,也可以补充具体表现。",privacy:"您的对话数据将会上报到 AgentKit 团队,请注意隐私保护。",descriptionPlaceholder:"请描述问题发生时的表现(选填)",issues:{slow:"执行速度慢",crash:"运行崩溃",incorrect:"结果不准确",tool_error:"工具调用失败",other:"其他问题"}},nue={description:"告诉我们您在使用 AgentKit Studio 时遇到的问题。",module:"所属模块",modules:{conversation:"对话",agents:"智能体",applications:"自动化",search:"搜索",other:"其他"},commonIssuesMultiple:"常见问题(可多选)",issueTypes:"问题类型",issues:{page_slow:"页面加载慢",feature_unavailable:"功能无法使用",display_error:"页面显示异常",no_response:"操作无响应",other:"其他问题"},descriptionPlaceholder:"请描述问题发生时的页面、操作和表现",quickAdd:"快捷补充",suggestionsLabel:"问题描述推荐",suggestions:{noResponse:"点击后没有反应",loading:"页面一直处于加载状态",incomplete:"部分内容显示不完整",error:"操作后出现错误提示"},privacy:"您的数据将会上报到 AgentKit 团队,请注意隐私保护。"},rMe={title:Wce,descriptionLabel:Kce,commonIssues:Gce,cancel:Xce,done:Yce,submit:Zce,submitting:Jce,success:eue,dialog:tue,page:nue},sMe=Object.freeze(Object.defineProperty({__proto__:null,cancel:Xce,commonIssues:Gce,default:rMe,descriptionLabel:Kce,dialog:tue,done:Yce,page:nue,submit:Zce,submitting:Jce,success:eue,title:Wce},Symbol.toStringTag,{value:"Module"})),iue={back:"返回",close:"关闭"},rue={title:"优化迁移项目",closeAria:"关闭优化窗口"},sue={title:"已迁移项目",description:"管理迁移后的源码版本,也可以选择任一版本继续优化。",libraryTitle:"项目与版本",libraryDescription:"查看、下载、部署或对比源码版本,也可以基于任一版本继续优化。",emptyTitle:"还没有已迁移的项目",emptyDescription:"迁移完成后,源码会自动保存在这里。"},aue={langchain:"LangChain",langgraph:"LangGraph",adk:"Google ADK",strands:"Strands",agentcore:"AgentCore",dify:"Dify",any:"Any(通用迁移)"},oue={awaitingUpload:"待上传",analyzing:"分析中",needsInput:"待补充",analysisReady:"待确认",migrating:"迁移中",validating:"校验中",packaging:"打包中",succeeded:"已完成",succeededWithWarnings:"已完成,有提示",partial:"部分完成",failed:"失败",cancelled:"已终止",expired:"已过期"},lue={partialReady:"迁移产物已生成,但交付不完整,请查看迁移提示。",readyWithWarnings:"迁移产物已生成,请查看迁移提示。",ready:"迁移产物已生成。"},cue={passed:"产物校验通过",failed:"产物校验未通过",degraded:"产物校验未完成"},uue={session:"创建迁移环境",upload:"上传项目",analysis:"分析项目"},due={agentNameRequired:"请输入 Agent 名称",agentNameInvalid:"Agent 名称必须为 1-63 位,只能包含小写字母、数字和连字符,且必须以字母或数字开头和结尾"},fue={seconds:"{{seconds}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒"},hue={savedUnaffected:"已保存项目不受影响",savingUnaffected:"源码正在保存,完成后不受环境期限影响",activeDetail:"到期后任务记录和临时产物将无法访问",oneHour:"临时迁移环境保留 1 小时",ended:"临时迁移环境已结束",savedAvailable:"已保存项目仍可查看、下载、部署或优化",unavailable:"任务记录和临时产物已无法访问",countdown:"临时迁移环境将在 {{minutes}} 分 {{seconds}} 秒后结束",expiredSavedMessage:"临时迁移环境已结束,已保存项目不受影响。",expiredMessage:"临时迁移环境已结束,任务记录和临时产物无法继续访问。"},pue={recommended:"建议迁移方式",scope:"迁移范围",excluded:"不在本次范围",viewEvidence:"查看分析证据",viewAssumptions:"查看关键假设",viewSourceEvidence:"查看源码证据"},mue={ariaLabel:"Codex 执行动态",title:"Codex 执行动态",startingAnalysis:"Codex 正在开始分析…",startingMigration:"Codex 正在开始迁移…",loadError:"暂时无法读取 Codex 执行动态,不影响当前任务。"},gue={title:"迁移产物",fileTooLarge:"该文件超过 2 MiB,请下载完整产物后查看。",unsupportedPreview:"该文件不支持在线预览,请下载完整产物后查看。",filesAria:"迁移产物文件",searchAria:"搜索产物文件",searchPlaceholder:"搜索文件",limit:"仅展示前 {{count}} 项,请搜索具体文件。",noSelection:"未选择文件",noPreview:"暂无可预览文件。",loadingFile:"正在读取产物文件…",startupFile:"启动文件",fileCountLabel:"文件数",saved:"源码已保存,可继续查看、下载、部署或优化。",saving:"产物已生成,正在保存源码版本。",deployReady:"产物可预览、下载和部署,正在等待源码保存状态。",deployUnavailable:"产物可预览和下载,但当前交付状态不支持部署。",viewProjects:"查看已迁移项目",downloading:"下载中…",downloadZip:"下载 ZIP",deployTitle:"部署迁移产物",deployUnavailableTitle:"当前交付状态不支持部署",deployRuntime:"部署到 Runtime",fileCount:"{{count}} 个文件",startup:"启动文件 {{module}}",loading:"正在读取迁移产物…"},bue={retiring:"即将下线",currentDefault:"当前默认模型",loadError:"加载模型列表失败",label:"模型",placeholder:"选择模型"},yue={zipOnly:"请选择 .zip 格式的本地项目文件。",invalidName:"ZIP 文件名无效,请重命名后重新选择。",tooLarge:"项目 ZIP 不能超过 {{size}}。",empty:"项目 ZIP 不能为空。",removeAria:"移除项目 ZIP",reselectPrompt:"重新选择项目 ZIP",selectPrompt:"选择或拖入本地项目 ZIP",reselect:"重新选择",selectZip:"选择 ZIP",continue:"继续上传",start:"开始迁移",inputAria:"选择本地项目 ZIP",retention:"临时迁移环境从创建完成起保留 1 小时;保存成功的源码版本不受影响。"},vue={requiredPlaceholder:"请输入 {{key}}",optionalPlaceholder:"可选:{{key}}",notReady:"迁移产物尚未准备完成。",back:"返回迁移结果"},xue={backToAddAgent:"返回添加 Agent",title:"从存量迁移",newMigration:"新建迁移",recent:"最近迁移",sessionsAria:"迁移会话",loadingSessions:"正在读取迁移会话…",noSessions:"暂无迁移会话",heading:"迁移存量 Agent 项目",intro:"上传本地项目 ZIP,Codex 将先进行只读分析,再由你确认迁移方式。"},Oue={stop:"终止迁移",stopping:"正在终止…",reload:"重新读取",refreshStatus:"刷新状态"},wue={unavailable:"迁移能力暂不可用",defaultReason:"Dev Sandbox 暂不可用,请联系管理员检查配置。"},Sue={requestZip:"请提供本地项目 ZIP。上传后我会识别框架、入口和迁移边界,并在执行实际迁移前请你确认迁移方式。",zipHint:"仅支持本地 ZIP,最大 {{size}};迁移环境从创建起保留 1 小时。",creatingSandbox:"正在创建 Dev Sandbox",initializing:"正在初始化迁移工作目录,并检查 AgentKit CLI、Codex 和迁移能力。环境就绪后将自动上传项目。",elapsed:"已等待 {{duration}}",uploadThenAnalyze:"ZIP 上传完成后将自动开始只读分析。",analyzing:"Codex 正在识别框架、入口和迁移边界,不会执行实际迁移。",migrationLocked:"迁移执行中不能修改附件或迁移方式。你可以等待当前任务结束,或主动终止。",analysisPaused:"只读分析已暂停。请仅回答下面列出的问题,提交后会在同一迁移环境中重新分析,不会开始实际迁移。",analysisComplete:"只读分析已完成。请检查建议,并确认最终迁移方式。",awaitingUpload:"迁移环境已创建,请重新选择本地 ZIP 继续上传。",expiredTitle:"迁移环境已过期",expiredDescription:"迁移内容和产物已无法预览、下载或部署。如已完成 Runtime 部署,可返回智能体页面继续使用。",unsupportedTitle:"当前 ZIP 暂时无法迁移",unsupportedHint:"请按提示整理项目后,新建迁移并重新上传。",failedTitle:"迁移未完成",cancelled:"当前迁移已终止。你可以新建迁移并重新上传项目。"},kue={ariaLabel:"补充项目分析信息",title:"补充分析所需信息",description:"附件保持锁定,提交后仅继续只读分析",submitting:"正在继续分析…",submit:"提交并继续分析"},Eue={ariaLabel:"确认迁移方式",title:"确认迁移方式",description:"确认后才会执行实际迁移",framework:"迁移方式",frameworkPlaceholder:"选择迁移方式",agentName:"Agent 名称",entry:"项目入口",entryPlaceholder:"选择项目入口",entryExample:"例如 agent.py:agent",consent:"点击“确认并开始迁移”即确认上述迁移范围、排除项和关键假设。",starting:"正在启动迁移…",start:"确认并开始迁移"},Cue={closeAria:"关闭错误提示",loadFailed:"无法读取迁移数据,请重试。",refreshFailed:"无法刷新迁移状态,请重试。"},Tue={title:"终止当前迁移?",description:"终止后,当前分析或迁移进程将停止,已执行的步骤不会继续。"},aMe={common:iue,optimization:rue,projects:sue,framework:aue,state:oue,task:lue,verification:cue,transfer:uue,validation:due,duration:fue,expiry:hue,analysis:pue,activity:mue,artifact:gue,model:bue,upload:yue,deployment:vue,workspace:xue,actions:Oue,capability:wue,conversation:Sue,questions:kue,confirmation:Eue,errors:Cue,stopDialog:Tue},oMe=Object.freeze(Object.defineProperty({__proto__:null,actions:Oue,activity:mue,analysis:pue,artifact:gue,capability:wue,common:iue,confirmation:Eue,conversation:Sue,default:aMe,deployment:vue,duration:fue,errors:Cue,expiry:hue,framework:aue,model:bue,optimization:rue,projects:sue,questions:kue,state:oue,stopDialog:Tue,task:lue,transfer:uue,upload:yue,validation:due,verification:cue,workspace:xue},Symbol.toStringTag,{value:"Module"})),Aue={loading:"加载中…",searchLabel:"搜索{{label}}",searchPlaceholder:"搜索{{label}}",retry:"重试",noMatches:"没有匹配项",noOptions:"暂无可选项",selection:"{{label}}:{{value}}"},_ue={badge:"焕然一新",view:"查看新特性",title:"本次更新",defaultNotes:{multiRegion:"多地域智能体:并行加载北京与上海 Runtime,列表下滑即可继续加载。",switchAgent:"会话内切换:在输入框旁选择智能体,并直接开启一段新会话。",visualCanvas:"可视化执行画布:通过横向画布查看多智能体结构,并支持全屏浏览。"}},Nue={label:"新会话模式",agent:"智能体",skill:"技能定制",video:"视频创作"},jue={select:"选择新会话模式",agent:{label:"Agent",description:"与当前选择的 Agent 对话"},builtin:{label:"内置智能体",description:"使用平台提供的智能体"},codex:{label:"Codex 智能体",description:"在沙箱中执行任务"},deepseekHarness:{label:"DeepSeek Harness",description:"打开 DeepSeek Harness 工作区"},arkClaw:"ArkClaw",hermes:"Hermes 智能体",checking:"正在检查配置",notConfigured:"管理员未配置",unavailable:"暂不可用"},Rue={select:"选择智能体",typesLabel:"智能体类型",listLabel:"{{type}}列表",types:{agent:"智能体",general:"通用智能体",codex:"Codex 智能体",deepseekHarness:"DeepSeek Harness",openclaw:"OpenClaw 智能体",hermes:"Hermes 智能体"},loading:"正在加载智能体",reload:"重新加载",empty:"暂无{{type}}",emptyLocal:"暂无本地智能体",emptyGeneral:"暂无通用智能体",createHint:"请前往智能体页创建",localHint:"请检查当前 Studio 启动目录",waking:"正在唤醒",opening:"正在打开",connecting:"正在连接",loadingMore:"加载中",loadMore:"加载更多",runtimeTimeout:"加载智能体超时(15 秒),请检查网络或 Runtime 服务后重试",loadGeneral:"加载通用智能体",loadType:"加载 {{type}}",connectGeneral:"连接通用智能体",openLocal:"打开本地智能体",openType:"打开 {{type}}"},Iue={spaceAria:"技能空间",configuration:"技能定制配置",actions:{create:"技能生成",optimize:"技能优化"},selectAction:"选择技能定制方式",actionList:"技能定制方式",style:"风格",selectStyle:"选择风格",model:"模型",selectModel:"选择模型",styles:{concise:"简洁实用",strict:"严谨稳健",tutorial:"教程友好",automation:"自动化优先"},modelLoadFailed:"模型配置加载失败",spaceLoadFailed:"Skill Space 加载失败",skillLoadFailed:"Skill 加载失败",unnamedSpace:"未命名 Skill Space",space:"技能空间",select:"选择 Skill",selectAria:"选择 Skill:{{skill}}",loadingSpaces:"正在加载 Skill Space",reload:"重新加载",emptySpaces:"暂无 Skill Space",skillList:"{{space}} Skill 列表",loadingSkills:"正在加载 Skill",emptySkills:"暂无 Skill"},Pue={modes:{auto:"自动识别",text_to_video:"文生视频",reference_to_video:"参考素材生视频",video_editing:"视频编辑",video_extension:"视频续写",first_last_frame:"首尾帧生成"},taskNames:{auto:"视频生成",text_to_video:"文生视频",reference_to_video:"参考素材生视频",video_editing:"视频编辑",video_extension:"视频续写",first_last_frame:"首尾帧生成"},controls:{label:"视频创作配置",aspectRatio:"比例",selectAspectRatio:"选择比例",resolution:"清晰度",selectResolution:"选择清晰度",duration:"时长",durationShort:"{{count}} 秒",durationAria:"视频时长:{{count}} 秒",lastFrame:"尾帧",lastFrameHelper:"添加视频结束画面",assistImage:"辅助图片",referenceImage:"参考图片",assistImageHelper:"用于补充画面参考",imageHelper:"支持常见图片格式",referenceVideo:"参考视频",videoHelper:"支持常见视频格式",optional:"可选",replace:"更换",add:"添加",upload:"上传{{label}}",replaceFile:"更换{{label}}:{{name}}",removeFile:"移除{{label}} {{name}}",storageUnavailable:"管理员未配置持久化存储",loadingEnhancer:"正在加载增强模型",enhancerHint:"使用 {{model}} 模型进行意图识别和提示词增强",enhancerUnavailable:"增强模型不可用"},task:{title:"视频生成任务",closeAria:"关闭视频生成任务弹窗",progressAria:"视频生成进度",optimizedPrompt:"优化后的提示词",processingAria:"{{task}}处理进度",waitingAria:"{{status}},已等待{{elapsed}}",elapsed:"已等待 {{elapsed}}",previewAria:"生成结果预览",close:"关闭",download:"下载视频",retryOptimization:"重试提示词优化",retryGeneration:"重试视频生成",providerQueued:"等待模型调度",providerRunning:"模型生成中",providerSubmitting:"正在提交任务",queuedHint:"任务已提交,模型开始处理后状态会自动更新",runningHint:"这可能持续数分钟,完成后将在这里显示视频预览",backgroundHint:"可以关闭弹窗,任务会继续在后台运行",successHint:"视频已生成,可预览或下载",activationHint:"请先在模型控制台开通服务,再重试生成",retryHint:"修正问题后可重试当前步骤",steps:{optimizationFailed:"提示词优化失败",optimizationDone:"提示词优化完成",optimizationActive:"提示词优化中",generationDone:"{{task}}已完成",generationFailed:"{{task}}失败",generationQueued:"{{task}}排队中",generationRunning:"{{task}}生成中",generationActive:"{{task}}进行中",generationPending:"等待视频生成",generationComplete:"视频生成完成"},elapsedHours:"{{hours}}小时{{minutes}}分",elapsedMinutes:"{{minutes}}分{{seconds}}秒",elapsedSeconds:"{{seconds}}秒"}},Due={compactSelect:Aue,featureNotice:_ue,workspace:Nue,mode:jue,agentPicker:Rue,skill:Iue,video:Pue},lMe=Object.freeze(Object.defineProperty({__proto__:null,agentPicker:Rue,compactSelect:Aue,default:Due,featureNotice:_ue,mode:jue,skill:Iue,video:Pue,workspace:Nue},Symbol.toStringTag,{value:"Module"})),Mue={cancel:"取消",close:"关闭",retry:"重试",tryAgain:"重新尝试",closeDialog:"关闭{{title}}",agentFallback:"{{agent}} 智能体",unknownSource:"未知来源"},Lue={terminalTitle:"终端",browserTitle:"沙箱浏览器",terminalSubtitle:"连接当前 AgentKit Session 的交互式终端",browserSubtitle:"在当前 AgentKit Session 中查看与操作浏览器",connecting:"正在连接…",connected:"已连接",notConnected:"尚未连接",opening:"正在打开 {{title}}",connectingSession:"工具正在连接当前 AgentKit Session。",openFailed:"{{title}} 打开失败"},$ue={title:"恢复 Codex 对话",subtitle:"选择当前 Sandbox Session 中最近更新的 Thread",loading:"正在读取历史对话",loadFailed:"历史对话读取失败",empty:"暂无可恢复的对话"},Fue={title:"Codex 权限",subtitle:"设置会保存到当前 Sandbox Session,并同步到其中的所有 Thread",sandboxMode:"沙箱模式",approvalPolicy:"审批策略",approvalMethod:"审批方式",networkAccess:"允许网络访问",networkAccessHelp:"控制 workspace-write 与只读模式中的外部网络访问。",fullAccessWarning:"完全访问会关闭文件系统与网络隔离,请只在可信任务中使用。",save:"保存权限",sandboxChoices:{readOnly:{label:"只读",detail:"允许读取文件,不允许写入工作空间。"},workspaceWrite:{label:"工作区写入",detail:"允许在当前工作空间内读取与修改文件。"},fullAccess:{label:"完全访问",detail:"不启用沙箱隔离,适合明确可信的任务。"}},approvalChoices:{untrusted:{label:"仅不可信命令",detail:"只对 Codex 判断为不可信的操作发起审批。"},onRequest:{label:"按需审批",detail:"Codex 可在必要时请求你确认命令或文件修改。"},never:{label:"不审批",detail:"Codex 不会暂停并请求人工批准。"}},reviewerChoices:{user:{label:"由我审批",detail:"审批请求会显示在 Studio 中,由你决定。"},autoReview:{label:"自动审查",detail:"使用 Codex 自动审查流程处理审批请求。"}}},Bue={title:"工作空间",subtitle:"选择当前 Codex Thread 执行命令与修改文件的目录",absolutePath:"绝对路径",browse:"浏览",parent:"上一级",empty:"当前目录没有子目录",locked:"当前对话已经开始,工作空间已锁定。新建 Sandbox 会话后可重新选择。",useDirectory:"使用此目录"},Uue={fileTitle:"允许修改文件?",commandTitle:"允许执行命令?",subtitle:"Codex 正在等待你的决定",workingDirectory:"执行目录",decline:"拒绝",acceptOnce:"仅本次允许",acceptSession:"本会话允许"},Que={availableSkills:"可用 Skills",selectModel:"选择模型",commands:"Codex 快捷命令",currentModel:"当前:{{model}}",loadingSkills:"正在发现当前工作区的 Skills…",loadingModels:"正在读取模型…",noSkillMatches:"当前工作区没有匹配的 Skill",noModelMatches:"没有匹配模型,也可以直接输入模型 ID",noCommandMatches:"没有匹配的快捷命令",skillFallback:"加载并执行该 Skill",add:"添加",uploadImage:"上传图片",uploadDocument:"上传文档或 PDF",uploadVideo:"上传视频",openTerminal:"进入终端",viewBrowser:"查看浏览器",permissions:"Codex 权限",workspaceLocked:"对话已开始,工作空间已锁定",selectWorkspace:"选择工作空间",workspace:"Codex 工作空间",endpointCopied:"Endpoint 已复制",copyEndpoint:"复制 Sandbox Endpoint",continuePlaceholder:"继续说明你想实现或调整的内容",messagePlaceholder:"向 AgentKit 沙箱发送消息,输入 / 查看命令,输入 $ 调用 Skill…",stop:"停止生成",send:"发送"},zue={defaultName:"我的智能体",namedDefault:"我的 {{agent}}",creatingTitle:"正在创建 {{agent}} 智能体",failedTitle:"启动失败",createTitle:"创建 {{agent}} 智能体",fallbackError:"AgentKit 沙箱初始化失败,请稍后重新尝试。",creatingDescription:"正在创建并等待 {{agent}} 智能体就绪,这通常需要半分钟",name:"智能体名称",storageSize:"存储大小",storageHelp:"数据将持久化保存,可设置 {{min}}–{{max}} GiB。",persistent:"持久化",persistenceUnsupported:"当前环境不支持快照持久化",persistentHelp:"保留智能体数据,后续可继续使用。",temporaryHelp:"智能体将在 8 小时后清空",cancelCreation:"取消创建",confirm:"确认创建",retry:"重新尝试"},Vue={activeAria:"Codex 智能体会话已开启",openAria:"开启 Codex 智能体会话",active:"Codex 智能体会话中",entry:"灵光一现",exit:"退出当前智能体",expired:"已到期",remainingHours:"剩余 {{hours}} 小时 {{minutes}} 分钟",remainingMinutes:"剩余 {{minutes}} 分钟",expiryWarning:"远端开发环境最长保留 8 小时,将于 {{expiry}} 到期({{remaining}});到期后清除对话和文件。",usingAgent:"当前您在使用 {{agent}} 智能体",activityAria:"Sandbox 操作记录",activity:"操作记录",tokenUsageAria:"Codex Token 用量",tokens:"{{label}}:{{value}} tokens",tokenLabels:{total:"总计",input:"输入",cachedInput:"缓存输入",output:"输出",reasoningOutput:"推理输出"}},Hue={back:"返回智能体列表",subtitle:"{{agent}} AgentKit Session 详情",type:"智能体类型",status:"状态",createdBy:"创建人",snapshotStatus:"快照状态",toolType:"工具类型",createdAt:"创建时间",snapshotReason:"快照原因",expiresAt:"过期时间",snapshotId:"快照 ID",sessionId:"会话 ID",sourceSessionId:"来源 Session ID",delete:"删除智能体",waking:"唤醒中…",opening:"打开中…",wake:"唤醒智能体",open:"打开智能体",deleteTitle:"删除智能体?",deleteDescription:"将删除“{{name}}”及其 AgentKit {{resource}},此操作无法撤销。",deleting:"删除中…",confirmDelete:"确认删除"},que={back:"返回智能体列表",createdBy:"创建人 {{creator}}",ariaLabel:"智能体工作区",main:"主界面",terminal:"终端",mainTitle:"{{agent}} 主界面",openingTerminal:"正在打开终端…",terminalTitle:"{{agent}} 终端"},Wue={prompt:`使用 AgentKit Studio Plugin 端云接力当前会话、项目和任务。请直接执行,不要让我手动打开终端。 Studio:{{studioUrl}} 配对码:{{pairingCode}}`,installPrompt:`请安装 AgentKit Studio Plugin。请直接执行以下安装命令,不要让我手动打开终端。 -安装命令:{{command}}`,title:"接力到云端继续执行",description:"按顺序复制两段提示词,Codex 会通过插件将您的本地任务接力到云端",closeAria:"关闭本地迁移引导",installTitle:"安装插件",installDescription:"首次使用时,请选择一种安装方式。",copied:"已复制",copyInstallPrompt:"复制安装提示词",copyInstallCommand:"复制安装命令",installMethodAria:"插件安装方式",conversationInstall:"与 Codex 对话安装",terminalInstall:"从终端安装",taskTitle:"任务接力",taskDescription:"插件安装完成后复制,Codex 会迁移当前项目并继续执行任务。",copyHandoffPrompt:"复制接力提示词",generatingPairing:"正在生成新的配对码",pairingExpired:"配对码已过期",pairingRemaining:"配对码有效期剩余 {{countdown}}",refreshing:"刷新中",refreshPairing:"刷新配对码",pairingLoading:"正在生成配对码",pairingUnavailable:"配对码尚未生成。",statusAria:"端云接力状态",statusTitle:"接力状态",requestReceivedNamed:"已收到“{{name}}”的端云接力请求",requestReceivedCurrent:"已收到当前项目的端云接力请求",requestHelp:"复制接力提示词后,Codex 的请求会显示在这里。",entering:"正在进入",enterCodex:"进入 Codex",clipboardUnsupported:"当前浏览器不支持写入剪贴板。",steps:{request:"等待端侧请求",session:"创建云端 Session",restore:"恢复项目",continue:"发送续跑任务"},status:{issued:"等待请求",creating:"正在创建 Session",sessionCreated:"正在迁移项目",continuing:"正在启动云端任务",running:"云端执行中",completed:"接力完成",failed:"接力失败"}},Gue={model:{description:"显示或切换当前对话模型",keywords:"模型 switch"},models:{description:"列出 app-server 可用模型",keywords:"模型列表 list"},skill:{description:"浏览并调用当前工作区可用的 Skill",keywords:"技能 workflow"},skills:{description:"浏览并调用当前工作区可用的 Skills",keywords:"技能列表 workflow list"},new:{description:"开始一个新对话",keywords:"新建 对话"},resume:{description:"打开历史会话或恢复指定 Thread",keywords:"历史 恢复 session"},fork:{description:"从当前上下文分叉一个新对话",keywords:"分叉 branch"},compact:{description:"压缩当前对话上下文",keywords:"压缩 上下文"},archive:{description:"归档当前对话并新建对话",keywords:"归档 关闭"},status:{description:"显示当前连接、Thread、模型与 Token 状态",keywords:"状态 连接 token"},clear:{description:"清空当前视图并开始新对话",keywords:"清空 重置"},help:{description:"显示 Sandbox 支持的快捷命令",keywords:"帮助 命令"},currentModel:"当前模型",availableModel:"可用模型",workspace:"工作空间",notSet:"未设置",modelLabel:"模型",statusLabel:"状态",running:"运行中",idle:"空闲",totalTokens:"累计 Token",contextWindow:"上下文窗口",imageFallback:"图片",unknown:"未知快捷命令:{{command}}。输入 /help 查看可用命令。",automaticSkills:"智能开发模式会自动使用开发能力,无需手动选择 Skill。",activity:{new:"已新建 Codex 对话",resumed:"已恢复 Codex 对话",deleted:"已删除 Codex 历史会话",modelChanged:"已切换 Codex 模型",availableModels:"Codex 可用模型",noModels:"当前没有可用模型",forked:"已分叉 Codex 对话",compacting:"已开始压缩当前 Codex 对话",archived:"已归档 Codex 对话",status:"Codex 当前状态",help:"Sandbox 支持的 Codex 快捷命令"}},Xue={common:Lue,tool:$ue,threads:Fue,permissions:Bue,workspace:Uue,approval:Que,composer:zue,launch:Vue,session:Hue,agentDetails:que,agentWorkspace:Wue,handoff:Kue,commands:Gue},lMe=Object.freeze(Object.defineProperty({__proto__:null,agentDetails:que,agentWorkspace:Wue,approval:Que,commands:Gue,common:Lue,composer:zue,default:Xue,handoff:Kue,launch:Vue,permissions:Bue,session:Hue,threads:Fue,tool:$ue,workspace:Uue},Symbol.toStringTag,{value:"Module"})),Yue={retry:"重试",signInToContinue:"登录以继续使用",signInWith:"使用 {{provider}} 登录",enterUsername:"输入一个用户名即可开始",usernamePlaceholder:"用户名(字母 + 数字,最多 16 位)",enter:"进入",usernameInvalid:"只能包含大小写字母和数字,最多 16 位。",identityProvider:{volcengine:"火山引擎 Identity",byteplus:"BytePlus Identity"},powered:{volcengine:"火山引擎 AgentKit 提供企业级 Agent 解决方案",byteplus:"BytePlus AgentKit 提供企业级 Agent 解决方案"},legalPrefix:"继续即表示你已阅读并同意 AgentKit",terms:"产品和服务条款",copyright:"© {{year}} VeADK。保留所有权利。"},Zue={title:"登录状态已过期",description:"当前编辑内容会保留。重新登录后,刚才的操作将自动继续。",waiting:"等待登录完成…",signInAgain:"重新登录"},Jue={breadcrumbs:"面包屑",selectAgent:"选择 Agent",switchAgent:"切换智能体"},ede={cancel:"取消",close:"关闭确认框"},cMe={login:Yue,authExpired:Zue,navbar:Jue,confirm:ede},uMe=Object.freeze(Object.defineProperty({__proto__:null,authExpired:Zue,confirm:ede,default:cMe,login:Yue,navbar:Jue},Symbol.toStringTag,{value:"Module"})),tde={defaultUser:"用户",shortcuts:"快捷入口",tryCli:"体验 AgentKit CLI",developerResources:"开发者资源",systemInfo:"系统信息",language:"语言",issueFeedback:"问题反馈",logout:"退出登录",roles:{admin:"管理员",developer:"开发者",user:"普通用户"}},nde={home:"返回首页",expand:"展开侧边栏",collapse:"收起侧边栏",label:"主导航",newChat:"新会话",agents:"智能体",workspaces:"工作区",library:"资源库",cronjobs:"定时任务",automations:"自动化"},ide={title:"历史会话",newConversation:"新会话",create:"新建会话",loading:"正在加载历史会话…",empty:"暂无会话",current:"当前",manage:"管理历史会话:{{title}}",more:"更多",delete:"删除",loadingMore:"加载中…",loadMore:"加载更多",evaluatingTitle:"正在自动评测",evaluating:"评测中",generating:"正在生成"},dMe={account:tde,navigation:nde,history:ide},fMe=Object.freeze(Object.defineProperty({__proto__:null,account:tde,default:dMe,history:ide,navigation:nde},Symbol.toStringTag,{value:"Module"})),rde={placeholder:"请选择",collapseOptions:"收起模型选项",expandOptions:"展开模型选项",noOptions:"暂无可用选项",noMatches:"没有匹配项,可直接使用当前模型 ID"},sde={unsupportedActivity:"不支持的 Skill 对话活动",ariaLabel:"Skill 生成对话"},ade={code:"错误码:{{code}}",type:"错误类型:{{type}}",representation:"异常表示:{{value}}",rawResponse:`服务端原始响应: -{{value}}`,original:"原始错误:{{message}}",details:"详细信息"},ode={ariaLabel:"Skill 文件树",viewSource:"查看源码",viewPreview:"查看预览",download:"下载",binaryFile:"二进制文件",bytes:"{{value}} 字节",binaryDescription:"当前接口仅返回文件元数据,可单独下载原文件。",metadata:"Skill 元数据",noFiles:"暂无文件"},lde={close:"关闭",name:"名称",region:"地域",optionalDescription:"描述(可选)",cancel:"取消",create:"创建",creating:"创建中…",save:"保存",saving:"保存中…",upload:"上传",uploading:"上传中…",createSpaceTitle:"新建 Skill 空间",editSpaceTitle:"编辑 Skill 空间",uploadTitle:"上传到 {{name}}",createSpaceFailed:"创建 Skill 空间失败",updateSpaceFailed:"更新 Skill 空间失败",archiveValidationFailed:"Skill ZIP 格式校验失败",uploadFailed:"上传 Skill 失败",dropzone:"拖拽 Skill ZIP 到这里",chooseLocalFile:"或点击选择本地文件",archiveHelp:"ZIP 根目录需要包含 SKILL.md,也可以只包含一层包装目录。选择后仅检查格式,不会自动上传。",validating:"正在检查文件格式…",validationPassed:"格式检查通过:{{name}},共 {{count}} 个文件"},cde={styles:{concise:"简洁实用",strict:"严谨稳健",tutorial:"教程友好",automation:"自动化优先",custom:"自定义",customFallback:"自定义风格"},stages:{preparing:"正在准备 Dev Sandbox",ready:"Skill 已生成并通过格式校验",failed:"生成失败",cancelled:"已停止",validating:"正在校验 Skill 格式",packaging:"正在整理文件",generating:"正在生成 Skill",repairingAgain:"正在再次修复",autoRepairing:"正在自动修复({{attempt}}/{{max}})"},validation:{fallback:"Skill 格式校验未通过",repairInstruction:"只修复下面列出的 Skill 格式错误,不要改变原有用途和内容范围。",recheckInstruction:"修复后重新检查目录结构、SKILL.md frontmatter 和所有文本文件。",nameTooLong:"Skill 名称不能超过 64 个字符",invalidName:"Skill 名称只能包含小写字母、数字和连字符",modelTooLong:"模型 ID 不能超过 128 个字符",invalidModel:"模型 ID 只能包含字母、数字、点、下划线、连字符、斜杠和冒号"},errors:{loadCapability:"读取 Dev Sandbox 配置失败",autoRepair:"自动修复格式错误失败",pollCandidate:"读取候选方案状态失败,正在重试",createCandidate:"创建候选方案失败",refine:"继续调整失败",repairAgain:"再次修复格式错误失败",selectSpace:"请选择上传的 Skill Space",unsupportedRegion:"当前 Skill 地域不受支持",upload:"上传 Skill 失败",download:"下载失败"},sessionMax:"Session 最长保留 1 小时",remaining:"剩余 {{minutes}}:{{seconds}}",unnamedSpace:"未命名 Skill Space",leaveConfirmation:"离开后将停止并释放正在运行的 Dev Sandbox,确定离开吗?",createTitle:"创建技能",optimizeTitle:"优化 {{name}}",skillFallback:"技能",back:"返回技能空间",home:"主页技能生成",basicInfo:"基本信息",goal:"目标",createIntentPlaceholder:"描述希望这个 Skill 完成什么任务",optimizeIntentPlaceholder:"描述希望如何优化当前 Skill",skillName:"Skill 名称",autoNamePlaceholder:"留空时自动生成",nameHelp:"仅支持小写字母、数字和连字符;留空时自动生成。",createPlans:"生成方案",optimizePlans:"优化方案",createPlansDescription:"按不同方案并行生成多个技能,您可以选择最佳结果",optimizePlansDescription:"按不同方案并行优化当前技能,您可以选择最佳结果",plan:"方案 {{count}}",remove:"移除",model:"模型",modelPlaceholder:"选择或输入模型 ID",style:"风格",customStyle:"自定义风格",customStylePlaceholder:"描述表达方式、严谨程度或输出偏好",addConfiguration:"添加配置",notConfigured:"管理员未配置",generate:"生成",candidates:"候选方案",progress:"进度",retryCandidate:"重试此方案",formatValidationFailed:"格式校验未通过",repairAgain:"再次修复",files:"文件",downloadZip:"下载 ZIP",loadingFiles:"正在读取文件…",filesPending:"生成过程中会在这里显示完整文件树",uploadToSpace:"上传到 Skill Space",loadingSpaces:"正在加载 Skill Space",selectSpace:"选择 Skill Space",continuePlaceholder:"继续调整这个候选方案",continue:"继续调整",uploading:"上传中…",overwrite:"覆盖原 Skill",uploadToSelectedSpace:"上传到 Skill Space",uploadToCurrentSpace:"上传到当前空间",allCandidatesFailed:"所有方案均创建失败,可分别重试。"},ude={invalidFormat:"{{label}}格式错误。",recoveryStatus:"Skill 恢复点状态",errorResponse:"错误响应",errorDetails:"错误详情",missingContentType:"Content-Type 缺失",gatewayError:"{{fallback}}(HTTP {{status}},Content-Type: {{contentType}})。请检查代理或网关配置。",nonJson:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}},Content-Type: {{contentType}}),请检查代理或网关配置。",activity:"Skill 会话活动",invalidActivity:"Skill 会话活动格式错误。",invalidToolActivity:"Skill 工具活动格式错误。",invalidTextActivity:"Skill 文本活动格式错误。",publication:"Skill 发布结果",task:"Skill 会话",file:"Skill 文件",unknownTaskState:"Skill 会话状态无法识别。",capability:"Skill 工作台能力",loadCapability:"读取 Skill 工作台能力失败",prepareTask:"准备 Skill 会话失败",taskReference:"Skill 会话引用",startOptimization:"开始优化 Skill 失败",startTask:"开始 Skill 会话失败",taskSummary:"Skill 会话摘要",taskList:"Skill 会话列表",loadTaskList:"读取 Skill 会话列表失败",invalidTaskList:"Skill 会话列表格式错误。",loadTask:"读取 Skill 会话失败",artifact:"Skill 产物",artifactFile:"Skill 产物文件",loadArtifact:"读取 Skill 产物失败",refine:"继续调整 Skill 失败",stop:"停止当前 Skill 任务失败",publish:"发布 Skill 失败",nonNdjson:"发布 Skill 失败:服务端返回了非 NDJSON 响应。",missingStream:"发布 Skill 失败:服务端没有返回进度流。",publishProgress:"发布进度",invalidPublishProgress:"发布进度格式错误。",publishError:"发布错误",unknownPublishEvent:"未知的发布进度事件。",publishResult:"发布结果",streamEnded:"发布进度流提前结束,无法确认发布结果。请刷新技能中心确认状态。",deleteTask:"删除 Skill 会话失败",download:"下载 Skill 失败"},dde={configSelect:rde,conversation:sde,errorDetails:ade,fileTree:ode,management:lde,generation:cde,api:ude},hMe=Object.freeze(Object.defineProperty({__proto__:null,api:ude,configSelect:rde,conversation:sde,default:dde,errorDetails:ade,fileTree:ode,generation:cde,management:lde},Symbol.toStringTag,{value:"Module"})),fde={back:"返回上一页",reload:"重新加载",notConfigured:"未配置",name:"名称",description:"描述",delete:"删除",save:"保存",saving:"保存中",add:"添加",manage:"管理",environment:"环境",noDescription:"暂无描述",refresh:"刷新",close:"关闭",retry:"重试",loading:"加载中…",previousPage:"上一页",nextPage:"下一页",edit:"编辑",all:"全部",search:"搜索",cancel:"取消",view:"查看",viewDetails:"查看详情",deleting:"删除中…",create:"创建",creating:"创建中",adding:"添加中",generating:"生成中",uploading:"上传中",preview:"预览",loadFailed:"加载失败",select:"选择",collapse:"收起",expand:"展开",none:"无"},hde={ariaLabel:"AgentKit 快速入口",closeAriaLabel:"关闭 AgentKit 欢迎卡片",title:"欢迎使用 AgentKit",description:"通过 AgentKit 平台快速构建与托管您的企业级智能体",docsAriaLabel:"打开 AgentKit 文档,在新窗口打开",docs:"文档",consoleAriaLabel:"打开 AgentKit 控制台,在新窗口打开",console:"控制台"},pde={checkUpdates:"检查更新",checkingVersions:"正在检查版本…",versionCheckError:"查询沙箱版本失败,请检查凭据、区域及接口权限后重试",sandboxUpdateError:"Sandbox 更新失败,请刷新检查实际状态后重试",modelEnvRepairUnavailable:"无法补齐模型环境变量,请检查 CODEX_API_KEY 和 CODEX_BASE_URL",updateSandbox:"更新{{variant}}{{name}}",updatingSandbox:"更新中",title:"系统信息",description:"查看当前 Studio 版本及关联的基础资源",general:"通用",currentVersion:"当前版本",storage:"存储",loadingStorage:"正在加载存储信息",tosAddress:"TOS 地址",openTosConsole:"在云控制台中打开 TOS 存储桶",environmentBuild:"环境构建",loadingEnvironmentResources:"正在加载环境构建资源",environmentResourcesError:"环境构建资源加载失败,请检查云凭据后重试。",codePipelineWorkspace:"CodePipeline 工作空间",codePipelinePipeline:"CodePipeline 流水线",openCodePipelineWorkspace:"在云控制台中打开 CodePipeline Workspace",createdOnFirstBuild:"首次构建时自动创建",containerRegistryRepository:"Container Registry 仓库",openContainerRegistryRepository:"在云控制台中打开 Container Registry 仓库",sandboxInfo:"沙箱信息",loadingSandboxInfo:"正在加载沙箱信息",sandboxInfoError:"沙箱信息加载失败,请重试。",snapshot:"快照版",snapshotWithSpace:"快照版 ",openToolConsole:"在云控制台中打开{{name}}",updateModelEnv:"更新{{variant}}{{name}}模型环境变量",modelEnvUpdated:"已更新",modelEnvAlreadyCurrent:"无需更新",userPool:"用户池",loadingUserPool:"正在加载用户池",userPoolError:"用户池加载失败,请重试。",modelEnvUpdateError:"模型环境变量更新失败,请重试。",openUserPoolConsole:"在云控制台中打开用户池{{name}}",unnamedUserPool:"未命名用户池",id:"ID",domain:"域名",region:"区域",noLocalUserPool:"本地模式未配置用户池",noUserPool:"当前 Studio 未配置用户池"},mde={workspace:"Agent 工作区",library:"Agent 库",evaluation:"评测",agentList:"Agent 列表",agentDetails:"Agent 详情",newAgent:"新建 Agent",loading:"加载中…",loadingCloudAgents:"正在加载云端 Agent…",noAgentSelected:"请选择一个 Agent",local:"本地",remote:"云端",localAgent:"本地 Agent",remoteAgent:"云端 Agent",agentCount:"{{count}} 个 Agent",agentCountLabel:"Agent 数量",details:"详情",chat:"对话",update:"更新",backToAgentList:"返回 Agent 列表",loadingAgent:"正在加载 Agent",loadingAgentDescription:"正在读取 Agent 配置和 Runtime 信息。",loadingAgentInfo:"正在加载 Agent 信息…",detailLoadFailed:"无法加载 Agent 详情",detailLoadFailedDescription:"请检查 Runtime 状态后重试。",partialInfoUnavailable:"部分信息暂时不可用",upgradeRuntimeForDetails:"请升级 Runtime 以查看完整 Agent 信息。",basicInfo:"基本信息",usageOverview:"使用概览",sections:{basic:"基本信息",usage:"使用概览",evaluations:"评测",optimizations:"优化建议",integrations:"集成",versions:"版本"},evaluationGroup:"评测组",optimizations:"优化建议",optimizationsDescription:"根据评测结果查看可执行的优化建议。",integrations:"集成",githubVersions:"GitHub 版本",githubVersionsDescription:"查看持续交付产生的版本并创建回退 PR。",currentVersionOnly:"当前未启用 GitHub 持续交付,仅展示当前生产版本。",loadingVersions:"正在加载版本…",noVersion:"暂无版本记录",prLink:"Pull Request",viewPr:"查看 PR",author:"提交人",publishStatus:"发布状态",viewRelease:"查看发布记录",rollbackToVersion:"回退到此版本",rollingBack:"正在创建回退…",rollbackEvent:"回退事件",sourceMergedRuntimeStill:"最新源码已合并,但 Runtime 仍处于",currentProductionVersionHint:";当前生产版本保持不变。",usageSummary:"使用统计",totalCalls:"总调用次数",userCount:"用户数",userDetails:"用户明细",usageUserList:"Agent 使用用户列表",user:"用户",callCount:"调用次数",lastUsed:"最近使用",unknownUser:"未知用户",loadingUsage:"正在加载使用数据…",refreshing:"刷新中…",noUsage:"暂无使用记录",usageUnavailable:"当前 Agent 暂无可用的使用统计。",usagePagination:"使用记录分页",pageOf:"第 {{page}} / {{total}} 页",notProvided:"暂未提供",integrationMethods:"集成方式",integrationDescription:"通过 Runtime API 或 A2A 协议集成当前 Agent。",integrationProtocol:"集成协议",runtimeStatus:"Runtime 状态",executionFlow:"执行流程",probingIntegration:"正在检测集成能力",probingIntegrationDescription:"正在读取可用端点和鉴权配置。",configurationStatus:"配置状态",discoveryEndpoint:"发现端点",invocationEndpoint:"调用端点",invocationUrl:"调用地址",authentication:"鉴权方式",networkAccess:"网络访问",notAvailable:"暂无",noAuthentication:"无需鉴权",noApiKeyRequired:"无需 API Key",usesOauthJwt:"使用 OAuth / JWT",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",pythonExample:"Python 示例",deploymentConfig:"部署配置",deploymentConfigDescription:"确认实例和运行配置后更新 Runtime。",deploymentRegion:"部署区域",concurrency:"并发数",selectedOptimizations:"已选优化项",selectedOptimizationsDescription:"这些优化会应用到本次更新。",optimizationProfile:"优化方案",updatePending:"等待更新",updatingDeployment:"正在更新部署",restoringUpdateConfig:"正在恢复更新配置…",updateConfigUnavailable:"无法读取更新配置",legacyConfigMissing:"旧版本 Runtime 缺少可恢复的配置,请重新创建。",deploymentFailed:"部署失败",continueEditing:"继续编辑",loadingOptimizations:"正在加载优化建议…",noOptimizations:"暂无优化建议",fixPriority:"优先级",suggestedModule:"建议模块",suggestionAndReason:"建议与原因",priority:{high:"高",medium:"中",low:"低"},modules:{agentStructure:"Agent 结构",prompt:"提示词",tool:"工具",knowledge:"知识库",memory:"记忆",workflow:"工作流",other:"其他"},evaluationGroupList:"评测组列表",newEvaluationGroup:"新建评测组",newEvaluationGroupName:"新评测组 {{count}}",searchEvaluationGroups:"搜索评测组",noMatchingEvaluationGroups:"没有匹配的评测组",noEvaluationGroupSelected:"请选择一个评测组",groupStats:"{{agents}} 个 Agent · {{runs}} 次运行",evaluationGroupDetails:"评测组详情",evaluationGroupStats:"{{agents}} 个 Agent · {{caseSet}} · {{runs}} 次运行",startEvaluation:"开始评测",evaluationConfig:"评测配置",historyResults:"历史结果",participatingAgents:"参与 Agent",selectedCount:"已选择 {{count}} 个",evaluationResources:"评测资源",evaluationSet:"评测集",evaluator:"评估器",caseCount:"{{count}} 条案例",evaluationMetrics:"评测指标",selectedMetricCount:"已选择 {{count}} 项",historyDescription:"查看每次评测的分数和运行状态。",noHistory:"暂无评测历史",noHistoryDescription:"运行一次评测后,结果会显示在这里。",evaluationRun:"第 {{index}} 次评测",evaluationRunMeta:"{{time}} · {{agents}} 个 Agent",overallScore:"综合分",completed:"已完成",evaluationDefaults:{coreRegression:"核心能力回归",safetyCheck:"安全与幻觉检查",coreSet:"核心回归集",safetySet:"安全边界集",toolSet:"工具调用集",qualityEvaluator:"综合质量评估器",factualEvaluator:"事实一致性评估器",toolEvaluator:"工具调用评估器",responseQuality:"回答质量",factualAccuracy:"事实准确性",toolUse:"工具调用",responseEfficiency:"响应效率",todayTime:"今天 10:32",yesterdayTime:"昨天 16:08",julyTime:"7 月 25 日 14:20",justNow:"刚刚"},defaultCases:{agentName:"示例 Agent",goodSetName:"示例正向案例集",badSetName:"示例负向案例集",weeklyFeedback:{input:"总结本周客户反馈,并按优先级归类。",output:"覆盖主要问题,给出清晰的优先级与下一步动作。",tag:"总结",reason:"任务完整覆盖了用户目标,输出结构清晰,并给出了可执行的下一步动作。"},research:{input:"查询最新公开资料并附上来源。",output:"调用搜索工具,结论与引用一一对应。",tag:"工具调用"},uncertainConclusion:{input:"在信息不足时直接给出确定结论。",output:"应明确说明未知,并主动询问缺失信息。",tag:"幻觉",reason:"信息不足时仍给出了确定结论,缺少必要的澄清步骤与不确定性说明。"},repeatedTool:{input:"连续重复调用相同工具获取同一结果。",output:"复用已有结果,避免无意义的重复调用。",tag:"效率"}},goodCases:"正向案例",badCases:"负向案例",goodCase:"正向案例",badCase:"负向案例",reference:"参考答案",caseResultFilter:"案例结果筛选",feedbackSourceFilter:"反馈来源筛选",searchCases:"搜索案例",searchCasesPlaceholder:"搜索输入、输出或标签",selectCases:"选择案例",selectAll:"全选",selectAllVisible:"选择当前可见案例",selectedCaseCount:"已选择 {{count}} 条",deleteSelected:"删除所选",deleteSelectedTitle:"删除所选 Agent",deleteSelectionDescription:"确定删除所选的 {{count}} 个项目吗?此操作无法撤销。",deleteCasesConfirm:"删除所选案例",deleteOneCaseConfirm:"删除这个案例",deleteFeedbackCase:"删除反馈案例",noFeedbackCases:"暂无反馈案例",noMatchingCases:"没有匹配的案例",loadingEvaluationSet:"正在加载评测集…",userInput:"用户输入",agentOutput:"Agent 输出",score:"得分",scoreReason:"评分原因",noUserInput:"暂无用户输入",noVisibleResponse:"暂无可见回复",note:"备注:",manualFeedback:"人工反馈",automaticFeedback:"自动反馈",scoreValue:"{{score}} 分",unknownTime:"时间未知",deleteAgentTitle:"删除 Agent",deleteAgentDescription:"确定删除 Agent“{{name}}”吗?",deleteDraftDescription:"确定删除草稿“{{name}}”吗?",deleteAgent:"删除 Agent",closeDeleteConfirmation:"关闭删除确认",draftDeletionWarning:"草稿将从当前浏览器中删除。",runtimeDeletionWarning:"Runtime 和相关云端资源将被删除。",noneSelected:"尚未选择",none:"无",notPublished:"未发布",notRecorded:"未记录",noTime:"暂无时间",noPr:"暂无 PR",comingSoon:"评测能力即将开放",preparing:"准备中",cancelled:"已取消",failed:"失败",totalCount:"共 {{count}} 条",deploymentProgress:"部署进度",returnToEdit:"返回编辑",buildLog:"构建日志",githubMountLog:"GitHub 挂载日志",githubDeliveryMountLog:"GitHub 持续交付挂载日志",waitingBuildLog:"正在等待构建日志…",waitingGithubMountLog:"正在等待 GitHub 挂载日志…",copy:"复制",copied:"已复制",copyLabel:"复制{{label}}",copiedLabel:"已复制{{label}}",logLines:"{{count}} 行",logStatus:{synced:"已同步",failed:"读取失败",syncing:"同步中",earlyOmitted:"已省略早期日志",recentOnly:"仅显示最近的构建日志",partiallyOmitted:"已省略部分日志"},deployStatus:{running:"正在部署",success:"部署完成",error:"部署失败",cancelled:"部署已取消"},deploymentSteps:{prepare:{label:"准备部署",description:"校验配置并创建部署任务"},build:{label:"构建镜像",description:"生成运行环境与智能体代码"},deploy:{label:"部署服务",description:"创建并启动 AgentKit Runtime"},publish:{label:"发布服务",description:"等待服务就绪并生成访问地址"},complete:{label:"部署完成",description:"智能体已可以正常使用"},evaluation:{label:"创建评测集",description:"自动创建 Good Case 和 Bad Case 评测集"},github:{label:"挂载 GitHub 持续交付",description:"初始化目标分支与 GitHub Actions workflow"},update:{label:"更新实例配置",description:"将 Runtime 实例数调整为 {{min}}~{{max}}"}},githubStatus:{published:"已发布",publishing:"发布中",failed:"发布失败",pending:"等待发布",unknown:"未知"},errors:{agentInfoMissing:"Agent 信息不可用",checkUpdateCapability:"无法检查更新能力",checkingUpdateConfig:"正在检查更新配置",cloudOnlyUpdate:"仅云端 Agent 支持更新",deleteDeployedUnsupported:"当前不支持删除已部署 Agent",deleteDraftUnsupported:"当前不支持删除草稿",loadAgentInfo:"无法加载 Agent 信息",loadApiKey:"无法读取 API Key",loadGithubVersions:"无法加载 GitHub 版本",loadEvaluations:"无法加载评测案例",loadOptimizations:"无法加载优化建议",loadRuntimeDetails:"无法加载 Runtime 详情",loadUsage:"无法加载使用数据",noCreatePermission:"当前账号没有创建 Agent 的权限",noManagePermission:"当前账号没有管理此 Agent 的权限",originalConfigUnavailable:"原始配置不可用",probeIntegration:"无法检测集成能力",rollbackVersion:"无法创建版本回退",runtimeRegionMissing:"Runtime 区域信息缺失",updateCapabilityMismatch:"Runtime 更新能力与当前配置不匹配",updateCapabilityPending:"Runtime 更新能力仍在确认中",updateConfigRestoring:"正在恢复更新配置",updateUnsupported:"当前 Runtime 不支持更新",usageMismatch:"返回的使用数据与当前 Agent 不匹配"}},gde={title:"环境",loadFailed:"环境加载失败,请检查存储配置后重试。",create:"新建环境",configure:"配置环境",details:"环境详情",editorDescription:"配置运行环境,或接入代码仓库和已有镜像",backToList:"返回环境列表",save:"保存环境",createAndBuild:"创建并构建",saveAndBuild:"保存并构建",name:"环境名称",namePlaceholder:"Python 数据处理",descriptionPlaceholder:"说明这个环境适合处理的任务",creationMethod:"创建方式",baseConfiguration:"基础配置",baseEnvironment:"基础环境",operatingSystem:"操作系统",pythonVersion:"Python 版本",fixedByBase:"由 {{base}} 固定为 {{value}}",selectUbuntuVersion:"选择基础镜像的 Ubuntu 版本",selectPythonVersion:"选择需要安装的 Python 版本",skills:"技能",addSkill:"添加环境技能",veadkDescription:"Agent 开发与运行框架",customDockerfile:"自定义 Dockerfile",presetEnvironment:"预制环境",presetHint:"选择“无”可自行填写 Dockerfile 第一行的基础镜像。",dockerfileSize:"{{size}} / {{max}} 字节",upload:"上传",reset:"重置",dockerfileBaseImage:"Dockerfile 基础镜像",dockerfileContent:"Dockerfile 内容",region:"区域",search:"搜索环境",manualImport:"手动导入",noMatches:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称",startBuild:"开始构建",build:"构建",unnamed:"未命名环境",listSeparator:"、",clipboardReadError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。",creation:{custom:{label:"自定义配置",description:"通过表单选择基础环境、Python、工具和技能"},dockerfile:{label:"自定义 Dockerfile",description:"上传或直接编辑 Dockerfile"},git:{label:"从代码仓库构建",description:"探查公开仓库并通过 CodePipeline 构建"},image:{label:"使用已有镜像",description:"绑定由外部流水线交付的 CR 镜像"}},baseDescriptions:{"aio-sandbox":"内置 Sandbox Shell 能力 · Ubuntu 22.04","codex-sandbox":"内置 Codex CLI、浏览器与代码执行环境",ubuntu:"标准 Linux 基础镜像"},dockerfileValidation:{baseImageRequired:"请填写基础镜像。",duplicateFrom:"基础镜像已固定在第一行,请删除 Dockerfile 正文中的 FROM 指令。",tooLarge:"Dockerfile 不能超过 128 KiB。",empty:"Dockerfile 内容不能为空。",missingFrom:"Dockerfile 缺少 FROM 指令。"},presets:{none:"自行填写 Dockerfile 基础镜像",aio:"内置 Sandbox Shell 与常用运行时",codex:"内置 Codex CLI、浏览器与代码执行环境"},categories:{tools:"工具",productivity:"效率",browser:"浏览器自动化",system:"系统与媒体"},options:{"lark-cli":"飞书开放平台命令行工具",pandoc:"文档格式转换工具",opencli:"将网站与桌面应用转换为命令行工具",uv:"快速 Python 包与项目管理器",ripgrep:"高性能文本检索工具",jq:"JSON 查询与转换工具","github-cli":"在终端中管理 GitHub 工作流",playwright:"浏览器自动化与端到端测试",chromium:"无头浏览器运行时",git:"代码版本管理",curl:"网络请求与文件下载",ffmpeg:"音视频转码与处理",imagemagick:"图片转换与批处理"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒",hoursMinutes:"{{hours}} 小时 {{minutes}} 分"},buildStatus:{preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"构建失败",notBuilt:"未构建"},manifest:{title:"环境 Manifest",closeLabel:"关闭环境 Manifest",loading:"正在加载 Manifest",editorLabel:"环境 Manifest YAML",copyFailed:"复制失败,请重试",copied:"已复制",copy:"复制 Manifest",view:"查看环境 Manifest",viewShort:"查看 Manifest",unavailable:"尚无可用 Manifest"},buildDetails:{title:"构建详情",closeLabel:"关闭构建详情",currentStep:"当前步骤",waiting:"等待构建信息",elapsed:"已用时",sourceCommit:"源码提交",openCodePipeline:"在 CodePipeline 中查看",starting:"正在启动",rebuild:"重新构建"},git:{sectionLabel:"公开代码仓库",address:"Git 地址",ref:"Branch、Tag 或 Commit",defaultBranch:"默认分支",inspecting:"正在拉取仓库并查找 Dockerfile",foundDockerfiles:"已在提交 {{commit}} 中找到 {{count}} 个 Dockerfile。",savedDockerfileLoaded:"已载入保存的 Dockerfile,可重新探查仓库更新。",noDockerfile:"仓库中未找到 Dockerfile,请检查分支或仓库内容。",inspectAgain:"重新探查",selectDockerfile:"选择 Dockerfile"},repository:{outputSection:"构建输出",type:"镜像仓库类型",managed:"Studio 默认镜像仓库",existing:"已有镜像仓库",managedHint:"构建时自动创建或复用当前区域的 Studio 镜像仓库。"},existingImage:{sectionLabel:"已有镜像",reference:"Tag 或 Digest",placeholder:"latest 或 sha256:...",hint:"填写镜像 Tag,或以 sha256: 开头的完整 Digest。"},share:{action:"分享",title:"分享环境",closeLabel:"关闭分享环境",generating:"正在生成并复制分享码",copied:"分享码已复制",failed:"分享失败",code:"分享码",fullCode:"完整环境分享码",copiedHint:"分享码已自动复制,也可在这里查看或手动复制。",copyFailedHint:"自动复制失败,可手动复制上方分享码,或重试。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅发送给可信对象。",copyAgain:"再次复制"},import:{title:"导入环境",closeLabel:"关闭导入环境",description:"先检测分享码中的环境,再确认添加到当前账号。",code:"环境分享码",tooMany:"最多可一次导入 {{max}} 个环境,当前检测到 {{count}} 个分享码。",multipleHint:"多个分享码可使用英文逗号、中文逗号或换行分隔,重复项会自动忽略。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅导入可信来源的分享码。",inspectingCodes:"正在检测环境分享码",found:"检测到 {{count}} 个环境:{{names}}。",itemError:"第 {{index}} 个分享码:{{error}}",invalidCode:"分享码无效。",noResult:"服务未返回该分享码的导入结果。",partial:"已导入 {{created}} 个环境,{{remaining}} 个未完成,可重试有效失败项。",inspecting:"正在检测",importing:"正在导入",retryImport:"重试导入",confirm:"确认导入",inspectCodes:"检测分享码"},status:{boundImage:"环境“{{name}}”已绑定已有镜像",queued:"环境“{{name}}”已进入构建队列",savedBuildFailed:"环境已保存,但构建未启动:{{error}}",importedFailed:"已导入 {{created}} 个环境,{{failed}} 个失败",importedDuplicate:"已导入 {{created}} 个环境,{{duplicate}} 个分享码已存在",imported:"已导入 {{count}} 个环境",deleted:"已删除环境“{{name}}”"},deleteTitle:"删除环境",deleteDescription:"确定删除环境“{{name}}”吗?删除后无法恢复。",errors:{repositoryRequired:"请输入公开代码仓库地址。",repositoryHttps:"请输入公开仓库的 HTTPS 地址。",repositoryInvalid:"请输入有效的公开仓库 HTTPS 地址。",imageReferenceWhitespace:"Tag 或 Digest 不能包含空格。",imageDigestInvalid:"Digest 必须是完整的 sha256 值。",imageTagOnly:"这里只填写 Tag,不要重复填写镜像仓库路径。"}},bde={searchPlaceholder:"搜索资源名称",emptyMessage:"暂无可用选项",searchAriaLabel:"搜索{{label}}",loadingMore:"正在加载更多资源…"},yde={retryDeployment:"重试部署",retrying:"正在重试…",collapse:"收起错误信息",expand:"展开完整错误信息",copy:"复制完整错误信息"},vde={steps:"构建步骤",log:"构建日志",syncing:"同步中",loadFailed:"读取失败",synced:"已同步",recentOnly:" · 仅显示最近日志",copiedLog:"已复制构建日志",copyLog:"复制构建日志",copied:"已复制",copy:"复制",logContent:"构建日志内容",waiting:"正在等待 CodePipeline 输出日志…",empty:"暂无构建日志"},xde={defaultLabel:"Studio 默认环境",defaultDescription:"使用 Studio 预置的标准运行环境",status:{notBuilt:"未构建",preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"失败"},label:"运行环境",placeholder:"请选择运行环境",search:"搜索运行环境",loading:"正在加载运行环境…",loadFailed:"加载运行环境失败",noMatches:"未找到匹配的运行环境",unavailable:"当前没有可用的运行环境",selectionUnavailable:"所选运行环境当前不可用,请重新选择。",selectionHint:"选择构建完成的运行环境后,部署将使用其镜像和工具配置。",versionChanged:"所选环境版本已更新,请确认后继续。",versionMissing:"所选环境版本已不存在,请重新选择。",operatingSystem:"操作系统",language:"语言",image:"镜像",imageVersion:"镜像版本",skills:"技能",tools:"工具",noSkills:"未配置 Skill",noExtraTools:"未配置额外工具",defaultGuidance:"默认环境由 Studio 管理,无需额外配置。",persistenceFallback:"持久化环境服务暂不可用,当前使用默认环境。",emptyFallback:"当前没有可选择的自定义环境。"},Ode={repository:"GitHub 仓库",githubUrl:"GitHub 地址",token:"访问令牌",sessionToken:"{{provider}} 临时令牌",runtime:"Runtime",commit:"提交",workflow:"工作流",syncFailed:"同步 GitHub 代码失败",status:{mounted:"已挂载",bound:"已绑定",synced:"已同步",created:"已创建"},volcengine:"火山引擎",mountDelivery:"挂载持续交付",selectedForDeployment:"已选择,部署时挂载",mountOnDeploy:"部署时挂载持续交付",syncCode:"同步代码",deliveryMode:"GitHub 交付模式",sourceSync:"GitHub 代码同步",delivery:"GitHub 交付",loading:"读取中",running:"执行中",runtimeDeliveryHint:"写入 AgentKit Runtime GitHub Actions workflow,后续 GitHub 提交会更新绑定 Runtime。",initialDeliveryHint:"首次部署成功后初始化目标分支,后续 GitHub 提交会更新绑定 Runtime。",sourceSyncHint:"Studio 会直接 push 到目标分支;该分支由 Studio 管理,远端冲突时同步会失败。Runtime 仍由部署按钮发布。",tokenPlaceholder:"repo 或 contents write 权限",targetBranch:"目标分支",actionsSecretPlaceholder:"用于写入 GitHub Actions Secret",sessionTokenPlaceholder:"临时凭证可选",syncing:"同步中…",pendingHint:"已选择挂载持续交付。点击部署后,Studio 会等待 Runtime 创建完成并初始化 GitHub 目标分支,初始化成功后才完成部署流程。",result:{deliveryMounted:"已挂载持续交付",deliverySelected:"已选择挂载持续交付",githubBound:"已绑定 GitHub",codeSynced:"代码已同步",deliveryHint:"目标分支提交会触发 Runtime 持续交付。",boundHint:"更新并发布时会先同步当前源码到这个分支。"},branch:"分支",viewPr:"查看 PR",createFailed:"创建失败",phase:"阶段",log:"日志"},wde={name:"飞书",enabling:"正在启用并更新配置…",description:"接收消息并通过飞书机器人回复",configuration:"飞书配置",configurationMode:"飞书配置方式",automatic:"自动配置",manual:"手动配置",cancelling:"取消中…",scanToCreate:"扫码创建",scanDescription:"授权后自动回填凭据",generateQrCode:"生成二维码",qrCodeAlt:"飞书机器人配置二维码",scanToConfirm:"飞书扫码确认",expiresIn:"{{time}} 后失效",created:"机器人已创建",credentialsFilled:"应用凭据已自动回填",qrCodeExpired:"二维码已失效",automaticFailed:"自动配置失败",regenerateQrCode:"请重新生成二维码。",configuredPlaceholder:"已配置,留空沿用",appSecretPlaceholder:"请输入 App Secret",hideSecret:"隐藏 App Secret",showSecret:"显示 App Secret"},Sde={mode:{auto:"自动创建",autoDescription:"部署时自动创建所需资源",recommended:"推荐",create:"指定名称",createDescription:"使用指定名称创建或复用资源",existing:"选择已有",existingDescription:"从当前账号的已有资源中选择"},selectExisting:"请选择已有资源",searchResource:"搜索资源名称",noMatch:"未找到匹配资源",noAvailable:"暂无可用资源",searching:"正在搜索云资源…",loading:"正在加载云资源…",noMatchSentence:"未找到匹配资源。",noAvailableSentence:"暂无可用资源。",loadedSummary:"实际服务区域:{{region}} · 已加载 {{loaded}}{{total}}",registryInstance:"Registry 实例",registryAriaLabel:"镜像仓库 Registry 实例",namespace:"命名空间",namespaceAriaLabel:"镜像仓库 Namespace",repository:"镜像仓库",existingRepository:"已有镜像仓库",selectRegistryFirst:"请先选择 Registry 实例。",selectNamespaceFirst:"请先选择 Namespace。",configurationMode:"配置方式",configurationModeAriaLabel:"{{resource}}配置方式",selectConfigurationMode:"请选择配置方式",automaticNames:"自动创建名称",validation:{tos:"请填写或选择 TOS 存储桶。",cr:"请完整填写或选择 CR 实例、命名空间和镜像仓库。",codePipeline:"请完整填写或选择 CodePipeline Workspace 和 Pipeline。",existingCodePipeline:"请选择已有的 CodePipeline Workspace 和兼容 Pipeline。"},autoBucketWithRegion:"agentkit-platform-{账号 ID}-{{region}}",autoBucket:"agentkit-platform-{账号 ID}",tosBucket:"TOS 存储桶",bucketName:"存储桶名称",bucketNamePlaceholder:"输入存储桶名称",existingBucket:"已有存储桶",existingTosBucket:"已有 TOS 存储桶",bucket:"存储桶",accountIdResolved:"账号 ID 在部署时按当前云账号解析。",containerRegistry:"容器镜像仓库(CR)",instanceName:"实例名称",crInstance:"CR 实例",existingCrInstance:"已有 CR 实例",existingCrNamespace:"已有 CR 命名空间",existingCrRepository:"已有 CR 镜像仓库",autoRegistry:"agentkit-platform-{账号 ID}",autoRepositoryName:"{{name}}-{4 位随机字符}",registryNameNote:"账号 ID 在部署时解析,镜像仓库的随机字符在部署时生成。",workspace:"工作空间",pipeline:"流水线",workspaceName:"Workspace 名称",pipelineName:"Pipeline 名称",existingWorkspace:"已有 CodePipeline Workspace",compatiblePipeline:"兼容 Pipeline",existingPipeline:"已有 AgentKit CodePipeline",pipelineNameNote:"Pipeline 与 Runtime 名称一致。"},kde={commit:"提交",steps:{permissions:"预检 OTA 所需权限",resolving:"读取目标版本信息",downloading:"下载并校验完整更新包",preparing:"准备 VeFaaS Function 代码",provisioning:"检查并补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布新 Revision 并重启服务"},stages:{permissions:"预检 OTA 权限",resolving:"读取版本信息",downloading:"下载更新包",preparing:"准备 Function 代码",provisioning:"补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布 Revision",checking:"检查更新",unknown:"未知阶段"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒"},logPermissionPrefix:"无法读取 VeFaaS 发布日志。Function 角色缺少 ",logPermissionSuffix:" 权限,更新会继续。",openIamConsole:"前往 IAM 控制台配置权限",deploymentProgress:"部署进度",live:"实时",completed:"已完成",stopped:"已停止",copied:"已复制",copyFailed:"复制失败",copyLog:"复制日志",waitingForLogs:"等待 VeFaaS 返回更新日志…",noLogs:"本次更新未返回发布日志",messages:{updated:"Studio 已更新,新 Revision 已接管服务",failed:"Studio 更新失败",timeout:"等待 VeFaaS 发布超时,请稍后重新检查版本",submitted:"更新已提交,正在等待 VeFaaS 发布新版本",connectionSwitched:"连接已切换,正在确认新版本状态"},checkingPermissions:"正在检查 OTA 权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",updated:"Studio 已更新",updateToVersion:"更新 Studio 至 {{version}}",checkPermissions:"检查更新权限",authorizationNeeded:"需要授权",updatingShort:"正在更新",refreshForNewVersion:"刷新使用新版",updateFailed:"更新失败",updateNow:"立即更新",newVersionAvailable:"有新版更新",dialog:{failed:"Studio 更新失败",checkingPermissions:"正在检查更新权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",completed:"Studio 更新完成",newVersion:"发现新版本"},permissionCheck:"正在核对 OTA 与定时任务所需的全部 IAM 权限…",permissionCheckHint:"权限全部满足后才会开始下载、更新或发布云资源。",missingPermissionCount:"当前 Function 角色缺少 {{count}} 项 OTA 更新权限,尚未执行任何云资源变更。",functionRole:"Function 角色",currentRole:"当前运行角色",policyToUpdate:"将更新策略",authorizationSteps:{open:"打开授权页面,确认已预填的策略名称和完整策略内容。",debug:"点击页面中的“发起调试”,完成策略更新。",return:"返回此窗口,点击“我已授权,重新检查”。"},missingPermissions:"缺少的权限",openPrefilledAuthorization:"打开已预填的 IAM 授权页面",openIamManually:"前往 IAM 控制台手动配置",noSafePolicy:"当前角色没有唯一可安全更新的自定义策略,请由管理员将上述权限加入该角色。",failedStage:"失败阶段",errorId:"错误 ID",notGenerated:"未生成",openFunctionLogs:"前往 VeFaaS 控制台查看 Function 日志",targetVersion:"目标版本",updateStatus:"更新状态",elapsed:"已用时",progressAriaLabel:"Studio 更新进度",processingUpdate:"正在处理更新",processing:"正在处理",backgroundHint:"发布阶段会短暂中断连接;关闭此窗口不会停止更新,可随时点击右上角按钮重新查看。",confirmDescription:"更新会重启 Studio 服务,预计约 3–5 分钟完成更新与发布。期间正在进行的对话、流式响应或部署任务可能中断,登录态不会受到影响。",selectVersion:"选择版本",currentVersion:"当前版本",changelog:"更新内容",noChangelog:"暂无更新说明",runInBackground:"后台运行",authorizedRecheck:"我已授权,重新检查",tryAgain:"重新尝试"},Ede={deploy:"部署",update:"更新",planHash:"方案哈希",backToConfiguration:"返回配置",releaseRegion:"发布区域",deployRegion:"部署区域",regionPreserved:"更新时沿用现有 Runtime 的部署区域,无法修改。",unnamedAgent:"未命名 Agent",deployTitle:"部署 {{name}}",additionalAgentCount:" 等 {{count}} 个智能体",releaseOverview:"发布概览",agentOverview:"Agent 概览",agentCount:"Agent 数量",model:"模型",systemPrompt:"系统提示词",optimizations:"优化选项",notEnabled:"未启用",effectiveCapabilities:"生效能力",automaticProtection:"自动保护",artifactActions:"发布产物操作",exportYaml:"导出 YAML",viewSource:"查看源代码",downloadSource:"下载源代码",expandFlow:"放大查看执行流程",expand:"放大查看",deploymentConfiguration:"部署配置",runtimeName:"Runtime 名称",runtimeNamePreserved:"更新时保持现有 Runtime 名称不变。",runtimeNameHint:"默认根据 Root Agent 名称生成,并添加随机后缀避免重名;支持 4-64 位字母、数字、连字符和下划线",accessAuthentication:"访问鉴权",authenticationPreserved:"更新时保持现有 Runtime 的鉴权方式不变。",authenticationMethod:"鉴权方式",authenticationAriaLabel:"部署鉴权方式",authenticationPlaceholder:"请选择鉴权方式",messageChannels:"消息渠道",instanceSettings:"实例设置",minInstances:"最小实例数",maxInstances:"最大实例数",sidecarSingleInstance:"Harness Sidecar 首期仅支持单实例,Runtime 固定为 1~1",inMemorySingleInstance:"为避免多实例间会话丢失,推荐将 Runtime 固定为 1~1",network:"网络",networkPreserved:"现有 Runtime 的区域与网络模式保持不变。",networkMode:"网络模式",networkModes:{public:"公网",both:"公网 + VPC"},subnetId:"子网 ID",subnetHint:"可选,多个用逗号分隔",sharedInternetAccess:"VPC 内共享公网出口",evaluationSets:"评测集",createEvaluationSets:"自动创建评测集",createEvaluationSetsHint:"部署成功后,自动创建 Good Case 和 Bad Case 评测集。",resourceConfiguration:"资源配置",environmentVariables:"环境变量",environmentVariablesHint:"组件配置会自动同步到这里,部署前可核对最终值。",itemCount:"{{count}} 项",addVariable:"添加变量",componentGenerated:"组件自动生成",injectedByApiKey:"由所选 API Key 注入",envNameAriaLabel:"{{key}} 环境变量名",envDescriptionAriaLabel:"{{key}}说明:{{description}}",openOpenViking:"打开 OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}:打开 OpenViking {{label}}",requiredEmpty:"必填,尚未填写",optionalEmpty:"可选,尚未填写",envValueAriaLabel:"{{key}} 环境变量值",automatic:"自动",synced:"同步",customModelCredentials:"自定义模型凭据",releaseOnlySecret:"必填,仅用于本次发布",thisRelease:"本次发布",customVariables:"自定义变量",value:"值",deleteVariable:"删除变量",deploymentProgress:"部署进度",retryUpdate:"重试更新",retryDeploy:"重试部署",updateSucceeded:"更新成功",deploySucceeded:"部署成功",region:"区域",agentName:"Agent 名称",apiEndpoint:"API 端点",connecting:"连接中…",chatNow:"立即对话",console:"控制台",actionInProgress:"{{action}}中…",checkingName:"正在检查名称…",retryAction:"重试{{action}}",flowPreview:"执行流程预览",executionFlow:"执行流程",flowPreviewHint:"只读预览,可缩放与拖动画布",closeFlowPreview:"关闭执行流程预览",agentAdded:'Agent "{{name}}" 已添加到左上角下拉列表!',files:{preview:"文件预览",new:"新建文件",empty:"暂无文件",noneSelected:"未选择文件",selectToView:"选择左侧文件以查看内容",loadingEditor:"加载编辑器…",rename:"重命名",renamePrompt:"重命名文件"},apiKey:{selectFirst:"请先选择 API Key",revealing:"正在显示 API Key",hide:"隐藏 API Key",retryReveal:"重试显示 API Key",reveal:"显示 API Key"},task:{preparing:"准备部署",waitingBuildLog:"正在等待构建日志…",waitingGithubLog:"正在等待 GitHub 挂载日志…",syncingGithub:"正在同步当前源码到 GitHub",syncGithubCode:"同步 GitHub 代码",githubSynced:"GitHub 代码已同步",githubSubmitted:"GitHub 代码已提交",githubUpdatingRuntime:"代码已提交到 GitHub,GitHub Actions 正在更新同一个 Runtime",initializingGithub:"开始初始化 GitHub main 分支与 Actions workflow",initializingGithubBranch:"正在初始化 GitHub 持续交付目标分支",mountGithubDelivery:"挂载 GitHub 持续交付",githubBranchInitialized:"GitHub 持续交付已初始化目标分支",githubDeliveryMounted:"GitHub 持续交付已挂载",githubMountFailed:"挂载 GitHub 持续交付失败",githubMountFailedDetail:"GitHub 持续交付挂载失败:{{message}}",githubMountFailedHint:"挂载 GitHub 持续交付失败,详见 GitHub 日志。",deploymentComplete:"部署完成",deployedNotConnected:"部署完成,暂未连接",cancelled:"已取消",cancelledHint:"部署已取消,相关 Runtime 资源已请求销毁。",buildStatusUnconfirmed:"构建状态待确认",deploymentFailed:"部署失败",buildFailedHint:"构建镜像失败,详见构建日志。"},confirm:{updateTitle:"确认更新",deployTitle:"确认部署",closeLabel:"关闭部署确认",updateDescription:"将更新并发布到当前云端 Runtime,过程可能需要几分钟。确定继续吗?",deployDescription:"将创建新的云端 Runtime,部署过程可能需要几分钟。确定继续吗?",update:"确定更新",deploy:"确定部署"},userPool:{label:"用户池",unnamed:"未命名用户池",current:"当前用户池",ariaLabel:"部署用户池",loading:"正在加载用户池…",placeholder:"请选择用户池",loadingIdentity:"正在加载 Identity 用户池…",empty:"当前账号下暂无 Identity 用户池。",currentHint:"当前 Studio 的登录 JWT 将透传访问此 Runtime。",mismatchHint:"所选用户池不是当前 Studio 使用的用户池,部署后无法从 Studio 调用此 Runtime。",markedHint:"当前 Studio 使用的用户池已在列表中标注。"},authentication:{apiKeyDescription:"默认方式,使用 Runtime API Key 访问",userPool:"用户池",userPoolDescription:"使用 Identity 用户池签发的 JWT"},steps:{buildImage:"构建镜像",deploy:"部署",publish:"发布",syncCode:"同步代码",uploadPackage:"上传代码包",packageImage:"镜像打包",createRuntime:"创建 Runtime",publishService:"发布服务",updateInstances:"更新实例配置",createEvaluationSets:"创建评测集"},errors:{instanceRangeInteger:"最小实例数必须为大于等于 0 的整数,最大实例数必须为大于 0 的整数。",instanceRangeOrder:"最小实例数不能大于最大实例数。",selectApiKey:"请先在模型配置中选择 API Key。",loadApiKey:"加载 API Key 失败,请重试。",invalidProject:"项目数据无效",updateFeishu:"更新飞书配置失败:{{message}}",userPoolRequired:"请选择用于 Runtime 鉴权的用户池。",vpcRequired:"使用 VPC 网络时,请填写 VPC ID。",modelSecretRequired:"请填写 {{label}},用于访问对应的自定义模型地址。",managedApiKeyRequired:"{{requirement}},请先返回模型配置选择 API Key。",feishuEnvRequired:"启用飞书后,请填写{{field}}。",runtimeNameExists:"Runtime 名称已存在,请修改后重试。",deployedButGithubMountFailed:"部署成功,但挂载 GitHub 持续交付失败:{{message}}",deployedButGithubBindFailed:"部署成功,但绑定 GitHub 失败:{{message}}",buildStatusUnconfirmed:"构建任务已经提交,但暂时无法确认最终状态。请稍后在 Code Pipeline 查看构建结果,避免重复部署。",buildStatusUnconfirmedWithDetail:"构建状态待确认:{{message}}",failedAtStage:"{{action}}失败({{stage}}阶段):{{message}}",noAgentAtEndpoint:"连接成功,但该地址未发现任何 Agent(/list-apps 为空)。",addAgent:"添加 Agent 失败:{{message}}",modelApiKeyRequired:"请填写此模型地址对应的 API Key。"}},Cde={title:"工作区",detail:"工作区详情",create:"新建工作区",editorDescription:"将常用环境组合在一起;同一个环境可以加入多个工作区。",backToList:"返回工作区列表",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",createdAt:"创建时间",updatedAt:"最近更新",basicInfo:"基本信息",namePlaceholder:"例如:内容生产",descriptionPlaceholder:"说明这个工作区的用途",selectedEnvironmentCount:"已选择 {{count}} 个,可在其他工作区中继续复用",searchAvailableEnvironments:"搜索可用环境",searchEnvironments:"搜索环境",noAvailableEnvironments:"还没有可添加的环境",createEnvironmentFirst:"请先在“环境”页面创建并构建环境。",noMatchingEnvironments:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称。",environmentStatus:{available:"可用",building:"构建中",notBuilt:"未构建"},added:"已添加",saved:"已保存工作区“{{name}}”",resourceType:"工作区资源类型",searchWorkspaces:"搜索工作区",loadFailed:"无法加载工作区",noMatchingWorkspaces:"没有匹配的工作区",tryAnotherNameOrEnvironment:"请尝试搜索其他名称或环境",noEnvironmentAdded:"未添加环境",environmentMissing:"环境缺失",availableFraction:"{{available}}/{{total}} 可用",available:"可用",availableCount:"{{count}} 个可用",updated:"更新",addEnvironment:"添加环境",deleteTitle:"删除工作区",deleteDescription:"确定删除工作区“{{name}}”吗?环境本身不会被删除。",deleted:"已删除工作区“{{name}}”",clipboardPermissionError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。"},Tde={back:"返回",detailNavigation:"详情导航",noData:"暂无数据",actions:"操作",moreActions:"更多操作 {{label}}",actionsFor:"{{label}} 操作",loading:"资源加载中,请稍候"},Ade={addSkill:"添加 Skill",remove:"移除 {{name}}",confirmRemoveRuntime:"从新版本中移除运行中的 Skill「{{name}}」?",selectedCount:"已加入技能 · {{count}}",close:"关闭{{label}}",sources:{runtime:"运行中来源 · 原样保留,可移除或用同名 Skill 替换",local:"本地",skillspace:"AgentKit Skills 中心",skillhub:"火山 Find Skill 技能广场"},tabs:{local:"本地文件",localShort:"本地文件",skillspace:"AgentKit Skills 中心",skillspaceShort:"AgentKit",skillhub:"火山 Find Skill 技能广场",skillhubShort:"Find Skill"}},_de={tasks:{ppt:"PPT",image:"图片生成",video:"视频生成"},prompts:{ppt:{quarterlyReview:"复盘【季度】经营表现,提炼指标差距、原因与行动建议",projectUpdate:"汇报【项目名称】进展:里程碑、风险、预算和资源诉求",solutionProposal:"为【客户行业】输出解决方案:痛点、架构、实施路径与收益",industryAnalysis:"分析【行业主题】趋势,给出竞争格局、机会与战略建议"},image:{launchVisual:"为【品牌或产品】设计【高级科技】风格的发布会主视觉",ecommercePoster:"生成【产品名称】电商海报,突出【核心卖点】与品牌色",conceptRendering:"呈现【产品或空间】在【使用场景】中的写实概念效果图",socialGraphic:"围绕【传播主题】制作简洁专业的企业社媒配图"},video:{brandFilm:"制作【品牌名称】30 秒宣传片,突出【品牌价值】",productLaunch:"为【产品名称】制作 45 秒发布视频:痛点、功能、场景与行动号召",trainingVideo:"制作【培训主题】企业培训视频,讲清【关键操作或规范】",eventTeaser:"生成【活动名称】20 秒预热视频,包含亮点、时间地点和报名信息"}},firstFrame:"首帧",videoToEdit:"待编辑视频",baseVideo:"基础视频",optimizeSkillPlaceholder:"描述你想优化的技能…",createSkillPlaceholder:"描述你想生成的技能…",createVideoPlaceholder:"描述你想创作的视频…",messageAgentPlaceholder:"向 {{name}} 发消息…",selectAgentFirst:"请先选择智能体",selectSkillFirst:"请先选择需要优化的 Skill",availableSkills:"可用技能",availableSubagents:"可用子 Agent",invokeSkill:"调用技能",useSubagent:"使用子 Agent",loadingCapabilities:"正在读取 Agent 能力…",noMatchingSkills:"当前 Agent 没有匹配技能",noMatchingSubagents:"当前 Agent 没有匹配子 Agent",skillFallbackDescription:"加载并执行该技能",agentFallbackDescription:"将本轮交给该 Agent",skill:"技能",uploadImage:"上传图片",uploadDocument:"上传文档或 PDF",uploadVideo:"上传视频",taskMode:"任务模式",selectTaskMode:"选择任务模式",loadingGenerationModel:"正在加载生成模型",modelUnavailable:"模型不可用",cancelTask:"取消{{task}}任务",stopGenerating:"停止生成",viewVideoProgress:"查看视频生成进度",send:"发送",selectTaskType:"选择任务类型",enterprisePrompts:"{{task}}企业提示词",sessionId:"会话 ID",sessionIdLabel:"会话 ID:",initializing:"初始化中",copied:"已复制",copySessionId:"复制会话 ID",sessionIdCopied:"已复制会话 ID",disclaimer:"回答仅供参考",viewLogs:"查看日志"},Nde={selectAgent:"选择 Agent",noLocalAgents:"暂无本地 Agent。",searchRuntime:"搜索 Runtime 名称",mineOnly:"只看我创建的",noRuntimes:"暂无 Runtime。",unsupported:"不支持",createdByMe:"我创建的",connecting:"连接中…",connected:"已连接",connect:"连接",viewInfoFor:"查看 {{name}} 信息",viewInfo:"查看信息",agentAndRuntimeInfo:"Agent 与 Runtime 信息",detailType:"详情类型",agentInfo:"Agent 信息",runtimeInfo:"Runtime 信息",loadingAgentInfo:"读取 Agent 信息…",cannotLoadAgentInfo:"暂时无法读取 Agent 信息",unnamedAgent:"未命名 Agent",subagents:"子 Agent",tools:"工具",skills:"技能",previewUnsupported:"暂不支持预览",mountedComponents:"挂载组件",noMoreAgentInfo:"暂无更多 Agent 配置信息。",local:"本地",model:"模型",status:"状态",memoryMb:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",resources:"资源",version:"版本",loadingDetails:"读取详情…",environmentVariables:"环境变量",errors:{notFound:"该 Runtime 已不存在或列表信息已过期,请刷新列表后重试。",accessDenied:"当前账号无权访问该 Runtime,请检查所属 Project 和访问权限。",previewUnsupported:"该 Agent Server 版本暂不支持信息预览。",unavailable:"该 Runtime 暂时无法访问,请确认其状态为“就绪”后重试。",timeout:"加载超时,请重试"},componentKinds:{knowledgebase:"知识库",memory:"记忆",prompt_manager:"提示词管理",example_store:"样例库",run_processor:"运行处理器",tracer:"链路追踪",toolset:"工具集",plugin:"插件",other:"其他"},runtimeStatus:{ready:"就绪",unreleased:"未发布",running:"运行中",active:"运行中",creating:"创建中",pending:"等待中",deploying:"部署中",updating:"更新中",failed:"失败",error:"异常",stopping:"停止中",stopped:"已停止",deleting:"删除中",deleted:"已删除"}},jde={agent:"智能体",agentTypes:{general:"通用智能体",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"创建人",namedAgent:"{{name}} 智能体",storageLocation:"存储位置",currentBrowser:"当前浏览器",region:"地域",viewDeploymentProgress:"查看 {{name}} 部署进度",viewRuntimeDetails:"查看 {{name}} Runtime 详情",viewDetails:"查看 {{name}} 详情",time:"时间",remainingTime:"剩余时间",expiringSoon:"即将清空",sandboxRemaining:"{{hours}} 小时 {{minutes}} 分钟",wakeable:"可唤醒",neverExpires:"永不过期",editDraftNamed:"编辑草稿 {{name}}",viewProgress:"查看进度",deleteDraftNamed:"删除草稿 {{name}}",recheckCompatibility:"重新检测 {{name}} 的对话兼容性",connectedNamed:"{{name}} 已连接",wakeAndChat:"唤醒 {{name}} 并开始对话",chatWith:"与 {{name}} 对话",waking:"唤醒中",deploying:"部署中",draft:"草稿",checking:"检测中",chatUnsupported:"不支持对话",checkFailed:"检测失败",creatorFilter:"创建人筛选",agentType:"智能体类型",searchAgents:"搜索智能体",handoff:"接力",agentList:"{{type}}列表",noMatchingAgents:"没有匹配的智能体",adjustSearch:"请尝试调整搜索或筛选条件",noAgentType:"暂无 {{type}}",noGeneralAgents:"暂无通用智能体",createGeneralAgentDescription:"创建一个通用智能体,开始构建和对话",createAgentType:"创建{{type}}",createAgent:"创建智能体",loadingMore:"正在加载更多智能体",scrollForMore:"继续下滑加载更多",allLoaded:"已加载全部智能体",deleteDraftTitle:"删除草稿?",deleteDraftDescription:"删除后将无法恢复“{{name}}”。",deleteDraft:"删除草稿",loadGeneralAgents:"加载通用智能体",loadAgentType:"加载 {{type}}",compatibility:{checking:"正在请求 Runtime /list-apps,以确认该智能体是否支持 Studio 对话。",empty:"Runtime /list-apps 未返回可用的 Agent,暂时无法连接对话。",supported:"Runtime 支持 Studio 对话。",unknownError:"Runtime /list-apps 请求失败,未返回可识别的错误信息。"},sandboxStatus:{ready:"就绪",wakeable:"可唤醒",creating:"创建中",starting:"启动中",initializing:"启动中",pending:"等待中",running:"运行中",failed:"异常",error:"异常",stopped:"已停止",expired:"已过期",deleting:"删除中",deleted:"已删除",unknown:"未知状态"}},Rde={library:"技能库",skill:"技能",skills:"技能",skillSpace:"技能空间",sandboxNotConfigured:"管理员未配置 Dev Sandbox",adminNotConfigured:"管理员未配置",totalItems:"共 {{count}} 项",cannotLoadSpaces:"无法加载技能空间",someSpacesFailed:"部分技能空间加载失败",downloadZip:"下载 ZIP",optimize:"优化",closeSkillDetails:"关闭技能详情",skillId:"技能 ID",allFiles:"完整文件",loadingSkillContent:"正在读取技能内容…",noSkillContent:"该技能暂无 SKILL.md 内容",addSkill:"添加技能",localUpload:"本地上传",localUploadDescription:"选择 ZIP 文件,校验通过后上传到技能空间",autoCreate:"自动创建",autoCreateDescription:"选择模型和风格,通过对话生成技能",createSkill:"创建技能",optimizeNamed:"优化 {{name}}",deleteSkillConfirm:"确定删除整个 Skill“{{name}}”吗?此操作会影响所有引用它的空间。",deleteSpaceConfirm:"确定删除 Skill 空间“{{name}}”吗?请先确认空间中的技能已删除。",manageSpaceDescription:"管理空间中的技能并创建新的版本",backToSpaces:"返回技能空间列表",overview:"概览",skillCount:"技能数量",skillCountValue_one:"{{count}} 技能",skillCountValue_other:"{{count}} 技能",updatedAt:"更新时间",skillsInSpace:"{{name}}中的技能",searchSkills:"搜索技能",cannotLoadSkills:"无法加载技能",noMatchingSkills:"没有匹配的技能",noSkills:"暂无技能",tryAnotherName:"请尝试搜索其他名称",emptySkillsDescription:"本地上传 Skill,或自动创建",actions:"操作",spaceDetails:"技能空间详情",editSpace:"编辑空间",deleteSpace:"删除空间",searchSpaces:"搜索技能空间",spaceList:"技能空间列表",noMatchingSpaces:"没有匹配的技能空间",createSpace:"新建技能空间",newSpace:"新建空间",loadingMoreSpaces:"正在加载更多技能空间",scrollForMore:"继续下滑加载更多",allSpacesLoaded:"已加载全部技能空间",errors:{loadSpaces:"读取技能空间失败,请稍后重试",loadSkills:"读取技能失败,请稍后重试",loadSkillDetails:"读取技能详情失败,请稍后重试",deleteSkill:"删除 Skill 失败",deleteSpace:"删除 Skill 空间失败",downloadSkill:"下载 Skill 失败"},status:{active:"可用",available:"可用",creating:"创建中",disabled:"已停用",enabled:"已启用",failed:"异常",inactive:"未启用",pending:"等待中",published:"已发布",ready:"就绪",released:"已发布",running:"运行中",success:"正常",unavailable:"不可用",unreleased:"未发布",updating:"更新中",unknown:"未知"}},Ide={library:"知识库",createBase:"新建知识库",editBase:"编辑知识库",invalidName:"名称必须以字母开头,且只能包含字母、数字和下划线。",nameHelp:"以字母开头,仅支持字母、数字和下划线,最多 48 个字符。",optionalDescription:"描述(可选)",descriptionOnly:"AgentKit 当前仅支持更新知识库描述。",previewWeb:"预览网页内容",addData:"添加数据",openOriginalWeb:"打开原网页",backToEdit:"返回修改",confirmAdd:"确认添加",source:"知识来源",image:"图片",documentFile:"文档文件",webPage:"在线网页",webUrl:"网页 URL",generatingWebPreview:"正在抓取网页并生成 Markdown 预览",selectFile:"选择知识文件",selectOrDropFile:"选择文件或拖拽到这里",selectedFile:"{{size}} · 点击可重新选择",imageFileHelp:"支持 PNG、JPG 和 JPEG,单个文件不超过 200 MB",documentFileHelp:"支持 PDF、PPTX、DOCX、XLSX 和 TXT,单个文件不超过 200 MB",uploadingFile:"正在上传文件并添加到知识库",optionalName:"名称(可选)",optionalType:"类型(可选)",generatePreview:"生成预览",uploadFile:"上传文件",editMetadata:"编辑知识 Metadata",knowledge:"知识",field:"字段",value:"值",backToList:"返回知识库列表",metadataJson:"元数据(JSON)",provider:"服务提供方",knowledgeId:"知识库 ID",project:"项目",creator:"创建者",data:"数据",deleteInvalidAssociation:"删除失效关联",noData:"这个知识库还没有数据",addFirstData:"添加第一项数据",format:"格式",size:"大小",searchData:"搜索数据",searchLibraryData:"搜索知识库数据",associationInvalid:"关联已失效",providerMissing:"底层 Provider 知识库已不存在",noMatchingData:"没有匹配的数据",loadingMoreData:"正在加载更多数据",retryLoading:"重试加载",details:"知识库详情",searchBases:"搜索知识库",someBasesFailed:"部分知识库暂时无法加载,已展示其余可用内容。",noMatchingBases:"没有匹配的知识库",noManagePermission:"您没有管理此知识库的权限",loadingMoreBases:"正在加载更多知识库",deleteBaseTitle:"删除知识库?",deleteBaseDescription:"将删除 {{name}} 的 AgentKit 关联;如果它由 Studio 创建,也会同时删除 Provider 资源。此操作无法撤销。",deleteDocumentTitle:"删除知识?",deleteDocumentDescription:"将从 Provider 知识库中删除 {{name}},此操作无法撤销。",preview:{processingTitle:"数据正在处理中",processingDetail:"知识库完成解析后即可预览,请稍后重新加载。",failedTitle:"数据解析失败",failedDetail:"请检查源文件或网页地址后重新添加,也可以重新加载最新状态。",noParsedTitle:"暂时没有可预览的解析内容",noParsedDetail:"此类文件会在知识库完成解析后显示文本、表格或页面图片。",noMediaTitle:"暂时没有可预览的媒体内容",noMediaDetail:"知识库尚未返回可访问的媒体预览,请稍后重新加载。",noDataTitle:"暂无可预览的数据内容",noDataDetail:"知识库尚未返回解析结果,请稍后重新加载。",attachmentError:"附件无法预览,请稍后重试。",imageAlt:"知识数据图片",audioUnsupported:"当前浏览器不支持音频预览。",videoUnsupported:"当前浏览器不支持视频预览。",namedPdf:"{{name}} PDF 预览",pdf:"PDF 预览",openPdf:"无法显示时,在新窗口打开 PDF",fileUnsupported:"当前格式暂不支持直接在线预览,已优先显示解析后的内容。",openOriginalFile:"打开原文件",loading:"正在加载数据预览",openOriginalHint:"您可以打开原网页查看来源内容。",chunk:"片段 {{index}}",loadingMore:"正在加载更多",loadMore:"加载更多"},errors:{fileTooLarge:"单个文件不能超过 200 MB",invalidImageType:"请选择 PNG、JPG 或 JPEG 图片",invalidDocumentType:"请选择 PDF、PPTX、DOCX、XLSX 或 TXT 文件",createBase:"创建知识库失败",updateBase:"更新知识库失败",metadataObject:"Metadata 必须是 JSON 对象",metadataFormat:"Metadata 格式错误",noWebPreview:"网页没有可预览的 Markdown 内容",addWeb:"添加网页失败",previewWeb:"生成网页预览失败",uploadFile:"上传文件失败",updateDocument:"更新知识失败",loadPreview:"加载数据预览失败",loadMoreBases:"加载更多知识库失败",loadBases:"加载知识库失败",loadMoreData:"加载更多数据失败",loadData:"加载数据失败",deleteBase:"删除知识库失败",deleteDocument:"删除知识失败"}},pMe={common:fde,agentKitPromo:hde,systemInfo:pde,agentWorkspace:mde,environmentCenter:gde,deploymentSelect:bde,deploymentError:yde,studioBuildProgress:vde,cloudEnvironment:xde,githubCicd:Ode,feishuDeployment:wde,deploymentResources:Sde,studioUpdate:kde,projectPreview:Ede,workspace:Cde,resourceCollection:Tde,skillSourcePicker:Ade,composer:_de,agentSelector:Nde,myAgents:jde,skillCenter:Rde,knowledge:Ide},mMe=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:hde,agentSelector:Nde,agentWorkspace:mde,cloudEnvironment:xde,common:fde,composer:_de,default:pMe,deploymentError:yde,deploymentResources:Sde,deploymentSelect:bde,environmentCenter:gde,feishuDeployment:wde,githubCicd:Ode,knowledge:Ide,myAgents:jde,projectPreview:Ede,resourceCollection:Tde,skillCenter:Rde,skillSourcePicker:Ade,studioBuildProgress:vde,studioUpdate:kde,systemInfo:pde,workspace:Cde},Symbol.toStringTag,{value:"Module"})),Pde="网站集成",Dde="将 AgentKit Runtime 以悬浮聊天窗口嵌入网站",Mde="返回自动化列表",Lde="添加网站",$de="正在加载 Runtime",Fde="选择 Runtime",Bde="网站域名",Ude="例如 xxxx.com 或 localhost:5173",Qde="正在生成",zde="生成 Token",Vde="已添加网站",Hde="{{count}} 个",qde="{{count}} 个",Wde="正在加载网站集成",Kde="还没有网站集成",Gde="选择 Runtime 并输入网站域名即可生成 Token",Xde="引入方法",Yde="将下面代码放到网页的 body 结束标签前",Zde="已复制",Jde="复制代码",efe="添加网站后会在这里生成引入代码。",tfe="确定删除 {{domain}} 的网站集成吗?",nfe={load:"加载网站集成失败",create:"创建网站集成失败",delete:"删除网站集成失败",noConversationalAgent:"该 Runtime 暂未发现可对话的 Agent"},ife={requestFailed:"请求失败 ({{status}})",greeting:"您好,有什么可以帮您?",sessionFailed:"无法建立对话会话",unauthorized:"当前网站未获得对话授权",conversationFailed:"对话请求失败,请稍后重试",open:"打开智能体对话",close:"关闭智能体对话",panelLabel:"智能体对话面板",assistant:"智能体助手",online:"在线对话"},gMe={title:Pde,description:Dde,backToAutomations:Mde,addWebsite:Lde,loadingRuntime:$de,selectRuntime:Fde,websiteDomain:Bde,domainPlaceholder:Ude,generating:Qde,generateToken:zde,addedWebsites:Vde,websiteCount_one:Hde,websiteCount_other:qde,loadingIntegrations:Wde,delete:"删除",emptyTitle:Kde,emptyDescription:Gde,embedMethod:Xde,embedInstructions:Yde,copied:Zde,copyCode:Jde,embedHint:efe,confirmDelete:tfe,errors:nfe,widget:ife},bMe=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:Lde,addedWebsites:Vde,backToAutomations:Mde,confirmDelete:tfe,copied:Zde,copyCode:Jde,default:gMe,description:Dde,domainPlaceholder:Ude,embedHint:efe,embedInstructions:Yde,embedMethod:Xde,emptyDescription:Gde,emptyTitle:Kde,errors:nfe,generateToken:zde,generating:Qde,loadingIntegrations:Wde,loadingRuntime:$de,selectRuntime:Fde,title:Pde,websiteCount_one:Hde,websiteCount_other:qde,websiteDomain:Bde,widget:ife},Symbol.toStringTag,{value:"Module"})),rfe={types:{all:"全部类型",document:"文档",image:"图片",video:"视频"},previewArtifact:"预览 {{name}}",moreActions:"更多操作 {{name}}",actionMenu:"{{name}} 操作",download:"下载",downloading:"下载中",edit:"编辑信息",delete:"删除产物",previewFailed:"无法预览“{{name}}”:{{message}}",downloadStarted:"已开始下载 {{name}}",downloadFailed:"无法下载“{{name}}”:{{message}}",updated:"已更新 {{name}}",deleted:"已删除 {{name}}",deleteFailed:"无法删除“{{name}}”:{{message}}",typeFilter:"产物类型",searchAria:"搜索产物",searchPlaceholder:"搜索产物或会话",retry:"重试",close:"关闭",listAria:"产物列表",loadFailed:"产物加载失败",loadDetailFallback:"请检查存储配置后重试。",reload:"重新加载",noMatch:"没有找到匹配的产物",noArtifacts:"您还没有任何产物",searchHint:"请尝试搜索其他名称或切换类型",emptyHint:"聊天中生成的产物会自动显示在这里",columns:{name:"名称",source:"来源",updatedAt:"修改时间",actions:"操作"},loadingMore:"正在加载更多产物",unknownTime:"时间未知",preview:{close:"关闭预览",meta:"{{type}} / 版本 {{version}}",loading:"正在加载预览",alt:"{{name}} 预览",loadFailed:"预览加载失败,请稍后重试或下载查看",unsupported:"当前格式暂不支持在线预览,请下载查看",sourceAria:"产物来源",agent:"智能体",session:"会话",tool:"生成工具",createdAt:"生成时间",fileSize:"文件大小",tags:"标签",viewSession:"查看会话"},deleteDialog:{title:"删除产物?",description:"“{{name}}”将从产物库永久删除,聊天记录不会受到影响。",deleting:"删除中",confirm:"删除",close:"关闭删除确认框"},api:{withStatus:"{{message}}({{status}})",listFailed:"读取产物库失败",syncFailed:"同步聊天产物失败",updateFailed:"更新产物失败",deleteFailed:"删除产物失败",downloadFailed:"下载产物失败"}},sfe={unknownSource:"未知来源",unknownCreator:"未知创建者"},afe={nameRequired:"请输入产物名称",tooManyTags:"标签最多 {{max}} 个",tagTooLong:"单个标签不能超过 {{max}} 个字符",title:"编辑产物信息",subtitle:"内容文件不会被修改",close:"关闭编辑框",name:"名称",description:"描述",descriptionPlaceholder:"补充用途、版本或使用说明",tags:"标签",tagsPlaceholder:"使用逗号分隔,最多 {{max}} 个",cancel:"取消",saving:"保存中",save:"保存"},ofe={change:{added:"新增",modified:"修改",deleted:"删除"},noChanges:"两个版本的源码没有差异",chooseFile:"从左侧选择文件以查看代码",compareTitle:"版本对比",workspaceTitle:"源码工作区",projectFallback:"Agent 项目",switchTheme:"切换源码主题",switchThemeTitle:"切换为{{theme}}主题",themes:{dark:"深色",light:"浅色"},closeWorkspace:"关闭源码工作区",close:"关闭",changedFiles:"变更文件",projectFiles:"项目文件",changes:"变更",files:"文件",openFiles:"打开的文件",noFileSelected:"未选择文件",comparisonDirection:"对比方向",before:"优化前",after:"优化后",loadingEditor:"正在加载编辑器…",changedFileCount_one:"{{count}} 个文件有变更",changedFileCount_other:"{{count}} 个文件有变更",fileCount_one:"{{count}} 个文件",fileCount_other:"{{count}} 个文件",lineCount_one:"{{count}} 行 · UTF-8",lineCount_other:"{{count}} 行 · UTF-8",viewSource:"查看源码",viewSourceAria:"查看和编辑项目源码"},lfe={nav:"搜索",selectAgent:"请选择 Agent",checkingCapabilities:"正在检测 Agent 能力",notMounted:"当前 Agent 未挂载{{label}}",sources:{session:"会话",web:"网络",knowledge:"知识库",memory:"长期记忆"},webDescription:"通过 web_search 工具检索",backendLocal:"本地",failed:"搜索失败:{{message}}",placeholder:{selectAgent:"请先选择 Agent",web:"在网络中检索",knowledge:"在 {{name}} 中检索",knowledgeFallback:"当前 Agent 的知识库",memory:"在 {{name}} 中检索",memoryFallback:"当前用户的长期记忆",session:"在当前 Agent 的会话中检索"},sourceTypeAria:"搜索类型:{{label}}",notSelected:"未选择",sourceType:"搜索类型",selectSource:"选择搜索类型",noAgentHint:"选择一个 Agent 后,即可检索会话、网络及其挂载的数据源。",loadingCapabilities:"正在读取当前 Agent 的检索能力…",sourceUnavailable:"当前 Agent 未挂载该数据源",instructions:{web:"输入关键词后回车或点击按钮,通过 web_search 工具检索。",knowledge:"输入问题,检索当前 Agent 挂载的知识库。",memory:"输入线索,检索当前用户跨会话保存的长期记忆。",session:"输入关键词后回车或点击按钮,搜索当前 Agent 的会话。"},noResults:"未找到匹配“{{query}}”的结果。",knowledgeFragment:"知识片段 {{index}}",memoryFragment:"记忆片段 {{index}}"},cfe={title:"开发者资源",sections:{documentation:{title:"相关链接",description:"查看开发文档与 AgentKit 常用入口"},bestPractices:{title:"最佳实践",description:"参考开发、调试与部署经验"},showcases:{title:"案例展示",description:"探索 AgentKit 应用案例"}},links:{veadkDocs:"VeADK 文档",cliDocs:"AgentKit CLI 文档",platformDocs:"AgentKit 平台文档",console:"AgentKit 控制台"},articles:{veadkDevelopment:{title:"使用 VeADK 开发并部署智能体",description:"使用 VeADK 构建 Agent,并部署至 AgentKit 智能体运行时。"},cliDevelopment:{title:"使用 AgentKit CLI 开发并部署智能体",description:"通过 AgentKit CLI 创建项目、调试 Agent,并完成部署。"},coverAlt:"{{title}}文章封面"},showcases:{researchAssistant:{title:"多智能体研究助手",description:"由多个专业 Agent 协同完成资料检索、分析和结论整理。"},multimodalAnalysis:{title:"多模态内容分析",description:"在统一会话中理解图片、文档和视频内容。"},customerService:{title:"智能客服工作台",description:"结合知识检索与工具调用处理复杂的客户服务任务。"},webSearch:{title:"联网搜索 Agent",description:"检索实时网页内容,并将信息整理为可追溯的回答。"},a2uiApp:{title:"A2UI 交互应用",description:"让 Agent 根据任务过程生成可交互的前端界面。"},previewAlt:"{{title}}界面预览"}},ufe={title:"资源库",untitledSession:"未命名会话",categoryAria:"资源库分类",regionAria:"区域",tabs:{skills:"技能库",knowledge:"知识库",artifacts:"产物"}},dfe={title:"管理 Agent",subtitle:"列出你有权管理的 AgentKit Runtime",mainAgentOnly:"仅显示主 Agent(控制面信息)。",deleteConfirm:'确定删除 Agent "{{name}}"?该 Runtime 将被永久删除。',regionFilterTitle:"按区域筛选",regionFilterAria:"区域筛选",regionAria:"区域",refresh:"刷新",loading:"加载中…",empty:"暂无你部署的 Agent。",connected:"已连接",connect:"连接到此 Agent",deleteRuntime:"删除该 Runtime",loadingDetail:"读取详情…",agentStructure:"Agent 结构",secretHidden:"敏感值已隐藏,点击显示",revealSecret:"显示 {{key}} 的值",fields:{model:"模型",description:"描述",status:"状态信息",project:"项目",version:"版本",resources:"资源",memory:"记忆",tool:"工具",knowledge:"知识",mcpToolset:"MCP 工具集",updatedAt:"更新时间"},resource:{memory:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",concurrency:"并发 {{value}}"},environmentVariables:"环境变量",unnamed:"(未命名)"},ffe={mainAgent:"主 Agent",subAgent:"子 Agent {{index}}",itemCount_one:"{{count}} 项",itemCount_other:"{{count}} 项",info:"Agent 信息",infoAndTopology:"Agent 信息与拓扑",loadingInfo:"正在读取 Agent 信息…",unnamedAgent:"未命名 Agent",tools:"工具",toolList:"工具列表",studioTool:"Studio Tool",removeTool:"移除工具 {{name}}",remove:"移除",notConfigured:"未配置",addStudioTool:"添加 Studio 工具",addStudioToolHere:"在此对话中添加 Studio 工具",skills:"技能",skillList:"技能列表",previewUnsupported:"暂不支持预览",sessionEnvironment:"会话环境",environment:"环境",agentCanvas:"Agent 画布",topology:"结构拓扑",viewCanvasFullscreen:"全屏查看 Agent 画布",viewFullscreen:"全屏查看",executionCanvas:"Agent 执行画布",fullscreenExecutionCanvas:"全屏 Agent 执行画布",closeFullscreenCanvas:"关闭全屏画布",close:"关闭",capabilitiesSubtitle:"能力与协作拓扑",closeInfo:"关闭 Agent 信息",infoUnavailable:"暂时无法读取 Agent 信息。"},hfe={mountFailed:"挂载环境失败",closeDialog:"关闭环境弹窗",addTitle:"添加环境",description:"选择当前会话允许 Agent 使用的 Sandbox 环境",closeAdd:"关闭添加环境",searchAria:"搜索环境",searchPlaceholder:"搜索环境名称或能力",availableAria:"可用环境与工作区",loading:"正在读取可用环境…",noMatch:"没有匹配的环境或工作区",workspaces:"工作区",reuseAll:"复用工作区中的全部可用环境",availableEnvironmentCount_one:"{{count}} 个可用环境",availableEnvironmentCount_other:"{{count}} 个可用环境",selectWorkspace:"选择工作区 {{name}}",environments:"环境",includedByWorkspaces:"已由工作区 {{names}} 包含",nameSeparator:"、",selectEnvironment:"选择环境 {{name}}",selectedWorkspaceCount_one:"{{count}} 个工作区",selectedWorkspaceCount_other:"{{count}} 个工作区",coveredEnvironmentCount_one:"{{count}} 个环境",coveredEnvironmentCount_other:"{{count}} 个环境",selectionSummary:"已选择 {{workspaces}},覆盖 {{environments}}",cancel:"取消",mounting:"正在挂载…",confirm:"确认添加",mountedAria:"已挂载环境",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",removeWorkspace:"移除工作区 {{name}}",remove:"移除",removeEnvironment:"移除环境 {{name}}",add:"添加环境",addMore:"添加更多环境",addForSession:"为当前 Session 添加环境",loadingAvailable:"正在加载可用环境…",empty:"暂无可用的 AIO Sandbox 环境。"},pfe={loading:{searching:"正在查找已有环境",creating:"环境初始化中",connecting:"正在连接已有环境"},initializationFailed:"AgentKit CLI 环境初始化失败,当前状态:{{status}}。",sessionExpired:"AgentKit CLI Session 不存在或已过期,请重试。",initializationTimeout:"AgentKit CLI 环境初始化超时,请稍后重试。",nonPersistent:"非持久化环境",recyclingHoursMinutes:"{{hours}} 小时 {{minutes}} 分钟后环境回收",recyclingMinutes:"{{minutes}} 分钟后环境回收",connectionError:`无法连接 Studio 服务,未收到服务端响应。 -原始错误:{{message}}`,unavailable:"连接不可用",requestFailed:"AgentKit CLI 请求失败",retry:"重试",terminalTitle:"AgentKit CLI 终端"},mfe={labels:{coding:"智能编程",get_city_weather:"城市天气查询",get_location_weather:"位置天气查询",web_fetch:"网页内容获取"},closeDialog:"关闭弹窗",title:"添加 Studio 工具",description:"由 Studio BFF 为 {{agentName}} 的当前会话执行,Runtime 无需预装",close:"关闭添加 Studio 工具",searchAria:"搜索 Studio 工具",searchPlaceholder:"搜索名称或工具标识",availableAria:"可用 Studio 工具",loading:"正在读取 Studio 工具…",noMatch:"没有匹配的 Studio 工具",remove:"移除",add:"添加"},gfe={artifactLibrary:rfe,resourceMetadata:sfe,artifactEdit:afe,codeBrowser:ofe,search:lfe,developerResources:cfe,library:ufe,manageAgents:dfe,agentTopology:ffe,sessionEnvironment:hfe,agentKitCli:pfe,studioTools:mfe},yMe=Object.freeze(Object.defineProperty({__proto__:null,agentKitCli:pfe,agentTopology:ffe,artifactEdit:afe,artifactLibrary:rfe,codeBrowser:ofe,default:gfe,developerResources:cfe,library:ufe,manageAgents:dfe,resourceMetadata:sfe,search:lfe,sessionEnvironment:hfe,studioTools:mfe},Symbol.toStringTag,{value:"Module"})),Q8=["zh-CN","en-US"],pj="en-US",bfe="agentkit.studio.locale",vMe={"zh-CN":{dir:"ltr",nativeName:"简体中文"},"en-US":{dir:"ltr",nativeName:"English"}};function mj(e){if(!e)return null;const t=e.trim().replace(/_/g,"-").toLowerCase(),n=Q8.find(i=>i.toLowerCase()===t);return n||(t==="zh"||t.startsWith("zh-")?"zh-CN":t==="en"||t.startsWith("en-")?"en-US":null)}function Md(e,t){const n=(e==null?void 0:e.trim())??"";if(!n)return"";const i=new RegExp("\\p{Script=Han}","u").test(n);return t.toLowerCase().startsWith("zh")===i?n:""}function xMe(){if(typeof window>"u")return null;try{return mj(window.localStorage.getItem(bfe))}catch{return null}}function OMe(){return typeof navigator>"u"?[]:navigator.languages.length>0?navigator.languages:navigator.language?[navigator.language]:[]}function wMe(){const e=xMe();if(e)return e;for(const t of OMe()){const n=mj(t);if(n)return n}return pj}function SMe(e){if(!(typeof window>"u"))try{window.localStorage.setItem(bfe,e)}catch{}}function yfe(e){typeof document>"u"||(document.documentElement.lang=e,document.documentElement.dir=vMe[e].dir)}const jn=e=>typeof e=="string",A1=()=>{let e,t;const n=new Promise((i,r)=>{e=i,t=r});return n.resolve=e,n.reject=t,n},CP=e=>e==null?"":String(e),kMe=(e,t,n)=>{e.forEach(i=>{t[i]&&(n[i]=t[i])})},EMe=/###/g,lV=e=>e&&e.includes("###")?e.replace(EMe,"."):e,cV=e=>!e||jn(e),YO=(e,t,n)=>{const i=jn(t)?t.split("."):t;let r=0;for(;r{const{obj:i,k:r}=YO(e,t,Object);if(i!==void 0||t.length===1){i[r]=n;return}let s=t[t.length-1],a=t.slice(0,t.length-1),l=YO(e,a,Object);for(;l.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),l=YO(e,a,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${s}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=n},CMe=(e,t,n,i)=>{const{obj:r,k:s}=YO(e,t,Object);r[s]=r[s]||[],r[s].push(n)},BA=(e,t)=>{const{obj:n,k:i}=YO(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,i))return n[i]},TMe=(e,t,n)=>{const i=BA(e,n);return i!==void 0?i:BA(t,n)},vfe=(e,t,n)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,i)?jn(e[i])||e[i]instanceof String||jn(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):vfe(e[i],t[i],n):e[i]=t[i]);return e},xf=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),AMe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},_Me=e=>jn(e)?e.replace(/[&<>"'\/]/g,t=>AMe[t]):e;class NMe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}const jMe=[" ",",","?","!",";"],RMe=new NMe(20),IMe=(e,t,n)=>{t=t||"",n=n||"";const i=jMe.filter(a=>!t.includes(a)&&!n.includes(a));if(i.length===0)return!0;const r=RMe.getRegExp(`(${i.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!r.test(e);if(!s){const a=e.indexOf(n);a>0&&!r.test(e.substring(0,a))&&(s=!0)}return s},zL=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const i=t.split(n);let r=e;for(let s=0;se==null?void 0:e.replace(/_/g,"-"),PMe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,i;(i=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||i.call(n,console,t)}};class UA{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||PMe,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,i,r){return r&&!this.debug?null:(t=t.map(s=>jn(s)?s.replace(/[\r\n\x00-\x1F\x7F]/g," "):s),jn(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new UA(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new UA(this.logger,t)}}var Cd=new UA;class gj{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const i=(...r)=>{n(...r),this.off(t,i)};return this.on(t,i),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([r,s])=>{for(let a=0;a{for(let a=0;a-1&&this.options.ns.splice(n,1)}getResource(t,n,i,r={}){var u,d;const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,a=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.includes(".")?l=t.split("."):(l=[t,n],i&&(Array.isArray(i)?l.push(...i):jn(i)&&s?l.push(...i.split(s)):l.push(i)));const c=BA(this.data,l);return!c&&!n&&!i&&t.includes(".")&&(t=l[0],n=l[1],i=l.slice(2).join(".")),c||!a||!jn(i)?c:zL((d=(u=this.data)==null?void 0:u[t])==null?void 0:d[n],i,s)}addResource(t,n,i,r,s={silent:!1}){const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=[t,n];i&&(l=l.concat(a?i.split(a):i)),t.includes(".")&&(l=t.split("."),r=n,n=l[1]),this.addNamespaces(n),uV(this.data,l,r),s.silent||this.emit("added",t,n,i,r)}addResources(t,n,i,r={silent:!1}){for(const s in i)(jn(i[s])||Array.isArray(i[s]))&&this.addResource(t,n,s,i[s],{silent:!0});r.silent||this.emit("added",t,n,i)}addResourceBundle(t,n,i,r,s,a={silent:!1,skipCopy:!1}){let l=[t,n];t.includes(".")&&(l=t.split("."),r=i,i=n,n=l[1]),this.addNamespaces(n);let c=BA(this.data,l)||{};a.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?vfe(c,i,s):c={...c,...i},uV(this.data,l,c),a.silent||this.emit("added",t,n,i)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var xfe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,i,r){return e.forEach(s=>{var a;t=((a=this.processors[s])==null?void 0:a.process(t,n,i,r))??t}),t}};const Ofe=Symbol("i18next/PATH_KEY");function DMe(){const e=[],t=Object.create(null);let n;return t.get=(i,r)=>{var s;return(s=n==null?void 0:n.revoke)==null||s.call(n),r===Ofe?e:(e.push(r),n=Proxy.revocable(i,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Kg(e,t){const{[Ofe]:n}=e(DMe()),i=(t==null?void 0:t.keySeparator)??".",r=(t==null?void 0:t.nsSeparator)??":",s=(t==null?void 0:t.enableSelector)==="strict";if(n.length>1&&r){const a=t==null?void 0:t.ns,l=s?Array.isArray(a)?a:a?[a]:null:Array.isArray(a)?a:null;if(l&&(s?l:l.length>1?l.slice(1):[]).includes(n[0]))return`${n[0]}${r}${n.slice(1).join(i)}`}return n.join(i)}const TP=e=>!jn(e)&&typeof e!="boolean"&&typeof e!="number";class QA extends gj{constructor(t,n={}){super(),kMe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Cd.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const i={...n};if(t==null)return!1;const r=this.resolve(t,i);if((r==null?void 0:r.res)===void 0)return!1;const s=TP(r.res);return!(i.returnObjects===!1&&s)}extractFromKey(t,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=i&&t.includes(i),l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!IMe(t,i,r);if(a&&!l){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:jn(s)?[s]:s};const u=t.split(i);(i!==r||i===r&&this.options.ns.includes(u[0]))&&(s=u.shift()),t=u.join(r)}return{key:t,namespaces:jn(s)?[s]:s}}translate(t,n,i){let r=typeof n=="object"?{...n}:n;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";typeof t=="function"&&(t=Kg(t,{...this.options,...r})),Array.isArray(t)||(t=[String(t)]),t=t.map(L=>typeof L=="function"?Kg(L,{...this.options,...r}):String(L));const s=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:l,namespaces:c}=this.extractFromKey(t[t.length-1],r),u=c[c.length-1];let d=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=r.lng||this.language,h=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return h?s?{res:`${u}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${d}${l}`:s?{res:l,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:l;const p=this.resolve(t,r);let g=p==null?void 0:p.res;const b=(p==null?void 0:p.usedKey)||l,v=(p==null?void 0:p.exactUsedKey)||l,y=["[object Number]","[object Function]","[object RegExp]"],x=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,O=r.count!==void 0&&!jn(r.count),k=QA.hasDefaultValue(r),S=O?this.pluralResolver.getSuffix(f,r.count,r):"",E=r.ordinal&&O?this.pluralResolver.getSuffix(f,r.count,{ordinal:!1}):"",C=O&&!r.ordinal&&r.count===0,N=C&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${S}`]||r[`defaultValue${E}`]||r.defaultValue;let _=g;w&&!g&&k&&(_=N);const j=TP(_),T=Object.prototype.toString.apply(_);if(w&&_&&j&&!y.includes(T)&&!(jn(x)&&Array.isArray(_))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,_,{...r,ns:c}):`key '${l} (${this.language})' returned an object instead of string.`;return s?(p.res=L,p.usedParams=this.getUsedParamsDetails(r),p):L}if(a){const L=Array.isArray(_),A=L?[]:{},R=L?v:b;for(const P in _)if(Object.prototype.hasOwnProperty.call(_,P)){const $=`${R}${a}${P}`;k&&!g?A[P]=this.translate($,{...r,defaultValue:TP(N)?N[P]:void 0,joinArrays:!1,ns:c}):A[P]=this.translate($,{...r,joinArrays:!1,ns:c}),A[P]===$&&(A[P]=_[P])}g=A}}else if(w&&jn(x)&&Array.isArray(g))g=g.join(x),g&&(g=this.extendTranslation(g,t,r,i));else{let L=!1,A=!1;!this.isValidLookup(g)&&k&&(L=!0,g=N),this.isValidLookup(g)||(A=!0,g=l);const P=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:g,$=k&&N!==g&&this.options.updateMissing;if(A||L||$){if(this.logger.log($?"updateKey":"missingKey",f,u,O&&!$?`${l}${this.pluralResolver.getSuffix(f,r.count,r)}`:l,$?N:g),a){const H=this.resolve(l,{...r,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let M=[];const B=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&B&&B[0])for(let H=0;H{var U;const q=k&&Q!==g?Q:P;this.options.missingKeyHandler?this.options.missingKeyHandler(H,u,X,q,$,r):(U=this.backendConnector)!=null&&U.saveMissing&&this.backendConnector.saveMissing(H,u,X,q,$,r),this.emit("missingKey",H,u,X,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?M.forEach(H=>{const X=this.pluralResolver.getSuffixes(H,r);C&&r[`defaultValue${this.options.pluralSeparator}zero`]&&!X.includes(`${this.options.pluralSeparator}zero`)&&X.push(`${this.options.pluralSeparator}zero`),X.forEach(Q=>{I([H],l+Q,r[`defaultValue${Q}`]||N)})}):I(M,l,N))}g=this.extendTranslation(g,t,r,p,i),A&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${l}`),(A||L)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${l}`:l,L?g:void 0,r))}return s?(p.res=g,p.usedParams=this.getUsedParamsDetails(r),p):g}extendTranslation(t,n,i,r,s){var c,u;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const d=jn(t)&&(((u=i==null?void 0:i.interpolation)==null?void 0:u.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const p=t.match(this.interpolator.nestingRegexp);f=p&&p.length}let h=i.replace&&!jn(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,i.lng||this.language||r.usedLng,i),d){const p=t.match(this.interpolator.nestingRegexp),g=p&&p.length;f(s==null?void 0:s[0])===p[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),i)),i.interpolation&&this.interpolator.reset()}const a=i.postProcess||this.options.postProcess,l=jn(a)?[a]:a;return t!=null&&(l!=null&&l.length)&&i.applyPostProcessor!==!1&&(t=xfe.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,n={}){let i,r,s,a,l;return jn(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(c=>typeof c=="function"?Kg(c,{...this.options,...n}):c)),t.forEach(c=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(c,n),d=u.key;r=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!jn(n.count),p=h&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(jn(n.context)||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(v=>{var y,x;this.isValidLookup(i)||(l=v,!this.checkedLoadedFor[`${b[0]}-${v}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${b[0]}-${v}`]=!0,this.logger.warn(`key "${r}" for languages "${b.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(w=>{var S;if(this.isValidLookup(i))return;a=w;const O=[d];if((S=this.i18nFormat)!=null&&S.addLookupKeys)this.i18nFormat.addLookupKeys(O,d,w,v,n);else{let E;h&&(E=this.pluralResolver.getSuffix(w,n.count,n));const C=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&E.startsWith(N)&&O.push(d+E.replace(N,this.options.pluralSeparator)),O.push(d+E),p&&O.push(d+C)),g){const _=`${d}${this.options.contextSeparator||"_"}${n.context}`;O.push(_),h&&(n.ordinal&&E.startsWith(N)&&O.push(_+E.replace(N,this.options.pluralSeparator)),O.push(_+E),p&&O.push(_+C))}}let k;for(;k=O.pop();)this.isValidLookup(i)||(s=k,i=this.getResource(w,v,k,n))}))})}),{res:i,usedKey:r,exactUsedKey:s,usedLng:a,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,i,r={}){var s;return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,n,i,r):this.resourceStore.getResource(t,n,i,r)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!jn(t.replace);let r=i?t.replace:t;if(i&&typeof t.count<"u"&&(r={...r,count:t.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const s of n)delete r[s]}return r}static hasDefaultValue(t){const n="defaultValue";for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&i.startsWith(n)&&t[i]!==void 0)return!0;return!1}}class fV{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Cd.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(t){if(t=Kw(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Kw(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(jn(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&t.forEach(i=>{if(n)return;const r=this.getScriptPartFromCode(i);if(this.isSupportedCode(r))return n=r;const s=this.getLanguagePartFromCode(i);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(a=>a===s?!0:!a.includes("-")&&!s.includes("-")?!1:!!(a.includes("-")&&!s.includes("-")&&a.slice(0,a.indexOf("-"))===s||a.startsWith(s)&&s.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),jn(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let i=t[n];return i||(i=t[this.getScriptPartFromCode(n)]),i||(i=t[this.formatLanguageCode(n)]),i||(i=t[this.getLanguagePartFromCode(n)]),i||(i=t.default),i||[]}toResolveHierarchy(t,n){const i=this.options.fallbackLng,r=Array.isArray(i)?i.join("|"):i;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);const s=n===void 0||n===!1||jn(n),a=n===void 0&&typeof this.options.fallbackLng=="function",l=jn(t)&&s&&!a;let c=null;if(l){let h;n===void 0?h="undefined":n===!1?h="boolean:false":h=`string:${n}`,c=`${t.length}:${t}|${h}`}if(c!==null){const h=this.resolveHierarchyCache[c];if(h!==void 0)return h.slice()}const u=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),d=[],f=h=>{h&&(this.isSupportedCode(h)?d.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return jn(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(t))):jn(t)&&f(this.formatLanguageCode(t)),u.forEach(h=>{d.includes(h)||f(this.formatLanguageCode(h))}),c!==null?(this.resolveHierarchyCache[c]=d,d.slice()):d}}const hV={zero:0,one:1,two:2,few:3,many:4,other:5},pV={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class MMe{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=Cd.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const i=Kw(t==="dev"?"en":t),r=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:r});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(i,{type:r})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),pV;if(!t.match(/-|_/))return pV;const c=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(c,n)}return this.pluralRulesCache[s]=a,a}needsPlural(t,n={}){let i=this.getRule(t,n);return i||(i=this.getRule("dev",n)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,i={}){return this.getSuffixes(t,i).map(r=>`${n}${r}`)}getSuffixes(t,n={}){let i=this.getRule(t,n);return i||(i=this.getRule("dev",n)),i?i.resolvedOptions().pluralCategories.sort((r,s)=>hV[r]-hV[s]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(t,n,i={}){const r=this.getRule(t,i);return r?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,i))}}const mV=(e,t,n,i=".",r=!0)=>{let s=TMe(e,t,n);return!s&&r&&jn(n)&&(s=zL(e,n,i),s===void 0&&(s=zL(t,n,i))),s},gV=e=>e.replace(/\$/g,"$$$$");class bV{constructor(t={}){var n;this.logger=Cd.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(i=>i),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:s,prefixEscaped:a,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:b,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:_Me,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=s?xf(s):a||"{{",this.suffix=l?xf(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f?xf(f):"-",this.unescapeSuffix=this.unescapePrefix?"":d?xf(d):"",this.nestingPrefix=h?xf(h):p||xf("$t("),this.nestingSuffix=g?xf(g):b||xf(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,i)=>(n==null?void 0:n.source)===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,i,r){var p;let s,a,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(!g.includes(this.formatSeparator)){const x=mV(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,i,{...r,...n,interpolationkey:g}):x}const b=g.split(this.formatSeparator),v=b.shift().trim(),y=b.join(this.formatSeparator).trim();return this.format(mV(n,c,v,this.options.keySeparator,this.options.ignoreJSONStructure),y,i,{...r,...n,interpolationkey:v})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const d=(r==null?void 0:r.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((p=r==null?void 0:r.interpolation)==null?void 0:p.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>g},{regex:this.regexp,safeValue:g=>this.escapeValue?this.escape(g):g}].forEach(g=>{for(l=0;s=g.regex.exec(t);){const b=s[1].trim();if(a=u(b),a===void 0)if(typeof d=="function"){const y=d(t,s,r);a=jn(y)?y:""}else if(r&&Object.prototype.hasOwnProperty.call(r,b))a="";else if(f){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),a="";else!jn(a)&&!this.useRawValueToEscape&&(a=CP(a));const v=g.safeValue(a);if(t=t.replace(s[0],gV(v)),f?(g.regex.lastIndex+=v.length,g.regex.lastIndex-=s[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n,i={}){let r,s,a;const l=(c,u)=>{const d=this.nestingOptionsSeparator;if(!c.includes(d))return c;const f=c.split(new RegExp(`${xf(d)}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,a);const p=h.match(/'/g),g=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),u&&(a={...u,...a})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,b),`${c}${d}${h}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,c};for(;r=this.nestingRegexp.exec(t);){let c=[];a={...i},a=a.replace&&!jn(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/s.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(u!==-1&&(c=r[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),r[1]=r[1].slice(0,u)),s=n(l.call(this,r[1].trim(),a),a),s&&r[0]===t&&!jn(s))return s;jn(s)||(s=CP(s)),s||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`),s=""),c.length&&(s=c.reduce((d,f)=>this.format(d,f,i.lng,{...i,interpolationkey:r[1].trim()}),s.trim())),t=t.replace(r[0],gV(CP(s))),this.regexp.lastIndex=0}return t}}const LMe=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const i=e.split("(");t=i[0].toLowerCase().trim();const r=i[1].slice(0,-1);t==="currency"&&!r.includes(":")?n.currency||(n.currency=r.trim()):t==="relativetime"&&!r.includes(":")?n.range||(n.range=r.trim()):r.split(";").forEach(a=>{if(a){const[l,...c]=a.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},yV=e=>{const t={};return(n,i,r)=>{let s=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(s={...s,[r.interpolationkey]:void 0});const a=i+JSON.stringify(s);let l=t[a];return l||(l=e(Kw(i),r),t[a]=l),l(n)}},$Me=e=>(t,n,i)=>e(Kw(n),i)(t);class FMe{constructor(t={}){this.logger=Cd.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const i=n.cacheInBuiltFormats?yV:$Me;this.formats={number:i((r,s)=>{const a=new Intl.NumberFormat(r,{...s});return l=>a.format(l)}),currency:i((r,s)=>{const a=new Intl.NumberFormat(r,{...s,style:"currency"});return l=>a.format(l)}),datetime:i((r,s)=>{const a=new Intl.DateTimeFormat(r,{...s});return l=>a.format(l)}),relativetime:i((r,s)=>{const a=new Intl.RelativeTimeFormat(r,{...s});return l=>a.format(l,s.range||"day")}),list:i((r,s)=>{const a=new Intl.ListFormat(r,{...s});return l=>a.format(l)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=yV(n)}format(t,n,i,r={}){if(!n||t==null)return t;const s=n.split(this.formatSeparator),a=[];for(let c=0;c-1&&!u.includes(")")&&c+1{var h;const{formatName:d,formatOptions:f}=LMe(u);if(this.formats[d]){let p=c;try{const g=((h=r==null?void 0:r.formatParams)==null?void 0:h[r.interpolationkey])||{},b=g.locale||g.lng||r.locale||r.lng||i;p=this.formats[d](c,b,{...f,...r,...g})}catch(g){this.logger.warn(g)}return p}else this.logger.warn(`there was no format function for ${d}`);return c},t)}}const BMe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class UMe extends gj{constructor(t,n,i,r={}){var s,a;super(),this.backend=t,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=Cd.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,i,r.backend,r)}queueLoad(t,n,i,r){const s={},a={},l={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,d=!1,a[h]===void 0&&(a[h]=!0),s[h]===void 0&&(s[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(l[u]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(t,n,i){const r=t.split("|"),s=r[0],a=r[1];n&&this.emit("failedLoading",s,a,n),!n&&i&&this.store.addResourceBundle(s,a,i,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&i&&(this.state[t]=0);const l={};this.queue.forEach(c=>{CMe(c.loaded,[s],a),BMe(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(t,n,i,r=0,s=this.retryTimeout,a){if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:i,tried:r,wait:s,callback:a});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&r{this.read(t,n,i,r+1,s*2,a)},s);return}a(u,d)},c=this.backend[i].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return c(t,n,l)}prepareLoading(t,n,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();jn(t)&&(t=this.languageUtils.toResolveHierarchy(t)),jn(n)&&(n=[n]);const s=this.queueLoad(t,n,i,r);if(!s.toLoad.length)return s.pending.length||r(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,i){this.prepareLoading(t,n,{},i)}reload(t,n,i){this.prepareLoading(t,n,{reload:!0},i)}loadOne(t,n=""){const i=t.split("|"),r=i[0],s=i[1];this.read(r,s,"read",void 0,void 0,(a,l)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${r} failed`,a),!a&&l&&this.logger.log(`${n}loaded namespace ${s} for language ${r}`,l),this.loaded(t,a,l)})}saveMissing(t,n,i,r,s,a={},l=()=>{}){var c,u,d,f,h;if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((f=(d=this.services)==null?void 0:d.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${i}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((h=this.backend)!=null&&h.create){const p={...a,isUpdate:s},g=this.backend.create.bind(this.backend);if(g.length<6)try{let b;g.length===5?b=g(t,n,i,r,p):b=g(t,n,i,r),b&&typeof b.then=="function"?b.then(v=>l(null,v)).catch(l):l(null,b)}catch(b){l(b)}else g(t,n,i,r,l,p)}!t||!t[0]||this.store.addResource(t[0],n,i,r)}}}const AP=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),jn(e[1])&&(t.defaultValue=e[1]),jn(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(i=>{t[i]=n[i]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),vV=e=>(jn(e.ns)&&(e.ns=[e.ns]),jn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),jn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),kC=()=>{},QMe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ZO extends gj{constructor(t={},n){if(super(),this.options=vV(t),this.services={},this.logger=Cd,this.modules={external:[]},QMe(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(jn(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const i=AP();this.options={...i,...this.options,...vV(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);const r=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Cd.init(r(this.modules.logger),this.options):Cd.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=FMe;const d=new fV(this.options);this.store=new dV(this.options.resources,this.options);const f=this.services;f.logger=Cd,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new MMe(d,{prepend:this.options.pluralSeparator}),u&&(f.formatter=r(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new bV(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new UMe(r(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(f.languageDetector=r(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=r(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new QA(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=kC),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const l=A1(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(d,f)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(t,n=kC){var s,a;let i=n;const r=jn(t)?t:this.language;if(typeof t=="function"&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if((r==null?void 0:r.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const l=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&(l.includes(f)||l.push(f))})};r?c(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>c(d)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,u=>c(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(u)})}else i(null)}reloadResources(t,n,i){const r=A1();return typeof t=="function"&&(i=t,t=void 0),typeof n=="function"&&(i=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),i||(i=kC),this.services.backendConnector.reload(t,n,s=>{r.resolve(),i(s)}),r}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&xfe.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?this.isLanguageChangingTo===t&&(r(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve((...u)=>this.t(...u)),n&&n(l,(...u)=>this.t(...u))},a=l=>{var d,f;!t&&!l&&this.services.languageDetector&&(l=[]);const c=jn(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(jn(l)?[l]:l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),(f=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||f.call(d,u)),this.loadResources(u,h=>{s(h,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,i,r){const s=r==null?void 0:r.scopeNs,a=(l,c,...u)=>{let d;typeof c!="object"?d=this.options.overloadTranslationOptionHandler([l,c].concat(u)):d={...c},d.lng=d.lng||a.lng,d.lngs=d.lngs||a.lngs;const f=d.ns!==void 0&&d.ns!==null;d.ns=d.ns||a.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||i||a.keyPrefix);const h={...this.options,...d};Array.isArray(s)&&!f&&(h.ns=s),typeof d.keyPrefix=="function"&&(d.keyPrefix=Kg(d.keyPrefix,h));const p=this.options.keySeparator||".";let g;return d.keyPrefix&&Array.isArray(l)?g=l.map(b=>(typeof b=="function"&&(b=Kg(b,h)),`${d.keyPrefix}${p}${b}`)):(typeof l=="function"&&(l=Kg(l,h)),g=d.keyPrefix?`${d.keyPrefix}${p}${l}`:l),this.t(g,d)};return jn(t)?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=i,a}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const a=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,a);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(i,t)&&(!r||a(s,t)))}loadNamespaces(t,n){const i=A1();return this.options.ns?(jn(t)&&(t=[t]),t.forEach(r=>{this.options.ns.includes(r)||this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(t,n){const i=A1();jn(t)&&(t=[t]);const r=this.options.preload||[],s=t.filter(a=>!r.includes(a)&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=r.concat(s),this.loadResources(a=>{i.resolve(),n&&n(a)}),i):(n&&n(),Promise.resolve())}dir(t){var r,s;if(t||(t=this.resolvedLanguage||(((r=this.languages)==null?void 0:r.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const a=new Intl.Locale(t);if(a&&a.getTextInfo){const l=a.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=((s=this.services)==null?void 0:s.languageUtils)||new fV(AP());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(i.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const i=new ZO(t,n);return i.createInstance=ZO.createInstance,i}cloneInstance(t={},n=kC){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},s=new ZO(r);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(l=>{s[l]=this[l]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i){const l=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},c[u]=Object.keys(c[u]).reduce((d,f)=>(d[f]={...c[u][f]},d),c[u]),c),{});s.store=new dV(l,r),s.services.resourceStore=s.store}if(t.interpolation){const c={...AP().interpolation,...this.options.interpolation,...t.interpolation},u={...r,interpolation:c};s.services.interpolator=new bV(u)}return s.translator=new QA(s.services,r),s.translator.on("*",(l,...c)=>{s.emit(l,...c)}),s.init(r,n),s.translator.options=r,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const zo=ZO.createInstance();zo.createInstance;zo.dir;zo.init;zo.loadResources;zo.reloadResources;zo.use;zo.changeLanguage;zo.getFixedT;zo.t;zo.exists;zo.setDefaultNamespace;zo.hasLoadedNamespace;zo.loadNamespaces;zo.loadLanguages;var wfe={exports:{}},Xn={};/** +安装命令:{{command}}`,title:"接力到云端继续执行",description:"按顺序复制两段提示词,Codex 会通过插件将您的本地任务接力到云端",closeAria:"关闭本地迁移引导",installTitle:"安装插件",installDescription:"首次使用时,请选择一种安装方式。",copied:"已复制",copyInstallPrompt:"复制安装提示词",copyInstallCommand:"复制安装命令",installMethodAria:"插件安装方式",conversationInstall:"与 Codex 对话安装",terminalInstall:"从终端安装",taskTitle:"任务接力",taskDescription:"插件安装完成后复制,Codex 会迁移当前项目并继续执行任务。",copyHandoffPrompt:"复制接力提示词",generatingPairing:"正在生成新的配对码",pairingExpired:"配对码已过期",pairingRemaining:"配对码有效期剩余 {{countdown}}",refreshing:"刷新中",refreshPairing:"刷新配对码",pairingLoading:"正在生成配对码",pairingUnavailable:"配对码尚未生成。",statusAria:"端云接力状态",statusTitle:"接力状态",requestReceivedNamed:"已收到“{{name}}”的端云接力请求",requestReceivedCurrent:"已收到当前项目的端云接力请求",requestHelp:"复制接力提示词后,Codex 的请求会显示在这里。",entering:"正在进入",enterCodex:"进入 Codex",clipboardUnsupported:"当前浏览器不支持写入剪贴板。",steps:{request:"等待端侧请求",session:"创建云端 Session",restore:"恢复项目",continue:"发送续跑任务"},status:{issued:"等待请求",creating:"正在创建 Session",sessionCreated:"正在迁移项目",continuing:"正在启动云端任务",running:"云端执行中",completed:"接力完成",failed:"接力失败"}},Kue={model:{description:"显示或切换当前对话模型",keywords:"模型 switch"},models:{description:"列出 app-server 可用模型",keywords:"模型列表 list"},skill:{description:"浏览并调用当前工作区可用的 Skill",keywords:"技能 workflow"},skills:{description:"浏览并调用当前工作区可用的 Skills",keywords:"技能列表 workflow list"},new:{description:"开始一个新对话",keywords:"新建 对话"},resume:{description:"打开历史会话或恢复指定 Thread",keywords:"历史 恢复 session"},fork:{description:"从当前上下文分叉一个新对话",keywords:"分叉 branch"},compact:{description:"压缩当前对话上下文",keywords:"压缩 上下文"},archive:{description:"归档当前对话并新建对话",keywords:"归档 关闭"},status:{description:"显示当前连接、Thread、模型与 Token 状态",keywords:"状态 连接 token"},clear:{description:"清空当前视图并开始新对话",keywords:"清空 重置"},help:{description:"显示 Sandbox 支持的快捷命令",keywords:"帮助 命令"},currentModel:"当前模型",availableModel:"可用模型",workspace:"工作空间",notSet:"未设置",modelLabel:"模型",statusLabel:"状态",running:"运行中",idle:"空闲",totalTokens:"累计 Token",contextWindow:"上下文窗口",imageFallback:"图片",unknown:"未知快捷命令:{{command}}。输入 /help 查看可用命令。",automaticSkills:"智能开发模式会自动使用开发能力,无需手动选择 Skill。",activity:{new:"已新建 Codex 对话",resumed:"已恢复 Codex 对话",deleted:"已删除 Codex 历史会话",modelChanged:"已切换 Codex 模型",availableModels:"Codex 可用模型",noModels:"当前没有可用模型",forked:"已分叉 Codex 对话",compacting:"已开始压缩当前 Codex 对话",archived:"已归档 Codex 对话",status:"Codex 当前状态",help:"Sandbox 支持的 Codex 快捷命令"}},Gue={common:Mue,tool:Lue,threads:$ue,permissions:Fue,workspace:Bue,approval:Uue,composer:Que,launch:zue,session:Vue,agentDetails:Hue,agentWorkspace:que,handoff:Wue,commands:Kue},cMe=Object.freeze(Object.defineProperty({__proto__:null,agentDetails:Hue,agentWorkspace:que,approval:Uue,commands:Kue,common:Mue,composer:Que,default:Gue,handoff:Wue,launch:zue,permissions:Fue,session:Vue,threads:$ue,tool:Lue,workspace:Bue},Symbol.toStringTag,{value:"Module"})),Xue={retry:"重试",signInToContinue:"登录以继续使用",signInWith:"使用 {{provider}} 登录",enterUsername:"输入一个用户名即可开始",usernamePlaceholder:"用户名(字母 + 数字,最多 16 位)",enter:"进入",usernameInvalid:"只能包含大小写字母和数字,最多 16 位。",identityProvider:{volcengine:"火山引擎 Identity",byteplus:"BytePlus Identity"},powered:{volcengine:"火山引擎 AgentKit 提供企业级 Agent 解决方案",byteplus:"BytePlus AgentKit 提供企业级 Agent 解决方案"},legalPrefix:"继续即表示你已阅读并同意 AgentKit",terms:"产品和服务条款",copyright:"© {{year}} VeADK。保留所有权利。"},Yue={title:"登录状态已过期",description:"当前编辑内容会保留。重新登录后,刚才的操作将自动继续。",waiting:"等待登录完成…",signInAgain:"重新登录"},Zue={breadcrumbs:"面包屑",selectAgent:"选择 Agent",switchAgent:"切换智能体"},Jue={cancel:"取消",close:"关闭确认框"},uMe={login:Xue,authExpired:Yue,navbar:Zue,confirm:Jue},dMe=Object.freeze(Object.defineProperty({__proto__:null,authExpired:Yue,confirm:Jue,default:uMe,login:Xue,navbar:Zue},Symbol.toStringTag,{value:"Module"})),ede={defaultUser:"用户",shortcuts:"快捷入口",tryCli:"体验 AgentKit CLI",developerResources:"开发者资源",systemInfo:"系统信息",language:"语言",issueFeedback:"问题反馈",logout:"退出登录",roles:{admin:"管理员",developer:"开发者",user:"普通用户"}},tde={home:"返回首页",expand:"展开侧边栏",collapse:"收起侧边栏",label:"主导航",newChat:"新会话",agents:"智能体",workspaces:"工作区",library:"资源库",cronjobs:"定时任务",automations:"自动化"},nde={title:"历史会话",newConversation:"新会话",create:"新建会话",loading:"正在加载历史会话…",empty:"暂无会话",current:"当前",manage:"管理历史会话:{{title}}",more:"更多",delete:"删除",loadingMore:"加载中…",loadMore:"加载更多",evaluatingTitle:"正在自动评测",evaluating:"评测中",generating:"正在生成"},fMe={account:ede,navigation:tde,history:nde},hMe=Object.freeze(Object.defineProperty({__proto__:null,account:ede,default:fMe,history:nde,navigation:tde},Symbol.toStringTag,{value:"Module"})),ide={placeholder:"请选择",collapseOptions:"收起模型选项",expandOptions:"展开模型选项",noOptions:"暂无可用选项",noMatches:"没有匹配项,可直接使用当前模型 ID"},rde={unsupportedActivity:"不支持的 Skill 对话活动",ariaLabel:"Skill 生成对话"},sde={code:"错误码:{{code}}",type:"错误类型:{{type}}",representation:"异常表示:{{value}}",rawResponse:`服务端原始响应: +{{value}}`,original:"原始错误:{{message}}",details:"详细信息"},ade={ariaLabel:"Skill 文件树",viewSource:"查看源码",viewPreview:"查看预览",download:"下载",binaryFile:"二进制文件",bytes:"{{value}} 字节",binaryDescription:"当前接口仅返回文件元数据,可单独下载原文件。",metadata:"Skill 元数据",noFiles:"暂无文件"},ode={close:"关闭",name:"名称",region:"地域",optionalDescription:"描述(可选)",cancel:"取消",create:"创建",creating:"创建中…",save:"保存",saving:"保存中…",upload:"上传",uploading:"上传中…",createSpaceTitle:"新建 Skill 空间",editSpaceTitle:"编辑 Skill 空间",uploadTitle:"上传到 {{name}}",createSpaceFailed:"创建 Skill 空间失败",updateSpaceFailed:"更新 Skill 空间失败",archiveValidationFailed:"Skill ZIP 格式校验失败",uploadFailed:"上传 Skill 失败",dropzone:"拖拽 Skill ZIP 到这里",chooseLocalFile:"或点击选择本地文件",archiveHelp:"ZIP 根目录需要包含 SKILL.md,也可以只包含一层包装目录。选择后仅检查格式,不会自动上传。",validating:"正在检查文件格式…",validationPassed:"格式检查通过:{{name}},共 {{count}} 个文件"},lde={styles:{concise:"简洁实用",strict:"严谨稳健",tutorial:"教程友好",automation:"自动化优先",custom:"自定义",customFallback:"自定义风格"},stages:{preparing:"正在准备 Dev Sandbox",ready:"Skill 已生成并通过格式校验",failed:"生成失败",cancelled:"已停止",validating:"正在校验 Skill 格式",packaging:"正在整理文件",generating:"正在生成 Skill",repairingAgain:"正在再次修复",autoRepairing:"正在自动修复({{attempt}}/{{max}})"},validation:{fallback:"Skill 格式校验未通过",repairInstruction:"只修复下面列出的 Skill 格式错误,不要改变原有用途和内容范围。",recheckInstruction:"修复后重新检查目录结构、SKILL.md frontmatter 和所有文本文件。",nameTooLong:"Skill 名称不能超过 64 个字符",invalidName:"Skill 名称只能包含小写字母、数字和连字符",modelTooLong:"模型 ID 不能超过 128 个字符",invalidModel:"模型 ID 只能包含字母、数字、点、下划线、连字符、斜杠和冒号"},errors:{loadCapability:"读取 Dev Sandbox 配置失败",autoRepair:"自动修复格式错误失败",pollCandidate:"读取候选方案状态失败,正在重试",createCandidate:"创建候选方案失败",refine:"继续调整失败",repairAgain:"再次修复格式错误失败",selectSpace:"请选择上传的 Skill Space",unsupportedRegion:"当前 Skill 地域不受支持",upload:"上传 Skill 失败",download:"下载失败"},sessionMax:"Session 最长保留 1 小时",remaining:"剩余 {{minutes}}:{{seconds}}",unnamedSpace:"未命名 Skill Space",leaveConfirmation:"离开后将停止并释放正在运行的 Dev Sandbox,确定离开吗?",createTitle:"创建技能",optimizeTitle:"优化 {{name}}",skillFallback:"技能",back:"返回技能空间",home:"主页技能生成",basicInfo:"基本信息",goal:"目标",createIntentPlaceholder:"描述希望这个 Skill 完成什么任务",optimizeIntentPlaceholder:"描述希望如何优化当前 Skill",skillName:"Skill 名称",autoNamePlaceholder:"留空时自动生成",nameHelp:"仅支持小写字母、数字和连字符;留空时自动生成。",createPlans:"生成方案",optimizePlans:"优化方案",createPlansDescription:"按不同方案并行生成多个技能,您可以选择最佳结果",optimizePlansDescription:"按不同方案并行优化当前技能,您可以选择最佳结果",plan:"方案 {{count}}",remove:"移除",model:"模型",modelPlaceholder:"选择或输入模型 ID",style:"风格",customStyle:"自定义风格",customStylePlaceholder:"描述表达方式、严谨程度或输出偏好",addConfiguration:"添加配置",notConfigured:"管理员未配置",generate:"生成",candidates:"候选方案",progress:"进度",retryCandidate:"重试此方案",formatValidationFailed:"格式校验未通过",repairAgain:"再次修复",files:"文件",downloadZip:"下载 ZIP",loadingFiles:"正在读取文件…",filesPending:"生成过程中会在这里显示完整文件树",uploadToSpace:"上传到 Skill Space",loadingSpaces:"正在加载 Skill Space",selectSpace:"选择 Skill Space",continuePlaceholder:"继续调整这个候选方案",continue:"继续调整",uploading:"上传中…",overwrite:"覆盖原 Skill",uploadToSelectedSpace:"上传到 Skill Space",uploadToCurrentSpace:"上传到当前空间",allCandidatesFailed:"所有方案均创建失败,可分别重试。"},cde={invalidFormat:"{{label}}格式错误。",recoveryStatus:"Skill 恢复点状态",errorResponse:"错误响应",errorDetails:"错误详情",missingContentType:"Content-Type 缺失",gatewayError:"{{fallback}}(HTTP {{status}},Content-Type: {{contentType}})。请检查代理或网关配置。",nonJson:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}},Content-Type: {{contentType}}),请检查代理或网关配置。",activity:"Skill 会话活动",invalidActivity:"Skill 会话活动格式错误。",invalidToolActivity:"Skill 工具活动格式错误。",invalidTextActivity:"Skill 文本活动格式错误。",publication:"Skill 发布结果",task:"Skill 会话",file:"Skill 文件",unknownTaskState:"Skill 会话状态无法识别。",capability:"Skill 工作台能力",loadCapability:"读取 Skill 工作台能力失败",prepareTask:"准备 Skill 会话失败",taskReference:"Skill 会话引用",startOptimization:"开始优化 Skill 失败",startTask:"开始 Skill 会话失败",taskSummary:"Skill 会话摘要",taskList:"Skill 会话列表",loadTaskList:"读取 Skill 会话列表失败",invalidTaskList:"Skill 会话列表格式错误。",loadTask:"读取 Skill 会话失败",artifact:"Skill 产物",artifactFile:"Skill 产物文件",loadArtifact:"读取 Skill 产物失败",refine:"继续调整 Skill 失败",stop:"停止当前 Skill 任务失败",publish:"发布 Skill 失败",nonNdjson:"发布 Skill 失败:服务端返回了非 NDJSON 响应。",missingStream:"发布 Skill 失败:服务端没有返回进度流。",publishProgress:"发布进度",invalidPublishProgress:"发布进度格式错误。",publishError:"发布错误",unknownPublishEvent:"未知的发布进度事件。",publishResult:"发布结果",streamEnded:"发布进度流提前结束,无法确认发布结果。请刷新技能中心确认状态。",deleteTask:"删除 Skill 会话失败",download:"下载 Skill 失败"},ude={configSelect:ide,conversation:rde,errorDetails:sde,fileTree:ade,management:ode,generation:lde,api:cde},pMe=Object.freeze(Object.defineProperty({__proto__:null,api:cde,configSelect:ide,conversation:rde,default:ude,errorDetails:sde,fileTree:ade,generation:lde,management:ode},Symbol.toStringTag,{value:"Module"})),dde={back:"返回上一页",reload:"重新加载",notConfigured:"未配置",name:"名称",description:"描述",delete:"删除",save:"保存",saving:"保存中",add:"添加",manage:"管理",environment:"环境",noDescription:"暂无描述",refresh:"刷新",close:"关闭",retry:"重试",loading:"加载中…",previousPage:"上一页",nextPage:"下一页",edit:"编辑",all:"全部",search:"搜索",cancel:"取消",view:"查看",viewDetails:"查看详情",deleting:"删除中…",create:"创建",creating:"创建中",adding:"添加中",generating:"生成中",uploading:"上传中",preview:"预览",loadFailed:"加载失败",select:"选择",collapse:"收起",expand:"展开",none:"无"},fde={ariaLabel:"AgentKit 快速入口",closeAriaLabel:"关闭 AgentKit 欢迎卡片",title:"欢迎使用 AgentKit",description:"通过 AgentKit 平台快速构建与托管您的企业级智能体",docsAriaLabel:"打开 AgentKit 文档,在新窗口打开",docs:"文档",consoleAriaLabel:"打开 AgentKit 控制台,在新窗口打开",console:"控制台"},hde={checkUpdates:"检查更新",checkingVersions:"正在检查版本…",versionCheckError:"查询沙箱版本失败,请检查凭据、区域及接口权限后重试",sandboxUpdateError:"Sandbox 更新失败,请刷新检查实际状态后重试",modelEnvRepairUnavailable:"无法补齐模型环境变量,请检查 CODEX_API_KEY 和 CODEX_BASE_URL",updateSandbox:"更新{{variant}}{{name}}",updatingSandbox:"更新中",title:"系统信息",description:"查看当前 Studio 版本及关联的基础资源",general:"通用",currentVersion:"当前版本",storage:"存储",loadingStorage:"正在加载存储信息",tosAddress:"TOS 地址",openTosConsole:"在云控制台中打开 TOS 存储桶",environmentBuild:"环境构建",loadingEnvironmentResources:"正在加载环境构建资源",environmentResourcesError:"环境构建资源加载失败,请检查云凭据后重试。",codePipelineWorkspace:"CodePipeline 工作空间",codePipelinePipeline:"CodePipeline 流水线",openCodePipelineWorkspace:"在云控制台中打开 CodePipeline Workspace",createdOnFirstBuild:"首次构建时自动创建",containerRegistryRepository:"Container Registry 仓库",openContainerRegistryRepository:"在云控制台中打开 Container Registry 仓库",sandboxInfo:"沙箱信息",loadingSandboxInfo:"正在加载沙箱信息",sandboxInfoError:"沙箱信息加载失败,请重试。",snapshot:"快照版",snapshotWithSpace:"快照版 ",openToolConsole:"在云控制台中打开{{name}}",updateModelEnv:"更新{{variant}}{{name}}模型环境变量",modelEnvUpdated:"已更新",modelEnvAlreadyCurrent:"无需更新",userPool:"用户池",loadingUserPool:"正在加载用户池",userPoolError:"用户池加载失败,请重试。",modelEnvUpdateError:"模型环境变量更新失败,请重试。",openUserPoolConsole:"在云控制台中打开用户池{{name}}",unnamedUserPool:"未命名用户池",id:"ID",domain:"域名",region:"区域",noLocalUserPool:"本地模式未配置用户池",noUserPool:"当前 Studio 未配置用户池"},pde={workspace:"Agent 工作区",library:"Agent 库",evaluation:"评测",agentList:"Agent 列表",agentDetails:"Agent 详情",newAgent:"新建 Agent",loading:"加载中…",loadingCloudAgents:"正在加载云端 Agent…",noAgentSelected:"请选择一个 Agent",local:"本地",remote:"云端",localAgent:"本地 Agent",remoteAgent:"云端 Agent",agentCount:"{{count}} 个 Agent",agentCountLabel:"Agent 数量",details:"详情",chat:"对话",update:"更新",backToAgentList:"返回 Agent 列表",loadingAgent:"正在加载 Agent",loadingAgentDescription:"正在读取 Agent 配置和 Runtime 信息。",loadingAgentInfo:"正在加载 Agent 信息…",detailLoadFailed:"无法加载 Agent 详情",detailLoadFailedDescription:"请检查 Runtime 状态后重试。",partialInfoUnavailable:"部分信息暂时不可用",upgradeRuntimeForDetails:"请升级 Runtime 以查看完整 Agent 信息。",basicInfo:"基本信息",usageOverview:"使用概览",sections:{basic:"基本信息",usage:"使用概览",evaluations:"评测",optimizations:"优化建议",integrations:"集成",versions:"版本"},evaluationGroup:"评测组",optimizations:"优化建议",optimizationsDescription:"根据评测结果查看可执行的优化建议。",integrations:"集成",githubVersions:"GitHub 版本",githubVersionsDescription:"查看持续交付产生的版本并创建回退 PR。",currentVersionOnly:"当前未启用 GitHub 持续交付,仅展示当前生产版本。",loadingVersions:"正在加载版本…",noVersion:"暂无版本记录",prLink:"Pull Request",viewPr:"查看 PR",author:"提交人",publishStatus:"发布状态",viewRelease:"查看发布记录",rollbackToVersion:"回退到此版本",rollingBack:"正在创建回退…",rollbackEvent:"回退事件",sourceMergedRuntimeStill:"最新源码已合并,但 Runtime 仍处于",currentProductionVersionHint:";当前生产版本保持不变。",usageSummary:"使用统计",totalCalls:"总调用次数",userCount:"用户数",userDetails:"用户明细",usageUserList:"Agent 使用用户列表",user:"用户",callCount:"调用次数",lastUsed:"最近使用",unknownUser:"未知用户",loadingUsage:"正在加载使用数据…",refreshing:"刷新中…",noUsage:"暂无使用记录",usageUnavailable:"当前 Agent 暂无可用的使用统计。",usagePagination:"使用记录分页",pageOf:"第 {{page}} / {{total}} 页",notProvided:"暂未提供",integrationMethods:"集成方式",integrationDescription:"通过 Runtime API 或 A2A 协议集成当前 Agent。",integrationProtocol:"集成协议",runtimeStatus:"Runtime 状态",executionFlow:"执行流程",probingIntegration:"正在检测集成能力",probingIntegrationDescription:"正在读取可用端点和鉴权配置。",configurationStatus:"配置状态",discoveryEndpoint:"发现端点",invocationEndpoint:"调用端点",invocationUrl:"调用地址",authentication:"鉴权方式",networkAccess:"网络访问",notAvailable:"暂无",noAuthentication:"无需鉴权",noApiKeyRequired:"无需 API Key",usesOauthJwt:"使用 OAuth / JWT",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",pythonExample:"Python 示例",deploymentConfig:"部署配置",deploymentConfigDescription:"确认实例和运行配置后更新 Runtime。",deploymentRegion:"部署区域",concurrency:"并发数",selectedOptimizations:"已选优化项",selectedOptimizationsDescription:"这些优化会应用到本次更新。",optimizationProfile:"优化方案",updatePending:"等待更新",updatingDeployment:"正在更新部署",restoringUpdateConfig:"正在恢复更新配置…",updateConfigUnavailable:"无法读取更新配置",legacyConfigMissing:"旧版本 Runtime 缺少可恢复的配置,请重新创建。",deploymentFailed:"部署失败",continueEditing:"继续编辑",loadingOptimizations:"正在加载优化建议…",noOptimizations:"暂无优化建议",fixPriority:"优先级",suggestedModule:"建议模块",suggestionAndReason:"建议与原因",priority:{high:"高",medium:"中",low:"低"},modules:{agentStructure:"Agent 结构",prompt:"提示词",tool:"工具",knowledge:"知识库",memory:"记忆",workflow:"工作流",other:"其他"},evaluationGroupList:"评测组列表",newEvaluationGroup:"新建评测组",newEvaluationGroupName:"新评测组 {{count}}",searchEvaluationGroups:"搜索评测组",noMatchingEvaluationGroups:"没有匹配的评测组",noEvaluationGroupSelected:"请选择一个评测组",groupStats:"{{agents}} 个 Agent · {{runs}} 次运行",evaluationGroupDetails:"评测组详情",evaluationGroupStats:"{{agents}} 个 Agent · {{caseSet}} · {{runs}} 次运行",startEvaluation:"开始评测",evaluationConfig:"评测配置",historyResults:"历史结果",participatingAgents:"参与 Agent",selectedCount:"已选择 {{count}} 个",evaluationResources:"评测资源",evaluationSet:"评测集",evaluator:"评估器",caseCount:"{{count}} 条案例",evaluationMetrics:"评测指标",selectedMetricCount:"已选择 {{count}} 项",historyDescription:"查看每次评测的分数和运行状态。",noHistory:"暂无评测历史",noHistoryDescription:"运行一次评测后,结果会显示在这里。",evaluationRun:"第 {{index}} 次评测",evaluationRunMeta:"{{time}} · {{agents}} 个 Agent",overallScore:"综合分",completed:"已完成",evaluationDefaults:{coreRegression:"核心能力回归",safetyCheck:"安全与幻觉检查",coreSet:"核心回归集",safetySet:"安全边界集",toolSet:"工具调用集",qualityEvaluator:"综合质量评估器",factualEvaluator:"事实一致性评估器",toolEvaluator:"工具调用评估器",responseQuality:"回答质量",factualAccuracy:"事实准确性",toolUse:"工具调用",responseEfficiency:"响应效率",todayTime:"今天 10:32",yesterdayTime:"昨天 16:08",julyTime:"7 月 25 日 14:20",justNow:"刚刚"},defaultCases:{agentName:"示例 Agent",goodSetName:"示例正向案例集",badSetName:"示例负向案例集",weeklyFeedback:{input:"总结本周客户反馈,并按优先级归类。",output:"覆盖主要问题,给出清晰的优先级与下一步动作。",tag:"总结",reason:"任务完整覆盖了用户目标,输出结构清晰,并给出了可执行的下一步动作。"},research:{input:"查询最新公开资料并附上来源。",output:"调用搜索工具,结论与引用一一对应。",tag:"工具调用"},uncertainConclusion:{input:"在信息不足时直接给出确定结论。",output:"应明确说明未知,并主动询问缺失信息。",tag:"幻觉",reason:"信息不足时仍给出了确定结论,缺少必要的澄清步骤与不确定性说明。"},repeatedTool:{input:"连续重复调用相同工具获取同一结果。",output:"复用已有结果,避免无意义的重复调用。",tag:"效率"}},goodCases:"正向案例",badCases:"负向案例",goodCase:"正向案例",badCase:"负向案例",reference:"参考答案",caseResultFilter:"案例结果筛选",feedbackSourceFilter:"反馈来源筛选",searchCases:"搜索案例",searchCasesPlaceholder:"搜索输入、输出或标签",selectCases:"选择案例",selectAll:"全选",selectAllVisible:"选择当前可见案例",selectedCaseCount:"已选择 {{count}} 条",deleteSelected:"删除所选",deleteSelectedTitle:"删除所选 Agent",deleteSelectionDescription:"确定删除所选的 {{count}} 个项目吗?此操作无法撤销。",deleteCasesConfirm:"删除所选案例",deleteOneCaseConfirm:"删除这个案例",deleteFeedbackCase:"删除反馈案例",noFeedbackCases:"暂无反馈案例",noMatchingCases:"没有匹配的案例",loadingEvaluationSet:"正在加载评测集…",userInput:"用户输入",agentOutput:"Agent 输出",score:"得分",scoreReason:"评分原因",noUserInput:"暂无用户输入",noVisibleResponse:"暂无可见回复",note:"备注:",manualFeedback:"人工反馈",automaticFeedback:"自动反馈",scoreValue:"{{score}} 分",unknownTime:"时间未知",deleteAgentTitle:"删除 Agent",deleteAgentDescription:"确定删除 Agent“{{name}}”吗?",deleteDraftDescription:"确定删除草稿“{{name}}”吗?",deleteAgent:"删除 Agent",closeDeleteConfirmation:"关闭删除确认",draftDeletionWarning:"草稿将从当前浏览器中删除。",runtimeDeletionWarning:"Runtime 和相关云端资源将被删除。",noneSelected:"尚未选择",none:"无",notPublished:"未发布",notRecorded:"未记录",noTime:"暂无时间",noPr:"暂无 PR",comingSoon:"评测能力即将开放",preparing:"准备中",cancelled:"已取消",failed:"失败",totalCount:"共 {{count}} 条",deploymentProgress:"部署进度",returnToEdit:"返回编辑",buildLog:"构建日志",githubMountLog:"GitHub 挂载日志",githubDeliveryMountLog:"GitHub 持续交付挂载日志",waitingBuildLog:"正在等待构建日志…",waitingGithubMountLog:"正在等待 GitHub 挂载日志…",copy:"复制",copied:"已复制",copyLabel:"复制{{label}}",copiedLabel:"已复制{{label}}",logLines:"{{count}} 行",logStatus:{synced:"已同步",failed:"读取失败",syncing:"同步中",earlyOmitted:"已省略早期日志",recentOnly:"仅显示最近的构建日志",partiallyOmitted:"已省略部分日志"},deployStatus:{running:"正在部署",success:"部署完成",error:"部署失败",cancelled:"部署已取消"},deploymentSteps:{prepare:{label:"准备部署",description:"校验配置并创建部署任务"},build:{label:"构建镜像",description:"生成运行环境与智能体代码"},deploy:{label:"部署服务",description:"创建并启动 AgentKit Runtime"},publish:{label:"发布服务",description:"等待服务就绪并生成访问地址"},complete:{label:"部署完成",description:"智能体已可以正常使用"},evaluation:{label:"创建评测集",description:"自动创建 Good Case 和 Bad Case 评测集"},github:{label:"挂载 GitHub 持续交付",description:"初始化目标分支与 GitHub Actions workflow"},update:{label:"更新实例配置",description:"将 Runtime 实例数调整为 {{min}}~{{max}}"}},githubStatus:{published:"已发布",publishing:"发布中",failed:"发布失败",pending:"等待发布",unknown:"未知"},errors:{agentInfoMissing:"Agent 信息不可用",checkUpdateCapability:"无法检查更新能力",checkingUpdateConfig:"正在检查更新配置",cloudOnlyUpdate:"仅云端 Agent 支持更新",deleteDeployedUnsupported:"当前不支持删除已部署 Agent",deleteDraftUnsupported:"当前不支持删除草稿",loadAgentInfo:"无法加载 Agent 信息",loadApiKey:"无法读取 API Key",loadGithubVersions:"无法加载 GitHub 版本",loadEvaluations:"无法加载评测案例",loadOptimizations:"无法加载优化建议",loadRuntimeDetails:"无法加载 Runtime 详情",loadUsage:"无法加载使用数据",noCreatePermission:"当前账号没有创建 Agent 的权限",noManagePermission:"当前账号没有管理此 Agent 的权限",originalConfigUnavailable:"原始配置不可用",probeIntegration:"无法检测集成能力",rollbackVersion:"无法创建版本回退",runtimeRegionMissing:"Runtime 区域信息缺失",updateCapabilityMismatch:"Runtime 更新能力与当前配置不匹配",updateCapabilityPending:"Runtime 更新能力仍在确认中",updateConfigRestoring:"正在恢复更新配置",updateUnsupported:"当前 Runtime 不支持更新",usageMismatch:"返回的使用数据与当前 Agent 不匹配"}},mde={title:"环境",loadFailed:"环境加载失败,请检查存储配置后重试。",create:"新建环境",configure:"配置环境",details:"环境详情",editorDescription:"配置运行环境,或接入代码仓库和已有镜像",backToList:"返回环境列表",save:"保存环境",createAndBuild:"创建并构建",saveAndBuild:"保存并构建",name:"环境名称",namePlaceholder:"Python 数据处理",descriptionPlaceholder:"说明这个环境适合处理的任务",creationMethod:"创建方式",baseConfiguration:"基础配置",baseEnvironment:"基础环境",operatingSystem:"操作系统",pythonVersion:"Python 版本",fixedByBase:"由 {{base}} 固定为 {{value}}",selectUbuntuVersion:"选择基础镜像的 Ubuntu 版本",selectPythonVersion:"选择需要安装的 Python 版本",skills:"技能",addSkill:"添加环境技能",veadkDescription:"Agent 开发与运行框架",customDockerfile:"自定义 Dockerfile",presetEnvironment:"预制环境",presetHint:"选择“无”可自行填写 Dockerfile 第一行的基础镜像。",dockerfileSize:"{{size}} / {{max}} 字节",upload:"上传",reset:"重置",dockerfileBaseImage:"Dockerfile 基础镜像",dockerfileContent:"Dockerfile 内容",region:"区域",search:"搜索环境",manualImport:"手动导入",noMatches:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称",startBuild:"开始构建",build:"构建",unnamed:"未命名环境",listSeparator:"、",clipboardReadError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。",creation:{custom:{label:"自定义配置",description:"通过表单选择基础环境、Python、工具和技能"},dockerfile:{label:"自定义 Dockerfile",description:"上传或直接编辑 Dockerfile"},git:{label:"从代码仓库构建",description:"探查公开仓库并通过 CodePipeline 构建"},image:{label:"使用已有镜像",description:"绑定由外部流水线交付的 CR 镜像"}},baseDescriptions:{"aio-sandbox":"内置 Sandbox Shell 能力 · Ubuntu 22.04","codex-sandbox":"内置 Codex CLI、浏览器与代码执行环境",ubuntu:"标准 Linux 基础镜像"},dockerfileValidation:{baseImageRequired:"请填写基础镜像。",duplicateFrom:"基础镜像已固定在第一行,请删除 Dockerfile 正文中的 FROM 指令。",tooLarge:"Dockerfile 不能超过 128 KiB。",empty:"Dockerfile 内容不能为空。",missingFrom:"Dockerfile 缺少 FROM 指令。"},presets:{none:"自行填写 Dockerfile 基础镜像",aio:"内置 Sandbox Shell 与常用运行时",codex:"内置 Codex CLI、浏览器与代码执行环境"},categories:{tools:"工具",productivity:"效率",browser:"浏览器自动化",system:"系统与媒体"},options:{"lark-cli":"飞书开放平台命令行工具",pandoc:"文档格式转换工具",opencli:"将网站与桌面应用转换为命令行工具",uv:"快速 Python 包与项目管理器",ripgrep:"高性能文本检索工具",jq:"JSON 查询与转换工具","github-cli":"在终端中管理 GitHub 工作流",playwright:"浏览器自动化与端到端测试",chromium:"无头浏览器运行时",git:"代码版本管理",curl:"网络请求与文件下载",ffmpeg:"音视频转码与处理",imagemagick:"图片转换与批处理"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒",hoursMinutes:"{{hours}} 小时 {{minutes}} 分"},buildStatus:{preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"构建失败",notBuilt:"未构建"},manifest:{title:"环境 Manifest",closeLabel:"关闭环境 Manifest",loading:"正在加载 Manifest",editorLabel:"环境 Manifest YAML",copyFailed:"复制失败,请重试",copied:"已复制",copy:"复制 Manifest",view:"查看环境 Manifest",viewShort:"查看 Manifest",unavailable:"尚无可用 Manifest"},buildDetails:{title:"构建详情",closeLabel:"关闭构建详情",currentStep:"当前步骤",waiting:"等待构建信息",elapsed:"已用时",sourceCommit:"源码提交",openCodePipeline:"在 CodePipeline 中查看",starting:"正在启动",rebuild:"重新构建"},git:{sectionLabel:"公开代码仓库",address:"Git 地址",ref:"Branch、Tag 或 Commit",defaultBranch:"默认分支",inspecting:"正在拉取仓库并查找 Dockerfile",foundDockerfiles:"已在提交 {{commit}} 中找到 {{count}} 个 Dockerfile。",savedDockerfileLoaded:"已载入保存的 Dockerfile,可重新探查仓库更新。",noDockerfile:"仓库中未找到 Dockerfile,请检查分支或仓库内容。",inspectAgain:"重新探查",selectDockerfile:"选择 Dockerfile"},repository:{outputSection:"构建输出",type:"镜像仓库类型",managed:"Studio 默认镜像仓库",existing:"已有镜像仓库",managedHint:"构建时自动创建或复用当前区域的 Studio 镜像仓库。"},existingImage:{sectionLabel:"已有镜像",reference:"Tag 或 Digest",placeholder:"latest 或 sha256:...",hint:"填写镜像 Tag,或以 sha256: 开头的完整 Digest。"},share:{action:"分享",title:"分享环境",closeLabel:"关闭分享环境",generating:"正在生成并复制分享码",copied:"分享码已复制",failed:"分享失败",code:"分享码",fullCode:"完整环境分享码",copiedHint:"分享码已自动复制,也可在这里查看或手动复制。",copyFailedHint:"自动复制失败,可手动复制上方分享码,或重试。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅发送给可信对象。",copyAgain:"再次复制"},import:{title:"导入环境",closeLabel:"关闭导入环境",description:"先检测分享码中的环境,再确认添加到当前账号。",code:"环境分享码",tooMany:"最多可一次导入 {{max}} 个环境,当前检测到 {{count}} 个分享码。",multipleHint:"多个分享码可使用英文逗号、中文逗号或换行分隔,重复项会自动忽略。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅导入可信来源的分享码。",inspectingCodes:"正在检测环境分享码",found:"检测到 {{count}} 个环境:{{names}}。",itemError:"第 {{index}} 个分享码:{{error}}",invalidCode:"分享码无效。",noResult:"服务未返回该分享码的导入结果。",partial:"已导入 {{created}} 个环境,{{remaining}} 个未完成,可重试有效失败项。",inspecting:"正在检测",importing:"正在导入",retryImport:"重试导入",confirm:"确认导入",inspectCodes:"检测分享码"},status:{boundImage:"环境“{{name}}”已绑定已有镜像",queued:"环境“{{name}}”已进入构建队列",savedBuildFailed:"环境已保存,但构建未启动:{{error}}",importedFailed:"已导入 {{created}} 个环境,{{failed}} 个失败",importedDuplicate:"已导入 {{created}} 个环境,{{duplicate}} 个分享码已存在",imported:"已导入 {{count}} 个环境",deleted:"已删除环境“{{name}}”"},deleteTitle:"删除环境",deleteDescription:"确定删除环境“{{name}}”吗?删除后无法恢复。",errors:{repositoryRequired:"请输入公开代码仓库地址。",repositoryHttps:"请输入公开仓库的 HTTPS 地址。",repositoryInvalid:"请输入有效的公开仓库 HTTPS 地址。",imageReferenceWhitespace:"Tag 或 Digest 不能包含空格。",imageDigestInvalid:"Digest 必须是完整的 sha256 值。",imageTagOnly:"这里只填写 Tag,不要重复填写镜像仓库路径。"}},gde={searchPlaceholder:"搜索资源名称",emptyMessage:"暂无可用选项",searchAriaLabel:"搜索{{label}}",loadingMore:"正在加载更多资源…"},bde={retryDeployment:"重试部署",retrying:"正在重试…",collapse:"收起错误信息",expand:"展开完整错误信息",copy:"复制完整错误信息"},yde={steps:"构建步骤",log:"构建日志",syncing:"同步中",loadFailed:"读取失败",synced:"已同步",recentOnly:" · 仅显示最近日志",copiedLog:"已复制构建日志",copyLog:"复制构建日志",copied:"已复制",copy:"复制",logContent:"构建日志内容",waiting:"正在等待 CodePipeline 输出日志…",empty:"暂无构建日志"},vde={defaultLabel:"Studio 默认环境",defaultDescription:"使用 Studio 预置的标准运行环境",status:{notBuilt:"未构建",preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"失败"},label:"运行环境",placeholder:"请选择运行环境",search:"搜索运行环境",loading:"正在加载运行环境…",loadFailed:"加载运行环境失败",noMatches:"未找到匹配的运行环境",unavailable:"当前没有可用的运行环境",selectionUnavailable:"所选运行环境当前不可用,请重新选择。",selectionHint:"选择构建完成的运行环境后,部署将使用其镜像和工具配置。",versionChanged:"所选环境版本已更新,请确认后继续。",versionMissing:"所选环境版本已不存在,请重新选择。",operatingSystem:"操作系统",language:"语言",image:"镜像",imageVersion:"镜像版本",skills:"技能",tools:"工具",noSkills:"未配置 Skill",noExtraTools:"未配置额外工具",defaultGuidance:"默认环境由 Studio 管理,无需额外配置。",persistenceFallback:"持久化环境服务暂不可用,当前使用默认环境。",emptyFallback:"当前没有可选择的自定义环境。"},xde={repository:"GitHub 仓库",githubUrl:"GitHub 地址",token:"访问令牌",sessionToken:"{{provider}} 临时令牌",runtime:"Runtime",commit:"提交",workflow:"工作流",syncFailed:"同步 GitHub 代码失败",status:{mounted:"已挂载",bound:"已绑定",synced:"已同步",created:"已创建"},volcengine:"火山引擎",mountDelivery:"挂载持续交付",selectedForDeployment:"已选择,部署时挂载",mountOnDeploy:"部署时挂载持续交付",syncCode:"同步代码",deliveryMode:"GitHub 交付模式",sourceSync:"GitHub 代码同步",delivery:"GitHub 交付",loading:"读取中",running:"执行中",runtimeDeliveryHint:"写入 AgentKit Runtime GitHub Actions workflow,后续 GitHub 提交会更新绑定 Runtime。",initialDeliveryHint:"首次部署成功后初始化目标分支,后续 GitHub 提交会更新绑定 Runtime。",sourceSyncHint:"Studio 会直接 push 到目标分支;该分支由 Studio 管理,远端冲突时同步会失败。Runtime 仍由部署按钮发布。",tokenPlaceholder:"repo 或 contents write 权限",targetBranch:"目标分支",actionsSecretPlaceholder:"用于写入 GitHub Actions Secret",sessionTokenPlaceholder:"临时凭证可选",syncing:"同步中…",pendingHint:"已选择挂载持续交付。点击部署后,Studio 会等待 Runtime 创建完成并初始化 GitHub 目标分支,初始化成功后才完成部署流程。",result:{deliveryMounted:"已挂载持续交付",deliverySelected:"已选择挂载持续交付",githubBound:"已绑定 GitHub",codeSynced:"代码已同步",deliveryHint:"目标分支提交会触发 Runtime 持续交付。",boundHint:"更新并发布时会先同步当前源码到这个分支。"},branch:"分支",viewPr:"查看 PR",createFailed:"创建失败",phase:"阶段",log:"日志"},Ode={name:"飞书",enabling:"正在启用并更新配置…",description:"接收消息并通过飞书机器人回复",configuration:"飞书配置",configurationMode:"飞书配置方式",automatic:"自动配置",manual:"手动配置",cancelling:"取消中…",scanToCreate:"扫码创建",scanDescription:"授权后自动回填凭据",generateQrCode:"生成二维码",qrCodeAlt:"飞书机器人配置二维码",scanToConfirm:"飞书扫码确认",expiresIn:"{{time}} 后失效",created:"机器人已创建",credentialsFilled:"应用凭据已自动回填",qrCodeExpired:"二维码已失效",automaticFailed:"自动配置失败",regenerateQrCode:"请重新生成二维码。",configuredPlaceholder:"已配置,留空沿用",appSecretPlaceholder:"请输入 App Secret",hideSecret:"隐藏 App Secret",showSecret:"显示 App Secret"},wde={mode:{auto:"自动创建",autoDescription:"部署时自动创建所需资源",recommended:"推荐",create:"指定名称",createDescription:"使用指定名称创建或复用资源",existing:"选择已有",existingDescription:"从当前账号的已有资源中选择"},selectExisting:"请选择已有资源",searchResource:"搜索资源名称",noMatch:"未找到匹配资源",noAvailable:"暂无可用资源",searching:"正在搜索云资源…",loading:"正在加载云资源…",noMatchSentence:"未找到匹配资源。",noAvailableSentence:"暂无可用资源。",loadedSummary:"实际服务区域:{{region}} · 已加载 {{loaded}}{{total}}",registryInstance:"Registry 实例",registryAriaLabel:"镜像仓库 Registry 实例",namespace:"命名空间",namespaceAriaLabel:"镜像仓库 Namespace",repository:"镜像仓库",existingRepository:"已有镜像仓库",selectRegistryFirst:"请先选择 Registry 实例。",selectNamespaceFirst:"请先选择 Namespace。",configurationMode:"配置方式",configurationModeAriaLabel:"{{resource}}配置方式",selectConfigurationMode:"请选择配置方式",automaticNames:"自动创建名称",validation:{tos:"请填写或选择 TOS 存储桶。",cr:"请完整填写或选择 CR 实例、命名空间和镜像仓库。",codePipeline:"请完整填写或选择 CodePipeline Workspace 和 Pipeline。",existingCodePipeline:"请选择已有的 CodePipeline Workspace 和兼容 Pipeline。"},autoBucketWithRegion:"agentkit-platform-{账号 ID}-{{region}}",autoBucket:"agentkit-platform-{账号 ID}",tosBucket:"TOS 存储桶",bucketName:"存储桶名称",bucketNamePlaceholder:"输入存储桶名称",existingBucket:"已有存储桶",existingTosBucket:"已有 TOS 存储桶",bucket:"存储桶",accountIdResolved:"账号 ID 在部署时按当前云账号解析。",containerRegistry:"容器镜像仓库(CR)",instanceName:"实例名称",crInstance:"CR 实例",existingCrInstance:"已有 CR 实例",existingCrNamespace:"已有 CR 命名空间",existingCrRepository:"已有 CR 镜像仓库",autoRegistry:"agentkit-platform-{账号 ID}",autoRepositoryName:"{{name}}-{4 位随机字符}",registryNameNote:"账号 ID 在部署时解析,镜像仓库的随机字符在部署时生成。",workspace:"工作空间",pipeline:"流水线",workspaceName:"Workspace 名称",pipelineName:"Pipeline 名称",existingWorkspace:"已有 CodePipeline Workspace",compatiblePipeline:"兼容 Pipeline",existingPipeline:"已有 AgentKit CodePipeline",pipelineNameNote:"Pipeline 与 Runtime 名称一致。"},Sde={commit:"提交",steps:{permissions:"预检 OTA 所需权限",resolving:"读取目标版本信息",downloading:"下载并校验完整更新包",preparing:"准备 VeFaaS Function 代码",provisioning:"检查并补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布新 Revision 并重启服务"},stages:{permissions:"预检 OTA 权限",resolving:"读取版本信息",downloading:"下载更新包",preparing:"准备 Function 代码",provisioning:"补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布 Revision",checking:"检查更新",unknown:"未知阶段"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒"},logPermissionPrefix:"无法读取 VeFaaS 发布日志。Function 角色缺少 ",logPermissionSuffix:" 权限,更新会继续。",openIamConsole:"前往 IAM 控制台配置权限",deploymentProgress:"部署进度",live:"实时",completed:"已完成",stopped:"已停止",copied:"已复制",copyFailed:"复制失败",copyLog:"复制日志",waitingForLogs:"等待 VeFaaS 返回更新日志…",noLogs:"本次更新未返回发布日志",messages:{updated:"Studio 已更新,新 Revision 已接管服务",failed:"Studio 更新失败",timeout:"等待 VeFaaS 发布超时,请稍后重新检查版本",submitted:"更新已提交,正在等待 VeFaaS 发布新版本",connectionSwitched:"连接已切换,正在确认新版本状态"},checkingPermissions:"正在检查 OTA 权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",updated:"Studio 已更新",updateToVersion:"更新 Studio 至 {{version}}",checkPermissions:"检查更新权限",authorizationNeeded:"需要授权",updatingShort:"正在更新",refreshForNewVersion:"刷新使用新版",updateFailed:"更新失败",updateNow:"立即更新",newVersionAvailable:"有新版更新",dialog:{failed:"Studio 更新失败",checkingPermissions:"正在检查更新权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",completed:"Studio 更新完成",newVersion:"发现新版本"},permissionCheck:"正在核对 OTA 与定时任务所需的全部 IAM 权限…",permissionCheckHint:"权限全部满足后才会开始下载、更新或发布云资源。",missingPermissionCount:"当前 Function 角色缺少 {{count}} 项 OTA 更新权限,尚未执行任何云资源变更。",functionRole:"Function 角色",currentRole:"当前运行角色",policyToUpdate:"将更新策略",authorizationSteps:{open:"打开授权页面,确认已预填的策略名称和完整策略内容。",debug:"点击页面中的“发起调试”,完成策略更新。",return:"返回此窗口,点击“我已授权,重新检查”。"},missingPermissions:"缺少的权限",openPrefilledAuthorization:"打开已预填的 IAM 授权页面",openIamManually:"前往 IAM 控制台手动配置",noSafePolicy:"当前角色没有唯一可安全更新的自定义策略,请由管理员将上述权限加入该角色。",failedStage:"失败阶段",errorId:"错误 ID",notGenerated:"未生成",openFunctionLogs:"前往 VeFaaS 控制台查看 Function 日志",targetVersion:"目标版本",updateStatus:"更新状态",elapsed:"已用时",progressAriaLabel:"Studio 更新进度",processingUpdate:"正在处理更新",processing:"正在处理",backgroundHint:"发布阶段会短暂中断连接;关闭此窗口不会停止更新,可随时点击右上角按钮重新查看。",confirmDescription:"更新会重启 Studio 服务,预计约 3–5 分钟完成更新与发布。期间正在进行的对话、流式响应或部署任务可能中断,登录态不会受到影响。",selectVersion:"选择版本",currentVersion:"当前版本",changelog:"更新内容",noChangelog:"暂无更新说明",runInBackground:"后台运行",authorizedRecheck:"我已授权,重新检查",tryAgain:"重新尝试"},kde={deploy:"部署",update:"更新",planHash:"方案哈希",backToConfiguration:"返回配置",releaseRegion:"发布区域",deployRegion:"部署区域",regionPreserved:"更新时沿用现有 Runtime 的部署区域,无法修改。",unnamedAgent:"未命名 Agent",deployTitle:"部署 {{name}}",additionalAgentCount:" 等 {{count}} 个智能体",releaseOverview:"发布概览",agentOverview:"Agent 概览",agentCount:"Agent 数量",model:"模型",systemPrompt:"系统提示词",optimizations:"优化选项",notEnabled:"未启用",effectiveCapabilities:"生效能力",automaticProtection:"自动保护",artifactActions:"发布产物操作",exportYaml:"导出 YAML",viewSource:"查看源代码",downloadSource:"下载源代码",expandFlow:"放大查看执行流程",expand:"放大查看",deploymentConfiguration:"部署配置",runtimeName:"Runtime 名称",runtimeNamePreserved:"更新时保持现有 Runtime 名称不变。",runtimeNameHint:"默认根据 Root Agent 名称生成,并添加随机后缀避免重名;支持 4-64 位字母、数字、连字符和下划线",accessAuthentication:"访问鉴权",authenticationPreserved:"更新时保持现有 Runtime 的鉴权方式不变。",authenticationMethod:"鉴权方式",authenticationAriaLabel:"部署鉴权方式",authenticationPlaceholder:"请选择鉴权方式",messageChannels:"消息渠道",instanceSettings:"实例设置",minInstances:"最小实例数",maxInstances:"最大实例数",sidecarSingleInstance:"Harness Sidecar 首期仅支持单实例,Runtime 固定为 1~1",inMemorySingleInstance:"为避免多实例间会话丢失,推荐将 Runtime 固定为 1~1",network:"网络",networkPreserved:"现有 Runtime 的区域与网络模式保持不变。",networkMode:"网络模式",networkModes:{public:"公网",both:"公网 + VPC"},subnetId:"子网 ID",subnetHint:"可选,多个用逗号分隔",sharedInternetAccess:"VPC 内共享公网出口",evaluationSets:"评测集",createEvaluationSets:"自动创建评测集",createEvaluationSetsHint:"部署成功后,自动创建 Good Case 和 Bad Case 评测集。",resourceConfiguration:"资源配置",environmentVariables:"环境变量",environmentVariablesHint:"组件配置会自动同步到这里,部署前可核对最终值。",itemCount:"{{count}} 项",addVariable:"添加变量",componentGenerated:"组件自动生成",injectedByApiKey:"由所选 API Key 注入",envNameAriaLabel:"{{key}} 环境变量名",envDescriptionAriaLabel:"{{key}}说明:{{description}}",openOpenViking:"打开 OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}:打开 OpenViking {{label}}",requiredEmpty:"必填,尚未填写",optionalEmpty:"可选,尚未填写",envValueAriaLabel:"{{key}} 环境变量值",automatic:"自动",synced:"同步",customModelCredentials:"自定义模型凭据",releaseOnlySecret:"必填,仅用于本次发布",thisRelease:"本次发布",customVariables:"自定义变量",value:"值",deleteVariable:"删除变量",deploymentProgress:"部署进度",retryUpdate:"重试更新",retryDeploy:"重试部署",updateSucceeded:"更新成功",deploySucceeded:"部署成功",region:"区域",agentName:"Agent 名称",apiEndpoint:"API 端点",connecting:"连接中…",chatNow:"立即对话",console:"控制台",actionInProgress:"{{action}}中…",checkingName:"正在检查名称…",retryAction:"重试{{action}}",flowPreview:"执行流程预览",executionFlow:"执行流程",flowPreviewHint:"只读预览,可缩放与拖动画布",closeFlowPreview:"关闭执行流程预览",agentAdded:'Agent "{{name}}" 已添加到左上角下拉列表!',files:{preview:"文件预览",new:"新建文件",empty:"暂无文件",noneSelected:"未选择文件",selectToView:"选择左侧文件以查看内容",loadingEditor:"加载编辑器…",rename:"重命名",renamePrompt:"重命名文件"},apiKey:{selectFirst:"请先选择 API Key",revealing:"正在显示 API Key",hide:"隐藏 API Key",retryReveal:"重试显示 API Key",reveal:"显示 API Key"},task:{preparing:"准备部署",waitingBuildLog:"正在等待构建日志…",waitingGithubLog:"正在等待 GitHub 挂载日志…",syncingGithub:"正在同步当前源码到 GitHub",syncGithubCode:"同步 GitHub 代码",githubSynced:"GitHub 代码已同步",githubSubmitted:"GitHub 代码已提交",githubUpdatingRuntime:"代码已提交到 GitHub,GitHub Actions 正在更新同一个 Runtime",initializingGithub:"开始初始化 GitHub main 分支与 Actions workflow",initializingGithubBranch:"正在初始化 GitHub 持续交付目标分支",mountGithubDelivery:"挂载 GitHub 持续交付",githubBranchInitialized:"GitHub 持续交付已初始化目标分支",githubDeliveryMounted:"GitHub 持续交付已挂载",githubMountFailed:"挂载 GitHub 持续交付失败",githubMountFailedDetail:"GitHub 持续交付挂载失败:{{message}}",githubMountFailedHint:"挂载 GitHub 持续交付失败,详见 GitHub 日志。",deploymentComplete:"部署完成",deployedNotConnected:"部署完成,暂未连接",cancelled:"已取消",cancelledHint:"部署已取消,相关 Runtime 资源已请求销毁。",buildStatusUnconfirmed:"构建状态待确认",deploymentFailed:"部署失败",buildFailedHint:"构建镜像失败,详见构建日志。"},confirm:{updateTitle:"确认更新",deployTitle:"确认部署",closeLabel:"关闭部署确认",updateDescription:"将更新并发布到当前云端 Runtime,过程可能需要几分钟。确定继续吗?",deployDescription:"将创建新的云端 Runtime,部署过程可能需要几分钟。确定继续吗?",update:"确定更新",deploy:"确定部署"},userPool:{label:"用户池",unnamed:"未命名用户池",current:"当前用户池",ariaLabel:"部署用户池",loading:"正在加载用户池…",placeholder:"请选择用户池",loadingIdentity:"正在加载 Identity 用户池…",empty:"当前账号下暂无 Identity 用户池。",currentHint:"当前 Studio 的登录 JWT 将透传访问此 Runtime。",mismatchHint:"所选用户池不是当前 Studio 使用的用户池,部署后无法从 Studio 调用此 Runtime。",markedHint:"当前 Studio 使用的用户池已在列表中标注。"},authentication:{apiKeyDescription:"默认方式,使用 Runtime API Key 访问",userPool:"用户池",userPoolDescription:"使用 Identity 用户池签发的 JWT"},steps:{buildImage:"构建镜像",deploy:"部署",publish:"发布",syncCode:"同步代码",uploadPackage:"上传代码包",packageImage:"镜像打包",createRuntime:"创建 Runtime",publishService:"发布服务",updateInstances:"更新实例配置",createEvaluationSets:"创建评测集"},errors:{instanceRangeInteger:"最小实例数必须为大于等于 0 的整数,最大实例数必须为大于 0 的整数。",instanceRangeOrder:"最小实例数不能大于最大实例数。",selectApiKey:"请先在模型配置中选择 API Key。",loadApiKey:"加载 API Key 失败,请重试。",invalidProject:"项目数据无效",updateFeishu:"更新飞书配置失败:{{message}}",userPoolRequired:"请选择用于 Runtime 鉴权的用户池。",vpcRequired:"使用 VPC 网络时,请填写 VPC ID。",modelSecretRequired:"请填写 {{label}},用于访问对应的自定义模型地址。",managedApiKeyRequired:"{{requirement}},请先返回模型配置选择 API Key。",feishuEnvRequired:"启用飞书后,请填写{{field}}。",runtimeNameExists:"Runtime 名称已存在,请修改后重试。",deployedButGithubMountFailed:"部署成功,但挂载 GitHub 持续交付失败:{{message}}",deployedButGithubBindFailed:"部署成功,但绑定 GitHub 失败:{{message}}",buildStatusUnconfirmed:"构建任务已经提交,但暂时无法确认最终状态。请稍后在 Code Pipeline 查看构建结果,避免重复部署。",buildStatusUnconfirmedWithDetail:"构建状态待确认:{{message}}",failedAtStage:"{{action}}失败({{stage}}阶段):{{message}}",noAgentAtEndpoint:"连接成功,但该地址未发现任何 Agent(/list-apps 为空)。",addAgent:"添加 Agent 失败:{{message}}",modelApiKeyRequired:"请填写此模型地址对应的 API Key。"}},Ede={title:"工作区",detail:"工作区详情",create:"新建工作区",editorDescription:"将常用环境组合在一起;同一个环境可以加入多个工作区。",backToList:"返回工作区列表",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",createdAt:"创建时间",updatedAt:"最近更新",basicInfo:"基本信息",namePlaceholder:"例如:内容生产",descriptionPlaceholder:"说明这个工作区的用途",selectedEnvironmentCount:"已选择 {{count}} 个,可在其他工作区中继续复用",searchAvailableEnvironments:"搜索可用环境",searchEnvironments:"搜索环境",noAvailableEnvironments:"还没有可添加的环境",createEnvironmentFirst:"请先在“环境”页面创建并构建环境。",noMatchingEnvironments:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称。",environmentStatus:{available:"可用",building:"构建中",notBuilt:"未构建"},added:"已添加",saved:"已保存工作区“{{name}}”",resourceType:"工作区资源类型",searchWorkspaces:"搜索工作区",loadFailed:"无法加载工作区",noMatchingWorkspaces:"没有匹配的工作区",tryAnotherNameOrEnvironment:"请尝试搜索其他名称或环境",noEnvironmentAdded:"未添加环境",environmentMissing:"环境缺失",availableFraction:"{{available}}/{{total}} 可用",available:"可用",availableCount:"{{count}} 个可用",updated:"更新",addEnvironment:"添加环境",deleteTitle:"删除工作区",deleteDescription:"确定删除工作区“{{name}}”吗?环境本身不会被删除。",deleted:"已删除工作区“{{name}}”",clipboardPermissionError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。"},Cde={back:"返回",detailNavigation:"详情导航",noData:"暂无数据",actions:"操作",moreActions:"更多操作 {{label}}",actionsFor:"{{label}} 操作",loading:"资源加载中,请稍候"},Tde={addSkill:"添加 Skill",remove:"移除 {{name}}",confirmRemoveRuntime:"从新版本中移除运行中的 Skill「{{name}}」?",selectedCount:"已加入技能 · {{count}}",close:"关闭{{label}}",sources:{runtime:"运行中来源 · 原样保留,可移除或用同名 Skill 替换",local:"本地",skillspace:"AgentKit Skills 中心",skillhub:"火山 Find Skill 技能广场"},tabs:{local:"本地文件",localShort:"本地文件",skillspace:"AgentKit Skills 中心",skillspaceShort:"AgentKit",skillhub:"火山 Find Skill 技能广场",skillhubShort:"Find Skill"}},Ade={tasks:{ppt:"PPT",image:"图片生成",video:"视频生成"},prompts:{ppt:{quarterlyReview:"复盘【季度】经营表现,提炼指标差距、原因与行动建议",projectUpdate:"汇报【项目名称】进展:里程碑、风险、预算和资源诉求",solutionProposal:"为【客户行业】输出解决方案:痛点、架构、实施路径与收益",industryAnalysis:"分析【行业主题】趋势,给出竞争格局、机会与战略建议"},image:{launchVisual:"为【品牌或产品】设计【高级科技】风格的发布会主视觉",ecommercePoster:"生成【产品名称】电商海报,突出【核心卖点】与品牌色",conceptRendering:"呈现【产品或空间】在【使用场景】中的写实概念效果图",socialGraphic:"围绕【传播主题】制作简洁专业的企业社媒配图"},video:{brandFilm:"制作【品牌名称】30 秒宣传片,突出【品牌价值】",productLaunch:"为【产品名称】制作 45 秒发布视频:痛点、功能、场景与行动号召",trainingVideo:"制作【培训主题】企业培训视频,讲清【关键操作或规范】",eventTeaser:"生成【活动名称】20 秒预热视频,包含亮点、时间地点和报名信息"}},firstFrame:"首帧",videoToEdit:"待编辑视频",baseVideo:"基础视频",optimizeSkillPlaceholder:"描述你想优化的技能…",createSkillPlaceholder:"描述你想生成的技能…",createVideoPlaceholder:"描述你想创作的视频…",messageAgentPlaceholder:"向 {{name}} 发消息…",selectAgentFirst:"请先选择智能体",selectSkillFirst:"请先选择需要优化的 Skill",availableSkills:"可用技能",availableSubagents:"可用子 Agent",invokeSkill:"调用技能",useSubagent:"使用子 Agent",loadingCapabilities:"正在读取 Agent 能力…",noMatchingSkills:"当前 Agent 没有匹配技能",noMatchingSubagents:"当前 Agent 没有匹配子 Agent",skillFallbackDescription:"加载并执行该技能",agentFallbackDescription:"将本轮交给该 Agent",skill:"技能",uploadImage:"上传图片",uploadDocument:"上传文档或 PDF",uploadVideo:"上传视频",taskMode:"任务模式",selectTaskMode:"选择任务模式",loadingGenerationModel:"正在加载生成模型",modelUnavailable:"模型不可用",cancelTask:"取消{{task}}任务",stopGenerating:"停止生成",viewVideoProgress:"查看视频生成进度",send:"发送",selectTaskType:"选择任务类型",enterprisePrompts:"{{task}}企业提示词",sessionId:"会话 ID",sessionIdLabel:"会话 ID:",initializing:"初始化中",copied:"已复制",copySessionId:"复制会话 ID",sessionIdCopied:"已复制会话 ID",disclaimer:"回答仅供参考",viewLogs:"查看日志"},_de={selectAgent:"选择 Agent",noLocalAgents:"暂无本地 Agent。",searchRuntime:"搜索 Runtime 名称",mineOnly:"只看我创建的",noRuntimes:"暂无 Runtime。",unsupported:"不支持",createdByMe:"我创建的",connecting:"连接中…",connected:"已连接",connect:"连接",viewInfoFor:"查看 {{name}} 信息",viewInfo:"查看信息",agentAndRuntimeInfo:"Agent 与 Runtime 信息",detailType:"详情类型",agentInfo:"Agent 信息",runtimeInfo:"Runtime 信息",loadingAgentInfo:"读取 Agent 信息…",cannotLoadAgentInfo:"暂时无法读取 Agent 信息",unnamedAgent:"未命名 Agent",subagents:"子 Agent",tools:"工具",skills:"技能",previewUnsupported:"暂不支持预览",mountedComponents:"挂载组件",noMoreAgentInfo:"暂无更多 Agent 配置信息。",local:"本地",model:"模型",status:"状态",memoryMb:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",resources:"资源",version:"版本",loadingDetails:"读取详情…",environmentVariables:"环境变量",errors:{notFound:"该 Runtime 已不存在或列表信息已过期,请刷新列表后重试。",accessDenied:"当前账号无权访问该 Runtime,请检查所属 Project 和访问权限。",previewUnsupported:"该 Agent Server 版本暂不支持信息预览。",unavailable:"该 Runtime 暂时无法访问,请确认其状态为“就绪”后重试。",timeout:"加载超时,请重试"},componentKinds:{knowledgebase:"知识库",memory:"记忆",prompt_manager:"提示词管理",example_store:"样例库",run_processor:"运行处理器",tracer:"链路追踪",toolset:"工具集",plugin:"插件",other:"其他"},runtimeStatus:{ready:"就绪",unreleased:"未发布",running:"运行中",active:"运行中",creating:"创建中",pending:"等待中",deploying:"部署中",updating:"更新中",failed:"失败",error:"异常",stopping:"停止中",stopped:"已停止",deleting:"删除中",deleted:"已删除"}},Nde={agent:"智能体",agentTypes:{general:"通用智能体",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"创建人",namedAgent:"{{name}} 智能体",storageLocation:"存储位置",currentBrowser:"当前浏览器",region:"地域",viewDeploymentProgress:"查看 {{name}} 部署进度",viewRuntimeDetails:"查看 {{name}} Runtime 详情",viewDetails:"查看 {{name}} 详情",time:"时间",remainingTime:"剩余时间",expiringSoon:"即将清空",sandboxRemaining:"{{hours}} 小时 {{minutes}} 分钟",wakeable:"可唤醒",neverExpires:"永不过期",editDraftNamed:"编辑草稿 {{name}}",viewProgress:"查看进度",deleteDraftNamed:"删除草稿 {{name}}",recheckCompatibility:"重新检测 {{name}} 的对话兼容性",connectedNamed:"{{name}} 已连接",wakeAndChat:"唤醒 {{name}} 并开始对话",chatWith:"与 {{name}} 对话",waking:"唤醒中",deploying:"部署中",draft:"草稿",checking:"检测中",chatUnsupported:"不支持对话",checkFailed:"检测失败",creatorFilter:"创建人筛选",agentType:"智能体类型",searchAgents:"搜索智能体",handoff:"接力",agentList:"{{type}}列表",noMatchingAgents:"没有匹配的智能体",adjustSearch:"请尝试调整搜索或筛选条件",noAgentType:"暂无 {{type}}",noGeneralAgents:"暂无通用智能体",createGeneralAgentDescription:"创建一个通用智能体,开始构建和对话",createAgentType:"创建{{type}}",createAgent:"创建智能体",loadingMore:"正在加载更多智能体",scrollForMore:"继续下滑加载更多",allLoaded:"已加载全部智能体",deleteDraftTitle:"删除草稿?",deleteDraftDescription:"删除后将无法恢复“{{name}}”。",deleteDraft:"删除草稿",loadGeneralAgents:"加载通用智能体",loadAgentType:"加载 {{type}}",compatibility:{checking:"正在请求 Runtime /list-apps,以确认该智能体是否支持 Studio 对话。",empty:"Runtime /list-apps 未返回可用的 Agent,暂时无法连接对话。",supported:"Runtime 支持 Studio 对话。",unknownError:"Runtime /list-apps 请求失败,未返回可识别的错误信息。"},sandboxStatus:{ready:"就绪",wakeable:"可唤醒",creating:"创建中",starting:"启动中",initializing:"启动中",pending:"等待中",running:"运行中",failed:"异常",error:"异常",stopped:"已停止",expired:"已过期",deleting:"删除中",deleted:"已删除",unknown:"未知状态"}},jde={library:"技能库",skill:"技能",skills:"技能",skillSpace:"技能空间",sandboxNotConfigured:"管理员未配置 Dev Sandbox",adminNotConfigured:"管理员未配置",totalItems:"共 {{count}} 项",cannotLoadSpaces:"无法加载技能空间",someSpacesFailed:"部分技能空间加载失败",downloadZip:"下载 ZIP",optimize:"优化",closeSkillDetails:"关闭技能详情",skillId:"技能 ID",allFiles:"完整文件",loadingSkillContent:"正在读取技能内容…",noSkillContent:"该技能暂无 SKILL.md 内容",addSkill:"添加技能",localUpload:"本地上传",localUploadDescription:"选择 ZIP 文件,校验通过后上传到技能空间",autoCreate:"自动创建",autoCreateDescription:"选择模型和风格,通过对话生成技能",createSkill:"创建技能",optimizeNamed:"优化 {{name}}",deleteSkillConfirm:"确定删除整个 Skill“{{name}}”吗?此操作会影响所有引用它的空间。",deleteSpaceConfirm:"确定删除 Skill 空间“{{name}}”吗?请先确认空间中的技能已删除。",manageSpaceDescription:"管理空间中的技能并创建新的版本",backToSpaces:"返回技能空间列表",overview:"概览",skillCount:"技能数量",skillCountValue_one:"{{count}} 技能",skillCountValue_other:"{{count}} 技能",updatedAt:"更新时间",skillsInSpace:"{{name}}中的技能",searchSkills:"搜索技能",cannotLoadSkills:"无法加载技能",noMatchingSkills:"没有匹配的技能",noSkills:"暂无技能",tryAnotherName:"请尝试搜索其他名称",emptySkillsDescription:"本地上传 Skill,或自动创建",actions:"操作",spaceDetails:"技能空间详情",editSpace:"编辑空间",deleteSpace:"删除空间",searchSpaces:"搜索技能空间",spaceList:"技能空间列表",noMatchingSpaces:"没有匹配的技能空间",createSpace:"新建技能空间",newSpace:"新建空间",loadingMoreSpaces:"正在加载更多技能空间",scrollForMore:"继续下滑加载更多",allSpacesLoaded:"已加载全部技能空间",errors:{loadSpaces:"读取技能空间失败,请稍后重试",loadSkills:"读取技能失败,请稍后重试",loadSkillDetails:"读取技能详情失败,请稍后重试",deleteSkill:"删除 Skill 失败",deleteSpace:"删除 Skill 空间失败",downloadSkill:"下载 Skill 失败"},status:{active:"可用",available:"可用",creating:"创建中",disabled:"已停用",enabled:"已启用",failed:"异常",inactive:"未启用",pending:"等待中",published:"已发布",ready:"就绪",released:"已发布",running:"运行中",success:"正常",unavailable:"不可用",unreleased:"未发布",updating:"更新中",unknown:"未知"}},Rde={library:"知识库",createBase:"新建知识库",editBase:"编辑知识库",invalidName:"名称必须以字母开头,且只能包含字母、数字和下划线。",nameHelp:"以字母开头,仅支持字母、数字和下划线,最多 48 个字符。",optionalDescription:"描述(可选)",descriptionOnly:"AgentKit 当前仅支持更新知识库描述。",previewWeb:"预览网页内容",addData:"添加数据",openOriginalWeb:"打开原网页",backToEdit:"返回修改",confirmAdd:"确认添加",source:"知识来源",image:"图片",documentFile:"文档文件",webPage:"在线网页",webUrl:"网页 URL",generatingWebPreview:"正在抓取网页并生成 Markdown 预览",selectFile:"选择知识文件",selectOrDropFile:"选择文件或拖拽到这里",selectedFile:"{{size}} · 点击可重新选择",imageFileHelp:"支持 PNG、JPG 和 JPEG,单个文件不超过 200 MB",documentFileHelp:"支持 PDF、PPTX、DOCX、XLSX 和 TXT,单个文件不超过 200 MB",uploadingFile:"正在上传文件并添加到知识库",optionalName:"名称(可选)",optionalType:"类型(可选)",generatePreview:"生成预览",uploadFile:"上传文件",editMetadata:"编辑知识 Metadata",knowledge:"知识",field:"字段",value:"值",backToList:"返回知识库列表",metadataJson:"元数据(JSON)",provider:"服务提供方",knowledgeId:"知识库 ID",project:"项目",creator:"创建者",data:"数据",deleteInvalidAssociation:"删除失效关联",noData:"这个知识库还没有数据",addFirstData:"添加第一项数据",format:"格式",size:"大小",searchData:"搜索数据",searchLibraryData:"搜索知识库数据",associationInvalid:"关联已失效",providerMissing:"底层 Provider 知识库已不存在",noMatchingData:"没有匹配的数据",loadingMoreData:"正在加载更多数据",retryLoading:"重试加载",details:"知识库详情",searchBases:"搜索知识库",someBasesFailed:"部分知识库暂时无法加载,已展示其余可用内容。",noMatchingBases:"没有匹配的知识库",noManagePermission:"您没有管理此知识库的权限",loadingMoreBases:"正在加载更多知识库",deleteBaseTitle:"删除知识库?",deleteBaseDescription:"将删除 {{name}} 的 AgentKit 关联;如果它由 Studio 创建,也会同时删除 Provider 资源。此操作无法撤销。",deleteDocumentTitle:"删除知识?",deleteDocumentDescription:"将从 Provider 知识库中删除 {{name}},此操作无法撤销。",preview:{processingTitle:"数据正在处理中",processingDetail:"知识库完成解析后即可预览,请稍后重新加载。",failedTitle:"数据解析失败",failedDetail:"请检查源文件或网页地址后重新添加,也可以重新加载最新状态。",noParsedTitle:"暂时没有可预览的解析内容",noParsedDetail:"此类文件会在知识库完成解析后显示文本、表格或页面图片。",noMediaTitle:"暂时没有可预览的媒体内容",noMediaDetail:"知识库尚未返回可访问的媒体预览,请稍后重新加载。",noDataTitle:"暂无可预览的数据内容",noDataDetail:"知识库尚未返回解析结果,请稍后重新加载。",attachmentError:"附件无法预览,请稍后重试。",imageAlt:"知识数据图片",audioUnsupported:"当前浏览器不支持音频预览。",videoUnsupported:"当前浏览器不支持视频预览。",namedPdf:"{{name}} PDF 预览",pdf:"PDF 预览",openPdf:"无法显示时,在新窗口打开 PDF",fileUnsupported:"当前格式暂不支持直接在线预览,已优先显示解析后的内容。",openOriginalFile:"打开原文件",loading:"正在加载数据预览",openOriginalHint:"您可以打开原网页查看来源内容。",chunk:"片段 {{index}}",loadingMore:"正在加载更多",loadMore:"加载更多"},errors:{fileTooLarge:"单个文件不能超过 200 MB",invalidImageType:"请选择 PNG、JPG 或 JPEG 图片",invalidDocumentType:"请选择 PDF、PPTX、DOCX、XLSX 或 TXT 文件",createBase:"创建知识库失败",updateBase:"更新知识库失败",metadataObject:"Metadata 必须是 JSON 对象",metadataFormat:"Metadata 格式错误",noWebPreview:"网页没有可预览的 Markdown 内容",addWeb:"添加网页失败",previewWeb:"生成网页预览失败",uploadFile:"上传文件失败",updateDocument:"更新知识失败",loadPreview:"加载数据预览失败",loadMoreBases:"加载更多知识库失败",loadBases:"加载知识库失败",loadMoreData:"加载更多数据失败",loadData:"加载数据失败",deleteBase:"删除知识库失败",deleteDocument:"删除知识失败"}},mMe={common:dde,agentKitPromo:fde,systemInfo:hde,agentWorkspace:pde,environmentCenter:mde,deploymentSelect:gde,deploymentError:bde,studioBuildProgress:yde,cloudEnvironment:vde,githubCicd:xde,feishuDeployment:Ode,deploymentResources:wde,studioUpdate:Sde,projectPreview:kde,workspace:Ede,resourceCollection:Cde,skillSourcePicker:Tde,composer:Ade,agentSelector:_de,myAgents:Nde,skillCenter:jde,knowledge:Rde},gMe=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:fde,agentSelector:_de,agentWorkspace:pde,cloudEnvironment:vde,common:dde,composer:Ade,default:mMe,deploymentError:bde,deploymentResources:wde,deploymentSelect:gde,environmentCenter:mde,feishuDeployment:Ode,githubCicd:xde,knowledge:Rde,myAgents:Nde,projectPreview:kde,resourceCollection:Cde,skillCenter:jde,skillSourcePicker:Tde,studioBuildProgress:yde,studioUpdate:Sde,systemInfo:hde,workspace:Ede},Symbol.toStringTag,{value:"Module"})),Ide="网站集成",Pde="将 AgentKit Runtime 以悬浮聊天窗口嵌入网站",Dde="返回自动化列表",Mde="添加网站",Lde="正在加载 Runtime",$de="选择 Runtime",Fde="网站域名",Bde="例如 xxxx.com 或 localhost:5173",Ude="正在生成",Qde="生成 Token",zde="已添加网站",Vde="{{count}} 个",Hde="{{count}} 个",qde="正在加载网站集成",Wde="还没有网站集成",Kde="选择 Runtime 并输入网站域名即可生成 Token",Gde="引入方法",Xde="将下面代码放到网页的 body 结束标签前",Yde="已复制",Zde="复制代码",Jde="添加网站后会在这里生成引入代码。",efe="确定删除 {{domain}} 的网站集成吗?",tfe={load:"加载网站集成失败",create:"创建网站集成失败",delete:"删除网站集成失败",noConversationalAgent:"该 Runtime 暂未发现可对话的 Agent"},nfe={requestFailed:"请求失败 ({{status}})",greeting:"您好,有什么可以帮您?",sessionFailed:"无法建立对话会话",unauthorized:"当前网站未获得对话授权",conversationFailed:"对话请求失败,请稍后重试",open:"打开智能体对话",close:"关闭智能体对话",panelLabel:"智能体对话面板",assistant:"智能体助手",online:"在线对话"},bMe={title:Ide,description:Pde,backToAutomations:Dde,addWebsite:Mde,loadingRuntime:Lde,selectRuntime:$de,websiteDomain:Fde,domainPlaceholder:Bde,generating:Ude,generateToken:Qde,addedWebsites:zde,websiteCount_one:Vde,websiteCount_other:Hde,loadingIntegrations:qde,delete:"删除",emptyTitle:Wde,emptyDescription:Kde,embedMethod:Gde,embedInstructions:Xde,copied:Yde,copyCode:Zde,embedHint:Jde,confirmDelete:efe,errors:tfe,widget:nfe},yMe=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:Mde,addedWebsites:zde,backToAutomations:Dde,confirmDelete:efe,copied:Yde,copyCode:Zde,default:bMe,description:Pde,domainPlaceholder:Bde,embedHint:Jde,embedInstructions:Xde,embedMethod:Gde,emptyDescription:Kde,emptyTitle:Wde,errors:tfe,generateToken:Qde,generating:Ude,loadingIntegrations:qde,loadingRuntime:Lde,selectRuntime:$de,title:Ide,websiteCount_one:Vde,websiteCount_other:Hde,websiteDomain:Fde,widget:nfe},Symbol.toStringTag,{value:"Module"})),ife={types:{all:"全部类型",document:"文档",image:"图片",video:"视频"},previewArtifact:"预览 {{name}}",moreActions:"更多操作 {{name}}",actionMenu:"{{name}} 操作",download:"下载",downloading:"下载中",edit:"编辑信息",delete:"删除产物",previewFailed:"无法预览“{{name}}”:{{message}}",downloadStarted:"已开始下载 {{name}}",downloadFailed:"无法下载“{{name}}”:{{message}}",updated:"已更新 {{name}}",deleted:"已删除 {{name}}",deleteFailed:"无法删除“{{name}}”:{{message}}",typeFilter:"产物类型",searchAria:"搜索产物",searchPlaceholder:"搜索产物或会话",retry:"重试",close:"关闭",listAria:"产物列表",loadFailed:"产物加载失败",loadDetailFallback:"请检查存储配置后重试。",reload:"重新加载",noMatch:"没有找到匹配的产物",noArtifacts:"您还没有任何产物",searchHint:"请尝试搜索其他名称或切换类型",emptyHint:"聊天中生成的产物会自动显示在这里",columns:{name:"名称",source:"来源",updatedAt:"修改时间",actions:"操作"},loadingMore:"正在加载更多产物",unknownTime:"时间未知",preview:{close:"关闭预览",meta:"{{type}} / 版本 {{version}}",loading:"正在加载预览",alt:"{{name}} 预览",loadFailed:"预览加载失败,请稍后重试或下载查看",unsupported:"当前格式暂不支持在线预览,请下载查看",sourceAria:"产物来源",agent:"智能体",session:"会话",tool:"生成工具",createdAt:"生成时间",fileSize:"文件大小",tags:"标签",viewSession:"查看会话"},deleteDialog:{title:"删除产物?",description:"“{{name}}”将从产物库永久删除,聊天记录不会受到影响。",deleting:"删除中",confirm:"删除",close:"关闭删除确认框"},api:{withStatus:"{{message}}({{status}})",listFailed:"读取产物库失败",syncFailed:"同步聊天产物失败",updateFailed:"更新产物失败",deleteFailed:"删除产物失败",downloadFailed:"下载产物失败"}},rfe={unknownSource:"未知来源",unknownCreator:"未知创建者"},sfe={nameRequired:"请输入产物名称",tooManyTags:"标签最多 {{max}} 个",tagTooLong:"单个标签不能超过 {{max}} 个字符",title:"编辑产物信息",subtitle:"内容文件不会被修改",close:"关闭编辑框",name:"名称",description:"描述",descriptionPlaceholder:"补充用途、版本或使用说明",tags:"标签",tagsPlaceholder:"使用逗号分隔,最多 {{max}} 个",cancel:"取消",saving:"保存中",save:"保存"},afe={change:{added:"新增",modified:"修改",deleted:"删除"},noChanges:"两个版本的源码没有差异",chooseFile:"从左侧选择文件以查看代码",compareTitle:"版本对比",workspaceTitle:"源码工作区",projectFallback:"Agent 项目",switchTheme:"切换源码主题",switchThemeTitle:"切换为{{theme}}主题",themes:{dark:"深色",light:"浅色"},closeWorkspace:"关闭源码工作区",close:"关闭",changedFiles:"变更文件",projectFiles:"项目文件",changes:"变更",files:"文件",openFiles:"打开的文件",noFileSelected:"未选择文件",comparisonDirection:"对比方向",before:"优化前",after:"优化后",loadingEditor:"正在加载编辑器…",changedFileCount_one:"{{count}} 个文件有变更",changedFileCount_other:"{{count}} 个文件有变更",fileCount_one:"{{count}} 个文件",fileCount_other:"{{count}} 个文件",lineCount_one:"{{count}} 行 · UTF-8",lineCount_other:"{{count}} 行 · UTF-8",viewSource:"查看源码",viewSourceAria:"查看和编辑项目源码"},ofe={nav:"搜索",selectAgent:"请选择 Agent",checkingCapabilities:"正在检测 Agent 能力",notMounted:"当前 Agent 未挂载{{label}}",sources:{session:"会话",web:"网络",knowledge:"知识库",memory:"长期记忆"},webDescription:"通过 web_search 工具检索",backendLocal:"本地",failed:"搜索失败:{{message}}",placeholder:{selectAgent:"请先选择 Agent",web:"在网络中检索",knowledge:"在 {{name}} 中检索",knowledgeFallback:"当前 Agent 的知识库",memory:"在 {{name}} 中检索",memoryFallback:"当前用户的长期记忆",session:"在当前 Agent 的会话中检索"},sourceTypeAria:"搜索类型:{{label}}",notSelected:"未选择",sourceType:"搜索类型",selectSource:"选择搜索类型",noAgentHint:"选择一个 Agent 后,即可检索会话、网络及其挂载的数据源。",loadingCapabilities:"正在读取当前 Agent 的检索能力…",sourceUnavailable:"当前 Agent 未挂载该数据源",instructions:{web:"输入关键词后回车或点击按钮,通过 web_search 工具检索。",knowledge:"输入问题,检索当前 Agent 挂载的知识库。",memory:"输入线索,检索当前用户跨会话保存的长期记忆。",session:"输入关键词后回车或点击按钮,搜索当前 Agent 的会话。"},noResults:"未找到匹配“{{query}}”的结果。",knowledgeFragment:"知识片段 {{index}}",memoryFragment:"记忆片段 {{index}}"},lfe={title:"开发者资源",sections:{documentation:{title:"相关链接",description:"查看开发文档与 AgentKit 常用入口"},bestPractices:{title:"最佳实践",description:"参考开发、调试与部署经验"},showcases:{title:"案例展示",description:"探索 AgentKit 应用案例"}},links:{veadkDocs:"VeADK 文档",cliDocs:"AgentKit CLI 文档",platformDocs:"AgentKit 平台文档",console:"AgentKit 控制台"},articles:{veadkDevelopment:{title:"使用 VeADK 开发并部署智能体",description:"使用 VeADK 构建 Agent,并部署至 AgentKit 智能体运行时。"},cliDevelopment:{title:"使用 AgentKit CLI 开发并部署智能体",description:"通过 AgentKit CLI 创建项目、调试 Agent,并完成部署。"},coverAlt:"{{title}}文章封面"},showcases:{researchAssistant:{title:"多智能体研究助手",description:"由多个专业 Agent 协同完成资料检索、分析和结论整理。"},multimodalAnalysis:{title:"多模态内容分析",description:"在统一会话中理解图片、文档和视频内容。"},customerService:{title:"智能客服工作台",description:"结合知识检索与工具调用处理复杂的客户服务任务。"},webSearch:{title:"联网搜索 Agent",description:"检索实时网页内容,并将信息整理为可追溯的回答。"},a2uiApp:{title:"A2UI 交互应用",description:"让 Agent 根据任务过程生成可交互的前端界面。"},previewAlt:"{{title}}界面预览"}},cfe={title:"资源库",untitledSession:"未命名会话",categoryAria:"资源库分类",regionAria:"区域",tabs:{skills:"技能库",knowledge:"知识库",artifacts:"产物"}},ufe={title:"管理 Agent",subtitle:"列出你有权管理的 AgentKit Runtime",mainAgentOnly:"仅显示主 Agent(控制面信息)。",deleteConfirm:'确定删除 Agent "{{name}}"?该 Runtime 将被永久删除。',regionFilterTitle:"按区域筛选",regionFilterAria:"区域筛选",regionAria:"区域",refresh:"刷新",loading:"加载中…",empty:"暂无你部署的 Agent。",connected:"已连接",connect:"连接到此 Agent",deleteRuntime:"删除该 Runtime",loadingDetail:"读取详情…",agentStructure:"Agent 结构",secretHidden:"敏感值已隐藏,点击显示",revealSecret:"显示 {{key}} 的值",fields:{model:"模型",description:"描述",status:"状态信息",project:"项目",version:"版本",resources:"资源",memory:"记忆",tool:"工具",knowledge:"知识",mcpToolset:"MCP 工具集",updatedAt:"更新时间"},resource:{memory:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",concurrency:"并发 {{value}}"},environmentVariables:"环境变量",unnamed:"(未命名)"},dfe={mainAgent:"主 Agent",subAgent:"子 Agent {{index}}",itemCount_one:"{{count}} 项",itemCount_other:"{{count}} 项",info:"Agent 信息",infoAndTopology:"Agent 信息与拓扑",loadingInfo:"正在读取 Agent 信息…",unnamedAgent:"未命名 Agent",tools:"工具",toolList:"工具列表",studioTool:"Studio Tool",removeTool:"移除工具 {{name}}",remove:"移除",notConfigured:"未配置",addStudioTool:"添加 Studio 工具",addStudioToolHere:"在此对话中添加 Studio 工具",skills:"技能",skillList:"技能列表",previewUnsupported:"暂不支持预览",sessionEnvironment:"会话环境",environment:"环境",agentCanvas:"Agent 画布",topology:"结构拓扑",viewCanvasFullscreen:"全屏查看 Agent 画布",viewFullscreen:"全屏查看",executionCanvas:"Agent 执行画布",fullscreenExecutionCanvas:"全屏 Agent 执行画布",closeFullscreenCanvas:"关闭全屏画布",close:"关闭",capabilitiesSubtitle:"能力与协作拓扑",closeInfo:"关闭 Agent 信息",infoUnavailable:"暂时无法读取 Agent 信息。"},ffe={mountFailed:"挂载环境失败",closeDialog:"关闭环境弹窗",addTitle:"添加环境",description:"选择当前会话允许 Agent 使用的 Sandbox 环境",closeAdd:"关闭添加环境",searchAria:"搜索环境",searchPlaceholder:"搜索环境名称或能力",availableAria:"可用环境与工作区",loading:"正在读取可用环境…",noMatch:"没有匹配的环境或工作区",workspaces:"工作区",reuseAll:"复用工作区中的全部可用环境",availableEnvironmentCount_one:"{{count}} 个可用环境",availableEnvironmentCount_other:"{{count}} 个可用环境",selectWorkspace:"选择工作区 {{name}}",environments:"环境",includedByWorkspaces:"已由工作区 {{names}} 包含",nameSeparator:"、",selectEnvironment:"选择环境 {{name}}",selectedWorkspaceCount_one:"{{count}} 个工作区",selectedWorkspaceCount_other:"{{count}} 个工作区",coveredEnvironmentCount_one:"{{count}} 个环境",coveredEnvironmentCount_other:"{{count}} 个环境",selectionSummary:"已选择 {{workspaces}},覆盖 {{environments}}",cancel:"取消",mounting:"正在挂载…",confirm:"确认添加",mountedAria:"已挂载环境",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",removeWorkspace:"移除工作区 {{name}}",remove:"移除",removeEnvironment:"移除环境 {{name}}",add:"添加环境",addMore:"添加更多环境",addForSession:"为当前 Session 添加环境",loadingAvailable:"正在加载可用环境…",empty:"暂无可用的 AIO Sandbox 环境。"},hfe={loading:{searching:"正在查找已有环境",creating:"环境初始化中",connecting:"正在连接已有环境"},initializationFailed:"AgentKit CLI 环境初始化失败,当前状态:{{status}}。",sessionExpired:"AgentKit CLI Session 不存在或已过期,请重试。",initializationTimeout:"AgentKit CLI 环境初始化超时,请稍后重试。",nonPersistent:"非持久化环境",recyclingHoursMinutes:"{{hours}} 小时 {{minutes}} 分钟后环境回收",recyclingMinutes:"{{minutes}} 分钟后环境回收",connectionError:`无法连接 Studio 服务,未收到服务端响应。 +原始错误:{{message}}`,unavailable:"连接不可用",requestFailed:"AgentKit CLI 请求失败",retry:"重试",terminalTitle:"AgentKit CLI 终端"},pfe={labels:{coding:"智能编程",get_city_weather:"城市天气查询",get_location_weather:"位置天气查询",web_fetch:"网页内容获取"},closeDialog:"关闭弹窗",title:"添加 Studio 工具",description:"由 Studio BFF 为 {{agentName}} 的当前会话执行,Runtime 无需预装",close:"关闭添加 Studio 工具",searchAria:"搜索 Studio 工具",searchPlaceholder:"搜索名称或工具标识",availableAria:"可用 Studio 工具",loading:"正在读取 Studio 工具…",noMatch:"没有匹配的 Studio 工具",remove:"移除",add:"添加"},mfe={artifactLibrary:ife,resourceMetadata:rfe,artifactEdit:sfe,codeBrowser:afe,search:ofe,developerResources:lfe,library:cfe,manageAgents:ufe,agentTopology:dfe,sessionEnvironment:ffe,agentKitCli:hfe,studioTools:pfe},vMe=Object.freeze(Object.defineProperty({__proto__:null,agentKitCli:hfe,agentTopology:dfe,artifactEdit:sfe,artifactLibrary:ife,codeBrowser:afe,default:mfe,developerResources:lfe,library:cfe,manageAgents:ufe,resourceMetadata:rfe,search:ofe,sessionEnvironment:ffe,studioTools:pfe},Symbol.toStringTag,{value:"Module"})),U8=["zh-CN","en-US"],dj="en-US",gfe="agentkit.studio.locale",xMe={"zh-CN":{dir:"ltr",nativeName:"简体中文"},"en-US":{dir:"ltr",nativeName:"English"}};function fj(e){if(!e)return null;const t=e.trim().replace(/_/g,"-").toLowerCase(),n=U8.find(i=>i.toLowerCase()===t);return n||(t==="zh"||t.startsWith("zh-")?"zh-CN":t==="en"||t.startsWith("en-")?"en-US":null)}function Pd(e,t){const n=(e==null?void 0:e.trim())??"";if(!n)return"";const i=new RegExp("\\p{Script=Han}","u").test(n);return t.toLowerCase().startsWith("zh")===i?n:""}function OMe(){if(typeof window>"u")return null;try{return fj(window.localStorage.getItem(gfe))}catch{return null}}function wMe(){return typeof navigator>"u"?[]:navigator.languages.length>0?navigator.languages:navigator.language?[navigator.language]:[]}function SMe(){const e=OMe();if(e)return e;for(const t of wMe()){const n=fj(t);if(n)return n}return dj}function kMe(e){if(!(typeof window>"u"))try{window.localStorage.setItem(gfe,e)}catch{}}function bfe(e){typeof document>"u"||(document.documentElement.lang=e,document.documentElement.dir=xMe[e].dir)}const _n=e=>typeof e=="string",S1=()=>{let e,t;const n=new Promise((i,r)=>{e=i,t=r});return n.resolve=e,n.reject=t,n},kP=e=>e==null?"":String(e),EMe=(e,t,n)=>{e.forEach(i=>{t[i]&&(n[i]=t[i])})},CMe=/###/g,aV=e=>e&&e.includes("###")?e.replace(CMe,"."):e,oV=e=>!e||_n(e),qO=(e,t,n)=>{const i=_n(t)?t.split("."):t;let r=0;for(;r{const{obj:i,k:r}=qO(e,t,Object);if(i!==void 0||t.length===1){i[r]=n;return}let s=t[t.length-1],a=t.slice(0,t.length-1),l=qO(e,a,Object);for(;l.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),l=qO(e,a,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${s}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=n},TMe=(e,t,n,i)=>{const{obj:r,k:s}=qO(e,t,Object);r[s]=r[s]||[],r[s].push(n)},LA=(e,t)=>{const{obj:n,k:i}=qO(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,i))return n[i]},AMe=(e,t,n)=>{const i=LA(e,n);return i!==void 0?i:LA(t,n)},yfe=(e,t,n)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,i)?_n(e[i])||e[i]instanceof String||_n(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):yfe(e[i],t[i],n):e[i]=t[i]);return e},gf=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),_Me={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},NMe=e=>_n(e)?e.replace(/[&<>"'\/]/g,t=>_Me[t]):e;class jMe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}const RMe=[" ",",","?","!",";"],IMe=new jMe(20),PMe=(e,t,n)=>{t=t||"",n=n||"";const i=RMe.filter(a=>!t.includes(a)&&!n.includes(a));if(i.length===0)return!0;const r=IMe.getRegExp(`(${i.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!r.test(e);if(!s){const a=e.indexOf(n);a>0&&!r.test(e.substring(0,a))&&(s=!0)}return s},UL=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const i=t.split(n);let r=e;for(let s=0;se==null?void 0:e.replace(/_/g,"-"),DMe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,i;(i=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||i.call(n,console,t)}};class $A{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||DMe,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,i,r){return r&&!this.debug?null:(t=t.map(s=>_n(s)?s.replace(/[\r\n\x00-\x1F\x7F]/g," "):s),_n(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new $A(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new $A(this.logger,t)}}var kd=new $A;class hj{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const i=(...r)=>{n(...r),this.off(t,i)};return this.on(t,i),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([r,s])=>{for(let a=0;a{for(let a=0;a-1&&this.options.ns.splice(n,1)}getResource(t,n,i,r={}){var u,d;const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,a=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.includes(".")?l=t.split("."):(l=[t,n],i&&(Array.isArray(i)?l.push(...i):_n(i)&&s?l.push(...i.split(s)):l.push(i)));const c=LA(this.data,l);return!c&&!n&&!i&&t.includes(".")&&(t=l[0],n=l[1],i=l.slice(2).join(".")),c||!a||!_n(i)?c:UL((d=(u=this.data)==null?void 0:u[t])==null?void 0:d[n],i,s)}addResource(t,n,i,r,s={silent:!1}){const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=[t,n];i&&(l=l.concat(a?i.split(a):i)),t.includes(".")&&(l=t.split("."),r=n,n=l[1]),this.addNamespaces(n),lV(this.data,l,r),s.silent||this.emit("added",t,n,i,r)}addResources(t,n,i,r={silent:!1}){for(const s in i)(_n(i[s])||Array.isArray(i[s]))&&this.addResource(t,n,s,i[s],{silent:!0});r.silent||this.emit("added",t,n,i)}addResourceBundle(t,n,i,r,s,a={silent:!1,skipCopy:!1}){let l=[t,n];t.includes(".")&&(l=t.split("."),r=i,i=n,n=l[1]),this.addNamespaces(n);let c=LA(this.data,l)||{};a.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?yfe(c,i,s):c={...c,...i},lV(this.data,l,c),a.silent||this.emit("added",t,n,i)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var vfe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,i,r){return e.forEach(s=>{var a;t=((a=this.processors[s])==null?void 0:a.process(t,n,i,r))??t}),t}};const xfe=Symbol("i18next/PATH_KEY");function MMe(){const e=[],t=Object.create(null);let n;return t.get=(i,r)=>{var s;return(s=n==null?void 0:n.revoke)==null||s.call(n),r===xfe?e:(e.push(r),n=Proxy.revocable(i,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Hg(e,t){const{[xfe]:n}=e(MMe()),i=(t==null?void 0:t.keySeparator)??".",r=(t==null?void 0:t.nsSeparator)??":",s=(t==null?void 0:t.enableSelector)==="strict";if(n.length>1&&r){const a=t==null?void 0:t.ns,l=s?Array.isArray(a)?a:a?[a]:null:Array.isArray(a)?a:null;if(l&&(s?l:l.length>1?l.slice(1):[]).includes(n[0]))return`${n[0]}${r}${n.slice(1).join(i)}`}return n.join(i)}const EP=e=>!_n(e)&&typeof e!="boolean"&&typeof e!="number";class FA extends hj{constructor(t,n={}){super(),EMe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=kd.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const i={...n};if(t==null)return!1;const r=this.resolve(t,i);if((r==null?void 0:r.res)===void 0)return!1;const s=EP(r.res);return!(i.returnObjects===!1&&s)}extractFromKey(t,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=i&&t.includes(i),l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!PMe(t,i,r);if(a&&!l){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:_n(s)?[s]:s};const u=t.split(i);(i!==r||i===r&&this.options.ns.includes(u[0]))&&(s=u.shift()),t=u.join(r)}return{key:t,namespaces:_n(s)?[s]:s}}translate(t,n,i){let r=typeof n=="object"?{...n}:n;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";typeof t=="function"&&(t=Hg(t,{...this.options,...r})),Array.isArray(t)||(t=[String(t)]),t=t.map(L=>typeof L=="function"?Hg(L,{...this.options,...r}):String(L));const s=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:l,namespaces:c}=this.extractFromKey(t[t.length-1],r),u=c[c.length-1];let d=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=r.lng||this.language,h=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return h?s?{res:`${u}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${d}${l}`:s?{res:l,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:l;const p=this.resolve(t,r);let g=p==null?void 0:p.res;const b=(p==null?void 0:p.usedKey)||l,v=(p==null?void 0:p.exactUsedKey)||l,y=["[object Number]","[object Function]","[object RegExp]"],x=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,O=r.count!==void 0&&!_n(r.count),k=FA.hasDefaultValue(r),S=O?this.pluralResolver.getSuffix(f,r.count,r):"",E=r.ordinal&&O?this.pluralResolver.getSuffix(f,r.count,{ordinal:!1}):"",C=O&&!r.ordinal&&r.count===0,N=C&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${S}`]||r[`defaultValue${E}`]||r.defaultValue;let _=g;w&&!g&&k&&(_=N);const j=EP(_),T=Object.prototype.toString.apply(_);if(w&&_&&j&&!y.includes(T)&&!(_n(x)&&Array.isArray(_))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,_,{...r,ns:c}):`key '${l} (${this.language})' returned an object instead of string.`;return s?(p.res=L,p.usedParams=this.getUsedParamsDetails(r),p):L}if(a){const L=Array.isArray(_),A=L?[]:{},R=L?v:b;for(const P in _)if(Object.prototype.hasOwnProperty.call(_,P)){const $=`${R}${a}${P}`;k&&!g?A[P]=this.translate($,{...r,defaultValue:EP(N)?N[P]:void 0,joinArrays:!1,ns:c}):A[P]=this.translate($,{...r,joinArrays:!1,ns:c}),A[P]===$&&(A[P]=_[P])}g=A}}else if(w&&_n(x)&&Array.isArray(g))g=g.join(x),g&&(g=this.extendTranslation(g,t,r,i));else{let L=!1,A=!1;!this.isValidLookup(g)&&k&&(L=!0,g=N),this.isValidLookup(g)||(A=!0,g=l);const P=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:g,$=k&&N!==g&&this.options.updateMissing;if(A||L||$){if(this.logger.log($?"updateKey":"missingKey",f,u,O&&!$?`${l}${this.pluralResolver.getSuffix(f,r.count,r)}`:l,$?N:g),a){const H=this.resolve(l,{...r,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let M=[];const B=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&B&&B[0])for(let H=0;H{var U;const q=k&&Q!==g?Q:P;this.options.missingKeyHandler?this.options.missingKeyHandler(H,u,X,q,$,r):(U=this.backendConnector)!=null&&U.saveMissing&&this.backendConnector.saveMissing(H,u,X,q,$,r),this.emit("missingKey",H,u,X,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?M.forEach(H=>{const X=this.pluralResolver.getSuffixes(H,r);C&&r[`defaultValue${this.options.pluralSeparator}zero`]&&!X.includes(`${this.options.pluralSeparator}zero`)&&X.push(`${this.options.pluralSeparator}zero`),X.forEach(Q=>{I([H],l+Q,r[`defaultValue${Q}`]||N)})}):I(M,l,N))}g=this.extendTranslation(g,t,r,p,i),A&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${l}`),(A||L)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${l}`:l,L?g:void 0,r))}return s?(p.res=g,p.usedParams=this.getUsedParamsDetails(r),p):g}extendTranslation(t,n,i,r,s){var c,u;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const d=_n(t)&&(((u=i==null?void 0:i.interpolation)==null?void 0:u.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const p=t.match(this.interpolator.nestingRegexp);f=p&&p.length}let h=i.replace&&!_n(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,i.lng||this.language||r.usedLng,i),d){const p=t.match(this.interpolator.nestingRegexp),g=p&&p.length;f(s==null?void 0:s[0])===p[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),i)),i.interpolation&&this.interpolator.reset()}const a=i.postProcess||this.options.postProcess,l=_n(a)?[a]:a;return t!=null&&(l!=null&&l.length)&&i.applyPostProcessor!==!1&&(t=vfe.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,n={}){let i,r,s,a,l;return _n(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(c=>typeof c=="function"?Hg(c,{...this.options,...n}):c)),t.forEach(c=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(c,n),d=u.key;r=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!_n(n.count),p=h&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(_n(n.context)||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(v=>{var y,x;this.isValidLookup(i)||(l=v,!this.checkedLoadedFor[`${b[0]}-${v}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${b[0]}-${v}`]=!0,this.logger.warn(`key "${r}" for languages "${b.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(w=>{var S;if(this.isValidLookup(i))return;a=w;const O=[d];if((S=this.i18nFormat)!=null&&S.addLookupKeys)this.i18nFormat.addLookupKeys(O,d,w,v,n);else{let E;h&&(E=this.pluralResolver.getSuffix(w,n.count,n));const C=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&E.startsWith(N)&&O.push(d+E.replace(N,this.options.pluralSeparator)),O.push(d+E),p&&O.push(d+C)),g){const _=`${d}${this.options.contextSeparator||"_"}${n.context}`;O.push(_),h&&(n.ordinal&&E.startsWith(N)&&O.push(_+E.replace(N,this.options.pluralSeparator)),O.push(_+E),p&&O.push(_+C))}}let k;for(;k=O.pop();)this.isValidLookup(i)||(s=k,i=this.getResource(w,v,k,n))}))})}),{res:i,usedKey:r,exactUsedKey:s,usedLng:a,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,i,r={}){var s;return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,n,i,r):this.resourceStore.getResource(t,n,i,r)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!_n(t.replace);let r=i?t.replace:t;if(i&&typeof t.count<"u"&&(r={...r,count:t.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const s of n)delete r[s]}return r}static hasDefaultValue(t){const n="defaultValue";for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&i.startsWith(n)&&t[i]!==void 0)return!0;return!1}}class uV{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=kd.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(t){if(t=zw(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=zw(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(_n(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&t.forEach(i=>{if(n)return;const r=this.getScriptPartFromCode(i);if(this.isSupportedCode(r))return n=r;const s=this.getLanguagePartFromCode(i);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(a=>a===s?!0:!a.includes("-")&&!s.includes("-")?!1:!!(a.includes("-")&&!s.includes("-")&&a.slice(0,a.indexOf("-"))===s||a.startsWith(s)&&s.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),_n(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let i=t[n];return i||(i=t[this.getScriptPartFromCode(n)]),i||(i=t[this.formatLanguageCode(n)]),i||(i=t[this.getLanguagePartFromCode(n)]),i||(i=t.default),i||[]}toResolveHierarchy(t,n){const i=this.options.fallbackLng,r=Array.isArray(i)?i.join("|"):i;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);const s=n===void 0||n===!1||_n(n),a=n===void 0&&typeof this.options.fallbackLng=="function",l=_n(t)&&s&&!a;let c=null;if(l){let h;n===void 0?h="undefined":n===!1?h="boolean:false":h=`string:${n}`,c=`${t.length}:${t}|${h}`}if(c!==null){const h=this.resolveHierarchyCache[c];if(h!==void 0)return h.slice()}const u=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),d=[],f=h=>{h&&(this.isSupportedCode(h)?d.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return _n(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(t))):_n(t)&&f(this.formatLanguageCode(t)),u.forEach(h=>{d.includes(h)||f(this.formatLanguageCode(h))}),c!==null?(this.resolveHierarchyCache[c]=d,d.slice()):d}}const dV={zero:0,one:1,two:2,few:3,many:4,other:5},fV={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class LMe{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=kd.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const i=zw(t==="dev"?"en":t),r=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:r});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(i,{type:r})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),fV;if(!t.match(/-|_/))return fV;const c=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(c,n)}return this.pluralRulesCache[s]=a,a}needsPlural(t,n={}){let i=this.getRule(t,n);return i||(i=this.getRule("dev",n)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,i={}){return this.getSuffixes(t,i).map(r=>`${n}${r}`)}getSuffixes(t,n={}){let i=this.getRule(t,n);return i||(i=this.getRule("dev",n)),i?i.resolvedOptions().pluralCategories.sort((r,s)=>dV[r]-dV[s]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(t,n,i={}){const r=this.getRule(t,i);return r?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,i))}}const hV=(e,t,n,i=".",r=!0)=>{let s=AMe(e,t,n);return!s&&r&&_n(n)&&(s=UL(e,n,i),s===void 0&&(s=UL(t,n,i))),s},pV=e=>e.replace(/\$/g,"$$$$");class mV{constructor(t={}){var n;this.logger=kd.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(i=>i),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:s,prefixEscaped:a,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:b,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:NMe,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=s?gf(s):a||"{{",this.suffix=l?gf(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f?gf(f):"-",this.unescapeSuffix=this.unescapePrefix?"":d?gf(d):"",this.nestingPrefix=h?gf(h):p||gf("$t("),this.nestingSuffix=g?gf(g):b||gf(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,i)=>(n==null?void 0:n.source)===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,i,r){var p;let s,a,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(!g.includes(this.formatSeparator)){const x=hV(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,i,{...r,...n,interpolationkey:g}):x}const b=g.split(this.formatSeparator),v=b.shift().trim(),y=b.join(this.formatSeparator).trim();return this.format(hV(n,c,v,this.options.keySeparator,this.options.ignoreJSONStructure),y,i,{...r,...n,interpolationkey:v})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const d=(r==null?void 0:r.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((p=r==null?void 0:r.interpolation)==null?void 0:p.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>g},{regex:this.regexp,safeValue:g=>this.escapeValue?this.escape(g):g}].forEach(g=>{for(l=0;s=g.regex.exec(t);){const b=s[1].trim();if(a=u(b),a===void 0)if(typeof d=="function"){const y=d(t,s,r);a=_n(y)?y:""}else if(r&&Object.prototype.hasOwnProperty.call(r,b))a="";else if(f){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),a="";else!_n(a)&&!this.useRawValueToEscape&&(a=kP(a));const v=g.safeValue(a);if(t=t.replace(s[0],pV(v)),f?(g.regex.lastIndex+=v.length,g.regex.lastIndex-=s[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n,i={}){let r,s,a;const l=(c,u)=>{const d=this.nestingOptionsSeparator;if(!c.includes(d))return c;const f=c.split(new RegExp(`${gf(d)}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,a);const p=h.match(/'/g),g=h.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),u&&(a={...u,...a})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,b),`${c}${d}${h}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,c};for(;r=this.nestingRegexp.exec(t);){let c=[];a={...i},a=a.replace&&!_n(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const u=/{.*}/s.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(u!==-1&&(c=r[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),r[1]=r[1].slice(0,u)),s=n(l.call(this,r[1].trim(),a),a),s&&r[0]===t&&!_n(s))return s;_n(s)||(s=kP(s)),s||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`),s=""),c.length&&(s=c.reduce((d,f)=>this.format(d,f,i.lng,{...i,interpolationkey:r[1].trim()}),s.trim())),t=t.replace(r[0],pV(kP(s))),this.regexp.lastIndex=0}return t}}const $Me=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const i=e.split("(");t=i[0].toLowerCase().trim();const r=i[1].slice(0,-1);t==="currency"&&!r.includes(":")?n.currency||(n.currency=r.trim()):t==="relativetime"&&!r.includes(":")?n.range||(n.range=r.trim()):r.split(";").forEach(a=>{if(a){const[l,...c]=a.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},gV=e=>{const t={};return(n,i,r)=>{let s=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(s={...s,[r.interpolationkey]:void 0});const a=i+JSON.stringify(s);let l=t[a];return l||(l=e(zw(i),r),t[a]=l),l(n)}},FMe=e=>(t,n,i)=>e(zw(n),i)(t);class BMe{constructor(t={}){this.logger=kd.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const i=n.cacheInBuiltFormats?gV:FMe;this.formats={number:i((r,s)=>{const a=new Intl.NumberFormat(r,{...s});return l=>a.format(l)}),currency:i((r,s)=>{const a=new Intl.NumberFormat(r,{...s,style:"currency"});return l=>a.format(l)}),datetime:i((r,s)=>{const a=new Intl.DateTimeFormat(r,{...s});return l=>a.format(l)}),relativetime:i((r,s)=>{const a=new Intl.RelativeTimeFormat(r,{...s});return l=>a.format(l,s.range||"day")}),list:i((r,s)=>{const a=new Intl.ListFormat(r,{...s});return l=>a.format(l)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=gV(n)}format(t,n,i,r={}){if(!n||t==null)return t;const s=n.split(this.formatSeparator),a=[];for(let c=0;c-1&&!u.includes(")")&&c+1{var h;const{formatName:d,formatOptions:f}=$Me(u);if(this.formats[d]){let p=c;try{const g=((h=r==null?void 0:r.formatParams)==null?void 0:h[r.interpolationkey])||{},b=g.locale||g.lng||r.locale||r.lng||i;p=this.formats[d](c,b,{...f,...r,...g})}catch(g){this.logger.warn(g)}return p}else this.logger.warn(`there was no format function for ${d}`);return c},t)}}const UMe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class QMe extends hj{constructor(t,n,i,r={}){var s,a;super(),this.backend=t,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=kd.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,i,r.backend,r)}queueLoad(t,n,i,r){const s={},a={},l={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,d=!1,a[h]===void 0&&(a[h]=!0),s[h]===void 0&&(s[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(l[u]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(t,n,i){const r=t.split("|"),s=r[0],a=r[1];n&&this.emit("failedLoading",s,a,n),!n&&i&&this.store.addResourceBundle(s,a,i,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&i&&(this.state[t]=0);const l={};this.queue.forEach(c=>{TMe(c.loaded,[s],a),UMe(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(t,n,i,r=0,s=this.retryTimeout,a){if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:i,tried:r,wait:s,callback:a});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&r{this.read(t,n,i,r+1,s*2,a)},s);return}a(u,d)},c=this.backend[i].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return c(t,n,l)}prepareLoading(t,n,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();_n(t)&&(t=this.languageUtils.toResolveHierarchy(t)),_n(n)&&(n=[n]);const s=this.queueLoad(t,n,i,r);if(!s.toLoad.length)return s.pending.length||r(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,i){this.prepareLoading(t,n,{},i)}reload(t,n,i){this.prepareLoading(t,n,{reload:!0},i)}loadOne(t,n=""){const i=t.split("|"),r=i[0],s=i[1];this.read(r,s,"read",void 0,void 0,(a,l)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${r} failed`,a),!a&&l&&this.logger.log(`${n}loaded namespace ${s} for language ${r}`,l),this.loaded(t,a,l)})}saveMissing(t,n,i,r,s,a={},l=()=>{}){var c,u,d,f,h;if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((f=(d=this.services)==null?void 0:d.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${i}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((h=this.backend)!=null&&h.create){const p={...a,isUpdate:s},g=this.backend.create.bind(this.backend);if(g.length<6)try{let b;g.length===5?b=g(t,n,i,r,p):b=g(t,n,i,r),b&&typeof b.then=="function"?b.then(v=>l(null,v)).catch(l):l(null,b)}catch(b){l(b)}else g(t,n,i,r,l,p)}!t||!t[0]||this.store.addResource(t[0],n,i,r)}}}const CP=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),_n(e[1])&&(t.defaultValue=e[1]),_n(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(i=>{t[i]=n[i]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),bV=e=>(_n(e.ns)&&(e.ns=[e.ns]),_n(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),_n(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),OC=()=>{},zMe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class WO extends hj{constructor(t={},n){if(super(),this.options=bV(t),this.services={},this.logger=kd,this.modules={external:[]},zMe(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(_n(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const i=CP();this.options={...i,...this.options,...bV(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);const r=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?kd.init(r(this.modules.logger),this.options):kd.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=BMe;const d=new uV(this.options);this.store=new cV(this.options.resources,this.options);const f=this.services;f.logger=kd,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new LMe(d,{prepend:this.options.pluralSeparator}),u&&(f.formatter=r(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new mV(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new QMe(r(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.languageDetector&&(f.languageDetector=r(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=r(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new FA(this.services,this.options),this.translator.on("*",(h,...p)=>{this.emit(h,...p)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=OC),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const l=S1(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(d,f)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(t,n=OC){var s,a;let i=n;const r=_n(t)?t:this.language;if(typeof t=="function"&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if((r==null?void 0:r.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const l=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&(l.includes(f)||l.push(f))})};r?c(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>c(d)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,u=>c(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(u)})}else i(null)}reloadResources(t,n,i){const r=S1();return typeof t=="function"&&(i=t,t=void 0),typeof n=="function"&&(i=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),i||(i=OC),this.services.backendConnector.reload(t,n,s=>{r.resolve(),i(s)}),r}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&vfe.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?this.isLanguageChangingTo===t&&(r(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve((...u)=>this.t(...u)),n&&n(l,(...u)=>this.t(...u))},a=l=>{var d,f;!t&&!l&&this.services.languageDetector&&(l=[]);const c=_n(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(_n(l)?[l]:l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),(f=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||f.call(d,u)),this.loadResources(u,h=>{s(h,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,i,r){const s=r==null?void 0:r.scopeNs,a=(l,c,...u)=>{let d;typeof c!="object"?d=this.options.overloadTranslationOptionHandler([l,c].concat(u)):d={...c},d.lng=d.lng||a.lng,d.lngs=d.lngs||a.lngs;const f=d.ns!==void 0&&d.ns!==null;d.ns=d.ns||a.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||i||a.keyPrefix);const h={...this.options,...d};Array.isArray(s)&&!f&&(h.ns=s),typeof d.keyPrefix=="function"&&(d.keyPrefix=Hg(d.keyPrefix,h));const p=this.options.keySeparator||".";let g;return d.keyPrefix&&Array.isArray(l)?g=l.map(b=>(typeof b=="function"&&(b=Hg(b,h)),`${d.keyPrefix}${p}${b}`)):(typeof l=="function"&&(l=Hg(l,h)),g=d.keyPrefix?`${d.keyPrefix}${p}${l}`:l),this.t(g,d)};return _n(t)?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=i,a}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const a=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,a);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(i,t)&&(!r||a(s,t)))}loadNamespaces(t,n){const i=S1();return this.options.ns?(_n(t)&&(t=[t]),t.forEach(r=>{this.options.ns.includes(r)||this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(t,n){const i=S1();_n(t)&&(t=[t]);const r=this.options.preload||[],s=t.filter(a=>!r.includes(a)&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=r.concat(s),this.loadResources(a=>{i.resolve(),n&&n(a)}),i):(n&&n(),Promise.resolve())}dir(t){var r,s;if(t||(t=this.resolvedLanguage||(((r=this.languages)==null?void 0:r.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const a=new Intl.Locale(t);if(a&&a.getTextInfo){const l=a.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=((s=this.services)==null?void 0:s.languageUtils)||new uV(CP());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(i.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const i=new WO(t,n);return i.createInstance=WO.createInstance,i}cloneInstance(t={},n=OC){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},s=new WO(r);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(l=>{s[l]=this[l]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i){const l=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},c[u]=Object.keys(c[u]).reduce((d,f)=>(d[f]={...c[u][f]},d),c[u]),c),{});s.store=new cV(l,r),s.services.resourceStore=s.store}if(t.interpolation){const c={...CP().interpolation,...this.options.interpolation,...t.interpolation},u={...r,interpolation:c};s.services.interpolator=new mV(u)}return s.translator=new FA(s.services,r),s.translator.on("*",(l,...c)=>{s.emit(l,...c)}),s.init(r,n),s.translator.options=r,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Qo=WO.createInstance();Qo.createInstance;Qo.dir;Qo.init;Qo.loadResources;Qo.reloadResources;Qo.use;Qo.changeLanguage;Qo.getFixedT;Qo.t;Qo.exists;Qo.setDefaultNamespace;Qo.hasLoadedNamespace;Qo.loadNamespaces;Qo.loadLanguages;var Ofe={exports:{}},Kn={};/** * @license React * react.production.js * @@ -51,7 +51,7 @@ Studio:{{studioUrl}} * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var z8=Symbol.for("react.transitional.element"),zMe=Symbol.for("react.portal"),VMe=Symbol.for("react.fragment"),HMe=Symbol.for("react.strict_mode"),qMe=Symbol.for("react.profiler"),WMe=Symbol.for("react.consumer"),KMe=Symbol.for("react.context"),GMe=Symbol.for("react.forward_ref"),XMe=Symbol.for("react.suspense"),YMe=Symbol.for("react.memo"),Sfe=Symbol.for("react.lazy"),ZMe=Symbol.for("react.activity"),xV=Symbol.iterator;function JMe(e){return e===null||typeof e!="object"?null:(e=xV&&e[xV]||e["@@iterator"],typeof e=="function"?e:null)}var kfe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Efe=Object.assign,Cfe={};function mx(e,t,n){this.props=e,this.context=t,this.refs=Cfe,this.updater=n||kfe}mx.prototype.isReactComponent={};mx.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};mx.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tfe(){}Tfe.prototype=mx.prototype;function V8(e,t,n){this.props=e,this.context=t,this.refs=Cfe,this.updater=n||kfe}var H8=V8.prototype=new Tfe;H8.constructor=V8;Efe(H8,mx.prototype);H8.isPureReactComponent=!0;var OV=Array.isArray;function VL(){}var Yr={H:null,A:null,T:null,S:null},Afe=Object.prototype.hasOwnProperty;function q8(e,t,n){var i=n.ref;return{$$typeof:z8,type:e,key:t,ref:i!==void 0?i:null,props:n}}function e5e(e,t){return q8(e.type,t,e.props)}function W8(e){return typeof e=="object"&&e!==null&&e.$$typeof===z8}function t5e(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var wV=/\/+/g;function _P(e,t){return typeof e=="object"&&e!==null&&e.key!=null?t5e(""+e.key):t.toString(36)}function n5e(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(VL,VL):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function G0(e,t,n,i,r){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case z8:case zMe:a=!0;break;case Sfe:return a=e._init,G0(a(e._payload),t,n,i,r)}}if(a)return r=r(e),a=i===""?"."+_P(e,0):i,OV(r)?(n="",a!=null&&(n=a.replace(wV,"$&/")+"/"),G0(r,t,n,"",function(u){return u})):r!=null&&(W8(r)&&(r=e5e(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(wV,"$&/")+"/")+a)),t.push(r)),1;a=0;var l=i===""?".":i+":";if(OV(e))for(var c=0;c<]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function kV(e){const t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(s5e[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){const s=e.indexOf("-->");return{type:"comment",comment:s!==-1?e.slice(4,s):""}}const i=new RegExp(a5e);let r=null;for(;r=i.exec(e),r!==null;)if(r[0].trim())if(r[1]){const s=r[1].trim();let a=[s,null];const l=s.indexOf("=");l>-1&&(a=[s.slice(0,l),s.slice(l+1)]),t.attrs[a[0]]=a[1],i.lastIndex--}else r[2]&&(t.attrs[r[2]]=r[3].trim().substring(1,r[3].length-1));return t}const CC=/|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,o5e=/<\/?([^\s]+?)[/\s>]/,l5e=/^\s*$/,c5e=/^(script|style)$/i,OO="\0",u5e=Object.create(null);function _fe(e){e.forEach(function(t){if(t.type==="text"){t.content=t.content.split(OO).join("<");return}if(t.type==="comment"){t.comment=t.comment.split(OO).join("<");return}for(const n in t.attrs){const i=t.attrs[n];typeof i=="string"&&i.indexOf(OO)>-1&&(t.attrs[n]=i.split(OO).join("<"))}t.children.length&&_fe(t.children)})}function d5e(e,t){const n=t&&t.components||u5e,i=t&&t.allowedTags;let r=!1;if(i){const g=typeof i=="function"?i:function(x){return i.indexOf(x)>-1};let b="",v=0;CC.lastIndex=0;let y;for(;y=CC.exec(e);){const x=y[0];b+=e.slice(v,y.index);const w=x.match(o5e);x.startsWith("",e}}function h5e(e){return e.reduce(function(t,n){return t+Nfe("",n)},"")}var p5e={parse:d5e,stringify:h5e};const k2=(e,t,n,i)=>{var s,a,l,c;const r=[n,{code:t,...i||{}}];if((a=(s=e==null?void 0:e.services)==null?void 0:s.logger)!=null&&a.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);pl(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),(c=(l=e==null?void 0:e.services)==null?void 0:l.logger)!=null&&c.warn?e.services.logger.warn(...r):console!=null&&console.warn&&console.warn(...r)},EV={},By=(e,t,n,i)=>{pl(n)&&EV[n]||(pl(n)&&(EV[n]=new Date),k2(e,t,n,i))},jfe=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},HL=(e,t,n)=>{e.loadNamespaces(t,jfe(e,n))},CV=(e,t,n,i)=>{if(pl(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return HL(e,n,i);n.forEach(r=>{e.options.ns.indexOf(r)<0&&e.options.ns.push(r)}),e.loadLanguages(t,jfe(e,i))},m5e=(e,t,n={})=>!t.languages||!t.languages.length?(By(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,e))return!1}}),pl=e=>typeof e=="string",Yf=e=>typeof e=="object"&&e!==null,g5e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,b5e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},y5e=e=>b5e[e],Rfe=e=>e.replace(g5e,y5e);let qL={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Rfe,transDefaultProps:void 0};const v5e=(e={})=>{qL={...qL,...e}},K8=()=>qL;let Ife;const x5e=e=>{Ife=e},G8=()=>Ife,E2=(e,t)=>{var i;if(!e)return!1;const n=((i=e.props)==null?void 0:i.children)??e.children;return t?n.length>0:!!n},wO=e=>{var n,i;if(!e)return[];const t=((n=e.props)==null?void 0:n.children)??e.children;return(i=e.props)!=null&&i.i18nIsDynamicList?Np(t):t},O5e=e=>Array.isArray(e)&&e.every(m.isValidElement),Np=e=>Array.isArray(e)?e:[e],w5e=(e,t)=>{const n={...t};return n.props={...t.props,...e.props},n},S5e=e=>{const t={};if(!e)return t;const n=i=>{Np(i).forEach(s=>{pl(s)||(E2(s)?n(wO(s)):Yf(s)&&!m.isValidElement(s)&&Object.assign(t,s))})};return n(e),t},WL=(e,t,n,i)=>{if(!e)return"";let r="";const s=Np(e),a=t!=null&&t.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return s.forEach((l,c)=>{if(pl(l)){r+=`${l}`;return}if(m.isValidElement(l)){const{props:u,type:d}=l,f=Object.keys(u).length,h=a.indexOf(d)>-1,p=u.children;if(!p&&h&&!f){r+=`<${d}/>`;return}if(!p&&(!h||f)||u.i18nIsDynamicList){r+=`<${c}>`;return}if(h&&f<=1){const b=pl(p)?p:WL(p,t,n,i);r+=`<${d}>${b}`;return}const g=WL(p,t,n,i);r+=`<${c}>${g}`;return}if(l===null){k2(n,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:i});return}if(Yf(l)){const{format:u,...d}=l,f=Object.keys(d);if(f.length===1){const h=u?`${f[0]}, ${u}`:f[0];r+=`{{${h}}}`;return}k2(n,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:i,child:l});return}k2(n,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:i,child:l})}),r},k5e=(e,t,n,i,r,s,a)=>{if(n==="")return[];const l=r.transKeepBasicHtmlNodesFor||[],c=n&&new RegExp(l.map(w=>`<${w}`).join("|")).test(n);if(!e&&!t&&!c&&!a)return[n];const u=t??{},d=w=>{Np(w).forEach(k=>{pl(k)||(E2(k)?d(wO(k)):Yf(k)&&!m.isValidElement(k)&&Object.assign(u,k))})};d(e);const f=Object.keys(u),h=w=>/^\d+$/.test(w)||l.indexOf(w)>-1||f.indexOf(w)>-1,p=p5e.parse(`<0>${n}`,{allowedTags:h}),g={...u,...s},b=(w,O,k)=>{var C;const S=wO(w),E=y(S,O.children,k);return O5e(S)&&E.length===0||(C=w.props)!=null&&C.i18nIsDynamicList?S:E},v=(w,O,k,S,E)=>{w.dummy?(w.children=O,k.push(m.cloneElement(w,{key:S},E?void 0:O))):k.push(...m.Children.map([w],C=>{var _;if(C.type===m.Fragment||((_=C.props)==null?void 0:_.i18nIsDynamicList)!==void 0){const j={key:S};return C&&C.props&&Object.keys(C.props).forEach(T=>{T==="children"||T==="i18nIsDynamicList"||(j[T]=C.props[T])}),m.createElement(C.type,j,E?null:O)}const N={key:S};return C&&C.props&&Object.keys(C.props).forEach(j=>{j==="ref"||j==="children"||(N[j]=C.props[j])}),m.cloneElement(C,N,E?null:O)}))},y=(w,O,k)=>{const S=Np(w),E=Np(O),C={};return E.reduce((N,_,j)=>{var L,A;const T=((A=(L=_.children)==null?void 0:L[0])==null?void 0:A.content)&&i.services.interpolator.interpolate(_.children[0].content,g,i.language);if(_.type==="tag"){let R=S[parseInt(_.name,10)];!R&&t&&(R=t[_.name]),k.length===1&&!R&&(R=k[0][_.name]),R||(R={});const P={..._.attrs};a&&Object.keys(P).forEach(X=>{const Q=P[X];pl(Q)&&(P[X]=Rfe(Q))});const $=Object.keys(P).length!==0?w5e({props:P},R):R,M=m.isValidElement($),B=M&&E2(_,!0)&&!_.voidElement,I=c&&Yf($)&&$.dummy&&!M,H=Yf(t)&&Object.hasOwnProperty.call(t,_.name);if(pl($)){const X=i.services.interpolator.interpolate($,g,i.language);N.push(X)}else if(E2($)||B){const X=b($,_,k);v($,X,N,j)}else if(I){const X=y(S,_.children,k);v($,X,N,j)}else if(Number.isNaN(parseFloat(_.name)))if(H){const X=b($,_,k);v($,X,N,j,_.voidElement)}else if(r.transSupportBasicHtmlNodes&&l.indexOf(_.name)>-1)if(_.voidElement)N.push(m.createElement(_.name,{key:`${_.name}-${j}`}));else{const X=C[_.name]||0;C[_.name]=X+1;let Q,q=0;for(let le=0;le`);else{const X=y(S,_.children,k);N.push(`<${_.name}>${X}`)}else if(Yf($)&&!M){const X=_.children[0]?T:null;X&&N.push(X)}else v($,T,N,j,_.children.length!==1||!T)}else if(_.type==="text"){const R=r.transWrapTextNodes,P=typeof r.unescape=="function"?r.unescape:K8().unescape,$=a?P(i.services.interpolator.interpolate(_.content,g,i.language)):i.services.interpolator.interpolate(_.content,g,i.language);R?N.push(m.createElement(R,{key:`${_.name}-${j}`},$)):N.push($)}return N},[])},x=y([{dummy:!0,children:e||[]}],p,Np(e||[]));return wO(x[0])},Pfe=(e,t,n)=>{const i=e.key||t,r=m.cloneElement(e,{key:i});if(!r.props||!r.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return r;function s(){return m.createElement(m.Fragment,null,r)}return m.createElement(s,{key:i})},E5e=(e,t)=>e.map((n,i)=>Pfe(n,i,t)),C5e=(e,t)=>{const n={};return Object.keys(e).forEach(i=>{Object.assign(n,{[i]:Pfe(e[i],i,t)})}),n},T5e=(e,t,n,i)=>e?Array.isArray(e)?E5e(e,t):Yf(e)?C5e(e,t):(By(n,"TRANS_INVALID_COMPONENTS",' "components" prop expects an object or array',{i18nKey:i}),null):null,A5e=e=>!Yf(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,n)=>t&&Number.isNaN(Number.parseFloat(n)),!0);function _5e({children:e,count:t,parent:n,i18nKey:i,context:r,tOptions:s={},values:a,defaults:l,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...p}){var I,H,X,Q,q,U;const g=d||G8();if(!g)return By(g,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.",{i18nKey:i}),e;const b=f||g.t.bind(g)||(te=>te),v={...K8(),...(I=g.options)==null?void 0:I.react};let y=u||b.ns||((H=g.options)==null?void 0:H.defaultNS);y=pl(y)?[y]:y||["translation"];const{transDefaultProps:x}=v,w=x!=null&&x.tOptions?{...x.tOptions,...s}:s,O=h??(x==null?void 0:x.shouldUnescape),k=x!=null&&x.values?{...x.values,...a}:a,S=x!=null&&x.components?{...x.components,...c}:c,E=WL(e,v,g,i),C=l||(w==null?void 0:w.defaultValue)||E||v.transEmptyNodeValue||(typeof i=="function"?Kg(i):i),{hashTransKey:N}=v,_=i||(N?N(E||C):E||C);(Q=(X=g.options)==null?void 0:X.interpolation)!=null&&Q.defaultVariables?a=k&&Object.keys(k).length>0?{...k,...g.options.interpolation.defaultVariables}:{...g.options.interpolation.defaultVariables}:a=k;const j=S5e(e);j&&typeof j.count=="number"&&t===void 0&&(t=j.count);const T=a||t!==void 0&&!((U=(q=g.options)==null?void 0:q.interpolation)!=null&&U.alwaysFormat)||!e?w.interpolation:{interpolation:{...w.interpolation,prefix:"#$?",suffix:"?$#"}},L={...w,context:r||w.context,count:t,...a,...T,defaultValue:C,ns:y};let A=_?b(_,L):C;A===_&&C&&(A=C);const R=T5e(S,A,g,i);let P=R||e,$=null;A5e(R)&&($=R,P=e);const M=k5e(P,$,A,g,v,L,O),B=n??v.defaultTransParent;return B?m.createElement(B,p,M):M}const N5e={type:"3rdParty",init(e){v5e(e.options.react),x5e(e)}},Dfe=m.createContext();class j5e{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function zA({children:e,count:t,parent:n,i18nKey:i,context:r,tOptions:s={},values:a,defaults:l,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...p}){var x;const{i18n:g,defaultNS:b}=m.useContext(Dfe)||{},v=d||g||G8(),y=f||(v==null?void 0:v.t.bind(v));return _5e({children:e,count:t,parent:n,i18nKey:i,context:r,tOptions:s,values:a,defaults:l,components:c,ns:u||(y==null?void 0:y.ns)||b||((x=v==null?void 0:v.options)==null?void 0:x.defaultNS),i18n:v,t:f,shouldUnescape:h,...p})}var Mfe={exports:{}},Lfe={};/** + */var Q8=Symbol.for("react.transitional.element"),VMe=Symbol.for("react.portal"),HMe=Symbol.for("react.fragment"),qMe=Symbol.for("react.strict_mode"),WMe=Symbol.for("react.profiler"),KMe=Symbol.for("react.consumer"),GMe=Symbol.for("react.context"),XMe=Symbol.for("react.forward_ref"),YMe=Symbol.for("react.suspense"),ZMe=Symbol.for("react.memo"),wfe=Symbol.for("react.lazy"),JMe=Symbol.for("react.activity"),yV=Symbol.iterator;function e5e(e){return e===null||typeof e!="object"?null:(e=yV&&e[yV]||e["@@iterator"],typeof e=="function"?e:null)}var Sfe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kfe=Object.assign,Efe={};function dx(e,t,n){this.props=e,this.context=t,this.refs=Efe,this.updater=n||Sfe}dx.prototype.isReactComponent={};dx.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};dx.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Cfe(){}Cfe.prototype=dx.prototype;function z8(e,t,n){this.props=e,this.context=t,this.refs=Efe,this.updater=n||Sfe}var V8=z8.prototype=new Cfe;V8.constructor=z8;kfe(V8,dx.prototype);V8.isPureReactComponent=!0;var vV=Array.isArray;function QL(){}var Xr={H:null,A:null,T:null,S:null},Tfe=Object.prototype.hasOwnProperty;function H8(e,t,n){var i=n.ref;return{$$typeof:Q8,type:e,key:t,ref:i!==void 0?i:null,props:n}}function t5e(e,t){return H8(e.type,t,e.props)}function q8(e){return typeof e=="object"&&e!==null&&e.$$typeof===Q8}function n5e(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var xV=/\/+/g;function TP(e,t){return typeof e=="object"&&e!==null&&e.key!=null?n5e(""+e.key):t.toString(36)}function i5e(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(QL,QL):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function H0(e,t,n,i,r){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Q8:case VMe:a=!0;break;case wfe:return a=e._init,H0(a(e._payload),t,n,i,r)}}if(a)return r=r(e),a=i===""?"."+TP(e,0):i,vV(r)?(n="",a!=null&&(n=a.replace(xV,"$&/")+"/"),H0(r,t,n,"",function(u){return u})):r!=null&&(q8(r)&&(r=t5e(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(xV,"$&/")+"/")+a)),t.push(r)),1;a=0;var l=i===""?".":i+":";if(vV(e))for(var c=0;c<]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function wV(e){const t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(a5e[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){const s=e.indexOf("-->");return{type:"comment",comment:s!==-1?e.slice(4,s):""}}const i=new RegExp(o5e);let r=null;for(;r=i.exec(e),r!==null;)if(r[0].trim())if(r[1]){const s=r[1].trim();let a=[s,null];const l=s.indexOf("=");l>-1&&(a=[s.slice(0,l),s.slice(l+1)]),t.attrs[a[0]]=a[1],i.lastIndex--}else r[2]&&(t.attrs[r[2]]=r[3].trim().substring(1,r[3].length-1));return t}const SC=/|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,l5e=/<\/?([^\s]+?)[/\s>]/,c5e=/^\s*$/,u5e=/^(script|style)$/i,gO="\0",d5e=Object.create(null);function Afe(e){e.forEach(function(t){if(t.type==="text"){t.content=t.content.split(gO).join("<");return}if(t.type==="comment"){t.comment=t.comment.split(gO).join("<");return}for(const n in t.attrs){const i=t.attrs[n];typeof i=="string"&&i.indexOf(gO)>-1&&(t.attrs[n]=i.split(gO).join("<"))}t.children.length&&Afe(t.children)})}function f5e(e,t){const n=t&&t.components||d5e,i=t&&t.allowedTags;let r=!1;if(i){const g=typeof i=="function"?i:function(x){return i.indexOf(x)>-1};let b="",v=0;SC.lastIndex=0;let y;for(;y=SC.exec(e);){const x=y[0];b+=e.slice(v,y.index);const w=x.match(l5e);x.startsWith("",e}}function p5e(e){return e.reduce(function(t,n){return t+_fe("",n)},"")}var m5e={parse:f5e,stringify:p5e};const O2=(e,t,n,i)=>{var s,a,l,c;const r=[n,{code:t,...i||{}}];if((a=(s=e==null?void 0:e.services)==null?void 0:s.logger)!=null&&a.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);hl(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),(c=(l=e==null?void 0:e.services)==null?void 0:l.logger)!=null&&c.warn?e.services.logger.warn(...r):console!=null&&console.warn&&console.warn(...r)},SV={},My=(e,t,n,i)=>{hl(n)&&SV[n]||(hl(n)&&(SV[n]=new Date),O2(e,t,n,i))},Nfe=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},zL=(e,t,n)=>{e.loadNamespaces(t,Nfe(e,n))},kV=(e,t,n,i)=>{if(hl(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return zL(e,n,i);n.forEach(r=>{e.options.ns.indexOf(r)<0&&e.options.ns.push(r)}),e.loadLanguages(t,Nfe(e,i))},g5e=(e,t,n={})=>!t.languages||!t.languages.length?(My(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,e))return!1}}),hl=e=>typeof e=="string",Wf=e=>typeof e=="object"&&e!==null,b5e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,y5e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},v5e=e=>y5e[e],jfe=e=>e.replace(b5e,v5e);let VL={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:jfe,transDefaultProps:void 0};const x5e=(e={})=>{VL={...VL,...e}},W8=()=>VL;let Rfe;const O5e=e=>{Rfe=e},K8=()=>Rfe,w2=(e,t)=>{var i;if(!e)return!1;const n=((i=e.props)==null?void 0:i.children)??e.children;return t?n.length>0:!!n},bO=e=>{var n,i;if(!e)return[];const t=((n=e.props)==null?void 0:n.children)??e.children;return(i=e.props)!=null&&i.i18nIsDynamicList?Ep(t):t},w5e=e=>Array.isArray(e)&&e.every(m.isValidElement),Ep=e=>Array.isArray(e)?e:[e],S5e=(e,t)=>{const n={...t};return n.props={...t.props,...e.props},n},k5e=e=>{const t={};if(!e)return t;const n=i=>{Ep(i).forEach(s=>{hl(s)||(w2(s)?n(bO(s)):Wf(s)&&!m.isValidElement(s)&&Object.assign(t,s))})};return n(e),t},HL=(e,t,n,i)=>{if(!e)return"";let r="";const s=Ep(e),a=t!=null&&t.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return s.forEach((l,c)=>{if(hl(l)){r+=`${l}`;return}if(m.isValidElement(l)){const{props:u,type:d}=l,f=Object.keys(u).length,h=a.indexOf(d)>-1,p=u.children;if(!p&&h&&!f){r+=`<${d}/>`;return}if(!p&&(!h||f)||u.i18nIsDynamicList){r+=`<${c}>`;return}if(h&&f<=1){const b=hl(p)?p:HL(p,t,n,i);r+=`<${d}>${b}`;return}const g=HL(p,t,n,i);r+=`<${c}>${g}`;return}if(l===null){O2(n,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:i});return}if(Wf(l)){const{format:u,...d}=l,f=Object.keys(d);if(f.length===1){const h=u?`${f[0]}, ${u}`:f[0];r+=`{{${h}}}`;return}O2(n,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:i,child:l});return}O2(n,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:i,child:l})}),r},E5e=(e,t,n,i,r,s,a)=>{if(n==="")return[];const l=r.transKeepBasicHtmlNodesFor||[],c=n&&new RegExp(l.map(w=>`<${w}`).join("|")).test(n);if(!e&&!t&&!c&&!a)return[n];const u=t??{},d=w=>{Ep(w).forEach(k=>{hl(k)||(w2(k)?d(bO(k)):Wf(k)&&!m.isValidElement(k)&&Object.assign(u,k))})};d(e);const f=Object.keys(u),h=w=>/^\d+$/.test(w)||l.indexOf(w)>-1||f.indexOf(w)>-1,p=m5e.parse(`<0>${n}`,{allowedTags:h}),g={...u,...s},b=(w,O,k)=>{var C;const S=bO(w),E=y(S,O.children,k);return w5e(S)&&E.length===0||(C=w.props)!=null&&C.i18nIsDynamicList?S:E},v=(w,O,k,S,E)=>{w.dummy?(w.children=O,k.push(m.cloneElement(w,{key:S},E?void 0:O))):k.push(...m.Children.map([w],C=>{var _;if(C.type===m.Fragment||((_=C.props)==null?void 0:_.i18nIsDynamicList)!==void 0){const j={key:S};return C&&C.props&&Object.keys(C.props).forEach(T=>{T==="children"||T==="i18nIsDynamicList"||(j[T]=C.props[T])}),m.createElement(C.type,j,E?null:O)}const N={key:S};return C&&C.props&&Object.keys(C.props).forEach(j=>{j==="ref"||j==="children"||(N[j]=C.props[j])}),m.cloneElement(C,N,E?null:O)}))},y=(w,O,k)=>{const S=Ep(w),E=Ep(O),C={};return E.reduce((N,_,j)=>{var L,A;const T=((A=(L=_.children)==null?void 0:L[0])==null?void 0:A.content)&&i.services.interpolator.interpolate(_.children[0].content,g,i.language);if(_.type==="tag"){let R=S[parseInt(_.name,10)];!R&&t&&(R=t[_.name]),k.length===1&&!R&&(R=k[0][_.name]),R||(R={});const P={..._.attrs};a&&Object.keys(P).forEach(X=>{const Q=P[X];hl(Q)&&(P[X]=jfe(Q))});const $=Object.keys(P).length!==0?S5e({props:P},R):R,M=m.isValidElement($),B=M&&w2(_,!0)&&!_.voidElement,I=c&&Wf($)&&$.dummy&&!M,H=Wf(t)&&Object.hasOwnProperty.call(t,_.name);if(hl($)){const X=i.services.interpolator.interpolate($,g,i.language);N.push(X)}else if(w2($)||B){const X=b($,_,k);v($,X,N,j)}else if(I){const X=y(S,_.children,k);v($,X,N,j)}else if(Number.isNaN(parseFloat(_.name)))if(H){const X=b($,_,k);v($,X,N,j,_.voidElement)}else if(r.transSupportBasicHtmlNodes&&l.indexOf(_.name)>-1)if(_.voidElement)N.push(m.createElement(_.name,{key:`${_.name}-${j}`}));else{const X=C[_.name]||0;C[_.name]=X+1;let Q,q=0;for(let le=0;le`);else{const X=y(S,_.children,k);N.push(`<${_.name}>${X}`)}else if(Wf($)&&!M){const X=_.children[0]?T:null;X&&N.push(X)}else v($,T,N,j,_.children.length!==1||!T)}else if(_.type==="text"){const R=r.transWrapTextNodes,P=typeof r.unescape=="function"?r.unescape:W8().unescape,$=a?P(i.services.interpolator.interpolate(_.content,g,i.language)):i.services.interpolator.interpolate(_.content,g,i.language);R?N.push(m.createElement(R,{key:`${_.name}-${j}`},$)):N.push($)}return N},[])},x=y([{dummy:!0,children:e||[]}],p,Ep(e||[]));return bO(x[0])},Ife=(e,t,n)=>{const i=e.key||t,r=m.cloneElement(e,{key:i});if(!r.props||!r.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return r;function s(){return m.createElement(m.Fragment,null,r)}return m.createElement(s,{key:i})},C5e=(e,t)=>e.map((n,i)=>Ife(n,i,t)),T5e=(e,t)=>{const n={};return Object.keys(e).forEach(i=>{Object.assign(n,{[i]:Ife(e[i],i,t)})}),n},A5e=(e,t,n,i)=>e?Array.isArray(e)?C5e(e,t):Wf(e)?T5e(e,t):(My(n,"TRANS_INVALID_COMPONENTS",' "components" prop expects an object or array',{i18nKey:i}),null):null,_5e=e=>!Wf(e)||Array.isArray(e)?!1:Object.keys(e).reduce((t,n)=>t&&Number.isNaN(Number.parseFloat(n)),!0);function N5e({children:e,count:t,parent:n,i18nKey:i,context:r,tOptions:s={},values:a,defaults:l,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...p}){var I,H,X,Q,q,U;const g=d||K8();if(!g)return My(g,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.",{i18nKey:i}),e;const b=f||g.t.bind(g)||(te=>te),v={...W8(),...(I=g.options)==null?void 0:I.react};let y=u||b.ns||((H=g.options)==null?void 0:H.defaultNS);y=hl(y)?[y]:y||["translation"];const{transDefaultProps:x}=v,w=x!=null&&x.tOptions?{...x.tOptions,...s}:s,O=h??(x==null?void 0:x.shouldUnescape),k=x!=null&&x.values?{...x.values,...a}:a,S=x!=null&&x.components?{...x.components,...c}:c,E=HL(e,v,g,i),C=l||(w==null?void 0:w.defaultValue)||E||v.transEmptyNodeValue||(typeof i=="function"?Hg(i):i),{hashTransKey:N}=v,_=i||(N?N(E||C):E||C);(Q=(X=g.options)==null?void 0:X.interpolation)!=null&&Q.defaultVariables?a=k&&Object.keys(k).length>0?{...k,...g.options.interpolation.defaultVariables}:{...g.options.interpolation.defaultVariables}:a=k;const j=k5e(e);j&&typeof j.count=="number"&&t===void 0&&(t=j.count);const T=a||t!==void 0&&!((U=(q=g.options)==null?void 0:q.interpolation)!=null&&U.alwaysFormat)||!e?w.interpolation:{interpolation:{...w.interpolation,prefix:"#$?",suffix:"?$#"}},L={...w,context:r||w.context,count:t,...a,...T,defaultValue:C,ns:y};let A=_?b(_,L):C;A===_&&C&&(A=C);const R=A5e(S,A,g,i);let P=R||e,$=null;_5e(R)&&($=R,P=e);const M=E5e(P,$,A,g,v,L,O),B=n??v.defaultTransParent;return B?m.createElement(B,p,M):M}const j5e={type:"3rdParty",init(e){x5e(e.options.react),O5e(e)}},Pfe=m.createContext();class R5e{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function BA({children:e,count:t,parent:n,i18nKey:i,context:r,tOptions:s={},values:a,defaults:l,components:c,ns:u,i18n:d,t:f,shouldUnescape:h,...p}){var x;const{i18n:g,defaultNS:b}=m.useContext(Pfe)||{},v=d||g||K8(),y=f||(v==null?void 0:v.t.bind(v));return N5e({children:e,count:t,parent:n,i18nKey:i,context:r,tOptions:s,values:a,defaults:l,components:c,ns:u||(y==null?void 0:y.ns)||b||((x=v==null?void 0:v.options)==null?void 0:x.defaultNS),i18n:v,t:f,shouldUnescape:h,...p})}var Dfe={exports:{}},Mfe={};/** * @license React * use-sync-external-store-shim.production.js * @@ -59,7 +59,7 @@ Studio:{{studioUrl}} * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var wv=m;function R5e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var I5e=typeof Object.is=="function"?Object.is:R5e,P5e=wv.useState,D5e=wv.useEffect,M5e=wv.useLayoutEffect,L5e=wv.useDebugValue;function $5e(e,t){var n=t(),i=P5e({inst:{value:n,getSnapshot:t}}),r=i[0].inst,s=i[1];return M5e(function(){r.value=n,r.getSnapshot=t,NP(r)&&s({inst:r})},[e,n,t]),D5e(function(){return NP(r)&&s({inst:r}),e(function(){NP(r)&&s({inst:r})})},[e]),L5e(n),n}function NP(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!I5e(e,n)}catch{return!0}}function F5e(e,t){return t()}var B5e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?F5e:$5e;Lfe.useSyncExternalStore=wv.useSyncExternalStore!==void 0?wv.useSyncExternalStore:B5e;Mfe.exports=Lfe;var $fe=Mfe.exports;const U5e=(e,t)=>{if(pl(t))return t;if(Yf(t)&&pl(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},Q5e={t:U5e,ready:!1},z5e=()=>()=>{},Oe=(e,t={})=>{var N,_,j;const{i18n:n}=t,{i18n:i,defaultNS:r}=m.useContext(Dfe)||{},s=n||i||G8();s&&!s.reportNamespaces&&(s.reportNamespaces=new j5e),s||By(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const a=m.useMemo(()=>{var T;return{...K8(),...(T=s==null?void 0:s.options)==null?void 0:T.react,...t}},[s,t]),{useSuspense:l,keyPrefix:c}=a,u=e||r||((N=s==null?void 0:s.options)==null?void 0:N.defaultNS),d=pl(u)?[u]:u||["translation"],f=m.useMemo(()=>d,d);(j=(_=s==null?void 0:s.reportNamespaces)==null?void 0:_.addUsedNamespaces)==null||j.call(_,f);const h=m.useRef(0),p=m.useCallback(T=>{if(!s)return z5e;const{bindI18n:L,bindI18nStore:A}=a,R=()=>{h.current+=1,T()};return L&&s.on(L,R),A&&s.store.on(A,R),()=>{L&&L.split(" ").forEach(P=>s.off(P,R)),A&&A.split(" ").forEach(P=>s.store.off(P,R))}},[s,a]),g=m.useRef(),b=m.useCallback(()=>{if(!s)return Q5e;const T=!!(s.isInitialized||s.initializedStoreOnce)&&f.every(M=>m5e(M,s,a)),L=t.lng||s.language,A=h.current,R=g.current;if(R&&R.ready===T&&R.lng===L&&R.keyPrefix===c&&R.revision===A)return R;const $={t:s.getFixedT(L,a.nsMode==="fallback"?f:f[0],c,{scopeNs:f}),ready:T,lng:L,keyPrefix:c,revision:A};return g.current=$,$},[s,f,c,a,t.lng]),[v,y]=m.useState(0),{t:x,ready:w}=$fe.useSyncExternalStore(p,b,b);m.useEffect(()=>{if(s&&!w&&!l){const T=()=>y(L=>L+1);t.lng?CV(s,t.lng,f,T):HL(s,f,T)}},[s,t.lng,f,w,l,v]);const O=s||{},k=m.useRef(null),S=m.useRef(),E=T=>{const L=Object.getOwnPropertyDescriptors(T);L.__original&&delete L.__original;const A=Object.create(Object.getPrototypeOf(T),L);if(!Object.prototype.hasOwnProperty.call(A,"__original"))try{Object.defineProperty(A,"__original",{value:T,writable:!1,enumerable:!1,configurable:!1})}catch{}return A},C=m.useMemo(()=>{const T=O,L=T==null?void 0:T.language;let A=T;T&&(k.current&&k.current.__original===T?S.current!==L?(A=E(T),k.current=A,S.current=L):A=k.current:(A=E(T),k.current=A,S.current=L));const R=!w&&!l?(...$)=>(By(s,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),x(...$)):x,P=[R,A,w];return P.t=R,P.i18n=A,P.ready=w,P},[x,O,w,O.resolvedLanguage,O.language,O.languages]);if(s&&l&&!w){let T=!1;try{T=!1}catch{}throw T&&By(s,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),new Promise(L=>{const A=()=>L();t.lng?CV(s,t.lng,f,A):HL(s,f,A)})}return C},Ffe=wMe(),Zt=zo.createInstance();Zt.use(N5e).init({resources:{"en-US":{adk:sre,app:Ore,conversation:Yre},"zh-CN":{adk:wle,app:$le,conversation:pce}},lng:Ffe,fallbackLng:pj,supportedLngs:[...Q8],defaultNS:"common",interpolation:{escapeValue:!1},initAsync:!1});yfe(Ffe);Zt.on("languageChanged",e=>{const t=mj(e)??pj;yfe(t)});const V5e=Object.assign({"./resources/en-US/adk.json":SDe,"./resources/en-US/app.json":kDe,"./resources/en-US/automations.json":EDe,"./resources/en-US/common.json":TDe,"./resources/en-US/conversation.json":ADe,"./resources/en-US/create.json":_De,"./resources/en-US/cronjobs.json":jDe,"./resources/en-US/feedback.json":IDe,"./resources/en-US/migrations.json":DDe,"./resources/en-US/newChat.json":MDe,"./resources/en-US/sandbox.json":LDe,"./resources/en-US/shell.json":FDe,"./resources/en-US/sidebar.json":UDe,"./resources/en-US/skills.json":QDe,"./resources/en-US/ui.json":VDe,"./resources/en-US/websiteIntegration.json":qDe,"./resources/en-US/workspaceTools.json":WDe,"./resources/zh-CN/adk.json":KDe,"./resources/zh-CN/app.json":GDe,"./resources/zh-CN/automations.json":XDe,"./resources/zh-CN/common.json":ZDe,"./resources/zh-CN/conversation.json":JDe,"./resources/zh-CN/create.json":eMe,"./resources/zh-CN/cronjobs.json":nMe,"./resources/zh-CN/feedback.json":rMe,"./resources/zh-CN/migrations.json":aMe,"./resources/zh-CN/newChat.json":oMe,"./resources/zh-CN/sandbox.json":lMe,"./resources/zh-CN/shell.json":uMe,"./resources/zh-CN/sidebar.json":fMe,"./resources/zh-CN/skills.json":hMe,"./resources/zh-CN/ui.json":mMe,"./resources/zh-CN/websiteIntegration.json":bMe,"./resources/zh-CN/workspaceTools.json":yMe});function H5e(){const e={};for(const[t,n]of Object.entries(V5e)){const i=t.match(/\/resources\/([^/]+)\/([^/]+)\.json$/);if(!i)continue;const[,r,s]=i;e[r]??(e[r]={}),e[r][s]=n.default}return e}for(const[e,t]of Object.entries(H5e()))for(const[n,i]of Object.entries(t??{}))Zt.addResourceBundle(e,n,i,!0,!0);async function q5e(e){SMe(e),await Zt.changeLanguage(e)}var Bfe={exports:{}},bj={},Ufe={exports:{}},Qfe={};/** + */var yv=m;function I5e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var P5e=typeof Object.is=="function"?Object.is:I5e,D5e=yv.useState,M5e=yv.useEffect,L5e=yv.useLayoutEffect,$5e=yv.useDebugValue;function F5e(e,t){var n=t(),i=D5e({inst:{value:n,getSnapshot:t}}),r=i[0].inst,s=i[1];return L5e(function(){r.value=n,r.getSnapshot=t,AP(r)&&s({inst:r})},[e,n,t]),M5e(function(){return AP(r)&&s({inst:r}),e(function(){AP(r)&&s({inst:r})})},[e]),$5e(n),n}function AP(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!P5e(e,n)}catch{return!0}}function B5e(e,t){return t()}var U5e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?B5e:F5e;Mfe.useSyncExternalStore=yv.useSyncExternalStore!==void 0?yv.useSyncExternalStore:U5e;Dfe.exports=Mfe;var Lfe=Dfe.exports;const Q5e=(e,t)=>{if(hl(t))return t;if(Wf(t)&&hl(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},z5e={t:Q5e,ready:!1},V5e=()=>()=>{},xe=(e,t={})=>{var N,_,j;const{i18n:n}=t,{i18n:i,defaultNS:r}=m.useContext(Pfe)||{},s=n||i||K8();s&&!s.reportNamespaces&&(s.reportNamespaces=new R5e),s||My(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const a=m.useMemo(()=>{var T;return{...W8(),...(T=s==null?void 0:s.options)==null?void 0:T.react,...t}},[s,t]),{useSuspense:l,keyPrefix:c}=a,u=e||r||((N=s==null?void 0:s.options)==null?void 0:N.defaultNS),d=hl(u)?[u]:u||["translation"],f=m.useMemo(()=>d,d);(j=(_=s==null?void 0:s.reportNamespaces)==null?void 0:_.addUsedNamespaces)==null||j.call(_,f);const h=m.useRef(0),p=m.useCallback(T=>{if(!s)return V5e;const{bindI18n:L,bindI18nStore:A}=a,R=()=>{h.current+=1,T()};return L&&s.on(L,R),A&&s.store.on(A,R),()=>{L&&L.split(" ").forEach(P=>s.off(P,R)),A&&A.split(" ").forEach(P=>s.store.off(P,R))}},[s,a]),g=m.useRef(),b=m.useCallback(()=>{if(!s)return z5e;const T=!!(s.isInitialized||s.initializedStoreOnce)&&f.every(M=>g5e(M,s,a)),L=t.lng||s.language,A=h.current,R=g.current;if(R&&R.ready===T&&R.lng===L&&R.keyPrefix===c&&R.revision===A)return R;const $={t:s.getFixedT(L,a.nsMode==="fallback"?f:f[0],c,{scopeNs:f}),ready:T,lng:L,keyPrefix:c,revision:A};return g.current=$,$},[s,f,c,a,t.lng]),[v,y]=m.useState(0),{t:x,ready:w}=Lfe.useSyncExternalStore(p,b,b);m.useEffect(()=>{if(s&&!w&&!l){const T=()=>y(L=>L+1);t.lng?kV(s,t.lng,f,T):zL(s,f,T)}},[s,t.lng,f,w,l,v]);const O=s||{},k=m.useRef(null),S=m.useRef(),E=T=>{const L=Object.getOwnPropertyDescriptors(T);L.__original&&delete L.__original;const A=Object.create(Object.getPrototypeOf(T),L);if(!Object.prototype.hasOwnProperty.call(A,"__original"))try{Object.defineProperty(A,"__original",{value:T,writable:!1,enumerable:!1,configurable:!1})}catch{}return A},C=m.useMemo(()=>{const T=O,L=T==null?void 0:T.language;let A=T;T&&(k.current&&k.current.__original===T?S.current!==L?(A=E(T),k.current=A,S.current=L):A=k.current:(A=E(T),k.current=A,S.current=L));const R=!w&&!l?(...$)=>(My(s,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),x(...$)):x,P=[R,A,w];return P.t=R,P.i18n=A,P.ready=w,P},[x,O,w,O.resolvedLanguage,O.language,O.languages]);if(s&&l&&!w){let T=!1;try{T=!1}catch{}throw T&&My(s,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),new Promise(L=>{const A=()=>L();t.lng?kV(s,t.lng,f,A):zL(s,f,A)})}return C},$fe=SMe(),Zt=Qo.createInstance();Zt.use(j5e).init({resources:{"en-US":{adk:rre,app:xre,conversation:Xre},"zh-CN":{adk:Ole,app:Lle,conversation:hce}},lng:$fe,fallbackLng:dj,supportedLngs:[...U8],defaultNS:"common",interpolation:{escapeValue:!1},initAsync:!1});bfe($fe);Zt.on("languageChanged",e=>{const t=fj(e)??dj;bfe(t)});const H5e=Object.assign({"./resources/en-US/adk.json":kDe,"./resources/en-US/app.json":EDe,"./resources/en-US/automations.json":CDe,"./resources/en-US/common.json":ADe,"./resources/en-US/conversation.json":_De,"./resources/en-US/create.json":NDe,"./resources/en-US/cronjobs.json":RDe,"./resources/en-US/feedback.json":PDe,"./resources/en-US/migrations.json":MDe,"./resources/en-US/newChat.json":LDe,"./resources/en-US/sandbox.json":$De,"./resources/en-US/shell.json":BDe,"./resources/en-US/sidebar.json":QDe,"./resources/en-US/skills.json":zDe,"./resources/en-US/ui.json":HDe,"./resources/en-US/websiteIntegration.json":WDe,"./resources/en-US/workspaceTools.json":KDe,"./resources/zh-CN/adk.json":GDe,"./resources/zh-CN/app.json":XDe,"./resources/zh-CN/automations.json":YDe,"./resources/zh-CN/common.json":JDe,"./resources/zh-CN/conversation.json":eMe,"./resources/zh-CN/create.json":tMe,"./resources/zh-CN/cronjobs.json":iMe,"./resources/zh-CN/feedback.json":sMe,"./resources/zh-CN/migrations.json":oMe,"./resources/zh-CN/newChat.json":lMe,"./resources/zh-CN/sandbox.json":cMe,"./resources/zh-CN/shell.json":dMe,"./resources/zh-CN/sidebar.json":hMe,"./resources/zh-CN/skills.json":pMe,"./resources/zh-CN/ui.json":gMe,"./resources/zh-CN/websiteIntegration.json":yMe,"./resources/zh-CN/workspaceTools.json":vMe});function q5e(){const e={};for(const[t,n]of Object.entries(H5e)){const i=t.match(/\/resources\/([^/]+)\/([^/]+)\.json$/);if(!i)continue;const[,r,s]=i;e[r]??(e[r]={}),e[r][s]=n.default}return e}for(const[e,t]of Object.entries(q5e()))for(const[n,i]of Object.entries(t??{}))Zt.addResourceBundle(e,n,i,!0,!0);async function W5e(e){kMe(e),await Zt.changeLanguage(e)}var Ffe={exports:{}},pj={},Bfe={exports:{}},Ufe={};/** * @license React * scheduler.production.js * @@ -67,7 +67,7 @@ Studio:{{studioUrl}} * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(P,$){var M=P.length;P.push($);e:for(;0>>1,I=P[B];if(0>>1;Br(Q,M))qr(U,Q)?(P[B]=U,P[q]=M,B=q):(P[B]=Q,P[X]=M,B=X);else if(qr(U,M))P[B]=U,P[q]=M,B=q;else break e}}return $}function r(P,$){var M=P.sortIndex-$.sortIndex;return M!==0?M:P.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,f=null,h=3,p=!1,g=!1,b=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function O(P){for(var $=n(u);$!==null;){if($.callback===null)i(u);else if($.startTime<=P)i(u),$.sortIndex=$.expirationTime,t(c,$);else break;$=n(u)}}function k(P){if(b=!1,O(P),!g)if(n(c)!==null)g=!0,S||(S=!0,T());else{var $=n(u);$!==null&&R(k,$.startTime-P)}}var S=!1,E=-1,C=5,N=-1;function _(){return v?!0:!(e.unstable_now()-NP&&_());){var B=f.callback;if(typeof B=="function"){f.callback=null,h=f.priorityLevel;var I=B(f.expirationTime<=P);if(P=e.unstable_now(),typeof I=="function"){f.callback=I,O(P),$=!0;break t}f===n(c)&&i(c),O(P)}else i(c);f=n(c)}if(f!==null)$=!0;else{var H=n(u);H!==null&&R(k,H.startTime-P),$=!1}}break e}finally{f=null,h=M,p=!1}$=void 0}}finally{$?T():S=!1}}}var T;if(typeof w=="function")T=function(){w(j)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,A=L.port2;L.port1.onmessage=j,T=function(){A.postMessage(null)}}else T=function(){y(j,0)};function R(P,$){E=y(function(){P(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125B?(P.sortIndex=M,t(u,P),n(c)===null&&P===n(u)&&(b?(x(E),E=-1):b=!0,R(k,M-B))):(P.sortIndex=I,t(c,P),g||p||(g=!0,S||(S=!0,T()))),P},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(P){var $=h;return function(){var M=h;h=$;try{return P.apply(this,arguments)}finally{h=M}}}})(Qfe);Ufe.exports=Qfe;var W5e=Ufe.exports,zfe={exports:{}},Vo={};/** + */(function(e){function t(P,$){var M=P.length;P.push($);e:for(;0>>1,I=P[B];if(0>>1;Br(Q,M))qr(U,Q)?(P[B]=U,P[q]=M,B=q):(P[B]=Q,P[X]=M,B=X);else if(qr(U,M))P[B]=U,P[q]=M,B=q;else break e}}return $}function r(P,$){var M=P.sortIndex-$.sortIndex;return M!==0?M:P.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,f=null,h=3,p=!1,g=!1,b=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function O(P){for(var $=n(u);$!==null;){if($.callback===null)i(u);else if($.startTime<=P)i(u),$.sortIndex=$.expirationTime,t(c,$);else break;$=n(u)}}function k(P){if(b=!1,O(P),!g)if(n(c)!==null)g=!0,S||(S=!0,T());else{var $=n(u);$!==null&&R(k,$.startTime-P)}}var S=!1,E=-1,C=5,N=-1;function _(){return v?!0:!(e.unstable_now()-NP&&_());){var B=f.callback;if(typeof B=="function"){f.callback=null,h=f.priorityLevel;var I=B(f.expirationTime<=P);if(P=e.unstable_now(),typeof I=="function"){f.callback=I,O(P),$=!0;break t}f===n(c)&&i(c),O(P)}else i(c);f=n(c)}if(f!==null)$=!0;else{var H=n(u);H!==null&&R(k,H.startTime-P),$=!1}}break e}finally{f=null,h=M,p=!1}$=void 0}}finally{$?T():S=!1}}}var T;if(typeof w=="function")T=function(){w(j)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,A=L.port2;L.port1.onmessage=j,T=function(){A.postMessage(null)}}else T=function(){y(j,0)};function R(P,$){E=y(function(){P(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125B?(P.sortIndex=M,t(u,P),n(c)===null&&P===n(u)&&(b?(x(E),E=-1):b=!0,R(k,M-B))):(P.sortIndex=I,t(c,P),g||p||(g=!0,S||(S=!0,T()))),P},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(P){var $=h;return function(){var M=h;h=$;try{return P.apply(this,arguments)}finally{h=M}}}})(Ufe);Bfe.exports=Ufe;var K5e=Bfe.exports,Qfe={exports:{}},zo={};/** * @license React * react-dom.production.js * @@ -75,7 +75,7 @@ Studio:{{studioUrl}} * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var K5e=m;function Vfe(e){var t="https://react.dev/errors/"+e;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hfe)}catch(e){console.error(e)}}Hfe(),zfe.exports=Vo;var Fi=zfe.exports;/** + */var G5e=m;function zfe(e){var t="https://react.dev/errors/"+e;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vfe)}catch(e){console.error(e)}}Vfe(),Qfe.exports=zo;var $i=Qfe.exports;/** * @license React * react-dom-client.production.js * @@ -83,15 +83,15 @@ Studio:{{studioUrl}} * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ba=W5e,qfe=m,Y5e=Fi;function lt(e){var t="https://react.dev/errors/"+e;if(1dy||(e.current=JL[dy],JL[dy]=null,dy--)}function Lr(e,t){dy++,JL[dy]=e.current,e.current=t}var Ld=Gd(null),Gw=Gd(null),Xp=Gd(null),VA=Gd(null);function HA(e,t){switch(Lr(Xp,t),Lr(Gw,e),Lr(Ld,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?PH(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=PH(t),e=yme(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ra(Ld),Lr(Ld,e)}function Sv(){Ra(Ld),Ra(Gw),Ra(Xp)}function e3(e){e.memoizedState!==null&&Lr(VA,e);var t=Ld.current,n=yme(t,e.type);t!==n&&(Lr(Gw,e),Lr(Ld,n))}function qA(e){Gw.current===e&&(Ra(Ld),Ra(Gw)),VA.current===e&&(Ra(VA),aS._currentValue=Gg)}var jP,_V;function mg(e){if(jP===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);jP=t&&t[1]||"",_V=-1oy||(e.current=YL[oy],YL[oy]=null,oy--)}function Mr(e,t){oy++,YL[oy]=e.current,e.current=t}var Dd=Wd(null),Vw=Wd(null),Hp=Wd(null),UA=Wd(null);function QA(e,t){switch(Mr(Hp,t),Mr(Vw,e),Mr(Dd,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?RH(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=RH(t),e=bme(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ja(Dd),Mr(Dd,e)}function vv(){ja(Dd),ja(Vw),ja(Hp)}function ZL(e){e.memoizedState!==null&&Mr(UA,e);var t=Dd.current,n=bme(t,e.type);t!==n&&(Mr(Vw,e),Mr(Dd,n))}function zA(e){Vw.current===e&&(ja(Dd),ja(Vw)),UA.current===e&&(ja(UA),tS._currentValue=qg)}var _P,TV;function dg(e){if(_P===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_P=t&&t[1]||"",TV=-1)":-1r||c[i]!==u[r]){var d=` -`+c[i].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=i&&0<=r);break}}}finally{RP=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?mg(n):""}function nLe(e,t){switch(e.tag){case 26:case 27:case 5:return mg(e.type);case 16:return mg("Lazy");case 13:return e.child!==t&&t!==null?mg("Suspense Fallback"):mg("Suspense");case 19:return mg("SuspenseList");case 0:case 15:return IP(e.type,!1);case 11:return IP(e.type.render,!1);case 1:return IP(e.type,!0);case 31:return mg("Activity");default:return""}}function NV(e){try{var t="",n=null;do t+=nLe(e,n),n=e,e=e.return;while(e);return t}catch(i){return` +`+c[i].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=i&&0<=r);break}}}finally{NP=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?dg(n):""}function iLe(e,t){switch(e.tag){case 26:case 27:case 5:return dg(e.type);case 16:return dg("Lazy");case 13:return e.child!==t&&t!==null?dg("Suspense Fallback"):dg("Suspense");case 19:return dg("SuspenseList");case 0:case 15:return jP(e.type,!1);case 11:return jP(e.type.render,!1);case 1:return jP(e.type,!0);case 31:return dg("Activity");default:return""}}function AV(e){try{var t="",n=null;do t+=iLe(e,n),n=e,e=e.return;while(e);return t}catch(i){return` Error generating stack: `+i.message+` -`+i.stack}}var t3=Object.prototype.hasOwnProperty,Z8=ba.unstable_scheduleCallback,PP=ba.unstable_cancelCallback,iLe=ba.unstable_shouldYield,rLe=ba.unstable_requestPaint,ec=ba.unstable_now,sLe=ba.unstable_getCurrentPriorityLevel,Jfe=ba.unstable_ImmediatePriority,ehe=ba.unstable_UserBlockingPriority,WA=ba.unstable_NormalPriority,aLe=ba.unstable_LowPriority,the=ba.unstable_IdlePriority,oLe=ba.log,lLe=ba.unstable_setDisableYieldValue,kk=null,tc=null;function Fp(e){if(typeof oLe=="function"&&lLe(e),tc&&typeof tc.setStrictMode=="function")try{tc.setStrictMode(kk,e)}catch{}}var nc=Math.clz32?Math.clz32:dLe,cLe=Math.log,uLe=Math.LN2;function dLe(e){return e>>>=0,e===0?32:31-(cLe(e)/uLe|0)|0}var AC=256,_C=262144,NC=4194304;function gg(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function vj(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var r=0,s=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var l=i&134217727;return l!==0?(i=l&~s,i!==0?r=gg(i):(a&=l,a!==0?r=gg(a):n||(n=l&~e,n!==0&&(r=gg(n))))):(l=i&~s,l!==0?r=gg(l):a!==0?r=gg(a):n||(n=i&~e,n!==0&&(r=gg(n)))),r===0?0:t!==0&&t!==r&&!(t&s)&&(s=r&-r,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:r}function Ek(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function fLe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nhe(){var e=NC;return NC<<=1,!(NC&62914560)&&(NC=4194304),e}function DP(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ck(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function hLe(e,t,n,i,r,s){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=a&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var vLe=/[\n"\\]/g;function Fc(e){return e.replace(vLe,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function r3(e,t,n,i,r,s,a,l){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Pc(t)):e.value!==""+Pc(t)&&(e.value=""+Pc(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?s3(e,a,Pc(t)):n!=null?s3(e,a,Pc(n)):i!=null&&e.removeAttribute("value"),r==null&&s!=null&&(e.defaultChecked=!!s),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+Pc(l):e.removeAttribute("name")}function dhe(e,t,n,i,r,s,a,l){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){i3(e);return}n=n!=null?""+Pc(n):"",t=t!=null?""+Pc(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=l?e.checked:!!i,e.defaultChecked=!!i,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),i3(e)}function s3(e,t,n){t==="number"&&KA(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Qy(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),o3=!1;if(Oh)try{var N1={};Object.defineProperty(N1,"passive",{get:function(){o3=!0}}),window.addEventListener("test",N1,N1),window.removeEventListener("test",N1,N1)}catch{o3=!1}var Bp=null,r9=null,A2=null;function ghe(){if(A2)return A2;var e,t=r9,n=t.length,i,r="value"in Bp?Bp.value:Bp.textContent,s=r.length;for(e=0;e=ew),UV=" ",QV=!1;function yhe(e,t){switch(e){case"keyup":return WLe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vhe(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var py=!1;function GLe(e,t){switch(e){case"compositionend":return vhe(t);case"keypress":return t.which!==32?null:(QV=!0,UV);case"textInput":return e=t.data,e===UV&&QV?null:e;default:return null}}function XLe(e,t){if(py)return e==="compositionend"||!a9&&yhe(e,t)?(e=ghe(),A2=r9=Bp=null,py=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=WV(n)}}function She(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?She(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function khe(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=KA(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=KA(e.document)}return t}function o9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var r3e=Oh&&"documentMode"in document&&11>=document.documentMode,my=null,l3=null,nw=null,c3=!1;function GV(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;c3||my==null||my!==KA(i)||(i=my,"selectionStart"in i&&o9(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),nw&&Zw(nw,i)||(nw=i,i=f_(l3,"onSelect"),0>=a,r-=a,Td=1<<32-nc(t)+r|n<C?(N=E,E=null):N=E.sibling;var _=h(y,E,w[C],O);if(_===null){E===null&&(E=N);break}e&&E&&_.alternate===null&&t(y,E),x=s(_,x,C),S===null?k=_:S.sibling=_,S=_,E=N}if(C===w.length)return n(y,E),$i&&Bf(y,C),k;if(E===null){for(;CC?(N=E,E=null):N=E.sibling;var j=h(y,E,_.value,O);if(j===null){E===null&&(E=N);break}e&&E&&j.alternate===null&&t(y,E),x=s(j,x,C),S===null?k=j:S.sibling=j,S=j,E=N}if(_.done)return n(y,E),$i&&Bf(y,C),k;if(E===null){for(;!_.done;C++,_=w.next())_=f(y,_.value,O),_!==null&&(x=s(_,x,C),S===null?k=_:S.sibling=_,S=_);return $i&&Bf(y,C),k}for(E=i(E);!_.done;C++,_=w.next())_=p(E,y,C,_.value,O),_!==null&&(e&&_.alternate!==null&&E.delete(_.key===null?C:_.key),x=s(_,x,C),S===null?k=_:S.sibling=_,S=_);return e&&E.forEach(function(T){return t(y,T)}),$i&&Bf(y,C),k}function v(y,x,w,O){if(typeof w=="object"&&w!==null&&w.type===uy&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case TC:e:{for(var k=w.key;x!==null;){if(x.key===k){if(k=w.type,k===uy){if(x.tag===7){n(y,x.sibling),O=r(x,w.props.children),O.return=y,y=O;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kp&&bg(k)===x.type){n(y,x.sibling),O=r(x,w.props),R1(O,w),O.return=y,y=O;break e}n(y,x);break}else t(y,x);x=x.sibling}w.type===uy?(O=Xg(w.props.children,y.mode,O,w.key),O.return=y,y=O):(O=N2(w.type,w.key,w.props,null,y.mode,O),R1(O,w),O.return=y,y=O)}return a(y);case SO:e:{for(k=w.key;x!==null;){if(x.key===k)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(y,x.sibling),O=r(x,w.children||[]),O.return=y,y=O;break e}else{n(y,x);break}else t(y,x);x=x.sibling}O=VP(w,y.mode,O),O.return=y,y=O}return a(y);case kp:return w=bg(w),v(y,x,w,O)}if(kO(w))return g(y,x,w,O);if(_1(w)){if(k=_1(w),typeof k!="function")throw Error(lt(150));return w=k.call(w),b(y,x,w,O)}if(typeof w.then=="function")return v(y,x,PC(w),O);if(w.$$typeof===Zf)return v(y,x,IC(y,w),O);DC(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,x!==null&&x.tag===6?(n(y,x.sibling),O=r(x,w),O.return=y,y=O):(n(y,x),O=zP(w,y.mode,O),O.return=y,y=O),a(y)):n(y,x)}return function(y,x,w,O){try{tS=0;var k=v(y,x,w,O);return Hy=null,k}catch(E){if(E===vx||E===Ej)throw E;var S=Kl(29,E,null,y.mode);return S.lanes=O,S.return=y,S}finally{}}}var fb=Fhe(!0),Bhe=Fhe(!1),Ep=!1;function g9(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function g3(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Zp(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Jp(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,nr&2){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=XA(e),jhe(e,null,n),t}return kj(e,i,t,n),XA(e)}function rw(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,rhe(e,n)}}function qP(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?r=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?r=s=t:s=s.next=t}else r=s=t;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var b3=!1;function sw(){if(b3){var e=Vy;if(e!==null)throw e}}function aw(e,t,n,i){b3=!1;var r=e.updateQueue;Ep=!1;var s=r.firstBaseUpdate,a=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?s=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(s!==null){var f=r.baseState;a=0,d=u=c=null,l=s;do{var h=l.lane&-536870913,p=h!==l.lane;if(p?(Ri&h)===h:(i&h)===h){h!==0&&h===Cv&&(b3=!0),d!==null&&(d=d.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var g=e,b=l;h=t;var v=n;switch(b.tag){case 1:if(g=b.payload,typeof g=="function"){f=g.call(v,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,h=typeof g=="function"?g.call(v,f,h):g,h==null)break e;f=Jr({},f,h);break e;case 2:Ep=!0}}h=l.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=r.callbacks,p===null?r.callbacks=[h]:p.push(h))}else p={lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,a|=h;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;p=l,l=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);d===null&&(c=f),r.baseState=c,r.firstBaseUpdate=u,r.lastBaseUpdate=d,s===null&&(r.shared.lanes=0),gm|=a,e.lanes=a,e.memoizedState=f}}function Uhe(e,t){if(typeof e!="function")throw Error(lt(191,e));e.call(t)}function Qhe(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;es?s:8;var a=Rn.T,l={};Rn.T=l,_9(e,!1,t,n);try{var c=r(),u=Rn.S;if(u!==null&&u(l,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=h3e(c,i);ow(e,t,d,ic(e))}else ow(e,t,i,ic(e))}catch(f){ow(e,t,{then:function(){},status:"rejected",reason:f},ic())}finally{ir.p=s,a!==null&&l.types!==null&&(a.types=l.types),Rn.T=a}}function v3e(){}function w3(e,t,n,i){if(e.tag!==5)throw Error(lt(476));var r=hpe(e).queue;fpe(e,r,t,Gg,n===null?v3e:function(){return ppe(e),n(i)})}function hpe(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Gg,baseState:Gg,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sh,lastRenderedState:Gg},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sh,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ppe(e){var t=hpe(e);t.next===null&&(t=e.alternate.memoizedState),ow(e,t.next.queue,{},ic())}function A9(){return Ja(aS)}function mpe(){return zs().memoizedState}function gpe(){return zs().memoizedState}function x3e(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=ic();e=Zp(n);var i=Jp(t,e,n);i!==null&&(ml(i,t,n),rw(i,t,n)),t={cache:h9()},e.payload=t;return}t=t.return}}function O3e(e,t,n){var i=ic();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},_j(e)?ype(t,n):(n=c9(e,t,n,i),n!==null&&(ml(n,e,i),vpe(n,t,i)))}function bpe(e,t,n){var i=ic();ow(e,t,n,i)}function ow(e,t,n,i){var r={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(_j(e))ype(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(r.hasEagerState=!0,r.eagerState=l,lc(l,a))return kj(e,t,r,0),Ar===null&&Sj(),!1}catch{}finally{}if(n=c9(e,t,r,i),n!==null)return ml(n,e,i),vpe(n,t,i),!0}return!1}function _9(e,t,n,i){if(i={lane:2,revertLane:$9(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},_j(e)){if(t)throw Error(lt(479))}else t=c9(e,n,i,2),t!==null&&ml(t,e,2)}function _j(e){var t=e.alternate;return e===Jn||t!==null&&t===Jn}function ype(e,t){qy=n_=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vpe(e,t,n){if(n&4194048){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,rhe(e,n)}}var iS={readContext:Ja,use:Tj,useCallback:Es,useContext:Es,useEffect:Es,useImperativeHandle:Es,useLayoutEffect:Es,useInsertionEffect:Es,useMemo:Es,useReducer:Es,useRef:Es,useState:Es,useDebugValue:Es,useDeferredValue:Es,useTransition:Es,useSyncExternalStore:Es,useId:Es,useHostTransitionStatus:Es,useFormState:Es,useActionState:Es,useOptimistic:Es,useMemoCache:Es,useCacheRefresh:Es};iS.useEffectEvent=Es;var xpe={readContext:Ja,use:Tj,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:Ja,useEffect:uH,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,I2(4194308,4,ope.bind(null,t,e),n)},useLayoutEffect:function(e,t){return I2(4194308,4,e,t)},useInsertionEffect:function(e,t){I2(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var i=e();if(hb){Fp(!0);try{e()}finally{Fp(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=Ao();if(n!==void 0){var r=n(t);if(hb){Fp(!0);try{n(t)}finally{Fp(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=O3e.bind(null,Jn,e),[i.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=x3(e);var t=e.queue,n=bpe.bind(null,Jn,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:C9,useDeferredValue:function(e,t){var n=Ao();return T9(n,e,t)},useTransition:function(){var e=x3(!1);return e=fpe.bind(null,Jn,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=Jn,r=Ao();if($i){if(n===void 0)throw Error(lt(407));n=n()}else{if(n=t(),Ar===null)throw Error(lt(349));Ri&127||Whe(i,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,uH(Ghe.bind(null,i,s,e),[e]),i.flags|=2048,Av(9,{destroy:void 0},Khe.bind(null,i,s,n,t),null),n},useId:function(){var e=Ao(),t=Ar.identifierPrefix;if($i){var n=Ad,i=Td;n=(i&~(1<<32-nc(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=i_++,0<\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof i.is=="string"?a.createElement("select",{is:i.is}):a.createElement("select"),i.multiple?s.multiple=!0:i.size&&(s.size=i.size);break;default:s=typeof i.is=="string"?a.createElement(r,{is:i.is}):a.createElement(r)}}s[Xa]=t,s[yl]=i;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)s.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=s;e:switch(to(s,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&wf(t)}}return Hr(t),eD(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&wf(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(lt(166));if(e=Xp.current,T0(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,r=Ya,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}e[Xa]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||bme(e.nodeValue,n)),e||pm(t,!0)}else e=h_(e).createTextNode(i),e[Xa]=t,t.stateNode=e}return Hr(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=T0(t),n!==null){if(e===null){if(!i)throw Error(lt(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(lt(557));e[Xa]=t}else ub(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hr(t),e=!1}else n=HP(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ql(t),t):(ql(t),null);if(t.flags&128)throw Error(lt(558))}return Hr(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=T0(t),i!==null&&i.dehydrated!==null){if(e===null){if(!r)throw Error(lt(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(lt(317));r[Xa]=t}else ub(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hr(t),r=!1}else r=HP(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ql(t),t):(ql(t),null)}return ql(t),t.flags&128?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(i=t.child,r=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(r=i.alternate.memoizedState.cachePool.pool),s=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),s!==r&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),MC(t,t.updateQueue),Hr(t),null);case 4:return Sv(),e===null&&F9(t.stateNode.containerInfo),Hr(t),null;case 10:return ah(t.type),Hr(t),null;case 19:if(Ra(Fs),i=t.memoizedState,i===null)return Hr(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)I1(i,!1);else{if(As!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=t_(e),s!==null){for(t.flags|=128,I1(i,!1),e=s.updateQueue,t.updateQueue=e,MC(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Rhe(n,e),n=n.sibling;return Lr(Fs,Fs.current&1|2),$i&&Bf(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&ec()>o_&&(t.flags|=128,r=!0,I1(i,!1),t.lanes=4194304)}else{if(!r)if(e=t_(s),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,MC(t,e),I1(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!$i)return Hr(t),null}else 2*ec()-i.renderingStartTime>o_&&n!==536870912&&(t.flags|=128,r=!0,I1(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(e=i.last,e!==null?e.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=ec(),e.sibling=null,n=Fs.current,Lr(Fs,r?n&1|2:n&1),$i&&Bf(t,i.treeForkCount),e):(Hr(t),null);case 22:case 23:return ql(t),b9(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?n&536870912&&!(t.flags&128)&&(Hr(t),t.subtreeFlags&6&&(t.flags|=8192)):Hr(t),n=t.updateQueue,n!==null&&MC(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&Ra(Yg),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ah(ta),Hr(t),null;case 25:return null;case 30:return null}throw Error(lt(156,t.tag))}function C3e(e,t){switch(f9(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ah(ta),Sv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return qA(t),null;case 31:if(t.memoizedState!==null){if(ql(t),t.alternate===null)throw Error(lt(340));ub()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ql(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(lt(340));ub()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ra(Fs),null;case 4:return Sv(),null;case 10:return ah(t.type),null;case 22:case 23:return ql(t),b9(),e!==null&&Ra(Yg),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ah(ta),null;case 25:return null;default:return null}}function Rpe(e,t){switch(f9(t),t.tag){case 3:ah(ta),Sv();break;case 26:case 27:case 5:qA(t);break;case 4:Sv();break;case 31:t.memoizedState!==null&&ql(t);break;case 13:ql(t);break;case 19:Ra(Fs);break;case 10:ah(t.type);break;case 22:case 23:ql(t),b9(),e!==null&&Ra(Yg);break;case 24:ah(ta)}}function jk(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var r=i.next;n=r;do{if((n.tag&e)===e){i=void 0;var s=n.create,a=n.inst;i=s(),a.destroy=i}n=n.next}while(n!==r)}}catch(l){hr(t,t.return,l)}}function mm(e,t,n){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var s=r.next;i=s;do{if((i.tag&e)===e){var a=i.inst,l=a.destroy;if(l!==void 0){a.destroy=void 0,r=t;var c=n,u=l;try{u()}catch(d){hr(r,c,d)}}}i=i.next}while(i!==s)}}catch(d){hr(t,t.return,d)}}function Ipe(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qhe(t,n)}catch(i){hr(e,e.return,i)}}}function Ppe(e,t,n){n.props=pb(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){hr(e,t,i)}}function lw(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(r){hr(e,t,r)}}function _d(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(r){hr(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){hr(e,t,r)}else n.current=null}function Dpe(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(r){hr(e,e.return,r)}}function tD(e,t,n){try{var i=e.stateNode;K3e(i,e.type,n,t),i[yl]=t}catch(r){hr(e,e.return,r)}}function Mpe(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Bm(e.type)||e.tag===4}function nD(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mpe(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Bm(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function T3(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jf));else if(i!==4&&(i===27&&Bm(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(T3(e,t,n),e=e.sibling;e!==null;)T3(e,t,n),e=e.sibling}function a_(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&Bm(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(a_(e,t,n),e=e.sibling;e!==null;)a_(e,t,n),e=e.sibling}function Lpe(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);to(t,i,n),t[Xa]=e,t[yl]=n}catch(s){hr(e,e.return,s)}}var qf=!1,ea=!1,iD=!1,SH=typeof WeakSet=="function"?WeakSet:Set,Sa=null;function T3e(e,t){if(e=e.containerInfo,P3=b_,e=khe(e),o9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||r!==0&&f.nodeType!==3||(l=a+r),f!==s||i!==0&&f.nodeType!==3||(c=a+i),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===r&&(l=a),h===s&&++d===i&&(c=a),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(D3={focusedElem:e,selectionRange:n},b_=!1,Sa=t;Sa!==null;)if(t=Sa,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Sa=e;else for(;Sa!==null;){switch(t=Sa,s=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),to(s,i,n),s[Xa]=e,Ca(s),i=s;break e;case"link":var a=zH("link","href",r).get(i+(n.href||""));if(a){for(var l=0;lv&&(a=v,v=b,b=a);var y=KV(l,b),x=KV(l,v);if(y&&x&&(p.rangeCount!==1||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==x.node||p.focusOffset!==x.offset)){var w=f.createRange();w.setStart(y.node,y.offset),p.removeAllRanges(),b>v?(p.addRange(w),p.extend(x.node,x.offset)):(w.setEnd(x.node,x.offset),p.addRange(w))}}}}for(f=[],p=l;p=p.parentNode;)p.nodeType===1&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;ln?32:n,Rn.T=null,n=N3,N3=null;var s=tm,a=oh;if(ma=0,Nv=tm=null,oh=0,nr&6)throw Error(lt(331));var l=nr;if(nr|=4,Kpe(s.current),Hpe(s,s.current,a,n),nr=l,Rk(0,!1),tc&&typeof tc.onPostCommitFiberRoot=="function")try{tc.onPostCommitFiberRoot(kk,s)}catch{}return!0}finally{ir.p=r,Rn.T=i,cme(e,t)}}function TH(e,t,n){t=Bc(n,t),t=k3(e.stateNode,t,2),e=Jp(e,t,2),e!==null&&(Ck(e,2),Xd(e))}function hr(e,t,n){if(e.tag===3)TH(e,e,n);else for(;t!==null;){if(t.tag===3){TH(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(em===null||!em.has(i))){e=Bc(n,e),n=Epe(2),i=Jp(t,n,2),i!==null&&(Cpe(n,i,t,e),Ck(i,2),Xd(i));break}}t=t.return}}function sD(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new N3e;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(n)||(D9=!0,r.add(n),e=D3e.bind(null,e,t,n),t.then(e,e))}function D3e(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ar===e&&(Ri&n)===n&&(As===4||As===3&&(Ri&62914560)===Ri&&300>ec()-Nj?!(nr&2)&&jv(e,0):M9|=n,_v===Ri&&(_v=0)),Xd(e)}function dme(e,t){t===0&&(t=nhe()),e=Qb(e,t),e!==null&&(Ck(e,t),Xd(e))}function M3e(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dme(e,n)}function L3e(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(lt(314))}i!==null&&i.delete(t),dme(e,n)}function $3e(e,t){return Z8(e,t)}var u_=null,Y0=null,R3=!1,d_=!1,aD=!1,zp=0;function Xd(e){e!==Y0&&e.next===null&&(Y0===null?u_=Y0=e:Y0=Y0.next=e),d_=!0,R3||(R3=!0,B3e())}function Rk(e,t){if(!aD&&d_){aD=!0;do for(var n=!1,i=u_;i!==null;){if(e!==0){var r=i.pendingLanes;if(r===0)var s=0;else{var a=i.suspendedLanes,l=i.pingedLanes;s=(1<<31-nc(42|e)+1)-1,s&=r&~(a&~l),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,AH(i,s))}else s=Ri,s=vj(i,i===Ar?s:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),!(s&3)||Ek(i,s)||(n=!0,AH(i,s));i=i.next}while(n);aD=!1}}function F3e(){fme()}function fme(){d_=R3=!1;var e=0;zp!==0&&X3e()&&(e=zp);for(var t=ec(),n=null,i=u_;i!==null;){var r=i.next,s=hme(i,t);s===0?(i.next=null,n===null?u_=r:n.next=r,r===null&&(Y0=n)):(n=i,(e!==0||s&3)&&(d_=!0)),i=r}ma!==0&&ma!==5||Rk(e),zp!==0&&(zp=0)}function hme(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,s=e.pendingLanes&-62914561;0l)break;var d=c.transferSize,f=c.initiatorType;d&&IH(f)&&(c=c.responseEnd,a+=d*(c"u"?null:document;function wme(e,t,n){var i=Ox;if(i&&typeof t=="string"&&t){var r=Fc(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),BH.has(r)||(BH.add(r),e={rel:e,crossOrigin:n,href:t},i.querySelector(r)===null&&(t=i.createElement("link"),to(t,"link",e),Ca(t),i.head.appendChild(t)))}}function s4e(e){Uh.D(e),wme("dns-prefetch",e,null)}function a4e(e,t){Uh.C(e,t),wme("preconnect",e,t)}function o4e(e,t,n){Uh.L(e,t,n);var i=Ox;if(i&&e&&t){var r='link[rel="preload"][as="'+Fc(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+Fc(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+Fc(n.imageSizes)+'"]')):r+='[href="'+Fc(e)+'"]';var s=r;switch(t){case"style":s=Rv(e);break;case"script":s=wx(e)}nu.has(s)||(e=Jr({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),nu.set(s,e),i.querySelector(r)!==null||t==="style"&&i.querySelector(Ik(s))||t==="script"&&i.querySelector(Pk(s))||(t=i.createElement("link"),to(t,"link",e),Ca(t),i.head.appendChild(t)))}}function l4e(e,t){Uh.m(e,t);var n=Ox;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Fc(i)+'"][href="'+Fc(e)+'"]',s=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=wx(e)}if(!nu.has(s)&&(e=Jr({rel:"modulepreload",href:e},t),nu.set(s,e),n.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Pk(s)))return}i=n.createElement("link"),to(i,"link",e),Ca(i),n.head.appendChild(i)}}}function c4e(e,t,n){Uh.S(e,t,n);var i=Ox;if(i&&e){var r=Uy(i).hoistableStyles,s=Rv(e);t=t||"default";var a=r.get(s);if(!a){var l={loading:0,preload:null};if(a=i.querySelector(Ik(s)))l.loading=5;else{e=Jr({rel:"stylesheet",href:e,"data-precedence":t},n),(n=nu.get(s))&&B9(e,n);var c=a=i.createElement("link");Ca(c),to(c,"link",e),c._p=new Promise(function(u,d){c.onload=u,c.onerror=d}),c.addEventListener("load",function(){l.loading|=1}),c.addEventListener("error",function(){l.loading|=2}),l.loading|=4,L2(a,t,i)}a={type:"stylesheet",instance:a,count:1,state:l},r.set(s,a)}}}function u4e(e,t){Uh.X(e,t);var n=Ox;if(n&&e){var i=Uy(n).hoistableScripts,r=wx(e),s=i.get(r);s||(s=n.querySelector(Pk(r)),s||(e=Jr({src:e,async:!0},t),(t=nu.get(r))&&U9(e,t),s=n.createElement("script"),Ca(s),to(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},i.set(r,s))}}function d4e(e,t){Uh.M(e,t);var n=Ox;if(n&&e){var i=Uy(n).hoistableScripts,r=wx(e),s=i.get(r);s||(s=n.querySelector(Pk(r)),s||(e=Jr({src:e,async:!0,type:"module"},t),(t=nu.get(r))&&U9(e,t),s=n.createElement("script"),Ca(s),to(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},i.set(r,s))}}function UH(e,t,n,i){var r=(r=Xp.current)?p_(r):null;if(!r)throw Error(lt(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Rv(n.href),n=Uy(r).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Rv(n.href);var s=Uy(r).hoistableStyles,a=s.get(e);if(a||(r=r.ownerDocument||r,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,a),(s=r.querySelector(Ik(e)))&&!s._p&&(a.instance=s,a.state.loading=5),nu.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},nu.set(e,n),s||f4e(r,e,n,a.state))),t&&i===null)throw Error(lt(528,""));return a}if(t&&i!==null)throw Error(lt(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=wx(n),n=Uy(r).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(lt(444,e))}}function Rv(e){return'href="'+Fc(e)+'"'}function Ik(e){return'link[rel="stylesheet"]['+e+"]"}function Sme(e){return Jr({},e,{"data-precedence":e.precedence,precedence:null})}function f4e(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),to(t,"link",n),Ca(t),e.head.appendChild(t))}function wx(e){return'[src="'+Fc(e)+'"]'}function Pk(e){return"script[async]"+e}function QH(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Fc(n.href)+'"]');if(i)return t.instance=i,Ca(i),i;var r=Jr({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ca(i),to(i,"style",r),L2(i,n.precedence,e),t.instance=i;case"stylesheet":r=Rv(n.href);var s=e.querySelector(Ik(r));if(s)return t.state.loading|=4,t.instance=s,Ca(s),s;i=Sme(n),(r=nu.get(r))&&B9(i,r),s=(e.ownerDocument||e).createElement("link"),Ca(s);var a=s;return a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),to(s,"link",i),t.state.loading|=4,L2(s,n.precedence,e),t.instance=s;case"script":return s=wx(n.src),(r=e.querySelector(Pk(s)))?(t.instance=r,Ca(r),r):(i=n,(r=nu.get(s))&&(i=Jr({},n),U9(i,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ca(r),to(r,"link",i),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(lt(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(i=t.instance,t.state.loading|=4,L2(i,n.precedence,e));return t.instance}function L2(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,s=r,a=0;a title"):null)}function h4e(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function kme(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function p4e(e,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var r=Rv(i.href),s=t.querySelector(Ik(r));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=m_.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,Ca(s);return}s=t.ownerDocument||t,i=Sme(i),(r=nu.get(r))&&B9(i,r),s=s.createElement("link"),Ca(s);var a=s;a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),to(s,"link",i),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=m_.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var fD=0;function m4e(e,t){return e.stylesheets&&e.count===0&&F2(e,e.stylesheets),0fD?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}function m_(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)F2(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var g_=null;function F2(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,g_=new Map,t.forEach(g4e,e),g_=null,m_.call(e))}function g4e(e,t){if(!(t.state.loading&4)){var n=g_.get(e);if(n)var i=n.get(null);else{n=new Map,g_.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rme)}catch(e){console.error(e)}}Rme(),Bfe.exports=bj;var k4e=Bfe.exports;const E4e=px(k4e),q9=m.createContext({});function Dj(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Mj=m.createContext(null),cS=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class C4e extends m.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function T4e({children:e,isPresent:t}){const n=m.useId(),i=m.useRef(null),r=m.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=m.useContext(cS);return m.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u}=r.current;if(t||!i.current||!a||!l)return;i.current.dataset.motionPopId=n;const d=document.createElement("style");return s&&(d.nonce=s),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` +`+i.stack}}var JL=Object.prototype.hasOwnProperty,Y8=ga.unstable_scheduleCallback,RP=ga.unstable_cancelCallback,rLe=ga.unstable_shouldYield,sLe=ga.unstable_requestPaint,Jl=ga.unstable_now,aLe=ga.unstable_getCurrentPriorityLevel,Zfe=ga.unstable_ImmediatePriority,Jfe=ga.unstable_UserBlockingPriority,VA=ga.unstable_NormalPriority,oLe=ga.unstable_LowPriority,ehe=ga.unstable_IdlePriority,lLe=ga.log,cLe=ga.unstable_setDisableYieldValue,Ok=null,ec=null;function Pp(e){if(typeof lLe=="function"&&cLe(e),ec&&typeof ec.setStrictMode=="function")try{ec.setStrictMode(Ok,e)}catch{}}var tc=Math.clz32?Math.clz32:fLe,uLe=Math.log,dLe=Math.LN2;function fLe(e){return e>>>=0,e===0?32:31-(uLe(e)/dLe|0)|0}var EC=256,CC=262144,TC=4194304;function fg(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gj(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var r=0,s=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var l=i&134217727;return l!==0?(i=l&~s,i!==0?r=fg(i):(a&=l,a!==0?r=fg(a):n||(n=l&~e,n!==0&&(r=fg(n))))):(l=i&~s,l!==0?r=fg(l):a!==0?r=fg(a):n||(n=i&~e,n!==0&&(r=fg(n)))),r===0?0:t!==0&&t!==r&&!(t&s)&&(s=r&-r,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:r}function wk(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function hLe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function the(){var e=TC;return TC<<=1,!(TC&62914560)&&(TC=4194304),e}function IP(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Sk(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pLe(e,t,n,i,r,s){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=a&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var xLe=/[\n"\\]/g;function $c(e){return e.replace(xLe,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function n3(e,t,n,i,r,s,a,l){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ic(t)):e.value!==""+Ic(t)&&(e.value=""+Ic(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?i3(e,a,Ic(t)):n!=null?i3(e,a,Ic(n)):i!=null&&e.removeAttribute("value"),r==null&&s!=null&&(e.defaultChecked=!!s),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+Ic(l):e.removeAttribute("name")}function uhe(e,t,n,i,r,s,a,l){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){t3(e);return}n=n!=null?""+Ic(n):"",t=t!=null?""+Ic(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=l?e.checked:!!i,e.defaultChecked=!!i,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),t3(e)}function i3(e,t,n){t==="number"&&HA(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function $y(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),s3=!1;if(gh)try{var E1={};Object.defineProperty(E1,"passive",{get:function(){s3=!0}}),window.addEventListener("test",E1,E1),window.removeEventListener("test",E1,E1)}catch{s3=!1}var Dp=null,i9=null,E2=null;function mhe(){if(E2)return E2;var e,t=i9,n=t.length,i,r="value"in Dp?Dp.value:Dp.textContent,s=r.length;for(e=0;e=GO),FV=" ",BV=!1;function bhe(e,t){switch(e){case"keyup":return KLe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yhe(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var uy=!1;function XLe(e,t){switch(e){case"compositionend":return yhe(t);case"keypress":return t.which!==32?null:(BV=!0,FV);case"textInput":return e=t.data,e===FV&&BV?null:e;default:return null}}function YLe(e,t){if(uy)return e==="compositionend"||!s9&&bhe(e,t)?(e=mhe(),E2=i9=Dp=null,uy=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=HV(n)}}function whe(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?whe(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function She(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=HA(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=HA(e.document)}return t}function a9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var s3e=gh&&"documentMode"in document&&11>=document.documentMode,dy=null,a3=null,YO=null,o3=!1;function WV(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;o3||dy==null||dy!==HA(i)||(i=dy,"selectionStart"in i&&a9(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),YO&&Ww(YO,i)||(YO=i,i=c_(a3,"onSelect"),0>=a,r-=a,Ed=1<<32-tc(t)+r|n<C?(N=E,E=null):N=E.sibling;var _=h(y,E,w[C],O);if(_===null){E===null&&(E=N);break}e&&E&&_.alternate===null&&t(y,E),x=s(_,x,C),S===null?k=_:S.sibling=_,S=_,E=N}if(C===w.length)return n(y,E),Li&&Mf(y,C),k;if(E===null){for(;CC?(N=E,E=null):N=E.sibling;var j=h(y,E,_.value,O);if(j===null){E===null&&(E=N);break}e&&E&&j.alternate===null&&t(y,E),x=s(j,x,C),S===null?k=j:S.sibling=j,S=j,E=N}if(_.done)return n(y,E),Li&&Mf(y,C),k;if(E===null){for(;!_.done;C++,_=w.next())_=f(y,_.value,O),_!==null&&(x=s(_,x,C),S===null?k=_:S.sibling=_,S=_);return Li&&Mf(y,C),k}for(E=i(E);!_.done;C++,_=w.next())_=p(E,y,C,_.value,O),_!==null&&(e&&_.alternate!==null&&E.delete(_.key===null?C:_.key),x=s(_,x,C),S===null?k=_:S.sibling=_,S=_);return e&&E.forEach(function(T){return t(y,T)}),Li&&Mf(y,C),k}function v(y,x,w,O){if(typeof w=="object"&&w!==null&&w.type===ay&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case kC:e:{for(var k=w.key;x!==null;){if(x.key===k){if(k=w.type,k===ay){if(x.tag===7){n(y,x.sibling),O=r(x,w.props.children),O.return=y,y=O;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===vp&&hg(k)===x.type){n(y,x.sibling),O=r(x,w.props),T1(O,w),O.return=y,y=O;break e}n(y,x);break}else t(y,x);x=x.sibling}w.type===ay?(O=Wg(w.props.children,y.mode,O,w.key),O.return=y,y=O):(O=T2(w.type,w.key,w.props,null,y.mode,O),T1(O,w),O.return=y,y=O)}return a(y);case yO:e:{for(k=w.key;x!==null;){if(x.key===k)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(y,x.sibling),O=r(x,w.children||[]),O.return=y,y=O;break e}else{n(y,x);break}else t(y,x);x=x.sibling}O=QP(w,y.mode,O),O.return=y,y=O}return a(y);case vp:return w=hg(w),v(y,x,w,O)}if(vO(w))return g(y,x,w,O);if(k1(w)){if(k=k1(w),typeof k!="function")throw Error(ct(150));return w=k.call(w),b(y,x,w,O)}if(typeof w.then=="function")return v(y,x,jC(w),O);if(w.$$typeof===Kf)return v(y,x,NC(y,w),O);RC(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,x!==null&&x.tag===6?(n(y,x.sibling),O=r(x,w),O.return=y,y=O):(n(y,x),O=UP(w,y.mode,O),O.return=y,y=O),a(y)):n(y,x)}return function(y,x,w,O){try{Xw=0;var k=v(y,x,w,O);return Uy=null,k}catch(E){if(E===mx||E===wj)throw E;var S=Wl(29,E,null,y.mode);return S.lanes=O,S.return=y,S}finally{}}}var cb=$he(!0),Fhe=$he(!1),xp=!1;function m9(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function p3(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wp(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Kp(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,tr&2){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=WA(e),Nhe(e,null,n),t}return Oj(e,i,t,n),WA(e)}function JO(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,ihe(e,n)}}function VP(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?r=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?r=s=t:s=s.next=t}else r=s=t;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var m3=!1;function ew(){if(m3){var e=By;if(e!==null)throw e}}function tw(e,t,n,i){m3=!1;var r=e.updateQueue;xp=!1;var s=r.firstBaseUpdate,a=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?s=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(s!==null){var f=r.baseState;a=0,d=u=c=null,l=s;do{var h=l.lane&-536870913,p=h!==l.lane;if(p?(Ni&h)===h:(i&h)===h){h!==0&&h===wv&&(m3=!0),d!==null&&(d=d.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var g=e,b=l;h=t;var v=n;switch(b.tag){case 1:if(g=b.payload,typeof g=="function"){f=g.call(v,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,h=typeof g=="function"?g.call(v,f,h):g,h==null)break e;f=Zr({},f,h);break e;case 2:xp=!0}}h=l.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=r.callbacks,p===null?r.callbacks=[h]:p.push(h))}else p={lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,a|=h;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;p=l,l=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);d===null&&(c=f),r.baseState=c,r.firstBaseUpdate=u,r.lastBaseUpdate=d,s===null&&(r.shared.lanes=0),dm|=a,e.lanes=a,e.memoizedState=f}}function Bhe(e,t){if(typeof e!="function")throw Error(ct(191,e));e.call(t)}function Uhe(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;es?s:8;var a=Nn.T,l={};Nn.T=l,A9(e,!1,t,n);try{var c=r(),u=Nn.S;if(u!==null&&u(l,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=p3e(c,i);nw(e,t,d,nc(e))}else nw(e,t,i,nc(e))}catch(f){nw(e,t,{then:function(){},status:"rejected",reason:f},nc())}finally{nr.p=s,a!==null&&l.types!==null&&(a.types=l.types),Nn.T=a}}function x3e(){}function x3(e,t,n,i){if(e.tag!==5)throw Error(ct(476));var r=fpe(e).queue;dpe(e,r,t,qg,n===null?x3e:function(){return hpe(e),n(i)})}function fpe(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:qg,baseState:qg,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yh,lastRenderedState:qg},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yh,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function hpe(e){var t=fpe(e);t.next===null&&(t=e.alternate.memoizedState),nw(e,t.next.queue,{},nc())}function T9(){return Za(tS)}function ppe(){return Qs().memoizedState}function mpe(){return Qs().memoizedState}function O3e(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=nc();e=Wp(n);var i=Kp(t,e,n);i!==null&&(pl(i,t,n),JO(i,t,n)),t={cache:f9()},e.payload=t;return}t=t.return}}function w3e(e,t,n){var i=nc();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cj(e)?bpe(t,n):(n=l9(e,t,n,i),n!==null&&(pl(n,e,i),ype(n,t,i)))}function gpe(e,t,n){var i=nc();nw(e,t,n,i)}function nw(e,t,n,i){var r={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cj(e))bpe(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(r.hasEagerState=!0,r.eagerState=l,oc(l,a))return Oj(e,t,r,0),_r===null&&xj(),!1}catch{}finally{}if(n=l9(e,t,r,i),n!==null)return pl(n,e,i),ype(n,t,i),!0}return!1}function A9(e,t,n,i){if(i={lane:2,revertLane:L9(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Cj(e)){if(t)throw Error(ct(479))}else t=l9(e,n,i,2),t!==null&&pl(t,e,2)}function Cj(e){var t=e.alternate;return e===Zn||t!==null&&t===Zn}function bpe(e,t){Qy=JA=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ype(e,t,n){if(n&4194048){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,ihe(e,n)}}var Zw={readContext:Za,use:kj,useCallback:Ss,useContext:Ss,useEffect:Ss,useImperativeHandle:Ss,useLayoutEffect:Ss,useInsertionEffect:Ss,useMemo:Ss,useReducer:Ss,useRef:Ss,useState:Ss,useDebugValue:Ss,useDeferredValue:Ss,useTransition:Ss,useSyncExternalStore:Ss,useId:Ss,useHostTransitionStatus:Ss,useFormState:Ss,useActionState:Ss,useOptimistic:Ss,useMemoCache:Ss,useCacheRefresh:Ss};Zw.useEffectEvent=Ss;var vpe={readContext:Za,use:kj,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:Za,useEffect:lH,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,N2(4194308,4,ape.bind(null,t,e),n)},useLayoutEffect:function(e,t){return N2(4194308,4,e,t)},useInsertionEffect:function(e,t){N2(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var i=e();if(ub){Pp(!0);try{e()}finally{Pp(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=To();if(n!==void 0){var r=n(t);if(ub){Pp(!0);try{n(t)}finally{Pp(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=w3e.bind(null,Zn,e),[i.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=y3(e);var t=e.queue,n=gpe.bind(null,Zn,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:E9,useDeferredValue:function(e,t){var n=To();return C9(n,e,t)},useTransition:function(){var e=y3(!1);return e=dpe.bind(null,Zn,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=Zn,r=To();if(Li){if(n===void 0)throw Error(ct(407));n=n()}else{if(n=t(),_r===null)throw Error(ct(349));Ni&127||qhe(i,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,lH(Khe.bind(null,i,s,e),[e]),i.flags|=2048,kv(9,{destroy:void 0},Whe.bind(null,i,s,n,t),null),n},useId:function(){var e=To(),t=_r.identifierPrefix;if(Li){var n=Cd,i=Ed;n=(i&~(1<<32-tc(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=e_++,0<\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof i.is=="string"?a.createElement("select",{is:i.is}):a.createElement("select"),i.multiple?s.multiple=!0:i.size&&(s.size=i.size);break;default:s=typeof i.is=="string"?a.createElement(r,{is:i.is}):a.createElement(r)}}s[Ga]=t,s[bl]=i;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)s.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=s;e:switch(eo(s,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&yf(t)}}return Vr(t),ZP(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&yf(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(ct(166));if(e=Hp.current,S0(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,r=Xa,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}e[Ga]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||gme(e.nodeValue,n)),e||cm(t,!0)}else e=u_(e).createTextNode(i),e[Ga]=t,t.stateNode=e}return Vr(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=S0(t),n!==null){if(e===null){if(!i)throw Error(ct(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ct(557));e[Ga]=t}else ob(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vr(t),e=!1}else n=zP(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Hl(t),t):(Hl(t),null);if(t.flags&128)throw Error(ct(558))}return Vr(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=S0(t),i!==null&&i.dehydrated!==null){if(e===null){if(!r)throw Error(ct(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(ct(317));r[Ga]=t}else ob(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vr(t),r=!1}else r=zP(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Hl(t),t):(Hl(t),null)}return Hl(t),t.flags&128?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(i=t.child,r=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(r=i.alternate.memoizedState.cachePool.pool),s=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),s!==r&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),IC(t,t.updateQueue),Vr(t),null);case 4:return vv(),e===null&&$9(t.stateNode.containerInfo),Vr(t),null;case 10:return th(t.type),Vr(t),null;case 19:if(ja($s),i=t.memoizedState,i===null)return Vr(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)A1(i,!1);else{if(Cs!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=ZA(e),s!==null){for(t.flags|=128,A1(i,!1),e=s.updateQueue,t.updateQueue=e,IC(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)jhe(n,e),n=n.sibling;return Mr($s,$s.current&1|2),Li&&Mf(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Jl()>r_&&(t.flags|=128,r=!0,A1(i,!1),t.lanes=4194304)}else{if(!r)if(e=ZA(s),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,IC(t,e),A1(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Li)return Vr(t),null}else 2*Jl()-i.renderingStartTime>r_&&n!==536870912&&(t.flags|=128,r=!0,A1(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(e=i.last,e!==null?e.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Jl(),e.sibling=null,n=$s.current,Mr($s,r?n&1|2:n&1),Li&&Mf(t,i.treeForkCount),e):(Vr(t),null);case 22:case 23:return Hl(t),g9(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?n&536870912&&!(t.flags&128)&&(Vr(t),t.subtreeFlags&6&&(t.flags|=8192)):Vr(t),n=t.updateQueue,n!==null&&IC(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&ja(Kg),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),th(Js),Vr(t),null;case 25:return null;case 30:return null}throw Error(ct(156,t.tag))}function T3e(e,t){switch(d9(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return th(Js),vv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return zA(t),null;case 31:if(t.memoizedState!==null){if(Hl(t),t.alternate===null)throw Error(ct(340));ob()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Hl(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ct(340));ob()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ja($s),null;case 4:return vv(),null;case 10:return th(t.type),null;case 22:case 23:return Hl(t),g9(),e!==null&&ja(Kg),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return th(Js),null;case 25:return null;default:return null}}function jpe(e,t){switch(d9(t),t.tag){case 3:th(Js),vv();break;case 26:case 27:case 5:zA(t);break;case 4:vv();break;case 31:t.memoizedState!==null&&Hl(t);break;case 13:Hl(t);break;case 19:ja($s);break;case 10:th(t.type);break;case 22:case 23:Hl(t),g9(),e!==null&&ja(Kg);break;case 24:th(Js)}}function Ak(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var r=i.next;n=r;do{if((n.tag&e)===e){i=void 0;var s=n.create,a=n.inst;i=s(),a.destroy=i}n=n.next}while(n!==r)}}catch(l){pr(t,t.return,l)}}function um(e,t,n){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var s=r.next;i=s;do{if((i.tag&e)===e){var a=i.inst,l=a.destroy;if(l!==void 0){a.destroy=void 0,r=t;var c=n,u=l;try{u()}catch(d){pr(r,c,d)}}}i=i.next}while(i!==s)}}catch(d){pr(t,t.return,d)}}function Rpe(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Uhe(t,n)}catch(i){pr(e,e.return,i)}}}function Ipe(e,t,n){n.props=db(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){pr(e,t,i)}}function iw(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(r){pr(e,t,r)}}function Td(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(r){pr(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){pr(e,t,r)}else n.current=null}function Ppe(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(r){pr(e,e.return,r)}}function JP(e,t,n){try{var i=e.stateNode;G3e(i,e.type,n,t),i[bl]=t}catch(r){pr(e,e.return,r)}}function Dpe(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dm(e.type)||e.tag===4}function eD(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dpe(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Dm(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function E3(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gf));else if(i!==4&&(i===27&&Dm(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(E3(e,t,n),e=e.sibling;e!==null;)E3(e,t,n),e=e.sibling}function i_(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&Dm(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(i_(e,t,n),e=e.sibling;e!==null;)i_(e,t,n),e=e.sibling}function Mpe(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);eo(t,i,n),t[Ga]=e,t[bl]=n}catch(s){pr(e,e.return,s)}}var Qf=!1,Zs=!1,tD=!1,OH=typeof WeakSet=="function"?WeakSet:Set,wa=null;function A3e(e,t){if(e=e.containerInfo,R3=p_,e=She(e),a9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||r!==0&&f.nodeType!==3||(l=a+r),f!==s||i!==0&&f.nodeType!==3||(c=a+i),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===r&&(l=a),h===s&&++d===i&&(c=a),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(I3={focusedElem:e,selectionRange:n},p_=!1,wa=t;wa!==null;)if(t=wa,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wa=e;else for(;wa!==null;){switch(t=wa,s=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n title"))),eo(s,i,n),s[Ga]=e,Ea(s),i=s;break e;case"link":var a=UH("link","href",r).get(i+(n.href||""));if(a){for(var l=0;lv&&(a=v,v=b,b=a);var y=qV(l,b),x=qV(l,v);if(y&&x&&(p.rangeCount!==1||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==x.node||p.focusOffset!==x.offset)){var w=f.createRange();w.setStart(y.node,y.offset),p.removeAllRanges(),b>v?(p.addRange(w),p.extend(x.node,x.offset)):(w.setEnd(x.node,x.offset),p.addRange(w))}}}}for(f=[],p=l;p=p.parentNode;)p.nodeType===1&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;ln?32:n,Nn.T=null,n=A3,A3=null;var s=Xp,a=nh;if(pa=0,Cv=Xp=null,nh=0,tr&6)throw Error(ct(331));var l=tr;if(tr|=4,Wpe(s.current),Vpe(s,s.current,a,n),tr=l,_k(0,!1),ec&&typeof ec.onPostCommitFiberRoot=="function")try{ec.onPostCommitFiberRoot(Ok,s)}catch{}return!0}finally{nr.p=r,Nn.T=i,lme(e,t)}}function EH(e,t,n){t=Fc(n,t),t=w3(e.stateNode,t,2),e=Kp(e,t,2),e!==null&&(Sk(e,2),Kd(e))}function pr(e,t,n){if(e.tag===3)EH(e,e,n);else for(;t!==null;){if(t.tag===3){EH(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Gp===null||!Gp.has(i))){e=Fc(n,e),n=kpe(2),i=Kp(t,n,2),i!==null&&(Epe(n,i,t,e),Sk(i,2),Kd(i));break}}t=t.return}}function iD(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new j3e;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(n)||(P9=!0,r.add(n),e=M3e.bind(null,e,t,n),t.then(e,e))}function M3e(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,_r===e&&(Ni&n)===n&&(Cs===4||Cs===3&&(Ni&62914560)===Ni&&300>Jl()-Tj?!(tr&2)&&Tv(e,0):D9|=n,Ev===Ni&&(Ev=0)),Kd(e)}function ume(e,t){t===0&&(t=the()),e=Fb(e,t),e!==null&&(Sk(e,t),Kd(e))}function L3e(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ume(e,n)}function $3e(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(ct(314))}i!==null&&i.delete(t),ume(e,n)}function F3e(e,t){return Y8(e,t)}var o_=null,W0=null,N3=!1,l_=!1,rD=!1,$p=0;function Kd(e){e!==W0&&e.next===null&&(W0===null?o_=W0=e:W0=W0.next=e),l_=!0,N3||(N3=!0,U3e())}function _k(e,t){if(!rD&&l_){rD=!0;do for(var n=!1,i=o_;i!==null;){if(e!==0){var r=i.pendingLanes;if(r===0)var s=0;else{var a=i.suspendedLanes,l=i.pingedLanes;s=(1<<31-tc(42|e)+1)-1,s&=r&~(a&~l),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,CH(i,s))}else s=Ni,s=gj(i,i===_r?s:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),!(s&3)||wk(i,s)||(n=!0,CH(i,s));i=i.next}while(n);rD=!1}}function B3e(){dme()}function dme(){l_=N3=!1;var e=0;$p!==0&&Y3e()&&(e=$p);for(var t=Jl(),n=null,i=o_;i!==null;){var r=i.next,s=fme(i,t);s===0?(i.next=null,n===null?o_=r:n.next=r,r===null&&(W0=n)):(n=i,(e!==0||s&3)&&(l_=!0)),i=r}pa!==0&&pa!==5||_k(e),$p!==0&&($p=0)}function fme(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,s=e.pendingLanes&-62914561;0l)break;var d=c.transferSize,f=c.initiatorType;d&&jH(f)&&(c=c.responseEnd,a+=d*(c"u"?null:document;function Ome(e,t,n){var i=bx;if(i&&typeof t=="string"&&t){var r=$c(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),$H.has(r)||($H.add(r),e={rel:e,crossOrigin:n,href:t},i.querySelector(r)===null&&(t=i.createElement("link"),eo(t,"link",e),Ea(t),i.head.appendChild(t)))}}function a4e(e){Mh.D(e),Ome("dns-prefetch",e,null)}function o4e(e,t){Mh.C(e,t),Ome("preconnect",e,t)}function l4e(e,t,n){Mh.L(e,t,n);var i=bx;if(i&&e&&t){var r='link[rel="preload"][as="'+$c(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+$c(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+$c(n.imageSizes)+'"]')):r+='[href="'+$c(e)+'"]';var s=r;switch(t){case"style":s=Av(e);break;case"script":s=yx(e)}tu.has(s)||(e=Zr({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),tu.set(s,e),i.querySelector(r)!==null||t==="style"&&i.querySelector(Nk(s))||t==="script"&&i.querySelector(jk(s))||(t=i.createElement("link"),eo(t,"link",e),Ea(t),i.head.appendChild(t)))}}function c4e(e,t){Mh.m(e,t);var n=bx;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+$c(i)+'"][href="'+$c(e)+'"]',s=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=yx(e)}if(!tu.has(s)&&(e=Zr({rel:"modulepreload",href:e},t),tu.set(s,e),n.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(jk(s)))return}i=n.createElement("link"),eo(i,"link",e),Ea(i),n.head.appendChild(i)}}}function u4e(e,t,n){Mh.S(e,t,n);var i=bx;if(i&&e){var r=Ly(i).hoistableStyles,s=Av(e);t=t||"default";var a=r.get(s);if(!a){var l={loading:0,preload:null};if(a=i.querySelector(Nk(s)))l.loading=5;else{e=Zr({rel:"stylesheet",href:e,"data-precedence":t},n),(n=tu.get(s))&&F9(e,n);var c=a=i.createElement("link");Ea(c),eo(c,"link",e),c._p=new Promise(function(u,d){c.onload=u,c.onerror=d}),c.addEventListener("load",function(){l.loading|=1}),c.addEventListener("error",function(){l.loading|=2}),l.loading|=4,P2(a,t,i)}a={type:"stylesheet",instance:a,count:1,state:l},r.set(s,a)}}}function d4e(e,t){Mh.X(e,t);var n=bx;if(n&&e){var i=Ly(n).hoistableScripts,r=yx(e),s=i.get(r);s||(s=n.querySelector(jk(r)),s||(e=Zr({src:e,async:!0},t),(t=tu.get(r))&&B9(e,t),s=n.createElement("script"),Ea(s),eo(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},i.set(r,s))}}function f4e(e,t){Mh.M(e,t);var n=bx;if(n&&e){var i=Ly(n).hoistableScripts,r=yx(e),s=i.get(r);s||(s=n.querySelector(jk(r)),s||(e=Zr({src:e,async:!0,type:"module"},t),(t=tu.get(r))&&B9(e,t),s=n.createElement("script"),Ea(s),eo(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},i.set(r,s))}}function FH(e,t,n,i){var r=(r=Hp.current)?d_(r):null;if(!r)throw Error(ct(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Av(n.href),n=Ly(r).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Av(n.href);var s=Ly(r).hoistableStyles,a=s.get(e);if(a||(r=r.ownerDocument||r,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,a),(s=r.querySelector(Nk(e)))&&!s._p&&(a.instance=s,a.state.loading=5),tu.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},tu.set(e,n),s||h4e(r,e,n,a.state))),t&&i===null)throw Error(ct(528,""));return a}if(t&&i!==null)throw Error(ct(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=yx(n),n=Ly(r).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(ct(444,e))}}function Av(e){return'href="'+$c(e)+'"'}function Nk(e){return'link[rel="stylesheet"]['+e+"]"}function wme(e){return Zr({},e,{"data-precedence":e.precedence,precedence:null})}function h4e(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),eo(t,"link",n),Ea(t),e.head.appendChild(t))}function yx(e){return'[src="'+$c(e)+'"]'}function jk(e){return"script[async]"+e}function BH(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+$c(n.href)+'"]');if(i)return t.instance=i,Ea(i),i;var r=Zr({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ea(i),eo(i,"style",r),P2(i,n.precedence,e),t.instance=i;case"stylesheet":r=Av(n.href);var s=e.querySelector(Nk(r));if(s)return t.state.loading|=4,t.instance=s,Ea(s),s;i=wme(n),(r=tu.get(r))&&F9(i,r),s=(e.ownerDocument||e).createElement("link"),Ea(s);var a=s;return a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),eo(s,"link",i),t.state.loading|=4,P2(s,n.precedence,e),t.instance=s;case"script":return s=yx(n.src),(r=e.querySelector(jk(s)))?(t.instance=r,Ea(r),r):(i=n,(r=tu.get(s))&&(i=Zr({},n),B9(i,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ea(r),eo(r,"link",i),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(ct(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(i=t.instance,t.state.loading|=4,P2(i,n.precedence,e));return t.instance}function P2(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,s=r,a=0;a title"):null)}function p4e(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Sme(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function m4e(e,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var r=Av(i.href),s=t.querySelector(Nk(r));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=f_.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,Ea(s);return}s=t.ownerDocument||t,i=wme(i),(r=tu.get(r))&&F9(i,r),s=s.createElement("link"),Ea(s);var a=s;a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),eo(s,"link",i),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=f_.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var uD=0;function g4e(e,t){return e.stylesheets&&e.count===0&&M2(e,e.stylesheets),0uD?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}function f_(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)M2(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var h_=null;function M2(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,h_=new Map,t.forEach(b4e,e),h_=null,f_.call(e))}function b4e(e,t){if(!(t.state.loading&4)){var n=h_.get(e);if(n)var i=n.get(null);else{n=new Map,h_.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(jme)}catch(e){console.error(e)}}jme(),Ffe.exports=pj;var E4e=Ffe.exports;const C4e=ux(E4e),H9=m.createContext({});function Rj(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ij=m.createContext(null),rS=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class T4e extends m.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function A4e({children:e,isPresent:t}){const n=m.useId(),i=m.useRef(null),r=m.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=m.useContext(rS);return m.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u}=r.current;if(t||!i.current||!a||!l)return;i.current.dataset.motionPopId=n;const d=document.createElement("style");return s&&(d.nonce=s),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${a}px !important; @@ -99,361 +99,361 @@ Error generating stack: `+i.message+` top: ${c}px !important; left: ${u}px !important; } - `),()=>{document.head.removeChild(d)}},[t]),o.jsx(C4e,{isPresent:t,childRef:i,sizeRef:r,children:m.cloneElement(e,{ref:i})})}const A4e=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:s,mode:a})=>{const l=Dj(_4e),c=m.useId(),u=m.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;i&&i()},[l,i]),d=m.useMemo(()=>({id:c,initial:t,isPresent:n,custom:r,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),u]:[n,u]);return m.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),m.useEffect(()=>{!n&&!l.size&&i&&i()},[n]),a==="popLayout"&&(e=o.jsx(T4e,{isPresent:n,children:e})),o.jsx(Mj.Provider,{value:d,children:e})};function _4e(){return new Map}function Ime(e=!0){const t=m.useContext(Mj);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,s=m.useId();m.useEffect(()=>{e&&r(s)},[e]);const a=m.useCallback(()=>e&&i&&i(s),[s,i,e]);return!n&&i?[!1,a]:[!0]}const QC=e=>e.key||"";function YH(e){const t=[];return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const W9=typeof window<"u",Pme=W9?m.useLayoutEffect:m.useEffect,Iu=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:s="sync",propagate:a=!1})=>{const[l,c]=Ime(a),u=m.useMemo(()=>YH(e),[e]),d=a&&!l?[]:u.map(QC),f=m.useRef(!0),h=m.useRef(u),p=Dj(()=>new Map),[g,b]=m.useState(u),[v,y]=m.useState(u);Pme(()=>{f.current=!1,h.current=u;for(let O=0;O{const k=QC(O),S=a&&!l?!1:u===v||d.includes(k),E=()=>{if(p.has(k))p.set(k,!0);else return;let C=!0;p.forEach(N=>{N||(C=!1)}),C&&(w==null||w(),y(h.current),a&&(c==null||c()),i&&i())};return o.jsx(A4e,{isPresent:S,initial:!f.current||n?void 0:!1,custom:S?void 0:t,presenceAffectsLayout:r,mode:s,onExitComplete:S?void 0:E,children:O},k)})})},rc=e=>e;let Dme=rc;const N4e={useManualTiming:!1};function j4e(e){let t=new Set,n=new Set,i=!1,r=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&i?t:n;return d&&s.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[t,n]=[n,t],t.forEach(l),t.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const zC=["read","resolveKeyframes","update","preRender","render","postRender"],R4e=40;function Mme(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=zC.reduce((y,x)=>(y[x]=j4e(s),y),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=a,p=()=>{const y=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(y-r.timestamp,R4e),1),r.timestamp=y,r.isProcessing=!0,l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),h.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(p))},g=()=>{n=!0,i=!0,r.isProcessing||e(p)};return{schedule:zC.reduce((y,x)=>{const w=a[x];return y[x]=(O,k=!1,S=!1)=>(n||g(),w.schedule(O,k,S)),y},{}),cancel:y=>{for(let x=0;xZH[e].some(n=>!!t[n])};function I4e(e){for(const t in e)Pv[t]={...Pv[t],...e[t]}}const P4e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function v_(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||P4e.has(e)}let $me=e=>!v_(e);function Fme(e){e&&($me=t=>t.startsWith("on")?!v_(t):e(t))}try{Fme(require("@emotion/is-prop-valid").default)}catch{}function D4e(e,t,n){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||($me(r)||n===!0&&v_(r)||!t&&!v_(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}function M4e({children:e,isValidProp:t,...n}){t&&Fme(t),n={...m.useContext(cS),...n},n.isStatic=Dj(()=>n.isStatic);const i=m.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return o.jsx(cS.Provider,{value:i,children:e})}function L4e(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...i)=>e(...i);return new Proxy(n,{get:(i,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Lj=m.createContext({});function uS(e){return typeof e=="string"||Array.isArray(e)}function $j(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const K9=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],G9=["initial",...K9];function Fj(e){return $j(e.animate)||G9.some(t=>uS(e[t]))}function Bme(e){return!!(Fj(e)||e.variants)}function $4e(e,t){if(Fj(e)){const{initial:n,animate:i}=e;return{initial:n===!1||uS(n)?n:void 0,animate:uS(i)?i:void 0}}return e.inherit!==!1?t:{}}function F4e(e){const{initial:t,animate:n}=$4e(e,m.useContext(Lj));return m.useMemo(()=>({initial:t,animate:n}),[JH(t),JH(n)])}function JH(e){return Array.isArray(e)?e.join(" "):e}const B4e=Symbol.for("motionComponentSymbol");function wy(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function U4e(e,t,n){return m.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):wy(n)&&(n.current=i))},[t])}const X9=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Q4e="framerAppearId",Ume="data-"+X9(Q4e),{schedule:Y9}=Mme(queueMicrotask,!1),Qme=m.createContext({});function z4e(e,t,n,i,r){var s,a;const{visualElement:l}=m.useContext(Lj),c=m.useContext(Lme),u=m.useContext(Mj),d=m.useContext(cS).reducedMotion,f=m.useRef(null);i=i||c.renderer,!f.current&&i&&(f.current=i(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,p=m.useContext(Qme);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&V4e(f.current,n,r,p);const g=m.useRef(!1);m.useInsertionEffect(()=>{h&&g.current&&h.update(n,u)});const b=n[Ume],v=m.useRef(!!b&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,b))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,b)));return Pme(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Y9.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())}),m.useEffect(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,b)}),v.current=!1))}),h}function V4e(e,t,n,i){const{layoutId:r,layout:s,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:zme(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||l&&wy(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,layoutScroll:c,layoutRoot:u})}function zme(e){if(e)return e.options.allowProjection!==!1?e.projection:zme(e.parent)}function H4e({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:i,Component:r}){var s,a;e&&I4e(e);function l(u,d){let f;const h={...m.useContext(cS),...u,layoutId:q4e(u)},{isStatic:p}=h,g=F4e(u),b=i(u,p);if(!p&&W9){W4e();const v=K4e(h);f=v.MeasureLayout,g.visualElement=z4e(r,b,h,t,v.ProjectionNode)}return o.jsxs(Lj.Provider,{value:g,children:[f&&g.visualElement?o.jsx(f,{visualElement:g.visualElement,...h}):null,n(r,u,U4e(b,g.visualElement,d),b,p,g.visualElement)]})}l.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const c=m.forwardRef(l);return c[B4e]=r,c}function q4e({layoutId:e}){const t=m.useContext(q9).id;return t&&e!==void 0?t+"-"+e:e}function W4e(e,t){m.useContext(Lme).strict}function K4e(e){const{drag:t,layout:n}=Pv;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const G4e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Z9(e){return typeof e!="string"||e.includes("-")?!1:!!(G4e.indexOf(e)>-1||/[A-Z]/u.test(e))}function eq(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function J9(e,t,n,i){if(typeof t=="function"){const[r,s]=eq(i);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=eq(i);t=t(n!==void 0?n:e.custom,r,s)}return t}const z3=e=>Array.isArray(e),X4e=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Y4e=e=>z3(e)?e[e.length-1]||0:e,po=e=>!!(e&&e.getVelocity);function U2(e){const t=po(e)?e.get():e;return X4e(t)?t.toValue():t}function Z4e({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},i,r,s){const a={latestValues:J4e(i,r,s,e),renderState:t()};return n&&(a.onMount=l=>n({props:i,current:l,...a}),a.onUpdate=l=>n(l)),a}const Vme=e=>(t,n)=>{const i=m.useContext(Lj),r=m.useContext(Mj),s=()=>Z4e(e,t,i,r);return n?s():Dj(s)};function J4e(e,t,n,i){const r={},s=i(e,{});for(const h in s)r[h]=U2(s[h]);let{initial:a,animate:l}=e;const c=Fj(e),u=Bme(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!$j(f)){const h=Array.isArray(f)?f:[f];for(let p=0;pt=>typeof t=="string"&&t.startsWith(e),qme=Hme("--"),e6e=Hme("var(--"),eF=e=>e6e(e)?t6e.test(e.split("/*")[0].trim()):!1,t6e=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wme=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ch=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},dS={...kx,transform:e=>Ch(0,1,e)},VC={...kx,default:1},Dk=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),xp=Dk("deg"),$d=Dk("%"),_n=Dk("px"),n6e=Dk("vh"),i6e=Dk("vw"),tq={...$d,parse:e=>$d.parse(e)/100,transform:e=>$d.transform(e*100)},r6e={borderWidth:_n,borderTopWidth:_n,borderRightWidth:_n,borderBottomWidth:_n,borderLeftWidth:_n,borderRadius:_n,radius:_n,borderTopLeftRadius:_n,borderTopRightRadius:_n,borderBottomRightRadius:_n,borderBottomLeftRadius:_n,width:_n,maxWidth:_n,height:_n,maxHeight:_n,top:_n,right:_n,bottom:_n,left:_n,padding:_n,paddingTop:_n,paddingRight:_n,paddingBottom:_n,paddingLeft:_n,margin:_n,marginTop:_n,marginRight:_n,marginBottom:_n,marginLeft:_n,backgroundPositionX:_n,backgroundPositionY:_n},s6e={rotate:xp,rotateX:xp,rotateY:xp,rotateZ:xp,scale:VC,scaleX:VC,scaleY:VC,scaleZ:VC,skew:xp,skewX:xp,skewY:xp,distance:_n,translateX:_n,translateY:_n,translateZ:_n,x:_n,y:_n,z:_n,perspective:_n,transformPerspective:_n,opacity:dS,originX:tq,originY:tq,originZ:_n},nq={...kx,transform:Math.round},tF={...r6e,...s6e,zIndex:nq,size:_n,fillOpacity:dS,strokeOpacity:dS,numOctaves:nq},a6e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},o6e=Sx.length;function l6e(e,t,n){let i="",r=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}}),Kme=()=>({...rF(),attrs:{}}),sF=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Gme(e,{style:t,vars:n},i,r){Object.assign(e.style,t,r&&r.getProjectionStyles(i));for(const s in n)e.style.setProperty(s,n[s])}const Xme=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Yme(e,t,n,i){Gme(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(Xme.has(r)?r:X9(r),t.attrs[r])}const x_={};function h6e(e){Object.assign(x_,e)}function Zme(e,{layout:t,layoutId:n}){return Vb.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!x_[e]||e==="opacity")}function aF(e,t,n){var i;const{style:r}=e,s={};for(const a in r)(po(r[a])||t.style&&po(t.style[a])||Zme(a,e)||((i=n==null?void 0:n.getValue(a))===null||i===void 0?void 0:i.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function Jme(e,t,n){const i=aF(e,t,n);for(const r in e)if(po(e[r])||po(t[r])){const s=Sx.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=e[r]}return i}function p6e(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const rq=["x","y","width","height","cx","cy","r"],m6e={useVisualState:Vme({scrapeMotionValuesFromProps:Jme,createRenderState:Kme,onUpdate:({props:e,prevProps:t,current:n,renderState:i,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const l in r)if(Vb.has(l)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let l=0;l{p6e(n,i),Zr.render(()=>{iF(i,r,sF(n.tagName),e.transformTemplate),Yme(n,i)})})}})},g6e={useVisualState:Vme({scrapeMotionValuesFromProps:aF,createRenderState:rF})};function ege(e,t,n){for(const i in t)!po(t[i])&&!Zme(i,n)&&(e[i]=t[i])}function b6e({transformTemplate:e},t){return m.useMemo(()=>{const n=rF();return nF(n,t,e),Object.assign({},n.vars,n.style)},[t])}function y6e(e,t){const n=e.style||{},i={};return ege(i,n,e),Object.assign(i,b6e(e,t)),i}function v6e(e,t){const n={},i=y6e(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}function x6e(e,t,n,i){const r=m.useMemo(()=>{const s=Kme();return iF(s,t,sF(i),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};ege(s,e.style,e),r.style={...s,...r.style}}return r}function O6e(e=!1){return(n,i,r,{latestValues:s},a)=>{const c=(Z9(n)?x6e:v6e)(i,s,a,n),u=D4e(i,typeof n=="string",e),d=n!==m.Fragment?{...u,...c,ref:r}:{},{children:f}=i,h=m.useMemo(()=>po(f)?f.get():f,[f]);return m.createElement(n,{...d,children:h})}}function w6e(e,t){return function(i,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...Z9(i)?m6e:g6e,preloadedFeatures:e,useRender:O6e(r),createVisualElement:t,Component:i};return H4e(a)}}function tge(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i(Q2===void 0&&Fd.set(Ha.isProcessing||N4e.useManualTiming?Ha.timestamp:performance.now()),Q2),set:e=>{Q2=e,queueMicrotask(S6e)}};function lF(e,t){e.indexOf(t)===-1&&e.push(t)}function cF(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class uF{constructor(){this.subscriptions=[]}add(t){return lF(this.subscriptions,t),()=>cF(this.subscriptions,t)}notify(t,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,i);else for(let s=0;s!isNaN(parseFloat(e));class E6e{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,r=!0)=>{const s=Fd.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Fd.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=k6e(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new uF);const i=this.events[t].add(n);return t==="change"?()=>{i(),Zr.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Fd.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>sq)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,sq);return ige(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fS(e,t){return new E6e(e,t)}function C6e(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fS(n))}function T6e(e,t){const n=Bj(e,t);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const a in s){const l=Y4e(s[a]);C6e(e,a,l)}}function A6e(e){return!!(po(e)&&e.add)}function V3(e,t){const n=e.getValue("willChange");if(A6e(n))return n.add(t)}function rge(e){return e.props[Ume]}function dF(e){let t;return()=>(t===void 0&&(t=e()),t)}const _6e=dF(()=>window.ScrollTimeline!==void 0);class N6e{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let i=0;i{if(_6e()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{i.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class j6e extends N6e{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const lh=e=>e*1e3,ch=e=>e/1e3;function fF(e){return typeof e=="function"}function aq(e,t){e.timeline=t,e.onfinish=null}const hF=e=>Array.isArray(e)&&typeof e[0]=="number",R6e={linearEasing:void 0};function I6e(e,t){const n=dF(e);return()=>{var i;return(i=R6e[t])!==null&&i!==void 0?i:n()}}const O_=I6e(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dv=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i},sge=(e,t,n=10)=>{let i="";const r=Math.max(Math.round(t/n),2);for(let s=0;s`cubic-bezier(${e}, ${t}, ${n}, ${i})`,H3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:AO([0,.65,.55,1]),circOut:AO([.55,0,1,.45]),backIn:AO([.31,.01,.66,-.59]),backOut:AO([.33,1.53,.69,.99])};function oge(e,t){if(e)return typeof e=="function"&&O_()?sge(e,t):hF(e)?AO(e):Array.isArray(e)?e.map(n=>oge(n,t)||H3.easeOut):H3[e]}const lge=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,P6e=1e-7,D6e=12;function M6e(e,t,n,i,r){let s,a,l=0;do a=t+(n-t)/2,s=lge(a,i,r)-e,s>0?n=a:t=a;while(Math.abs(s)>P6e&&++lM6e(s,0,1,e,n);return s=>s===0||s===1?s:lge(r(s),t,i)}const cge=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uge=e=>t=>1-e(1-t),dge=Mk(.33,1.53,.69,.99),pF=uge(dge),fge=cge(pF),hge=e=>(e*=2)<1?.5*pF(e):.5*(2-Math.pow(2,-10*(e-1))),mF=e=>1-Math.sin(Math.acos(e)),pge=uge(mF),mge=cge(mF),gge=e=>/^0[^.\s]+$/u.test(e);function L6e(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||gge(e):!0}const hw=e=>Math.round(e*1e5)/1e5,gF=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $6e(e){return e==null}const F6e=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bF=(e,t)=>n=>!!(typeof n=="string"&&F6e.test(n)&&n.startsWith(e)||t&&!$6e(n)&&Object.prototype.hasOwnProperty.call(n,t)),bge=(e,t,n)=>i=>{if(typeof i!="string")return i;const[r,s,a,l]=i.match(gF);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},B6e=e=>Ch(0,255,e),pD={...kx,transform:e=>Math.round(B6e(e))},Mg={test:bF("rgb","red"),parse:bge("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+pD.transform(e)+", "+pD.transform(t)+", "+pD.transform(n)+", "+hw(dS.transform(i))+")"};function U6e(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const q3={test:bF("#"),parse:U6e,transform:Mg.transform},Sy={test:bF("hsl","hue"),parse:bge("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+$d.transform(hw(t))+", "+$d.transform(hw(n))+", "+hw(dS.transform(i))+")"},uo={test:e=>Mg.test(e)||q3.test(e)||Sy.test(e),parse:e=>Mg.test(e)?Mg.parse(e):Sy.test(e)?Sy.parse(e):q3.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Mg.transform(e):Sy.transform(e)},Q6e=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function z6e(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gF))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Q6e))===null||n===void 0?void 0:n.length)||0)>0}const yge="number",vge="color",V6e="var",H6e="var(",oq="${}",q6e=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function hS(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const l=t.replace(q6e,c=>(uo.test(c)?(i.color.push(s),r.push(vge),n.push(uo.parse(c))):c.startsWith(H6e)?(i.var.push(s),r.push(V6e),n.push(c)):(i.number.push(s),r.push(yge),n.push(parseFloat(c))),++s,oq)).split(oq);return{values:n,split:l,indexes:i,types:r}}function xge(e){return hS(e).values}function Oge(e){const{split:t,types:n}=hS(e),i=t.length;return r=>{let s="";for(let a=0;atypeof e=="number"?0:e;function K6e(e){const t=xge(e);return Oge(e)(t.map(W6e))}const ym={test:z6e,parse:xge,createTransformer:Oge,getAnimatableNone:K6e},G6e=new Set(["brightness","contrast","saturate","opacity"]);function X6e(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(gF)||[];if(!i)return e;const r=n.replace(i,"");let s=G6e.has(t)?1:0;return i!==n&&(s*=100),t+"("+s+r+")"}const Y6e=/\b([a-z-]*)\(.*?\)/gu,W3={...ym,getAnimatableNone:e=>{const t=e.match(Y6e);return t?t.map(X6e).join(" "):e}},Z6e={...tF,color:uo,backgroundColor:uo,outlineColor:uo,fill:uo,stroke:uo,borderColor:uo,borderTopColor:uo,borderRightColor:uo,borderBottomColor:uo,borderLeftColor:uo,filter:W3,WebkitFilter:W3},yF=e=>Z6e[e];function wge(e,t){let n=yF(e);return n!==W3&&(n=ym),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const J6e=new Set(["auto","none","0"]);function e$e(e,t,n){let i=0,r;for(;ie===kx||e===_n,cq=(e,t)=>parseFloat(e.split(", ")[t]),uq=(e,t)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return cq(r[1],t);{const s=i.match(/^matrix\((.+)\)$/u);return s?cq(s[1],e):0}},t$e=new Set(["x","y","z"]),n$e=Sx.filter(e=>!t$e.has(e));function i$e(e){const t=[];return n$e.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Mv={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:uq(4,13),y:uq(5,14)};Mv.translateX=Mv.x;Mv.translateY=Mv.y;const eb=new Set;let K3=!1,G3=!1;function Sge(){if(G3){const e=Array.from(eb).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const r=i$e(i);r.length&&(n.set(i,r),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([s,a])=>{var l;(l=i.getValue(s))===null||l===void 0||l.set(a)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}G3=!1,K3=!1,eb.forEach(e=>e.complete()),eb.clear()}function kge(){eb.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(G3=!0)})}function r$e(){kge(),Sge()}class vF{constructor(t,n,i,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(eb.add(this),K3||(K3=!0,Zr.read(kge),Zr.resolveKeyframes(Sge))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:r}=this;for(let s=0;s/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),s$e=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function a$e(e){const t=s$e.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${n??i}`,r]}function Cge(e,t,n=1){const[i,r]=a$e(e);if(!i)return;const s=window.getComputedStyle(t).getPropertyValue(i);if(s){const a=s.trim();return Ege(a)?parseFloat(a):a}return eF(r)?Cge(r,t,n+1):r}const Tge=e=>t=>t.test(e),o$e={test:e=>e==="auto",parse:e=>e},Age=[kx,_n,$d,xp,i6e,n6e,o$e],dq=e=>Age.find(Tge(e));class _ge extends vF{constructor(t,n,i,r,s){super(t,n,i,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const fq=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ym.test(e)||e==="0")&&!e.startsWith("url("));function l$e(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function Uj(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(u$e),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||i===void 0?r[s]:i}const d$e=40;class Nge{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Fd.now(),this.options={autoplay:t,delay:n,type:i,repeat:r,repeatDelay:s,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>d$e?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&r$e(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Fd.now(),this.hasAttemptedResolve=!0;const{name:i,type:r,velocity:s,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!c$e(t,i,r,s))if(a)this.options.duration=0;else{c&&c(Uj(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const X3=2e4;function jge(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t=X3?1/0:t}const ys=(e,t,n)=>e+(t-e)*n;function mD(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function f$e({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,s=0,a=0;if(!t)r=s=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=mD(c,l,e+1/3),s=mD(c,l,e),a=mD(c,l,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:i}}function w_(e,t){return n=>n>0?t:e}const gD=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},h$e=[q3,Mg,Sy],p$e=e=>h$e.find(t=>t.test(e));function hq(e){const t=p$e(e);if(!t)return!1;let n=t.parse(e);return t===Sy&&(n=f$e(n)),n}const pq=(e,t)=>{const n=hq(e),i=hq(t);if(!n||!i)return w_(e,t);const r={...n};return s=>(r.red=gD(n.red,i.red,s),r.green=gD(n.green,i.green,s),r.blue=gD(n.blue,i.blue,s),r.alpha=ys(n.alpha,i.alpha,s),Mg.transform(r))},m$e=(e,t)=>n=>t(e(n)),Lk=(...e)=>e.reduce(m$e),Y3=new Set(["none","hidden"]);function g$e(e,t){return Y3.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function b$e(e,t){return n=>ys(e,t,n)}function xF(e){return typeof e=="number"?b$e:typeof e=="string"?eF(e)?w_:uo.test(e)?pq:x$e:Array.isArray(e)?Rge:typeof e=="object"?uo.test(e)?pq:y$e:w_}function Rge(e,t){const n=[...e],i=n.length,r=e.map((s,a)=>xF(s)(s,t[a]));return s=>{for(let a=0;a{for(const s in i)n[s]=i[s](r);return n}}function v$e(e,t){var n;const i=[],r={color:0,var:0,number:0};for(let s=0;s{const n=ym.createTransformer(t),i=hS(e),r=hS(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Y3.has(e)&&!r.values.length||Y3.has(t)&&!i.values.length?g$e(e,t):Lk(Rge(v$e(i,r),r.values),n):w_(e,t)};function Ige(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ys(e,t,n):xF(e)(e,t)}const O$e=5;function Pge(e,t,n){const i=Math.max(t-O$e,0);return ige(n-e(i),t-i)}const Cs={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},bD=.001;function w$e({duration:e=Cs.duration,bounce:t=Cs.bounce,velocity:n=Cs.velocity,mass:i=Cs.mass}){let r,s,a=1-t;a=Ch(Cs.minDamping,Cs.maxDamping,a),e=Ch(Cs.minDuration,Cs.maxDuration,ch(e)),a<1?(r=u=>{const d=u*a,f=d*e,h=d-n,p=Z3(u,a),g=Math.exp(-f);return bD-h/p*g},s=u=>{const f=u*a*e,h=f*n+n,p=Math.pow(a,2)*Math.pow(u,2)*e,g=Math.exp(-f),b=Z3(Math.pow(u,2),a);return(-r(u)+bD>0?-1:1)*((h-p)*g)/b}):(r=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-bD+d*f},s=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=k$e(r,s,l);if(e=lh(e),isNaN(c))return{stiffness:Cs.stiffness,damping:Cs.damping,duration:e};{const u=Math.pow(c,2)*i;return{stiffness:u,damping:a*2*Math.sqrt(i*u),duration:e}}}const S$e=12;function k$e(e,t,n){let i=n;for(let r=1;re[n]!==void 0)}function T$e(e){let t={velocity:Cs.velocity,stiffness:Cs.stiffness,damping:Cs.damping,mass:Cs.mass,isResolvedFromDuration:!1,...e};if(!mq(e,C$e)&&mq(e,E$e))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,s=2*Ch(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:Cs.mass,stiffness:r,damping:s}}else{const n=w$e(e);t={...t,...n,mass:Cs.mass},t.isResolvedFromDuration=!0}return t}function Dge(e=Cs.visualDuration,t=Cs.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=T$e({...n,velocity:-ch(n.velocity||0)}),g=h||0,b=u/(2*Math.sqrt(c*d)),v=a-s,y=ch(Math.sqrt(c/d)),x=Math.abs(v)<5;i||(i=x?Cs.restSpeed.granular:Cs.restSpeed.default),r||(r=x?Cs.restDelta.granular:Cs.restDelta.default);let w;if(b<1){const k=Z3(y,b);w=S=>{const E=Math.exp(-b*y*S);return a-E*((g+b*y*v)/k*Math.sin(k*S)+v*Math.cos(k*S))}}else if(b===1)w=k=>a-Math.exp(-y*k)*(v+(g+y*v)*k);else{const k=y*Math.sqrt(b*b-1);w=S=>{const E=Math.exp(-b*y*S),C=Math.min(k*S,300);return a-E*((g+b*y*v)*Math.sinh(C)+k*v*Math.cosh(C))/k}}const O={calculatedDuration:p&&f||null,next:k=>{const S=w(k);if(p)l.done=k>=f;else{let E=0;b<1&&(E=k===0?lh(g):Pge(w,k,S));const C=Math.abs(E)<=i,N=Math.abs(a-S)<=r;l.done=C&&N}return l.value=l.done?a:S,l},toString:()=>{const k=Math.min(jge(O),X3),S=sge(E=>O.next(k*E).value,k,30);return k+"ms "+S}};return O}function gq({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=C=>l!==void 0&&Cc,g=C=>l===void 0?c:c===void 0||Math.abs(l-C)-b*Math.exp(-C/i),w=C=>y+x(C),O=C=>{const N=x(C),_=w(C);h.done=Math.abs(N)<=u,h.value=h.done?y:_};let k,S;const E=C=>{p(h.value)&&(k=C,S=Dge({keyframes:[h.value,g(h.value)],velocity:Pge(w,C,h.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:C=>{let N=!1;return!S&&k===void 0&&(N=!0,O(C),E(C)),k!==void 0&&C>=k?S.next(C-k):(!N&&O(C),h)}}}const A$e=Mk(.42,0,1,1),_$e=Mk(0,0,.58,1),Mge=Mk(.42,0,.58,1),N$e=e=>Array.isArray(e)&&typeof e[0]!="number",j$e={linear:rc,easeIn:A$e,easeInOut:Mge,easeOut:_$e,circIn:mF,circInOut:mge,circOut:pge,backIn:pF,backInOut:fge,backOut:dge,anticipate:hge},bq=e=>{if(hF(e)){Dme(e.length===4);const[t,n,i,r]=e;return Mk(t,n,i,r)}else if(typeof e=="string")return j$e[e];return e};function R$e(e,t,n){const i=[],r=n||Ige,s=e.length-1;for(let a=0;at[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=R$e(t,i,r),c=l.length,u=d=>{if(a&&d1)for(;fu(Ch(e[0],e[s-1],d)):u}function P$e(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=Dv(0,t,i);e.push(ys(n,1,r))}}function D$e(e){const t=[0];return P$e(t,e.length-1),t}function M$e(e,t){return e.map(n=>n*t)}function L$e(e,t){return e.map(()=>t||Mge).splice(0,e.length-1)}function S_({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=N$e(i)?i.map(bq):bq(i),s={done:!1,value:t[0]},a=M$e(n&&n.length===t.length?n:D$e(t),e),l=I$e(a,t,{ease:Array.isArray(r)?r:L$e(t,r)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const $$e=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Zr.update(t,!0),stop:()=>bm(t),now:()=>Ha.isProcessing?Ha.timestamp:Fd.now()}},F$e={decay:gq,inertia:gq,tween:S_,keyframes:S_,spring:Dge},B$e=e=>e/100;class OF extends Nge{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:i,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||vF,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(s,l,n,i,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,l=fF(n)?n:F$e[n]||S_;let c,u;l!==S_&&typeof t[0]!="number"&&(c=Lk(B$e,Ige(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});s==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=jge(d));const{calculatedDuration:f}=d,h=f+r,p=h*(i+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:i}=this;if(!i){const{keyframes:C}=this.options;return{done:!0,value:C[C.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=i;if(this.startTime===null)return s.next(0);const{delay:h,repeat:p,repeatType:g,repeatDelay:b,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>d;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,O=s;if(p){const C=Math.min(this.currentTime,d)/f;let N=Math.floor(C),_=C%1;!_&&C>=1&&(_=1),_===1&&N--,N=Math.min(N,p+1),!!(N%2)&&(g==="reverse"?(_=1-_,b&&(_-=b/f)):g==="mirror"&&(O=a)),w=Ch(0,1,_)*f}const k=x?{done:!1,value:c[0]}:O.next(w);l&&(k.value=l(k.value));let{done:S}=k;!x&&u!==null&&(S=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return E&&r!==void 0&&(k.value=Uj(c,this.options,r)),v&&v(k.value),E&&this.finish(),k}get duration(){const{resolved:t}=this;return t?ch(t.calculatedDuration):0}get time(){return ch(this.currentTime)}set time(t){t=lh(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ch(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=$$e,onPlay:n,startTime:i}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=i??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const U$e=new Set(["opacity","clipPath","filter","transform"]);function Q$e(e,t,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=oge(l,r);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const z$e=dF(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),k_=10,V$e=2e4;function H$e(e){return fF(e.type)||e.type==="spring"||!age(e.ease)}function q$e(e,t){const n=new OF({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:e[0]};const r=[];let s=0;for(;!i.done&&sthis.onKeyframesResolved(a,l),n,i,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:i=300,times:r,ease:s,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof s=="string"&&O_()&&W$e(s)&&(s=Lge[s]),H$e(this.options)){const{onComplete:f,onUpdate:h,motionValue:p,element:g,...b}=this.options,v=q$e(t,b);t=v.keyframes,t.length===1&&(t[1]=t[0]),i=v.duration,r=v.times,s=v.ease,a="keyframes"}const d=Q$e(l.owner.current,c,t,{...this.options,duration:i,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(aq(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(Uj(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:r,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ch(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ch(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.currentTime=lh(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return rc;const{animation:i}=n;aq(i,t)}return rc}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:i,duration:r,type:s,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...p}=this.options,g=new OF({...p,keyframes:i,duration:r,type:s,ease:a,times:l,isGenerator:!0}),b=lh(this.time);u.setWithVelocity(g.sample(b-k_).value,g.sample(b).value,k_)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:i,repeatDelay:r,repeatType:s,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return z$e()&&i&&U$e.has(i)&&!c&&!u&&!r&&s!=="mirror"&&a!==0&&l!=="inertia"}}const K$e={type:"spring",stiffness:500,damping:25,restSpeed:10},G$e=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),X$e={type:"keyframes",duration:.8},Y$e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Z$e=(e,{keyframes:t})=>t.length>2?X$e:Vb.has(e)?e.startsWith("scale")?G$e(t[1]):K$e:Y$e;function J$e({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const wF=(e,t,n,i={},r,s)=>a=>{const l=oF(i,e)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u=u-lh(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:r};J$e(l)||(d={...d,...Z$e(e,d)}),d.duration&&(d.duration=lh(d.duration)),d.repeatDelay&&(d.repeatDelay=lh(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const h=Uj(d.keyframes,l);if(h!==void 0)return Zr.update(()=>{d.onUpdate(h),d.onComplete()}),new j6e([])}return!s&&yq.supports(d)?new yq(d):new OF(d)};function e8e({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function $ge(e,t,{delay:n=0,transitionOverride:i,type:r}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;i&&(a=i);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const f in c){const h=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),p=c[f];if(p===void 0||d&&e8e(d,f))continue;const g={delay:n,...oF(a||{},f)};let b=!1;if(window.MotionHandoffAnimation){const y=rge(e);if(y){const x=window.MotionHandoffAnimation(y,f,Zr);x!==null&&(g.startTime=x,b=!0)}}V3(e,f),h.start(wF(f,h,p,e.shouldReduceMotion&&nge.has(f)?{type:!1}:g,e,b));const v=h.animation;v&&u.push(v)}return l&&Promise.all(u).then(()=>{Zr.update(()=>{l&&T6e(e,l)})}),u}function J3(e,t,n={}){var i;const r=Bj(e,t,n.type==="exit"?(i=e.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const a=r?()=>Promise.all($ge(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return t8e(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[u,d]=c==="beforeChildren"?[a,l]:[l,a];return u().then(()=>d())}else return Promise.all([a(),l(n.delay)])}function t8e(e,t,n=0,i=0,r=1,s){const a=[],l=(e.variantChildren.size-1)*i,c=r===1?(u=0)=>u*i:(u=0)=>l-u*i;return Array.from(e.variantChildren).sort(n8e).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(J3(u,t,{...s,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function n8e(e,t){return e.sortNodePosition(t)}function i8e(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const r=t.map(s=>J3(e,s,n));i=Promise.all(r)}else if(typeof t=="string")i=J3(e,t,n);else{const r=typeof t=="function"?Bj(e,t,n.custom):t;i=Promise.all($ge(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const r8e=G9.length;function Fge(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Fge(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:i})=>i8e(e,n,i)))}function l8e(e){let t=o8e(e),n=vq(),i=!0;const r=c=>(u,d)=>{var f;const h=Bj(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:g,...b}=h;u={...u,...b,...g}}return u};function s(c){t=c(e)}function a(c){const{props:u}=e,d=Fge(e.parent)||{},f=[],h=new Set;let p={},g=1/0;for(let v=0;vg&&O,N=!1;const _=Array.isArray(w)?w:[w];let j=_.reduce(r(y),{});k===!1&&(j={});const{prevResolvedValues:T={}}=x,L={...T,...j},A=$=>{C=!0,h.has($)&&(N=!0,h.delete($)),x.needsAnimating[$]=!0;const M=e.getValue($);M&&(M.liveStyle=!1)};for(const $ in L){const M=j[$],B=T[$];if(p.hasOwnProperty($))continue;let I=!1;z3(M)&&z3(B)?I=!tge(M,B):I=M!==B,I?M!=null?A($):h.add($):M!==void 0&&h.has($)?A($):x.protectedKeys[$]=!0}x.prevProp=w,x.prevResolvedValues=j,x.isActive&&(p={...p,...j}),i&&e.blockInitialAnimation&&(C=!1),C&&(!(S&&E)||N)&&f.push(..._.map($=>({animation:$,options:{type:y}})))}if(h.size){const v={};h.forEach(y=>{const x=e.getBaseTarget(y),w=e.getValue(y);w&&(w.liveStyle=!0),v[y]=x??null}),f.push({animation:v})}let b=!!f.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(b=!1),i=!1,b?t(f):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=a(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=vq(),i=!0}}}function c8e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!tge(t,e):!1}function ig(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vq(){return{animate:ig(!0),whileInView:ig(),whileHover:ig(),whileTap:ig(),whileDrag:ig(),whileFocus:ig(),exit:ig()}}class Um{constructor(t){this.isMounted=!1,this.node=t}update(){}}class u8e extends Um{constructor(t){super(t),t.animationState||(t.animationState=l8e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();$j(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let d8e=0;class f8e extends Um{constructor(){super(...arguments),this.id=d8e++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const h8e={animation:{Feature:u8e},exit:{Feature:f8e}},xu={x:!1,y:!1};function Bge(){return xu.x||xu.y}function p8e(e){return e==="x"||e==="y"?xu[e]?null:(xu[e]=!0,()=>{xu[e]=!1}):xu.x||xu.y?null:(xu.x=xu.y=!0,()=>{xu.x=xu.y=!1})}const SF=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function pS(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function $k(e){return{point:{x:e.pageX,y:e.pageY}}}const m8e=e=>t=>SF(t)&&e(t,$k(t));function pw(e,t,n,i){return pS(e,t,m8e(n),i)}const xq=(e,t)=>Math.abs(e-t);function g8e(e,t){const n=xq(e.x,t.x),i=xq(e.y,t.y);return Math.sqrt(n**2+i**2)}class Uge{constructor(t,n,{transformPagePoint:i,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=vD(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=g8e(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:g}=f,{timestamp:b}=Ha;this.history.push({...g,timestamp:b});const{onStart:v,onMove:y}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=yD(h,this.transformPagePoint),Zr.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=vD(f.type==="pointercancel"?this.lastMoveEventInfo:yD(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),g&&g(f,v)},!SF(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.contextWindow=r||window;const a=$k(t),l=yD(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Ha;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,vD(l,this.history)),this.removeListeners=Lk(pw(this.contextWindow,"pointermove",this.handlePointerMove),pw(this.contextWindow,"pointerup",this.handlePointerUp),pw(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),bm(this.updatePoint)}}function yD(e,t){return t?{point:t(e.point)}:e}function Oq(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vD({point:e},t){return{point:e,delta:Oq(e,Qge(t)),offset:Oq(e,b8e(t)),velocity:y8e(t,.1)}}function b8e(e){return e[0]}function Qge(e){return e[e.length-1]}function y8e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=Qge(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>lh(t)));)n--;if(!i)return{x:0,y:0};const s=ch(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const zge=1e-4,v8e=1-zge,x8e=1+zge,Vge=.01,O8e=0-Vge,w8e=0+Vge;function uc(e){return e.max-e.min}function S8e(e,t,n){return Math.abs(e-t)<=n}function wq(e,t,n,i=.5){e.origin=i,e.originPoint=ys(t.min,t.max,e.origin),e.scale=uc(n)/uc(t),e.translate=ys(n.min,n.max,e.origin)-e.originPoint,(e.scale>=v8e&&e.scale<=x8e||isNaN(e.scale))&&(e.scale=1),(e.translate>=O8e&&e.translate<=w8e||isNaN(e.translate))&&(e.translate=0)}function mw(e,t,n,i){wq(e.x,t.x,n.x,i?i.originX:void 0),wq(e.y,t.y,n.y,i?i.originY:void 0)}function Sq(e,t,n){e.min=n.min+t.min,e.max=e.min+uc(t)}function k8e(e,t,n){Sq(e.x,t.x,n.x),Sq(e.y,t.y,n.y)}function kq(e,t,n){e.min=t.min-n.min,e.max=e.min+uc(t)}function gw(e,t,n){kq(e.x,t.x,n.x),kq(e.y,t.y,n.y)}function E8e(e,{min:t,max:n},i){return t!==void 0&&en&&(e=i?ys(n,e,i.max):Math.min(e,n)),e}function Eq(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function C8e(e,{top:t,left:n,bottom:i,right:r}){return{x:Eq(e.x,n,r),y:Eq(e.y,t,i)}}function Cq(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.mini?n=Dv(t.min,t.max-i,e.min):i>r&&(n=Dv(e.min,e.max-r,t.min)),Ch(0,1,n)}function _8e(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const e4=.35;function N8e(e=e4){return e===!1?e=0:e===!0&&(e=e4),{x:Tq(e,"left","right"),y:Tq(e,"top","bottom")}}function Tq(e,t,n){return{min:Aq(e,t),max:Aq(e,n)}}function Aq(e,t){return typeof e=="number"?e:e[t]||0}const _q=()=>({translate:0,scale:1,origin:0,originPoint:0}),ky=()=>({x:_q(),y:_q()}),Nq=()=>({min:0,max:0}),Ds=()=>({x:Nq(),y:Nq()});function Rc(e){return[e("x"),e("y")]}function Hge({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function j8e({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function R8e(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function xD(e){return e===void 0||e===1}function t4({scale:e,scaleX:t,scaleY:n}){return!xD(e)||!xD(t)||!xD(n)}function vg(e){return t4(e)||qge(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qge(e){return jq(e.x)||jq(e.y)}function jq(e){return e&&e!=="0%"}function E_(e,t,n){const i=e-n,r=t*i;return n+r}function Rq(e,t,n,i,r){return r!==void 0&&(e=E_(e,r,i)),E_(e,n,i)+t}function n4(e,t=0,n=1,i,r){e.min=Rq(e.min,t,n,i,r),e.max=Rq(e.max,t,n,i,r)}function Wge(e,{x:t,y:n}){n4(e.x,t.translate,t.scale,t.originPoint),n4(e.y,n.translate,n.scale,n.originPoint)}const Iq=.999999999999,Pq=1.0000000000001;function I8e(e,t,n,i=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let l=0;lIq&&(t.x=1),t.yIq&&(t.y=1)}function Ey(e,t){e.min=e.min+t,e.max=e.max+t}function Dq(e,t,n,i,r=.5){const s=ys(e.min,e.max,r);n4(e,t,n,s,i)}function Cy(e,t){Dq(e.x,t.x,t.scaleX,t.scale,t.originX),Dq(e.y,t.y,t.scaleY,t.scale,t.originY)}function Kge(e,t){return Hge(R8e(e.getBoundingClientRect(),t))}function P8e(e,t,n){const i=Kge(e,n),{scroll:r}=t;return r&&(Ey(i.x,r.offset.x),Ey(i.y,r.offset.y)),i}const Gge=({current:e})=>e?e.ownerDocument.defaultView:null,D8e=new WeakMap;class M8e{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ds(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($k(d).point)},s=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=p8e(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Rc(v=>{let y=this.getAxisMotionValue(v).get()||0;if($d.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[v];w&&(y=uc(w)*(parseFloat(y)/100))}}this.originPoint[v]=y}),g&&Zr.postRender(()=>g(d,f)),V3(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:b}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=L8e(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),b&&b(d,f)},l=(d,f)=>this.stop(d,f),c=()=>Rc(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Uge(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Gge(this.visualElement)})}stop(t,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&Zr.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:r}=this.getProps();if(!i||!HC(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(a=E8e(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&wy(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=C8e(r.layoutBox,n):this.constraints=!1,this.elastic=N8e(i),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Rc(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=_8e(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!wy(t))return!1;const i=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=P8e(i,r.root,this.visualElement.getTransformPagePoint());let a=T8e(r.layout.layoutBox,s);if(n){const l=n(j8e(a));this.hasMutatedConstraints=!!l,l&&(a=Hge(l))}return a}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Rc(d=>{if(!HC(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const h=r?200:1e6,p=r?40:1e7,g={type:"inertia",velocity:i?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return V3(this.visualElement,t),i.start(wF(t,i,0,n,this.visualElement,!1))}stopAnimation(){Rc(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Rc(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Rc(n=>{const{drag:i}=this.getProps();if(!HC(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:l}=r.layout.layoutBox[n];s.set(t[n]-ys(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!wy(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Rc(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();r[a]=A8e({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Rc(a=>{if(!HC(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(ys(c,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;D8e.set(this.visualElement,this);const t=this.visualElement.current,n=pw(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();wy(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Zr.read(i);const a=pS(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Rc(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=e4,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:l}}}function HC(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function L8e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $8e extends Um{constructor(t){super(t),this.removeGroupControls=rc,this.removeListeners=rc,this.controls=new M8e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||rc}unmount(){this.removeGroupControls(),this.removeListeners()}}const Mq=e=>(t,n)=>{e&&Zr.postRender(()=>e(t,n))};class F8e extends Um{constructor(){super(...arguments),this.removePointerDownListener=rc}onPointerDown(t){this.session=new Uge(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Gge(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:Mq(t),onStart:Mq(n),onMove:i,onEnd:(s,a)=>{delete this.session,r&&Zr.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=pw(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const z2={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Lq(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const M1={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(_n.test(e))e=parseFloat(e);else return e;const n=Lq(e,t.target.x),i=Lq(e,t.target.y);return`${n}% ${i}%`}},B8e={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=ym.parse(e);if(r.length>5)return i;const s=ym.createTransformer(e),a=typeof r[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;r[0+a]/=l,r[1+a]/=c;const u=ys(l,c,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class U8e extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=t;h6e(Q8e),s&&(n.group&&n.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),z2.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:r,isPresent:s}=this.props,a=i.projection;return a&&(a.isPresent=s,r||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Zr.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Y9.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Xge(e){const[t,n]=Ime(),i=m.useContext(q9);return o.jsx(U8e,{...e,layoutGroup:i,switchLayoutGroup:m.useContext(Qme),isPresent:t,safeToRemove:n})}const Q8e={borderRadius:{...M1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:M1,borderTopRightRadius:M1,borderBottomLeftRadius:M1,borderBottomRightRadius:M1,boxShadow:B8e};function z8e(e,t,n){const i=po(e)?e:fS(e);return i.start(wF("",i,t,n)),i.animation}function V8e(e){return e instanceof SVGElement&&e.tagName!=="svg"}const H8e=(e,t)=>e.depth-t.depth;class q8e{constructor(){this.children=[],this.isDirty=!1}add(t){lF(this.children,t),this.isDirty=!0}remove(t){cF(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(H8e),this.isDirty=!1,this.children.forEach(t)}}function W8e(e,t){const n=Fd.now(),i=({timestamp:r})=>{const s=r-n;s>=t&&(bm(i),e(s-t))};return Zr.read(i,!0),()=>bm(i)}const Yge=["TopLeft","TopRight","BottomLeft","BottomRight"],K8e=Yge.length,$q=e=>typeof e=="string"?parseFloat(e):e,Fq=e=>typeof e=="number"||_n.test(e);function G8e(e,t,n,i,r,s){r?(e.opacity=ys(0,n.opacity!==void 0?n.opacity:1,X8e(i)),e.opacityExit=ys(t.opacity!==void 0?t.opacity:1,0,Y8e(i))):s&&(e.opacity=ys(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,i));for(let a=0;ait?1:n(Dv(e,t,i))}function Uq(e,t){e.min=t.min,e.max=t.max}function Nc(e,t){Uq(e.x,t.x),Uq(e.y,t.y)}function Qq(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function zq(e,t,n,i,r){return e-=t,e=E_(e,1/n,i),r!==void 0&&(e=E_(e,1/r,i)),e}function Z8e(e,t=0,n=1,i=.5,r,s=e,a=e){if($d.test(t)&&(t=parseFloat(t),t=ys(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=ys(s.min,s.max,i);e===s&&(l-=t),e.min=zq(e.min,t,n,l,r),e.max=zq(e.max,t,n,l,r)}function Vq(e,t,[n,i,r],s,a){Z8e(e,t[n],t[i],t[r],t.scale,s,a)}const J8e=["x","scaleX","originX"],e9e=["y","scaleY","originY"];function Hq(e,t,n,i){Vq(e.x,t,J8e,n?n.x:void 0,i?i.x:void 0),Vq(e.y,t,e9e,n?n.y:void 0,i?i.y:void 0)}function qq(e){return e.translate===0&&e.scale===1}function Jge(e){return qq(e.x)&&qq(e.y)}function Wq(e,t){return e.min===t.min&&e.max===t.max}function t9e(e,t){return Wq(e.x,t.x)&&Wq(e.y,t.y)}function Kq(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ebe(e,t){return Kq(e.x,t.x)&&Kq(e.y,t.y)}function Gq(e){return uc(e.x)/uc(e.y)}function Xq(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class n9e{constructor(){this.members=[]}add(t){lF(this.members,t),t.scheduleRender()}remove(t){if(cF(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function i9e(e,t,n){let i="";const r=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(i=`translate3d(${r}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:g}=n;u&&(i=`perspective(${u}px) ${i}`),d&&(i+=`rotate(${d}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `),p&&(i+=`skewX(${p}deg) `),g&&(i+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(i+=`scale(${l}, ${c})`),i||"none"}const xg={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},_O=typeof window<"u"&&window.MotionDebug!==void 0,OD=["","X","Y","Z"],r9e={visibility:"hidden"},Yq=1e3;let s9e=0;function wD(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function tbe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rge(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Zr,!(r||s))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&tbe(i)}function nbe({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(a={},l=t==null?void 0:t()){this.id=s9e++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,_O&&(xg.totalNodes=xg.resolvedTargetDeltas=xg.recalculatedProjection=0),this.nodes.forEach(l9e),this.nodes.forEach(h9e),this.nodes.forEach(p9e),this.nodes.forEach(c9e),_O&&window.MotionDebug.record(xg)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=W8e(h,250),z2.hasAnimatedSinceResize&&(z2.hasAnimatedSinceResize=!1,this.nodes.forEach(Jq))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||d.getDefaultTransition()||v9e,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=d.getProps(),x=!this.targetLayout||!ebe(this.targetLayout,g)||p,w=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const O={...oF(b,"layout"),onPlay:v,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else h||Jq(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,bm(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(m9e),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&tbe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const k=O/1e3;eW(f.x,a.x,k),eW(f.y,a.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gw(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),b9e(this.relativeTarget,this.relativeTargetOrigin,h,k),w&&t9e(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ds()),Nc(w,this.relativeTarget)),b&&(this.animationValues=d,G8e(d,u,this.latestValues,k,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(bm(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Zr.update(()=>{z2.hasAnimatedSinceResize=!0,this.currentAnimation=z8e(0,Yq,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Yq),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&ibe(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Ds();const f=uc(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const h=uc(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+h}Nc(l,c),Cy(l,d),mw(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new n9e),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&wD("z",a,u,this.animationValues);for(let d=0;d{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(Zq),this.root.sharedNodes.clear()}}}function a9e(e){e.updateLayout()}function o9e(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=e.layout,{animationType:s}=e.options,a=n.source!==e.layout.source;s==="size"?Rc(f=>{const h=a?n.measuredBox[f]:n.layoutBox[f],p=uc(h);h.min=i[f].min,h.max=h.min+p}):ibe(s,n.layoutBox,i)&&Rc(f=>{const h=a?n.measuredBox[f]:n.layoutBox[f],p=uc(i[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const l=ky();mw(l,i,n.layoutBox);const c=ky();a?mw(c,e.applyTransform(r,!0),n.measuredBox):mw(c,i,n.layoutBox);const u=!Jge(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const g=Ds();gw(g,n.layoutBox,h.layoutBox);const b=Ds();gw(b,i,p.layoutBox),ebe(g,b)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function l9e(e){_O&&xg.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function c9e(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function u9e(e){e.clearSnapshot()}function Zq(e){e.clearMeasurements()}function d9e(e){e.isLayoutDirty=!1}function f9e(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Jq(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function h9e(e){e.resolveTargetDelta()}function p9e(e){e.calcProjection()}function m9e(e){e.resetSkewAndRotation()}function g9e(e){e.removeLeadSnapshot()}function eW(e,t,n){e.translate=ys(t.translate,0,n),e.scale=ys(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function tW(e,t,n,i){e.min=ys(t.min,n.min,i),e.max=ys(t.max,n.max,i)}function b9e(e,t,n,i){tW(e.x,t.x,n.x,i),tW(e.y,t.y,n.y,i)}function y9e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const v9e={duration:.45,ease:[.4,0,.1,1]},nW=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),iW=nW("applewebkit/")&&!nW("chrome/")?Math.round:rc;function rW(e){e.min=iW(e.min),e.max=iW(e.max)}function x9e(e){rW(e.x),rW(e.y)}function ibe(e,t,n){return e==="position"||e==="preserve-aspect"&&!S8e(Gq(t),Gq(n),.2)}function O9e(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const w9e=nbe({attachResizeListener:(e,t)=>pS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),SD={current:void 0},rbe=nbe({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!SD.current){const e=new w9e({});e.mount(window),e.setOptions({layoutScroll:!0}),SD.current=e}return SD.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),S9e={pan:{Feature:F8e},drag:{Feature:$8e,ProjectionNode:rbe,MeasureLayout:Xge}};function k9e(e,t,n){var i;if(e instanceof Element)return[e];if(typeof e=="string"){let r=document;const s=(i=void 0)!==null&&i!==void 0?i:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function sbe(e,t){const n=k9e(e),i=new AbortController,r={passive:!0,...t,signal:i.signal};return[n,r,()=>i.abort()]}function sW(e){return t=>{t.pointerType==="touch"||Bge()||e(t)}}function E9e(e,t,n={}){const[i,r,s]=sbe(e,n),a=sW(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const d=sW(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,r)});return i.forEach(l=>{l.addEventListener("pointerenter",a,r)}),s}function aW(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=i[r];s&&Zr.postRender(()=>s(t,$k(t)))}class C9e extends Um{mount(){const{current:t}=this.node;t&&(this.unmount=E9e(t,n=>(aW(this.node,n,"Start"),i=>aW(this.node,i,"End"))))}unmount(){}}class T9e extends Um{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Lk(pS(this.node.current,"focus",()=>this.onFocus()),pS(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const abe=(e,t)=>t?e===t?!0:abe(e,t.parentElement):!1,A9e=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _9e(e){return A9e.has(e.tagName)||e.tabIndex!==-1}const NO=new WeakSet;function oW(e){return t=>{t.key==="Enter"&&e(t)}}function kD(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const N9e=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=oW(()=>{if(NO.has(n))return;kD(n,"down");const r=oW(()=>{kD(n,"up")}),s=()=>kD(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function lW(e){return SF(e)&&!Bge()}function j9e(e,t,n={}){const[i,r,s]=sbe(e,n),a=l=>{const c=l.currentTarget;if(!lW(l)||NO.has(c))return;NO.add(c);const u=t(l),d=(p,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!lW(p)||!NO.has(c))&&(NO.delete(c),typeof u=="function"&&u(p,{success:g}))},f=p=>{d(p,n.useGlobalTarget||abe(c,p.target))},h=p=>{d(p,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",h,r)};return i.forEach(l=>{!_9e(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,r),l.addEventListener("focus",u=>N9e(u,r),r)}),s}function cW(e,t,n){const{props:i}=e;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=i[r];s&&Zr.postRender(()=>s(t,$k(t)))}class R9e extends Um{mount(){const{current:t}=this.node;t&&(this.unmount=j9e(t,n=>(cW(this.node,n,"Start"),(i,{success:r})=>cW(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const i4=new WeakMap,ED=new WeakMap,I9e=e=>{const t=i4.get(e.target);t&&t(e)},P9e=e=>{e.forEach(I9e)};function D9e({root:e,...t}){const n=e||document;ED.has(n)||ED.set(n,{});const i=ED.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(P9e,{root:e,...t})),i[r]}function M9e(e,t,n){const i=D9e(t);return i4.set(e,n),i.observe(e),()=>{i4.delete(e),i.unobserve(e)}}const L9e={some:0,all:1};class $9e extends Um{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:L9e[r]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return M9e(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(F9e(t,n))&&this.startObserver()}unmount(){}}function F9e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const B9e={inView:{Feature:$9e},tap:{Feature:R9e},focus:{Feature:T9e},hover:{Feature:C9e}},U9e={layout:{ProjectionNode:rbe,MeasureLayout:Xge}},C_={current:null},kF={current:!1};function obe(){if(kF.current=!0,!!W9)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>C_.current=e.matches;e.addListener(t),t()}else C_.current=!1}const Q9e=[...Age,uo,ym],z9e=e=>Q9e.find(Tge(e)),uW=new WeakMap;function V9e(e,t,n){for(const i in t){const r=t[i],s=n[i];if(po(r))e.addValue(i,r);else if(po(s))e.addValue(i,fS(r,{owner:e}));else if(s!==r)if(e.hasValue(i)){const a=e.getValue(i);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(i);e.addValue(i,fS(a!==void 0?a:r,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const dW=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class H9e{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=vF,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Fd.now();this.renderScheduledAtthis.bindToMotionValue(i,n)),kF.current||obe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:C_.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){uW.delete(this.current),this.projection&&this.projection.unmount(),bm(this.notifyUpdate),bm(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Vb.has(t),r=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Zr.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Pv){const n=Pv[t];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[t]&&r&&i(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ds()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;in.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=fS(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){var i;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(i=this.getBaseTargetFromProps(this.props,t))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Ege(r)||gge(r))?r=parseFloat(r):!z9e(r)&&ym.test(n)&&(r=wge(t,n)),this.setBaseTarget(t,po(r)?r.get():r)),po(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:i}=this.props;let r;if(typeof i=="string"||typeof i=="object"){const a=J9(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[t])}if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!po(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new uF),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class lbe extends H9e{constructor(){super(...arguments),this.KeyframeResolver=_ge}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;po(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function q9e(e){return window.getComputedStyle(e)}class W9e extends lbe{constructor(){super(...arguments),this.type="html",this.renderInstance=Gme}readValueFromInstance(t,n){if(Vb.has(n)){const i=yF(n);return i&&i.default||0}else{const i=q9e(t),r=(qme(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Kge(t,n)}build(t,n,i){nF(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return aF(t,n,i)}}class K9e extends lbe{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ds}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Vb.has(n)){const i=yF(n);return i&&i.default||0}return n=Xme.has(n)?n:X9(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return Jme(t,n,i)}build(t,n,i){iF(t,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,i,r){Yme(t,n,i,r)}mount(t){this.isSVGTag=sF(t.tagName),super.mount(t)}}const G9e=(e,t)=>Z9(e)?new K9e(t):new W9e(t,{allowProjection:e!==m.Fragment}),X9e=w6e({...h8e,...B9e,...S9e,...U9e},G9e),pr=L4e(X9e);function EF(){!kF.current&&obe();const[e]=m.useState(C_.current);return e}function ha(){return ha=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||/ServerSideRendering/.test(navigator&&navigator.userAgent)?m.useEffect:m.useLayoutEffect;function Z0(e,t,n){var i=m.useRef(t);i.current=t,m.useEffect(function(){function r(s){i.current(s)}return e&&window.addEventListener(e,r,n),function(){e&&window.removeEventListener(e,r)}},[e])}var Y9e=["container"];function Z9e(e){var t=e.container,n=t===void 0?document.body:t,i=Qj(e,Y9e);return Fi.createPortal(si.createElement("div",ha({},i)),n)}function J9e(e){return si.createElement("svg",ha({width:"44",height:"44",viewBox:"0 0 768 768"},e),si.createElement("path",{d:"M607.5 205.5l-178.5 178.5 178.5 178.5-45 45-178.5-178.5-178.5 178.5-45-45 178.5-178.5-178.5-178.5 45-45 178.5 178.5 178.5-178.5z"}))}function eFe(e){return si.createElement("svg",ha({width:"44",height:"44",viewBox:"0 0 768 768"},e),si.createElement("path",{d:"M640.5 352.5v63h-390l178.5 180-45 45-256.5-256.5 256.5-256.5 45 45-178.5 180h390z"}))}function tFe(e){return si.createElement("svg",ha({width:"44",height:"44",viewBox:"0 0 768 768"},e),si.createElement("path",{d:"M384 127.5l256.5 256.5-256.5 256.5-45-45 178.5-180h-390v-63h390l-178.5-180z"}))}function nFe(){return m.useEffect(function(){var e=document.body.style,t=e.overflow;return e.overflow="hidden",function(){e.overflow=t}},[]),null}function hW(e){var t=e.touches[0],n=t.clientX,i=t.clientY;if(e.touches.length>=2){var r=e.touches[1],s=r.clientX,a=r.clientY;return[(n+s)/2,(i+a)/2,Math.sqrt(Math.pow(s-n,2)+Math.pow(a-i,2))]}return[n,i,0]}var Cp=function(e,t,n,i){var r,s=n*t,a=(s-i)/2,l=e;return s<=i?(r=1,l=0):e>0&&a-e<=0?(r=2,l=a):e<0&&a+e<=0&&(r=3,l=-a),[r,l]};function CD(e,t,n,i,r,s,a,l,c,u){a===void 0&&(a=innerWidth/2),l===void 0&&(l=innerHeight/2),c===void 0&&(c=0),u===void 0&&(u=0);var d=Cp(e,s,n,innerWidth)[0],f=Cp(t,s,i,innerHeight),h=innerWidth/2,p=innerHeight/2;return{x:a-s/r*(a-(h+e))-h+(i/n>=3&&n*s===innerWidth?0:d?c/2:c),y:l-s/r*(l-(p+t))-p+(f[0]?u/2:u),lastCX:a,lastCY:l}}function a4(e,t,n){var i=e%180!=0;return i?[n,t,i]:[t,n,i]}function TD(e,t,n){var i=a4(n,innerWidth,innerHeight),r=i[0],s=i[1],a=0,l=r,c=s,u=e/t*s,d=t/e*r;return e=s?l=u:e>=r&&tr/s?c=d:t/e>=3&&!i[2]?a=((c=d)-s)/2:l=u,{width:l,height:c,x:0,y:a,pause:!0}}function WC(e,t){var n=t.leading,i=n!==void 0&&n,r=t.maxWait,s=t.wait,a=s===void 0?r||0:s,l=m.useRef(e);l.current=e;var c=m.useRef(0),u=m.useRef(),d=function(){return u.current&&clearTimeout(u.current)},f=m.useCallback(function(){var h=[].slice.call(arguments),p=Date.now();function g(){c.current=p,d(),l.current.apply(null,h)}var b=c.current,v=p-b;if(b===0&&(i&&g(),c.current=p),r!==void 0){if(v>r)return void g()}else v=1&&s&&s())};d()}function d(){c=requestAnimationFrame(u)}}var rFe={T:0,L:0,W:0,H:0,FIT:void 0},ube=function(){var e=m.useRef(!1);return m.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),e},sFe=["className"];function aFe(e){var t=e.className,n=t===void 0?"":t,i=Qj(e,sFe);return si.createElement("div",ha({className:"PhotoView__Spinner "+n},i),si.createElement("svg",{viewBox:"0 0 32 32",width:"36",height:"36",fill:"white"},si.createElement("path",{opacity:".25",d:"M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4"}),si.createElement("path",{d:"M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z"})))}var oFe=["src","loaded","broken","className","onPhotoLoad","loadingElement","brokenElement"];function lFe(e){var t=e.src,n=e.loaded,i=e.broken,r=e.className,s=e.onPhotoLoad,a=e.loadingElement,l=e.brokenElement,c=Qj(e,oFe),u=ube();return t&&!i?si.createElement(si.Fragment,null,si.createElement("img",ha({className:"PhotoView__Photo"+(r?" "+r:""),src:t,onLoad:function(d){var f=d.target;u.current&&s({loaded:!0,naturalWidth:f.naturalWidth,naturalHeight:f.naturalHeight})},onError:function(){u.current&&s({broken:!0})},draggable:!1,alt:""},c)),!n&&(a?si.createElement("span",{className:"PhotoView__icon"},a):si.createElement(aFe,{className:"PhotoView__icon"}))):l?si.createElement("span",{className:"PhotoView__icon"},typeof l=="function"?l({src:t}):l):null}var cFe={naturalWidth:void 0,naturalHeight:void 0,width:void 0,height:void 0,loaded:void 0,broken:!1,x:0,y:0,touched:!1,maskTouched:!1,rotate:0,scale:1,CX:0,CY:0,lastX:0,lastY:0,lastCX:0,lastCY:0,lastScale:1,touchTime:0,touchLength:0,pause:!0,stopRaf:!0,reach:void 0};function uFe(e){var t=e.item,n=t.src,i=t.render,r=t.width,s=r===void 0?0:r,a=t.height,l=a===void 0?0:a,c=t.originRef,u=e.visible,d=e.speed,f=e.easing,h=e.wrapClassName,p=e.className,g=e.style,b=e.loadingElement,v=e.brokenElement,y=e.onPhotoTap,x=e.onMaskTap,w=e.onReachMove,O=e.onReachUp,k=e.onPhotoResize,S=e.isActive,E=e.expose,C=T_(cFe),N=C[0],_=C[1],j=m.useRef(0),T=ube(),L=N.naturalWidth,A=L===void 0?s:L,R=N.naturalHeight,P=R===void 0?l:R,$=N.width,M=$===void 0?s:$,B=N.height,I=B===void 0?l:B,H=N.loaded,X=H===void 0?!n:H,Q=N.broken,q=N.x,U=N.y,te=N.touched,le=N.stopRaf,oe=N.maskTouched,re=N.rotate,he=N.scale,K=N.CX,G=N.CY,se=N.lastX,de=N.lastY,ke=N.lastCX,Te=N.lastCY,rt=N.lastScale,Be=N.touchTime,Me=N.touchLength,Ie=N.pause,qe=N.reach,Pe=tb({onScale:function(_e){return Ve(qC(_e))},onRotate:function(_e){re!==_e&&(E({rotate:_e}),_(ha({rotate:_e},TD(A,P,_e))))}});function Ve(_e,st,je){he!==_e&&(E({scale:_e}),_(ha({scale:_e},CD(q,U,M,I,he,_e,st,je),_e<=1&&{x:0,y:0})))}var Ee=WC(function(_e,st,je){if(je===void 0&&(je=0),(te||oe)&&S){var gt=a4(re,M,I),ut=gt[0],ye=gt[1];if(je===0&&j.current===0){var ze=Math.abs(_e-K)<=20,et=Math.abs(st-G)<=20;if(ze&&et)return void _({lastCX:_e,lastCY:st});j.current=ze?st>G?3:2:1}var Et,_t=_e-ke,rn=st-Te;if(je===0){var en=Cp(_t+se,he,ut,innerWidth)[0],on=Cp(rn+de,he,ye,innerHeight);Et=function(Lt,An,De,pt){return An&&Lt===1||pt==="x"?"x":De&&Lt>1||pt==="y"?"y":void 0}(j.current,en,on[0],qe),Et!==void 0&&w(Et,_e,st,he)}if(Et==="x"||oe)return void _({reach:"x"});var J=qC(he+(je-Me)/100/2*he,A/M,.2);E({scale:J}),_(ha({touchLength:je,reach:Et,scale:J},CD(q,U,M,I,he,J,_e,st,_t,rn)))}},{maxWait:8});function Le(_e){return!le&&!te&&(T.current&&_(ha({},_e,{pause:u})),T.current)}var Y,fe,we,Ke,Je,Tt,Ne,ve,He=(Je=function(_e){return Le({x:_e})},Tt=function(_e){return Le({y:_e})},Ne=function(_e){return T.current&&(E({scale:_e}),_({scale:_e})),!te&&T.current},ve=tb({X:function(_e){return Je(_e)},Y:function(_e){return Tt(_e)},S:function(_e){return Ne(_e)}}),function(_e,st,je,gt,ut,ye,ze,et,Et,_t,rn){var en=a4(_t,ut,ye),on=en[0],J=en[1],Lt=Cp(_e,et,on,innerWidth),An=Lt[0],De=Lt[1],pt=Cp(st,et,J,innerHeight),ot=pt[0],qn=pt[1],ai=Date.now()-rn;if(ai>=200||et!==ze||Math.abs(Et-ze)>1){var ei=CD(_e,st,ut,ye,ze,et),Ki=ei.x,$e=ei.y,ht=An?De:Ki!==_e?Ki:null,Yt=ot?qn:$e!==st?$e:null;return ht!==null&&Ag(_e,ht,ve.X),Yt!==null&&Ag(st,Yt,ve.Y),void(et!==ze&&Ag(ze,et,ve.S))}var hn=(_e-je)/ai,nn=(st-gt)/ai,Ti=Math.sqrt(Math.pow(hn,2)+Math.pow(nn,2)),Bn=!1,yi=!1;(function(ci,vi){var En,sr=ci,di=0,Hi=0,fs=function(js){En||(En=js);var Br=js-En,vs=Math.sign(ci),Rs=-.001*vs,hs=Math.sign(-sr)*Math.pow(sr,2)*2e-4,ya=sr*Br+(Rs+hs)*Math.pow(Br,2)/2;di+=ya,En=js,vs*(sr+=(Rs+hs)*Br)<=0?Fr():vi(di)?Sr():Fr()};function Sr(){Hi=requestAnimationFrame(fs)}function Fr(){cancelAnimationFrame(Hi)}Sr()})(Ti,function(ci){var vi=_e+ci*(hn/Ti),En=st+ci*(nn/Ti),sr=Cp(vi,ze,on,innerWidth),di=sr[0],Hi=sr[1],fs=Cp(En,ze,J,innerHeight),Sr=fs[0],Fr=fs[1];if(di&&!Bn&&(Bn=!0,An?Ag(vi,Hi,ve.X):pW(Hi,vi+(vi-Hi),ve.X)),Sr&&!yi&&(yi=!0,ot?Ag(En,Fr,ve.Y):pW(Fr,En+(En-Fr),ve.Y)),Bn&&yi)return!1;var js=Bn||ve.X(Hi),Br=yi||ve.Y(Fr);return js&&Br})}),it=(Y=y,fe=function(_e,st){qe||Ve(he!==1?1:Math.max(2,A/M),_e,st)},we=m.useRef(0),Ke=WC(function(){we.current=0,Y.apply(void 0,[].slice.call(arguments))},{wait:300}),function(){var _e=[].slice.call(arguments);we.current+=1,Ke.apply(void 0,_e),we.current>=2&&(Ke.cancel(),we.current=0,fe.apply(void 0,_e))});function Ae(_e,st){if(j.current=0,(te||oe)&&S){_({touched:!1,maskTouched:!1,pause:!1,stopRaf:!1,reach:void 0});var je=qC(he,A/M);if(He(q,U,se,de,M,I,he,je,rt,re,Be),O(_e,st),K===_e&&G===st){if(te)return void it(_e,st);oe&&x(_e,st)}}}function Kt(_e,st,je){je===void 0&&(je=0),_({touched:!0,CX:_e,CY:st,lastCX:_e,lastCY:st,lastX:q,lastY:U,lastScale:he,touchLength:je,touchTime:Date.now()})}function gn(_e){_({maskTouched:!0,CX:_e.clientX,CY:_e.clientY,lastX:q,lastY:U})}Z0(jf?void 0:"mousemove",function(_e){_e.preventDefault(),Ee(_e.clientX,_e.clientY)}),Z0(jf?void 0:"mouseup",function(_e){Ae(_e.clientX,_e.clientY)}),Z0(jf?"touchmove":void 0,function(_e){_e.preventDefault();var st=hW(_e);Ee.apply(void 0,st)},{passive:!1}),Z0(jf?"touchend":void 0,function(_e){var st=_e.changedTouches[0];Ae(st.clientX,st.clientY)},{passive:!1}),Z0("resize",WC(function(){X&&!te&&(_(TD(A,P,re)),k())},{maxWait:8})),s4(function(){S&&E(ha({scale:he,rotate:re},Pe))},[S]);var Wt=function(_e,st,je,gt,ut,ye,ze,et,Et,_t){var rn=function(Ki,$e,ht,Yt,hn){var nn=m.useRef(!1),Ti=T_({lead:!0,scale:ht}),Bn=Ti[0],yi=Bn.lead,ci=Bn.scale,vi=Ti[1],En=WC(function(sr){try{return hn(!0),vi({lead:!1,scale:sr}),Promise.resolve()}catch(di){return Promise.reject(di)}},{wait:Yt});return s4(function(){nn.current?(hn(!1),vi({lead:!0}),En(ht)):nn.current=!0},[ht]),yi?[Ki*ci,$e*ci,ht/ci]:[Ki*ht,$e*ht,1]}(ye,ze,et,Et,_t),en=rn[0],on=rn[1],J=rn[2],Lt=function(Ki,$e,ht,Yt,hn){var nn=m.useState(rFe),Ti=nn[0],Bn=nn[1],yi=m.useState(0),ci=yi[0],vi=yi[1],En=m.useRef(),sr=tb({OK:function(){return Ki&&vi(4)}});function di(Hi){hn(!1),vi(Hi)}return m.useEffect(function(){if(En.current||(En.current=Date.now()),ht){if(function(Hi,fs){var Sr=Hi&&Hi.current;if(Sr&&Sr.nodeType===1){var Fr=Sr.getBoundingClientRect();fs({T:Fr.top,L:Fr.left,W:Fr.width,H:Fr.height,FIT:Sr.tagName==="IMG"?getComputedStyle(Sr).objectFit:void 0})}}($e,Bn),Ki)return Date.now()-En.current<250?(vi(1),requestAnimationFrame(function(){vi(2),requestAnimationFrame(function(){return di(3)})}),void setTimeout(sr.OK,Yt)):void vi(4);di(5)}},[Ki,ht]),[ci,Ti]}(_e,st,je,Et,_t),An=Lt[0],De=Lt[1],pt=De.W,ot=De.FIT,qn=innerWidth/2,ai=innerHeight/2,ei=An<3||An>4;return[ei?pt?De.L:qn:gt+(qn-ye*et/2),ei?pt?De.T:ai:ut+(ai-ze*et/2),en,ei&&ot?en*(De.H/pt):on,An===0?J:ei?pt/(ye*et)||.01:J,ei?ot?1:0:1,An,ot]}(u,c,X,q,U,M,I,he,d,function(_e){return _({pause:_e})}),Ot=Wt[4],Nt=Wt[6],at="transform "+d+"ms "+f,bt={className:p,onMouseDown:jf?void 0:function(_e){_e.stopPropagation(),_e.button===0&&Kt(_e.clientX,_e.clientY,0)},onTouchStart:jf?function(_e){_e.stopPropagation(),Kt.apply(void 0,hW(_e))}:void 0,onWheel:function(_e){if(!qe){var st=qC(he-_e.deltaY/100/2,A/M);_({stopRaf:!0}),Ve(st,_e.clientX,_e.clientY)}},style:{width:Wt[2]+"px",height:Wt[3]+"px",opacity:Wt[5],objectFit:Nt===4?void 0:Wt[7],transform:re?"rotate("+re+"deg)":void 0,transition:Nt>2?at+", opacity "+d+"ms ease, height "+(Nt<4?d/2:Nt>4?d:0)+"ms "+f:void 0}};return si.createElement("div",{className:"PhotoView__PhotoWrap"+(h?" "+h:""),style:g,onMouseDown:!jf&&S?gn:void 0,onTouchStart:jf&&S?function(_e){return gn(_e.touches[0])}:void 0},si.createElement("div",{className:"PhotoView__PhotoBox",style:{transform:"matrix("+Ot+", 0, 0, "+Ot+", "+Wt[0]+", "+Wt[1]+")",transition:te||Ie?void 0:at,willChange:S?"transform":void 0}},n?si.createElement(lFe,ha({src:n,loaded:X,broken:Q},bt,{onPhotoLoad:function(_e){_(ha({},_e,_e.loaded&&TD(_e.naturalWidth||0,_e.naturalHeight||0,re)))},loadingElement:b,brokenElement:v})):i&&i({attrs:bt,scale:Ot,rotate:re})))}var mW={x:0,touched:!1,pause:!1,lastCX:void 0,lastCY:void 0,bg:void 0,lastBg:void 0,overlay:!0,minimal:!0,scale:1,rotate:0};function dFe(e){var t=e.loop,n=t===void 0?3:t,i=e.speed,r=e.easing,s=e.photoClosable,a=e.maskClosable,l=a===void 0||a,c=e.maskOpacity,u=c===void 0?1:c,d=e.pullClosable,f=d===void 0||d,h=e.bannerVisible,p=h===void 0||h,g=e.overlayRender,b=e.toolbarRender,v=e.className,y=e.maskClassName,x=e.photoClassName,w=e.photoWrapClassName,O=e.loadingElement,k=e.brokenElement,S=e.images,E=e.index,C=E===void 0?0:E,N=e.onIndexChange,_=e.visible,j=e.onClose,T=e.afterClose,L=e.portalContainer,A=T_(mW),R=A[0],P=A[1],$=m.useState(0),M=$[0],B=$[1],I=R.x,H=R.touched,X=R.pause,Q=R.lastCX,q=R.lastCY,U=R.bg,te=U===void 0?u:U,le=R.lastBg,oe=R.overlay,re=R.minimal,he=R.scale,K=R.rotate,G=R.onScale,se=R.onRotate,de=e.hasOwnProperty("index"),ke=de?C:M,Te=de?N:B,rt=m.useRef(ke),Be=S.length,Me=S[ke],Ie=typeof n=="boolean"?n:Be>n,qe=function(Ot,Nt){var at=m.useReducer(function(je){return!je},!1)[1],bt=m.useRef(0),_e=function(je){var gt=m.useRef(je);function ut(ye){gt.current=ye}return m.useMemo(function(){(function(ye){Ot?(ye(Ot),bt.current=1):bt.current=2})(ut)},[je]),[gt.current,ut]}(Ot),st=_e[1];return[_e[0],bt.current,function(){at(),bt.current===2&&(st(!1),Nt&&Nt()),bt.current=0}]}(_,T),Pe=qe[0],Ve=qe[1],Ee=qe[2];s4(function(){if(Pe)return P({pause:!0,x:ke*-(innerWidth+_0)}),void(rt.current=ke);P(mW)},[Pe]);var Le=tb({close:function(Ot){se&&se(0),P({overlay:!0,lastBg:te}),j(Ot)},changeIndex:function(Ot,Nt){Nt===void 0&&(Nt=!1);var at=Ie?rt.current+(Ot-ke):Ot,bt=Be-1,_e=r4(at,0,bt),st=Ie?at:_e,je=innerWidth+_0;P({touched:!1,lastCX:void 0,lastCY:void 0,x:-je*st,pause:Nt}),rt.current=st,Te&&Te(Ie?Ot<0?bt:Ot>bt?0:Ot:_e)}}),Y=Le.close,fe=Le.changeIndex;function we(Ot){return Ot?Y():P({overlay:!oe})}function Ke(){P({x:-(innerWidth+_0)*ke,lastCX:void 0,lastCY:void 0,pause:!0}),rt.current=ke}function Je(Ot,Nt,at,bt){Ot==="x"?function(_e){if(Q!==void 0){var st=_e-Q,je=st;!Ie&&(ke===0&&st>0||ke===Be-1&&st<0)&&(je=st/2),P({touched:!0,lastCX:Q,x:-(innerWidth+_0)*rt.current+je,pause:!1})}else P({touched:!0,lastCX:_e,x:I,pause:!1})}(Nt):Ot==="y"&&function(_e,st){if(q!==void 0){var je=u===null?null:r4(u,.01,u-Math.abs(_e-q)/100/4);P({touched:!0,lastCY:q,bg:st===1?je:u,minimal:st===1})}else P({touched:!0,lastCY:_e,bg:te,minimal:!0})}(at,bt)}function Tt(Ot,Nt){var at=Ot-(Q??Ot),bt=Nt-(q??Nt),_e=!1;if(at<-40)fe(ke+1);else if(at>40)fe(ke-1);else{var st=-(innerWidth+_0)*rt.current;Math.abs(bt)>100&&re&&f&&(_e=!0,Y()),P({touched:!1,x:st,lastCX:void 0,lastCY:void 0,bg:u,overlay:!!_e||oe})}}Z0("keydown",function(Ot){if(_)switch(Ot.key){case"ArrowLeft":fe(ke-1,!0);break;case"ArrowRight":fe(ke+1,!0);break;case"Escape":Y()}});var Ne=function(Ot,Nt,at){return m.useMemo(function(){var bt=Ot.length;return at?Ot.concat(Ot).concat(Ot).slice(bt+Nt-1,bt+Nt+2):Ot.slice(Math.max(Nt-1,0),Math.min(Nt+2,bt+1))},[Ot,Nt,at])}(S,ke,Ie);if(!Pe)return null;var ve=oe&&!Ve,He=_?te:le,it=G&&se&&{images:S,index:ke,visible:_,onClose:Y,onIndexChange:fe,overlayVisible:ve,overlay:Me&&Me.overlay,scale:he,rotate:K,onScale:G,onRotate:se},Ae=i?i(Ve):400,Kt=r?r(Ve):fW,gn=i?i(3):600,Wt=r?r(3):fW;return si.createElement(Z9e,{className:"PhotoView-Portal"+(ve?"":" PhotoView-Slider__clean")+(_?"":" PhotoView-Slider__willClose")+(v?" "+v:""),role:"dialog",onClick:function(Ot){return Ot.stopPropagation()},container:L},_&&si.createElement(nFe,null),si.createElement("div",{className:"PhotoView-Slider__Backdrop"+(y?" "+y:"")+(Ve===1?" PhotoView-Slider__fadeIn":Ve===2?" PhotoView-Slider__fadeOut":""),style:{background:He?"rgba(0, 0, 0, "+He+")":void 0,transitionTimingFunction:Kt,transitionDuration:(H?0:Ae)+"ms",animationDuration:Ae+"ms"},onAnimationEnd:Ee}),p&&si.createElement("div",{className:"PhotoView-Slider__BannerWrap"},si.createElement("div",{className:"PhotoView-Slider__Counter"},ke+1," / ",Be),si.createElement("div",{className:"PhotoView-Slider__BannerRight"},b&&it&&b(it),si.createElement(J9e,{className:"PhotoView-Slider__toolbarIcon",onClick:Y}))),Ne.map(function(Ot,Nt){var at=Ie||ke!==0?rt.current-1+Nt:ke+Nt;return si.createElement(uFe,{key:Ie?Ot.key+"/"+Ot.src+"/"+at:Ot.key,item:Ot,speed:Ae,easing:Kt,visible:_,onReachMove:Je,onReachUp:Tt,onPhotoTap:function(){return we(s)},onMaskTap:function(){return we(l)},wrapClassName:w,className:x,style:{left:(innerWidth+_0)*at+"px",transform:"translate3d("+I+"px, 0px, 0)",transition:H||X?void 0:"transform "+gn+"ms "+Wt},loadingElement:O,brokenElement:k,onPhotoResize:Ke,isActive:rt.current===at,expose:P})}),!jf&&p&&si.createElement(si.Fragment,null,(Ie||ke!==0)&&si.createElement("div",{className:"PhotoView-Slider__ArrowLeft",onClick:function(){return fe(ke-1,!0)}},si.createElement(eFe,null)),(Ie||ke+1-1){var y=u.slice();return y.splice(v,1,b),void l({images:y})}l(function(x){return{images:x.images.concat(b)}})},remove:function(b){l(function(v){var y=v.images.filter(function(x){return x.key!==b});return{images:y,index:Math.min(y.length-1,f)}})},show:function(b){var v=u.findIndex(function(y){return y.key===b});l({visible:!0,index:v}),i&&i(!0,v,a)}}),p=tb({close:function(){l({visible:!1}),i&&i(!1,f,a)},changeIndex:function(b){l({index:b}),n&&n(b,a)}}),g=m.useMemo(function(){return ha({},a,h)},[a,h]);return si.createElement(cbe.Provider,{value:g},t,si.createElement(dFe,ha({images:u,visible:d,index:f,onIndexChange:p.changeIndex,onClose:p.close},r)))}var dbe=function(e){var t,n,i=e.src,r=e.render,s=e.overlay,a=e.width,l=e.height,c=e.triggers,u=c===void 0?["onClick"]:c,d=e.children,f=m.useContext(cbe),h=(t=function(){return f.nextId()},(n=m.useRef({sign:!1,fn:void 0}).current).sign||(n.sign=!0,n.fn=t()),n.fn),p=m.useRef(null);m.useImperativeHandle(d==null?void 0:d.ref,function(){return p.current}),m.useEffect(function(){return function(){f.remove(h)}},[]);var g=tb({render:function(v){return r&&r(v)},show:function(v,y){f.show(h),function(x,w){if(d){var O=d.props[x];O&&O(w)}}(v,y)}}),b=m.useMemo(function(){var v={};return u.forEach(function(y){v[y]=g.show.bind(null,y)}),v},[]);return m.useEffect(function(){f.update({key:h,src:i,originRef:p,render:g.render,overlay:s,width:a,height:l})},[i]),d?m.Children.only(m.cloneElement(d,ha({},b,{ref:p}))):null};const mFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M5.293 12.707a1 1 0 0 1 0-1.414l5-5a1 1 0 1 1 1.414 1.414L8.414 11H18a1 1 0 1 1 0 2H8.414l3.293 3.293a1 1 0 0 1-1.414 1.414l-5-5Z",clipRule:"evenodd"})}),gFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M18.707 12.707a1 1 0 0 0 0-1.414l-5-5a1 1 0 1 0-1.414 1.414L15.586 11H6a1 1 0 1 0 0 2h9.586l-3.293 3.293a1 1 0 0 0 1.414 1.414l5-5Z",clipRule:"evenodd"})}),bFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M4.47192 2.5C5.02421 2.5 5.47192 2.94772 5.47192 3.5V5.07196C7.17065 3.47759 9.45675 2.5 11.9719 2.5C17.2186 2.5 21.4719 6.75329 21.4719 12C21.4719 17.2467 17.2186 21.5 11.9719 21.5C7.10262 21.5 3.0902 17.8375 2.53692 13.1164C2.47264 12.5679 2.8652 12.0711 3.41373 12.0068C3.96226 11.9425 4.45904 12.3351 4.52333 12.8836C4.95991 16.6089 8.12901 19.5 11.9719 19.5C16.1141 19.5 19.4719 16.1421 19.4719 12C19.4719 7.85786 16.1141 4.5 11.9719 4.5C9.75153 4.5 7.75552 5.46469 6.38146 7H9.00003C9.55232 7 10 7.44772 10 8C10 8.55228 9.55232 9 9.00003 9H4.47192C3.93256 9 3.49293 8.57299 3.47265 8.03859C3.47175 8.01771 3.47151 7.99677 3.47192 7.9758V3.5C3.47192 2.94772 3.91964 2.5 4.47192 2.5Z",fill:"currentColor"})}),zj=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M2.55823 12C2.55823 6.75329 6.81152 2.5 12.0582 2.5C14.5734 2.5 16.8595 3.47759 18.5582 5.07197V3.5C18.5582 2.94772 19.0059 2.5 19.5582 2.5C20.1105 2.5 20.5582 2.94772 20.5582 3.5V7.97591C20.5586 7.99622 20.5584 8.01651 20.5576 8.03674C20.5382 8.572 20.0982 9 19.5582 9H15.0582C14.5059 9 14.0582 8.55228 14.0582 8C14.0582 7.44772 14.5059 7 15.0582 7H17.6487C16.2746 5.46469 14.2786 4.5 12.0582 4.5C7.91609 4.5 4.55823 7.85786 4.55823 12C4.55823 16.1421 7.91609 19.5 12.0582 19.5C15.9011 19.5 19.0702 16.6089 19.5068 12.8836C19.5711 12.3351 20.0679 11.9425 20.6164 12.0068C21.165 12.0711 21.5575 12.5679 21.4932 13.1164C20.94 17.8375 16.9275 21.5 12.0582 21.5C6.81152 21.5 2.55823 17.2467 2.55823 12Z",fill:"currentColor"})}),KC=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M16.243 6.757a1 1 0 0 1 1 1v7.072a1 1 0 0 1-2 0v-4.657L8.464 16.95a1 1 0 0 1-1.414-1.414l6.778-6.779H9.172a1 1 0 0 1 0-2h7.07Z",clipRule:"evenodd"})}),yFe=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M10.663 6.3872C10.8152 6.29068 11 6.40984 11 6.59007V8C11 8.55229 11.4477 9 12 9C12.5523 9 13 8.55229 13 8V6.59007C13 6.40984 13.1848 6.29068 13.337 6.3872C14.036 6.83047 14.5 7.61105 14.5 8.5C14.5 9.53284 13.8737 10.4194 12.9801 10.8006C12.9932 10.865 13 10.9317 13 11V13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13V11C11 10.9317 11.0068 10.865 11.0199 10.8006C10.1263 10.4194 9.5 9.53284 9.5 8.5C9.5 7.61105 9.96397 6.83047 10.663 6.3872Z",fill:"currentColor"}),o.jsx("path",{d:"M17.9754 4.01031C17.8588 4.00078 17.6965 4.00001 17.4 4.00001H9.8C8.94342 4.00001 8.36113 4.00078 7.91104 4.03756C7.47262 4.07338 7.24842 4.1383 7.09202 4.21799C6.7157 4.40974 6.40973 4.7157 6.21799 5.09202C6.1383 5.24842 6.07337 5.47263 6.03755 5.91104C6.00078 6.36113 6 6.94343 6 7.80001V16.1707C6.31278 16.0602 6.64937 16 7 16H18L18 4.60001C18 4.30348 17.9992 4.14122 17.9897 4.02464C17.9893 4.02 17.9889 4.0156 17.9886 4.01145C17.9844 4.01107 17.98 4.01069 17.9754 4.01031ZM17.657 18H7C6.44772 18 6 18.4477 6 19C6 19.5523 6.44772 20 7 20H17.657C17.5343 19.3301 17.5343 18.6699 17.657 18ZM4 19L4 7.75871C3.99999 6.95374 3.99998 6.28937 4.04419 5.74818C4.09012 5.18608 4.18868 4.66938 4.43597 4.18404C4.81947 3.43139 5.43139 2.81947 6.18404 2.43598C6.66937 2.18869 7.18608 2.09012 7.74818 2.0442C8.28937 1.99998 8.95373 1.99999 9.7587 2L17.4319 2C17.6843 1.99997 17.9301 1.99994 18.1382 2.01695C18.3668 2.03563 18.6366 2.07969 18.908 2.21799C19.2843 2.40974 19.5903 2.7157 19.782 3.09203C19.9203 3.36345 19.9644 3.63318 19.9831 3.86178C20.0001 4.06994 20 4.31574 20 4.56812L20 17C20 17.1325 19.9736 17.2638 19.9225 17.386C19.4458 18.5253 19.4458 19.4747 19.9225 20.614C20.0517 20.9227 20.0179 21.2755 19.8325 21.5541C19.6471 21.8326 19.3346 22 19 22H7C5.34315 22 4 20.6569 4 19Z",fill:"currentColor"})]}),Lv=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M18.063 5.674a1 1 0 0 1 .263 1.39l-7.5 11a1 1 0 0 1-1.533.143l-4.5-4.5a1 1 0 1 1 1.414-1.414l3.647 3.647 6.82-10.003a1 1 0 0 1 1.39-.263Z",clipRule:"evenodd"})}),fbe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM16.0755 7.93219C16.5272 8.25003 16.6356 8.87383 16.3178 9.32549L11.5678 16.0755C11.3931 16.3237 11.1152 16.4792 10.8123 16.4981C10.5093 16.517 10.2142 16.3973 10.0101 16.1727L7.51006 13.4227C7.13855 13.014 7.16867 12.3816 7.57733 12.0101C7.98598 11.6386 8.61843 11.6687 8.98994 12.0773L10.6504 13.9039L14.6822 8.17451C15 7.72284 15.6238 7.61436 16.0755 7.93219Z",fill:"currentColor"})}),vFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 9",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.292893 0.292893C0.683418 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L8 6.58579L14.2929 0.292894C14.6834 -0.0976305 15.3166 -0.0976304 15.7071 0.292894C16.0976 0.683418 16.0976 1.31658 15.7071 1.70711L8.70711 8.70711C8.31658 9.09763 7.68342 9.09763 7.29289 8.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683417 0.292893 0.292893Z"})}),xFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M15.707 4.293a1 1 0 0 1 0 1.414L9.414 12l6.293 6.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z",clipRule:"evenodd"})}),OFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M8.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L14.586 12 8.293 5.707a1 1 0 0 1 0-1.414Z",clipRule:"evenodd"})}),CF=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM12 6C12.5523 6 13 6.44772 13 7V12C13 12.2652 12.8946 12.5196 12.7071 12.7071L10.2071 15.2071C9.81658 15.5976 9.18342 15.5976 8.79289 15.2071C8.40237 14.8166 8.40237 14.1834 8.79289 13.7929L11 11.5858V7C11 6.44772 11.4477 6 12 6Z",fill:"currentColor"})}),wFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12.659 9.753a1 1 0 0 1-1.318 0l-4-3.5A1 1 0 1 1 8.66 4.747L12 7.671l3.341-2.924a1 1 0 1 1 1.318 1.506l-4 3.5Zm-4.002 9.501a1 1 0 1 1-1.314-1.508l4-3.485a1 1 0 0 1 1.314 0l4 3.485a1 1 0 1 1-1.314 1.508L12 16.34l-3.343 2.913Z"})}),TF=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V11.2413C22 12.0463 22 12.7106 21.9558 13.2518C21.9099 13.8139 21.8113 14.3306 21.564 14.816C21.1805 15.5686 20.5686 16.1805 19.816 16.564C19.3306 16.8113 18.8139 16.9099 18.2518 16.9558C17.8906 16.9853 17.4745 16.9951 16.9984 16.9984C16.9951 17.4745 16.9853 17.8906 16.9558 18.2518C16.9099 18.8139 16.8113 19.3306 16.564 19.816C16.1805 20.5686 15.5686 21.1805 14.816 21.564C14.3306 21.8113 13.8139 21.9099 13.2518 21.9558C12.7106 22 12.0463 22 11.2413 22H7.75868C6.95372 22 6.28936 22 5.74818 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V12.7587C1.99999 11.9537 1.99998 11.2894 2.04419 10.7482C2.09012 10.1861 2.18868 9.66937 2.43597 9.18404C2.81947 8.43139 3.43139 7.81947 4.18404 7.43598C4.66937 7.18868 5.18608 7.09012 5.74817 7.04419C6.10939 7.01468 6.52548 7.00487 7.00162 7.00162C7.00487 6.52548 7.01468 6.10939 7.04419 5.74817C7.09012 5.18608 7.18868 4.66937 7.43598 4.18404C7.81947 3.43139 8.43139 2.81947 9.18404 2.43597C9.66937 2.18868 10.1861 2.09012 10.7482 2.04419C11.2894 1.99998 11.9537 1.99999 12.7587 2ZM9.00176 7L11.2413 7C12.0463 6.99999 12.7106 6.99998 13.2518 7.04419C13.8139 7.09012 14.3306 7.18868 14.816 7.43598C15.5686 7.81947 16.1805 8.43139 16.564 9.18404C16.8113 9.66937 16.9099 10.1861 16.9558 10.7482C17 11.2894 17 11.9537 17 12.7587V14.9982C17.4455 14.9951 17.7954 14.9864 18.089 14.9624C18.5274 14.9266 18.7516 14.8617 18.908 14.782C19.2843 14.5903 19.5903 14.2843 19.782 13.908C19.8617 13.7516 19.9266 13.5274 19.9624 13.089C19.9992 12.6389 20 12.0566 20 11.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H12.8C11.9434 4 11.3611 4.00078 10.911 4.03755C10.4726 4.07337 10.2484 4.1383 10.092 4.21799C9.7157 4.40973 9.40973 4.7157 9.21799 5.09202C9.1383 5.24842 9.07337 5.47262 9.03755 5.91104C9.01357 6.20463 9.00489 6.55447 9.00176 7ZM5.91104 9.03755C5.47262 9.07337 5.24842 9.1383 5.09202 9.21799C4.7157 9.40973 4.40973 9.7157 4.21799 10.092C4.1383 10.2484 4.07337 10.4726 4.03755 10.911C4.00078 11.3611 4 11.9434 4 12.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H11.2C12.0566 20 12.6389 19.9992 13.089 19.9624C13.5274 19.9266 13.7516 19.8617 13.908 19.782C14.2843 19.5903 14.5903 19.2843 14.782 18.908C14.8617 18.7516 14.9266 18.5274 14.9624 18.089C14.9992 17.6389 15 17.0566 15 16.2V12.8C15 11.9434 14.9992 11.3611 14.9624 10.911C14.9266 10.4726 14.8617 10.2484 14.782 10.092C14.5903 9.7157 14.2843 9.40973 13.908 9.21799C13.7516 9.1383 13.5274 9.07337 13.089 9.03755C12.6389 9.00078 12.0566 9 11.2 9H7.8C6.94342 9 6.36113 9.00078 5.91104 9.03755Z",fill:"currentColor"})}),SFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M10.556 4a1 1 0 0 0-.97.751l-.292 1.14h5.421l-.293-1.14A1 1 0 0 0 13.453 4h-2.897Zm6.224 1.892-.421-1.639A3 3 0 0 0 13.453 2h-2.897A3 3 0 0 0 7.65 4.253l-.421 1.639H4a1 1 0 1 0 0 2h.1l1.215 11.425A3 3 0 0 0 8.3 22h7.4a3 3 0 0 0 2.984-2.683l1.214-11.425H20a1 1 0 1 0 0-2h-3.22Zm1.108 2H6.112l1.192 11.214A1 1 0 0 0 8.3 20h7.4a1 1 0 0 0 .995-.894l1.192-11.214ZM10 10a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0v-5a1 1 0 0 1 1-1Zm4 0a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0v-5a1 1 0 0 1 1-1Z",clipRule:"evenodd"})}),kFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M3 12a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm7 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm7 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z"})}),EFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 16",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.34151 0.747423C4.71854 0.417526 5.28149 0.417526 5.65852 0.747423L9.65852 4.24742C10.0742 4.61111 10.1163 5.24287 9.75259 5.6585C9.38891 6.07414 8.75715 6.11626 8.34151 5.75258L5.00001 2.82877L1.65852 5.75258C1.24288 6.11626 0.61112 6.07414 0.247438 5.6585C-0.116244 5.24287 -0.0741267 4.61111 0.34151 4.24742L4.34151 0.747423ZM0.246065 10.3578C0.608879 9.94139 1.24055 9.89795 1.65695 10.2608L5.00001 13.1737L8.34308 10.2608C8.75948 9.89795 9.39115 9.94139 9.75396 10.3578C10.1168 10.7742 10.0733 11.4058 9.65695 11.7687L5.65695 15.2539C5.28043 15.582 4.7196 15.582 4.34308 15.2539L0.343082 11.7687C-0.0733128 11.4058 -0.116749 10.7742 0.246065 10.3578Z"})}),CFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M16.793 2.793a3.121 3.121 0 1 1 4.414 4.414l-8.5 8.5A1 1 0 0 1 12 16H9a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707l8.5-8.5Zm3 1.414a1.121 1.121 0 0 0-1.586 0L10 12.414V14h1.586l8.207-8.207a1.121 1.121 0 0 0 0-1.586ZM6 5a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-4a1 1 0 1 1 2 0v4a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h4a1 1 0 1 1 0 2H6Z",clipRule:"evenodd"})}),TFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M12 7a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0V8h-3a1 1 0 0 1-1-1Zm-5 5a1 1 0 0 1 1 1v3h3a1 1 0 1 1 0 2H7a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1Z",clipRule:"evenodd"})}),AFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8-10C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm4.465 6.763a1 1 0 0 0-1.228-1.228l-5.5 1.5a1 1 0 0 0-.702.702l-1.5 5.5a1 1 0 0 0 1.228 1.228l5.5-1.5a1 1 0 0 0 .702-.702l1.5-5.5Zm-6.54 5.312.89-3.26 3.26-.89-.89 3.26-3.26.89Z",clipRule:"evenodd"})}),_Fe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M14.4472 7.10558C14.9412 7.35257 15.1414 7.95324 14.8944 8.44722L10.8944 16.4472C10.6474 16.9412 10.0468 17.1414 9.55279 16.8944C9.05881 16.6474 8.85858 16.0468 9.10557 15.5528L13.1056 7.55279C13.3526 7.05881 13.9532 6.85859 14.4472 7.10558ZM6.6 7.20001C7.04183 7.53138 7.13137 8.15818 6.8 8.60001L4.25 12L6.8 15.4C7.13137 15.8418 7.04183 16.4686 6.6 16.8C6.15817 17.1314 5.53137 17.0418 5.2 16.6L2.2 12.6C1.93333 12.2444 1.93333 11.7556 2.2 11.4L5.2 7.40001C5.53137 6.95818 6.15817 6.86863 6.6 7.20001ZM17.4 7.20001C17.8418 6.86863 18.4686 6.95818 18.8 7.40001L21.8 11.4C22.0667 11.7556 22.0667 12.2444 21.8 12.6L18.8 16.6C18.4686 17.0418 17.8418 17.1314 17.4 16.8C16.9582 16.4686 16.8686 15.8418 17.2 15.4L19.75 12L17.2 8.60001C16.8686 8.15818 16.9582 7.53138 17.4 7.20001Z",fill:"currentColor"})}),hbe=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M13 12a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0v-4Zm-1-2.5A1.25 1.25 0 1 0 12 7a1.25 1.25 0 0 0 0 2.5Z"}),o.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z",clipRule:"evenodd"})]}),NFe=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M7.79289 9.04289C8.18342 8.65237 8.81658 8.65237 9.20711 9.04289L11.4571 11.2929C11.8476 11.6834 11.8476 12.3166 11.4571 12.7071L9.20711 14.9571C8.81658 15.3476 8.18342 15.3476 7.79289 14.9571C7.40237 14.5666 7.40237 13.9334 7.79289 13.5429L9.33579 12L7.79289 10.4571C7.40237 10.0666 7.40237 9.43342 7.79289 9.04289ZM12.25 14.25C12.25 13.6977 12.6977 13.25 13.25 13.25H15.5C16.0523 13.25 16.5 13.6977 16.5 14.25C16.5 14.8023 16.0523 15.25 15.5 15.25H13.25C12.6977 15.25 12.25 14.8023 12.25 14.25Z",fill:"currentColor"}),o.jsx("path",{d:"M2 8C2 5.79086 3.79086 4 6 4C6.55228 4 7 4.44772 7 5C7 5.55228 6.55228 6 6 6C4.89543 6 4 6.89543 4 8V16C4 17.1046 4.89543 18 6 18C6.55228 18 7 18.4477 7 19C7 19.5523 6.55228 20 6 20C3.79086 20 2 18.2091 2 16V8ZM17 5C17 4.44772 17.4477 4 18 4C20.2091 4 22 5.79086 22 8V16C22 18.2091 20.2091 20 18 20C17.4477 20 17 19.5523 17 19C17 18.4477 17.4477 18 18 18C19.1046 18 20 17.1046 20 16V8C20 6.89543 19.1046 6 18 6C17.4477 6 17 5.55228 17 5Z",fill:"currentColor"})]}),jFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z",fill:"currentColor"})}),RFe=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M12.75 9.50001C12.75 9.08579 13.0858 8.75001 13.5 8.75001H14.5C14.9142 8.75001 15.25 9.08579 15.25 9.50001V14.5C15.25 14.9142 14.9142 15.25 14.5 15.25H13.5C13.0858 15.25 12.75 14.9142 12.75 14.5V9.50001Z",fill:"currentColor"}),o.jsx("path",{d:"M9.50001 8.75001C9.08579 8.75001 8.75001 9.08579 8.75001 9.50001V14.5C8.75001 14.9142 9.08579 15.25 9.50001 15.25H10.5C10.9142 15.25 11.25 14.9142 11.25 14.5V9.50001C11.25 9.08579 10.9142 8.75001 10.5 8.75001H9.50001Z",fill:"currentColor"}),o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.97144 12C1.97144 6.46138 6.46138 1.97144 12 1.97144C17.5386 1.97144 22.0286 6.46138 22.0286 12C22.0286 17.5386 17.5386 22.0286 12 22.0286C6.46138 22.0286 1.97144 17.5386 1.97144 12ZM12 4.02858C7.59751 4.02858 4.02858 7.59751 4.02858 12C4.02858 16.4025 7.59751 19.9714 12 19.9714C16.4025 19.9714 19.9714 16.4025 19.9714 12C19.9714 7.59751 16.4025 4.02858 12 4.02858Z",fill:"currentColor"})]}),gW=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M9.5 9.33165V14.6683C9.5 15.4595 10.3752 15.9373 11.0408 15.5095L15.1915 12.8412C15.8038 12.4475 15.8038 11.5524 15.1915 11.1588L11.0408 8.49047C10.3752 8.06265 9.5 8.54049 9.5 9.33165Z",fill:"currentColor"}),o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12Z",fill:"currentColor"})]}),IFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M8 16.7229V7.27711C8 6.29075 9.08894 5.69298 9.9211 6.22254L17.3428 10.9454C18.1147 11.4366 18.1147 12.5634 17.3428 13.0546L9.92109 17.7775C9.08894 18.3071 8 17.7093 8 16.7229Z",fill:"currentColor"})}),pbe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M12 5a1 1 0 0 1 1 1v5h5a1 1 0 1 1 0 2h-5v5a1 1 0 1 1-2 0v-5H6a1 1 0 1 1 0-2h5V6a1 1 0 0 1 1-1Z",clipRule:"evenodd"})}),mbe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12 3C12.5523 3 13 3.44772 13 4L13 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13L13 13L13 20C13 20.5523 12.5523 21 12 21C11.4477 21 11 20.5523 11 20L11 13L4 13C3.44772 13 3 12.5523 3 12C3 11.4477 3.44772 11 4 11L11 11L11 4C11 3.44772 11.4477 3 12 3Z",fill:"currentColor"})}),PFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12 6C12.5523 6 13 6.44772 13 7V11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H13V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V13H7C6.44772 13 6 12.5523 6 12C6 11.4477 6.44772 11 7 11H11V7C11 6.44772 11.4477 6 12 6Z",fill:"currentColor"})}),DFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.875 4.5C7.35418 4.5 4.5 7.35418 4.5 10.875C4.5 14.3958 7.35418 17.25 10.875 17.25C14.3958 17.25 17.25 14.3958 17.25 10.875C17.25 7.35418 14.3958 4.5 10.875 4.5ZM2.5 10.875C2.5 6.24962 6.24962 2.5 10.875 2.5C15.5004 2.5 19.25 6.24962 19.25 10.875C19.25 12.8273 18.582 14.6236 17.462 16.0478L21.2071 19.7929C21.5976 20.1834 21.5976 20.8166 21.2071 21.2071C20.8166 21.5976 20.1834 21.5976 19.7929 21.2071L16.0478 17.462C14.6236 18.582 12.8273 19.25 10.875 19.25C6.24962 19.25 2.5 15.5004 2.5 10.875Z",fill:"currentColor"})}),MFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M11.2929 3.29289C11.6834 2.90237 12.3166 2.90237 12.7071 3.29289L16.7071 7.29289C17.0976 7.68342 17.0976 8.31658 16.7071 8.70711C16.3166 9.09763 15.6834 9.09763 15.2929 8.70711L13 6.41421V15C13 15.5523 12.5523 16 12 16C11.4477 16 11 15.5523 11 15V6.41421L8.70711 8.70711C8.31658 9.09763 7.68342 9.09763 7.29289 8.70711C6.90237 8.31658 6.90237 7.68342 7.29289 7.29289L11.2929 3.29289ZM4 14C4.55229 14 5 14.4477 5 15V15.2C5 16.0566 5.00078 16.6389 5.03755 17.089C5.07337 17.5274 5.1383 17.7516 5.21799 17.908C5.40973 18.2843 5.7157 18.5903 6.09202 18.782C6.24842 18.8617 6.47262 18.9266 6.91104 18.9624C7.36113 18.9992 7.94342 19 8.8 19H15.2C16.0566 19 16.6389 18.9992 17.089 18.9624C17.5274 18.9266 17.7516 18.8617 17.908 18.782C18.2843 18.5903 18.5903 18.2843 18.782 17.908C18.8617 17.7516 18.9266 17.5274 18.9624 17.089C18.9992 16.6389 19 16.0566 19 15.2V15C19 14.4477 19.4477 14 20 14C20.5523 14 21 14.4477 21 15V15.2413C21 16.0463 21 16.7106 20.9558 17.2518C20.9099 17.8139 20.8113 18.3306 20.564 18.816C20.1805 19.5686 19.5686 20.1805 18.816 20.564C18.3306 20.8113 17.8139 20.9099 17.2518 20.9558C16.7106 21 16.0463 21 15.2413 21H8.75868C7.95372 21 7.28936 21 6.74817 20.9558C6.18608 20.9099 5.66937 20.8113 5.18404 20.564C4.43139 20.1805 3.81947 19.5686 3.43597 18.816C3.18868 18.3306 3.09012 17.8139 3.04419 17.2518C2.99998 16.7106 2.99999 16.0463 3 15.2413L3 15C3 14.4477 3.44772 14 4 14Z",fill:"currentColor"})}),LFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M6 8C6 6.89543 6.89543 6 8 6H16C17.1046 6 18 6.89543 18 8V16C18 17.1046 17.1046 18 16 18H8C6.89543 18 6 17.1046 6 16V8Z",fill:"currentColor"})}),$Fe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M14.5 4a5.5 5.5 0 0 0-5.078 7.616 1 1 0 0 1-.216 1.092l-4.749 4.75a1.475 1.475 0 0 0 2.086 2.085l4.749-4.749a1 1 0 0 1 1.092-.216A5.5 5.5 0 0 0 20 9.414l-1.293 1.293a3.828 3.828 0 1 1-5.414-5.414L14.585 4H14.5ZM7 9.5a7.5 7.5 0 0 1 9.969-7.084 1 1 0 0 1 .378 1.651l-2.64 2.64a1.829 1.829 0 0 0 2.586 2.586l2.64-2.64a1 1 0 0 1 1.651.378 7.5 7.5 0 0 1-9.328 9.627l-4.299 4.3a3.475 3.475 0 0 1-4.914-4.915l4.299-4.299A7.497 7.497 0 0 1 7 9.5Z"})}),V2=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M8.99805 16.796C8.99805 15.4164 7.87961 14.2979 6.5 14.2979C5.12039 14.2979 4.00195 15.4164 4.00195 16.796C4.00196 18.1756 5.1204 19.294 6.5 19.294C7.8796 19.294 8.99804 18.1756 8.99805 16.796ZM19.748 15.0479C19.748 14.7729 19.525 14.5499 19.25 14.5499H15.75C15.475 14.5499 15.252 14.7729 15.252 15.0479V18.5479C15.252 18.823 15.475 19.046 15.75 19.046H19.25C19.525 19.046 19.748 18.823 19.748 18.5479V15.0479ZM10.0469 3.45125C11.077 2.15921 13.0849 2.20276 14.0498 3.58113L16.4189 6.96492L16.5205 7.12215C17.5046 8.76341 16.3301 10.9023 14.3691 10.9024H9.63086C7.60676 10.9023 6.42029 8.62316 7.58105 6.96492L9.9502 3.58113L10.0469 3.45125ZM12.4082 4.73055C12.2223 4.46497 11.842 4.44826 11.6318 4.68074L11.5918 4.73055L9.22266 8.11433C8.99176 8.44435 9.22808 8.89744 9.63086 8.89754H14.3691C14.7468 8.89745 14.9774 8.49957 14.8145 8.17781L14.7773 8.11433L12.4082 4.73055ZM11.002 16.796C11.0019 19.2824 8.98638 21.2979 6.5 21.2979C4.01362 21.2979 1.99806 19.2824 1.99805 16.796C1.99805 14.3096 4.01361 12.294 6.5 12.294C8.98639 12.294 11.002 14.3096 11.002 16.796ZM21.752 18.5479C21.752 19.9297 20.6318 21.0499 19.25 21.0499H15.75C14.3682 21.0499 13.248 19.9297 13.248 18.5479V15.0479C13.2481 13.6662 14.3682 12.546 15.75 12.546H19.25C20.6318 12.546 21.7519 13.6662 21.752 15.0479V18.5479Z",fill:"currentColor"})}),FFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5555 4C10.099 4 9.70052 4.30906 9.58693 4.75114L9.29382 5.8919H14.715L14.4219 4.75114C14.3083 4.30906 13.9098 4 13.4533 4H10.5555ZM16.7799 5.8919L16.3589 4.25342C16.0182 2.92719 14.8226 2 13.4533 2H10.5555C9.18616 2 7.99062 2.92719 7.64985 4.25342L7.22886 5.8919H4C3.44772 5.8919 3 6.33961 3 6.8919C3 7.44418 3.44772 7.8919 4 7.8919H4.10069L5.31544 19.3172C5.47763 20.8427 6.76455 22 8.29863 22H15.7014C17.2354 22 18.5224 20.8427 18.6846 19.3172L19.8993 7.8919H20C20.5523 7.8919 21 7.44418 21 6.8919C21 6.33961 20.5523 5.8919 20 5.8919H16.7799ZM17.888 7.8919H6.11196L7.30423 19.1057C7.3583 19.6142 7.78727 20 8.29863 20H15.7014C16.2127 20 16.6417 19.6142 16.6958 19.1057L17.888 7.8919ZM10 10C10.5523 10 11 10.4477 11 11V16C11 16.5523 10.5523 17 10 17C9.44772 17 9 16.5523 9 16V11C9 10.4477 9.44772 10 10 10ZM14 10C14.5523 10 15 10.4477 15 11V16C15 16.5523 14.5523 17 14 17C13.4477 17 13 16.5523 13 16V11C13 10.4477 13.4477 10 14 10Z"})}),BFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M7.5 5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5ZM3 7.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM17 6a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-4 2a4 4 0 1 1 8 0 4 4 0 0 1-8 0Zm-8.96 8.247C3.137 17.048 2.5 18.271 2.5 20a1 1 0 1 1-2 0c0-2.271.862-4.049 2.21-5.248C4.042 13.57 5.788 13 7.5 13s3.459.57 4.79 1.752c1.348 1.2 2.21 2.977 2.21 5.248a1 1 0 1 1-2 0c0-1.729-.638-2.952-1.54-3.753C10.042 15.43 8.788 15 7.5 15s-2.541.43-3.46 1.247Zm15.757-.607c-1.009-.638-2.338-.807-3.526-.472a1 1 0 0 1-.542-1.925c1.695-.478 3.616-.255 5.136.706 1.558.984 2.635 2.707 2.635 5.051a1 1 0 1 1-2 0c0-1.665-.732-2.746-1.703-3.36Z",clipRule:"evenodd"})}),gbe=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M10.42 2.006a4 4 0 0 1 3.159 0c.674.29 1.188.822 1.667 1.456.474.627 1 1.473 1.653 2.523l3.542 5.696c.72 1.16 1.3 2.09 1.682 2.854.384.766.654 1.517.59 2.292a4 4 0 0 1-1.604 2.886c-.625.463-1.405.63-2.258.709-.85.078-1.945.078-3.311.078H8.46c-1.366 0-2.46 0-3.31-.078-.854-.078-1.634-.246-2.26-.71a4 4 0 0 1-1.603-2.885c-.064-.775.206-1.526.59-2.292.383-.764.961-1.694 1.682-2.854l3.542-5.696c.653-1.05 1.18-1.896 1.653-2.523.48-.634.993-1.166 1.667-1.456Zm2.37 1.838a2 2 0 0 0-1.58 0c-.192.083-.448.28-.86.825-.413.544-.891 1.312-1.577 2.415l-3.488 5.61c-.755 1.214-1.283 2.066-1.62 2.737-.34.678-.402 1.02-.385 1.232a2 2 0 0 0 .802 1.443c.171.127.494.255 1.25.324.748.069 1.75.07 3.18.07h6.976c1.43 0 2.432-.001 3.18-.07.756-.069 1.079-.197 1.25-.324a2 2 0 0 0 .802-1.443c.017-.212-.045-.554-.385-1.232-.337-.671-.865-1.523-1.62-2.737l-3.488-5.61c-.686-1.103-1.164-1.87-1.576-2.415-.413-.546-.67-.742-.861-.825"}),o.jsx("path",{d:"M12 7.5a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1M10.851 15a1.15 1.15 0 1 1 2.3 0 1.15 1.15 0 0 1-2.3 0"})]}),AF=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M5.636 5.636a1 1 0 0 1 1.414 0l4.95 4.95 4.95-4.95a1 1 0 0 1 1.414 1.414L13.414 12l4.95 4.95a1 1 0 0 1-1.414 1.414L12 13.414l-4.95 4.95a1 1 0 0 1-1.414-1.414l4.95-4.95-4.95-4.95a1 1 0 0 1 0-1.414Z",clipRule:"evenodd"})});/** + `),()=>{document.head.removeChild(d)}},[t]),o.jsx(T4e,{isPresent:t,childRef:i,sizeRef:r,children:m.cloneElement(e,{ref:i})})}const _4e=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:s,mode:a})=>{const l=Rj(N4e),c=m.useId(),u=m.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;i&&i()},[l,i]),d=m.useMemo(()=>({id:c,initial:t,isPresent:n,custom:r,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),u]:[n,u]);return m.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),m.useEffect(()=>{!n&&!l.size&&i&&i()},[n]),a==="popLayout"&&(e=o.jsx(A4e,{isPresent:n,children:e})),o.jsx(Ij.Provider,{value:d,children:e})};function N4e(){return new Map}function Rme(e=!0){const t=m.useContext(Ij);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,s=m.useId();m.useEffect(()=>{e&&r(s)},[e]);const a=m.useCallback(()=>e&&i&&i(s),[s,i,e]);return!n&&i?[!1,a]:[!0]}const FC=e=>e.key||"";function GH(e){const t=[];return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const q9=typeof window<"u",Ime=q9?m.useLayoutEffect:m.useEffect,Ru=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:s="sync",propagate:a=!1})=>{const[l,c]=Rme(a),u=m.useMemo(()=>GH(e),[e]),d=a&&!l?[]:u.map(FC),f=m.useRef(!0),h=m.useRef(u),p=Rj(()=>new Map),[g,b]=m.useState(u),[v,y]=m.useState(u);Ime(()=>{f.current=!1,h.current=u;for(let O=0;O{const k=FC(O),S=a&&!l?!1:u===v||d.includes(k),E=()=>{if(p.has(k))p.set(k,!0);else return;let C=!0;p.forEach(N=>{N||(C=!1)}),C&&(w==null||w(),y(h.current),a&&(c==null||c()),i&&i())};return o.jsx(_4e,{isPresent:S,initial:!f.current||n?void 0:!1,custom:S?void 0:t,presenceAffectsLayout:r,mode:s,onExitComplete:S?void 0:E,children:O},k)})})},ic=e=>e;let Pme=ic;const j4e={useManualTiming:!1};function R4e(e){let t=new Set,n=new Set,i=!1,r=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&i?t:n;return d&&s.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[t,n]=[n,t],t.forEach(l),t.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const BC=["read","resolveKeyframes","update","preRender","render","postRender"],I4e=40;function Dme(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=BC.reduce((y,x)=>(y[x]=R4e(s),y),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=a,p=()=>{const y=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(y-r.timestamp,I4e),1),r.timestamp=y,r.isProcessing=!0,l.process(r),c.process(r),u.process(r),d.process(r),f.process(r),h.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(p))},g=()=>{n=!0,i=!0,r.isProcessing||e(p)};return{schedule:BC.reduce((y,x)=>{const w=a[x];return y[x]=(O,k=!1,S=!1)=>(n||g(),w.schedule(O,k,S)),y},{}),cancel:y=>{for(let x=0;xXH[e].some(n=>!!t[n])};function P4e(e){for(const t in e)Nv[t]={...Nv[t],...e[t]}}const D4e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function g_(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||D4e.has(e)}let Lme=e=>!g_(e);function $me(e){e&&(Lme=t=>t.startsWith("on")?!g_(t):e(t))}try{$me(require("@emotion/is-prop-valid").default)}catch{}function M4e(e,t,n){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||(Lme(r)||n===!0&&g_(r)||!t&&!g_(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}function L4e({children:e,isValidProp:t,...n}){t&&$me(t),n={...m.useContext(rS),...n},n.isStatic=Rj(()=>n.isStatic);const i=m.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return o.jsx(rS.Provider,{value:i,children:e})}function $4e(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...i)=>e(...i);return new Proxy(n,{get:(i,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Pj=m.createContext({});function sS(e){return typeof e=="string"||Array.isArray(e)}function Dj(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const W9=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],K9=["initial",...W9];function Mj(e){return Dj(e.animate)||K9.some(t=>sS(e[t]))}function Fme(e){return!!(Mj(e)||e.variants)}function F4e(e,t){if(Mj(e)){const{initial:n,animate:i}=e;return{initial:n===!1||sS(n)?n:void 0,animate:sS(i)?i:void 0}}return e.inherit!==!1?t:{}}function B4e(e){const{initial:t,animate:n}=F4e(e,m.useContext(Pj));return m.useMemo(()=>({initial:t,animate:n}),[YH(t),YH(n)])}function YH(e){return Array.isArray(e)?e.join(" "):e}const U4e=Symbol.for("motionComponentSymbol");function yy(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Q4e(e,t,n){return m.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):yy(n)&&(n.current=i))},[t])}const G9=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),z4e="framerAppearId",Bme="data-"+G9(z4e),{schedule:X9}=Dme(queueMicrotask,!1),Ume=m.createContext({});function V4e(e,t,n,i,r){var s,a;const{visualElement:l}=m.useContext(Pj),c=m.useContext(Mme),u=m.useContext(Ij),d=m.useContext(rS).reducedMotion,f=m.useRef(null);i=i||c.renderer,!f.current&&i&&(f.current=i(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,p=m.useContext(Ume);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&H4e(f.current,n,r,p);const g=m.useRef(!1);m.useInsertionEffect(()=>{h&&g.current&&h.update(n,u)});const b=n[Bme],v=m.useRef(!!b&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,b))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,b)));return Ime(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),X9.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())}),m.useEffect(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,b)}),v.current=!1))}),h}function H4e(e,t,n,i){const{layoutId:r,layout:s,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Qme(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||l&&yy(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,layoutScroll:c,layoutRoot:u})}function Qme(e){if(e)return e.options.allowProjection!==!1?e.projection:Qme(e.parent)}function q4e({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:i,Component:r}){var s,a;e&&P4e(e);function l(u,d){let f;const h={...m.useContext(rS),...u,layoutId:W4e(u)},{isStatic:p}=h,g=B4e(u),b=i(u,p);if(!p&&q9){K4e();const v=G4e(h);f=v.MeasureLayout,g.visualElement=V4e(r,b,h,t,v.ProjectionNode)}return o.jsxs(Pj.Provider,{value:g,children:[f&&g.visualElement?o.jsx(f,{visualElement:g.visualElement,...h}):null,n(r,u,Q4e(b,g.visualElement,d),b,p,g.visualElement)]})}l.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const c=m.forwardRef(l);return c[U4e]=r,c}function W4e({layoutId:e}){const t=m.useContext(H9).id;return t&&e!==void 0?t+"-"+e:e}function K4e(e,t){m.useContext(Mme).strict}function G4e(e){const{drag:t,layout:n}=Nv;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const X4e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Y9(e){return typeof e!="string"||e.includes("-")?!1:!!(X4e.indexOf(e)>-1||/[A-Z]/u.test(e))}function ZH(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function Z9(e,t,n,i){if(typeof t=="function"){const[r,s]=ZH(i);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=ZH(i);t=t(n!==void 0?n:e.custom,r,s)}return t}const U3=e=>Array.isArray(e),Y4e=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Z4e=e=>U3(e)?e[e.length-1]||0:e,fo=e=>!!(e&&e.getVelocity);function $2(e){const t=fo(e)?e.get():e;return Y4e(t)?t.toValue():t}function J4e({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},i,r,s){const a={latestValues:e6e(i,r,s,e),renderState:t()};return n&&(a.onMount=l=>n({props:i,current:l,...a}),a.onUpdate=l=>n(l)),a}const zme=e=>(t,n)=>{const i=m.useContext(Pj),r=m.useContext(Ij),s=()=>J4e(e,t,i,r);return n?s():Rj(s)};function e6e(e,t,n,i){const r={},s=i(e,{});for(const h in s)r[h]=$2(s[h]);let{initial:a,animate:l}=e;const c=Mj(e),u=Fme(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?l:a;if(f&&typeof f!="boolean"&&!Dj(f)){const h=Array.isArray(f)?f:[f];for(let p=0;pt=>typeof t=="string"&&t.startsWith(e),Hme=Vme("--"),t6e=Vme("var(--"),J9=e=>t6e(e)?n6e.test(e.split("/*")[0].trim()):!1,n6e=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,qme=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Oh=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},aS={...xx,transform:e=>Oh(0,1,e)},UC={...xx,default:1},Rk=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),mp=Rk("deg"),Md=Rk("%"),An=Rk("px"),i6e=Rk("vh"),r6e=Rk("vw"),JH={...Md,parse:e=>Md.parse(e)/100,transform:e=>Md.transform(e*100)},s6e={borderWidth:An,borderTopWidth:An,borderRightWidth:An,borderBottomWidth:An,borderLeftWidth:An,borderRadius:An,radius:An,borderTopLeftRadius:An,borderTopRightRadius:An,borderBottomRightRadius:An,borderBottomLeftRadius:An,width:An,maxWidth:An,height:An,maxHeight:An,top:An,right:An,bottom:An,left:An,padding:An,paddingTop:An,paddingRight:An,paddingBottom:An,paddingLeft:An,margin:An,marginTop:An,marginRight:An,marginBottom:An,marginLeft:An,backgroundPositionX:An,backgroundPositionY:An},a6e={rotate:mp,rotateX:mp,rotateY:mp,rotateZ:mp,scale:UC,scaleX:UC,scaleY:UC,scaleZ:UC,skew:mp,skewX:mp,skewY:mp,distance:An,translateX:An,translateY:An,translateZ:An,x:An,y:An,z:An,perspective:An,transformPerspective:An,opacity:aS,originX:JH,originY:JH,originZ:An},eq={...xx,transform:Math.round},eF={...s6e,...a6e,zIndex:eq,size:An,fillOpacity:aS,strokeOpacity:aS,numOctaves:eq},o6e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},l6e=vx.length;function c6e(e,t,n){let i="",r=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}}),Wme=()=>({...iF(),attrs:{}}),rF=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Kme(e,{style:t,vars:n},i,r){Object.assign(e.style,t,r&&r.getProjectionStyles(i));for(const s in n)e.style.setProperty(s,n[s])}const Gme=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Xme(e,t,n,i){Kme(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(Gme.has(r)?r:G9(r),t.attrs[r])}const b_={};function p6e(e){Object.assign(b_,e)}function Yme(e,{layout:t,layoutId:n}){return Ub.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!b_[e]||e==="opacity")}function sF(e,t,n){var i;const{style:r}=e,s={};for(const a in r)(fo(r[a])||t.style&&fo(t.style[a])||Yme(a,e)||((i=n==null?void 0:n.getValue(a))===null||i===void 0?void 0:i.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function Zme(e,t,n){const i=sF(e,t,n);for(const r in e)if(fo(e[r])||fo(t[r])){const s=vx.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=e[r]}return i}function m6e(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const nq=["x","y","width","height","cx","cy","r"],g6e={useVisualState:zme({scrapeMotionValuesFromProps:Zme,createRenderState:Wme,onUpdate:({props:e,prevProps:t,current:n,renderState:i,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const l in r)if(Ub.has(l)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let l=0;l{m6e(n,i),Yr.render(()=>{nF(i,r,rF(n.tagName),e.transformTemplate),Xme(n,i)})})}})},b6e={useVisualState:zme({scrapeMotionValuesFromProps:sF,createRenderState:iF})};function Jme(e,t,n){for(const i in t)!fo(t[i])&&!Yme(i,n)&&(e[i]=t[i])}function y6e({transformTemplate:e},t){return m.useMemo(()=>{const n=iF();return tF(n,t,e),Object.assign({},n.vars,n.style)},[t])}function v6e(e,t){const n=e.style||{},i={};return Jme(i,n,e),Object.assign(i,y6e(e,t)),i}function x6e(e,t){const n={},i=v6e(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}function O6e(e,t,n,i){const r=m.useMemo(()=>{const s=Wme();return nF(s,t,rF(i),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Jme(s,e.style,e),r.style={...s,...r.style}}return r}function w6e(e=!1){return(n,i,r,{latestValues:s},a)=>{const c=(Y9(n)?O6e:x6e)(i,s,a,n),u=M4e(i,typeof n=="string",e),d=n!==m.Fragment?{...u,...c,ref:r}:{},{children:f}=i,h=m.useMemo(()=>fo(f)?f.get():f,[f]);return m.createElement(n,{...d,children:h})}}function S6e(e,t){return function(i,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...Y9(i)?g6e:b6e,preloadedFeatures:e,useRender:w6e(r),createVisualElement:t,Component:i};return q4e(a)}}function ege(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i(F2===void 0&&Ld.set(Va.isProcessing||j4e.useManualTiming?Va.timestamp:performance.now()),F2),set:e=>{F2=e,queueMicrotask(k6e)}};function oF(e,t){e.indexOf(t)===-1&&e.push(t)}function lF(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class cF{constructor(){this.subscriptions=[]}add(t){return oF(this.subscriptions,t),()=>lF(this.subscriptions,t)}notify(t,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,i);else for(let s=0;s!isNaN(parseFloat(e));class C6e{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,r=!0)=>{const s=Ld.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ld.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=E6e(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new cF);const i=this.events[t].add(n);return t==="change"?()=>{i(),Yr.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ld.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>iq)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,iq);return nge(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function oS(e,t){return new C6e(e,t)}function T6e(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,oS(n))}function A6e(e,t){const n=Lj(e,t);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const a in s){const l=Z4e(s[a]);T6e(e,a,l)}}function _6e(e){return!!(fo(e)&&e.add)}function Q3(e,t){const n=e.getValue("willChange");if(_6e(n))return n.add(t)}function ige(e){return e.props[Bme]}function uF(e){let t;return()=>(t===void 0&&(t=e()),t)}const N6e=uF(()=>window.ScrollTimeline!==void 0);class j6e{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let i=0;i{if(N6e()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{i.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class R6e extends j6e{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const ih=e=>e*1e3,rh=e=>e/1e3;function dF(e){return typeof e=="function"}function rq(e,t){e.timeline=t,e.onfinish=null}const fF=e=>Array.isArray(e)&&typeof e[0]=="number",I6e={linearEasing:void 0};function P6e(e,t){const n=uF(e);return()=>{var i;return(i=I6e[t])!==null&&i!==void 0?i:n()}}const y_=P6e(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jv=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i},rge=(e,t,n=10)=>{let i="";const r=Math.max(Math.round(t/n),2);for(let s=0;s`cubic-bezier(${e}, ${t}, ${n}, ${i})`,z3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:SO([0,.65,.55,1]),circOut:SO([.55,0,1,.45]),backIn:SO([.31,.01,.66,-.59]),backOut:SO([.33,1.53,.69,.99])};function age(e,t){if(e)return typeof e=="function"&&y_()?rge(e,t):fF(e)?SO(e):Array.isArray(e)?e.map(n=>age(n,t)||z3.easeOut):z3[e]}const oge=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,D6e=1e-7,M6e=12;function L6e(e,t,n,i,r){let s,a,l=0;do a=t+(n-t)/2,s=oge(a,i,r)-e,s>0?n=a:t=a;while(Math.abs(s)>D6e&&++lL6e(s,0,1,e,n);return s=>s===0||s===1?s:oge(r(s),t,i)}const lge=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cge=e=>t=>1-e(1-t),uge=Ik(.33,1.53,.69,.99),hF=cge(uge),dge=lge(hF),fge=e=>(e*=2)<1?.5*hF(e):.5*(2-Math.pow(2,-10*(e-1))),pF=e=>1-Math.sin(Math.acos(e)),hge=cge(pF),pge=lge(pF),mge=e=>/^0[^.\s]+$/u.test(e);function $6e(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mge(e):!0}const lw=e=>Math.round(e*1e5)/1e5,mF=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function F6e(e){return e==null}const B6e=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,gF=(e,t)=>n=>!!(typeof n=="string"&&B6e.test(n)&&n.startsWith(e)||t&&!F6e(n)&&Object.prototype.hasOwnProperty.call(n,t)),gge=(e,t,n)=>i=>{if(typeof i!="string")return i;const[r,s,a,l]=i.match(mF);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},U6e=e=>Oh(0,255,e),fD={...xx,transform:e=>Math.round(U6e(e))},Rg={test:gF("rgb","red"),parse:gge("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+fD.transform(e)+", "+fD.transform(t)+", "+fD.transform(n)+", "+lw(aS.transform(i))+")"};function Q6e(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const V3={test:gF("#"),parse:Q6e,transform:Rg.transform},vy={test:gF("hsl","hue"),parse:gge("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Md.transform(lw(t))+", "+Md.transform(lw(n))+", "+lw(aS.transform(i))+")"},lo={test:e=>Rg.test(e)||V3.test(e)||vy.test(e),parse:e=>Rg.test(e)?Rg.parse(e):vy.test(e)?vy.parse(e):V3.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Rg.transform(e):vy.transform(e)},z6e=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function V6e(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(mF))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(z6e))===null||n===void 0?void 0:n.length)||0)>0}const bge="number",yge="color",H6e="var",q6e="var(",sq="${}",W6e=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function lS(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const l=t.replace(W6e,c=>(lo.test(c)?(i.color.push(s),r.push(yge),n.push(lo.parse(c))):c.startsWith(q6e)?(i.var.push(s),r.push(H6e),n.push(c)):(i.number.push(s),r.push(bge),n.push(parseFloat(c))),++s,sq)).split(sq);return{values:n,split:l,indexes:i,types:r}}function vge(e){return lS(e).values}function xge(e){const{split:t,types:n}=lS(e),i=t.length;return r=>{let s="";for(let a=0;atypeof e=="number"?0:e;function G6e(e){const t=vge(e);return xge(e)(t.map(K6e))}const hm={test:V6e,parse:vge,createTransformer:xge,getAnimatableNone:G6e},X6e=new Set(["brightness","contrast","saturate","opacity"]);function Y6e(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(mF)||[];if(!i)return e;const r=n.replace(i,"");let s=X6e.has(t)?1:0;return i!==n&&(s*=100),t+"("+s+r+")"}const Z6e=/\b([a-z-]*)\(.*?\)/gu,H3={...hm,getAnimatableNone:e=>{const t=e.match(Z6e);return t?t.map(Y6e).join(" "):e}},J6e={...eF,color:lo,backgroundColor:lo,outlineColor:lo,fill:lo,stroke:lo,borderColor:lo,borderTopColor:lo,borderRightColor:lo,borderBottomColor:lo,borderLeftColor:lo,filter:H3,WebkitFilter:H3},bF=e=>J6e[e];function Oge(e,t){let n=bF(e);return n!==H3&&(n=hm),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const e$e=new Set(["auto","none","0"]);function t$e(e,t,n){let i=0,r;for(;ie===xx||e===An,oq=(e,t)=>parseFloat(e.split(", ")[t]),lq=(e,t)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return oq(r[1],t);{const s=i.match(/^matrix\((.+)\)$/u);return s?oq(s[1],e):0}},n$e=new Set(["x","y","z"]),i$e=vx.filter(e=>!n$e.has(e));function r$e(e){const t=[];return i$e.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Rv={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:lq(4,13),y:lq(5,14)};Rv.translateX=Rv.x;Rv.translateY=Rv.y;const Yg=new Set;let q3=!1,W3=!1;function wge(){if(W3){const e=Array.from(Yg).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const r=r$e(i);r.length&&(n.set(i,r),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([s,a])=>{var l;(l=i.getValue(s))===null||l===void 0||l.set(a)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}W3=!1,q3=!1,Yg.forEach(e=>e.complete()),Yg.clear()}function Sge(){Yg.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(W3=!0)})}function s$e(){Sge(),wge()}class yF{constructor(t,n,i,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Yg.add(this),q3||(q3=!0,Yr.read(Sge),Yr.resolveKeyframes(wge))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:r}=this;for(let s=0;s/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),a$e=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function o$e(e){const t=a$e.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${n??i}`,r]}function Ege(e,t,n=1){const[i,r]=o$e(e);if(!i)return;const s=window.getComputedStyle(t).getPropertyValue(i);if(s){const a=s.trim();return kge(a)?parseFloat(a):a}return J9(r)?Ege(r,t,n+1):r}const Cge=e=>t=>t.test(e),l$e={test:e=>e==="auto",parse:e=>e},Tge=[xx,An,Md,mp,r6e,i6e,l$e],cq=e=>Tge.find(Cge(e));class Age extends yF{constructor(t,n,i,r,s){super(t,n,i,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const uq=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(hm.test(e)||e==="0")&&!e.startsWith("url("));function c$e(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function $j(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(d$e),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||i===void 0?r[s]:i}const f$e=40;class _ge{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ld.now(),this.options={autoplay:t,delay:n,type:i,repeat:r,repeatDelay:s,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>f$e?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&s$e(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ld.now(),this.hasAttemptedResolve=!0;const{name:i,type:r,velocity:s,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!u$e(t,i,r,s))if(a)this.options.duration=0;else{c&&c($j(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const K3=2e4;function Nge(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t=K3?1/0:t}const ys=(e,t,n)=>e+(t-e)*n;function hD(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function h$e({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,s=0,a=0;if(!t)r=s=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=hD(c,l,e+1/3),s=hD(c,l,e),a=hD(c,l,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:i}}function v_(e,t){return n=>n>0?t:e}const pD=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},p$e=[V3,Rg,vy],m$e=e=>p$e.find(t=>t.test(e));function dq(e){const t=m$e(e);if(!t)return!1;let n=t.parse(e);return t===vy&&(n=h$e(n)),n}const fq=(e,t)=>{const n=dq(e),i=dq(t);if(!n||!i)return v_(e,t);const r={...n};return s=>(r.red=pD(n.red,i.red,s),r.green=pD(n.green,i.green,s),r.blue=pD(n.blue,i.blue,s),r.alpha=ys(n.alpha,i.alpha,s),Rg.transform(r))},g$e=(e,t)=>n=>t(e(n)),Pk=(...e)=>e.reduce(g$e),G3=new Set(["none","hidden"]);function b$e(e,t){return G3.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function y$e(e,t){return n=>ys(e,t,n)}function vF(e){return typeof e=="number"?y$e:typeof e=="string"?J9(e)?v_:lo.test(e)?fq:O$e:Array.isArray(e)?jge:typeof e=="object"?lo.test(e)?fq:v$e:v_}function jge(e,t){const n=[...e],i=n.length,r=e.map((s,a)=>vF(s)(s,t[a]));return s=>{for(let a=0;a{for(const s in i)n[s]=i[s](r);return n}}function x$e(e,t){var n;const i=[],r={color:0,var:0,number:0};for(let s=0;s{const n=hm.createTransformer(t),i=lS(e),r=lS(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?G3.has(e)&&!r.values.length||G3.has(t)&&!i.values.length?b$e(e,t):Pk(jge(x$e(i,r),r.values),n):v_(e,t)};function Rge(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ys(e,t,n):vF(e)(e,t)}const w$e=5;function Ige(e,t,n){const i=Math.max(t-w$e,0);return nge(n-e(i),t-i)}const ks={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},mD=.001;function S$e({duration:e=ks.duration,bounce:t=ks.bounce,velocity:n=ks.velocity,mass:i=ks.mass}){let r,s,a=1-t;a=Oh(ks.minDamping,ks.maxDamping,a),e=Oh(ks.minDuration,ks.maxDuration,rh(e)),a<1?(r=u=>{const d=u*a,f=d*e,h=d-n,p=X3(u,a),g=Math.exp(-f);return mD-h/p*g},s=u=>{const f=u*a*e,h=f*n+n,p=Math.pow(a,2)*Math.pow(u,2)*e,g=Math.exp(-f),b=X3(Math.pow(u,2),a);return(-r(u)+mD>0?-1:1)*((h-p)*g)/b}):(r=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-mD+d*f},s=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=E$e(r,s,l);if(e=ih(e),isNaN(c))return{stiffness:ks.stiffness,damping:ks.damping,duration:e};{const u=Math.pow(c,2)*i;return{stiffness:u,damping:a*2*Math.sqrt(i*u),duration:e}}}const k$e=12;function E$e(e,t,n){let i=n;for(let r=1;re[n]!==void 0)}function A$e(e){let t={velocity:ks.velocity,stiffness:ks.stiffness,damping:ks.damping,mass:ks.mass,isResolvedFromDuration:!1,...e};if(!hq(e,T$e)&&hq(e,C$e))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,s=2*Oh(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:ks.mass,stiffness:r,damping:s}}else{const n=S$e(e);t={...t,...n,mass:ks.mass},t.isResolvedFromDuration=!0}return t}function Pge(e=ks.visualDuration,t=ks.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=A$e({...n,velocity:-rh(n.velocity||0)}),g=h||0,b=u/(2*Math.sqrt(c*d)),v=a-s,y=rh(Math.sqrt(c/d)),x=Math.abs(v)<5;i||(i=x?ks.restSpeed.granular:ks.restSpeed.default),r||(r=x?ks.restDelta.granular:ks.restDelta.default);let w;if(b<1){const k=X3(y,b);w=S=>{const E=Math.exp(-b*y*S);return a-E*((g+b*y*v)/k*Math.sin(k*S)+v*Math.cos(k*S))}}else if(b===1)w=k=>a-Math.exp(-y*k)*(v+(g+y*v)*k);else{const k=y*Math.sqrt(b*b-1);w=S=>{const E=Math.exp(-b*y*S),C=Math.min(k*S,300);return a-E*((g+b*y*v)*Math.sinh(C)+k*v*Math.cosh(C))/k}}const O={calculatedDuration:p&&f||null,next:k=>{const S=w(k);if(p)l.done=k>=f;else{let E=0;b<1&&(E=k===0?ih(g):Ige(w,k,S));const C=Math.abs(E)<=i,N=Math.abs(a-S)<=r;l.done=C&&N}return l.value=l.done?a:S,l},toString:()=>{const k=Math.min(Nge(O),K3),S=rge(E=>O.next(k*E).value,k,30);return k+"ms "+S}};return O}function pq({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=C=>l!==void 0&&Cc,g=C=>l===void 0?c:c===void 0||Math.abs(l-C)-b*Math.exp(-C/i),w=C=>y+x(C),O=C=>{const N=x(C),_=w(C);h.done=Math.abs(N)<=u,h.value=h.done?y:_};let k,S;const E=C=>{p(h.value)&&(k=C,S=Pge({keyframes:[h.value,g(h.value)],velocity:Ige(w,C,h.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:C=>{let N=!1;return!S&&k===void 0&&(N=!0,O(C),E(C)),k!==void 0&&C>=k?S.next(C-k):(!N&&O(C),h)}}}const _$e=Ik(.42,0,1,1),N$e=Ik(0,0,.58,1),Dge=Ik(.42,0,.58,1),j$e=e=>Array.isArray(e)&&typeof e[0]!="number",R$e={linear:ic,easeIn:_$e,easeInOut:Dge,easeOut:N$e,circIn:pF,circInOut:pge,circOut:hge,backIn:hF,backInOut:dge,backOut:uge,anticipate:fge},mq=e=>{if(fF(e)){Pme(e.length===4);const[t,n,i,r]=e;return Ik(t,n,i,r)}else if(typeof e=="string")return R$e[e];return e};function I$e(e,t,n){const i=[],r=n||Rge,s=e.length-1;for(let a=0;at[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=I$e(t,i,r),c=l.length,u=d=>{if(a&&d1)for(;fu(Oh(e[0],e[s-1],d)):u}function D$e(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=jv(0,t,i);e.push(ys(n,1,r))}}function M$e(e){const t=[0];return D$e(t,e.length-1),t}function L$e(e,t){return e.map(n=>n*t)}function $$e(e,t){return e.map(()=>t||Dge).splice(0,e.length-1)}function x_({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=j$e(i)?i.map(mq):mq(i),s={done:!1,value:t[0]},a=L$e(n&&n.length===t.length?n:M$e(t),e),l=P$e(a,t,{ease:Array.isArray(r)?r:$$e(t,r)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const F$e=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Yr.update(t,!0),stop:()=>fm(t),now:()=>Va.isProcessing?Va.timestamp:Ld.now()}},B$e={decay:pq,inertia:pq,tween:x_,keyframes:x_,spring:Pge},U$e=e=>e/100;class xF extends _ge{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:i,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||yF,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(s,l,n,i,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,l=dF(n)?n:B$e[n]||x_;let c,u;l!==x_&&typeof t[0]!="number"&&(c=Pk(U$e,Rge(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});s==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=Nge(d));const{calculatedDuration:f}=d,h=f+r,p=h*(i+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:i}=this;if(!i){const{keyframes:C}=this.options;return{done:!0,value:C[C.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=i;if(this.startTime===null)return s.next(0);const{delay:h,repeat:p,repeatType:g,repeatDelay:b,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>d;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,O=s;if(p){const C=Math.min(this.currentTime,d)/f;let N=Math.floor(C),_=C%1;!_&&C>=1&&(_=1),_===1&&N--,N=Math.min(N,p+1),!!(N%2)&&(g==="reverse"?(_=1-_,b&&(_-=b/f)):g==="mirror"&&(O=a)),w=Oh(0,1,_)*f}const k=x?{done:!1,value:c[0]}:O.next(w);l&&(k.value=l(k.value));let{done:S}=k;!x&&u!==null&&(S=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return E&&r!==void 0&&(k.value=$j(c,this.options,r)),v&&v(k.value),E&&this.finish(),k}get duration(){const{resolved:t}=this;return t?rh(t.calculatedDuration):0}get time(){return rh(this.currentTime)}set time(t){t=ih(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=rh(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=F$e,onPlay:n,startTime:i}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=i??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Q$e=new Set(["opacity","clipPath","filter","transform"]);function z$e(e,t,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=age(l,r);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const V$e=uF(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),O_=10,H$e=2e4;function q$e(e){return dF(e.type)||e.type==="spring"||!sge(e.ease)}function W$e(e,t){const n=new xF({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:e[0]};const r=[];let s=0;for(;!i.done&&sthis.onKeyframesResolved(a,l),n,i,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:i=300,times:r,ease:s,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof s=="string"&&y_()&&K$e(s)&&(s=Mge[s]),q$e(this.options)){const{onComplete:f,onUpdate:h,motionValue:p,element:g,...b}=this.options,v=W$e(t,b);t=v.keyframes,t.length===1&&(t[1]=t[0]),i=v.duration,r=v.times,s=v.ease,a="keyframes"}const d=z$e(l.owner.current,c,t,{...this.options,duration:i,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(rq(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set($j(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:r,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return rh(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return rh(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.currentTime=ih(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ic;const{animation:i}=n;rq(i,t)}return ic}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:i,duration:r,type:s,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...p}=this.options,g=new xF({...p,keyframes:i,duration:r,type:s,ease:a,times:l,isGenerator:!0}),b=ih(this.time);u.setWithVelocity(g.sample(b-O_).value,g.sample(b).value,O_)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:i,repeatDelay:r,repeatType:s,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return V$e()&&i&&Q$e.has(i)&&!c&&!u&&!r&&s!=="mirror"&&a!==0&&l!=="inertia"}}const G$e={type:"spring",stiffness:500,damping:25,restSpeed:10},X$e=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Y$e={type:"keyframes",duration:.8},Z$e={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},J$e=(e,{keyframes:t})=>t.length>2?Y$e:Ub.has(e)?e.startsWith("scale")?X$e(t[1]):G$e:Z$e;function e8e({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const OF=(e,t,n,i={},r,s)=>a=>{const l=aF(i,e)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u=u-ih(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:r};e8e(l)||(d={...d,...J$e(e,d)}),d.duration&&(d.duration=ih(d.duration)),d.repeatDelay&&(d.repeatDelay=ih(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const h=$j(d.keyframes,l);if(h!==void 0)return Yr.update(()=>{d.onUpdate(h),d.onComplete()}),new R6e([])}return!s&&gq.supports(d)?new gq(d):new xF(d)};function t8e({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Lge(e,t,{delay:n=0,transitionOverride:i,type:r}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;i&&(a=i);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const f in c){const h=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),p=c[f];if(p===void 0||d&&t8e(d,f))continue;const g={delay:n,...aF(a||{},f)};let b=!1;if(window.MotionHandoffAnimation){const y=ige(e);if(y){const x=window.MotionHandoffAnimation(y,f,Yr);x!==null&&(g.startTime=x,b=!0)}}Q3(e,f),h.start(OF(f,h,p,e.shouldReduceMotion&&tge.has(f)?{type:!1}:g,e,b));const v=h.animation;v&&u.push(v)}return l&&Promise.all(u).then(()=>{Yr.update(()=>{l&&A6e(e,l)})}),u}function Y3(e,t,n={}){var i;const r=Lj(e,t,n.type==="exit"?(i=e.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const a=r?()=>Promise.all(Lge(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return n8e(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[u,d]=c==="beforeChildren"?[a,l]:[l,a];return u().then(()=>d())}else return Promise.all([a(),l(n.delay)])}function n8e(e,t,n=0,i=0,r=1,s){const a=[],l=(e.variantChildren.size-1)*i,c=r===1?(u=0)=>u*i:(u=0)=>l-u*i;return Array.from(e.variantChildren).sort(i8e).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Y3(u,t,{...s,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function i8e(e,t){return e.sortNodePosition(t)}function r8e(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const r=t.map(s=>Y3(e,s,n));i=Promise.all(r)}else if(typeof t=="string")i=Y3(e,t,n);else{const r=typeof t=="function"?Lj(e,t,n.custom):t;i=Promise.all(Lge(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const s8e=K9.length;function $ge(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$ge(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:i})=>r8e(e,n,i)))}function c8e(e){let t=l8e(e),n=bq(),i=!0;const r=c=>(u,d)=>{var f;const h=Lj(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:g,...b}=h;u={...u,...b,...g}}return u};function s(c){t=c(e)}function a(c){const{props:u}=e,d=$ge(e.parent)||{},f=[],h=new Set;let p={},g=1/0;for(let v=0;vg&&O,N=!1;const _=Array.isArray(w)?w:[w];let j=_.reduce(r(y),{});k===!1&&(j={});const{prevResolvedValues:T={}}=x,L={...T,...j},A=$=>{C=!0,h.has($)&&(N=!0,h.delete($)),x.needsAnimating[$]=!0;const M=e.getValue($);M&&(M.liveStyle=!1)};for(const $ in L){const M=j[$],B=T[$];if(p.hasOwnProperty($))continue;let I=!1;U3(M)&&U3(B)?I=!ege(M,B):I=M!==B,I?M!=null?A($):h.add($):M!==void 0&&h.has($)?A($):x.protectedKeys[$]=!0}x.prevProp=w,x.prevResolvedValues=j,x.isActive&&(p={...p,...j}),i&&e.blockInitialAnimation&&(C=!1),C&&(!(S&&E)||N)&&f.push(..._.map($=>({animation:$,options:{type:y}})))}if(h.size){const v={};h.forEach(y=>{const x=e.getBaseTarget(y),w=e.getValue(y);w&&(w.liveStyle=!0),v[y]=x??null}),f.push({animation:v})}let b=!!f.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(b=!1),i=!1,b?t(f):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=a(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=bq(),i=!0}}}function u8e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ege(t,e):!1}function Jm(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bq(){return{animate:Jm(!0),whileInView:Jm(),whileHover:Jm(),whileTap:Jm(),whileDrag:Jm(),whileFocus:Jm(),exit:Jm()}}class Mm{constructor(t){this.isMounted=!1,this.node=t}update(){}}class d8e extends Mm{constructor(t){super(t),t.animationState||(t.animationState=c8e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Dj(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let f8e=0;class h8e extends Mm{constructor(){super(...arguments),this.id=f8e++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const p8e={animation:{Feature:d8e},exit:{Feature:h8e}},vu={x:!1,y:!1};function Fge(){return vu.x||vu.y}function m8e(e){return e==="x"||e==="y"?vu[e]?null:(vu[e]=!0,()=>{vu[e]=!1}):vu.x||vu.y?null:(vu.x=vu.y=!0,()=>{vu.x=vu.y=!1})}const wF=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function cS(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function Dk(e){return{point:{x:e.pageX,y:e.pageY}}}const g8e=e=>t=>wF(t)&&e(t,Dk(t));function cw(e,t,n,i){return cS(e,t,g8e(n),i)}const yq=(e,t)=>Math.abs(e-t);function b8e(e,t){const n=yq(e.x,t.x),i=yq(e.y,t.y);return Math.sqrt(n**2+i**2)}class Bge{constructor(t,n,{transformPagePoint:i,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=bD(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=b8e(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:g}=f,{timestamp:b}=Va;this.history.push({...g,timestamp:b});const{onStart:v,onMove:y}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=gD(h,this.transformPagePoint),Yr.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=bD(f.type==="pointercancel"?this.lastMoveEventInfo:gD(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),g&&g(f,v)},!wF(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.contextWindow=r||window;const a=Dk(t),l=gD(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Va;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,bD(l,this.history)),this.removeListeners=Pk(cw(this.contextWindow,"pointermove",this.handlePointerMove),cw(this.contextWindow,"pointerup",this.handlePointerUp),cw(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),fm(this.updatePoint)}}function gD(e,t){return t?{point:t(e.point)}:e}function vq(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bD({point:e},t){return{point:e,delta:vq(e,Uge(t)),offset:vq(e,y8e(t)),velocity:v8e(t,.1)}}function y8e(e){return e[0]}function Uge(e){return e[e.length-1]}function v8e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=Uge(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>ih(t)));)n--;if(!i)return{x:0,y:0};const s=rh(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const Qge=1e-4,x8e=1-Qge,O8e=1+Qge,zge=.01,w8e=0-zge,S8e=0+zge;function cc(e){return e.max-e.min}function k8e(e,t,n){return Math.abs(e-t)<=n}function xq(e,t,n,i=.5){e.origin=i,e.originPoint=ys(t.min,t.max,e.origin),e.scale=cc(n)/cc(t),e.translate=ys(n.min,n.max,e.origin)-e.originPoint,(e.scale>=x8e&&e.scale<=O8e||isNaN(e.scale))&&(e.scale=1),(e.translate>=w8e&&e.translate<=S8e||isNaN(e.translate))&&(e.translate=0)}function uw(e,t,n,i){xq(e.x,t.x,n.x,i?i.originX:void 0),xq(e.y,t.y,n.y,i?i.originY:void 0)}function Oq(e,t,n){e.min=n.min+t.min,e.max=e.min+cc(t)}function E8e(e,t,n){Oq(e.x,t.x,n.x),Oq(e.y,t.y,n.y)}function wq(e,t,n){e.min=t.min-n.min,e.max=e.min+cc(t)}function dw(e,t,n){wq(e.x,t.x,n.x),wq(e.y,t.y,n.y)}function C8e(e,{min:t,max:n},i){return t!==void 0&&en&&(e=i?ys(n,e,i.max):Math.min(e,n)),e}function Sq(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function T8e(e,{top:t,left:n,bottom:i,right:r}){return{x:Sq(e.x,n,r),y:Sq(e.y,t,i)}}function kq(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.mini?n=jv(t.min,t.max-i,e.min):i>r&&(n=jv(e.min,e.max-r,t.min)),Oh(0,1,n)}function N8e(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Z3=.35;function j8e(e=Z3){return e===!1?e=0:e===!0&&(e=Z3),{x:Eq(e,"left","right"),y:Eq(e,"top","bottom")}}function Eq(e,t,n){return{min:Cq(e,t),max:Cq(e,n)}}function Cq(e,t){return typeof e=="number"?e:e[t]||0}const Tq=()=>({translate:0,scale:1,origin:0,originPoint:0}),xy=()=>({x:Tq(),y:Tq()}),Aq=()=>({min:0,max:0}),Ps=()=>({x:Aq(),y:Aq()});function jc(e){return[e("x"),e("y")]}function Vge({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function R8e({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function I8e(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function yD(e){return e===void 0||e===1}function J3({scale:e,scaleX:t,scaleY:n}){return!yD(e)||!yD(t)||!yD(n)}function mg(e){return J3(e)||Hge(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Hge(e){return _q(e.x)||_q(e.y)}function _q(e){return e&&e!=="0%"}function w_(e,t,n){const i=e-n,r=t*i;return n+r}function Nq(e,t,n,i,r){return r!==void 0&&(e=w_(e,r,i)),w_(e,n,i)+t}function e4(e,t=0,n=1,i,r){e.min=Nq(e.min,t,n,i,r),e.max=Nq(e.max,t,n,i,r)}function qge(e,{x:t,y:n}){e4(e.x,t.translate,t.scale,t.originPoint),e4(e.y,n.translate,n.scale,n.originPoint)}const jq=.999999999999,Rq=1.0000000000001;function P8e(e,t,n,i=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let l=0;ljq&&(t.x=1),t.yjq&&(t.y=1)}function Oy(e,t){e.min=e.min+t,e.max=e.max+t}function Iq(e,t,n,i,r=.5){const s=ys(e.min,e.max,r);e4(e,t,n,s,i)}function wy(e,t){Iq(e.x,t.x,t.scaleX,t.scale,t.originX),Iq(e.y,t.y,t.scaleY,t.scale,t.originY)}function Wge(e,t){return Vge(I8e(e.getBoundingClientRect(),t))}function D8e(e,t,n){const i=Wge(e,n),{scroll:r}=t;return r&&(Oy(i.x,r.offset.x),Oy(i.y,r.offset.y)),i}const Kge=({current:e})=>e?e.ownerDocument.defaultView:null,M8e=new WeakMap;class L8e{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ps(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Dk(d).point)},s=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=m8e(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),jc(v=>{let y=this.getAxisMotionValue(v).get()||0;if(Md.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[v];w&&(y=cc(w)*(parseFloat(y)/100))}}this.originPoint[v]=y}),g&&Yr.postRender(()=>g(d,f)),Q3(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:b}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=$8e(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),b&&b(d,f)},l=(d,f)=>this.stop(d,f),c=()=>jc(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Bge(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Kge(this.visualElement)})}stop(t,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&Yr.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:r}=this.getProps();if(!i||!QC(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(a=C8e(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&yy(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=T8e(r.layoutBox,n):this.constraints=!1,this.elastic=j8e(i),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&jc(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=N8e(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yy(t))return!1;const i=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=D8e(i,r.root,this.visualElement.getTransformPagePoint());let a=A8e(r.layout.layoutBox,s);if(n){const l=n(R8e(a));this.hasMutatedConstraints=!!l,l&&(a=Vge(l))}return a}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=jc(d=>{if(!QC(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const h=r?200:1e6,p=r?40:1e7,g={type:"inertia",velocity:i?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Q3(this.visualElement,t),i.start(OF(t,i,0,n,this.visualElement,!1))}stopAnimation(){jc(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){jc(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){jc(n=>{const{drag:i}=this.getProps();if(!QC(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:l}=r.layout.layoutBox[n];s.set(t[n]-ys(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!yy(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};jc(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();r[a]=_8e({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),jc(a=>{if(!QC(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(ys(c,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;M8e.set(this.visualElement,this);const t=this.visualElement.current,n=cw(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();yy(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Yr.read(i);const a=cS(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(jc(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Z3,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:l}}}function QC(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $8e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class F8e extends Mm{constructor(t){super(t),this.removeGroupControls=ic,this.removeListeners=ic,this.controls=new L8e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ic}unmount(){this.removeGroupControls(),this.removeListeners()}}const Pq=e=>(t,n)=>{e&&Yr.postRender(()=>e(t,n))};class B8e extends Mm{constructor(){super(...arguments),this.removePointerDownListener=ic}onPointerDown(t){this.session=new Bge(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Kge(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:Pq(t),onStart:Pq(n),onMove:i,onEnd:(s,a)=>{delete this.session,r&&Yr.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=cw(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const B2={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Dq(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const j1={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(An.test(e))e=parseFloat(e);else return e;const n=Dq(e,t.target.x),i=Dq(e,t.target.y);return`${n}% ${i}%`}},U8e={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=hm.parse(e);if(r.length>5)return i;const s=hm.createTransformer(e),a=typeof r[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;r[0+a]/=l,r[1+a]/=c;const u=ys(l,c,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class Q8e extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=t;p6e(z8e),s&&(n.group&&n.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),B2.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:r,isPresent:s}=this.props,a=i.projection;return a&&(a.isPresent=s,r||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Yr.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),X9.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Gge(e){const[t,n]=Rme(),i=m.useContext(H9);return o.jsx(Q8e,{...e,layoutGroup:i,switchLayoutGroup:m.useContext(Ume),isPresent:t,safeToRemove:n})}const z8e={borderRadius:{...j1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:j1,borderTopRightRadius:j1,borderBottomLeftRadius:j1,borderBottomRightRadius:j1,boxShadow:U8e};function V8e(e,t,n){const i=fo(e)?e:oS(e);return i.start(OF("",i,t,n)),i.animation}function H8e(e){return e instanceof SVGElement&&e.tagName!=="svg"}const q8e=(e,t)=>e.depth-t.depth;class W8e{constructor(){this.children=[],this.isDirty=!1}add(t){oF(this.children,t),this.isDirty=!0}remove(t){lF(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(q8e),this.isDirty=!1,this.children.forEach(t)}}function K8e(e,t){const n=Ld.now(),i=({timestamp:r})=>{const s=r-n;s>=t&&(fm(i),e(s-t))};return Yr.read(i,!0),()=>fm(i)}const Xge=["TopLeft","TopRight","BottomLeft","BottomRight"],G8e=Xge.length,Mq=e=>typeof e=="string"?parseFloat(e):e,Lq=e=>typeof e=="number"||An.test(e);function X8e(e,t,n,i,r,s){r?(e.opacity=ys(0,n.opacity!==void 0?n.opacity:1,Y8e(i)),e.opacityExit=ys(t.opacity!==void 0?t.opacity:1,0,Z8e(i))):s&&(e.opacity=ys(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,i));for(let a=0;ait?1:n(jv(e,t,i))}function Fq(e,t){e.min=t.min,e.max=t.max}function _c(e,t){Fq(e.x,t.x),Fq(e.y,t.y)}function Bq(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Uq(e,t,n,i,r){return e-=t,e=w_(e,1/n,i),r!==void 0&&(e=w_(e,1/r,i)),e}function J8e(e,t=0,n=1,i=.5,r,s=e,a=e){if(Md.test(t)&&(t=parseFloat(t),t=ys(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=ys(s.min,s.max,i);e===s&&(l-=t),e.min=Uq(e.min,t,n,l,r),e.max=Uq(e.max,t,n,l,r)}function Qq(e,t,[n,i,r],s,a){J8e(e,t[n],t[i],t[r],t.scale,s,a)}const e9e=["x","scaleX","originX"],t9e=["y","scaleY","originY"];function zq(e,t,n,i){Qq(e.x,t,e9e,n?n.x:void 0,i?i.x:void 0),Qq(e.y,t,t9e,n?n.y:void 0,i?i.y:void 0)}function Vq(e){return e.translate===0&&e.scale===1}function Zge(e){return Vq(e.x)&&Vq(e.y)}function Hq(e,t){return e.min===t.min&&e.max===t.max}function n9e(e,t){return Hq(e.x,t.x)&&Hq(e.y,t.y)}function qq(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Jge(e,t){return qq(e.x,t.x)&&qq(e.y,t.y)}function Wq(e){return cc(e.x)/cc(e.y)}function Kq(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class i9e{constructor(){this.members=[]}add(t){oF(this.members,t),t.scheduleRender()}remove(t){if(lF(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function r9e(e,t,n){let i="";const r=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(i=`translate3d(${r}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:g}=n;u&&(i=`perspective(${u}px) ${i}`),d&&(i+=`rotate(${d}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `),p&&(i+=`skewX(${p}deg) `),g&&(i+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(i+=`scale(${l}, ${c})`),i||"none"}const gg={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},kO=typeof window<"u"&&window.MotionDebug!==void 0,vD=["","X","Y","Z"],s9e={visibility:"hidden"},Gq=1e3;let a9e=0;function xD(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function ebe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ige(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Yr,!(r||s))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&ebe(i)}function tbe({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(a={},l=t==null?void 0:t()){this.id=a9e++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,kO&&(gg.totalNodes=gg.resolvedTargetDeltas=gg.recalculatedProjection=0),this.nodes.forEach(c9e),this.nodes.forEach(p9e),this.nodes.forEach(m9e),this.nodes.forEach(u9e),kO&&window.MotionDebug.record(gg)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=K8e(h,250),B2.hasAnimatedSinceResize&&(B2.hasAnimatedSinceResize=!1,this.nodes.forEach(Yq))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||d.getDefaultTransition()||x9e,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=d.getProps(),x=!this.targetLayout||!Jge(this.targetLayout,g)||p,w=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const O={...aF(b,"layout"),onPlay:v,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O)}else h||Yq(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,fm(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(g9e),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ebe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const k=O/1e3;Zq(f.x,a.x,k),Zq(f.y,a.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(dw(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),y9e(this.relativeTarget,this.relativeTargetOrigin,h,k),w&&n9e(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ps()),_c(w,this.relativeTarget)),b&&(this.animationValues=d,X8e(d,u,this.latestValues,k,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(fm(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Yr.update(()=>{B2.hasAnimatedSinceResize=!0,this.currentAnimation=V8e(0,Gq,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Gq),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&nbe(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Ps();const f=cc(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const h=cc(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+h}_c(l,c),wy(l,d),uw(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new i9e),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&xD("z",a,u,this.animationValues);for(let d=0;d{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(Xq),this.root.sharedNodes.clear()}}}function o9e(e){e.updateLayout()}function l9e(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=e.layout,{animationType:s}=e.options,a=n.source!==e.layout.source;s==="size"?jc(f=>{const h=a?n.measuredBox[f]:n.layoutBox[f],p=cc(h);h.min=i[f].min,h.max=h.min+p}):nbe(s,n.layoutBox,i)&&jc(f=>{const h=a?n.measuredBox[f]:n.layoutBox[f],p=cc(i[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const l=xy();uw(l,i,n.layoutBox);const c=xy();a?uw(c,e.applyTransform(r,!0),n.measuredBox):uw(c,i,n.layoutBox);const u=!Zge(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const g=Ps();dw(g,n.layoutBox,h.layoutBox);const b=Ps();dw(b,i,p.layoutBox),Jge(g,b)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function c9e(e){kO&&gg.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function u9e(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function d9e(e){e.clearSnapshot()}function Xq(e){e.clearMeasurements()}function f9e(e){e.isLayoutDirty=!1}function h9e(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Yq(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function p9e(e){e.resolveTargetDelta()}function m9e(e){e.calcProjection()}function g9e(e){e.resetSkewAndRotation()}function b9e(e){e.removeLeadSnapshot()}function Zq(e,t,n){e.translate=ys(t.translate,0,n),e.scale=ys(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Jq(e,t,n,i){e.min=ys(t.min,n.min,i),e.max=ys(t.max,n.max,i)}function y9e(e,t,n,i){Jq(e.x,t.x,n.x,i),Jq(e.y,t.y,n.y,i)}function v9e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const x9e={duration:.45,ease:[.4,0,.1,1]},eW=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),tW=eW("applewebkit/")&&!eW("chrome/")?Math.round:ic;function nW(e){e.min=tW(e.min),e.max=tW(e.max)}function O9e(e){nW(e.x),nW(e.y)}function nbe(e,t,n){return e==="position"||e==="preserve-aspect"&&!k8e(Wq(t),Wq(n),.2)}function w9e(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const S9e=tbe({attachResizeListener:(e,t)=>cS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),OD={current:void 0},ibe=tbe({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!OD.current){const e=new S9e({});e.mount(window),e.setOptions({layoutScroll:!0}),OD.current=e}return OD.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),k9e={pan:{Feature:B8e},drag:{Feature:F8e,ProjectionNode:ibe,MeasureLayout:Gge}};function E9e(e,t,n){var i;if(e instanceof Element)return[e];if(typeof e=="string"){let r=document;const s=(i=void 0)!==null&&i!==void 0?i:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function rbe(e,t){const n=E9e(e),i=new AbortController,r={passive:!0,...t,signal:i.signal};return[n,r,()=>i.abort()]}function iW(e){return t=>{t.pointerType==="touch"||Fge()||e(t)}}function C9e(e,t,n={}){const[i,r,s]=rbe(e,n),a=iW(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const d=iW(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,r)});return i.forEach(l=>{l.addEventListener("pointerenter",a,r)}),s}function rW(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=i[r];s&&Yr.postRender(()=>s(t,Dk(t)))}class T9e extends Mm{mount(){const{current:t}=this.node;t&&(this.unmount=C9e(t,n=>(rW(this.node,n,"Start"),i=>rW(this.node,i,"End"))))}unmount(){}}class A9e extends Mm{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pk(cS(this.node.current,"focus",()=>this.onFocus()),cS(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const sbe=(e,t)=>t?e===t?!0:sbe(e,t.parentElement):!1,_9e=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function N9e(e){return _9e.has(e.tagName)||e.tabIndex!==-1}const EO=new WeakSet;function sW(e){return t=>{t.key==="Enter"&&e(t)}}function wD(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const j9e=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=sW(()=>{if(EO.has(n))return;wD(n,"down");const r=sW(()=>{wD(n,"up")}),s=()=>wD(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function aW(e){return wF(e)&&!Fge()}function R9e(e,t,n={}){const[i,r,s]=rbe(e,n),a=l=>{const c=l.currentTarget;if(!aW(l)||EO.has(c))return;EO.add(c);const u=t(l),d=(p,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!aW(p)||!EO.has(c))&&(EO.delete(c),typeof u=="function"&&u(p,{success:g}))},f=p=>{d(p,n.useGlobalTarget||sbe(c,p.target))},h=p=>{d(p,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",h,r)};return i.forEach(l=>{!N9e(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,r),l.addEventListener("focus",u=>j9e(u,r),r)}),s}function oW(e,t,n){const{props:i}=e;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=i[r];s&&Yr.postRender(()=>s(t,Dk(t)))}class I9e extends Mm{mount(){const{current:t}=this.node;t&&(this.unmount=R9e(t,n=>(oW(this.node,n,"Start"),(i,{success:r})=>oW(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const t4=new WeakMap,SD=new WeakMap,P9e=e=>{const t=t4.get(e.target);t&&t(e)},D9e=e=>{e.forEach(P9e)};function M9e({root:e,...t}){const n=e||document;SD.has(n)||SD.set(n,{});const i=SD.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(D9e,{root:e,...t})),i[r]}function L9e(e,t,n){const i=M9e(t);return t4.set(e,n),i.observe(e),()=>{t4.delete(e),i.unobserve(e)}}const $9e={some:0,all:1};class F9e extends Mm{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:$9e[r]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return L9e(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(B9e(t,n))&&this.startObserver()}unmount(){}}function B9e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const U9e={inView:{Feature:F9e},tap:{Feature:I9e},focus:{Feature:A9e},hover:{Feature:T9e}},Q9e={layout:{ProjectionNode:ibe,MeasureLayout:Gge}},S_={current:null},SF={current:!1};function abe(){if(SF.current=!0,!!q9)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>S_.current=e.matches;e.addListener(t),t()}else S_.current=!1}const z9e=[...Tge,lo,hm],V9e=e=>z9e.find(Cge(e)),lW=new WeakMap;function H9e(e,t,n){for(const i in t){const r=t[i],s=n[i];if(fo(r))e.addValue(i,r);else if(fo(s))e.addValue(i,oS(r,{owner:e}));else if(s!==r)if(e.hasValue(i)){const a=e.getValue(i);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(i);e.addValue(i,oS(a!==void 0?a:r,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const cW=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class q9e{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=yF,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Ld.now();this.renderScheduledAtthis.bindToMotionValue(i,n)),SF.current||abe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:S_.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){lW.delete(this.current),this.projection&&this.projection.unmount(),fm(this.notifyUpdate),fm(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Ub.has(t),r=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Yr.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Nv){const n=Nv[t];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[t]&&r&&i(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ps()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;in.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=oS(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){var i;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(i=this.getBaseTargetFromProps(this.props,t))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(kge(r)||mge(r))?r=parseFloat(r):!V9e(r)&&hm.test(n)&&(r=Oge(t,n)),this.setBaseTarget(t,fo(r)?r.get():r)),fo(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:i}=this.props;let r;if(typeof i=="string"||typeof i=="object"){const a=Z9(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[t])}if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!fo(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new cF),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class obe extends q9e{constructor(){super(...arguments),this.KeyframeResolver=Age}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;fo(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function W9e(e){return window.getComputedStyle(e)}class K9e extends obe{constructor(){super(...arguments),this.type="html",this.renderInstance=Kme}readValueFromInstance(t,n){if(Ub.has(n)){const i=bF(n);return i&&i.default||0}else{const i=W9e(t),r=(Hme(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Wge(t,n)}build(t,n,i){tF(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return sF(t,n,i)}}class G9e extends obe{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ps}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ub.has(n)){const i=bF(n);return i&&i.default||0}return n=Gme.has(n)?n:G9(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return Zme(t,n,i)}build(t,n,i){nF(t,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,i,r){Xme(t,n,i,r)}mount(t){this.isSVGTag=rF(t.tagName),super.mount(t)}}const X9e=(e,t)=>Y9(e)?new G9e(t):new K9e(t,{allowProjection:e!==m.Fragment}),Y9e=S6e({...p8e,...U9e,...k9e,...Q9e},X9e),mr=$4e(Y9e);function kF(){!SF.current&&abe();const[e]=m.useState(S_.current);return e}function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||/ServerSideRendering/.test(navigator&&navigator.userAgent)?m.useEffect:m.useLayoutEffect;function K0(e,t,n){var i=m.useRef(t);i.current=t,m.useEffect(function(){function r(s){i.current(s)}return e&&window.addEventListener(e,r,n),function(){e&&window.removeEventListener(e,r)}},[e])}var Z9e=["container"];function J9e(e){var t=e.container,n=t===void 0?document.body:t,i=Fj(e,Z9e);return $i.createPortal(ri.createElement("div",fa({},i)),n)}function eFe(e){return ri.createElement("svg",fa({width:"44",height:"44",viewBox:"0 0 768 768"},e),ri.createElement("path",{d:"M607.5 205.5l-178.5 178.5 178.5 178.5-45 45-178.5-178.5-178.5 178.5-45-45 178.5-178.5-178.5-178.5 45-45 178.5 178.5 178.5-178.5z"}))}function tFe(e){return ri.createElement("svg",fa({width:"44",height:"44",viewBox:"0 0 768 768"},e),ri.createElement("path",{d:"M640.5 352.5v63h-390l178.5 180-45 45-256.5-256.5 256.5-256.5 45 45-178.5 180h390z"}))}function nFe(e){return ri.createElement("svg",fa({width:"44",height:"44",viewBox:"0 0 768 768"},e),ri.createElement("path",{d:"M384 127.5l256.5 256.5-256.5 256.5-45-45 178.5-180h-390v-63h390l-178.5-180z"}))}function iFe(){return m.useEffect(function(){var e=document.body.style,t=e.overflow;return e.overflow="hidden",function(){e.overflow=t}},[]),null}function dW(e){var t=e.touches[0],n=t.clientX,i=t.clientY;if(e.touches.length>=2){var r=e.touches[1],s=r.clientX,a=r.clientY;return[(n+s)/2,(i+a)/2,Math.sqrt(Math.pow(s-n,2)+Math.pow(a-i,2))]}return[n,i,0]}var Op=function(e,t,n,i){var r,s=n*t,a=(s-i)/2,l=e;return s<=i?(r=1,l=0):e>0&&a-e<=0?(r=2,l=a):e<0&&a+e<=0&&(r=3,l=-a),[r,l]};function kD(e,t,n,i,r,s,a,l,c,u){a===void 0&&(a=innerWidth/2),l===void 0&&(l=innerHeight/2),c===void 0&&(c=0),u===void 0&&(u=0);var d=Op(e,s,n,innerWidth)[0],f=Op(t,s,i,innerHeight),h=innerWidth/2,p=innerHeight/2;return{x:a-s/r*(a-(h+e))-h+(i/n>=3&&n*s===innerWidth?0:d?c/2:c),y:l-s/r*(l-(p+t))-p+(f[0]?u/2:u),lastCX:a,lastCY:l}}function r4(e,t,n){var i=e%180!=0;return i?[n,t,i]:[t,n,i]}function ED(e,t,n){var i=r4(n,innerWidth,innerHeight),r=i[0],s=i[1],a=0,l=r,c=s,u=e/t*s,d=t/e*r;return e=s?l=u:e>=r&&tr/s?c=d:t/e>=3&&!i[2]?a=((c=d)-s)/2:l=u,{width:l,height:c,x:0,y:a,pause:!0}}function VC(e,t){var n=t.leading,i=n!==void 0&&n,r=t.maxWait,s=t.wait,a=s===void 0?r||0:s,l=m.useRef(e);l.current=e;var c=m.useRef(0),u=m.useRef(),d=function(){return u.current&&clearTimeout(u.current)},f=m.useCallback(function(){var h=[].slice.call(arguments),p=Date.now();function g(){c.current=p,d(),l.current.apply(null,h)}var b=c.current,v=p-b;if(b===0&&(i&&g(),c.current=p),r!==void 0){if(v>r)return void g()}else v=1&&s&&s())};d()}function d(){c=requestAnimationFrame(u)}}var sFe={T:0,L:0,W:0,H:0,FIT:void 0},cbe=function(){var e=m.useRef(!1);return m.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),e},aFe=["className"];function oFe(e){var t=e.className,n=t===void 0?"":t,i=Fj(e,aFe);return ri.createElement("div",fa({className:"PhotoView__Spinner "+n},i),ri.createElement("svg",{viewBox:"0 0 32 32",width:"36",height:"36",fill:"white"},ri.createElement("path",{opacity:".25",d:"M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4"}),ri.createElement("path",{d:"M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z"})))}var lFe=["src","loaded","broken","className","onPhotoLoad","loadingElement","brokenElement"];function cFe(e){var t=e.src,n=e.loaded,i=e.broken,r=e.className,s=e.onPhotoLoad,a=e.loadingElement,l=e.brokenElement,c=Fj(e,lFe),u=cbe();return t&&!i?ri.createElement(ri.Fragment,null,ri.createElement("img",fa({className:"PhotoView__Photo"+(r?" "+r:""),src:t,onLoad:function(d){var f=d.target;u.current&&s({loaded:!0,naturalWidth:f.naturalWidth,naturalHeight:f.naturalHeight})},onError:function(){u.current&&s({broken:!0})},draggable:!1,alt:""},c)),!n&&(a?ri.createElement("span",{className:"PhotoView__icon"},a):ri.createElement(oFe,{className:"PhotoView__icon"}))):l?ri.createElement("span",{className:"PhotoView__icon"},typeof l=="function"?l({src:t}):l):null}var uFe={naturalWidth:void 0,naturalHeight:void 0,width:void 0,height:void 0,loaded:void 0,broken:!1,x:0,y:0,touched:!1,maskTouched:!1,rotate:0,scale:1,CX:0,CY:0,lastX:0,lastY:0,lastCX:0,lastCY:0,lastScale:1,touchTime:0,touchLength:0,pause:!0,stopRaf:!0,reach:void 0};function dFe(e){var t=e.item,n=t.src,i=t.render,r=t.width,s=r===void 0?0:r,a=t.height,l=a===void 0?0:a,c=t.originRef,u=e.visible,d=e.speed,f=e.easing,h=e.wrapClassName,p=e.className,g=e.style,b=e.loadingElement,v=e.brokenElement,y=e.onPhotoTap,x=e.onMaskTap,w=e.onReachMove,O=e.onReachUp,k=e.onPhotoResize,S=e.isActive,E=e.expose,C=k_(uFe),N=C[0],_=C[1],j=m.useRef(0),T=cbe(),L=N.naturalWidth,A=L===void 0?s:L,R=N.naturalHeight,P=R===void 0?l:R,$=N.width,M=$===void 0?s:$,B=N.height,I=B===void 0?l:B,H=N.loaded,X=H===void 0?!n:H,Q=N.broken,q=N.x,U=N.y,te=N.touched,le=N.stopRaf,oe=N.maskTouched,re=N.rotate,pe=N.scale,K=N.CX,G=N.CY,se=N.lastX,fe=N.lastY,Se=N.lastCX,Te=N.lastCY,rt=N.lastScale,Be=N.touchTime,Me=N.touchLength,Ie=N.pause,qe=N.reach,Pe=Zg({onScale:function(_e){return Ve(zC(_e))},onRotate:function(_e){re!==_e&&(E({rotate:_e}),_(fa({rotate:_e},ED(A,P,_e))))}});function Ve(_e,st,Re){pe!==_e&&(E({scale:_e}),_(fa({scale:_e},kD(q,U,M,I,pe,_e,st,Re),_e<=1&&{x:0,y:0})))}var ke=VC(function(_e,st,Re){if(Re===void 0&&(Re=0),(te||oe)&&S){var gt=r4(re,M,I),ut=gt[0],ye=gt[1];if(Re===0&&j.current===0){var ze=Math.abs(_e-K)<=20,tt=Math.abs(st-G)<=20;if(ze&&tt)return void _({lastCX:_e,lastCY:st});j.current=ze?st>G?3:2:1}var kt,_t=_e-Se,rn=st-Te;if(Re===0){var en=Op(_t+se,pe,ut,innerWidth)[0],on=Op(rn+fe,pe,ye,innerHeight);kt=function(Mt,Cn,De,pt){return Cn&&Mt===1||pt==="x"?"x":De&&Mt>1||pt==="y"?"y":void 0}(j.current,en,on[0],qe),kt!==void 0&&w(kt,_e,st,pe)}if(kt==="x"||oe)return void _({reach:"x"});var J=zC(pe+(Re-Me)/100/2*pe,A/M,.2);E({scale:J}),_(fa({touchLength:Re,reach:kt,scale:J},kD(q,U,M,I,pe,J,_e,st,_t,rn)))}},{maxWait:8});function Le(_e){return!le&&!te&&(T.current&&_(fa({},_e,{pause:u})),T.current)}var Y,he,Oe,Ke,et,Ct,je,ve,He=(et=function(_e){return Le({x:_e})},Ct=function(_e){return Le({y:_e})},je=function(_e){return T.current&&(E({scale:_e}),_({scale:_e})),!te&&T.current},ve=Zg({X:function(_e){return et(_e)},Y:function(_e){return Ct(_e)},S:function(_e){return je(_e)}}),function(_e,st,Re,gt,ut,ye,ze,tt,kt,_t,rn){var en=r4(_t,ut,ye),on=en[0],J=en[1],Mt=Op(_e,tt,on,innerWidth),Cn=Mt[0],De=Mt[1],pt=Op(st,tt,J,innerHeight),ot=pt[0],Vn=pt[1],si=Date.now()-rn;if(si>=200||tt!==ze||Math.abs(kt-ze)>1){var Jn=kD(_e,st,ut,ye,ze,tt),Wi=Jn.x,$e=Jn.y,ht=Cn?De:Wi!==_e?Wi:null,Yt=ot?Vn:$e!==st?$e:null;return ht!==null&&kg(_e,ht,ve.X),Yt!==null&&kg(st,Yt,ve.Y),void(tt!==ze&&kg(ze,tt,ve.S))}var hn=(_e-Re)/si,tn=(st-gt)/si,Ei=Math.sqrt(Math.pow(hn,2)+Math.pow(tn,2)),Pn=!1,gi=!1;(function(oi,bi){var Sn,rr=oi,ci=0,Vi=0,ds=function(_s){Sn||(Sn=_s);var Fr=_s-Sn,vs=Math.sign(oi),Ns=-.001*vs,fs=Math.sign(-rr)*Math.pow(rr,2)*2e-4,ba=rr*Fr+(Ns+fs)*Math.pow(Fr,2)/2;ci+=ba,Sn=_s,vs*(rr+=(Ns+fs)*Fr)<=0?$r():bi(ci)?kr():$r()};function kr(){Vi=requestAnimationFrame(ds)}function $r(){cancelAnimationFrame(Vi)}kr()})(Ei,function(oi){var bi=_e+oi*(hn/Ei),Sn=st+oi*(tn/Ei),rr=Op(bi,ze,on,innerWidth),ci=rr[0],Vi=rr[1],ds=Op(Sn,ze,J,innerHeight),kr=ds[0],$r=ds[1];if(ci&&!Pn&&(Pn=!0,Cn?kg(bi,Vi,ve.X):fW(Vi,bi+(bi-Vi),ve.X)),kr&&!gi&&(gi=!0,ot?kg(Sn,$r,ve.Y):fW($r,Sn+(Sn-$r),ve.Y)),Pn&&gi)return!1;var _s=Pn||ve.X(Vi),Fr=gi||ve.Y($r);return _s&&Fr})}),it=(Y=y,he=function(_e,st){qe||Ve(pe!==1?1:Math.max(2,A/M),_e,st)},Oe=m.useRef(0),Ke=VC(function(){Oe.current=0,Y.apply(void 0,[].slice.call(arguments))},{wait:300}),function(){var _e=[].slice.call(arguments);Oe.current+=1,Ke.apply(void 0,_e),Oe.current>=2&&(Ke.cancel(),Oe.current=0,he.apply(void 0,_e))});function Ae(_e,st){if(j.current=0,(te||oe)&&S){_({touched:!1,maskTouched:!1,pause:!1,stopRaf:!1,reach:void 0});var Re=zC(pe,A/M);if(He(q,U,se,fe,M,I,pe,Re,rt,re,Be),O(_e,st),K===_e&&G===st){if(te)return void it(_e,st);oe&&x(_e,st)}}}function Wt(_e,st,Re){Re===void 0&&(Re=0),_({touched:!0,CX:_e,CY:st,lastCX:_e,lastCY:st,lastX:q,lastY:U,lastScale:pe,touchLength:Re,touchTime:Date.now()})}function mn(_e){_({maskTouched:!0,CX:_e.clientX,CY:_e.clientY,lastX:q,lastY:U})}K0(Tf?void 0:"mousemove",function(_e){_e.preventDefault(),ke(_e.clientX,_e.clientY)}),K0(Tf?void 0:"mouseup",function(_e){Ae(_e.clientX,_e.clientY)}),K0(Tf?"touchmove":void 0,function(_e){_e.preventDefault();var st=dW(_e);ke.apply(void 0,st)},{passive:!1}),K0(Tf?"touchend":void 0,function(_e){var st=_e.changedTouches[0];Ae(st.clientX,st.clientY)},{passive:!1}),K0("resize",VC(function(){X&&!te&&(_(ED(A,P,re)),k())},{maxWait:8})),i4(function(){S&&E(fa({scale:pe,rotate:re},Pe))},[S]);var qt=function(_e,st,Re,gt,ut,ye,ze,tt,kt,_t){var rn=function(Wi,$e,ht,Yt,hn){var tn=m.useRef(!1),Ei=k_({lead:!0,scale:ht}),Pn=Ei[0],gi=Pn.lead,oi=Pn.scale,bi=Ei[1],Sn=VC(function(rr){try{return hn(!0),bi({lead:!1,scale:rr}),Promise.resolve()}catch(ci){return Promise.reject(ci)}},{wait:Yt});return i4(function(){tn.current?(hn(!1),bi({lead:!0}),Sn(ht)):tn.current=!0},[ht]),gi?[Wi*oi,$e*oi,ht/oi]:[Wi*ht,$e*ht,1]}(ye,ze,tt,kt,_t),en=rn[0],on=rn[1],J=rn[2],Mt=function(Wi,$e,ht,Yt,hn){var tn=m.useState(sFe),Ei=tn[0],Pn=tn[1],gi=m.useState(0),oi=gi[0],bi=gi[1],Sn=m.useRef(),rr=Zg({OK:function(){return Wi&&bi(4)}});function ci(Vi){hn(!1),bi(Vi)}return m.useEffect(function(){if(Sn.current||(Sn.current=Date.now()),ht){if(function(Vi,ds){var kr=Vi&&Vi.current;if(kr&&kr.nodeType===1){var $r=kr.getBoundingClientRect();ds({T:$r.top,L:$r.left,W:$r.width,H:$r.height,FIT:kr.tagName==="IMG"?getComputedStyle(kr).objectFit:void 0})}}($e,Pn),Wi)return Date.now()-Sn.current<250?(bi(1),requestAnimationFrame(function(){bi(2),requestAnimationFrame(function(){return ci(3)})}),void setTimeout(rr.OK,Yt)):void bi(4);ci(5)}},[Wi,ht]),[oi,Ei]}(_e,st,Re,kt,_t),Cn=Mt[0],De=Mt[1],pt=De.W,ot=De.FIT,Vn=innerWidth/2,si=innerHeight/2,Jn=Cn<3||Cn>4;return[Jn?pt?De.L:Vn:gt+(Vn-ye*tt/2),Jn?pt?De.T:si:ut+(si-ze*tt/2),en,Jn&&ot?en*(De.H/pt):on,Cn===0?J:Jn?pt/(ye*tt)||.01:J,Jn?ot?1:0:1,Cn,ot]}(u,c,X,q,U,M,I,pe,d,function(_e){return _({pause:_e})}),xt=qt[4],Nt=qt[6],at="transform "+d+"ms "+f,bt={className:p,onMouseDown:Tf?void 0:function(_e){_e.stopPropagation(),_e.button===0&&Wt(_e.clientX,_e.clientY,0)},onTouchStart:Tf?function(_e){_e.stopPropagation(),Wt.apply(void 0,dW(_e))}:void 0,onWheel:function(_e){if(!qe){var st=zC(pe-_e.deltaY/100/2,A/M);_({stopRaf:!0}),Ve(st,_e.clientX,_e.clientY)}},style:{width:qt[2]+"px",height:qt[3]+"px",opacity:qt[5],objectFit:Nt===4?void 0:qt[7],transform:re?"rotate("+re+"deg)":void 0,transition:Nt>2?at+", opacity "+d+"ms ease, height "+(Nt<4?d/2:Nt>4?d:0)+"ms "+f:void 0}};return ri.createElement("div",{className:"PhotoView__PhotoWrap"+(h?" "+h:""),style:g,onMouseDown:!Tf&&S?mn:void 0,onTouchStart:Tf&&S?function(_e){return mn(_e.touches[0])}:void 0},ri.createElement("div",{className:"PhotoView__PhotoBox",style:{transform:"matrix("+xt+", 0, 0, "+xt+", "+qt[0]+", "+qt[1]+")",transition:te||Ie?void 0:at,willChange:S?"transform":void 0}},n?ri.createElement(cFe,fa({src:n,loaded:X,broken:Q},bt,{onPhotoLoad:function(_e){_(fa({},_e,_e.loaded&&ED(_e.naturalWidth||0,_e.naturalHeight||0,re)))},loadingElement:b,brokenElement:v})):i&&i({attrs:bt,scale:xt,rotate:re})))}var hW={x:0,touched:!1,pause:!1,lastCX:void 0,lastCY:void 0,bg:void 0,lastBg:void 0,overlay:!0,minimal:!0,scale:1,rotate:0};function fFe(e){var t=e.loop,n=t===void 0?3:t,i=e.speed,r=e.easing,s=e.photoClosable,a=e.maskClosable,l=a===void 0||a,c=e.maskOpacity,u=c===void 0?1:c,d=e.pullClosable,f=d===void 0||d,h=e.bannerVisible,p=h===void 0||h,g=e.overlayRender,b=e.toolbarRender,v=e.className,y=e.maskClassName,x=e.photoClassName,w=e.photoWrapClassName,O=e.loadingElement,k=e.brokenElement,S=e.images,E=e.index,C=E===void 0?0:E,N=e.onIndexChange,_=e.visible,j=e.onClose,T=e.afterClose,L=e.portalContainer,A=k_(hW),R=A[0],P=A[1],$=m.useState(0),M=$[0],B=$[1],I=R.x,H=R.touched,X=R.pause,Q=R.lastCX,q=R.lastCY,U=R.bg,te=U===void 0?u:U,le=R.lastBg,oe=R.overlay,re=R.minimal,pe=R.scale,K=R.rotate,G=R.onScale,se=R.onRotate,fe=e.hasOwnProperty("index"),Se=fe?C:M,Te=fe?N:B,rt=m.useRef(Se),Be=S.length,Me=S[Se],Ie=typeof n=="boolean"?n:Be>n,qe=function(xt,Nt){var at=m.useReducer(function(Re){return!Re},!1)[1],bt=m.useRef(0),_e=function(Re){var gt=m.useRef(Re);function ut(ye){gt.current=ye}return m.useMemo(function(){(function(ye){xt?(ye(xt),bt.current=1):bt.current=2})(ut)},[Re]),[gt.current,ut]}(xt),st=_e[1];return[_e[0],bt.current,function(){at(),bt.current===2&&(st(!1),Nt&&Nt()),bt.current=0}]}(_,T),Pe=qe[0],Ve=qe[1],ke=qe[2];i4(function(){if(Pe)return P({pause:!0,x:Se*-(innerWidth+E0)}),void(rt.current=Se);P(hW)},[Pe]);var Le=Zg({close:function(xt){se&&se(0),P({overlay:!0,lastBg:te}),j(xt)},changeIndex:function(xt,Nt){Nt===void 0&&(Nt=!1);var at=Ie?rt.current+(xt-Se):xt,bt=Be-1,_e=n4(at,0,bt),st=Ie?at:_e,Re=innerWidth+E0;P({touched:!1,lastCX:void 0,lastCY:void 0,x:-Re*st,pause:Nt}),rt.current=st,Te&&Te(Ie?xt<0?bt:xt>bt?0:xt:_e)}}),Y=Le.close,he=Le.changeIndex;function Oe(xt){return xt?Y():P({overlay:!oe})}function Ke(){P({x:-(innerWidth+E0)*Se,lastCX:void 0,lastCY:void 0,pause:!0}),rt.current=Se}function et(xt,Nt,at,bt){xt==="x"?function(_e){if(Q!==void 0){var st=_e-Q,Re=st;!Ie&&(Se===0&&st>0||Se===Be-1&&st<0)&&(Re=st/2),P({touched:!0,lastCX:Q,x:-(innerWidth+E0)*rt.current+Re,pause:!1})}else P({touched:!0,lastCX:_e,x:I,pause:!1})}(Nt):xt==="y"&&function(_e,st){if(q!==void 0){var Re=u===null?null:n4(u,.01,u-Math.abs(_e-q)/100/4);P({touched:!0,lastCY:q,bg:st===1?Re:u,minimal:st===1})}else P({touched:!0,lastCY:_e,bg:te,minimal:!0})}(at,bt)}function Ct(xt,Nt){var at=xt-(Q??xt),bt=Nt-(q??Nt),_e=!1;if(at<-40)he(Se+1);else if(at>40)he(Se-1);else{var st=-(innerWidth+E0)*rt.current;Math.abs(bt)>100&&re&&f&&(_e=!0,Y()),P({touched:!1,x:st,lastCX:void 0,lastCY:void 0,bg:u,overlay:!!_e||oe})}}K0("keydown",function(xt){if(_)switch(xt.key){case"ArrowLeft":he(Se-1,!0);break;case"ArrowRight":he(Se+1,!0);break;case"Escape":Y()}});var je=function(xt,Nt,at){return m.useMemo(function(){var bt=xt.length;return at?xt.concat(xt).concat(xt).slice(bt+Nt-1,bt+Nt+2):xt.slice(Math.max(Nt-1,0),Math.min(Nt+2,bt+1))},[xt,Nt,at])}(S,Se,Ie);if(!Pe)return null;var ve=oe&&!Ve,He=_?te:le,it=G&&se&&{images:S,index:Se,visible:_,onClose:Y,onIndexChange:he,overlayVisible:ve,overlay:Me&&Me.overlay,scale:pe,rotate:K,onScale:G,onRotate:se},Ae=i?i(Ve):400,Wt=r?r(Ve):uW,mn=i?i(3):600,qt=r?r(3):uW;return ri.createElement(J9e,{className:"PhotoView-Portal"+(ve?"":" PhotoView-Slider__clean")+(_?"":" PhotoView-Slider__willClose")+(v?" "+v:""),role:"dialog",onClick:function(xt){return xt.stopPropagation()},container:L},_&&ri.createElement(iFe,null),ri.createElement("div",{className:"PhotoView-Slider__Backdrop"+(y?" "+y:"")+(Ve===1?" PhotoView-Slider__fadeIn":Ve===2?" PhotoView-Slider__fadeOut":""),style:{background:He?"rgba(0, 0, 0, "+He+")":void 0,transitionTimingFunction:Wt,transitionDuration:(H?0:Ae)+"ms",animationDuration:Ae+"ms"},onAnimationEnd:ke}),p&&ri.createElement("div",{className:"PhotoView-Slider__BannerWrap"},ri.createElement("div",{className:"PhotoView-Slider__Counter"},Se+1," / ",Be),ri.createElement("div",{className:"PhotoView-Slider__BannerRight"},b&&it&&b(it),ri.createElement(eFe,{className:"PhotoView-Slider__toolbarIcon",onClick:Y}))),je.map(function(xt,Nt){var at=Ie||Se!==0?rt.current-1+Nt:Se+Nt;return ri.createElement(dFe,{key:Ie?xt.key+"/"+xt.src+"/"+at:xt.key,item:xt,speed:Ae,easing:Wt,visible:_,onReachMove:et,onReachUp:Ct,onPhotoTap:function(){return Oe(s)},onMaskTap:function(){return Oe(l)},wrapClassName:w,className:x,style:{left:(innerWidth+E0)*at+"px",transform:"translate3d("+I+"px, 0px, 0)",transition:H||X?void 0:"transform "+mn+"ms "+qt},loadingElement:O,brokenElement:k,onPhotoResize:Ke,isActive:rt.current===at,expose:P})}),!Tf&&p&&ri.createElement(ri.Fragment,null,(Ie||Se!==0)&&ri.createElement("div",{className:"PhotoView-Slider__ArrowLeft",onClick:function(){return he(Se-1,!0)}},ri.createElement(tFe,null)),(Ie||Se+1-1){var y=u.slice();return y.splice(v,1,b),void l({images:y})}l(function(x){return{images:x.images.concat(b)}})},remove:function(b){l(function(v){var y=v.images.filter(function(x){return x.key!==b});return{images:y,index:Math.min(y.length-1,f)}})},show:function(b){var v=u.findIndex(function(y){return y.key===b});l({visible:!0,index:v}),i&&i(!0,v,a)}}),p=Zg({close:function(){l({visible:!1}),i&&i(!1,f,a)},changeIndex:function(b){l({index:b}),n&&n(b,a)}}),g=m.useMemo(function(){return fa({},a,h)},[a,h]);return ri.createElement(lbe.Provider,{value:g},t,ri.createElement(fFe,fa({images:u,visible:d,index:f,onIndexChange:p.changeIndex,onClose:p.close},r)))}var ube=function(e){var t,n,i=e.src,r=e.render,s=e.overlay,a=e.width,l=e.height,c=e.triggers,u=c===void 0?["onClick"]:c,d=e.children,f=m.useContext(lbe),h=(t=function(){return f.nextId()},(n=m.useRef({sign:!1,fn:void 0}).current).sign||(n.sign=!0,n.fn=t()),n.fn),p=m.useRef(null);m.useImperativeHandle(d==null?void 0:d.ref,function(){return p.current}),m.useEffect(function(){return function(){f.remove(h)}},[]);var g=Zg({render:function(v){return r&&r(v)},show:function(v,y){f.show(h),function(x,w){if(d){var O=d.props[x];O&&O(w)}}(v,y)}}),b=m.useMemo(function(){var v={};return u.forEach(function(y){v[y]=g.show.bind(null,y)}),v},[]);return m.useEffect(function(){f.update({key:h,src:i,originRef:p,render:g.render,overlay:s,width:a,height:l})},[i]),d?m.Children.only(m.cloneElement(d,fa({},b,{ref:p}))):null};const gFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M5.293 12.707a1 1 0 0 1 0-1.414l5-5a1 1 0 1 1 1.414 1.414L8.414 11H18a1 1 0 1 1 0 2H8.414l3.293 3.293a1 1 0 0 1-1.414 1.414l-5-5Z",clipRule:"evenodd"})}),bFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M18.707 12.707a1 1 0 0 0 0-1.414l-5-5a1 1 0 1 0-1.414 1.414L15.586 11H6a1 1 0 1 0 0 2h9.586l-3.293 3.293a1 1 0 0 0 1.414 1.414l5-5Z",clipRule:"evenodd"})}),yFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M4.47192 2.5C5.02421 2.5 5.47192 2.94772 5.47192 3.5V5.07196C7.17065 3.47759 9.45675 2.5 11.9719 2.5C17.2186 2.5 21.4719 6.75329 21.4719 12C21.4719 17.2467 17.2186 21.5 11.9719 21.5C7.10262 21.5 3.0902 17.8375 2.53692 13.1164C2.47264 12.5679 2.8652 12.0711 3.41373 12.0068C3.96226 11.9425 4.45904 12.3351 4.52333 12.8836C4.95991 16.6089 8.12901 19.5 11.9719 19.5C16.1141 19.5 19.4719 16.1421 19.4719 12C19.4719 7.85786 16.1141 4.5 11.9719 4.5C9.75153 4.5 7.75552 5.46469 6.38146 7H9.00003C9.55232 7 10 7.44772 10 8C10 8.55228 9.55232 9 9.00003 9H4.47192C3.93256 9 3.49293 8.57299 3.47265 8.03859C3.47175 8.01771 3.47151 7.99677 3.47192 7.9758V3.5C3.47192 2.94772 3.91964 2.5 4.47192 2.5Z",fill:"currentColor"})}),Bj=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M2.55823 12C2.55823 6.75329 6.81152 2.5 12.0582 2.5C14.5734 2.5 16.8595 3.47759 18.5582 5.07197V3.5C18.5582 2.94772 19.0059 2.5 19.5582 2.5C20.1105 2.5 20.5582 2.94772 20.5582 3.5V7.97591C20.5586 7.99622 20.5584 8.01651 20.5576 8.03674C20.5382 8.572 20.0982 9 19.5582 9H15.0582C14.5059 9 14.0582 8.55228 14.0582 8C14.0582 7.44772 14.5059 7 15.0582 7H17.6487C16.2746 5.46469 14.2786 4.5 12.0582 4.5C7.91609 4.5 4.55823 7.85786 4.55823 12C4.55823 16.1421 7.91609 19.5 12.0582 19.5C15.9011 19.5 19.0702 16.6089 19.5068 12.8836C19.5711 12.3351 20.0679 11.9425 20.6164 12.0068C21.165 12.0711 21.5575 12.5679 21.4932 13.1164C20.94 17.8375 16.9275 21.5 12.0582 21.5C6.81152 21.5 2.55823 17.2467 2.55823 12Z",fill:"currentColor"})}),HC=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M16.243 6.757a1 1 0 0 1 1 1v7.072a1 1 0 0 1-2 0v-4.657L8.464 16.95a1 1 0 0 1-1.414-1.414l6.778-6.779H9.172a1 1 0 0 1 0-2h7.07Z",clipRule:"evenodd"})}),vFe=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M10.663 6.3872C10.8152 6.29068 11 6.40984 11 6.59007V8C11 8.55229 11.4477 9 12 9C12.5523 9 13 8.55229 13 8V6.59007C13 6.40984 13.1848 6.29068 13.337 6.3872C14.036 6.83047 14.5 7.61105 14.5 8.5C14.5 9.53284 13.8737 10.4194 12.9801 10.8006C12.9932 10.865 13 10.9317 13 11V13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13V11C11 10.9317 11.0068 10.865 11.0199 10.8006C10.1263 10.4194 9.5 9.53284 9.5 8.5C9.5 7.61105 9.96397 6.83047 10.663 6.3872Z",fill:"currentColor"}),o.jsx("path",{d:"M17.9754 4.01031C17.8588 4.00078 17.6965 4.00001 17.4 4.00001H9.8C8.94342 4.00001 8.36113 4.00078 7.91104 4.03756C7.47262 4.07338 7.24842 4.1383 7.09202 4.21799C6.7157 4.40974 6.40973 4.7157 6.21799 5.09202C6.1383 5.24842 6.07337 5.47263 6.03755 5.91104C6.00078 6.36113 6 6.94343 6 7.80001V16.1707C6.31278 16.0602 6.64937 16 7 16H18L18 4.60001C18 4.30348 17.9992 4.14122 17.9897 4.02464C17.9893 4.02 17.9889 4.0156 17.9886 4.01145C17.9844 4.01107 17.98 4.01069 17.9754 4.01031ZM17.657 18H7C6.44772 18 6 18.4477 6 19C6 19.5523 6.44772 20 7 20H17.657C17.5343 19.3301 17.5343 18.6699 17.657 18ZM4 19L4 7.75871C3.99999 6.95374 3.99998 6.28937 4.04419 5.74818C4.09012 5.18608 4.18868 4.66938 4.43597 4.18404C4.81947 3.43139 5.43139 2.81947 6.18404 2.43598C6.66937 2.18869 7.18608 2.09012 7.74818 2.0442C8.28937 1.99998 8.95373 1.99999 9.7587 2L17.4319 2C17.6843 1.99997 17.9301 1.99994 18.1382 2.01695C18.3668 2.03563 18.6366 2.07969 18.908 2.21799C19.2843 2.40974 19.5903 2.7157 19.782 3.09203C19.9203 3.36345 19.9644 3.63318 19.9831 3.86178C20.0001 4.06994 20 4.31574 20 4.56812L20 17C20 17.1325 19.9736 17.2638 19.9225 17.386C19.4458 18.5253 19.4458 19.4747 19.9225 20.614C20.0517 20.9227 20.0179 21.2755 19.8325 21.5541C19.6471 21.8326 19.3346 22 19 22H7C5.34315 22 4 20.6569 4 19Z",fill:"currentColor"})]}),Iv=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M18.063 5.674a1 1 0 0 1 .263 1.39l-7.5 11a1 1 0 0 1-1.533.143l-4.5-4.5a1 1 0 1 1 1.414-1.414l3.647 3.647 6.82-10.003a1 1 0 0 1 1.39-.263Z",clipRule:"evenodd"})}),dbe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM16.0755 7.93219C16.5272 8.25003 16.6356 8.87383 16.3178 9.32549L11.5678 16.0755C11.3931 16.3237 11.1152 16.4792 10.8123 16.4981C10.5093 16.517 10.2142 16.3973 10.0101 16.1727L7.51006 13.4227C7.13855 13.014 7.16867 12.3816 7.57733 12.0101C7.98598 11.6386 8.61843 11.6687 8.98994 12.0773L10.6504 13.9039L14.6822 8.17451C15 7.72284 15.6238 7.61436 16.0755 7.93219Z",fill:"currentColor"})}),xFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 9",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.292893 0.292893C0.683418 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L8 6.58579L14.2929 0.292894C14.6834 -0.0976305 15.3166 -0.0976304 15.7071 0.292894C16.0976 0.683418 16.0976 1.31658 15.7071 1.70711L8.70711 8.70711C8.31658 9.09763 7.68342 9.09763 7.29289 8.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683417 0.292893 0.292893Z"})}),OFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M15.707 4.293a1 1 0 0 1 0 1.414L9.414 12l6.293 6.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z",clipRule:"evenodd"})}),wFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M8.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L14.586 12 8.293 5.707a1 1 0 0 1 0-1.414Z",clipRule:"evenodd"})}),EF=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM12 6C12.5523 6 13 6.44772 13 7V12C13 12.2652 12.8946 12.5196 12.7071 12.7071L10.2071 15.2071C9.81658 15.5976 9.18342 15.5976 8.79289 15.2071C8.40237 14.8166 8.40237 14.1834 8.79289 13.7929L11 11.5858V7C11 6.44772 11.4477 6 12 6Z",fill:"currentColor"})}),SFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12.659 9.753a1 1 0 0 1-1.318 0l-4-3.5A1 1 0 1 1 8.66 4.747L12 7.671l3.341-2.924a1 1 0 1 1 1.318 1.506l-4 3.5Zm-4.002 9.501a1 1 0 1 1-1.314-1.508l4-3.485a1 1 0 0 1 1.314 0l4 3.485a1 1 0 1 1-1.314 1.508L12 16.34l-3.343 2.913Z"})}),CF=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12.7587 2H16.2413C17.0463 1.99999 17.7106 1.99998 18.2518 2.04419C18.8139 2.09012 19.3306 2.18868 19.816 2.43597C20.5686 2.81947 21.1805 3.43139 21.564 4.18404C21.8113 4.66937 21.9099 5.18608 21.9558 5.74817C22 6.28936 22 6.95372 22 7.75868V11.2413C22 12.0463 22 12.7106 21.9558 13.2518C21.9099 13.8139 21.8113 14.3306 21.564 14.816C21.1805 15.5686 20.5686 16.1805 19.816 16.564C19.3306 16.8113 18.8139 16.9099 18.2518 16.9558C17.8906 16.9853 17.4745 16.9951 16.9984 16.9984C16.9951 17.4745 16.9853 17.8906 16.9558 18.2518C16.9099 18.8139 16.8113 19.3306 16.564 19.816C16.1805 20.5686 15.5686 21.1805 14.816 21.564C14.3306 21.8113 13.8139 21.9099 13.2518 21.9558C12.7106 22 12.0463 22 11.2413 22H7.75868C6.95372 22 6.28936 22 5.74818 21.9558C5.18608 21.9099 4.66937 21.8113 4.18404 21.564C3.43139 21.1805 2.81947 20.5686 2.43597 19.816C2.18868 19.3306 2.09012 18.8139 2.04419 18.2518C1.99998 17.7106 1.99999 17.0463 2 16.2413V12.7587C1.99999 11.9537 1.99998 11.2894 2.04419 10.7482C2.09012 10.1861 2.18868 9.66937 2.43597 9.18404C2.81947 8.43139 3.43139 7.81947 4.18404 7.43598C4.66937 7.18868 5.18608 7.09012 5.74817 7.04419C6.10939 7.01468 6.52548 7.00487 7.00162 7.00162C7.00487 6.52548 7.01468 6.10939 7.04419 5.74817C7.09012 5.18608 7.18868 4.66937 7.43598 4.18404C7.81947 3.43139 8.43139 2.81947 9.18404 2.43597C9.66937 2.18868 10.1861 2.09012 10.7482 2.04419C11.2894 1.99998 11.9537 1.99999 12.7587 2ZM9.00176 7L11.2413 7C12.0463 6.99999 12.7106 6.99998 13.2518 7.04419C13.8139 7.09012 14.3306 7.18868 14.816 7.43598C15.5686 7.81947 16.1805 8.43139 16.564 9.18404C16.8113 9.66937 16.9099 10.1861 16.9558 10.7482C17 11.2894 17 11.9537 17 12.7587V14.9982C17.4455 14.9951 17.7954 14.9864 18.089 14.9624C18.5274 14.9266 18.7516 14.8617 18.908 14.782C19.2843 14.5903 19.5903 14.2843 19.782 13.908C19.8617 13.7516 19.9266 13.5274 19.9624 13.089C19.9992 12.6389 20 12.0566 20 11.2V7.8C20 6.94342 19.9992 6.36113 19.9624 5.91104C19.9266 5.47262 19.8617 5.24842 19.782 5.09202C19.5903 4.7157 19.2843 4.40973 18.908 4.21799C18.7516 4.1383 18.5274 4.07337 18.089 4.03755C17.6389 4.00078 17.0566 4 16.2 4H12.8C11.9434 4 11.3611 4.00078 10.911 4.03755C10.4726 4.07337 10.2484 4.1383 10.092 4.21799C9.7157 4.40973 9.40973 4.7157 9.21799 5.09202C9.1383 5.24842 9.07337 5.47262 9.03755 5.91104C9.01357 6.20463 9.00489 6.55447 9.00176 7ZM5.91104 9.03755C5.47262 9.07337 5.24842 9.1383 5.09202 9.21799C4.7157 9.40973 4.40973 9.7157 4.21799 10.092C4.1383 10.2484 4.07337 10.4726 4.03755 10.911C4.00078 11.3611 4 11.9434 4 12.8V16.2C4 17.0566 4.00078 17.6389 4.03755 18.089C4.07337 18.5274 4.1383 18.7516 4.21799 18.908C4.40973 19.2843 4.7157 19.5903 5.09202 19.782C5.24842 19.8617 5.47262 19.9266 5.91104 19.9624C6.36113 19.9992 6.94342 20 7.8 20H11.2C12.0566 20 12.6389 19.9992 13.089 19.9624C13.5274 19.9266 13.7516 19.8617 13.908 19.782C14.2843 19.5903 14.5903 19.2843 14.782 18.908C14.8617 18.7516 14.9266 18.5274 14.9624 18.089C14.9992 17.6389 15 17.0566 15 16.2V12.8C15 11.9434 14.9992 11.3611 14.9624 10.911C14.9266 10.4726 14.8617 10.2484 14.782 10.092C14.5903 9.7157 14.2843 9.40973 13.908 9.21799C13.7516 9.1383 13.5274 9.07337 13.089 9.03755C12.6389 9.00078 12.0566 9 11.2 9H7.8C6.94342 9 6.36113 9.00078 5.91104 9.03755Z",fill:"currentColor"})}),kFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M10.556 4a1 1 0 0 0-.97.751l-.292 1.14h5.421l-.293-1.14A1 1 0 0 0 13.453 4h-2.897Zm6.224 1.892-.421-1.639A3 3 0 0 0 13.453 2h-2.897A3 3 0 0 0 7.65 4.253l-.421 1.639H4a1 1 0 1 0 0 2h.1l1.215 11.425A3 3 0 0 0 8.3 22h7.4a3 3 0 0 0 2.984-2.683l1.214-11.425H20a1 1 0 1 0 0-2h-3.22Zm1.108 2H6.112l1.192 11.214A1 1 0 0 0 8.3 20h7.4a1 1 0 0 0 .995-.894l1.192-11.214ZM10 10a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0v-5a1 1 0 0 1 1-1Zm4 0a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0v-5a1 1 0 0 1 1-1Z",clipRule:"evenodd"})}),EFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M3 12a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm7 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm7 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z"})}),CFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 16",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.34151 0.747423C4.71854 0.417526 5.28149 0.417526 5.65852 0.747423L9.65852 4.24742C10.0742 4.61111 10.1163 5.24287 9.75259 5.6585C9.38891 6.07414 8.75715 6.11626 8.34151 5.75258L5.00001 2.82877L1.65852 5.75258C1.24288 6.11626 0.61112 6.07414 0.247438 5.6585C-0.116244 5.24287 -0.0741267 4.61111 0.34151 4.24742L4.34151 0.747423ZM0.246065 10.3578C0.608879 9.94139 1.24055 9.89795 1.65695 10.2608L5.00001 13.1737L8.34308 10.2608C8.75948 9.89795 9.39115 9.94139 9.75396 10.3578C10.1168 10.7742 10.0733 11.4058 9.65695 11.7687L5.65695 15.2539C5.28043 15.582 4.7196 15.582 4.34308 15.2539L0.343082 11.7687C-0.0733128 11.4058 -0.116749 10.7742 0.246065 10.3578Z"})}),TFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M16.793 2.793a3.121 3.121 0 1 1 4.414 4.414l-8.5 8.5A1 1 0 0 1 12 16H9a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707l8.5-8.5Zm3 1.414a1.121 1.121 0 0 0-1.586 0L10 12.414V14h1.586l8.207-8.207a1.121 1.121 0 0 0 0-1.586ZM6 5a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-4a1 1 0 1 1 2 0v4a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h4a1 1 0 1 1 0 2H6Z",clipRule:"evenodd"})}),AFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M12 7a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0V8h-3a1 1 0 0 1-1-1Zm-5 5a1 1 0 0 1 1 1v3h3a1 1 0 1 1 0 2H7a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1Z",clipRule:"evenodd"})}),_Fe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8-10C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm4.465 6.763a1 1 0 0 0-1.228-1.228l-5.5 1.5a1 1 0 0 0-.702.702l-1.5 5.5a1 1 0 0 0 1.228 1.228l5.5-1.5a1 1 0 0 0 .702-.702l1.5-5.5Zm-6.54 5.312.89-3.26 3.26-.89-.89 3.26-3.26.89Z",clipRule:"evenodd"})}),NFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M14.4472 7.10558C14.9412 7.35257 15.1414 7.95324 14.8944 8.44722L10.8944 16.4472C10.6474 16.9412 10.0468 17.1414 9.55279 16.8944C9.05881 16.6474 8.85858 16.0468 9.10557 15.5528L13.1056 7.55279C13.3526 7.05881 13.9532 6.85859 14.4472 7.10558ZM6.6 7.20001C7.04183 7.53138 7.13137 8.15818 6.8 8.60001L4.25 12L6.8 15.4C7.13137 15.8418 7.04183 16.4686 6.6 16.8C6.15817 17.1314 5.53137 17.0418 5.2 16.6L2.2 12.6C1.93333 12.2444 1.93333 11.7556 2.2 11.4L5.2 7.40001C5.53137 6.95818 6.15817 6.86863 6.6 7.20001ZM17.4 7.20001C17.8418 6.86863 18.4686 6.95818 18.8 7.40001L21.8 11.4C22.0667 11.7556 22.0667 12.2444 21.8 12.6L18.8 16.6C18.4686 17.0418 17.8418 17.1314 17.4 16.8C16.9582 16.4686 16.8686 15.8418 17.2 15.4L19.75 12L17.2 8.60001C16.8686 8.15818 16.9582 7.53138 17.4 7.20001Z",fill:"currentColor"})}),fbe=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M13 12a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0v-4Zm-1-2.5A1.25 1.25 0 1 0 12 7a1.25 1.25 0 0 0 0 2.5Z"}),o.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z",clipRule:"evenodd"})]}),jFe=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M7.79289 9.04289C8.18342 8.65237 8.81658 8.65237 9.20711 9.04289L11.4571 11.2929C11.8476 11.6834 11.8476 12.3166 11.4571 12.7071L9.20711 14.9571C8.81658 15.3476 8.18342 15.3476 7.79289 14.9571C7.40237 14.5666 7.40237 13.9334 7.79289 13.5429L9.33579 12L7.79289 10.4571C7.40237 10.0666 7.40237 9.43342 7.79289 9.04289ZM12.25 14.25C12.25 13.6977 12.6977 13.25 13.25 13.25H15.5C16.0523 13.25 16.5 13.6977 16.5 14.25C16.5 14.8023 16.0523 15.25 15.5 15.25H13.25C12.6977 15.25 12.25 14.8023 12.25 14.25Z",fill:"currentColor"}),o.jsx("path",{d:"M2 8C2 5.79086 3.79086 4 6 4C6.55228 4 7 4.44772 7 5C7 5.55228 6.55228 6 6 6C4.89543 6 4 6.89543 4 8V16C4 17.1046 4.89543 18 6 18C6.55228 18 7 18.4477 7 19C7 19.5523 6.55228 20 6 20C3.79086 20 2 18.2091 2 16V8ZM17 5C17 4.44772 17.4477 4 18 4C20.2091 4 22 5.79086 22 8V16C22 18.2091 20.2091 20 18 20C17.4477 20 17 19.5523 17 19C17 18.4477 17.4477 18 18 18C19.1046 18 20 17.1046 20 16V8C20 6.89543 19.1046 6 18 6C17.4477 6 17 5.55228 17 5Z",fill:"currentColor"})]}),RFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z",fill:"currentColor"})}),IFe=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M12.75 9.50001C12.75 9.08579 13.0858 8.75001 13.5 8.75001H14.5C14.9142 8.75001 15.25 9.08579 15.25 9.50001V14.5C15.25 14.9142 14.9142 15.25 14.5 15.25H13.5C13.0858 15.25 12.75 14.9142 12.75 14.5V9.50001Z",fill:"currentColor"}),o.jsx("path",{d:"M9.50001 8.75001C9.08579 8.75001 8.75001 9.08579 8.75001 9.50001V14.5C8.75001 14.9142 9.08579 15.25 9.50001 15.25H10.5C10.9142 15.25 11.25 14.9142 11.25 14.5V9.50001C11.25 9.08579 10.9142 8.75001 10.5 8.75001H9.50001Z",fill:"currentColor"}),o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.97144 12C1.97144 6.46138 6.46138 1.97144 12 1.97144C17.5386 1.97144 22.0286 6.46138 22.0286 12C22.0286 17.5386 17.5386 22.0286 12 22.0286C6.46138 22.0286 1.97144 17.5386 1.97144 12ZM12 4.02858C7.59751 4.02858 4.02858 7.59751 4.02858 12C4.02858 16.4025 7.59751 19.9714 12 19.9714C16.4025 19.9714 19.9714 16.4025 19.9714 12C19.9714 7.59751 16.4025 4.02858 12 4.02858Z",fill:"currentColor"})]}),pW=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M9.5 9.33165V14.6683C9.5 15.4595 10.3752 15.9373 11.0408 15.5095L15.1915 12.8412C15.8038 12.4475 15.8038 11.5524 15.1915 11.1588L11.0408 8.49047C10.3752 8.06265 9.5 8.54049 9.5 9.33165Z",fill:"currentColor"}),o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12Z",fill:"currentColor"})]}),PFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M8 16.7229V7.27711C8 6.29075 9.08894 5.69298 9.9211 6.22254L17.3428 10.9454C18.1147 11.4366 18.1147 12.5634 17.3428 13.0546L9.92109 17.7775C9.08894 18.3071 8 17.7093 8 16.7229Z",fill:"currentColor"})}),hbe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M12 5a1 1 0 0 1 1 1v5h5a1 1 0 1 1 0 2h-5v5a1 1 0 1 1-2 0v-5H6a1 1 0 1 1 0-2h5V6a1 1 0 0 1 1-1Z",clipRule:"evenodd"})}),pbe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12 3C12.5523 3 13 3.44772 13 4L13 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13L13 13L13 20C13 20.5523 12.5523 21 12 21C11.4477 21 11 20.5523 11 20L11 13L4 13C3.44772 13 3 12.5523 3 12C3 11.4477 3.44772 11 4 11L11 11L11 4C11 3.44772 11.4477 3 12 3Z",fill:"currentColor"})}),DFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M12 6C12.5523 6 13 6.44772 13 7V11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H13V17C13 17.5523 12.5523 18 12 18C11.4477 18 11 17.5523 11 17V13H7C6.44772 13 6 12.5523 6 12C6 11.4477 6.44772 11 7 11H11V7C11 6.44772 11.4477 6 12 6Z",fill:"currentColor"})}),MFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.875 4.5C7.35418 4.5 4.5 7.35418 4.5 10.875C4.5 14.3958 7.35418 17.25 10.875 17.25C14.3958 17.25 17.25 14.3958 17.25 10.875C17.25 7.35418 14.3958 4.5 10.875 4.5ZM2.5 10.875C2.5 6.24962 6.24962 2.5 10.875 2.5C15.5004 2.5 19.25 6.24962 19.25 10.875C19.25 12.8273 18.582 14.6236 17.462 16.0478L21.2071 19.7929C21.5976 20.1834 21.5976 20.8166 21.2071 21.2071C20.8166 21.5976 20.1834 21.5976 19.7929 21.2071L16.0478 17.462C14.6236 18.582 12.8273 19.25 10.875 19.25C6.24962 19.25 2.5 15.5004 2.5 10.875Z",fill:"currentColor"})}),LFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M11.2929 3.29289C11.6834 2.90237 12.3166 2.90237 12.7071 3.29289L16.7071 7.29289C17.0976 7.68342 17.0976 8.31658 16.7071 8.70711C16.3166 9.09763 15.6834 9.09763 15.2929 8.70711L13 6.41421V15C13 15.5523 12.5523 16 12 16C11.4477 16 11 15.5523 11 15V6.41421L8.70711 8.70711C8.31658 9.09763 7.68342 9.09763 7.29289 8.70711C6.90237 8.31658 6.90237 7.68342 7.29289 7.29289L11.2929 3.29289ZM4 14C4.55229 14 5 14.4477 5 15V15.2C5 16.0566 5.00078 16.6389 5.03755 17.089C5.07337 17.5274 5.1383 17.7516 5.21799 17.908C5.40973 18.2843 5.7157 18.5903 6.09202 18.782C6.24842 18.8617 6.47262 18.9266 6.91104 18.9624C7.36113 18.9992 7.94342 19 8.8 19H15.2C16.0566 19 16.6389 18.9992 17.089 18.9624C17.5274 18.9266 17.7516 18.8617 17.908 18.782C18.2843 18.5903 18.5903 18.2843 18.782 17.908C18.8617 17.7516 18.9266 17.5274 18.9624 17.089C18.9992 16.6389 19 16.0566 19 15.2V15C19 14.4477 19.4477 14 20 14C20.5523 14 21 14.4477 21 15V15.2413C21 16.0463 21 16.7106 20.9558 17.2518C20.9099 17.8139 20.8113 18.3306 20.564 18.816C20.1805 19.5686 19.5686 20.1805 18.816 20.564C18.3306 20.8113 17.8139 20.9099 17.2518 20.9558C16.7106 21 16.0463 21 15.2413 21H8.75868C7.95372 21 7.28936 21 6.74817 20.9558C6.18608 20.9099 5.66937 20.8113 5.18404 20.564C4.43139 20.1805 3.81947 19.5686 3.43597 18.816C3.18868 18.3306 3.09012 17.8139 3.04419 17.2518C2.99998 16.7106 2.99999 16.0463 3 15.2413L3 15C3 14.4477 3.44772 14 4 14Z",fill:"currentColor"})}),$Fe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M6 8C6 6.89543 6.89543 6 8 6H16C17.1046 6 18 6.89543 18 8V16C18 17.1046 17.1046 18 16 18H8C6.89543 18 6 17.1046 6 16V8Z",fill:"currentColor"})}),FFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M14.5 4a5.5 5.5 0 0 0-5.078 7.616 1 1 0 0 1-.216 1.092l-4.749 4.75a1.475 1.475 0 0 0 2.086 2.085l4.749-4.749a1 1 0 0 1 1.092-.216A5.5 5.5 0 0 0 20 9.414l-1.293 1.293a3.828 3.828 0 1 1-5.414-5.414L14.585 4H14.5ZM7 9.5a7.5 7.5 0 0 1 9.969-7.084 1 1 0 0 1 .378 1.651l-2.64 2.64a1.829 1.829 0 0 0 2.586 2.586l2.64-2.64a1 1 0 0 1 1.651.378 7.5 7.5 0 0 1-9.328 9.627l-4.299 4.3a3.475 3.475 0 0 1-4.914-4.915l4.299-4.299A7.497 7.497 0 0 1 7 9.5Z"})}),U2=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{d:"M8.99805 16.796C8.99805 15.4164 7.87961 14.2979 6.5 14.2979C5.12039 14.2979 4.00195 15.4164 4.00195 16.796C4.00196 18.1756 5.1204 19.294 6.5 19.294C7.8796 19.294 8.99804 18.1756 8.99805 16.796ZM19.748 15.0479C19.748 14.7729 19.525 14.5499 19.25 14.5499H15.75C15.475 14.5499 15.252 14.7729 15.252 15.0479V18.5479C15.252 18.823 15.475 19.046 15.75 19.046H19.25C19.525 19.046 19.748 18.823 19.748 18.5479V15.0479ZM10.0469 3.45125C11.077 2.15921 13.0849 2.20276 14.0498 3.58113L16.4189 6.96492L16.5205 7.12215C17.5046 8.76341 16.3301 10.9023 14.3691 10.9024H9.63086C7.60676 10.9023 6.42029 8.62316 7.58105 6.96492L9.9502 3.58113L10.0469 3.45125ZM12.4082 4.73055C12.2223 4.46497 11.842 4.44826 11.6318 4.68074L11.5918 4.73055L9.22266 8.11433C8.99176 8.44435 9.22808 8.89744 9.63086 8.89754H14.3691C14.7468 8.89745 14.9774 8.49957 14.8145 8.17781L14.7773 8.11433L12.4082 4.73055ZM11.002 16.796C11.0019 19.2824 8.98638 21.2979 6.5 21.2979C4.01362 21.2979 1.99806 19.2824 1.99805 16.796C1.99805 14.3096 4.01361 12.294 6.5 12.294C8.98639 12.294 11.002 14.3096 11.002 16.796ZM21.752 18.5479C21.752 19.9297 20.6318 21.0499 19.25 21.0499H15.75C14.3682 21.0499 13.248 19.9297 13.248 18.5479V15.0479C13.2481 13.6662 14.3682 12.546 15.75 12.546H19.25C20.6318 12.546 21.7519 13.6662 21.752 15.0479V18.5479Z",fill:"currentColor"})}),BFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5555 4C10.099 4 9.70052 4.30906 9.58693 4.75114L9.29382 5.8919H14.715L14.4219 4.75114C14.3083 4.30906 13.9098 4 13.4533 4H10.5555ZM16.7799 5.8919L16.3589 4.25342C16.0182 2.92719 14.8226 2 13.4533 2H10.5555C9.18616 2 7.99062 2.92719 7.64985 4.25342L7.22886 5.8919H4C3.44772 5.8919 3 6.33961 3 6.8919C3 7.44418 3.44772 7.8919 4 7.8919H4.10069L5.31544 19.3172C5.47763 20.8427 6.76455 22 8.29863 22H15.7014C17.2354 22 18.5224 20.8427 18.6846 19.3172L19.8993 7.8919H20C20.5523 7.8919 21 7.44418 21 6.8919C21 6.33961 20.5523 5.8919 20 5.8919H16.7799ZM17.888 7.8919H6.11196L7.30423 19.1057C7.3583 19.6142 7.78727 20 8.29863 20H15.7014C16.2127 20 16.6417 19.6142 16.6958 19.1057L17.888 7.8919ZM10 10C10.5523 10 11 10.4477 11 11V16C11 16.5523 10.5523 17 10 17C9.44772 17 9 16.5523 9 16V11C9 10.4477 9.44772 10 10 10ZM14 10C14.5523 10 15 10.4477 15 11V16C15 16.5523 14.5523 17 14 17C13.4477 17 13 16.5523 13 16V11C13 10.4477 13.4477 10 14 10Z"})}),UFe=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M7.5 5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5ZM3 7.5a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM17 6a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-4 2a4 4 0 1 1 8 0 4 4 0 0 1-8 0Zm-8.96 8.247C3.137 17.048 2.5 18.271 2.5 20a1 1 0 1 1-2 0c0-2.271.862-4.049 2.21-5.248C4.042 13.57 5.788 13 7.5 13s3.459.57 4.79 1.752c1.348 1.2 2.21 2.977 2.21 5.248a1 1 0 1 1-2 0c0-1.729-.638-2.952-1.54-3.753C10.042 15.43 8.788 15 7.5 15s-2.541.43-3.46 1.247Zm15.757-.607c-1.009-.638-2.338-.807-3.526-.472a1 1 0 0 1-.542-1.925c1.695-.478 3.616-.255 5.136.706 1.558.984 2.635 2.707 2.635 5.051a1 1 0 1 1-2 0c0-1.665-.732-2.746-1.703-3.36Z",clipRule:"evenodd"})}),mbe=e=>o.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:[o.jsx("path",{d:"M10.42 2.006a4 4 0 0 1 3.159 0c.674.29 1.188.822 1.667 1.456.474.627 1 1.473 1.653 2.523l3.542 5.696c.72 1.16 1.3 2.09 1.682 2.854.384.766.654 1.517.59 2.292a4 4 0 0 1-1.604 2.886c-.625.463-1.405.63-2.258.709-.85.078-1.945.078-3.311.078H8.46c-1.366 0-2.46 0-3.31-.078-.854-.078-1.634-.246-2.26-.71a4 4 0 0 1-1.603-2.885c-.064-.775.206-1.526.59-2.292.383-.764.961-1.694 1.682-2.854l3.542-5.696c.653-1.05 1.18-1.896 1.653-2.523.48-.634.993-1.166 1.667-1.456Zm2.37 1.838a2 2 0 0 0-1.58 0c-.192.083-.448.28-.86.825-.413.544-.891 1.312-1.577 2.415l-3.488 5.61c-.755 1.214-1.283 2.066-1.62 2.737-.34.678-.402 1.02-.385 1.232a2 2 0 0 0 .802 1.443c.171.127.494.255 1.25.324.748.069 1.75.07 3.18.07h6.976c1.43 0 2.432-.001 3.18-.07.756-.069 1.079-.197 1.25-.324a2 2 0 0 0 .802-1.443c.017-.212-.045-.554-.385-1.232-.337-.671-.865-1.523-1.62-2.737l-3.488-5.61c-.686-1.103-1.164-1.87-1.576-2.415-.413-.546-.67-.742-.861-.825"}),o.jsx("path",{d:"M12 7.5a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1M10.851 15a1.15 1.15 0 1 1 2.3 0 1.15 1.15 0 0 1-2.3 0"})]}),TF=e=>o.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",...e,children:o.jsx("path",{fillRule:"evenodd",d:"M5.636 5.636a1 1 0 0 1 1.414 0l4.95 4.95 4.95-4.95a1 1 0 0 1 1.414 1.414L13.414 12l4.95 4.95a1 1 0 0 1-1.414 1.414L12 13.414l-4.95 4.95a1 1 0 0 1-1.414-1.414l4.95-4.95-4.95-4.95a1 1 0 0 1 0-1.414Z",clipRule:"evenodd"})});/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const UFe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bbe=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/** + */const QFe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gbe=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var QFe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + */var zFe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zFe=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:r="",children:s,iconNode:a,...l},c)=>m.createElement("svg",{ref:c,...QFe,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:bbe("lucide",r),...l},[...a.map(([u,d])=>m.createElement(u,d)),...Array.isArray(s)?s:[s]]));/** + */const VFe=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:r="",children:s,iconNode:a,...l},c)=>m.createElement("svg",{ref:c,...zFe,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:gbe("lucide",r),...l},[...a.map(([u,d])=>m.createElement(u,d)),...Array.isArray(s)?s:[s]]));/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const an=(e,t)=>{const n=m.forwardRef(({className:i,...r},s)=>m.createElement(zFe,{ref:s,iconNode:t,className:bbe(`lucide-${UFe(e)}`,i),...r}));return n.displayName=`${e}`,n};/** + */const an=(e,t)=>{const n=m.forwardRef(({className:i,...r},s)=>m.createElement(VFe,{ref:s,iconNode:t,className:gbe(`lucide-${QFe(e)}`,i),...r}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ybe=an("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** + */const bbe=an("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VFe=an("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/** + */const HFe=an("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bw=an("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + */const fw=an("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HFe=an("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + */const qFe=an("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vbe=an("AtSign",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]);/** + */const ybe=an("AtSign",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xbe=an("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + */const vbe=an("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qFe=an("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + */const WFe=an("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const WFe=an("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** + */const KFe=an("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Hu=an("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const Vu=an("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KFe=an("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const GFe=an("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GFe=an("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + */const XFe=an("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Fk=an("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const Mk=an("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Obe=an("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + */const xbe=an("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const XFe=an("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const YFe=an("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const o4=an("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** + */const s4=an("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YFe=an("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + */const ZFe=an("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZFe=an("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** + */const JFe=an("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Vj=an("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + */const Uj=an("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JFe=an("CornerDownRight",[["polyline",{points:"15 10 20 15 15 20",key:"1q7qjw"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]]);/** + */const e7e=an("CornerDownRight",[["polyline",{points:"15 10 20 15 15 20",key:"1q7qjw"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const e7e=an("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + */const t7e=an("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const H2=an("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** + */const Q2=an("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Hj=an("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + */const Qj=an("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bW=an("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + */const mW=an("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mb=an("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + */const fb=an("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const t7e=an("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const n7e=an("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const n7e=an("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/** + */const i7e=an("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const i7e=an("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/** + */const r7e=an("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _F=an("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** + */const AF=an("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const r7e=an("FileType2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 13v-1h6v1",key:"1dh9dg"}],["path",{d:"M5 12v6",key:"150t9c"}],["path",{d:"M4 18h2",key:"1xrofg"}]]);/** + */const s7e=an("FileType2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 13v-1h6v1",key:"1dh9dg"}],["path",{d:"M5 12v6",key:"150t9c"}],["path",{d:"M4 18h2",key:"1xrofg"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wbe=an("FileVideo2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);/** + */const Obe=an("FileVideo2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["rect",{width:"8",height:"6",x:"2",y:"12",rx:"1",key:"1a6c1e"}],["path",{d:"m10 15.5 4 2.5v-6l-4 2.5",key:"t7cp39"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const s7e=an("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/** + */const a7e=an("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const a7e=an("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/** + */const o7e=an("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const NF=an("FolderUp",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);/** + */const _F=an("FolderUp",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const o7e=an("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/** + */const l7e=an("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const l7e=an("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/** + */const c7e=an("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const c7e=an("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/** + */const u7e=an("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qj=an("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + */const zj=an("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jF=an("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** + */const NF=an("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Yd=an("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + */const Gd=an("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Sbe=an("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + */const wbe=an("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const u7e=an("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** + */const d7e=an("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mi=an("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + */const hi=an("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const d7e=an("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** + */const f7e=an("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const f7e=an("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + */const h7e=an("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ky=an("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** + */const Vy=an("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const h7e=an("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** + */const p7e=an("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kbe=an("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** + */const Sbe=an("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const p7e=an("MonitorPlay",[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);/** + */const m7e=an("MonitorPlay",[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const m7e=an("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** + */const g7e=an("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const g7e=an("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** + */const b7e=an("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Mo=an("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + */const Do=an("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const b7e=an("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + */const y7e=an("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ebe=an("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** + */const kbe=an("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const y7e=an("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/** + */const v7e=an("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const A_=an("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const E_=an("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const v7e=an("Shapes",[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]);/** + */const x7e=an("Shapes",[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yW=an("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const gW=an("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mS=an("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + */const uS=an("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const x7e=an("Split",[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]]);/** + */const O7e=an("Split",[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vm=an("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + */const pm=an("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const O7e=an("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + */const w7e=an("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const w7e=an("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** + */const S7e=an("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ia=an("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),vW="veadk_auth_qs",S7e=new Set(["view","source","sessionId","artifactSha256","validationReportSha256","projectId","versionId"]);let L1=null;function k7e(){if(L1!==null)return L1;const e=new URLSearchParams(window.location.search),t=new URLSearchParams,n=new URLSearchParams,i=e.get("view")==="runtime-deploy"&&e.get("source")==="intelligent-development";e.forEach((s,a)=>{(i&&S7e.has(a)?n:t).append(a,s)});const r=t.toString();if(r?(sessionStorage.setItem(vW,r),L1=r):L1=sessionStorage.getItem(vW)??"",r){const s=n.toString();window.history.replaceState(null,"",window.location.pathname+(s?`?${s}`:"")+window.location.hash)}return L1}function $o(e){const t=k7e();if(!t)return e;const n=new URL(e,window.location.origin);return new URLSearchParams(t).forEach((i,r)=>{n.searchParams.has(r)||n.searchParams.set(r,i)}),/^https?:\/\//i.test(e)?n.toString():n.pathname+n.search+n.hash}function V(e,t={}){return Zt.t(e,{...t,ns:"adk"})}function qu(e){const t=new Headers(e);return t.has("Accept-Language")||t.set("Accept-Language",Zt.resolvedLanguage||Zt.language),t}function E7e(){return Zt.resolvedLanguage||Zt.language}const Ho=3e4,cs=12e4,RF=1e4;function Ol(e,t=Ho){if(t<=0)return e??void 0;const n=AbortSignal.timeout(t);return e?AbortSignal.any([e,n]):n}const __="veadk_local_user",N_="veadk_local_user_tab",C7e="X-VeADK-OAuth-Refresh-Retry",T7e=[50,250],A7e=/^[A-Za-z0-9]{1,16}$/;function Cbe(){try{const e=sessionStorage.getItem(N_);if(e)return e;const t=localStorage.getItem(__);return t&&sessionStorage.setItem(N_,t),t}catch{try{return localStorage.getItem(__)}catch{return null}}}function xW(e){try{sessionStorage.setItem(N_,e)}catch{}try{localStorage.setItem(__,e)}catch{}}function _7e(){try{sessionStorage.removeItem(N_)}catch{}try{localStorage.removeItem(__)}catch{}}function Qh(e){const t=new Headers(e),n=Cbe();return n&&t.set("X-VeADK-Local-User",n),t}async function Tbe(){let e;try{e=await fetch("/web/auth-config",{headers:qu({Accept:"application/json"}),signal:Ol(void 0,RF)})}catch(t){throw console.warn("[identity] /web/auth-config is unreachable:",t),new Error(V("identity.loadConfigNetworkFailed"))}if(!e.ok)throw new Error(V("identity.configServiceFailed",{status:e.status}));try{const t=await e.json();if(!Array.isArray(t.providers))throw new TypeError("providers is not an array");return t.providers}catch(t){throw console.warn("[identity] /web/auth-config returned an invalid response:",t),new Error(V("identity.invalidConfigResponse"))}}function N7e(e){const t=window.location.pathname+window.location.search+window.location.hash,n=e.includes("?")?"&":"?";window.location.assign(`${e}${n}redirect=${encodeURIComponent(t)}`)}function j7e(){const e=window.location.pathname+window.location.search+window.location.hash,t=window.open("about:blank","_blank","popup,width=520,height=720");if(!t)return null;try{t.opener=null,t.location.replace(`/oauth2/login?redirect=${encodeURIComponent(e)}`)}catch{return t.close(),null}return t}async function R7e(){const[e,t]=await Promise.all([l4(),Tbe()]);return e.status==="unauthenticated"&&t.length>0}function I7e(){window.location.assign("/oauth2/logout")}async function P7e(){for(let e=0;;e+=1){let t;try{t=await fetch("/oauth2/userinfo",{headers:qu({Accept:"application/json"}),signal:Ol(void 0,RF)})}catch(i){throw console.warn("[identity] /oauth2/userinfo is unreachable:",i),new Error(V("identity.serviceNetworkFailed"))}const n=T7e[e];if(t.status!==401||t.headers.get(C7e)!=="1"||n===void 0)return t;await new Promise(i=>window.setTimeout(i,n))}}async function l4(){const e=await P7e();if(e.ok){let n;try{n=await e.json()}catch(r){throw console.warn("[identity] /oauth2/userinfo returned a non-JSON response:",r),new Error(V("identity.invalidServiceResponse"))}return{status:"authenticated",userId:String(n.sub??n.user_id??n.email??""),info:n}}if(e.status===401)return{status:"unauthenticated",userId:"",local:!1};if(e.status!==404)throw new Error(V("identity.serviceFailed",{status:e.status}));const t=Cbe();return t?{status:"authenticated",userId:t,info:{name:t},local:!0}:{status:"unauthenticated",userId:"",local:!0}}function D7e(e){if(!e)return"";for(const t of[e.name,e.preferred_username,e.username,e.email])if(typeof t=="string"&&t.trim())return t.trim();return""}function M7e(e){const t=e==null?void 0:e.picture;return typeof t=="string"?t.trim():""}const c4="veadk:authentication-required";let yw=null,jO=null;function L7e(e){if(!e.redirected||!e.url)return!1;try{const t=new URL(e.url);return t.pathname.includes("/authorize")||t.pathname.includes("/oauth2/login")||t.hostname.includes(".userpool.auth.")}catch{return!1}}function $7e(e){yw||(yw=new Promise(n=>{jO=n}),window.dispatchEvent(new Event(c4)));const t=yw;return e?e.aborted?Promise.reject(e.reason??new Error("Request aborted")):new Promise((n,i)=>{const r=()=>i(e.reason??new Error("Request aborted"));e.addEventListener("abort",r,{once:!0}),t.then(()=>{e.removeEventListener("abort",r),n()},s=>{e.removeEventListener("abort",r),i(s)})}):t}function F7e(){return yw!==null}function B7e(){jO==null||jO(),jO=null,yw=null}async function Wj(e,t){var i;const n=await e.text().catch(()=>"");try{return JSON.parse(n)}catch{const r=((i=e.headers.get("content-type"))==null?void 0:i.split(";",1)[0])||V("common.contentTypeMissing"),s=n.trim().slice(0,2e3),a=s?` -${V("common.response",{response:s})}`:"";throw new Error(V("jsonResponse.nonJson",{fallback:t,status:e.status,contentType:r,detail:a}))}}const U7e=/\brun_sse\s*failed\s*:\s*404\b/i,Q7e=/session not found/i,z7e=/(?:^|[::\s])not found\s*$/i,V7e=/Expecting (?:'[^']+'|\w+)(?: delimiter)?: line \d+ column \d+ \(char \d+\)/i,H7e=/Unknown or expired collection_id\s+'[^']+'\.\s*Call collect_resources first\./i;function $1(e,t){return e.includes(t)?e:`${e} + */const Ra=an("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bW="veadk_auth_qs",k7e=new Set(["view","source","sessionId","artifactSha256","validationReportSha256","projectId","versionId"]);let R1=null;function E7e(){if(R1!==null)return R1;const e=new URLSearchParams(window.location.search),t=new URLSearchParams,n=new URLSearchParams,i=e.get("view")==="runtime-deploy"&&e.get("source")==="intelligent-development";e.forEach((s,a)=>{(i&&k7e.has(a)?n:t).append(a,s)});const r=t.toString();if(r?(sessionStorage.setItem(bW,r),R1=r):R1=sessionStorage.getItem(bW)??"",r){const s=n.toString();window.history.replaceState(null,"",window.location.pathname+(s?`?${s}`:"")+window.location.hash)}return R1}function Lo(e){const t=E7e();if(!t)return e;const n=new URL(e,window.location.origin);return new URLSearchParams(t).forEach((i,r)=>{n.searchParams.has(r)||n.searchParams.set(r,i)}),/^https?:\/\//i.test(e)?n.toString():n.pathname+n.search+n.hash}function V(e,t={}){return Zt.t(e,{...t,ns:"adk"})}function Hu(e){const t=new Headers(e);return t.has("Accept-Language")||t.set("Accept-Language",Zt.resolvedLanguage||Zt.language),t}function C7e(){return Zt.resolvedLanguage||Zt.language}const Vo=3e4,ls=12e4,jF=1e4;function xl(e,t=Vo){if(t<=0)return e??void 0;const n=AbortSignal.timeout(t);return e?AbortSignal.any([e,n]):n}const C_="veadk_local_user",T_="veadk_local_user_tab",T7e="X-VeADK-OAuth-Refresh-Retry",A7e=[50,250],_7e=/^[A-Za-z0-9]{1,16}$/;function Ebe(){try{const e=sessionStorage.getItem(T_);if(e)return e;const t=localStorage.getItem(C_);return t&&sessionStorage.setItem(T_,t),t}catch{try{return localStorage.getItem(C_)}catch{return null}}}function yW(e){try{sessionStorage.setItem(T_,e)}catch{}try{localStorage.setItem(C_,e)}catch{}}function N7e(){try{sessionStorage.removeItem(T_)}catch{}try{localStorage.removeItem(C_)}catch{}}function Lh(e){const t=new Headers(e),n=Ebe();return n&&t.set("X-VeADK-Local-User",n),t}async function Cbe(){let e;try{e=await fetch("/web/auth-config",{headers:Hu({Accept:"application/json"}),signal:xl(void 0,jF)})}catch(t){throw console.warn("[identity] /web/auth-config is unreachable:",t),new Error(V("identity.loadConfigNetworkFailed"))}if(!e.ok)throw new Error(V("identity.configServiceFailed",{status:e.status}));try{const t=await e.json();if(!Array.isArray(t.providers))throw new TypeError("providers is not an array");return t.providers}catch(t){throw console.warn("[identity] /web/auth-config returned an invalid response:",t),new Error(V("identity.invalidConfigResponse"))}}function j7e(e){const t=window.location.pathname+window.location.search+window.location.hash,n=e.includes("?")?"&":"?";window.location.assign(`${e}${n}redirect=${encodeURIComponent(t)}`)}function R7e(){const e=window.location.pathname+window.location.search+window.location.hash,t=window.open("about:blank","_blank","popup,width=520,height=720");if(!t)return null;try{t.opener=null,t.location.replace(`/oauth2/login?redirect=${encodeURIComponent(e)}`)}catch{return t.close(),null}return t}async function I7e(){const[e,t]=await Promise.all([a4(),Cbe()]);return e.status==="unauthenticated"&&t.length>0}function P7e(){window.location.assign("/oauth2/logout")}async function D7e(){for(let e=0;;e+=1){let t;try{t=await fetch("/oauth2/userinfo",{headers:Hu({Accept:"application/json"}),signal:xl(void 0,jF)})}catch(i){throw console.warn("[identity] /oauth2/userinfo is unreachable:",i),new Error(V("identity.serviceNetworkFailed"))}const n=A7e[e];if(t.status!==401||t.headers.get(T7e)!=="1"||n===void 0)return t;await new Promise(i=>window.setTimeout(i,n))}}async function a4(){const e=await D7e();if(e.ok){let n;try{n=await e.json()}catch(r){throw console.warn("[identity] /oauth2/userinfo returned a non-JSON response:",r),new Error(V("identity.invalidServiceResponse"))}return{status:"authenticated",userId:String(n.sub??n.user_id??n.email??""),info:n}}if(e.status===401)return{status:"unauthenticated",userId:"",local:!1};if(e.status!==404)throw new Error(V("identity.serviceFailed",{status:e.status}));const t=Ebe();return t?{status:"authenticated",userId:t,info:{name:t},local:!0}:{status:"unauthenticated",userId:"",local:!0}}function M7e(e){if(!e)return"";for(const t of[e.name,e.preferred_username,e.username,e.email])if(typeof t=="string"&&t.trim())return t.trim();return""}function L7e(e){const t=e==null?void 0:e.picture;return typeof t=="string"?t.trim():""}const o4="veadk:authentication-required";let hw=null,CO=null;function $7e(e){if(!e.redirected||!e.url)return!1;try{const t=new URL(e.url);return t.pathname.includes("/authorize")||t.pathname.includes("/oauth2/login")||t.hostname.includes(".userpool.auth.")}catch{return!1}}function F7e(e){hw||(hw=new Promise(n=>{CO=n}),window.dispatchEvent(new Event(o4)));const t=hw;return e?e.aborted?Promise.reject(e.reason??new Error("Request aborted")):new Promise((n,i)=>{const r=()=>i(e.reason??new Error("Request aborted"));e.addEventListener("abort",r,{once:!0}),t.then(()=>{e.removeEventListener("abort",r),n()},s=>{e.removeEventListener("abort",r),i(s)})}):t}function B7e(){return hw!==null}function U7e(){CO==null||CO(),CO=null,hw=null}async function Vj(e,t){var i;const n=await e.text().catch(()=>"");try{return JSON.parse(n)}catch{const r=((i=e.headers.get("content-type"))==null?void 0:i.split(";",1)[0])||V("common.contentTypeMissing"),s=n.trim().slice(0,2e3),a=s?` +${V("common.response",{response:s})}`:"";throw new Error(V("jsonResponse.nonJson",{fallback:t,status:e.status,contentType:r,detail:a}))}}const Q7e=/\brun_sse\s*failed\s*:\s*404\b/i,z7e=/session not found/i,V7e=/(?:^|[::\s])not found\s*$/i,H7e=/Expecting (?:'[^']+'|\w+)(?: delimiter)?: line \d+ column \d+ \(char \d+\)/i,q7e=/Unknown or expired collection_id\s+'[^']+'\.\s*Call collect_resources first\./i;function I1(e,t){return e.includes(t)?e:`${e} -${t}`}function Uf(e){const t=String(e),n=V("runSse.rawResponseLabel");let i=t.includes(n)?t:`${n}${t}`;if(V7e.test(t))i=$1(i,V("runSse.toolArgumentHint"));else{if(H7e.test(t))return $1(i,V("runSse.resourceCollectionExpiredHint"));U7e.test(t)&&(Q7e.test(t)?i=$1(i,V("runSse.persistentMemoryHint")):z7e.test(t)&&(i=$1(i,V("runSse.unsupportedRouteHint"))))}return $1(i,V("runSse.networkConfigurationHint"))}async function*Kj(e){if(!e.body)throw new Error("Response has no body");const t=e.body.getReader(),n=new TextDecoder;let i="";const r=a=>a.length>500?V("sse.truncatedData",{data:a.slice(0,500),count:a.length}):a,s=(a,l=!1)=>{const c=a.split(/\r?\n/).filter(u=>u.startsWith("data:")).map(u=>u.slice(5).trimStart()).join(` -`);if(!(!c||c==="[DONE]"||c==="ping"))try{return JSON.parse(c)}catch{const u=r(c);throw l?new Error(V("sse.incompleteEvent",{data:u})):new Error(V("sse.invalidEventJson",{data:u}))}};try{for(;;){const{done:a,value:l}=await t.read();if(a)break;i+=n.decode(l,{stream:!0});let c=i.match(/\r?\n\r?\n/);for(;(c==null?void 0:c.index)!==void 0;){const u=i.slice(0,c.index);i=i.slice(c.index+c[0].length);const d=s(u);d!==void 0&&(yield d),c=i.match(/\r?\n\r?\n/)}}if(i+=n.decode(),i.trim()){const a=s(i,!0);a!==void 0&&(yield a)}}finally{try{await t.cancel()}catch{}finally{t.releaseLock()}}}const q7e="X-Studio-FaaS-Instance",W7e="X-Studio-FaaS-Request-Id";function K7e(e,t,n){var s,a;const i=((s=e.headers.get(q7e))==null?void 0:s.trim())??"";if(!t||!n||!i)return null;const r=((a=e.headers.get(W7e))==null?void 0:a.trim())??"";return{runtimeId:t,region:n,instanceName:i,...r?{requestId:r}:{}}}function OW(e,t,n,i){const r=e==="byteplus"?"https://console.byteplus.com":"https://console.volcengine.com",s=new URLSearchParams({projectName:"default",runtimeId:n,instanceName:i});return`${r}/agentkit/region:agentkit+${encodeURIComponent(t)}/runtime?${s}`}function G7e(e){return/\b(?:ERROR|FATAL|CRITICAL)\b/i.test(e)?"error":/\bWARN(?:ING)?\b/i.test(e)?"warning":/\bDEBUG\b/i.test(e)?"debug":/\bINFO\b/i.test(e)?"info":"default"}function X7e(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="done"?!0:t.type==="context"?typeof t.instanceName=="string"&&typeof t.consoleUrl=="string":t.type==="logs"?typeof t.text=="string"&&typeof t.updatedAt=="number":t.type==="error"?typeof t.message=="string"&&(t.detail===void 0||typeof t.detail=="string")&&(t.statusCode===void 0||typeof t.statusCode=="string")&&(t.errorCode===void 0||typeof t.errorCode=="string")&&(t.requestId===void 0||typeof t.requestId=="string")&&(t.responseBody===void 0||typeof t.responseBody=="string"):!1}function Abe(e){var i;const t=[e.message],n=[e.statusCode?V("runtimeLogs.httpStatus",{status:e.statusCode}):"",e.errorCode?V("runtimeLogs.errorCode",{code:e.errorCode}):"",e.requestId?`Request ID:${e.requestId}`:""].filter(Boolean);return n.length>0&&t.push(n.join(` +${t}`}function Lf(e){const t=String(e),n=V("runSse.rawResponseLabel");let i=t.includes(n)?t:`${n}${t}`;if(H7e.test(t))i=I1(i,V("runSse.toolArgumentHint"));else{if(q7e.test(t))return I1(i,V("runSse.resourceCollectionExpiredHint"));Q7e.test(t)&&(z7e.test(t)?i=I1(i,V("runSse.persistentMemoryHint")):V7e.test(t)&&(i=I1(i,V("runSse.unsupportedRouteHint"))))}return I1(i,V("runSse.networkConfigurationHint"))}async function*Hj(e){if(!e.body)throw new Error("Response has no body");const t=e.body.getReader(),n=new TextDecoder;let i="";const r=a=>a.length>500?V("sse.truncatedData",{data:a.slice(0,500),count:a.length}):a,s=(a,l=!1)=>{const c=a.split(/\r?\n/).filter(u=>u.startsWith("data:")).map(u=>u.slice(5).trimStart()).join(` +`);if(!(!c||c==="[DONE]"||c==="ping"))try{return JSON.parse(c)}catch{const u=r(c);throw l?new Error(V("sse.incompleteEvent",{data:u})):new Error(V("sse.invalidEventJson",{data:u}))}};try{for(;;){const{done:a,value:l}=await t.read();if(a)break;i+=n.decode(l,{stream:!0});let c=i.match(/\r?\n\r?\n/);for(;(c==null?void 0:c.index)!==void 0;){const u=i.slice(0,c.index);i=i.slice(c.index+c[0].length);const d=s(u);d!==void 0&&(yield d),c=i.match(/\r?\n\r?\n/)}}if(i+=n.decode(),i.trim()){const a=s(i,!0);a!==void 0&&(yield a)}}finally{try{await t.cancel()}catch{}finally{t.releaseLock()}}}const W7e="X-Studio-FaaS-Instance",K7e="X-Studio-FaaS-Request-Id";function G7e(e,t,n){var s,a;const i=((s=e.headers.get(W7e))==null?void 0:s.trim())??"";if(!t||!n||!i)return null;const r=((a=e.headers.get(K7e))==null?void 0:a.trim())??"";return{runtimeId:t,region:n,instanceName:i,...r?{requestId:r}:{}}}function vW(e,t,n,i){const r=e==="byteplus"?"https://console.byteplus.com":"https://console.volcengine.com",s=new URLSearchParams({projectName:"default",runtimeId:n,instanceName:i});return`${r}/agentkit/region:agentkit+${encodeURIComponent(t)}/runtime?${s}`}function X7e(e){return/\b(?:ERROR|FATAL|CRITICAL)\b/i.test(e)?"error":/\bWARN(?:ING)?\b/i.test(e)?"warning":/\bDEBUG\b/i.test(e)?"debug":/\bINFO\b/i.test(e)?"info":"default"}function Y7e(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="done"?!0:t.type==="context"?typeof t.instanceName=="string"&&typeof t.consoleUrl=="string":t.type==="logs"?typeof t.text=="string"&&typeof t.updatedAt=="number":t.type==="error"?typeof t.message=="string"&&(t.detail===void 0||typeof t.detail=="string")&&(t.statusCode===void 0||typeof t.statusCode=="string")&&(t.errorCode===void 0||typeof t.errorCode=="string")&&(t.requestId===void 0||typeof t.requestId=="string")&&(t.responseBody===void 0||typeof t.responseBody=="string"):!1}function Tbe(e){var i;const t=[e.message],n=[e.statusCode?V("runtimeLogs.httpStatus",{status:e.statusCode}):"",e.errorCode?V("runtimeLogs.errorCode",{code:e.errorCode}):"",e.requestId?`Request ID:${e.requestId}`:""].filter(Boolean);return n.length>0&&t.push(n.join(` `)),e.detail&&e.detail!==e.message&&t.push(e.detail),e.responseBody&&!((i=e.detail)!=null&&i.includes(e.responseBody))&&t.push(V("runtimeLogs.cloudResponseBody",{body:e.responseBody})),t.join(` -`)}async function Y7e(e){const t=`HTTP ${e.status}${e.statusText?` ${e.statusText}`:""}`,n=await e.text();if(!n)return t;try{const i=JSON.parse(n);if(typeof i.detail=="string"&&i.detail)return`${t} +`)}async function Z7e(e){const t=`HTTP ${e.status}${e.statusText?` ${e.statusText}`:""}`,n=await e.text();if(!n)return t;try{const i=JSON.parse(n);if(typeof i.detail=="string"&&i.detail)return`${t} -${i.detail}`;if(i.detail&&typeof i.detail=="object"){const r=i.detail;if(typeof r.message=="string")return Abe({message:r.message,...typeof r.detail=="string"?{detail:r.detail}:{},...typeof r.statusCode=="string"?{statusCode:r.statusCode}:{},...typeof r.errorCode=="string"?{errorCode:r.errorCode}:{},...typeof r.requestId=="string"?{requestId:r.requestId}:{},...typeof r.responseBody=="string"?{responseBody:r.responseBody}:{}})}return`${t} +${i.detail}`;if(i.detail&&typeof i.detail=="object"){const r=i.detail;if(typeof r.message=="string")return Tbe({message:r.message,...typeof r.detail=="string"?{detail:r.detail}:{},...typeof r.statusCode=="string"?{statusCode:r.statusCode}:{},...typeof r.errorCode=="string"?{errorCode:r.errorCode}:{},...typeof r.requestId=="string"?{requestId:r.requestId}:{},...typeof r.responseBody=="string"?{responseBody:r.responseBody}:{}})}return`${t} ${JSON.stringify(i,null,2)}`}catch{return`${t} -${n}`}}async function*Z7e({runtimeId:e,region:t,instanceName:n,sessionId:i,follow:r=!0,signal:s}){const a=new URLSearchParams({region:t,follow:String(r)});n&&a.set("instance_name",n),i&&a.set("session_id",i);const l=await fetch($o(`/web/runtime-logs/${encodeURIComponent(e)}/stream?${a.toString()}`),{headers:qu(Qh({Accept:"text/event-stream"})),cache:"no-store",signal:s});if(!l.ok)throw new Error(V("runtimeLogs.loadFailedWithDetail",{detail:await Y7e(l)}));for await(const c of Kj(l)){if(!X7e(c))throw new Error(V("runtimeLogs.invalidFormat"));yield c}}const J7e=255,eBe=/[\p{L}\p{M}\p{N}\p{P}\p{Zs}]/u;function tBe(e){const t=e.normalize("NFKC").replace(/\s+/gu," ").trim(),n=new TextEncoder;let i=0,r="";for(const s of t){if(!eBe.test(s))continue;const a=n.encode(s).byteLength;if(i+a>J7e)break;r+=s,i+=a}return r.replace(/ +/g," ").trimEnd()}const u4="ap-southeast-1",IF="cn-beijing",nBe="https://ark.ap-southeast.bytepluses.com/api/v3",iBe="https://ark.cn-beijing.volces.com/api/v3/",rBe="https://console.byteplus.com/ark/region:ark+ap-southeast-1/openManagement",sBe="https://console.volcengine.com/ark/region:ark+cn-beijing/openManagement",aBe="dola-seed-2-1-turbo-260628",oBe="doubao-seed-2-1-pro-260628",lBe="skylark-embedding-vision-250615",cBe="doubao-embedding-vision-250615",uBe="seed-2-0-lite-260228",dBe="doubao-seed-2-0-lite-260428",fBe="dola-seedream-5-0-pro-260628",hBe="doubao-seedream-5-0-260128",pBe="seededit-3-0-i2i-250628",mBe="doubao-seededit-3-0-i2i-250628",gBe="dreamina-seedance-2-0-260128",bBe="doubao-seedance-2-0-260128";function Pu(e){return e==="byteplus"?[{value:u4,label:u4}]:[{value:"cn-beijing",label:V("cloudRegion.cnBeijing")},{value:"cn-shanghai",label:V("cloudRegion.cnShanghai")}]}function er(e){var t;return((t=Pu(e)[0])==null?void 0:t.value)||IF}const yBe=new Set(["cn-beijing","cn-shanghai","ap-southeast-1"]);function Gj(e){return typeof e=="string"&&yBe.has(e)}function Th(e,t){var i;return((i=(t?Pu(t):[...Pu("volcengine"),...Pu("byteplus")]).find(r=>r.value===e))==null?void 0:i.label)||e||"-"}function Ah(e){return e==="byteplus"?aBe:oBe}function vl(e){return e==="byteplus"?nBe:iBe}function vBe(e){return e==="byteplus"?rBe:sBe}function xBe(e){return e==="byteplus"?lBe:cBe}function OBe(e){return e==="byteplus"?uBe:dBe}function wBe(e){return e==="byteplus"?fBe:hBe}function SBe(e){return e==="byteplus"?pBe:mBe}function kBe(e){return e==="byteplus"?gBe:bBe}const PF="veadk.messageFeedback.v1";function DF(e,t,n,i){return[e,t,n,i].join(":")}function MF(){if(typeof window>"u")return{};try{const e=JSON.parse(localStorage.getItem(PF)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}}function EBe(e,t,n){if(typeof window>"u")return;const i=MF();i[e]={...i[e]??{},[`veadk_feedback:${t}`]:n},localStorage.setItem(PF,JSON.stringify(i))}function _be(e){if(typeof window>"u")return;const t=DF(e.runtimeId,e.appName,e.userId,e.sessionId),n=MF(),i=n[t];if(i){for(const r of e.eventIds)delete i[`veadk_feedback:${r}`];Object.keys(i).length===0?delete n[t]:n[t]=i,localStorage.setItem(PF,JSON.stringify(n))}}const q2="",LF=new Map;function Nbe(e,t){LF.set(e,t)}function jbe(){LF.clear()}function wl(e){const t=LF.get(e);return t?{app:t.app,ep:{base:t.base,apiKey:t.apiKey,runtimeId:t.runtimeId,region:t.region}}:{app:e,ep:{}}}async function wt(e,t={},n={},i=Ho){const r=Ol(t.signal,i),s=!!n.runtimeId&&String(t.method??"GET").toUpperCase()==="DELETE",a={...t,...s?{method:"POST"}:{},headers:qu(Qh(t.headers))},l=()=>{const d={...a,signal:r};if(n.runtimeId){const f=new URLSearchParams;n.region&&f.set("_runtime_region",n.region),n.retryProbe&&f.set("probe_retry","connect"),s&&f.set("_method","DELETE");const h=f.toString()?`${e.includes("?")?"&":"?"}${f.toString()}`:"";return fetch($o(`${q2}/web/runtime-proxy/${n.runtimeId}${e}${h}`),d)}if(n.base){const f=new Headers(d.headers);return f.set("X-AgentKit-Base",n.base),n.apiKey&&f.set("X-AgentKit-Key",n.apiKey),fetch($o(`${q2}/agentkit-proxy${e}`),{...d,headers:f})}return fetch($o(`${q2}${e}`),d)},c=async d=>{if(L7e(d))return!0;if(d.status!==401)return!1;try{return await R7e()}catch{return!1}};let u=await l();for(;await c(u);)await $7e(r),u=await l();return u}function $n(e,t={},n=Ho){return wt(e,t,{},n)}function CBe(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>{var n;if(t&&typeof t=="object"&&"msg"in t){const i=Array.isArray(t.loc)?(n=t.loc)==null?void 0:n.join("."):"",r=String(t.msg??"");return i?`${i}: ${r}`:r}return String(t)}).filter(Boolean).join(` -`):e&&typeof e=="object"?JSON.stringify(e):""}async function Jt(e,t){const n=V("common.fallbackWithHttpStatus",{fallback:t,status:e.status}),i=await e.text().catch(()=>"");if(!i)return n;try{const r=JSON.parse(i),s=CBe(r.detail??r.error);return s?V("client.errorWithDetailAndRawResponse",{context:n,detail:s,response:i}):V("client.errorWithRawResponse",{context:n,response:i})}catch{return V("client.errorWithRawResponse",{context:n,response:i})}}async function $F(e,t=!1){const n=await wt(`/web/model-api-keys${t?"?refresh=true":""}`,{signal:e,cache:"no-store"});if(!n.ok)throw new Error(await Jt(n,V("client.loadArkApiKeysFailed")));return await n.json()}async function Rbe(e,t){const n=await wt(`/web/model-api-keys/${encodeURIComponent(e)}/value`,{method:"POST",signal:t,cache:"no-store"});if(!n.ok)throw new Error(await Jt(n,V("client.loadArkApiKeysFailed")));return await n.json()}async function Ex(e){const t=new URLSearchParams;e!=null&&e.apiKeyId&&t.set("apiKeyId",e.apiKeyId),e!=null&&e.refresh&&t.set("refresh","true");const n=t.toString(),i=await wt(`/web/model-options${n?`?${n}`:""}`,{signal:e==null?void 0:e.signal,cache:"no-store"});if(!i.ok)throw new Error(await Jt(i,V("client.loadModelsFailed")));return await i.json()}async function Ibe(){const e=await wt("/list-apps");if(!e.ok)throw new Error(`list-apps failed: ${e.status}`);return e.json()}class Cx extends Error{constructor(){super(V("client.runtimeAccessDenied")),this.name="RuntimeAccessDeniedError"}}class $s extends Error{constructor(t,n=!1,i=!1){super(t),this.unsupported=n,this.retryable=i,this.name="RuntimeProbeError"}}const Pbe=()=>V("client.privateRuntimeUnavailable"),Dbe=()=>V("client.runtimeTemporarilyUnavailable"),wW=["cn-beijing","cn-shanghai"],TBe=3e4,Tx=5*60*1e3,Mbe=60*1e3;let gS="volcengine";const Gy=new Map,Og=new Map,wg=new Map,ku=new Map,Er=new Map;function FF(e,t,n){return`${t}:${e}:${n??""}`}function Lbe(e){e!==gS&&Er.clear(),gS=e}function Bk(e){const t=(e||"").trim();if(gS==="byteplus")return[t&&!t.startsWith("cn-")?t:u4];const n=t&&!t.startsWith("ap-")?t:IF;return wW.includes(n)?[n,...wW.filter(i=>i!==n)]:[n]}function Xj(e){const t=(e||"").trim();return t?[t]:Bk()}function Hb(...e){return e.map(t=>String(t??"")).join("")}function Qm(e,t,n){const i=e.get(t);return i!=null&&i.value&&Date.now()-i.updatedAt<=n?i.value:null}function BF(e,t,n){return e.set(t,{value:n,updatedAt:Date.now()}),n}function GC(e,t){return t?t.aborted?Promise.reject(new DOMException("The operation was aborted.","AbortError")):new Promise((n,i)=>{const r=()=>{i(new DOMException("The operation was aborted.","AbortError"))};t.addEventListener("abort",r,{once:!0}),e.then(s=>{t.removeEventListener("abort",r),n(s)},s=>{t.removeEventListener("abort",r),i(s)})}):e}async function $be(e){try{const t=await e.clone().json();return typeof t.detail=="string"?t.detail:""}catch{return""}}async function Uk(e,t,n,i,r=Ho){const s=await wt("/list-apps",{signal:i},n??{base:e,apiKey:t},r),a=n!=null&&n.runtimeId?await $be(s):"";if(n!=null&&n.runtimeId&&a==="runtime_access_denied")throw new Cx;if(n!=null&&n.runtimeId&&a==="runtime_private_endpoint_unreachable")throw new $s(Pbe());if(n!=null&&n.runtimeId&&["runtime_proxy_connect_error","runtime_proxy_timeout","runtime_json_connect_error","runtime_json_timeout"].includes(a))throw new $s(Dbe(),!1,!0);if(n!=null&&n.runtimeId&&s.status===404)throw new $s(V("client.runtimeConnectionUnsupported"),!0,!0);if(n!=null&&n.runtimeId&&(s.status===401||s.status===403))throw new $s(V("client.runtimeConnectionDenied"));if(!s.ok)throw new Error(await Jt(s,V("client.listAgentsFailed")));let l;try{l=await s.json()}catch{throw new $s(V("client.invalidListAppsJson"))}if(!Array.isArray(l)||l.some(u=>typeof u!="string"||!u.trim()))throw new $s(V("client.invalidListAppsFormat"));const c=l.map(u=>u.trim());return n!=null&&n.runtimeId&&Gy.set(FF(n.runtimeId,n.region??"",n.runtimeVersion),{apps:c,expiresAt:Date.now()+TBe}),c}async function Fbe(e,t){const{app:n,ep:i}=wl(e),r=await wt(`/apps/${n}/users/${encodeURIComponent(t)}/sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"},i);if(!r.ok){const a=V("client.createSessionFailedWithStatus",{status:r.status}),l=await Jt(r,V("client.createSessionFailed"));throw new Error(l===a?a:V("common.fallbackWithDetail",{fallback:a,detail:l}))}return(await r.json()).id}async function UF(e,t){const{app:n,ep:i}=wl(e),r=await wt(`/apps/${n}/users/${encodeURIComponent(t)}/sessions`,{},i);if(!r.ok)throw new Error(`list sessions failed: ${r.status}`);return r.json()}async function Yj(e,t,n){const{app:i,ep:r}=wl(e),s=await wt(`/apps/${i}/users/${encodeURIComponent(t)}/sessions/${encodeURIComponent(n)}`,{},r);if(!s.ok){const l=await Jt(s,V("client.getSessionFailed"));throw new Error(V("client.getSessionFailedWithDetail",{status:s.status,detail:l}))}const a=await s.json();if(r.runtimeId){const l=DF(r.runtimeId,i,t,n);a.state={...MF()[l]??{},...a.state??{}}}return a}async function Bbe(e){const{app:t,ep:n}=wl(e.appName);if(!n.runtimeId)throw new Error(V("client.feedbackRuntimeOnly"));if(!n.region)throw new Error(V("client.feedbackRegionMissing"));const i=await wt("/web/evaluation/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runtimeId:n.runtimeId,region:n.region,appName:t,userId:e.userId,sessionId:e.sessionId,eventId:e.eventId,rating:e.rating,comment:e.comment??""})},{},cs);if(!i.ok)throw new Error(await Jt(i,V("client.submitFeedbackFailed")));const r=await i.json(),s=DF(n.runtimeId,t,e.userId,e.sessionId);return EBe(s,e.eventId,r),r}async function Zj(e,t={}){const n=Hb(e.runtimeId,e.region||"cn-beijing",e.appName,e.pageSize??100),i=Qm(ku,n,Mbe);if(!t.force&&i)return i;const r=ku.get(n);if(!t.force&&(r!=null&&r.promise))return r.promise;let s=null;const a=(async()=>{for(const l of Xj(e.region)){const c=new URLSearchParams({runtimeId:e.runtimeId,region:l,appName:e.appName,page_size:String(e.pageSize??100)}),u=await wt(`/web/evaluation/feedback-cases?${c.toString()}`);if(u.ok)return BF(ku,n,await u.json());s=new Error(await Jt(u,V("client.loadEvaluationSetsFailed")))}throw s??new Error(V("client.loadEvaluationSetsFailed"))})();ku.set(n,{...r,promise:a,updatedAt:(r==null?void 0:r.updatedAt)??0});try{return await a}finally{const l=ku.get(n);(l==null?void 0:l.promise)===a&&ku.set(n,{value:l.value,updatedAt:l.updatedAt})}}async function d4(e){let t=null;for(const n of Xj(e.region)){const i=new URLSearchParams({runtimeId:e.runtimeId,region:n,appName:e.appName,userId:e.userId}),r=await wt(`/web/evaluation/statuses?${i.toString()}`);if(r.ok)return r.json();t=new Error(await Jt(r,V("client.loadAutoEvaluationStatusFailed")))}throw t??new Error(V("client.loadAutoEvaluationStatusFailed"))}async function Ube(e){let t=null;for(const n of Xj(e.region)){const i=new URLSearchParams({runtimeId:e.runtimeId,region:n,appName:e.appName}),r=await wt(`/web/evaluation/optimizations?${i.toString()}`);if(r.ok)return r.json();t=new Error(await Jt(r,V("client.loadOptimizationsFailed")))}throw t??new Error(V("client.loadOptimizationsFailed"))}function Qbe(e){return Qm(ku,Hb(e.runtimeId,e.region||"cn-beijing",e.appName,e.pageSize??100),Mbe)}function ABe(e){Zj(e).catch(()=>{})}function zbe(e){Zj(e,{force:!0}).catch(()=>{})}function Vbe(e,t){return["good","bad"].map(n=>{const i=e.find(r=>r.kind===n);return{kind:n,evaluationSetId:(i==null?void 0:i.evaluationSetId)??null,evaluationSetName:(i==null?void 0:i.evaluationSetName)??null,workspaceId:(i==null?void 0:i.workspaceId)??null,itemCount:t.filter(r=>r.kind===n).length}})}function W2(e){const t=e.comment??"",n=e.rating==="bad"&&!!t.trim();for(const[i,r]of ku.entries()){const s=r.value;if(!s||s.runtimeId!==e.runtimeId||s.agentName!==e.appName)continue;const a=s.items.filter(c=>c.sessionId!==e.sessionId||c.messageId!==e.messageId),l=e.rating?[{id:`local:${e.runtimeId}:${e.sessionId}:${e.messageId}`,itemKey:`local:${e.messageId}`,kind:e.rating,input:e.input,output:e.output,referenceOutput:e.referenceOutput??e.output,comment:t,agentName:e.appName,sessionId:e.sessionId,messageId:e.messageId,runtimeId:e.runtimeId,invocationId:e.invocationId??"",userId:e.userId,createdAt:e.createdAt??new Date().toISOString(),evaluationSetId:"",evaluationSetName:"",workspaceId:"",source:"user",score:n?0:null,reason:n?t:""},...a]:a;ku.set(i,{value:{...s,sets:Vbe(s.sets,l),items:l},updatedAt:Date.now(),promise:r.promise})}}async function Hbe(e){let t=null;for(const n of Xj(e.region)){const i=await wt("/web/evaluation/feedback-cases/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runtimeId:e.runtimeId,region:n,appName:e.appName,itemIds:e.itemIds})},{},cs);if(i.ok){const r=await i.json(),s=new Set(e.itemIds);for(const[a,l]of ku.entries()){const c=l.value;if(!c||c.runtimeId!==e.runtimeId||c.agentName!==e.appName)continue;const u=c.items.filter(d=>!s.has(d.id));ku.set(a,{value:{...c,sets:Vbe(c.sets,u),items:u},updatedAt:Date.now()})}return r}t=new Error(await Jt(i,V("client.deleteEvaluationCaseFailed")))}throw t??new Error(V("client.deleteEvaluationCaseFailed"))}async function f4(e,t,n){const{app:i,ep:r}=wl(e),s=await wt(`/apps/${i}/users/${encodeURIComponent(t)}/sessions/${n}`,{method:"DELETE"},r);if(!s.ok&&s.status!==404)throw new Error(`delete session failed: ${s.status}`)}function _Be(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"="),i=window.atob(n),r=new Uint8Array(i.length);for(let s=0;sURL.revokeObjectURL(l),0)}async function qbe(e,t,n,i,r){const{app:s,ep:a}=wl(e),l=r==null?"":`?version=${encodeURIComponent(r)}`,c=`/apps/${encodeURIComponent(s)}/users/${encodeURIComponent(t)}/sessions/${encodeURIComponent(n)}/artifacts/${encodeURIComponent(i)}${l}`,u=await wt(c,{},a,cs);if(!u.ok)throw new Error(await Jt(u,V("client.downloadFileFailed")));const d=await u.json(),f=d.inlineData??d.inline_data;if(!(f!=null&&f.data))throw new Error(V("client.fileUnavailable"));const h=_Be(f.data),p=h.buffer.slice(h.byteOffset,h.byteOffset+h.byteLength);return{blob:new Blob([p],{type:f.mimeType??f.mime_type??"application/octet-stream"}),downloadName:f.displayName??f.display_name??i}}async function zF(e,t,n,i,r){const{blob:s}=await qbe(e,t,n,i,r);return URL.createObjectURL(s)}async function NBe(e){const t=await wt("/web/media/capabilities");if(!t.ok)throw new Error(await Jt(t,"media capabilities failed"));return t.json()}async function Wbe(e,t,n,i){const{app:r}=wl(e),s=new FormData;s.set("app_name",r),s.set("user_id",t),s.set("session_id",n),s.set("file",i);const a=await wt("/web/media",{method:"POST",body:s},{},cs);if(!a.ok)throw new Error(await Jt(a,V("client.uploadFileFailed")));return{...await a.json(),status:"ready"}}async function h4(e,t,n){const{app:i}=wl(e),r=`/web/media/${encodeURIComponent(i)}/${encodeURIComponent(t)}/${encodeURIComponent(n)}/delete`,s=await wt(r,{method:"POST"});if(!s.ok&&s.status!==404)throw new Error(await Jt(s,"media cleanup failed"))}function Kbe(e){try{const t=new URL(e);if(t.protocol!=="veadk-media:"||t.hostname!=="apps")return;const n=t.pathname.split("/").filter(Boolean).map(decodeURIComponent);return n.length!==7||n[1]!=="users"||n[3]!=="sessions"||n[5]!=="media"?void 0:`/web/media/${n.map(encodeURIComponent).filter((i,r)=>![1,3,5].includes(r)).join("/")}`}catch{return}}async function K2(e,t){const n=Kbe(t);if(!n)throw new Error("Invalid VeADK media URI");const i=await wt(`${n}/delete`,{method:"POST"});if(!i.ok&&i.status!==404)throw new Error(await Jt(i,"media cleanup failed"))}function Gbe(e,t){if(t.startsWith("data:")||t.startsWith("blob:")||/^https?:/.test(t))return t;const n=Kbe(t);if(!n)return t;const i=`${n}/content`;return $o(`${q2}${i}`)}async function j_(e,t,n){const{app:i,ep:r}=wl(e);let s;if(r.runtimeId){const c=new URLSearchParams({runtimeId:r.runtimeId,sessionId:t,region:r.region??"cn-beijing"});if(n&&c.set("endTimeMs",String(Math.round(n))),s=await wt(`/web/runtime-trace?${c.toString()}`),s.status===404)throw new Error(V("client.traceDisabled"))}else s=await wt(`/dev/apps/${encodeURIComponent(i)}/debug/trace/session/${encodeURIComponent(t)}`,{},r);if(!s.ok)throw new Error(await Jt(s,V("client.loadTraceFailed")));const a=s.headers.get("content-type")??"";if(!a.includes("application/json")){const c=a.split(";",1)[0]||V("client.contentTypeMissing");throw new Error(V("client.traceNonJson",{contentType:c}))}const l=await s.json();if(!Array.isArray(l))throw new Error(V("client.invalidTraceFormat"));return l}async function p4(e){const t=await wt("/web/issue-feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await Jt(t,V("client.submitIssueFeedbackFailed")));if((await t.json()).submitted!==!0)throw new Error(V("client.issueFeedbackNotConfirmed"));return{submitted:!0}}async function Xbe(e,t,n=!0){const i=await wt(`/web/agent-info/${e}`,{},t);if(!i.ok)throw new Error(`agent-info failed: ${i.status}`);const r=await i.json();if(n&&!r.draft)try{const s=await wt(`/web/agent-draft/${e}`,{},t);if(s.ok){const a=await s.json();r.draft=a.draft}}catch{}return{appName:e,name:r.name??e,description:r.description??"",type:r.type,model:r.model??"",tools:r.tools??[],skillsPreviewSupported:Array.isArray(r.skills),skills:r.skills??[],subAgents:r.subAgents??[],components:r.components??[],searchSources:r.searchSources??[],graph:r.graph,draft:r.draft}}async function m4(e){const{app:t,ep:n}=wl(e);return Xbe(t,n,!1)}async function jBe(e,t,n){let i=null;for(const r of Bk(t)){const s={runtimeId:e,region:r};try{const a=FF(e,r),l=Gy.get(a);l&&l.expiresAt<=Date.now()&&Gy.delete(a);const c=Gy.get(a),u=n||(c==null?void 0:c.apps[0])||(await Uk("","",s))[0];if(!u)throw new Error(V("client.noPreviewableAgent"));return Xbe(u,s)}catch(a){if(a instanceof Cx||a instanceof $s&&!a.unsupported)throw a;i=a instanceof Error?a:new Error(String(a))}}throw i??new Error(V("client.noPreviewableAgent"))}async function VF(e,t,n={},i={}){const r=typeof n=="string"?n:void 0,s=typeof n=="string"?i:n,a=Hb(e,t||"cn-beijing",r??""),l=Qm(Og,a,Tx);if(!s.force&&l)return l;const c=Og.get(a);if(!s.force&&(c!=null&&c.promise))return c.promise;const u=jBe(e,t,r).then(d=>BF(Og,a,d));Og.set(a,{...c,promise:u,updatedAt:(c==null?void 0:c.updatedAt)??0});try{return await u}finally{const d=Og.get(a);(d==null?void 0:d.promise)===u&&Og.set(a,{value:d.value,updatedAt:d.updatedAt})}}function Ybe(e,t,n=""){return Qm(Og,Hb(e,t||"cn-beijing",n),Tx)}function Zbe(e,t,n=""){VF(e,t,n).catch(()=>{})}async function Jbe(e,t,n,i){const{app:r,ep:s}=wl(e),a=new URLSearchParams({source:t,app_name:r,q:n,user_id:i}),l=await wt(`/web/search?${a.toString()}`,{},s);if(!l.ok)throw new Error(await Jt(l,V("client.agentSearchFailed")));return l.json()}async function e0e(e,t){const{app:n}=wl(e),i=await wt(`/web/search?source=web&app_name=${encodeURIComponent(n)}&q=${encodeURIComponent(t)}`);if(!i.ok)throw new Error(`web search failed: ${i.status}`);return i.json()}function t0e(){return Uf(V("client.emptySseBody"))}function G2(){return Uf(V("client.noDisplayableSseReply"))}const RBe=3e4;function $v(){return Uf(V("client.firstSseEventTimeout"))}function n0e(e){if(e!=null&&e.aborted)return{signal:e,clearDeadline:()=>{},cleanup:()=>{},timedOut:()=>!1};const t=new AbortController;let n=!1,i=!1;const r=()=>{i||(i=!0,clearTimeout(a))},s=()=>{t.signal.aborted||t.abort((e==null?void 0:e.reason)??new DOMException("Aborted","AbortError"))},a=setTimeout(()=>{i||t.signal.aborted||(n=!0,i=!0,t.abort(new Error($v())))},RBe);return e==null||e.addEventListener("abort",s,{once:!0}),{signal:t.signal,clearDeadline:r,cleanup:()=>{r(),e==null||e.removeEventListener("abort",s)},timedOut:()=>n}}async function*g4({appName:e,userId:t,sessionId:n,text:i,attachments:r=[],invocation:s,platformTools:a,environmentMounts:l,environmentMount:c,functionResponses:u=[],signal:d,onRuntimeContext:f}){const{app:h,ep:p}=wl(e),g=r.flatMap(k=>k.status&&k.status!=="ready"?[]:k.uri?[{fileData:{mimeType:k.mimeType,fileUri:k.uri,displayName:k.name},partMetadata:{veadkMedia:{id:k.id,uri:k.uri,name:k.name,mimeType:k.mimeType,sizeBytes:k.sizeBytes}}}]:k.data?[{inlineData:{mimeType:k.mimeType,data:k.data,displayName:k.name}}]:[]),b=s&&(s.skills.length>0||s.targetAgent)?s:void 0,v=[...g,...u.map(k=>({functionResponse:{id:k.id,name:k.name,response:k.response}})),...i.trim()?[{text:i}]:[]];if(b&&v.length>0){const k=v[0],S=k.partMetadata;v[0]={...k,partMetadata:{...S,veadkInvocation:b}}}let y;const x=n0e(d);try{y=await wt("/run_sse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:h,user_id:t,session_id:n,new_message:{role:"user",parts:v},streaming:!0,...a!==void 0?{platform_tools:[...a]}:{},...l!==void 0?{environment_mounts:[...l]}:c?{environment_mount:c}:{},custom_metadata:b?{veadkInvocation:b}:void 0}),signal:x.signal},p,0)}catch(k){throw x.cleanup(),x.timedOut()?new Error($v()):d!=null&&d.aborted||(k==null?void 0:k.name)==="AbortError"?k:new Error(Uf(k))}const w=K7e(y,p.runtimeId??"",p.region??"");if(w&&(f==null||f(w)),!y.ok){x.cleanup();const k=await Jt(y,V("client.runSessionFailed"));throw new Error(Uf(V("client.runSseFailedWithDetail",{status:y.status,detail:k})))}let O=!1;try{for await(const k of Kj(y)){O=!0,x.clearDeadline();const S=k;typeof S.error=="string"&&(S.error=Uf(S.error)),typeof S.errorMessage=="string"&&(S.errorMessage=Uf(S.errorMessage)),typeof S.error_message=="string"&&(S.error_message=Uf(S.error_message)),yield S}}catch(k){throw x.timedOut()?new Error($v()):d!=null&&d.aborted||(k==null?void 0:k.name)==="AbortError"?k:new Error(Uf(k))}finally{x.cleanup()}if(!O)throw new Error(t0e())}async function Jj(e,t){const n=new URLSearchParams({name:e,region:t}),i=await wt(`/web/runtime-name-availability?${n.toString()}`,{cache:"no-store"});if(!i.ok)throw new Error(await Jt(i,V("client.checkRuntimeNameFailed")));const r=await i.json();if(typeof r.available!="boolean")throw new Error(V("client.invalidRuntimeNameCheck"));return{available:r.available}}async function i0e(e,t){const n=new URLSearchParams({kind:e.kind,region:e.region});e.registry&&n.set("registry",e.registry),e.namespace&&n.set("namespace",e.namespace),e.workspaceId&&n.set("workspaceId",e.workspaceId),e.search&&n.set("search",e.search),e.pageNumber&&n.set("pageNumber",String(e.pageNumber)),e.pageSize&&n.set("pageSize",String(e.pageSize));const i=await wt(`/web/deployment-resources?${n.toString()}`,{signal:t});if(!i.ok)throw new Error(await Jt(i,V("client.loadCloudResourcesFailed")));const r=await i.json();if(typeof r.serviceRegion!="string"||!Array.isArray(r.items)||typeof r.pageNumber!="number"||typeof r.pageSize!="number"||typeof r.totalCount!="number"||typeof r.hasMore!="boolean")throw new Error(V("client.invalidCloudResources"));const s=r.items.map(a=>{if(!a||typeof a!="object"||typeof a.id!="string"||typeof a.name!="string"||typeof a.region!="string"||typeof a.status!="string")throw new Error(V("client.invalidCloudResources"));return a});return{serviceRegion:r.serviceRegion,items:s,pageNumber:r.pageNumber,pageSize:r.pageSize,totalCount:r.totalCount,hasMore:r.hasMore}}function r0e(e,t){const n=e;if(!n||typeof n!="object"||!Array.isArray(n.mounts))throw new Error(V("client.invalidEnvironmentMount"));if(n.mounts.length!==t.length)throw new Error(V("client.environmentMountMismatch"));return n.mounts.map((i,r)=>{const s=t[r];if(!i||typeof i!="object"||typeof i.environment_id!="string"||typeof i.environment_version_id!="string"||typeof i.mount_instance_id!="string"||typeof i.sandbox_session_id!="string"||!i.environment_id||!i.environment_version_id||!i.mount_instance_id||!i.sandbox_session_id)throw new Error(V("client.invalidEnvironmentMount"));if(i.environment_id!==s.environment_id||i.environment_version_id!==s.environment_version_id||s.mount_instance_id!==void 0&&i.mount_instance_id!==s.mount_instance_id)throw new Error(V("client.environmentMountMismatch"));return i})}async function s0e({runtimeId:e,appName:t,userId:n,sessionId:i,environmentMounts:r}){const{app:s}=wl(t);let a;try{a=await wt("/web/v3/session-environment-mounts/prepare",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runtime_id:e,app_name:s,user_id:n,session_id:i,environment_mounts:[...r]})})}catch(l){throw l instanceof TypeError?new Error(V("client.environmentMountNetworkFailed")):l}if(!a.ok)throw new Error(await Jt(a,V("client.environmentMountFailed")));return r0e(await a.json(),r)}function HF(e){const t=new Set,n=[];for(const i of e.split(/[,,\n\r]+/)){const r=i.trim();!r||t.has(r)||(t.add(r),n.push(r))}return n}async function a0e(e,t=typeof navigator>"u"?void 0:navigator.clipboard){if(!(t!=null&&t.writeText))throw new Error(V("client.clipboardUnsupported"));try{await t.writeText(e)}catch{throw new Error(V("client.clipboardWriteFailed"))}}const SW={codex:0,codex_snapshot:1,deepseek_harness:2,deepseek_harness_snapshot:3,openclaw:4,openclaw_snapshot:5,hermes:6,hermes_snapshot:7,dev:8};async function o0e(e){var r;const t=await wt("/web/system-info",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadSystemInfoFailed")));const n=await t.json();if(typeof((r=n.storage)==null?void 0:r.tosAddress)!="string"||!Array.isArray(n.sandboxTools))throw new Error(V("client.invalidSystemInfo"));const i=n.sandboxTools.map(s=>{if(!s||typeof s!="object"||typeof s.kind!="string"||typeof s.label!="string"||typeof s.toolId!="string"||typeof s.snapshot!="boolean"||typeof s.needsModelEnvUpdate!="boolean"||typeof s.canUpdateModelEnv!="boolean"||typeof s.modelEnvError!="string"||typeof s.modelEnvErrorCode!="string")throw new Error(V("client.invalidSystemInfo"));return s}).sort((s,a)=>(SW[s.kind]??Number.MAX_SAFE_INTEGER)-(SW[a.kind]??Number.MAX_SAFE_INTEGER));return{storage:{tosAddress:n.storage.tosAddress},sandboxTools:i}}const l0e=new Set(["preparing","queued","building","scanning","available","failed"]);function qF(e){if(e===null)return null;if(!e||typeof e!="object")throw new Error(V("client.invalidEnvironmentBuild"));const t=e;if(typeof t.versionId!="string"||!l0e.has(t.status)||typeof t.image!="string"||typeof t.error!="string"||typeof t.createdAt!="string"||typeof t.updatedAt!="string"||t.resources!==null&&typeof t.resources!="object")throw new Error(V("client.invalidEnvironmentBuild"));const n=Array.isArray(t.steps)?t.steps.map(i=>{if(!i||typeof i!="object"||typeof i.key!="string"||typeof i.label!="string"||!["pending","running","succeeded","failed"].includes(i.status)||i.startedAt!==null&&typeof i.startedAt!="string"||i.finishedAt!==null&&typeof i.finishedAt!="string")throw new Error(V("client.invalidEnvironmentBuildStep"));return i}):[];return{...t,toolId:typeof t.toolId=="string"?t.toolId:"",toolStatus:["creating","ready","failed"].includes(t.toolStatus)?t.toolStatus:"",runId:typeof t.runId=="string"?t.runId:"",currentStep:typeof t.currentStep=="string"?t.currentStep:"",sourceCommitSha:typeof t.sourceCommitSha=="string"?t.sourceCommitSha:"",steps:n,progressError:typeof t.progressError=="string"?t.progressError:"",logTail:typeof t.logTail=="string"?t.logTail:"",logTruncated:t.logTruncated===!0,logUpdatedAt:typeof t.logUpdatedAt=="string"?t.logUpdatedAt:null,logError:typeof t.logError=="string"?t.logError:""}}function c0e(e){if(!e||typeof e!="object")throw new Error(V("client.invalidEnvironmentManifest"));const t=e;if(!["agentkit.studio/v3","agentkit.studio/v1alpha1"].includes(t.apiVersion)||t.kind!=="Environment"||!t.metadata||typeof t.metadata.id!="string"||typeof t.metadata.name!="string"||typeof t.metadata.version!="string"||typeof t.metadata.description!="string"||!t.spec||typeof t.spec.image!="string"||!["ubuntu","aio-sandbox","codex-sandbox"].includes(t.spec.baseEnvironment)||typeof t.spec.baseImage!="string"||!["ubuntu-22.04","ubuntu-24.04"].includes(t.spec.operatingSystem)||!["python-3.10","python-3.12"].includes(t.spec.language)||t.spec.executionRuntime!=="veadk"||!Array.isArray(t.spec.packages)||!t.spec.packages.every(n=>typeof n=="string")||!Array.isArray(t.spec.capabilities)||!t.spec.capabilities.every(n=>typeof n=="string")||!Array.isArray(t.spec.skills)||!t.status||!l0e.has(t.status.phase)||typeof t.status.createdAt!="string"||typeof t.status.updatedAt!="string")throw new Error(V("client.invalidEnvironmentManifest"));return t}function u0e(e){if(e==null)return;if(!e||typeof e!="object")throw new Error(V("client.invalidImageRepository"));const t=e;if(typeof t.region!="string"||typeof t.registry!="string"||typeof t.namespace!="string"||typeof t.repository!="string")throw new Error(V("client.invalidImageRepository"));return t}function IBe(e){if(e==null)return;if(!e||typeof e!="object")throw new Error(V("client.invalidCodeRepository"));const t=e;if(typeof t.repositoryUrl!="string"||t.ref!==void 0&&typeof t.ref!="string"||typeof t.dockerfilePath!="string")throw new Error(V("client.invalidCodeRepository"));return t}function PBe(e){const t=u0e(e);if(!t)return;const n=e;if(typeof n.reference!="string")throw new Error(V("client.invalidImageSource"));return{...t,reference:n.reference}}function WF(e){if(!e||typeof e!="object")throw new Error(V("client.invalidEnvironment"));const t=e;if(typeof t.id!="string"||typeof t.name!="string"||typeof t.description!="string"||t.baseEnvironment!==void 0&&t.baseEnvironment!=="ubuntu"&&t.baseEnvironment!=="aio-sandbox"&&t.baseEnvironment!=="codex-sandbox"||t.operatingSystem!=="ubuntu-22.04"&&t.operatingSystem!=="ubuntu-24.04"||t.language!=="python-3.10"&&t.language!=="python-3.12"||!Array.isArray(t.optionIds)||!t.optionIds.every(n=>typeof n=="string")||t.selectedSkills!==void 0&&!Array.isArray(t.selectedSkills)||typeof t.dockerfile!="string"||typeof t.createdAt!="string"||typeof t.updatedAt!="string")throw new Error(V("client.invalidEnvironment"));return{...t,baseEnvironment:t.baseEnvironment==="aio-sandbox"?"aio-sandbox":t.baseEnvironment==="codex-sandbox"?"codex-sandbox":"ubuntu",selectedSkills:t.selectedSkills??[],gitSource:IBe(t.gitSource),containerRepository:u0e(t.containerRepository),imageSource:PBe(t.imageSource),latestVersion:qF(t.latestVersion)}}function d0e(e){if(!e||typeof e!="object")throw new Error(V("client.invalidWorkspace"));const t=e;if(typeof t.id!="string"||typeof t.name!="string"||typeof t.description!="string"||!Array.isArray(t.environmentIds)||!t.environmentIds.every(n=>typeof n=="string")||typeof t.createdAt!="string"||typeof t.updatedAt!="string")throw new Error(V("client.invalidWorkspace"));return t}async function KF(e){const t=await wt("/web/workspaces",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadWorkspacesFailed")));const n=await t.json();if(!Array.isArray(n.items))throw new Error(V("client.invalidWorkspaceList"));return n.items.map(d0e)}async function f0e(e,t,n,i){const r=await wt(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:i});if(!r.ok)throw new Error(await Jt(r,V("client.saveWorkspaceFailed")));return d0e(await r.json())}function h0e(e,t){return f0e("/web/workspaces","POST",e,t)}function p0e(e,t,n){return f0e(`/web/workspaces/${encodeURIComponent(e)}`,"PATCH",t,n)}async function m0e(e,t){const n=await wt(`/web/workspaces/${encodeURIComponent(e)}`,{method:"DELETE",signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.deleteWorkspaceFailed")))}async function Qk(e){const t=await wt("/web/v3/environments",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadEnvironmentsFailed")));const n=await t.json();if(!Array.isArray(n.items))throw new Error(V("client.invalidEnvironmentList"));return n.items.map(WF)}async function g0e(e,t){const n=await wt("/web/v3/environment-repositories/inspect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.probeRepositoryFailed")));const i=await n.json();if(typeof i.repositoryUrl!="string"||typeof i.ref!="string"||typeof i.commitSha!="string"||!Array.isArray(i.dockerfiles)||!i.dockerfiles.every(r=>typeof r=="string"))throw new Error(V("client.invalidRepositoryProbe"));return i}async function b0e(e,t){const n=await wt(`/web/v3/environments/${encodeURIComponent(e)}/share-code`,{method:"POST",signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.exportEnvironmentCodeFailed")));const i=await n.json();if(typeof i.shareCode!="string"||typeof i.name!="string")throw new Error(V("client.invalidEnvironmentCode"));return i}async function y0e(e,t){const n=await wt("/web/v3/environment-share-codes/inspect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shareCodes:e}),signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.inspectEnvironmentCodeFailed")));const i=await n.json();if(!Array.isArray(i.items))throw new Error(V("client.invalidEnvironmentCodeInspection"));return i.items.map(r=>{if(!r||typeof r!="object")throw new Error(V("client.invalidEnvironmentCodeInspection"));const s=r,a=s.status==="valid"||s.valid===!0?"valid":s.status==="invalid"||s.valid===!1?"invalid":null;if(!Number.isInteger(s.index)||a===null||s.name!==void 0&&typeof s.name!="string"||s.error!==void 0&&typeof s.error!="string")throw new Error(V("client.invalidEnvironmentCodeInspection"));return{index:s.index,status:a,name:s.name??"",error:s.error??""}})}async function v0e(e,t){const n=await wt("/web/v3/environment-share-codes/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shareCodes:e}),signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.importEnvironmentCodeFailed")));const i=await n.json();if(!Array.isArray(i.items))throw new Error(V("client.invalidEnvironmentCodeImport"));return i.items.map(r=>{if(!r||typeof r!="object")throw new Error(V("client.invalidEnvironmentCodeImport"));const s=r;if(!Number.isInteger(s.index)||!(s.status==="created"||s.status==="duplicate"||s.status==="failed")||s.name!==void 0&&typeof s.name!="string"||s.error!==void 0&&typeof s.error!="string")throw new Error(V("client.invalidEnvironmentCodeImport"));return{index:s.index,status:s.status,name:s.name??"",environment:s.environment===void 0||s.environment===null?void 0:WF(s.environment),error:s.error??""}})}async function x0e(e,t,n,i){let r;try{r=await wt(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:i})}catch(s){throw s instanceof DOMException&&s.name==="AbortError"?s:s instanceof TypeError?new Error(V("client.studioUnavailable")):s}if(!r.ok)throw new Error(await Jt(r,V("client.saveEnvironmentFailed")));return WF(await r.json())}function O0e(e,t){return x0e("/web/v3/environments","POST",e,t)}function w0e(e,t,n){return x0e(`/web/v3/environments/${encodeURIComponent(e)}`,"PATCH",t,n)}async function S0e(e,t){const n=await wt(`/web/v3/environments/${encodeURIComponent(e)}`,{method:"DELETE",signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.deleteEnvironmentFailed")))}async function b4(e,t){const n=await wt(`/web/v3/environments/${encodeURIComponent(e)}/build`,{method:"POST",signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.startEnvironmentBuildFailed")));const i=qF(await n.json());if(!i)throw new Error(V("client.invalidEnvironmentBuild"));return i}async function k0e(e,t,n={}){const i=n.includeLogs?"?includeLogs=true":"",r=await wt(`/web/v3/environments/${encodeURIComponent(e)}/builds/${encodeURIComponent(t)}${i}`,{signal:n.signal});if(!r.ok)throw new Error(await Jt(r,V("client.loadEnvironmentBuildFailed")));const s=qF(await r.json());if(!s)throw new Error(V("client.invalidEnvironmentBuild"));return s}async function E0e(e,t,n){const i=await wt(`/web/v3/environments/${encodeURIComponent(e)}/builds/${encodeURIComponent(t)}/manifest`,{signal:n});if(!i.ok)throw new Error(await Jt(i,V("client.loadEnvironmentManifestFailed")));return c0e(await i.json())}function kW(e){if(!e||typeof e!="object")throw new Error(V("client.invalidEnvironmentResource"));const t=e;if(t.source!=="provided"&&t.source!=="managed"||typeof t.consoleUrl!="string")throw new Error(V("client.invalidEnvironmentResource"));return t}async function C0e(e){const t=await wt("/web/v3/environment-resources",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadEnvironmentResourcesFailed")));const n=await t.json();if(n.provider!=="volcengine"&&n.provider!=="byteplus"||typeof n.region!="string")throw new Error(V("client.invalidEnvironmentResource"));return{provider:n.provider,region:n.region,codePipeline:kW(n.codePipeline),containerRegistry:kW(n.containerRegistry)}}async function DBe(e,t){const n=await wt(`/web/system-info/sandbox-tools/${encodeURIComponent(e)}/model-env`,{method:"POST",signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.updateCodexSandboxFailed")));const i=await n.json();if(i.kind!=="codex"&&i.kind!=="codex_snapshot"||typeof i.toolId!="string"||typeof i.updated!="boolean")throw new Error(V("client.invalidCodexSandboxUpdate"));return i}async function eR(e){const t=await wt("/web/identity/user-pools",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadUserPoolsFailed")));const n=await t.json();if(!Array.isArray(n.items))throw new Error(V("client.invalidUserPoolList"));return n.items.map(i=>{if(!i||typeof i!="object"||typeof i.uid!="string"||typeof i.name!="string"||typeof i.domain!="string"||typeof i.region!="string"||typeof i.isCurrent!="boolean")throw new Error(V("client.invalidUserPoolList"));return i})}const vw=new Map;function MBe(e){if(typeof e=="string")return e?{message:e}:null;if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=typeof t.message=="string"?t.message:typeof t.error=="string"?t.error:"";return n?{message:n,phase:typeof t.phase=="string"?t.phase:void 0,runtimeId:typeof t.runtimeId=="string"?t.runtimeId:void 0,logPath:typeof t.logPath=="string"?t.logPath:void 0}:null}class xw extends Error{constructor(t){super(t.message),this.detail=t,this.name="GithubCicdPipelineError"}}async function zh(e){const t=await e.text().catch(()=>"");if(t)try{const n=JSON.parse(t),i=MBe(n.detail??n.error);if(i)return new xw(i)}catch{return new xw({message:t})}return new xw({message:V("client.syncGithubFailed",{status:e.status})})}async function T0e(e){const t=await wt("/web/github-delivery/source-sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project:e.project,githubUrl:e.githubUrl,githubToken:e.githubToken,baseBranch:e.baseBranch,region:e.region,cloudProvider:e.cloudProvider})},{},0);if(!t.ok)throw await zh(t);return t.json()}async function A0e(e){const t=await wt("/web/github-delivery/cicd-pipeline",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({githubUrl:e.githubUrl,githubToken:e.githubToken,baseBranch:e.baseBranch,runtimeName:e.runtimeName,runtimeId:e.runtimeId,region:e.region,cloudProvider:e.cloudProvider,projectPath:e.projectPath??".",volcengineAccessKey:e.volcengineAccessKey,volcengineSecretKey:e.volcengineSecretKey,volcengineSessionToken:e.volcengineSessionToken??""})},{},0);if(!t.ok)throw await zh(t);return t.json()}async function _0e(e){const t=await wt("/web/github-delivery/init-main",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project:e.project,githubUrl:e.githubUrl,githubToken:e.githubToken,baseBranch:e.baseBranch,runtimeName:e.runtimeName,runtimeId:e.runtimeId,region:e.region,cloudProvider:e.cloudProvider,projectPath:e.projectPath??".",volcengineAccessKey:e.volcengineAccessKey,volcengineSecretKey:e.volcengineSecretKey,volcengineSessionToken:e.volcengineSessionToken??""})},{},0);if(!t.ok)throw await zh(t);return t.json()}async function LBe(e){const t=await wt("/web/github-delivery/source-sync/cicd",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipelineId:e.pipelineId,runtimeName:e.runtimeName,runtimeId:e.runtimeId,region:e.region,cloudProvider:e.cloudProvider,projectPath:e.projectPath??".",volcengineAccessKey:e.volcengineAccessKey,volcengineSecretKey:e.volcengineSecretKey,volcengineSessionToken:e.volcengineSessionToken??""})},{},0);if(!t.ok)throw await zh(t);return t.json()}async function N0e(e){const t=await wt(`/web/github-cicd/runtime-binding?runtimeId=${encodeURIComponent(e)}`);if(!t.ok)throw await zh(t);const n=await t.json();return n.pipelineId?n:null}async function X2(e){const t=await wt(`/web/github-delivery/versions?runtimeId=${encodeURIComponent(e)}`);if(!t.ok)throw await zh(t);return t.json()}async function j0e(e){const t=await wt("/web/github-delivery/rollback-pr",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw await zh(t);return t.json()}async function GF(e){const t=await wt("/web/github-cicd/runtime-binding",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw await zh(t);return t.json()}async function R0e(e){const t=await wt("/web/github-cicd/runtime-sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runtimeId:e.runtimeId,project:e.project})},{},0);if(!t.ok)throw await zh(t);return t.json()}async function Ax(e,t,n,i){var f,h,p,g,b;const r=i==null?void 0:i.taskId,s=r?new AbortController:void 0;r&&s&&vw.set(r,s);const a=()=>{r&&vw.get(r)===s&&vw.delete(r)};let l;try{const v=!!(i!=null&&i.migrationTaskId);(f=i==null?void 0:i.onStage)==null||f.call(i,{level:"info",phase:"upload",message:V(v?"client.validatingMigrationArtifact":"client.uploadingCodePackage"),pct:0}),l=await wt("/web/deploy-agentkit",{method:"POST",headers:{"Content-Type":"application/json"},signal:s==null?void 0:s.signal,body:JSON.stringify({name:e,files:v?[]:t,config:n,taskId:r,migrationTaskId:i==null?void 0:i.migrationTaskId,runtimeId:i==null?void 0:i.runtimeId,runtimeName:i==null?void 0:i.runtimeName,appName:i==null?void 0:i.appName,editMode:i==null?void 0:i.editMode,draft:i==null?void 0:i.draft,updateEtag:i==null?void 0:i.updateEtag,baseRuntimeVersion:i==null?void 0:i.baseRuntimeVersion,removeRuntimeEnvKeys:i==null?void 0:i.removeRuntimeEnvKeys,mcpSecretValues:i==null?void 0:i.mcpSecretValues,mcpCredentialReuses:i==null?void 0:i.mcpCredentialReuses,sessionStorage:i==null?void 0:i.sessionStorage,minInstance:i==null?void 0:i.minInstance,maxInstance:i==null?void 0:i.maxInstance,createEvaluationSets:i==null?void 0:i.createEvaluationSets,description:tBe((i==null?void 0:i.description)??""),authentication:i==null?void 0:i.authentication,im:i==null?void 0:i.im,envs:i==null?void 0:i.envs,resources:i==null?void 0:i.resources,source:(i==null?void 0:i.source)??(i!=null&&i.migrationTaskId?{kind:"migration",migrationId:i.migrationTaskId}:{kind:"inlineFiles"}),harnessSidecar:i==null?void 0:i.harnessSidecar,environment:i==null?void 0:i.environment})},{},0),(h=i==null?void 0:i.onStage)==null||h.call(i,{level:"success",phase:"upload",message:V(v?"client.migrationArtifactValidated":"client.codePackageUploaded"),pct:100})}catch(v){throw a(),v}if(!l.ok){const v=await Jt(l,V("client.deploymentFailed"));throw a(),new Error(v)}let c=null;try{for await(const v of Kj(l)){const y=v;if(y&&y.done){c=y;break}y&&y.message&&((p=i==null?void 0:i.onStage)==null||p.call(i,y))}}catch(v){throw a(),v}if(a(),!c)throw new Error(V("client.deploymentDisconnected"));if(!c.success)throw new Error(c.error||V("client.deploymentFailed"));if(!c.agentName)throw new Error(V("client.deploymentMissingAgentName"));if(!c.runtimeId&&!c.url)throw new Error(V("client.deploymentMissingConnection"));const u=(g=c.runtimeName)!=null&&g.trim()?c.agentName:e,d=((b=c.runtimeName)==null?void 0:b.trim())||c.agentName;return{apikey:c.apikey??"",url:c.url??"",agentName:u,runtimeName:d,runtimeId:c.runtimeId,consoleUrl:c.consoleUrl,region:c.region,version:c.version,warnings:c.warnings,feishuChannel:c.feishuChannel}}async function I0e(e){var n;const t=await wt("/web/cancel-deploy-agentkit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({taskId:e})});if(!t.ok){const i=await t.text().catch(()=>"");throw new Error(i||V("client.cancelDeploymentFailed",{status:t.status}))}(n=vw.get(e))==null||n.abort(),vw.delete(e)}async function $Be(e=IF){const t=await wt(`/web/my-runtimes?region=${encodeURIComponent(e)}`);if(!t.ok)throw new Error(V("client.loadFailed",{status:t.status}));return(await t.json()).runtimes??[]}const bS={title:"AgentKit Studio",logoUrl:""},y4={enabled:!1},AD={studio:!1,version:"",provider:"volcengine",branding:bS,features:{newChat:!0,search:!0,skillCenter:!0,history:!0,addAgent:!0,manageAgents:!0,agentUsage:!1,addAgentkit:!0,generatedAgentTestRun:!0},defaultView:"chat",agentsSource:"local",telemetry:y4};function FBe(e){if(!e||typeof e!="object")return y4;const t=e;if(t.enabled!==!0||!t.studio||typeof t.studio!="object")return y4;const n=t.studio;return{enabled:!0,studio:{deployId:typeof n.deployId=="string"?n.deployId:"",userPoolId:typeof n.userPoolId=="string"?n.userPoolId:"",applicationId:typeof n.applicationId=="string"?n.applicationId:"",functionId:typeof n.functionId=="string"?n.functionId:"",region:typeof n.region=="string"?n.region:"",project:typeof n.project=="string"?n.project:"",version:typeof n.version=="string"?n.version:"",accountId:typeof n.accountId=="string"?n.accountId:"",accountIdResolutionError:typeof n.accountIdResolutionError=="string"?n.accountIdResolutionError:""}}}async function P0e(){var e,t;try{const n=await wt("/web/ui-config");if(!n.ok)return AD;const i=await n.json(),r=typeof((e=i.branding)==null?void 0:e.logoUrl)=="string"?i.branding.logoUrl:bS.logoUrl,s=i.provider==="byteplus"?"byteplus":"volcengine";return Lbe(s),{studio:i.studio??!1,version:typeof i.version=="string"?i.version:"",provider:s,branding:{title:typeof((t=i.branding)==null?void 0:t.title)=="string"?i.branding.title:bS.title,logoUrl:r?$o(r):""},features:{...AD.features,...i.features??{}},defaultView:i.defaultView??"chat",agentsSource:i.agentsSource==="cloud"?"cloud":"local",telemetry:FBe(i.telemetry)}}catch{return AD}}const D0e={role:"user",telemetry:{userId:"",accountId:""},capabilities:{createAgents:!1,createPersonalAgents:!1,manageAgents:!1,runtimeScope:"mine"}};async function M0e(){var n,i,r,s,a;const e=await wt("/web/access");if(!e.ok)throw new Error(V("client.loadPermissionsFailed",{status:e.status}));const t=await e.json();if(!["admin","developer","user"].includes(t.role)||typeof((n=t.telemetry)==null?void 0:n.userId)!="string"||t.telemetry.accountId!==void 0&&typeof t.telemetry.accountId!="string"||typeof((i=t.capabilities)==null?void 0:i.createAgents)!="boolean"||typeof((r=t.capabilities)==null?void 0:r.createPersonalAgents)!="boolean"||typeof((s=t.capabilities)==null?void 0:s.manageAgents)!="boolean"||!["all","mine"].includes((a=t.capabilities)==null?void 0:a.runtimeScope))throw new Error(V("client.invalidPermissionResponse"));return t}async function L0e(e,t){const n=new URLSearchParams;e&&n.set("targetVersion",e),t&&n.set("startedAt",String(t));const i=n.size?`?${n.toString()}`:"",r=await wt(`/web/studio-update${i}`);if(!r.ok)throw new Error(V("client.checkStudioUpdateFailed",{status:r.status}));return await r.json()}async function $0e(){const e=await wt("/web/studio-update/permissions");if(!e.ok){let t="";try{const n=await e.json();t=typeof n.detail=="string"?n.detail:""}catch{t=""}throw new Error(t||V("client.studioUpdatePreflightFailed",{status:e.status}))}return await e.json()}async function F0e(e){const t=await wt("/web/studio-update",{method:"POST",headers:{"Content-Type":"application/json","X-VeADK-Studio-Update":"1"},body:JSON.stringify({version:e})},{},cs);if(!t.ok){let n="";try{const i=await t.json();n=typeof i.detail=="string"?i.detail:""}catch{n=""}throw new Error(n||V("client.submitStudioUpdateFailed",{status:t.status}))}return await t.json()}async function B0e({runtimeId:e,region:t,appName:n,page:i=1,pageSize:r=20,signal:s}){const a=new URLSearchParams({runtimeId:e,region:t,appName:n,page:String(i),pageSize:String(r)}),l=await wt(`/web/agent-usage?${a.toString()}`,{signal:s});if(!l.ok)throw new Error(await Jt(l,V("client.loadAgentUsageFailed")));const c=l.headers.get("content-type")||V("client.notProvided"),u=c.toLowerCase();if(!u.includes("application/json")&&!u.includes("+json"))throw new Error(V("client.agentUsageNonJson",{status:l.status,contentType:c})+V("client.checkStudioGateway"));try{return await l.json()}catch{throw new Error(V("client.agentUsageInvalidJson",{status:l.status,contentType:c})+V("client.retryCheckGateway"))}}function Vh(e=""){return`/web/cronjobs${e?`/${encodeURIComponent(e)}`:""}`}async function v4(e){const t=await wt(Vh(),{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadCronJobsFailed")));const n=await t.json();return Array.isArray(n)?n:n.items??[]}async function BBe(e,t){const n=await wt(Vh(e),{signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.loadCronJobFailed")));return await n.json()}async function U0e(e){const t=await wt(Vh(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await Jt(t,V("client.createCronJobFailed")));return await t.json()}async function Q0e(e,t){const n=await wt(`${Vh(e)}/update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await Jt(n,V("client.updateCronJobFailed")));return await n.json()}async function z0e(e,t){const n=t?"enable":"disable",i=await wt(`${Vh(e)}/${n}`,{method:"POST"});if(!i.ok)throw new Error(await Jt(i,V(t?"client.enableCronJobFailed":"client.pauseCronJobFailed")));return await i.json()}async function V0e(e){const t=await wt(`${Vh(e)}/run`,{method:"POST"});if(!t.ok)throw new Error(await Jt(t,V("client.runCronJobFailed")));return await t.json()}async function x4(e,t){const n=await wt(`${Vh(e)}/runs`,{signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.loadCronHistoryFailed")));const i=await n.json();return Array.isArray(i)?i:i.items??[]}async function H0e(e,t){const n=await wt(`${Vh(e)}/runs/${encodeURIComponent(t)}/cancel`,{method:"POST"});if(!n.ok)throw new Error(await Jt(n,V("client.stopCronRunFailed")));return await n.json()}async function q0e(e){const t=await wt(Vh(e),{method:"DELETE"});if(!t.ok)throw new Error(await Jt(t,V("client.deleteCronJobFailed")))}class XF extends Error{constructor(t,n){super(t),this.status=n,this.name="RuntimeListError"}}async function _x(e={}){const t=new URLSearchParams({scope:e.scope??"all",page_size:String(e.pageSize??30),region:e.region??"all"});e.nextToken&&t.set("next_token",e.nextToken);const n=await wt(`/web/runtimes?${t.toString()}`,{signal:e.signal});if(!n.ok){const r=await Jt(n,V("client.loadRuntimeFailed"));throw new XF(r,n.status)}const i=await n.json();return{runtimes:i.runtimes??[],nextToken:i.nextToken??""}}async function Fv(e,t,n={}){if(n.preferCached){const i=FF(e,t,n.currentVersion),r=Gy.get(i);if(r&&r.expiresAt>Date.now())return[...r.apps];r&&Gy.delete(i)}try{const i={runtimeId:e,region:t,runtimeVersion:n.currentVersion};return n.retryProbe&&(i.retryProbe=!0),await Uk("","",i,n.signal,n.timeoutMs)}catch(i){if(i instanceof Cx||i instanceof $s||i instanceof Error)throw i;return null}}async function W0e(e,t){const n=new URLSearchParams({region:t}),i=await wt(`/web/runtime-tool-channel/${encodeURIComponent(e)}/capabilities?${n.toString()}`);if(!i.ok)throw new $s(await Jt(i,V("client.loadLocalToolsFailed")),!1,!0);return await i.json()}async function K0e(e,t){const n=new URLSearchParams({region:t}),i=await wt(`/web/runtime-route-channel/${encodeURIComponent(e)}/connect?${n.toString()}`,{method:"POST"});if(!i.ok)throw new $s(await Jt(i,V("client.connectDynamicRouteFailed")),!1,!0);return await i.json()}async function G0e(e,t,n={}){const i={runtimeId:e,region:t};n.retryProbe&&(i.retryProbe=!0);const r=await wt("/.well-known/agent-card.json",{},i),s=await $be(r);if(s==="runtime_access_denied")throw new Cx;if(s==="runtime_private_endpoint_unreachable")throw new $s(Pbe());if(["runtime_proxy_connect_error","runtime_proxy_timeout"].includes(s))throw new $s(Dbe());if(r.status===404)return null;if(r.status===401||r.status===403)throw new $s(V("client.a2aProbeDenied"));if(!r.ok)throw new Error(await Jt(r,V("client.loadA2aCardFailed")));const a=await r.json().catch(()=>null),l=typeof(a==null?void 0:a.url)=="string"?a.url.trim():"";return l?{name:typeof(a==null?void 0:a.name)=="string"?a.name:"",description:typeof(a==null?void 0:a.description)=="string"?a.description:"",endpoint:l}:null}async function X0e(e,t){const n=new URLSearchParams({runtimeId:e,region:t}),i=await wt(`/web/runtime-api-key/reveal?${n.toString()}`,{method:"POST",cache:"no-store"});if(!i.ok)throw new Error(await Jt(i,V("client.loadRuntimeApiKeyFailed")));const r=await i.json();if(typeof r.apiKey!="string"||!r.apiKey)throw new Error(V("client.runtimeApiKeyMissing"));return r.apiKey}async function Y0e(e,t){const n=await wt("/web/delete-runtime",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runtimeId:e,region:t})});if(!n.ok){const i=await n.text().catch(()=>"");throw new Error(i||V("client.deleteFailed",{status:n.status}))}}function Y2({runtimeId:e,region:t,appName:n,currentVersion:i}){return Hb(gS,t,e,i??"",(n==null?void 0:n.trim())??"")}async function UBe({runtimeId:e,region:t,appName:n,currentVersion:i,force:r=!1}){const s=new URLSearchParams({runtimeId:e,region:t});n&&s.set("appName",n),i!=null&&s.set("currentVersion",String(i)),r&&s.set("refresh","true");const a=await wt(`/web/runtime-update-capability?${s.toString()}`);if(!a.ok)throw new Error(await QBe(a));return await a.json()}function tR({runtimeId:e,region:t,appName:n,currentVersion:i,signal:r,force:s=!1}){var u,d;const a={runtimeId:e,region:t,appName:n,currentVersion:i},l=Y2(a);if(s&&Er.delete(l),!s){const f=Qm(Er,l,Tx);if(f)return GC(Promise.resolve(f),r);const h=(u=Er.get(l))==null?void 0:u.promise;if(h)return GC(h,r);if(n){const p=Y2({...a,appName:""}),g=(d=Er.get(p))==null?void 0:d.promise;if(g){let b;return b=g.then(v=>{var x,w,O,k,S;if(v.recoveryStatus==="preparing")return((x=Er.get(l))==null?void 0:x.promise)===b&&Er.delete(l),v;const y=((O=(w=v.agent)==null?void 0:w.appName)==null?void 0:O.trim())??"";return y&&y!==n.trim()?(((k=Er.get(l))==null?void 0:k.promise)===b&&Er.delete(l),tR(a)):(((S=Er.get(l))==null?void 0:S.promise)===b&&Er.set(l,{value:v,updatedAt:Date.now()}),v)},v=>{var y;throw((y=Er.get(l))==null?void 0:y.promise)===b&&Er.delete(l),v}),Er.set(l,{promise:b,updatedAt:0}),GC(b,r)}}}let c;return c=UBe({...a,force:s}).then(f=>{var h,p,g,b,v;if(f.recoveryStatus==="preparing")return((h=Er.get(l))==null?void 0:h.promise)===c&&Er.delete(l),f;if(((p=Er.get(l))==null?void 0:p.promise)===c){Er.set(l,{value:f,updatedAt:Date.now()});const y=new Set(["",((b=(g=f.agent)==null?void 0:g.appName)==null?void 0:b.trim())??""]);for(const x of y){const w=Y2({...a,appName:x});w!==l&&!((v=Er.get(w))!=null&&v.promise)&&Er.set(w,{value:f,updatedAt:Date.now()})}}return f},f=>{var h;throw((h=Er.get(l))==null?void 0:h.promise)===c&&Er.delete(l),f}),Er.set(l,{promise:c,updatedAt:0}),GC(c,r)}function O4({runtimeId:e,region:t,appName:n,currentVersion:i}){return Qm(Er,Y2({runtimeId:e,region:t,appName:n,currentVersion:i}),Tx)}function w4(e){return tR(e).then(()=>{},()=>{})}function S4(e,t){if(!e){Er.clear();return}for(const n of Er.keys()){const[i,r,s]=n.split("");i===gS&&s===e&&(!t||r===t)&&Er.delete(n)}}async function QBe(e){const t=await e.json().catch(()=>null),n=typeof(t==null?void 0:t.detail)=="string"?t.detail:"";return e.status===403?V("client.runtimeManageForbidden"):e.status===404?V(n==="runtime_not_found"?"client.runtimeNotFound":"client.runtimeUnavailable"):V("client.checkRuntimeUpdateFailed",{status:e.status})}async function zBe(e,t){let n=null;for(const i of Bk(t)){const r=await wt(`/web/runtime-detail?runtimeId=${encodeURIComponent(e)}®ion=${encodeURIComponent(i)}`);if(r.ok)return r.json();n=new Error(await Jt(r,V("client.loadRuntimeDetailFailed")))}throw n??new Error(V("client.loadRuntimeDetailFailed"))}async function YF(e,t="cn-beijing",n={}){const i=Hb(e,t||"cn-beijing"),r=Qm(wg,i,Tx);if(!n.force&&r)return r;const s=wg.get(i);if(!n.force&&(s!=null&&s.promise))return s.promise;const a=zBe(e,t).then(l=>BF(wg,i,l));wg.set(i,{...s,promise:a,updatedAt:(s==null?void 0:s.updatedAt)??0});try{return await a}finally{const l=wg.get(i);(l==null?void 0:l.promise)===a&&wg.set(i,{value:l.value,updatedAt:l.updatedAt})}}function Z0e(e,t="cn-beijing"){return Qm(wg,Hb(e,t||"cn-beijing"),Tx)}function J0e(e,t="cn-beijing"){YF(e,t).catch(()=>{})}async function Ow(e){const t=await wt("/web/generated-agent-projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:e})});if(!t.ok)throw new Error(await Jt(t,V("client.generateProjectFailed")));return t.json()}const VBe=19e4;async function eye(e){const t=await wt("/web/generated-agent-drafts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requirement:e})},{},VBe);if(!t.ok)throw new Error(await Jt(t,V("client.generateAgentConfigFailed")));return Wj(t,V("client.generateAgentConfigFailed"))}async function tye(e,t){const n=await wt("/web/generated-agent-test-runs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:e,runtimeId:t==null?void 0:t.runtimeId,runtimeRegion:t==null?void 0:t.region})});if(!n.ok)throw new Error(await Jt(n,V("client.createDebugRunFailed")));return Wj(n,V("client.createDebugRunFailed"))}async function nye(e,t){const n=await wt(`/web/generated-agent-test-runs/${e}/sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:t})});if(!n.ok)throw new Error(await Jt(n,V("client.createDebugSessionFailed")));return(await Wj(n,V("client.createDebugSessionFailed"))).id}async function iye(e,t){const n=await wt(`/web/generated-agent-test-runs/${encodeURIComponent(e)}/trace/session/${encodeURIComponent(t)}`);if(!n.ok)throw new Error(await Jt(n,V("client.loadDebugTraceFailed")));const i=await Wj(n,V("client.loadDebugTraceFailed"));if(!Array.isArray(i))throw new Error(V("client.invalidDebugTrace"));return i}async function*rye({runId:e,userId:t,sessionId:n,text:i,signal:r}){const s=i.trim()?[{text:i}]:[],a=n0e(r);let l;try{l=await wt(`/web/generated-agent-test-runs/${e}/run_sse`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user_id:t,session_id:n,new_message:{role:"user",parts:s},streaming:!0}),signal:a.signal},{},0)}catch(c){throw a.cleanup(),a.timedOut()?new Error($v()):c}if(!l.ok)throw a.cleanup(),new Error(await Jt(l,V("client.debugRunFailed")));try{for await(const c of Kj(l))a.clearDeadline(),yield c}catch(c){throw a.timedOut()?new Error($v()):c}finally{a.cleanup()}}async function J0(e){const t=await wt(`/web/generated-agent-test-runs/${e}`,{method:"DELETE"});if(!t.ok&&t.status!==404)throw new Error(await Jt(t,V("client.cleanupDebugRunFailed")))}function sye(e){if(!e||typeof e!="object")throw new Error(V("client.invalidSandboxVersion"));const t=e;if(typeof t.toolId!="string"||typeof t.error!="string")throw new Error(V("client.invalidSandboxVersion"));if(!t.error&&(t.provider!=="volcengine"&&t.provider!=="byteplus"||typeof t.region!="string"||typeof t.status!="string"||typeof t.currentImage!="string"||typeof t.latestImage!="string"||typeof t.needsImageUpdate!="boolean"||typeof t.canUpdate!="boolean"||typeof t.needsModelEnvUpdate!="boolean"||typeof t.canUpdateModelEnv!="boolean"||typeof t.modelEnvError!="string"))throw new Error(V("client.invalidSandboxVersion"));return t}async function aye(e){const t=await wt("/web/system-info/sandbox-tools/updates",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadSandboxVersionsFailed")));const n=await t.json();if(!Array.isArray(n.tools))throw new Error(V("client.invalidSandboxVersion"));return n.tools.map(sye)}async function oye(e){const t=await wt(`/web/system-info/sandbox-tools/${encodeURIComponent(e)}/update`,{method:"POST"},{},33e4);if(!t.ok)throw new Error(await Jt(t,V("client.updateSandboxFailed")));const n=await t.json();if(typeof n.updated!="boolean")throw new Error(V("client.invalidSandboxUpdate"));return{updated:n.updated,state:sye(n.state)}}const HBe=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_SITE_BRANDING:bS,DEFAULT_STUDIO_ACCESS:D0e,GithubCicdPipelineError:xw,RuntimeAccessDeniedError:Cx,RuntimeListError:XF,RuntimeProbeError:$s,attachGithubDeliveryCicdToSourceSync:LBe,bindGithubCicdRuntime:GF,buildEnvironment:b4,cancelAgentkitDeployment:I0e,cancelCronJobRun:H0e,checkRuntimeNameAvailability:Jj,clearMessageFeedbackCache:_be,clearRemoteApps:jbe,componentSearch:Jbe,createCronJob:U0e,createEnvironment:O0e,createGeneratedAgentTestRun:tye,createGeneratedAgentTestSession:nye,createGithubCicdPipeline:T0e,createGithubDeliveryCicdPipeline:A0e,createGithubDeliveryRollbackPr:j0e,createSession:Fbe,createWorkspace:h0e,deleteAgentFeedbackCases:Hbe,deleteCronJob:q0e,deleteEnvironment:S0e,deleteGeneratedAgentTestRun:J0,deleteMedia:K2,deleteRuntime:Y0e,deleteSession:f4,deleteSessionMedia:h4,deleteWorkspace:m0e,deployAgentkitProject:Ax,downloadArtifact:QF,ensureRuntimeRouteChannel:K0e,exportEnvironmentShareCode:b0e,fetchRemoteApps:Uk,generateAgentDraftFromRequirement:eye,generateAgentProject:Ow,getAgentFeedbackCases:Zj,getAgentInfo:m4,getAgentOptimizations:Ube,getAgentUsage:B0e,getAutomaticEvaluationStatuses:d4,getCachedAgentFeedbackCases:Qbe,getCachedRuntimeAgentInfo:Ybe,getCachedRuntimeDetail:Z0e,getCachedRuntimeUpdateCapability:O4,getCronJob:BBe,getEnvironmentBuild:k0e,getEnvironmentManifest:E0e,getEnvironmentResources:C0e,getGeneratedAgentTestTrace:iye,getGithubCicdRuntimeBinding:N0e,getGithubDeliveryVersions:X2,getMediaCapabilities:NBe,getMyRuntimes:$Be,getRuntimeAgentInfo:VF,getRuntimeDetail:YF,getRuntimeStudioToolCapabilities:W0e,getRuntimeUpdateCapability:tR,getRuntimes:_x,getSandboxImageUpdates:aye,getSession:Yj,getSessionTrace:j_,getStudioAccess:M0e,getStudioUpdatePermissions:$0e,getStudioUpdateStatus:L0e,getSystemInfo:o0e,getUiConfig:P0e,httpErrorMessage:Jt,importEnvironmentShareCodes:v0e,initializeGithubDeliveryMain:_0e,inspectEnvironmentRepository:g0e,inspectEnvironmentShareCodes:y0e,invalidateRuntimeUpdateCapabilityCache:S4,listApps:Ibe,listCronJobRuns:x4,listCronJobs:v4,listDeploymentResources:i0e,listEnvironments:Qk,listIdentityUserPools:eR,listModelApiKeys:$F,listModelOptions:Ex,listSessions:UF,listWorkspaces:KF,mediaContentUrl:Gbe,parseEnvironmentManifest:c0e,parseEnvironmentShareCodes:HF,parsePreparedSessionEnvironmentMounts:r0e,prefetchAgentFeedbackCases:ABe,prefetchRuntimeAgentInfo:Zbe,prefetchRuntimeDetail:J0e,prefetchRuntimeUpdateCapability:w4,prepareSessionEnvironmentMounts:s0e,previewArtifact:zF,probeRuntimeA2a:G0e,probeRuntimeApps:Fv,refreshAgentFeedbackCases:zbe,registerRemoteApp:Nbe,revealModelApiKey:Rbe,revealRuntimeApiKey:X0e,runCronJobNow:V0e,runGeneratedAgentTestSSE:rye,runSSE:g4,runSseEmptyResponseError:t0e,runSseFirstEventTimeoutError:$v,runSseIncompleteResponseError:G2,runtimeRegionCandidates:Bk,setClientCloudProvider:Lbe,setCronJobEnabled:z0e,startStudioUpdate:F0e,studioFetch:$n,submitIssueFeedback:p4,submitMessageFeedback:Bbe,syncGithubCicdRuntime:R0e,updateCodexSandboxToolModelEnv:DBe,updateCronJob:Q0e,updateEnvironment:w0e,updateSandboxTool:oye,updateWorkspace:p0e,uploadMedia:Wbe,upsertCachedAgentFeedbackCase:W2,webSearch:e0e,writeEnvironmentShareCode:a0e},Symbol.toStringTag,{value:"Module"})),EW=Object.freeze({totalTokenCount:0,promptTokenCount:0,candidatesTokenCount:0,thoughtsTokenCount:0,cachedContentTokenCount:0}),Z2=Object.freeze({modelName:"",current:EW,cumulative:EW}),qBe={totalTokenCount:"total_token_count",promptTokenCount:"prompt_token_count",candidatesTokenCount:"candidates_token_count",thoughtsTokenCount:"thoughts_token_count",cachedContentTokenCount:"cached_content_token_count"},WBe=24,KBe=64,GBe=16;function XC(e){var l,c;const t=e.trim();if(!t)return 0;const n=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/gu,i=((l=t.match(n))==null?void 0:l.length)??0,r=t.replace(n," "),s=(r.match(/[A-Za-z0-9_]+/g)??[]).reduce((u,d)=>u+Math.max(1,Math.ceil(d.length/4)),0),a=((c=r.match(/[^\sA-Za-z0-9_]/g))==null?void 0:c.length)??0;return i+s+a}function XBe(e){var l,c,u;const t=((l=e.instruction)==null?void 0:l.trim())??"",n=((c=e.tools)==null?void 0:c.filter(d=>d.trim()))??[],i=((u=e.skills)==null?void 0:u.filter(d=>d.name.trim()))??[],r=XC(t),s=n.reduce((d,f)=>d+KBe+XC(f),0),a=i.reduce((d,f)=>d+GBe+XC(f.name)+XC(f.description??""),0);return WBe+r+s+a}function YBe({usage:e,contextWindow:t,estimatedSystemTokens:n}){const i=Math.max(1,Math.round(t)),r=Math.max(0,e.current.promptTokenCount),s=Math.max(r,e.current.totalTokenCount),a=Math.min(i,r>0?Math.min(r,Math.max(0,n??0)):Math.max(0,n??0)),l=Math.max(0,r-a),c=r>0?Math.max(0,s-r):Math.max(0,s),u=r>0?s:a+c;return{systemTokens:a,inputTokens:l,outputTokens:c,remainingTokens:Math.max(0,i-u),usedTokens:u,contextWindow:i}}function ZBe(e){const t=[{kind:"system",tokens:e.systemTokens},{kind:"input",tokens:e.inputTokens},{kind:"output",tokens:e.outputTokens},{kind:"remaining",tokens:e.remainingTokens}],n=e.contextWindow/100;let i=0;const r=t.map(s=>{const a=i;return i+=s.tokens,{...s,start:a,end:i}});return Array.from({length:100},(s,a)=>{const l=a*n,c=l+n,u=r.flatMap(d=>{const f=Math.max(0,Math.min(c,d.end)-Math.max(l,d.start));return f>0?[{kind:d.kind,share:f/n}]:[]});return{index:a,slices:u}})}function F1(e,t){const n=e,i=n[t]??n[qBe[t]];return typeof i=="number"&&Number.isFinite(i)&&i>0?Math.round(i):0}function JBe(e){const t=F1(e,"promptTokenCount"),n=F1(e,"candidatesTokenCount"),i=F1(e,"thoughtsTokenCount");return{totalTokenCount:F1(e,"totalTokenCount")||t+n+i,promptTokenCount:t,candidatesTokenCount:n,thoughtsTokenCount:i,cachedContentTokenCount:F1(e,"cachedContentTokenCount")}}function eUe(e,t){return{totalTokenCount:e.totalTokenCount+t.totalTokenCount,promptTokenCount:e.promptTokenCount+t.promptTokenCount,candidatesTokenCount:e.candidatesTokenCount+t.candidatesTokenCount,thoughtsTokenCount:e.thoughtsTokenCount+t.thoughtsTokenCount,cachedContentTokenCount:e.cachedContentTokenCount+t.cachedContentTokenCount}}function lye(e,t){if(!t)return e;const n=typeof t.modelVersion=="string"?t.modelVersion.trim():"",i=typeof t.model_version=="string"?t.model_version.trim():"",r=n||i||e.modelName,s=t.usageMetadata??t.usage_metadata;if(!s)return r===e.modelName?e:{...e,modelName:r};const a=JBe(s);return a.totalTokenCount===0?r===e.modelName?e:{...e,modelName:r}:{modelName:r,current:a,cumulative:eUe(e.cumulative,a)}}function CW(e){return e.reduce((t,n)=>lye(t,n),Z2)}function TW(e){return e.blocks.flatMap(t=>t.kind==="tool"?[{name:t.name,args:t.args,response:t.response,done:t.done}]:[])}function tUe(e){const t=e.attributes;return String(t["invocation.id"]??t["gen_ai.invocation.id"]??t["gcp.vertex.agent.invocation_id"]??"")}function nUe(e,t){if(!t)return e;const n=new Set(e.filter(r=>tUe(r)===t).map(r=>r.trace_id)),i=e.filter(r=>n.has(r.trace_id));return i.length>0?i:e}function gb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function Vp(e){return typeof e=="string"?e:""}function cye(e,t){return e==="pending"||e==="running"||e==="completed"||e==="failed"?e:t}function iUe(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return{}}const n=gb(t)??{};return gb(n.result)??n}function rUe(e){var n;const t=(n=gb(e))==null?void 0:n.branches;return Array.isArray(t)?t.map(i=>{var r;return Vp((r=gb(i))==null?void 0:r.label)}):[]}function uye(e,t,n){const i=rUe(e),r=iUe(t),s=Array.isArray(r.branches)?r.branches:[],a=n==="running"?"running":"pending";return{branches:[0,1].map(c=>{const u=gb(s[c])??{};return{label:Vp(u.label)||i[c]||`方向 ${c+1}`,content:Vp(u.content),status:cye(u.status,a),error:Vp(u.error)}})}}function sUe(e){const t=gb(e),n=gb(t==null?void 0:t.veadkStudioToolProgress);return!n||n.toolName!=="branch_compare"||typeof n.branchIndex!="number"||n.branchIndex<0||n.branchIndex>1?null:{toolName:"branch_compare",requestId:Vp(n.requestId),branchIndex:n.branchIndex,label:Vp(n.label),delta:Vp(n.delta),status:cye(n.status,"running"),error:Vp(n.error)||void 0}}function aUe(e,t,n){return{branches:uye(e,t,"running").branches.map((s,a)=>a===n.branchIndex?{...s,label:n.label||s.label,content:s.content+n.delta,status:n.status,error:n.error??s.error}:s)}}function Va(e,t){return Zt.t(`blocks.codexProgress.${e}`,{ns:"conversation",...t})}const dye=28e4;function AW(e){try{return JSON.stringify(e).length}catch{return dye}}function oUe(e){const t=e.slice(-200);let n=t.reduce((i,r)=>i+AW(r),0);for(;t.length>1&&n>dye;)n-=AW(t.shift());return t}function Yl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function Ni(e){return typeof e=="string"?e:""}function ZF(e,t=""){const n=Ni(e).toLowerCase();return t.endsWith(".failed")||["failed","error","declined","cancelled"].includes(n)?"failed":t.endsWith(".completed")||["completed","done","success"].includes(n)?"completed":"running"}function fye(e){if(e.response!==void 0)return e.response;if(e.result!==void 0)return e.result;const t=e.aggregatedOutput??e.aggregated_output??e.output,n=e.exitCode??e.exit_code;if(!(t===void 0&&n===void 0))return{...t!==void 0?{output:t}:{},...n!==void 0?{exitCode:n}:{}}}function hye(e){if(e.args!==void 0)return e.args;if(e.arguments!==void 0)return e.arguments;if(e.input!==void 0)return e.input;const t=Ni(e.command),n=Ni(e.cwd);if(t||n)return{...t?{command:t}:{},...n?{cwd:n}:{}};if(e.changes!==void 0)return{changes:e.changes};if(e.approval!==void 0)return e.approval}function Sg(e,t,n,i,r){return{kind:"tool",name:e,callId:t,args:i,response:r,done:n!=="running",status:n,...n==="failed"?{defaultOpen:!0}:{}}}function pye(e){const t=Ni(e.id||e.itemId||e.item_id),n=Ni(e.kind);if(!t||!n)return null;const i=ZF(e.status),r=Ni(e.text||e.detail||e.delta),s=!Ni(e.text||e.detail)&&typeof e.delta=="string";if(n==="thinking"||n==="reasoning")return r?{id:t,block:{kind:"thinking",text:r,done:i!=="running"},appendText:s}:null;if(n==="commentary")return r?{id:t,block:{kind:"text",text:r},appendText:s}:null;if(["message","text","assistant_final","final"].includes(n))return r?{id:t,block:{kind:"text",text:r},appendText:s,finalAnswer:!0}:null;if(n==="plan"){const a=Array.isArray(e.plan)?e.plan:[];return{id:t,block:{kind:"plan",title:Ni(e.title)||Va("planTitle"),summary:r||void 0,items:a.flatMap(l=>{const c=Yl(l),u=Ni(c==null?void 0:c.text);if(!u)return[];const d=Ni(c==null?void 0:c.status);return[{text:u,status:["pending","in_progress","completed","failed"].includes(d)?d:"pending"}]}),done:i!=="running"}}}if(["tool","command","command_execution","commandExecution","file_change","fileChange","mcp_tool_call","mcpToolCall","collab_tool_call","web_search","approval","status"].includes(n)){const a=Va(n==="file_change"||n==="fileChange"?"fallback.fileChange":n==="approval"?"fallback.approval":n==="status"?"fallback.status":"fallback.command"),l=hye(e),c=fye(e)??(n==="status"&&r||void 0);return{id:t,block:Sg(Ni(e.name||e.title)||a,t,i,l,c)}}return null}function mye(e){const t=Ni(e.type),n=Yl(e.item),i=Ni(n==null?void 0:n.type),r=Ni((n==null?void 0:n.id)||e.id)||(t==="turn.failed"?"turn":"");if(!r)return null;const s=ZF(n==null?void 0:n.status,t);if(i==="reasoning"||i==="agent_message"){const a=Ni(n==null?void 0:n.text);return a?{id:r,block:i==="reasoning"?{kind:"thinking",text:a,done:s!=="running"}:{kind:"text",text:a},...i==="agent_message"&&(n==null?void 0:n.phase)!=="commentary"?{finalAnswer:!0}:{}}:null}if(i==="todo_list"){const l=(Array.isArray(n==null?void 0:n.items)?n.items:[]).flatMap(c=>{const u=Yl(c),d=Ni(u==null?void 0:u.text);if(!d)return[];const f=Ni(u==null?void 0:u.status).toLowerCase(),h=(u==null?void 0:u.completed)===!0||["completed","done"].includes(f)?"completed":["failed","error"].includes(f)?"failed":["in_progress","running"].includes(f)?"in_progress":"pending";return[{text:d,status:h}]});return l.length?{id:r,block:{kind:"plan",title:Va("planTitle"),summary:Va("planSummary",{completed:l.filter(c=>c.status==="completed").length,total:l.length}),items:l,done:s!=="running"}}:null}if(i==="command_execution"){const a=Va(`command.${s}`);return{id:r,block:Sg(a,r,s,hye(n??{}),fye(n??{}))}}if(i==="file_change"){const a=Array.isArray(n==null?void 0:n.changes)?n.changes:[],l=a.length?Va("projectFiles",{count:a.length}):Va("projectFile"),c=Va(`fileChange.${s}`,{subject:l});return{id:r,block:Sg(c,r,s,a.length?{changes:a}:void 0)}}if(i==="mcp_tool_call"){const a=[Ni(n==null?void 0:n.server),Ni(n==null?void 0:n.tool)].filter(Boolean).join("/")||Va("externalTool"),l=Va(`mcp.${s}`,{tool:a}),c=Yl(n==null?void 0:n.error),u=(n==null?void 0:n.result)!==void 0?n.result:Ni(c==null?void 0:c.message)||void 0;return{id:r,block:Sg(l,r,s,n==null?void 0:n.arguments,u)}}if(i==="collab_tool_call"){const a=Ni(n==null?void 0:n.tool),l=["spawn_agent","send_input","wait","close_agent"].includes(a)?a:"default",c=Va(`collaboration.${l}.${s}`),u=Object.fromEntries(["tool","receiver_thread_ids","prompt"].filter(d=>(n==null?void 0:n[d])!==void 0).map(d=>[d,n==null?void 0:n[d]]));return{id:r,block:Sg(c,r,s,Object.keys(u).length?u:void 0,n==null?void 0:n.agents_states)}}if(i==="web_search"){const a=Va(`webSearch.${s}`),l=Object.fromEntries(["query","action"].filter(c=>(n==null?void 0:n[c])!==void 0).map(c=>[c,n==null?void 0:n[c]]));return{id:r,block:Sg(a,r,s,Object.keys(l).length?l:void 0)}}if(i==="error"||t==="error"||t==="turn.failed"){const a=Yl(e.error),l=Ni((n==null?void 0:n.message)||e.message||(a==null?void 0:a.message))||Va("errorDetail");return{id:r,block:Sg(Va("errorTitle"),r,"failed",void 0,l)}}return null}function lUe(e){const t=Yl(e),n=Yl(t==null?void 0:t.veadkStudioToolProgress);if(!n||n.kind!=="codex")return null;const i=Ni(n.toolName),r=Ni(n.requestId);if(!i||!r)return null;const s=Yl(n.event??n.activity);if(!s)return null;const a=Yl(s.item)||Ni(s.type)?mye(s):pye(s);if(!a)return null;const l=Ni(n.title||n.label),c=Ni(s.agentSessionId??s.agent_session_id),u=Ni(s.sandboxSessionId??s.sandbox_session_id),d=Ni(s.threadId??s.thread_id),f=ZF(s.status,Ni(s.type)),p=Ni(s.kind)==="status"&&f!=="running"?f:void 0;return{toolName:i,requestId:r,...l?{title:l}:{},...c?{agentSessionId:c}:{},...u?{sandboxSessionId:u}:{},...d?{threadId:d}:{},...p?{terminalStatus:p}:{},event:a}}function cUe(e,t){const n=Yl(t),i=Yl((n==null?void 0:n.codexActivity)??(n==null?void 0:n.codex_activity));if(!i)return e;const r=Ni(i.title)||(e==null?void 0:e.title)||"Codex Sandbox",s=Ni(i.agentSessionId??i.agent_session_id)||(e==null?void 0:e.agentSessionId),a=Ni(i.sandboxSessionId??i.sandbox_session_id)||(e==null?void 0:e.sandboxSessionId),l=Ni(i.threadId??i.thread_id)||(e==null?void 0:e.threadId);let c={title:r,...s?{agentSessionId:s}:{},...a?{sandboxSessionId:a}:{},...l?{threadId:l}:{},items:(e==null?void 0:e.items.slice())??[]};const u=Array.isArray(i.events)?i.events:[];for(const d of u){const f=Yl(d);if(!f)continue;const h=Yl(f.item)||Ni(f.type)?mye(f):pye(f);h&&(h.finalAnswer||(c=k4(c,{title:r,...s?{agentSessionId:s}:{},...a?{sandboxSessionId:a}:{},...l?{threadId:l}:{},event:h})))}return c}function k4(e,t){const n=(e==null?void 0:e.items.slice())??[],i=n.findIndex(r=>r.id===t.event.id);if(i>=0){const r=n[i].block,s=t.event.block;t.event.appendText&&r.kind==="text"&&s.kind==="text"?n[i]={id:t.event.id,block:{...s,text:r.text+s.text}}:t.event.appendText&&r.kind==="thinking"&&s.kind==="thinking"?n[i]={id:t.event.id,block:{...s,text:r.text+s.text}}:n[i]={id:t.event.id,block:s}}else n.push({id:t.event.id,block:t.event.block});return{title:t.title||(e==null?void 0:e.title)||"Codex Sandbox",...t.agentSessionId||e!=null&&e.agentSessionId?{agentSessionId:t.agentSessionId||(e==null?void 0:e.agentSessionId)}:{},...t.sandboxSessionId||e!=null&&e.sandboxSessionId?{sandboxSessionId:t.sandboxSessionId||(e==null?void 0:e.sandboxSessionId)}:{},...t.threadId||e!=null&&e.threadId?{threadId:t.threadId||(e==null?void 0:e.threadId)}:{},items:oUe(n)}}const uUe="send_a2ui_json_to_client",dUe="validated_a2ui_json",E4="adk_request_credential",_W="transfer_to_agent";function fUe(e){var i,r,s,a;const t=e,n=((i=t==null?void 0:t.exchangedAuthCredential)==null?void 0:i.oauth2)??((r=t==null?void 0:t.exchanged_auth_credential)==null?void 0:r.oauth2)??((s=t==null?void 0:t.rawAuthCredential)==null?void 0:s.oauth2)??((a=t==null?void 0:t.raw_auth_credential)==null?void 0:a.oauth2);return(n==null?void 0:n.authUri)??(n==null?void 0:n.auth_uri)}function th(){return{blocks:[],liveStart:0,pendingCodexProgress:[]}}function NW(e,t){if(t.event.finalAnswer)return"applied";let n=-1;for(let i=e.length-1;i>=0;i-=1){const r=e[i];if(!(r.kind!=="tool"||r.name!==t.toolName)){if(r.callId===t.requestId)return r.done?"completed":(r.codexActivity=k4(r.codexActivity,t),r.status=t.terminalStatus??"running",t.terminalStatus&&(r.done=!0),"applied");if(!r.done){if(n>=0)return"unmatched";n=i}}}if(n>=0){const i=e[n];return i.kind!=="tool"?"unmatched":(i.codexActivity=k4(i.codexActivity,t),i.status=t.terminalStatus??"running",t.terminalStatus&&(i.done=!0),"applied")}return"unmatched"}function hUe(e){if(!e||typeof e!="object"||Array.isArray(e))return"completed";const t=e,n=typeof t.status=="string"?t.status.toLowerCase():"";return t.ok===!1||["error","failed","denied","declined","cancelled","timeout"].includes(n)?"failed":"completed"}function jW(e){if(!e||typeof e!="object"||Array.isArray(e))return"";const t=e;return t.ok!==!0||typeof t.message!="string"?"":t.message.trim()}const RW=e=>e.functionCall??e.function_call,C4=e=>e.functionResponse??e.function_response;function pUe(e){if(!e||typeof e!="object")return"";const t=e,n=t.agentName??t.agent_name;return typeof n=="string"?n:""}function mUe(e){return e.replace(/-/g,"+").replace(/_/g,"/")}function gye(e){const t=[];for(const[n,i]of e.entries()){const r=i.partMetadata??i.part_metadata,s=r==null?void 0:r.veadkTransport;if((s==null?void 0:s.hidden)===!0)continue;const a=r==null?void 0:r.veadkMedia;if(typeof(a==null?void 0:a.uri)=="string"){t.push({id:String(a.id??a.uri),mimeType:typeof a.mimeType=="string"?a.mimeType:void 0,uri:a.uri,name:typeof a.name=="string"?a.name:void 0,sizeBytes:typeof a.sizeBytes=="number"?a.sizeBytes:void 0});continue}const l=i.inlineData??i.inline_data;if(l&&l.data){t.push({id:`inline-${n}-${l.displayName??l.display_name??"media"}`,mimeType:l.mimeType??l.mime_type,data:mUe(l.data),name:l.displayName??l.display_name});continue}const c=i.fileData??i.file_data,u=(c==null?void 0:c.fileUri)??(c==null?void 0:c.file_uri);c&&u&&t.push({id:u,mimeType:c.mimeType??c.mime_type,uri:u,name:c.displayName??c.display_name})}return t}function T4(e){const t=e.partMetadata??e.part_metadata,n=t==null?void 0:t.veadkTransport;return(n==null?void 0:n.hideText)===!0?void 0:e.text}const gUe=new Set(["llm","sequential","parallel","loop","a2a"]);function bUe(e){var t;for(const n of e){const i=(t=n.partMetadata??n.part_metadata)==null?void 0:t.veadkInvocation;if(!i||typeof i!="object")continue;const r=i,s=Array.isArray(r.skills)?r.skills.flatMap(c=>{if(!c||typeof c!="object")return[];const u=c;return typeof u.name=="string"?[{name:u.name,description:typeof u.description=="string"?u.description:""}]:[]}):[];let a;const l=r.targetAgent;if(l&&typeof l=="object"){const c=l,u=c.type;typeof c.name=="string"&&typeof u=="string"&&gUe.has(u)&&Array.isArray(c.path)&&(a={name:c.name,description:typeof c.description=="string"?c.description:"",type:u,path:c.path.filter(d=>typeof d=="string")})}if(s.length>0||a)return{skills:s,targetAgent:a}}}function yUe(e,t){if(!t.length)return;const n=e[e.length-1];(n==null?void 0:n.kind)==="attachment"?n.files.push(...t):e.push({kind:"attachment",files:t})}function vUe(e,t){if(!t.length)return;const n=e[e.length-1];if((n==null?void 0:n.kind)==="artifact"){for(const i of t)n.files.some(r=>r.filename===i.filename&&r.version===i.version)||n.files.push(i);return}e.push({kind:"artifact",files:t})}function _D(e,t,n){const i=e[e.length-1];i&&i.kind===t?i.text+=n:e.push(t==="thinking"?{kind:t,text:n,done:!1}:{kind:t,text:n})}function YC(e){for(const t of e)t.kind==="thinking"&&(t.done=!0)}function R_(e,t){var d,f,h,p,g,b;const n=e.blocks.map(v=>({...v}));let i=e.liveStart,r=e.pendingCodexProgress.slice();const s=((d=t.content)==null?void 0:d.parts)??[],a=s.flatMap(v=>{const y=sUe(v.partMetadata??v.part_metadata);return y?[y]:[]}),l=s.flatMap(v=>{const y=lUe(v.partMetadata??v.part_metadata);return y?[y]:[]});if(a.length>0||l.length>0){for(const v of a)for(let y=n.length-1;y>=0;y-=1){const x=n[y];if(!(x.kind!=="tool"||x.done||x.name!==v.toolName||v.requestId&&x.callId&&x.callId!==v.requestId)){x.response=aUe(x.args,x.response,v),x.status="running";break}}for(const v of l)NW(n,v)==="unmatched"&&(r=[...r,v].slice(-64));return{blocks:n,liveStart:i,pendingCodexProgress:r}}const c=s.some(v=>RW(v)||C4(v));if(t.partial&&!c){for(const v of s){const y=T4(v);typeof y=="string"&&y&&_D(n,v.thought?"thinking":"text",y)}return{blocks:n,liveStart:i,pendingCodexProgress:r}}n.length=i;for(const v of s){const y=RW(v),x=C4(v),w=gye([v]),O=T4(v);if(typeof O=="string"&&O)_D(n,v.thought?"thinking":"text",O);else if(w.length)YC(n),yUe(n,w);else if(y)if(YC(n),y.name===_W){const k=pUe(y.args)||((f=t.actions)==null?void 0:f.transferToAgent)||((h=t.actions)==null?void 0:h.transfer_to_agent)||Zt.t("app:common.unknownAgent");n.push({kind:"agent-transfer",agentName:k,done:!1})}else if(y.name===E4){const k=y.args??{},S=k.authConfig??k.auth_config??k,C=String(k.functionCallId??k.function_call_id??"").replace(/^_adk_toolset_auth_/,"")||void 0;n.push({kind:"auth",callId:y.id??"",label:C,authUri:fUe(S),authConfig:S,done:!1})}else{const k={kind:"tool",name:y.name??"",callId:y.id,args:y.args,done:!1};if(n.push(k),k.callId){const S=[];for(const E of r)E.toolName===k.name&&E.requestId===k.callId?NW(n,E):S.push(E);r=S}}else if(x){if(YC(n),x.name===_W)for(let k=n.length-1;k>=0;k--){const S=n[k];if(S.kind==="agent-transfer"&&!S.done){S.done=!0;break}}if(x.name===E4)for(let k=n.length-1;k>=0;k--){const S=n[k];if(S.kind==="auth"&&!S.done){S.done=!0;break}}for(let k=n.length-1;k>=0;k--){const S=n[k],E=S.kind==="tool"&&S.name==="delegate_to_codex_sandbox";if(S.kind==="tool"&&(!S.done||E)&&S.name===x.name&&(!x.id||!S.callId||S.callId===x.id)){const C=E?jW(S.response):"";if(S.done=!0,S.response=x.response,E){S.codexActivity=cUe(S.codexActivity,x.response),S.status=hUe(x.response);const N=jW(x.response);N&&N!==C&&_D(n,"text",N)}break}}if(x.name===uUe){const k=((p=x.response)==null?void 0:p[dUe])??[];if(k.length){const S=n[n.length-1];S&&S.kind==="a2ui"?S.messages.push(...k):n.push({kind:"a2ui",messages:k})}}}}const u=((g=t.actions)==null?void 0:g.artifactDelta)??((b=t.actions)==null?void 0:b.artifact_delta);return u&&vUe(n,Object.entries(u).map(([v,y])=>({filename:v,version:y}))),YC(n),i=n.length,{blocks:n,liveStart:i,pendingCodexProgress:r}}function xUe(e,t={}){var r,s;const n=[];let i=th();for(const a of e)if(a.author==="user"){const c=((r=a.content)==null?void 0:r.parts)??[];if(c.some(p=>{var g;return((g=C4(p))==null?void 0:g.name)===E4})){for(let p=n.length-1;p>=0;p--)if(n[p].role==="assistant"){for(let g=n[p].blocks.length-1;g>=0;g--){const b=n[p].blocks[g];if(b.kind==="auth"){b.done=!0;break}}break}}const u=c.map(T4).filter(p=>!!p).join(""),d=gye(c),f=bUe(c);if(!u&&!d.length&&!f){i=th();continue}const h=[];f&&h.push({kind:"invocation",value:f}),d.length&&h.push({kind:"attachment",files:d}),u&&h.push({kind:"text",text:u}),n.push({role:"user",blocks:h,meta:{ts:a.timestamp}}),i=th()}else{const c=a.author??"";let u=n[n.length-1];(!u||u.role!=="assistant"||c&&((s=u.meta)==null?void 0:s.author)!==c)&&(u={role:"assistant",blocks:[],meta:{author:c||void 0}},n.push(u),i=th()),i=R_(i,a),u.blocks=i.blocks;const d=a.usageMetadata??a.usage_metadata,f=u.meta??(u.meta={});c&&(f.author=c),d!=null&&d.totalTokenCount&&(f.tokens=d.totalTokenCount),a.timestamp&&(f.ts=a.timestamp),a.id&&(f.eventId=a.id);const h=a.invocationId??a.invocation_id;h&&(f.invocationId=h)}for(const a of n){const l=a.meta,c=l==null?void 0:l.eventId;if(!c)continue;const u=t[`veadk_feedback:${c}`];if(!u||typeof u!="object")continue;const d=u;d.rating!=="good"&&d.rating!=="bad"||(l.feedback=u)}return n}function nR(e,t=Zt.t("app:titles.newConversation")){var n,i;for(const r of e??[])if(r.author==="user"||((n=r.content)==null?void 0:n.role)==="user"){const s=(((i=r.content)==null?void 0:i.parts)??[]).map(a=>a.text).find(Boolean);if(s)return s}return t}function bye(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t{const t=m.Children.toArray(e),n=[];let i="";const r=()=>{i!==""&&(n.push(i),i="")};for(const s of t)if(!(s==null||typeof s=="boolean")){if(typeof s=="string"||typeof s=="number"){i+=String(s);continue}r(),n.push(s)}return r(),n},JF=e=>{const t=OUe(e),n=m.Children.count(t);return m.Children.map(t,i=>{if(typeof i=="string"&&i.trim())return n<=1?i:o.jsx("span",{children:i});if(m.isValidElement(i)){const r=i,{children:s,...a}=r.props;return s!=null?m.cloneElement(r,a,JF(s)):r}return i})},wUe="_Badge_1viyg_1",SUe={Badge:wUe},ga=({children:e,className:t,variant:n="soft",color:i="secondary",size:r="sm",pill:s,...a})=>o.jsx("div",{className:bi(SUe.Badge,t),"data-color":i,"data-size":r,"data-pill":s?"":void 0,"data-variant":n,...a,children:JF(e)});var kUe=typeof $p=="object"&&$p&&$p.Object===Object&&$p,EUe=typeof self=="object"&&self&&self.Object===Object&&self;kUe||EUe||Function("return this")();var CUe=typeof window<"u"?m.useLayoutEffect:m.useEffect;function TUe(){const e=m.useRef(!1);return m.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),m.useCallback(()=>e.current,[])}var IW={width:void 0,height:void 0};function yye(e){const{ref:t,box:n="content-box"}=e,[{width:i,height:r},s]=m.useState(IW),a=TUe(),l=m.useRef({...IW}),c=m.useRef(void 0);return c.current=e.onResize,m.useEffect(()=>{if(!t.current||typeof window>"u"||!("ResizeObserver"in window))return;const u=new ResizeObserver(([d])=>{const f=n==="border-box"?"borderBoxSize":n==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",h=PW(d,f,"inlineSize"),p=PW(d,f,"blockSize");if(l.current.width!==h||l.current.height!==p){const b={width:h,height:p};l.current.width=h,l.current.height=p,c.current?c.current(b):a()&&s(b)}});return u.observe(t.current,{box:n}),()=>{u.disconnect()}},[n,t,a]),{width:i,height:r}}function PW(e,t,n){return e[t]?Array.isArray(e[t])?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function e7(e,t){const n=m.useRef(e);CUe(()=>{n.current=e},[e]),m.useEffect(()=>{if(!t&&t!==0)return;const i=setTimeout(()=>{n.current()},t);return()=>{clearTimeout(i)}},[t])}const AUe={DEV:!1,MODE:"production"},Xy=typeof import.meta<"u"?AUe:void 0,_Ue=!!(Xy!=null&&Xy.DEV),NUe=typeof navigator<"u"&&/(jsdom|happy-dom)/i.test(navigator.userAgent)||typeof globalThis.happyDOM=="object",vye=(Xy==null?void 0:Xy.MODE)==="test"||NUe,jUe=typeof window<"u",xye=typeof document<"u",RUe=jUe&&xye,t7=e=>{const t=e.currentTarget;if(!(t instanceof HTMLElement))return;const n=t.offsetWidth;let i=.985;n<=80?i=.96:n<=150?i=.97:n<=220?i=.98:n>600&&(i=.995),t.style.setProperty("--scale",i.toString())},I_=(e,t)=>{const n=()=>{const a=setTimeout(e);return()=>{clearTimeout(a)}};if(!RUe||typeof window.requestAnimationFrame!="function"||xye&&document.visibilityState==="hidden")return n();let r=2,s=window.requestAnimationFrame(function a(){r-=1,r===0?e():s=window.requestAnimationFrame(a)});return()=>{typeof window.cancelAnimationFrame=="function"&&window.cancelAnimationFrame(s)}},qb=e=>Object.keys(e).reduce((n,i)=>{const r=e[i];if(r||r===0){const s=i.startsWith("--")?"":"--",a=typeof r=="number"?`${r}px`:r;n[`${s}${i}`]=a}return n},{}),ND=e=>typeof e=="number"?`${e}deg`:e,jD=e=>String(e),ZC=e=>`${e}ms`,RD=({x:e,y:t,scale:n,rotate:i,skewX:r,skewY:s}={})=>{const a=[e==null?null:`translateX(${e}px)`,t==null?null:`translateY(${t}px)`,n==null?null:`scale(${n})`,i==null?null:`rotate(${ND(i)})`,r==null?null:`skewX(${ND(r)})`,s==null?null:`skewY(${ND(s)})`].filter(Boolean);return a.length?a.join(" "):"none"},ID=({blur:e}={})=>{const t=[e==null?null:`blur(${e}px)`].filter(Boolean);return t.length?t.join(" "):"none"},uh=e=>{e.preventDefault()},Oye=e=>e.querySelectorAll('a[href], input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex^="-"]), [contenteditable]'),IUe="_LoadingIndicator_7yl6f_1",PUe={LoadingIndicator:IUe},zk=({className:e,size:t,strokeWidth:n,style:i,...r})=>o.jsx("div",{...r,className:bi(PUe.LoadingIndicator,e),style:i||qb({"indicator-size":t,"indicator-stroke":n})});var DUe=Object.defineProperty,n7=(e,t)=>DUe(e,"name",{value:t,configurable:!0});function A4(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}n7(A4,"setRef");function wye(...e){return t=>{let n=!1;const i=e.map(r=>{const s=A4(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;rMUe(e,"name",{value:t,configurable:!0});function _h(e){const t=m.forwardRef((n,i)=>{let{children:r,...s}=n,a=null,l=!1;const c=[];_4(r)&&typeof JC=="function"&&(r=JC(r._payload)),m.Children.forEach(r,h=>{var p;if(Aye(h)){l=!0;const g=h;let b="child"in g.props?g.props.child:g.props.children;_4(b)&&typeof JC=="function"&&(b=JC(b._payload)),a=LUe(g,b),c.push((p=a==null?void 0:a.props)==null?void 0:p.children)}else c.push(h)}),a?a=m.cloneElement(a,void 0,c):!l&&m.Children.count(r)===1&&m.isValidElement(r)&&(a=r);const u=a?Tye(a):void 0,d=rr(i,u);if(!a){if(r||r===0)throw new Error(l?BUe(e):FUe(e));return r}const f=Cye(s,a.props??{});return a.type!==m.Fragment&&(f.ref=i?d:u),m.cloneElement(a,f)});return t.displayName=`${e}.Slot`,t}Wu(_h,"createSlot");var Sye=_h("Slot"),kye=Symbol.for("radix.slottable");function Eye(e){const t=Wu(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=kye,t}Wu(Eye,"createSlottable");var LUe=Wu((e,t)=>{if("child"in e.props){const n=e.props.child;return m.isValidElement(n)?m.cloneElement(n,void 0,e.props.children(n.props.children)):null}return m.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function Cye(e,t){const n={...t};for(const i in t){const r=e[i],s=t[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...l)=>{const c=s(...l);return r(...l),c}:r&&(n[i]=r):i==="style"?n[i]={...r,...s}:i==="className"&&(n[i]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}Wu(Cye,"mergeProps");function Tye(e){var i,r;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Wu(Tye,"getElementRef");function Aye(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kye}Wu(Aye,"isSlottable");var $Ue=Symbol.for("react.lazy");function _4(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$Ue&&"_payload"in e&&_ye(e._payload)}Wu(_4,"isLazyComponent");function _ye(e){return typeof e=="object"&&e!==null&&"then"in e}Wu(_ye,"isPromiseLike");var FUe=Wu(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),BUe=Wu(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),JC=$b[" use ".trim().toString()],UUe=Object.defineProperty,QUe=(e,t)=>UUe(e,"name",{value:t,configurable:!0}),zUe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Or=zUe.reduce((e,t)=>{const n=_h(`Primitive.${t}`),i=m.forwardRef((r,s)=>{const{asChild:a,...l}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:s})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function i7(e,t){e&&Fi.flushSync(()=>e.dispatchEvent(t))}QUe(i7,"dispatchDiscreteCustomEvent");var VUe=Object.defineProperty,HUe=(e,t)=>VUe(e,"name",{value:t,configurable:!0}),qUe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),WUe=m.forwardRef(HUe(function(t,n){return o.jsx(Or.span,{...t,ref:n,style:{...qUe,...t.style}})},"VisuallyHidden")),KUe=WUe,GUe=Object.defineProperty,Qc=(e,t)=>GUe(e,"name",{value:t,configurable:!0});function XUe(e,t){const n=m.createContext(t);n.displayName=e+"Context";const i=Qc(s=>{const{children:a,...l}=s,c=m.useMemo(()=>l,Object.values(l));return o.jsx(n.Provider,{value:c,children:a})},"Provider");i.displayName=e+"Provider";function r(s,a={}){const{optional:l=!1}=a,c=m.useContext(n);if(c)return c;if(t!==void 0)return t;if(!l)throw new Error(`\`${s}\` must be used within \`${e}\``)}return Qc(r,"useContext"),[i,r]}Qc(XUe,"createContext");function Sl(e,t=[]){let n=[];function i(s,a){const l=m.createContext(a);l.displayName=s+"Context";const c=n.length;n=[...n,a];const u=Qc(f=>{var y;const{scope:h,children:p,...g}=f,b=((y=h==null?void 0:h[e])==null?void 0:y[c])||l,v=m.useMemo(()=>g,Object.values(g));return o.jsx(b.Provider,{value:v,children:p})},"Provider");u.displayName=s+"Provider";function d(f,h,p={}){var y;const{optional:g=!1}=p,b=((y=h==null?void 0:h[e])==null?void 0:y[c])||l,v=m.useContext(b);if(v)return v;if(a!==void 0)return a;if(!g)throw new Error(`\`${f}\` must be used within \`${s}\``)}return Qc(d,"useContext"),[u,d]}Qc(i,"createContext");const r=Qc(()=>{const s=n.map(a=>m.createContext(a));return Qc(function(l){const c=(l==null?void 0:l[e])||s;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])},"useScope")},"createScope");return r.scopeName=e,[i,Nye(r,...t)]}Qc(Sl,"createContextScope");function Nye(...e){const t=e[0];if(e.length===1)return t;const n=Qc(()=>{const i=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return Qc(function(s){const a=i.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Qc(Nye,"composeContextScopes");var YUe=Object.defineProperty,Ta=(e,t)=>YUe(e,"name",{value:t,configurable:!0});function r7(e){const t=e+"CollectionProvider",[n,i]=Sl(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=Ta(b=>{const{scope:v,children:y}=b,x=m.useRef(null),w=m.useRef(new Map).current;return o.jsx(r,{scope:v,itemMap:w,collectionRef:x,children:y})},"CollectionProvider");a.displayName=t;const l=e+"CollectionSlot",c=_h(l),u=m.forwardRef((b,v)=>{const{scope:y,children:x}=b,w=s(l,y),O=rr(v,w.collectionRef);return o.jsx(c,{ref:O,children:x})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=_h(d),p=m.forwardRef((b,v)=>{const{scope:y,children:x,...w}=b,O=m.useRef(null),k=rr(v,O),S=s(d,y);return m.useEffect(()=>(S.itemMap.set(O,{ref:O,...w}),()=>void S.itemMap.delete(O))),o.jsx(h,{[f]:"",ref:k,children:x})});p.displayName=d;function g(b){const v=s(e+"CollectionConsumer",b);return m.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((S,E)=>w.indexOf(S.ref.current)-w.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return Ta(g,"useCollection"),[{Provider:a,Slot:u,ItemSlot:p},g,i]}Ta(r7,"createCollection");var DW=new WeakMap,Ys,Hl,PD=(Hl=class extends Map{constructor(n){super(n);oV(this,Ys);EP(this,Ys,[...super.keys()]),DW.set(this,!0)}set(n,i){return DW.get(this)&&(this.has(n)?co(this,Ys)[co(this,Ys).indexOf(n)]=n:co(this,Ys).push(n)),super.set(n,i),this}insert(n,i,r){const s=this.has(i),a=co(this,Ys).length,l=s7(n);let c=l>=0?l:a+l;const u=c<0||c>=a?-1:c;if(u===this.size||s&&u===this.size-1||u===-1)return this.set(i,r),this;const d=this.size+(s?0:1);l<0&&c++;const f=[...co(this,Ys)];let h,p=!1;for(let g=c;g=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,i){const r=this.indexOf(n);if(r===-1)return;let s=r+i;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return s;r++}}findIndex(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return r;r++}return-1}filter(n,i){const r=[];let s=0;for(const a of this)Reflect.apply(n,i,[a,s,this])&&r.push(a),s++;return new Hl(r)}map(n,i){const r=[];let s=0;for(const a of this)r.push([a[0],Reflect.apply(n,i,[a,s,this])]),s++;return new Hl(r)}reduce(...n){const[i,r]=n;let s=0,a=r??this.at(0);for(const l of this)s===0&&n.length===1?a=l:a=Reflect.apply(i,this,[a,l,s,this]),s++;return a}reduceRight(...n){const[i,r]=n;let s=r??this.at(-1);for(let a=this.size-1;a>=0;a--){const l=this.at(a);a===this.size-1&&n.length===1?s=l:s=Reflect.apply(i,this,[s,l,a,this])}return s}toSorted(n){const i=[...this.entries()].sort(n);return new Hl(i)}toReversed(){const n=new Hl;for(let i=this.size-1;i>=0;i--){const r=this.keyAt(i),s=this.get(r);n.set(r,s)}return n}toSpliced(...n){const i=[...this.entries()];return i.splice(...n),new Hl(i)}slice(n,i){const r=new Hl;let s=this.size-1;if(n===void 0)return r;n<0&&(n=n+this.size),i!==void 0&&i>0&&(s=i-1);for(let a=n;a<=s;a++){const l=this.keyAt(a),c=this.get(l);r.set(l,c)}return r}every(n,i){let r=0;for(const s of this){if(!Reflect.apply(n,i,[s,r,this]))return!1;r++}return!0}some(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return!0;r++}return!1}},Ys=new WeakMap,Ta(Hl,"OrderedDict"),Hl);function J2(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=jye(e,t);return n===-1?void 0:e[n]}Ta(J2,"at");function jye(e,t){const n=e.length,i=s7(t),r=i>=0?i:n+i;return r<0||r>=n?-1:r}Ta(jye,"toSafeIndex");function s7(e){return e!==e||e===0?0:Math.trunc(e)}Ta(s7,"toSafeInteger");function ZUe(e){const t=e+"CollectionProvider",[n,i]=Sl(t),[r,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new PD,setItemMap:Ta(()=>{},"setItemMap")}),a=Ta(({state:w,...O})=>w?o.jsx(c,{...O,state:w}):o.jsx(l,{...O}),"CollectionProvider");a.displayName=t;const l=Ta(w=>{const O=v();return o.jsx(c,{...w,state:O})},"CollectionInit");l.displayName=t+"Init";const c=Ta(w=>{const{scope:O,children:k,state:S}=w,E=m.useRef(null),[C,N]=m.useState(null),_=rr(E,N),[j,T]=S;return m.useEffect(()=>{if(!C)return;const L=Pye(()=>{});return L.observe(C,{childList:!0,subtree:!0}),()=>{L.disconnect()}},[C]),o.jsx(r,{scope:O,itemMap:j,setItemMap:T,collectionRef:_,collectionRefObject:E,collectionElement:C,children:k})},"CollectionProviderImpl");c.displayName=t+"Impl";const u=e+"CollectionSlot",d=_h(u),f=m.forwardRef((w,O)=>{const{scope:k,children:S}=w,E=s(u,k),C=rr(O,E.collectionRef);return o.jsx(d,{ref:C,children:S})});f.displayName=u;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=_h(h),b=m.forwardRef((w,O)=>{const{scope:k,children:S,...E}=w,C=m.useRef(null),[N,_]=m.useState(null),j=rr(O,C,_),T=s(h,k),{setItemMap:L}=T,A=m.useRef(E);Rye(A.current,E)||(A.current=E);const R=A.current;return m.useEffect(()=>{const P=R;return L($=>N?$.has(N)?$.set(N,{...P,element:N}).toSorted(N4):($.set(N,{...P,element:N}),$.toSorted(N4)):$),()=>{L($=>!N||!$.has(N)?$:($.delete(N),new PD($)))}},[N,R,L]),o.jsx(g,{[p]:"",ref:j,children:S})});b.displayName=h;function v(){return m.useState(new PD)}Ta(v,"useInitCollection");function y(w){const{itemMap:O}=s(e+"CollectionConsumer",w);return O}return Ta(y,"useCollection"),[{Provider:a,Slot:f,ItemSlot:b},{createCollectionScope:i,useCollection:y,useInitCollection:v}]}Ta(ZUe,"createCollection");function Rye(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Ta(Rye,"shallowEqual");function Iye(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ta(Iye,"isElementPreceding");function N4(e,t){return!e[1].element||!t[1].element?0:Iye(e[1].element,t[1].element)?-1:1}Ta(N4,"sortByDocumentPosition");function Pye(e){return new MutationObserver(n=>{for(const i of n)if(i.type==="childList"){e();return}})}Ta(Pye,"getChildListObserver");var JUe=Object.defineProperty,Nx=(e,t)=>JUe(e,"name",{value:t,configurable:!0}),Dye=!!(typeof window<"u"&&window.document&&window.document.createElement);function yn(e,t,{checkForDefaultPrevented:n=!0}={}){return Nx(function(r){if(e==null||e(r),n===!1||!r||!r.defaultPrevented)return t==null?void 0:t(r)},"handleEvent")}Nx(yn,"composeEventHandlers");function eQe(e){var t;if(!Dye)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}Nx(eQe,"getOwnerWindow");function j4(e){if(!Dye)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Nx(j4,"getOwnerDocument");function Mye(e,t=!1){const{activeElement:n}=j4(e);if(!(n!=null&&n.nodeName))return null;if(Lye(n)&&n.contentDocument)return Mye(n.contentDocument.body,t);if(t){const i=n.getAttribute("aria-activedescendant");if(i){const r=j4(n).getElementById(i);if(r)return r}}return n}Nx(Mye,"getActiveElement");function Lye(e){return e.tagName==="IFRAME"}Nx(Lye,"isFrame");var Jc=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},tQe=Object.defineProperty,nQe=(e,t)=>tQe(e,"name",{value:t,configurable:!0}),MW=$b[" useEffectEvent ".trim().toString()],LW=$b[" useInsertionEffect ".trim().toString()];function $ye(e){if(typeof MW=="function")return MW(e);const t=m.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof LW=="function"?LW(()=>{t.current=e}):Jc(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}nQe($ye,"useEffectEvent");var iQe=Object.defineProperty,Vk=(e,t)=>iQe(e,"name",{value:t,configurable:!0}),rQe=$b[" useInsertionEffect ".trim().toString()]||Jc;function su({prop:e,defaultProp:t,onChange:n=Vk(()=>{},"onChange"),caller:i}){const[r,s,a]=Fye({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:r,u=m.useCallback(d=>{var f;if(l){const h=Bye(d)?d(e):d;h!==e&&((f=a.current)==null||f.call(a,h))}else s(d)},[l,e,s,a]);return[c,u]}Vk(su,"useControllableState");function Fye({defaultProp:e,onChange:t}){const[n,i]=m.useState(e),r=m.useRef(n),s=m.useRef(t);return rQe(()=>{s.current=t},[t]),m.useEffect(()=>{var a;r.current!==n&&((a=s.current)==null||a.call(s,n),r.current=n)},[n,r]),[n,i,s]}Vk(Fye,"useUncontrolledState");function Bye(e){return typeof e=="function"}Vk(Bye,"isFunction");var $W=Symbol("RADIX:SYNC_STATE");function sQe(e,t,n,i){const{prop:r,defaultProp:s,onChange:a,caller:l}=t,c=r!==void 0,u=$ye(a),d=[{...n,state:s}];i&&d.push(i);const[f,h]=m.useReducer((v,y)=>{if(y.type===$W)return{...v,state:y.state};const x=e(v,y);return c&&!Object.is(x.state,v.state)&&u(x.state),x},...d),p=f.state,g=m.useRef(p);m.useEffect(()=>{g.current!==p&&(g.current=p,c||u(p))},[p,g,c]);const b=m.useMemo(()=>r!==void 0?{...f,state:r}:f,[f,r]);return m.useEffect(()=>{c&&!Object.is(r,f.state)&&h({type:$W,state:r})},[r,f.state,c]),[b,h]}Vk(sQe,"useControllableStateReducer");var aQe=Object.defineProperty,Nh=(e,t)=>aQe(e,"name",{value:t,configurable:!0});function Uye(e,t){return m.useReducer((n,i)=>t[n][i]??n,e)}Nh(Uye,"useStateMachine");var Zd=Nh(e=>{const{present:t,children:n}=e,i=Qye(t),r=typeof n=="function"?n({present:i.isPresent}):m.Children.only(n),s=zye(i.ref,Vye(r));return typeof n=="function"||i.isPresent?m.cloneElement(r,{ref:s}):null},"Presence");function Qye(e){const[t,n]=m.useState(),i=m.useRef(null),r=m.useRef(e),s=m.useRef("none"),a=m.useRef(void 0),l=e?"mounted":"unmounted",[c,u]=Uye(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{c==="mounted"?(s.current=a.current??ey(i.current),a.current=void 0):s.current="none"},[c]),Jc(()=>{const d=i.current,f=r.current;if(f!==e){const p=s.current,g=ey(d);e?(a.current=g,u("MOUNT")):g==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&p!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Jc(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=Nh(g=>{const v=ey(i.current).includes(CSS.escape(g.animationName));if(g.target===t&&v&&(u("ANIMATION_END"),!r.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},"handleAnimationEnd"),p=Nh(g=>{g.target===t&&(s.current=ey(i.current))},"handleAnimationStart");return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:m.useCallback(d=>{if(d){const f=getComputedStyle(d);i.current=f,a.current=ey(f)}else i.current=null;n(d)},[])}}Nh(Qye,"usePresence");function R4(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Nh(R4,"setRef");function zye(...e){const t=m.useRef(e);return t.current=e,m.useCallback(n=>{const i=t.current;let r=!1;const s=i.map(a=>{const l=R4(a,n);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let a=0;aoQe(e,"name",{value:t,configurable:!0}),cQe=$b[" useId ".trim().toString()]||(()=>{}),uQe=0;function xm(e){const[t,n]=m.useState(cQe());return Jc(()=>{e||n(i=>i??String(uQe++))},[e]),e||(t?`radix-${t}`:"")}lQe(xm,"useId");var dQe=Object.defineProperty,fQe=(e,t)=>dQe(e,"name",{value:t,configurable:!0}),hQe=m.createContext(void 0);function Hk(e){const t=m.useContext(hQe);return e||t||"ltr"}fQe(Hk,"useDirection");var pQe=Object.defineProperty,mQe=(e,t)=>pQe(e,"name",{value:t,configurable:!0});function Fu(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}mQe(Fu,"useCallbackRef");var gQe=Object.defineProperty,Ea=(e,t)=>gQe(e,"name",{value:t,configurable:!0}),I4="dismissableLayer.update",bQe="dismissableLayer.pointerDownOutside",yQe="dismissableLayer.focusOutside",FW,Hye=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),a7=m.forwardRef(Ea(function(t,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:c,onDismiss:u,...d}=t,f=m.useContext(Hye),[h,p]=m.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=m.useState({}),v=rr(n,p),y=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=x?y.indexOf(x):-1,O=h?y.indexOf(h):-1,k=f.layersWithOutsidePointerEventsDisabled.size>0,S=O>=w,E=m.useRef(!1),C=qye(T=>{a==null||a(T),c==null||c(T),T.defaultPrevented||u==null||u()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(T=>{if(!(T instanceof Node))return!1;const L=[...f.branches].some(A=>A.contains(T));return S&&!L},[f.branches,S])}),N=Wye(T=>{if(r&&E.current)return;const L=T.target;[...f.branches].some(R=>R.contains(L))||(l==null||l(T),c==null||c(T),T.defaultPrevented||u==null||u())},g),_=h?O===y.length-1:!1,j=Fu(T=>{T.key==="Escape"&&(s==null||s(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))});return m.useEffect(()=>{if(_)return g.addEventListener("keydown",j,{capture:!0}),()=>g.removeEventListener("keydown",j,{capture:!0})},[g,_,j]),m.useEffect(()=>{if(h)return i&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(FW=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),P4(),()=>{i&&(f.layersWithOutsidePointerEventsDisabled.delete(h),f.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=FW))}},[h,g,i,f]),m.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),P4())},[h,f]),m.useEffect(()=>{const T=Ea(()=>b({}),"handleUpdate");return document.addEventListener(I4,T),()=>document.removeEventListener(I4,T)},[]),o.jsx(Or.div,{...d,ref:v,style:{pointerEvents:k?S?"auto":"none":void 0,...t.style},onFocusCapture:yn(t.onFocusCapture,N.onFocusCapture),onBlurCapture:yn(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:yn(t.onPointerDownCapture,C.onPointerDownCapture)})},"DismissableLayer"));function vQe(){const e=m.useContext(Hye),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Ea(vQe,"useDismissableLayerSurface");var xQe=Ea(()=>!0,"IS_TRUE");function qye(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:s,shouldHandlePointerDownOutside:a=xQe}=t,l=Fu(e),c=m.useRef(!1),u=m.useRef(!1),d=m.useRef(new Map),f=m.useRef(()=>{});return m.useEffect(()=>{function h(){u.current=!1,r.current=!1,d.current.clear()}Ea(h,"resetOutsideInteraction");function p(){return Array.from(d.current.values()).some(Boolean)}Ea(p,"isOutsideInteractionIntercepted");function g(w){if(!u.current)return;const O=w.target;O instanceof Node&&[...s].some(S=>S.contains(O))||d.current.set(w.type,!0),w.type==="click"&&window.setTimeout(()=>{u.current&&f.current()},0)}Ea(g,"handleInteractionCapture");function b(w){u.current&&d.current.set(w.type,!1)}Ea(b,"handleInteractionBubble");const v=Ea(w=>{if(w.target&&!c.current){let O=function(){n.removeEventListener("click",f.current);const S=p();h(),S||o7(bQe,l,k,{discrete:!0})};if(Ea(O,"handleAndDispatchPointerDownOutsideEvent"),!a(w.target)){n.removeEventListener("click",f.current),h(),c.current=!1;return}const k={originalEvent:w};u.current=!0,r.current=i&&w.button===0,d.current.clear(),!i||w.button!==0?O():(n.removeEventListener("click",f.current),f.current=O,n.addEventListener("click",f.current,{once:!0}))}else n.removeEventListener("click",f.current),h();c.current=!1},"handlePointerDown"),y=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const w of y)n.addEventListener(w,g,!0),n.addEventListener(w,b);const x=window.setTimeout(()=>{n.addEventListener("pointerdown",v)},0);return()=>{window.clearTimeout(x),n.removeEventListener("pointerdown",v),n.removeEventListener("click",f.current);for(const w of y)n.removeEventListener(w,g,!0),n.removeEventListener(w,b)}},[n,l,i,r,s,a]),{onPointerDownCapture:Ea(()=>c.current=!0,"onPointerDownCapture")}}Ea(qye,"usePointerDownOutside");function Wye(e,t=globalThis==null?void 0:globalThis.document){const n=Fu(e),i=m.useRef(!1);return m.useEffect(()=>{const r=Ea(s=>{s.target&&!i.current&&o7(yQe,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:Ea(()=>i.current=!0,"onFocusCapture"),onBlurCapture:Ea(()=>i.current=!1,"onBlurCapture")}}Ea(Wye,"useFocusOutside");function P4(){const e=new CustomEvent(I4);document.dispatchEvent(e)}Ea(P4,"dispatchUpdate");function o7(e,t,n,{discrete:i}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),i?i7(r,s):r.dispatchEvent(s)}Ea(o7,"handleAndDispatchCustomEvent");var OQe=Object.defineProperty,Lo=(e,t)=>OQe(e,"name",{value:t,configurable:!0}),DD="focusScope.autoFocusOnMount",MD="focusScope.autoFocusOnUnmount",BW={bubbles:!1,cancelable:!0},Kye=m.forwardRef(Lo(function(t,n){const{loop:i=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...l}=t,[c,u]=m.useState(null),d=Fu(s),f=Fu(a),h=m.useRef(null),p=rr(n,u),g=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let v=function(O){if(g.paused||!c)return;const k=O.target;c.contains(k)?h.current=k:Lf(h.current,{select:!0})},y=function(O){if(g.paused||!c)return;const k=O.relatedTarget;k!==null&&(c.contains(k)||Lf(h.current,{select:!0}))},x=function(O){if(document.activeElement===document.body)for(const S of O)S.removedNodes.length>0&&Lf(c)};Lo(v,"handleFocusIn"),Lo(y,"handleFocusOut"),Lo(x,"handleMutations"),document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(x);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[r,c,g.paused]),m.useEffect(()=>{if(c){UW.add(g);const v=document.activeElement;if(!c.contains(v)){const x=new CustomEvent(DD,BW);c.addEventListener(DD,d),c.dispatchEvent(x),x.defaultPrevented||(Gye(eve(l7(c)),{select:!0}),document.activeElement===v&&Lf(c))}return()=>{c.removeEventListener(DD,d),setTimeout(()=>{const x=new CustomEvent(MD,BW);c.addEventListener(MD,f),c.dispatchEvent(x),x.defaultPrevented||Lf(v??document.body,{select:!0}),c.removeEventListener(MD,f),UW.remove(g)},0)}}},[c,d,f,g]);const b=m.useCallback(v=>{if(!i&&!r||g.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(y&&x){const w=v.currentTarget,[O,k]=Xye(w);O&&k?!v.shiftKey&&x===k?(v.preventDefault(),i&&Lf(O,{select:!0})):v.shiftKey&&x===O&&(v.preventDefault(),i&&Lf(k,{select:!0})):x===w&&v.preventDefault()}},[i,r,g.paused]);return o.jsx(Or.div,{tabIndex:-1,...l,ref:p,onKeyDown:b})},"FocusScope"));function Gye(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(Lf(i,{select:t}),document.activeElement!==n)return}Lo(Gye,"focusFirst");function Xye(e){const t=l7(e),n=D4(t,e),i=D4(t.reverse(),e);return[n,i]}Lo(Xye,"getTabbableEdges");function l7(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Lo(i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}Lo(l7,"getTabbableCandidates");function D4(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const i of e)if(!(n?!i.checkVisibility({checkVisibilityCSS:!0}):Yye(i,{upTo:t})))return i}Lo(D4,"findVisible");function Yye(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Lo(Yye,"isHidden");function Zye(e){return e instanceof HTMLInputElement&&"select"in e}Lo(Zye,"isSelectableInput");function Lf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zye(e)&&t&&e.select()}}Lo(Lf,"focus");var UW=Jye();function Jye(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=M4(e,t),e.unshift(t)},remove(t){var n;e=M4(e,t),(n=e[0])==null||n.resume()}}}Lo(Jye,"createFocusScopesStack");function M4(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}Lo(M4,"arrayRemove");function eve(e){return e.filter(t=>t.tagName!=="A")}Lo(eve,"removeLinks");var wQe=Object.defineProperty,SQe=(e,t)=>wQe(e,"name",{value:t,configurable:!0}),c7=m.forwardRef(SQe(function(t,n){var c;const{container:i,...r}=t,[s,a]=m.useState(!1);Jc(()=>a(!0),[]);const l=i||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?Fi.createPortal(o.jsx(Or.div,{...r,ref:n}),l):null},"Portal")),kQe=Object.defineProperty,u7=(e,t)=>kQe(e,"name",{value:t,configurable:!0}),eT=0,dd=null;function EQe(e){return iR(),e.children}u7(EQe,"FocusGuards");function iR(){m.useEffect(()=>{dd||(dd={start:L4(),end:L4()});const{start:e,end:t}=dd;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),eT++,()=>{eT===1&&(dd==null||dd.start.remove(),dd==null||dd.end.remove(),dd=null),eT=Math.max(0,eT-1)}},[])}u7(iR,"useFocusGuards");function L4(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}u7(L4,"createFocusGuard");var wd=function(){return wd=Object.assign||function(t){for(var n,i=1,r=arguments.length;i"u")return QQe;var t=zQe(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},HQe=rve(),Yy="data-scroll-locked",qQe=function(e,t,n,i){var r=e.left,s=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),` - .`.concat(TQe,` { +${n}`}}async function*J7e({runtimeId:e,region:t,instanceName:n,sessionId:i,follow:r=!0,signal:s}){const a=new URLSearchParams({region:t,follow:String(r)});n&&a.set("instance_name",n),i&&a.set("session_id",i);const l=await fetch(Lo(`/web/runtime-logs/${encodeURIComponent(e)}/stream?${a.toString()}`),{headers:Hu(Lh({Accept:"text/event-stream"})),cache:"no-store",signal:s});if(!l.ok)throw new Error(V("runtimeLogs.loadFailedWithDetail",{detail:await Z7e(l)}));for await(const c of Hj(l)){if(!Y7e(c))throw new Error(V("runtimeLogs.invalidFormat"));yield c}}const eBe=255,tBe=/[\p{L}\p{M}\p{N}\p{P}\p{Zs}]/u;function nBe(e){const t=e.normalize("NFKC").replace(/\s+/gu," ").trim(),n=new TextEncoder;let i=0,r="";for(const s of t){if(!tBe.test(s))continue;const a=n.encode(s).byteLength;if(i+a>eBe)break;r+=s,i+=a}return r.replace(/ +/g," ").trimEnd()}const l4="ap-southeast-1",RF="cn-beijing",iBe="https://ark.ap-southeast.bytepluses.com/api/v3",rBe="https://ark.cn-beijing.volces.com/api/v3/",sBe="https://console.byteplus.com/ark/region:ark+ap-southeast-1/openManagement",aBe="https://console.volcengine.com/ark/region:ark+cn-beijing/openManagement",oBe="dola-seed-2-1-turbo-260628",lBe="doubao-seed-2-1-pro-260628",cBe="skylark-embedding-vision-250615",uBe="doubao-embedding-vision-250615",dBe="seed-2-0-lite-260228",fBe="doubao-seed-2-0-lite-260428",hBe="dola-seedream-5-0-pro-260628",pBe="doubao-seedream-5-0-260128",mBe="seededit-3-0-i2i-250628",gBe="doubao-seededit-3-0-i2i-250628",bBe="dreamina-seedance-2-0-260128",yBe="doubao-seedance-2-0-260128";function Iu(e){return e==="byteplus"?[{value:l4,label:l4}]:[{value:"cn-beijing",label:V("cloudRegion.cnBeijing")},{value:"cn-shanghai",label:V("cloudRegion.cnShanghai")}]}function Ji(e){var t;return((t=Iu(e)[0])==null?void 0:t.value)||RF}const vBe=new Set(["cn-beijing","cn-shanghai","ap-southeast-1"]);function qj(e){return typeof e=="string"&&vBe.has(e)}function wh(e,t){var i;return((i=(t?Iu(t):[...Iu("volcengine"),...Iu("byteplus")]).find(r=>r.value===e))==null?void 0:i.label)||e||"-"}function Sh(e){return e==="byteplus"?oBe:lBe}function yl(e){return e==="byteplus"?iBe:rBe}function xBe(e){return e==="byteplus"?sBe:aBe}function OBe(e){return e==="byteplus"?cBe:uBe}function wBe(e){return e==="byteplus"?dBe:fBe}function SBe(e){return e==="byteplus"?hBe:pBe}function kBe(e){return e==="byteplus"?mBe:gBe}function EBe(e){return e==="byteplus"?bBe:yBe}const IF="veadk.messageFeedback.v1";function PF(e,t,n,i){return[e,t,n,i].join(":")}function DF(){if(typeof window>"u")return{};try{const e=JSON.parse(localStorage.getItem(IF)??"{}");return e&&typeof e=="object"?e:{}}catch{return{}}}function CBe(e,t,n){if(typeof window>"u")return;const i=DF();i[e]={...i[e]??{},[`veadk_feedback:${t}`]:n},localStorage.setItem(IF,JSON.stringify(i))}function Abe(e){if(typeof window>"u")return;const t=PF(e.runtimeId,e.appName,e.userId,e.sessionId),n=DF(),i=n[t];if(i){for(const r of e.eventIds)delete i[`veadk_feedback:${r}`];Object.keys(i).length===0?delete n[t]:n[t]=i,localStorage.setItem(IF,JSON.stringify(n))}}const z2="",MF=new Map;function _be(e,t){MF.set(e,t)}function Nbe(){MF.clear()}function Ol(e){const t=MF.get(e);return t?{app:t.app,ep:{base:t.base,apiKey:t.apiKey,runtimeId:t.runtimeId,region:t.region}}:{app:e,ep:{}}}async function Ot(e,t={},n={},i=Vo){const r=xl(t.signal,i),s=!!n.runtimeId&&String(t.method??"GET").toUpperCase()==="DELETE",a={...t,...s?{method:"POST"}:{},headers:Hu(Lh(t.headers))},l=()=>{const d={...a,signal:r};if(n.runtimeId){const f=new URLSearchParams;n.region&&f.set("_runtime_region",n.region),n.retryProbe&&f.set("probe_retry","connect"),s&&f.set("_method","DELETE");const h=f.toString()?`${e.includes("?")?"&":"?"}${f.toString()}`:"";return fetch(Lo(`${z2}/web/runtime-proxy/${n.runtimeId}${e}${h}`),d)}if(n.base){const f=new Headers(d.headers);return f.set("X-AgentKit-Base",n.base),n.apiKey&&f.set("X-AgentKit-Key",n.apiKey),fetch(Lo(`${z2}/agentkit-proxy${e}`),{...d,headers:f})}return fetch(Lo(`${z2}${e}`),d)},c=async d=>{if($7e(d))return!0;if(d.status!==401)return!1;try{return await I7e()}catch{return!1}};let u=await l();for(;await c(u);)await F7e(r),u=await l();return u}function Ln(e,t={},n=Vo){return Ot(e,t,{},n)}function TBe(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>{var n;if(t&&typeof t=="object"&&"msg"in t){const i=Array.isArray(t.loc)?(n=t.loc)==null?void 0:n.join("."):"",r=String(t.msg??"");return i?`${i}: ${r}`:r}return String(t)}).filter(Boolean).join(` +`):e&&typeof e=="object"?JSON.stringify(e):""}async function Jt(e,t){const n=V("common.fallbackWithHttpStatus",{fallback:t,status:e.status}),i=await e.text().catch(()=>"");if(!i)return n;try{const r=JSON.parse(i),s=TBe(r.detail??r.error);return s?V("client.errorWithDetailAndRawResponse",{context:n,detail:s,response:i}):V("client.errorWithRawResponse",{context:n,response:i})}catch{return V("client.errorWithRawResponse",{context:n,response:i})}}async function LF(e,t=!1){const n=await Ot(`/web/model-api-keys${t?"?refresh=true":""}`,{signal:e,cache:"no-store"});if(!n.ok)throw new Error(await Jt(n,V("client.loadArkApiKeysFailed")));return await n.json()}async function jbe(e,t){const n=await Ot(`/web/model-api-keys/${encodeURIComponent(e)}/value`,{method:"POST",signal:t,cache:"no-store"});if(!n.ok)throw new Error(await Jt(n,V("client.loadArkApiKeysFailed")));return await n.json()}async function Ox(e){const t=new URLSearchParams;e!=null&&e.apiKeyId&&t.set("apiKeyId",e.apiKeyId),e!=null&&e.refresh&&t.set("refresh","true");const n=t.toString(),i=await Ot(`/web/model-options${n?`?${n}`:""}`,{signal:e==null?void 0:e.signal,cache:"no-store"});if(!i.ok)throw new Error(await Jt(i,V("client.loadModelsFailed")));return await i.json()}async function Rbe(){const e=await Ot("/list-apps");if(!e.ok)throw new Error(`list-apps failed: ${e.status}`);return e.json()}class wx extends Error{constructor(){super(V("client.runtimeAccessDenied")),this.name="RuntimeAccessDeniedError"}}class Ls extends Error{constructor(t,n=!1,i=!1){super(t),this.unsupported=n,this.retryable=i,this.name="RuntimeProbeError"}}const Ibe=()=>V("client.privateRuntimeUnavailable"),Pbe=()=>V("client.runtimeTemporarilyUnavailable"),xW=["cn-beijing","cn-shanghai"],ABe=3e4,Sx=5*60*1e3,Dbe=60*1e3;let dS="volcengine";const Hy=new Map,bg=new Map,yg=new Map,Su=new Map,Cr=new Map;function $F(e,t,n){return`${t}:${e}:${n??""}`}function Mbe(e){e!==dS&&Cr.clear(),dS=e}function Lk(e){const t=(e||"").trim();if(dS==="byteplus")return[t&&!t.startsWith("cn-")?t:l4];const n=t&&!t.startsWith("ap-")?t:RF;return xW.includes(n)?[n,...xW.filter(i=>i!==n)]:[n]}function Wj(e){const t=(e||"").trim();return t?[t]:Lk()}function Qb(...e){return e.map(t=>String(t??"")).join("")}function Lm(e,t,n){const i=e.get(t);return i!=null&&i.value&&Date.now()-i.updatedAt<=n?i.value:null}function FF(e,t,n){return e.set(t,{value:n,updatedAt:Date.now()}),n}function qC(e,t){return t?t.aborted?Promise.reject(new DOMException("The operation was aborted.","AbortError")):new Promise((n,i)=>{const r=()=>{i(new DOMException("The operation was aborted.","AbortError"))};t.addEventListener("abort",r,{once:!0}),e.then(s=>{t.removeEventListener("abort",r),n(s)},s=>{t.removeEventListener("abort",r),i(s)})}):e}async function Lbe(e){try{const t=await e.clone().json();return typeof t.detail=="string"?t.detail:""}catch{return""}}async function $k(e,t,n,i,r=Vo){const s=await Ot("/list-apps",{signal:i},n??{base:e,apiKey:t},r),a=n!=null&&n.runtimeId?await Lbe(s):"";if(n!=null&&n.runtimeId&&a==="runtime_access_denied")throw new wx;if(n!=null&&n.runtimeId&&a==="runtime_private_endpoint_unreachable")throw new Ls(Ibe());if(n!=null&&n.runtimeId&&["runtime_proxy_connect_error","runtime_proxy_timeout","runtime_json_connect_error","runtime_json_timeout"].includes(a))throw new Ls(Pbe(),!1,!0);if(n!=null&&n.runtimeId&&s.status===404)throw new Ls(V("client.runtimeConnectionUnsupported"),!0,!0);if(n!=null&&n.runtimeId&&(s.status===401||s.status===403))throw new Ls(V("client.runtimeConnectionDenied"));if(!s.ok)throw new Error(await Jt(s,V("client.listAgentsFailed")));let l;try{l=await s.json()}catch{throw new Ls(V("client.invalidListAppsJson"))}if(!Array.isArray(l)||l.some(u=>typeof u!="string"||!u.trim()))throw new Ls(V("client.invalidListAppsFormat"));const c=l.map(u=>u.trim());return n!=null&&n.runtimeId&&Hy.set($F(n.runtimeId,n.region??"",n.runtimeVersion),{apps:c,expiresAt:Date.now()+ABe}),c}async function $be(e,t){const{app:n,ep:i}=Ol(e),r=await Ot(`/apps/${n}/users/${encodeURIComponent(t)}/sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"},i);if(!r.ok){const a=V("client.createSessionFailedWithStatus",{status:r.status}),l=await Jt(r,V("client.createSessionFailed"));throw new Error(l===a?a:V("common.fallbackWithDetail",{fallback:a,detail:l}))}return(await r.json()).id}async function BF(e,t){const{app:n,ep:i}=Ol(e),r=await Ot(`/apps/${n}/users/${encodeURIComponent(t)}/sessions`,{},i);if(!r.ok)throw new Error(`list sessions failed: ${r.status}`);return r.json()}async function Kj(e,t,n){const{app:i,ep:r}=Ol(e),s=await Ot(`/apps/${i}/users/${encodeURIComponent(t)}/sessions/${encodeURIComponent(n)}`,{},r);if(!s.ok){const l=await Jt(s,V("client.getSessionFailed"));throw new Error(V("client.getSessionFailedWithDetail",{status:s.status,detail:l}))}const a=await s.json();if(r.runtimeId){const l=PF(r.runtimeId,i,t,n);a.state={...DF()[l]??{},...a.state??{}}}return a}async function Fbe(e){const{app:t,ep:n}=Ol(e.appName);if(!n.runtimeId)throw new Error(V("client.feedbackRuntimeOnly"));if(!n.region)throw new Error(V("client.feedbackRegionMissing"));const i=await Ot("/web/evaluation/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runtimeId:n.runtimeId,region:n.region,appName:t,userId:e.userId,sessionId:e.sessionId,eventId:e.eventId,rating:e.rating,comment:e.comment??""})},{},ls);if(!i.ok)throw new Error(await Jt(i,V("client.submitFeedbackFailed")));const r=await i.json(),s=PF(n.runtimeId,t,e.userId,e.sessionId);return CBe(s,e.eventId,r),r}async function Gj(e,t={}){const n=Qb(e.runtimeId,e.region||"cn-beijing",e.appName,e.pageSize??100),i=Lm(Su,n,Dbe);if(!t.force&&i)return i;const r=Su.get(n);if(!t.force&&(r!=null&&r.promise))return r.promise;let s=null;const a=(async()=>{for(const l of Wj(e.region)){const c=new URLSearchParams({runtimeId:e.runtimeId,region:l,appName:e.appName,page_size:String(e.pageSize??100)}),u=await Ot(`/web/evaluation/feedback-cases?${c.toString()}`);if(u.ok)return FF(Su,n,await u.json());s=new Error(await Jt(u,V("client.loadEvaluationSetsFailed")))}throw s??new Error(V("client.loadEvaluationSetsFailed"))})();Su.set(n,{...r,promise:a,updatedAt:(r==null?void 0:r.updatedAt)??0});try{return await a}finally{const l=Su.get(n);(l==null?void 0:l.promise)===a&&Su.set(n,{value:l.value,updatedAt:l.updatedAt})}}async function c4(e){let t=null;for(const n of Wj(e.region)){const i=new URLSearchParams({runtimeId:e.runtimeId,region:n,appName:e.appName,userId:e.userId}),r=await Ot(`/web/evaluation/statuses?${i.toString()}`);if(r.ok)return r.json();t=new Error(await Jt(r,V("client.loadAutoEvaluationStatusFailed")))}throw t??new Error(V("client.loadAutoEvaluationStatusFailed"))}async function Bbe(e){let t=null;for(const n of Wj(e.region)){const i=new URLSearchParams({runtimeId:e.runtimeId,region:n,appName:e.appName}),r=await Ot(`/web/evaluation/optimizations?${i.toString()}`);if(r.ok)return r.json();t=new Error(await Jt(r,V("client.loadOptimizationsFailed")))}throw t??new Error(V("client.loadOptimizationsFailed"))}function Ube(e){return Lm(Su,Qb(e.runtimeId,e.region||"cn-beijing",e.appName,e.pageSize??100),Dbe)}function _Be(e){Gj(e).catch(()=>{})}function Qbe(e){Gj(e,{force:!0}).catch(()=>{})}function zbe(e,t){return["good","bad"].map(n=>{const i=e.find(r=>r.kind===n);return{kind:n,evaluationSetId:(i==null?void 0:i.evaluationSetId)??null,evaluationSetName:(i==null?void 0:i.evaluationSetName)??null,workspaceId:(i==null?void 0:i.workspaceId)??null,itemCount:t.filter(r=>r.kind===n).length}})}function V2(e){const t=e.comment??"",n=e.rating==="bad"&&!!t.trim();for(const[i,r]of Su.entries()){const s=r.value;if(!s||s.runtimeId!==e.runtimeId||s.agentName!==e.appName)continue;const a=s.items.filter(c=>c.sessionId!==e.sessionId||c.messageId!==e.messageId),l=e.rating?[{id:`local:${e.runtimeId}:${e.sessionId}:${e.messageId}`,itemKey:`local:${e.messageId}`,kind:e.rating,input:e.input,output:e.output,referenceOutput:e.referenceOutput??e.output,comment:t,agentName:e.appName,sessionId:e.sessionId,messageId:e.messageId,runtimeId:e.runtimeId,invocationId:e.invocationId??"",userId:e.userId,createdAt:e.createdAt??new Date().toISOString(),evaluationSetId:"",evaluationSetName:"",workspaceId:"",source:"user",score:n?0:null,reason:n?t:""},...a]:a;Su.set(i,{value:{...s,sets:zbe(s.sets,l),items:l},updatedAt:Date.now(),promise:r.promise})}}async function Vbe(e){let t=null;for(const n of Wj(e.region)){const i=await Ot("/web/evaluation/feedback-cases/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runtimeId:e.runtimeId,region:n,appName:e.appName,itemIds:e.itemIds})},{},ls);if(i.ok){const r=await i.json(),s=new Set(e.itemIds);for(const[a,l]of Su.entries()){const c=l.value;if(!c||c.runtimeId!==e.runtimeId||c.agentName!==e.appName)continue;const u=c.items.filter(d=>!s.has(d.id));Su.set(a,{value:{...c,sets:zbe(c.sets,u),items:u},updatedAt:Date.now()})}return r}t=new Error(await Jt(i,V("client.deleteEvaluationCaseFailed")))}throw t??new Error(V("client.deleteEvaluationCaseFailed"))}async function u4(e,t,n){const{app:i,ep:r}=Ol(e),s=await Ot(`/apps/${i}/users/${encodeURIComponent(t)}/sessions/${n}`,{method:"DELETE"},r);if(!s.ok&&s.status!==404)throw new Error(`delete session failed: ${s.status}`)}function NBe(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"="),i=window.atob(n),r=new Uint8Array(i.length);for(let s=0;sURL.revokeObjectURL(l),0)}async function Hbe(e,t,n,i,r){const{app:s,ep:a}=Ol(e),l=r==null?"":`?version=${encodeURIComponent(r)}`,c=`/apps/${encodeURIComponent(s)}/users/${encodeURIComponent(t)}/sessions/${encodeURIComponent(n)}/artifacts/${encodeURIComponent(i)}${l}`,u=await Ot(c,{},a,ls);if(!u.ok)throw new Error(await Jt(u,V("client.downloadFileFailed")));const d=await u.json(),f=d.inlineData??d.inline_data;if(!(f!=null&&f.data))throw new Error(V("client.fileUnavailable"));const h=NBe(f.data),p=h.buffer.slice(h.byteOffset,h.byteOffset+h.byteLength);return{blob:new Blob([p],{type:f.mimeType??f.mime_type??"application/octet-stream"}),downloadName:f.displayName??f.display_name??i}}async function QF(e,t,n,i,r){const{blob:s}=await Hbe(e,t,n,i,r);return URL.createObjectURL(s)}async function jBe(e){const t=await Ot("/web/media/capabilities");if(!t.ok)throw new Error(await Jt(t,"media capabilities failed"));return t.json()}async function qbe(e,t,n,i){const{app:r}=Ol(e),s=new FormData;s.set("app_name",r),s.set("user_id",t),s.set("session_id",n),s.set("file",i);const a=await Ot("/web/media",{method:"POST",body:s},{},ls);if(!a.ok)throw new Error(await Jt(a,V("client.uploadFileFailed")));return{...await a.json(),status:"ready"}}async function d4(e,t,n){const{app:i}=Ol(e),r=`/web/media/${encodeURIComponent(i)}/${encodeURIComponent(t)}/${encodeURIComponent(n)}/delete`,s=await Ot(r,{method:"POST"});if(!s.ok&&s.status!==404)throw new Error(await Jt(s,"media cleanup failed"))}function Wbe(e){try{const t=new URL(e);if(t.protocol!=="veadk-media:"||t.hostname!=="apps")return;const n=t.pathname.split("/").filter(Boolean).map(decodeURIComponent);return n.length!==7||n[1]!=="users"||n[3]!=="sessions"||n[5]!=="media"?void 0:`/web/media/${n.map(encodeURIComponent).filter((i,r)=>![1,3,5].includes(r)).join("/")}`}catch{return}}async function H2(e,t){const n=Wbe(t);if(!n)throw new Error("Invalid VeADK media URI");const i=await Ot(`${n}/delete`,{method:"POST"});if(!i.ok&&i.status!==404)throw new Error(await Jt(i,"media cleanup failed"))}function Kbe(e,t){if(t.startsWith("data:")||t.startsWith("blob:")||/^https?:/.test(t))return t;const n=Wbe(t);if(!n)return t;const i=`${n}/content`;return Lo(`${z2}${i}`)}async function A_(e,t,n){const{app:i,ep:r}=Ol(e);let s;if(r.runtimeId){const c=new URLSearchParams({runtimeId:r.runtimeId,sessionId:t,region:r.region??"cn-beijing"});if(n&&c.set("endTimeMs",String(Math.round(n))),s=await Ot(`/web/runtime-trace?${c.toString()}`),s.status===404)throw new Error(V("client.traceDisabled"))}else s=await Ot(`/dev/apps/${encodeURIComponent(i)}/debug/trace/session/${encodeURIComponent(t)}`,{},r);if(!s.ok)throw new Error(await Jt(s,V("client.loadTraceFailed")));const a=s.headers.get("content-type")??"";if(!a.includes("application/json")){const c=a.split(";",1)[0]||V("client.contentTypeMissing");throw new Error(V("client.traceNonJson",{contentType:c}))}const l=await s.json();if(!Array.isArray(l))throw new Error(V("client.invalidTraceFormat"));return l}async function f4(e){const t=await Ot("/web/issue-feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await Jt(t,V("client.submitIssueFeedbackFailed")));if((await t.json()).submitted!==!0)throw new Error(V("client.issueFeedbackNotConfirmed"));return{submitted:!0}}async function Gbe(e,t,n=!0){const i=await Ot(`/web/agent-info/${e}`,{},t);if(!i.ok)throw new Error(`agent-info failed: ${i.status}`);const r=await i.json();if(n&&!r.draft)try{const s=await Ot(`/web/agent-draft/${e}`,{},t);if(s.ok){const a=await s.json();r.draft=a.draft}}catch{}return{appName:e,name:r.name??e,description:r.description??"",type:r.type,model:r.model??"",tools:r.tools??[],skillsPreviewSupported:Array.isArray(r.skills),skills:r.skills??[],subAgents:r.subAgents??[],components:r.components??[],searchSources:r.searchSources??[],graph:r.graph,draft:r.draft}}async function h4(e){const{app:t,ep:n}=Ol(e);return Gbe(t,n,!1)}async function RBe(e,t,n){let i=null;for(const r of Lk(t)){const s={runtimeId:e,region:r};try{const a=$F(e,r),l=Hy.get(a);l&&l.expiresAt<=Date.now()&&Hy.delete(a);const c=Hy.get(a),u=n||(c==null?void 0:c.apps[0])||(await $k("","",s))[0];if(!u)throw new Error(V("client.noPreviewableAgent"));return Gbe(u,s)}catch(a){if(a instanceof wx||a instanceof Ls&&!a.unsupported)throw a;i=a instanceof Error?a:new Error(String(a))}}throw i??new Error(V("client.noPreviewableAgent"))}async function zF(e,t,n={},i={}){const r=typeof n=="string"?n:void 0,s=typeof n=="string"?i:n,a=Qb(e,t||"cn-beijing",r??""),l=Lm(bg,a,Sx);if(!s.force&&l)return l;const c=bg.get(a);if(!s.force&&(c!=null&&c.promise))return c.promise;const u=RBe(e,t,r).then(d=>FF(bg,a,d));bg.set(a,{...c,promise:u,updatedAt:(c==null?void 0:c.updatedAt)??0});try{return await u}finally{const d=bg.get(a);(d==null?void 0:d.promise)===u&&bg.set(a,{value:d.value,updatedAt:d.updatedAt})}}function Xbe(e,t,n=""){return Lm(bg,Qb(e,t||"cn-beijing",n),Sx)}function Ybe(e,t,n=""){zF(e,t,n).catch(()=>{})}async function Zbe(e,t,n,i){const{app:r,ep:s}=Ol(e),a=new URLSearchParams({source:t,app_name:r,q:n,user_id:i}),l=await Ot(`/web/search?${a.toString()}`,{},s);if(!l.ok)throw new Error(await Jt(l,V("client.agentSearchFailed")));return l.json()}async function Jbe(e,t){const{app:n}=Ol(e),i=await Ot(`/web/search?source=web&app_name=${encodeURIComponent(n)}&q=${encodeURIComponent(t)}`);if(!i.ok)throw new Error(`web search failed: ${i.status}`);return i.json()}function e0e(){return Lf(V("client.emptySseBody"))}function q2(){return Lf(V("client.noDisplayableSseReply"))}const IBe=3e4;function Pv(){return Lf(V("client.firstSseEventTimeout"))}function t0e(e){if(e!=null&&e.aborted)return{signal:e,clearDeadline:()=>{},cleanup:()=>{},timedOut:()=>!1};const t=new AbortController;let n=!1,i=!1;const r=()=>{i||(i=!0,clearTimeout(a))},s=()=>{t.signal.aborted||t.abort((e==null?void 0:e.reason)??new DOMException("Aborted","AbortError"))},a=setTimeout(()=>{i||t.signal.aborted||(n=!0,i=!0,t.abort(new Error(Pv())))},IBe);return e==null||e.addEventListener("abort",s,{once:!0}),{signal:t.signal,clearDeadline:r,cleanup:()=>{r(),e==null||e.removeEventListener("abort",s)},timedOut:()=>n}}async function*p4({appName:e,userId:t,sessionId:n,text:i,attachments:r=[],invocation:s,platformTools:a,environmentMounts:l,environmentMount:c,functionResponses:u=[],signal:d,onRuntimeContext:f}){const{app:h,ep:p}=Ol(e),g=r.flatMap(k=>k.status&&k.status!=="ready"?[]:k.uri?[{fileData:{mimeType:k.mimeType,fileUri:k.uri,displayName:k.name},partMetadata:{veadkMedia:{id:k.id,uri:k.uri,name:k.name,mimeType:k.mimeType,sizeBytes:k.sizeBytes}}}]:k.data?[{inlineData:{mimeType:k.mimeType,data:k.data,displayName:k.name}}]:[]),b=s&&(s.skills.length>0||s.targetAgent)?s:void 0,v=[...g,...u.map(k=>({functionResponse:{id:k.id,name:k.name,response:k.response}})),...i.trim()?[{text:i}]:[]];if(b&&v.length>0){const k=v[0],S=k.partMetadata;v[0]={...k,partMetadata:{...S,veadkInvocation:b}}}let y;const x=t0e(d);try{y=await Ot("/run_sse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:h,user_id:t,session_id:n,new_message:{role:"user",parts:v},streaming:!0,...a!==void 0?{platform_tools:[...a]}:{},...l!==void 0?{environment_mounts:[...l]}:c?{environment_mount:c}:{},custom_metadata:b?{veadkInvocation:b}:void 0}),signal:x.signal},p,0)}catch(k){throw x.cleanup(),x.timedOut()?new Error(Pv()):d!=null&&d.aborted||(k==null?void 0:k.name)==="AbortError"?k:new Error(Lf(k))}const w=G7e(y,p.runtimeId??"",p.region??"");if(w&&(f==null||f(w)),!y.ok){x.cleanup();const k=await Jt(y,V("client.runSessionFailed"));throw new Error(Lf(V("client.runSseFailedWithDetail",{status:y.status,detail:k})))}let O=!1;try{for await(const k of Hj(y)){O=!0,x.clearDeadline();const S=k;typeof S.error=="string"&&(S.error=Lf(S.error)),typeof S.errorMessage=="string"&&(S.errorMessage=Lf(S.errorMessage)),typeof S.error_message=="string"&&(S.error_message=Lf(S.error_message)),yield S}}catch(k){throw x.timedOut()?new Error(Pv()):d!=null&&d.aborted||(k==null?void 0:k.name)==="AbortError"?k:new Error(Lf(k))}finally{x.cleanup()}if(!O)throw new Error(e0e())}async function Xj(e,t){const n=new URLSearchParams({name:e,region:t}),i=await Ot(`/web/runtime-name-availability?${n.toString()}`,{cache:"no-store"});if(!i.ok)throw new Error(await Jt(i,V("client.checkRuntimeNameFailed")));const r=await i.json();if(typeof r.available!="boolean")throw new Error(V("client.invalidRuntimeNameCheck"));return{available:r.available}}async function n0e(e,t){const n=new URLSearchParams({kind:e.kind,region:e.region});e.registry&&n.set("registry",e.registry),e.namespace&&n.set("namespace",e.namespace),e.workspaceId&&n.set("workspaceId",e.workspaceId),e.search&&n.set("search",e.search),e.pageNumber&&n.set("pageNumber",String(e.pageNumber)),e.pageSize&&n.set("pageSize",String(e.pageSize));const i=await Ot(`/web/deployment-resources?${n.toString()}`,{signal:t});if(!i.ok)throw new Error(await Jt(i,V("client.loadCloudResourcesFailed")));const r=await i.json();if(typeof r.serviceRegion!="string"||!Array.isArray(r.items)||typeof r.pageNumber!="number"||typeof r.pageSize!="number"||typeof r.totalCount!="number"||typeof r.hasMore!="boolean")throw new Error(V("client.invalidCloudResources"));const s=r.items.map(a=>{if(!a||typeof a!="object"||typeof a.id!="string"||typeof a.name!="string"||typeof a.region!="string"||typeof a.status!="string")throw new Error(V("client.invalidCloudResources"));return a});return{serviceRegion:r.serviceRegion,items:s,pageNumber:r.pageNumber,pageSize:r.pageSize,totalCount:r.totalCount,hasMore:r.hasMore}}function i0e(e,t){const n=e;if(!n||typeof n!="object"||!Array.isArray(n.mounts))throw new Error(V("client.invalidEnvironmentMount"));if(n.mounts.length!==t.length)throw new Error(V("client.environmentMountMismatch"));return n.mounts.map((i,r)=>{const s=t[r];if(!i||typeof i!="object"||typeof i.environment_id!="string"||typeof i.environment_version_id!="string"||typeof i.mount_instance_id!="string"||typeof i.sandbox_session_id!="string"||!i.environment_id||!i.environment_version_id||!i.mount_instance_id||!i.sandbox_session_id)throw new Error(V("client.invalidEnvironmentMount"));if(i.environment_id!==s.environment_id||i.environment_version_id!==s.environment_version_id||s.mount_instance_id!==void 0&&i.mount_instance_id!==s.mount_instance_id)throw new Error(V("client.environmentMountMismatch"));return i})}async function r0e({runtimeId:e,appName:t,userId:n,sessionId:i,environmentMounts:r}){const{app:s}=Ol(t);let a;try{a=await Ot("/web/v3/session-environment-mounts/prepare",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runtime_id:e,app_name:s,user_id:n,session_id:i,environment_mounts:[...r]})})}catch(l){throw l instanceof TypeError?new Error(V("client.environmentMountNetworkFailed")):l}if(!a.ok)throw new Error(await Jt(a,V("client.environmentMountFailed")));return i0e(await a.json(),r)}function VF(e){const t=new Set,n=[];for(const i of e.split(/[,,\n\r]+/)){const r=i.trim();!r||t.has(r)||(t.add(r),n.push(r))}return n}async function s0e(e,t=typeof navigator>"u"?void 0:navigator.clipboard){if(!(t!=null&&t.writeText))throw new Error(V("client.clipboardUnsupported"));try{await t.writeText(e)}catch{throw new Error(V("client.clipboardWriteFailed"))}}const OW={codex:0,codex_snapshot:1,deepseek_harness:2,deepseek_harness_snapshot:3,openclaw:4,openclaw_snapshot:5,hermes:6,hermes_snapshot:7,dev:8};async function a0e(e){var r;const t=await Ot("/web/system-info",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadSystemInfoFailed")));const n=await t.json();if(typeof((r=n.storage)==null?void 0:r.tosAddress)!="string"||!Array.isArray(n.sandboxTools))throw new Error(V("client.invalidSystemInfo"));const i=n.sandboxTools.map(s=>{if(!s||typeof s!="object"||typeof s.kind!="string"||typeof s.label!="string"||typeof s.toolId!="string"||typeof s.snapshot!="boolean"||typeof s.needsModelEnvUpdate!="boolean"||typeof s.canUpdateModelEnv!="boolean"||typeof s.modelEnvError!="string"||typeof s.modelEnvErrorCode!="string")throw new Error(V("client.invalidSystemInfo"));return s}).sort((s,a)=>(OW[s.kind]??Number.MAX_SAFE_INTEGER)-(OW[a.kind]??Number.MAX_SAFE_INTEGER));return{storage:{tosAddress:n.storage.tosAddress},sandboxTools:i}}const o0e=new Set(["preparing","queued","building","scanning","available","failed"]);function HF(e){if(e===null)return null;if(!e||typeof e!="object")throw new Error(V("client.invalidEnvironmentBuild"));const t=e;if(typeof t.versionId!="string"||!o0e.has(t.status)||typeof t.image!="string"||typeof t.error!="string"||typeof t.createdAt!="string"||typeof t.updatedAt!="string"||t.resources!==null&&typeof t.resources!="object")throw new Error(V("client.invalidEnvironmentBuild"));const n=Array.isArray(t.steps)?t.steps.map(i=>{if(!i||typeof i!="object"||typeof i.key!="string"||typeof i.label!="string"||!["pending","running","succeeded","failed"].includes(i.status)||i.startedAt!==null&&typeof i.startedAt!="string"||i.finishedAt!==null&&typeof i.finishedAt!="string")throw new Error(V("client.invalidEnvironmentBuildStep"));return i}):[];return{...t,toolId:typeof t.toolId=="string"?t.toolId:"",toolStatus:["creating","ready","failed"].includes(t.toolStatus)?t.toolStatus:"",runId:typeof t.runId=="string"?t.runId:"",currentStep:typeof t.currentStep=="string"?t.currentStep:"",sourceCommitSha:typeof t.sourceCommitSha=="string"?t.sourceCommitSha:"",steps:n,progressError:typeof t.progressError=="string"?t.progressError:"",logTail:typeof t.logTail=="string"?t.logTail:"",logTruncated:t.logTruncated===!0,logUpdatedAt:typeof t.logUpdatedAt=="string"?t.logUpdatedAt:null,logError:typeof t.logError=="string"?t.logError:""}}function l0e(e){if(!e||typeof e!="object")throw new Error(V("client.invalidEnvironmentManifest"));const t=e;if(!["agentkit.studio/v3","agentkit.studio/v1alpha1"].includes(t.apiVersion)||t.kind!=="Environment"||!t.metadata||typeof t.metadata.id!="string"||typeof t.metadata.name!="string"||typeof t.metadata.version!="string"||typeof t.metadata.description!="string"||!t.spec||typeof t.spec.image!="string"||!["ubuntu","aio-sandbox","codex-sandbox"].includes(t.spec.baseEnvironment)||typeof t.spec.baseImage!="string"||!["ubuntu-22.04","ubuntu-24.04"].includes(t.spec.operatingSystem)||!["python-3.10","python-3.12"].includes(t.spec.language)||t.spec.executionRuntime!=="veadk"||!Array.isArray(t.spec.packages)||!t.spec.packages.every(n=>typeof n=="string")||!Array.isArray(t.spec.capabilities)||!t.spec.capabilities.every(n=>typeof n=="string")||!Array.isArray(t.spec.skills)||!t.status||!o0e.has(t.status.phase)||typeof t.status.createdAt!="string"||typeof t.status.updatedAt!="string")throw new Error(V("client.invalidEnvironmentManifest"));return t}function c0e(e){if(e==null)return;if(!e||typeof e!="object")throw new Error(V("client.invalidImageRepository"));const t=e;if(typeof t.region!="string"||typeof t.registry!="string"||typeof t.namespace!="string"||typeof t.repository!="string")throw new Error(V("client.invalidImageRepository"));return t}function PBe(e){if(e==null)return;if(!e||typeof e!="object")throw new Error(V("client.invalidCodeRepository"));const t=e;if(typeof t.repositoryUrl!="string"||t.ref!==void 0&&typeof t.ref!="string"||typeof t.dockerfilePath!="string")throw new Error(V("client.invalidCodeRepository"));return t}function DBe(e){const t=c0e(e);if(!t)return;const n=e;if(typeof n.reference!="string")throw new Error(V("client.invalidImageSource"));return{...t,reference:n.reference}}function qF(e){if(!e||typeof e!="object")throw new Error(V("client.invalidEnvironment"));const t=e;if(typeof t.id!="string"||typeof t.name!="string"||typeof t.description!="string"||t.baseEnvironment!==void 0&&t.baseEnvironment!=="ubuntu"&&t.baseEnvironment!=="aio-sandbox"&&t.baseEnvironment!=="codex-sandbox"||t.operatingSystem!=="ubuntu-22.04"&&t.operatingSystem!=="ubuntu-24.04"||t.language!=="python-3.10"&&t.language!=="python-3.12"||!Array.isArray(t.optionIds)||!t.optionIds.every(n=>typeof n=="string")||t.selectedSkills!==void 0&&!Array.isArray(t.selectedSkills)||typeof t.dockerfile!="string"||typeof t.createdAt!="string"||typeof t.updatedAt!="string")throw new Error(V("client.invalidEnvironment"));return{...t,baseEnvironment:t.baseEnvironment==="aio-sandbox"?"aio-sandbox":t.baseEnvironment==="codex-sandbox"?"codex-sandbox":"ubuntu",selectedSkills:t.selectedSkills??[],gitSource:PBe(t.gitSource),containerRepository:c0e(t.containerRepository),imageSource:DBe(t.imageSource),latestVersion:HF(t.latestVersion)}}function u0e(e){if(!e||typeof e!="object")throw new Error(V("client.invalidWorkspace"));const t=e;if(typeof t.id!="string"||typeof t.name!="string"||typeof t.description!="string"||!Array.isArray(t.environmentIds)||!t.environmentIds.every(n=>typeof n=="string")||typeof t.createdAt!="string"||typeof t.updatedAt!="string")throw new Error(V("client.invalidWorkspace"));return t}async function WF(e){const t=await Ot("/web/workspaces",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadWorkspacesFailed")));const n=await t.json();if(!Array.isArray(n.items))throw new Error(V("client.invalidWorkspaceList"));return n.items.map(u0e)}async function d0e(e,t,n,i){const r=await Ot(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:i});if(!r.ok)throw new Error(await Jt(r,V("client.saveWorkspaceFailed")));return u0e(await r.json())}function f0e(e,t){return d0e("/web/workspaces","POST",e,t)}function h0e(e,t,n){return d0e(`/web/workspaces/${encodeURIComponent(e)}`,"PATCH",t,n)}async function p0e(e,t){const n=await Ot(`/web/workspaces/${encodeURIComponent(e)}`,{method:"DELETE",signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.deleteWorkspaceFailed")))}async function Fk(e){const t=await Ot("/web/v3/environments",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadEnvironmentsFailed")));const n=await t.json();if(!Array.isArray(n.items))throw new Error(V("client.invalidEnvironmentList"));return n.items.map(qF)}async function m0e(e,t){const n=await Ot("/web/v3/environment-repositories/inspect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.probeRepositoryFailed")));const i=await n.json();if(typeof i.repositoryUrl!="string"||typeof i.ref!="string"||typeof i.commitSha!="string"||!Array.isArray(i.dockerfiles)||!i.dockerfiles.every(r=>typeof r=="string"))throw new Error(V("client.invalidRepositoryProbe"));return i}async function g0e(e,t){const n=await Ot(`/web/v3/environments/${encodeURIComponent(e)}/share-code`,{method:"POST",signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.exportEnvironmentCodeFailed")));const i=await n.json();if(typeof i.shareCode!="string"||typeof i.name!="string")throw new Error(V("client.invalidEnvironmentCode"));return i}async function b0e(e,t){const n=await Ot("/web/v3/environment-share-codes/inspect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shareCodes:e}),signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.inspectEnvironmentCodeFailed")));const i=await n.json();if(!Array.isArray(i.items))throw new Error(V("client.invalidEnvironmentCodeInspection"));return i.items.map(r=>{if(!r||typeof r!="object")throw new Error(V("client.invalidEnvironmentCodeInspection"));const s=r,a=s.status==="valid"||s.valid===!0?"valid":s.status==="invalid"||s.valid===!1?"invalid":null;if(!Number.isInteger(s.index)||a===null||s.name!==void 0&&typeof s.name!="string"||s.error!==void 0&&typeof s.error!="string")throw new Error(V("client.invalidEnvironmentCodeInspection"));return{index:s.index,status:a,name:s.name??"",error:s.error??""}})}async function y0e(e,t){const n=await Ot("/web/v3/environment-share-codes/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shareCodes:e}),signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.importEnvironmentCodeFailed")));const i=await n.json();if(!Array.isArray(i.items))throw new Error(V("client.invalidEnvironmentCodeImport"));return i.items.map(r=>{if(!r||typeof r!="object")throw new Error(V("client.invalidEnvironmentCodeImport"));const s=r;if(!Number.isInteger(s.index)||!(s.status==="created"||s.status==="duplicate"||s.status==="failed")||s.name!==void 0&&typeof s.name!="string"||s.error!==void 0&&typeof s.error!="string")throw new Error(V("client.invalidEnvironmentCodeImport"));return{index:s.index,status:s.status,name:s.name??"",environment:s.environment===void 0||s.environment===null?void 0:qF(s.environment),error:s.error??""}})}async function v0e(e,t,n,i){let r;try{r=await Ot(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:i})}catch(s){throw s instanceof DOMException&&s.name==="AbortError"?s:s instanceof TypeError?new Error(V("client.studioUnavailable")):s}if(!r.ok)throw new Error(await Jt(r,V("client.saveEnvironmentFailed")));return qF(await r.json())}function x0e(e,t){return v0e("/web/v3/environments","POST",e,t)}function O0e(e,t,n){return v0e(`/web/v3/environments/${encodeURIComponent(e)}`,"PATCH",t,n)}async function w0e(e,t){const n=await Ot(`/web/v3/environments/${encodeURIComponent(e)}`,{method:"DELETE",signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.deleteEnvironmentFailed")))}async function m4(e,t){const n=await Ot(`/web/v3/environments/${encodeURIComponent(e)}/build`,{method:"POST",signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.startEnvironmentBuildFailed")));const i=HF(await n.json());if(!i)throw new Error(V("client.invalidEnvironmentBuild"));return i}async function S0e(e,t,n={}){const i=n.includeLogs?"?includeLogs=true":"",r=await Ot(`/web/v3/environments/${encodeURIComponent(e)}/builds/${encodeURIComponent(t)}${i}`,{signal:n.signal});if(!r.ok)throw new Error(await Jt(r,V("client.loadEnvironmentBuildFailed")));const s=HF(await r.json());if(!s)throw new Error(V("client.invalidEnvironmentBuild"));return s}async function k0e(e,t,n){const i=await Ot(`/web/v3/environments/${encodeURIComponent(e)}/builds/${encodeURIComponent(t)}/manifest`,{signal:n});if(!i.ok)throw new Error(await Jt(i,V("client.loadEnvironmentManifestFailed")));return l0e(await i.json())}function wW(e){if(!e||typeof e!="object")throw new Error(V("client.invalidEnvironmentResource"));const t=e;if(t.source!=="provided"&&t.source!=="managed"||typeof t.consoleUrl!="string")throw new Error(V("client.invalidEnvironmentResource"));return t}async function E0e(e){const t=await Ot("/web/v3/environment-resources",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadEnvironmentResourcesFailed")));const n=await t.json();if(n.provider!=="volcengine"&&n.provider!=="byteplus"||typeof n.region!="string")throw new Error(V("client.invalidEnvironmentResource"));return{provider:n.provider,region:n.region,codePipeline:wW(n.codePipeline),containerRegistry:wW(n.containerRegistry)}}async function MBe(e,t){const n=await Ot(`/web/system-info/sandbox-tools/${encodeURIComponent(e)}/model-env`,{method:"POST",signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.updateCodexSandboxFailed")));const i=await n.json();if(i.kind!=="codex"&&i.kind!=="codex_snapshot"||typeof i.toolId!="string"||typeof i.updated!="boolean")throw new Error(V("client.invalidCodexSandboxUpdate"));return i}async function Yj(e){const t=await Ot("/web/identity/user-pools",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadUserPoolsFailed")));const n=await t.json();if(!Array.isArray(n.items))throw new Error(V("client.invalidUserPoolList"));return n.items.map(i=>{if(!i||typeof i!="object"||typeof i.uid!="string"||typeof i.name!="string"||typeof i.domain!="string"||typeof i.region!="string"||typeof i.isCurrent!="boolean")throw new Error(V("client.invalidUserPoolList"));return i})}const pw=new Map;function LBe(e){if(typeof e=="string")return e?{message:e}:null;if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=typeof t.message=="string"?t.message:typeof t.error=="string"?t.error:"";return n?{message:n,phase:typeof t.phase=="string"?t.phase:void 0,runtimeId:typeof t.runtimeId=="string"?t.runtimeId:void 0,logPath:typeof t.logPath=="string"?t.logPath:void 0}:null}class mw extends Error{constructor(t){super(t.message),this.detail=t,this.name="GithubCicdPipelineError"}}async function $h(e){const t=await e.text().catch(()=>"");if(t)try{const n=JSON.parse(t),i=LBe(n.detail??n.error);if(i)return new mw(i)}catch{return new mw({message:t})}return new mw({message:V("client.syncGithubFailed",{status:e.status})})}async function C0e(e){const t=await Ot("/web/github-delivery/source-sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project:e.project,githubUrl:e.githubUrl,githubToken:e.githubToken,baseBranch:e.baseBranch,region:e.region,cloudProvider:e.cloudProvider})},{},0);if(!t.ok)throw await $h(t);return t.json()}async function T0e(e){const t=await Ot("/web/github-delivery/cicd-pipeline",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({githubUrl:e.githubUrl,githubToken:e.githubToken,baseBranch:e.baseBranch,runtimeName:e.runtimeName,runtimeId:e.runtimeId,region:e.region,cloudProvider:e.cloudProvider,projectPath:e.projectPath??".",volcengineAccessKey:e.volcengineAccessKey,volcengineSecretKey:e.volcengineSecretKey,volcengineSessionToken:e.volcengineSessionToken??""})},{},0);if(!t.ok)throw await $h(t);return t.json()}async function A0e(e){const t=await Ot("/web/github-delivery/init-main",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project:e.project,githubUrl:e.githubUrl,githubToken:e.githubToken,baseBranch:e.baseBranch,runtimeName:e.runtimeName,runtimeId:e.runtimeId,region:e.region,cloudProvider:e.cloudProvider,projectPath:e.projectPath??".",volcengineAccessKey:e.volcengineAccessKey,volcengineSecretKey:e.volcengineSecretKey,volcengineSessionToken:e.volcengineSessionToken??""})},{},0);if(!t.ok)throw await $h(t);return t.json()}async function $Be(e){const t=await Ot("/web/github-delivery/source-sync/cicd",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipelineId:e.pipelineId,runtimeName:e.runtimeName,runtimeId:e.runtimeId,region:e.region,cloudProvider:e.cloudProvider,projectPath:e.projectPath??".",volcengineAccessKey:e.volcengineAccessKey,volcengineSecretKey:e.volcengineSecretKey,volcengineSessionToken:e.volcengineSessionToken??""})},{},0);if(!t.ok)throw await $h(t);return t.json()}async function _0e(e){const t=await Ot(`/web/github-cicd/runtime-binding?runtimeId=${encodeURIComponent(e)}`);if(!t.ok)throw await $h(t);const n=await t.json();return n.pipelineId?n:null}async function W2(e){const t=await Ot(`/web/github-delivery/versions?runtimeId=${encodeURIComponent(e)}`);if(!t.ok)throw await $h(t);return t.json()}async function N0e(e){const t=await Ot("/web/github-delivery/rollback-pr",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw await $h(t);return t.json()}async function KF(e){const t=await Ot("/web/github-cicd/runtime-binding",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw await $h(t);return t.json()}async function j0e(e){const t=await Ot("/web/github-cicd/runtime-sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runtimeId:e.runtimeId,project:e.project})},{},0);if(!t.ok)throw await $h(t);return t.json()}async function kx(e,t,n,i){var f,h,p,g,b;const r=i==null?void 0:i.taskId,s=r?new AbortController:void 0;r&&s&&pw.set(r,s);const a=()=>{r&&pw.get(r)===s&&pw.delete(r)};let l;try{const v=!!(i!=null&&i.migrationTaskId);(f=i==null?void 0:i.onStage)==null||f.call(i,{level:"info",phase:"upload",message:V(v?"client.validatingMigrationArtifact":"client.uploadingCodePackage"),pct:0}),l=await Ot("/web/deploy-agentkit",{method:"POST",headers:{"Content-Type":"application/json"},signal:s==null?void 0:s.signal,body:JSON.stringify({name:e,files:v?[]:t,config:n,taskId:r,migrationTaskId:i==null?void 0:i.migrationTaskId,runtimeId:i==null?void 0:i.runtimeId,runtimeName:i==null?void 0:i.runtimeName,appName:i==null?void 0:i.appName,editMode:i==null?void 0:i.editMode,draft:i==null?void 0:i.draft,updateEtag:i==null?void 0:i.updateEtag,baseRuntimeVersion:i==null?void 0:i.baseRuntimeVersion,removeRuntimeEnvKeys:i==null?void 0:i.removeRuntimeEnvKeys,mcpSecretValues:i==null?void 0:i.mcpSecretValues,mcpCredentialReuses:i==null?void 0:i.mcpCredentialReuses,sessionStorage:i==null?void 0:i.sessionStorage,minInstance:i==null?void 0:i.minInstance,maxInstance:i==null?void 0:i.maxInstance,createEvaluationSets:i==null?void 0:i.createEvaluationSets,description:nBe((i==null?void 0:i.description)??""),authentication:i==null?void 0:i.authentication,im:i==null?void 0:i.im,envs:i==null?void 0:i.envs,resources:i==null?void 0:i.resources,source:(i==null?void 0:i.source)??(i!=null&&i.migrationTaskId?{kind:"migration",migrationId:i.migrationTaskId}:{kind:"inlineFiles"}),harnessSidecar:i==null?void 0:i.harnessSidecar,environment:i==null?void 0:i.environment})},{},0),(h=i==null?void 0:i.onStage)==null||h.call(i,{level:"success",phase:"upload",message:V(v?"client.migrationArtifactValidated":"client.codePackageUploaded"),pct:100})}catch(v){throw a(),v}if(!l.ok){const v=await Jt(l,V("client.deploymentFailed"));throw a(),new Error(v)}let c=null;try{for await(const v of Hj(l)){const y=v;if(y&&y.done){c=y;break}y&&y.message&&((p=i==null?void 0:i.onStage)==null||p.call(i,y))}}catch(v){throw a(),v}if(a(),!c)throw new Error(V("client.deploymentDisconnected"));if(!c.success)throw new Error(c.error||V("client.deploymentFailed"));if(!c.agentName)throw new Error(V("client.deploymentMissingAgentName"));if(!c.runtimeId&&!c.url)throw new Error(V("client.deploymentMissingConnection"));const u=(g=c.runtimeName)!=null&&g.trim()?c.agentName:e,d=((b=c.runtimeName)==null?void 0:b.trim())||c.agentName;return{apikey:c.apikey??"",url:c.url??"",agentName:u,runtimeName:d,runtimeId:c.runtimeId,consoleUrl:c.consoleUrl,region:c.region,version:c.version,warnings:c.warnings,feishuChannel:c.feishuChannel}}async function R0e(e){var n;const t=await Ot("/web/cancel-deploy-agentkit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({taskId:e})});if(!t.ok){const i=await t.text().catch(()=>"");throw new Error(i||V("client.cancelDeploymentFailed",{status:t.status}))}(n=pw.get(e))==null||n.abort(),pw.delete(e)}async function FBe(e=RF){const t=await Ot(`/web/my-runtimes?region=${encodeURIComponent(e)}`);if(!t.ok)throw new Error(V("client.loadFailed",{status:t.status}));return(await t.json()).runtimes??[]}const fS={title:"AgentKit Studio",logoUrl:""},g4={enabled:!1},CD={studio:!1,version:"",provider:"volcengine",branding:fS,features:{newChat:!0,search:!0,skillCenter:!0,history:!0,addAgent:!0,manageAgents:!0,agentUsage:!1,addAgentkit:!0,generatedAgentTestRun:!0},defaultView:"chat",agentsSource:"local",telemetry:g4};function BBe(e){if(!e||typeof e!="object")return g4;const t=e;if(t.enabled!==!0||!t.studio||typeof t.studio!="object")return g4;const n=t.studio;return{enabled:!0,studio:{deployId:typeof n.deployId=="string"?n.deployId:"",userPoolId:typeof n.userPoolId=="string"?n.userPoolId:"",applicationId:typeof n.applicationId=="string"?n.applicationId:"",functionId:typeof n.functionId=="string"?n.functionId:"",region:typeof n.region=="string"?n.region:"",project:typeof n.project=="string"?n.project:"",version:typeof n.version=="string"?n.version:"",accountId:typeof n.accountId=="string"?n.accountId:"",accountIdResolutionError:typeof n.accountIdResolutionError=="string"?n.accountIdResolutionError:""}}}async function I0e(){var e,t;try{const n=await Ot("/web/ui-config");if(!n.ok)return CD;const i=await n.json(),r=typeof((e=i.branding)==null?void 0:e.logoUrl)=="string"?i.branding.logoUrl:fS.logoUrl,s=i.provider==="byteplus"?"byteplus":"volcengine";return Mbe(s),{studio:i.studio??!1,version:typeof i.version=="string"?i.version:"",provider:s,branding:{title:typeof((t=i.branding)==null?void 0:t.title)=="string"?i.branding.title:fS.title,logoUrl:r?Lo(r):""},features:{...CD.features,...i.features??{}},defaultView:i.defaultView??"chat",agentsSource:i.agentsSource==="cloud"?"cloud":"local",telemetry:BBe(i.telemetry)}}catch{return CD}}const P0e={role:"user",telemetry:{userId:"",accountId:""},capabilities:{createAgents:!1,createPersonalAgents:!1,manageAgents:!1,runtimeScope:"mine"}};async function D0e(){var n,i,r,s,a;const e=await Ot("/web/access");if(!e.ok)throw new Error(V("client.loadPermissionsFailed",{status:e.status}));const t=await e.json();if(!["admin","developer","user"].includes(t.role)||typeof((n=t.telemetry)==null?void 0:n.userId)!="string"||t.telemetry.accountId!==void 0&&typeof t.telemetry.accountId!="string"||typeof((i=t.capabilities)==null?void 0:i.createAgents)!="boolean"||typeof((r=t.capabilities)==null?void 0:r.createPersonalAgents)!="boolean"||typeof((s=t.capabilities)==null?void 0:s.manageAgents)!="boolean"||!["all","mine"].includes((a=t.capabilities)==null?void 0:a.runtimeScope))throw new Error(V("client.invalidPermissionResponse"));return t}async function M0e(e,t){const n=new URLSearchParams;e&&n.set("targetVersion",e),t&&n.set("startedAt",String(t));const i=n.size?`?${n.toString()}`:"",r=await Ot(`/web/studio-update${i}`);if(!r.ok)throw new Error(V("client.checkStudioUpdateFailed",{status:r.status}));return await r.json()}async function L0e(){const e=await Ot("/web/studio-update/permissions");if(!e.ok){let t="";try{const n=await e.json();t=typeof n.detail=="string"?n.detail:""}catch{t=""}throw new Error(t||V("client.studioUpdatePreflightFailed",{status:e.status}))}return await e.json()}async function $0e(e){const t=await Ot("/web/studio-update",{method:"POST",headers:{"Content-Type":"application/json","X-VeADK-Studio-Update":"1"},body:JSON.stringify({version:e})},{},ls);if(!t.ok){let n="";try{const i=await t.json();n=typeof i.detail=="string"?i.detail:""}catch{n=""}throw new Error(n||V("client.submitStudioUpdateFailed",{status:t.status}))}return await t.json()}async function F0e({runtimeId:e,region:t,appName:n,page:i=1,pageSize:r=20,signal:s}){const a=new URLSearchParams({runtimeId:e,region:t,appName:n,page:String(i),pageSize:String(r)}),l=await Ot(`/web/agent-usage?${a.toString()}`,{signal:s});if(!l.ok)throw new Error(await Jt(l,V("client.loadAgentUsageFailed")));const c=l.headers.get("content-type")||V("client.notProvided"),u=c.toLowerCase();if(!u.includes("application/json")&&!u.includes("+json"))throw new Error(V("client.agentUsageNonJson",{status:l.status,contentType:c})+V("client.checkStudioGateway"));try{return await l.json()}catch{throw new Error(V("client.agentUsageInvalidJson",{status:l.status,contentType:c})+V("client.retryCheckGateway"))}}function Fh(e=""){return`/web/cronjobs${e?`/${encodeURIComponent(e)}`:""}`}async function b4(e){const t=await Ot(Fh(),{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadCronJobsFailed")));const n=await t.json();return Array.isArray(n)?n:n.items??[]}async function UBe(e,t){const n=await Ot(Fh(e),{signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.loadCronJobFailed")));return await n.json()}async function B0e(e){const t=await Ot(Fh(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await Jt(t,V("client.createCronJobFailed")));return await t.json()}async function U0e(e,t){const n=await Ot(`${Fh(e)}/update`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await Jt(n,V("client.updateCronJobFailed")));return await n.json()}async function Q0e(e,t){const n=t?"enable":"disable",i=await Ot(`${Fh(e)}/${n}`,{method:"POST"});if(!i.ok)throw new Error(await Jt(i,V(t?"client.enableCronJobFailed":"client.pauseCronJobFailed")));return await i.json()}async function z0e(e){const t=await Ot(`${Fh(e)}/run`,{method:"POST"});if(!t.ok)throw new Error(await Jt(t,V("client.runCronJobFailed")));return await t.json()}async function y4(e,t){const n=await Ot(`${Fh(e)}/runs`,{signal:t});if(!n.ok)throw new Error(await Jt(n,V("client.loadCronHistoryFailed")));const i=await n.json();return Array.isArray(i)?i:i.items??[]}async function V0e(e,t){const n=await Ot(`${Fh(e)}/runs/${encodeURIComponent(t)}/cancel`,{method:"POST"});if(!n.ok)throw new Error(await Jt(n,V("client.stopCronRunFailed")));return await n.json()}async function H0e(e){const t=await Ot(Fh(e),{method:"DELETE"});if(!t.ok)throw new Error(await Jt(t,V("client.deleteCronJobFailed")))}class GF extends Error{constructor(t,n){super(t),this.status=n,this.name="RuntimeListError"}}async function Ex(e={}){const t=new URLSearchParams({scope:e.scope??"all",page_size:String(e.pageSize??30),region:e.region??"all"});e.nextToken&&t.set("next_token",e.nextToken);const n=await Ot(`/web/runtimes?${t.toString()}`,{signal:e.signal});if(!n.ok){const r=await Jt(n,V("client.loadRuntimeFailed"));throw new GF(r,n.status)}const i=await n.json();return{runtimes:i.runtimes??[],nextToken:i.nextToken??""}}async function Dv(e,t,n={}){if(n.preferCached){const i=$F(e,t,n.currentVersion),r=Hy.get(i);if(r&&r.expiresAt>Date.now())return[...r.apps];r&&Hy.delete(i)}try{const i={runtimeId:e,region:t,runtimeVersion:n.currentVersion};return n.retryProbe&&(i.retryProbe=!0),await $k("","",i,n.signal,n.timeoutMs)}catch(i){if(i instanceof wx||i instanceof Ls||i instanceof Error)throw i;return null}}async function q0e(e,t){const n=new URLSearchParams({region:t}),i=await Ot(`/web/runtime-tool-channel/${encodeURIComponent(e)}/capabilities?${n.toString()}`);if(!i.ok)throw new Ls(await Jt(i,V("client.loadLocalToolsFailed")),!1,!0);return await i.json()}async function W0e(e,t){const n=new URLSearchParams({region:t}),i=await Ot(`/web/runtime-route-channel/${encodeURIComponent(e)}/connect?${n.toString()}`,{method:"POST"});if(!i.ok)throw new Ls(await Jt(i,V("client.connectDynamicRouteFailed")),!1,!0);return await i.json()}async function K0e(e,t,n={}){const i={runtimeId:e,region:t};n.retryProbe&&(i.retryProbe=!0);const r=await Ot("/.well-known/agent-card.json",{},i),s=await Lbe(r);if(s==="runtime_access_denied")throw new wx;if(s==="runtime_private_endpoint_unreachable")throw new Ls(Ibe());if(["runtime_proxy_connect_error","runtime_proxy_timeout"].includes(s))throw new Ls(Pbe());if(r.status===404)return null;if(r.status===401||r.status===403)throw new Ls(V("client.a2aProbeDenied"));if(!r.ok)throw new Error(await Jt(r,V("client.loadA2aCardFailed")));const a=await r.json().catch(()=>null),l=typeof(a==null?void 0:a.url)=="string"?a.url.trim():"";return l?{name:typeof(a==null?void 0:a.name)=="string"?a.name:"",description:typeof(a==null?void 0:a.description)=="string"?a.description:"",endpoint:l}:null}async function G0e(e,t){const n=new URLSearchParams({runtimeId:e,region:t}),i=await Ot(`/web/runtime-api-key/reveal?${n.toString()}`,{method:"POST",cache:"no-store"});if(!i.ok)throw new Error(await Jt(i,V("client.loadRuntimeApiKeyFailed")));const r=await i.json();if(typeof r.apiKey!="string"||!r.apiKey)throw new Error(V("client.runtimeApiKeyMissing"));return r.apiKey}async function X0e(e,t){const n=await Ot("/web/delete-runtime",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runtimeId:e,region:t})});if(!n.ok){const i=await n.text().catch(()=>"");throw new Error(i||V("client.deleteFailed",{status:n.status}))}}function K2({runtimeId:e,region:t,appName:n,currentVersion:i}){return Qb(dS,t,e,i??"",(n==null?void 0:n.trim())??"")}async function QBe({runtimeId:e,region:t,appName:n,currentVersion:i,force:r=!1}){const s=new URLSearchParams({runtimeId:e,region:t});n&&s.set("appName",n),i!=null&&s.set("currentVersion",String(i)),r&&s.set("refresh","true");const a=await Ot(`/web/runtime-update-capability?${s.toString()}`);if(!a.ok)throw new Error(await zBe(a));return await a.json()}function Zj({runtimeId:e,region:t,appName:n,currentVersion:i,signal:r,force:s=!1}){var u,d;const a={runtimeId:e,region:t,appName:n,currentVersion:i},l=K2(a);if(s&&Cr.delete(l),!s){const f=Lm(Cr,l,Sx);if(f)return qC(Promise.resolve(f),r);const h=(u=Cr.get(l))==null?void 0:u.promise;if(h)return qC(h,r);if(n){const p=K2({...a,appName:""}),g=(d=Cr.get(p))==null?void 0:d.promise;if(g){let b;return b=g.then(v=>{var x,w,O,k,S;if(v.recoveryStatus==="preparing")return((x=Cr.get(l))==null?void 0:x.promise)===b&&Cr.delete(l),v;const y=((O=(w=v.agent)==null?void 0:w.appName)==null?void 0:O.trim())??"";return y&&y!==n.trim()?(((k=Cr.get(l))==null?void 0:k.promise)===b&&Cr.delete(l),Zj(a)):(((S=Cr.get(l))==null?void 0:S.promise)===b&&Cr.set(l,{value:v,updatedAt:Date.now()}),v)},v=>{var y;throw((y=Cr.get(l))==null?void 0:y.promise)===b&&Cr.delete(l),v}),Cr.set(l,{promise:b,updatedAt:0}),qC(b,r)}}}let c;return c=QBe({...a,force:s}).then(f=>{var h,p,g,b,v;if(f.recoveryStatus==="preparing")return((h=Cr.get(l))==null?void 0:h.promise)===c&&Cr.delete(l),f;if(((p=Cr.get(l))==null?void 0:p.promise)===c){Cr.set(l,{value:f,updatedAt:Date.now()});const y=new Set(["",((b=(g=f.agent)==null?void 0:g.appName)==null?void 0:b.trim())??""]);for(const x of y){const w=K2({...a,appName:x});w!==l&&!((v=Cr.get(w))!=null&&v.promise)&&Cr.set(w,{value:f,updatedAt:Date.now()})}}return f},f=>{var h;throw((h=Cr.get(l))==null?void 0:h.promise)===c&&Cr.delete(l),f}),Cr.set(l,{promise:c,updatedAt:0}),qC(c,r)}function v4({runtimeId:e,region:t,appName:n,currentVersion:i}){return Lm(Cr,K2({runtimeId:e,region:t,appName:n,currentVersion:i}),Sx)}function x4(e){return Zj(e).then(()=>{},()=>{})}function O4(e,t){if(!e){Cr.clear();return}for(const n of Cr.keys()){const[i,r,s]=n.split("");i===dS&&s===e&&(!t||r===t)&&Cr.delete(n)}}async function zBe(e){const t=await e.json().catch(()=>null),n=typeof(t==null?void 0:t.detail)=="string"?t.detail:"";return e.status===403?V("client.runtimeManageForbidden"):e.status===404?V(n==="runtime_not_found"?"client.runtimeNotFound":"client.runtimeUnavailable"):V("client.checkRuntimeUpdateFailed",{status:e.status})}async function VBe(e,t){let n=null;for(const i of Lk(t)){const r=await Ot(`/web/runtime-detail?runtimeId=${encodeURIComponent(e)}®ion=${encodeURIComponent(i)}`);if(r.ok)return r.json();n=new Error(await Jt(r,V("client.loadRuntimeDetailFailed")))}throw n??new Error(V("client.loadRuntimeDetailFailed"))}async function XF(e,t="cn-beijing",n={}){const i=Qb(e,t||"cn-beijing"),r=Lm(yg,i,Sx);if(!n.force&&r)return r;const s=yg.get(i);if(!n.force&&(s!=null&&s.promise))return s.promise;const a=VBe(e,t).then(l=>FF(yg,i,l));yg.set(i,{...s,promise:a,updatedAt:(s==null?void 0:s.updatedAt)??0});try{return await a}finally{const l=yg.get(i);(l==null?void 0:l.promise)===a&&yg.set(i,{value:l.value,updatedAt:l.updatedAt})}}function Y0e(e,t="cn-beijing"){return Lm(yg,Qb(e,t||"cn-beijing"),Sx)}function Z0e(e,t="cn-beijing"){XF(e,t).catch(()=>{})}async function gw(e){const t=await Ot("/web/generated-agent-projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:e})});if(!t.ok)throw new Error(await Jt(t,V("client.generateProjectFailed")));return t.json()}const HBe=19e4;async function J0e(e){const t=await Ot("/web/generated-agent-drafts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requirement:e})},{},HBe);if(!t.ok)throw new Error(await Jt(t,V("client.generateAgentConfigFailed")));return Vj(t,V("client.generateAgentConfigFailed"))}async function eye(e,t){const n=await Ot("/web/generated-agent-test-runs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:e,runtimeId:t==null?void 0:t.runtimeId,runtimeRegion:t==null?void 0:t.region})});if(!n.ok)throw new Error(await Jt(n,V("client.createDebugRunFailed")));return Vj(n,V("client.createDebugRunFailed"))}async function tye(e,t){const n=await Ot(`/web/generated-agent-test-runs/${e}/sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:t})});if(!n.ok)throw new Error(await Jt(n,V("client.createDebugSessionFailed")));return(await Vj(n,V("client.createDebugSessionFailed"))).id}async function nye(e,t){const n=await Ot(`/web/generated-agent-test-runs/${encodeURIComponent(e)}/trace/session/${encodeURIComponent(t)}`);if(!n.ok)throw new Error(await Jt(n,V("client.loadDebugTraceFailed")));const i=await Vj(n,V("client.loadDebugTraceFailed"));if(!Array.isArray(i))throw new Error(V("client.invalidDebugTrace"));return i}async function*iye({runId:e,userId:t,sessionId:n,text:i,signal:r}){const s=i.trim()?[{text:i}]:[],a=t0e(r);let l;try{l=await Ot(`/web/generated-agent-test-runs/${e}/run_sse`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user_id:t,session_id:n,new_message:{role:"user",parts:s},streaming:!0}),signal:a.signal},{},0)}catch(c){throw a.cleanup(),a.timedOut()?new Error(Pv()):c}if(!l.ok)throw a.cleanup(),new Error(await Jt(l,V("client.debugRunFailed")));try{for await(const c of Hj(l))a.clearDeadline(),yield c}catch(c){throw a.timedOut()?new Error(Pv()):c}finally{a.cleanup()}}async function G0(e){const t=await Ot(`/web/generated-agent-test-runs/${e}`,{method:"DELETE"});if(!t.ok&&t.status!==404)throw new Error(await Jt(t,V("client.cleanupDebugRunFailed")))}function rye(e){if(!e||typeof e!="object")throw new Error(V("client.invalidSandboxVersion"));const t=e;if(typeof t.toolId!="string"||typeof t.error!="string")throw new Error(V("client.invalidSandboxVersion"));if(!t.error&&(t.provider!=="volcengine"&&t.provider!=="byteplus"||typeof t.region!="string"||typeof t.status!="string"||typeof t.currentImage!="string"||typeof t.latestImage!="string"||typeof t.needsImageUpdate!="boolean"||typeof t.canUpdate!="boolean"||typeof t.needsModelEnvUpdate!="boolean"||typeof t.canUpdateModelEnv!="boolean"||typeof t.modelEnvError!="string"))throw new Error(V("client.invalidSandboxVersion"));return t}async function sye(e){const t=await Ot("/web/system-info/sandbox-tools/updates",{signal:e});if(!t.ok)throw new Error(await Jt(t,V("client.loadSandboxVersionsFailed")));const n=await t.json();if(!Array.isArray(n.tools))throw new Error(V("client.invalidSandboxVersion"));return n.tools.map(rye)}async function aye(e){const t=await Ot(`/web/system-info/sandbox-tools/${encodeURIComponent(e)}/update`,{method:"POST"},{},33e4);if(!t.ok)throw new Error(await Jt(t,V("client.updateSandboxFailed")));const n=await t.json();if(typeof n.updated!="boolean")throw new Error(V("client.invalidSandboxUpdate"));return{updated:n.updated,state:rye(n.state)}}const qBe=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_SITE_BRANDING:fS,DEFAULT_STUDIO_ACCESS:P0e,GithubCicdPipelineError:mw,RuntimeAccessDeniedError:wx,RuntimeListError:GF,RuntimeProbeError:Ls,attachGithubDeliveryCicdToSourceSync:$Be,bindGithubCicdRuntime:KF,buildEnvironment:m4,cancelAgentkitDeployment:R0e,cancelCronJobRun:V0e,checkRuntimeNameAvailability:Xj,clearMessageFeedbackCache:Abe,clearRemoteApps:Nbe,componentSearch:Zbe,createCronJob:B0e,createEnvironment:x0e,createGeneratedAgentTestRun:eye,createGeneratedAgentTestSession:tye,createGithubCicdPipeline:C0e,createGithubDeliveryCicdPipeline:T0e,createGithubDeliveryRollbackPr:N0e,createSession:$be,createWorkspace:f0e,deleteAgentFeedbackCases:Vbe,deleteCronJob:H0e,deleteEnvironment:w0e,deleteGeneratedAgentTestRun:G0,deleteMedia:H2,deleteRuntime:X0e,deleteSession:u4,deleteSessionMedia:d4,deleteWorkspace:p0e,deployAgentkitProject:kx,downloadArtifact:UF,ensureRuntimeRouteChannel:W0e,exportEnvironmentShareCode:g0e,fetchRemoteApps:$k,generateAgentDraftFromRequirement:J0e,generateAgentProject:gw,getAgentFeedbackCases:Gj,getAgentInfo:h4,getAgentOptimizations:Bbe,getAgentUsage:F0e,getAutomaticEvaluationStatuses:c4,getCachedAgentFeedbackCases:Ube,getCachedRuntimeAgentInfo:Xbe,getCachedRuntimeDetail:Y0e,getCachedRuntimeUpdateCapability:v4,getCronJob:UBe,getEnvironmentBuild:S0e,getEnvironmentManifest:k0e,getEnvironmentResources:E0e,getGeneratedAgentTestTrace:nye,getGithubCicdRuntimeBinding:_0e,getGithubDeliveryVersions:W2,getMediaCapabilities:jBe,getMyRuntimes:FBe,getRuntimeAgentInfo:zF,getRuntimeDetail:XF,getRuntimeStudioToolCapabilities:q0e,getRuntimeUpdateCapability:Zj,getRuntimes:Ex,getSandboxImageUpdates:sye,getSession:Kj,getSessionTrace:A_,getStudioAccess:D0e,getStudioUpdatePermissions:L0e,getStudioUpdateStatus:M0e,getSystemInfo:a0e,getUiConfig:I0e,httpErrorMessage:Jt,importEnvironmentShareCodes:y0e,initializeGithubDeliveryMain:A0e,inspectEnvironmentRepository:m0e,inspectEnvironmentShareCodes:b0e,invalidateRuntimeUpdateCapabilityCache:O4,listApps:Rbe,listCronJobRuns:y4,listCronJobs:b4,listDeploymentResources:n0e,listEnvironments:Fk,listIdentityUserPools:Yj,listModelApiKeys:LF,listModelOptions:Ox,listSessions:BF,listWorkspaces:WF,mediaContentUrl:Kbe,parseEnvironmentManifest:l0e,parseEnvironmentShareCodes:VF,parsePreparedSessionEnvironmentMounts:i0e,prefetchAgentFeedbackCases:_Be,prefetchRuntimeAgentInfo:Ybe,prefetchRuntimeDetail:Z0e,prefetchRuntimeUpdateCapability:x4,prepareSessionEnvironmentMounts:r0e,previewArtifact:QF,probeRuntimeA2a:K0e,probeRuntimeApps:Dv,refreshAgentFeedbackCases:Qbe,registerRemoteApp:_be,revealModelApiKey:jbe,revealRuntimeApiKey:G0e,runCronJobNow:z0e,runGeneratedAgentTestSSE:iye,runSSE:p4,runSseEmptyResponseError:e0e,runSseFirstEventTimeoutError:Pv,runSseIncompleteResponseError:q2,runtimeRegionCandidates:Lk,setClientCloudProvider:Mbe,setCronJobEnabled:Q0e,startStudioUpdate:$0e,studioFetch:Ln,submitIssueFeedback:f4,submitMessageFeedback:Fbe,syncGithubCicdRuntime:j0e,updateCodexSandboxToolModelEnv:MBe,updateCronJob:U0e,updateEnvironment:O0e,updateSandboxTool:aye,updateWorkspace:h0e,uploadMedia:qbe,upsertCachedAgentFeedbackCase:V2,webSearch:Jbe,writeEnvironmentShareCode:s0e},Symbol.toStringTag,{value:"Module"})),SW=Object.freeze({totalTokenCount:0,promptTokenCount:0,candidatesTokenCount:0,thoughtsTokenCount:0,cachedContentTokenCount:0}),G2=Object.freeze({modelName:"",current:SW,cumulative:SW}),WBe={totalTokenCount:"total_token_count",promptTokenCount:"prompt_token_count",candidatesTokenCount:"candidates_token_count",thoughtsTokenCount:"thoughts_token_count",cachedContentTokenCount:"cached_content_token_count"},KBe=24,GBe=64,XBe=16;function WC(e){var l,c;const t=e.trim();if(!t)return 0;const n=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/gu,i=((l=t.match(n))==null?void 0:l.length)??0,r=t.replace(n," "),s=(r.match(/[A-Za-z0-9_]+/g)??[]).reduce((u,d)=>u+Math.max(1,Math.ceil(d.length/4)),0),a=((c=r.match(/[^\sA-Za-z0-9_]/g))==null?void 0:c.length)??0;return i+s+a}function YBe(e){var l,c,u;const t=((l=e.instruction)==null?void 0:l.trim())??"",n=((c=e.tools)==null?void 0:c.filter(d=>d.trim()))??[],i=((u=e.skills)==null?void 0:u.filter(d=>d.name.trim()))??[],r=WC(t),s=n.reduce((d,f)=>d+GBe+WC(f),0),a=i.reduce((d,f)=>d+XBe+WC(f.name)+WC(f.description??""),0);return KBe+r+s+a}function ZBe({usage:e,contextWindow:t,estimatedSystemTokens:n}){const i=Math.max(1,Math.round(t)),r=Math.max(0,e.current.promptTokenCount),s=Math.max(r,e.current.totalTokenCount),a=Math.min(i,r>0?Math.min(r,Math.max(0,n??0)):Math.max(0,n??0)),l=Math.max(0,r-a),c=r>0?Math.max(0,s-r):Math.max(0,s),u=r>0?s:a+c;return{systemTokens:a,inputTokens:l,outputTokens:c,remainingTokens:Math.max(0,i-u),usedTokens:u,contextWindow:i}}function JBe(e){const t=[{kind:"system",tokens:e.systemTokens},{kind:"input",tokens:e.inputTokens},{kind:"output",tokens:e.outputTokens},{kind:"remaining",tokens:e.remainingTokens}],n=e.contextWindow/100;let i=0;const r=t.map(s=>{const a=i;return i+=s.tokens,{...s,start:a,end:i}});return Array.from({length:100},(s,a)=>{const l=a*n,c=l+n,u=r.flatMap(d=>{const f=Math.max(0,Math.min(c,d.end)-Math.max(l,d.start));return f>0?[{kind:d.kind,share:f/n}]:[]});return{index:a,slices:u}})}function P1(e,t){const n=e,i=n[t]??n[WBe[t]];return typeof i=="number"&&Number.isFinite(i)&&i>0?Math.round(i):0}function eUe(e){const t=P1(e,"promptTokenCount"),n=P1(e,"candidatesTokenCount"),i=P1(e,"thoughtsTokenCount");return{totalTokenCount:P1(e,"totalTokenCount")||t+n+i,promptTokenCount:t,candidatesTokenCount:n,thoughtsTokenCount:i,cachedContentTokenCount:P1(e,"cachedContentTokenCount")}}function tUe(e,t){return{totalTokenCount:e.totalTokenCount+t.totalTokenCount,promptTokenCount:e.promptTokenCount+t.promptTokenCount,candidatesTokenCount:e.candidatesTokenCount+t.candidatesTokenCount,thoughtsTokenCount:e.thoughtsTokenCount+t.thoughtsTokenCount,cachedContentTokenCount:e.cachedContentTokenCount+t.cachedContentTokenCount}}function oye(e,t){if(!t)return e;const n=typeof t.modelVersion=="string"?t.modelVersion.trim():"",i=typeof t.model_version=="string"?t.model_version.trim():"",r=n||i||e.modelName,s=t.usageMetadata??t.usage_metadata;if(!s)return r===e.modelName?e:{...e,modelName:r};const a=eUe(s);return a.totalTokenCount===0?r===e.modelName?e:{...e,modelName:r}:{modelName:r,current:a,cumulative:tUe(e.cumulative,a)}}function kW(e){return e.reduce((t,n)=>oye(t,n),G2)}function EW(e){return e.blocks.flatMap(t=>t.kind==="tool"?[{name:t.name,args:t.args,response:t.response,done:t.done}]:[])}function nUe(e){const t=e.attributes;return String(t["invocation.id"]??t["gen_ai.invocation.id"]??t["gcp.vertex.agent.invocation_id"]??"")}function iUe(e,t){if(!t)return e;const n=new Set(e.filter(r=>nUe(r)===t).map(r=>r.trace_id)),i=e.filter(r=>n.has(r.trace_id));return i.length>0?i:e}function hb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function Fp(e){return typeof e=="string"?e:""}function lye(e,t){return e==="pending"||e==="running"||e==="completed"||e==="failed"?e:t}function rUe(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return{}}const n=hb(t)??{};return hb(n.result)??n}function sUe(e){var n;const t=(n=hb(e))==null?void 0:n.branches;return Array.isArray(t)?t.map(i=>{var r;return Fp((r=hb(i))==null?void 0:r.label)}):[]}function cye(e,t,n){const i=sUe(e),r=rUe(t),s=Array.isArray(r.branches)?r.branches:[],a=n==="running"?"running":"pending";return{branches:[0,1].map(c=>{const u=hb(s[c])??{};return{label:Fp(u.label)||i[c]||`方向 ${c+1}`,content:Fp(u.content),status:lye(u.status,a),error:Fp(u.error)}})}}function aUe(e){const t=hb(e),n=hb(t==null?void 0:t.veadkStudioToolProgress);return!n||n.toolName!=="branch_compare"||typeof n.branchIndex!="number"||n.branchIndex<0||n.branchIndex>1?null:{toolName:"branch_compare",requestId:Fp(n.requestId),branchIndex:n.branchIndex,label:Fp(n.label),delta:Fp(n.delta),status:lye(n.status,"running"),error:Fp(n.error)||void 0}}function oUe(e,t,n){return{branches:cye(e,t,"running").branches.map((s,a)=>a===n.branchIndex?{...s,label:n.label||s.label,content:s.content+n.delta,status:n.status,error:n.error??s.error}:s)}}function za(e,t){return Zt.t(`blocks.codexProgress.${e}`,{ns:"conversation",...t})}const uye=28e4;function CW(e){try{return JSON.stringify(e).length}catch{return uye}}function lUe(e){const t=e.slice(-200);let n=t.reduce((i,r)=>i+CW(r),0);for(;t.length>1&&n>uye;)n-=CW(t.shift());return t}function Xl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function Ai(e){return typeof e=="string"?e:""}function YF(e,t=""){const n=Ai(e).toLowerCase();return t.endsWith(".failed")||["failed","error","declined","cancelled"].includes(n)?"failed":t.endsWith(".completed")||["completed","done","success"].includes(n)?"completed":"running"}function dye(e){if(e.response!==void 0)return e.response;if(e.result!==void 0)return e.result;const t=e.aggregatedOutput??e.aggregated_output??e.output,n=e.exitCode??e.exit_code;if(!(t===void 0&&n===void 0))return{...t!==void 0?{output:t}:{},...n!==void 0?{exitCode:n}:{}}}function fye(e){if(e.args!==void 0)return e.args;if(e.arguments!==void 0)return e.arguments;if(e.input!==void 0)return e.input;const t=Ai(e.command),n=Ai(e.cwd);if(t||n)return{...t?{command:t}:{},...n?{cwd:n}:{}};if(e.changes!==void 0)return{changes:e.changes};if(e.approval!==void 0)return e.approval}function vg(e,t,n,i,r){return{kind:"tool",name:e,callId:t,args:i,response:r,done:n!=="running",status:n,...n==="failed"?{defaultOpen:!0}:{}}}function hye(e){const t=Ai(e.id||e.itemId||e.item_id),n=Ai(e.kind);if(!t||!n)return null;const i=YF(e.status),r=Ai(e.text||e.detail||e.delta),s=!Ai(e.text||e.detail)&&typeof e.delta=="string";if(n==="thinking"||n==="reasoning")return r?{id:t,block:{kind:"thinking",text:r,done:i!=="running"},appendText:s}:null;if(n==="commentary")return r?{id:t,block:{kind:"text",text:r},appendText:s}:null;if(["message","text","assistant_final","final"].includes(n))return r?{id:t,block:{kind:"text",text:r},appendText:s,finalAnswer:!0}:null;if(n==="plan"){const a=Array.isArray(e.plan)?e.plan:[];return{id:t,block:{kind:"plan",title:Ai(e.title)||za("planTitle"),summary:r||void 0,items:a.flatMap(l=>{const c=Xl(l),u=Ai(c==null?void 0:c.text);if(!u)return[];const d=Ai(c==null?void 0:c.status);return[{text:u,status:["pending","in_progress","completed","failed"].includes(d)?d:"pending"}]}),done:i!=="running"}}}if(["tool","command","command_execution","commandExecution","file_change","fileChange","mcp_tool_call","mcpToolCall","collab_tool_call","web_search","approval","status"].includes(n)){const a=za(n==="file_change"||n==="fileChange"?"fallback.fileChange":n==="approval"?"fallback.approval":n==="status"?"fallback.status":"fallback.command"),l=fye(e),c=dye(e)??(n==="status"&&r||void 0);return{id:t,block:vg(Ai(e.name||e.title)||a,t,i,l,c)}}return null}function pye(e){const t=Ai(e.type),n=Xl(e.item),i=Ai(n==null?void 0:n.type),r=Ai((n==null?void 0:n.id)||e.id)||(t==="turn.failed"?"turn":"");if(!r)return null;const s=YF(n==null?void 0:n.status,t);if(i==="reasoning"||i==="agent_message"){const a=Ai(n==null?void 0:n.text);return a?{id:r,block:i==="reasoning"?{kind:"thinking",text:a,done:s!=="running"}:{kind:"text",text:a},...i==="agent_message"&&(n==null?void 0:n.phase)!=="commentary"?{finalAnswer:!0}:{}}:null}if(i==="todo_list"){const l=(Array.isArray(n==null?void 0:n.items)?n.items:[]).flatMap(c=>{const u=Xl(c),d=Ai(u==null?void 0:u.text);if(!d)return[];const f=Ai(u==null?void 0:u.status).toLowerCase(),h=(u==null?void 0:u.completed)===!0||["completed","done"].includes(f)?"completed":["failed","error"].includes(f)?"failed":["in_progress","running"].includes(f)?"in_progress":"pending";return[{text:d,status:h}]});return l.length?{id:r,block:{kind:"plan",title:za("planTitle"),summary:za("planSummary",{completed:l.filter(c=>c.status==="completed").length,total:l.length}),items:l,done:s!=="running"}}:null}if(i==="command_execution"){const a=za(`command.${s}`);return{id:r,block:vg(a,r,s,fye(n??{}),dye(n??{}))}}if(i==="file_change"){const a=Array.isArray(n==null?void 0:n.changes)?n.changes:[],l=a.length?za("projectFiles",{count:a.length}):za("projectFile"),c=za(`fileChange.${s}`,{subject:l});return{id:r,block:vg(c,r,s,a.length?{changes:a}:void 0)}}if(i==="mcp_tool_call"){const a=[Ai(n==null?void 0:n.server),Ai(n==null?void 0:n.tool)].filter(Boolean).join("/")||za("externalTool"),l=za(`mcp.${s}`,{tool:a}),c=Xl(n==null?void 0:n.error),u=(n==null?void 0:n.result)!==void 0?n.result:Ai(c==null?void 0:c.message)||void 0;return{id:r,block:vg(l,r,s,n==null?void 0:n.arguments,u)}}if(i==="collab_tool_call"){const a=Ai(n==null?void 0:n.tool),l=["spawn_agent","send_input","wait","close_agent"].includes(a)?a:"default",c=za(`collaboration.${l}.${s}`),u=Object.fromEntries(["tool","receiver_thread_ids","prompt"].filter(d=>(n==null?void 0:n[d])!==void 0).map(d=>[d,n==null?void 0:n[d]]));return{id:r,block:vg(c,r,s,Object.keys(u).length?u:void 0,n==null?void 0:n.agents_states)}}if(i==="web_search"){const a=za(`webSearch.${s}`),l=Object.fromEntries(["query","action"].filter(c=>(n==null?void 0:n[c])!==void 0).map(c=>[c,n==null?void 0:n[c]]));return{id:r,block:vg(a,r,s,Object.keys(l).length?l:void 0)}}if(i==="error"||t==="error"||t==="turn.failed"){const a=Xl(e.error),l=Ai((n==null?void 0:n.message)||e.message||(a==null?void 0:a.message))||za("errorDetail");return{id:r,block:vg(za("errorTitle"),r,"failed",void 0,l)}}return null}function cUe(e){const t=Xl(e),n=Xl(t==null?void 0:t.veadkStudioToolProgress);if(!n||n.kind!=="codex")return null;const i=Ai(n.toolName),r=Ai(n.requestId);if(!i||!r)return null;const s=Xl(n.event??n.activity);if(!s)return null;const a=Xl(s.item)||Ai(s.type)?pye(s):hye(s);if(!a)return null;const l=Ai(n.title||n.label),c=Ai(s.agentSessionId??s.agent_session_id),u=Ai(s.sandboxSessionId??s.sandbox_session_id),d=Ai(s.threadId??s.thread_id),f=YF(s.status,Ai(s.type)),p=Ai(s.kind)==="status"&&f!=="running"?f:void 0;return{toolName:i,requestId:r,...l?{title:l}:{},...c?{agentSessionId:c}:{},...u?{sandboxSessionId:u}:{},...d?{threadId:d}:{},...p?{terminalStatus:p}:{},event:a}}function uUe(e,t){const n=Xl(t),i=Xl((n==null?void 0:n.codexActivity)??(n==null?void 0:n.codex_activity));if(!i)return e;const r=Ai(i.title)||(e==null?void 0:e.title)||"Codex Sandbox",s=Ai(i.agentSessionId??i.agent_session_id)||(e==null?void 0:e.agentSessionId),a=Ai(i.sandboxSessionId??i.sandbox_session_id)||(e==null?void 0:e.sandboxSessionId),l=Ai(i.threadId??i.thread_id)||(e==null?void 0:e.threadId);let c={title:r,...s?{agentSessionId:s}:{},...a?{sandboxSessionId:a}:{},...l?{threadId:l}:{},items:(e==null?void 0:e.items.slice())??[]};const u=Array.isArray(i.events)?i.events:[];for(const d of u){const f=Xl(d);if(!f)continue;const h=Xl(f.item)||Ai(f.type)?pye(f):hye(f);h&&(h.finalAnswer||(c=w4(c,{title:r,...s?{agentSessionId:s}:{},...a?{sandboxSessionId:a}:{},...l?{threadId:l}:{},event:h})))}return c}function w4(e,t){const n=(e==null?void 0:e.items.slice())??[],i=n.findIndex(r=>r.id===t.event.id);if(i>=0){const r=n[i].block,s=t.event.block;t.event.appendText&&r.kind==="text"&&s.kind==="text"?n[i]={id:t.event.id,block:{...s,text:r.text+s.text}}:t.event.appendText&&r.kind==="thinking"&&s.kind==="thinking"?n[i]={id:t.event.id,block:{...s,text:r.text+s.text}}:n[i]={id:t.event.id,block:s}}else n.push({id:t.event.id,block:t.event.block});return{title:t.title||(e==null?void 0:e.title)||"Codex Sandbox",...t.agentSessionId||e!=null&&e.agentSessionId?{agentSessionId:t.agentSessionId||(e==null?void 0:e.agentSessionId)}:{},...t.sandboxSessionId||e!=null&&e.sandboxSessionId?{sandboxSessionId:t.sandboxSessionId||(e==null?void 0:e.sandboxSessionId)}:{},...t.threadId||e!=null&&e.threadId?{threadId:t.threadId||(e==null?void 0:e.threadId)}:{},items:lUe(n)}}const mye="send_a2ui_json_to_client",S4="validated_a2ui_json",k4="adk_request_credential",TW="transfer_to_agent";function dUe(e){var i,r,s,a;const t=e,n=((i=t==null?void 0:t.exchangedAuthCredential)==null?void 0:i.oauth2)??((r=t==null?void 0:t.exchanged_auth_credential)==null?void 0:r.oauth2)??((s=t==null?void 0:t.rawAuthCredential)==null?void 0:s.oauth2)??((a=t==null?void 0:t.raw_auth_credential)==null?void 0:a.oauth2);return(n==null?void 0:n.authUri)??(n==null?void 0:n.auth_uri)}function E4(){return{blocks:[],liveStart:0,pendingCodexProgress:[]}}function AW(e,t){if(t.event.finalAnswer)return"applied";let n=-1;for(let i=e.length-1;i>=0;i-=1){const r=e[i];if(!(r.kind!=="tool"||r.name!==t.toolName)){if(r.callId===t.requestId)return r.done?"completed":(r.codexActivity=w4(r.codexActivity,t),r.status=t.terminalStatus??"running",t.terminalStatus&&(r.done=!0),"applied");if(!r.done){if(n>=0)return"unmatched";n=i}}}if(n>=0){const i=e[n];return i.kind!=="tool"?"unmatched":(i.codexActivity=w4(i.codexActivity,t),i.status=t.terminalStatus??"running",t.terminalStatus&&(i.done=!0),"applied")}return"unmatched"}function fUe(e){if(!e||typeof e!="object"||Array.isArray(e))return"completed";const t=e,n=typeof t.status=="string"?t.status.toLowerCase():"";return t.ok===!1||["error","failed","denied","declined","cancelled","timeout"].includes(n)?"failed":"completed"}function _W(e){if(!e||typeof e!="object"||Array.isArray(e))return"";const t=e;return t.ok!==!0||typeof t.message!="string"?"":t.message.trim()}const C4=e=>e.functionCall??e.function_call,hS=e=>e.functionResponse??e.function_response;function hUe(e){if(!e||typeof e!="object")return"";const t=e,n=t.agentName??t.agent_name;return typeof n=="string"?n:""}function pUe(e){return e.replace(/-/g,"+").replace(/_/g,"/")}function Jj(e){const t=[];for(const[n,i]of e.entries()){const r=i.partMetadata??i.part_metadata,s=r==null?void 0:r.veadkTransport;if((s==null?void 0:s.hidden)===!0)continue;const a=r==null?void 0:r.veadkMedia;if(typeof(a==null?void 0:a.uri)=="string"){t.push({id:String(a.id??a.uri),mimeType:typeof a.mimeType=="string"?a.mimeType:void 0,uri:a.uri,name:typeof a.name=="string"?a.name:void 0,sizeBytes:typeof a.sizeBytes=="number"?a.sizeBytes:void 0});continue}const l=i.inlineData??i.inline_data;if(l&&l.data){t.push({id:`inline-${n}-${l.displayName??l.display_name??"media"}`,mimeType:l.mimeType??l.mime_type,data:pUe(l.data),name:l.displayName??l.display_name});continue}const c=i.fileData??i.file_data,u=(c==null?void 0:c.fileUri)??(c==null?void 0:c.file_uri);c&&u&&t.push({id:u,mimeType:c.mimeType??c.mime_type,uri:u,name:c.displayName??c.display_name})}return t}function pS(e){const t=e.partMetadata??e.part_metadata,n=t==null?void 0:t.veadkTransport;return(n==null?void 0:n.hideText)===!0?void 0:e.text}const mUe=new Set(["llm","sequential","parallel","loop","a2a"]);function gUe(e){var t;for(const n of e){const i=(t=n.partMetadata??n.part_metadata)==null?void 0:t.veadkInvocation;if(!i||typeof i!="object")continue;const r=i,s=Array.isArray(r.skills)?r.skills.flatMap(c=>{if(!c||typeof c!="object")return[];const u=c;return typeof u.name=="string"?[{name:u.name,description:typeof u.description=="string"?u.description:""}]:[]}):[];let a;const l=r.targetAgent;if(l&&typeof l=="object"){const c=l,u=c.type;typeof c.name=="string"&&typeof u=="string"&&mUe.has(u)&&Array.isArray(c.path)&&(a={name:c.name,description:typeof c.description=="string"?c.description:"",type:u,path:c.path.filter(d=>typeof d=="string")})}if(s.length>0||a)return{skills:s,targetAgent:a}}}function bUe(e,t){if(!t.length)return;const n=e[e.length-1];(n==null?void 0:n.kind)==="attachment"?n.files.push(...t):e.push({kind:"attachment",files:t})}function yUe(e,t){if(!t.length)return;const n=e[e.length-1];if((n==null?void 0:n.kind)==="artifact"){for(const i of t)n.files.some(r=>r.filename===i.filename&&r.version===i.version)||n.files.push(i);return}e.push({kind:"artifact",files:t})}function TD(e,t,n){const i=e[e.length-1];i&&i.kind===t?i.text+=n:e.push(t==="thinking"?{kind:t,text:n,done:!1}:{kind:t,text:n})}function KC(e){for(const t of e)t.kind==="thinking"&&(t.done=!0)}function gye(e,t){var d,f,h,p,g,b;const n=e.blocks.map(v=>({...v}));let i=e.liveStart,r=e.pendingCodexProgress.slice();const s=((d=t.content)==null?void 0:d.parts)??[],a=s.flatMap(v=>{const y=aUe(v.partMetadata??v.part_metadata);return y?[y]:[]}),l=s.flatMap(v=>{const y=cUe(v.partMetadata??v.part_metadata);return y?[y]:[]});if(a.length>0||l.length>0){for(const v of a)for(let y=n.length-1;y>=0;y-=1){const x=n[y];if(!(x.kind!=="tool"||x.done||x.name!==v.toolName||v.requestId&&x.callId&&x.callId!==v.requestId)){x.response=oUe(x.args,x.response,v),x.status="running";break}}for(const v of l)AW(n,v)==="unmatched"&&(r=[...r,v].slice(-64));return{blocks:n,liveStart:i,pendingCodexProgress:r}}const c=s.some(v=>C4(v)||hS(v));if(t.partial&&!c){for(const v of s){const y=pS(v);typeof y=="string"&&y&&TD(n,v.thought?"thinking":"text",y)}return{blocks:n,liveStart:i,pendingCodexProgress:r}}n.length=i;for(const v of s){const y=C4(v),x=hS(v),w=Jj([v]),O=pS(v);if(typeof O=="string"&&O)TD(n,v.thought?"thinking":"text",O);else if(w.length)KC(n),bUe(n,w);else if(y)if(KC(n),y.name===TW){const k=hUe(y.args)||((f=t.actions)==null?void 0:f.transferToAgent)||((h=t.actions)==null?void 0:h.transfer_to_agent)||Zt.t("app:common.unknownAgent");n.push({kind:"agent-transfer",agentName:k,done:!1})}else if(y.name===k4){const k=y.args??{},S=k.authConfig??k.auth_config??k,C=String(k.functionCallId??k.function_call_id??"").replace(/^_adk_toolset_auth_/,"")||void 0;n.push({kind:"auth",callId:y.id??"",label:C,authUri:dUe(S),authConfig:S,done:!1})}else{const k={kind:"tool",name:y.name??"",callId:y.id,args:y.args,done:!1};if(n.push(k),k.callId){const S=[];for(const E of r)E.toolName===k.name&&E.requestId===k.callId?AW(n,E):S.push(E);r=S}}else if(x){if(KC(n),x.name===TW)for(let k=n.length-1;k>=0;k--){const S=n[k];if(S.kind==="agent-transfer"&&!S.done){S.done=!0;break}}if(x.name===k4)for(let k=n.length-1;k>=0;k--){const S=n[k];if(S.kind==="auth"&&!S.done){S.done=!0;break}}for(let k=n.length-1;k>=0;k--){const S=n[k],E=S.kind==="tool"&&S.name==="delegate_to_codex_sandbox";if(S.kind==="tool"&&(!S.done||E)&&S.name===x.name&&(!x.id||!S.callId||S.callId===x.id)){const C=E?_W(S.response):"";if(S.done=!0,S.response=x.response,E){S.codexActivity=uUe(S.codexActivity,x.response),S.status=fUe(x.response);const N=_W(x.response);N&&N!==C&&TD(n,"text",N)}break}}if(x.name===mye){const k=((p=x.response)==null?void 0:p[S4])??[];if(k.length){const S=n[n.length-1];S&&S.kind==="a2ui"?S.messages.push(...k):n.push({kind:"a2ui",messages:k})}}}}const u=((g=t.actions)==null?void 0:g.artifactDelta)??((b=t.actions)==null?void 0:b.artifact_delta);return u&&yUe(n,Object.entries(u).map(([v,y])=>({filename:v,version:y}))),KC(n),i=n.length,{blocks:n,liveStart:i,pendingCodexProgress:r}}function vUe(e,t){var u,d,f,h,p,g;if(e.partial===!0)return!1;const n=((u=e.content)==null?void 0:u.parts)??[],i=n.some(b=>{const v=pS(b);return!b.thought&&typeof v=="string"&&v.trim().length>0||Jj([b]).length>0}),r=n.some(b=>{var y;const v=hS(b);return(v==null?void 0:v.name)===mye&&Array.isArray((y=v.response)==null?void 0:y[S4])&&v.response[S4].length>0}),s=((d=e.actions)==null?void 0:d.artifactDelta)??((f=e.actions)==null?void 0:f.artifact_delta),a=!!(s&&Object.keys(s).length>0),l=!!(((h=e.actions)==null?void 0:h.endOfAgent)??((p=e.actions)==null?void 0:p.end_of_agent)??((g=e.actions)==null?void 0:g.escalate)),c=t.some(b=>b.kind==="text"||b.kind==="attachment"||b.kind==="artifact"||b.kind==="a2ui"||b.kind==="delivery");return i||r||a||l&&c}function xUe(e){var n,i,r;const t=((n=e.actions)==null?void 0:n.artifactDelta)??((i=e.actions)==null?void 0:i.artifact_delta);return t&&Object.keys(t).length>0?!0:(((r=e.content)==null?void 0:r.parts)??[]).some(s=>!!(pS(s)||Jj([s]).length>0||C4(s)||hS(s)))}function __(e="adk-stream",t){var a,l,c;let n=0;const i=new Map;let r;const s=(u,d)=>`${d}\0${u}`;if((t==null?void 0:t.role)==="assistant"){const u=((a=t.meta)==null?void 0:a.author)??"",d=((l=t.meta)==null?void 0:l.invocationId)??"",f=((c=t.meta)==null?void 0:c.localId)??`${e}-${n++}`,h=E4();h.blocks=t.blocks,h.liveStart=t.blocks.length,r=s(u,d),i.set(r,{acc:h,localId:f,meta:{...t.meta,localId:f,streaming:!0,eventId:void 0}})}return{project(u){const d=u.author&&u.author!=="user"?u.author:"",f=u.invocationId??u.invocation_id??"",h=s(d,f);let p=i.get(h);if(!p&&r){const y=i.get(r);y&&(!y.meta.author||y.meta.author===d)&&(i.delete(r),r=void 0,p=y)}if(!p&&!xUe(u))return{turn:{role:"assistant",blocks:[]},completed:!1,ignored:!0};if(!p){const y=`${e}-${n++}`;p={acc:E4(),localId:y,meta:{author:d||void 0,invocationId:f||void 0}}}p.acc=gye(p.acc,u);const g=u.usageMetadata??u.usage_metadata,b=vUe(u,p.acc.blocks);p.meta={...p.meta,author:d||p.meta.author,localId:p.localId,streaming:!b,tokens:(g==null?void 0:g.totalTokenCount)||p.meta.tokens,ts:u.timestamp||p.meta.ts,invocationId:f||p.meta.invocationId,eventId:b&&u.id?u.id:p.meta.eventId};const v={role:"assistant",blocks:p.acc.blocks,meta:p.meta};return b?(i.delete(h),r=void 0):i.set(h,p),{turn:v,completed:b}},finish(){const u=[...i.values()].map(d=>({role:"assistant",blocks:d.acc.blocks,meta:{...d.meta,streaming:!1}}));return i.clear(),u}}}function Ig(e,t){var s;const n=(s=t.meta)==null?void 0:s.localId;if(!n)return[...e,t];const i=e.findIndex(a=>{var l;return((l=a.meta)==null?void 0:l.localId)===n});if(i<0)return[...e,t];const r=e.slice();return r[i]=t,r}function OUe(e,t={}){var r;let n=[],i=__("adk-history");for(const s of e)if(s.author==="user"){const l=((r=s.content)==null?void 0:r.parts)??[];if(l.some(h=>{var p;return((p=hS(h))==null?void 0:p.name)===k4})){for(let h=n.length-1;h>=0;h--)if(n[h].role==="assistant"){for(let p=n[h].blocks.length-1;p>=0;p--){const g=n[h].blocks[p];if(g.kind==="auth"){g.done=!0;break}}break}}const c=l.map(pS).filter(h=>!!h).join(""),u=Jj(l),d=gUe(l);if(!c&&!u.length&&!d)continue;for(const h of i.finish())n=Ig(n,h);const f=[];d&&f.push({kind:"invocation",value:d}),u.length&&f.push({kind:"attachment",files:u}),c&&f.push({kind:"text",text:c}),n.push({role:"user",blocks:f,meta:{ts:s.timestamp}}),i=__("adk-history")}else{const l=i.project(s);l.ignored||(n=Ig(n,l.turn))}for(const s of i.finish())n=Ig(n,s);for(const s of n){const a=s.meta,l=a==null?void 0:a.eventId;if(!l)continue;const c=t[`veadk_feedback:${l}`];if(!c||typeof c!="object")continue;const u=c;u.rating!=="good"&&u.rating!=="bad"||(a.feedback=c)}return n}function eR(e,t=Zt.t("app:titles.newConversation")){var n,i;for(const r of e??[])if(r.author==="user"||((n=r.content)==null?void 0:n.role)==="user"){const s=(((i=r.content)==null?void 0:i.parts)??[]).map(a=>a.text).find(Boolean);if(s)return s}return t}function bye(e,t,n){if(e.name===t||e.id===t)return(n==null?void 0:n.type)==="parallel"?n:void 0;for(const i of e.children){const r=bye(i,t,e);if(r)return r}}function wUe(e,t){var a,l;if(e.role!=="assistant"||!t)return;const n=(a=e.meta)==null?void 0:a.author;if(!n)return;const i=bye(t,n);if(!i)return;const r=i.id||i.path.join("/")||i.name;return{key:`${((l=e.meta)==null?void 0:l.invocationId)??""}::${r}`,parent:i.name}}function SUe(e,t){const n=[];return e.forEach((i,r)=>{const s=wUe(i,t),a=n[n.length-1];if(s&&(a==null?void 0:a.groupKey)===s.key){a.turnIndexes.push(r);return}n.push({key:s?`parallel-${s.key}-${r}`:`turn-${r}`,turnIndexes:[r],parallelParent:s==null?void 0:s.parent,groupKey:s==null?void 0:s.key})}),n.map(({groupKey:i,...r})=>r)}function yye(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t{const t=m.Children.toArray(e),n=[];let i="";const r=()=>{i!==""&&(n.push(i),i="")};for(const s of t)if(!(s==null||typeof s=="boolean")){if(typeof s=="string"||typeof s=="number"){i+=String(s);continue}r(),n.push(s)}return r(),n},ZF=e=>{const t=kUe(e),n=m.Children.count(t);return m.Children.map(t,i=>{if(typeof i=="string"&&i.trim())return n<=1?i:o.jsx("span",{children:i});if(m.isValidElement(i)){const r=i,{children:s,...a}=r.props;return s!=null?m.cloneElement(r,a,ZF(s)):r}return i})},EUe="_Badge_1viyg_1",CUe={Badge:EUe},ma=({children:e,className:t,variant:n="soft",color:i="secondary",size:r="sm",pill:s,...a})=>o.jsx("div",{className:mi(CUe.Badge,t),"data-color":i,"data-size":r,"data-pill":s?"":void 0,"data-variant":n,...a,children:ZF(e)});var TUe=typeof Ip=="object"&&Ip&&Ip.Object===Object&&Ip,AUe=typeof self=="object"&&self&&self.Object===Object&&self;TUe||AUe||Function("return this")();var _Ue=typeof window<"u"?m.useLayoutEffect:m.useEffect;function NUe(){const e=m.useRef(!1);return m.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),m.useCallback(()=>e.current,[])}var NW={width:void 0,height:void 0};function vye(e){const{ref:t,box:n="content-box"}=e,[{width:i,height:r},s]=m.useState(NW),a=NUe(),l=m.useRef({...NW}),c=m.useRef(void 0);return c.current=e.onResize,m.useEffect(()=>{if(!t.current||typeof window>"u"||!("ResizeObserver"in window))return;const u=new ResizeObserver(([d])=>{const f=n==="border-box"?"borderBoxSize":n==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",h=jW(d,f,"inlineSize"),p=jW(d,f,"blockSize");if(l.current.width!==h||l.current.height!==p){const b={width:h,height:p};l.current.width=h,l.current.height=p,c.current?c.current(b):a()&&s(b)}});return u.observe(t.current,{box:n}),()=>{u.disconnect()}},[n,t,a]),{width:i,height:r}}function jW(e,t,n){return e[t]?Array.isArray(e[t])?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function JF(e,t){const n=m.useRef(e);_Ue(()=>{n.current=e},[e]),m.useEffect(()=>{if(!t&&t!==0)return;const i=setTimeout(()=>{n.current()},t);return()=>{clearTimeout(i)}},[t])}const jUe={DEV:!1,MODE:"production"},qy=typeof import.meta<"u"?jUe:void 0,RUe=!!(qy!=null&&qy.DEV),IUe=typeof navigator<"u"&&/(jsdom|happy-dom)/i.test(navigator.userAgent)||typeof globalThis.happyDOM=="object",xye=(qy==null?void 0:qy.MODE)==="test"||IUe,PUe=typeof window<"u",Oye=typeof document<"u",DUe=PUe&&Oye,e7=e=>{const t=e.currentTarget;if(!(t instanceof HTMLElement))return;const n=t.offsetWidth;let i=.985;n<=80?i=.96:n<=150?i=.97:n<=220?i=.98:n>600&&(i=.995),t.style.setProperty("--scale",i.toString())},N_=(e,t)=>{const n=()=>{const a=setTimeout(e);return()=>{clearTimeout(a)}};if(!DUe||typeof window.requestAnimationFrame!="function"||Oye&&document.visibilityState==="hidden")return n();let r=2,s=window.requestAnimationFrame(function a(){r-=1,r===0?e():s=window.requestAnimationFrame(a)});return()=>{typeof window.cancelAnimationFrame=="function"&&window.cancelAnimationFrame(s)}},zb=e=>Object.keys(e).reduce((n,i)=>{const r=e[i];if(r||r===0){const s=i.startsWith("--")?"":"--",a=typeof r=="number"?`${r}px`:r;n[`${s}${i}`]=a}return n},{}),AD=e=>typeof e=="number"?`${e}deg`:e,_D=e=>String(e),GC=e=>`${e}ms`,ND=({x:e,y:t,scale:n,rotate:i,skewX:r,skewY:s}={})=>{const a=[e==null?null:`translateX(${e}px)`,t==null?null:`translateY(${t}px)`,n==null?null:`scale(${n})`,i==null?null:`rotate(${AD(i)})`,r==null?null:`skewX(${AD(r)})`,s==null?null:`skewY(${AD(s)})`].filter(Boolean);return a.length?a.join(" "):"none"},jD=({blur:e}={})=>{const t=[e==null?null:`blur(${e}px)`].filter(Boolean);return t.length?t.join(" "):"none"},sh=e=>{e.preventDefault()},wye=e=>e.querySelectorAll('a[href], input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex^="-"]), [contenteditable]'),MUe="_LoadingIndicator_7yl6f_1",LUe={LoadingIndicator:MUe},Bk=({className:e,size:t,strokeWidth:n,style:i,...r})=>o.jsx("div",{...r,className:mi(LUe.LoadingIndicator,e),style:i||zb({"indicator-size":t,"indicator-stroke":n})});var $Ue=Object.defineProperty,t7=(e,t)=>$Ue(e,"name",{value:t,configurable:!0});function T4(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}t7(T4,"setRef");function Sye(...e){return t=>{let n=!1;const i=e.map(r=>{const s=T4(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;rFUe(e,"name",{value:t,configurable:!0});function kh(e){const t=m.forwardRef((n,i)=>{let{children:r,...s}=n,a=null,l=!1;const c=[];A4(r)&&typeof XC=="function"&&(r=XC(r._payload)),m.Children.forEach(r,h=>{var p;if(_ye(h)){l=!0;const g=h;let b="child"in g.props?g.props.child:g.props.children;A4(b)&&typeof XC=="function"&&(b=XC(b._payload)),a=BUe(g,b),c.push((p=a==null?void 0:a.props)==null?void 0:p.children)}else c.push(h)}),a?a=m.cloneElement(a,void 0,c):!l&&m.Children.count(r)===1&&m.isValidElement(r)&&(a=r);const u=a?Aye(a):void 0,d=ir(i,u);if(!a){if(r||r===0)throw new Error(l?zUe(e):QUe(e));return r}const f=Tye(s,a.props??{});return a.type!==m.Fragment&&(f.ref=i?d:u),m.cloneElement(a,f)});return t.displayName=`${e}.Slot`,t}qu(kh,"createSlot");var kye=kh("Slot"),Eye=Symbol.for("radix.slottable");function Cye(e){const t=qu(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Eye,t}qu(Cye,"createSlottable");var BUe=qu((e,t)=>{if("child"in e.props){const n=e.props.child;return m.isValidElement(n)?m.cloneElement(n,void 0,e.props.children(n.props.children)):null}return m.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function Tye(e,t){const n={...t};for(const i in t){const r=e[i],s=t[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...l)=>{const c=s(...l);return r(...l),c}:r&&(n[i]=r):i==="style"?n[i]={...r,...s}:i==="className"&&(n[i]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}qu(Tye,"mergeProps");function Aye(e){var i,r;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}qu(Aye,"getElementRef");function _ye(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Eye}qu(_ye,"isSlottable");var UUe=Symbol.for("react.lazy");function A4(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===UUe&&"_payload"in e&&Nye(e._payload)}qu(A4,"isLazyComponent");function Nye(e){return typeof e=="object"&&e!==null&&"then"in e}qu(Nye,"isPromiseLike");var QUe=qu(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),zUe=qu(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),XC=Db[" use ".trim().toString()],VUe=Object.defineProperty,HUe=(e,t)=>VUe(e,"name",{value:t,configurable:!0}),qUe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wr=qUe.reduce((e,t)=>{const n=kh(`Primitive.${t}`),i=m.forwardRef((r,s)=>{const{asChild:a,...l}=r,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:s})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function n7(e,t){e&&$i.flushSync(()=>e.dispatchEvent(t))}HUe(n7,"dispatchDiscreteCustomEvent");var WUe=Object.defineProperty,KUe=(e,t)=>WUe(e,"name",{value:t,configurable:!0}),GUe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),XUe=m.forwardRef(KUe(function(t,n){return o.jsx(wr.span,{...t,ref:n,style:{...GUe,...t.style}})},"VisuallyHidden")),YUe=XUe,ZUe=Object.defineProperty,Uc=(e,t)=>ZUe(e,"name",{value:t,configurable:!0});function JUe(e,t){const n=m.createContext(t);n.displayName=e+"Context";const i=Uc(s=>{const{children:a,...l}=s,c=m.useMemo(()=>l,Object.values(l));return o.jsx(n.Provider,{value:c,children:a})},"Provider");i.displayName=e+"Provider";function r(s,a={}){const{optional:l=!1}=a,c=m.useContext(n);if(c)return c;if(t!==void 0)return t;if(!l)throw new Error(`\`${s}\` must be used within \`${e}\``)}return Uc(r,"useContext"),[i,r]}Uc(JUe,"createContext");function wl(e,t=[]){let n=[];function i(s,a){const l=m.createContext(a);l.displayName=s+"Context";const c=n.length;n=[...n,a];const u=Uc(f=>{var y;const{scope:h,children:p,...g}=f,b=((y=h==null?void 0:h[e])==null?void 0:y[c])||l,v=m.useMemo(()=>g,Object.values(g));return o.jsx(b.Provider,{value:v,children:p})},"Provider");u.displayName=s+"Provider";function d(f,h,p={}){var y;const{optional:g=!1}=p,b=((y=h==null?void 0:h[e])==null?void 0:y[c])||l,v=m.useContext(b);if(v)return v;if(a!==void 0)return a;if(!g)throw new Error(`\`${f}\` must be used within \`${s}\``)}return Uc(d,"useContext"),[u,d]}Uc(i,"createContext");const r=Uc(()=>{const s=n.map(a=>m.createContext(a));return Uc(function(l){const c=(l==null?void 0:l[e])||s;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])},"useScope")},"createScope");return r.scopeName=e,[i,jye(r,...t)]}Uc(wl,"createContextScope");function jye(...e){const t=e[0];if(e.length===1)return t;const n=Uc(()=>{const i=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return Uc(function(s){const a=i.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Uc(jye,"composeContextScopes");var eQe=Object.defineProperty,Ca=(e,t)=>eQe(e,"name",{value:t,configurable:!0});function i7(e){const t=e+"CollectionProvider",[n,i]=wl(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=Ca(b=>{const{scope:v,children:y}=b,x=m.useRef(null),w=m.useRef(new Map).current;return o.jsx(r,{scope:v,itemMap:w,collectionRef:x,children:y})},"CollectionProvider");a.displayName=t;const l=e+"CollectionSlot",c=kh(l),u=m.forwardRef((b,v)=>{const{scope:y,children:x}=b,w=s(l,y),O=ir(v,w.collectionRef);return o.jsx(c,{ref:O,children:x})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=kh(d),p=m.forwardRef((b,v)=>{const{scope:y,children:x,...w}=b,O=m.useRef(null),k=ir(v,O),S=s(d,y);return m.useEffect(()=>(S.itemMap.set(O,{ref:O,...w}),()=>void S.itemMap.delete(O))),o.jsx(h,{[f]:"",ref:k,children:x})});p.displayName=d;function g(b){const v=s(e+"CollectionConsumer",b);return m.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((S,E)=>w.indexOf(S.ref.current)-w.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return Ca(g,"useCollection"),[{Provider:a,Slot:u,ItemSlot:p},g,i]}Ca(i7,"createCollection");var RW=new WeakMap,Gs,Vl,RD=(Vl=class extends Map{constructor(n){super(n);sV(this,Gs);SP(this,Gs,[...super.keys()]),RW.set(this,!0)}set(n,i){return RW.get(this)&&(this.has(n)?oo(this,Gs)[oo(this,Gs).indexOf(n)]=n:oo(this,Gs).push(n)),super.set(n,i),this}insert(n,i,r){const s=this.has(i),a=oo(this,Gs).length,l=r7(n);let c=l>=0?l:a+l;const u=c<0||c>=a?-1:c;if(u===this.size||s&&u===this.size-1||u===-1)return this.set(i,r),this;const d=this.size+(s?0:1);l<0&&c++;const f=[...oo(this,Gs)];let h,p=!1;for(let g=c;g=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,i){const r=this.indexOf(n);if(r===-1)return;let s=r+i;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return s;r++}}findIndex(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return r;r++}return-1}filter(n,i){const r=[];let s=0;for(const a of this)Reflect.apply(n,i,[a,s,this])&&r.push(a),s++;return new Vl(r)}map(n,i){const r=[];let s=0;for(const a of this)r.push([a[0],Reflect.apply(n,i,[a,s,this])]),s++;return new Vl(r)}reduce(...n){const[i,r]=n;let s=0,a=r??this.at(0);for(const l of this)s===0&&n.length===1?a=l:a=Reflect.apply(i,this,[a,l,s,this]),s++;return a}reduceRight(...n){const[i,r]=n;let s=r??this.at(-1);for(let a=this.size-1;a>=0;a--){const l=this.at(a);a===this.size-1&&n.length===1?s=l:s=Reflect.apply(i,this,[s,l,a,this])}return s}toSorted(n){const i=[...this.entries()].sort(n);return new Vl(i)}toReversed(){const n=new Vl;for(let i=this.size-1;i>=0;i--){const r=this.keyAt(i),s=this.get(r);n.set(r,s)}return n}toSpliced(...n){const i=[...this.entries()];return i.splice(...n),new Vl(i)}slice(n,i){const r=new Vl;let s=this.size-1;if(n===void 0)return r;n<0&&(n=n+this.size),i!==void 0&&i>0&&(s=i-1);for(let a=n;a<=s;a++){const l=this.keyAt(a),c=this.get(l);r.set(l,c)}return r}every(n,i){let r=0;for(const s of this){if(!Reflect.apply(n,i,[s,r,this]))return!1;r++}return!0}some(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return!0;r++}return!1}},Gs=new WeakMap,Ca(Vl,"OrderedDict"),Vl);function X2(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=Rye(e,t);return n===-1?void 0:e[n]}Ca(X2,"at");function Rye(e,t){const n=e.length,i=r7(t),r=i>=0?i:n+i;return r<0||r>=n?-1:r}Ca(Rye,"toSafeIndex");function r7(e){return e!==e||e===0?0:Math.trunc(e)}Ca(r7,"toSafeInteger");function tQe(e){const t=e+"CollectionProvider",[n,i]=wl(t),[r,s]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new RD,setItemMap:Ca(()=>{},"setItemMap")}),a=Ca(({state:w,...O})=>w?o.jsx(c,{...O,state:w}):o.jsx(l,{...O}),"CollectionProvider");a.displayName=t;const l=Ca(w=>{const O=v();return o.jsx(c,{...w,state:O})},"CollectionInit");l.displayName=t+"Init";const c=Ca(w=>{const{scope:O,children:k,state:S}=w,E=m.useRef(null),[C,N]=m.useState(null),_=ir(E,N),[j,T]=S;return m.useEffect(()=>{if(!C)return;const L=Dye(()=>{});return L.observe(C,{childList:!0,subtree:!0}),()=>{L.disconnect()}},[C]),o.jsx(r,{scope:O,itemMap:j,setItemMap:T,collectionRef:_,collectionRefObject:E,collectionElement:C,children:k})},"CollectionProviderImpl");c.displayName=t+"Impl";const u=e+"CollectionSlot",d=kh(u),f=m.forwardRef((w,O)=>{const{scope:k,children:S}=w,E=s(u,k),C=ir(O,E.collectionRef);return o.jsx(d,{ref:C,children:S})});f.displayName=u;const h=e+"CollectionItemSlot",p="data-radix-collection-item",g=kh(h),b=m.forwardRef((w,O)=>{const{scope:k,children:S,...E}=w,C=m.useRef(null),[N,_]=m.useState(null),j=ir(O,C,_),T=s(h,k),{setItemMap:L}=T,A=m.useRef(E);Iye(A.current,E)||(A.current=E);const R=A.current;return m.useEffect(()=>{const P=R;return L($=>N?$.has(N)?$.set(N,{...P,element:N}).toSorted(_4):($.set(N,{...P,element:N}),$.toSorted(_4)):$),()=>{L($=>!N||!$.has(N)?$:($.delete(N),new RD($)))}},[N,R,L]),o.jsx(g,{[p]:"",ref:j,children:S})});b.displayName=h;function v(){return m.useState(new RD)}Ca(v,"useInitCollection");function y(w){const{itemMap:O}=s(e+"CollectionConsumer",w);return O}return Ca(y,"useCollection"),[{Provider:a,Slot:f,ItemSlot:b},{createCollectionScope:i,useCollection:y,useInitCollection:v}]}Ca(tQe,"createCollection");function Iye(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Ca(Iye,"shallowEqual");function Pye(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ca(Pye,"isElementPreceding");function _4(e,t){return!e[1].element||!t[1].element?0:Pye(e[1].element,t[1].element)?-1:1}Ca(_4,"sortByDocumentPosition");function Dye(e){return new MutationObserver(n=>{for(const i of n)if(i.type==="childList"){e();return}})}Ca(Dye,"getChildListObserver");var nQe=Object.defineProperty,Cx=(e,t)=>nQe(e,"name",{value:t,configurable:!0}),Mye=!!(typeof window<"u"&&window.document&&window.document.createElement);function gn(e,t,{checkForDefaultPrevented:n=!0}={}){return Cx(function(r){if(e==null||e(r),n===!1||!r||!r.defaultPrevented)return t==null?void 0:t(r)},"handleEvent")}Cx(gn,"composeEventHandlers");function iQe(e){var t;if(!Mye)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}Cx(iQe,"getOwnerWindow");function N4(e){if(!Mye)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Cx(N4,"getOwnerDocument");function Lye(e,t=!1){const{activeElement:n}=N4(e);if(!(n!=null&&n.nodeName))return null;if($ye(n)&&n.contentDocument)return Lye(n.contentDocument.body,t);if(t){const i=n.getAttribute("aria-activedescendant");if(i){const r=N4(n).getElementById(i);if(r)return r}}return n}Cx(Lye,"getActiveElement");function $ye(e){return e.tagName==="IFRAME"}Cx($ye,"isFrame");var Zc=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},rQe=Object.defineProperty,sQe=(e,t)=>rQe(e,"name",{value:t,configurable:!0}),IW=Db[" useEffectEvent ".trim().toString()],PW=Db[" useInsertionEffect ".trim().toString()];function Fye(e){if(typeof IW=="function")return IW(e);const t=m.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof PW=="function"?PW(()=>{t.current=e}):Zc(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}sQe(Fye,"useEffectEvent");var aQe=Object.defineProperty,Uk=(e,t)=>aQe(e,"name",{value:t,configurable:!0}),oQe=Db[" useInsertionEffect ".trim().toString()]||Zc;function ru({prop:e,defaultProp:t,onChange:n=Uk(()=>{},"onChange"),caller:i}){const[r,s,a]=Bye({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:r,u=m.useCallback(d=>{var f;if(l){const h=Uye(d)?d(e):d;h!==e&&((f=a.current)==null||f.call(a,h))}else s(d)},[l,e,s,a]);return[c,u]}Uk(ru,"useControllableState");function Bye({defaultProp:e,onChange:t}){const[n,i]=m.useState(e),r=m.useRef(n),s=m.useRef(t);return oQe(()=>{s.current=t},[t]),m.useEffect(()=>{var a;r.current!==n&&((a=s.current)==null||a.call(s,n),r.current=n)},[n,r]),[n,i,s]}Uk(Bye,"useUncontrolledState");function Uye(e){return typeof e=="function"}Uk(Uye,"isFunction");var DW=Symbol("RADIX:SYNC_STATE");function lQe(e,t,n,i){const{prop:r,defaultProp:s,onChange:a,caller:l}=t,c=r!==void 0,u=Fye(a),d=[{...n,state:s}];i&&d.push(i);const[f,h]=m.useReducer((v,y)=>{if(y.type===DW)return{...v,state:y.state};const x=e(v,y);return c&&!Object.is(x.state,v.state)&&u(x.state),x},...d),p=f.state,g=m.useRef(p);m.useEffect(()=>{g.current!==p&&(g.current=p,c||u(p))},[p,g,c]);const b=m.useMemo(()=>r!==void 0?{...f,state:r}:f,[f,r]);return m.useEffect(()=>{c&&!Object.is(r,f.state)&&h({type:DW,state:r})},[r,f.state,c]),[b,h]}Uk(lQe,"useControllableStateReducer");var cQe=Object.defineProperty,Eh=(e,t)=>cQe(e,"name",{value:t,configurable:!0});function Qye(e,t){return m.useReducer((n,i)=>t[n][i]??n,e)}Eh(Qye,"useStateMachine");var Xd=Eh(e=>{const{present:t,children:n}=e,i=zye(t),r=typeof n=="function"?n({present:i.isPresent}):m.Children.only(n),s=Vye(i.ref,Hye(r));return typeof n=="function"||i.isPresent?m.cloneElement(r,{ref:s}):null},"Presence");function zye(e){const[t,n]=m.useState(),i=m.useRef(null),r=m.useRef(e),s=m.useRef("none"),a=m.useRef(void 0),l=e?"mounted":"unmounted",[c,u]=Qye(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{c==="mounted"?(s.current=a.current??X0(i.current),a.current=void 0):s.current="none"},[c]),Zc(()=>{const d=i.current,f=r.current;if(f!==e){const p=s.current,g=X0(d);e?(a.current=g,u("MOUNT")):g==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&p!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),Zc(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=Eh(g=>{const v=X0(i.current).includes(CSS.escape(g.animationName));if(g.target===t&&v&&(u("ANIMATION_END"),!r.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},"handleAnimationEnd"),p=Eh(g=>{g.target===t&&(s.current=X0(i.current))},"handleAnimationStart");return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:m.useCallback(d=>{if(d){const f=getComputedStyle(d);i.current=f,a.current=X0(f)}else i.current=null;n(d)},[])}}Eh(zye,"usePresence");function j4(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Eh(j4,"setRef");function Vye(...e){const t=m.useRef(e);return t.current=e,m.useCallback(n=>{const i=t.current;let r=!1;const s=i.map(a=>{const l=j4(a,n);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let a=0;auQe(e,"name",{value:t,configurable:!0}),fQe=Db[" useId ".trim().toString()]||(()=>{}),hQe=0;function mm(e){const[t,n]=m.useState(fQe());return Zc(()=>{e||n(i=>i??String(hQe++))},[e]),e||(t?`radix-${t}`:"")}dQe(mm,"useId");var pQe=Object.defineProperty,mQe=(e,t)=>pQe(e,"name",{value:t,configurable:!0}),gQe=m.createContext(void 0);function Qk(e){const t=m.useContext(gQe);return e||t||"ltr"}mQe(Qk,"useDirection");var bQe=Object.defineProperty,yQe=(e,t)=>bQe(e,"name",{value:t,configurable:!0});function $u(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}yQe($u,"useCallbackRef");var vQe=Object.defineProperty,ka=(e,t)=>vQe(e,"name",{value:t,configurable:!0}),R4="dismissableLayer.update",xQe="dismissableLayer.pointerDownOutside",OQe="dismissableLayer.focusOutside",MW,qye=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),s7=m.forwardRef(ka(function(t,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:c,onDismiss:u,...d}=t,f=m.useContext(qye),[h,p]=m.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=m.useState({}),v=ir(n,p),y=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=x?y.indexOf(x):-1,O=h?y.indexOf(h):-1,k=f.layersWithOutsidePointerEventsDisabled.size>0,S=O>=w,E=m.useRef(!1),C=Wye(T=>{a==null||a(T),c==null||c(T),T.defaultPrevented||u==null||u()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(T=>{if(!(T instanceof Node))return!1;const L=[...f.branches].some(A=>A.contains(T));return S&&!L},[f.branches,S])}),N=Kye(T=>{if(r&&E.current)return;const L=T.target;[...f.branches].some(R=>R.contains(L))||(l==null||l(T),c==null||c(T),T.defaultPrevented||u==null||u())},g),_=h?O===y.length-1:!1,j=$u(T=>{T.key==="Escape"&&(s==null||s(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))});return m.useEffect(()=>{if(_)return g.addEventListener("keydown",j,{capture:!0}),()=>g.removeEventListener("keydown",j,{capture:!0})},[g,_,j]),m.useEffect(()=>{if(h)return i&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(MW=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),I4(),()=>{i&&(f.layersWithOutsidePointerEventsDisabled.delete(h),f.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=MW))}},[h,g,i,f]),m.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),I4())},[h,f]),m.useEffect(()=>{const T=ka(()=>b({}),"handleUpdate");return document.addEventListener(R4,T),()=>document.removeEventListener(R4,T)},[]),o.jsx(wr.div,{...d,ref:v,style:{pointerEvents:k?S?"auto":"none":void 0,...t.style},onFocusCapture:gn(t.onFocusCapture,N.onFocusCapture),onBlurCapture:gn(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:gn(t.onPointerDownCapture,C.onPointerDownCapture)})},"DismissableLayer"));function wQe(){const e=m.useContext(qye),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}ka(wQe,"useDismissableLayerSurface");var SQe=ka(()=>!0,"IS_TRUE");function Wye(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:s,shouldHandlePointerDownOutside:a=SQe}=t,l=$u(e),c=m.useRef(!1),u=m.useRef(!1),d=m.useRef(new Map),f=m.useRef(()=>{});return m.useEffect(()=>{function h(){u.current=!1,r.current=!1,d.current.clear()}ka(h,"resetOutsideInteraction");function p(){return Array.from(d.current.values()).some(Boolean)}ka(p,"isOutsideInteractionIntercepted");function g(w){if(!u.current)return;const O=w.target;O instanceof Node&&[...s].some(S=>S.contains(O))||d.current.set(w.type,!0),w.type==="click"&&window.setTimeout(()=>{u.current&&f.current()},0)}ka(g,"handleInteractionCapture");function b(w){u.current&&d.current.set(w.type,!1)}ka(b,"handleInteractionBubble");const v=ka(w=>{if(w.target&&!c.current){let O=function(){n.removeEventListener("click",f.current);const S=p();h(),S||a7(xQe,l,k,{discrete:!0})};if(ka(O,"handleAndDispatchPointerDownOutsideEvent"),!a(w.target)){n.removeEventListener("click",f.current),h(),c.current=!1;return}const k={originalEvent:w};u.current=!0,r.current=i&&w.button===0,d.current.clear(),!i||w.button!==0?O():(n.removeEventListener("click",f.current),f.current=O,n.addEventListener("click",f.current,{once:!0}))}else n.removeEventListener("click",f.current),h();c.current=!1},"handlePointerDown"),y=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const w of y)n.addEventListener(w,g,!0),n.addEventListener(w,b);const x=window.setTimeout(()=>{n.addEventListener("pointerdown",v)},0);return()=>{window.clearTimeout(x),n.removeEventListener("pointerdown",v),n.removeEventListener("click",f.current);for(const w of y)n.removeEventListener(w,g,!0),n.removeEventListener(w,b)}},[n,l,i,r,s,a]),{onPointerDownCapture:ka(()=>c.current=!0,"onPointerDownCapture")}}ka(Wye,"usePointerDownOutside");function Kye(e,t=globalThis==null?void 0:globalThis.document){const n=$u(e),i=m.useRef(!1);return m.useEffect(()=>{const r=ka(s=>{s.target&&!i.current&&a7(OQe,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:ka(()=>i.current=!0,"onFocusCapture"),onBlurCapture:ka(()=>i.current=!1,"onBlurCapture")}}ka(Kye,"useFocusOutside");function I4(){const e=new CustomEvent(R4);document.dispatchEvent(e)}ka(I4,"dispatchUpdate");function a7(e,t,n,{discrete:i}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),i?n7(r,s):r.dispatchEvent(s)}ka(a7,"handleAndDispatchCustomEvent");var kQe=Object.defineProperty,Mo=(e,t)=>kQe(e,"name",{value:t,configurable:!0}),ID="focusScope.autoFocusOnMount",PD="focusScope.autoFocusOnUnmount",LW={bubbles:!1,cancelable:!0},Gye=m.forwardRef(Mo(function(t,n){const{loop:i=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...l}=t,[c,u]=m.useState(null),d=$u(s),f=$u(a),h=m.useRef(null),p=ir(n,u),g=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let v=function(O){if(g.paused||!c)return;const k=O.target;c.contains(k)?h.current=k:If(h.current,{select:!0})},y=function(O){if(g.paused||!c)return;const k=O.relatedTarget;k!==null&&(c.contains(k)||If(h.current,{select:!0}))},x=function(O){if(document.activeElement===document.body)for(const S of O)S.removedNodes.length>0&&If(c)};Mo(v,"handleFocusIn"),Mo(y,"handleFocusOut"),Mo(x,"handleMutations"),document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(x);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[r,c,g.paused]),m.useEffect(()=>{if(c){$W.add(g);const v=document.activeElement;if(!c.contains(v)){const x=new CustomEvent(ID,LW);c.addEventListener(ID,d),c.dispatchEvent(x),x.defaultPrevented||(Xye(tve(o7(c)),{select:!0}),document.activeElement===v&&If(c))}return()=>{c.removeEventListener(ID,d),setTimeout(()=>{const x=new CustomEvent(PD,LW);c.addEventListener(PD,f),c.dispatchEvent(x),x.defaultPrevented||If(v??document.body,{select:!0}),c.removeEventListener(PD,f),$W.remove(g)},0)}}},[c,d,f,g]);const b=m.useCallback(v=>{if(!i&&!r||g.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(y&&x){const w=v.currentTarget,[O,k]=Yye(w);O&&k?!v.shiftKey&&x===k?(v.preventDefault(),i&&If(O,{select:!0})):v.shiftKey&&x===O&&(v.preventDefault(),i&&If(k,{select:!0})):x===w&&v.preventDefault()}},[i,r,g.paused]);return o.jsx(wr.div,{tabIndex:-1,...l,ref:p,onKeyDown:b})},"FocusScope"));function Xye(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(If(i,{select:t}),document.activeElement!==n)return}Mo(Xye,"focusFirst");function Yye(e){const t=o7(e),n=P4(t,e),i=P4(t.reverse(),e);return[n,i]}Mo(Yye,"getTabbableEdges");function o7(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Mo(i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}Mo(o7,"getTabbableCandidates");function P4(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const i of e)if(!(n?!i.checkVisibility({checkVisibilityCSS:!0}):Zye(i,{upTo:t})))return i}Mo(P4,"findVisible");function Zye(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Mo(Zye,"isHidden");function Jye(e){return e instanceof HTMLInputElement&&"select"in e}Mo(Jye,"isSelectableInput");function If(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Jye(e)&&t&&e.select()}}Mo(If,"focus");var $W=eve();function eve(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=D4(e,t),e.unshift(t)},remove(t){var n;e=D4(e,t),(n=e[0])==null||n.resume()}}}Mo(eve,"createFocusScopesStack");function D4(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}Mo(D4,"arrayRemove");function tve(e){return e.filter(t=>t.tagName!=="A")}Mo(tve,"removeLinks");var EQe=Object.defineProperty,CQe=(e,t)=>EQe(e,"name",{value:t,configurable:!0}),l7=m.forwardRef(CQe(function(t,n){var c;const{container:i,...r}=t,[s,a]=m.useState(!1);Zc(()=>a(!0),[]);const l=i||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?$i.createPortal(o.jsx(wr.div,{...r,ref:n}),l):null},"Portal")),TQe=Object.defineProperty,c7=(e,t)=>TQe(e,"name",{value:t,configurable:!0}),YC=0,cd=null;function AQe(e){return tR(),e.children}c7(AQe,"FocusGuards");function tR(){m.useEffect(()=>{cd||(cd={start:M4(),end:M4()});const{start:e,end:t}=cd;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),YC++,()=>{YC===1&&(cd==null||cd.start.remove(),cd==null||cd.end.remove(),cd=null),YC=Math.max(0,YC-1)}},[])}c7(tR,"useFocusGuards");function M4(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}c7(M4,"createFocusGuard");var xd=function(){return xd=Object.assign||function(t){for(var n,i=1,r=arguments.length;i"u")return HQe;var t=qQe(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},KQe=sve(),Wy="data-scroll-locked",GQe=function(e,t,n,i){var r=e.left,s=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),` + .`.concat(NQe,` { overflow: hidden `).concat(i,`; padding-right: `).concat(l,"px ").concat(i,`; } - body[`).concat(Yy,`] { + body[`).concat(Wy,`] { overflow: hidden `).concat(i,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&` @@ -466,29 +466,29 @@ ${n}`}}async function*Z7e({runtimeId:e,region:t,instanceName:n,sessionId:i,follo `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),` } - .`).concat(eA,` { + .`).concat(Y2,` { right: `).concat(l,"px ").concat(i,`; } - .`).concat(tA,` { + .`).concat(Z2,` { margin-right: `).concat(l,"px ").concat(i,`; } - .`).concat(eA," .").concat(eA,` { + .`).concat(Y2," .").concat(Y2,` { right: 0 `).concat(i,`; } - .`).concat(tA," .").concat(tA,` { + .`).concat(Z2," .").concat(Z2,` { margin-right: 0 `).concat(i,`; } - body[`).concat(Yy,`] { - `).concat(AQe,": ").concat(l,`px; + body[`).concat(Wy,`] { + `).concat(jQe,": ").concat(l,`px; } -`)},zW=function(){var e=parseInt(document.body.getAttribute(Yy)||"0",10);return isFinite(e)?e:0},WQe=function(){m.useEffect(function(){return document.body.setAttribute(Yy,(zW()+1).toString()),function(){var e=zW()-1;e<=0?document.body.removeAttribute(Yy):document.body.setAttribute(Yy,e.toString())}},[])},KQe=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;WQe();var s=m.useMemo(function(){return VQe(r)},[r]);return m.createElement(HQe,{styles:qQe(s,!t,r,n?"":"!important")})},$4=!1;if(typeof window<"u")try{var tT=Object.defineProperty({},"passive",{get:function(){return $4=!0,!0}});window.addEventListener("test",tT,tT),window.removeEventListener("test",tT,tT)}catch{$4=!1}var N0=$4?{passive:!1}:!1,GQe=function(e){return e.tagName==="TEXTAREA"},sve=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!GQe(e)&&n[t]==="visible")},XQe=function(e){return sve(e,"overflowY")},YQe=function(e){return sve(e,"overflowX")},VW=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=ave(e,i);if(r){var s=ove(e,i),a=s[1],l=s[2];if(a>l)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},ZQe=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},JQe=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},ave=function(e,t){return e==="v"?XQe(t):YQe(t)},ove=function(e,t){return e==="v"?ZQe(t):JQe(t)},eze=function(e,t){return e==="h"&&t==="rtl"?-1:1},tze=function(e,t,n,i,r){var s=eze(e,window.getComputedStyle(t).direction),a=s*i,l=n.target,c=t.contains(l),u=!1,d=a>0,f=0,h=0;do{if(!l)break;var p=ove(e,l),g=p[0],b=p[1],v=p[2],y=b-v-s*g;(g||y)&&ave(e,l)&&(f+=y,h+=g);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(u=!0),u},nT=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},HW=function(e){return[e.deltaX,e.deltaY]},qW=function(e){return e&&"current"in e?e.current:e},nze=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ize=function(e){return` +`)},BW=function(){var e=parseInt(document.body.getAttribute(Wy)||"0",10);return isFinite(e)?e:0},XQe=function(){m.useEffect(function(){return document.body.setAttribute(Wy,(BW()+1).toString()),function(){var e=BW()-1;e<=0?document.body.removeAttribute(Wy):document.body.setAttribute(Wy,e.toString())}},[])},YQe=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;XQe();var s=m.useMemo(function(){return WQe(r)},[r]);return m.createElement(KQe,{styles:GQe(s,!t,r,n?"":"!important")})},L4=!1;if(typeof window<"u")try{var ZC=Object.defineProperty({},"passive",{get:function(){return L4=!0,!0}});window.addEventListener("test",ZC,ZC),window.removeEventListener("test",ZC,ZC)}catch{L4=!1}var C0=L4?{passive:!1}:!1,ZQe=function(e){return e.tagName==="TEXTAREA"},ave=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ZQe(e)&&n[t]==="visible")},JQe=function(e){return ave(e,"overflowY")},eze=function(e){return ave(e,"overflowX")},UW=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=ove(e,i);if(r){var s=lve(e,i),a=s[1],l=s[2];if(a>l)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},tze=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},nze=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},ove=function(e,t){return e==="v"?JQe(t):eze(t)},lve=function(e,t){return e==="v"?tze(t):nze(t)},ize=function(e,t){return e==="h"&&t==="rtl"?-1:1},rze=function(e,t,n,i,r){var s=ize(e,window.getComputedStyle(t).direction),a=s*i,l=n.target,c=t.contains(l),u=!1,d=a>0,f=0,h=0;do{if(!l)break;var p=lve(e,l),g=p[0],b=p[1],v=p[2],y=b-v-s*g;(g||y)&&ove(e,l)&&(f+=y,h+=g);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(u=!0),u},JC=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},QW=function(e){return[e.deltaX,e.deltaY]},zW=function(e){return e&&"current"in e?e.current:e},sze=function(e,t){return e[0]===t[0]&&e[1]===t[1]},aze=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},rze=0,j0=[];function sze(e){var t=m.useRef([]),n=m.useRef([0,0]),i=m.useRef(),r=m.useState(rze++)[0],s=m.useState(rve)[0],a=m.useRef(e);m.useEffect(function(){a.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var b=CQe([e.lockRef.current],(e.shards||[]).map(qW),!0).filter(Boolean);return b.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),b.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=m.useCallback(function(b,v){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var y=nT(b),x=n.current,w="deltaX"in b?b.deltaX:x[0]-y[0],O="deltaY"in b?b.deltaY:x[1]-y[1],k,S=b.target,E=Math.abs(w)>Math.abs(O)?"h":"v";if("touches"in b&&E==="h"&&S.type==="range")return!1;var C=window.getSelection(),N=C&&C.anchorNode,_=N?N===S||N.contains(S):!1;if(_)return!1;var j=VW(E,S);if(!j)return!0;if(j?k=E:(k=E==="v"?"h":"v",j=VW(E,S)),!j)return!1;if(!i.current&&"changedTouches"in b&&(w||O)&&(i.current=k),!k)return!0;var T=i.current||k;return tze(T,v,b,T==="h"?w:O)},[]),c=m.useCallback(function(b){var v=b;if(!(!j0.length||j0[j0.length-1]!==s)){var y="deltaY"in v?HW(v):nT(v),x=t.current.filter(function(k){return k.name===v.type&&(k.target===v.target||v.target===k.shadowParent)&&nze(k.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(qW).filter(Boolean).filter(function(k){return k.contains(v.target)}),O=w.length>0?l(v,w[0]):!a.current.noIsolation;O&&v.cancelable&&v.preventDefault()}}},[]),u=m.useCallback(function(b,v,y,x){var w={name:b,delta:v,target:y,should:x,shadowParent:aze(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(O){return O!==w})},1)},[]),d=m.useCallback(function(b){n.current=nT(b),i.current=void 0},[]),f=m.useCallback(function(b){u(b.type,HW(b),b.target,l(b,e.lockRef.current))},[]),h=m.useCallback(function(b){u(b.type,nT(b),b.target,l(b,e.lockRef.current))},[]);m.useEffect(function(){return j0.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,N0),document.addEventListener("touchmove",c,N0),document.addEventListener("touchstart",d,N0),function(){j0=j0.filter(function(b){return b!==s}),document.removeEventListener("wheel",c,N0),document.removeEventListener("touchmove",c,N0),document.removeEventListener("touchstart",d,N0)}},[]);var p=e.removeScrollBar,g=e.inert;return m.createElement(m.Fragment,null,g?m.createElement(s,{styles:ize(r)}):null,p?m.createElement(KQe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function aze(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const oze=DQe(ive,sze);var d7=m.forwardRef(function(e,t){return m.createElement(rR,wd({},e,{ref:t,sideCar:oze}))});d7.classNames=rR.classNames;var lze=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},R0=new WeakMap,iT=new WeakMap,rT={},BD=0,lve=function(e){return e&&(e.host||lve(e.parentNode))},cze=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=lve(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},uze=function(e,t,n,i){var r=cze(t,Array.isArray(e)?e:[e]);rT[n]||(rT[n]=new WeakMap);var s=rT[n],a=[],l=new Set,c=new Set(r),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(l.has(h))d(h);else try{var p=h.getAttribute(i),g=p!==null&&p!=="false",b=(R0.get(h)||0)+1,v=(s.get(h)||0)+1;R0.set(h,b),s.set(h,v),a.push(h),b===1&&g&&iT.set(h,!0),v===1&&h.setAttribute(n,"true"),g||h.setAttribute(i,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(t),l.clear(),BD++,function(){a.forEach(function(f){var h=R0.get(f)-1,p=s.get(f)-1;R0.set(f,h),s.set(f,p),h||(iT.has(f)||f.removeAttribute(i),iT.delete(f)),p||f.removeAttribute(n)}),BD--,BD||(R0=new WeakMap,R0=new WeakMap,iT=new WeakMap,rT={})}},cve=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=lze(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),uze(i,r,n,"aria-hidden")):function(){return null}},dze=Object.defineProperty,fze=(e,t)=>dze(e,"name",{value:t,configurable:!0});function qk(e){const[t,n]=m.useState(void 0);return Jc(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}fze(qk,"useSize");var hze=Object.defineProperty,jh=(e,t)=>hze(e,"name",{value:t,configurable:!0}),f7="Checkbox",[pze,_Vt]=Sl(f7),[mze,h7]=pze(f7);function uve(e){const{__scopeCheckbox:t,checked:n,children:i,defaultChecked:r,disabled:s,form:a,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,p]=su({prop:n,defaultProp:r??!1,onChange:c,caller:f7}),[g,b]=m.useState(null),[v,y]=m.useState(null),x=m.useRef(!1),[w,O]=m.useReducer(E=>E+1,0),k=g?!!a||!!g.closest("form"):!0,S={checked:h,disabled:s,setChecked:p,control:g,setControl:b,name:l,form:a,value:d,hasConsumerStoppedPropagationRef:x,userInteractionCount:w,onUserInteraction:O,required:u,defaultChecked:dh(r)?!1:r,isFormControl:k,bubbleInput:v,setBubbleInput:y};return o.jsx(mze,{scope:t,...S,children:dve(f)?f(S):i})}jh(uve,"CheckboxProvider");var gze="CheckboxTrigger",bze=m.forwardRef(jh(function({__scopeCheckbox:t,onKeyDown:n,onClick:i,...r},s){const{control:a,value:l,disabled:c,checked:u,required:d,setControl:f,setChecked:h,hasConsumerStoppedPropagationRef:p,onUserInteraction:g,isFormControl:b,bubbleInput:v}=h7(gze,t),y=rr(s,f),x=m.useRef(u);return m.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const O=jh(()=>h(x.current),"reset");return w.addEventListener("reset",O),()=>w.removeEventListener("reset",O)}},[a,h]),o.jsx(Or.button,{type:"button",role:"checkbox","aria-checked":dh(u)?"mixed":u,"aria-required":d,"data-state":p7(u),"data-disabled":c?"":void 0,disabled:c,value:l,...r,ref:y,onKeyDown:yn(n,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:yn(i,w=>{g(),h(O=>dh(O)?!0:!O),v&&b&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})},"CheckboxTrigger")),yze=m.forwardRef(jh(function(t,n){const{__scopeCheckbox:i,name:r,checked:s,defaultChecked:a,required:l,disabled:c,value:u,onCheckedChange:d,form:f,...h}=t;return o.jsx(uve,{__scopeCheckbox:i,checked:s,defaultChecked:a,disabled:c,required:l,onCheckedChange:d,name:r,form:f,value:u,internal_do_not_use_render:({isFormControl:p})=>o.jsxs(o.Fragment,{children:[o.jsx(bze,{...h,ref:n,__scopeCheckbox:i}),p&&o.jsx(wze,{__scopeCheckbox:i})]})})},"Checkbox")),vze="CheckboxIndicator",xze=m.forwardRef(jh(function(t,n){const{__scopeCheckbox:i,forceMount:r,...s}=t,a=h7(vze,i);return o.jsx(Zd,{present:r||dh(a.checked)||a.checked===!0,children:o.jsx(Or.span,{"data-state":p7(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:n,style:{pointerEvents:"none",...t.style}})})},"CheckboxIndicator")),Oze="CheckboxBubbleInput",wze=m.forwardRef(jh(function({__scopeCheckbox:t,onClick:n,...i},r){const{control:s,hasConsumerStoppedPropagationRef:a,userInteractionCount:l,checked:c,defaultChecked:u,required:d,disabled:f,name:h,value:p,form:g,bubbleInput:b,setBubbleInput:v}=h7(Oze,t),y=rr(r,v),x=qk(s),w=m.useRef(!1),O=m.useRef(c),k=m.useRef(l);m.useEffect(()=>{const E=b;if(!E)return;const C=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(C,"checked").set,j=l!==k.current;k.current=l;const T=O.current!==c;O.current=c;const L=!(j&&a.current);if(T&&_){w.current=!j;const A=new Event("click",{bubbles:L});E.indeterminate=dh(c),_.call(E,dh(c)?!1:c),E.dispatchEvent(A),w.current=!1}},[b,c,a,l]);const S=m.useRef(dh(c)?!1:c);return o.jsx(Or.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??S.current,required:d,disabled:f,name:h,value:p,form:g,...i,tabIndex:-1,ref:y,onClick:yn(n,E=>{w.current&&E.stopPropagation()}),style:{...i.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function dve(e){return typeof e=="function"}jh(dve,"isFunction");function dh(e){return e==="indeterminate"}jh(dh,"isIndeterminate");function p7(e){return dh(e)?"indeterminate":e?"checked":"unchecked"}jh(p7,"getState");const Sze=["top","right","bottom","left"],Om=Math.min,fh=Math.max,P_=Math.round,sT=Math.floor,hh=e=>({x:e,y:e}),kze={left:"right",right:"left",bottom:"top",top:"bottom"};function fve(e,t,n){return fh(e,Om(t,n))}function Rh(e,t){return typeof e=="function"?e(t):e}function wm(e){return e.split("-")[0]}function jx(e){return e.split("-")[1]}function m7(e){return e==="x"?"y":"x"}function g7(e){return e==="y"?"height":"width"}function Nd(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function b7(e){return m7(Nd(e))}function Eze(e,t,n){n===void 0&&(n=!1);const i=jx(e),r=b7(e),s=g7(r);let a=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=D_(a)),[a,D_(a)]}function Cze(e){const t=D_(e);return[F4(e),t,F4(t)]}function F4(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const WW=["left","right"],KW=["right","left"],Tze=["top","bottom"],Aze=["bottom","top"];function _ze(e,t,n){switch(e){case"top":case"bottom":return n?t?KW:WW:t?WW:KW;case"left":case"right":return t?Tze:Aze;default:return[]}}function Nze(e,t,n,i){const r=jx(e);let s=_ze(wm(e),n==="start",i);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(F4)))),s}function D_(e){const t=wm(e);return kze[t]+e.slice(t.length)}function jze(e){var t,n,i,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(i=e.bottom)!=null?i:0,left:(r=e.left)!=null?r:0}}function hve(e){return typeof e!="number"?jze(e):{top:e,right:e,bottom:e,left:e}}function M_(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function GW(e,t,n){let{reference:i,floating:r}=e;const s=Nd(t),a=b7(t),l=g7(a),c=wm(t),u=s==="y",d=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,h=i[l]/2-r[l]/2;let p;switch(c){case"top":p={x:d,y:i.y-r.height};break;case"bottom":p={x:d,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:f};break;case"left":p={x:i.x-r.width,y:f};break;default:p={x:i.x,y:i.y}}const g=jx(t);return g&&(p[a]+=h*(g==="end"?1:-1)*(n&&u?-1:1)),p}async function Rze(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Rh(t,e),g=hve(p),v=l[h?f==="floating"?"reference":"floating":f],y=M_(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),x=f==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),O=await(s.isElement==null?void 0:s.isElement(w))&&await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1},k=M_(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(y.top-k.top+g.top)/O.y,bottom:(k.bottom-y.bottom+g.bottom)/O.y,left:(y.left-k.left+g.left)/O.x,right:(k.right-y.right+g.right)/O.x}}const Ize=50,Pze=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:Rze},c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=GW(u,i,c),h=i,p=0;const g={};for(let b=0;b({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:s,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Rh(e,t)||{};if(u==null)return{};const f=hve(d),h={x:n,y:i},p=b7(r),g=g7(p),b=await a.getDimensions(u),v=p==="y",y=v?"top":"left",x=v?"bottom":"right",w=v?"clientHeight":"clientWidth",O=s.reference[g]+s.reference[p]-h[p]-s.floating[g],k=h[p]-s.reference[p],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=S?S[w]:0;(!E||!await(a.isElement==null?void 0:a.isElement(S)))&&(E=l.floating[w]||s.floating[g]);const C=O/2-k/2,N=E/2-b[g]/2-1,_=Om(f[y],N),j=Om(f[x],N),T=E-b[g]-j,L=E/2-b[g]/2+C,A=fve(_,L,T),R=!c.arrow&&jx(r)!=null&&L!==A&&s.reference[g]/2-(L<_?_:j)-b[g]/2<0,P=R?L<_?L-_:L-T:0;return{[p]:h[p]+P,data:{[p]:A,centerOffset:L-A-P,...R&&{alignmentOffset:P}},reset:R}}}),Mze=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...v}=Rh(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=wm(r),x=Nd(l),w=wm(l)===l,O=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=h||(w||!b?[D_(l)]:Cze(l)),S=g!=="none";!h&&S&&k.push(...Nze(l,b,g,O));const E=[l,...k],C=await c.detectOverflow(t,v),N=[];let _=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&N.push(C[y]),f){const A=Eze(r,a,O);N.push(C[A[0]],C[A[1]])}if(_=[..._,{placement:r,overflows:N}],!N.every(A=>A<=0)){var j,T;const A=(((j=s.flip)==null?void 0:j.index)||0)+1,R=E[A];if(R&&(!(f==="alignment"?x!==Nd(R):!1)||_.every(M=>Nd(M.placement)===x?M.overflows[0]>0:!0)))return{data:{index:A,overflows:_},reset:{placement:R}};let P=(T=_.filter($=>$.overflows[0]<=0).sort(($,M)=>$.overflows[1]-M.overflows[1])[0])==null?void 0:T.placement;if(!P)switch(p){case"bestFit":{var L;const $=(L=_.filter(M=>{if(S){const B=Nd(M.placement);return B===x||B==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(B=>B>0).reduce((B,I)=>B+I,0)]).sort((M,B)=>M[1]-B[1])[0])==null?void 0:L[0];$&&(P=$);break}case"initialPlacement":P=l;break}if(r!==P)return{reset:{placement:P}}}return{}}}};function XW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function YW(e){return Sze.some(t=>e[t]>=0)}const Lze=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:r="referenceHidden",...s}=Rh(e,t);switch(r){case"referenceHidden":{const a=await i.detectOverflow(t,{...s,elementContext:"reference"}),l=XW(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:YW(l)}}}case"escaped":{const a=await i.detectOverflow(t,{...s,altBoundary:!0}),l=XW(a,n.floating);return{data:{escapedOffsets:l,escaped:YW(l)}}}default:return{}}}}},pve=new Set(["left","top"]);async function $ze(e,t){const{placement:n,platform:i,elements:r}=e,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),a=wm(n),l=jx(n),c=Nd(n)==="y",u=pve.has(a)?-1:1,d=s&&c?-1:1,f=Rh(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Fze=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:s,placement:a,middlewareData:l}=t,c=await $ze(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:a}}}}},Bze=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r,platform:s}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:x=>{let{x:w,y:O}=x;return{x:w,y:O}}},...u}=Rh(e,t),d={x:n,y:i},f=await s.detectOverflow(t,u),h=Nd(r),p=m7(h);let g=d[p],b=d[h];const v=(x,w)=>fve(w+f[x==="y"?"top":"left"],w,w-f[x==="y"?"bottom":"right"]);a&&(g=v(p,g)),l&&(b=v(h,b));const y=c.fn({...t,[p]:g,[h]:b});return{...y,data:{x:y.x-n,y:y.y-i,enabled:{[p]:a,[h]:l}}}}}},Uze=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,i;const{x:r,y:s,placement:a,rects:l,middlewareData:c}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Rh(e,t),h={x:r,y:s},p=Nd(a),g=m7(p);let b=h[g],v=h[p];const y=Rh(u,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:(n=y.mainAxis)!=null?n:0,crossAxis:(i=y.crossAxis)!=null?i:0};if(d){const k=g==="y"?"height":"width",S=l.reference[g]-l.floating[k]+x.mainAxis,E=l.reference[g]+l.reference[k]-x.mainAxis;bE&&(b=E)}if(f){var w,O;const k=g==="y"?"width":"height",S=pve.has(wm(a)),E=l.reference[p]-l.floating[k]+(S&&((w=c.offset)==null?void 0:w[p])||0)+(S?0:x.crossAxis),C=l.reference[p]+l.reference[k]+(S?0:((O=c.offset)==null?void 0:O[p])||0)-(S?x.crossAxis:0);vC&&(v=C)}return{[g]:b,[p]:v}}}},Qze=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:i,platform:r,elements:s}=t,{apply:a=()=>{},...l}=Rh(e,t),c=await r.detectOverflow(t,l),u=wm(n),d=jx(n),f=Nd(n)==="y",{width:h,height:p}=i.floating;let g,b;u==="top"||u==="bottom"?(g=u,b=d===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(b=u,g=d==="end"?"top":"bottom");const v=p-c.top-c.bottom,y=h-c.left-c.right,x=Om(p-c[g],v),w=Om(h-c[b],y),O=t.middlewareData.shift,k=!O;let S=x,E=w;O!=null&&O.enabled.x&&(E=y),O!=null&&O.enabled.y&&(S=v),k&&!d&&(f?E=h-2*fh(c.left,c.right):S=p-2*fh(c.top,c.bottom)),await a({...t,availableWidth:E,availableHeight:S});const C=await r.getDimensions(s.floating);return h!==C.width||p!==C.height?{reset:{rects:!0}}:{}}}};function sR(){return typeof window<"u"}function Rx(e){return mve(e)?(e.nodeName||"").toLowerCase():"#document"}function go(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hh(e){var t;return(t=(mve(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mve(e){return sR()?e instanceof Node||e instanceof go(e).Node:!1}function Vd(e){return sR()?e instanceof Element||e instanceof go(e).Element:!1}function Jd(e){return sR()?e instanceof HTMLElement||e instanceof go(e).HTMLElement:!1}function ZW(e){return!sR()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof go(e).ShadowRoot}function aR(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=Hd(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&r!=="inline"&&r!=="contents"}function zze(e){return/^(table|td|th)$/.test(Rx(e))}function oR(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Vze=/transform|translate|scale|rotate|perspective|filter/,Hze=/paint|layout|strict|content/,rg=e=>!!e&&e!=="none";let UD;function y7(e){const t=Vd(e)?Hd(e):e;return rg(t.transform)||rg(t.translate)||rg(t.scale)||rg(t.rotate)||rg(t.perspective)||!v7()&&(rg(t.backdropFilter)||rg(t.filter))||Vze.test(t.willChange||"")||Hze.test(t.contain||"")}function qze(e){let t=bb(e);for(;Jd(t)&&!yS(t);){if(y7(t))return t;if(oR(t))return null;t=bb(t)}return null}function v7(){return UD==null&&(UD=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),UD}function yS(e){return/^(html|body|#document)$/.test(Rx(e))}function Hd(e){return go(e).getComputedStyle(e)}function lR(e){return Vd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bb(e){if(Rx(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ZW(e)&&e.host||Hh(e);return ZW(t)?t.host:t}function gve(e){const t=bb(e);return yS(t)?(e.ownerDocument||e).body:Jd(t)&&aR(t)?t:gve(t)}function vS(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=gve(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),a=go(r);if(s){const l=B4(a);return t.concat(a,a.visualViewport||[],aR(r)?r:[],l&&n?vS(l):[])}else return t.concat(r,vS(r,[],n))}function B4(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bve(e){const t=Hd(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=Jd(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:i,l=P_(n)!==s||P_(i)!==a;return l&&(n=s,i=a),{width:n,height:i,$:l}}function x7(e){return Vd(e)?e:e.contextElement}function Zy(e){const t=x7(e);if(!Jd(t))return hh(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:s}=bve(t);let a=(s?P_(n.width):n.width)/i,l=(s?P_(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Wze=hh(0);function yve(e){const t=go(e);return!v7()||!t.visualViewport?Wze:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kze(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===go(e)}function yb(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=x7(e);let a=hh(1);t&&(i?Vd(i)&&(a=Zy(i)):a=Zy(e));const l=Kze(s,n,i)?yve(s):hh(0);let c=(r.left+l.x)/a.x,u=(r.top+l.y)/a.y,d=r.width/a.x,f=r.height/a.y;if(s&&i){const h=go(s),p=Vd(i)?go(i):i;let g=h,b=B4(g);for(;b&&p!==g;){const v=Zy(b),y=b.getBoundingClientRect(),x=Hd(b),w=y.left+(b.clientLeft+parseFloat(x.paddingLeft))*v.x,O=y.top+(b.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,f*=v.y,c+=w,u+=O,g=go(b),b=B4(g)}}return M_({width:d,height:f,x:c,y:u})}function cR(e,t){const n=lR(e).scrollLeft;return t?t.left+n:yb(Hh(e)).left+n}function vve(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-cR(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function Gze(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const s=r==="fixed",a=Hh(i),l=t?oR(t.floating):!1;if(i===a||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=hh(1);const d=hh(0),f=Jd(i);if((f||!s)&&((Rx(i)!=="body"||aR(a))&&(c=lR(i)),f)){const p=yb(i);u=Zy(i),d.x=p.x+i.clientLeft,d.y=p.y+i.clientTop}const h=a&&!f&&!s?vve(a,c):hh(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}}function Xze(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Yze(e){const t=lR(e),n=e.ownerDocument.body,i=fh(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=fh(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+cR(e);const a=-t.scrollTop;return Hd(n).direction==="rtl"&&(s+=fh(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:a}}const Zze=25;function Jze(e,t,n){n===void 0&&(n="viewport");const i=n==="layoutViewport",r=go(e),s=Hh(e),a=r.visualViewport;let l=s.clientWidth,c=s.clientHeight,u=0,d=0;if(a){const h=!v7()||t==="fixed";i?h||(u=-a.offsetLeft,d=-a.offsetTop):(l=a.width,c=a.height,h&&(u=a.offsetLeft,d=a.offsetTop))}if(cR(s)<=0){const h=s.ownerDocument,p=h.body,g=getComputedStyle(p),b=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,v=Math.abs(s.clientWidth-p.clientWidth-b),y=getComputedStyle(s).scrollbarGutter==="stable both-edges"?v/2:v;y<=Zze&&(l-=y)}return{width:l,height:c,x:u,y:d}}function eVe(e,t){const n=yb(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=Zy(e),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=r*s.x,u=i*s.y;return{width:a,height:l,x:c,y:u}}function JW(e,t,n){let i;if(t==="viewport"||t==="layoutViewport")i=Jze(e,n,t);else if(t==="document")i=Yze(Hh(e));else if(Vd(t))i=eVe(t,n);else{const r=yve(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return M_(i)}function tVe(e,t){const n=t.get(e);if(n)return n;let i=vS(e,[],!1).filter(l=>Vd(l)&&Rx(l)!=="body"),r=null;const s=Hd(e).position==="fixed";let a=s?bb(e):e;for(;Vd(a)&&!yS(a);){const l=Hd(a),c=y7(a),u=r?r.position:s?"fixed":"";!c&&(u==="fixed"||u==="absolute"&&l.position==="static")?i=i.filter(f=>f!==a):r=l,a=bb(a)}return t.set(e,i),i}function nVe(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const a=[...n==="clippingAncestors"?oR(t)?[]:tVe(t,this._c):[].concat(n),i],l=JW(t,a[0],r);let c=l.top,u=l.right,d=l.bottom,f=l.left;for(let h=1;h{l(!1,1e-7)},1e3)}E=!1}try{i=new IntersectionObserver(C,{...S,root:s.ownerDocument})}catch{i=new IntersectionObserver(C,S)}i.observe(e)}const c=go(e),u=()=>l(n);return c.addEventListener("resize",u),l(!0),()=>{c.removeEventListener("resize",u),a()}}function cVe(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,u=x7(e),d=r||s?[...u?vS(u):[],...t?vS(t):[]]:[];d.forEach(y=>{r&&y.addEventListener("scroll",n),s&&y.addEventListener("resize",n)});const f=u&&l?lVe(u,n,s):null;let h=-1,p=null;a&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),t&&p.observe(t));let g,b=c?yb(e):null;c&&v();function v(){const y=yb(e);b&&!Ove(b,y)&&n(),b=y,g=requestAnimationFrame(v)}return n(),()=>{var y;d.forEach(x=>{r&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const uVe=Fze,dVe=Bze,fVe=Mze,hVe=Qze,pVe=Lze,tK=Dze,mVe=Uze,gVe=(e,t,n)=>{const i=new Map,r=n??{},s={...oVe,...r.platform,_c:i};return Pze(e,t,{...r,platform:s})};var bVe=typeof document<"u",yVe=function(){},nA=bVe?m.useLayoutEffect:yVe;function L_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!L_(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!(s==="_owner"&&e.$$typeof)&&!L_(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function wve(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nK(e,t){const n=wve(e);return Math.round(t*n)/n}function zD(e){const t=m.useRef(e);return nA(()=>{t.current=e}),t}function vVe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=m.useState(i);L_(h,i)||p(i);const[g,b]=m.useState(null),[v,y]=m.useState(null),x=m.useCallback(M=>{M!==S.current&&(S.current=M,b(M))},[]),w=m.useCallback(M=>{M!==E.current&&(E.current=M,y(M))},[]),O=s||g,k=a||v,S=m.useRef(null),E=m.useRef(null),C=m.useRef(d),N=c!=null,_=zD(c),j=zD(r),T=zD(u),L=m.useCallback(()=>{if(!S.current||!E.current)return;const M={placement:t,strategy:n,middleware:h};j.current&&(M.platform=j.current),gVe(S.current,E.current,M).then(B=>{const I={...B,isPositioned:T.current!==!1};A.current&&!L_(C.current,I)&&(C.current=I,Fi.flushSync(()=>{f(I)}))})},[h,t,n,j,T]);nA(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[u]);const A=m.useRef(!1);nA(()=>(A.current=!0,()=>{A.current=!1}),[]),nA(()=>{if(O&&(S.current=O),k&&(E.current=k),O&&k){if(_.current)return _.current(O,k,L);L()}},[O,k,L,_,N]);const R=m.useMemo(()=>({reference:S,floating:E,setReference:x,setFloating:w}),[x,w]),P=m.useMemo(()=>({reference:O,floating:k}),[O,k]),$=m.useMemo(()=>{const M={position:n,left:0,top:0};if(!P.floating)return M;const B=nK(P.floating,d.x),I=nK(P.floating,d.y);return l?{...M,transform:"translate("+B+"px, "+I+"px)",...wve(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:I}},[n,l,P.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:L,refs:R,elements:P,floatingStyles:$}),[d,L,R,P,$])}const xVe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:r}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?tK({element:i.current,padding:r}).fn(n):{}:i?tK({element:i,padding:r}).fn(n):{}}}},OVe=(e,t)=>{const n=uVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},wVe=(e,t)=>{const n=dVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},SVe=(e,t)=>({fn:mVe(e).fn,options:[e,t]}),kVe=(e,t)=>{const n=fVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},EVe=(e,t)=>{const n=hVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},CVe=(e,t)=>{const n=pVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},TVe=(e,t)=>{const n=xVe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var AVe=Object.defineProperty,sm=(e,t)=>AVe(e,"name",{value:t,configurable:!0}),Sve="Popper",[kve,Ix]=Sl(Sve),[_Ve,Eve]=kve(Sve),NVe=sm(e=>{const{__scopePopper:t,children:n}=e,[i,r]=m.useState(null),[s,a]=m.useState(void 0);return o.jsx(_Ve,{scope:t,anchor:i,onAnchorChange:r,placementState:s,setPlacementState:a,children:n})},"Popper"),jVe="PopperAnchor",RVe=m.forwardRef(sm(function(t,n){const{__scopePopper:i,virtualRef:r,...s}=t,a=Eve(jVe,i),l=m.useRef(null),c=a.onAnchorChange,u=m.useCallback(b=>{l.current=b,b&&c(b)},[c]),d=rr(n,u),f=m.useRef(null);m.useEffect(()=>{if(!r)return;const b=f.current;f.current=r.current,b!==f.current&&c(f.current)});const h=a.placementState&&uR(a.placementState),p=h==null?void 0:h[0],g=h==null?void 0:h[1];return r?null:o.jsx(Or.div,{"data-radix-popper-side":p,"data-radix-popper-align":g,...s,ref:d})},"PopperAnchor")),Cve="PopperContent",[IVe,NVt]=kve(Cve),PVe=m.forwardRef(sm(function(t,n){var re,he,K,G,se,de,ke;const{__scopePopper:i,side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:b,...v}=t,y=Eve(Cve,i),[x,w]=m.useState(null),O=rr(n,w),[k,S]=m.useState(null),E=qk(k),C=(E==null?void 0:E.width)??0,N=(E==null?void 0:E.height)??0,_=r+(a!=="center"?"-"+a:""),j=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},T=Array.isArray(d)?d:[d],L=T.length>0,A={padding:j,boundary:T.filter(Tve),altBoundary:L},{refs:R,floatingStyles:P,placement:$,isPositioned:M,middlewareData:B}=vVe({strategy:"fixed",placement:_,whileElementsMounted:sm((...Te)=>cVe(...Te,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:y.anchor},middleware:[OVe({mainAxis:s+N,alignmentAxis:l}),u&&wVe({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?SVe():void 0,...A}),u&&kVe({...A}),EVe({...A,apply:sm(({elements:Te,rects:rt,availableWidth:Be,availableHeight:Me})=>{const{width:Ie,height:qe}=rt.reference,Pe=Te.floating.style;Pe.setProperty("--radix-popper-available-width",`${Be}px`),Pe.setProperty("--radix-popper-available-height",`${Me}px`),Pe.setProperty("--radix-popper-anchor-width",`${Ie}px`),Pe.setProperty("--radix-popper-anchor-height",`${qe}px`)},"apply")}),k&&TVe({element:k,padding:c}),DVe({arrowWidth:C,arrowHeight:N}),p&&CVe({strategy:"referenceHidden",...A,boundary:L?A.boundary:void 0})]}),I=y.setPlacementState;Jc(()=>(I($),()=>{I(void 0)}),[$,I]);const[H,X]=uR($),Q=Fu(b);Jc(()=>{M&&(Q==null||Q())},[M,Q]);const q=(re=B.arrow)==null?void 0:re.x,U=(he=B.arrow)==null?void 0:he.y,te=((K=B.arrow)==null?void 0:K.centerOffset)!==0,[le,oe]=m.useState();return Jc(()=>{x&&oe(window.getComputedStyle(x).zIndex)},[x]),o.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:M?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[(G=B.transformOrigin)==null?void 0:G.x,(se=B.transformOrigin)==null?void 0:se.y].join(" "),...((de=B.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:o.jsx(IVe,{scope:i,placedSide:H,placedAlign:X,onArrowChange:S,arrowX:q,arrowY:U,shouldHideArrow:te,children:o.jsx(Or.div,{"data-side":H,"data-align":X,...v,ref:O,style:{...v.style,animation:M?(ke=v.style)==null?void 0:ke.animation:"none"}})})})},"PopperContent"));function Tve(e){return e!==null}sm(Tve,"isNotNull");var DVe=sm(e=>({name:"transformOrigin",options:e,fn(t){var v,y,x;const{placement:n,rects:i,middlewareData:r}=t,a=((v=r.arrow)==null?void 0:v.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=uR(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((y=r.arrow)==null?void 0:y.x)??0)+l/2,p=(((x=r.arrow)==null?void 0:x.y)??0)+c/2;let g="",b="";return u==="bottom"?(g=a?f:`${h}px`,b=`${-c}px`):u==="top"?(g=a?f:`${h}px`,b=`${i.floating.height+c}px`):u==="right"?(g=`${-c}px`,b=a?f:`${p}px`):u==="left"&&(g=`${i.floating.width+c}px`,b=a?f:`${p}px`),{data:{x:g,y:b}}}}),"transformOrigin");function uR(e){const[t,n="center"]=e.split("-");return[t,n]}sm(uR,"getSideAndAlignFromPlacement");var dR=NVe,O7=RVe,w7=PVe,MVe=Object.defineProperty,S7=(e,t)=>MVe(e,"name",{value:t,configurable:!0}),VD=!1;function Ave(){const[e,t]=m.useState(VD);return m.useEffect(()=>{VD||(VD=!0,t(!0))},[]),e}S7(Ave,"useIsHydrated");var _ve=$b[" useSyncExternalStore ".trim().toString()];function Nve(){return()=>{}}S7(Nve,"subscribe");function jve(){return _ve(Nve,()=>!0,()=>!1)}S7(jve,"useIsHydratedModern");var LVe=typeof _ve=="function"?jve:Ave,$Ve=Object.defineProperty,Wb=(e,t)=>$Ve(e,"name",{value:t,configurable:!0}),HD="rovingFocusGroup.onEntryFocus",FVe={bubbles:!1,cancelable:!0},fR="RovingFocusGroup",[U4,Rve,BVe]=r7(fR),[UVe,Px]=Sl(fR,[BVe]),[QVe,zVe]=UVe(fR),VVe=m.forwardRef(Wb(function(t,n){return o.jsx(U4.Provider,{scope:t.__scopeRovingFocusGroup,children:o.jsx(U4.Slot,{scope:t.__scopeRovingFocusGroup,children:o.jsx(HVe,{...t,ref:n})})})},"RovingFocusGroup")),HVe=m.forwardRef(Wb(function(t,n){const{__scopeRovingFocusGroup:i,orientation:r,loop:s=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...h}=t,p=m.useRef(null),g=rr(n,p),b=Hk(a),[v,y]=su({prop:l,defaultProp:c??null,onChange:u,caller:fR}),[x,w]=m.useState(!1),O=Fu(d),k=Rve(i),S=m.useRef(!1),[E,C]=m.useState(0);return m.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(HD,O),()=>N.removeEventListener(HD,O)},[O]),o.jsx(QVe,{scope:i,orientation:r,dir:b,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(N=>y(N),[y]),onItemShiftTab:m.useCallback(()=>w(!0),[]),onFocusableItemAdd:m.useCallback(()=>C(N=>N+1),[]),onFocusableItemRemove:m.useCallback(()=>C(N=>N-1),[]),children:o.jsx(Or.div,{tabIndex:x||E===0?-1:0,"data-orientation":r,...h,ref:g,style:{outline:"none",...t.style},onMouseDown:yn(t.onMouseDown,()=>{S.current=!0}),onFocus:yn(t.onFocus,N=>{const _=!S.current;if(N.target===N.currentTarget&&_&&!x){const j=new CustomEvent(HD,FVe);if(N.currentTarget.dispatchEvent(j),!j.defaultPrevented){const T=k().filter($=>$.focusable),L=T.find($=>$.active),A=T.find($=>$.id===v),P=[L,A,...T].filter(Boolean).map($=>$.ref.current);k7(P,f)}}S.current=!1}),onBlur:yn(t.onBlur,()=>w(!1))})})},"RovingFocusGroupImpl")),qVe="RovingFocusGroupItem",WVe=m.forwardRef(Wb(function(t,n){const{__scopeRovingFocusGroup:i,focusable:r=!0,active:s=!1,tabStopId:a,children:l,...c}=t,u=xm(),d=a||u,f=zVe(qVe,i),h=f.currentTabStopId===d,p=Rve(i),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:v}=f,y=LVe();return Jc(()=>{if(!(!y||!r))return g(),()=>b()},[y,r,g,b]),m.useEffect(()=>{if(!(y||!r))return g(),()=>b()},[y,r,g,b]),o.jsx(U4.ItemSlot,{scope:i,id:d,focusable:r,active:s,children:o.jsx(Or.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...c,ref:n,onMouseDown:yn(t.onMouseDown,x=>{r?f.onItemFocus(d):x.preventDefault()}),onFocus:yn(t.onFocus,()=>f.onItemFocus(d)),onKeyDown:yn(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=Pve(x,f.orientation,f.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let k=p().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")k.reverse();else if(w==="prev"||w==="next"){w==="prev"&&k.reverse();const S=k.indexOf(x.currentTarget);k=f.loop?Dve(k,S+1):k.slice(S+1)}setTimeout(()=>k7(k))}}),children:typeof l=="function"?l({isCurrentTabStop:h,hasTabStop:v!=null}):l})})},"RovingFocusGroupItem")),KVe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ive(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Wb(Ive,"getDirectionAwareKey");function Pve(e,t,n){const i=Ive(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return KVe[i]}Wb(Pve,"getFocusIntent");function k7(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}Wb(k7,"focusFirst");function Dve(e,t){return e.map((n,i)=>e[(t+i)%e.length])}Wb(Dve,"wrapArray");var E7=VVe,C7=WVe,GVe=Object.defineProperty,Vi=(e,t)=>GVe(e,"name",{value:t,configurable:!0}),Q4=["Enter"," "],XVe=["ArrowDown","PageUp","Home"],Mve=["ArrowUp","PageDown","End"],YVe=[...XVe,...Mve],ZVe={ltr:[...Q4,"ArrowRight"],rtl:[...Q4,"ArrowLeft"]},JVe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},hR="Menu",[xS,eHe,tHe]=r7(hR),[Kb,Lve]=Sl(hR,[tHe,Ix,Px]),pR=Ix(),$ve=Px(),[Fve,zm]=Kb(hR),[nHe,Wk]=Kb(hR),iHe=Vi(e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:r,onOpenChange:s,modal:a=!0}=e,l=pR(t),[c,u]=m.useState(null),d=m.useRef(!1),f=Fu(s),h=Hk(r);return m.useEffect(()=>{const p=Vi(()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},"handleKeyDown"),g=Vi(()=>d.current=!1,"handlePointer");return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),m.useEffect(()=>{if(!n)return;const p=Vi(()=>f(!1),"handleBlur");return window.addEventListener("blur",p),()=>window.removeEventListener("blur",p)},[n,f]),o.jsx(dR,{...l,children:o.jsx(Fve,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:o.jsx(nHe,{scope:t,onClose:m.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:i})})})},"Menu"),Bve=m.forwardRef(Vi(function(t,n){const{__scopeMenu:i,...r}=t,s=pR(i);return o.jsx(O7,{...s,...r,ref:n})},"MenuAnchor")),Uve="MenuPortal",[rHe,Qve]=Kb(Uve,{forceMount:void 0}),sHe=Vi(e=>{const{__scopeMenu:t,forceMount:n,children:i,container:r}=e,s=zm(Uve,t);return o.jsx(rHe,{scope:t,forceMount:n,children:o.jsx(Zd,{present:n||s.open,children:o.jsx(c7,{asChild:!0,container:r,children:i})})})},"MenuPortal"),Du="MenuContent",[aHe,T7]=Kb(Du),oHe=m.forwardRef(Vi(function(t,n){const i=Qve(Du,t.__scopeMenu),{forceMount:r=i.forceMount,...s}=t,a=zm(Du,t.__scopeMenu),l=Wk(Du,t.__scopeMenu);return o.jsx(xS.Provider,{scope:t.__scopeMenu,children:o.jsx(Zd,{present:r||a.open,children:o.jsx(xS.Slot,{scope:t.__scopeMenu,children:l.modal?o.jsx(lHe,{...s,ref:n}):o.jsx(cHe,{...s,ref:n})})})})},"MenuContent")),lHe=m.forwardRef(Vi(function(t,n){const i=zm(Du,t.__scopeMenu),r=m.useRef(null),s=rr(n,r);return m.useEffect(()=>{const a=r.current;if(a)return cve(a)},[]),o.jsx(A7,{...t,ref:s,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:yn(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentModal")),cHe=m.forwardRef(Vi(function(t,n){const i=zm(Du,t.__scopeMenu);return o.jsx(A7,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentNonModal")),uHe=_h("MenuContent.ScrollLock"),A7=m.forwardRef(Vi(function(t,n){const{__scopeMenu:i,loop:r=!1,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:g,disableOutsideScroll:b,...v}=t,y=zm(Du,i),x=Wk(Du,i),w=pR(i),O=$ve(i),k=eHe(i),[S,E]=m.useState(null),C=m.useRef(null),N=rr(n,C,y.onContentChange),_=m.useRef(0),j=m.useRef(""),T=m.useRef(0),L=m.useRef(null),A=m.useRef("right"),R=m.useRef(0),P=b?d7:m.Fragment,$=b?{as:uHe,allowPinchZoom:!0}:void 0,M=Vi(I=>{var oe,re;const H=j.current+I,X=k().filter(he=>!he.disabled),Q=document.activeElement,q=(oe=X.find(he=>he.ref.current===Q))==null?void 0:oe.textValue,U=X.map(he=>he.textValue),te=Xve(U,H,q),le=(re=X.find(he=>he.textValue===te))==null?void 0:re.ref.current;Vi(function he(K){j.current=K,window.clearTimeout(_.current),K!==""&&(_.current=window.setTimeout(()=>he(""),1e3))},"updateSearch")(H),le&&setTimeout(()=>le.focus())},"handleTypeaheadSearch");m.useEffect(()=>()=>window.clearTimeout(_.current),[]),iR();const B=m.useCallback(I=>{var X,Q;return A.current===((X=L.current)==null?void 0:X.side)&&Zve(I,(Q=L.current)==null?void 0:Q.area)},[]);return o.jsx(aHe,{scope:i,searchRef:j,onItemEnter:m.useCallback(I=>{B(I)&&I.preventDefault()},[B]),onItemLeave:m.useCallback(I=>{var H;B(I)||((H=C.current)==null||H.focus(),E(null))},[B]),onTriggerLeave:m.useCallback(I=>{B(I)&&I.preventDefault()},[B]),pointerGraceTimerRef:T,onPointerGraceIntentChange:m.useCallback(I=>{L.current=I},[]),children:o.jsx(P,{...$,children:o.jsx(Kye,{asChild:!0,trapped:s,onMountAutoFocus:yn(a,I=>{var H;I.preventDefault(),(H=C.current)==null||H.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:o.jsx(a7,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:g,children:o.jsx(E7,{asChild:!0,...O,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:E,onEntryFocus:yn(u,I=>{x.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(w7,{role:"menu","aria-orientation":"vertical","data-state":N7(y.open),"data-radix-menu-content":"",dir:x.dir,...w,...v,ref:N,style:{outline:"none",...v.style},onKeyDown:yn(v.onKeyDown,I=>{const X=I.target.closest("[data-radix-menu-content]")===I.currentTarget,Q=I.ctrlKey||I.altKey||I.metaKey,q=I.key.length===1;X&&(I.key==="Tab"&&I.preventDefault(),!Q&&q&&M(I.key));const U=C.current;if(I.target!==U||!YVe.includes(I.key))return;I.preventDefault();const le=k().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);Mve.includes(I.key)&&le.reverse(),Kve(le)}),onBlur:yn(t.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(_.current),j.current="")}),onPointerMove:yn(t.onPointerMove,Bv(I=>{const H=I.target,X=R.current!==I.clientX;if(I.currentTarget.contains(H)&&X){const Q=I.clientX>R.current?"right":"left";A.current=Q,R.current=I.clientX}}))})})})})})})},"MenuContentImpl")),dHe=m.forwardRef(Vi(function(t,n){const{__scopeMenu:i,...r}=t;return o.jsx(Or.div,{role:"group",...r,ref:n})},"MenuGroup")),z4="MenuItem",iK="menu.itemSelect",_7=m.forwardRef(Vi(function(t,n){const{disabled:i=!1,onSelect:r,...s}=t,a=m.useRef(null),l=Wk(z4,t.__scopeMenu),c=T7(z4,t.__scopeMenu),u=rr(n,a),d=m.useRef(!1),f=Vi(()=>{const h=a.current;if(!i&&h){const p=new CustomEvent(iK,{bubbles:!0,cancelable:!0});h.addEventListener(iK,g=>r==null?void 0:r(g),{once:!0}),i7(h,p),p.defaultPrevented?d.current=!1:l.onClose()}},"handleSelect");return o.jsx(zve,{...s,ref:u,disabled:i,onClick:yn(t.onClick,f),onPointerDown:h=>{var p;(p=t.onPointerDown)==null||p.call(t,h),d.current=!0},onPointerUp:yn(t.onPointerUp,h=>{var p;d.current||(p=h.currentTarget)==null||p.click()}),onKeyDown:yn(t.onKeyDown,h=>{i||h.target!==h.currentTarget||c.searchRef.current!==""&&h.key===" "||Q4.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})},"MenuItem")),zve=m.forwardRef(Vi(function(t,n){const{__scopeMenu:i,disabled:r=!1,textValue:s,...a}=t,l=T7(z4,i),c=$ve(i),u=m.useRef(null),d=rr(n,u),[f,h]=m.useState(!1),[p,g]=m.useState("");return m.useEffect(()=>{const b=u.current;b&&g((b.textContent??"").trim())},[a.children]),o.jsx(xS.ItemSlot,{scope:i,disabled:r,textValue:s??p,children:o.jsx(C7,{asChild:!0,...c,focusable:!r,children:o.jsx(Or.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:yn(t.onPointerMove,Bv(b=>{r?l.onItemLeave(b):(l.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:yn(t.onPointerLeave,Bv(b=>l.onItemLeave(b))),onFocus:yn(t.onFocus,()=>h(!0)),onBlur:yn(t.onBlur,()=>h(!1))})})})},"MenuItemImpl")),fHe=m.forwardRef(Vi(function(t,n){const{checked:i=!1,onCheckedChange:r,...s}=t;return o.jsx(Hve,{scope:t.__scopeMenu,checked:i,children:o.jsx(_7,{role:"menuitemcheckbox","aria-checked":OS(i)?"mixed":i,...s,ref:n,"data-state":mR(i),onSelect:yn(s.onSelect,()=>r==null?void 0:r(OS(i)?!0:!i),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),hHe="MenuRadioGroup",[pHe,mHe]=Kb(hHe,{value:void 0,onValueChange:Vi(()=>{},"onValueChange")}),gHe=m.forwardRef(Vi(function(t,n){const{value:i,onValueChange:r,...s}=t,a=Fu(r);return o.jsx(pHe,{scope:t.__scopeMenu,value:i,onValueChange:a,children:o.jsx(dHe,{...s,ref:n})})},"MenuRadioGroup")),bHe="MenuRadioItem",yHe=m.forwardRef(Vi(function(t,n){const{value:i,...r}=t,s=mHe(bHe,t.__scopeMenu),a=i===s.value;return o.jsx(Hve,{scope:t.__scopeMenu,checked:a,children:o.jsx(_7,{role:"menuitemradio","aria-checked":a,...r,ref:n,"data-state":mR(a),onSelect:yn(r.onSelect,()=>{var l;return(l=s.onValueChange)==null?void 0:l.call(s,i)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),Vve="MenuItemIndicator",[Hve,vHe]=Kb(Vve,{checked:!1}),xHe=m.forwardRef(Vi(function(t,n){const{__scopeMenu:i,forceMount:r,...s}=t,a=vHe(Vve,i);return o.jsx(Zd,{present:r||OS(a.checked)||a.checked===!0,children:o.jsx(Or.span,{...s,ref:n,"data-state":mR(a.checked)})})},"MenuItemIndicator")),OHe=m.forwardRef(Vi(function(t,n){const{__scopeMenu:i,...r}=t;return o.jsx(Or.div,{role:"separator","aria-orientation":"horizontal",...r,ref:n})},"MenuSeparator")),qve="MenuSub",[wHe,Wve]=Kb(qve),SHe=Vi(e=>{const{__scopeMenu:t,children:n,open:i=!1,onOpenChange:r}=e,s=zm(qve,t),a=pR(t),[l,c]=m.useState(null),[u,d]=m.useState(null),f=Fu(r);return m.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),o.jsx(dR,{...a,children:o.jsx(Fve,{scope:t,open:i,onOpenChange:f,content:u,onContentChange:d,children:o.jsx(wHe,{scope:t,contentId:xm(),triggerId:xm(),trigger:l,onTriggerChange:c,children:n})})})},"MenuSub"),aT="MenuSubTrigger",kHe=m.forwardRef(Vi(function(t,n){const i=zm(aT,t.__scopeMenu),r=Wk(aT,t.__scopeMenu),s=Wve(aT,t.__scopeMenu),a=T7(aT,t.__scopeMenu),l=m.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:t.__scopeMenu},f=m.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);m.useEffect(()=>f,[f]),m.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),u(null)}},[c,u]);const h=rr(n,s.onTriggerChange);return o.jsx(Bve,{asChild:!0,...d,children:o.jsx(zve,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?s.contentId:void 0,"data-state":N7(i.open),...t,ref:h,onClick:p=>{var g;(g=t.onClick)==null||g.call(t,p),!(t.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),i.open||i.onOpenChange(!0))},onPointerMove:yn(t.onPointerMove,Bv(p=>{a.onItemEnter(p),!p.defaultPrevented&&!t.disabled&&!i.open&&!l.current&&(a.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{i.onOpenChange(!0),f()},100))})),onPointerLeave:yn(t.onPointerLeave,Bv(p=>{var b,v;f();const g=(b=i.content)==null?void 0:b.getBoundingClientRect();if(g){const y=(v=i.content)==null?void 0:v.dataset.side,x=y==="right",w=x?-5:5,O=g[x?"left":"right"],k=g[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+w,y:p.clientY},{x:O,y:g.top},{x:k,y:g.top},{x:k,y:g.bottom},{x:O,y:g.bottom}],side:y}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:yn(t.onKeyDown,p=>{var b;t.disabled||p.target!==p.currentTarget||a.searchRef.current!==""&&p.key===" "||ZVe[r.dir].includes(p.key)&&(i.onOpenChange(!0),(b=i.content)==null||b.focus(),p.preventDefault())})})})},"MenuSubTrigger")),EHe="MenuSubContent",CHe=m.forwardRef(Vi(function(t,n){const i=Qve(Du,t.__scopeMenu),{forceMount:r=i.forceMount,align:s="start",...a}=t,l=zm(Du,t.__scopeMenu),c=Wk(Du,t.__scopeMenu),u=Wve(EHe,t.__scopeMenu),d=m.useRef(null),f=rr(n,d);return o.jsx(xS.Provider,{scope:t.__scopeMenu,children:o.jsx(Zd,{present:r||l.open,children:o.jsx(xS.Slot,{scope:t.__scopeMenu,children:o.jsx(A7,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:s,side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var p;c.isUsingKeyboardRef.current&&((p=d.current)==null||p.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:yn(t.onFocusOutside,h=>{h.target!==u.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:yn(t.onEscapeKeyDown,h=>{c.onClose(),h.preventDefault()}),onKeyDown:yn(t.onKeyDown,h=>{var b;const p=h.currentTarget.contains(h.target),g=JVe[c.dir].includes(h.key);p&&g&&(l.onOpenChange(!1),(b=u.trigger)==null||b.focus(),h.preventDefault())})})})})})},"MenuSubContent"));function N7(e){return e?"open":"closed"}Vi(N7,"getOpenState");function OS(e){return e==="indeterminate"}Vi(OS,"isIndeterminate");function mR(e){return OS(e)?"indeterminate":e?"checked":"unchecked"}Vi(mR,"getCheckedState");function Kve(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Vi(Kve,"focusFirst");function Gve(e,t){return e.map((n,i)=>e[(t+i)%e.length])}Vi(Gve,"wrapArray");function Xve(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Gve(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return c!==n?c:void 0}Vi(Xve,"getNextMatch");function Yve(e,t){const{x:n,y:i}=e;let r=!1;for(let s=0,a=t.length-1;si!=h>i&&n<(f-u)*(i-d)/(h-d)+u&&(r=!r)}return r}Vi(Yve,"isPointInPolygon");function Zve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Yve(n,t)}Vi(Zve,"isPointerInGraceArea");function Bv(e){return t=>t.pointerType==="mouse"?e(t):void 0}Vi(Bv,"whenMouse");var THe=iHe,AHe=Bve,_He=sHe,NHe=oHe,jHe=_7,RHe=fHe,IHe=gHe,PHe=yHe,DHe=xHe,MHe=OHe,LHe=SHe,$He=kHe,FHe=CHe,BHe=Object.defineProperty,hc=(e,t)=>BHe(e,"name",{value:t,configurable:!0}),j7="DropdownMenu",[UHe,jVt]=Sl(j7,[Lve]),pc=Lve(),[QHe,Jve]=UHe(j7),zHe=hc(e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:r,defaultOpen:s,onOpenChange:a,modal:l=!0}=e,c=pc(t),u=m.useRef(null),[d,f]=su({prop:r,defaultProp:s??!1,onChange:a,caller:j7});return o.jsx(QHe,{scope:t,triggerId:xm(),triggerRef:u,contentId:xm(),open:d,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(h=>!h),[f]),modal:l,children:o.jsx(THe,{...c,open:d,onOpenChange:f,dir:i,modal:l,children:n})})},"DropdownMenu"),VHe="DropdownMenuTrigger",HHe=m.forwardRef(hc(function(t,n){const{__scopeDropdownMenu:i,disabled:r=!1,...s}=t,a=Jve(VHe,i),l=pc(i),c=rr(n,a.triggerRef);return o.jsx(AHe,{asChild:!0,...l,children:o.jsx(Or.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:c,onPointerDown:yn(t.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:yn(t.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),qHe=hc(e=>{const{__scopeDropdownMenu:t,...n}=e,i=pc(t);return o.jsx(_He,{...i,...n})},"DropdownMenuPortal"),WHe="DropdownMenuContent",KHe=m.forwardRef(hc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=Jve(WHe,i),a=pc(i),l=m.useRef(!1);return o.jsx(NHe,{id:s.contentId,"aria-labelledby":s.triggerId,...a,...r,ref:n,onCloseAutoFocus:yn(t.onCloseAutoFocus,c=>{var u;l.current||(u=s.triggerRef.current)==null||u.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:yn(t.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!s.modal||f)&&(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),GHe=m.forwardRef(hc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=pc(i);return o.jsx(jHe,{...s,...r,ref:n})},"DropdownMenuItem")),XHe=m.forwardRef(hc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=pc(i);return o.jsx(RHe,{...s,...r,ref:n})},"DropdownMenuCheckboxItem")),YHe=m.forwardRef(hc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=pc(i);return o.jsx(IHe,{...s,...r,ref:n})},"DropdownMenuRadioGroup")),ZHe=m.forwardRef(hc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=pc(i);return o.jsx(PHe,{...s,...r,ref:n})},"DropdownMenuRadioItem")),JHe=m.forwardRef(hc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=pc(i);return o.jsx(DHe,{...s,...r,ref:n})},"DropdownMenuItemIndicator")),eqe=m.forwardRef(hc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=pc(i);return o.jsx(MHe,{...s,...r,ref:n})},"DropdownMenuSeparator")),tqe=hc(e=>{const{__scopeDropdownMenu:t,children:n,open:i,onOpenChange:r,defaultOpen:s}=e,a=pc(t),[l,c]=su({prop:i,defaultProp:s??!1,onChange:r,caller:"DropdownMenuSub"});return o.jsx(LHe,{...a,open:l,onOpenChange:c,children:n})},"DropdownMenuSub"),nqe=m.forwardRef(hc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=pc(i);return o.jsx($He,{...s,...r,ref:n})},"DropdownMenuSubTrigger")),iqe=m.forwardRef(hc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=pc(i);return o.jsx(FHe,{...s,...r,ref:n,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),rqe=zHe,sqe=HHe,exe=qHe,aqe=KHe,txe=GHe,oqe=XHe,lqe=YHe,cqe=ZHe,nxe=JHe,uqe=eqe,dqe=tqe,fqe=nqe,hqe=iqe,pqe=Object.defineProperty,Vm=(e,t)=>pqe(e,"name",{value:t,configurable:!0}),R7="Popover",[ixe,RVt]=Sl(R7,[Ix]),I7=Ix(),[mqe,Dx]=ixe(R7),gqe=Vm(e=>{const{__scopePopover:t,children:n,open:i,defaultOpen:r,onOpenChange:s,modal:a=!1}=e,l=I7(t),c=m.useRef(null),[u,d]=m.useState(!1),[f,h]=su({prop:i,defaultProp:r??!1,onChange:s,caller:R7});return o.jsx(dR,{...l,children:o.jsx(mqe,{scope:t,contentId:xm(),triggerRef:c,open:f,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:u,onCustomAnchorAdd:m.useCallback(()=>d(!0),[]),onCustomAnchorRemove:m.useCallback(()=>d(!1),[]),modal:a,children:n})})},"Popover"),bqe="PopoverTrigger",yqe=m.forwardRef(Vm(function(t,n){const{__scopePopover:i,...r}=t,s=Dx(bqe,i),a=I7(i),l=rr(n,s.triggerRef),c=o.jsx(Or.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":P7(s.open),...r,ref:l,onClick:yn(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?c:o.jsx(O7,{asChild:!0,...a,children:c})},"PopoverTrigger")),rxe="PopoverPortal",[vqe,xqe]=ixe(rxe,{forceMount:void 0}),Oqe=Vm(e=>{const{__scopePopover:t,forceMount:n,children:i,container:r}=e,s=Dx(rxe,t);return o.jsx(vqe,{scope:t,forceMount:n,children:o.jsx(Zd,{present:n||s.open,children:o.jsx(c7,{asChild:!0,container:r,children:i})})})},"PopoverPortal"),wS="PopoverContent",wqe=m.forwardRef(Vm(function(t,n){const i=xqe(wS,t.__scopePopover),{forceMount:r=i.forceMount,...s}=t,a=Dx(wS,t.__scopePopover);return o.jsx(Zd,{present:r||a.open,children:a.modal?o.jsx(kqe,{...s,ref:n}):o.jsx(Eqe,{...s,ref:n})})},"PopoverContent")),Sqe=_h("PopoverContent.RemoveScroll"),kqe=m.forwardRef(Vm(function(t,n){const i=Dx(wS,t.__scopePopover),r=m.useRef(null),s=rr(n,r),a=m.useRef(!1);return m.useEffect(()=>{const l=r.current;if(l)return cve(l)},[]),o.jsx(d7,{as:Sqe,allowPinchZoom:!0,children:o.jsx(sxe,{...t,ref:s,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:yn(t.onCloseAutoFocus,l=>{var c;l.preventDefault(),a.current||(c=i.triggerRef.current)==null||c.focus()}),onPointerDownOutside:yn(t.onPointerDownOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:yn(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),Eqe=m.forwardRef(Vm(function(t,n){const i=Dx(wS,t.__scopePopover),r=m.useRef(!1),s=m.useRef(!1);return o.jsx(sxe,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,c;(l=t.onCloseAutoFocus)==null||l.call(t,a),a.defaultPrevented||(r.current||(c=i.triggerRef.current)==null||c.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{var u,d;(u=t.onInteractOutside)==null||u.call(t,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=a.target;((d=i.triggerRef.current)==null?void 0:d.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})},"PopoverContentNonModal")),sxe=m.forwardRef(Vm(function(t,n){const{__scopePopover:i,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...h}=t,p=Dx(wS,i),g=I7(i);return iR(),o.jsx(Kye,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:o.jsx(a7,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(w7,{"data-state":P7(p.open),role:"dialog",id:p.contentId,...g,...h,ref:n,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function P7(e){return e?"open":"closed"}Vm(P7,"getState");var axe=gqe,oxe=yqe,lxe=Oqe,cxe=wqe,Cqe=Object.defineProperty,bo=(e,t)=>Cqe(e,"name",{value:t,configurable:!0}),uxe="Radio",[Tqe,dxe]=Sl(uxe),[Aqe,gR]=Tqe(uxe);function fxe(e){const{__scopeRadio:t,checked:n=!1,children:i,disabled:r,form:s,name:a,onCheck:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,h]=m.useState(null),[p,g]=m.useState(null),b=m.useRef(!1),[v,y]=m.useReducer(O=>O+1,0),x=f?!!s||!!f.closest("form"):!0,w={checked:n,disabled:r,required:c,name:a,form:s,value:u,control:f,setControl:h,hasConsumerStoppedPropagationRef:b,userInteractionCount:v,onUserInteraction:y,isFormControl:x,bubbleInput:p,setBubbleInput:g,onCheck:bo(()=>l==null?void 0:l(),"onCheck")};return o.jsx(Aqe,{scope:t,...w,children:hxe(d)?d(w):i})}bo(fxe,"RadioProvider");var _qe="RadioTrigger",Nqe=m.forwardRef(bo(function({__scopeRadio:t,onClick:n,...i},r){const{checked:s,disabled:a,value:l,setControl:c,onCheck:u,hasConsumerStoppedPropagationRef:d,onUserInteraction:f,isFormControl:h,bubbleInput:p}=gR(_qe,t),g=rr(r,c);return o.jsx(Or.button,{type:"button",role:"radio","aria-checked":s,"data-state":D7(s),"data-disabled":a?"":void 0,disabled:a,value:l,...i,ref:g,onClick:yn(n,b=>{s||(f(),u()),p&&h&&(d.current=b.isPropagationStopped(),d.current||b.stopPropagation())})})},"RadioTrigger")),jqe="RadioIndicator",Rqe=m.forwardRef(bo(function(t,n){const{__scopeRadio:i,forceMount:r,...s}=t,a=gR(jqe,i);return o.jsx(Zd,{present:r||a.checked,children:o.jsx(Or.span,{"data-state":D7(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:n})})},"RadioIndicator")),Iqe="RadioBubbleInput",Pqe=m.forwardRef(bo(function({__scopeRadio:t,onClick:n,...i},r){const{control:s,checked:a,required:l,disabled:c,name:u,value:d,form:f,bubbleInput:h,setBubbleInput:p,hasConsumerStoppedPropagationRef:g,userInteractionCount:b}=gR(Iqe,t),v=rr(r,p),y=qk(s),x=m.useRef(!1),w=m.useRef(a),O=m.useRef(b);m.useEffect(()=>{const S=h;if(!S)return;const E=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(E,"checked").set,_=b!==O.current;O.current=b;const j=w.current!==a;w.current=a;const T=!(_&&g.current);if(j&&N){x.current=!_;const L=new Event("click",{bubbles:T});N.call(S,a),S.dispatchEvent(L),x.current=!1}},[h,a,g,b]);const k=m.useRef(a);return o.jsx(Or.input,{type:"radio","aria-hidden":!0,defaultChecked:k.current,required:l,disabled:c,name:u,value:d,form:f,...i,tabIndex:-1,ref:v,onClick:yn(n,S=>{x.current&&S.stopPropagation()}),style:{...i.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"RadioBubbleInput"));function hxe(e){return typeof e=="function"}bo(hxe,"isFunction");function D7(e){return e?"checked":"unchecked"}bo(D7,"getState");var Dqe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],M7="RadioGroup",[Mqe,IVt]=Sl(M7,[Px,dxe]),pxe=Px(),bR=dxe(),[Lqe,$qe]=Mqe(M7),Fqe=m.forwardRef(bo(function(t,n){const{__scopeRadioGroup:i,name:r,form:s,defaultValue:a,value:l,required:c=!1,disabled:u=!1,orientation:d,dir:f,loop:h=!0,onValueChange:p,...g}=t,b=pxe(i),v=Hk(f),[y,x]=su({prop:l,defaultProp:a??null,onChange:p,caller:M7}),[w,O]=m.useState(null),k=rr(n,O),S=m.useRef(y);return m.useEffect(()=>{const E=s?w==null?void 0:w.ownerDocument.getElementById(s):w==null?void 0:w.closest("form");if(E instanceof HTMLFormElement){const C=bo(()=>x(S.current),"reset");return E.addEventListener("reset",C),()=>E.removeEventListener("reset",C)}},[w,s,x]),o.jsx(Lqe,{scope:i,name:r,form:s,required:c,disabled:u,value:y,onValueChange:x,children:o.jsx(E7,{asChild:!0,...b,orientation:d,dir:v,loop:h,children:o.jsx(Or.div,{role:"radiogroup","aria-required":c,"aria-orientation":d,"data-disabled":u?"":void 0,dir:v,...g,ref:k})})})},"RadioGroup")),Bqe="RadioGroupItemProvider",Uqe="RadioGroupItemTrigger";function mxe(e){const{__scopeRadioGroup:t,value:n,disabled:i,children:r,internal_do_not_use_render:s}=e,a=$qe(Bqe,t),l=bR(t),c=a.disabled||i;return o.jsx(fxe,{...l,checked:a.value===n,disabled:c,required:a.required,name:a.name,form:a.form,value:n,onCheck:()=>a.onValueChange(n),internal_do_not_use_render:s,children:r})}bo(mxe,"RadioGroupItemProvider");var Qqe=m.forwardRef(bo(function(t,n){const{__scopeRadioGroup:i,...r}=t,s=pxe(i),a=bR(i),{checked:l,disabled:c}=gR(Uqe,a.__scopeRadio),u=m.useRef(null),d=rr(n,u),f=m.useRef(!1);return m.useEffect(()=>{const h=bo(g=>{Dqe.includes(g.key)&&(f.current=!0)},"handleKeyDown"),p=bo(()=>f.current=!1,"handleKeyUp");return document.addEventListener("keydown",h),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)}},[]),o.jsx(C7,{asChild:!0,...s,focusable:!c,active:l,children:o.jsx(Nqe,{...a,...r,ref:d,onKeyDown:yn(r.onKeyDown,h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:yn(r.onFocus,()=>{var h;f.current&&((h=u.current)==null||h.click())})})})},"RadioGroupItemTrigger")),zqe=m.forwardRef(bo(function(t,n){const{__scopeRadioGroup:i,value:r,disabled:s,...a}=t;return o.jsx(mxe,{__scopeRadioGroup:i,value:r,disabled:s,internal_do_not_use_render:({isFormControl:l})=>o.jsxs(o.Fragment,{children:[o.jsx(Qqe,{...a,ref:n,__scopeRadioGroup:i}),l&&o.jsx(Vqe,{__scopeRadioGroup:i})]})})},"RadioGroupItem")),Vqe=m.forwardRef(bo(function(t,n){const{__scopeRadioGroup:i,...r}=t,s=bR(i);return o.jsx(Pqe,{...s,...r,ref:n})},"RadioGroupItemBubbleInput")),Hqe=m.forwardRef(bo(function(t,n){const{__scopeRadioGroup:i,...r}=t,s=bR(i);return o.jsx(Rqe,{...s,...r,ref:n})},"RadioGroupIndicator")),qqe=Object.defineProperty,Sm=(e,t)=>qqe(e,"name",{value:t,configurable:!0}),L7="Switch",[Wqe,PVt]=Sl(L7),[Kqe,$7]=Wqe(L7);function gxe(e){const{__scopeSwitch:t,checked:n,children:i,defaultChecked:r,disabled:s,form:a,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,p]=su({prop:n,defaultProp:r??!1,onChange:c,caller:L7}),[g,b]=m.useState(null),[v,y]=m.useState(null),x=m.useRef(!1),[w,O]=m.useReducer(E=>E+1,0),k=g?!!a||!!g.closest("form"):!0,S={checked:h,setChecked:p,disabled:s,control:g,setControl:b,name:l,form:a,value:d,hasConsumerStoppedPropagationRef:x,userInteractionCount:w,onUserInteraction:O,required:u,defaultChecked:r,isFormControl:k,bubbleInput:v,setBubbleInput:y};return o.jsx(Kqe,{scope:t,...S,children:bxe(f)?f(S):i})}Sm(gxe,"SwitchProvider");var Gqe="SwitchTrigger",Xqe=m.forwardRef(Sm(function({__scopeSwitch:t,onClick:n,...i},r){const{control:s,form:a,value:l,disabled:c,checked:u,required:d,setControl:f,setChecked:h,hasConsumerStoppedPropagationRef:p,onUserInteraction:g,isFormControl:b,bubbleInput:v}=$7(Gqe,t),y=rr(r,f),x=m.useRef(u);return m.useEffect(()=>{const w=a?s==null?void 0:s.ownerDocument.getElementById(a):s==null?void 0:s.form;if(w instanceof HTMLFormElement){const O=Sm(()=>h(x.current),"reset");return w.addEventListener("reset",O),()=>w.removeEventListener("reset",O)}},[s,a,h]),o.jsx(Or.button,{type:"button",role:"switch","aria-checked":u,"aria-required":d,"data-state":F7(u),"data-disabled":c?"":void 0,disabled:c,value:l,...i,ref:y,onClick:yn(n,w=>{g(),h(O=>!O),v&&b&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})},"SwitchTrigger")),Yqe=m.forwardRef(Sm(function(t,n){const{__scopeSwitch:i,name:r,checked:s,defaultChecked:a,required:l,disabled:c,value:u,onCheckedChange:d,form:f,...h}=t;return o.jsx(gxe,{__scopeSwitch:i,checked:s,defaultChecked:a,disabled:c,required:l,onCheckedChange:d,name:r,form:f,value:u,internal_do_not_use_render:({isFormControl:p})=>o.jsxs(o.Fragment,{children:[o.jsx(Xqe,{...h,ref:n,__scopeSwitch:i}),p&&o.jsx(tWe,{__scopeSwitch:i})]})})},"Switch")),Zqe="SwitchThumb",Jqe=m.forwardRef(Sm(function(t,n){const{__scopeSwitch:i,...r}=t,s=$7(Zqe,i);return o.jsx(Or.span,{"data-state":F7(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:n})},"SwitchThumb")),eWe="SwitchBubbleInput",tWe=m.forwardRef(Sm(function({__scopeSwitch:t,onClick:n,...i},r){const{control:s,hasConsumerStoppedPropagationRef:a,userInteractionCount:l,checked:c,defaultChecked:u,required:d,disabled:f,name:h,value:p,form:g,bubbleInput:b,setBubbleInput:v}=$7(eWe,t),y=rr(r,v),x=qk(s),w=m.useRef(!1),O=m.useRef(c),k=m.useRef(l);m.useEffect(()=>{const E=b;if(!E)return;const C=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(C,"checked").set,j=l!==k.current;k.current=l;const T=O.current!==c;O.current=c;const L=!(j&&a.current);if(T&&_){w.current=!j;const A=new Event("click",{bubbles:L});_.call(E,c),E.dispatchEvent(A),w.current=!1}},[b,c,a,l]);const S=m.useRef(c);return o.jsx(Or.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??S.current,required:d,disabled:f,name:h,value:p,form:g,...i,tabIndex:-1,ref:y,onClick:yn(n,E=>{w.current&&E.stopPropagation()}),style:{...i.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function bxe(e){return typeof e=="function"}Sm(bxe,"isFunction");function F7(e){return e?"checked":"unchecked"}Sm(F7,"getState");var nWe=Object.defineProperty,iWe=(e,t)=>nWe(e,"name",{value:t,configurable:!0}),rWe="Toggle",sWe=m.forwardRef(iWe(function(t,n){const{pressed:i,defaultPressed:r,onPressedChange:s,...a}=t,[l,c]=su({prop:i,onChange:s,defaultProp:r??!1,caller:rWe});return o.jsx(Or.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":t.disabled?"":void 0,...a,ref:n,onClick:yn(t.onClick,()=>{t.disabled||c(!l)})})},"Toggle")),aWe=Object.defineProperty,km=(e,t)=>aWe(e,"name",{value:t,configurable:!0}),Mx="ToggleGroup",[yxe,DVt]=Sl(Mx,[Px]),vxe=Px(),oWe=m.forwardRef(km(function(t,n){const{type:i,...r}=t;if(i==="single"){const s=r;return o.jsx(lWe,{role:"radiogroup",...s,ref:n})}if(i==="multiple"){const s=r;return o.jsx(cWe,{role:"toolbar",...s,ref:n})}throw new Error(`Missing prop \`type\` expected on \`${Mx}\``)},"ToggleGroup")),[xxe,Oxe]=yxe(Mx),lWe=m.forwardRef(km(function(t,n){const{value:i,defaultValue:r,onValueChange:s=km(()=>{},"onValueChange"),...a}=t,[l,c]=su({prop:i,defaultProp:r??"",onChange:s,caller:Mx});return o.jsx(xxe,{scope:t.__scopeToggleGroup,type:"single",value:m.useMemo(()=>l?[l]:[],[l]),onItemActivate:c,onItemDeactivate:m.useCallback(()=>c(""),[c]),children:o.jsx(wxe,{...a,ref:n})})},"ToggleGroupImplSingle")),cWe=m.forwardRef(km(function(t,n){const{value:i,defaultValue:r,onValueChange:s=km(()=>{},"onValueChange"),...a}=t,[l,c]=su({prop:i,defaultProp:r??[],onChange:s,caller:Mx}),u=m.useCallback(f=>c((h=[])=>[...h,f]),[c]),d=m.useCallback(f=>c((h=[])=>h.filter(p=>p!==f)),[c]);return o.jsx(xxe,{scope:t.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:u,onItemDeactivate:d,children:o.jsx(wxe,{...a,ref:n})})},"ToggleGroupImplMultiple")),[uWe,dWe]=yxe(Mx),wxe=m.forwardRef(km(function(t,n){const{__scopeToggleGroup:i,disabled:r=!1,rovingFocus:s=!0,orientation:a,dir:l,loop:c=!0,...u}=t,d=vxe(i),f=Hk(l),h={dir:f,...u};return o.jsx(uWe,{scope:i,rovingFocus:s,disabled:r,children:s?o.jsx(E7,{asChild:!0,...d,orientation:a,dir:f,loop:c,children:o.jsx(Or.div,{...h,ref:n})}):o.jsx(Or.div,{...h,ref:n})})},"ToggleGroupImpl")),V4="ToggleGroupItem",fWe=m.forwardRef(km(function(t,n){const i=Oxe(V4,t.__scopeToggleGroup),r=dWe(V4,t.__scopeToggleGroup),s=vxe(t.__scopeToggleGroup),a=i.value.includes(t.value),l=r.disabled||t.disabled,c={...t,pressed:a,disabled:l},u=m.useRef(null);return r.rovingFocus?o.jsx(C7,{asChild:!0,...s,focusable:!l,active:a,ref:u,children:o.jsx(rK,{...c,ref:n})}):o.jsx(rK,{...c,ref:n})},"ToggleGroupItem")),rK=m.forwardRef(km(function(t,n){const{__scopeToggleGroup:i,value:r,...s}=t,a=Oxe(V4,i),l={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},c=a.type==="single"?l:void 0;return o.jsx(sWe,{...c,...s,ref:n,onPressedChange:u=>{u?a.onItemActivate(r):a.onItemDeactivate(r)}})},"ToggleGroupItemImpl")),hWe=Object.defineProperty,Na=(e,t)=>hWe(e,"name",{value:t,configurable:!0}),[B7,MVt]=Sl("Tooltip",[Ix]),U7=Ix(),pWe="TooltipProvider",mWe=700,H4="tooltip.open",[gWe,Q7]=B7(pWe),bWe=Na(e=>{const{__scopeTooltip:t,delayDuration:n=mWe,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:s}=e,a=m.useRef(!0),l=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),o.jsx(gWe,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:m.useCallback(()=>{i<=0||(window.clearTimeout(c.current),a.current=!1)},[i]),onClose:m.useCallback(()=>{i<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,i))},[i]),isPointerInTransitRef:l,onPointerInTransitChange:m.useCallback(u=>{l.current=u},[]),disableHoverableContent:r,children:s})},"TooltipProvider"),q4="Tooltip",[yWe,Kk]=B7(q4),vWe=Na(e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:l}=e,c=Q7(q4,e.__scopeTooltip),u=U7(t),[d,f]=m.useState(null),[h,p]=m.useState(void 0),g=xm(),b=m.useRef(0),v=a??c.disableHoverableContent,y=l??c.delayDuration,x=m.useRef(!1),[w,O]=su({prop:i,defaultProp:r??!1,onChange:Na(_=>{_?(c.onOpen(),document.dispatchEvent(new CustomEvent(H4))):c.onClose(),s==null||s(_)},"onChange"),caller:q4}),k=m.useMemo(()=>w?x.current?"delayed-open":"instant-open":"closed",[w]),S=m.useCallback(()=>{window.clearTimeout(b.current),b.current=0,x.current=!1,O(!0)},[O]),E=m.useCallback(()=>{window.clearTimeout(b.current),b.current=0,O(!1)},[O]),C=m.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{x.current=!0,O(!0),b.current=0},y)},[y,O]);m.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]);const N=h??g;return o.jsx(dR,{...u,children:o.jsx(yWe,{scope:t,contentId:N,setContentId:p,open:w,stateAttribute:k,trigger:d,onTriggerChange:f,onTriggerEnter:m.useCallback(()=>{c.isOpenDelayedRef.current?C():S()},[c.isOpenDelayedRef,C,S]),onTriggerLeave:m.useCallback(()=>{v?E():(window.clearTimeout(b.current),b.current=0)},[E,v]),onOpen:S,onClose:E,disableHoverableContent:v,children:n})})},"Tooltip"),sK="TooltipTrigger",xWe=m.forwardRef(Na(function(t,n){const{__scopeTooltip:i,...r}=t,s=Kk(sK,i),a=Q7(sK,i),l=U7(i),c=m.useRef(null),u=rr(n,c,s.onTriggerChange),d=m.useRef(!1),f=m.useRef(!1),h=m.useCallback(()=>d.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),o.jsx(O7,{asChild:!0,...l,children:o.jsx(Or.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:u,onPointerMove:yn(t.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:yn(t.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:yn(t.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:yn(t.onFocus,()=>{d.current||s.onOpen()}),onBlur:yn(t.onBlur,s.onClose),onClick:yn(t.onClick,s.onClose)})})},"TooltipTrigger")),Sxe="TooltipPortal",[OWe,wWe]=B7(Sxe,{forceMount:void 0}),SWe=Na(e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:r}=e,s=Kk(Sxe,t);return o.jsx(OWe,{scope:t,forceMount:n,children:o.jsx(Zd,{present:n||s.open,children:o.jsx(c7,{asChild:!0,container:r,children:i})})})},"TooltipPortal"),SS="TooltipContent",kWe=m.forwardRef(Na(function(t,n){const i=wWe(SS,t.__scopeTooltip),{forceMount:r=i.forceMount,side:s="top",...a}=t,l=Kk(SS,t.__scopeTooltip);return o.jsx(Zd,{present:r||l.open,children:l.disableHoverableContent?o.jsx(kxe,{side:s,...a,ref:n}):o.jsx(EWe,{side:s,...a,ref:n})})},"TooltipContent")),EWe=m.forwardRef(Na(function(t,n){const i=Kk(SS,t.__scopeTooltip),r=Q7(SS,t.__scopeTooltip),s=m.useRef(null),a=rr(n,s),[l,c]=m.useState(null),{trigger:u,onClose:d}=i,f=s.current,{onPointerInTransitChange:h}=r,p=m.useCallback(()=>{c(null),h(!1)},[h]),g=m.useCallback((b,v)=>{const y=b.currentTarget,x={x:b.clientX,y:b.clientY},w=Exe(x,y.getBoundingClientRect()),O=Cxe(x,w),k=Txe(v.getBoundingClientRect()),S=_xe([...O,...k]);c(S),h(!0)},[h]);return m.useEffect(()=>()=>p(),[p]),m.useEffect(()=>{if(u&&f){const b=Na(y=>g(y,f),"handleTriggerLeave"),v=Na(y=>g(y,u),"handleContentLeave");return u.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[u,f,g,p]),m.useEffect(()=>{if(l){const b=Na(v=>{const y=v.target,x={x:v.clientX,y:v.clientY},w=(u==null?void 0:u.contains(y))||(f==null?void 0:f.contains(y)),O=!Axe(x,l);w?p():O&&(p(),d())},"handleTrackPointerGrace");return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,f,l,d,p]),o.jsx(kxe,{...t,ref:a})},"TooltipContentHoverable")),CWe=Eye("TooltipContent"),kxe=m.forwardRef(Na(function(t,n){const{__scopeTooltip:i,children:r,"aria-label":s,id:a,onEscapeKeyDown:l,onPointerDownOutside:c,...u}=t,d=Kk(SS,i),f=U7(i),{onClose:h}=d;m.useEffect(()=>(document.addEventListener(H4,h),()=>document.removeEventListener(H4,h)),[h]),m.useEffect(()=>{if(d.trigger){const g=Na(b=>{b.target instanceof Node&&b.target.contains(d.trigger)&&h()},"handleScroll");return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[d.trigger,h]);const{setContentId:p}=d;return Jc(()=>(p(a),()=>{p(void 0)}),[a,p]),o.jsx(a7,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:g=>g.preventDefault(),onDismiss:h,children:o.jsxs(w7,{"data-state":d.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:d.contentId,...f,...u,ref:n,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(CWe,{children:r}),s?o.jsx(KUe,{id:d.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function Exe(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}Na(Exe,"getExitSideFromRect");function Cxe(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}Na(Cxe,"getPaddedExitPoints");function Txe(e){const{top:t,right:n,bottom:i,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:i},{x:r,y:i}]}Na(Txe,"getPointsFromRect");function Axe(e,t){const{x:n,y:i}=e;let r=!1;for(let s=0,a=t.length-1;si!=h>i&&n<(f-u)*(i-d)/(h-d)+u&&(r=!r)}return r}Na(Axe,"isPointInPolygon");function _xe(e){const t=e.slice();return t.sort((n,i)=>n.xi.x?1:n.yi.y?1:0),Nxe(t)}Na(_xe,"getHull");function Nxe(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Na(Nxe,"getHullPresorted");var TWe=bWe,AWe=vWe,jxe=xWe,_We=SWe,NWe=kWe;function Em(e){const t=m.useRef(e);return t.current=e,t}let Uv=[],oT=!1;const aK=e=>{var t,n;if(e.key==="Escape"){const[i]=Uv;i&&(e.preventDefault(),(n=(t=i.callback).current)==null||n.call(t))}},Rxe=()=>{Uv.length>0&&!oT?(document.body.addEventListener("keydown",aK),oT=!0):Uv.length===0&&oT&&(document.body.removeEventListener("keydown",aK),oT=!1)},jWe=e=>{Uv.unshift(e),Rxe()},RWe=({id:e})=>{Uv=Uv.filter(t=>t.id!==e),Rxe()},Gk=(e,t)=>{const n=m.useId(),i=Em(t);m.useEffect(()=>{if(!e)return;const r={id:n,callback:i};return jWe(r),()=>RWe(r)},[n,e,i])},IWe=m.createContext(null);function Ixe(){const e=m.useContext(IWe);return(e==null?void 0:e.linkComponent)??"a"}function Xk(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}const PWe=()=>vye,oK=(e,t=!1,n="TransitionGroup")=>{const i=[];return m.Children.forEach(e,r=>{if(r&&typeof r=="object"&&"key"in r&&r.key)i.push(r);else if(t)throw new Error(`Child elements of <${n} /> must include a \`key\``)}),i},I0=()=>{},P0=e=>{const t=m.useRef(e);return t.current=e,m.useCallback(n=>t.current(n),[])};function DWe(e,t,n,i){const r=e.reduce((c,u)=>({...c,[u.key]:1}),{}),s=t.reduce((c,u)=>({...c,[u.component.key]:1}),{}),a=e.filter(c=>!s[c.key]).map(n),l=t.map(c=>({...c,component:e.find(({key:u})=>u===c.component.key)||c.component,shouldRender:!!r[c.component.key]}));return i==="append"?l.concat(a):a.concat(l)}function MWe(e,t,n){if((vye||_Ue)&&t&&n>1)throw new Error(`Cannot use forwardRef with multiple children in <${e} />`)}const LWe="_TransitionGroupChild_1hv1z_1",$We={TransitionGroupChild:LWe},Pxe={enter:!1,enterActive:!1,exit:!1,exitActive:!1,interrupted:!1},FWe=e=>({...Pxe,enter:!e}),BWe=(e,t)=>{switch(t.type){case"enter-before":return{enter:!0,enterActive:!1,exit:!1,exitActive:!1,interrupted:e.interrupted||e.exit};case"enter-active":return{enter:!0,enterActive:!0,exit:!1,exitActive:!1,interrupted:!1};case"exit-before":return{enter:!1,enterActive:!1,exit:!0,exitActive:!1,interrupted:e.interrupted||e.enter};case"exit-active":return{enter:!1,enterActive:!1,exit:!0,exitActive:!0,interrupted:!1};case"done":default:return Pxe}},UWe=({ref:e,as:t,children:n,className:i,transitionId:r,style:s,preventMountTransition:a,shouldRender:l,enterDuration:c,exitDuration:u,removeChild:d,onEnter:f,onEnterActive:h,onEnterComplete:p,onExit:g,onExitActive:b,onExitComplete:v})=>{const[y,x]=m.useReducer(BWe,FWe(a||!1)),w=m.useRef(!1),O=m.useRef(null),k=m.useRef(c);k.current=c;const S=m.useRef(u);S.current=u;const E=m.useRef(null),C=m.useCallback(N=>{const _=O.current;if(!(!_||N===E.current))switch(E.current=N,N){case"enter":f(_);break;case"enter-active":h(_);break;case"enter-complete":p(_);break;case"exit":g(_);break;case"exit-active":b(_);break;case"exit-complete":v(_);break}},[f,h,p,g,b,v]);return si.useLayoutEffect(()=>{if(!l){let j;x({type:"exit-before"}),C("exit");const T=I_(()=>{x({type:"exit-active"}),C("exit-active"),j=window.setTimeout(()=>{C("exit-complete"),d()},S.current)});return()=>{T(),j!==void 0&&clearTimeout(j)}}if(a&&!w.current){w.current=!0;return}let N;x({type:"enter-before"}),C("enter");const _=I_(()=>{x({type:"enter-active"}),C("enter-active"),N=window.setTimeout(()=>{x({type:"done"}),C("enter-complete")},k.current)});return()=>{_(),N!==void 0&&clearTimeout(N)}},[l,a,d,C]),m.useEffect(()=>()=>{w.current=!1},[]),o.jsx(t,{ref:Xk([O,e]),className:bi(i,$We.TransitionGroupChild),"data-transition-id":r,style:s,"data-entering":y.enter?"":void 0,"data-entering-active":y.enterActive?"":void 0,"data-exiting":y.exit?"":void 0,"data-exiting-active":y.exitActive?"":void 0,"data-interrupted":y.interrupted?"":void 0,children:n})},QWe=e=>{const{enterMountDelay:t,preventMountTransition:n}=e,i=!n&&t!=null?t:null,[r,s]=m.useState(i==null);return e7(()=>s(!0),r?null:i),r?o.jsx(UWe,{...e}):null},Lx=e=>{const{ref:t,as:n="span",children:i,className:r,transitionId:s,style:a,enterDuration:l=0,exitDuration:c=0,preventInitialTransition:u=!0,enterMountDelay:d,insertMethod:f="append",disableAnimations:h=PWe()}=e,p=P0(e.onEnter??I0),g=P0(e.onEnterActive??I0),b=P0(e.onEnterComplete??I0),v=P0(e.onExit??I0),y=P0(e.onExitActive??I0),x=P0(e.onExitComplete??I0);m.Children.forEach(i,S=>{if(S&&!S.key)throw new Error("Child elements of must include a `key`")});const w=m.useCallback(S=>({component:S,shouldRender:!0,removeChild:()=>{k(E=>E.filter(C=>S.key!==C.component.key))},onEnter:p,onEnterActive:g,onEnterComplete:b,onExit:v,onExitActive:y,onExitComplete:x}),[p,g,b,v,y,x]),[O,k]=m.useState(()=>oK(i).map(S=>({...w(S),preventMountTransition:u})));return m.useLayoutEffect(()=>{k(S=>{const E=oK(i);return DWe(E,S,w,f)})},[i,f,w]),MWe("TransitionGroup",t,m.Children.count(i)),h?o.jsx(o.Fragment,{children:m.Children.map(i,S=>o.jsx(n,{ref:t,className:r,style:a,"data-transition-id":s,children:S}))}):o.jsx(o.Fragment,{children:O.map(({component:S,...E})=>o.jsx(QWe,{...E,as:n,className:r,transitionId:s,enterDuration:l,exitDuration:c,enterMountDelay:d,style:a,ref:t,children:S},S.key))})},zWe="_Button_1864l_1",VWe="_ButtonInner_1864l_4",HWe="_ButtonLoader_1864l_749",qD={Button:zWe,ButtonInner:VWe,ButtonLoader:HWe},Ft=e=>{const{type:t="button",color:n="primary",variant:i="solid",pill:r=!0,uniform:s=!1,size:a="md",iconSize:l,gutterSize:c,loading:u,selected:d,block:f,opticallyAlign:h,children:p,className:g,onClick:b,disabled:v,disabledTone:y,inert:x=u,...w}=e,O=v||x,k=m.useCallback(S=>{v||b==null||b(S)},[b,v]);return o.jsxs("button",{type:t,className:bi(qD.Button,g),"data-color":n,"data-variant":i,"data-pill":r?"":void 0,"data-uniform":s?"":void 0,"data-size":a,"data-gutter-size":c,"data-icon-size":l,"data-loading":u?"":void 0,"data-selected":d?"":void 0,"data-block":f?"":void 0,"data-optically-align":h,onPointerEnter:t7,disabled:O,"aria-disabled":O,tabIndex:O?-1:void 0,"data-disabled":v?"":void 0,"data-disabled-tone":v?y:void 0,onClick:k,...w,children:[o.jsx(Lx,{className:qD.ButtonLoader,enterDuration:250,exitDuration:150,children:u&&o.jsx(zk,{},"loader")}),o.jsx("span",{className:qD.ButtonInner,children:JF(p)})]})},qWe=()=>{var e;return typeof ClipboardItem<"u"&&!!((e=navigator.clipboard)!=null&&e.write)};function WWe(e){const{"text/plain":t,...n}=e;return new ClipboardItem({...n,...t?{"text/plain":new Blob([t],{type:"text/plain"})}:null})}async function KWe(e,t=document.body){if(typeof e=="string")return lK(e,t);try{return qWe()?(await navigator.clipboard.write([WWe(e)]),!0):e["text/plain"]?lK(e["text/plain"],t):!1}catch{return!1}}async function lK(e,t=document.body){if(navigator.clipboard)try{return await navigator.clipboard.writeText(e),!0}catch{}const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.opacity="0",t.appendChild(n),n.focus(),n.select();let i=!1;try{i=document.execCommand("copy")}catch{}return t.removeChild(n),i}const GWe="_TransitionItem_1o7b1_1",XWe={TransitionItem:GWe},YWe=e=>{const{as:t="span",className:n,children:i,preventInitialTransition:r,insertMethod:s,transitionClassName:a,transitionPosition:l="absolute"}=e,{enterTotalDuration:c,exitTotalDuration:u,variables:d}=nKe(e);return o.jsx(t,{className:bi("block",l==="absolute"&&"relative",n),"data-transition-position":l,style:d,children:o.jsx(Lx,{as:t,className:bi(XWe.TransitionItem,a),enterDuration:c,exitDuration:u,insertMethod:s,preventInitialTransition:r,children:i})})},ZWe=400,JWe=500,eKe=200,tKe=300;function nKe({initial:e,enter:t,exit:n,forceCompositeLayer:i}){const r=RD(e),s=RD(t),a=RD(n),l=[r,a,s].some(b=>b!=="none"),c=(t==null?void 0:t.duration)??(l?JWe:ZWe),u=(t==null?void 0:t.timingFunction)??(l?"var(--cubic-enter)":"ease"),d=(n==null?void 0:n.duration)??(l?tKe:eKe),f=(n==null?void 0:n.timingFunction)??(l?"var(--cubic-exit)":"ease"),h=qb({"tg-will-change":i?"transform, opacity":"auto","tg-enter-opacity":jD((t==null?void 0:t.opacity)??1),"tg-enter-transform":s,"tg-enter-filter":ID(t),"tg-enter-duration":ZC(c),"tg-enter-delay":ZC((t==null?void 0:t.delay)??0),"tg-enter-timing-function":u,"tg-exit-opacity":jD((n==null?void 0:n.opacity)??0),"tg-exit-transform":a,"tg-exit-filter":ID(n),"tg-exit-duration":ZC(d),"tg-exit-delay":ZC((n==null?void 0:n.delay)??0),"tg-exit-timing-function":f,"tg-initial-opacity":jD((e==null?void 0:e.opacity)??(n==null?void 0:n.opacity)??0),"tg-initial-transform":r==="none"?a:r,"tg-initial-filter":ID(e??n??{})}),p=((t==null?void 0:t.delay)??0)+c,g=((n==null?void 0:n.delay)??0)+d;return{enterTotalDuration:p,exitTotalDuration:g,variables:h}}const z7=({children:e,copyValue:t,onClick:n,...i})=>{const[r,s]=m.useState(!1),a=m.useRef(null),l=c=>{r||(s(!0),n==null||n(c),KWe(typeof t=="function"?t():t),a.current=window.setTimeout(()=>{s(!1)},1300))};return m.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]),o.jsxs(Ft,{...i,onClick:l,children:[o.jsx(YWe,{className:"w-[var(--button-icon-size)] h-[var(--button-icon-size)]",initial:{scale:.6},enter:{scale:1,delay:150,duration:300},exit:{scale:.6,duration:150},forceCompositeLayer:!0,children:r?o.jsx(Lv,{},"copied-icon"):o.jsx(TF,{},"copy-icon")}),typeof e=="function"?e({copied:r}):e]})},iKe="_Menu_1t4b0_1",rKe="_MenuList_1t4b0_3",sKe="_MenuItemContent_1t4b0_53",aKe="_MenuItem_1t4b0_53",oKe="_ItemActions_1t4b0_98",lKe="_PressableInner_1t4b0_117",cKe="_Separator_1t4b0_135",uKe="_SubMenuItem_1t4b0_139",dKe="_SubTriggerIcon_1t4b0_141",fKe="_RadioItem_1t4b0_151",hKe="_RadioIndicatorActive_1t4b0_158",pKe="_RadioIndicator_1t4b0_158",mKe="_CheckboxItem_1t4b0_249",gKe="_CheckboxIndicator_1t4b0_256",bKe="_CheckboxCircle_1t4b0_269",Xr={Menu:iKe,MenuList:rKe,MenuItemContent:sKe,MenuItem:aKe,ItemActions:oKe,PressableInner:lKe,Separator:cKe,SubMenuItem:uKe,SubTriggerIcon:dKe,RadioItem:fKe,RadioIndicatorActive:hKe,RadioIndicator:pKe,CheckboxItem:mKe,CheckboxIndicator:gKe,CheckboxCircle:bKe},Dxe=m.createContext(null),Yk=()=>{const e=m.useContext(Dxe);if(!e)throw new Error("Menu components must be wrapped in ");return e},vr=({children:e,forceOpen:t,onOpen:n,onClose:i,modal:r=!1})=>{const[s,a]=m.useState(!1),l=t??s,c=Em(n),u=Em(i),d=m.useCallback(h=>{var p,g;a(h),h?(p=c.current)==null||p.call(c):(g=u.current)==null||g.call(u)},[c,u]);Gk(s,()=>{d(!1)});const f=m.useMemo(()=>({open:l,setOpen:d}),[l,d]);return o.jsx(Dxe.Provider,{value:f,children:o.jsx(rqe,{open:l,onOpenChange:d,modal:r,children:e})})},yKe=({className:e,children:t,disabled:n,onSelect:i,onClick:r})=>{const{open:s}=Yk(),a=l=>{s||l.preventDefault()};return i?o.jsx(txe,{className:bi(Xr.MenuItem,e),onSelect:i,onClick:r,disabled:n,onPointerMove:a,onPointerLeave:a,children:o.jsx("div",{className:Xr.PressableInner,children:t})}):o.jsx("div",{className:bi(Xr.MenuItemContent,e),children:t})},vKe=({className:e,children:t})=>o.jsx("div",{className:bi(Xr.ItemActions,e),children:t}),xKe=({children:e,onClick:t})=>{const{setOpen:n}=Yk();return o.jsx(Ft,{className:"rounded-sm",color:"secondary",size:"xs",uniform:!0,iconSize:"sm",variant:"ghost",onClick:i=>{i.stopPropagation(),n(!1),t(i)},children:e})},OKe=e=>{const{className:t,children:n,href:i,to:r,disabled:s,as:a,...l}=e,{open:c}=Yk(),u=i||r,d=u?/^https?:\/\//.test(u):!0,f=Ixe(),h=a||(d?"a":f),p=b=>{c||b.preventDefault()},g=d?{target:"_blank",rel:"noopener noreferrer",href:i??r}:{href:i,to:r};return o.jsx(txe,{asChild:!0,className:bi(Xr.MenuItem,t),disabled:s,onPointerMove:d?void 0:p,onPointerLeave:d?void 0:p,children:o.jsx(h,{...g,...l,children:o.jsx("span",{className:Xr.PressableInner,children:n})})})},wKe=({className:e})=>o.jsx(uqe,{className:bi(Xr.Separator,e),role:"separator"}),SKe=({children:e,side:t,sideOffset:n=5,align:i,alignOffset:r,width:s,minWidth:a,maxHeight:l})=>{const{open:c}=Yk();return o.jsx(exe,{forceMount:!0,children:o.jsx(Lx,{className:Xr.Menu,enterDuration:350,exitDuration:200,disableAnimations:!0,children:c&&o.jsx(aqe,{forceMount:!0,className:Xr.MenuList,side:t,sideOffset:n,align:i,alignOffset:r??(i==="center"?0:-5),avoidCollisions:!0,collisionPadding:{bottom:30,top:30,left:12,right:12},onEscapeKeyDown:uh,style:qb({"menu-width":s,"menu-min-width":a,"menu-max-height":l}),children:e},"dropdown")})})},kKe=({children:e,disabled:t})=>o.jsx(sqe,{asChild:!0,disabled:t,children:e}),Mxe=m.createContext(null),Lxe=()=>{const e=m.useContext(Mxe);if(!e)throw new Error("Submenu components must be wrapped in ");return e},EKe=({children:e,forceOpen:t,onOpen:n,onClose:i})=>{const[r,s]=m.useState(!1),a=m.useRef(null),l=t??r,c=Em(n),u=Em(i),d=m.useCallback(h=>{var p,g;s(h),h?(p=c.current)==null||p.call(c):(g=u.current)==null||g.call(u)},[c,u]);Gk(r,()=>{var h;d(!1),(h=a.current)==null||h.focus()});const f=m.useMemo(()=>({open:l,setOpen:d,triggerRef:a}),[l,d]);return o.jsx(Mxe.Provider,{value:f,children:o.jsx(dqe,{open:l,onOpenChange:d,children:e})})},CKe=({className:e,children:t,disabled:n})=>{const{open:i}=Yk(),{triggerRef:r}=Lxe(),s=a=>{i||a.preventDefault()};return o.jsx(fqe,{ref:r,className:bi(Xr.MenuItem,Xr.SubMenuItem,e),disabled:n,onPointerMove:s,onPointerLeave:s,children:o.jsxs("div",{className:Xr.PressableInner,children:[t,o.jsx(OFe,{width:"16",height:"16",className:Xr.SubTriggerIcon})]})})},TKe=({children:e,sideOffset:t=4,alignOffset:n=-6,width:i="auto",minWidth:r="auto",maxHeight:s})=>{const{open:a}=Lxe();return o.jsx(exe,{forceMount:!0,children:o.jsx(Lx,{className:Xr.Menu,enterDuration:350,exitDuration:200,disableAnimations:!0,children:a&&o.jsx(hqe,{className:Xr.MenuList,sideOffset:t,alignOffset:n,avoidCollisions:!0,collisionPadding:{bottom:30,top:30,left:12,right:12},onEscapeKeyDown:uh,style:qb({"menu-width":i,"menu-min-width":r,"menu-max-height":s}),children:e},"submenu")})})},AKe=({children:e,value:t,onChange:n,indicatorPosition:i="end",...r})=>o.jsx(lqe,{...r,value:t,onValueChange:s=>n(s),"data-indicator-position":i,children:e}),_Ke=({className:e,children:t,...n})=>o.jsx(cqe,{className:bi(Xr.MenuItem,Xr.RadioItem,e),...n,children:o.jsxs("div",{className:Xr.PressableInner,children:[o.jsx("div",{className:Xr.RadioIndicator,children:o.jsx(nxe,{className:Xr.RadioIndicatorActive})}),t]})}),NKe=({className:e,children:t,indicatorPosition:n="end",indicatorVariant:i="solid",...r})=>o.jsx(oqe,{className:bi(Xr.MenuItem,Xr.CheckboxItem,e),...r,"data-indicator-position":n,"data-indicator-variant":i,children:o.jsxs("div",{className:Xr.PressableInner,children:[o.jsx("div",{className:Xr.CheckboxIndicator,children:o.jsx(nxe,{children:i==="ghost"?o.jsx(Lv,{className:"size-4"}):o.jsx("div",{className:Xr.CheckboxCircle,children:o.jsx(Lv,{className:"size-4"})})})}),t]})});vr.Content=SKe;vr.Item=yKe;vr.ItemActions=vKe;vr.ItemAction=xKe;vr.Link=OKe;vr.Separator=wKe;vr.Trigger=kKe;vr.Sub=EKe;vr.SubTrigger=CKe;vr.SubContent=TKe;vr.CheckboxItem=NKe;vr.RadioGroup=AKe;vr.RadioItem=_Ke;const jKe="_Tooltip_16g2y_1",RKe="_TriggerDecorator_16g2y_73",$xe={Tooltip:jKe,TriggerDecorator:RKe},Fo=e=>{const{ref:t,children:n,content:i,forceOpen:r=i===null?!1:void 0,maxWidth:s=300,openDelay:a=150,interactive:l=!1,compact:c=!1,preventUnintentionalClickToClose:u,align:d,alignOffset:f=0,side:h,sideOffset:p=5,gutterSize:g="md",contentClassName:b,onPointerDown:v,onClick:y,...x}=e,[w,O]=m.useState(!1),[k,S]=m.useState(!1);e7(()=>S(!1),k?400:null);const E=r??w,C=_=>{typeof r!="boolean"&&(O(_),u&&S(_))},N=_=>{u&&k&&(_.preventDefault(),_.stopPropagation())};return o.jsxs(Fxe,{open:E,delayDuration:a,onOpenChange:C,disableHoverableContent:!l,children:[o.jsx(jxe,{asChild:!0,children:o.jsx(Sye,{...x,ref:t,onPointerDown:_=>{N(_),v==null||v(_)},onClick:_=>{N(_),y==null||y(_)},children:n})}),o.jsx(Bxe,{maxWidth:s,compact:c,align:d,alignOffset:f,side:h,sideOffset:p,gutterSize:g,className:b,children:i})]})},Fxe=({children:e,open:t,onOpenChange:n,...i})=>(Gk(t,()=>{n(!1)}),o.jsx(TWe,{children:o.jsx(AWe,{open:t,onOpenChange:n,...i,children:e})})),Bxe=({children:e,maxWidth:t=300,compact:n=!1,clickable:i=void 0,alignOffset:r=0,sideOffset:s=5,gutterSize:a="md",className:l,style:c,...u})=>o.jsx(_We,{children:o.jsx(NWe,{...u,className:bi($xe.Tooltip,l),"data-compact":n,"data-clickable":i,"data-gutter-size":a,alignOffset:r,sideOffset:s,collisionPadding:15,hideWhenDetached:!0,style:{...c,maxWidth:t},onEscapeKeyDown:uh,children:e})}),IKe=({children:e,asChild:t=!0,...n})=>o.jsx(jxe,{asChild:t,...n,children:e}),PKe=e=>{const{children:t,className:n,focusable:i=!0,ref:r,...s}=e,a=typeof t=="string";return o.jsx(Sye,{ref:r,...s,className:bi($xe.TriggerDecorator,n),tabIndex:i?0:void 0,children:a?o.jsx("span",{children:t}):t})};Fo.Root=Fxe;Fo.Content=Bxe;Fo.Trigger=IKe;Fo.TriggerDecorator=PKe;const DKe=50,cK=48;function MKe(e){return(e.events??[]).flatMap(t=>{var r,s;const i=(((r=t.content)==null?void 0:r.parts)??[]).map(a=>typeof a.text=="string"?a.text:"").filter(Boolean).join("");return i?[{text:i,role:t.author??((s=t.content)==null?void 0:s.role)??"",ts:t.timestamp}]:[]})}function LKe(e){var t,n;for(const i of e.events??[])if(i.author==="user"||((t=i.content)==null?void 0:t.role)==="user"){const r=(((n=i.content)==null?void 0:n.parts)??[]).map(s=>s.text).find(Boolean);if(r)return r}return V("search.untitledSession")}function $Ke(e,t,n){const i=Math.max(0,t-cK),r=Math.min(e.length,t+n+cK);return(i>0?"…":"")+e.slice(i,r).trim()+(r{var c;if((c=l.events)!=null&&c.length)return l;try{return await Yj(t,e,l.id)}catch{return l}})),a=[];for(const l of s)for(const{text:c,role:u,ts:d}of MKe(l)){const f=c.toLowerCase().indexOf(i);if(f!==-1){a.push({type:"session",appId:t,sessionId:l.id,title:LKe(l),snippet:$Ke(c,f,i.length),role:u,ts:d??l.lastUpdateTime});break}}return a.sort((l,c)=>(c.ts??0)-(l.ts??0)),a.slice(0,DKe)}async function BKe(e,t){if(!e||!t.trim())return{results:[]};let n;try{n=await e0e(e,t.trim())}catch(a){const l=String(a);return{results:[],note:l.includes("404")?V("search.webUnavailable"):V("search.webFailed",{message:l})}}const{mounted:i,results:r,error:s}=n;return i?s?{results:[],note:s}:{results:r.map((a,l)=>({type:"web",index:l,title:a.title,url:a.url,siteName:a.siteName,summary:a.summary}))}:{results:[],note:V("search.webNotMounted")}}async function UKe(e,t,n,i){if(!t||!i.trim())return{results:[]};const r=await Jbe(t,e,i.trim(),n);if(!r.mounted)return{results:[],note:V(e==="knowledge"?"search.knowledgeNotMounted":"search.memoryNotMounted")};if(r.error)return{results:[],note:r.error};const s=r.sourceName??V(e==="knowledge"?"search.knowledge":"search.longTermMemory");return{results:r.results.map((a,l)=>e==="knowledge"?{type:"knowledge",index:l,content:a.content,sourceName:s,sourceType:r.sourceType}:{type:"memory",index:l,content:a.content,sourceName:s,sourceType:r.sourceType,author:a.author,ts:a.timestamp})}}async function QKe(e,t,n){return e==="session"?{results:await FKe(n.userId,n.appId,t)}:e==="web"?BKe(n.appId,t):UKe(e,n.appId,n.userId,t)}function Uxe({mirrored:e=!1}){return o.jsxs("g",{opacity:"0.5",transform:e?"translate(20 0) scale(-1 1)":void 0,children:[o.jsx("path",{className:"sidebar-panel-glyph__divider",d:"M5.938 6.833c.11 0 .249.102.249.292v6.042c0 .19-.14.291-.249.291s-.248-.101-.248-.291V7.125c0-.19.139-.292.248-.292Z",strokeWidth:"1.167"}),o.jsx("path",{className:"sidebar-panel-glyph__frame",d:"M14.5 3.75h-9a3 3 0 0 0-3 3v6.857a3 3 0 0 0 3 3h9a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3Z",strokeWidth:"1.667",strokeLinecap:"round",strokeLinejoin:"round"})]})}function zKe(e){return o.jsx("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",...e,children:o.jsx(Uxe,{})})}function VKe(e){return o.jsx("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",...e,children:o.jsx(Uxe,{mirrored:!0})})}function HKe(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M12 8.333c.368 0 .667.299.667.667v2h2a.667.667 0 0 1 0 1.333h-2v2a.667.667 0 0 1-1.334 0v-2h-2a.667.667 0 0 1 0-1.333h2V9c0-.368.299-.667.667-.667ZM7.667 1c3.49 0 6.383 2.554 6.913 5.896a.667.667 0 0 1-1.317.208 5.667 5.667 0 1 0-9.708 4.424.67.67 0 0 1 .07.12.667.667 0 0 1-.13.834l-.95.853 4.788-.002a.667.667 0 0 1 0 1.334l-5.657.002c-.917 0-1.35-1.131-.67-1.744l1.163-1.045A6.97 6.97 0 0 1 .667 8c0-3.866 3.134-7 7-7Z",fill:"currentColor"})})}function qKe(e){return o.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.333",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"7.333",cy:"7.333",r:"5.333"}),o.jsx("path",{d:"m11.133 11.133 2.867 2.867"})]})}function WKe(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M8 0.667c4.05 0 7.334 3.283 7.334 7.333 0 4.05-3.284 7.334-7.334 7.334S0.667 12.05 0.667 8 3.95 0.667 8 0.667Zm0 1.333a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM6.167 6c.368 0 .667.299.667.667v2a.667.667 0 0 1-1.334 0v-2c0-.368.299-.667.667-.667Zm3.666 0c.368 0 .667.299.667.667v2a.667.667 0 0 1-1.333 0v-2c0-.368.298-.667.666-.667Z",fill:"currentColor"})})}function Qxe(e){return o.jsxs("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M7.58 2.6a.667.667 0 0 0-.667-.667h-.666a.667.667 0 0 0-.667.667v10.667c0 .368.299.666.667.666h.666a.667.667 0 0 0 .667-.666V2.6Zm1.333 10.667A2 2 0 0 1 6.913 15.267h-.666a2 2 0 0 1-2-2V2.6a2 2 0 0 1 2-2h.666a2 2 0 0 1 2 2v10.667Z",fill:"currentColor"}),o.jsx("path",{d:"M11.88 5.045a.667.667 0 0 0-.801-.514l-.653.136a.667.667 0 0 0-.504.786l1.85 8.092c.081.358.44.589.8.514l.653-.137a.667.667 0 0 0 .504-.786L11.88 5.045Zm3.155 7.82a2 2 0 0 1-1.512 2.358l-.653.136a2 2 0 0 1-2.403-1.541L8.617 5.726a2 2 0 0 1 1.513-2.358l.652-.136a2 2 0 0 1 2.404 1.541l1.849 8.092Z",fill:"currentColor"}),o.jsx("path",{d:"M4.247 2.6a.667.667 0 0 0-.667-.667h-.667a.667.667 0 0 0-.666.667v10.667c0 .368.298.666.666.666h.667a.667.667 0 0 0 .667-.666V2.6ZM5.58 13.267a2 2 0 0 1-2 2h-.667a2 2 0 0 1-2-2V2.6a2 2 0 0 1 2-2h.667a2 2 0 0 1 2 2v10.667Z",fill:"currentColor"})]})}function KKe({className:e="icon"}){return o.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[o.jsx("path",{d:"M16.4 10.7a5.7 5.7 0 1 1-1.67-4.03"}),o.jsx("path",{d:"M15.25 15.25 19.6 19.6"})]})}function GKe({open:e}){return o.jsx("svg",{className:`search-source-chevron ${e?"open":""}`,viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:o.jsx("path",{d:"m3.25 4.75 2.75 2.5 2.75-2.5"})})}function XKe({active:e=!1,onClick:t}){const{t:n}=Oe("workspaceTools");return o.jsxs("button",{className:`new-chat${e?" is-active":""}`,onClick:t,"aria-label":n("search.nav"),"aria-current":e?"page":void 0,title:n("search.nav"),children:[o.jsx(qKe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:n("search.nav")})]})}function YKe(e,t,n,i){const r=!!e,s=new Set((t==null?void 0:t.searchSources)??[]),a=l=>r?n?i("search.checkingCapabilities"):i("search.notMounted",{label:l}):i("search.selectAgent");return[{id:"session",label:i("search.sources.session"),ready:r,unavailableLabel:i("search.selectAgent")},{id:"web",label:i("search.sources.web"),ready:r&&s.has("web"),description:i("search.webDescription"),unavailableLabel:a(" web_search")},{id:"knowledge",label:i("search.sources.knowledge"),ready:r&&s.has("knowledge"),unavailableLabel:a(i("search.sources.knowledge"))},{id:"memory",label:i("search.sources.memory"),ready:r&&s.has("memory"),unavailableLabel:a(i("search.sources.memory"))}]}function $_(e,t){return{context_search:"Context Search",local:t("search.backendLocal"),mem0:"Mem0",milvus:"Milvus",opensearch:"OpenSearch",openviking:"OpenViking",redis:"Redis",tos_vector:"TOS Vector",viking:"VikingDB"}[e.toLowerCase()]??e}function uK(e,t){return e?new Date(e*1e3).toLocaleString(t,{timeZone:"Asia/Shanghai",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):""}function ZKe({userId:e,appId:t,agentInfo:n,capabilitiesLoading:i,agentLabel:r,onOpenSession:s}){var M,B;const{t:a,i18n:l}=Oe("workspaceTools"),c=l.resolvedLanguage||l.language,[u,d]=m.useState("session"),[f,h]=m.useState(""),[p,g]=m.useState([]),[b,v]=m.useState(),[y,x]=m.useState(!1),[w,O]=m.useState(!1),[k,S]=m.useState(!1),E=m.useRef(0),C=m.useRef(null),N=YKe(t,n,i,a),_=N.find(I=>I.id===u),j=u==="knowledge"?(M=n==null?void 0:n.components)==null?void 0:M.find(I=>I.source==="knowledgebase"||I.kind==="knowledgebase"):u==="memory"?(B=n==null?void 0:n.components)==null?void 0:B.find(I=>I.source==="long_term_memory"||I.kind==="memory"):void 0;m.useEffect(()=>{E.current+=1,d("session"),g([]),v(void 0),O(!1),x(!1),S(!1)},[t]),m.useEffect(()=>{if(!k)return;function I(H){var X;(X=C.current)!=null&&X.contains(H.target)||S(!1)}return document.addEventListener("pointerdown",I),()=>document.removeEventListener("pointerdown",I)},[k]);async function T(I,H){var U;const X=I.trim();if(!X||!((U=N.find(te=>te.id===H))!=null&&U.ready))return;const Q=++E.current;x(!0),O(!0);let q;try{q=await QKe(H,X,{userId:e,appId:t})}catch(te){const le=te instanceof Error?te.message:String(te);q={results:[],note:a("search.failed",{message:le})}}Q===E.current&&(g(q.results),v(q.note),x(!1))}function L(I){E.current+=1,h(I),g([]),v(void 0),O(!1),x(!1)}function A(I){E.current+=1,d(I),S(!1),g([]),v(void 0),O(!1),x(!1)}const R=!!(_!=null&&_.ready),P=t?u==="web"?a("search.placeholder.web"):u==="knowledge"?a("search.placeholder.knowledge",{name:(j==null?void 0:j.name)??a("search.placeholder.knowledgeFallback")}):u==="memory"?a("search.placeholder.memory",{name:(j==null?void 0:j.name)??a("search.placeholder.memoryFallback")}):a("search.placeholder.session"):a("search.placeholder.selectAgent"),$=j!=null&&j.backend?$_(j.backend,a):"";return o.jsxs("div",{className:"search",children:[o.jsxs("div",{className:"search-box",children:[o.jsxs("div",{className:"search-source-picker-wrap",ref:C,children:[o.jsxs("button",{className:"search-source-picker",type:"button","aria-label":a("search.sourceTypeAria",{label:(_==null?void 0:_.label)??a("search.notSelected")}),"aria-haspopup":"listbox","aria-expanded":k,onClick:()=>S(I=>!I),children:[o.jsx("span",{children:(_==null?void 0:_.label)??a("search.sourceType")}),$&&o.jsx("small",{children:$}),o.jsx(GKe,{open:k})]}),k&&o.jsx("div",{className:"search-source-menu",role:"listbox","aria-label":a("search.selectSource"),children:N.map(I=>{var Q,q;const H=I.id==="knowledge"?(Q=n==null?void 0:n.components)==null?void 0:Q.find(U=>U.source==="knowledgebase"||U.kind==="knowledgebase"):I.id==="memory"?(q=n==null?void 0:n.components)==null?void 0:q.find(U=>U.source==="long_term_memory"||U.kind==="memory"):void 0,X=H?[H.name,H.backend?$_(H.backend,a):""].filter(Boolean).join(" · "):I.ready?I.description:I.unavailableLabel;return o.jsxs("button",{type:"button",role:"option","aria-selected":u===I.id,disabled:!I.ready,onClick:()=>A(I.id),children:[o.jsx("span",{children:I.label}),X&&o.jsx("small",{children:X})]},I.id)})})]}),o.jsx("span",{className:"search-box-divider","aria-hidden":!0}),o.jsx("input",{className:"search-input",value:f,onChange:I=>L(I.target.value),onKeyDown:I=>{I.key==="Enter"&&(I.preventDefault(),T(f,u))},placeholder:P,disabled:!R,autoFocus:!0}),o.jsx("button",{className:"search-go",onClick:()=>void T(f,u),disabled:!f.trim()||y,"aria-label":a("search.nav"),children:y?o.jsx(mi,{className:"icon spin"}):o.jsx(KKe,{className:"icon"})})]}),o.jsx("div",{className:"search-results",children:R?w?y?null:b?o.jsx("div",{className:"search-empty",children:b}):p.length===0&&w?o.jsx("div",{className:"search-empty",children:a("search.noResults",{query:f.trim()})}):p.map((I,H)=>o.jsx(JKe,{result:I,agentLabel:r,onOpen:s,locale:c},H)):o.jsx("div",{className:"search-empty",children:a(u==="web"?"search.instructions.web":u==="knowledge"?"search.instructions.knowledge":u==="memory"?"search.instructions.memory":"search.instructions.session")}):o.jsx("div",{className:"search-empty",children:t?i?a("search.loadingCapabilities"):(_==null?void 0:_.unavailableLabel)??a("search.sourceUnavailable"):a("search.noAgentHint")})})]})}function JKe({result:e,agentLabel:t,onOpen:n,locale:i}){const{t:r}=Oe("workspaceTools");switch(e.type){case"session":return o.jsxs("button",{className:"search-result",onClick:()=>n(e.appId,e.sessionId),children:[o.jsx(kbe,{className:"search-result-icon"}),o.jsxs("div",{className:"search-result-body",children:[o.jsxs("div",{className:"search-result-head",children:[o.jsx("span",{className:"search-result-title",children:e.title}),o.jsxs("span",{className:"search-result-meta",children:[t(e.appId),e.ts?` · ${uK(e.ts,i)}`:""]})]}),o.jsx("div",{className:"search-result-snippet",children:e.snippet})]})]});case"web":return o.jsxs("a",{className:"search-result",href:e.url||void 0,target:"_blank",rel:"noreferrer noopener",children:[o.jsx(qj,{className:"search-result-icon"}),o.jsxs("div",{className:"search-result-body",children:[o.jsxs("div",{className:"search-result-head",children:[o.jsx("span",{className:"search-result-title",children:e.title||e.url}),o.jsxs("span",{className:"search-result-meta",children:[e.siteName,e.url&&o.jsx(mb,{className:"search-result-ext"})]})]}),e.summary&&o.jsx("div",{className:"search-result-snippet",children:e.summary})]})]});case"knowledge":return o.jsxs("div",{className:"search-result search-result-static",children:[o.jsx(dK,{source:"knowledge"}),o.jsxs("div",{className:"search-result-body",children:[o.jsxs("div",{className:"search-result-head",children:[o.jsx("span",{className:"search-result-title",children:r("search.knowledgeFragment",{index:e.index+1})}),o.jsxs("span",{className:"search-result-meta",children:[e.sourceName,e.sourceType?` · ${$_(e.sourceType,r)}`:""]})]}),o.jsx("div",{className:"search-result-snippet search-result-snippet-expanded",children:e.content})]})]});case"memory":return o.jsxs("div",{className:"search-result search-result-static",children:[o.jsx(dK,{source:"memory"}),o.jsxs("div",{className:"search-result-body",children:[o.jsxs("div",{className:"search-result-head",children:[o.jsx("span",{className:"search-result-title",children:r("search.memoryFragment",{index:e.index+1})}),o.jsxs("span",{className:"search-result-meta",children:[e.sourceName,e.sourceType?` · ${$_(e.sourceType,r)}`:"",e.ts?` · ${uK(e.ts,i)}`:""]})]}),o.jsx("div",{className:"search-result-snippet search-result-snippet-expanded",children:e.content})]})]});default:return null}}function dK({source:e,className:t="search-result-icon"}){return e==="knowledge"?o.jsxs("svg",{className:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[o.jsx("path",{d:"M5 5.5h10.5A3.5 3.5 0 0 1 19 9v9.5H8.5A3.5 3.5 0 0 1 5 15V5.5Z"}),o.jsx("path",{d:"M8.25 9h7.5M8.25 12.25h6"})]}):o.jsxs("svg",{className:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[o.jsx("path",{d:"M12 4.5a7.5 7.5 0 1 0 7.5 7.5"}),o.jsx("path",{d:"M12 8a4 4 0 1 0 4 4M12 11.3a.7.7 0 1 0 0 1.4.7.7 0 0 0 0-1.4Z"})]})}function eGe({filled:e=!1,...t}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:[o.jsx("rect",{x:"3.5",y:"9.3",width:"4.5",height:"10.2",rx:"1.5"}),o.jsx("path",{d:"M8 10.2 11.3 4.8c.5-.8 1.7-.45 1.7.5v3.8h4.2a2.1 2.1 0 0 1 2.04 2.6l-1.4 5.75A2.1 2.1 0 0 1 15.8 19H8"})]})}function tGe({filled:e=!1,...t}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:[o.jsx("rect",{x:"3.5",y:"4.5",width:"4.5",height:"10.2",rx:"1.5"}),o.jsx("path",{d:"M8 13.8 11.3 19.2c.5.8 1.7.45 1.7-.5v-3.8h4.2a2.1 2.1 0 0 0 2.04-2.6l-1.4-5.75A2.1 2.1 0 0 0 15.8 5H8"})]})}function zxe(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M5.25 4.25h9.5a2.5 2.5 0 0 1 2.5 2.5v3.5"}),o.jsx("path",{d:"M13.25 17.75h-8a2.5 2.5 0 0 1-2.5-2.5v-8a3 3 0 0 1 3-3"}),o.jsx("path",{d:"M7 8.25h5.5M7 11.75h3.25"}),o.jsx("path",{d:"m13.35 16.65.42-2.16 4.76-4.76a1.35 1.35 0 0 1 1.91 1.91l-4.76 4.76-2.33.25Z"}),o.jsx("path",{d:"m17.65 10.6 1.9 1.9"})]})}const yR="/assets/media/logo-DCsNZy-k.svg",V7="data:image/svg+xml,%3csvg%20width='28'%20height='23'%20viewBox='0%200%2028%2023'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.1957%209.44218C17.0253%209.58161%2016.7774%209.47317%2016.7774%209.24079V8.01696V0.611967C16.7774%200.395085%2016.514%200.271152%2016.3591%200.410576L6.04172%209.16334C5.87132%209.30276%205.62345%209.19432%205.62345%208.96194V2.98218C5.62345%202.81178%205.48403%202.67235%205.31362%202.67235H0.309832C0.139424%202.67235%200%202.81178%200%202.98218V21.7115C0%2021.9284%200.263357%2022.0524%200.418273%2021.9129L10.7202%2013.1602C10.8906%2013.0207%2011.1385%2013.1292%2011.1385%2013.3616V22.0059C11.1385%2022.2228%2011.4018%2022.3467%2011.5567%2022.2073L21.8586%2013.4545C22.0291%2013.3151%2022.2769%2013.4235%2022.2769%2013.6559V19.6357C22.2769%2019.8061%2022.4163%2019.9455%2022.5868%2019.9455H27.5905C27.7609%2019.9455%2027.9004%2019.8061%2027.9004%2019.6357V0.890816C27.9004%200.673934%2027.637%200.550001%2027.4821%200.689425L17.1957%209.44218Z'%20fill='%230066FC'/%3e%3c/svg%3e",fK="(max-width: 860px)";function hK({title:e}){const t=m.useRef(null),n=m.useRef(null),[i,r]=m.useState(0);m.useLayoutEffect(()=>{const l=t.current,c=n.current;if(!l||!c)return;const u=()=>{const f=Math.max(0,Math.ceil(c.scrollWidth-l.clientWidth));r(h=>h===f?h:f)};u();const d=new ResizeObserver(u);return d.observe(l),d.observe(c),()=>d.disconnect()},[e]);const s=Math.min(12,Math.max(4.8,3.6+i/36)),a={"--history-title-translate":`-${i}px`,"--history-title-duration":`${s.toFixed(2)}s`};return o.jsx("span",{ref:t,className:`history-title${i>0?" is-overflowing":""}`,style:a,children:o.jsx("span",{ref:n,className:"history-title-text",children:e})})}function nGe(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"7",cy:"7",r:"2.25"}),o.jsx("circle",{cx:"17",cy:"7",r:"2.25"}),o.jsx("circle",{cx:"7",cy:"17",r:"2.25"}),o.jsx("circle",{cx:"17",cy:"17",r:"2.25"})]})}function iGe(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"12",cy:"12",r:"8.25"}),o.jsx("path",{d:"M3.75 12h16.5M12 3.75c2.1 2.2 3.2 4.95 3.2 8.25S14.1 18.05 12 20.25M12 3.75C9.9 5.95 8.8 8.7 8.8 12s1.1 6.05 3.2 8.25"})]})}function rGe(e){let t=2166136261;for(const i of e)t^=i.charCodeAt(0),t=Math.imul(t,16777619);const n=t>>>0;return{"--avatar-hue-a":194+n%22,"--avatar-hue-b":214+(n>>>6)%25,"--avatar-hue-c":176+(n>>>12)%25,"--avatar-x":`${22+(n>>>18)%55}%`,"--avatar-y":`${18+(n>>>24)%58}%`}}const sGe={admin:"account.roles.admin",developer:"account.roles.developer",user:"account.roles.user"};function aGe({activePage:e,access:t,userInfo:n,onAgentKitCli:i,onDeveloperResources:r,onSystemInfo:s,onIssueFeedback:a,onLogout:l}){const{t:c,i18n:u}=Oe(["sidebar","common"]),[d,f]=m.useState("");if(!n)return null;const h=D7e(n)||c("sidebar:account.defaultUser"),p=typeof n.email=="string"?n.email.trim():"",g=rGe(h),b=M7e(n),v=b===d?"":b,y=mj(u.resolvedLanguage??u.language)??pj;return o.jsx("div",{className:"sidebar-user",children:o.jsxs("div",{className:"sidebar-user-row",children:[o.jsxs(vr,{modal:!0,children:[o.jsx(vr.Trigger,{children:o.jsxs("button",{type:"button",className:"sidebar-user-btn",title:h,children:[o.jsx("span",{className:`account-avatar${v?" has-image":""}`,style:g,"aria-hidden":"true",children:v?o.jsx("img",{className:"account-avatar-image",src:v,alt:"","aria-hidden":"true",referrerPolicy:"no-referrer",onError:()=>f(v)}):null}),o.jsx("span",{className:"sidebar-user-identity",children:o.jsx("span",{className:"sidebar-user-name",children:h})})]})}),o.jsxs(vr.Content,{side:"top",align:"start",sideOffset:4,minWidth:216,children:[o.jsxs("div",{className:"account-menu-head",children:[o.jsx("span",{className:`account-avatar account-avatar--lg${v?" has-image":""}`,style:g,"aria-hidden":"true",children:v?o.jsx("img",{className:"account-avatar-image",src:v,alt:"","aria-hidden":"true",referrerPolicy:"no-referrer",onError:()=>f(v)}):null}),o.jsxs("div",{className:"account-id",children:[o.jsxs("div",{className:"account-name-row",children:[o.jsx("div",{className:"account-name",children:h}),o.jsx(ga,{color:"secondary",size:"sm",variant:"soft",pill:!0,children:c(`sidebar:${sGe[t.role]}`)})]}),p&&p!==h&&o.jsx("div",{className:"account-sub",children:p})]})]}),o.jsxs(vr.Item,{className:"account-menu-action",onSelect:s,children:[o.jsx(Yd,{className:"icon","aria-hidden":"true"}),c("sidebar:account.systemInfo")]}),o.jsxs(vr.Sub,{children:[o.jsx(vr.SubTrigger,{className:"account-menu-action",children:o.jsxs("span",{className:"account-menu-action__label",children:[o.jsx(iGe,{className:"icon"}),c("sidebar:account.language")]})}),o.jsx(vr.SubContent,{sideOffset:6,minWidth:136,children:o.jsx(vr.RadioGroup,{value:y,onChange:x=>{q5e(x)},indicatorPosition:"end",children:Q8.map(x=>o.jsx(vr.RadioItem,{value:x,children:c(`common:languageNames.${x}`)},x))})})]}),o.jsxs(vr.Item,{className:"account-menu-action",onSelect:a,children:[o.jsx(zxe,{className:"icon"}),c("sidebar:account.issueFeedback")]}),o.jsxs(vr.Item,{className:"account-menu-action",onSelect:l,children:[o.jsx(f7e,{className:"icon","aria-hidden":"true"}),c("sidebar:account.logout")]})]})]}),o.jsxs("div",{className:"sidebar-user-shortcuts","aria-label":c("sidebar:account.shortcuts"),children:[o.jsx(Fo,{compact:!0,content:c("sidebar:account.tryCli"),children:o.jsx("button",{type:"button",className:"sidebar-user-shortcut",onClick:i,"aria-label":c("sidebar:account.tryCli"),children:o.jsx(NFe,{className:"icon"})})}),o.jsx(Fo,{compact:!0,content:c("sidebar:account.developerResources"),children:o.jsx("button",{type:"button",className:`sidebar-user-shortcut${e==="developer-resources"?" is-active":""}`,onClick:r,"aria-label":c("sidebar:account.developerResources"),"aria-current":e==="developer-resources"?"page":void 0,children:o.jsx(yFe,{className:"icon"})})})]})]})})}function oGe({branding:e,cloudProvider:t,sessions:n,currentSessionId:i,activePage:r,features:s,access:a,streamingSids:l,evaluatingSids:c,sandboxHistory:u,onNewChat:d,onSearch:f,onQuickCreate:h,onLibrary:p,onAddAgent:g,onMyAgents:b,onWorkspace:v,onApplications:y,onCronJobs:x,onAgentKitCli:w,onDeveloperResources:O,onSystemInfo:k,onIssueFeedback:S,onPickSession:E,onDeleteSession:C,userInfo:N,onLogout:_}){const{t:j}=Oe("sidebar"),T=H=>(s==null?void 0:s[H])!==!1,[L,A]=m.useState(null),R=m.useRef(typeof window<"u"&&window.matchMedia(fK).matches),[P,$]=m.useState(R.current),M=n.map(H=>({id:H.id,title:nR(H.events,j("history.newConversation")),createdAt:(H.lastUpdateTime??0)*1e3})).sort((H,X)=>X.createdAt-H.createdAt),B=()=>{R.current=!1,$(H=>!H),A(null)};m.useEffect(()=>{const H=window.matchMedia(fK),X=Q=>{Q.matches?$(q=>q||(R.current=!0,!0)):R.current&&(R.current=!1,$(!1))};return H.addEventListener("change",X),()=>H.removeEventListener("change",X)},[]);const I=t==="byteplus"?V7:yR;return o.jsxs("aside",{className:`sidebar ${P?"is-collapsed":""}`,children:[o.jsxs("div",{className:"sidebar-top",children:[o.jsxs("div",{className:"sidebar-brand-row",children:[o.jsxs("button",{type:"button",className:"brand",onClick:d,"aria-label":j("navigation.home"),title:j("navigation.home"),children:[o.jsx("img",{className:"brand-logo",src:e.logoUrl||I,width:20,height:20,alt:"","aria-hidden":!0}),o.jsx("span",{className:"brand-title",children:e.title})]}),o.jsx("button",{type:"button",className:"sidebar-collapse-toggle",onClick:B,"aria-label":j(P?"navigation.expand":"navigation.collapse"),title:j(P?"navigation.expand":"navigation.collapse"),children:P?o.jsx(VKe,{className:"icon"}):o.jsx(zKe,{className:"icon"})})]}),o.jsxs("nav",{className:"sidebar-nav","aria-label":j("navigation.label"),children:[T("newChat")&&o.jsxs("button",{className:`new-chat new-chat--conversation${r==="new-chat"?" is-active":""}`,onClick:d,"aria-label":j("navigation.newChat"),"aria-current":r==="new-chat"?"page":void 0,title:j("navigation.newChat"),children:[o.jsx(HKe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.newChat")})]}),T("search")&&o.jsx(XKe,{active:r==="search",onClick:f}),o.jsxs("button",{className:`new-chat new-chat--agents${r==="agents"?" is-active":""}`,onClick:b,"aria-label":j("navigation.agents"),"aria-current":r==="agents"?"page":void 0,title:j("navigation.agents"),children:[o.jsx(WKe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.agents")})]}),o.jsxs("button",{className:`new-chat new-chat--workspaces${r==="workspaces"?" is-active":""}`,onClick:v,"aria-label":j("navigation.workspaces"),"aria-current":r==="workspaces"?"page":void 0,title:j("navigation.workspaces"),children:[o.jsx(qFe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.workspaces")})]}),o.jsxs("button",{className:`new-chat new-chat--library${r==="library"?" is-active":""}`,onClick:p,"aria-label":j("navigation.library"),"aria-current":r==="library"?"page":void 0,title:j("navigation.library"),children:[o.jsx(Qxe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.library")})]}),o.jsxs("button",{className:`new-chat new-chat--cronjobs${r==="cronjobs"?" is-active":""}`,onClick:x,"aria-label":j("navigation.cronjobs"),"aria-current":r==="cronjobs"?"page":void 0,title:j("navigation.cronjobs"),children:[o.jsx(CF,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.cronjobs")})]}),o.jsxs("button",{className:`new-chat new-chat--applications${r==="applications"?" is-active":""}`,onClick:y,"aria-label":j("navigation.automations"),"aria-current":r==="applications"?"page":void 0,title:j("navigation.automations"),children:[o.jsx(nGe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.automations")})]})]})]}),T("history")&&o.jsxs("div",{className:"sidebar-history",children:[o.jsxs("div",{className:"history-head",children:[o.jsx("span",{children:j("history.title")}),T("newChat")&&o.jsx("button",{type:"button",className:"history-new-chat",onClick:(u==null?void 0:u.onNew)??d,disabled:u==null?void 0:u.newDisabled,"aria-label":j("history.create"),title:j("history.create"),children:o.jsx(Mo,{className:"icon"})})]}),o.jsx("div",{className:"history-list",children:u?o.jsxs(o.Fragment,{children:[u.loading&&u.threads.length===0?o.jsx("div",{className:"history-empty",role:"status",children:j("history.loading")}):null,u.error?o.jsx("div",{className:"history-error",role:"alert",children:u.error}):null,!u.loading&&!u.error&&u.threads.length===0?o.jsx("div",{className:"history-empty",children:j("history.empty")}):null,u.threads.map(H=>{const X=H.id===u.currentThreadId,Q=H.name||H.preview||`Thread ${H.id.slice(0,8)}`,q=H.id===u.busyThreadId;return o.jsxs("div",{className:`history-item ${X?"active":""}`,children:[o.jsxs("button",{type:"button",className:"history-item-btn",onClick:()=>u.onSelect(H.id),"aria-current":X?"page":void 0,title:Q,disabled:q,children:[o.jsx(hK,{title:Q}),X?o.jsx("span",{className:"history-current-badge",children:j("history.current")}):null]}),o.jsx("button",{type:"button",className:"history-more","aria-label":j("history.manage",{title:Q}),title:j("history.more"),disabled:q,onClick:()=>A(U=>U===H.id?null:H.id),children:o.jsx(bW,{className:"icon"})}),L===H.id?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"menu-scrim",onClick:()=>A(null)}),o.jsx("div",{className:"history-menu",children:o.jsxs("button",{type:"button",className:"menu-item menu-item--danger",onClick:()=>{A(null),u.onDelete(H)},children:[o.jsx(vm,{className:"icon"})," ",j("history.delete")]})})]}):null]},H.id)}),u.hasMore?o.jsx("button",{type:"button",className:"history-load-more",disabled:u.loading,onClick:u.onLoadMore,children:u.loading?j("history.loadingMore"):j("history.loadMore")}):null]}):o.jsxs(o.Fragment,{children:[M.length===0?o.jsx("div",{className:"history-empty",children:j("history.empty")}):null,M.map(H=>{const X=H.id===i,Q=(l==null?void 0:l.has(H.id))===!0,q=!Q&&(c==null?void 0:c.has(H.id))===!0;return o.jsxs("div",{className:`history-item ${X?"active":""}`,children:[o.jsxs("button",{className:"history-item-btn",onClick:()=>E(H.id),"aria-current":X?"page":void 0,title:H.title,children:[o.jsx(hK,{title:H.title}),q&&o.jsxs("span",{className:"history-evaluating-status",title:j("history.evaluatingTitle"),children:[o.jsx("span",{className:"history-evaluating","aria-hidden":"true"}),j("history.evaluating")]})]}),o.jsxs("div",{className:"history-action-slot",children:[Q?o.jsx(zk,{className:"history-streaming-indicator",size:12,role:"status","aria-label":j("history.generating")}):null,o.jsx("button",{type:"button",className:"history-more","aria-label":j("history.manage",{title:H.title}),title:j("history.more"),onClick:()=>A(U=>U===H.id?null:H.id),children:o.jsx(bW,{className:"icon"})})]}),L===H.id&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"menu-scrim",onClick:()=>A(null)}),o.jsx("div",{className:"history-menu",children:o.jsxs("button",{type:"button",className:"menu-item menu-item--danger",onClick:()=>{A(null),C(H.id)},children:[o.jsx(vm,{className:"icon"})," ",j("history.delete")]})})]})]},H.id)})]})})]}),o.jsx("div",{className:"sidebar-footer",children:o.jsx(aGe,{activePage:r,access:a,userInfo:N,onAgentKitCli:w,onDeveloperResources:O,onSystemInfo:k,onIssueFeedback:S,onLogout:_})})]})}function sa(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,i;n{}};function vR(){for(var e=0,t=arguments.length,n={},i;e=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}iA.prototype=vR.prototype={constructor:iA,on:function(e,t){var n=this._,i=cGe(e+"",n),r,s=-1,a=i.length;if(arguments.length<2){for(;++s0)for(var n=new Array(r),i=0,r,s;i=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),mK.hasOwnProperty(t)?{space:mK[t],local:e}:e}function dGe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===W4&&t.documentElement.namespaceURI===W4?t.createElement(e):t.createElementNS(n,e)}}function fGe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Vxe(e){var t=xR(e);return(t.local?fGe:dGe)(t)}function hGe(){}function H7(e){return e==null?hGe:function(){return this.querySelector(e)}}function pGe(e){typeof e!="function"&&(e=H7(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r=w&&(w=x+1);!(k=v[w])&&++w=0;)(a=i[r])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function FGe(e){e||(e=BGe);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var n=this._groups,i=n.length,r=new Array(i),s=0;st?1:e>=t?0:NaN}function UGe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function QGe(){return Array.from(this)}function zGe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?eXe:typeof t=="function"?nXe:tXe)(e,t,n??"")):Qv(this.node(),e)}function Qv(e,t){return e.style.getPropertyValue(t)||Gxe(e).getComputedStyle(e,null).getPropertyValue(t)}function rXe(e){return function(){delete this[e]}}function sXe(e,t){return function(){this[e]=t}}function aXe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function oXe(e,t){return arguments.length>1?this.each((t==null?rXe:typeof t=="function"?aXe:sXe)(e,t)):this.node()[e]}function Xxe(e){return e.trim().split(/^|\s+/)}function q7(e){return e.classList||new Yxe(e)}function Yxe(e){this._node=e,this._names=Xxe(e.getAttribute("class")||"")}Yxe.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Zxe(e,t){for(var n=q7(e),i=-1,r=t.length;++i=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function DXe(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,r=t.length,s;n()=>e;function K4(e,{sourceEvent:t,subject:n,target:i,identifier:r,active:s,x:a,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}K4.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function HXe(e){return!e.ctrlKey&&!e.button}function qXe(){return this.parentNode}function WXe(e,t){return t??{x:e.x,y:e.y}}function KXe(){return navigator.maxTouchPoints||"ontouchstart"in this}function r1e(){var e=HXe,t=qXe,n=WXe,i=KXe,r={},s=vR("start","drag","end"),a=0,l,c,u,d,f=0;function h(O){O.on("mousedown.drag",p).filter(i).on("touchstart.drag",v).on("touchmove.drag",y,VXe).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(O,k){if(!(d||!e.call(this,O,k))){var S=w(this,t.call(this,O,k),O,k,"mouse");S&&(Gl(O.view).on("mousemove.drag",g,kS).on("mouseup.drag",b,kS),n1e(O.view),WD(O),u=!1,l=O.clientX,c=O.clientY,S("start",O))}}function g(O){if(Jy(O),!u){var k=O.clientX-l,S=O.clientY-c;u=k*k+S*S>f}r.mouse("drag",O)}function b(O){Gl(O.view).on("mousemove.drag mouseup.drag",null),i1e(O.view,u),Jy(O),r.mouse("end",O)}function v(O,k){if(e.call(this,O,k)){var S=O.changedTouches,E=t.call(this,O,k),C=S.length,N,_;for(N=0;N>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?cT(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?cT(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=XXe.exec(e))?new ul(t[1],t[2],t[3],1):(t=YXe.exec(e))?new ul(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ZXe.exec(e))?cT(t[1],t[2],t[3],t[4]):(t=JXe.exec(e))?cT(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eYe.exec(e))?wK(t[1],t[2]/100,t[3]/100,1):(t=tYe.exec(e))?wK(t[1],t[2]/100,t[3]/100,t[4]):gK.hasOwnProperty(e)?vK(gK[e]):e==="transparent"?new ul(NaN,NaN,NaN,0):null}function vK(e){return new ul(e>>16&255,e>>8&255,e&255,1)}function cT(e,t,n,i){return i<=0&&(e=t=n=NaN),new ul(e,t,n,i)}function rYe(e){return e instanceof Jk||(e=vb(e)),e?(e=e.rgb(),new ul(e.r,e.g,e.b,e.opacity)):new ul}function G4(e,t,n,i){return arguments.length===1?rYe(e):new ul(e,t,n,i??1)}function ul(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}W7(ul,G4,s1e(Jk,{brighter(e){return e=e==null?B_:Math.pow(B_,e),new ul(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ES:Math.pow(ES,e),new ul(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ul(nb(this.r),nb(this.g),nb(this.b),U_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xK,formatHex:xK,formatHex8:sYe,formatRgb:OK,toString:OK}));function xK(){return`#${Lg(this.r)}${Lg(this.g)}${Lg(this.b)}`}function sYe(){return`#${Lg(this.r)}${Lg(this.g)}${Lg(this.b)}${Lg((isNaN(this.opacity)?1:this.opacity)*255)}`}function OK(){const e=U_(this.opacity);return`${e===1?"rgb(":"rgba("}${nb(this.r)}, ${nb(this.g)}, ${nb(this.b)}${e===1?")":`, ${e})`}`}function U_(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nb(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lg(e){return e=nb(e),(e<16?"0":"")+e.toString(16)}function wK(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Tu(e,t,n,i)}function a1e(e){if(e instanceof Tu)return new Tu(e.h,e.s,e.l,e.opacity);if(e instanceof Jk||(e=vb(e)),!e)return new Tu;if(e instanceof Tu)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),s=Math.max(t,n,i),a=NaN,l=s-r,c=(s+r)/2;return l?(t===s?a=(n-i)/l+(n0&&c<1?0:a,new Tu(a,l,c,e.opacity)}function aYe(e,t,n,i){return arguments.length===1?a1e(e):new Tu(e,t,n,i??1)}function Tu(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}W7(Tu,aYe,s1e(Jk,{brighter(e){return e=e==null?B_:Math.pow(B_,e),new Tu(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ES:Math.pow(ES,e),new Tu(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new ul(KD(e>=240?e-240:e+120,r,i),KD(e,r,i),KD(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new Tu(SK(this.h),uT(this.s),uT(this.l),U_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=U_(this.opacity);return`${e===1?"hsl(":"hsla("}${SK(this.h)}, ${uT(this.s)*100}%, ${uT(this.l)*100}%${e===1?")":`, ${e})`}`}}));function SK(e){return e=(e||0)%360,e<0?e+360:e}function uT(e){return Math.max(0,Math.min(1,e||0))}function KD(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const OR=e=>()=>e;function o1e(e,t){return function(n){return e+n*t}}function oYe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function LVt(e,t){var n=t-e;return n?o1e(e,n>180||n<-180?n-360*Math.round(n/360):n):OR(isNaN(e)?t:e)}function lYe(e){return(e=+e)==1?l1e:function(t,n){return n-t?oYe(t,n,e):OR(isNaN(t)?n:t)}}function l1e(e,t){var n=t-e;return n?o1e(e,n):OR(isNaN(e)?t:e)}const Q_=function e(t){var n=lYe(t);function i(r,s){var a=n((r=G4(r)).r,(s=G4(s)).r),l=n(r.g,s.g),c=n(r.b,s.b),u=l1e(r.opacity,s.opacity);return function(d){return r.r=a(d),r.g=l(d),r.b=c(d),r.opacity=u(d),r+""}}return i.gamma=e,i}(1);function cYe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,i=t.slice(),r;return function(s){for(r=0;rn&&(s=t.slice(n,s),l[a]?l[a]+=s:l[++a]=s),(i=i[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,c.push({i:a,x:vd(i,r)})),n=GD.lastIndex;return n180?d+=360:d-u>180&&(u+=360),h.push({i:f.push(r(f)+"rotate(",null,i)-2,x:vd(u,d)})):d&&f.push(r(f)+"rotate("+d+i)}function l(u,d,f,h){u!==d?h.push({i:f.push(r(f)+"skewX(",null,i)-2,x:vd(u,d)}):d&&f.push(r(f)+"skewX("+d+i)}function c(u,d,f,h,p,g){if(u!==f||d!==h){var b=p.push(r(p)+"scale(",null,",",null,")");g.push({i:b-4,x:vd(u,f)},{i:b-2,x:vd(d,h)})}else(f!==1||h!==1)&&p.push(r(p)+"scale("+f+","+h+")")}return function(u,d){var f=[],h=[];return u=e(u),d=e(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,h),a(u.rotate,d.rotate,f,h),l(u.skewX,d.skewX,f,h),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,h),u=d=null,function(p){for(var g=-1,b=h.length,v;++g=0&&e._call.call(void 0,t),e=e._next;--zv}function CK(){xb=(V_=TS.now())+wR,zv=RO=0;try{kYe()}finally{zv=0,CYe(),xb=0}}function EYe(){var e=TS.now(),t=e-V_;t>f1e&&(wR-=t,V_=e)}function CYe(){for(var e,t=z_,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:z_=n);IO=e,Z4(i)}function Z4(e){if(!zv){RO&&(RO=clearTimeout(RO));var t=e-xb;t>24?(e<1/0&&(RO=setTimeout(CK,e-TS.now()-wR)),B1&&(B1=clearInterval(B1))):(B1||(V_=TS.now(),B1=setInterval(EYe,f1e)),zv=1,h1e(CK))}}function TK(e,t,n){var i=new H_;return t=t==null?0:+t,i.restart(r=>{i.stop(),e(r+t)},t,n),i}var TYe=vR("start","end","cancel","interrupt"),AYe=[],m1e=0,AK=1,J4=2,sA=3,_K=4,e6=5,aA=6;function SR(e,t,n,i,r,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;_Ye(e,n,{name:t,index:i,group:r,on:TYe,tween:AYe,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:m1e})}function G7(e,t){var n=Ku(e,t);if(n.state>m1e)throw new Error("too late; already scheduled");return n}function ef(e,t){var n=Ku(e,t);if(n.state>sA)throw new Error("too late; already running");return n}function Ku(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _Ye(e,t,n){var i=e.__transition,r;i[t]=n,n.timer=p1e(s,0,n.time);function s(u){n.state=AK,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var d,f,h,p;if(n.state!==AK)return c();for(d in i)if(p=i[d],p.name===n.name){if(p.state===sA)return TK(a);p.state===_K?(p.state=aA,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[d]):+dJ4&&i.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function sZe(e,t,n){var i,r,s=rZe(t)?G7:ef;return function(){var a=s(this,e),l=a.on;l!==i&&(r=(i=l).copy()).on(t,n),a.on=r}}function aZe(e,t){var n=this._id;return arguments.length<2?Ku(this.node(),n).on.on(e):this.each(sZe(n,e,t))}function oZe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function lZe(){return this.on("end.remove",oZe(this._id))}function cZe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=H7(e));for(var i=this._groups,r=i.length,s=new Array(r),a=0;a()=>e;function PZe(e,{sourceEvent:t,target:n,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function nh(e,t,n){this.k=e,this.x=t,this.y=n}nh.prototype={constructor:nh,scale:function(e){return e===1?this:new nh(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new nh(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var kR=new nh(1,0,0);v1e.prototype=nh.prototype;function v1e(e){for(;!e.__zoom;)if(!(e=e.parentNode))return kR;return e.__zoom}function XD(e){e.stopImmediatePropagation()}function U1(e){e.preventDefault(),e.stopImmediatePropagation()}function DZe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function MZe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function NK(){return this.__zoom||kR}function LZe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function $Ze(){return navigator.maxTouchPoints||"ontouchstart"in this}function FZe(e,t,n){var i=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}function x1e(){var e=DZe,t=MZe,n=FZe,i=LZe,r=$Ze,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,c=rA,u=vR("start","zoom","end"),d,f,h,p=500,g=150,b=0,v=10;function y(A){A.property("__zoom",NK).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",N).on("dblclick.zoom",_).filter(r).on("touchstart.zoom",j).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,R,P,$){var M=A.selection?A.selection():A;M.property("__zoom",NK),A!==M?k(A,R,P,$):M.interrupt().each(function(){S(this,arguments).event($).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},y.scaleBy=function(A,R,P,$){y.scaleTo(A,function(){var M=this.__zoom.k,B=typeof R=="function"?R.apply(this,arguments):R;return M*B},P,$)},y.scaleTo=function(A,R,P,$){y.transform(A,function(){var M=t.apply(this,arguments),B=this.__zoom,I=P==null?O(M):typeof P=="function"?P.apply(this,arguments):P,H=B.invert(I),X=typeof R=="function"?R.apply(this,arguments):R;return n(w(x(B,X),I,H),M,a)},P,$)},y.translateBy=function(A,R,P,$){y.transform(A,function(){return n(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof P=="function"?P.apply(this,arguments):P),t.apply(this,arguments),a)},null,$)},y.translateTo=function(A,R,P,$,M){y.transform(A,function(){var B=t.apply(this,arguments),I=this.__zoom,H=$==null?O(B):typeof $=="function"?$.apply(this,arguments):$;return n(kR.translate(H[0],H[1]).scale(I.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof P=="function"?-P.apply(this,arguments):-P),B,a)},$,M)};function x(A,R){return R=Math.max(s[0],Math.min(s[1],R)),R===A.k?A:new nh(R,A.x,A.y)}function w(A,R,P){var $=R[0]-P[0]*A.k,M=R[1]-P[1]*A.k;return $===A.x&&M===A.y?A:new nh(A.k,$,M)}function O(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function k(A,R,P,$){A.on("start.zoom",function(){S(this,arguments).event($).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event($).end()}).tween("zoom",function(){var M=this,B=arguments,I=S(M,B).event($),H=t.apply(M,B),X=P==null?O(H):typeof P=="function"?P.apply(M,B):P,Q=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),q=M.__zoom,U=typeof R=="function"?R.apply(M,B):R,te=c(q.invert(X).concat(Q/q.k),U.invert(X).concat(Q/U.k));return function(le){if(le===1)le=U;else{var oe=te(le),re=Q/oe[2];le=new nh(re,X[0]-oe[0]*re,X[1]-oe[1]*re)}I.zoom(null,le)}})}function S(A,R,P){return!P&&A.__zooming||new E(A,R)}function E(A,R){this.that=A,this.args=R,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,R),this.taps=0}E.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,R){return this.mouse&&A!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var R=Gl(this.that).datum();u.call(A,this.that,new PZe(A,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:u}),R)}};function C(A,...R){if(!e.apply(this,arguments))return;var P=S(this,R).event(A),$=this.__zoom,M=Math.max(s[0],Math.min(s[1],$.k*Math.pow(2,i.apply(this,arguments)))),B=Su(A);if(P.wheel)(P.mouse[0][0]!==B[0]||P.mouse[0][1]!==B[1])&&(P.mouse[1]=$.invert(P.mouse[0]=B)),clearTimeout(P.wheel);else{if($.k===M)return;P.mouse=[B,$.invert(B)],oA(this),P.start()}U1(A),P.wheel=setTimeout(I,g),P.zoom("mouse",n(w(x($,M),P.mouse[0],P.mouse[1]),P.extent,a));function I(){P.wheel=null,P.end()}}function N(A,...R){if(h||!e.apply(this,arguments))return;var P=A.currentTarget,$=S(this,R,!0).event(A),M=Gl(A.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",Q,!0),B=Su(A,P),I=A.clientX,H=A.clientY;n1e(A.view),XD(A),$.mouse=[B,this.__zoom.invert(B)],oA(this),$.start();function X(q){if(U1(q),!$.moved){var U=q.clientX-I,te=q.clientY-H;$.moved=U*U+te*te>b}$.event(q).zoom("mouse",n(w($.that.__zoom,$.mouse[0]=Su(q,P),$.mouse[1]),$.extent,a))}function Q(q){M.on("mousemove.zoom mouseup.zoom",null),i1e(q.view,$.moved),U1(q),$.event(q).end()}}function _(A,...R){if(e.apply(this,arguments)){var P=this.__zoom,$=Su(A.changedTouches?A.changedTouches[0]:A,this),M=P.invert($),B=P.k*(A.shiftKey?.5:2),I=n(w(x(P,B),$,M),t.apply(this,R),a);U1(A),l>0?Gl(this).transition().duration(l).call(k,I,$,A):Gl(this).call(y.transform,I,$,A)}}function j(A,...R){if(e.apply(this,arguments)){var P=A.touches,$=P.length,M=S(this,R,A.changedTouches.length===$).event(A),B,I,H,X;for(XD(A),I=0;I<$;++I)H=P[I],X=Su(H,this),X=[X,this.__zoom.invert(X),H.identifier],M.touch0?!M.touch1&&M.touch0[2]!==X[2]&&(M.touch1=X,M.taps=0):(M.touch0=X,B=!0,M.taps=1+!!d);d&&(d=clearTimeout(d)),B&&(M.taps<2&&(f=X[0],d=setTimeout(function(){d=null},p)),oA(this),M.start())}}function T(A,...R){if(this.__zooming){var P=S(this,R).event(A),$=A.changedTouches,M=$.length,B,I,H,X;for(U1(A),B=0;B`Seems like you have not used zustand provider as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:i})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:i}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},AS=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],O1e=["Enter"," ","Escape"],w1e={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Vv;(function(e){e.Strict="strict",e.Loose="loose"})(Vv||(Vv={}));var ib;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ib||(ib={}));var _S;(function(e){e.Partial="partial",e.Full="full"})(_S||(_S={}));const S1e={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Dp;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Dp||(Dp={}));var NS;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(NS||(NS={}));var Xt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Xt||(Xt={}));const jK={[Xt.Left]:Xt.Right,[Xt.Right]:Xt.Left,[Xt.Top]:Xt.Bottom,[Xt.Bottom]:Xt.Top};function k1e(e){return e===null?null:e?"valid":"invalid"}const E1e=e=>"id"in e&&"source"in e&&"target"in e,BZe=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Y7=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),eE=(e,t=[0,0])=>{const{width:n,height:i}=qh(e),r=e.origin??t,s=n*r[0],a=i*r[1];return{x:e.position.x-s,y:e.position.y-a}},UZe=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((i,r)=>{const s=typeof r=="string";let a=!t.nodeLookup&&!s?r:void 0;t.nodeLookup&&(a=s?t.nodeLookup.get(r):Y7(r)?r:t.nodeLookup.get(r.id));const l=a?q_(a,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return ER(i,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return CR(n)},tE=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},i=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=ER(n,q_(r)),i=!0)}),i?CR(n):{x:0,y:0,width:0,height:0}},Z7=(e,t,[n,i,r]=[0,0,1],s=!1,a=!1)=>{const l={...$x(t,[n,i,r]),width:t.width/r,height:t.height/r},c=[];for(const u of e.values()){const{measured:d,selectable:f=!0,hidden:h=!1}=u;if(a&&!f||h)continue;const p=d.width??u.width??u.initialWidth??null,g=d.height??u.height??u.initialHeight??null,b=jS(l,qv(u)),v=(p??0)*(g??0),y=s&&b>0;(!u.internals.handleBounds||y||b>=v||u.dragging)&&c.push(u)}return c},QZe=(e,t)=>{const n=new Set;return e.forEach(i=>{n.add(i.id)}),t.filter(i=>n.has(i.source)||n.has(i.target))};function zZe(e,t){const n=new Map,i=t!=null&&t.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!r.hidden)&&(!i||i.has(r.id))&&n.set(r.id,r)}),n}async function VZe({nodes:e,width:t,height:n,panZoom:i,minZoom:r,maxZoom:s},a){if(e.size===0)return!0;const l=zZe(e,a),c=tE(l),u=eB(c,t,n,(a==null?void 0:a.minZoom)??r,(a==null?void 0:a.maxZoom)??s,(a==null?void 0:a.padding)??.1);return await i.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),!0}function C1e({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:i=[0,0],nodeExtent:r,onError:s}){const a=n.get(e),l=a.parentId?n.get(a.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=a.origin??i;let f=a.extent||r;if(a.extent==="parent"&&!a.expandParent)if(!l)s==null||s("005",Bu.error005());else{const p=l.measured.width,g=l.measured.height;p&&g&&(f=[[c,u],[c+p,u+g]])}else l&&wb(a.extent)&&(f=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const h=wb(f)?Ob(t,f,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&(s==null||s("015",Bu.error015())),{position:{x:h.x-c+(a.measured.width??0)*d[0],y:h.y-u+(a.measured.height??0)*d[1]},positionAbsolute:h}}async function HZe({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:i,onBeforeDelete:r}){const s=new Set(e.map(h=>h.id)),a=[];for(const h of n){if(h.deletable===!1)continue;const p=s.has(h.id),g=!p&&h.parentId&&a.find(b=>b.id===h.parentId);(p||g)&&a.push(h)}const l=new Set(t.map(h=>h.id)),c=i.filter(h=>h.deletable!==!1),d=QZe(a,c);for(const h of c)l.has(h.id)&&!d.find(g=>g.id===h.id)&&d.push(h);if(!r)return{edges:d,nodes:a};const f=await r({nodes:a,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:a}:{edges:[],nodes:[]}:f}const Hv=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ob=(e={x:0,y:0},t,n)=>({x:Hv(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Hv(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function T1e(e,t,n){const{width:i,height:r}=qh(n),{x:s,y:a}=n.internals.positionAbsolute;return Ob(e,[[s,a],[s+i,a+r]],t)}const RK=(e,t,n)=>en?-Hv(Math.abs(e-n),1,t)/t:0,J7=(e,t,n=15,i=40)=>{const r=RK(e.x,i,t.width-i)*n,s=RK(e.y,i,t.height-i)*n;return[r,s]},ER=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),t6=({x:e,y:t,width:n,height:i})=>({x:e,y:t,x2:e+n,y2:t+i}),CR=({x:e,y:t,x2:n,y2:i})=>({x:e,y:t,width:n-e,height:i-t}),qv=(e,t=[0,0])=>{var r,s;const{x:n,y:i}=Y7(e)?e.internals.positionAbsolute:eE(e,t);return{x:n,y:i,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},q_=(e,t=[0,0])=>{var r,s;const{x:n,y:i}=Y7(e)?e.internals.positionAbsolute:eE(e,t);return{x:n,y:i,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:i+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},A1e=(e,t)=>CR(ER(t6(e),t6(t))),jS=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),i=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*i)},IK=e=>_u(e.width)&&_u(e.height)&&_u(e.x)&&_u(e.y),_u=e=>!isNaN(e)&&isFinite(e),_1e=(e,t)=>(n,i)=>{},nE=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),$x=({x:e,y:t},[n,i,r],s=!1,a=[1,1])=>{const l={x:(e-n)/r,y:(t-i)/r};return s?nE(l,a):l},Wv=({x:e,y:t},[n,i,r])=>({x:e*r+n,y:t*r+i});function D0(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function qZe(e,t,n){if(typeof e=="string"||typeof e=="number"){const i=D0(e,n),r=D0(e,t);return{top:i,right:r,bottom:i,left:r,x:r*2,y:i*2}}if(typeof e=="object"){const i=D0(e.top??e.y??0,n),r=D0(e.bottom??e.y??0,n),s=D0(e.left??e.x??0,t),a=D0(e.right??e.x??0,t);return{top:i,right:a,bottom:r,left:s,x:s+a,y:i+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function WZe(e,t,n,i,r,s){const{x:a,y:l}=Wv(e,[t,n,i]),{x:c,y:u}=Wv({x:e.x+e.width,y:e.y+e.height},[t,n,i]),d=r-c,f=s-u;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}const eB=(e,t,n,i,r,s)=>{const a=qZe(s,t,n),l=(t-a.x)/e.width,c=(n-a.y)/e.height,u=Math.min(l,c),d=Hv(u,i,r),f=e.x+e.width/2,h=e.y+e.height/2,p=t/2-f*d,g=n/2-h*d,b=WZe(e,p,g,d,t,n),v={left:Math.min(b.left-a.left,0),top:Math.min(b.top-a.top,0),right:Math.min(b.right-a.right,0),bottom:Math.min(b.bottom-a.bottom,0)};return{x:p-v.left+v.right,y:g-v.top+v.bottom,zoom:d}},RS=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function wb(e){return e!=null&&e!=="parent"}function qh(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function tB(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function N1e(e,t={width:0,height:0},n,i,r){const s={...e},a=i.get(n);if(a){const l=a.origin||r;s.x+=a.internals.positionAbsolute.x-(t.width??0)*l[0],s.y+=a.internals.positionAbsolute.y-(t.height??0)*l[1]}return s}function PK(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function KZe(){let e,t;return{promise:new Promise((i,r)=>{e=i,t=r}),resolve:e,reject:t}}function GZe(e){return{...w1e,...e||{}}}function Sw(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:i,containerBounds:r}){const{x:s,y:a}=Nu(e),l=$x({x:s-((r==null?void 0:r.left)??0),y:a-((r==null?void 0:r.top)??0)},i),{x:c,y:u}=n?nE(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const nB=e=>({width:e.offsetWidth,height:e.offsetHeight}),j1e=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},XZe=["INPUT","SELECT","TEXTAREA"];function R1e(e){var i,r;const t=((r=(i=e.composedPath)==null?void 0:i.call(e))==null?void 0:r[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:XZe.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const I1e=e=>"clientX"in e,Nu=(e,t)=>{var s,a;const n=I1e(e),i=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,r=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:i-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},DK=(e,t,n,i,r)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(a=>{const l=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:r,position:a.getAttribute("data-handlepos"),x:(l.left-n.left)/i,y:(l.top-n.top)/i,...nB(a)}})};function P1e({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:r,sourceControlY:s,targetControlX:a,targetControlY:l}){const c=e*.125+r*.375+a*.375+n*.125,u=t*.125+s*.375+l*.375+i*.125,d=Math.abs(c-e),f=Math.abs(u-t);return[c,u,d,f]}function hT(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function MK({pos:e,x1:t,y1:n,x2:i,y2:r,c:s}){switch(e){case Xt.Left:return[t-hT(t-i,s),n];case Xt.Right:return[t+hT(i-t,s),n];case Xt.Top:return[t,n-hT(n-r,s)];case Xt.Bottom:return[t,n+hT(r-n,s)]}}function D1e({sourceX:e,sourceY:t,sourcePosition:n=Xt.Bottom,targetX:i,targetY:r,targetPosition:s=Xt.Top,curvature:a=.25}){const[l,c]=MK({pos:n,x1:e,y1:t,x2:i,y2:r,c:a}),[u,d]=MK({pos:s,x1:i,y1:r,x2:e,y2:t,c:a}),[f,h,p,g]=P1e({sourceX:e,sourceY:t,targetX:i,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${t} C${l},${c} ${u},${d} ${i},${r}`,f,h,p,g]}function M1e({sourceX:e,sourceY:t,targetX:n,targetY:i}){const r=Math.abs(n-e)/2,s=n0}const JZe=({source:e,sourceHandle:t,target:n,targetHandle:i})=>`xy-edge__${e}${t||""}-${n}${i||""}`,eJe=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),tJe=(e,t,n={})=>{var s;if(!e.source||!e.target)return(s=n.onError)==null||s.call(n,"006",Bu.error006()),t;const i=n.getEdgeId||JZe;let r;return E1e(e)?r={...e}:r={...e,id:i(e)},eJe(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))};function L1e({sourceX:e,sourceY:t,targetX:n,targetY:i}){const[r,s,a,l]=M1e({sourceX:e,sourceY:t,targetX:n,targetY:i});return[`M ${e},${t}L ${n},${i}`,r,s,a,l]}const LK={[Xt.Left]:{x:-1,y:0},[Xt.Right]:{x:1,y:0},[Xt.Top]:{x:0,y:-1},[Xt.Bottom]:{x:0,y:1}},nJe=({source:e,sourcePosition:t=Xt.Bottom,target:n})=>t===Xt.Left||t===Xt.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function iJe({source:e,sourcePosition:t=Xt.Bottom,target:n,targetPosition:i=Xt.Top,center:r,offset:s,stepPosition:a}){const l=LK[t],c=LK[i],u={x:e.x+l.x*s,y:e.y+l.y*s},d={x:n.x+c.x*s,y:n.y+c.y*s},f=nJe({source:u,sourcePosition:t,target:d}),h=f.x!==0?"x":"y",p=f[h];let g=[],b,v;const y={x:0,y:0},x={x:0,y:0},[,,w,O]=M1e({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[h]*c[h]===-1){h==="x"?(b=r.x??u.x+(d.x-u.x)*a,v=r.y??(u.y+d.y)/2):(b=r.x??(u.x+d.x)/2,v=r.y??u.y+(d.y-u.y)*a);const C=[{x:b,y:u.y},{x:b,y:d.y}],N=[{x:u.x,y:v},{x:d.x,y:v}];l[h]===p?g=h==="x"?C:N:g=h==="x"?N:C}else{const C=[{x:u.x,y:d.y}],N=[{x:d.x,y:u.y}];if(h==="x"?g=l.x===p?N:C:g=l.y===p?C:N,t===i){const A=Math.abs(e[h]-n[h]);if(A<=s){const R=Math.min(s-1,s-A);l[h]===p?y[h]=(u[h]>e[h]?-1:1)*R:x[h]=(d[h]>n[h]?-1:1)*R}}if(t!==i){const A=h==="x"?"y":"x",R=l[h]===c[A],P=u[A]>d[A],$=u[A]=L?(b=(_.x+j.x)/2,v=g[0].y):(b=g[0].x,v=(_.y+j.y)/2)}const k={x:u.x+y.x,y:u.y+y.y},S={x:d.x+x.x,y:d.y+x.y};return[[e,...k.x!==g[0].x||k.y!==g[0].y?[k]:[],...g,...S.x!==g[g.length-1].x||S.y!==g[g.length-1].y?[S]:[],n],b,v,w,O]}function rJe(e,t,n,i){const r=Math.min($K(e,t)/2,$K(t,n)/2,i),{x:s,y:a}=t;if(e.x===s&&s===n.x||e.y===a&&a===n.y)return`L${s} ${a}`;if(e.y===a){const u=e.xn.id===t):e[0])||null}function n6(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(i=>`${i}=${e[i]}`).join("&")}`:""}function aJe(e,{id:t,defaultColor:n,defaultMarkerStart:i,defaultMarkerEnd:r}){const s=new Set;return e.reduce((a,l)=>([l.markerStart||i,l.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const u=n6(c,t);s.has(u)||(a.push({id:u,color:c.color||n,...c}),s.add(u))}}),a),[]).sort((a,l)=>a.id.localeCompare(l.id))}const $1e=1e3,oJe=10,iB={nodeOrigin:[0,0],nodeExtent:AS,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},lJe={...iB,checkEquality:!0};function rB(e,t){const n={...e};for(const i in t)t[i]!==void 0&&(n[i]=t[i]);return n}function cJe(e,t,n){const i=rB(iB,n);for(const r of e.values())if(r.parentId)aB(r,e,t,i);else{const s=eE(r,i.nodeOrigin),a=wb(r.extent)?r.extent:i.nodeExtent,l=Ob(s,a,qh(r));r.internals.positionAbsolute=l}}function uJe(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],i=[];for(const r of e.handles){const s={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(s):r.type==="target"&&i.push(s)}return{source:n,target:i}}function sB(e){return e==="manual"}function i6(e,t,n,i={}){var d,f;const r=rB(lJe,i),s={i:0},a=new Map(t),l=r!=null&&r.elevateNodesOnSelect&&!sB(r.zIndexMode)?$1e:0;let c=e.length>0,u=!1;t.clear(),n.clear();for(const h of e){let p=a.get(h.id);if(r.checkEquality&&h===(p==null?void 0:p.internals.userNode))t.set(h.id,p);else{const g=eE(h,r.nodeOrigin),b=wb(h.extent)?h.extent:r.nodeExtent,v=Ob(g,b,qh(h));p={...r.defaults,...h,measured:{width:(d=h.measured)==null?void 0:d.width,height:(f=h.measured)==null?void 0:f.height},internals:{positionAbsolute:v,handleBounds:uJe(h,p),z:F1e(h,l,r.zIndexMode),userNode:h}},t.set(h.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(c=!1),h.parentId&&aB(p,t,n,i,s),u||(u=h.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function dJe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function aB(e,t,n,i,r){const{elevateNodesOnSelect:s,nodeOrigin:a,nodeExtent:l,zIndexMode:c}=rB(iB,i),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}dJe(e,n),r&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++r.i,d.internals.z=d.internals.z+r.i*oJe),r&&d.internals.rootParentIndex!==void 0&&(r.i=d.internals.rootParentIndex);const f=s&&!sB(c)?$1e:0,{x:h,y:p,z:g}=fJe(e,d,a,l,f,c),{positionAbsolute:b}=e.internals,v=h!==b.x||p!==b.y;(v||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:h,y:p}:b,z:g}})}function F1e(e,t,n){const i=_u(e.zIndex)?e.zIndex:0;return sB(n)?i:i+(e.selected?t:0)}function fJe(e,t,n,i,r,s){const{x:a,y:l}=t.internals.positionAbsolute,c=qh(e),u=eE(e,n),d=wb(e.extent)?Ob(u,e.extent,c):u;let f=Ob({x:a+d.x,y:l+d.y},i,c);e.extent==="parent"&&(f=T1e(f,c,t));const h=F1e(e,r,s),p=t.internals.z??0;return{x:f.x,y:f.y,z:p>=h?p+1:h}}function oB(e,t,n,i=[0,0]){var a;const r=[],s=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const u=((a=s.get(l.parentId))==null?void 0:a.expandedRect)??qv(c),d=A1e(u,l.rect);s.set(l.parentId,{expandedRect:d,parent:c})}return s.size>0&&s.forEach(({expandedRect:l,parent:c},u)=>{var w;const d=c.internals.positionAbsolute,f=qh(c),h=c.origin??i,p=l.x0||g>0||y||x)&&(r.push({id:u,type:"position",position:{x:c.position.x-p+y,y:c.position.y-g+x}}),(w=n.get(u))==null||w.forEach(O=>{e.some(k=>k.id===O.id)||r.push({id:O.id,type:"position",position:{x:O.position.x+p,y:O.position.y+g}})})),(f.width0){const p=oB(h,t,n,r);u.push(...p)}return{changes:u,updatedInternals:c}}async function pJe({delta:e,panZoom:t,transform:n,translateExtent:i,width:r,height:s}){if(!t||!e.x&&!e.y)return!1;const a=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,s]],i);return!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2])}function QK(e,t,n,i,r,s){let a=r;const l=i.get(a)||new Map;i.set(a,l.set(n,t)),a=`${r}-${e}`;const c=i.get(a)||new Map;if(i.set(a,c.set(n,t)),s){a=`${r}-${e}-${s}`;const u=i.get(a)||new Map;i.set(a,u.set(n,t))}}function B1e(e,t,n){e.clear(),t.clear();for(const i of n){const{source:r,target:s,sourceHandle:a=null,targetHandle:l=null}=i,c={edgeId:i.id,source:r,target:s,sourceHandle:a,targetHandle:l},u=`${r}-${a}--${s}-${l}`,d=`${s}-${l}--${r}-${a}`;QK("source",c,d,e,r,a),QK("target",c,u,e,s,l),t.set(i.id,i)}}function U1e(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:U1e(n,t):!1}function zK(e,t,n){var r;let i=e;do{if((r=i==null?void 0:i.matches)!=null&&r.call(i,t))return!0;if(i===n)return!1;i=i==null?void 0:i.parentElement}while(i);return!1}function mJe(e,t,n,i){const r=new Map;for(const[s,a]of e)if((a.selected||a.id===i)&&(!a.parentId||!U1e(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){const l=e.get(s);l&&r.set(s,{id:s,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return r}function YD({nodeId:e,dragItems:t,nodeLookup:n,dragging:i=!0}){var a,l,c;const r=[];for(const[u,d]of t){const f=(a=n.get(u))==null?void 0:a.internals.userNode;f&&r.push({...f,position:d.position,dragging:i})}if(!e)return[r[0],r];const s=(l=n.get(e))==null?void 0:l.internals.userNode;return[s?{...s,position:((c=t.get(e))==null?void 0:c.position)||s.position,dragging:i}:r[0],r]}function gJe({dragItems:e,snapGrid:t,x:n,y:i}){const r=e.values().next().value;if(!r)return null;const s={x:n-r.distance.x,y:i-r.distance.y},a=nE(s,t);return{x:a.x-s.x,y:a.y-s.y}}function bJe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:i,onDragStop:r}){let s={x:null,y:null},a=0,l=new Map,c=!1,u={x:0,y:0},d=null,f=!1,h=null,p=!1,g=!1,b=null;function v({noDragClassName:x,handleSelector:w,domNode:O,isSelectable:k,nodeId:S,nodeClickDistance:E=0}){h=Gl(O);function C({x:T,y:L}){const{nodeLookup:A,nodeExtent:R,snapGrid:P,snapToGrid:$,nodeOrigin:M,onNodeDrag:B,onSelectionDrag:I,onError:H,updateNodePositions:X}=t();s={x:T,y:L};let Q=!1;const q=l.size>1,U=q&&R?t6(tE(l)):null,te=q&&$?gJe({dragItems:l,snapGrid:P,x:T,y:L}):null;for(const[le,oe]of l){if(!A.has(le))continue;let re={x:T-oe.distance.x,y:L-oe.distance.y};$&&(re=te?{x:Math.round(re.x+te.x),y:Math.round(re.y+te.y)}:nE(re,P));let he=null;if(q&&R&&!oe.extent&&U){const{positionAbsolute:se}=oe.internals,de=se.x-U.x+R[0][0],ke=se.x+oe.measured.width-U.x2+R[1][0],Te=se.y-U.y+R[0][1],rt=se.y+oe.measured.height-U.y2+R[1][1];he=[[de,Te],[ke,rt]]}const{position:K,positionAbsolute:G}=C1e({nodeId:le,nextPosition:re,nodeLookup:A,nodeExtent:he||R,nodeOrigin:M,onError:H});Q=Q||oe.position.x!==K.x||oe.position.y!==K.y,oe.position=K,oe.internals.positionAbsolute=G}if(g=g||Q,!!Q&&(X(l,!0),b&&(i||B||!S&&I))){const[le,oe]=YD({nodeId:S,dragItems:l,nodeLookup:A});i==null||i(b,l,le,oe),B==null||B(b,le,oe),S||I==null||I(b,oe)}}async function N(){if(!d)return;const{transform:T,panBy:L,autoPanSpeed:A,autoPanOnNodeDrag:R}=t();if(!R){c=!1,cancelAnimationFrame(a);return}const[P,$]=J7(u,d,A);(P!==0||$!==0)&&(s.x=(s.x??0)-P/T[2],s.y=(s.y??0)-$/T[2],await L({x:P,y:$})&&C(s)),a=requestAnimationFrame(N)}function _(T){var q;const{nodeLookup:L,multiSelectionActive:A,nodesDraggable:R,transform:P,snapGrid:$,snapToGrid:M,selectNodesOnDrag:B,onNodeDragStart:I,onSelectionDragStart:H,unselectNodesAndEdges:X}=t();f=!0,(!B||!k)&&!A&&S&&((q=L.get(S))!=null&&q.selected||X()),k&&B&&S&&(e==null||e(S));const Q=Sw(T.sourceEvent,{transform:P,snapGrid:$,snapToGrid:M,containerBounds:d});if(s=Q,l=mJe(L,R,Q,S),l.size>0&&(n||I||!S&&H)){const[U,te]=YD({nodeId:S,dragItems:l,nodeLookup:L});n==null||n(T.sourceEvent,l,U,te),I==null||I(T.sourceEvent,U,te),S||H==null||H(T.sourceEvent,te)}}const j=r1e().clickDistance(E).on("start",T=>{const{domNode:L,nodeDragThreshold:A,transform:R,snapGrid:P,snapToGrid:$}=t();d=(L==null?void 0:L.getBoundingClientRect())||null,p=!1,g=!1,b=T.sourceEvent,A===0&&_(T),s=Sw(T.sourceEvent,{transform:R,snapGrid:P,snapToGrid:$,containerBounds:d}),u=Nu(T.sourceEvent,d)}).on("drag",T=>{const{autoPanOnNodeDrag:L,transform:A,snapGrid:R,snapToGrid:P,nodeDragThreshold:$,nodeLookup:M}=t(),B=Sw(T.sourceEvent,{transform:A,snapGrid:R,snapToGrid:P,containerBounds:d});if(b=T.sourceEvent,(T.sourceEvent.type==="touchmove"&&T.sourceEvent.touches.length>1||S&&!M.has(S))&&(p=!0),!p){if(!c&&L&&f&&(c=!0,N()),!f){const I=Nu(T.sourceEvent,d),H=I.x-u.x,X=I.y-u.y;Math.sqrt(H*H+X*X)>$&&_(T)}(s.x!==B.xSnapped||s.y!==B.ySnapped)&&l&&f&&(u=Nu(T.sourceEvent,d),C(B))}}).on("end",T=>{if(!f||p){p&&l.size>0&&t().updateNodePositions(l,!1);return}if(c=!1,f=!1,cancelAnimationFrame(a),l.size>0){const{nodeLookup:L,updateNodePositions:A,onNodeDragStop:R,onSelectionDragStop:P}=t();if(g&&(A(l,!1),g=!1),r||R||!S&&P){const[$,M]=YD({nodeId:S,dragItems:l,nodeLookup:L,dragging:!1});r==null||r(T.sourceEvent,l,$,M),R==null||R(T.sourceEvent,$,M),S||P==null||P(T.sourceEvent,M)}}}).filter(T=>{const L=T.target;return!T.button&&(!x||!zK(L,`.${x}`,O))&&(!w||zK(L,w,O))});h.call(j)}function y(){h==null||h.on(".drag",null)}return{update:v,destroy:y}}function yJe(e,t,n){const i=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())jS(r,qv(s))>0&&i.push(s);return i}const vJe=250;function xJe(e,t,n,i){var l,c;let r=[],s=1/0;const a=yJe(e,n,t+vJe);for(const u of a){const d=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of d){if(i.nodeId===f.nodeId&&i.type===f.type&&i.id===f.id)continue;const{x:h,y:p}=Sb(u,f,f.position,!0),g=Math.sqrt(Math.pow(h-e.x,2)+Math.pow(p-e.y,2));g>t||(g1){const u=i.type==="source"?"target":"source";return r.find(d=>d.type===u)??r[0]}return r[0]}function Q1e(e,t,n,i,r,s=!1){var u,d,f;const a=i.get(e);if(!a)return null;const l=r==="strict"?(u=a.internals.handleBounds)==null?void 0:u[t]:[...((d=a.internals.handleBounds)==null?void 0:d.source)??[],...((f=a.internals.handleBounds)==null?void 0:f.target)??[]],c=(n?l==null?void 0:l.find(h=>h.id===n):l==null?void 0:l[0])??null;return c&&s?{...c,...Sb(a,c,c.position,!0)}:c}function z1e(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function OJe(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const V1e=()=>!0;function wJe(e,{connectionMode:t,connectionRadius:n,handleId:i,nodeId:r,edgeUpdaterType:s,isTarget:a,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:h,cancelConnection:p,onConnectStart:g,onConnect:b,onConnectEnd:v,isValidConnection:y=V1e,onReconnectEnd:x,updateConnection:w,getTransform:O,getFromHandle:k,autoPanSpeed:S,dragThreshold:E=1,handleDomNode:C}){const N=j1e(e.target);let _=0,j;const{x:T,y:L}=Nu(e),A=z1e(s,C),R=l==null?void 0:l.getBoundingClientRect();let P=!1;if(!R||!A)return;const $=Q1e(r,A,i,c,t);if(!$)return;let M=Nu(e,R),B=!1,I=null,H=!1,X=null;function Q(){if(!d||!R)return;const[K,G]=J7(M,R,S);h({x:K,y:G}),_=requestAnimationFrame(Q)}const q={...$,nodeId:r,type:A,position:$.position},U=c.get(r);let le={inProgress:!0,isValid:null,from:Sb(U,q,Xt.Left,!0),fromHandle:q,fromPosition:q.position,fromNode:U,to:M,toHandle:null,toPosition:jK[q.position],toNode:null,pointer:M};function oe(){P=!0,w(le),g==null||g(e,{nodeId:r,handleId:i,handleType:A})}E===0&&oe();function re(K){if(!P){const{x:rt,y:Be}=Nu(K),Me=rt-T,Ie=Be-L;if(!(Me*Me+Ie*Ie>E*E))return;oe()}if(!k()||!q){he(K);return}const G=O();M=Nu(K,R),j=xJe($x(M,G,!1,[1,1]),n,c,q),B||(Q(),B=!0);const se=H1e(K,{handle:j,connectionMode:t,fromNodeId:r,fromHandleId:i,fromType:a?"target":"source",isValidConnection:y,doc:N,lib:u,flowId:f,nodeLookup:c});X=se.handleDomNode,I=se.connection,H=OJe(!!j,se.isValid);const de=c.get(r),ke=de?Sb(de,q,Xt.Left,!0):le.from,Te={...le,from:ke,isValid:H,to:se.toHandle&&H?Wv({x:se.toHandle.x,y:se.toHandle.y},G):M,toHandle:se.toHandle,toPosition:H&&se.toHandle?se.toHandle.position:jK[q.position],toNode:se.toHandle?c.get(se.toHandle.nodeId):null,pointer:M};w(Te),le=Te}function he(K){if(!("touches"in K&&K.touches.length>0)){if(P){(j||X)&&I&&H&&(b==null||b(I));const{inProgress:G,...se}=le,de={...se,toPosition:le.toHandle?le.toPosition:null};v==null||v(K,de),s&&(x==null||x(K,de))}p(),cancelAnimationFrame(_),B=!1,H=!1,I=null,X=null,N.removeEventListener("mousemove",re),N.removeEventListener("mouseup",he),N.removeEventListener("touchmove",re),N.removeEventListener("touchend",he)}}N.addEventListener("mousemove",re),N.addEventListener("mouseup",he),N.addEventListener("touchmove",re),N.addEventListener("touchend",he)}function H1e(e,{handle:t,connectionMode:n,fromNodeId:i,fromHandleId:r,fromType:s,doc:a,lib:l,flowId:c,isValidConnection:u=V1e,nodeLookup:d}){const f=s==="target",h=t?a.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:p,y:g}=Nu(e),b=a.elementFromPoint(p,g),v=b!=null&&b.classList.contains(`${l}-flow__handle`)?b:h,y={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const x=z1e(void 0,v),w=v.getAttribute("data-nodeid"),O=v.getAttribute("data-handleid"),k=v.classList.contains("connectable"),S=v.classList.contains("connectableend");if(!w||!x)return y;const E={source:f?w:i,sourceHandle:f?O:r,target:f?i:w,targetHandle:f?r:O};y.connection=E;const N=k&&S&&(n===Vv.Strict?f&&x==="source"||!f&&x==="target":w!==i||O!==r);y.isValid=N&&u(E),y.toHandle=Q1e(w,x,O,d,n,!0)}return y}const r6={onPointerDown:wJe,isValid:H1e};function SJe({domNode:e,panZoom:t,getTransform:n,getViewScale:i}){const r=Gl(e);function s({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:h=!0,inversePan:p=!1}){const g=w=>{if(w.sourceEvent.type!=="wheel"||!t)return;const O=n(),k=w.sourceEvent.ctrlKey&&RS()?10:1,S=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*d,E=O[2]*Math.pow(2,S*k);t.scaleTo(E)};let b=[0,0];const v=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(b=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},y=w=>{const O=n();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!t)return;const k=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],S=[k[0]-b[0],k[1]-b[1]];b=k;const E=i()*Math.max(O[2],Math.log(O[2]))*(p?-1:1),C={x:O[0]-S[0]*E,y:O[1]-S[1]*E},N=[[0,0],[c,u]];t.setViewportConstrained({x:C.x,y:C.y,zoom:O[2]},N,l)},x=x1e().on("start",v).on("zoom",f?y:null).on("zoom.wheel",h?g:null);r.call(x,{})}function a(){r.on("zoom",null)}return{update:s,destroy:a,pointer:Su}}const TR=e=>({x:e.x,y:e.y,zoom:e.k}),ZD=({x:e,y:t,zoom:n})=>kR.translate(e,t).scale(n),Ty=(e,t)=>e.target.closest(`.${t}`),q1e=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),kJe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,JD=(e,t=0,n=kJe,i=()=>{})=>{const r=typeof t=="number"&&t>0;return r||i(),r?e.transition().duration(t).ease(n).on("end",i):e},W1e=e=>{const t=e.ctrlKey&&RS()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function EJe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:i,panOnScrollMode:r,panOnScrollSpeed:s,zoomOnPinch:a,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Ty(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(d.ctrlKey&&a){const v=Su(d),y=W1e(d),x=f*Math.pow(2,y);i.scaleTo(n,x,v,d);return}const h=d.deltaMode===1?20:1;let p=r===ib.Vertical?0:d.deltaX*h,g=r===ib.Horizontal?0:d.deltaY*h;!RS()&&d.shiftKey&&r!==ib.Vertical&&(p=d.deltaY*h,g=0),i.translateBy(n,-(p/f)*s,-(g/f)*s,{internal:!0});const b=TR(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(d,b),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(d,b))}}function CJe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(i,r){const s=i.type==="wheel",a=!t&&s&&!i.ctrlKey,l=Ty(i,e);if(i.ctrlKey&&s&&l&&i.preventDefault(),a||l)return null;i.preventDefault(),n.call(this,i,r)}}function TJe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return i=>{var s,a,l;if((s=i.sourceEvent)!=null&&s.internal)return;const r=TR(i.transform);e.mouseButton=((a=i.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=r,((l=i.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(i.sourceEvent,r))}}function AJe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:i,onPanZoom:r}){return s=>{var a,l;e.usedRightMouseButton=!!(n&&q1e(t,e.mouseButton??0)),(a=s.sourceEvent)!=null&&a.sync||i([s.transform.x,s.transform.y,s.transform.k]),r&&!((l=s.sourceEvent)!=null&&l.internal)&&(r==null||r(s.sourceEvent,TR(s.transform)))}}function _Je({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:i,onPanZoomEnd:r,onPaneContextMenu:s}){return a=>{var l;if(!((l=a.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,s&&q1e(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&s(a.sourceEvent),e.usedRightMouseButton=!1,i(!1),r)){const c=TR(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(a.sourceEvent,c)},n?150:0)}}}function NJe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:i,panOnScroll:r,zoomOnDoubleClick:s,userSelectionActive:a,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:d}){return f=>{var v;const h=e||t,p=n&&f.ctrlKey,g=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Ty(f,`${u}-flow__node`)||Ty(f,`${u}-flow__edge`)))return!0;if(!i&&!h&&!r&&!s&&!n||a||d&&!g||Ty(f,l)&&g||Ty(f,c)&&(!g||r&&g&&!e)||!n&&f.ctrlKey&&g)return!1;if(!n&&f.type==="touchstart"&&((v=f.touches)==null?void 0:v.length)>1)return f.preventDefault(),!1;if(!h&&!r&&!p&&g||!i&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(i)&&!i.includes(f.button)&&f.type==="mousedown")return!1;const b=Array.isArray(i)&&i.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||g)&&b}}function jJe({domNode:e,minZoom:t,maxZoom:n,translateExtent:i,viewport:r,onPanZoom:s,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=x1e().scaleExtent([t,n]).translateExtent(i),h=Gl(e).call(f);x({x:r.x,y:r.y,zoom:Hv(r.zoom,t,n)},[[0,0],[d.width,d.height]],i);const p=h.on("wheel.zoom"),g=h.on("dblclick.zoom");f.wheelDelta(W1e);async function b(j,T){return h?new Promise(L=>{f==null||f.interpolate((T==null?void 0:T.interpolate)==="linear"?ww:rA).transform(JD(h,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>L(!0)),j)}):!1}function v({noWheelClassName:j,noPanClassName:T,onPaneContextMenu:L,userSelectionActive:A,panOnScroll:R,panOnDrag:P,panOnScrollMode:$,panOnScrollSpeed:M,preventScrolling:B,zoomOnPinch:I,zoomOnScroll:H,zoomOnDoubleClick:X,zoomActivationKeyPressed:Q,lib:q,onTransformChange:U,connectionInProgress:te,paneClickDistance:le,selectionOnDrag:oe}){A&&!u.isZoomingOrPanning&&y();const re=R&&!Q&&!A;f.clickDistance(oe?1/0:!_u(le)||le<0?0:le);const he=re?EJe({zoomPanValues:u,noWheelClassName:j,d3Selection:h,d3Zoom:f,panOnScrollMode:$,panOnScrollSpeed:M,zoomOnPinch:I,onPanZoomStart:a,onPanZoom:s,onPanZoomEnd:l}):CJe({noWheelClassName:j,preventScrolling:B,d3ZoomHandler:p});h.on("wheel.zoom",he,{passive:!1});const K=TJe({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",K);const G=AJe({zoomPanValues:u,panOnDrag:P,onPaneContextMenu:!!L,onPanZoom:s,onTransformChange:U});f.on("zoom",G);const se=_Je({zoomPanValues:u,panOnDrag:P,panOnScroll:R,onPaneContextMenu:L,onPanZoomEnd:l,onDraggingChange:c});f.on("end",se);const de=NJe({zoomActivationKeyPressed:Q,panOnDrag:P,zoomOnScroll:H,panOnScroll:R,zoomOnDoubleClick:X,zoomOnPinch:I,userSelectionActive:A,noPanClassName:T,noWheelClassName:j,lib:q,connectionInProgress:te});f.filter(de),X?h.on("dblclick.zoom",g):h.on("dblclick.zoom",null)}function y(){f.on("zoom",null)}async function x(j,T,L){const A=ZD(j),R=f==null?void 0:f.constrain()(A,T,L);return R&&await b(R),R}async function w(j,T){const L=ZD(j);return await b(L,T),L}function O(j){if(h){const T=ZD(j),L=h.property("__zoom");(L.k!==j.zoom||L.x!==j.x||L.y!==j.y)&&(f==null||f.transform(h,T,null,{sync:!0}))}}function k(){const j=h?v1e(h.node()):{x:0,y:0,k:1};return{x:j.x,y:j.y,zoom:j.k}}async function S(j,T){return h?new Promise(L=>{f==null||f.interpolate((T==null?void 0:T.interpolate)==="linear"?ww:rA).scaleTo(JD(h,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>L(!0)),j)}):!1}async function E(j,T){return h?new Promise(L=>{f==null||f.interpolate((T==null?void 0:T.interpolate)==="linear"?ww:rA).scaleBy(JD(h,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>L(!0)),j)}):!1}function C(j){f==null||f.scaleExtent(j)}function N(j){f==null||f.translateExtent(j)}function _(j){const T=!_u(j)||j<0?0:j;f==null||f.clickDistance(T)}return{update:v,destroy:y,setViewport:w,setViewportConstrained:x,getViewport:k,scaleTo:S,scaleBy:E,setScaleExtent:C,setTranslateExtent:N,syncViewport:O,setClickDistance:_}}var Kv;(function(e){e.Line="line",e.Handle="handle"})(Kv||(Kv={}));function RJe({width:e,prevWidth:t,height:n,prevHeight:i,affectsX:r,affectsY:s}){const a=e-t,l=n-i,c=[a>0?1:a<0?-1:0,l>0?1:l<0?-1:0];return a&&r&&(c[0]=c[0]*-1),l&&s&&(c[1]=c[1]*-1),c}function VK(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),i=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:i,affectsY:r}}function hp(e,t){return Math.max(0,t-e)}function pp(e,t){return Math.max(0,e-t)}function pT(e,t,n){return Math.max(0,t-e,e-n)}function HK(e,t){return e?!t:t}function IJe(e,t,n,i,r,s,a,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:d,isVertical:f}=t,h=d&&f,{xSnapped:p,ySnapped:g}=n,{minWidth:b,maxWidth:v,minHeight:y,maxHeight:x}=i,{x:w,y:O,width:k,height:S,aspectRatio:E}=e;let C=Math.floor(d?p-e.pointerX:0),N=Math.floor(f?g-e.pointerY:0);const _=k+(c?-C:C),j=S+(u?-N:N),T=-s[0]*k,L=-s[1]*S;let A=pT(_,b,v),R=pT(j,y,x);if(a){let M=0,B=0;c&&C<0?M=hp(w+C+T,a[0][0]):!c&&C>0&&(M=pp(w+_+T,a[1][0])),u&&N<0?B=hp(O+N+L,a[0][1]):!u&&N>0&&(B=pp(O+j+L,a[1][1])),A=Math.max(A,M),R=Math.max(R,B)}if(l){let M=0,B=0;c&&C>0?M=pp(w+C,l[0][0]):!c&&C<0&&(M=hp(w+_,l[1][0])),u&&N>0?B=pp(O+N,l[0][1]):!u&&N<0&&(B=hp(O+j,l[1][1])),A=Math.max(A,M),R=Math.max(R,B)}if(r){if(d){const M=pT(_/E,y,x)*E;if(A=Math.max(A,M),a){let B=0;!c&&!u||c&&!u&&h?B=pp(O+L+_/E,a[1][1])*E:B=hp(O+L+(c?C:-C)/E,a[0][1])*E,A=Math.max(A,B)}if(l){let B=0;!c&&!u||c&&!u&&h?B=hp(O+_/E,l[1][1])*E:B=pp(O+(c?C:-C)/E,l[0][1])*E,A=Math.max(A,B)}}if(f){const M=pT(j*E,b,v)/E;if(R=Math.max(R,M),a){let B=0;!c&&!u||u&&!c&&h?B=pp(w+j*E+T,a[1][0])/E:B=hp(w+(u?N:-N)*E+T,a[0][0])/E,R=Math.max(R,B)}if(l){let B=0;!c&&!u||u&&!c&&h?B=hp(w+j*E,l[1][0])/E:B=pp(w+(u?N:-N)*E,l[0][0])/E,R=Math.max(R,B)}}}N=N+(N<0?R:-R),C=C+(C<0?A:-A),r&&(h?_>j*E?N=(HK(c,u)?-C:C)/E:C=(HK(c,u)?-N:N)*E:d?(N=C/E,u=c):(C=N*E,c=u));const P=c?w+C:w,$=u?O+N:O;return{width:k+(c?-C:C),height:S+(u?-N:N),x:s[0]*C*(c?-1:1)+P,y:s[1]*N*(u?-1:1)+$}}const K1e={width:0,height:0,x:0,y:0},PJe={...K1e,pointerX:0,pointerY:0,aspectRatio:1};function DJe(e,t,n){const i=t.position.x+e.position.x,r=t.position.y+e.position.y,s=e.measured.width??0,a=e.measured.height??0,l=n[0]*s,c=n[1]*a;return[[i-l,r-c],[i+s-l,r+a-c]]}function MJe({domNode:e,nodeId:t,getStoreItems:n,onChange:i,onEnd:r}){const s=Gl(e);let a={controlDirection:VK("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:h,onResizeStart:p,onResize:g,onResizeEnd:b,shouldResize:v}){let y={...K1e},x={...PJe};a={boundaries:d,resizeDirection:h,keepAspectRatio:f,controlDirection:VK(u)};let w,O=null,k=[],S,E,C,N=!1;const _=r1e().on("start",j=>{const{nodeLookup:T,transform:L,snapGrid:A,snapToGrid:R,nodeOrigin:P,paneDomNode:$}=n();if(w=T.get(t),!w)return;O=($==null?void 0:$.getBoundingClientRect())??null;const{xSnapped:M,ySnapped:B}=Sw(j.sourceEvent,{transform:L,snapGrid:A,snapToGrid:R,containerBounds:O});y={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},x={...y,pointerX:M,pointerY:B,aspectRatio:y.width/y.height},S=void 0,E=wb(w.extent)?w.extent:void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(S=T.get(w.parentId)),S&&w.extent==="parent"&&(E=[[0,0],[S.measured.width,S.measured.height]]),k=[],C=void 0;for(const[I,H]of T)if(H.parentId===t&&(k.push({id:I,position:{...H.position},extent:H.extent}),H.extent==="parent"||H.expandParent)){const X=DJe(H,w,H.origin??P);C?C=[[Math.min(X[0][0],C[0][0]),Math.min(X[0][1],C[0][1])],[Math.max(X[1][0],C[1][0]),Math.max(X[1][1],C[1][1])]]:C=X}p==null||p(j,{...y})}).on("drag",j=>{const{transform:T,snapGrid:L,snapToGrid:A,nodeOrigin:R}=n(),P=Sw(j.sourceEvent,{transform:T,snapGrid:L,snapToGrid:A,containerBounds:O}),$=[];if(!w)return;const{x:M,y:B,width:I,height:H}=y,X={},Q=w.origin??R,{width:q,height:U,x:te,y:le}=IJe(x,a.controlDirection,P,a.boundaries,a.keepAspectRatio,Q,E,C),oe=q!==I,re=U!==H,he=te!==M&&oe,K=le!==B&&re;if(!he&&!K&&!oe&&!re)return;if((he||K||Q[0]===1||Q[1]===1)&&(X.x=he?te:y.x,X.y=K?le:y.y,y.x=X.x,y.y=X.y,k.length>0)){const ke=te-M,Te=le-B;for(const rt of k)rt.position={x:rt.position.x-ke+Q[0]*(q-I),y:rt.position.y-Te+Q[1]*(U-H)},$.push(rt)}if((oe||re)&&(X.width=oe&&(!a.resizeDirection||a.resizeDirection==="horizontal")?q:y.width,X.height=re&&(!a.resizeDirection||a.resizeDirection==="vertical")?U:y.height,y.width=X.width,y.height=X.height),S&&w.expandParent){const ke=Q[0]*(X.width??0);X.x&&X.x{N&&(b==null||b(j,{...y}),r==null||r({...y}),N=!1)});s.call(_)}function c(){s.on(".drag",null)}return{update:l,destroy:c}}var G1e={exports:{}},X1e={};/** +`)},oze=0,T0=[];function lze(e){var t=m.useRef([]),n=m.useRef([0,0]),i=m.useRef(),r=m.useState(oze++)[0],s=m.useState(sve)[0],a=m.useRef(e);m.useEffect(function(){a.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var b=_Qe([e.lockRef.current],(e.shards||[]).map(zW),!0).filter(Boolean);return b.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),b.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=m.useCallback(function(b,v){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var y=JC(b),x=n.current,w="deltaX"in b?b.deltaX:x[0]-y[0],O="deltaY"in b?b.deltaY:x[1]-y[1],k,S=b.target,E=Math.abs(w)>Math.abs(O)?"h":"v";if("touches"in b&&E==="h"&&S.type==="range")return!1;var C=window.getSelection(),N=C&&C.anchorNode,_=N?N===S||N.contains(S):!1;if(_)return!1;var j=UW(E,S);if(!j)return!0;if(j?k=E:(k=E==="v"?"h":"v",j=UW(E,S)),!j)return!1;if(!i.current&&"changedTouches"in b&&(w||O)&&(i.current=k),!k)return!0;var T=i.current||k;return rze(T,v,b,T==="h"?w:O)},[]),c=m.useCallback(function(b){var v=b;if(!(!T0.length||T0[T0.length-1]!==s)){var y="deltaY"in v?QW(v):JC(v),x=t.current.filter(function(k){return k.name===v.type&&(k.target===v.target||v.target===k.shadowParent)&&sze(k.delta,y)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var w=(a.current.shards||[]).map(zW).filter(Boolean).filter(function(k){return k.contains(v.target)}),O=w.length>0?l(v,w[0]):!a.current.noIsolation;O&&v.cancelable&&v.preventDefault()}}},[]),u=m.useCallback(function(b,v,y,x){var w={name:b,delta:v,target:y,should:x,shadowParent:cze(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(O){return O!==w})},1)},[]),d=m.useCallback(function(b){n.current=JC(b),i.current=void 0},[]),f=m.useCallback(function(b){u(b.type,QW(b),b.target,l(b,e.lockRef.current))},[]),h=m.useCallback(function(b){u(b.type,JC(b),b.target,l(b,e.lockRef.current))},[]);m.useEffect(function(){return T0.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",c,C0),document.addEventListener("touchmove",c,C0),document.addEventListener("touchstart",d,C0),function(){T0=T0.filter(function(b){return b!==s}),document.removeEventListener("wheel",c,C0),document.removeEventListener("touchmove",c,C0),document.removeEventListener("touchstart",d,C0)}},[]);var p=e.removeScrollBar,g=e.inert;return m.createElement(m.Fragment,null,g?m.createElement(s,{styles:aze(r)}):null,p?m.createElement(YQe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function cze(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const uze=$Qe(rve,lze);var u7=m.forwardRef(function(e,t){return m.createElement(nR,xd({},e,{ref:t,sideCar:uze}))});u7.classNames=nR.classNames;var dze=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},A0=new WeakMap,eT=new WeakMap,tT={},$D=0,cve=function(e){return e&&(e.host||cve(e.parentNode))},fze=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=cve(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},hze=function(e,t,n,i){var r=fze(t,Array.isArray(e)?e:[e]);tT[n]||(tT[n]=new WeakMap);var s=tT[n],a=[],l=new Set,c=new Set(r),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(h){if(l.has(h))d(h);else try{var p=h.getAttribute(i),g=p!==null&&p!=="false",b=(A0.get(h)||0)+1,v=(s.get(h)||0)+1;A0.set(h,b),s.set(h,v),a.push(h),b===1&&g&&eT.set(h,!0),v===1&&h.setAttribute(n,"true"),g||h.setAttribute(i,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(t),l.clear(),$D++,function(){a.forEach(function(f){var h=A0.get(f)-1,p=s.get(f)-1;A0.set(f,h),s.set(f,p),h||(eT.has(f)||f.removeAttribute(i),eT.delete(f)),p||f.removeAttribute(n)}),$D--,$D||(A0=new WeakMap,A0=new WeakMap,eT=new WeakMap,tT={})}},uve=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=dze(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),hze(i,r,n,"aria-hidden")):function(){return null}},pze=Object.defineProperty,mze=(e,t)=>pze(e,"name",{value:t,configurable:!0});function zk(e){const[t,n]=m.useState(void 0);return Zc(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}mze(zk,"useSize");var gze=Object.defineProperty,Ch=(e,t)=>gze(e,"name",{value:t,configurable:!0}),d7="Checkbox",[bze,jVt]=wl(d7),[yze,f7]=bze(d7);function dve(e){const{__scopeCheckbox:t,checked:n,children:i,defaultChecked:r,disabled:s,form:a,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,p]=ru({prop:n,defaultProp:r??!1,onChange:c,caller:d7}),[g,b]=m.useState(null),[v,y]=m.useState(null),x=m.useRef(!1),[w,O]=m.useReducer(E=>E+1,0),k=g?!!a||!!g.closest("form"):!0,S={checked:h,disabled:s,setChecked:p,control:g,setControl:b,name:l,form:a,value:d,hasConsumerStoppedPropagationRef:x,userInteractionCount:w,onUserInteraction:O,required:u,defaultChecked:ah(r)?!1:r,isFormControl:k,bubbleInput:v,setBubbleInput:y};return o.jsx(yze,{scope:t,...S,children:fve(f)?f(S):i})}Ch(dve,"CheckboxProvider");var vze="CheckboxTrigger",xze=m.forwardRef(Ch(function({__scopeCheckbox:t,onKeyDown:n,onClick:i,...r},s){const{control:a,value:l,disabled:c,checked:u,required:d,setControl:f,setChecked:h,hasConsumerStoppedPropagationRef:p,onUserInteraction:g,isFormControl:b,bubbleInput:v}=f7(vze,t),y=ir(s,f),x=m.useRef(u);return m.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const O=Ch(()=>h(x.current),"reset");return w.addEventListener("reset",O),()=>w.removeEventListener("reset",O)}},[a,h]),o.jsx(wr.button,{type:"button",role:"checkbox","aria-checked":ah(u)?"mixed":u,"aria-required":d,"data-state":h7(u),"data-disabled":c?"":void 0,disabled:c,value:l,...r,ref:y,onKeyDown:gn(n,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:gn(i,w=>{g(),h(O=>ah(O)?!0:!O),v&&b&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})},"CheckboxTrigger")),Oze=m.forwardRef(Ch(function(t,n){const{__scopeCheckbox:i,name:r,checked:s,defaultChecked:a,required:l,disabled:c,value:u,onCheckedChange:d,form:f,...h}=t;return o.jsx(dve,{__scopeCheckbox:i,checked:s,defaultChecked:a,disabled:c,required:l,onCheckedChange:d,name:r,form:f,value:u,internal_do_not_use_render:({isFormControl:p})=>o.jsxs(o.Fragment,{children:[o.jsx(xze,{...h,ref:n,__scopeCheckbox:i}),p&&o.jsx(Eze,{__scopeCheckbox:i})]})})},"Checkbox")),wze="CheckboxIndicator",Sze=m.forwardRef(Ch(function(t,n){const{__scopeCheckbox:i,forceMount:r,...s}=t,a=f7(wze,i);return o.jsx(Xd,{present:r||ah(a.checked)||a.checked===!0,children:o.jsx(wr.span,{"data-state":h7(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:n,style:{pointerEvents:"none",...t.style}})})},"CheckboxIndicator")),kze="CheckboxBubbleInput",Eze=m.forwardRef(Ch(function({__scopeCheckbox:t,onClick:n,...i},r){const{control:s,hasConsumerStoppedPropagationRef:a,userInteractionCount:l,checked:c,defaultChecked:u,required:d,disabled:f,name:h,value:p,form:g,bubbleInput:b,setBubbleInput:v}=f7(kze,t),y=ir(r,v),x=zk(s),w=m.useRef(!1),O=m.useRef(c),k=m.useRef(l);m.useEffect(()=>{const E=b;if(!E)return;const C=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(C,"checked").set,j=l!==k.current;k.current=l;const T=O.current!==c;O.current=c;const L=!(j&&a.current);if(T&&_){w.current=!j;const A=new Event("click",{bubbles:L});E.indeterminate=ah(c),_.call(E,ah(c)?!1:c),E.dispatchEvent(A),w.current=!1}},[b,c,a,l]);const S=m.useRef(ah(c)?!1:c);return o.jsx(wr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??S.current,required:d,disabled:f,name:h,value:p,form:g,...i,tabIndex:-1,ref:y,onClick:gn(n,E=>{w.current&&E.stopPropagation()}),style:{...i.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function fve(e){return typeof e=="function"}Ch(fve,"isFunction");function ah(e){return e==="indeterminate"}Ch(ah,"isIndeterminate");function h7(e){return ah(e)?"indeterminate":e?"checked":"unchecked"}Ch(h7,"getState");const Cze=["top","right","bottom","left"],gm=Math.min,oh=Math.max,j_=Math.round,nT=Math.floor,lh=e=>({x:e,y:e}),Tze={left:"right",right:"left",bottom:"top",top:"bottom"};function hve(e,t,n){return oh(e,gm(t,n))}function Th(e,t){return typeof e=="function"?e(t):e}function bm(e){return e.split("-")[0]}function Tx(e){return e.split("-")[1]}function p7(e){return e==="x"?"y":"x"}function m7(e){return e==="y"?"height":"width"}function Ad(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function g7(e){return p7(Ad(e))}function Aze(e,t,n){n===void 0&&(n=!1);const i=Tx(e),r=g7(e),s=m7(r);let a=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=R_(a)),[a,R_(a)]}function _ze(e){const t=R_(e);return[$4(e),t,$4(t)]}function $4(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const VW=["left","right"],HW=["right","left"],Nze=["top","bottom"],jze=["bottom","top"];function Rze(e,t,n){switch(e){case"top":case"bottom":return n?t?HW:VW:t?VW:HW;case"left":case"right":return t?Nze:jze;default:return[]}}function Ize(e,t,n,i){const r=Tx(e);let s=Rze(bm(e),n==="start",i);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map($4)))),s}function R_(e){const t=bm(e);return Tze[t]+e.slice(t.length)}function Pze(e){var t,n,i,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(i=e.bottom)!=null?i:0,left:(r=e.left)!=null?r:0}}function pve(e){return typeof e!="number"?Pze(e):{top:e,right:e,bottom:e,left:e}}function I_(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function qW(e,t,n){let{reference:i,floating:r}=e;const s=Ad(t),a=g7(t),l=m7(a),c=bm(t),u=s==="y",d=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,h=i[l]/2-r[l]/2;let p;switch(c){case"top":p={x:d,y:i.y-r.height};break;case"bottom":p={x:d,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:f};break;case"left":p={x:i.x-r.width,y:f};break;default:p={x:i.x,y:i.y}}const g=Tx(t);return g&&(p[a]+=h*(g==="end"?1:-1)*(n&&u?-1:1)),p}async function Dze(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Th(t,e),g=pve(p),v=l[h?f==="floating"?"reference":"floating":f],y=I_(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),x=f==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),O=await(s.isElement==null?void 0:s.isElement(w))&&await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1},k=I_(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(y.top-k.top+g.top)/O.y,bottom:(k.bottom-y.bottom+g.bottom)/O.y,left:(y.left-k.left+g.left)/O.x,right:(k.right-y.right+g.right)/O.x}}const Mze=50,Lze=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:Dze},c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=qW(u,i,c),h=i,p=0;const g={};for(let b=0;b({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:s,platform:a,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Th(e,t)||{};if(u==null)return{};const f=pve(d),h={x:n,y:i},p=g7(r),g=m7(p),b=await a.getDimensions(u),v=p==="y",y=v?"top":"left",x=v?"bottom":"right",w=v?"clientHeight":"clientWidth",O=s.reference[g]+s.reference[p]-h[p]-s.floating[g],k=h[p]-s.reference[p],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=S?S[w]:0;(!E||!await(a.isElement==null?void 0:a.isElement(S)))&&(E=l.floating[w]||s.floating[g]);const C=O/2-k/2,N=E/2-b[g]/2-1,_=gm(f[y],N),j=gm(f[x],N),T=E-b[g]-j,L=E/2-b[g]/2+C,A=hve(_,L,T),R=!c.arrow&&Tx(r)!=null&&L!==A&&s.reference[g]/2-(L<_?_:j)-b[g]/2<0,P=R?L<_?L-_:L-T:0;return{[p]:h[p]+P,data:{[p]:A,centerOffset:L-A-P,...R&&{alignmentOffset:P}},reset:R}}}),Fze=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...v}=Th(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=bm(r),x=Ad(l),w=bm(l)===l,O=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=h||(w||!b?[R_(l)]:_ze(l)),S=g!=="none";!h&&S&&k.push(...Ize(l,b,g,O));const E=[l,...k],C=await c.detectOverflow(t,v),N=[];let _=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&N.push(C[y]),f){const A=Aze(r,a,O);N.push(C[A[0]],C[A[1]])}if(_=[..._,{placement:r,overflows:N}],!N.every(A=>A<=0)){var j,T;const A=(((j=s.flip)==null?void 0:j.index)||0)+1,R=E[A];if(R&&(!(f==="alignment"?x!==Ad(R):!1)||_.every(M=>Ad(M.placement)===x?M.overflows[0]>0:!0)))return{data:{index:A,overflows:_},reset:{placement:R}};let P=(T=_.filter($=>$.overflows[0]<=0).sort(($,M)=>$.overflows[1]-M.overflows[1])[0])==null?void 0:T.placement;if(!P)switch(p){case"bestFit":{var L;const $=(L=_.filter(M=>{if(S){const B=Ad(M.placement);return B===x||B==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(B=>B>0).reduce((B,I)=>B+I,0)]).sort((M,B)=>M[1]-B[1])[0])==null?void 0:L[0];$&&(P=$);break}case"initialPlacement":P=l;break}if(r!==P)return{reset:{placement:P}}}return{}}}};function WW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function KW(e){return Cze.some(t=>e[t]>=0)}const Bze=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:r="referenceHidden",...s}=Th(e,t);switch(r){case"referenceHidden":{const a=await i.detectOverflow(t,{...s,elementContext:"reference"}),l=WW(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:KW(l)}}}case"escaped":{const a=await i.detectOverflow(t,{...s,altBoundary:!0}),l=WW(a,n.floating);return{data:{escapedOffsets:l,escaped:KW(l)}}}default:return{}}}}},mve=new Set(["left","top"]);async function Uze(e,t){const{placement:n,platform:i,elements:r}=e,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),a=bm(n),l=Tx(n),c=Ad(n)==="y",u=mve.has(a)?-1:1,d=s&&c?-1:1,f=Th(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Qze=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:s,placement:a,middlewareData:l}=t,c=await Uze(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:a}}}}},zze=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r,platform:s}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:x=>{let{x:w,y:O}=x;return{x:w,y:O}}},...u}=Th(e,t),d={x:n,y:i},f=await s.detectOverflow(t,u),h=Ad(r),p=p7(h);let g=d[p],b=d[h];const v=(x,w)=>hve(w+f[x==="y"?"top":"left"],w,w-f[x==="y"?"bottom":"right"]);a&&(g=v(p,g)),l&&(b=v(h,b));const y=c.fn({...t,[p]:g,[h]:b});return{...y,data:{x:y.x-n,y:y.y-i,enabled:{[p]:a,[h]:l}}}}}},Vze=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,i;const{x:r,y:s,placement:a,rects:l,middlewareData:c}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Th(e,t),h={x:r,y:s},p=Ad(a),g=p7(p);let b=h[g],v=h[p];const y=Th(u,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:(n=y.mainAxis)!=null?n:0,crossAxis:(i=y.crossAxis)!=null?i:0};if(d){const k=g==="y"?"height":"width",S=l.reference[g]-l.floating[k]+x.mainAxis,E=l.reference[g]+l.reference[k]-x.mainAxis;bE&&(b=E)}if(f){var w,O;const k=g==="y"?"width":"height",S=mve.has(bm(a)),E=l.reference[p]-l.floating[k]+(S&&((w=c.offset)==null?void 0:w[p])||0)+(S?0:x.crossAxis),C=l.reference[p]+l.reference[k]+(S?0:((O=c.offset)==null?void 0:O[p])||0)-(S?x.crossAxis:0);vC&&(v=C)}return{[g]:b,[p]:v}}}},Hze=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:i,platform:r,elements:s}=t,{apply:a=()=>{},...l}=Th(e,t),c=await r.detectOverflow(t,l),u=bm(n),d=Tx(n),f=Ad(n)==="y",{width:h,height:p}=i.floating;let g,b;u==="top"||u==="bottom"?(g=u,b=d===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(b=u,g=d==="end"?"top":"bottom");const v=p-c.top-c.bottom,y=h-c.left-c.right,x=gm(p-c[g],v),w=gm(h-c[b],y),O=t.middlewareData.shift,k=!O;let S=x,E=w;O!=null&&O.enabled.x&&(E=y),O!=null&&O.enabled.y&&(S=v),k&&!d&&(f?E=h-2*oh(c.left,c.right):S=p-2*oh(c.top,c.bottom)),await a({...t,availableWidth:E,availableHeight:S});const C=await r.getDimensions(s.floating);return h!==C.width||p!==C.height?{reset:{rects:!0}}:{}}}};function iR(){return typeof window<"u"}function Ax(e){return gve(e)?(e.nodeName||"").toLowerCase():"#document"}function po(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bh(e){var t;return(t=(gve(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gve(e){return iR()?e instanceof Node||e instanceof po(e).Node:!1}function Qd(e){return iR()?e instanceof Element||e instanceof po(e).Element:!1}function Yd(e){return iR()?e instanceof HTMLElement||e instanceof po(e).HTMLElement:!1}function GW(e){return!iR()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof po(e).ShadowRoot}function rR(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=zd(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&r!=="inline"&&r!=="contents"}function qze(e){return/^(table|td|th)$/.test(Ax(e))}function sR(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Wze=/transform|translate|scale|rotate|perspective|filter/,Kze=/paint|layout|strict|content/,eg=e=>!!e&&e!=="none";let FD;function b7(e){const t=Qd(e)?zd(e):e;return eg(t.transform)||eg(t.translate)||eg(t.scale)||eg(t.rotate)||eg(t.perspective)||!y7()&&(eg(t.backdropFilter)||eg(t.filter))||Wze.test(t.willChange||"")||Kze.test(t.contain||"")}function Gze(e){let t=pb(e);for(;Yd(t)&&!mS(t);){if(b7(t))return t;if(sR(t))return null;t=pb(t)}return null}function y7(){return FD==null&&(FD=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),FD}function mS(e){return/^(html|body|#document)$/.test(Ax(e))}function zd(e){return po(e).getComputedStyle(e)}function aR(e){return Qd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pb(e){if(Ax(e)==="html")return e;const t=e.assignedSlot||e.parentNode||GW(e)&&e.host||Bh(e);return GW(t)?t.host:t}function bve(e){const t=pb(e);return mS(t)?(e.ownerDocument||e).body:Yd(t)&&rR(t)?t:bve(t)}function gS(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=bve(e),s=r===((i=e.ownerDocument)==null?void 0:i.body),a=po(r);if(s){const l=F4(a);return t.concat(a,a.visualViewport||[],rR(r)?r:[],l&&n?gS(l):[])}else return t.concat(r,gS(r,[],n))}function F4(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yve(e){const t=zd(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=Yd(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:i,l=j_(n)!==s||j_(i)!==a;return l&&(n=s,i=a),{width:n,height:i,$:l}}function v7(e){return Qd(e)?e:e.contextElement}function Ky(e){const t=v7(e);if(!Yd(t))return lh(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:s}=yve(t);let a=(s?j_(n.width):n.width)/i,l=(s?j_(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const Xze=lh(0);function vve(e){const t=po(e);return!y7()||!t.visualViewport?Xze:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yze(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===po(e)}function mb(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=v7(e);let a=lh(1);t&&(i?Qd(i)&&(a=Ky(i)):a=Ky(e));const l=Yze(s,n,i)?vve(s):lh(0);let c=(r.left+l.x)/a.x,u=(r.top+l.y)/a.y,d=r.width/a.x,f=r.height/a.y;if(s&&i){const h=po(s),p=Qd(i)?po(i):i;let g=h,b=F4(g);for(;b&&p!==g;){const v=Ky(b),y=b.getBoundingClientRect(),x=zd(b),w=y.left+(b.clientLeft+parseFloat(x.paddingLeft))*v.x,O=y.top+(b.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,f*=v.y,c+=w,u+=O,g=po(b),b=F4(g)}}return I_({width:d,height:f,x:c,y:u})}function oR(e,t){const n=aR(e).scrollLeft;return t?t.left+n:mb(Bh(e)).left+n}function xve(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-oR(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function Zze(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const s=r==="fixed",a=Bh(i),l=t?sR(t.floating):!1;if(i===a||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=lh(1);const d=lh(0),f=Yd(i);if((f||!s)&&((Ax(i)!=="body"||rR(a))&&(c=aR(i)),f)){const p=mb(i);u=Ky(i),d.x=p.x+i.clientLeft,d.y=p.y+i.clientTop}const h=a&&!f&&!s?xve(a,c):lh(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}}function Jze(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function eVe(e){const t=aR(e),n=e.ownerDocument.body,i=oh(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=oh(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+oR(e);const a=-t.scrollTop;return zd(n).direction==="rtl"&&(s+=oh(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:a}}const tVe=25;function nVe(e,t,n){n===void 0&&(n="viewport");const i=n==="layoutViewport",r=po(e),s=Bh(e),a=r.visualViewport;let l=s.clientWidth,c=s.clientHeight,u=0,d=0;if(a){const h=!y7()||t==="fixed";i?h||(u=-a.offsetLeft,d=-a.offsetTop):(l=a.width,c=a.height,h&&(u=a.offsetLeft,d=a.offsetTop))}if(oR(s)<=0){const h=s.ownerDocument,p=h.body,g=getComputedStyle(p),b=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,v=Math.abs(s.clientWidth-p.clientWidth-b),y=getComputedStyle(s).scrollbarGutter==="stable both-edges"?v/2:v;y<=tVe&&(l-=y)}return{width:l,height:c,x:u,y:d}}function iVe(e,t){const n=mb(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,s=Ky(e),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=r*s.x,u=i*s.y;return{width:a,height:l,x:c,y:u}}function XW(e,t,n){let i;if(t==="viewport"||t==="layoutViewport")i=nVe(e,n,t);else if(t==="document")i=eVe(Bh(e));else if(Qd(t))i=iVe(t,n);else{const r=vve(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return I_(i)}function rVe(e,t){const n=t.get(e);if(n)return n;let i=gS(e,[],!1).filter(l=>Qd(l)&&Ax(l)!=="body"),r=null;const s=zd(e).position==="fixed";let a=s?pb(e):e;for(;Qd(a)&&!mS(a);){const l=zd(a),c=b7(a),u=r?r.position:s?"fixed":"";!c&&(u==="fixed"||u==="absolute"&&l.position==="static")?i=i.filter(f=>f!==a):r=l,a=pb(a)}return t.set(e,i),i}function sVe(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const a=[...n==="clippingAncestors"?sR(t)?[]:rVe(t,this._c):[].concat(n),i],l=XW(t,a[0],r);let c=l.top,u=l.right,d=l.bottom,f=l.left;for(let h=1;h{l(!1,1e-7)},1e3)}E=!1}try{i=new IntersectionObserver(C,{...S,root:s.ownerDocument})}catch{i=new IntersectionObserver(C,S)}i.observe(e)}const c=po(e),u=()=>l(n);return c.addEventListener("resize",u),l(!0),()=>{c.removeEventListener("resize",u),a()}}function fVe(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,u=v7(e),d=r||s?[...u?gS(u):[],...t?gS(t):[]]:[];d.forEach(y=>{r&&y.addEventListener("scroll",n),s&&y.addEventListener("resize",n)});const f=u&&l?dVe(u,n,s):null;let h=-1,p=null;a&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),u&&!c&&p.observe(u),t&&p.observe(t));let g,b=c?mb(e):null;c&&v();function v(){const y=mb(e);b&&!wve(b,y)&&n(),b=y,g=requestAnimationFrame(v)}return n(),()=>{var y;d.forEach(x=>{r&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const hVe=Qze,pVe=zze,mVe=Fze,gVe=Hze,bVe=Bze,ZW=$ze,yVe=Vze,vVe=(e,t,n)=>{const i=new Map,r=n??{},s={...uVe,...r.platform,_c:i};return Lze(e,t,{...r,platform:s})};var xVe=typeof document<"u",OVe=function(){},J2=xVe?m.useLayoutEffect:OVe;function P_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!P_(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!(s==="_owner"&&e.$$typeof)&&!P_(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Sve(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JW(e,t){const n=Sve(e);return Math.round(t*n)/n}function UD(e){const t=m.useRef(e);return J2(()=>{t.current=e}),t}function wVe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=m.useState(i);P_(h,i)||p(i);const[g,b]=m.useState(null),[v,y]=m.useState(null),x=m.useCallback(M=>{M!==S.current&&(S.current=M,b(M))},[]),w=m.useCallback(M=>{M!==E.current&&(E.current=M,y(M))},[]),O=s||g,k=a||v,S=m.useRef(null),E=m.useRef(null),C=m.useRef(d),N=c!=null,_=UD(c),j=UD(r),T=UD(u),L=m.useCallback(()=>{if(!S.current||!E.current)return;const M={placement:t,strategy:n,middleware:h};j.current&&(M.platform=j.current),vVe(S.current,E.current,M).then(B=>{const I={...B,isPositioned:T.current!==!1};A.current&&!P_(C.current,I)&&(C.current=I,$i.flushSync(()=>{f(I)}))})},[h,t,n,j,T]);J2(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[u]);const A=m.useRef(!1);J2(()=>(A.current=!0,()=>{A.current=!1}),[]),J2(()=>{if(O&&(S.current=O),k&&(E.current=k),O&&k){if(_.current)return _.current(O,k,L);L()}},[O,k,L,_,N]);const R=m.useMemo(()=>({reference:S,floating:E,setReference:x,setFloating:w}),[x,w]),P=m.useMemo(()=>({reference:O,floating:k}),[O,k]),$=m.useMemo(()=>{const M={position:n,left:0,top:0};if(!P.floating)return M;const B=JW(P.floating,d.x),I=JW(P.floating,d.y);return l?{...M,transform:"translate("+B+"px, "+I+"px)",...Sve(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:I}},[n,l,P.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:L,refs:R,elements:P,floatingStyles:$}),[d,L,R,P,$])}const SVe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:r}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?ZW({element:i.current,padding:r}).fn(n):{}:i?ZW({element:i,padding:r}).fn(n):{}}}},kVe=(e,t)=>{const n=hVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},EVe=(e,t)=>{const n=pVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},CVe=(e,t)=>({fn:yVe(e).fn,options:[e,t]}),TVe=(e,t)=>{const n=mVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},AVe=(e,t)=>{const n=gVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},_Ve=(e,t)=>{const n=bVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},NVe=(e,t)=>{const n=SVe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var jVe=Object.defineProperty,em=(e,t)=>jVe(e,"name",{value:t,configurable:!0}),kve="Popper",[Eve,_x]=wl(kve),[RVe,Cve]=Eve(kve),IVe=em(e=>{const{__scopePopper:t,children:n}=e,[i,r]=m.useState(null),[s,a]=m.useState(void 0);return o.jsx(RVe,{scope:t,anchor:i,onAnchorChange:r,placementState:s,setPlacementState:a,children:n})},"Popper"),PVe="PopperAnchor",DVe=m.forwardRef(em(function(t,n){const{__scopePopper:i,virtualRef:r,...s}=t,a=Cve(PVe,i),l=m.useRef(null),c=a.onAnchorChange,u=m.useCallback(b=>{l.current=b,b&&c(b)},[c]),d=ir(n,u),f=m.useRef(null);m.useEffect(()=>{if(!r)return;const b=f.current;f.current=r.current,b!==f.current&&c(f.current)});const h=a.placementState&&lR(a.placementState),p=h==null?void 0:h[0],g=h==null?void 0:h[1];return r?null:o.jsx(wr.div,{"data-radix-popper-side":p,"data-radix-popper-align":g,...s,ref:d})},"PopperAnchor")),Tve="PopperContent",[MVe,RVt]=Eve(Tve),LVe=m.forwardRef(em(function(t,n){var re,pe,K,G,se,fe,Se;const{__scopePopper:i,side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:b,...v}=t,y=Cve(Tve,i),[x,w]=m.useState(null),O=ir(n,w),[k,S]=m.useState(null),E=zk(k),C=(E==null?void 0:E.width)??0,N=(E==null?void 0:E.height)??0,_=r+(a!=="center"?"-"+a:""),j=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},T=Array.isArray(d)?d:[d],L=T.length>0,A={padding:j,boundary:T.filter(Ave),altBoundary:L},{refs:R,floatingStyles:P,placement:$,isPositioned:M,middlewareData:B}=wVe({strategy:"fixed",placement:_,whileElementsMounted:em((...Te)=>fVe(...Te,{animationFrame:g==="always"}),"whileElementsMounted"),elements:{reference:y.anchor},middleware:[kVe({mainAxis:s+N,alignmentAxis:l}),u&&EVe({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?CVe():void 0,...A}),u&&TVe({...A}),AVe({...A,apply:em(({elements:Te,rects:rt,availableWidth:Be,availableHeight:Me})=>{const{width:Ie,height:qe}=rt.reference,Pe=Te.floating.style;Pe.setProperty("--radix-popper-available-width",`${Be}px`),Pe.setProperty("--radix-popper-available-height",`${Me}px`),Pe.setProperty("--radix-popper-anchor-width",`${Ie}px`),Pe.setProperty("--radix-popper-anchor-height",`${qe}px`)},"apply")}),k&&NVe({element:k,padding:c}),$Ve({arrowWidth:C,arrowHeight:N}),p&&_Ve({strategy:"referenceHidden",...A,boundary:L?A.boundary:void 0})]}),I=y.setPlacementState;Zc(()=>(I($),()=>{I(void 0)}),[$,I]);const[H,X]=lR($),Q=$u(b);Zc(()=>{M&&(Q==null||Q())},[M,Q]);const q=(re=B.arrow)==null?void 0:re.x,U=(pe=B.arrow)==null?void 0:pe.y,te=((K=B.arrow)==null?void 0:K.centerOffset)!==0,[le,oe]=m.useState();return Zc(()=>{x&&oe(window.getComputedStyle(x).zIndex)},[x]),o.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:M?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[(G=B.transformOrigin)==null?void 0:G.x,(se=B.transformOrigin)==null?void 0:se.y].join(" "),...((fe=B.hide)==null?void 0:fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:o.jsx(MVe,{scope:i,placedSide:H,placedAlign:X,onArrowChange:S,arrowX:q,arrowY:U,shouldHideArrow:te,children:o.jsx(wr.div,{"data-side":H,"data-align":X,...v,ref:O,style:{...v.style,animation:M?(Se=v.style)==null?void 0:Se.animation:"none"}})})})},"PopperContent"));function Ave(e){return e!==null}em(Ave,"isNotNull");var $Ve=em(e=>({name:"transformOrigin",options:e,fn(t){var v,y,x;const{placement:n,rects:i,middlewareData:r}=t,a=((v=r.arrow)==null?void 0:v.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=lR(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((y=r.arrow)==null?void 0:y.x)??0)+l/2,p=(((x=r.arrow)==null?void 0:x.y)??0)+c/2;let g="",b="";return u==="bottom"?(g=a?f:`${h}px`,b=`${-c}px`):u==="top"?(g=a?f:`${h}px`,b=`${i.floating.height+c}px`):u==="right"?(g=`${-c}px`,b=a?f:`${p}px`):u==="left"&&(g=`${i.floating.width+c}px`,b=a?f:`${p}px`),{data:{x:g,y:b}}}}),"transformOrigin");function lR(e){const[t,n="center"]=e.split("-");return[t,n]}em(lR,"getSideAndAlignFromPlacement");var cR=IVe,x7=DVe,O7=LVe,FVe=Object.defineProperty,w7=(e,t)=>FVe(e,"name",{value:t,configurable:!0}),QD=!1;function _ve(){const[e,t]=m.useState(QD);return m.useEffect(()=>{QD||(QD=!0,t(!0))},[]),e}w7(_ve,"useIsHydrated");var Nve=Db[" useSyncExternalStore ".trim().toString()];function jve(){return()=>{}}w7(jve,"subscribe");function Rve(){return Nve(jve,()=>!0,()=>!1)}w7(Rve,"useIsHydratedModern");var BVe=typeof Nve=="function"?Rve:_ve,UVe=Object.defineProperty,Vb=(e,t)=>UVe(e,"name",{value:t,configurable:!0}),zD="rovingFocusGroup.onEntryFocus",QVe={bubbles:!1,cancelable:!0},uR="RovingFocusGroup",[B4,Ive,zVe]=i7(uR),[VVe,Nx]=wl(uR,[zVe]),[HVe,qVe]=VVe(uR),WVe=m.forwardRef(Vb(function(t,n){return o.jsx(B4.Provider,{scope:t.__scopeRovingFocusGroup,children:o.jsx(B4.Slot,{scope:t.__scopeRovingFocusGroup,children:o.jsx(KVe,{...t,ref:n})})})},"RovingFocusGroup")),KVe=m.forwardRef(Vb(function(t,n){const{__scopeRovingFocusGroup:i,orientation:r,loop:s=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...h}=t,p=m.useRef(null),g=ir(n,p),b=Qk(a),[v,y]=ru({prop:l,defaultProp:c??null,onChange:u,caller:uR}),[x,w]=m.useState(!1),O=$u(d),k=Ive(i),S=m.useRef(!1),[E,C]=m.useState(0);return m.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(zD,O),()=>N.removeEventListener(zD,O)},[O]),o.jsx(HVe,{scope:i,orientation:r,dir:b,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(N=>y(N),[y]),onItemShiftTab:m.useCallback(()=>w(!0),[]),onFocusableItemAdd:m.useCallback(()=>C(N=>N+1),[]),onFocusableItemRemove:m.useCallback(()=>C(N=>N-1),[]),children:o.jsx(wr.div,{tabIndex:x||E===0?-1:0,"data-orientation":r,...h,ref:g,style:{outline:"none",...t.style},onMouseDown:gn(t.onMouseDown,()=>{S.current=!0}),onFocus:gn(t.onFocus,N=>{const _=!S.current;if(N.target===N.currentTarget&&_&&!x){const j=new CustomEvent(zD,QVe);if(N.currentTarget.dispatchEvent(j),!j.defaultPrevented){const T=k().filter($=>$.focusable),L=T.find($=>$.active),A=T.find($=>$.id===v),P=[L,A,...T].filter(Boolean).map($=>$.ref.current);S7(P,f)}}S.current=!1}),onBlur:gn(t.onBlur,()=>w(!1))})})},"RovingFocusGroupImpl")),GVe="RovingFocusGroupItem",XVe=m.forwardRef(Vb(function(t,n){const{__scopeRovingFocusGroup:i,focusable:r=!0,active:s=!1,tabStopId:a,children:l,...c}=t,u=mm(),d=a||u,f=qVe(GVe,i),h=f.currentTabStopId===d,p=Ive(i),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:v}=f,y=BVe();return Zc(()=>{if(!(!y||!r))return g(),()=>b()},[y,r,g,b]),m.useEffect(()=>{if(!(y||!r))return g(),()=>b()},[y,r,g,b]),o.jsx(B4.ItemSlot,{scope:i,id:d,focusable:r,active:s,children:o.jsx(wr.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...c,ref:n,onMouseDown:gn(t.onMouseDown,x=>{r?f.onItemFocus(d):x.preventDefault()}),onFocus:gn(t.onFocus,()=>f.onItemFocus(d)),onKeyDown:gn(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=Dve(x,f.orientation,f.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let k=p().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")k.reverse();else if(w==="prev"||w==="next"){w==="prev"&&k.reverse();const S=k.indexOf(x.currentTarget);k=f.loop?Mve(k,S+1):k.slice(S+1)}setTimeout(()=>S7(k))}}),children:typeof l=="function"?l({isCurrentTabStop:h,hasTabStop:v!=null}):l})})},"RovingFocusGroupItem")),YVe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Pve(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Vb(Pve,"getDirectionAwareKey");function Dve(e,t,n){const i=Pve(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return YVe[i]}Vb(Dve,"getFocusIntent");function S7(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}Vb(S7,"focusFirst");function Mve(e,t){return e.map((n,i)=>e[(t+i)%e.length])}Vb(Mve,"wrapArray");var k7=WVe,E7=XVe,ZVe=Object.defineProperty,zi=(e,t)=>ZVe(e,"name",{value:t,configurable:!0}),U4=["Enter"," "],JVe=["ArrowDown","PageUp","Home"],Lve=["ArrowUp","PageDown","End"],eHe=[...JVe,...Lve],tHe={ltr:[...U4,"ArrowRight"],rtl:[...U4,"ArrowLeft"]},nHe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},dR="Menu",[bS,iHe,rHe]=i7(dR),[Hb,$ve]=wl(dR,[rHe,_x,Nx]),fR=_x(),Fve=Nx(),[Bve,$m]=Hb(dR),[sHe,Vk]=Hb(dR),aHe=zi(e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:r,onOpenChange:s,modal:a=!0}=e,l=fR(t),[c,u]=m.useState(null),d=m.useRef(!1),f=$u(s),h=Qk(r);return m.useEffect(()=>{const p=zi(()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},"handleKeyDown"),g=zi(()=>d.current=!1,"handlePointer");return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),m.useEffect(()=>{if(!n)return;const p=zi(()=>f(!1),"handleBlur");return window.addEventListener("blur",p),()=>window.removeEventListener("blur",p)},[n,f]),o.jsx(cR,{...l,children:o.jsx(Bve,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:o.jsx(sHe,{scope:t,onClose:m.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:i})})})},"Menu"),Uve=m.forwardRef(zi(function(t,n){const{__scopeMenu:i,...r}=t,s=fR(i);return o.jsx(x7,{...s,...r,ref:n})},"MenuAnchor")),Qve="MenuPortal",[oHe,zve]=Hb(Qve,{forceMount:void 0}),lHe=zi(e=>{const{__scopeMenu:t,forceMount:n,children:i,container:r}=e,s=$m(Qve,t);return o.jsx(oHe,{scope:t,forceMount:n,children:o.jsx(Xd,{present:n||s.open,children:o.jsx(l7,{asChild:!0,container:r,children:i})})})},"MenuPortal"),Pu="MenuContent",[cHe,C7]=Hb(Pu),uHe=m.forwardRef(zi(function(t,n){const i=zve(Pu,t.__scopeMenu),{forceMount:r=i.forceMount,...s}=t,a=$m(Pu,t.__scopeMenu),l=Vk(Pu,t.__scopeMenu);return o.jsx(bS.Provider,{scope:t.__scopeMenu,children:o.jsx(Xd,{present:r||a.open,children:o.jsx(bS.Slot,{scope:t.__scopeMenu,children:l.modal?o.jsx(dHe,{...s,ref:n}):o.jsx(fHe,{...s,ref:n})})})})},"MenuContent")),dHe=m.forwardRef(zi(function(t,n){const i=$m(Pu,t.__scopeMenu),r=m.useRef(null),s=ir(n,r);return m.useEffect(()=>{const a=r.current;if(a)return uve(a)},[]),o.jsx(T7,{...t,ref:s,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:gn(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentModal")),fHe=m.forwardRef(zi(function(t,n){const i=$m(Pu,t.__scopeMenu);return o.jsx(T7,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentNonModal")),hHe=kh("MenuContent.ScrollLock"),T7=m.forwardRef(zi(function(t,n){const{__scopeMenu:i,loop:r=!1,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:g,disableOutsideScroll:b,...v}=t,y=$m(Pu,i),x=Vk(Pu,i),w=fR(i),O=Fve(i),k=iHe(i),[S,E]=m.useState(null),C=m.useRef(null),N=ir(n,C,y.onContentChange),_=m.useRef(0),j=m.useRef(""),T=m.useRef(0),L=m.useRef(null),A=m.useRef("right"),R=m.useRef(0),P=b?u7:m.Fragment,$=b?{as:hHe,allowPinchZoom:!0}:void 0,M=zi(I=>{var oe,re;const H=j.current+I,X=k().filter(pe=>!pe.disabled),Q=document.activeElement,q=(oe=X.find(pe=>pe.ref.current===Q))==null?void 0:oe.textValue,U=X.map(pe=>pe.textValue),te=Yve(U,H,q),le=(re=X.find(pe=>pe.textValue===te))==null?void 0:re.ref.current;zi(function pe(K){j.current=K,window.clearTimeout(_.current),K!==""&&(_.current=window.setTimeout(()=>pe(""),1e3))},"updateSearch")(H),le&&setTimeout(()=>le.focus())},"handleTypeaheadSearch");m.useEffect(()=>()=>window.clearTimeout(_.current),[]),tR();const B=m.useCallback(I=>{var X,Q;return A.current===((X=L.current)==null?void 0:X.side)&&Jve(I,(Q=L.current)==null?void 0:Q.area)},[]);return o.jsx(cHe,{scope:i,searchRef:j,onItemEnter:m.useCallback(I=>{B(I)&&I.preventDefault()},[B]),onItemLeave:m.useCallback(I=>{var H;B(I)||((H=C.current)==null||H.focus(),E(null))},[B]),onTriggerLeave:m.useCallback(I=>{B(I)&&I.preventDefault()},[B]),pointerGraceTimerRef:T,onPointerGraceIntentChange:m.useCallback(I=>{L.current=I},[]),children:o.jsx(P,{...$,children:o.jsx(Gye,{asChild:!0,trapped:s,onMountAutoFocus:gn(a,I=>{var H;I.preventDefault(),(H=C.current)==null||H.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:o.jsx(s7,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,onDismiss:g,children:o.jsx(k7,{asChild:!0,...O,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:E,onEntryFocus:gn(u,I=>{x.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:o.jsx(O7,{role:"menu","aria-orientation":"vertical","data-state":_7(y.open),"data-radix-menu-content":"",dir:x.dir,...w,...v,ref:N,style:{outline:"none",...v.style},onKeyDown:gn(v.onKeyDown,I=>{const X=I.target.closest("[data-radix-menu-content]")===I.currentTarget,Q=I.ctrlKey||I.altKey||I.metaKey,q=I.key.length===1;X&&(I.key==="Tab"&&I.preventDefault(),!Q&&q&&M(I.key));const U=C.current;if(I.target!==U||!eHe.includes(I.key))return;I.preventDefault();const le=k().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);Lve.includes(I.key)&&le.reverse(),Gve(le)}),onBlur:gn(t.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(_.current),j.current="")}),onPointerMove:gn(t.onPointerMove,Mv(I=>{const H=I.target,X=R.current!==I.clientX;if(I.currentTarget.contains(H)&&X){const Q=I.clientX>R.current?"right":"left";A.current=Q,R.current=I.clientX}}))})})})})})})},"MenuContentImpl")),pHe=m.forwardRef(zi(function(t,n){const{__scopeMenu:i,...r}=t;return o.jsx(wr.div,{role:"group",...r,ref:n})},"MenuGroup")),Q4="MenuItem",eK="menu.itemSelect",A7=m.forwardRef(zi(function(t,n){const{disabled:i=!1,onSelect:r,...s}=t,a=m.useRef(null),l=Vk(Q4,t.__scopeMenu),c=C7(Q4,t.__scopeMenu),u=ir(n,a),d=m.useRef(!1),f=zi(()=>{const h=a.current;if(!i&&h){const p=new CustomEvent(eK,{bubbles:!0,cancelable:!0});h.addEventListener(eK,g=>r==null?void 0:r(g),{once:!0}),n7(h,p),p.defaultPrevented?d.current=!1:l.onClose()}},"handleSelect");return o.jsx(Vve,{...s,ref:u,disabled:i,onClick:gn(t.onClick,f),onPointerDown:h=>{var p;(p=t.onPointerDown)==null||p.call(t,h),d.current=!0},onPointerUp:gn(t.onPointerUp,h=>{var p;d.current||(p=h.currentTarget)==null||p.click()}),onKeyDown:gn(t.onKeyDown,h=>{i||h.target!==h.currentTarget||c.searchRef.current!==""&&h.key===" "||U4.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})},"MenuItem")),Vve=m.forwardRef(zi(function(t,n){const{__scopeMenu:i,disabled:r=!1,textValue:s,...a}=t,l=C7(Q4,i),c=Fve(i),u=m.useRef(null),d=ir(n,u),[f,h]=m.useState(!1),[p,g]=m.useState("");return m.useEffect(()=>{const b=u.current;b&&g((b.textContent??"").trim())},[a.children]),o.jsx(bS.ItemSlot,{scope:i,disabled:r,textValue:s??p,children:o.jsx(E7,{asChild:!0,...c,focusable:!r,children:o.jsx(wr.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:gn(t.onPointerMove,Mv(b=>{r?l.onItemLeave(b):(l.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:gn(t.onPointerLeave,Mv(b=>l.onItemLeave(b))),onFocus:gn(t.onFocus,()=>h(!0)),onBlur:gn(t.onBlur,()=>h(!1))})})})},"MenuItemImpl")),mHe=m.forwardRef(zi(function(t,n){const{checked:i=!1,onCheckedChange:r,...s}=t;return o.jsx(qve,{scope:t.__scopeMenu,checked:i,children:o.jsx(A7,{role:"menuitemcheckbox","aria-checked":yS(i)?"mixed":i,...s,ref:n,"data-state":hR(i),onSelect:gn(s.onSelect,()=>r==null?void 0:r(yS(i)?!0:!i),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),gHe="MenuRadioGroup",[bHe,yHe]=Hb(gHe,{value:void 0,onValueChange:zi(()=>{},"onValueChange")}),vHe=m.forwardRef(zi(function(t,n){const{value:i,onValueChange:r,...s}=t,a=$u(r);return o.jsx(bHe,{scope:t.__scopeMenu,value:i,onValueChange:a,children:o.jsx(pHe,{...s,ref:n})})},"MenuRadioGroup")),xHe="MenuRadioItem",OHe=m.forwardRef(zi(function(t,n){const{value:i,...r}=t,s=yHe(xHe,t.__scopeMenu),a=i===s.value;return o.jsx(qve,{scope:t.__scopeMenu,checked:a,children:o.jsx(A7,{role:"menuitemradio","aria-checked":a,...r,ref:n,"data-state":hR(a),onSelect:gn(r.onSelect,()=>{var l;return(l=s.onValueChange)==null?void 0:l.call(s,i)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),Hve="MenuItemIndicator",[qve,wHe]=Hb(Hve,{checked:!1}),SHe=m.forwardRef(zi(function(t,n){const{__scopeMenu:i,forceMount:r,...s}=t,a=wHe(Hve,i);return o.jsx(Xd,{present:r||yS(a.checked)||a.checked===!0,children:o.jsx(wr.span,{...s,ref:n,"data-state":hR(a.checked)})})},"MenuItemIndicator")),kHe=m.forwardRef(zi(function(t,n){const{__scopeMenu:i,...r}=t;return o.jsx(wr.div,{role:"separator","aria-orientation":"horizontal",...r,ref:n})},"MenuSeparator")),Wve="MenuSub",[EHe,Kve]=Hb(Wve),CHe=zi(e=>{const{__scopeMenu:t,children:n,open:i=!1,onOpenChange:r}=e,s=$m(Wve,t),a=fR(t),[l,c]=m.useState(null),[u,d]=m.useState(null),f=$u(r);return m.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),o.jsx(cR,{...a,children:o.jsx(Bve,{scope:t,open:i,onOpenChange:f,content:u,onContentChange:d,children:o.jsx(EHe,{scope:t,contentId:mm(),triggerId:mm(),trigger:l,onTriggerChange:c,children:n})})})},"MenuSub"),iT="MenuSubTrigger",THe=m.forwardRef(zi(function(t,n){const i=$m(iT,t.__scopeMenu),r=Vk(iT,t.__scopeMenu),s=Kve(iT,t.__scopeMenu),a=C7(iT,t.__scopeMenu),l=m.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:t.__scopeMenu},f=m.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);m.useEffect(()=>f,[f]),m.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),u(null)}},[c,u]);const h=ir(n,s.onTriggerChange);return o.jsx(Uve,{asChild:!0,...d,children:o.jsx(Vve,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?s.contentId:void 0,"data-state":_7(i.open),...t,ref:h,onClick:p=>{var g;(g=t.onClick)==null||g.call(t,p),!(t.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),i.open||i.onOpenChange(!0))},onPointerMove:gn(t.onPointerMove,Mv(p=>{a.onItemEnter(p),!p.defaultPrevented&&!t.disabled&&!i.open&&!l.current&&(a.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{i.onOpenChange(!0),f()},100))})),onPointerLeave:gn(t.onPointerLeave,Mv(p=>{var b,v;f();const g=(b=i.content)==null?void 0:b.getBoundingClientRect();if(g){const y=(v=i.content)==null?void 0:v.dataset.side,x=y==="right",w=x?-5:5,O=g[x?"left":"right"],k=g[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:p.clientX+w,y:p.clientY},{x:O,y:g.top},{x:k,y:g.top},{x:k,y:g.bottom},{x:O,y:g.bottom}],side:y}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(p),p.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:gn(t.onKeyDown,p=>{var b;t.disabled||p.target!==p.currentTarget||a.searchRef.current!==""&&p.key===" "||tHe[r.dir].includes(p.key)&&(i.onOpenChange(!0),(b=i.content)==null||b.focus(),p.preventDefault())})})})},"MenuSubTrigger")),AHe="MenuSubContent",_He=m.forwardRef(zi(function(t,n){const i=zve(Pu,t.__scopeMenu),{forceMount:r=i.forceMount,align:s="start",...a}=t,l=$m(Pu,t.__scopeMenu),c=Vk(Pu,t.__scopeMenu),u=Kve(AHe,t.__scopeMenu),d=m.useRef(null),f=ir(n,d);return o.jsx(bS.Provider,{scope:t.__scopeMenu,children:o.jsx(Xd,{present:r||l.open,children:o.jsx(bS.Slot,{scope:t.__scopeMenu,children:o.jsx(T7,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:s,side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var p;c.isUsingKeyboardRef.current&&((p=d.current)==null||p.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:gn(t.onFocusOutside,h=>{h.target!==u.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:gn(t.onEscapeKeyDown,h=>{c.onClose(),h.preventDefault()}),onKeyDown:gn(t.onKeyDown,h=>{var b;const p=h.currentTarget.contains(h.target),g=nHe[c.dir].includes(h.key);p&&g&&(l.onOpenChange(!1),(b=u.trigger)==null||b.focus(),h.preventDefault())})})})})})},"MenuSubContent"));function _7(e){return e?"open":"closed"}zi(_7,"getOpenState");function yS(e){return e==="indeterminate"}zi(yS,"isIndeterminate");function hR(e){return yS(e)?"indeterminate":e?"checked":"unchecked"}zi(hR,"getCheckedState");function Gve(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}zi(Gve,"focusFirst");function Xve(e,t){return e.map((n,i)=>e[(t+i)%e.length])}zi(Xve,"wrapArray");function Yve(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Xve(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return c!==n?c:void 0}zi(Yve,"getNextMatch");function Zve(e,t){const{x:n,y:i}=e;let r=!1;for(let s=0,a=t.length-1;si!=h>i&&n<(f-u)*(i-d)/(h-d)+u&&(r=!r)}return r}zi(Zve,"isPointInPolygon");function Jve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Zve(n,t)}zi(Jve,"isPointerInGraceArea");function Mv(e){return t=>t.pointerType==="mouse"?e(t):void 0}zi(Mv,"whenMouse");var NHe=aHe,jHe=Uve,RHe=lHe,IHe=uHe,PHe=A7,DHe=mHe,MHe=vHe,LHe=OHe,$He=SHe,FHe=kHe,BHe=CHe,UHe=THe,QHe=_He,zHe=Object.defineProperty,fc=(e,t)=>zHe(e,"name",{value:t,configurable:!0}),N7="DropdownMenu",[VHe,IVt]=wl(N7,[$ve]),hc=$ve(),[HHe,exe]=VHe(N7),qHe=fc(e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:r,defaultOpen:s,onOpenChange:a,modal:l=!0}=e,c=hc(t),u=m.useRef(null),[d,f]=ru({prop:r,defaultProp:s??!1,onChange:a,caller:N7});return o.jsx(HHe,{scope:t,triggerId:mm(),triggerRef:u,contentId:mm(),open:d,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(h=>!h),[f]),modal:l,children:o.jsx(NHe,{...c,open:d,onOpenChange:f,dir:i,modal:l,children:n})})},"DropdownMenu"),WHe="DropdownMenuTrigger",KHe=m.forwardRef(fc(function(t,n){const{__scopeDropdownMenu:i,disabled:r=!1,...s}=t,a=exe(WHe,i),l=hc(i),c=ir(n,a.triggerRef);return o.jsx(jHe,{asChild:!0,...l,children:o.jsx(wr.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:c,onPointerDown:gn(t.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(a.onOpenToggle(),a.open||u.preventDefault())}),onKeyDown:gn(t.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&a.onOpenToggle(),u.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),GHe=fc(e=>{const{__scopeDropdownMenu:t,...n}=e,i=hc(t);return o.jsx(RHe,{...i,...n})},"DropdownMenuPortal"),XHe="DropdownMenuContent",YHe=m.forwardRef(fc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=exe(XHe,i),a=hc(i),l=m.useRef(!1);return o.jsx(IHe,{id:s.contentId,"aria-labelledby":s.triggerId,...a,...r,ref:n,onCloseAutoFocus:gn(t.onCloseAutoFocus,c=>{var u;l.current||(u=s.triggerRef.current)==null||u.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:gn(t.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!s.modal||f)&&(l.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),ZHe=m.forwardRef(fc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=hc(i);return o.jsx(PHe,{...s,...r,ref:n})},"DropdownMenuItem")),JHe=m.forwardRef(fc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=hc(i);return o.jsx(DHe,{...s,...r,ref:n})},"DropdownMenuCheckboxItem")),eqe=m.forwardRef(fc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=hc(i);return o.jsx(MHe,{...s,...r,ref:n})},"DropdownMenuRadioGroup")),tqe=m.forwardRef(fc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=hc(i);return o.jsx(LHe,{...s,...r,ref:n})},"DropdownMenuRadioItem")),nqe=m.forwardRef(fc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=hc(i);return o.jsx($He,{...s,...r,ref:n})},"DropdownMenuItemIndicator")),iqe=m.forwardRef(fc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=hc(i);return o.jsx(FHe,{...s,...r,ref:n})},"DropdownMenuSeparator")),rqe=fc(e=>{const{__scopeDropdownMenu:t,children:n,open:i,onOpenChange:r,defaultOpen:s}=e,a=hc(t),[l,c]=ru({prop:i,defaultProp:s??!1,onChange:r,caller:"DropdownMenuSub"});return o.jsx(BHe,{...a,open:l,onOpenChange:c,children:n})},"DropdownMenuSub"),sqe=m.forwardRef(fc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=hc(i);return o.jsx(UHe,{...s,...r,ref:n})},"DropdownMenuSubTrigger")),aqe=m.forwardRef(fc(function(t,n){const{__scopeDropdownMenu:i,...r}=t,s=hc(i);return o.jsx(QHe,{...s,...r,ref:n,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),oqe=qHe,lqe=KHe,txe=GHe,cqe=YHe,nxe=ZHe,uqe=JHe,dqe=eqe,fqe=tqe,ixe=nqe,hqe=iqe,pqe=rqe,mqe=sqe,gqe=aqe,bqe=Object.defineProperty,Fm=(e,t)=>bqe(e,"name",{value:t,configurable:!0}),j7="Popover",[rxe,PVt]=wl(j7,[_x]),R7=_x(),[yqe,jx]=rxe(j7),vqe=Fm(e=>{const{__scopePopover:t,children:n,open:i,defaultOpen:r,onOpenChange:s,modal:a=!1}=e,l=R7(t),c=m.useRef(null),[u,d]=m.useState(!1),[f,h]=ru({prop:i,defaultProp:r??!1,onChange:s,caller:j7});return o.jsx(cR,{...l,children:o.jsx(yqe,{scope:t,contentId:mm(),triggerRef:c,open:f,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:u,onCustomAnchorAdd:m.useCallback(()=>d(!0),[]),onCustomAnchorRemove:m.useCallback(()=>d(!1),[]),modal:a,children:n})})},"Popover"),xqe="PopoverTrigger",Oqe=m.forwardRef(Fm(function(t,n){const{__scopePopover:i,...r}=t,s=jx(xqe,i),a=R7(i),l=ir(n,s.triggerRef),c=o.jsx(wr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":I7(s.open),...r,ref:l,onClick:gn(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?c:o.jsx(x7,{asChild:!0,...a,children:c})},"PopoverTrigger")),sxe="PopoverPortal",[wqe,Sqe]=rxe(sxe,{forceMount:void 0}),kqe=Fm(e=>{const{__scopePopover:t,forceMount:n,children:i,container:r}=e,s=jx(sxe,t);return o.jsx(wqe,{scope:t,forceMount:n,children:o.jsx(Xd,{present:n||s.open,children:o.jsx(l7,{asChild:!0,container:r,children:i})})})},"PopoverPortal"),vS="PopoverContent",Eqe=m.forwardRef(Fm(function(t,n){const i=Sqe(vS,t.__scopePopover),{forceMount:r=i.forceMount,...s}=t,a=jx(vS,t.__scopePopover);return o.jsx(Xd,{present:r||a.open,children:a.modal?o.jsx(Tqe,{...s,ref:n}):o.jsx(Aqe,{...s,ref:n})})},"PopoverContent")),Cqe=kh("PopoverContent.RemoveScroll"),Tqe=m.forwardRef(Fm(function(t,n){const i=jx(vS,t.__scopePopover),r=m.useRef(null),s=ir(n,r),a=m.useRef(!1);return m.useEffect(()=>{const l=r.current;if(l)return uve(l)},[]),o.jsx(u7,{as:Cqe,allowPinchZoom:!0,children:o.jsx(axe,{...t,ref:s,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gn(t.onCloseAutoFocus,l=>{var c;l.preventDefault(),a.current||(c=i.triggerRef.current)==null||c.focus()}),onPointerDownOutside:gn(t.onPointerDownOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:gn(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),Aqe=m.forwardRef(Fm(function(t,n){const i=jx(vS,t.__scopePopover),r=m.useRef(!1),s=m.useRef(!1);return o.jsx(axe,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,c;(l=t.onCloseAutoFocus)==null||l.call(t,a),a.defaultPrevented||(r.current||(c=i.triggerRef.current)==null||c.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{var u,d;(u=t.onInteractOutside)==null||u.call(t,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=a.target;((d=i.triggerRef.current)==null?void 0:d.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})},"PopoverContentNonModal")),axe=m.forwardRef(Fm(function(t,n){const{__scopePopover:i,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,...h}=t,p=jx(vS,i),g=R7(i);return tR(),o.jsx(Gye,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:o.jsx(s7,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(O7,{"data-state":I7(p.open),role:"dialog",id:p.contentId,...g,...h,ref:n,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function I7(e){return e?"open":"closed"}Fm(I7,"getState");var oxe=vqe,lxe=Oqe,cxe=kqe,uxe=Eqe,_qe=Object.defineProperty,mo=(e,t)=>_qe(e,"name",{value:t,configurable:!0}),dxe="Radio",[Nqe,fxe]=wl(dxe),[jqe,pR]=Nqe(dxe);function hxe(e){const{__scopeRadio:t,checked:n=!1,children:i,disabled:r,form:s,name:a,onCheck:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,h]=m.useState(null),[p,g]=m.useState(null),b=m.useRef(!1),[v,y]=m.useReducer(O=>O+1,0),x=f?!!s||!!f.closest("form"):!0,w={checked:n,disabled:r,required:c,name:a,form:s,value:u,control:f,setControl:h,hasConsumerStoppedPropagationRef:b,userInteractionCount:v,onUserInteraction:y,isFormControl:x,bubbleInput:p,setBubbleInput:g,onCheck:mo(()=>l==null?void 0:l(),"onCheck")};return o.jsx(jqe,{scope:t,...w,children:pxe(d)?d(w):i})}mo(hxe,"RadioProvider");var Rqe="RadioTrigger",Iqe=m.forwardRef(mo(function({__scopeRadio:t,onClick:n,...i},r){const{checked:s,disabled:a,value:l,setControl:c,onCheck:u,hasConsumerStoppedPropagationRef:d,onUserInteraction:f,isFormControl:h,bubbleInput:p}=pR(Rqe,t),g=ir(r,c);return o.jsx(wr.button,{type:"button",role:"radio","aria-checked":s,"data-state":P7(s),"data-disabled":a?"":void 0,disabled:a,value:l,...i,ref:g,onClick:gn(n,b=>{s||(f(),u()),p&&h&&(d.current=b.isPropagationStopped(),d.current||b.stopPropagation())})})},"RadioTrigger")),Pqe="RadioIndicator",Dqe=m.forwardRef(mo(function(t,n){const{__scopeRadio:i,forceMount:r,...s}=t,a=pR(Pqe,i);return o.jsx(Xd,{present:r||a.checked,children:o.jsx(wr.span,{"data-state":P7(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:n})})},"RadioIndicator")),Mqe="RadioBubbleInput",Lqe=m.forwardRef(mo(function({__scopeRadio:t,onClick:n,...i},r){const{control:s,checked:a,required:l,disabled:c,name:u,value:d,form:f,bubbleInput:h,setBubbleInput:p,hasConsumerStoppedPropagationRef:g,userInteractionCount:b}=pR(Mqe,t),v=ir(r,p),y=zk(s),x=m.useRef(!1),w=m.useRef(a),O=m.useRef(b);m.useEffect(()=>{const S=h;if(!S)return;const E=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(E,"checked").set,_=b!==O.current;O.current=b;const j=w.current!==a;w.current=a;const T=!(_&&g.current);if(j&&N){x.current=!_;const L=new Event("click",{bubbles:T});N.call(S,a),S.dispatchEvent(L),x.current=!1}},[h,a,g,b]);const k=m.useRef(a);return o.jsx(wr.input,{type:"radio","aria-hidden":!0,defaultChecked:k.current,required:l,disabled:c,name:u,value:d,form:f,...i,tabIndex:-1,ref:v,onClick:gn(n,S=>{x.current&&S.stopPropagation()}),style:{...i.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"RadioBubbleInput"));function pxe(e){return typeof e=="function"}mo(pxe,"isFunction");function P7(e){return e?"checked":"unchecked"}mo(P7,"getState");var $qe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],D7="RadioGroup",[Fqe,DVt]=wl(D7,[Nx,fxe]),mxe=Nx(),mR=fxe(),[Bqe,Uqe]=Fqe(D7),Qqe=m.forwardRef(mo(function(t,n){const{__scopeRadioGroup:i,name:r,form:s,defaultValue:a,value:l,required:c=!1,disabled:u=!1,orientation:d,dir:f,loop:h=!0,onValueChange:p,...g}=t,b=mxe(i),v=Qk(f),[y,x]=ru({prop:l,defaultProp:a??null,onChange:p,caller:D7}),[w,O]=m.useState(null),k=ir(n,O),S=m.useRef(y);return m.useEffect(()=>{const E=s?w==null?void 0:w.ownerDocument.getElementById(s):w==null?void 0:w.closest("form");if(E instanceof HTMLFormElement){const C=mo(()=>x(S.current),"reset");return E.addEventListener("reset",C),()=>E.removeEventListener("reset",C)}},[w,s,x]),o.jsx(Bqe,{scope:i,name:r,form:s,required:c,disabled:u,value:y,onValueChange:x,children:o.jsx(k7,{asChild:!0,...b,orientation:d,dir:v,loop:h,children:o.jsx(wr.div,{role:"radiogroup","aria-required":c,"aria-orientation":d,"data-disabled":u?"":void 0,dir:v,...g,ref:k})})})},"RadioGroup")),zqe="RadioGroupItemProvider",Vqe="RadioGroupItemTrigger";function gxe(e){const{__scopeRadioGroup:t,value:n,disabled:i,children:r,internal_do_not_use_render:s}=e,a=Uqe(zqe,t),l=mR(t),c=a.disabled||i;return o.jsx(hxe,{...l,checked:a.value===n,disabled:c,required:a.required,name:a.name,form:a.form,value:n,onCheck:()=>a.onValueChange(n),internal_do_not_use_render:s,children:r})}mo(gxe,"RadioGroupItemProvider");var Hqe=m.forwardRef(mo(function(t,n){const{__scopeRadioGroup:i,...r}=t,s=mxe(i),a=mR(i),{checked:l,disabled:c}=pR(Vqe,a.__scopeRadio),u=m.useRef(null),d=ir(n,u),f=m.useRef(!1);return m.useEffect(()=>{const h=mo(g=>{$qe.includes(g.key)&&(f.current=!0)},"handleKeyDown"),p=mo(()=>f.current=!1,"handleKeyUp");return document.addEventListener("keydown",h),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)}},[]),o.jsx(E7,{asChild:!0,...s,focusable:!c,active:l,children:o.jsx(Iqe,{...a,...r,ref:d,onKeyDown:gn(r.onKeyDown,h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:gn(r.onFocus,()=>{var h;f.current&&((h=u.current)==null||h.click())})})})},"RadioGroupItemTrigger")),qqe=m.forwardRef(mo(function(t,n){const{__scopeRadioGroup:i,value:r,disabled:s,...a}=t;return o.jsx(gxe,{__scopeRadioGroup:i,value:r,disabled:s,internal_do_not_use_render:({isFormControl:l})=>o.jsxs(o.Fragment,{children:[o.jsx(Hqe,{...a,ref:n,__scopeRadioGroup:i}),l&&o.jsx(Wqe,{__scopeRadioGroup:i})]})})},"RadioGroupItem")),Wqe=m.forwardRef(mo(function(t,n){const{__scopeRadioGroup:i,...r}=t,s=mR(i);return o.jsx(Lqe,{...s,...r,ref:n})},"RadioGroupItemBubbleInput")),Kqe=m.forwardRef(mo(function(t,n){const{__scopeRadioGroup:i,...r}=t,s=mR(i);return o.jsx(Dqe,{...s,...r,ref:n})},"RadioGroupIndicator")),Gqe=Object.defineProperty,ym=(e,t)=>Gqe(e,"name",{value:t,configurable:!0}),M7="Switch",[Xqe,MVt]=wl(M7),[Yqe,L7]=Xqe(M7);function bxe(e){const{__scopeSwitch:t,checked:n,children:i,defaultChecked:r,disabled:s,form:a,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=e,[h,p]=ru({prop:n,defaultProp:r??!1,onChange:c,caller:M7}),[g,b]=m.useState(null),[v,y]=m.useState(null),x=m.useRef(!1),[w,O]=m.useReducer(E=>E+1,0),k=g?!!a||!!g.closest("form"):!0,S={checked:h,setChecked:p,disabled:s,control:g,setControl:b,name:l,form:a,value:d,hasConsumerStoppedPropagationRef:x,userInteractionCount:w,onUserInteraction:O,required:u,defaultChecked:r,isFormControl:k,bubbleInput:v,setBubbleInput:y};return o.jsx(Yqe,{scope:t,...S,children:yxe(f)?f(S):i})}ym(bxe,"SwitchProvider");var Zqe="SwitchTrigger",Jqe=m.forwardRef(ym(function({__scopeSwitch:t,onClick:n,...i},r){const{control:s,form:a,value:l,disabled:c,checked:u,required:d,setControl:f,setChecked:h,hasConsumerStoppedPropagationRef:p,onUserInteraction:g,isFormControl:b,bubbleInput:v}=L7(Zqe,t),y=ir(r,f),x=m.useRef(u);return m.useEffect(()=>{const w=a?s==null?void 0:s.ownerDocument.getElementById(a):s==null?void 0:s.form;if(w instanceof HTMLFormElement){const O=ym(()=>h(x.current),"reset");return w.addEventListener("reset",O),()=>w.removeEventListener("reset",O)}},[s,a,h]),o.jsx(wr.button,{type:"button",role:"switch","aria-checked":u,"aria-required":d,"data-state":$7(u),"data-disabled":c?"":void 0,disabled:c,value:l,...i,ref:y,onClick:gn(n,w=>{g(),h(O=>!O),v&&b&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})},"SwitchTrigger")),eWe=m.forwardRef(ym(function(t,n){const{__scopeSwitch:i,name:r,checked:s,defaultChecked:a,required:l,disabled:c,value:u,onCheckedChange:d,form:f,...h}=t;return o.jsx(bxe,{__scopeSwitch:i,checked:s,defaultChecked:a,disabled:c,required:l,onCheckedChange:d,name:r,form:f,value:u,internal_do_not_use_render:({isFormControl:p})=>o.jsxs(o.Fragment,{children:[o.jsx(Jqe,{...h,ref:n,__scopeSwitch:i}),p&&o.jsx(rWe,{__scopeSwitch:i})]})})},"Switch")),tWe="SwitchThumb",nWe=m.forwardRef(ym(function(t,n){const{__scopeSwitch:i,...r}=t,s=L7(tWe,i);return o.jsx(wr.span,{"data-state":$7(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:n})},"SwitchThumb")),iWe="SwitchBubbleInput",rWe=m.forwardRef(ym(function({__scopeSwitch:t,onClick:n,...i},r){const{control:s,hasConsumerStoppedPropagationRef:a,userInteractionCount:l,checked:c,defaultChecked:u,required:d,disabled:f,name:h,value:p,form:g,bubbleInput:b,setBubbleInput:v}=L7(iWe,t),y=ir(r,v),x=zk(s),w=m.useRef(!1),O=m.useRef(c),k=m.useRef(l);m.useEffect(()=>{const E=b;if(!E)return;const C=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(C,"checked").set,j=l!==k.current;k.current=l;const T=O.current!==c;O.current=c;const L=!(j&&a.current);if(T&&_){w.current=!j;const A=new Event("click",{bubbles:L});_.call(E,c),E.dispatchEvent(A),w.current=!1}},[b,c,a,l]);const S=m.useRef(c);return o.jsx(wr.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??S.current,required:d,disabled:f,name:h,value:p,form:g,...i,tabIndex:-1,ref:y,onClick:gn(n,E=>{w.current&&E.stopPropagation()}),style:{...i.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function yxe(e){return typeof e=="function"}ym(yxe,"isFunction");function $7(e){return e?"checked":"unchecked"}ym($7,"getState");var sWe=Object.defineProperty,aWe=(e,t)=>sWe(e,"name",{value:t,configurable:!0}),oWe="Toggle",lWe=m.forwardRef(aWe(function(t,n){const{pressed:i,defaultPressed:r,onPressedChange:s,...a}=t,[l,c]=ru({prop:i,onChange:s,defaultProp:r??!1,caller:oWe});return o.jsx(wr.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":t.disabled?"":void 0,...a,ref:n,onClick:gn(t.onClick,()=>{t.disabled||c(!l)})})},"Toggle")),cWe=Object.defineProperty,vm=(e,t)=>cWe(e,"name",{value:t,configurable:!0}),Rx="ToggleGroup",[vxe,LVt]=wl(Rx,[Nx]),xxe=Nx(),uWe=m.forwardRef(vm(function(t,n){const{type:i,...r}=t;if(i==="single"){const s=r;return o.jsx(dWe,{role:"radiogroup",...s,ref:n})}if(i==="multiple"){const s=r;return o.jsx(fWe,{role:"toolbar",...s,ref:n})}throw new Error(`Missing prop \`type\` expected on \`${Rx}\``)},"ToggleGroup")),[Oxe,wxe]=vxe(Rx),dWe=m.forwardRef(vm(function(t,n){const{value:i,defaultValue:r,onValueChange:s=vm(()=>{},"onValueChange"),...a}=t,[l,c]=ru({prop:i,defaultProp:r??"",onChange:s,caller:Rx});return o.jsx(Oxe,{scope:t.__scopeToggleGroup,type:"single",value:m.useMemo(()=>l?[l]:[],[l]),onItemActivate:c,onItemDeactivate:m.useCallback(()=>c(""),[c]),children:o.jsx(Sxe,{...a,ref:n})})},"ToggleGroupImplSingle")),fWe=m.forwardRef(vm(function(t,n){const{value:i,defaultValue:r,onValueChange:s=vm(()=>{},"onValueChange"),...a}=t,[l,c]=ru({prop:i,defaultProp:r??[],onChange:s,caller:Rx}),u=m.useCallback(f=>c((h=[])=>[...h,f]),[c]),d=m.useCallback(f=>c((h=[])=>h.filter(p=>p!==f)),[c]);return o.jsx(Oxe,{scope:t.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:u,onItemDeactivate:d,children:o.jsx(Sxe,{...a,ref:n})})},"ToggleGroupImplMultiple")),[hWe,pWe]=vxe(Rx),Sxe=m.forwardRef(vm(function(t,n){const{__scopeToggleGroup:i,disabled:r=!1,rovingFocus:s=!0,orientation:a,dir:l,loop:c=!0,...u}=t,d=xxe(i),f=Qk(l),h={dir:f,...u};return o.jsx(hWe,{scope:i,rovingFocus:s,disabled:r,children:s?o.jsx(k7,{asChild:!0,...d,orientation:a,dir:f,loop:c,children:o.jsx(wr.div,{...h,ref:n})}):o.jsx(wr.div,{...h,ref:n})})},"ToggleGroupImpl")),z4="ToggleGroupItem",mWe=m.forwardRef(vm(function(t,n){const i=wxe(z4,t.__scopeToggleGroup),r=pWe(z4,t.__scopeToggleGroup),s=xxe(t.__scopeToggleGroup),a=i.value.includes(t.value),l=r.disabled||t.disabled,c={...t,pressed:a,disabled:l},u=m.useRef(null);return r.rovingFocus?o.jsx(E7,{asChild:!0,...s,focusable:!l,active:a,ref:u,children:o.jsx(tK,{...c,ref:n})}):o.jsx(tK,{...c,ref:n})},"ToggleGroupItem")),tK=m.forwardRef(vm(function(t,n){const{__scopeToggleGroup:i,value:r,...s}=t,a=wxe(z4,i),l={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},c=a.type==="single"?l:void 0;return o.jsx(lWe,{...c,...s,ref:n,onPressedChange:u=>{u?a.onItemActivate(r):a.onItemDeactivate(r)}})},"ToggleGroupItemImpl")),gWe=Object.defineProperty,_a=(e,t)=>gWe(e,"name",{value:t,configurable:!0}),[F7,$Vt]=wl("Tooltip",[_x]),B7=_x(),bWe="TooltipProvider",yWe=700,V4="tooltip.open",[vWe,U7]=F7(bWe),xWe=_a(e=>{const{__scopeTooltip:t,delayDuration:n=yWe,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:s}=e,a=m.useRef(!0),l=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),o.jsx(vWe,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:m.useCallback(()=>{i<=0||(window.clearTimeout(c.current),a.current=!1)},[i]),onClose:m.useCallback(()=>{i<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,i))},[i]),isPointerInTransitRef:l,onPointerInTransitChange:m.useCallback(u=>{l.current=u},[]),disableHoverableContent:r,children:s})},"TooltipProvider"),H4="Tooltip",[OWe,Hk]=F7(H4),wWe=_a(e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:l}=e,c=U7(H4,e.__scopeTooltip),u=B7(t),[d,f]=m.useState(null),[h,p]=m.useState(void 0),g=mm(),b=m.useRef(0),v=a??c.disableHoverableContent,y=l??c.delayDuration,x=m.useRef(!1),[w,O]=ru({prop:i,defaultProp:r??!1,onChange:_a(_=>{_?(c.onOpen(),document.dispatchEvent(new CustomEvent(V4))):c.onClose(),s==null||s(_)},"onChange"),caller:H4}),k=m.useMemo(()=>w?x.current?"delayed-open":"instant-open":"closed",[w]),S=m.useCallback(()=>{window.clearTimeout(b.current),b.current=0,x.current=!1,O(!0)},[O]),E=m.useCallback(()=>{window.clearTimeout(b.current),b.current=0,O(!1)},[O]),C=m.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{x.current=!0,O(!0),b.current=0},y)},[y,O]);m.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]);const N=h??g;return o.jsx(cR,{...u,children:o.jsx(OWe,{scope:t,contentId:N,setContentId:p,open:w,stateAttribute:k,trigger:d,onTriggerChange:f,onTriggerEnter:m.useCallback(()=>{c.isOpenDelayedRef.current?C():S()},[c.isOpenDelayedRef,C,S]),onTriggerLeave:m.useCallback(()=>{v?E():(window.clearTimeout(b.current),b.current=0)},[E,v]),onOpen:S,onClose:E,disableHoverableContent:v,children:n})})},"Tooltip"),nK="TooltipTrigger",SWe=m.forwardRef(_a(function(t,n){const{__scopeTooltip:i,...r}=t,s=Hk(nK,i),a=U7(nK,i),l=B7(i),c=m.useRef(null),u=ir(n,c,s.onTriggerChange),d=m.useRef(!1),f=m.useRef(!1),h=m.useCallback(()=>d.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),o.jsx(x7,{asChild:!0,...l,children:o.jsx(wr.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:u,onPointerMove:gn(t.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:gn(t.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:gn(t.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:gn(t.onFocus,()=>{d.current||s.onOpen()}),onBlur:gn(t.onBlur,s.onClose),onClick:gn(t.onClick,s.onClose)})})},"TooltipTrigger")),kxe="TooltipPortal",[kWe,EWe]=F7(kxe,{forceMount:void 0}),CWe=_a(e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:r}=e,s=Hk(kxe,t);return o.jsx(kWe,{scope:t,forceMount:n,children:o.jsx(Xd,{present:n||s.open,children:o.jsx(l7,{asChild:!0,container:r,children:i})})})},"TooltipPortal"),xS="TooltipContent",TWe=m.forwardRef(_a(function(t,n){const i=EWe(xS,t.__scopeTooltip),{forceMount:r=i.forceMount,side:s="top",...a}=t,l=Hk(xS,t.__scopeTooltip);return o.jsx(Xd,{present:r||l.open,children:l.disableHoverableContent?o.jsx(Exe,{side:s,...a,ref:n}):o.jsx(AWe,{side:s,...a,ref:n})})},"TooltipContent")),AWe=m.forwardRef(_a(function(t,n){const i=Hk(xS,t.__scopeTooltip),r=U7(xS,t.__scopeTooltip),s=m.useRef(null),a=ir(n,s),[l,c]=m.useState(null),{trigger:u,onClose:d}=i,f=s.current,{onPointerInTransitChange:h}=r,p=m.useCallback(()=>{c(null),h(!1)},[h]),g=m.useCallback((b,v)=>{const y=b.currentTarget,x={x:b.clientX,y:b.clientY},w=Cxe(x,y.getBoundingClientRect()),O=Txe(x,w),k=Axe(v.getBoundingClientRect()),S=Nxe([...O,...k]);c(S),h(!0)},[h]);return m.useEffect(()=>()=>p(),[p]),m.useEffect(()=>{if(u&&f){const b=_a(y=>g(y,f),"handleTriggerLeave"),v=_a(y=>g(y,u),"handleContentLeave");return u.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[u,f,g,p]),m.useEffect(()=>{if(l){const b=_a(v=>{const y=v.target,x={x:v.clientX,y:v.clientY},w=(u==null?void 0:u.contains(y))||(f==null?void 0:f.contains(y)),O=!_xe(x,l);w?p():O&&(p(),d())},"handleTrackPointerGrace");return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,f,l,d,p]),o.jsx(Exe,{...t,ref:a})},"TooltipContentHoverable")),_We=Cye("TooltipContent"),Exe=m.forwardRef(_a(function(t,n){const{__scopeTooltip:i,children:r,"aria-label":s,id:a,onEscapeKeyDown:l,onPointerDownOutside:c,...u}=t,d=Hk(xS,i),f=B7(i),{onClose:h}=d;m.useEffect(()=>(document.addEventListener(V4,h),()=>document.removeEventListener(V4,h)),[h]),m.useEffect(()=>{if(d.trigger){const g=_a(b=>{b.target instanceof Node&&b.target.contains(d.trigger)&&h()},"handleScroll");return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[d.trigger,h]);const{setContentId:p}=d;return Zc(()=>(p(a),()=>{p(void 0)}),[a,p]),o.jsx(s7,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:g=>g.preventDefault(),onDismiss:h,children:o.jsxs(O7,{"data-state":d.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:d.contentId,...f,...u,ref:n,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(_We,{children:r}),s?o.jsx(YUe,{id:d.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function Cxe(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}_a(Cxe,"getExitSideFromRect");function Txe(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}_a(Txe,"getPaddedExitPoints");function Axe(e){const{top:t,right:n,bottom:i,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:i},{x:r,y:i}]}_a(Axe,"getPointsFromRect");function _xe(e,t){const{x:n,y:i}=e;let r=!1;for(let s=0,a=t.length-1;si!=h>i&&n<(f-u)*(i-d)/(h-d)+u&&(r=!r)}return r}_a(_xe,"isPointInPolygon");function Nxe(e){const t=e.slice();return t.sort((n,i)=>n.xi.x?1:n.yi.y?1:0),jxe(t)}_a(Nxe,"getHull");function jxe(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}_a(jxe,"getHullPresorted");var NWe=xWe,jWe=wWe,Rxe=SWe,RWe=CWe,IWe=TWe;function xm(e){const t=m.useRef(e);return t.current=e,t}let Lv=[],rT=!1;const iK=e=>{var t,n;if(e.key==="Escape"){const[i]=Lv;i&&(e.preventDefault(),(n=(t=i.callback).current)==null||n.call(t))}},Ixe=()=>{Lv.length>0&&!rT?(document.body.addEventListener("keydown",iK),rT=!0):Lv.length===0&&rT&&(document.body.removeEventListener("keydown",iK),rT=!1)},PWe=e=>{Lv.unshift(e),Ixe()},DWe=({id:e})=>{Lv=Lv.filter(t=>t.id!==e),Ixe()},qk=(e,t)=>{const n=m.useId(),i=xm(t);m.useEffect(()=>{if(!e)return;const r={id:n,callback:i};return PWe(r),()=>DWe(r)},[n,e,i])},MWe=m.createContext(null);function Pxe(){const e=m.useContext(MWe);return(e==null?void 0:e.linkComponent)??"a"}function Wk(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}const LWe=()=>xye,rK=(e,t=!1,n="TransitionGroup")=>{const i=[];return m.Children.forEach(e,r=>{if(r&&typeof r=="object"&&"key"in r&&r.key)i.push(r);else if(t)throw new Error(`Child elements of <${n} /> must include a \`key\``)}),i},_0=()=>{},N0=e=>{const t=m.useRef(e);return t.current=e,m.useCallback(n=>t.current(n),[])};function $We(e,t,n,i){const r=e.reduce((c,u)=>({...c,[u.key]:1}),{}),s=t.reduce((c,u)=>({...c,[u.component.key]:1}),{}),a=e.filter(c=>!s[c.key]).map(n),l=t.map(c=>({...c,component:e.find(({key:u})=>u===c.component.key)||c.component,shouldRender:!!r[c.component.key]}));return i==="append"?l.concat(a):a.concat(l)}function FWe(e,t,n){if((xye||RUe)&&t&&n>1)throw new Error(`Cannot use forwardRef with multiple children in <${e} />`)}const BWe="_TransitionGroupChild_1hv1z_1",UWe={TransitionGroupChild:BWe},Dxe={enter:!1,enterActive:!1,exit:!1,exitActive:!1,interrupted:!1},QWe=e=>({...Dxe,enter:!e}),zWe=(e,t)=>{switch(t.type){case"enter-before":return{enter:!0,enterActive:!1,exit:!1,exitActive:!1,interrupted:e.interrupted||e.exit};case"enter-active":return{enter:!0,enterActive:!0,exit:!1,exitActive:!1,interrupted:!1};case"exit-before":return{enter:!1,enterActive:!1,exit:!0,exitActive:!1,interrupted:e.interrupted||e.enter};case"exit-active":return{enter:!1,enterActive:!1,exit:!0,exitActive:!0,interrupted:!1};case"done":default:return Dxe}},VWe=({ref:e,as:t,children:n,className:i,transitionId:r,style:s,preventMountTransition:a,shouldRender:l,enterDuration:c,exitDuration:u,removeChild:d,onEnter:f,onEnterActive:h,onEnterComplete:p,onExit:g,onExitActive:b,onExitComplete:v})=>{const[y,x]=m.useReducer(zWe,QWe(a||!1)),w=m.useRef(!1),O=m.useRef(null),k=m.useRef(c);k.current=c;const S=m.useRef(u);S.current=u;const E=m.useRef(null),C=m.useCallback(N=>{const _=O.current;if(!(!_||N===E.current))switch(E.current=N,N){case"enter":f(_);break;case"enter-active":h(_);break;case"enter-complete":p(_);break;case"exit":g(_);break;case"exit-active":b(_);break;case"exit-complete":v(_);break}},[f,h,p,g,b,v]);return ri.useLayoutEffect(()=>{if(!l){let j;x({type:"exit-before"}),C("exit");const T=N_(()=>{x({type:"exit-active"}),C("exit-active"),j=window.setTimeout(()=>{C("exit-complete"),d()},S.current)});return()=>{T(),j!==void 0&&clearTimeout(j)}}if(a&&!w.current){w.current=!0;return}let N;x({type:"enter-before"}),C("enter");const _=N_(()=>{x({type:"enter-active"}),C("enter-active"),N=window.setTimeout(()=>{x({type:"done"}),C("enter-complete")},k.current)});return()=>{_(),N!==void 0&&clearTimeout(N)}},[l,a,d,C]),m.useEffect(()=>()=>{w.current=!1},[]),o.jsx(t,{ref:Wk([O,e]),className:mi(i,UWe.TransitionGroupChild),"data-transition-id":r,style:s,"data-entering":y.enter?"":void 0,"data-entering-active":y.enterActive?"":void 0,"data-exiting":y.exit?"":void 0,"data-exiting-active":y.exitActive?"":void 0,"data-interrupted":y.interrupted?"":void 0,children:n})},HWe=e=>{const{enterMountDelay:t,preventMountTransition:n}=e,i=!n&&t!=null?t:null,[r,s]=m.useState(i==null);return JF(()=>s(!0),r?null:i),r?o.jsx(VWe,{...e}):null},Ix=e=>{const{ref:t,as:n="span",children:i,className:r,transitionId:s,style:a,enterDuration:l=0,exitDuration:c=0,preventInitialTransition:u=!0,enterMountDelay:d,insertMethod:f="append",disableAnimations:h=LWe()}=e,p=N0(e.onEnter??_0),g=N0(e.onEnterActive??_0),b=N0(e.onEnterComplete??_0),v=N0(e.onExit??_0),y=N0(e.onExitActive??_0),x=N0(e.onExitComplete??_0);m.Children.forEach(i,S=>{if(S&&!S.key)throw new Error("Child elements of must include a `key`")});const w=m.useCallback(S=>({component:S,shouldRender:!0,removeChild:()=>{k(E=>E.filter(C=>S.key!==C.component.key))},onEnter:p,onEnterActive:g,onEnterComplete:b,onExit:v,onExitActive:y,onExitComplete:x}),[p,g,b,v,y,x]),[O,k]=m.useState(()=>rK(i).map(S=>({...w(S),preventMountTransition:u})));return m.useLayoutEffect(()=>{k(S=>{const E=rK(i);return $We(E,S,w,f)})},[i,f,w]),FWe("TransitionGroup",t,m.Children.count(i)),h?o.jsx(o.Fragment,{children:m.Children.map(i,S=>o.jsx(n,{ref:t,className:r,style:a,"data-transition-id":s,children:S}))}):o.jsx(o.Fragment,{children:O.map(({component:S,...E})=>o.jsx(HWe,{...E,as:n,className:r,transitionId:s,enterDuration:l,exitDuration:c,enterMountDelay:d,style:a,ref:t,children:S},S.key))})},qWe="_Button_1864l_1",WWe="_ButtonInner_1864l_4",KWe="_ButtonLoader_1864l_749",VD={Button:qWe,ButtonInner:WWe,ButtonLoader:KWe},$t=e=>{const{type:t="button",color:n="primary",variant:i="solid",pill:r=!0,uniform:s=!1,size:a="md",iconSize:l,gutterSize:c,loading:u,selected:d,block:f,opticallyAlign:h,children:p,className:g,onClick:b,disabled:v,disabledTone:y,inert:x=u,...w}=e,O=v||x,k=m.useCallback(S=>{v||b==null||b(S)},[b,v]);return o.jsxs("button",{type:t,className:mi(VD.Button,g),"data-color":n,"data-variant":i,"data-pill":r?"":void 0,"data-uniform":s?"":void 0,"data-size":a,"data-gutter-size":c,"data-icon-size":l,"data-loading":u?"":void 0,"data-selected":d?"":void 0,"data-block":f?"":void 0,"data-optically-align":h,onPointerEnter:e7,disabled:O,"aria-disabled":O,tabIndex:O?-1:void 0,"data-disabled":v?"":void 0,"data-disabled-tone":v?y:void 0,onClick:k,...w,children:[o.jsx(Ix,{className:VD.ButtonLoader,enterDuration:250,exitDuration:150,children:u&&o.jsx(Bk,{},"loader")}),o.jsx("span",{className:VD.ButtonInner,children:ZF(p)})]})},GWe=()=>{var e;return typeof ClipboardItem<"u"&&!!((e=navigator.clipboard)!=null&&e.write)};function XWe(e){const{"text/plain":t,...n}=e;return new ClipboardItem({...n,...t?{"text/plain":new Blob([t],{type:"text/plain"})}:null})}async function YWe(e,t=document.body){if(typeof e=="string")return sK(e,t);try{return GWe()?(await navigator.clipboard.write([XWe(e)]),!0):e["text/plain"]?sK(e["text/plain"],t):!1}catch{return!1}}async function sK(e,t=document.body){if(navigator.clipboard)try{return await navigator.clipboard.writeText(e),!0}catch{}const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.opacity="0",t.appendChild(n),n.focus(),n.select();let i=!1;try{i=document.execCommand("copy")}catch{}return t.removeChild(n),i}const ZWe="_TransitionItem_1o7b1_1",JWe={TransitionItem:ZWe},eKe=e=>{const{as:t="span",className:n,children:i,preventInitialTransition:r,insertMethod:s,transitionClassName:a,transitionPosition:l="absolute"}=e,{enterTotalDuration:c,exitTotalDuration:u,variables:d}=sKe(e);return o.jsx(t,{className:mi("block",l==="absolute"&&"relative",n),"data-transition-position":l,style:d,children:o.jsx(Ix,{as:t,className:mi(JWe.TransitionItem,a),enterDuration:c,exitDuration:u,insertMethod:s,preventInitialTransition:r,children:i})})},tKe=400,nKe=500,iKe=200,rKe=300;function sKe({initial:e,enter:t,exit:n,forceCompositeLayer:i}){const r=ND(e),s=ND(t),a=ND(n),l=[r,a,s].some(b=>b!=="none"),c=(t==null?void 0:t.duration)??(l?nKe:tKe),u=(t==null?void 0:t.timingFunction)??(l?"var(--cubic-enter)":"ease"),d=(n==null?void 0:n.duration)??(l?rKe:iKe),f=(n==null?void 0:n.timingFunction)??(l?"var(--cubic-exit)":"ease"),h=zb({"tg-will-change":i?"transform, opacity":"auto","tg-enter-opacity":_D((t==null?void 0:t.opacity)??1),"tg-enter-transform":s,"tg-enter-filter":jD(t),"tg-enter-duration":GC(c),"tg-enter-delay":GC((t==null?void 0:t.delay)??0),"tg-enter-timing-function":u,"tg-exit-opacity":_D((n==null?void 0:n.opacity)??0),"tg-exit-transform":a,"tg-exit-filter":jD(n),"tg-exit-duration":GC(d),"tg-exit-delay":GC((n==null?void 0:n.delay)??0),"tg-exit-timing-function":f,"tg-initial-opacity":_D((e==null?void 0:e.opacity)??(n==null?void 0:n.opacity)??0),"tg-initial-transform":r==="none"?a:r,"tg-initial-filter":jD(e??n??{})}),p=((t==null?void 0:t.delay)??0)+c,g=((n==null?void 0:n.delay)??0)+d;return{enterTotalDuration:p,exitTotalDuration:g,variables:h}}const Q7=({children:e,copyValue:t,onClick:n,...i})=>{const[r,s]=m.useState(!1),a=m.useRef(null),l=c=>{r||(s(!0),n==null||n(c),YWe(typeof t=="function"?t():t),a.current=window.setTimeout(()=>{s(!1)},1300))};return m.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]),o.jsxs($t,{...i,onClick:l,children:[o.jsx(eKe,{className:"w-[var(--button-icon-size)] h-[var(--button-icon-size)]",initial:{scale:.6},enter:{scale:1,delay:150,duration:300},exit:{scale:.6,duration:150},forceCompositeLayer:!0,children:r?o.jsx(Iv,{},"copied-icon"):o.jsx(CF,{},"copy-icon")}),typeof e=="function"?e({copied:r}):e]})},aKe="_Menu_1t4b0_1",oKe="_MenuList_1t4b0_3",lKe="_MenuItemContent_1t4b0_53",cKe="_MenuItem_1t4b0_53",uKe="_ItemActions_1t4b0_98",dKe="_PressableInner_1t4b0_117",fKe="_Separator_1t4b0_135",hKe="_SubMenuItem_1t4b0_139",pKe="_SubTriggerIcon_1t4b0_141",mKe="_RadioItem_1t4b0_151",gKe="_RadioIndicatorActive_1t4b0_158",bKe="_RadioIndicator_1t4b0_158",yKe="_CheckboxItem_1t4b0_249",vKe="_CheckboxIndicator_1t4b0_256",xKe="_CheckboxCircle_1t4b0_269",Gr={Menu:aKe,MenuList:oKe,MenuItemContent:lKe,MenuItem:cKe,ItemActions:uKe,PressableInner:dKe,Separator:fKe,SubMenuItem:hKe,SubTriggerIcon:pKe,RadioItem:mKe,RadioIndicatorActive:gKe,RadioIndicator:bKe,CheckboxItem:yKe,CheckboxIndicator:vKe,CheckboxCircle:xKe},Mxe=m.createContext(null),Kk=()=>{const e=m.useContext(Mxe);if(!e)throw new Error("Menu components must be wrapped in ");return e},xr=({children:e,forceOpen:t,onOpen:n,onClose:i,modal:r=!1})=>{const[s,a]=m.useState(!1),l=t??s,c=xm(n),u=xm(i),d=m.useCallback(h=>{var p,g;a(h),h?(p=c.current)==null||p.call(c):(g=u.current)==null||g.call(u)},[c,u]);qk(s,()=>{d(!1)});const f=m.useMemo(()=>({open:l,setOpen:d}),[l,d]);return o.jsx(Mxe.Provider,{value:f,children:o.jsx(oqe,{open:l,onOpenChange:d,modal:r,children:e})})},OKe=({className:e,children:t,disabled:n,onSelect:i,onClick:r})=>{const{open:s}=Kk(),a=l=>{s||l.preventDefault()};return i?o.jsx(nxe,{className:mi(Gr.MenuItem,e),onSelect:i,onClick:r,disabled:n,onPointerMove:a,onPointerLeave:a,children:o.jsx("div",{className:Gr.PressableInner,children:t})}):o.jsx("div",{className:mi(Gr.MenuItemContent,e),children:t})},wKe=({className:e,children:t})=>o.jsx("div",{className:mi(Gr.ItemActions,e),children:t}),SKe=({children:e,onClick:t})=>{const{setOpen:n}=Kk();return o.jsx($t,{className:"rounded-sm",color:"secondary",size:"xs",uniform:!0,iconSize:"sm",variant:"ghost",onClick:i=>{i.stopPropagation(),n(!1),t(i)},children:e})},kKe=e=>{const{className:t,children:n,href:i,to:r,disabled:s,as:a,...l}=e,{open:c}=Kk(),u=i||r,d=u?/^https?:\/\//.test(u):!0,f=Pxe(),h=a||(d?"a":f),p=b=>{c||b.preventDefault()},g=d?{target:"_blank",rel:"noopener noreferrer",href:i??r}:{href:i,to:r};return o.jsx(nxe,{asChild:!0,className:mi(Gr.MenuItem,t),disabled:s,onPointerMove:d?void 0:p,onPointerLeave:d?void 0:p,children:o.jsx(h,{...g,...l,children:o.jsx("span",{className:Gr.PressableInner,children:n})})})},EKe=({className:e})=>o.jsx(hqe,{className:mi(Gr.Separator,e),role:"separator"}),CKe=({children:e,side:t,sideOffset:n=5,align:i,alignOffset:r,width:s,minWidth:a,maxHeight:l})=>{const{open:c}=Kk();return o.jsx(txe,{forceMount:!0,children:o.jsx(Ix,{className:Gr.Menu,enterDuration:350,exitDuration:200,disableAnimations:!0,children:c&&o.jsx(cqe,{forceMount:!0,className:Gr.MenuList,side:t,sideOffset:n,align:i,alignOffset:r??(i==="center"?0:-5),avoidCollisions:!0,collisionPadding:{bottom:30,top:30,left:12,right:12},onEscapeKeyDown:sh,style:zb({"menu-width":s,"menu-min-width":a,"menu-max-height":l}),children:e},"dropdown")})})},TKe=({children:e,disabled:t})=>o.jsx(lqe,{asChild:!0,disabled:t,children:e}),Lxe=m.createContext(null),$xe=()=>{const e=m.useContext(Lxe);if(!e)throw new Error("Submenu components must be wrapped in ");return e},AKe=({children:e,forceOpen:t,onOpen:n,onClose:i})=>{const[r,s]=m.useState(!1),a=m.useRef(null),l=t??r,c=xm(n),u=xm(i),d=m.useCallback(h=>{var p,g;s(h),h?(p=c.current)==null||p.call(c):(g=u.current)==null||g.call(u)},[c,u]);qk(r,()=>{var h;d(!1),(h=a.current)==null||h.focus()});const f=m.useMemo(()=>({open:l,setOpen:d,triggerRef:a}),[l,d]);return o.jsx(Lxe.Provider,{value:f,children:o.jsx(pqe,{open:l,onOpenChange:d,children:e})})},_Ke=({className:e,children:t,disabled:n})=>{const{open:i}=Kk(),{triggerRef:r}=$xe(),s=a=>{i||a.preventDefault()};return o.jsx(mqe,{ref:r,className:mi(Gr.MenuItem,Gr.SubMenuItem,e),disabled:n,onPointerMove:s,onPointerLeave:s,children:o.jsxs("div",{className:Gr.PressableInner,children:[t,o.jsx(wFe,{width:"16",height:"16",className:Gr.SubTriggerIcon})]})})},NKe=({children:e,sideOffset:t=4,alignOffset:n=-6,width:i="auto",minWidth:r="auto",maxHeight:s})=>{const{open:a}=$xe();return o.jsx(txe,{forceMount:!0,children:o.jsx(Ix,{className:Gr.Menu,enterDuration:350,exitDuration:200,disableAnimations:!0,children:a&&o.jsx(gqe,{className:Gr.MenuList,sideOffset:t,alignOffset:n,avoidCollisions:!0,collisionPadding:{bottom:30,top:30,left:12,right:12},onEscapeKeyDown:sh,style:zb({"menu-width":i,"menu-min-width":r,"menu-max-height":s}),children:e},"submenu")})})},jKe=({children:e,value:t,onChange:n,indicatorPosition:i="end",...r})=>o.jsx(dqe,{...r,value:t,onValueChange:s=>n(s),"data-indicator-position":i,children:e}),RKe=({className:e,children:t,...n})=>o.jsx(fqe,{className:mi(Gr.MenuItem,Gr.RadioItem,e),...n,children:o.jsxs("div",{className:Gr.PressableInner,children:[o.jsx("div",{className:Gr.RadioIndicator,children:o.jsx(ixe,{className:Gr.RadioIndicatorActive})}),t]})}),IKe=({className:e,children:t,indicatorPosition:n="end",indicatorVariant:i="solid",...r})=>o.jsx(uqe,{className:mi(Gr.MenuItem,Gr.CheckboxItem,e),...r,"data-indicator-position":n,"data-indicator-variant":i,children:o.jsxs("div",{className:Gr.PressableInner,children:[o.jsx("div",{className:Gr.CheckboxIndicator,children:o.jsx(ixe,{children:i==="ghost"?o.jsx(Iv,{className:"size-4"}):o.jsx("div",{className:Gr.CheckboxCircle,children:o.jsx(Iv,{className:"size-4"})})})}),t]})});xr.Content=CKe;xr.Item=OKe;xr.ItemActions=wKe;xr.ItemAction=SKe;xr.Link=kKe;xr.Separator=EKe;xr.Trigger=TKe;xr.Sub=AKe;xr.SubTrigger=_Ke;xr.SubContent=NKe;xr.CheckboxItem=IKe;xr.RadioGroup=jKe;xr.RadioItem=RKe;const PKe="_Tooltip_16g2y_1",DKe="_TriggerDecorator_16g2y_73",Fxe={Tooltip:PKe,TriggerDecorator:DKe},$o=e=>{const{ref:t,children:n,content:i,forceOpen:r=i===null?!1:void 0,maxWidth:s=300,openDelay:a=150,interactive:l=!1,compact:c=!1,preventUnintentionalClickToClose:u,align:d,alignOffset:f=0,side:h,sideOffset:p=5,gutterSize:g="md",contentClassName:b,onPointerDown:v,onClick:y,...x}=e,[w,O]=m.useState(!1),[k,S]=m.useState(!1);JF(()=>S(!1),k?400:null);const E=r??w,C=_=>{typeof r!="boolean"&&(O(_),u&&S(_))},N=_=>{u&&k&&(_.preventDefault(),_.stopPropagation())};return o.jsxs(Bxe,{open:E,delayDuration:a,onOpenChange:C,disableHoverableContent:!l,children:[o.jsx(Rxe,{asChild:!0,children:o.jsx(kye,{...x,ref:t,onPointerDown:_=>{N(_),v==null||v(_)},onClick:_=>{N(_),y==null||y(_)},children:n})}),o.jsx(Uxe,{maxWidth:s,compact:c,align:d,alignOffset:f,side:h,sideOffset:p,gutterSize:g,className:b,children:i})]})},Bxe=({children:e,open:t,onOpenChange:n,...i})=>(qk(t,()=>{n(!1)}),o.jsx(NWe,{children:o.jsx(jWe,{open:t,onOpenChange:n,...i,children:e})})),Uxe=({children:e,maxWidth:t=300,compact:n=!1,clickable:i=void 0,alignOffset:r=0,sideOffset:s=5,gutterSize:a="md",className:l,style:c,...u})=>o.jsx(RWe,{children:o.jsx(IWe,{...u,className:mi(Fxe.Tooltip,l),"data-compact":n,"data-clickable":i,"data-gutter-size":a,alignOffset:r,sideOffset:s,collisionPadding:15,hideWhenDetached:!0,style:{...c,maxWidth:t},onEscapeKeyDown:sh,children:e})}),MKe=({children:e,asChild:t=!0,...n})=>o.jsx(Rxe,{asChild:t,...n,children:e}),LKe=e=>{const{children:t,className:n,focusable:i=!0,ref:r,...s}=e,a=typeof t=="string";return o.jsx(kye,{ref:r,...s,className:mi(Fxe.TriggerDecorator,n),tabIndex:i?0:void 0,children:a?o.jsx("span",{children:t}):t})};$o.Root=Bxe;$o.Content=Uxe;$o.Trigger=MKe;$o.TriggerDecorator=LKe;const $Ke=50,aK=48;function FKe(e){return(e.events??[]).flatMap(t=>{var r,s;const i=(((r=t.content)==null?void 0:r.parts)??[]).map(a=>typeof a.text=="string"?a.text:"").filter(Boolean).join("");return i?[{text:i,role:t.author??((s=t.content)==null?void 0:s.role)??"",ts:t.timestamp}]:[]})}function BKe(e){var t,n;for(const i of e.events??[])if(i.author==="user"||((t=i.content)==null?void 0:t.role)==="user"){const r=(((n=i.content)==null?void 0:n.parts)??[]).map(s=>s.text).find(Boolean);if(r)return r}return V("search.untitledSession")}function UKe(e,t,n){const i=Math.max(0,t-aK),r=Math.min(e.length,t+n+aK);return(i>0?"…":"")+e.slice(i,r).trim()+(r{var c;if((c=l.events)!=null&&c.length)return l;try{return await Kj(t,e,l.id)}catch{return l}})),a=[];for(const l of s)for(const{text:c,role:u,ts:d}of FKe(l)){const f=c.toLowerCase().indexOf(i);if(f!==-1){a.push({type:"session",appId:t,sessionId:l.id,title:BKe(l),snippet:UKe(c,f,i.length),role:u,ts:d??l.lastUpdateTime});break}}return a.sort((l,c)=>(c.ts??0)-(l.ts??0)),a.slice(0,$Ke)}async function zKe(e,t){if(!e||!t.trim())return{results:[]};let n;try{n=await Jbe(e,t.trim())}catch(a){const l=String(a);return{results:[],note:l.includes("404")?V("search.webUnavailable"):V("search.webFailed",{message:l})}}const{mounted:i,results:r,error:s}=n;return i?s?{results:[],note:s}:{results:r.map((a,l)=>({type:"web",index:l,title:a.title,url:a.url,siteName:a.siteName,summary:a.summary}))}:{results:[],note:V("search.webNotMounted")}}async function VKe(e,t,n,i){if(!t||!i.trim())return{results:[]};const r=await Zbe(t,e,i.trim(),n);if(!r.mounted)return{results:[],note:V(e==="knowledge"?"search.knowledgeNotMounted":"search.memoryNotMounted")};if(r.error)return{results:[],note:r.error};const s=r.sourceName??V(e==="knowledge"?"search.knowledge":"search.longTermMemory");return{results:r.results.map((a,l)=>e==="knowledge"?{type:"knowledge",index:l,content:a.content,sourceName:s,sourceType:r.sourceType}:{type:"memory",index:l,content:a.content,sourceName:s,sourceType:r.sourceType,author:a.author,ts:a.timestamp})}}async function HKe(e,t,n){return e==="session"?{results:await QKe(n.userId,n.appId,t)}:e==="web"?zKe(n.appId,t):VKe(e,n.appId,n.userId,t)}function Qxe({mirrored:e=!1}){return o.jsxs("g",{opacity:"0.5",transform:e?"translate(20 0) scale(-1 1)":void 0,children:[o.jsx("path",{className:"sidebar-panel-glyph__divider",d:"M5.938 6.833c.11 0 .249.102.249.292v6.042c0 .19-.14.291-.249.291s-.248-.101-.248-.291V7.125c0-.19.139-.292.248-.292Z",strokeWidth:"1.167"}),o.jsx("path",{className:"sidebar-panel-glyph__frame",d:"M14.5 3.75h-9a3 3 0 0 0-3 3v6.857a3 3 0 0 0 3 3h9a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3Z",strokeWidth:"1.667",strokeLinecap:"round",strokeLinejoin:"round"})]})}function qKe(e){return o.jsx("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",...e,children:o.jsx(Qxe,{})})}function WKe(e){return o.jsx("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",...e,children:o.jsx(Qxe,{mirrored:!0})})}function KKe(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M12 8.333c.368 0 .667.299.667.667v2h2a.667.667 0 0 1 0 1.333h-2v2a.667.667 0 0 1-1.334 0v-2h-2a.667.667 0 0 1 0-1.333h2V9c0-.368.299-.667.667-.667ZM7.667 1c3.49 0 6.383 2.554 6.913 5.896a.667.667 0 0 1-1.317.208 5.667 5.667 0 1 0-9.708 4.424.67.67 0 0 1 .07.12.667.667 0 0 1-.13.834l-.95.853 4.788-.002a.667.667 0 0 1 0 1.334l-5.657.002c-.917 0-1.35-1.131-.67-1.744l1.163-1.045A6.97 6.97 0 0 1 .667 8c0-3.866 3.134-7 7-7Z",fill:"currentColor"})})}function GKe(e){return o.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.333",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"7.333",cy:"7.333",r:"5.333"}),o.jsx("path",{d:"m11.133 11.133 2.867 2.867"})]})}function XKe(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M8 0.667c4.05 0 7.334 3.283 7.334 7.333 0 4.05-3.284 7.334-7.334 7.334S0.667 12.05 0.667 8 3.95 0.667 8 0.667Zm0 1.333a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM6.167 6c.368 0 .667.299.667.667v2a.667.667 0 0 1-1.334 0v-2c0-.368.299-.667.667-.667Zm3.666 0c.368 0 .667.299.667.667v2a.667.667 0 0 1-1.333 0v-2c0-.368.298-.667.666-.667Z",fill:"currentColor"})})}function zxe(e){return o.jsxs("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M7.58 2.6a.667.667 0 0 0-.667-.667h-.666a.667.667 0 0 0-.667.667v10.667c0 .368.299.666.667.666h.666a.667.667 0 0 0 .667-.666V2.6Zm1.333 10.667A2 2 0 0 1 6.913 15.267h-.666a2 2 0 0 1-2-2V2.6a2 2 0 0 1 2-2h.666a2 2 0 0 1 2 2v10.667Z",fill:"currentColor"}),o.jsx("path",{d:"M11.88 5.045a.667.667 0 0 0-.801-.514l-.653.136a.667.667 0 0 0-.504.786l1.85 8.092c.081.358.44.589.8.514l.653-.137a.667.667 0 0 0 .504-.786L11.88 5.045Zm3.155 7.82a2 2 0 0 1-1.512 2.358l-.653.136a2 2 0 0 1-2.403-1.541L8.617 5.726a2 2 0 0 1 1.513-2.358l.652-.136a2 2 0 0 1 2.404 1.541l1.849 8.092Z",fill:"currentColor"}),o.jsx("path",{d:"M4.247 2.6a.667.667 0 0 0-.667-.667h-.667a.667.667 0 0 0-.666.667v10.667c0 .368.298.666.666.666h.667a.667.667 0 0 0 .667-.666V2.6ZM5.58 13.267a2 2 0 0 1-2 2h-.667a2 2 0 0 1-2-2V2.6a2 2 0 0 1 2-2h.667a2 2 0 0 1 2 2v10.667Z",fill:"currentColor"})]})}function YKe({className:e="icon"}){return o.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[o.jsx("path",{d:"M16.4 10.7a5.7 5.7 0 1 1-1.67-4.03"}),o.jsx("path",{d:"M15.25 15.25 19.6 19.6"})]})}function ZKe({open:e}){return o.jsx("svg",{className:`search-source-chevron ${e?"open":""}`,viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:o.jsx("path",{d:"m3.25 4.75 2.75 2.5 2.75-2.5"})})}function JKe({active:e=!1,onClick:t}){const{t:n}=xe("workspaceTools");return o.jsxs("button",{className:`new-chat${e?" is-active":""}`,onClick:t,"aria-label":n("search.nav"),"aria-current":e?"page":void 0,title:n("search.nav"),children:[o.jsx(GKe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:n("search.nav")})]})}function eGe(e,t,n,i){const r=!!e,s=new Set((t==null?void 0:t.searchSources)??[]),a=l=>r?n?i("search.checkingCapabilities"):i("search.notMounted",{label:l}):i("search.selectAgent");return[{id:"session",label:i("search.sources.session"),ready:r,unavailableLabel:i("search.selectAgent")},{id:"web",label:i("search.sources.web"),ready:r&&s.has("web"),description:i("search.webDescription"),unavailableLabel:a(" web_search")},{id:"knowledge",label:i("search.sources.knowledge"),ready:r&&s.has("knowledge"),unavailableLabel:a(i("search.sources.knowledge"))},{id:"memory",label:i("search.sources.memory"),ready:r&&s.has("memory"),unavailableLabel:a(i("search.sources.memory"))}]}function D_(e,t){return{context_search:"Context Search",local:t("search.backendLocal"),mem0:"Mem0",milvus:"Milvus",opensearch:"OpenSearch",openviking:"OpenViking",redis:"Redis",tos_vector:"TOS Vector",viking:"VikingDB"}[e.toLowerCase()]??e}function oK(e,t){return e?new Date(e*1e3).toLocaleString(t,{timeZone:"Asia/Shanghai",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):""}function tGe({userId:e,appId:t,agentInfo:n,capabilitiesLoading:i,agentLabel:r,onOpenSession:s}){var M,B;const{t:a,i18n:l}=xe("workspaceTools"),c=l.resolvedLanguage||l.language,[u,d]=m.useState("session"),[f,h]=m.useState(""),[p,g]=m.useState([]),[b,v]=m.useState(),[y,x]=m.useState(!1),[w,O]=m.useState(!1),[k,S]=m.useState(!1),E=m.useRef(0),C=m.useRef(null),N=eGe(t,n,i,a),_=N.find(I=>I.id===u),j=u==="knowledge"?(M=n==null?void 0:n.components)==null?void 0:M.find(I=>I.source==="knowledgebase"||I.kind==="knowledgebase"):u==="memory"?(B=n==null?void 0:n.components)==null?void 0:B.find(I=>I.source==="long_term_memory"||I.kind==="memory"):void 0;m.useEffect(()=>{E.current+=1,d("session"),g([]),v(void 0),O(!1),x(!1),S(!1)},[t]),m.useEffect(()=>{if(!k)return;function I(H){var X;(X=C.current)!=null&&X.contains(H.target)||S(!1)}return document.addEventListener("pointerdown",I),()=>document.removeEventListener("pointerdown",I)},[k]);async function T(I,H){var U;const X=I.trim();if(!X||!((U=N.find(te=>te.id===H))!=null&&U.ready))return;const Q=++E.current;x(!0),O(!0);let q;try{q=await HKe(H,X,{userId:e,appId:t})}catch(te){const le=te instanceof Error?te.message:String(te);q={results:[],note:a("search.failed",{message:le})}}Q===E.current&&(g(q.results),v(q.note),x(!1))}function L(I){E.current+=1,h(I),g([]),v(void 0),O(!1),x(!1)}function A(I){E.current+=1,d(I),S(!1),g([]),v(void 0),O(!1),x(!1)}const R=!!(_!=null&&_.ready),P=t?u==="web"?a("search.placeholder.web"):u==="knowledge"?a("search.placeholder.knowledge",{name:(j==null?void 0:j.name)??a("search.placeholder.knowledgeFallback")}):u==="memory"?a("search.placeholder.memory",{name:(j==null?void 0:j.name)??a("search.placeholder.memoryFallback")}):a("search.placeholder.session"):a("search.placeholder.selectAgent"),$=j!=null&&j.backend?D_(j.backend,a):"";return o.jsxs("div",{className:"search",children:[o.jsxs("div",{className:"search-box",children:[o.jsxs("div",{className:"search-source-picker-wrap",ref:C,children:[o.jsxs("button",{className:"search-source-picker",type:"button","aria-label":a("search.sourceTypeAria",{label:(_==null?void 0:_.label)??a("search.notSelected")}),"aria-haspopup":"listbox","aria-expanded":k,onClick:()=>S(I=>!I),children:[o.jsx("span",{children:(_==null?void 0:_.label)??a("search.sourceType")}),$&&o.jsx("small",{children:$}),o.jsx(ZKe,{open:k})]}),k&&o.jsx("div",{className:"search-source-menu",role:"listbox","aria-label":a("search.selectSource"),children:N.map(I=>{var Q,q;const H=I.id==="knowledge"?(Q=n==null?void 0:n.components)==null?void 0:Q.find(U=>U.source==="knowledgebase"||U.kind==="knowledgebase"):I.id==="memory"?(q=n==null?void 0:n.components)==null?void 0:q.find(U=>U.source==="long_term_memory"||U.kind==="memory"):void 0,X=H?[H.name,H.backend?D_(H.backend,a):""].filter(Boolean).join(" · "):I.ready?I.description:I.unavailableLabel;return o.jsxs("button",{type:"button",role:"option","aria-selected":u===I.id,disabled:!I.ready,onClick:()=>A(I.id),children:[o.jsx("span",{children:I.label}),X&&o.jsx("small",{children:X})]},I.id)})})]}),o.jsx("span",{className:"search-box-divider","aria-hidden":!0}),o.jsx("input",{className:"search-input",value:f,onChange:I=>L(I.target.value),onKeyDown:I=>{I.key==="Enter"&&(I.preventDefault(),T(f,u))},placeholder:P,disabled:!R,autoFocus:!0}),o.jsx("button",{className:"search-go",onClick:()=>void T(f,u),disabled:!f.trim()||y,"aria-label":a("search.nav"),children:y?o.jsx(hi,{className:"icon spin"}):o.jsx(YKe,{className:"icon"})})]}),o.jsx("div",{className:"search-results",children:R?w?y?null:b?o.jsx("div",{className:"search-empty",children:b}):p.length===0&&w?o.jsx("div",{className:"search-empty",children:a("search.noResults",{query:f.trim()})}):p.map((I,H)=>o.jsx(nGe,{result:I,agentLabel:r,onOpen:s,locale:c},H)):o.jsx("div",{className:"search-empty",children:a(u==="web"?"search.instructions.web":u==="knowledge"?"search.instructions.knowledge":u==="memory"?"search.instructions.memory":"search.instructions.session")}):o.jsx("div",{className:"search-empty",children:t?i?a("search.loadingCapabilities"):(_==null?void 0:_.unavailableLabel)??a("search.sourceUnavailable"):a("search.noAgentHint")})})]})}function nGe({result:e,agentLabel:t,onOpen:n,locale:i}){const{t:r}=xe("workspaceTools");switch(e.type){case"session":return o.jsxs("button",{className:"search-result",onClick:()=>n(e.appId,e.sessionId),children:[o.jsx(Sbe,{className:"search-result-icon"}),o.jsxs("div",{className:"search-result-body",children:[o.jsxs("div",{className:"search-result-head",children:[o.jsx("span",{className:"search-result-title",children:e.title}),o.jsxs("span",{className:"search-result-meta",children:[t(e.appId),e.ts?` · ${oK(e.ts,i)}`:""]})]}),o.jsx("div",{className:"search-result-snippet",children:e.snippet})]})]});case"web":return o.jsxs("a",{className:"search-result",href:e.url||void 0,target:"_blank",rel:"noreferrer noopener",children:[o.jsx(zj,{className:"search-result-icon"}),o.jsxs("div",{className:"search-result-body",children:[o.jsxs("div",{className:"search-result-head",children:[o.jsx("span",{className:"search-result-title",children:e.title||e.url}),o.jsxs("span",{className:"search-result-meta",children:[e.siteName,e.url&&o.jsx(fb,{className:"search-result-ext"})]})]}),e.summary&&o.jsx("div",{className:"search-result-snippet",children:e.summary})]})]});case"knowledge":return o.jsxs("div",{className:"search-result search-result-static",children:[o.jsx(lK,{source:"knowledge"}),o.jsxs("div",{className:"search-result-body",children:[o.jsxs("div",{className:"search-result-head",children:[o.jsx("span",{className:"search-result-title",children:r("search.knowledgeFragment",{index:e.index+1})}),o.jsxs("span",{className:"search-result-meta",children:[e.sourceName,e.sourceType?` · ${D_(e.sourceType,r)}`:""]})]}),o.jsx("div",{className:"search-result-snippet search-result-snippet-expanded",children:e.content})]})]});case"memory":return o.jsxs("div",{className:"search-result search-result-static",children:[o.jsx(lK,{source:"memory"}),o.jsxs("div",{className:"search-result-body",children:[o.jsxs("div",{className:"search-result-head",children:[o.jsx("span",{className:"search-result-title",children:r("search.memoryFragment",{index:e.index+1})}),o.jsxs("span",{className:"search-result-meta",children:[e.sourceName,e.sourceType?` · ${D_(e.sourceType,r)}`:"",e.ts?` · ${oK(e.ts,i)}`:""]})]}),o.jsx("div",{className:"search-result-snippet search-result-snippet-expanded",children:e.content})]})]});default:return null}}function lK({source:e,className:t="search-result-icon"}){return e==="knowledge"?o.jsxs("svg",{className:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[o.jsx("path",{d:"M5 5.5h10.5A3.5 3.5 0 0 1 19 9v9.5H8.5A3.5 3.5 0 0 1 5 15V5.5Z"}),o.jsx("path",{d:"M8.25 9h7.5M8.25 12.25h6"})]}):o.jsxs("svg",{className:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[o.jsx("path",{d:"M12 4.5a7.5 7.5 0 1 0 7.5 7.5"}),o.jsx("path",{d:"M12 8a4 4 0 1 0 4 4M12 11.3a.7.7 0 1 0 0 1.4.7.7 0 0 0 0-1.4Z"})]})}function iGe({filled:e=!1,...t}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:[o.jsx("rect",{x:"3.5",y:"9.3",width:"4.5",height:"10.2",rx:"1.5"}),o.jsx("path",{d:"M8 10.2 11.3 4.8c.5-.8 1.7-.45 1.7.5v3.8h4.2a2.1 2.1 0 0 1 2.04 2.6l-1.4 5.75A2.1 2.1 0 0 1 15.8 19H8"})]})}function rGe({filled:e=!1,...t}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:e?"currentColor":"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:[o.jsx("rect",{x:"3.5",y:"4.5",width:"4.5",height:"10.2",rx:"1.5"}),o.jsx("path",{d:"M8 13.8 11.3 19.2c.5.8 1.7.45 1.7-.5v-3.8h4.2a2.1 2.1 0 0 0 2.04-2.6l-1.4-5.75A2.1 2.1 0 0 0 15.8 5H8"})]})}function Vxe(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M5.25 4.25h9.5a2.5 2.5 0 0 1 2.5 2.5v3.5"}),o.jsx("path",{d:"M13.25 17.75h-8a2.5 2.5 0 0 1-2.5-2.5v-8a3 3 0 0 1 3-3"}),o.jsx("path",{d:"M7 8.25h5.5M7 11.75h3.25"}),o.jsx("path",{d:"m13.35 16.65.42-2.16 4.76-4.76a1.35 1.35 0 0 1 1.91 1.91l-4.76 4.76-2.33.25Z"}),o.jsx("path",{d:"m17.65 10.6 1.9 1.9"})]})}const gR="/assets/media/logo-DCsNZy-k.svg",z7="data:image/svg+xml,%3csvg%20width='28'%20height='23'%20viewBox='0%200%2028%2023'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.1957%209.44218C17.0253%209.58161%2016.7774%209.47317%2016.7774%209.24079V8.01696V0.611967C16.7774%200.395085%2016.514%200.271152%2016.3591%200.410576L6.04172%209.16334C5.87132%209.30276%205.62345%209.19432%205.62345%208.96194V2.98218C5.62345%202.81178%205.48403%202.67235%205.31362%202.67235H0.309832C0.139424%202.67235%200%202.81178%200%202.98218V21.7115C0%2021.9284%200.263357%2022.0524%200.418273%2021.9129L10.7202%2013.1602C10.8906%2013.0207%2011.1385%2013.1292%2011.1385%2013.3616V22.0059C11.1385%2022.2228%2011.4018%2022.3467%2011.5567%2022.2073L21.8586%2013.4545C22.0291%2013.3151%2022.2769%2013.4235%2022.2769%2013.6559V19.6357C22.2769%2019.8061%2022.4163%2019.9455%2022.5868%2019.9455H27.5905C27.7609%2019.9455%2027.9004%2019.8061%2027.9004%2019.6357V0.890816C27.9004%200.673934%2027.637%200.550001%2027.4821%200.689425L17.1957%209.44218Z'%20fill='%230066FC'/%3e%3c/svg%3e",cK="(max-width: 860px)";function uK({title:e}){const t=m.useRef(null),n=m.useRef(null),[i,r]=m.useState(0);m.useLayoutEffect(()=>{const l=t.current,c=n.current;if(!l||!c)return;const u=()=>{const f=Math.max(0,Math.ceil(c.scrollWidth-l.clientWidth));r(h=>h===f?h:f)};u();const d=new ResizeObserver(u);return d.observe(l),d.observe(c),()=>d.disconnect()},[e]);const s=Math.min(12,Math.max(4.8,3.6+i/36)),a={"--history-title-translate":`-${i}px`,"--history-title-duration":`${s.toFixed(2)}s`};return o.jsx("span",{ref:t,className:`history-title${i>0?" is-overflowing":""}`,style:a,children:o.jsx("span",{ref:n,className:"history-title-text",children:e})})}function sGe(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"7",cy:"7",r:"2.25"}),o.jsx("circle",{cx:"17",cy:"7",r:"2.25"}),o.jsx("circle",{cx:"7",cy:"17",r:"2.25"}),o.jsx("circle",{cx:"17",cy:"17",r:"2.25"})]})}function aGe(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"12",cy:"12",r:"8.25"}),o.jsx("path",{d:"M3.75 12h16.5M12 3.75c2.1 2.2 3.2 4.95 3.2 8.25S14.1 18.05 12 20.25M12 3.75C9.9 5.95 8.8 8.7 8.8 12s1.1 6.05 3.2 8.25"})]})}function oGe(e){let t=2166136261;for(const i of e)t^=i.charCodeAt(0),t=Math.imul(t,16777619);const n=t>>>0;return{"--avatar-hue-a":194+n%22,"--avatar-hue-b":214+(n>>>6)%25,"--avatar-hue-c":176+(n>>>12)%25,"--avatar-x":`${22+(n>>>18)%55}%`,"--avatar-y":`${18+(n>>>24)%58}%`}}const lGe={admin:"account.roles.admin",developer:"account.roles.developer",user:"account.roles.user"};function cGe({activePage:e,access:t,userInfo:n,onAgentKitCli:i,onDeveloperResources:r,onSystemInfo:s,onIssueFeedback:a,onLogout:l}){const{t:c,i18n:u}=xe(["sidebar","common"]),[d,f]=m.useState("");if(!n)return null;const h=M7e(n)||c("sidebar:account.defaultUser"),p=typeof n.email=="string"?n.email.trim():"",g=oGe(h),b=L7e(n),v=b===d?"":b,y=fj(u.resolvedLanguage??u.language)??dj;return o.jsx("div",{className:"sidebar-user",children:o.jsxs("div",{className:"sidebar-user-row",children:[o.jsxs(xr,{modal:!0,children:[o.jsx(xr.Trigger,{children:o.jsxs("button",{type:"button",className:"sidebar-user-btn",title:h,children:[o.jsx("span",{className:`account-avatar${v?" has-image":""}`,style:g,"aria-hidden":"true",children:v?o.jsx("img",{className:"account-avatar-image",src:v,alt:"","aria-hidden":"true",referrerPolicy:"no-referrer",onError:()=>f(v)}):null}),o.jsx("span",{className:"sidebar-user-identity",children:o.jsx("span",{className:"sidebar-user-name",children:h})})]})}),o.jsxs(xr.Content,{side:"top",align:"start",sideOffset:4,minWidth:216,children:[o.jsxs("div",{className:"account-menu-head",children:[o.jsx("span",{className:`account-avatar account-avatar--lg${v?" has-image":""}`,style:g,"aria-hidden":"true",children:v?o.jsx("img",{className:"account-avatar-image",src:v,alt:"","aria-hidden":"true",referrerPolicy:"no-referrer",onError:()=>f(v)}):null}),o.jsxs("div",{className:"account-id",children:[o.jsxs("div",{className:"account-name-row",children:[o.jsx("div",{className:"account-name",children:h}),o.jsx(ma,{color:"secondary",size:"sm",variant:"soft",pill:!0,children:c(`sidebar:${lGe[t.role]}`)})]}),p&&p!==h&&o.jsx("div",{className:"account-sub",children:p})]})]}),o.jsxs(xr.Item,{className:"account-menu-action",onSelect:s,children:[o.jsx(Gd,{className:"icon","aria-hidden":"true"}),c("sidebar:account.systemInfo")]}),o.jsxs(xr.Sub,{children:[o.jsx(xr.SubTrigger,{className:"account-menu-action",children:o.jsxs("span",{className:"account-menu-action__label",children:[o.jsx(aGe,{className:"icon"}),c("sidebar:account.language")]})}),o.jsx(xr.SubContent,{sideOffset:6,minWidth:136,children:o.jsx(xr.RadioGroup,{value:y,onChange:x=>{W5e(x)},indicatorPosition:"end",children:U8.map(x=>o.jsx(xr.RadioItem,{value:x,children:c(`common:languageNames.${x}`)},x))})})]}),o.jsxs(xr.Item,{className:"account-menu-action",onSelect:a,children:[o.jsx(Vxe,{className:"icon"}),c("sidebar:account.issueFeedback")]}),o.jsxs(xr.Item,{className:"account-menu-action",onSelect:l,children:[o.jsx(h7e,{className:"icon","aria-hidden":"true"}),c("sidebar:account.logout")]})]})]}),o.jsxs("div",{className:"sidebar-user-shortcuts","aria-label":c("sidebar:account.shortcuts"),children:[o.jsx($o,{compact:!0,content:c("sidebar:account.tryCli"),children:o.jsx("button",{type:"button",className:"sidebar-user-shortcut",onClick:i,"aria-label":c("sidebar:account.tryCli"),children:o.jsx(jFe,{className:"icon"})})}),o.jsx($o,{compact:!0,content:c("sidebar:account.developerResources"),children:o.jsx("button",{type:"button",className:`sidebar-user-shortcut${e==="developer-resources"?" is-active":""}`,onClick:r,"aria-label":c("sidebar:account.developerResources"),"aria-current":e==="developer-resources"?"page":void 0,children:o.jsx(vFe,{className:"icon"})})})]})]})})}function uGe({branding:e,cloudProvider:t,sessions:n,currentSessionId:i,activePage:r,features:s,access:a,streamingSids:l,evaluatingSids:c,sandboxHistory:u,onNewChat:d,onSearch:f,onQuickCreate:h,onLibrary:p,onAddAgent:g,onMyAgents:b,onWorkspace:v,onApplications:y,onCronJobs:x,onAgentKitCli:w,onDeveloperResources:O,onSystemInfo:k,onIssueFeedback:S,onPickSession:E,onDeleteSession:C,userInfo:N,onLogout:_}){const{t:j}=xe("sidebar"),T=H=>(s==null?void 0:s[H])!==!1,[L,A]=m.useState(null),R=m.useRef(typeof window<"u"&&window.matchMedia(cK).matches),[P,$]=m.useState(R.current),M=n.map(H=>({id:H.id,title:eR(H.events,j("history.newConversation")),createdAt:(H.lastUpdateTime??0)*1e3})).sort((H,X)=>X.createdAt-H.createdAt),B=()=>{R.current=!1,$(H=>!H),A(null)};m.useEffect(()=>{const H=window.matchMedia(cK),X=Q=>{Q.matches?$(q=>q||(R.current=!0,!0)):R.current&&(R.current=!1,$(!1))};return H.addEventListener("change",X),()=>H.removeEventListener("change",X)},[]);const I=t==="byteplus"?z7:gR;return o.jsxs("aside",{className:`sidebar ${P?"is-collapsed":""}`,children:[o.jsxs("div",{className:"sidebar-top",children:[o.jsxs("div",{className:"sidebar-brand-row",children:[o.jsxs("button",{type:"button",className:"brand",onClick:d,"aria-label":j("navigation.home"),title:j("navigation.home"),children:[o.jsx("img",{className:"brand-logo",src:e.logoUrl||I,width:20,height:20,alt:"","aria-hidden":!0}),o.jsx("span",{className:"brand-title",children:e.title})]}),o.jsx("button",{type:"button",className:"sidebar-collapse-toggle",onClick:B,"aria-label":j(P?"navigation.expand":"navigation.collapse"),title:j(P?"navigation.expand":"navigation.collapse"),children:P?o.jsx(WKe,{className:"icon"}):o.jsx(qKe,{className:"icon"})})]}),o.jsxs("nav",{className:"sidebar-nav","aria-label":j("navigation.label"),children:[T("newChat")&&o.jsxs("button",{className:`new-chat new-chat--conversation${r==="new-chat"?" is-active":""}`,onClick:d,"aria-label":j("navigation.newChat"),"aria-current":r==="new-chat"?"page":void 0,title:j("navigation.newChat"),children:[o.jsx(KKe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.newChat")})]}),T("search")&&o.jsx(JKe,{active:r==="search",onClick:f}),o.jsxs("button",{className:`new-chat new-chat--agents${r==="agents"?" is-active":""}`,onClick:b,"aria-label":j("navigation.agents"),"aria-current":r==="agents"?"page":void 0,title:j("navigation.agents"),children:[o.jsx(XKe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.agents")})]}),o.jsxs("button",{className:`new-chat new-chat--workspaces${r==="workspaces"?" is-active":""}`,onClick:v,"aria-label":j("navigation.workspaces"),"aria-current":r==="workspaces"?"page":void 0,title:j("navigation.workspaces"),children:[o.jsx(WFe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.workspaces")})]}),o.jsxs("button",{className:`new-chat new-chat--library${r==="library"?" is-active":""}`,onClick:p,"aria-label":j("navigation.library"),"aria-current":r==="library"?"page":void 0,title:j("navigation.library"),children:[o.jsx(zxe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.library")})]}),o.jsxs("button",{className:`new-chat new-chat--cronjobs${r==="cronjobs"?" is-active":""}`,onClick:x,"aria-label":j("navigation.cronjobs"),"aria-current":r==="cronjobs"?"page":void 0,title:j("navigation.cronjobs"),children:[o.jsx(EF,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.cronjobs")})]}),o.jsxs("button",{className:`new-chat new-chat--applications${r==="applications"?" is-active":""}`,onClick:y,"aria-label":j("navigation.automations"),"aria-current":r==="applications"?"page":void 0,title:j("navigation.automations"),children:[o.jsx(sGe,{className:"icon"}),o.jsx("span",{className:"sidebar-nav-label",children:j("navigation.automations")})]})]})]}),T("history")&&o.jsxs("div",{className:"sidebar-history",children:[o.jsxs("div",{className:"history-head",children:[o.jsx("span",{children:j("history.title")}),T("newChat")&&o.jsx("button",{type:"button",className:"history-new-chat",onClick:(u==null?void 0:u.onNew)??d,disabled:u==null?void 0:u.newDisabled,"aria-label":j("history.create"),title:j("history.create"),children:o.jsx(Do,{className:"icon"})})]}),o.jsx("div",{className:"history-list",children:u?o.jsxs(o.Fragment,{children:[u.loading&&u.threads.length===0?o.jsx("div",{className:"history-empty",role:"status",children:j("history.loading")}):null,u.error?o.jsx("div",{className:"history-error",role:"alert",children:u.error}):null,!u.loading&&!u.error&&u.threads.length===0?o.jsx("div",{className:"history-empty",children:j("history.empty")}):null,u.threads.map(H=>{const X=H.id===u.currentThreadId,Q=H.name||H.preview||`Thread ${H.id.slice(0,8)}`,q=H.id===u.busyThreadId;return o.jsxs("div",{className:`history-item ${X?"active":""}`,children:[o.jsxs("button",{type:"button",className:"history-item-btn",onClick:()=>u.onSelect(H.id),"aria-current":X?"page":void 0,title:Q,disabled:q,children:[o.jsx(uK,{title:Q}),X?o.jsx("span",{className:"history-current-badge",children:j("history.current")}):null]}),o.jsx("button",{type:"button",className:"history-more","aria-label":j("history.manage",{title:Q}),title:j("history.more"),disabled:q,onClick:()=>A(U=>U===H.id?null:H.id),children:o.jsx(mW,{className:"icon"})}),L===H.id?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"menu-scrim",onClick:()=>A(null)}),o.jsx("div",{className:"history-menu",children:o.jsxs("button",{type:"button",className:"menu-item menu-item--danger",onClick:()=>{A(null),u.onDelete(H)},children:[o.jsx(pm,{className:"icon"})," ",j("history.delete")]})})]}):null]},H.id)}),u.hasMore?o.jsx("button",{type:"button",className:"history-load-more",disabled:u.loading,onClick:u.onLoadMore,children:u.loading?j("history.loadingMore"):j("history.loadMore")}):null]}):o.jsxs(o.Fragment,{children:[M.length===0?o.jsx("div",{className:"history-empty",children:j("history.empty")}):null,M.map(H=>{const X=H.id===i,Q=(l==null?void 0:l.has(H.id))===!0,q=!Q&&(c==null?void 0:c.has(H.id))===!0;return o.jsxs("div",{className:`history-item ${X?"active":""}`,children:[o.jsxs("button",{className:"history-item-btn",onClick:()=>E(H.id),"aria-current":X?"page":void 0,title:H.title,children:[o.jsx(uK,{title:H.title}),q&&o.jsxs("span",{className:"history-evaluating-status",title:j("history.evaluatingTitle"),children:[o.jsx("span",{className:"history-evaluating","aria-hidden":"true"}),j("history.evaluating")]})]}),o.jsxs("div",{className:"history-action-slot",children:[Q?o.jsx(Bk,{className:"history-streaming-indicator",size:12,role:"status","aria-label":j("history.generating")}):null,o.jsx("button",{type:"button",className:"history-more","aria-label":j("history.manage",{title:H.title}),title:j("history.more"),onClick:()=>A(U=>U===H.id?null:H.id),children:o.jsx(mW,{className:"icon"})})]}),L===H.id&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"menu-scrim",onClick:()=>A(null)}),o.jsx("div",{className:"history-menu",children:o.jsxs("button",{type:"button",className:"menu-item menu-item--danger",onClick:()=>{A(null),C(H.id)},children:[o.jsx(pm,{className:"icon"})," ",j("history.delete")]})})]})]},H.id)})]})})]}),o.jsx("div",{className:"sidebar-footer",children:o.jsx(cGe,{activePage:r,access:a,userInfo:N,onAgentKitCli:w,onDeveloperResources:O,onSystemInfo:k,onIssueFeedback:S,onLogout:_})})]})}function ia(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,i;n{}};function bR(){for(var e=0,t=arguments.length,n={},i;e=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}eA.prototype=bR.prototype={constructor:eA,on:function(e,t){var n=this._,i=fGe(e+"",n),r,s=-1,a=i.length;if(arguments.length<2){for(;++s0)for(var n=new Array(r),i=0,r,s;i=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),fK.hasOwnProperty(t)?{space:fK[t],local:e}:e}function pGe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===q4&&t.documentElement.namespaceURI===q4?t.createElement(e):t.createElementNS(n,e)}}function mGe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Hxe(e){var t=yR(e);return(t.local?mGe:pGe)(t)}function gGe(){}function V7(e){return e==null?gGe:function(){return this.querySelector(e)}}function bGe(e){typeof e!="function"&&(e=V7(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r=w&&(w=x+1);!(k=v[w])&&++w=0;)(a=i[r])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function QGe(e){e||(e=zGe);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var n=this._groups,i=n.length,r=new Array(i),s=0;st?1:e>=t?0:NaN}function VGe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function HGe(){return Array.from(this)}function qGe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?iXe:typeof t=="function"?sXe:rXe)(e,t,n??"")):$v(this.node(),e)}function $v(e,t){return e.style.getPropertyValue(t)||Xxe(e).getComputedStyle(e,null).getPropertyValue(t)}function oXe(e){return function(){delete this[e]}}function lXe(e,t){return function(){this[e]=t}}function cXe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function uXe(e,t){return arguments.length>1?this.each((t==null?oXe:typeof t=="function"?cXe:lXe)(e,t)):this.node()[e]}function Yxe(e){return e.trim().split(/^|\s+/)}function H7(e){return e.classList||new Zxe(e)}function Zxe(e){this._node=e,this._names=Yxe(e.getAttribute("class")||"")}Zxe.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Jxe(e,t){for(var n=H7(e),i=-1,r=t.length;++i=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function $Xe(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,r=t.length,s;n()=>e;function W4(e,{sourceEvent:t,subject:n,target:i,identifier:r,active:s,x:a,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}W4.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function KXe(e){return!e.ctrlKey&&!e.button}function GXe(){return this.parentNode}function XXe(e,t){return t??{x:e.x,y:e.y}}function YXe(){return navigator.maxTouchPoints||"ontouchstart"in this}function s1e(){var e=KXe,t=GXe,n=XXe,i=YXe,r={},s=bR("start","drag","end"),a=0,l,c,u,d,f=0;function h(O){O.on("mousedown.drag",p).filter(i).on("touchstart.drag",v).on("touchmove.drag",y,WXe).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(O,k){if(!(d||!e.call(this,O,k))){var S=w(this,t.call(this,O,k),O,k,"mouse");S&&(Kl(O.view).on("mousemove.drag",g,OS).on("mouseup.drag",b,OS),i1e(O.view),HD(O),u=!1,l=O.clientX,c=O.clientY,S("start",O))}}function g(O){if(Gy(O),!u){var k=O.clientX-l,S=O.clientY-c;u=k*k+S*S>f}r.mouse("drag",O)}function b(O){Kl(O.view).on("mousemove.drag mouseup.drag",null),r1e(O.view,u),Gy(O),r.mouse("end",O)}function v(O,k){if(e.call(this,O,k)){var S=O.changedTouches,E=t.call(this,O,k),C=S.length,N,_;for(N=0;N>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?aT(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?aT(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=JXe.exec(e))?new cl(t[1],t[2],t[3],1):(t=eYe.exec(e))?new cl(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tYe.exec(e))?aT(t[1],t[2],t[3],t[4]):(t=nYe.exec(e))?aT(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=iYe.exec(e))?vK(t[1],t[2]/100,t[3]/100,1):(t=rYe.exec(e))?vK(t[1],t[2]/100,t[3]/100,t[4]):hK.hasOwnProperty(e)?gK(hK[e]):e==="transparent"?new cl(NaN,NaN,NaN,0):null}function gK(e){return new cl(e>>16&255,e>>8&255,e&255,1)}function aT(e,t,n,i){return i<=0&&(e=t=n=NaN),new cl(e,t,n,i)}function oYe(e){return e instanceof Xk||(e=gb(e)),e?(e=e.rgb(),new cl(e.r,e.g,e.b,e.opacity)):new cl}function K4(e,t,n,i){return arguments.length===1?oYe(e):new cl(e,t,n,i??1)}function cl(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}q7(cl,K4,a1e(Xk,{brighter(e){return e=e==null?L_:Math.pow(L_,e),new cl(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?wS:Math.pow(wS,e),new cl(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cl(Jg(this.r),Jg(this.g),Jg(this.b),$_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bK,formatHex:bK,formatHex8:lYe,formatRgb:yK,toString:yK}));function bK(){return`#${Pg(this.r)}${Pg(this.g)}${Pg(this.b)}`}function lYe(){return`#${Pg(this.r)}${Pg(this.g)}${Pg(this.b)}${Pg((isNaN(this.opacity)?1:this.opacity)*255)}`}function yK(){const e=$_(this.opacity);return`${e===1?"rgb(":"rgba("}${Jg(this.r)}, ${Jg(this.g)}, ${Jg(this.b)}${e===1?")":`, ${e})`}`}function $_(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Jg(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Pg(e){return e=Jg(e),(e<16?"0":"")+e.toString(16)}function vK(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Cu(e,t,n,i)}function o1e(e){if(e instanceof Cu)return new Cu(e.h,e.s,e.l,e.opacity);if(e instanceof Xk||(e=gb(e)),!e)return new Cu;if(e instanceof Cu)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),s=Math.max(t,n,i),a=NaN,l=s-r,c=(s+r)/2;return l?(t===s?a=(n-i)/l+(n0&&c<1?0:a,new Cu(a,l,c,e.opacity)}function cYe(e,t,n,i){return arguments.length===1?o1e(e):new Cu(e,t,n,i??1)}function Cu(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}q7(Cu,cYe,a1e(Xk,{brighter(e){return e=e==null?L_:Math.pow(L_,e),new Cu(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?wS:Math.pow(wS,e),new Cu(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new cl(qD(e>=240?e-240:e+120,r,i),qD(e,r,i),qD(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new Cu(xK(this.h),oT(this.s),oT(this.l),$_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$_(this.opacity);return`${e===1?"hsl(":"hsla("}${xK(this.h)}, ${oT(this.s)*100}%, ${oT(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xK(e){return e=(e||0)%360,e<0?e+360:e}function oT(e){return Math.max(0,Math.min(1,e||0))}function qD(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const vR=e=>()=>e;function l1e(e,t){return function(n){return e+n*t}}function uYe(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function FVt(e,t){var n=t-e;return n?l1e(e,n>180||n<-180?n-360*Math.round(n/360):n):vR(isNaN(e)?t:e)}function dYe(e){return(e=+e)==1?c1e:function(t,n){return n-t?uYe(t,n,e):vR(isNaN(t)?n:t)}}function c1e(e,t){var n=t-e;return n?l1e(e,n):vR(isNaN(e)?t:e)}const F_=function e(t){var n=dYe(t);function i(r,s){var a=n((r=K4(r)).r,(s=K4(s)).r),l=n(r.g,s.g),c=n(r.b,s.b),u=c1e(r.opacity,s.opacity);return function(d){return r.r=a(d),r.g=l(d),r.b=c(d),r.opacity=u(d),r+""}}return i.gamma=e,i}(1);function fYe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,i=t.slice(),r;return function(s){for(r=0;rn&&(s=t.slice(n,s),l[a]?l[a]+=s:l[++a]=s),(i=i[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,c.push({i:a,x:bd(i,r)})),n=WD.lastIndex;return n180?d+=360:d-u>180&&(u+=360),h.push({i:f.push(r(f)+"rotate(",null,i)-2,x:bd(u,d)})):d&&f.push(r(f)+"rotate("+d+i)}function l(u,d,f,h){u!==d?h.push({i:f.push(r(f)+"skewX(",null,i)-2,x:bd(u,d)}):d&&f.push(r(f)+"skewX("+d+i)}function c(u,d,f,h,p,g){if(u!==f||d!==h){var b=p.push(r(p)+"scale(",null,",",null,")");g.push({i:b-4,x:bd(u,f)},{i:b-2,x:bd(d,h)})}else(f!==1||h!==1)&&p.push(r(p)+"scale("+f+","+h+")")}return function(u,d){var f=[],h=[];return u=e(u),d=e(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,h),a(u.rotate,d.rotate,f,h),l(u.skewX,d.skewX,f,h),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,h),u=d=null,function(p){for(var g=-1,b=h.length,v;++g=0&&e._call.call(void 0,t),e=e._next;--Fv}function SK(){bb=(U_=kS.now())+xR,Fv=TO=0;try{TYe()}finally{Fv=0,_Ye(),bb=0}}function AYe(){var e=kS.now(),t=e-U_;t>h1e&&(xR-=t,U_=e)}function _Ye(){for(var e,t=B_,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:B_=n);AO=e,Y4(i)}function Y4(e){if(!Fv){TO&&(TO=clearTimeout(TO));var t=e-bb;t>24?(e<1/0&&(TO=setTimeout(SK,e-kS.now()-xR)),D1&&(D1=clearInterval(D1))):(D1||(U_=kS.now(),D1=setInterval(AYe,h1e)),Fv=1,p1e(SK))}}function kK(e,t,n){var i=new Q_;return t=t==null?0:+t,i.restart(r=>{i.stop(),e(r+t)},t,n),i}var NYe=bR("start","end","cancel","interrupt"),jYe=[],g1e=0,EK=1,Z4=2,nA=3,CK=4,J4=5,iA=6;function OR(e,t,n,i,r,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;RYe(e,n,{name:t,index:i,group:r,on:NYe,tween:jYe,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:g1e})}function K7(e,t){var n=Wu(e,t);if(n.state>g1e)throw new Error("too late; already scheduled");return n}function Zd(e,t){var n=Wu(e,t);if(n.state>nA)throw new Error("too late; already running");return n}function Wu(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function RYe(e,t,n){var i=e.__transition,r;i[t]=n,n.timer=m1e(s,0,n.time);function s(u){n.state=EK,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var d,f,h,p;if(n.state!==EK)return c();for(d in i)if(p=i[d],p.name===n.name){if(p.state===nA)return kK(a);p.state===CK?(p.state=iA,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[d]):+dZ4&&i.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function lZe(e,t,n){var i,r,s=oZe(t)?K7:Zd;return function(){var a=s(this,e),l=a.on;l!==i&&(r=(i=l).copy()).on(t,n),a.on=r}}function cZe(e,t){var n=this._id;return arguments.length<2?Wu(this.node(),n).on.on(e):this.each(lZe(n,e,t))}function uZe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function dZe(){return this.on("end.remove",uZe(this._id))}function fZe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=V7(e));for(var i=this._groups,r=i.length,s=new Array(r),a=0;a()=>e;function LZe(e,{sourceEvent:t,target:n,transform:i,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function Yf(e,t,n){this.k=e,this.x=t,this.y=n}Yf.prototype={constructor:Yf,scale:function(e){return e===1?this:new Yf(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Yf(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var wR=new Yf(1,0,0);x1e.prototype=Yf.prototype;function x1e(e){for(;!e.__zoom;)if(!(e=e.parentNode))return wR;return e.__zoom}function KD(e){e.stopImmediatePropagation()}function M1(e){e.preventDefault(),e.stopImmediatePropagation()}function $Ze(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function FZe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function TK(){return this.__zoom||wR}function BZe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function UZe(){return navigator.maxTouchPoints||"ontouchstart"in this}function QZe(e,t,n){var i=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}function O1e(){var e=$Ze,t=FZe,n=QZe,i=BZe,r=UZe,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,c=tA,u=bR("start","zoom","end"),d,f,h,p=500,g=150,b=0,v=10;function y(A){A.property("__zoom",TK).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",N).on("dblclick.zoom",_).filter(r).on("touchstart.zoom",j).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(A,R,P,$){var M=A.selection?A.selection():A;M.property("__zoom",TK),A!==M?k(A,R,P,$):M.interrupt().each(function(){S(this,arguments).event($).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},y.scaleBy=function(A,R,P,$){y.scaleTo(A,function(){var M=this.__zoom.k,B=typeof R=="function"?R.apply(this,arguments):R;return M*B},P,$)},y.scaleTo=function(A,R,P,$){y.transform(A,function(){var M=t.apply(this,arguments),B=this.__zoom,I=P==null?O(M):typeof P=="function"?P.apply(this,arguments):P,H=B.invert(I),X=typeof R=="function"?R.apply(this,arguments):R;return n(w(x(B,X),I,H),M,a)},P,$)},y.translateBy=function(A,R,P,$){y.transform(A,function(){return n(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof P=="function"?P.apply(this,arguments):P),t.apply(this,arguments),a)},null,$)},y.translateTo=function(A,R,P,$,M){y.transform(A,function(){var B=t.apply(this,arguments),I=this.__zoom,H=$==null?O(B):typeof $=="function"?$.apply(this,arguments):$;return n(wR.translate(H[0],H[1]).scale(I.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof P=="function"?-P.apply(this,arguments):-P),B,a)},$,M)};function x(A,R){return R=Math.max(s[0],Math.min(s[1],R)),R===A.k?A:new Yf(R,A.x,A.y)}function w(A,R,P){var $=R[0]-P[0]*A.k,M=R[1]-P[1]*A.k;return $===A.x&&M===A.y?A:new Yf(A.k,$,M)}function O(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function k(A,R,P,$){A.on("start.zoom",function(){S(this,arguments).event($).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event($).end()}).tween("zoom",function(){var M=this,B=arguments,I=S(M,B).event($),H=t.apply(M,B),X=P==null?O(H):typeof P=="function"?P.apply(M,B):P,Q=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),q=M.__zoom,U=typeof R=="function"?R.apply(M,B):R,te=c(q.invert(X).concat(Q/q.k),U.invert(X).concat(Q/U.k));return function(le){if(le===1)le=U;else{var oe=te(le),re=Q/oe[2];le=new Yf(re,X[0]-oe[0]*re,X[1]-oe[1]*re)}I.zoom(null,le)}})}function S(A,R,P){return!P&&A.__zooming||new E(A,R)}function E(A,R){this.that=A,this.args=R,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,R),this.taps=0}E.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,R){return this.mouse&&A!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var R=Kl(this.that).datum();u.call(A,this.that,new LZe(A,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:u}),R)}};function C(A,...R){if(!e.apply(this,arguments))return;var P=S(this,R).event(A),$=this.__zoom,M=Math.max(s[0],Math.min(s[1],$.k*Math.pow(2,i.apply(this,arguments)))),B=wu(A);if(P.wheel)(P.mouse[0][0]!==B[0]||P.mouse[0][1]!==B[1])&&(P.mouse[1]=$.invert(P.mouse[0]=B)),clearTimeout(P.wheel);else{if($.k===M)return;P.mouse=[B,$.invert(B)],rA(this),P.start()}M1(A),P.wheel=setTimeout(I,g),P.zoom("mouse",n(w(x($,M),P.mouse[0],P.mouse[1]),P.extent,a));function I(){P.wheel=null,P.end()}}function N(A,...R){if(h||!e.apply(this,arguments))return;var P=A.currentTarget,$=S(this,R,!0).event(A),M=Kl(A.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",Q,!0),B=wu(A,P),I=A.clientX,H=A.clientY;i1e(A.view),KD(A),$.mouse=[B,this.__zoom.invert(B)],rA(this),$.start();function X(q){if(M1(q),!$.moved){var U=q.clientX-I,te=q.clientY-H;$.moved=U*U+te*te>b}$.event(q).zoom("mouse",n(w($.that.__zoom,$.mouse[0]=wu(q,P),$.mouse[1]),$.extent,a))}function Q(q){M.on("mousemove.zoom mouseup.zoom",null),r1e(q.view,$.moved),M1(q),$.event(q).end()}}function _(A,...R){if(e.apply(this,arguments)){var P=this.__zoom,$=wu(A.changedTouches?A.changedTouches[0]:A,this),M=P.invert($),B=P.k*(A.shiftKey?.5:2),I=n(w(x(P,B),$,M),t.apply(this,R),a);M1(A),l>0?Kl(this).transition().duration(l).call(k,I,$,A):Kl(this).call(y.transform,I,$,A)}}function j(A,...R){if(e.apply(this,arguments)){var P=A.touches,$=P.length,M=S(this,R,A.changedTouches.length===$).event(A),B,I,H,X;for(KD(A),I=0;I<$;++I)H=P[I],X=wu(H,this),X=[X,this.__zoom.invert(X),H.identifier],M.touch0?!M.touch1&&M.touch0[2]!==X[2]&&(M.touch1=X,M.taps=0):(M.touch0=X,B=!0,M.taps=1+!!d);d&&(d=clearTimeout(d)),B&&(M.taps<2&&(f=X[0],d=setTimeout(function(){d=null},p)),rA(this),M.start())}}function T(A,...R){if(this.__zooming){var P=S(this,R).event(A),$=A.changedTouches,M=$.length,B,I,H,X;for(M1(A),B=0;B`Seems like you have not used zustand provider as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:i})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:i}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},ES=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],w1e=["Enter"," ","Escape"],S1e={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Bv;(function(e){e.Strict="strict",e.Loose="loose"})(Bv||(Bv={}));var eb;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(eb||(eb={}));var CS;(function(e){e.Partial="partial",e.Full="full"})(CS||(CS={}));const k1e={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Np;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Np||(Np={}));var TS;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(TS||(TS={}));var Xt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Xt||(Xt={}));const AK={[Xt.Left]:Xt.Right,[Xt.Right]:Xt.Left,[Xt.Top]:Xt.Bottom,[Xt.Bottom]:Xt.Top};function E1e(e){return e===null?null:e?"valid":"invalid"}const C1e=e=>"id"in e&&"source"in e&&"target"in e,zZe=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),X7=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Yk=(e,t=[0,0])=>{const{width:n,height:i}=Uh(e),r=e.origin??t,s=n*r[0],a=i*r[1];return{x:e.position.x-s,y:e.position.y-a}},VZe=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((i,r)=>{const s=typeof r=="string";let a=!t.nodeLookup&&!s?r:void 0;t.nodeLookup&&(a=s?t.nodeLookup.get(r):X7(r)?r:t.nodeLookup.get(r.id));const l=a?z_(a,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return SR(i,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return kR(n)},Zk=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},i=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=SR(n,z_(r)),i=!0)}),i?kR(n):{x:0,y:0,width:0,height:0}},Y7=(e,t,[n,i,r]=[0,0,1],s=!1,a=!1)=>{const l={...Px(t,[n,i,r]),width:t.width/r,height:t.height/r},c=[];for(const u of e.values()){const{measured:d,selectable:f=!0,hidden:h=!1}=u;if(a&&!f||h)continue;const p=d.width??u.width??u.initialWidth??null,g=d.height??u.height??u.initialHeight??null,b=AS(l,Qv(u)),v=(p??0)*(g??0),y=s&&b>0;(!u.internals.handleBounds||y||b>=v||u.dragging)&&c.push(u)}return c},HZe=(e,t)=>{const n=new Set;return e.forEach(i=>{n.add(i.id)}),t.filter(i=>n.has(i.source)||n.has(i.target))};function qZe(e,t){const n=new Map,i=t!=null&&t.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!r.hidden)&&(!i||i.has(r.id))&&n.set(r.id,r)}),n}async function WZe({nodes:e,width:t,height:n,panZoom:i,minZoom:r,maxZoom:s},a){if(e.size===0)return!0;const l=qZe(e,a),c=Zk(l),u=J7(c,t,n,(a==null?void 0:a.minZoom)??r,(a==null?void 0:a.maxZoom)??s,(a==null?void 0:a.padding)??.1);return await i.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),!0}function T1e({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:i=[0,0],nodeExtent:r,onError:s}){const a=n.get(e),l=a.parentId?n.get(a.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=a.origin??i;let f=a.extent||r;if(a.extent==="parent"&&!a.expandParent)if(!l)s==null||s("005",Fu.error005());else{const p=l.measured.width,g=l.measured.height;p&&g&&(f=[[c,u],[c+p,u+g]])}else l&&vb(a.extent)&&(f=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const h=vb(f)?yb(t,f,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&(s==null||s("015",Fu.error015())),{position:{x:h.x-c+(a.measured.width??0)*d[0],y:h.y-u+(a.measured.height??0)*d[1]},positionAbsolute:h}}async function KZe({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:i,onBeforeDelete:r}){const s=new Set(e.map(h=>h.id)),a=[];for(const h of n){if(h.deletable===!1)continue;const p=s.has(h.id),g=!p&&h.parentId&&a.find(b=>b.id===h.parentId);(p||g)&&a.push(h)}const l=new Set(t.map(h=>h.id)),c=i.filter(h=>h.deletable!==!1),d=HZe(a,c);for(const h of c)l.has(h.id)&&!d.find(g=>g.id===h.id)&&d.push(h);if(!r)return{edges:d,nodes:a};const f=await r({nodes:a,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:a}:{edges:[],nodes:[]}:f}const Uv=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),yb=(e={x:0,y:0},t,n)=>({x:Uv(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Uv(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function A1e(e,t,n){const{width:i,height:r}=Uh(n),{x:s,y:a}=n.internals.positionAbsolute;return yb(e,[[s,a],[s+i,a+r]],t)}const _K=(e,t,n)=>en?-Uv(Math.abs(e-n),1,t)/t:0,Z7=(e,t,n=15,i=40)=>{const r=_K(e.x,i,t.width-i)*n,s=_K(e.y,i,t.height-i)*n;return[r,s]},SR=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),e6=({x:e,y:t,width:n,height:i})=>({x:e,y:t,x2:e+n,y2:t+i}),kR=({x:e,y:t,x2:n,y2:i})=>({x:e,y:t,width:n-e,height:i-t}),Qv=(e,t=[0,0])=>{var r,s;const{x:n,y:i}=X7(e)?e.internals.positionAbsolute:Yk(e,t);return{x:n,y:i,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},z_=(e,t=[0,0])=>{var r,s;const{x:n,y:i}=X7(e)?e.internals.positionAbsolute:Yk(e,t);return{x:n,y:i,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:i+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},_1e=(e,t)=>kR(SR(e6(e),e6(t))),AS=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),i=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*i)},NK=e=>Au(e.width)&&Au(e.height)&&Au(e.x)&&Au(e.y),Au=e=>!isNaN(e)&&isFinite(e),N1e=(e,t)=>(n,i)=>{},Jk=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Px=({x:e,y:t},[n,i,r],s=!1,a=[1,1])=>{const l={x:(e-n)/r,y:(t-i)/r};return s?Jk(l,a):l},zv=({x:e,y:t},[n,i,r])=>({x:e*r+n,y:t*r+i});function j0(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function GZe(e,t,n){if(typeof e=="string"||typeof e=="number"){const i=j0(e,n),r=j0(e,t);return{top:i,right:r,bottom:i,left:r,x:r*2,y:i*2}}if(typeof e=="object"){const i=j0(e.top??e.y??0,n),r=j0(e.bottom??e.y??0,n),s=j0(e.left??e.x??0,t),a=j0(e.right??e.x??0,t);return{top:i,right:a,bottom:r,left:s,x:s+a,y:i+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function XZe(e,t,n,i,r,s){const{x:a,y:l}=zv(e,[t,n,i]),{x:c,y:u}=zv({x:e.x+e.width,y:e.y+e.height},[t,n,i]),d=r-c,f=s-u;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}const J7=(e,t,n,i,r,s)=>{const a=GZe(s,t,n),l=(t-a.x)/e.width,c=(n-a.y)/e.height,u=Math.min(l,c),d=Uv(u,i,r),f=e.x+e.width/2,h=e.y+e.height/2,p=t/2-f*d,g=n/2-h*d,b=XZe(e,p,g,d,t,n),v={left:Math.min(b.left-a.left,0),top:Math.min(b.top-a.top,0),right:Math.min(b.right-a.right,0),bottom:Math.min(b.bottom-a.bottom,0)};return{x:p-v.left+v.right,y:g-v.top+v.bottom,zoom:d}},_S=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function vb(e){return e!=null&&e!=="parent"}function Uh(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function eB(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function j1e(e,t={width:0,height:0},n,i,r){const s={...e},a=i.get(n);if(a){const l=a.origin||r;s.x+=a.internals.positionAbsolute.x-(t.width??0)*l[0],s.y+=a.internals.positionAbsolute.y-(t.height??0)*l[1]}return s}function jK(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function YZe(){let e,t;return{promise:new Promise((i,r)=>{e=i,t=r}),resolve:e,reject:t}}function ZZe(e){return{...S1e,...e||{}}}function yw(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:i,containerBounds:r}){const{x:s,y:a}=_u(e),l=Px({x:s-((r==null?void 0:r.left)??0),y:a-((r==null?void 0:r.top)??0)},i),{x:c,y:u}=n?Jk(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const tB=e=>({width:e.offsetWidth,height:e.offsetHeight}),R1e=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},JZe=["INPUT","SELECT","TEXTAREA"];function I1e(e){var i,r;const t=((r=(i=e.composedPath)==null?void 0:i.call(e))==null?void 0:r[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:JZe.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const P1e=e=>"clientX"in e,_u=(e,t)=>{var s,a;const n=P1e(e),i=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,r=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:i-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},RK=(e,t,n,i,r)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(a=>{const l=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:r,position:a.getAttribute("data-handlepos"),x:(l.left-n.left)/i,y:(l.top-n.top)/i,...tB(a)}})};function D1e({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:r,sourceControlY:s,targetControlX:a,targetControlY:l}){const c=e*.125+r*.375+a*.375+n*.125,u=t*.125+s*.375+l*.375+i*.125,d=Math.abs(c-e),f=Math.abs(u-t);return[c,u,d,f]}function uT(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function IK({pos:e,x1:t,y1:n,x2:i,y2:r,c:s}){switch(e){case Xt.Left:return[t-uT(t-i,s),n];case Xt.Right:return[t+uT(i-t,s),n];case Xt.Top:return[t,n-uT(n-r,s)];case Xt.Bottom:return[t,n+uT(r-n,s)]}}function M1e({sourceX:e,sourceY:t,sourcePosition:n=Xt.Bottom,targetX:i,targetY:r,targetPosition:s=Xt.Top,curvature:a=.25}){const[l,c]=IK({pos:n,x1:e,y1:t,x2:i,y2:r,c:a}),[u,d]=IK({pos:s,x1:i,y1:r,x2:e,y2:t,c:a}),[f,h,p,g]=D1e({sourceX:e,sourceY:t,targetX:i,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${t} C${l},${c} ${u},${d} ${i},${r}`,f,h,p,g]}function L1e({sourceX:e,sourceY:t,targetX:n,targetY:i}){const r=Math.abs(n-e)/2,s=n0}const nJe=({source:e,sourceHandle:t,target:n,targetHandle:i})=>`xy-edge__${e}${t||""}-${n}${i||""}`,iJe=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),rJe=(e,t,n={})=>{var s;if(!e.source||!e.target)return(s=n.onError)==null||s.call(n,"006",Fu.error006()),t;const i=n.getEdgeId||nJe;let r;return C1e(e)?r={...e}:r={...e,id:i(e)},iJe(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))};function $1e({sourceX:e,sourceY:t,targetX:n,targetY:i}){const[r,s,a,l]=L1e({sourceX:e,sourceY:t,targetX:n,targetY:i});return[`M ${e},${t}L ${n},${i}`,r,s,a,l]}const PK={[Xt.Left]:{x:-1,y:0},[Xt.Right]:{x:1,y:0},[Xt.Top]:{x:0,y:-1},[Xt.Bottom]:{x:0,y:1}},sJe=({source:e,sourcePosition:t=Xt.Bottom,target:n})=>t===Xt.Left||t===Xt.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function aJe({source:e,sourcePosition:t=Xt.Bottom,target:n,targetPosition:i=Xt.Top,center:r,offset:s,stepPosition:a}){const l=PK[t],c=PK[i],u={x:e.x+l.x*s,y:e.y+l.y*s},d={x:n.x+c.x*s,y:n.y+c.y*s},f=sJe({source:u,sourcePosition:t,target:d}),h=f.x!==0?"x":"y",p=f[h];let g=[],b,v;const y={x:0,y:0},x={x:0,y:0},[,,w,O]=L1e({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[h]*c[h]===-1){h==="x"?(b=r.x??u.x+(d.x-u.x)*a,v=r.y??(u.y+d.y)/2):(b=r.x??(u.x+d.x)/2,v=r.y??u.y+(d.y-u.y)*a);const C=[{x:b,y:u.y},{x:b,y:d.y}],N=[{x:u.x,y:v},{x:d.x,y:v}];l[h]===p?g=h==="x"?C:N:g=h==="x"?N:C}else{const C=[{x:u.x,y:d.y}],N=[{x:d.x,y:u.y}];if(h==="x"?g=l.x===p?N:C:g=l.y===p?C:N,t===i){const A=Math.abs(e[h]-n[h]);if(A<=s){const R=Math.min(s-1,s-A);l[h]===p?y[h]=(u[h]>e[h]?-1:1)*R:x[h]=(d[h]>n[h]?-1:1)*R}}if(t!==i){const A=h==="x"?"y":"x",R=l[h]===c[A],P=u[A]>d[A],$=u[A]=L?(b=(_.x+j.x)/2,v=g[0].y):(b=g[0].x,v=(_.y+j.y)/2)}const k={x:u.x+y.x,y:u.y+y.y},S={x:d.x+x.x,y:d.y+x.y};return[[e,...k.x!==g[0].x||k.y!==g[0].y?[k]:[],...g,...S.x!==g[g.length-1].x||S.y!==g[g.length-1].y?[S]:[],n],b,v,w,O]}function oJe(e,t,n,i){const r=Math.min(DK(e,t)/2,DK(t,n)/2,i),{x:s,y:a}=t;if(e.x===s&&s===n.x||e.y===a&&a===n.y)return`L${s} ${a}`;if(e.y===a){const u=e.xn.id===t):e[0])||null}function t6(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(i=>`${i}=${e[i]}`).join("&")}`:""}function cJe(e,{id:t,defaultColor:n,defaultMarkerStart:i,defaultMarkerEnd:r}){const s=new Set;return e.reduce((a,l)=>([l.markerStart||i,l.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const u=t6(c,t);s.has(u)||(a.push({id:u,color:c.color||n,...c}),s.add(u))}}),a),[]).sort((a,l)=>a.id.localeCompare(l.id))}const F1e=1e3,uJe=10,nB={nodeOrigin:[0,0],nodeExtent:ES,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},dJe={...nB,checkEquality:!0};function iB(e,t){const n={...e};for(const i in t)t[i]!==void 0&&(n[i]=t[i]);return n}function fJe(e,t,n){const i=iB(nB,n);for(const r of e.values())if(r.parentId)sB(r,e,t,i);else{const s=Yk(r,i.nodeOrigin),a=vb(r.extent)?r.extent:i.nodeExtent,l=yb(s,a,Uh(r));r.internals.positionAbsolute=l}}function hJe(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],i=[];for(const r of e.handles){const s={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(s):r.type==="target"&&i.push(s)}return{source:n,target:i}}function rB(e){return e==="manual"}function n6(e,t,n,i={}){var d,f;const r=iB(dJe,i),s={i:0},a=new Map(t),l=r!=null&&r.elevateNodesOnSelect&&!rB(r.zIndexMode)?F1e:0;let c=e.length>0,u=!1;t.clear(),n.clear();for(const h of e){let p=a.get(h.id);if(r.checkEquality&&h===(p==null?void 0:p.internals.userNode))t.set(h.id,p);else{const g=Yk(h,r.nodeOrigin),b=vb(h.extent)?h.extent:r.nodeExtent,v=yb(g,b,Uh(h));p={...r.defaults,...h,measured:{width:(d=h.measured)==null?void 0:d.width,height:(f=h.measured)==null?void 0:f.height},internals:{positionAbsolute:v,handleBounds:hJe(h,p),z:B1e(h,l,r.zIndexMode),userNode:h}},t.set(h.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(c=!1),h.parentId&&sB(p,t,n,i,s),u||(u=h.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function pJe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function sB(e,t,n,i,r){const{elevateNodesOnSelect:s,nodeOrigin:a,nodeExtent:l,zIndexMode:c}=iB(nB,i),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}pJe(e,n),r&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++r.i,d.internals.z=d.internals.z+r.i*uJe),r&&d.internals.rootParentIndex!==void 0&&(r.i=d.internals.rootParentIndex);const f=s&&!rB(c)?F1e:0,{x:h,y:p,z:g}=mJe(e,d,a,l,f,c),{positionAbsolute:b}=e.internals,v=h!==b.x||p!==b.y;(v||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:h,y:p}:b,z:g}})}function B1e(e,t,n){const i=Au(e.zIndex)?e.zIndex:0;return rB(n)?i:i+(e.selected?t:0)}function mJe(e,t,n,i,r,s){const{x:a,y:l}=t.internals.positionAbsolute,c=Uh(e),u=Yk(e,n),d=vb(e.extent)?yb(u,e.extent,c):u;let f=yb({x:a+d.x,y:l+d.y},i,c);e.extent==="parent"&&(f=A1e(f,c,t));const h=B1e(e,r,s),p=t.internals.z??0;return{x:f.x,y:f.y,z:p>=h?p+1:h}}function aB(e,t,n,i=[0,0]){var a;const r=[],s=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const u=((a=s.get(l.parentId))==null?void 0:a.expandedRect)??Qv(c),d=_1e(u,l.rect);s.set(l.parentId,{expandedRect:d,parent:c})}return s.size>0&&s.forEach(({expandedRect:l,parent:c},u)=>{var w;const d=c.internals.positionAbsolute,f=Uh(c),h=c.origin??i,p=l.x0||g>0||y||x)&&(r.push({id:u,type:"position",position:{x:c.position.x-p+y,y:c.position.y-g+x}}),(w=n.get(u))==null||w.forEach(O=>{e.some(k=>k.id===O.id)||r.push({id:O.id,type:"position",position:{x:O.position.x+p,y:O.position.y+g}})})),(f.width0){const p=aB(h,t,n,r);u.push(...p)}return{changes:u,updatedInternals:c}}async function bJe({delta:e,panZoom:t,transform:n,translateExtent:i,width:r,height:s}){if(!t||!e.x&&!e.y)return!1;const a=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,s]],i);return!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2])}function FK(e,t,n,i,r,s){let a=r;const l=i.get(a)||new Map;i.set(a,l.set(n,t)),a=`${r}-${e}`;const c=i.get(a)||new Map;if(i.set(a,c.set(n,t)),s){a=`${r}-${e}-${s}`;const u=i.get(a)||new Map;i.set(a,u.set(n,t))}}function U1e(e,t,n){e.clear(),t.clear();for(const i of n){const{source:r,target:s,sourceHandle:a=null,targetHandle:l=null}=i,c={edgeId:i.id,source:r,target:s,sourceHandle:a,targetHandle:l},u=`${r}-${a}--${s}-${l}`,d=`${s}-${l}--${r}-${a}`;FK("source",c,d,e,r,a),FK("target",c,u,e,s,l),t.set(i.id,i)}}function Q1e(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Q1e(n,t):!1}function BK(e,t,n){var r;let i=e;do{if((r=i==null?void 0:i.matches)!=null&&r.call(i,t))return!0;if(i===n)return!1;i=i==null?void 0:i.parentElement}while(i);return!1}function yJe(e,t,n,i){const r=new Map;for(const[s,a]of e)if((a.selected||a.id===i)&&(!a.parentId||!Q1e(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){const l=e.get(s);l&&r.set(s,{id:s,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return r}function GD({nodeId:e,dragItems:t,nodeLookup:n,dragging:i=!0}){var a,l,c;const r=[];for(const[u,d]of t){const f=(a=n.get(u))==null?void 0:a.internals.userNode;f&&r.push({...f,position:d.position,dragging:i})}if(!e)return[r[0],r];const s=(l=n.get(e))==null?void 0:l.internals.userNode;return[s?{...s,position:((c=t.get(e))==null?void 0:c.position)||s.position,dragging:i}:r[0],r]}function vJe({dragItems:e,snapGrid:t,x:n,y:i}){const r=e.values().next().value;if(!r)return null;const s={x:n-r.distance.x,y:i-r.distance.y},a=Jk(s,t);return{x:a.x-s.x,y:a.y-s.y}}function xJe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:i,onDragStop:r}){let s={x:null,y:null},a=0,l=new Map,c=!1,u={x:0,y:0},d=null,f=!1,h=null,p=!1,g=!1,b=null;function v({noDragClassName:x,handleSelector:w,domNode:O,isSelectable:k,nodeId:S,nodeClickDistance:E=0}){h=Kl(O);function C({x:T,y:L}){const{nodeLookup:A,nodeExtent:R,snapGrid:P,snapToGrid:$,nodeOrigin:M,onNodeDrag:B,onSelectionDrag:I,onError:H,updateNodePositions:X}=t();s={x:T,y:L};let Q=!1;const q=l.size>1,U=q&&R?e6(Zk(l)):null,te=q&&$?vJe({dragItems:l,snapGrid:P,x:T,y:L}):null;for(const[le,oe]of l){if(!A.has(le))continue;let re={x:T-oe.distance.x,y:L-oe.distance.y};$&&(re=te?{x:Math.round(re.x+te.x),y:Math.round(re.y+te.y)}:Jk(re,P));let pe=null;if(q&&R&&!oe.extent&&U){const{positionAbsolute:se}=oe.internals,fe=se.x-U.x+R[0][0],Se=se.x+oe.measured.width-U.x2+R[1][0],Te=se.y-U.y+R[0][1],rt=se.y+oe.measured.height-U.y2+R[1][1];pe=[[fe,Te],[Se,rt]]}const{position:K,positionAbsolute:G}=T1e({nodeId:le,nextPosition:re,nodeLookup:A,nodeExtent:pe||R,nodeOrigin:M,onError:H});Q=Q||oe.position.x!==K.x||oe.position.y!==K.y,oe.position=K,oe.internals.positionAbsolute=G}if(g=g||Q,!!Q&&(X(l,!0),b&&(i||B||!S&&I))){const[le,oe]=GD({nodeId:S,dragItems:l,nodeLookup:A});i==null||i(b,l,le,oe),B==null||B(b,le,oe),S||I==null||I(b,oe)}}async function N(){if(!d)return;const{transform:T,panBy:L,autoPanSpeed:A,autoPanOnNodeDrag:R}=t();if(!R){c=!1,cancelAnimationFrame(a);return}const[P,$]=Z7(u,d,A);(P!==0||$!==0)&&(s.x=(s.x??0)-P/T[2],s.y=(s.y??0)-$/T[2],await L({x:P,y:$})&&C(s)),a=requestAnimationFrame(N)}function _(T){var q;const{nodeLookup:L,multiSelectionActive:A,nodesDraggable:R,transform:P,snapGrid:$,snapToGrid:M,selectNodesOnDrag:B,onNodeDragStart:I,onSelectionDragStart:H,unselectNodesAndEdges:X}=t();f=!0,(!B||!k)&&!A&&S&&((q=L.get(S))!=null&&q.selected||X()),k&&B&&S&&(e==null||e(S));const Q=yw(T.sourceEvent,{transform:P,snapGrid:$,snapToGrid:M,containerBounds:d});if(s=Q,l=yJe(L,R,Q,S),l.size>0&&(n||I||!S&&H)){const[U,te]=GD({nodeId:S,dragItems:l,nodeLookup:L});n==null||n(T.sourceEvent,l,U,te),I==null||I(T.sourceEvent,U,te),S||H==null||H(T.sourceEvent,te)}}const j=s1e().clickDistance(E).on("start",T=>{const{domNode:L,nodeDragThreshold:A,transform:R,snapGrid:P,snapToGrid:$}=t();d=(L==null?void 0:L.getBoundingClientRect())||null,p=!1,g=!1,b=T.sourceEvent,A===0&&_(T),s=yw(T.sourceEvent,{transform:R,snapGrid:P,snapToGrid:$,containerBounds:d}),u=_u(T.sourceEvent,d)}).on("drag",T=>{const{autoPanOnNodeDrag:L,transform:A,snapGrid:R,snapToGrid:P,nodeDragThreshold:$,nodeLookup:M}=t(),B=yw(T.sourceEvent,{transform:A,snapGrid:R,snapToGrid:P,containerBounds:d});if(b=T.sourceEvent,(T.sourceEvent.type==="touchmove"&&T.sourceEvent.touches.length>1||S&&!M.has(S))&&(p=!0),!p){if(!c&&L&&f&&(c=!0,N()),!f){const I=_u(T.sourceEvent,d),H=I.x-u.x,X=I.y-u.y;Math.sqrt(H*H+X*X)>$&&_(T)}(s.x!==B.xSnapped||s.y!==B.ySnapped)&&l&&f&&(u=_u(T.sourceEvent,d),C(B))}}).on("end",T=>{if(!f||p){p&&l.size>0&&t().updateNodePositions(l,!1);return}if(c=!1,f=!1,cancelAnimationFrame(a),l.size>0){const{nodeLookup:L,updateNodePositions:A,onNodeDragStop:R,onSelectionDragStop:P}=t();if(g&&(A(l,!1),g=!1),r||R||!S&&P){const[$,M]=GD({nodeId:S,dragItems:l,nodeLookup:L,dragging:!1});r==null||r(T.sourceEvent,l,$,M),R==null||R(T.sourceEvent,$,M),S||P==null||P(T.sourceEvent,M)}}}).filter(T=>{const L=T.target;return!T.button&&(!x||!BK(L,`.${x}`,O))&&(!w||BK(L,w,O))});h.call(j)}function y(){h==null||h.on(".drag",null)}return{update:v,destroy:y}}function OJe(e,t,n){const i=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())AS(r,Qv(s))>0&&i.push(s);return i}const wJe=250;function SJe(e,t,n,i){var l,c;let r=[],s=1/0;const a=OJe(e,n,t+wJe);for(const u of a){const d=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of d){if(i.nodeId===f.nodeId&&i.type===f.type&&i.id===f.id)continue;const{x:h,y:p}=xb(u,f,f.position,!0),g=Math.sqrt(Math.pow(h-e.x,2)+Math.pow(p-e.y,2));g>t||(g1){const u=i.type==="source"?"target":"source";return r.find(d=>d.type===u)??r[0]}return r[0]}function z1e(e,t,n,i,r,s=!1){var u,d,f;const a=i.get(e);if(!a)return null;const l=r==="strict"?(u=a.internals.handleBounds)==null?void 0:u[t]:[...((d=a.internals.handleBounds)==null?void 0:d.source)??[],...((f=a.internals.handleBounds)==null?void 0:f.target)??[]],c=(n?l==null?void 0:l.find(h=>h.id===n):l==null?void 0:l[0])??null;return c&&s?{...c,...xb(a,c,c.position,!0)}:c}function V1e(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function kJe(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const H1e=()=>!0;function EJe(e,{connectionMode:t,connectionRadius:n,handleId:i,nodeId:r,edgeUpdaterType:s,isTarget:a,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:h,cancelConnection:p,onConnectStart:g,onConnect:b,onConnectEnd:v,isValidConnection:y=H1e,onReconnectEnd:x,updateConnection:w,getTransform:O,getFromHandle:k,autoPanSpeed:S,dragThreshold:E=1,handleDomNode:C}){const N=R1e(e.target);let _=0,j;const{x:T,y:L}=_u(e),A=V1e(s,C),R=l==null?void 0:l.getBoundingClientRect();let P=!1;if(!R||!A)return;const $=z1e(r,A,i,c,t);if(!$)return;let M=_u(e,R),B=!1,I=null,H=!1,X=null;function Q(){if(!d||!R)return;const[K,G]=Z7(M,R,S);h({x:K,y:G}),_=requestAnimationFrame(Q)}const q={...$,nodeId:r,type:A,position:$.position},U=c.get(r);let le={inProgress:!0,isValid:null,from:xb(U,q,Xt.Left,!0),fromHandle:q,fromPosition:q.position,fromNode:U,to:M,toHandle:null,toPosition:AK[q.position],toNode:null,pointer:M};function oe(){P=!0,w(le),g==null||g(e,{nodeId:r,handleId:i,handleType:A})}E===0&&oe();function re(K){if(!P){const{x:rt,y:Be}=_u(K),Me=rt-T,Ie=Be-L;if(!(Me*Me+Ie*Ie>E*E))return;oe()}if(!k()||!q){pe(K);return}const G=O();M=_u(K,R),j=SJe(Px(M,G,!1,[1,1]),n,c,q),B||(Q(),B=!0);const se=q1e(K,{handle:j,connectionMode:t,fromNodeId:r,fromHandleId:i,fromType:a?"target":"source",isValidConnection:y,doc:N,lib:u,flowId:f,nodeLookup:c});X=se.handleDomNode,I=se.connection,H=kJe(!!j,se.isValid);const fe=c.get(r),Se=fe?xb(fe,q,Xt.Left,!0):le.from,Te={...le,from:Se,isValid:H,to:se.toHandle&&H?zv({x:se.toHandle.x,y:se.toHandle.y},G):M,toHandle:se.toHandle,toPosition:H&&se.toHandle?se.toHandle.position:AK[q.position],toNode:se.toHandle?c.get(se.toHandle.nodeId):null,pointer:M};w(Te),le=Te}function pe(K){if(!("touches"in K&&K.touches.length>0)){if(P){(j||X)&&I&&H&&(b==null||b(I));const{inProgress:G,...se}=le,fe={...se,toPosition:le.toHandle?le.toPosition:null};v==null||v(K,fe),s&&(x==null||x(K,fe))}p(),cancelAnimationFrame(_),B=!1,H=!1,I=null,X=null,N.removeEventListener("mousemove",re),N.removeEventListener("mouseup",pe),N.removeEventListener("touchmove",re),N.removeEventListener("touchend",pe)}}N.addEventListener("mousemove",re),N.addEventListener("mouseup",pe),N.addEventListener("touchmove",re),N.addEventListener("touchend",pe)}function q1e(e,{handle:t,connectionMode:n,fromNodeId:i,fromHandleId:r,fromType:s,doc:a,lib:l,flowId:c,isValidConnection:u=H1e,nodeLookup:d}){const f=s==="target",h=t?a.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:p,y:g}=_u(e),b=a.elementFromPoint(p,g),v=b!=null&&b.classList.contains(`${l}-flow__handle`)?b:h,y={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const x=V1e(void 0,v),w=v.getAttribute("data-nodeid"),O=v.getAttribute("data-handleid"),k=v.classList.contains("connectable"),S=v.classList.contains("connectableend");if(!w||!x)return y;const E={source:f?w:i,sourceHandle:f?O:r,target:f?i:w,targetHandle:f?r:O};y.connection=E;const N=k&&S&&(n===Bv.Strict?f&&x==="source"||!f&&x==="target":w!==i||O!==r);y.isValid=N&&u(E),y.toHandle=z1e(w,x,O,d,n,!0)}return y}const i6={onPointerDown:EJe,isValid:q1e};function CJe({domNode:e,panZoom:t,getTransform:n,getViewScale:i}){const r=Kl(e);function s({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:h=!0,inversePan:p=!1}){const g=w=>{if(w.sourceEvent.type!=="wheel"||!t)return;const O=n(),k=w.sourceEvent.ctrlKey&&_S()?10:1,S=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*d,E=O[2]*Math.pow(2,S*k);t.scaleTo(E)};let b=[0,0];const v=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(b=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},y=w=>{const O=n();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!t)return;const k=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],S=[k[0]-b[0],k[1]-b[1]];b=k;const E=i()*Math.max(O[2],Math.log(O[2]))*(p?-1:1),C={x:O[0]-S[0]*E,y:O[1]-S[1]*E},N=[[0,0],[c,u]];t.setViewportConstrained({x:C.x,y:C.y,zoom:O[2]},N,l)},x=O1e().on("start",v).on("zoom",f?y:null).on("zoom.wheel",h?g:null);r.call(x,{})}function a(){r.on("zoom",null)}return{update:s,destroy:a,pointer:wu}}const ER=e=>({x:e.x,y:e.y,zoom:e.k}),XD=({x:e,y:t,zoom:n})=>wR.translate(e,t).scale(n),Sy=(e,t)=>e.target.closest(`.${t}`),W1e=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),TJe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,YD=(e,t=0,n=TJe,i=()=>{})=>{const r=typeof t=="number"&&t>0;return r||i(),r?e.transition().duration(t).ease(n).on("end",i):e},K1e=e=>{const t=e.ctrlKey&&_S()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function AJe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:i,panOnScrollMode:r,panOnScrollSpeed:s,zoomOnPinch:a,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Sy(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(d.ctrlKey&&a){const v=wu(d),y=K1e(d),x=f*Math.pow(2,y);i.scaleTo(n,x,v,d);return}const h=d.deltaMode===1?20:1;let p=r===eb.Vertical?0:d.deltaX*h,g=r===eb.Horizontal?0:d.deltaY*h;!_S()&&d.shiftKey&&r!==eb.Vertical&&(p=d.deltaY*h,g=0),i.translateBy(n,-(p/f)*s,-(g/f)*s,{internal:!0});const b=ER(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(d,b),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(d,b))}}function _Je({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(i,r){const s=i.type==="wheel",a=!t&&s&&!i.ctrlKey,l=Sy(i,e);if(i.ctrlKey&&s&&l&&i.preventDefault(),a||l)return null;i.preventDefault(),n.call(this,i,r)}}function NJe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return i=>{var s,a,l;if((s=i.sourceEvent)!=null&&s.internal)return;const r=ER(i.transform);e.mouseButton=((a=i.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=r,((l=i.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(i.sourceEvent,r))}}function jJe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:i,onPanZoom:r}){return s=>{var a,l;e.usedRightMouseButton=!!(n&&W1e(t,e.mouseButton??0)),(a=s.sourceEvent)!=null&&a.sync||i([s.transform.x,s.transform.y,s.transform.k]),r&&!((l=s.sourceEvent)!=null&&l.internal)&&(r==null||r(s.sourceEvent,ER(s.transform)))}}function RJe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:i,onPanZoomEnd:r,onPaneContextMenu:s}){return a=>{var l;if(!((l=a.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,s&&W1e(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&s(a.sourceEvent),e.usedRightMouseButton=!1,i(!1),r)){const c=ER(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(a.sourceEvent,c)},n?150:0)}}}function IJe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:i,panOnScroll:r,zoomOnDoubleClick:s,userSelectionActive:a,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:d}){return f=>{var v;const h=e||t,p=n&&f.ctrlKey,g=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Sy(f,`${u}-flow__node`)||Sy(f,`${u}-flow__edge`)))return!0;if(!i&&!h&&!r&&!s&&!n||a||d&&!g||Sy(f,l)&&g||Sy(f,c)&&(!g||r&&g&&!e)||!n&&f.ctrlKey&&g)return!1;if(!n&&f.type==="touchstart"&&((v=f.touches)==null?void 0:v.length)>1)return f.preventDefault(),!1;if(!h&&!r&&!p&&g||!i&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(i)&&!i.includes(f.button)&&f.type==="mousedown")return!1;const b=Array.isArray(i)&&i.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||g)&&b}}function PJe({domNode:e,minZoom:t,maxZoom:n,translateExtent:i,viewport:r,onPanZoom:s,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=O1e().scaleExtent([t,n]).translateExtent(i),h=Kl(e).call(f);x({x:r.x,y:r.y,zoom:Uv(r.zoom,t,n)},[[0,0],[d.width,d.height]],i);const p=h.on("wheel.zoom"),g=h.on("dblclick.zoom");f.wheelDelta(K1e);async function b(j,T){return h?new Promise(L=>{f==null||f.interpolate((T==null?void 0:T.interpolate)==="linear"?bw:tA).transform(YD(h,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>L(!0)),j)}):!1}function v({noWheelClassName:j,noPanClassName:T,onPaneContextMenu:L,userSelectionActive:A,panOnScroll:R,panOnDrag:P,panOnScrollMode:$,panOnScrollSpeed:M,preventScrolling:B,zoomOnPinch:I,zoomOnScroll:H,zoomOnDoubleClick:X,zoomActivationKeyPressed:Q,lib:q,onTransformChange:U,connectionInProgress:te,paneClickDistance:le,selectionOnDrag:oe}){A&&!u.isZoomingOrPanning&&y();const re=R&&!Q&&!A;f.clickDistance(oe?1/0:!Au(le)||le<0?0:le);const pe=re?AJe({zoomPanValues:u,noWheelClassName:j,d3Selection:h,d3Zoom:f,panOnScrollMode:$,panOnScrollSpeed:M,zoomOnPinch:I,onPanZoomStart:a,onPanZoom:s,onPanZoomEnd:l}):_Je({noWheelClassName:j,preventScrolling:B,d3ZoomHandler:p});h.on("wheel.zoom",pe,{passive:!1});const K=NJe({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",K);const G=jJe({zoomPanValues:u,panOnDrag:P,onPaneContextMenu:!!L,onPanZoom:s,onTransformChange:U});f.on("zoom",G);const se=RJe({zoomPanValues:u,panOnDrag:P,panOnScroll:R,onPaneContextMenu:L,onPanZoomEnd:l,onDraggingChange:c});f.on("end",se);const fe=IJe({zoomActivationKeyPressed:Q,panOnDrag:P,zoomOnScroll:H,panOnScroll:R,zoomOnDoubleClick:X,zoomOnPinch:I,userSelectionActive:A,noPanClassName:T,noWheelClassName:j,lib:q,connectionInProgress:te});f.filter(fe),X?h.on("dblclick.zoom",g):h.on("dblclick.zoom",null)}function y(){f.on("zoom",null)}async function x(j,T,L){const A=XD(j),R=f==null?void 0:f.constrain()(A,T,L);return R&&await b(R),R}async function w(j,T){const L=XD(j);return await b(L,T),L}function O(j){if(h){const T=XD(j),L=h.property("__zoom");(L.k!==j.zoom||L.x!==j.x||L.y!==j.y)&&(f==null||f.transform(h,T,null,{sync:!0}))}}function k(){const j=h?x1e(h.node()):{x:0,y:0,k:1};return{x:j.x,y:j.y,zoom:j.k}}async function S(j,T){return h?new Promise(L=>{f==null||f.interpolate((T==null?void 0:T.interpolate)==="linear"?bw:tA).scaleTo(YD(h,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>L(!0)),j)}):!1}async function E(j,T){return h?new Promise(L=>{f==null||f.interpolate((T==null?void 0:T.interpolate)==="linear"?bw:tA).scaleBy(YD(h,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>L(!0)),j)}):!1}function C(j){f==null||f.scaleExtent(j)}function N(j){f==null||f.translateExtent(j)}function _(j){const T=!Au(j)||j<0?0:j;f==null||f.clickDistance(T)}return{update:v,destroy:y,setViewport:w,setViewportConstrained:x,getViewport:k,scaleTo:S,scaleBy:E,setScaleExtent:C,setTranslateExtent:N,syncViewport:O,setClickDistance:_}}var Vv;(function(e){e.Line="line",e.Handle="handle"})(Vv||(Vv={}));function DJe({width:e,prevWidth:t,height:n,prevHeight:i,affectsX:r,affectsY:s}){const a=e-t,l=n-i,c=[a>0?1:a<0?-1:0,l>0?1:l<0?-1:0];return a&&r&&(c[0]=c[0]*-1),l&&s&&(c[1]=c[1]*-1),c}function UK(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),i=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:i,affectsY:r}}function lp(e,t){return Math.max(0,t-e)}function cp(e,t){return Math.max(0,e-t)}function dT(e,t,n){return Math.max(0,t-e,e-n)}function QK(e,t){return e?!t:t}function MJe(e,t,n,i,r,s,a,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:d,isVertical:f}=t,h=d&&f,{xSnapped:p,ySnapped:g}=n,{minWidth:b,maxWidth:v,minHeight:y,maxHeight:x}=i,{x:w,y:O,width:k,height:S,aspectRatio:E}=e;let C=Math.floor(d?p-e.pointerX:0),N=Math.floor(f?g-e.pointerY:0);const _=k+(c?-C:C),j=S+(u?-N:N),T=-s[0]*k,L=-s[1]*S;let A=dT(_,b,v),R=dT(j,y,x);if(a){let M=0,B=0;c&&C<0?M=lp(w+C+T,a[0][0]):!c&&C>0&&(M=cp(w+_+T,a[1][0])),u&&N<0?B=lp(O+N+L,a[0][1]):!u&&N>0&&(B=cp(O+j+L,a[1][1])),A=Math.max(A,M),R=Math.max(R,B)}if(l){let M=0,B=0;c&&C>0?M=cp(w+C,l[0][0]):!c&&C<0&&(M=lp(w+_,l[1][0])),u&&N>0?B=cp(O+N,l[0][1]):!u&&N<0&&(B=lp(O+j,l[1][1])),A=Math.max(A,M),R=Math.max(R,B)}if(r){if(d){const M=dT(_/E,y,x)*E;if(A=Math.max(A,M),a){let B=0;!c&&!u||c&&!u&&h?B=cp(O+L+_/E,a[1][1])*E:B=lp(O+L+(c?C:-C)/E,a[0][1])*E,A=Math.max(A,B)}if(l){let B=0;!c&&!u||c&&!u&&h?B=lp(O+_/E,l[1][1])*E:B=cp(O+(c?C:-C)/E,l[0][1])*E,A=Math.max(A,B)}}if(f){const M=dT(j*E,b,v)/E;if(R=Math.max(R,M),a){let B=0;!c&&!u||u&&!c&&h?B=cp(w+j*E+T,a[1][0])/E:B=lp(w+(u?N:-N)*E+T,a[0][0])/E,R=Math.max(R,B)}if(l){let B=0;!c&&!u||u&&!c&&h?B=lp(w+j*E,l[1][0])/E:B=cp(w+(u?N:-N)*E,l[0][0])/E,R=Math.max(R,B)}}}N=N+(N<0?R:-R),C=C+(C<0?A:-A),r&&(h?_>j*E?N=(QK(c,u)?-C:C)/E:C=(QK(c,u)?-N:N)*E:d?(N=C/E,u=c):(C=N*E,c=u));const P=c?w+C:w,$=u?O+N:O;return{width:k+(c?-C:C),height:S+(u?-N:N),x:s[0]*C*(c?-1:1)+P,y:s[1]*N*(u?-1:1)+$}}const G1e={width:0,height:0,x:0,y:0},LJe={...G1e,pointerX:0,pointerY:0,aspectRatio:1};function $Je(e,t,n){const i=t.position.x+e.position.x,r=t.position.y+e.position.y,s=e.measured.width??0,a=e.measured.height??0,l=n[0]*s,c=n[1]*a;return[[i-l,r-c],[i+s-l,r+a-c]]}function FJe({domNode:e,nodeId:t,getStoreItems:n,onChange:i,onEnd:r}){const s=Kl(e);let a={controlDirection:UK("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:h,onResizeStart:p,onResize:g,onResizeEnd:b,shouldResize:v}){let y={...G1e},x={...LJe};a={boundaries:d,resizeDirection:h,keepAspectRatio:f,controlDirection:UK(u)};let w,O=null,k=[],S,E,C,N=!1;const _=s1e().on("start",j=>{const{nodeLookup:T,transform:L,snapGrid:A,snapToGrid:R,nodeOrigin:P,paneDomNode:$}=n();if(w=T.get(t),!w)return;O=($==null?void 0:$.getBoundingClientRect())??null;const{xSnapped:M,ySnapped:B}=yw(j.sourceEvent,{transform:L,snapGrid:A,snapToGrid:R,containerBounds:O});y={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},x={...y,pointerX:M,pointerY:B,aspectRatio:y.width/y.height},S=void 0,E=vb(w.extent)?w.extent:void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(S=T.get(w.parentId)),S&&w.extent==="parent"&&(E=[[0,0],[S.measured.width,S.measured.height]]),k=[],C=void 0;for(const[I,H]of T)if(H.parentId===t&&(k.push({id:I,position:{...H.position},extent:H.extent}),H.extent==="parent"||H.expandParent)){const X=$Je(H,w,H.origin??P);C?C=[[Math.min(X[0][0],C[0][0]),Math.min(X[0][1],C[0][1])],[Math.max(X[1][0],C[1][0]),Math.max(X[1][1],C[1][1])]]:C=X}p==null||p(j,{...y})}).on("drag",j=>{const{transform:T,snapGrid:L,snapToGrid:A,nodeOrigin:R}=n(),P=yw(j.sourceEvent,{transform:T,snapGrid:L,snapToGrid:A,containerBounds:O}),$=[];if(!w)return;const{x:M,y:B,width:I,height:H}=y,X={},Q=w.origin??R,{width:q,height:U,x:te,y:le}=MJe(x,a.controlDirection,P,a.boundaries,a.keepAspectRatio,Q,E,C),oe=q!==I,re=U!==H,pe=te!==M&&oe,K=le!==B&&re;if(!pe&&!K&&!oe&&!re)return;if((pe||K||Q[0]===1||Q[1]===1)&&(X.x=pe?te:y.x,X.y=K?le:y.y,y.x=X.x,y.y=X.y,k.length>0)){const Se=te-M,Te=le-B;for(const rt of k)rt.position={x:rt.position.x-Se+Q[0]*(q-I),y:rt.position.y-Te+Q[1]*(U-H)},$.push(rt)}if((oe||re)&&(X.width=oe&&(!a.resizeDirection||a.resizeDirection==="horizontal")?q:y.width,X.height=re&&(!a.resizeDirection||a.resizeDirection==="vertical")?U:y.height,y.width=X.width,y.height=X.height),S&&w.expandParent){const Se=Q[0]*(X.width??0);X.x&&X.x{N&&(b==null||b(j,{...y}),r==null||r({...y}),N=!1)});s.call(_)}function c(){s.on(".drag",null)}return{update:l,destroy:c}}var X1e={exports:{}},Y1e={};/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -496,151 +496,151 @@ ${n}`}}async function*Z7e({runtimeId:e,region:t,instanceName:n,sessionId:i,follo * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var AR=m,LJe=$fe;function $Je(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FJe=typeof Object.is=="function"?Object.is:$Je,BJe=LJe.useSyncExternalStore,UJe=AR.useRef,QJe=AR.useEffect,zJe=AR.useMemo,VJe=AR.useDebugValue;X1e.useSyncExternalStoreWithSelector=function(e,t,n,i,r){var s=UJe(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=zJe(function(){function c(p){if(!u){if(u=!0,d=p,p=i(p),r!==void 0&&a.hasValue){var g=a.value;if(r(g,p))return f=g}return f=p}if(g=f,FJe(d,p))return g;var b=i(p);return r!==void 0&&r(g,b)?(d=p,g):(d=p,f=b)}var u=!1,d,f,h=n===void 0?null:n;return[function(){return c(t())},h===null?void 0:function(){return c(h())}]},[t,n,i,r]);var l=BJe(e,s[0],s[1]);return QJe(function(){a.hasValue=!0,a.value=l},[l]),VJe(l),l};G1e.exports=X1e;var HJe=G1e.exports;const qJe=px(HJe),WJe={},qK=e=>{let t;const n=new Set,i=(d,f)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,p))}},r=()=>t,c={setState:i,getState:r,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(WJe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(i,r,c);return c},KJe=e=>e?qK(e):qK,{useDebugValue:GJe}=si,{useSyncExternalStoreWithSelector:XJe}=qJe,YJe=e=>e;function Y1e(e,t=YJe,n){const i=XJe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return GJe(i),i}const WK=(e,t)=>{const n=KJe(e),i=(r,s=t)=>Y1e(n,r,s);return Object.assign(i,n),i},ZJe=(e,t)=>e?WK(e,t):WK;function us(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,r]of e)if(!Object.is(r,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1;return!0}const _R=m.createContext(null),JJe=_R.Provider,Z1e=Bu.error001("react");function Ii(e,t){const n=m.useContext(_R);if(n===null)throw new Error(Z1e);return Y1e(n,e,t)}function ds(){const e=m.useContext(_R);if(e===null)throw new Error(Z1e);return m.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const KK={display:"none"},eet={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},J1e="react-flow__node-desc",eOe="react-flow__edge-desc",tet="react-flow__aria-live",net=e=>e.ariaLiveMessage,iet=e=>e.ariaLabelConfig;function ret({rfId:e}){const t=Ii(net);return o.jsx("div",{id:`${tet}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:eet,children:t})}function set({rfId:e,disableKeyboardA11y:t}){const n=Ii(iet);return o.jsxs(o.Fragment,{children:[o.jsx("div",{id:`${J1e}-${e}`,style:KK,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),o.jsx("div",{id:`${eOe}-${e}`,style:KK,children:n["edge.a11yDescription.default"]}),!t&&o.jsx(ret,{rfId:e})]})}const NR=m.forwardRef(({position:e="top-left",children:t,className:n,style:i,...r},s)=>{const a=`${e}`.split("-");return o.jsx("div",{className:sa(["react-flow__panel",n,...a]),style:i,ref:s,...r,children:t})});NR.displayName="Panel";function aet({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:o.jsx(NR,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:o.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const oet=e=>{const t=[],n=[];for(const[,i]of e.nodeLookup)i.selected&&t.push(i.internals.userNode);for(const[,i]of e.edgeLookup)i.selected&&n.push(i);return{selectedNodes:t,selectedEdges:n}},mT=e=>e.id;function cet(e,t){return us(e.selectedNodes.map(mT),t.selectedNodes.map(mT))&&us(e.selectedEdges.map(mT),t.selectedEdges.map(mT))}function uet({onSelectionChange:e}){const t=ds(),{selectedNodes:n,selectedEdges:i}=Ii(oet,cet);return m.useEffect(()=>{const r={nodes:n,edges:i};e==null||e(r),t.getState().onSelectionChangeHandlers.forEach(s=>s(r))},[n,i,e]),null}const det=e=>!!e.onSelectionChangeHandlers;function fet({onSelectionChange:e}){const t=Ii(det);return e||t?o.jsx(uet,{onSelectionChange:e}):null}const tOe=[0,0],het={x:0,y:0,zoom:1},pet=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],GK=[...pet,"rfId"],met=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),XK={translateExtent:AS,nodeOrigin:tOe,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function get(e){const{setNodes:t,setEdges:n,setMinZoom:i,setMaxZoom:r,setTranslateExtent:s,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c}=Ii(met,us),u=ds();m.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=XK,l()}),[]);const d=m.useRef(XK);return m.useEffect(()=>{for(const f of GK){const h=e[f],p=d.current[f];h!==p&&(typeof e[f]>"u"||(f==="nodes"?t(h):f==="edges"?n(h):f==="minZoom"?i(h):f==="maxZoom"?r(h):f==="translateExtent"?s(h):f==="nodeExtent"?a(h):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:GZe(h)}):f==="fitView"?u.setState({fitViewQueued:h}):f==="fitViewOptions"?u.setState({fitViewOptions:h}):u.setState({[f]:h})))}d.current=e},GK.map(f=>e[f])),null}function YK(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function bet(e){var i;const[t,n]=m.useState(e==="system"?null:e);return m.useEffect(()=>{if(e!=="system"){n(e);return}const r=YK(),s=()=>n(r!=null&&r.matches?"dark":"light");return s(),r==null||r.addEventListener("change",s),()=>{r==null||r.removeEventListener("change",s)}},[e]),t!==null?t:(i=YK())!=null&&i.matches?"dark":"light"}const ZK=typeof document<"u"?document:null;function IS(e=null,t={target:ZK,actInsideInputWithModifier:!0}){const[n,i]=m.useState(!1),r=m.useRef(!1),s=m.useRef(new Set([])),[a,l]=m.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` + */var CR=m,BJe=Lfe;function UJe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var QJe=typeof Object.is=="function"?Object.is:UJe,zJe=BJe.useSyncExternalStore,VJe=CR.useRef,HJe=CR.useEffect,qJe=CR.useMemo,WJe=CR.useDebugValue;Y1e.useSyncExternalStoreWithSelector=function(e,t,n,i,r){var s=VJe(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=qJe(function(){function c(p){if(!u){if(u=!0,d=p,p=i(p),r!==void 0&&a.hasValue){var g=a.value;if(r(g,p))return f=g}return f=p}if(g=f,QJe(d,p))return g;var b=i(p);return r!==void 0&&r(g,b)?(d=p,g):(d=p,f=b)}var u=!1,d,f,h=n===void 0?null:n;return[function(){return c(t())},h===null?void 0:function(){return c(h())}]},[t,n,i,r]);var l=zJe(e,s[0],s[1]);return HJe(function(){a.hasValue=!0,a.value=l},[l]),WJe(l),l};X1e.exports=Y1e;var KJe=X1e.exports;const GJe=ux(KJe),XJe={},zK=e=>{let t;const n=new Set,i=(d,f)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,p))}},r=()=>t,c={setState:i,getState:r,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(XJe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(i,r,c);return c},YJe=e=>e?zK(e):zK,{useDebugValue:ZJe}=ri,{useSyncExternalStoreWithSelector:JJe}=GJe,eet=e=>e;function Z1e(e,t=eet,n){const i=JJe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return ZJe(i),i}const VK=(e,t)=>{const n=YJe(e),i=(r,s=t)=>Z1e(n,r,s);return Object.assign(i,n),i},tet=(e,t)=>e?VK(e,t):VK;function cs(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,r]of e)if(!Object.is(r,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1;return!0}const TR=m.createContext(null),net=TR.Provider,J1e=Fu.error001("react");function ji(e,t){const n=m.useContext(TR);if(n===null)throw new Error(J1e);return Z1e(n,e,t)}function us(){const e=m.useContext(TR);if(e===null)throw new Error(J1e);return m.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const HK={display:"none"},iet={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},eOe="react-flow__node-desc",tOe="react-flow__edge-desc",ret="react-flow__aria-live",set=e=>e.ariaLiveMessage,aet=e=>e.ariaLabelConfig;function oet({rfId:e}){const t=ji(set);return o.jsx("div",{id:`${ret}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:iet,children:t})}function cet({rfId:e,disableKeyboardA11y:t}){const n=ji(aet);return o.jsxs(o.Fragment,{children:[o.jsx("div",{id:`${eOe}-${e}`,style:HK,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),o.jsx("div",{id:`${tOe}-${e}`,style:HK,children:n["edge.a11yDescription.default"]}),!t&&o.jsx(oet,{rfId:e})]})}const AR=m.forwardRef(({position:e="top-left",children:t,className:n,style:i,...r},s)=>{const a=`${e}`.split("-");return o.jsx("div",{className:ia(["react-flow__panel",n,...a]),style:i,ref:s,...r,children:t})});AR.displayName="Panel";function uet({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:o.jsx(AR,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:o.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const det=e=>{const t=[],n=[];for(const[,i]of e.nodeLookup)i.selected&&t.push(i.internals.userNode);for(const[,i]of e.edgeLookup)i.selected&&n.push(i);return{selectedNodes:t,selectedEdges:n}},fT=e=>e.id;function fet(e,t){return cs(e.selectedNodes.map(fT),t.selectedNodes.map(fT))&&cs(e.selectedEdges.map(fT),t.selectedEdges.map(fT))}function het({onSelectionChange:e}){const t=us(),{selectedNodes:n,selectedEdges:i}=ji(det,fet);return m.useEffect(()=>{const r={nodes:n,edges:i};e==null||e(r),t.getState().onSelectionChangeHandlers.forEach(s=>s(r))},[n,i,e]),null}const pet=e=>!!e.onSelectionChangeHandlers;function met({onSelectionChange:e}){const t=ji(pet);return e||t?o.jsx(het,{onSelectionChange:e}):null}const nOe=[0,0],get={x:0,y:0,zoom:1},bet=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],qK=[...bet,"rfId"],yet=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),WK={translateExtent:ES,nodeOrigin:nOe,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function vet(e){const{setNodes:t,setEdges:n,setMinZoom:i,setMaxZoom:r,setTranslateExtent:s,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c}=ji(yet,cs),u=us();m.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=WK,l()}),[]);const d=m.useRef(WK);return m.useEffect(()=>{for(const f of qK){const h=e[f],p=d.current[f];h!==p&&(typeof e[f]>"u"||(f==="nodes"?t(h):f==="edges"?n(h):f==="minZoom"?i(h):f==="maxZoom"?r(h):f==="translateExtent"?s(h):f==="nodeExtent"?a(h):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:ZZe(h)}):f==="fitView"?u.setState({fitViewQueued:h}):f==="fitViewOptions"?u.setState({fitViewOptions:h}):u.setState({[f]:h})))}d.current=e},qK.map(f=>e[f])),null}function KK(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function xet(e){var i;const[t,n]=m.useState(e==="system"?null:e);return m.useEffect(()=>{if(e!=="system"){n(e);return}const r=KK(),s=()=>n(r!=null&&r.matches?"dark":"light");return s(),r==null||r.addEventListener("change",s),()=>{r==null||r.removeEventListener("change",s)}},[e]),t!==null?t:(i=KK())!=null&&i.matches?"dark":"light"}const GK=typeof document<"u"?document:null;function NS(e=null,t={target:GK,actInsideInputWithModifier:!0}){const[n,i]=m.useState(!1),r=m.useRef(!1),s=m.useRef(new Set([])),[a,l]=m.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` `).replace(` `,` +`).split(` -`)),d=u.reduce((f,h)=>f.concat(...h),[]);return[u,d]}return[[],[]]},[e]);return m.useEffect(()=>{const c=(t==null?void 0:t.target)??ZK,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=p=>{var v,y;if(r.current=p.ctrlKey||p.metaKey||p.shiftKey||p.altKey,(!r.current||r.current&&!u)&&R1e(p))return!1;const b=eG(p.code,l);if(s.current.add(p[b]),JK(a,s.current,!1)){const x=((y=(v=p.composedPath)==null?void 0:v.call(p))==null?void 0:y[0])||p.target,w=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";t.preventDefault!==!1&&(r.current||!w)&&p.preventDefault(),i(!0)}},f=p=>{const g=eG(p.code,l);JK(a,s.current,!0)?(i(!1),s.current.clear()):s.current.delete(p[g]),p.key==="Meta"&&s.current.clear(),r.current=!1},h=()=>{s.current.clear(),i(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",h),window.addEventListener("contextmenu",h),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",h),window.removeEventListener("contextmenu",h)}}},[e,i]),n}function JK(e,t,n){return e.filter(i=>n||i.length===t.size).some(i=>i.every(r=>t.has(r)))}function eG(e,t){return t.includes(e)?"code":"key"}const yet=()=>{const e=ds();return m.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:i}=e.getState();return i?i.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[i,r,s],panZoom:a}=e.getState();return a?(await a.setViewport({x:t.x??i,y:t.y??r,zoom:t.zoom??s},n),!0):!1},getViewport:()=>{const[t,n,i]=e.getState().transform;return{x:t,y:n,zoom:i}},setCenter:async(t,n,i)=>e.getState().setCenter(t,n,i),fitBounds:async(t,n)=>{const{width:i,height:r,minZoom:s,maxZoom:a,panZoom:l}=e.getState(),c=eB(t,i,r,s,a,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{const{transform:i,snapGrid:r,snapToGrid:s,domNode:a}=e.getState();if(!a)return t;const{x:l,y:c}=a.getBoundingClientRect(),u={x:t.x-l,y:t.y-c},d=n.snapGrid??r,f=n.snapToGrid??s;return $x(u,i,f,d)},flowToScreenPosition:t=>{const{transform:n,domNode:i}=e.getState();if(!i)return t;const{x:r,y:s}=i.getBoundingClientRect(),a=Wv(t,n);return{x:a.x+r,y:a.y+s}}}),[])};function nOe(e,t){const n=[],i=new Map,r=[];for(const s of e)if(s.type==="add"){r.push(s);continue}else if(s.type==="remove"||s.type==="replace")i.set(s.id,[s]);else{const a=i.get(s.id);a?a.push(s):i.set(s.id,[s])}for(const s of t){const a=i.get(s.id);if(!a){n.push(s);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){n.push({...a[0].item});continue}const l={...s};for(const c of a)vet(c,l);n.push(l)}return r.length&&r.forEach(s=>{s.index!==void 0?n.splice(s.index,0,{...s.item}):n.push({...s.item})}),n}function vet(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function iOe(e,t){return nOe(e,t)}function rOe(e,t){return nOe(e,t)}function kg(e,t){return{id:e,type:"select",selected:t}}function Ay(e,t=new Set,n=!1){const i=[];for(const[r,s]of e){const a=t.has(r);!(s.selected===void 0&&!a)&&s.selected!==a&&(n&&(s.selected=a),i.push(kg(s.id,a)))}return i}function tG({items:e=[],lookup:t}){var r;const n=[],i=new Map(e.map(s=>[s.id,s]));for(const[s,a]of e.entries()){const l=t.get(a.id),c=((r=l==null?void 0:l.internals)==null?void 0:r.userNode)??l;c!==void 0&&c!==a&&n.push({id:a.id,item:a,type:"replace"}),c===void 0&&n.push({item:a,type:"add",index:s})}for(const[s]of t)i.get(s)===void 0&&n.push({id:s,type:"remove"});return n}function nG(e){return{id:e.id,type:"remove"}}const xet=_1e();function Oet(e,t,n={}){return tJe(e,t,{...n,onError:n.onError??xet})}const iG=e=>BZe(e),wet=e=>E1e(e);function sOe(e){return m.forwardRef(e)}const ket=typeof window<"u"?m.useLayoutEffect:m.useEffect;function rG(e){const[t,n]=m.useState(BigInt(0)),[i]=m.useState(()=>Eet(()=>n(r=>r+BigInt(1))));return ket(()=>{const r=i.get();r.length&&(e(r),i.reset())},[t]),i}function Eet(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const aOe=m.createContext(null);function Cet({children:e}){const t=ds(),n=m.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:h,fitViewQueued:p,onNodesChangeMiddlewareMap:g}=t.getState();let b=c;for(const y of l)b=typeof y=="function"?y(b):y;let v=tG({items:b,lookup:h});for(const y of g.values())v=y(v);d&&u(b),v.length>0?f==null||f(v):p&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:x,setNodes:w}=t.getState();y&&w(x)})},[]),i=rG(n),r=m.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:h}=t.getState();let p=c;for(const g of l)p=typeof g=="function"?g(p):g;d?u(p):f&&f(tG({items:p,lookup:h}))},[]),s=rG(r),a=m.useMemo(()=>({nodeQueue:i,edgeQueue:s}),[]);return o.jsx(aOe.Provider,{value:a,children:e})}function Tet(){const e=m.useContext(aOe);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Aet=e=>!!e.panZoom;function jR(){const e=yet(),t=ds(),n=Tet(),i=Ii(Aet),r=m.useMemo(()=>{const s=f=>t.getState().nodeLookup.get(f),a=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},c=f=>{var y,x;const{nodeLookup:h,nodeOrigin:p}=t.getState(),g=iG(f)?f:h.get(f.id),b=g.parentId?N1e(g.position,g.measured,g.parentId,h,p):g.position,v={...g,position:b,width:((y=g.measured)==null?void 0:y.width)??g.width,height:((x=g.measured)==null?void 0:x.height)??g.height};return qv(v)},u=(f,h,p={replace:!1})=>{a(g=>g.map(b=>{if(b.id===f){const v=typeof h=="function"?h(b):h;return p.replace&&iG(v)?v:{...b,...v}}return b}))},d=(f,h,p={replace:!1})=>{l(g=>g.map(b=>{if(b.id===f){const v=typeof h=="function"?h(b):h;return p.replace&&wet(v)?v:{...b,...v}}return b}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var h;return(h=s(f))==null?void 0:h.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(h=>({...h}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:a,setEdges:l,addNodes:f=>{const h=Array.isArray(f)?f:[f];n.nodeQueue.push(p=>[...p,...h])},addEdges:f=>{const h=Array.isArray(f)?f:[f];n.edgeQueue.push(p=>[...p,...h])},toObject:()=>{const{nodes:f=[],edges:h=[],transform:p}=t.getState(),[g,b,v]=p;return{nodes:f.map(y=>({...y})),edges:h.map(y=>({...y})),viewport:{x:g,y:b,zoom:v}}},deleteElements:async({nodes:f=[],edges:h=[]})=>{const{nodes:p,edges:g,onNodesDelete:b,onEdgesDelete:v,triggerNodeChanges:y,triggerEdgeChanges:x,onDelete:w,onBeforeDelete:O}=t.getState(),{nodes:k,edges:S}=await HZe({nodesToRemove:f,edgesToRemove:h,nodes:p,edges:g,onBeforeDelete:O}),E=S.length>0,C=k.length>0;if(E){const N=S.map(nG);v==null||v(S),x(N)}if(C){const N=k.map(nG);b==null||b(k),y(N)}return(C||E)&&(w==null||w({nodes:k,edges:S})),{deletedNodes:k,deletedEdges:S}},getIntersectingNodes:(f,h=!0,p)=>{const g=IK(f),b=g?f:c(f),v=p!==void 0;return b?(p||t.getState().nodes).filter(y=>{const x=t.getState().nodeLookup.get(y.id);if(x&&!g&&(y.id===f.id||!x.internals.positionAbsolute))return!1;const w=qv(v?y:x),O=jS(w,b);return h&&O>0||O>=w.width*w.height||O>=b.width*b.height}):[]},isNodeIntersecting:(f,h,p=!0)=>{const b=IK(f)?f:c(f);if(!b)return!1;const v=jS(b,h);return p&&v>0||v>=h.width*h.height||v>=b.width*b.height},updateNode:u,updateNodeData:(f,h,p={replace:!1})=>{u(f,g=>{const b=typeof h=="function"?h(g):h;return p.replace?{...g,data:b}:{...g,data:{...g.data,...b}}},p)},updateEdge:d,updateEdgeData:(f,h,p={replace:!1})=>{d(f,g=>{const b=typeof h=="function"?h(g):h;return p.replace?{...g,data:b}:{...g,data:{...g.data,...b}}},p)},getNodesBounds:f=>{const{nodeLookup:h,nodeOrigin:p}=t.getState();return UZe(f,{nodeLookup:h,nodeOrigin:p})},getHandleConnections:({type:f,id:h,nodeId:p})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${p}-${f}${h?`-${h}`:""}`))==null?void 0:g.values())??[])},getNodeConnections:({type:f,handleId:h,nodeId:p})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${p}${f?h?`-${f}-${h}`:`-${f}`:""}`))==null?void 0:g.values())??[])},fitView:async f=>{const h=t.getState().fitViewResolver??KZe();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:h}),n.nodeQueue.push(p=>[...p]),h.promise}}},[]);return m.useMemo(()=>({...r,...e,viewportInitialized:i}),[i])}const sG=e=>e.selected,_et=typeof window<"u"?window:void 0;function Net({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ds(),{deleteElements:i}=jR(),r=IS(e,{actInsideInputWithModifier:!1}),s=IS(t,{target:_et});m.useEffect(()=>{if(r){const{edges:a,nodes:l}=n.getState();i({nodes:l.filter(sG),edges:a.filter(sG)}),n.setState({nodesSelectionActive:!1})}},[r]),m.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])}function jet(e){const t=ds();m.useEffect(()=>{const n=()=>{var r,s,a,l;if(!e.current||!(((s=(r=e.current).checkVisibility)==null?void 0:s.call(r))??!0))return!1;const i=nB(e.current);(i.height===0||i.width===0)&&((l=(a=t.getState()).onError)==null||l.call(a,"004",Bu.error004())),t.setState({width:i.width||500,height:i.height||500})};if(e.current){n(),window.addEventListener("resize",n);const i=new ResizeObserver(()=>n());return i.observe(e.current),()=>{window.removeEventListener("resize",n),i&&e.current&&i.unobserve(e.current)}}},[])}const RR={position:"absolute",width:"100%",height:"100%",top:0,left:0},Ret=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Iet({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:i=!1,panOnScrollSpeed:r=.5,panOnScrollMode:s=ib.Free,zoomOnDoubleClick:a=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:h,preventScrolling:p=!0,children:g,noWheelClassName:b,noPanClassName:v,onViewportChange:y,isControlledViewport:x,paneClickDistance:w,selectionOnDrag:O}){const k=ds(),S=m.useRef(null),{userSelectionActive:E,lib:C,connectionInProgress:N}=Ii(Ret,us),_=IS(h),j=m.useRef();jet(S);const T=m.useCallback(L=>{y==null||y({x:L[0],y:L[1],zoom:L[2]}),x||k.setState({transform:L})},[y,x]);return m.useEffect(()=>{if(S.current){j.current=jJe({domNode:S.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:P=>k.setState($=>$.paneDragging===P?$:{paneDragging:P}),onPanZoomStart:(P,$)=>{const{onViewportChangeStart:M,onMoveStart:B}=k.getState();B==null||B(P,$),M==null||M($)},onPanZoom:(P,$)=>{const{onViewportChange:M,onMove:B}=k.getState();B==null||B(P,$),M==null||M($)},onPanZoomEnd:(P,$)=>{const{onViewportChangeEnd:M,onMoveEnd:B}=k.getState();B==null||B(P,$),M==null||M($)}});const{x:L,y:A,zoom:R}=j.current.getViewport();return k.setState({panZoom:j.current,transform:[L,A,R],domNode:S.current.closest(".react-flow")}),()=>{var P;(P=j.current)==null||P.destroy()}}},[]),m.useEffect(()=>{var L;(L=j.current)==null||L.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:i,panOnScrollSpeed:r,panOnScrollMode:s,zoomOnDoubleClick:a,panOnDrag:l,zoomActivationKeyPressed:_,preventScrolling:p,noPanClassName:v,userSelectionActive:E,noWheelClassName:b,lib:C,onTransformChange:T,connectionInProgress:N,selectionOnDrag:O,paneClickDistance:w})},[e,t,n,i,r,s,a,l,_,p,v,E,b,C,T,N,O,w]),o.jsx("div",{className:"react-flow__renderer",ref:S,style:RR,children:g})}const Pet=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Det(){const{userSelectionActive:e,userSelectionRect:t}=Ii(Pet,us);return e&&t?o.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const eM=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},Met=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Let({isSelecting:e,selectionKeyPressed:t,selectionMode:n=_S.Full,panOnDrag:i,autoPanOnSelection:r,paneClickDistance:s,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:d,onPaneScroll:f,onPaneMouseEnter:h,onPaneMouseMove:p,onPaneMouseLeave:g,children:b}){const v=m.useRef(0),y=ds(),{userSelectionActive:x,elementsSelectable:w,dragging:O,connectionInProgress:k,panBy:S,autoPanSpeed:E}=Ii(Met,us),C=w&&(e||x),N=m.useRef(null),_=m.useRef(),j=m.useRef(new Set),T=m.useRef(new Set),L=m.useRef(!1),A=m.useRef({x:0,y:0}),R=m.useRef(!1),P=oe=>{if(L.current||k){L.current=!1;return}u==null||u(oe),y.getState().resetSelectedElements(),y.setState({nodesSelectionActive:!1})},$=oe=>{if(Array.isArray(i)&&(i!=null&&i.includes(2))){oe.preventDefault();return}d==null||d(oe)},M=f?oe=>f(oe):void 0,B=oe=>{L.current&&(oe.stopPropagation(),L.current=!1)},I=oe=>{var rt,Be;const{domNode:re,transform:he}=y.getState();if(_.current=re==null?void 0:re.getBoundingClientRect(),!_.current)return;const K=oe.target===N.current;if(!K&&!!oe.target.closest(".nokey")||!e||!(a&&K||t)||oe.button!==0||!oe.isPrimary)return;(Be=(rt=oe.target)==null?void 0:rt.setPointerCapture)==null||Be.call(rt,oe.pointerId),L.current=!1;const{x:de,y:ke}=Nu(oe.nativeEvent,_.current),Te=$x({x:de,y:ke},he);y.setState({userSelectionRect:{width:0,height:0,startX:Te.x,startY:Te.y,x:de,y:ke}}),K||(oe.stopPropagation(),oe.preventDefault())};function H(oe,re){const{userSelectionRect:he}=y.getState();if(!he)return;const{transform:K,nodeLookup:G,edgeLookup:se,connectionLookup:de,triggerNodeChanges:ke,triggerEdgeChanges:Te,defaultEdgeOptions:rt}=y.getState(),Be={x:he.startX,y:he.startY},{x:Me,y:Ie}=Wv(Be,K),qe={startX:Be.x,startY:Be.y,x:oeLe.id)),T.current=new Set;const Ee=(rt==null?void 0:rt.selectable)??!0;for(const Le of j.current){const Y=de.get(Le);if(Y)for(const{edgeId:fe}of Y.values()){const we=se.get(fe);we&&(we.selectable??Ee)&&T.current.add(fe)}}if(!PK(Pe,j.current)){const Le=Ay(G,j.current,!0);ke(Le)}if(!PK(Ve,T.current)){const Le=Ay(se,T.current);Te(Le)}y.setState({userSelectionRect:qe,userSelectionActive:!0,nodesSelectionActive:!1})}function X(){if(!r||!_.current)return;const[oe,re]=J7(A.current,_.current,E);S({x:oe,y:re}).then(he=>{if(!L.current||!he){v.current=requestAnimationFrame(X);return}const{x:K,y:G}=A.current;H(K,G),v.current=requestAnimationFrame(X)})}const Q=()=>{cancelAnimationFrame(v.current),v.current=0,R.current=!1};m.useEffect(()=>()=>Q(),[]);const q=oe=>{const{userSelectionRect:re,transform:he,resetSelectedElements:K}=y.getState();if(!_.current||!re)return;const{x:G,y:se}=Nu(oe.nativeEvent,_.current);A.current={x:G,y:se};const de=Wv({x:re.startX,y:re.startY},he);if(!L.current){const ke=t?0:s;if(Math.hypot(G-de.x,se-de.y)<=ke)return;K(),l==null||l(oe)}L.current=!0,R.current||(X(),R.current=!0),H(G,se)},U=oe=>{var re,he;oe.button===0&&((he=(re=oe.target)==null?void 0:re.releasePointerCapture)==null||he.call(re,oe.pointerId),!x&&oe.target===N.current&&y.getState().userSelectionRect&&(P==null||P(oe)),y.setState({userSelectionActive:!1,userSelectionRect:null}),L.current&&(c==null||c(oe),y.setState({nodesSelectionActive:j.current.size>0})),Q())},te=oe=>{var re,he;(he=(re=oe.target)==null?void 0:re.releasePointerCapture)==null||he.call(re,oe.pointerId),Q()},le=i===!0||Array.isArray(i)&&i.includes(0);return o.jsxs("div",{className:sa(["react-flow__pane",{draggable:le,dragging:O,selection:e}]),onClick:C?void 0:eM(P,N),onContextMenu:eM($,N),onWheel:eM(M,N),onPointerEnter:C?void 0:h,onPointerMove:C?q:p,onPointerUp:C?U:void 0,onPointerCancel:C?te:void 0,onPointerDownCapture:C?I:void 0,onClickCapture:C?B:void 0,onPointerLeave:g,ref:N,style:RR,children:[b,o.jsx(Det,{})]})}function s6({id:e,store:t,unselect:n=!1,nodeRef:i}){const{addSelectedNodes:r,unselectNodesAndEdges:s,multiSelectionActive:a,nodeLookup:l,onError:c}=t.getState(),u=l.get(e);if(!u){c==null||c("012",Bu.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&a)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=i==null?void 0:i.current)==null?void 0:d.blur()})):r([e])}function oOe({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:i,nodeId:r,isSelectable:s,nodeClickDistance:a}){const l=ds(),[c,u]=m.useState(!1),d=m.useRef();return m.useEffect(()=>{d.current=bJe({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{s6({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),m.useEffect(()=>{if(!(t||!e.current||!d.current))return d.current.update({noDragClassName:n,handleSelector:i,domNode:e.current,isSelectable:s,nodeId:r,nodeClickDistance:a}),()=>{var f;(f=d.current)==null||f.destroy()}},[n,i,t,s,e,r,a]),c}const $et=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function lOe(){const e=ds();return m.useCallback(n=>{const{nodeExtent:i,snapToGrid:r,snapGrid:s,nodesDraggable:a,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,h=$et(a),p=r?s[0]:5,g=r?s[1]:5,b=n.direction.x*p*n.factor,v=n.direction.y*g*n.factor;for(const[,y]of u){if(!h(y))continue;let x={x:y.internals.positionAbsolute.x+b,y:y.internals.positionAbsolute.y+v};r&&(x=nE(x,s));const{position:w,positionAbsolute:O}=C1e({nodeId:y.id,nextPosition:x,nodeLookup:u,nodeExtent:i,nodeOrigin:d,onError:l});y.position=w,y.internals.positionAbsolute=O,f.set(y.id,y)}c(f)},[])}const lB=m.createContext(null),Fet=lB.Provider;lB.Consumer;const cOe=()=>m.useContext(lB),Bet=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Uet=(e,t,n)=>i=>{const{connectionClickStartHandle:r,connectionMode:s,connection:a}=i,{fromHandle:l,toHandle:c,isValid:u}=a,d=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:d,clickConnecting:(r==null?void 0:r.nodeId)===e&&(r==null?void 0:r.id)===t&&(r==null?void 0:r.type)===n,isPossibleEndHandle:s===Vv.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!r,valid:d&&u}};function Qet({type:e="source",position:t=Xt.Top,isValidConnection:n,isConnectable:i=!0,isConnectableStart:r=!0,isConnectableEnd:s=!0,id:a,onConnect:l,children:c,className:u,onMouseDown:d,onTouchStart:f,...h},p){var R,P;const g=a||null,b=e==="target",v=ds(),y=cOe(),{connectOnClick:x,noPanClassName:w,rfId:O}=Ii(Bet,us),{connectingFrom:k,connectingTo:S,clickConnecting:E,isPossibleEndHandle:C,connectionInProcess:N,clickConnectionInProcess:_,valid:j}=Ii(Uet(y,g,e),us);y||(P=(R=v.getState()).onError)==null||P.call(R,"010",Bu.error010());const T=$=>{const{defaultEdgeOptions:M,onConnect:B,hasDefaultEdges:I}=v.getState(),H={...M,...$};if(I){const{edges:X,setEdges:Q,onError:q}=v.getState();Q(Oet(H,X,{onError:q}))}B==null||B(H),l==null||l(H)},L=$=>{if(!y)return;const M=I1e($.nativeEvent);if(r&&(M&&$.button===0||!M)){const B=v.getState();r6.onPointerDown($.nativeEvent,{handleDomNode:$.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:b,handleId:g,nodeId:y,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:(...I)=>{var H,X;return(X=(H=v.getState()).onConnectEnd)==null?void 0:X.call(H,...I)},updateConnection:B.updateConnection,onConnect:T,isValidConnection:n||((...I)=>{var H,X;return((X=(H=v.getState()).isValidConnection)==null?void 0:X.call(H,...I))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}M?d==null||d($):f==null||f($)},A=$=>{const{onClickConnectStart:M,onClickConnectEnd:B,connectionClickStartHandle:I,connectionMode:H,isValidConnection:X,lib:Q,rfId:q,nodeLookup:U,connection:te}=v.getState();if(!y||!I&&!r)return;if(!I){M==null||M($.nativeEvent,{nodeId:y,handleId:g,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:y,type:e,id:g}});return}const le=j1e($.target),oe=n||X,{connection:re,isValid:he}=r6.isValid($.nativeEvent,{handle:{nodeId:y,id:g,type:e},connectionMode:H,fromNodeId:I.nodeId,fromHandleId:I.id||null,fromType:I.type,isValidConnection:oe,flowId:q,doc:le,lib:Q,nodeLookup:U});he&&re&&T(re);const K=structuredClone(te);delete K.inProgress,K.toPosition=K.toHandle?K.toHandle.position:null,B==null||B($,K),v.setState({connectionClickStartHandle:null})};return o.jsx("div",{"data-handleid":g,"data-nodeid":y,"data-handlepos":t,"data-id":`${O}-${y}-${g}-${e}`,className:sa(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",w,u,{source:!b,target:b,connectable:i,connectablestart:r,connectableend:s,clickconnecting:E,connectingfrom:k,connectingto:S,valid:j,connectionindicator:i&&(!N||C)&&(N||_?s:r)}]),onMouseDown:L,onTouchStart:L,onClick:x?A:void 0,ref:p,...h,children:c})}const dl=m.memo(sOe(Qet));function zet({data:e,isConnectable:t,sourcePosition:n=Xt.Bottom}){return o.jsxs(o.Fragment,{children:[e==null?void 0:e.label,o.jsx(dl,{type:"source",position:n,isConnectable:t})]})}function Vet({data:e,isConnectable:t,targetPosition:n=Xt.Top,sourcePosition:i=Xt.Bottom}){return o.jsxs(o.Fragment,{children:[o.jsx(dl,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,o.jsx(dl,{type:"source",position:i,isConnectable:t})]})}function Het(){return null}function qet({data:e,isConnectable:t,targetPosition:n=Xt.Top}){return o.jsxs(o.Fragment,{children:[o.jsx(dl,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const K_={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},aG={input:zet,default:Vet,output:qet,group:Het};function Wet(e){var t,n,i,r;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((i=e.style)==null?void 0:i.width),height:e.height??((r=e.style)==null?void 0:r.height)}}const Ket=e=>{const{width:t,height:n,x:i,y:r}=tE(e.nodeLookup,{filter:s=>!!s.selected});return{width:_u(t)?t:null,height:_u(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${i}px,${r}px)`}};function Get({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const i=ds(),{width:r,height:s,transformString:a,userSelectionActive:l}=Ii(Ket,us),c=lOe(),u=m.useRef(null);m.useEffect(()=>{var p;n||(p=u.current)==null||p.focus({preventScroll:!0})},[n]);const d=!l&&r!==null&&s!==null;if(oOe({nodeRef:u,disabled:!d}),!d)return null;const f=e?p=>{const g=i.getState().nodes.filter(b=>b.selected);e(p,g)}:void 0,h=p=>{Object.prototype.hasOwnProperty.call(K_,p.key)&&(p.preventDefault(),c({direction:K_[p.key],factor:p.shiftKey?4:1}))};return o.jsx("div",{className:sa(["react-flow__nodesselection","react-flow__container",t]),style:{transform:a},children:o.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:r,height:s}})})}const oG=typeof window<"u"?window:void 0,Xet=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function uOe({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:r,onPaneContextMenu:s,onPaneScroll:a,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:h,onSelectionEnd:p,multiSelectionKeyCode:g,panActivationKeyCode:b,zoomActivationKeyCode:v,elementsSelectable:y,zoomOnScroll:x,zoomOnPinch:w,panOnScroll:O,panOnScrollSpeed:k,panOnScrollMode:S,zoomOnDoubleClick:E,panOnDrag:C,autoPanOnSelection:N,defaultViewport:_,translateExtent:j,minZoom:T,maxZoom:L,preventScrolling:A,onSelectionContextMenu:R,noWheelClassName:P,noPanClassName:$,disableKeyboardA11y:M,onViewportChange:B,isControlledViewport:I}){const{nodesSelectionActive:H,userSelectionActive:X}=Ii(Xet,us),Q=IS(u,{target:oG}),q=IS(b,{target:oG}),U=q||C,te=q||O,le=d&&U!==!0,oe=Q||X||le;return Net({deleteKeyCode:c,multiSelectionKeyCode:g}),o.jsx(Iet,{onPaneContextMenu:s,elementsSelectable:y,zoomOnScroll:x,zoomOnPinch:w,panOnScroll:te,panOnScrollSpeed:k,panOnScrollMode:S,zoomOnDoubleClick:E,panOnDrag:!Q&&U,defaultViewport:_,translateExtent:j,minZoom:T,maxZoom:L,zoomActivationKeyCode:v,preventScrolling:A,noWheelClassName:P,noPanClassName:$,onViewportChange:B,isControlledViewport:I,paneClickDistance:l,selectionOnDrag:le,children:o.jsxs(Let,{onSelectionStart:h,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:r,onPaneContextMenu:s,onPaneScroll:a,panOnDrag:U,autoPanOnSelection:N,isSelecting:!!oe,selectionMode:f,selectionKeyPressed:Q,paneClickDistance:l,selectionOnDrag:le,children:[e,H&&o.jsx(Get,{onSelectionContextMenu:R,noPanClassName:$,disableKeyboardA11y:M})]})})}uOe.displayName="FlowRenderer";const Yet=m.memo(uOe),Zet=e=>t=>e?Z7(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function Jet(e){return Ii(m.useCallback(Zet(e),[e]),us)}const ett=e=>e.updateNodeInternals;function ttt(){const e=Ii(ett),[t]=m.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const i=new Map;n.forEach(r=>{const s=r.target.getAttribute("data-id");i.set(s,{id:s,nodeElement:r.target,force:!0})}),e(i)}));return m.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function ntt({node:e,nodeType:t,hasDimensions:n,resizeObserver:i}){const r=ds(),s=m.useRef(null),a=m.useRef(null),l=m.useRef(e.sourcePosition),c=m.useRef(e.targetPosition),u=m.useRef(t),d=n&&!!e.internals.handleBounds;return m.useEffect(()=>{s.current&&!e.hidden&&(!d||a.current!==s.current)&&(a.current&&(i==null||i.unobserve(a.current)),i==null||i.observe(s.current),a.current=s.current)},[d,e.hidden]),m.useEffect(()=>()=>{a.current&&(i==null||i.unobserve(a.current),a.current=null)},[]),m.useEffect(()=>{if(s.current){const f=u.current!==t,h=l.current!==e.sourcePosition,p=c.current!==e.targetPosition;(f||h||p)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),s}function itt({id:e,onClick:t,onMouseEnter:n,onMouseMove:i,onMouseLeave:r,onContextMenu:s,onDoubleClick:a,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:h,noPanClassName:p,disableKeyboardA11y:g,rfId:b,nodeTypes:v,nodeClickDistance:y,onError:x}){const{node:w,internals:O,isParent:k}=Ii(oe=>{const re=oe.nodeLookup.get(e),he=oe.parentLookup.has(e);return{node:re,internals:re.internals,isParent:he}},us);let S=w.type||"default",E=(v==null?void 0:v[S])||aG[S];E===void 0&&(x==null||x("003",Bu.error003(S)),S="default",E=(v==null?void 0:v.default)||aG.default);const C=!!(w.draggable||l&&typeof w.draggable>"u"),N=!!(w.selectable||c&&typeof w.selectable>"u"),_=!!(w.connectable||u&&typeof w.connectable>"u"),j=!!(w.focusable||d&&typeof w.focusable>"u"),T=ds(),L=tB(w),A=ntt({node:w,nodeType:S,hasDimensions:L,resizeObserver:f}),R=oOe({nodeRef:A,disabled:w.hidden||!C,noDragClassName:h,handleSelector:w.dragHandle,nodeId:e,isSelectable:N,nodeClickDistance:y}),P=lOe();if(w.hidden)return null;const $=qh(w),M=Wet(w),B=N||C||t||n||i||r,I=n?oe=>n(oe,{...O.userNode}):void 0,H=i?oe=>i(oe,{...O.userNode}):void 0,X=r?oe=>r(oe,{...O.userNode}):void 0,Q=s?oe=>s(oe,{...O.userNode}):void 0,q=a?oe=>a(oe,{...O.userNode}):void 0,U=oe=>{const{selectNodesOnDrag:re,nodeDragThreshold:he}=T.getState();N&&(!re||!C||he>0)&&s6({id:e,store:T,nodeRef:A}),t&&t(oe,{...O.userNode})},te=oe=>{if(!(R1e(oe.nativeEvent)||g)){if(O1e.includes(oe.key)&&N){const re=oe.key==="Escape";s6({id:e,store:T,unselect:re,nodeRef:A})}else if(C&&w.selected&&Object.prototype.hasOwnProperty.call(K_,oe.key)){oe.preventDefault();const{ariaLabelConfig:re}=T.getState();T.setState({ariaLiveMessage:re["node.a11yDescription.ariaLiveMessage"]({direction:oe.key.replace("Arrow","").toLowerCase(),x:~~O.positionAbsolute.x,y:~~O.positionAbsolute.y})}),P({direction:K_[oe.key],factor:oe.shiftKey?4:1})}}},le=()=>{var de;if(g||!((de=A.current)!=null&&de.matches(":focus-visible")))return;const{transform:oe,width:re,height:he,autoPanOnNodeFocus:K,setCenter:G}=T.getState();if(!K)return;Z7(new Map([[e,w]]),{x:0,y:0,width:re,height:he},oe,!0).length>0||G(w.position.x+$.width/2,w.position.y+$.height/2,{zoom:oe[2]})};return o.jsx("div",{className:sa(["react-flow__node",`react-flow__node-${S}`,{[p]:C},w.className,{selected:w.selected,selectable:N,parent:k,draggable:C,dragging:R}]),ref:A,style:{zIndex:O.z,transform:`translate(${O.positionAbsolute.x}px,${O.positionAbsolute.y}px)`,pointerEvents:B?"all":"none",visibility:L?"visible":"hidden",...w.style,...M},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:H,onMouseLeave:X,onContextMenu:Q,onClick:U,onDoubleClick:q,onKeyDown:j?te:void 0,tabIndex:j?0:void 0,onFocus:j?le:void 0,role:w.ariaRole??(j?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${J1e}-${b}`,"aria-label":w.ariaLabel,...w.domAttributes,children:o.jsx(Fet,{value:e,children:o.jsx(E,{id:e,data:w.data,type:S,positionAbsoluteX:O.positionAbsolute.x,positionAbsoluteY:O.positionAbsolute.y,selected:w.selected??!1,selectable:N,draggable:C,deletable:w.deletable??!0,isConnectable:_,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:R,dragHandle:w.dragHandle,zIndex:O.z,parentId:w.parentId,...$})})})}var rtt=m.memo(itt);const stt=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function dOe(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:r,onError:s}=Ii(stt,us),a=Jet(e.onlyRenderVisibleElements),l=ttt();return o.jsx("div",{className:"react-flow__nodes",style:RR,children:a.map(c=>o.jsx(rtt,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:s},c))})}dOe.displayName="NodeRenderer";const att=m.memo(dOe);function ott(e){return Ii(m.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const i=[];if(n.width&&n.height)for(const r of n.edges){const s=n.nodeLookup.get(r.source),a=n.nodeLookup.get(r.target);s&&a&&ZZe({sourceNode:s,targetNode:a,width:n.width,height:n.height,transform:n.transform})&&i.push(r.id)}return i},[e]),us)}const ltt=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return o.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},ctt=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return o.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},lG={[NS.Arrow]:ltt,[NS.ArrowClosed]:ctt};function utt(e){const t=ds();return m.useMemo(()=>{var r,s;return Object.prototype.hasOwnProperty.call(lG,e)?lG[e]:((s=(r=t.getState()).onError)==null||s.call(r,"009",Bu.error009(e)),null)},[e])}const dtt=({id:e,type:t,color:n,width:i=12.5,height:r=12.5,markerUnits:s="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const c=utt(t);return c?o.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${i}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:l,refX:"0",refY:"0",children:o.jsx(c,{color:n,strokeWidth:a})}):null},fOe=({defaultColor:e,rfId:t})=>{const n=Ii(s=>s.edges),i=Ii(s=>s.defaultEdgeOptions),r=m.useMemo(()=>aJe(n,{id:t,defaultColor:e,defaultMarkerStart:i==null?void 0:i.markerStart,defaultMarkerEnd:i==null?void 0:i.markerEnd}),[n,i,t,e]);return r.length?o.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:o.jsx("defs",{children:r.map(s=>o.jsx(dtt,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};fOe.displayName="MarkerDefinitions";var ftt=m.memo(fOe);function hOe({x:e,y:t,label:n,labelStyle:i,labelShowBg:r=!0,labelBgStyle:s,labelBgPadding:a=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...d}){const[f,h]=m.useState({x:1,y:0,width:0,height:0}),p=sa(["react-flow__edge-textwrapper",u]),g=m.useRef(null);return m.useEffect(()=>{if(g.current){const b=g.current.getBBox();h({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?o.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:p,visibility:f.width?"visible":"hidden",...d,children:[r&&o.jsx("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:s,rx:l,ry:l}),o.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:g,style:i,children:n}),c]}):null}hOe.displayName="EdgeText";const htt=m.memo(hOe);function iE({path:e,labelX:t,labelY:n,label:i,labelStyle:r,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return o.jsxs(o.Fragment,{children:[o.jsx("path",{...d,d:e,fill:"none",className:sa(["react-flow__edge-path",d.className])}),u?o.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,i&&_u(t)&&_u(n)?o.jsx(htt,{x:t,y:n,label:i,labelStyle:r,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function cG({pos:e,x1:t,y1:n,x2:i,y2:r}){return e===Xt.Left||e===Xt.Right?[.5*(t+i),n]:[t,.5*(n+r)]}function pOe({sourceX:e,sourceY:t,sourcePosition:n=Xt.Bottom,targetX:i,targetY:r,targetPosition:s=Xt.Top}){const[a,l]=cG({pos:n,x1:e,y1:t,x2:i,y2:r}),[c,u]=cG({pos:s,x1:i,y1:r,x2:e,y2:t}),[d,f,h,p]=P1e({sourceX:e,sourceY:t,targetX:i,targetY:r,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${a},${l} ${c},${u} ${i},${r}`,d,f,h,p]}function mOe(e){return m.memo(({id:t,sourceX:n,sourceY:i,targetX:r,targetY:s,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:p,style:g,markerEnd:b,markerStart:v,interactionWidth:y})=>{const[x,w,O]=pOe({sourceX:n,sourceY:i,sourcePosition:a,targetX:r,targetY:s,targetPosition:l}),k=e.isInternal?void 0:t;return o.jsx(iE,{id:k,path:x,labelX:w,labelY:O,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:p,style:g,markerEnd:b,markerStart:v,interactionWidth:y})})}const ptt=mOe({isInternal:!1}),gOe=mOe({isInternal:!0});ptt.displayName="SimpleBezierEdge";gOe.displayName="SimpleBezierEdgeInternal";function bOe(e){return m.memo(({id:t,sourceX:n,sourceY:i,targetX:r,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,sourcePosition:p=Xt.Bottom,targetPosition:g=Xt.Top,markerEnd:b,markerStart:v,pathOptions:y,interactionWidth:x})=>{const[w,O,k]=W_({sourceX:n,sourceY:i,sourcePosition:p,targetX:r,targetY:s,targetPosition:g,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset,stepPosition:y==null?void 0:y.stepPosition}),S=e.isInternal?void 0:t;return o.jsx(iE,{id:S,path:w,labelX:O,labelY:k,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:b,markerStart:v,interactionWidth:x})})}const yOe=bOe({isInternal:!1}),vOe=bOe({isInternal:!0});yOe.displayName="SmoothStepEdge";vOe.displayName="SmoothStepEdgeInternal";function xOe(e){return m.memo(({id:t,...n})=>{var r;const i=e.isInternal?void 0:t;return o.jsx(yOe,{...n,id:i,pathOptions:m.useMemo(()=>{var s;return{borderRadius:0,offset:(s=n.pathOptions)==null?void 0:s.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const mtt=xOe({isInternal:!1}),OOe=xOe({isInternal:!0});mtt.displayName="StepEdge";OOe.displayName="StepEdgeInternal";function wOe(e){return m.memo(({id:t,sourceX:n,sourceY:i,targetX:r,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,interactionWidth:b})=>{const[v,y,x]=L1e({sourceX:n,sourceY:i,targetX:r,targetY:s}),w=e.isInternal?void 0:t;return o.jsx(iE,{id:w,path:v,labelX:y,labelY:x,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,interactionWidth:b})})}const gtt=wOe({isInternal:!1}),SOe=wOe({isInternal:!0});gtt.displayName="StraightEdge";SOe.displayName="StraightEdgeInternal";function kOe(e){return m.memo(({id:t,sourceX:n,sourceY:i,targetX:r,targetY:s,sourcePosition:a=Xt.Bottom,targetPosition:l=Xt.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:p,style:g,markerEnd:b,markerStart:v,pathOptions:y,interactionWidth:x})=>{const[w,O,k]=D1e({sourceX:n,sourceY:i,sourcePosition:a,targetX:r,targetY:s,targetPosition:l,curvature:y==null?void 0:y.curvature}),S=e.isInternal?void 0:t;return o.jsx(iE,{id:S,path:w,labelX:O,labelY:k,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:p,style:g,markerEnd:b,markerStart:v,interactionWidth:x})})}const btt=kOe({isInternal:!1}),EOe=kOe({isInternal:!0});btt.displayName="BezierEdge";EOe.displayName="BezierEdgeInternal";const uG={default:EOe,straight:SOe,step:OOe,smoothstep:vOe,simplebezier:gOe},dG={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},ytt=(e,t,n)=>n===Xt.Left?e-t:n===Xt.Right?e+t:e,vtt=(e,t,n)=>n===Xt.Top?e-t:n===Xt.Bottom?e+t:e,fG="react-flow__edgeupdater";function hG({position:e,centerX:t,centerY:n,radius:i=10,onMouseDown:r,onMouseEnter:s,onMouseOut:a,type:l}){return o.jsx("circle",{onMouseDown:r,onMouseEnter:s,onMouseOut:a,className:sa([fG,`${fG}-${l}`]),cx:ytt(t,i,e),cy:vtt(n,i,e),r:i,stroke:"transparent",fill:"transparent"})}function xtt({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:i,sourceY:r,targetX:s,targetY:a,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:h,setUpdateHover:p}){const g=ds(),b=(O,k)=>{if(O.button!==0)return;const{autoPanOnConnect:S,domNode:E,connectionMode:C,connectionRadius:N,lib:_,onConnectStart:j,cancelConnection:T,nodeLookup:L,rfId:A,panBy:R,updateConnection:P}=g.getState(),$=k.type==="target",M=(H,X)=>{h(!1),f==null||f(H,n,k.type,X)},B=H=>u==null?void 0:u(n,H),I=(H,X)=>{h(!0),d==null||d(O,n,k.type),j==null||j(H,X)};r6.onPointerDown(O.nativeEvent,{autoPanOnConnect:S,connectionMode:C,connectionRadius:N,domNode:E,handleId:k.id,nodeId:k.nodeId,nodeLookup:L,isTarget:$,edgeUpdaterType:k.type,lib:_,flowId:A,cancelConnection:T,panBy:R,isValidConnection:(...H)=>{var X,Q;return((Q=(X=g.getState()).isValidConnection)==null?void 0:Q.call(X,...H))??!0},onConnect:B,onConnectStart:I,onConnectEnd:(...H)=>{var X,Q;return(Q=(X=g.getState()).onConnectEnd)==null?void 0:Q.call(X,...H)},onReconnectEnd:M,updateConnection:P,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:O.currentTarget})},v=O=>b(O,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),y=O=>b(O,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),x=()=>p(!0),w=()=>p(!1);return o.jsxs(o.Fragment,{children:[(e===!0||e==="source")&&o.jsx(hG,{position:l,centerX:i,centerY:r,radius:t,onMouseDown:v,onMouseEnter:x,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&o.jsx(hG,{position:c,centerX:s,centerY:a,radius:t,onMouseDown:y,onMouseEnter:x,onMouseOut:w,type:"target"})]})}function Ott({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:i,onClick:r,onDoubleClick:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:h,onReconnectEnd:p,rfId:g,edgeTypes:b,noPanClassName:v,onError:y,disableKeyboardA11y:x}){let w=Ii(G=>G.edgeLookup.get(e));const O=Ii(G=>G.defaultEdgeOptions);w=O?{...O,...w}:w;let k=w.type||"default",S=(b==null?void 0:b[k])||uG[k];S===void 0&&(y==null||y("011",Bu.error011(k)),k="default",S=(b==null?void 0:b.default)||uG.default);const E=!!(w.focusable||t&&typeof w.focusable>"u"),C=typeof f<"u"&&(w.reconnectable||n&&typeof w.reconnectable>"u"),N=!!(w.selectable||i&&typeof w.selectable>"u"),_=m.useRef(null),[j,T]=m.useState(!1),[L,A]=m.useState(!1),R=ds(),{zIndex:P,sourceX:$,sourceY:M,targetX:B,targetY:I,sourcePosition:H,targetPosition:X}=Ii(m.useCallback(G=>{const se=G.nodeLookup.get(w.source),de=G.nodeLookup.get(w.target);if(!se||!de)return{zIndex:w.zIndex,...dG};const ke=sJe({id:e,sourceNode:se,targetNode:de,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:G.connectionMode,onError:y});return{zIndex:YZe({selected:w.selected,zIndex:w.zIndex,sourceNode:se,targetNode:de,elevateOnSelect:G.elevateEdgesOnSelect,zIndexMode:G.zIndexMode}),...ke||dG}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),us),Q=m.useMemo(()=>w.markerStart?`url('#${n6(w.markerStart,g)}')`:void 0,[w.markerStart,g]),q=m.useMemo(()=>w.markerEnd?`url('#${n6(w.markerEnd,g)}')`:void 0,[w.markerEnd,g]);if(w.hidden||$===null||M===null||B===null||I===null)return null;const U=G=>{var Te;const{addSelectedEdges:se,unselectNodesAndEdges:de,multiSelectionActive:ke}=R.getState();N&&(R.setState({nodesSelectionActive:!1}),w.selected&&ke?(de({nodes:[],edges:[w]}),(Te=_.current)==null||Te.blur()):se([e])),r&&r(G,w)},te=s?G=>{s(G,{...w})}:void 0,le=a?G=>{a(G,{...w})}:void 0,oe=l?G=>{l(G,{...w})}:void 0,re=c?G=>{c(G,{...w})}:void 0,he=u?G=>{u(G,{...w})}:void 0,K=G=>{var se;if(!x&&O1e.includes(G.key)&&N){const{unselectNodesAndEdges:de,addSelectedEdges:ke}=R.getState();G.key==="Escape"?((se=_.current)==null||se.blur(),de({edges:[w]})):ke([e])}};return o.jsx("svg",{style:{zIndex:P},children:o.jsxs("g",{className:sa(["react-flow__edge",`react-flow__edge-${k}`,w.className,v,{selected:w.selected,animated:w.animated,inactive:!N&&!r,updating:j,selectable:N}]),onClick:U,onDoubleClick:te,onContextMenu:le,onMouseEnter:oe,onMouseMove:re,onMouseLeave:he,onKeyDown:E?K:void 0,tabIndex:E?0:void 0,role:w.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":E?`${eOe}-${g}`:void 0,ref:_,...w.domAttributes,children:[!L&&o.jsx(S,{id:e,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:N,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:$,sourceY:M,targetX:B,targetY:I,sourcePosition:H,targetPosition:X,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:Q,markerEnd:q,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),C&&o.jsx(xtt,{edge:w,isReconnectable:C,reconnectRadius:d,onReconnect:f,onReconnectStart:h,onReconnectEnd:p,sourceX:$,sourceY:M,targetX:B,targetY:I,sourcePosition:H,targetPosition:X,setUpdateHover:T,setReconnecting:A})]})})}var wtt=m.memo(Ott);const Stt=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function COe({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:i,noPanClassName:r,onReconnect:s,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:h,onReconnectStart:p,onReconnectEnd:g,disableKeyboardA11y:b}){const{edgesFocusable:v,edgesReconnectable:y,elementsSelectable:x,onError:w}=Ii(Stt,us),O=ott(t);return o.jsxs("div",{className:"react-flow__edges",children:[o.jsx(ftt,{defaultColor:e,rfId:n}),O.map(k=>o.jsx(wtt,{id:k,edgesFocusable:v,edgesReconnectable:y,elementsSelectable:x,noPanClassName:r,onReconnect:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:h,onReconnectStart:p,onReconnectEnd:g,rfId:n,onError:w,edgeTypes:i,disableKeyboardA11y:b},k))]})}COe.displayName="EdgeRenderer";const ktt=m.memo(COe),Ett=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Ctt({children:e}){const t=Ii(Ett);return o.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Ttt(e){const t=jR(),n=m.useRef(!1);m.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const Att=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function _tt(e){const t=Ii(Att),n=ds();return m.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Ntt(e){return e.connection.inProgress?{...e.connection,to:$x(e.connection.to,e.transform)}:{...e.connection}}function jtt(e){return Ntt}function Rtt(e){const t=jtt();return Ii(t,us)}const Itt=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Ptt({containerStyle:e,style:t,type:n,component:i}){const{nodesConnectable:r,width:s,height:a,isValid:l,inProgress:c}=Ii(Itt,us);return!(s&&r&&c)?null:o.jsx("svg",{style:e,width:s,height:a,className:"react-flow__connectionline react-flow__container",children:o.jsx("g",{className:sa(["react-flow__connection",k1e(l)]),children:o.jsx(TOe,{style:t,type:n,CustomComponent:i,isValid:l})})})}const TOe=({style:e,type:t=Dp.Bezier,CustomComponent:n,isValid:i})=>{const{inProgress:r,from:s,fromNode:a,fromHandle:l,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:h,pointer:p}=Rtt();if(!r)return;if(n)return o.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:a,fromHandle:l,fromX:s.x,fromY:s.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:h,connectionStatus:k1e(i),toNode:d,toHandle:f,pointer:p});let g="";const b={sourceX:s.x,sourceY:s.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:h};switch(t){case Dp.Bezier:[g]=D1e(b);break;case Dp.SimpleBezier:[g]=pOe(b);break;case Dp.Step:[g]=W_({...b,borderRadius:0});break;case Dp.SmoothStep:[g]=W_(b);break;default:[g]=L1e(b)}return o.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};TOe.displayName="ConnectionLine";const Dtt={};function pG(e=Dtt){m.useRef(e),ds(),m.useEffect(()=>{},[e])}function Mtt(){ds(),m.useRef(!1),m.useEffect(()=>{},[])}function AOe({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:i,onEdgeClick:r,onNodeDoubleClick:s,onEdgeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:h,onSelectionEnd:p,connectionLineType:g,connectionLineStyle:b,connectionLineComponent:v,connectionLineContainerStyle:y,selectionKeyCode:x,selectionOnDrag:w,selectionMode:O,multiSelectionKeyCode:k,panActivationKeyCode:S,zoomActivationKeyCode:E,deleteKeyCode:C,onlyRenderVisibleElements:N,elementsSelectable:_,defaultViewport:j,translateExtent:T,minZoom:L,maxZoom:A,preventScrolling:R,defaultMarkerColor:P,zoomOnScroll:$,zoomOnPinch:M,panOnScroll:B,panOnScrollSpeed:I,panOnScrollMode:H,zoomOnDoubleClick:X,panOnDrag:Q,autoPanOnSelection:q,onPaneClick:U,onPaneMouseEnter:te,onPaneMouseMove:le,onPaneMouseLeave:oe,onPaneScroll:re,onPaneContextMenu:he,paneClickDistance:K,nodeClickDistance:G,onEdgeContextMenu:se,onEdgeMouseEnter:de,onEdgeMouseMove:ke,onEdgeMouseLeave:Te,reconnectRadius:rt,onReconnect:Be,onReconnectStart:Me,onReconnectEnd:Ie,noDragClassName:qe,noWheelClassName:Pe,noPanClassName:Ve,disableKeyboardA11y:Ee,nodeExtent:Le,rfId:Y,viewport:fe,onViewportChange:we}){return pG(e),pG(t),Mtt(),Ttt(n),_tt(fe),o.jsx(Yet,{onPaneClick:U,onPaneMouseEnter:te,onPaneMouseMove:le,onPaneMouseLeave:oe,onPaneContextMenu:he,onPaneScroll:re,paneClickDistance:K,deleteKeyCode:C,selectionKeyCode:x,selectionOnDrag:w,selectionMode:O,onSelectionStart:h,onSelectionEnd:p,multiSelectionKeyCode:k,panActivationKeyCode:S,zoomActivationKeyCode:E,elementsSelectable:_,zoomOnScroll:$,zoomOnPinch:M,zoomOnDoubleClick:X,panOnScroll:B,panOnScrollSpeed:I,panOnScrollMode:H,panOnDrag:Q,autoPanOnSelection:q,defaultViewport:j,translateExtent:T,minZoom:L,maxZoom:A,onSelectionContextMenu:f,preventScrolling:R,noDragClassName:qe,noWheelClassName:Pe,noPanClassName:Ve,disableKeyboardA11y:Ee,onViewportChange:we,isControlledViewport:!!fe,children:o.jsxs(Ctt,{children:[o.jsx(ktt,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:a,onReconnect:Be,onReconnectStart:Me,onReconnectEnd:Ie,onlyRenderVisibleElements:N,onEdgeContextMenu:se,onEdgeMouseEnter:de,onEdgeMouseMove:ke,onEdgeMouseLeave:Te,reconnectRadius:rt,defaultMarkerColor:P,noPanClassName:Ve,disableKeyboardA11y:Ee,rfId:Y}),o.jsx(Ptt,{style:b,type:g,component:v,containerStyle:y}),o.jsx("div",{className:"react-flow__edgelabel-renderer"}),o.jsx(att,{nodeTypes:e,onNodeClick:i,onNodeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:G,onlyRenderVisibleElements:N,noPanClassName:Ve,noDragClassName:qe,disableKeyboardA11y:Ee,nodeExtent:Le,rfId:Y}),o.jsx("div",{className:"react-flow__viewport-portal"})]})})}AOe.displayName="GraphView";const Ltt=m.memo(AOe),$tt=_1e(),mG=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:r,height:s,fitView:a,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:h="basic"}={})=>{const p=new Map,g=new Map,b=new Map,v=new Map,y=i??t??[],x=n??e??[],w=d??[0,0],O=f??AS;B1e(b,v,y);const{nodesInitialized:k}=i6(x,p,g,{nodeOrigin:w,nodeExtent:O,zIndexMode:h});let S=[0,0,1];if(a&&r&&s){const E=tE(p,{filter:j=>!!((j.width||j.initialWidth)&&(j.height||j.initialHeight))}),{x:C,y:N,zoom:_}=eB(E,r,s,c,u,(l==null?void 0:l.padding)??.1);S=[C,N,_]}return{rfId:"1",width:r??0,height:s??0,transform:S,nodes:x,nodesInitialized:k,nodeLookup:p,parentLookup:g,edges:y,edgeLookup:v,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:i!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:AS,nodeExtent:O,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Vv.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:l,fitViewResolver:null,connection:{...S1e},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:$tt,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:w1e,zIndexMode:h,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Ftt=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:r,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:h})=>ZJe((p,g)=>{async function b(){const{nodeLookup:v,panZoom:y,fitViewOptions:x,fitViewResolver:w,width:O,height:k,minZoom:S,maxZoom:E}=g();y&&(await VZe({nodes:v,width:O,height:k,panZoom:y,minZoom:S,maxZoom:E},x),w==null||w.resolve(!0),p({fitViewResolver:null}))}return{...mG({nodes:e,edges:t,width:r,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:n,defaultEdges:i,zIndexMode:h}),setNodes:v=>{const{nodeLookup:y,parentLookup:x,nodeOrigin:w,elevateNodesOnSelect:O,fitViewQueued:k,zIndexMode:S,nodesSelectionActive:E}=g(),{nodesInitialized:C,hasSelectedNodes:N}=i6(v,y,x,{nodeOrigin:w,nodeExtent:f,elevateNodesOnSelect:O,checkEquality:!0,zIndexMode:S}),_=E&&N;k&&C?(b(),p({nodes:v,nodesInitialized:C,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:_})):p({nodes:v,nodesInitialized:C,nodesSelectionActive:_})},setEdges:v=>{const{connectionLookup:y,edgeLookup:x}=g();B1e(y,x,v),p({edges:v})},setDefaultNodesAndEdges:(v,y)=>{if(v){const{setNodes:x}=g();x(v),p({hasDefaultNodes:!0})}if(y){const{setEdges:x}=g();x(y),p({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:y,nodeLookup:x,parentLookup:w,domNode:O,nodeOrigin:k,nodeExtent:S,debug:E,fitViewQueued:C,zIndexMode:N}=g(),{changes:_,updatedInternals:j}=hJe(v,x,w,O,k,S,N);j&&(cJe(x,w,{nodeOrigin:k,nodeExtent:S,zIndexMode:N}),C?(b(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),(_==null?void 0:_.length)>0&&(E&&console.log("React Flow: trigger node changes",_),y==null||y(_)))},updateNodePositions:(v,y=!1)=>{const x=[];let w=[];const{nodeLookup:O,triggerNodeChanges:k,connection:S,updateConnection:E,onNodesChangeMiddlewareMap:C}=g();for(const[N,_]of v){const j=O.get(N),T=!!(j!=null&&j.expandParent&&(j!=null&&j.parentId)&&(_!=null&&_.position)),L={id:N,type:"position",position:T?{x:Math.max(0,_.position.x),y:Math.max(0,_.position.y)}:_.position,dragging:y};if(j&&S.inProgress&&S.fromNode.id===j.id){const A=Sb(j,S.fromHandle,Xt.Left,!0);E({...S,from:A})}T&&j.parentId&&x.push({id:N,parentId:j.parentId,rect:{..._.internals.positionAbsolute,width:_.measured.width??0,height:_.measured.height??0}}),w.push(L)}if(x.length>0){const{parentLookup:N,nodeOrigin:_}=g(),j=oB(x,O,N,_);w.push(...j)}for(const N of C.values())w=N(w);k(w)},triggerNodeChanges:v=>{const{onNodesChange:y,setNodes:x,nodes:w,hasDefaultNodes:O,debug:k}=g();if(v!=null&&v.length){if(O){const S=iOe(v,w);x(S)}k&&console.log("React Flow: trigger node changes",v),y==null||y(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:y,setEdges:x,edges:w,hasDefaultEdges:O,debug:k}=g();if(v!=null&&v.length){if(O){const S=rOe(v,w);x(S)}k&&console.log("React Flow: trigger edge changes",v),y==null||y(v)}},addSelectedNodes:v=>{const{multiSelectionActive:y,edgeLookup:x,nodeLookup:w,triggerNodeChanges:O,triggerEdgeChanges:k}=g();if(y){const S=v.map(E=>kg(E,!0));O(S);return}O(Ay(w,new Set([...v]),!0)),k(Ay(x))},addSelectedEdges:v=>{const{multiSelectionActive:y,edgeLookup:x,nodeLookup:w,triggerNodeChanges:O,triggerEdgeChanges:k}=g();if(y){const S=v.map(E=>kg(E,!0));k(S);return}k(Ay(x,new Set([...v]))),O(Ay(w,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:y}={})=>{const{edges:x,nodes:w,nodeLookup:O,triggerNodeChanges:k,triggerEdgeChanges:S}=g(),E=v||w,C=y||x,N=[];for(const j of E){if(!j.selected)continue;const T=O.get(j.id);T&&(T.selected=!1),N.push(kg(j.id,!1))}const _=[];for(const j of C)j.selected&&_.push(kg(j.id,!1));k(N),S(_)},setMinZoom:v=>{const{panZoom:y,maxZoom:x}=g();y==null||y.setScaleExtent([v,x]),p({minZoom:v})},setMaxZoom:v=>{const{panZoom:y,minZoom:x}=g();y==null||y.setScaleExtent([x,v]),p({maxZoom:v})},setTranslateExtent:v=>{var y;(y=g().panZoom)==null||y.setTranslateExtent(v),p({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:y,triggerNodeChanges:x,triggerEdgeChanges:w,elementsSelectable:O}=g();if(!O)return;const k=y.reduce((E,C)=>C.selected?[...E,kg(C.id,!1)]:E,[]),S=v.reduce((E,C)=>C.selected?[...E,kg(C.id,!1)]:E,[]);x(k),w(S)},setNodeExtent:v=>{const{nodes:y,nodeLookup:x,parentLookup:w,nodeOrigin:O,elevateNodesOnSelect:k,nodeExtent:S,zIndexMode:E}=g();v[0][0]===S[0][0]&&v[0][1]===S[0][1]&&v[1][0]===S[1][0]&&v[1][1]===S[1][1]||(i6(y,x,w,{nodeOrigin:O,nodeExtent:v,elevateNodesOnSelect:k,checkEquality:!1,zIndexMode:E}),p({nodeExtent:v}))},panBy:v=>{const{transform:y,width:x,height:w,panZoom:O,translateExtent:k}=g();return pJe({delta:v,panZoom:O,transform:y,translateExtent:k,width:x,height:w})},setCenter:async(v,y,x)=>{const{width:w,height:O,maxZoom:k,panZoom:S}=g();if(!S)return!1;const E=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:k;return await S.setViewport({x:w/2-v*E,y:O/2-y*E,zoom:E},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),!0},cancelConnection:()=>{p({connection:{...S1e}})},updateConnection:v=>{p({connection:v})},reset:()=>p({...mG()})}},Object.is);function _Oe({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:i,initialWidth:r,initialHeight:s,initialMinZoom:a,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:p}){const[g]=m.useState(()=>Ftt({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:r,height:s,fitView:u,minZoom:a,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h}));return o.jsx(JJe,{value:g,children:o.jsx(Cet,{children:p})})}function Btt({children:e,nodes:t,edges:n,defaultNodes:i,defaultEdges:r,width:s,height:a,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:h,zIndexMode:p}){return m.useContext(_R)?o.jsx(o.Fragment,{children:e}):o.jsx(_Oe,{initialNodes:t,initialEdges:n,defaultNodes:i,defaultEdges:r,initialWidth:s,initialHeight:a,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:h,zIndexMode:p,children:e})}const Utt={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Qtt({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,className:r,nodeTypes:s,edgeTypes:a,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:h,onConnect:p,onConnectStart:g,onConnectEnd:b,onClickConnectStart:v,onClickConnectEnd:y,onNodeMouseEnter:x,onNodeMouseMove:w,onNodeMouseLeave:O,onNodeContextMenu:k,onNodeDoubleClick:S,onNodeDragStart:E,onNodeDrag:C,onNodeDragStop:N,onNodesDelete:_,onEdgesDelete:j,onDelete:T,onSelectionChange:L,onSelectionDragStart:A,onSelectionDrag:R,onSelectionDragStop:P,onSelectionContextMenu:$,onSelectionStart:M,onSelectionEnd:B,onBeforeDelete:I,connectionMode:H,connectionLineType:X=Dp.Bezier,connectionLineStyle:Q,connectionLineComponent:q,connectionLineContainerStyle:U,deleteKeyCode:te="Backspace",selectionKeyCode:le="Shift",selectionOnDrag:oe=!1,selectionMode:re=_S.Full,panActivationKeyCode:he="Space",multiSelectionKeyCode:K=RS()?"Meta":"Control",zoomActivationKeyCode:G=RS()?"Meta":"Control",snapToGrid:se,snapGrid:de,onlyRenderVisibleElements:ke=!1,selectNodesOnDrag:Te,nodesDraggable:rt,autoPanOnNodeFocus:Be,nodesConnectable:Me,nodesFocusable:Ie,nodeOrigin:qe=tOe,edgesFocusable:Pe,edgesReconnectable:Ve,elementsSelectable:Ee=!0,defaultViewport:Le=het,minZoom:Y=.5,maxZoom:fe=2,translateExtent:we=AS,preventScrolling:Ke=!0,nodeExtent:Je,defaultMarkerColor:Tt="#b1b1b7",zoomOnScroll:Ne=!0,zoomOnPinch:ve=!0,panOnScroll:He=!1,panOnScrollSpeed:it=.5,panOnScrollMode:Ae=ib.Free,zoomOnDoubleClick:Kt=!0,panOnDrag:gn=!0,onPaneClick:Wt,onPaneMouseEnter:Ot,onPaneMouseMove:Nt,onPaneMouseLeave:at,onPaneScroll:bt,onPaneContextMenu:_e,paneClickDistance:st=1,nodeClickDistance:je=0,children:gt,onReconnect:ut,onReconnectStart:ye,onReconnectEnd:ze,onEdgeContextMenu:et,onEdgeDoubleClick:Et,onEdgeMouseEnter:_t,onEdgeMouseMove:rn,onEdgeMouseLeave:en,reconnectRadius:on=10,onNodesChange:J,onEdgesChange:Lt,noDragClassName:An="nodrag",noWheelClassName:De="nowheel",noPanClassName:pt="nopan",fitView:ot,fitViewOptions:qn,connectOnClick:ai,attributionPosition:ei,proOptions:Ki,defaultEdgeOptions:$e,elevateNodesOnSelect:ht=!0,elevateEdgesOnSelect:Yt=!1,disableKeyboardA11y:hn=!1,autoPanOnConnect:nn,autoPanOnNodeDrag:Ti,autoPanOnSelection:Bn=!0,autoPanSpeed:yi,connectionRadius:ci,isValidConnection:vi,onError:En,style:sr,id:di,nodeDragThreshold:Hi,connectionDragThreshold:fs,viewport:Sr,onViewportChange:Fr,width:js,height:Br,colorMode:vs="light",debug:Rs,onScroll:hs,ariaLabelConfig:ya,zIndexMode:Nr="basic",...Ws},Pa){const es=di||"1",va=bet(vs),oa=m.useCallback(ps=>{ps.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),hs==null||hs(ps)},[hs]);return o.jsx("div",{"data-testid":"rf__wrapper",...Ws,onScroll:oa,style:{...sr,...Utt},ref:Pa,className:sa(["react-flow",r,va]),id:di,role:"application",children:o.jsxs(Btt,{nodes:e,edges:t,width:js,height:Br,fitView:ot,fitViewOptions:qn,minZoom:Y,maxZoom:fe,nodeOrigin:qe,nodeExtent:Je,zIndexMode:Nr,children:[o.jsx(get,{nodes:e,edges:t,defaultNodes:n,defaultEdges:i,onConnect:p,onConnectStart:g,onConnectEnd:b,onClickConnectStart:v,onClickConnectEnd:y,nodesDraggable:rt,autoPanOnNodeFocus:Be,nodesConnectable:Me,nodesFocusable:Ie,edgesFocusable:Pe,edgesReconnectable:Ve,elementsSelectable:Ee,elevateNodesOnSelect:ht,elevateEdgesOnSelect:Yt,minZoom:Y,maxZoom:fe,nodeExtent:Je,onNodesChange:J,onEdgesChange:Lt,snapToGrid:se,snapGrid:de,connectionMode:H,translateExtent:we,connectOnClick:ai,defaultEdgeOptions:$e,fitView:ot,fitViewOptions:qn,onNodesDelete:_,onEdgesDelete:j,onDelete:T,onNodeDragStart:E,onNodeDrag:C,onNodeDragStop:N,onSelectionDrag:R,onSelectionDragStart:A,onSelectionDragStop:P,onMove:d,onMoveStart:f,onMoveEnd:h,noPanClassName:pt,nodeOrigin:qe,rfId:es,autoPanOnConnect:nn,autoPanOnNodeDrag:Ti,autoPanSpeed:yi,onError:En,connectionRadius:ci,isValidConnection:vi,selectNodesOnDrag:Te,nodeDragThreshold:Hi,connectionDragThreshold:fs,onBeforeDelete:I,debug:Rs,ariaLabelConfig:ya,zIndexMode:Nr}),o.jsx(Ltt,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:w,onNodeMouseLeave:O,onNodeContextMenu:k,onNodeDoubleClick:S,nodeTypes:s,edgeTypes:a,connectionLineType:X,connectionLineStyle:Q,connectionLineComponent:q,connectionLineContainerStyle:U,selectionKeyCode:le,selectionOnDrag:oe,selectionMode:re,deleteKeyCode:te,multiSelectionKeyCode:K,panActivationKeyCode:he,zoomActivationKeyCode:G,onlyRenderVisibleElements:ke,defaultViewport:Le,translateExtent:we,minZoom:Y,maxZoom:fe,preventScrolling:Ke,zoomOnScroll:Ne,zoomOnPinch:ve,zoomOnDoubleClick:Kt,panOnScroll:He,panOnScrollSpeed:it,panOnScrollMode:Ae,panOnDrag:gn,autoPanOnSelection:Bn,onPaneClick:Wt,onPaneMouseEnter:Ot,onPaneMouseMove:Nt,onPaneMouseLeave:at,onPaneScroll:bt,onPaneContextMenu:_e,paneClickDistance:st,nodeClickDistance:je,onSelectionContextMenu:$,onSelectionStart:M,onSelectionEnd:B,onReconnect:ut,onReconnectStart:ye,onReconnectEnd:ze,onEdgeContextMenu:et,onEdgeDoubleClick:Et,onEdgeMouseEnter:_t,onEdgeMouseMove:rn,onEdgeMouseLeave:en,reconnectRadius:on,defaultMarkerColor:Tt,noDragClassName:An,noWheelClassName:De,noPanClassName:pt,rfId:es,disableKeyboardA11y:hn,nodeExtent:Je,viewport:Sr,onViewportChange:Fr}),o.jsx(fet,{onSelectionChange:L}),gt,o.jsx(aet,{proOptions:Ki,position:ei}),o.jsx(set,{rfId:es,disableKeyboardA11y:hn})]})})}var ztt=sOe(Qtt);const Vtt=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function Htt({children:e}){const t=Ii(Vtt);return t?Fi.createPortal(e,t):null}function qtt(e){const[t,n]=m.useState(e),i=m.useCallback(r=>n(s=>iOe(r,s)),[]);return[t,n,i]}function Wtt(e){const[t,n]=m.useState(e),i=m.useCallback(r=>n(s=>rOe(r,s)),[]);return[t,n,i]}const Ktt=e=>t=>{if(!e.includeHiddenNodes)return t.nodesInitialized;if(t.nodeLookup.size===0)return!1;for(const[,{internals:n}]of t.nodeLookup)if(n.handleBounds===void 0||!tB(n.userNode))return!1;return!0};function Gtt(e={includeHiddenNodes:!1}){return Ii(Ktt(e))}function Xtt({dimensions:e,lineWidth:t,variant:n,className:i}){return o.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:sa(["react-flow__background-pattern",n,i])})}function Ytt({radius:e,className:t}){return o.jsx("circle",{cx:e,cy:e,r:e,className:sa(["react-flow__background-pattern","dots",t])})}var am;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(am||(am={}));const Ztt={[am.Dots]:1,[am.Lines]:1,[am.Cross]:6},Jtt=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function NOe({id:e,variant:t=am.Dots,gap:n=20,size:i,lineWidth:r=1,offset:s=0,color:a,bgColor:l,style:c,className:u,patternClassName:d}){const f=m.useRef(null),{transform:h,patternId:p}=Ii(Jtt,us),g=i||Ztt[t],b=t===am.Dots,v=t===am.Cross,y=Array.isArray(n)?n:[n,n],x=[y[0]*h[2]||1,y[1]*h[2]||1],w=g*h[2],O=Array.isArray(s)?s:[s,s],k=v?[w,w]:x,S=[O[0]*h[2]||1+k[0]/2,O[1]*h[2]||1+k[1]/2],E=`${p}${e||""}`;return o.jsxs("svg",{className:sa(["react-flow__background",u]),style:{...c,...RR,"--xy-background-color-props":l,"--xy-background-pattern-color-props":a},ref:f,"data-testid":"rf__background",children:[o.jsx("pattern",{id:E,x:h[0]%x[0],y:h[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:b?o.jsx(Ytt,{radius:w/2,className:d}):o.jsx(Xtt,{dimensions:k,lineWidth:r,variant:t,className:d})}),o.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}NOe.displayName="Background";const ent=m.memo(NOe);function tnt(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:o.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function nnt(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:o.jsx("path",{d:"M0 0h32v4.2H0z"})})}function int(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:o.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function rnt(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function snt(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function gT({children:e,className:t,...n}){return o.jsx("button",{type:"button",className:sa(["react-flow__controls-button",t]),...n,children:e})}const ant=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function jOe({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:i=!0,fitViewOptions:r,onZoomIn:s,onZoomOut:a,onFitView:l,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:h="vertical","aria-label":p}){const g=ds(),{isInteractive:b,minZoomReached:v,maxZoomReached:y,ariaLabelConfig:x}=Ii(ant,us),{zoomIn:w,zoomOut:O,fitView:k}=jR(),S=()=>{w(),s==null||s()},E=()=>{O(),a==null||a()},C=()=>{k(r),l==null||l()},N=()=>{g.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),c==null||c(!b)},_=h==="horizontal"?"horizontal":"vertical";return o.jsxs(NR,{className:sa(["react-flow__controls",_,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":p??x["controls.ariaLabel"],children:[t&&o.jsxs(o.Fragment,{children:[o.jsx(gT,{onClick:S,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:y,children:o.jsx(tnt,{})}),o.jsx(gT,{onClick:E,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:v,children:o.jsx(nnt,{})})]}),n&&o.jsx(gT,{className:"react-flow__controls-fitview",onClick:C,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:o.jsx(int,{})}),i&&o.jsx(gT,{className:"react-flow__controls-interactive",onClick:N,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:b?o.jsx(snt,{}):o.jsx(rnt,{})}),d]})}jOe.displayName="Controls";const ont=m.memo(jOe);function lnt({id:e,x:t,y:n,width:i,height:r,style:s,color:a,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:h,onClick:p}){const{background:g,backgroundColor:b}=s||{},v=a||g||b;return o.jsx("rect",{className:sa(["react-flow__minimap-node",{selected:h},u]),x:t,y:n,rx:d,ry:d,width:i,height:r,style:{fill:v,stroke:l,strokeWidth:c},shapeRendering:f,onClick:p?y=>p(y,e):void 0})}const cnt=m.memo(lnt),unt=e=>e.nodes.map(t=>t.id),tM=e=>e instanceof Function?e:()=>e;function dnt({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:i=5,nodeStrokeWidth:r,nodeComponent:s=cnt,onClick:a}){const l=Ii(unt,us),c=tM(t),u=tM(e),d=tM(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return o.jsx(o.Fragment,{children:l.map(h=>o.jsx(hnt,{id:h,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:i,nodeStrokeWidth:r,NodeComponent:s,onClick:a,shapeRendering:f},h))})}function fnt({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:i,nodeBorderRadius:r,nodeStrokeWidth:s,shapeRendering:a,NodeComponent:l,onClick:c}){const{node:u,x:d,y:f,width:h,height:p}=Ii(g=>{const b=g.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};const v=b.internals.userNode,{x:y,y:x}=b.internals.positionAbsolute,{width:w,height:O}=qh(v);return{node:v,x:y,y:x,width:w,height:O}},us);return!u||u.hidden||!tB(u)?null:o.jsx(l,{x:d,y:f,width:h,height:p,style:u.style,selected:!!u.selected,className:i(u),color:t(u),borderRadius:r,strokeColor:n(u),strokeWidth:s,shapeRendering:a,onClick:c,id:u.id})}const hnt=m.memo(fnt);var pnt=m.memo(dnt);const mnt=200,gnt=150,bnt=e=>!e.hidden,ynt=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?A1e(tE(e.nodeLookup,{filter:bnt}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},vnt="react-flow__minimap-desc";function ROe({style:e,className:t,nodeStrokeColor:n,nodeColor:i,nodeClassName:r="",nodeBorderRadius:s=5,nodeStrokeWidth:a,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:h="bottom-right",onClick:p,onNodeClick:g,pannable:b=!1,zoomable:v=!1,ariaLabel:y,inversePan:x,zoomStep:w=1,offsetScale:O=5}){const k=ds(),S=m.useRef(null),{boundingRect:E,viewBB:C,rfId:N,panZoom:_,translateExtent:j,flowWidth:T,flowHeight:L,ariaLabelConfig:A}=Ii(ynt,us),R=(e==null?void 0:e.width)??mnt,P=(e==null?void 0:e.height)??gnt,$=E.width/R,M=E.height/P,B=Math.max($,M),I=B*R,H=B*P,X=O*B,Q=E.x-(I-E.width)/2-X,q=E.y-(H-E.height)/2-X,U=I+X*2,te=H+X*2,le=`${vnt}-${N}`,oe=m.useRef(0),re=m.useRef();oe.current=B,m.useEffect(()=>{if(S.current&&_)return re.current=SJe({domNode:S.current,panZoom:_,getTransform:()=>k.getState().transform,getViewScale:()=>oe.current}),()=>{var se;(se=re.current)==null||se.destroy()}},[_]),m.useEffect(()=>{var se;(se=re.current)==null||se.update({translateExtent:j,width:T,height:L,inversePan:x,pannable:b,zoomStep:w,zoomable:v})},[b,v,x,w,j,T,L]);const he=p?se=>{var Te;const[de,ke]=((Te=re.current)==null?void 0:Te.pointer(se))||[0,0];p(se,{x:de,y:ke})}:void 0,K=g?m.useCallback((se,de)=>{const ke=k.getState().nodeLookup.get(de).internals.userNode;g(se,ke)},[]):void 0,G=y??A["minimap.ariaLabel"];return o.jsx(NR,{position:h,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*B:void 0,"--xy-minimap-node-background-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:sa(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:o.jsxs("svg",{width:R,height:P,viewBox:`${Q} ${q} ${U} ${te}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":le,ref:S,onClick:he,children:[G&&o.jsx("title",{id:le,children:G}),o.jsx(pnt,{onClick:K,nodeColor:i,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:r,nodeStrokeWidth:a,nodeComponent:l}),o.jsx("path",{className:"react-flow__minimap-mask",d:`M${Q-X},${q-X}h${U+X*2}v${te+X*2}h${-U-X*2}z - M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}ROe.displayName="MiniMap";m.memo(ROe);const xnt=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,Ont={[Kv.Line]:"right",[Kv.Handle]:"bottom-right"};function wnt({nodeId:e,position:t,variant:n=Kv.Handle,className:i,style:r=void 0,children:s,color:a,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:h,autoScale:p=!0,shouldResize:g,onResizeStart:b,onResize:v,onResizeEnd:y}){const x=cOe(),w=typeof e=="string"?e:x,O=ds(),k=m.useRef(null),S=n===Kv.Handle,E=Ii(m.useCallback(xnt(S&&p),[S,p]),us),C=m.useRef(null),N=t??Ont[n];m.useEffect(()=>{if(!(!k.current||!w))return C.current||(C.current=MJe({domNode:k.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:j,transform:T,snapGrid:L,snapToGrid:A,nodeOrigin:R,domNode:P}=O.getState();return{nodeLookup:j,transform:T,snapGrid:L,snapToGrid:A,nodeOrigin:R,paneDomNode:P}},onChange:(j,T)=>{const{triggerNodeChanges:L,nodeLookup:A,parentLookup:R,nodeOrigin:P}=O.getState(),$=[],M={x:j.x,y:j.y},B=A.get(w);if(B&&B.expandParent&&B.parentId){const I=B.origin??P,H=j.width??B.measured.width??0,X=j.height??B.measured.height??0,Q={id:B.id,parentId:B.parentId,rect:{width:H,height:X,...N1e({x:j.x??B.position.x,y:j.y??B.position.y},{width:H,height:X},B.parentId,A,I)}},q=oB([Q],A,R,P);$.push(...q),M.x=j.x?Math.max(I[0]*H,j.x):void 0,M.y=j.y?Math.max(I[1]*X,j.y):void 0}if(M.x!==void 0&&M.y!==void 0){const I={id:w,type:"position",position:{...M}};$.push(I)}if(j.width!==void 0&&j.height!==void 0){const H={id:w,type:"dimensions",resizing:!0,setAttributes:h?h==="horizontal"?"width":"height":!0,dimensions:{width:j.width,height:j.height}};$.push(H)}for(const I of T){const H={...I,type:"position"};$.push(H)}L($)},onEnd:({width:j,height:T})=>{const L={id:w,type:"dimensions",resizing:!1,dimensions:{width:j,height:T}};O.getState().triggerNodeChanges([L])}})),C.current.update({controlPosition:N,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:h,onResizeStart:b,onResize:v,onResizeEnd:y,shouldResize:g}),()=>{var j;(j=C.current)==null||j.destroy()}},[N,l,c,u,d,f,b,v,y,g]);const _=N.split("-");return o.jsx("div",{className:sa(["react-flow__resize-control","nodrag",..._,n,i]),ref:k,style:{...r,scale:E,...a&&{[S?"backgroundColor":"borderColor"]:a}},children:s})}m.memo(wnt);var IOe=Object.defineProperty,Snt=(e,t,n)=>t in e?IOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,knt=(e,t)=>{for(var n in t)IOe(e,n,{get:t[n],enumerable:!0})},Ent=(e,t,n)=>Snt(e,t+"",n),POe={};knt(POe,{Graph:()=>au,alg:()=>cB,json:()=>MOe,version:()=>Ant});var Cnt=Object.defineProperty,DOe=(e,t)=>{for(var n in t)Cnt(e,n,{get:t[n],enumerable:!0})},au=class{constructor(t){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},t&&(this._isDirected="directed"in t?t.directed:!0,this._isMultigraph="multigraph"in t?t.multigraph:!1,this._isCompound="compound"in t?t.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return typeof t!="function"?this._defaultNodeLabelFn=()=>t:this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(t=>Object.keys(this._in[t]).length===0)}sinks(){return this.nodes().filter(t=>Object.keys(this._out[t]).length===0)}setNodes(t,n){return t.forEach(i=>{n!==void 0?this.setNode(i,n):this.setNode(i)}),this}setNode(t,n){return t in this._nodes?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return t in this._nodes}removeNode(t){if(t in this._nodes){let n=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(i=>{this.setParent(i)}),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n="\0";else{n+="";for(let i=n;i!==void 0;i=this.parent(i))if(i===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}parent(t){if(this._isCompound){let n=this._parent[t];if(n!=="\0")return n}}children(t="\0"){if(this._isCompound){let n=this._children[t];if(n)return Object.keys(n)}else{if(t==="\0")return this.nodes();if(this.hasNode(t))return[]}return[]}predecessors(t){let n=this._preds[t];if(n)return Object.keys(n)}successors(t){let n=this._sucs[t];if(n)return Object.keys(n)}neighbors(t){let n=this.predecessors(t);if(n){let i=new Set(n);for(let r of this.successors(t))i.add(r);return Array.from(i.values())}}isLeaf(t){let n;return this.isDirected()?n=this.successors(t):n=this.neighbors(t),n.length===0}filterNodes(t){let n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph()),Object.entries(this._nodes).forEach(([s,a])=>{t(s)&&n.setNode(s,a)}),Object.values(this._edgeObjs).forEach(s=>{n.hasNode(s.v)&&n.hasNode(s.w)&&n.setEdge(s,this.edge(s))});let i={},r=s=>{let a=this.parent(s);return!a||n.hasNode(a)?(i[s]=a??void 0,a??void 0):a in i?i[a]:r(a)};return this._isCompound&&n.nodes().forEach(s=>n.setParent(s,r(s))),n}setDefaultEdgeLabel(t){return typeof t!="function"?this._defaultEdgeLabelFn=()=>t:this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,n){return t.reduce((i,r)=>(n!==void 0?this.setEdge(i,r,n):this.setEdge(i,r),r)),this}setEdge(t,n,i,r){let s,a,l,c,u=!1;typeof t=="object"&&t!==null&&"v"in t?(s=t.v,a=t.w,l=t.name,arguments.length===2&&(c=n,u=!0)):(s=t,a=n,l=r,arguments.length>2&&(c=i,u=!0)),s=""+s,a=""+a,l!==void 0&&(l=""+l);let d=PO(this._isDirected,s,a,l);if(d in this._edgeLabels)return u&&(this._edgeLabels[d]=c),this;if(l!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(s),this.setNode(a),this._edgeLabels[d]=u?c:this._defaultEdgeLabelFn(s,a,l);let f=Tnt(this._isDirected,s,a,l);return s=f.v,a=f.w,Object.freeze(f),this._edgeObjs[d]=f,gG(this._preds[a],s),gG(this._sucs[s],a),this._in[a][d]=f,this._out[s][d]=f,this._edgeCount++,this}edge(t,n,i){let r=arguments.length===1?nM(this._isDirected,t):PO(this._isDirected,t,n,i);return this._edgeLabels[r]}edgeAsObj(t,n,i){let r=arguments.length===1?this.edge(t):this.edge(t,n,i);return typeof r!="object"?{label:r}:r}hasEdge(t,n,i){return(arguments.length===1?nM(this._isDirected,t):PO(this._isDirected,t,n,i))in this._edgeLabels}removeEdge(t,n,i){let r=arguments.length===1?nM(this._isDirected,t):PO(this._isDirected,t,n,i),s=this._edgeObjs[r];if(s){let a=s.v,l=s.w;delete this._edgeLabels[r],delete this._edgeObjs[r],bG(this._preds[l],a),bG(this._sucs[a],l),delete this._in[l][r],delete this._out[a][r],this._edgeCount--}return this}inEdges(t,n){return this.isDirected()?this.filterEdges(this._in[t],t,n):this.nodeEdges(t,n)}outEdges(t,n){return this.isDirected()?this.filterEdges(this._out[t],t,n):this.nodeEdges(t,n)}nodeEdges(t,n){if(t in this._nodes)return this.filterEdges({...this._in[t],...this._out[t]},t,n)}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}filterEdges(t,n,i){if(!t)return;let r=Object.values(t);return i?r.filter(s=>s.v===n&&s.w===i||s.v===i&&s.w===n):r}};function gG(e,t){e[t]?e[t]++:e[t]=1}function bG(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function PO(e,t,n,i){let r=""+t,s=""+n;if(!e&&r>s){let a=r;r=s,s=a}return r+""+s+""+(i===void 0?"\0":i)}function Tnt(e,t,n,i){let r=""+t,s=""+n;if(!e&&r>s){let l=r;r=s,s=l}let a={v:r,w:s};return i&&(a.name=i),a}function nM(e,t){return PO(e,t.v,t.w,t.name)}var Ant="4.0.1",MOe={};DOe(MOe,{read:()=>Rnt,write:()=>_nt});function _nt(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Nnt(e),edges:jnt(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function Nnt(e){return e.nodes().map(t=>{let n=e.node(t),i=e.parent(t),r={v:t};return n!==void 0&&(r.value=n),i!==void 0&&(r.parent=i),r})}function jnt(e){return e.edges().map(t=>{let n=e.edge(t),i={v:t.v,w:t.w};return t.name!==void 0&&(i.name=t.name),n!==void 0&&(i.value=n),i})}function Rnt(e){let t=new au(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(n=>{t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(n=>{t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var cB={};DOe(cB,{CycleException:()=>X_,bellmanFord:()=>LOe,components:()=>Dnt,dijkstra:()=>G_,dijkstraAll:()=>$nt,findCycles:()=>Fnt,floydWarshall:()=>Unt,isAcyclic:()=>znt,postorder:()=>Hnt,preorder:()=>qnt,prim:()=>Wnt,shortestPaths:()=>Knt,tarjan:()=>FOe,topsort:()=>BOe});var Int=()=>1;function LOe(e,t,n,i){return Pnt(e,String(t),n||Int,i||function(r){return e.outEdges(r)})}function Pnt(e,t,n,i){let r={},s,a=0,l=e.nodes(),c=function(f){let h=n(f);r[f.v].distance+he.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(e,t){let n=this._keyIndices,i=String(e);if(!(i in n)){let r=this._arr,s=r.length;return n[i]=s,r.push({key:i,priority:t}),this._decrease(s),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw new Error(`Key not found: ${e}`);let i=this._arr[n].priority;if(t>i)throw new Error(`New priority is greater than current priority. Key: ${e} Old: ${i} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,i=n+1,r=e;n>1,!(t[i].priority1;function G_(e,t,n,i){let r=function(s){return e.outEdges(s)};return Lnt(e,String(t),n||Mnt,i||r)}function Lnt(e,t,n,i){let r={},s=new $Oe,a,l,c=function(u){let d=u.v!==a?u.v:u.w,f=r[d],h=n(u),p=l.distance+h;if(h<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+h);p0&&(a=s.removeMin(),l=r[a],l.distance!==Number.POSITIVE_INFINITY);)i(a).forEach(c);return r}function $nt(e,t,n){return e.nodes().reduce(function(i,r){return i[r]=G_(e,r,t,n),i},{})}function FOe(e){let t=0,n=[],i={},r=[];function s(a){let l=i[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),e.successors(a).forEach(function(c){c in i?i[c].onStack&&(l.lowlink=Math.min(l.lowlink,i[c].index)):(s(c),l.lowlink=Math.min(l.lowlink,i[c].lowlink))}),l.lowlink===l.index){let c=[],u;do u=n.pop(),i[u].onStack=!1,c.push(u);while(a!==u);r.push(c)}}return e.nodes().forEach(function(a){a in i||s(a)}),r}function Fnt(e){return FOe(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var Bnt=()=>1;function Unt(e,t,n){return Qnt(e,t||Bnt,n||function(i){return e.outEdges(i)})}function Qnt(e,t,n){let i={},r=e.nodes();return r.forEach(function(s){i[s]={},i[s][s]={distance:0,predecessor:""},r.forEach(function(a){s!==a&&(i[s][a]={distance:Number.POSITIVE_INFINITY,predecessor:""})}),n(s).forEach(function(a){let l=a.v===s?a.w:a.v,c=t(a);i[s][l]={distance:c,predecessor:s}})}),r.forEach(function(s){let a=i[s];r.forEach(function(l){let c=i[l];r.forEach(function(u){let d=c[s],f=a[u],h=c[u],p=d.distance+f.distance;p{var c;return(c=e.isDirected()?e.successors(l):e.neighbors(l))!=null?c:[]},a={};return t.forEach(function(l){if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);r=UOe(e,l,n==="post",a,s,i,r)}),r}function UOe(e,t,n,i,r,s,a){return t in i||(i[t]=!0,n||(a=s(a,t)),r(t).forEach(function(l){a=UOe(e,l,n,i,r,s,a)}),n&&(a=s(a,t))),a}function QOe(e,t,n){return Vnt(e,t,n,function(i,r){return i.push(r),i},[])}function Hnt(e,t){return QOe(e,t,"post")}function qnt(e,t){return QOe(e,t,"pre")}function Wnt(e,t){let n=new au,i={},r=new $Oe,s;function a(c){let u=c.v===s?c.w:c.v,d=r.priority(u);if(d!==void 0){let f=t(c);f0;){if(s=r.removeMin(),s in i)n.setEdge(s,i[s]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(s).forEach(a)}return n}function Knt(e,t,n,i){return Gnt(e,t,n,i??(r=>{let s=e.outEdges(r);return s??[]}))}function Gnt(e,t,n,i){if(n===void 0)return G_(e,t,n,i);let r=!1,s=e.nodes();for(let a=0;at.setNode(n,e.node(n))),e.edges().forEach(n=>{let i=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})}),t}function zOe(e){let t=new au({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function yG(e,t){let n=e.x,i=e.y,r=t.x-n,s=t.y-i,a=e.width/2,l=e.height/2;if(!r&&!s)throw new Error("Not possible to find intersection inside of the rectangle");let c,u;return Math.abs(s)*a>Math.abs(r)*l?(s<0&&(l=-l),c=l*r/s,u=l):(r<0&&(a=-a),c=a,u=a*s/r),{x:n+c,y:i+u}}function rE(e){let t=PS(HOe(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let i=e.node(n),r=i.rank;r!==void 0&&(t[r]||(t[r]=[]),t[r][i.order]=n)}),t}function Ynt(e){let t=e.nodes().map(i=>{let r=e.node(i).rank;return r===void 0?Number.MAX_VALUE:r}),n=jd(Math.min,t);e.nodes().forEach(i=>{let r=e.node(i);Object.hasOwn(r,"rank")&&(r.rank-=n)})}function Znt(e){let t=e.nodes().map(a=>e.node(a).rank).filter(a=>a!==void 0),n=jd(Math.min,t),i=[];e.nodes().forEach(a=>{let l=e.node(a).rank-n;i[l]||(i[l]=[]),i[l].push(a)});let r=0,s=e.graph().nodeRankFactor;Array.from(i).forEach((a,l)=>{a===void 0&&l%s!==0?--r:a!==void 0&&r&&a.forEach(c=>e.node(c).rank+=r)})}function vG(e,t,n,i){let r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=i),Fx(e,"border",r,t)}function Jnt(e,t=VOe){let n=[];for(let i=0;iVOe){let n=Jnt(t);return e(...n.map(i=>e(...i)))}else return e(...t)}function HOe(e){let t=e.nodes().map(n=>{let i=e.node(n).rank;return i===void 0?Number.MIN_VALUE:i});return jd(Math.max,t)}function eit(e,t){let n={lhs:[],rhs:[]};return e.forEach(i=>{t(i)?n.lhs.push(i):n.rhs.push(i)}),n}function qOe(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}}function WOe(e,t){return t()}var tit=0;function uB(e){let t=++tit;return e+(""+t)}function PS(e,t,n=1){t==null&&(t=e,e=0);let i=s=>sti[t]:n=t,Object.entries(e).reduce((i,[r,s])=>(i[r]=n(s,r),i),{})}function nit(e,t){return e.reduce((n,i,r)=>(n[i]=t[r],n),{})}var PR="\0",iit="3.0.0",rit=class{constructor(){Ent(this,"_sentinel");let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return xG(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&xG(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,sit)),n=n._prev;return"["+e.join(", ")+"]"}};function xG(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function sit(e,t){if(e!=="_next"&&e!=="_prev")return t}var ait=rit,oit=()=>1;function lit(e,t){if(e.nodeCount()<=1)return[];let n=uit(e,t||oit);return cit(n.graph,n.buckets,n.zeroIdx).flatMap(i=>e.outEdges(i.v,i.w)||[])}function cit(e,t,n){var i;let r=[],s=t[t.length-1],a=t[0],l;for(;e.nodeCount();){for(;l=a.dequeue();)iM(e,t,n,l);for(;l=s.dequeue();)iM(e,t,n,l);if(e.nodeCount()){for(let c=t.length-2;c>0;--c)if(l=(i=t[c])==null?void 0:i.dequeue(),l){r=r.concat(iM(e,t,n,l,!0)||[]);break}}}return r}function iM(e,t,n,i,r){let s=[],a=r?s:void 0;return(e.inEdges(i.v)||[]).forEach(l=>{let c=e.edge(l),u=e.node(l.v);r&&s.push({v:l.v,w:l.w}),u.out-=c,a6(t,n,u)}),(e.outEdges(i.v)||[]).forEach(l=>{let c=e.edge(l),u=l.w,d=e.node(u);d.in-=c,a6(t,n,d)}),e.removeNode(i.v),a}function uit(e,t){let n=new au,i=0,r=0;e.nodes().forEach(l=>{n.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let c=n.edge(l.v,l.w)||0,u=t(l),d=c+u;n.setEdge(l.v,l.w,d);let f=n.node(l.v),h=n.node(l.w);r=Math.max(r,f.out+=u),i=Math.max(i,h.in+=u)});let s=dit(r+i+3).map(()=>new ait),a=i+1;return n.nodes().forEach(l=>{a6(s,a,n.node(l))}),{graph:n,buckets:s,zeroIdx:a}}function a6(e,t,n){var i,r,s;n.out?n.in?(s=e[n.out-n.in+t])==null||s.enqueue(n):(r=e[e.length-1])==null||r.enqueue(n):(i=e[0])==null||i.enqueue(n)}function dit(e){let t=[];for(let n=0;n{let i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,uB("rev"))});function t(n){return i=>n.edge(i).weight}}function hit(e){let t=[],n={},i={};function r(s){Object.hasOwn(i,s)||(i[s]=!0,n[s]=!0,e.outEdges(s).forEach(a=>{Object.hasOwn(n,a.w)?t.push(a):r(a.w)}),delete n[s])}return e.nodes().forEach(r),t}function pit(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let i=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,i)}})}function mit(e){e.graph().dummyChains=[],e.edges().forEach(t=>git(e,t))}function git(e,t){let n=t.v,i=e.node(n).rank,r=t.w,s=e.node(r).rank,a=t.name,l=e.edge(t),c=l.labelRank;if(s===i+1)return;e.removeEdge(t);let u,d,f;for(f=0,++i;i{let n=e.node(t),i=n.edgeLabel,r;for(e.setEdge(n.edgeObj,i);n.dummy;)r=e.successors(t)[0],e.removeNode(t),i.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),t=r,n=e.node(t)})}function dB(e){let t={};function n(i){let r=e.node(i);if(Object.hasOwn(t,i))return r.rank;t[i]=!0;let s=e.outEdges(i),a=s?s.map(c=>c==null?Number.POSITIVE_INFINITY:n(c.w)-e.edge(c).minlen):[],l=jd(Math.min,a);return l===Number.POSITIVE_INFINITY&&(l=0),r.rank=l}e.sources().forEach(n)}function Gv(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var KOe=yit;function yit(e){let t=new au({directed:!1}),n=e.nodes();if(n.length===0)throw new Error("Graph must have at least one node");let i=n[0],r=e.nodeCount();t.setNode(i,{});let s,a;for(;vit(t,e){let a=s.v,l=i===a?s.w:a;!e.hasNode(l)&&!Gv(t,s)&&(e.setNode(l,{}),e.setEdge(i,l,{}),n(l))})}return e.nodes().forEach(n),e.nodeCount()}function xit(e,t){return t.edges().reduce((n,i)=>{let r=Number.POSITIVE_INFINITY;return e.hasNode(i.v)!==e.hasNode(i.w)&&(r=Gv(t,i)),rt.node(i).rank+=n)}var{preorder:wit,postorder:Sit}=cB,kit=Gb;Gb.initLowLimValues=hB;Gb.initCutValues=fB;Gb.calcCutValue=GOe;Gb.leaveEdge=YOe;Gb.enterEdge=ZOe;Gb.exchangeEdges=JOe;function Gb(e){e=Xnt(e),dB(e);let t=KOe(e);hB(t),fB(t,e);let n,i;for(;n=YOe(t);)i=ZOe(t,e,n),JOe(t,e,n,i)}function fB(e,t){let n=Sit(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(i=>Eit(e,t,i))}function Eit(e,t,n){let i=e.node(n).parent,r=e.edge(n,i);r.cutvalue=GOe(e,t,n)}function GOe(e,t,n){let i=e.node(n).parent,r=!0,s=t.edge(n,i),a=0;s||(r=!1,s=t.edge(i,n)),a=s.weight;let l=t.nodeEdges(n);return l&&l.forEach(c=>{let u=c.v===n,d=u?c.w:c.v;if(d!==i){let f=u===r,h=t.edge(c).weight;if(a+=f?h:-h,Tit(e,n,d)){let p=e.edge(n,d).cutvalue;a+=f?-p:p}}}),a}function hB(e,t){arguments.length<2&&(t=e.nodes()[0]),XOe(e,{},1,t)}function XOe(e,t,n,i,r){let s=n,a=e.node(i);t[i]=!0;let l=e.neighbors(i);return l&&l.forEach(c=>{Object.hasOwn(t,c)||(n=XOe(e,t,n,c,i))}),a.low=s,a.lim=n++,r?a.parent=r:delete a.parent,n}function YOe(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function ZOe(e,t,n){let i=n.v,r=n.w;t.hasEdge(i,r)||(i=n.w,r=n.v);let s=e.node(i),a=e.node(r),l=s,c=!1;return s.lim>a.lim&&(l=a,c=!0),t.edges().filter(u=>c===OG(e,e.node(u.v),l)&&c!==OG(e,e.node(u.w),l)).reduce((u,d)=>Gv(t,d)!e.node(r).parent);if(!n)return;let i=wit(e,[n]);i=i.slice(1),i.forEach(r=>{let s=e.node(r).parent,a=t.edge(r,s),l=!1;a||(a=t.edge(s,r),l=!0),t.node(r).rank=t.node(s).rank+(l?a.minlen:-a.minlen)})}function Tit(e,t,n){return e.hasEdge(t,n)}function OG(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var Ait=_it;function _it(e){let t=e.graph().ranker;if(typeof t=="function")return t(e);switch(t){case"network-simplex":wG(e);break;case"tight-tree":jit(e);break;case"longest-path":Nit(e);break;case"none":break;default:wG(e)}}var Nit=dB;function jit(e){dB(e),KOe(e)}function wG(e){kit(e)}var Rit=Iit;function Iit(e){let t=Dit(e);e.graph().dummyChains.forEach(n=>{let i=e.node(n),r=i.edgeObj,s=Pit(e,t,r.v,r.w),a=s.path,l=s.lca,c=0,u=a[c],d=!0;for(;n!==r.w;){if(i=e.node(n),d){for(;(u=a[c])!==l&&e.node(u).maxRanka||l>t[c].lim));let u=c,d=i;for(;(d=e.parent(d))!==u;)s.push(d);return{path:r.concat(s.reverse()),lca:u}}function Dit(e){let t={},n=0;function i(r){let s=n;e.children(r).forEach(i),t[r]={low:s,lim:n++}}return e.children(PR).forEach(i),t}function Mit(e){let t=Fx(e,"root",{},"_root"),n=Lit(e),i=Object.values(n),r=jd(Math.max,i)-1,s=2*r+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=s);let a=$it(e)+1;e.children(PR).forEach(l=>ewe(e,t,s,a,r,n,l)),e.graph().nodeRankFactor=s}function ewe(e,t,n,i,r,s,a){var l;let c=e.children(a);if(!c.length){a!==t&&e.setEdge(t,a,{weight:0,minlen:n});return}let u=vG(e,"_bt"),d=vG(e,"_bb"),f=e.node(a);e.setParent(u,a),f.borderTop=u,e.setParent(d,a),f.borderBottom=d,c.forEach(h=>{var p;ewe(e,t,n,i,r,s,h);let g=e.node(h),b=g.borderTop?g.borderTop:h,v=g.borderBottom?g.borderBottom:h,y=g.borderTop?i:2*i,x=b!==v?1:r-((p=s[a])!=null?p:0)+1;e.setEdge(u,b,{weight:y,minlen:x,nestingEdge:!0}),e.setEdge(v,d,{weight:y,minlen:x,nestingEdge:!0})}),e.parent(a)||e.setEdge(t,u,{weight:0,minlen:r+((l=s[a])!=null?l:0)})}function Lit(e){let t={};function n(i,r){let s=e.children(i);s&&s.length&&s.forEach(a=>n(a,r+1)),t[i]=r}return e.children(PR).forEach(i=>n(i,1)),t}function $it(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function Fit(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{e.edge(n).nestingEdge&&e.removeEdge(n)})}var Bit=Uit;function Uit(e){function t(n){let i=e.children(n),r=e.node(n);if(i.length&&i.forEach(t),Object.hasOwn(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(let s=r.minRank,a=r.maxRank+1;skG(e.node(t))),e.edges().forEach(t=>kG(e.edge(t)))}function kG(e){let t=e.width;e.width=e.height,e.height=t}function Vit(e){e.nodes().forEach(t=>rM(e.node(t))),e.edges().forEach(t=>{var n;let i=e.edge(t);(n=i.points)==null||n.forEach(rM),Object.hasOwn(i,"y")&&rM(i)})}function rM(e){e.y=-e.y}function Hit(e){e.nodes().forEach(t=>sM(e.node(t))),e.edges().forEach(t=>{var n;let i=e.edge(t);(n=i.points)==null||n.forEach(sM),Object.hasOwn(i,"x")&&sM(i)})}function sM(e){let t=e.x;e.x=e.y,e.y=t}function qit(e){let t={},n=e.nodes().filter(l=>!e.children(l).length),i=n.map(l=>e.node(l).rank),r=jd(Math.max,i),s=PS(r+1).map(()=>[]);function a(l){if(t[l])return;t[l]=!0;let c=e.node(l);s[c.rank].push(l);let u=e.successors(l);u&&u.forEach(a)}return n.sort((l,c)=>e.node(l).rank-e.node(c).rank).forEach(a),s}function Wit(e,t){let n=0;for(let i=1;id)),r=t.flatMap(u=>{let d=e.outEdges(u);return d?d.map(f=>({pos:i[f.w],weight:e.edge(f).weight})).sort((f,h)=>f.pos-h.pos):[]}),s=1;for(;s{let d=u.pos+s;l[d]+=u.weight;let f=0;for(;d>0;)d%2&&(f+=l[d+1]),d=d-1>>1,l[d]+=u.weight;c+=u.weight*f}),c}function Git(e,t=[]){return t.map(n=>{let i=e.inEdges(n);if(!i||!i.length)return{v:n};{let r=i.reduce((s,a)=>{let l=e.edge(a),c=e.node(a.v);return{sum:s.sum+l.weight*c.order,weight:s.weight+l.weight}},{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}})}function Xit(e,t){let n={};e.forEach((r,s)=>{let a={indegree:0,in:[],out:[],vs:[r.v],i:s};r.barycenter!==void 0&&(a.barycenter=r.barycenter,a.weight=r.weight),n[r.v]=a}),t.edges().forEach(r=>{let s=n[r.v],a=n[r.w];s!==void 0&&a!==void 0&&(a.indegree++,s.out.push(a))});let i=Object.values(n).filter(r=>!r.indegree);return Yit(i)}function Yit(e){let t=[];function n(r){return s=>{s.merged||(s.barycenter===void 0||r.barycenter===void 0||s.barycenter>=r.barycenter)&&Zit(r,s)}}function i(r){return s=>{s.in.push(r),--s.indegree===0&&e.push(s)}}for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(n(r)),r.out.forEach(i(r))}return t.filter(r=>!r.merged).map(r=>Y_(r,["vs","i","barycenter","weight"]))}function Zit(e,t){let n=0,i=0;e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}function Jit(e,t){let n=eit(e,d=>Object.hasOwn(d,"barycenter")),i=n.lhs,r=n.rhs.sort((d,f)=>f.i-d.i),s=[],a=0,l=0,c=0;i.sort(ert(!!t)),c=EG(s,r,c),i.forEach(d=>{c+=d.vs.length,s.push(d.vs),a+=d.barycenter*d.weight,l+=d.weight,c=EG(s,r,c)});let u={vs:s.flat(1)};return l&&(u.barycenter=a/l,u.weight=l),u}function EG(e,t,n){let i;for(;t.length&&(i=t[t.length-1]).i<=n;)t.pop(),e.push(i.vs),n++;return n}function ert(e){return(t,n)=>t.barycentern.barycenter?1:e?n.i-t.i:t.i-n.i}function nwe(e,t,n,i){let r=e.children(t),s=e.node(t),a=s?s.borderLeft:void 0,l=s?s.borderRight:void 0,c={};a&&(r=r.filter(h=>h!==a&&h!==l));let u=Git(e,r);u.forEach(h=>{if(e.children(h.v).length){let p=nwe(e,h.v,n,i);c[h.v]=p,Object.hasOwn(p,"barycenter")&&nrt(h,p)}});let d=Xit(u,n);trt(d,c);let f=Jit(d,i);if(a&&l){f.vs=[a,f.vs,l].flat(1);let h=e.predecessors(a);if(h&&h.length){let p=e.node(h[0]),g=e.predecessors(l),b=e.node(g[0]);Object.hasOwn(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+b.order)/(f.weight+2),f.weight+=2}}return f}function trt(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(i=>t[i]?t[i].vs:i)})}function nrt(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}function irt(e,t,n,i){i||(i=e.nodes());let r=rrt(e),s=new au({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(a=>e.node(a));return i.forEach(a=>{let l=e.node(a),c=e.parent(a);if(l.rank===t||l.minRank<=t&&t<=l.maxRank){s.setNode(a),s.setParent(a,c||r);let u=e[n](a);u&&u.forEach(d=>{let f=d.v===a?d.w:d.v,h=s.edge(f,a),p=h!==void 0?h.weight:0;s.setEdge(f,a,{weight:e.edge(d).weight+p})}),Object.hasOwn(l,"minRank")&&s.setNode(a,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]})}}),s}function rrt(e){let t;for(;e.hasNode(t=uB("_root")););return t}function srt(e,t,n){let i={},r;n.forEach(s=>{let a=e.parent(s),l,c;for(;a;){if(l=e.parent(a),l?(c=i[l],i[l]=a):(c=r,r=a),c&&c!==a){t.setEdge(c,a);return}a=l}})}function iwe(e,t={}){if(typeof t.customOrder=="function"){t.customOrder(e,iwe);return}let n=HOe(e),i=CG(e,PS(1,n+1),"inEdges"),r=CG(e,PS(n-1,-1,-1),"outEdges"),s=qit(e);if(TG(e,s),t.disableOptimalOrderHeuristic)return;let a=Number.POSITIVE_INFINITY,l,c=t.constraints||[];for(let u=0,d=0;d<4;++u,++d){art(u%2?i:r,u%4>=2,c),s=rE(e);let f=Wit(e,s);f{i.has(s)||i.set(s,[]),i.get(s).push(a)};for(let s of e.nodes()){let a=e.node(s);if(typeof a.rank=="number"&&r(a.rank,s),typeof a.minRank=="number"&&typeof a.maxRank=="number")for(let l=a.minRank;l<=a.maxRank;l++)l!==a.rank&&r(l,s)}return t.map(function(s){return irt(e,s,n,i.get(s)||[])})}function art(e,t,n){let i=new au;e.forEach(function(r){n.forEach(l=>i.setEdge(l.left,l.right));let s=r.graph().root,a=nwe(r,s,i,t);a.vs.forEach((l,c)=>r.node(l).order=c),srt(r,i,a.vs)})}function TG(e,t){Object.values(t).forEach(n=>n.forEach((i,r)=>e.node(i).order=r))}function ort(e,t){let n={};function i(r,s){let a=0,l=0,c=r.length,u=s[s.length-1];return s.forEach((d,f)=>{let h=crt(e,d),p=h?e.node(h).order:c;(h||d===u)&&(s.slice(l,f+1).forEach(g=>{let b=e.predecessors(g);b&&b.forEach(v=>{let y=e.node(v),x=y.order;(x{let f=s[d];if(f!==void 0&&e.node(f).dummy){let h=e.predecessors(f);h&&h.forEach(p=>{if(p===void 0)return;let g=e.node(p);g.dummy&&(g.orderu)&&rwe(n,p,f)})}})}function r(s,a){let l=-1,c=-1,u=0;return a.forEach((d,f)=>{if(e.node(d).dummy==="border"){let h=e.predecessors(d);if(h&&h.length){let p=h[0];if(p===void 0)return;c=e.node(p).order,i(a,u,f,l,c),u=f,l=c}}i(a,u,a.length,c,s.length)}),a}return t.length&&t.reduce(r),n}function crt(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(i=>e.node(i).dummy)}}function rwe(e,t,n){if(t>n){let r=t;t=n,n=r}let i=e[t];i||(e[t]=i={}),i[n]=!0}function urt(e,t,n){if(t>n){let r=t;t=n,n=r}let i=e[t];return i!==void 0&&Object.hasOwn(i,n)}function drt(e,t,n,i){let r={},s={},a={};return t.forEach(l=>{l.forEach((c,u)=>{r[c]=c,s[c]=c,a[c]=u})}),t.forEach(l=>{let c=-1;l.forEach(u=>{let d=i(u);if(d&&d.length){let f=d.sort((p,g)=>{let b=a[p],v=a[g];return(b!==void 0?b:0)-(v!==void 0?v:0)}),h=(f.length-1)/2;for(let p=Math.floor(h),g=Math.ceil(h);p<=g;++p){let b=f[p];if(b===void 0)continue;let v=a[b];if(v!==void 0&&s[u]===u&&c{var y;let x=(y=s[v.v])!=null?y:0,w=a.edge(v);return Math.max(b,x+(w!==void 0?w:0))},0):s[p]=0}function d(p){let g=a.outEdges(p),b=Number.POSITIVE_INFINITY;g&&(b=g.reduce((y,x)=>{let w=s[x.w],O=a.edge(x);return Math.min(y,(w!==void 0?w:0)-(O!==void 0?O:0))},Number.POSITIVE_INFINITY));let v=e.node(p);b!==Number.POSITIVE_INFINITY&&v.borderType!==l&&(s[p]=Math.max(s[p]!==void 0?s[p]:0,b))}function f(p){return a.predecessors(p)||[]}function h(p){return a.successors(p)||[]}return c(u,f),c(d,h),Object.keys(i).forEach(p=>{var g;let b=n[p];b!==void 0&&(s[p]=(g=s[b])!=null?g:0)}),s}function hrt(e,t,n,i){let r=new au,s=e.graph(),a=yrt(s.nodesep,s.edgesep,i);return t.forEach(l=>{let c;l.forEach(u=>{let d=n[u];if(d!==void 0){if(r.setNode(d),c!==void 0){let f=n[c];if(f!==void 0){let h=r.edge(f,d);r.setEdge(f,d,Math.max(a(e,u,c),h||0))}}c=u}})}),r}function prt(e,t){return Object.values(t).reduce((n,i)=>{let r=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY;Object.entries(i).forEach(([l,c])=>{let u=vrt(e,l)/2;r=Math.max(c+u,r),s=Math.min(c-u,s)});let a=r-s;return a{["l","r"].forEach(a=>{let l=s+a,c=e[l];if(!c||c===t)return;let u=Object.values(c),d=i-jd(Math.min,u);a!=="l"&&(d=r-jd(Math.max,u)),d&&(e[l]=IR(c,f=>f+d))})})}function grt(e,t=void 0){let n=e.ul;return n?IR(n,(i,r)=>{var s,a;if(t){let c=t.toLowerCase(),u=e[c];if(u&&u[r]!==void 0)return u[r]}let l=Object.values(e).map(c=>{let u=c[r];return u!==void 0?u:0}).sort((c,u)=>c-u);return(((s=l[1])!=null?s:0)+((a=l[2])!=null?a:0))/2}):{}}function brt(e){let t=rE(e),n=Object.assign(ort(e,t),lrt(e,t)),i={},r;["u","d"].forEach(a=>{r=a==="u"?t:Object.values(t).reverse(),["l","r"].forEach(l=>{l==="r"&&(r=r.map(d=>Object.values(d).reverse()));let c=drt(e,r,n,d=>(a==="u"?e.predecessors(d):e.successors(d))||[]),u=frt(e,r,c.root,c.align,l==="r");l==="r"&&(u=IR(u,d=>-d)),i[a+l]=u})});let s=prt(e,i);return mrt(i,s),grt(i,e.graph().align)}function yrt(e,t,n){return(i,r,s)=>{let a=i.node(r),l=i.node(s),c=0,u;if(c+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(c+=n?u:-u),u=void 0,c+=(a.dummy?t:e)/2,c+=(l.dummy?t:e)/2,c+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":u=l.width/2;break;case"r":u=-l.width/2;break}return u&&(c+=n?u:-u),c}}function vrt(e,t){return e.node(t).width}function xrt(e){e=zOe(e),Ort(e),Object.entries(brt(e)).forEach(([t,n])=>e.node(t).x=n)}function Ort(e){let t=rE(e),n=e.graph(),i=n.ranksep,r=n.rankalign,s=0;t.forEach(a=>{let l=a.reduce((c,u)=>{var d;let f=(d=e.node(u).height)!=null?d:0;return c>f?c:f},0);a.forEach(c=>{let u=e.node(c);r==="top"?u.y=s+u.height/2:r==="bottom"?u.y=s+l-u.height/2:u.y=s+l/2}),s+=l+i})}function wrt(e,t={}){let n=t.debugTiming?qOe:WOe;return n("layout",()=>{let i=n(" buildLayoutGraph",()=>Rrt(e));return n(" runLayout",()=>Srt(i,n,t)),n(" updateInputGraph",()=>krt(e,i)),i})}function Srt(e,t,n){t(" makeSpaceForEdgeLabels",()=>Irt(e)),t(" removeSelfEdges",()=>Qrt(e)),t(" acyclic",()=>fit(e)),t(" nestingGraph.run",()=>Mit(e)),t(" rank",()=>Ait(zOe(e))),t(" injectEdgeLabelProxies",()=>Prt(e)),t(" removeEmptyRanks",()=>Znt(e)),t(" nestingGraph.cleanup",()=>Fit(e)),t(" normalizeRanks",()=>Ynt(e)),t(" assignRankMinMax",()=>Drt(e)),t(" removeEdgeLabelProxies",()=>Mrt(e)),t(" normalize.run",()=>mit(e)),t(" parentDummyChains",()=>Rit(e)),t(" addBorderSegments",()=>Bit(e)),t(" order",()=>iwe(e,n)),t(" insertSelfEdges",()=>zrt(e)),t(" adjustCoordinateSystem",()=>Qit(e)),t(" position",()=>xrt(e)),t(" positionSelfEdges",()=>Vrt(e)),t(" removeBorderNodes",()=>Urt(e)),t(" normalize.undo",()=>bit(e)),t(" fixupEdgeLabelCoords",()=>Frt(e)),t(" undoCoordinateSystem",()=>zit(e)),t(" translateGraph",()=>Lrt(e)),t(" assignNodeIntersects",()=>$rt(e)),t(" reversePoints",()=>Brt(e)),t(" acyclic.undo",()=>pit(e))}function krt(e,t){e.nodes().forEach(n=>{let i=e.node(n),r=t.node(n);i&&(i.x=r.x,i.y=r.y,i.order=r.order,i.rank=r.rank,t.children(n).length&&(i.width=r.width,i.height=r.height))}),e.edges().forEach(n=>{let i=e.edge(n),r=t.edge(n);i.points=r.points,Object.hasOwn(r,"x")&&(i.x=r.x,i.y=r.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Ert=["nodesep","edgesep","ranksep","marginx","marginy"],Crt={ranksep:50,edgesep:20,nodesep:50,rankdir:"TB",rankalign:"center"},Trt=["acyclicer","ranker","rankdir","align","rankalign"],Art=["width","height","rank"],AG={width:0,height:0},_rt=["minlen","weight","width","height","labeloffset"],Nrt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},jrt=["labelpos"];function Rrt(e){let t=new au({multigraph:!0,compound:!0}),n=oM(e.graph());return t.setGraph(Object.assign({},Crt,aM(n,Ert),Y_(n,Trt))),e.nodes().forEach(i=>{let r=oM(e.node(i)),s=aM(r,Art);Object.keys(AG).forEach(l=>{s[l]===void 0&&(s[l]=AG[l])}),t.setNode(i,s);let a=e.parent(i);a!==void 0&&t.setParent(i,a)}),e.edges().forEach(i=>{let r=oM(e.edge(i));t.setEdge(i,Object.assign({},Nrt,aM(r,_rt),Y_(r,jrt)))}),t}function Irt(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let i=e.edge(n);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function Prt(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let i=e.node(t.v),r={rank:(e.node(t.w).rank-i.rank)/2+i.rank,e:t};Fx(e,"edge-proxy",r,"_ep")}})}function Drt(e){let t=0;e.nodes().forEach(n=>{let i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=Math.max(t,i.maxRank))}),e.graph().maxRank=t}function Mrt(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy==="edge-proxy"){let i=n;e.edge(i.e).labelRank=n.rank,e.removeNode(t)}})}function Lrt(e){let t=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,r=0,s=e.graph(),a=s.marginx||0,l=s.marginy||0;function c(u){let d=u.x,f=u.y,h=u.width,p=u.height;t=Math.min(t,d-h/2),n=Math.max(n,d+h/2),i=Math.min(i,f-p/2),r=Math.max(r,f+p/2)}e.nodes().forEach(u=>c(e.node(u))),e.edges().forEach(u=>{let d=e.edge(u);Object.hasOwn(d,"x")&&c(d)}),t-=a,i-=l,e.nodes().forEach(u=>{let d=e.node(u);d.x-=t,d.y-=i}),e.edges().forEach(u=>{let d=e.edge(u);d.points.forEach(f=>{f.x-=t,f.y-=i}),Object.hasOwn(d,"x")&&(d.x-=t),Object.hasOwn(d,"y")&&(d.y-=i)}),s.width=n-t+a,s.height=r-i+l}function $rt(e){e.edges().forEach(t=>{let n=e.edge(t),i=e.node(t.v),r=e.node(t.w),s,a;n.points?(s=n.points[0],a=n.points[n.points.length-1]):(n.points=[],s=r,a=i),n.points.unshift(yG(i,s)),n.points.push(yG(r,a))})}function Frt(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function Brt(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function Urt(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),i=e.node(n.borderTop),r=e.node(n.borderBottom),s=e.node(n.borderLeft[n.borderLeft.length-1]),a=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(a.x-s.x),n.height=Math.abs(r.y-i.y),n.x=s.x+n.width/2,n.y=i.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function Qrt(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function zrt(e){rE(e).forEach(t=>{let n=0;t.forEach((i,r)=>{let s=e.node(i);s.order=r+n,(s.selfEdges||[]).forEach(a=>{Fx(e,"selfedge",{width:a.label.width,height:a.label.height,rank:s.rank,order:r+ ++n,e:a.e,label:a.label},"_se")}),delete s.selfEdges})})}function Vrt(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy==="selfedge"){let i=n,r=e.node(i.e.v),s=r.x+r.width/2,a=r.y,l=n.x-s,c=r.height/2;e.setEdge(i.e,i.label),e.removeNode(t),i.label.points=[{x:s+2*l/3,y:a-c},{x:s+5*l/6,y:a-c},{x:s+l,y:a},{x:s+5*l/6,y:a+c},{x:s+2*l/3,y:a+c}],i.label.x=n.x,i.label.y=n.y}})}function aM(e,t){return IR(Y_(e,t),Number)}function oM(e){let t={};return e&&Object.entries(e).forEach(([n,i])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=i}),t}function Hrt(e){let t=rE(e),n=new au({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(i=>{n.setNode(i,{label:i}),n.setParent(i,"layer"+e.node(i).rank)}),e.edges().forEach(i=>n.setEdge(i.v,i.w,{},i.name)),t.forEach((i,r)=>{let s="layer"+r;n.setNode(s,{rank:"same"}),i.reduce((a,l)=>(n.setEdge(a,l,{style:"invis"}),l))}),n}var qrt={graphlib:POe,version:iit,layout:wrt,debug:Hrt,util:{time:qOe,notime:WOe}},_G=qrt;/*! For license information please see dagre.esm.js.LEGAL.txt */const DO={llm:{labelKey:"buildCanvas.patterns.llm.label",descriptionKey:"buildCanvas.patterns.llm.description",icon:xbe},sequential:{labelKey:"buildCanvas.patterns.sequential.label",descriptionKey:"buildCanvas.patterns.sequential.description",icon:u7e},parallel:{labelKey:"buildCanvas.patterns.parallel.label",descriptionKey:"buildCanvas.patterns.parallel.description",icon:VFe},loop:{labelKey:"buildCanvas.patterns.loop.label",descriptionKey:"buildCanvas.patterns.loop.description",icon:Ebe},a2a:{labelKey:"buildCanvas.patterns.a2a.label",descriptionKey:"buildCanvas.patterns.a2a.description",icon:qj}},o6=220,l6=88,NG=96,jG=34,kw=64,lM=310,_y=24,swe=56,c6=40,RG=40,Wrt=18,Krt=58,Grt=!1,Xrt=e=>e==="sequential"||e==="parallel"||e==="loop";function u6(e,t){const n=e.agentType??"llm";return Xrt(n)||n==="llm"&&(t.length===0||e.subAgents.length>0)}function d6(e,t=[],n="horizontal",i=!1){const r=e.agentType??"llm";if(!u6(e,t))return{width:o6,height:l6};if(i&&e.subAgents.length===0)return{width:lM,height:kw};const s=e.subAgents.map((f,h)=>d6(f,[...t,h],n,i)),a=s.length?Math.max(...s.map(f=>f.width)):0,l=s.length?Math.max(...s.map(f=>f.height)):0,c=s.length&&r!=="parallel"?swe:_y,u=n==="horizontal"?r!=="parallel":r==="parallel",d=s.length?r==="parallel"?Wrt+RG:r==="loop"?Krt:0:RG;return u?{width:Math.max(lM,s.reduce((f,h)=>f+h.width,0)+c6*Math.max(0,s.length-1)+c*2),height:kw+_y+l+d+_y}:{width:Math.max(lM,a+_y*2),height:kw+c+s.reduce((f,h)=>f+h.height,0)+c6*Math.max(0,s.length-1)+d+c}}function Q1(e){return e.length===0?"agent-root":`agent-${e.join("-")}`}function Yrt(e,t){return e.length===t.length&&e.every((n,i)=>n===t[i])}function IG(e){const t=n=>[n.agentType??"llm",n.subAgents.map(t)];return JSON.stringify(t(e))}function z1(e,t,n,i){const r=(i==null?void 0:i.tone)==="sequential"?"hsl(213 40% 40%)":(i==null?void 0:i.tone)==="loop"?"hsl(151 34% 34%)":"hsl(220 9% 38%)";return{id:`${e}-${t}${i!=null&&i.loop?"-loop":""}`,source:e,target:t,sourceHandle:i!=null&&i.loop?"loop-source":void 0,targetHandle:i!=null&&i.loop?"loop-target":void 0,label:n,type:"insertStep",data:i?{insert:i.insert,loop:i.loop,tone:i.tone}:void 0,animated:i==null?void 0:i.loop,markerEnd:{type:NS.ArrowClosed,width:16,height:16,color:r},style:{stroke:r,strokeWidth:1.5},labelStyle:{fill:"hsl(215 14% 42%)",fontSize:10,fontWeight:600},labelBgStyle:{fill:"hsl(var(--background))",fillOpacity:.92}}}function PG(e,t,n=!1,i){const r=[{id:"terminal-input",type:"terminal",position:{x:0,y:0},data:{kind:"terminal",title:i("buildCanvas.terminals.input")},selectable:!1,draggable:!1},{id:"terminal-output",type:"terminal",position:{x:0,y:0},data:{kind:"terminal",title:i("buildCanvas.terminals.output")},selectable:!1,draggable:!1}],s=[];function a(f,h,p,g,b){const v=f.agentType??"llm",y=Q1(h);return u6(f,h)?(l(f,h,p,g,b),y):(r.push({id:y,type:"agent",parentId:p,extent:"parent",position:g,data:{kind:"agent",path:h,agent:f,title:v==="a2a"?i("buildCanvas.patterns.a2a.label"):f.name.trim()||(h.length===0?i("buildCanvas.rootAgent"):i("buildCanvas.unnamedStep")),pattern:v,description:f.description.trim()||i(DO[v].descriptionKey),childCount:f.subAgents.length,containedIn:b}}),y)}function l(f,h,p,g={x:0,y:0},b){const v=f.agentType??"sequential",y=Q1(h),x=d6(f,h,t,n);r.push({id:y,type:"group",parentId:p,extent:p?"parent":void 0,position:g,style:{width:x.width,height:x.height},data:{kind:"agent",path:h,agent:f,title:f.name.trim()||(h.length===0?i("buildCanvas.rootAgent"):i(DO[v].labelKey)),pattern:v,description:f.description.trim()||i(DO[v].descriptionKey),childCount:f.subAgents.length,containedIn:b,layoutWidth:x.width,layoutHeight:x.height,compactEmptyGroup:n&&f.subAgents.length===0}});const w=f.subAgents.map((C,N)=>d6(C,[...h,N],t,n)),O=w.length&&v!=="parallel"?swe:_y,k=t==="horizontal"?v!=="parallel":v==="parallel";let S=O;const E=f.subAgents.map((C,N)=>{const _=w[N],j=k?{x:S,y:kw+_y}:{x:(x.width-_.width)/2,y:kw+S};return S+=(k?_.width:_.height)+c6,a(C,[...h,N],y,j,v)});if(v==="sequential"||v==="loop"){for(let C=0;C1&&s.push(z1(E[E.length-1],E[0],i("buildCanvas.edges.continueLoop"),{loop:!0,tone:"loop"}))}return y}const c=(f,h)=>{const p=f.agentType??"llm",g=Q1(h);if(u6(f,h))return l(f,h),[g];if(r.push({id:g,type:"agent",position:{x:0,y:0},data:{kind:"agent",path:h,agent:f,title:p==="a2a"?i("buildCanvas.patterns.a2a.label"):f.name.trim()||(h.length===0?i("buildCanvas.rootAgent"):i("buildCanvas.unnamedStep")),pattern:p,description:f.description.trim()||i(DO[p].descriptionKey),childCount:f.subAgents.length}}),f.subAgents.length===0)return[g];const b=[];return f.subAgents.forEach((v,y)=>{const x=[...h,y],w=Q1(x);s.push(z1(g,w,i("buildCanvas.edges.call"),{insert:{parentPath:h,index:y}})),b.push(...c(v,x))}),b},u=Q1([]),d=c(e,[]);return s.push(z1("terminal-input",u)),d.forEach(f=>s.push(z1(f,"terminal-output"))),Zrt(r,s,t)}function Zrt(e,t,n){const i=new _G.graphlib.Graph().setDefaultEdgeLabel(()=>({}));i.setGraph({rankdir:n==="vertical"?"TB":"LR",ranksep:50,nodesep:34,edgesep:14,marginx:24,marginy:24});const r=new Set(e.filter(s=>!s.parentId).map(s=>s.id));return e.filter(s=>!s.parentId).forEach(s=>{const a=s.data.kind==="terminal";i.setNode(s.id,{width:a?NG:s.data.layoutWidth??o6,height:a?jG:s.data.layoutHeight??l6})}),t.filter(s=>r.has(s.source)&&r.has(s.target)).forEach(s=>i.setEdge(s.source,s.target)),_G.layout(i),{nodes:e.map(s=>{if(s.parentId)return s;const a=i.node(s.id),l=s.data.kind==="terminal",c=l?NG:s.data.layoutWidth??o6,u=l?jG:s.data.layoutHeight??l6;return{...s,position:{x:a.x-c/2,y:a.y-u/2}}}),edges:t}}const DR=m.createContext(null),MR=m.createContext("horizontal");function Jrt({id:e,sourceX:t,sourceY:n,targetX:i,targetY:r,sourcePosition:s,targetPosition:a,markerEnd:l,style:c,label:u,data:d}){const{t:f}=Oe("create"),h=m.useContext(DR),[p,g]=m.useState(!1),[b,v,y]=W_({sourceX:t,sourceY:n,targetX:i,targetY:r,sourcePosition:s,targetPosition:a,offset:d!=null&&d.loop?28:20});return o.jsxs(o.Fragment,{children:[o.jsx(iE,{id:e,path:b,markerEnd:l,style:c}),h&&(d==null?void 0:d.insert)&&o.jsx("path",{d:b,className:"abc-edge-hover-path",onPointerEnter:()=>g(!0),onPointerLeave:()=>g(!1)}),(u||h&&(d==null?void 0:d.insert))&&o.jsx(Htt,{children:o.jsxs("div",{className:`abc-edge-tools${h&&(d!=null&&d.insert)?" can-insert":""}${p?" is-visible":""}`,style:{transform:`translate(-50%, -50%) translate(${v}px, ${y}px)`},onPointerEnter:()=>g(!0),onPointerLeave:()=>g(!1),children:[u&&o.jsx("span",{className:"abc-edge-label",children:u}),h&&(d==null?void 0:d.insert)&&o.jsx("button",{type:"button",className:"abc-edge-add nodrag nopan","aria-label":f("buildCanvas.actions.insertHere"),title:f("buildCanvas.actions.insertHere"),onClick:x=>{x.stopPropagation(),h==null||h.onInsert(d.insert.parentPath,d.insert.index)},children:o.jsx(Mo,{})})]})})]})}function est({data:e,selected:t}){const{t:n}=Oe("create"),i=m.useContext(DR),r=m.useContext(MR),s=r==="vertical"?Xt.Top:Xt.Left,a=r==="vertical"?Xt.Bottom:Xt.Right,l=r==="vertical"?Xt.Right:Xt.Bottom,c=e.pattern??"llm",u=DO[c],d=u.icon;return o.jsxs("div",{className:`abc-node is-${c}${e.containedIn?` is-contained-in-${e.containedIn}`:""}${t?" is-selected":""}`,children:[o.jsx(dl,{type:"target",position:s,className:"abc-handle"}),c!=="llm"&&o.jsx("span",{className:"abc-node-icon",children:o.jsx(d,{})}),o.jsxs("span",{className:"abc-node-copy",children:[o.jsx("span",{className:"abc-node-meta",children:o.jsx("span",{children:n(u.labelKey)})}),o.jsx("strong",{children:e.title}),o.jsx("small",{children:e.description})]}),i&&e.path!==void 0&&e.path.length>0&&o.jsx("button",{type:"button",className:"abc-node-delete nodrag nopan","aria-label":n("buildCanvas.actions.deleteNamed",{name:e.title}),title:n("buildCanvas.actions.deleteNode"),onClick:f=>{f.stopPropagation(),i==null||i.onDelete(e.path)},children:o.jsx(vm,{})}),o.jsx(dl,{type:"source",position:a,className:"abc-handle"}),e.containedIn==="loop"&&o.jsxs(o.Fragment,{children:[o.jsx(dl,{id:"loop-target",type:"target",position:l,className:"abc-handle abc-loop-handle"}),o.jsx(dl,{id:"loop-source",type:"source",position:l,className:"abc-handle abc-loop-handle"})]})]})}function tst({data:e,selected:t}){const{t:n}=Oe("create"),i=m.useContext(DR),r=m.useContext(MR),s=r==="vertical"?Xt.Top:Xt.Left,a=r==="vertical"?Xt.Bottom:Xt.Right,l=r==="vertical"?Xt.Right:Xt.Bottom,c=e.pattern??"sequential",u=e.childCount??0,d=n(c==="llm"?"buildCanvas.actions.addSubagent":c==="parallel"?"buildCanvas.actions.addParallelStep":c==="loop"?"buildCanvas.actions.addLoopStep":"buildCanvas.actions.addNextStep");return o.jsxs("div",{className:`abc-group is-${c}${e.compactEmptyGroup?" is-compact-empty":""}${t?" is-selected":""}`,children:[o.jsx(dl,{type:"target",position:s,className:"abc-handle"}),o.jsx("header",{className:"abc-group-head",children:o.jsxs("span",{children:[o.jsx("strong",{title:e.title,children:e.title}),o.jsx("small",{children:e.description})]})}),i&&e.path!==void 0&&u>0&&c!=="parallel"&&o.jsxs("div",{className:"abc-group-boundary-actions",children:[o.jsx("button",{type:"button",className:"abc-group-boundary-add is-start nodrag nopan","aria-label":n("buildCanvas.actions.addFirst"),title:n("buildCanvas.actions.addFirst"),onClick:f=>{f.stopPropagation(),i.onInsert(e.path,0)},children:o.jsx(Mo,{})}),o.jsx("button",{type:"button",className:"abc-group-boundary-add is-end nodrag nopan","aria-label":n("buildCanvas.actions.addLast"),title:n("buildCanvas.actions.addLast"),onClick:f=>{f.stopPropagation(),i.onAdd(e.path)},children:o.jsx(Mo,{})})]}),i&&e.path!==void 0&&u>0&&c==="parallel"&&o.jsxs("button",{type:"button",className:"abc-group-add abc-group-add-bottom nodrag nopan",onClick:f=>{f.stopPropagation(),i.onAdd(e.path)},children:[o.jsx(Mo,{}),o.jsx("span",{children:d})]}),i&&e.path!==void 0&&u===0&&o.jsxs("button",{type:"button",className:"abc-group-add abc-group-add-empty nodrag nopan",onClick:f=>{f.stopPropagation(),i.onAdd(e.path)},children:[o.jsx(Mo,{}),o.jsx("span",{children:d})]}),i&&e.path!==void 0&&e.path.length>0&&o.jsx("button",{type:"button",className:"abc-node-delete nodrag nopan","aria-label":n("buildCanvas.actions.deleteNamed",{name:e.title}),title:n("buildCanvas.actions.deleteNode"),onClick:f=>{f.stopPropagation(),i==null||i.onDelete(e.path)},children:o.jsx(vm,{})}),o.jsx(dl,{type:"source",position:a,className:"abc-handle"}),e.containedIn==="loop"&&o.jsxs(o.Fragment,{children:[o.jsx(dl,{id:"loop-target",type:"target",position:l,className:"abc-handle abc-loop-handle"}),o.jsx(dl,{id:"loop-source",type:"source",position:l,className:"abc-handle abc-loop-handle"})]})]})}function nst({data:e}){const t=m.useContext(MR);return o.jsxs("div",{className:"abc-terminal",children:[o.jsx(dl,{type:"target",position:t==="vertical"?Xt.Top:Xt.Left,className:"abc-handle"}),o.jsx("span",{children:e.title}),o.jsx(dl,{type:"source",position:t==="vertical"?Xt.Bottom:Xt.Right,className:"abc-handle"})]})}const ist={agent:est,group:tst,terminal:nst},rst={insertStep:Jrt};function sst({draft:e,selectedPath:t,onSelect:n,onAdd:i,onInsert:r,onDelete:s,readOnly:a=!1,interactivePreview:l=!1,direction:c="horizontal"}){const{t:u}=Oe("create"),d=m.useMemo(()=>PG(e,c,a,u),[]),[f,h,p]=qtt(d.nodes),[g,b,v]=Wtt(d.edges),y=Gtt(),x=m.useRef(`${c}:${a?"readonly":"editable"}:${IG(e)}`),w=m.useRef(null),{fitView:O}=jR(),k=m.useMemo(()=>PG(e,c,a,u),[c,e,a,u]),[S,E]=m.useState(()=>window.matchMedia("(max-width: 860px)").matches),C=m.useMemo(()=>a?{padding:.16,minZoom:.05,maxZoom:.9}:S?{padding:.08,minZoom:.35,maxZoom:.9}:{padding:.14,minZoom:.42,maxZoom:1.1},[S,a]),N=m.useCallback((j=0)=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{const T=w.current;if(T&&(T.clientWidth===0||T.clientHeight===0)&&j<8){N(j+1);return}O(C)})})},[C,O]);m.useEffect(()=>{const j=window.matchMedia("(max-width: 860px)"),T=L=>E(L.matches);return j.addEventListener("change",T),()=>j.removeEventListener("change",T)},[]),m.useEffect(()=>{const j=`${c}:${a?"readonly":"editable"}:${IG(e)}`,T=j!==x.current;x.current=j,b(k.edges),h(L=>{const A=new Map(L.map(R=>[R.id,R]));return k.nodes.map(R=>{const P=A.get(R.id);return{...R,measured:!T&&P&&P.type===R.type?P.measured:void 0,position:!T&&P?P.position:R.position,selected:R.data.kind==="agent"&&!!R.data.path&&Yrt(R.data.path,t)}})}),T&&N()},[k,e,N,t,b,h]),m.useEffect(()=>{N()},[S,N]),m.useEffect(()=>{y&&N()},[k,N,y]),m.useEffect(()=>{if(!a||!w.current)return;const j=new ResizeObserver(()=>N());return j.observe(w.current),N(),()=>j.disconnect()},[N,a]);const _=m.useMemo(()=>a?null:{onAdd:i,onInsert:r,onDelete:s},[i,s,r,a]);return o.jsx(MR.Provider,{value:c,children:o.jsx(DR.Provider,{value:_,children:o.jsx("section",{className:`abc-root is-${c}${a?" is-readonly":""}`,"aria-label":u(a?"buildCanvas.readOnlyLabel":"buildCanvas.label"),children:o.jsx("div",{ref:w,className:"abc-canvas",children:o.jsxs(ztt,{nodes:f,edges:g,nodeTypes:ist,edgeTypes:rst,onNodesChange:p,onEdgesChange:v,onNodeClick:(j,T)=>{!a&&T.data.kind==="agent"&&T.data.path&&n(T.data.path)},nodesDraggable:!a,nodesConnectable:!1,nodesFocusable:!a,elementsSelectable:!a,edgesFocusable:!1,edgesReconnectable:!1,panOnDrag:!a||l,zoomOnDoubleClick:l,zoomOnPinch:!a||l,zoomOnScroll:!a||l,fitView:!0,fitViewOptions:C,onInit:()=>N(),minZoom:a?.05:.35,maxZoom:1.6,proOptions:{hideAttribution:!0},ariaLabelConfig:{"controls.ariaLabel":u("buildCanvas.controls.ariaLabel"),"controls.zoomIn.ariaLabel":u("buildCanvas.controls.zoomIn"),"controls.zoomOut.ariaLabel":u("buildCanvas.controls.zoomOut"),"controls.fitView.ariaLabel":u("buildCanvas.controls.fitView")},children:[o.jsx(ent,{gap:20,size:1.2,color:"hsl(34 20% 82%)"}),(!a||l)&&o.jsx(ont,{showInteractive:!1}),Grt]})})})})})}function DS(e){return o.jsx(_Oe,{children:o.jsx(sst,{...e})})}Zt.hasResourceBundle("en-US","create")||Zt.addResourceBundle("en-US","create",mse,!0,!0);Zt.hasResourceBundle("zh-CN","create")||Zt.addResourceBundle("zh-CN","create",Rce,!0,!0);function It(e,t={}){return Zt.t(e,{...t,ns:"create"})}function sE(e,t){return e.map(n=>({...n,get label(){return It(`${t}.${n.id}.label`)},get desc(){return It(`${t}.${n.id}.description`)}}))}function qc(e,t){const n={...e};for(const[i,r]of Object.entries(t))Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:()=>It(r)});return n}const awe="https://ark.cn-beijing.volces.com/api/v3/";qc({key:"MODEL_AGENT_NAME",required:!1,placeholder:"doubao-seed-1-6-250615"},{comment:"traditional.catalog.env.modelAgentName.comment"});const lA=[qc({key:"MODEL_EMBEDDING_NAME",required:!1,placeholder:"doubao-embedding-vision-250615"},{comment:"traditional.catalog.env.embeddingModelName.comment"}),{key:"MODEL_EMBEDDING_DIM",required:!1,placeholder:"2048"},{key:"MODEL_EMBEDDING_API_BASE",required:!1,placeholder:awe}],Z_=[],J_={get label(){return It("traditional.catalog.links.console")},url:"https://console.volcengine.com/vikingdb/openviking"},ast={get label(){return It("traditional.catalog.links.documentation")},url:"https://github.com/volcengine/OpenViking/blob/main/docs/zh/api/05-sessions.md"},owe="https://api.vikingdb.cn-beijing.volces.com/openviking",ost=`{ +`)),d=u.reduce((f,h)=>f.concat(...h),[]);return[u,d]}return[[],[]]},[e]);return m.useEffect(()=>{const c=(t==null?void 0:t.target)??GK,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=p=>{var v,y;if(r.current=p.ctrlKey||p.metaKey||p.shiftKey||p.altKey,(!r.current||r.current&&!u)&&I1e(p))return!1;const b=YK(p.code,l);if(s.current.add(p[b]),XK(a,s.current,!1)){const x=((y=(v=p.composedPath)==null?void 0:v.call(p))==null?void 0:y[0])||p.target,w=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";t.preventDefault!==!1&&(r.current||!w)&&p.preventDefault(),i(!0)}},f=p=>{const g=YK(p.code,l);XK(a,s.current,!0)?(i(!1),s.current.clear()):s.current.delete(p[g]),p.key==="Meta"&&s.current.clear(),r.current=!1},h=()=>{s.current.clear(),i(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",h),window.addEventListener("contextmenu",h),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",h),window.removeEventListener("contextmenu",h)}}},[e,i]),n}function XK(e,t,n){return e.filter(i=>n||i.length===t.size).some(i=>i.every(r=>t.has(r)))}function YK(e,t){return t.includes(e)?"code":"key"}const Oet=()=>{const e=us();return m.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:i}=e.getState();return i?i.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[i,r,s],panZoom:a}=e.getState();return a?(await a.setViewport({x:t.x??i,y:t.y??r,zoom:t.zoom??s},n),!0):!1},getViewport:()=>{const[t,n,i]=e.getState().transform;return{x:t,y:n,zoom:i}},setCenter:async(t,n,i)=>e.getState().setCenter(t,n,i),fitBounds:async(t,n)=>{const{width:i,height:r,minZoom:s,maxZoom:a,panZoom:l}=e.getState(),c=J7(t,i,r,s,a,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{const{transform:i,snapGrid:r,snapToGrid:s,domNode:a}=e.getState();if(!a)return t;const{x:l,y:c}=a.getBoundingClientRect(),u={x:t.x-l,y:t.y-c},d=n.snapGrid??r,f=n.snapToGrid??s;return Px(u,i,f,d)},flowToScreenPosition:t=>{const{transform:n,domNode:i}=e.getState();if(!i)return t;const{x:r,y:s}=i.getBoundingClientRect(),a=zv(t,n);return{x:a.x+r,y:a.y+s}}}),[])};function iOe(e,t){const n=[],i=new Map,r=[];for(const s of e)if(s.type==="add"){r.push(s);continue}else if(s.type==="remove"||s.type==="replace")i.set(s.id,[s]);else{const a=i.get(s.id);a?a.push(s):i.set(s.id,[s])}for(const s of t){const a=i.get(s.id);if(!a){n.push(s);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){n.push({...a[0].item});continue}const l={...s};for(const c of a)wet(c,l);n.push(l)}return r.length&&r.forEach(s=>{s.index!==void 0?n.splice(s.index,0,{...s.item}):n.push({...s.item})}),n}function wet(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function rOe(e,t){return iOe(e,t)}function sOe(e,t){return iOe(e,t)}function xg(e,t){return{id:e,type:"select",selected:t}}function ky(e,t=new Set,n=!1){const i=[];for(const[r,s]of e){const a=t.has(r);!(s.selected===void 0&&!a)&&s.selected!==a&&(n&&(s.selected=a),i.push(xg(s.id,a)))}return i}function ZK({items:e=[],lookup:t}){var r;const n=[],i=new Map(e.map(s=>[s.id,s]));for(const[s,a]of e.entries()){const l=t.get(a.id),c=((r=l==null?void 0:l.internals)==null?void 0:r.userNode)??l;c!==void 0&&c!==a&&n.push({id:a.id,item:a,type:"replace"}),c===void 0&&n.push({item:a,type:"add",index:s})}for(const[s]of t)i.get(s)===void 0&&n.push({id:s,type:"remove"});return n}function JK(e){return{id:e.id,type:"remove"}}const ket=N1e();function Eet(e,t,n={}){return rJe(e,t,{...n,onError:n.onError??ket})}const eG=e=>zZe(e),Cet=e=>C1e(e);function aOe(e){return m.forwardRef(e)}const Tet=typeof window<"u"?m.useLayoutEffect:m.useEffect;function tG(e){const[t,n]=m.useState(BigInt(0)),[i]=m.useState(()=>Aet(()=>n(r=>r+BigInt(1))));return Tet(()=>{const r=i.get();r.length&&(e(r),i.reset())},[t]),i}function Aet(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const oOe=m.createContext(null);function _et({children:e}){const t=us(),n=m.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:h,fitViewQueued:p,onNodesChangeMiddlewareMap:g}=t.getState();let b=c;for(const y of l)b=typeof y=="function"?y(b):y;let v=ZK({items:b,lookup:h});for(const y of g.values())v=y(v);d&&u(b),v.length>0?f==null||f(v):p&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:x,setNodes:w}=t.getState();y&&w(x)})},[]),i=tG(n),r=m.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:h}=t.getState();let p=c;for(const g of l)p=typeof g=="function"?g(p):g;d?u(p):f&&f(ZK({items:p,lookup:h}))},[]),s=tG(r),a=m.useMemo(()=>({nodeQueue:i,edgeQueue:s}),[]);return o.jsx(oOe.Provider,{value:a,children:e})}function Net(){const e=m.useContext(oOe);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const jet=e=>!!e.panZoom;function _R(){const e=Oet(),t=us(),n=Net(),i=ji(jet),r=m.useMemo(()=>{const s=f=>t.getState().nodeLookup.get(f),a=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},c=f=>{var y,x;const{nodeLookup:h,nodeOrigin:p}=t.getState(),g=eG(f)?f:h.get(f.id),b=g.parentId?j1e(g.position,g.measured,g.parentId,h,p):g.position,v={...g,position:b,width:((y=g.measured)==null?void 0:y.width)??g.width,height:((x=g.measured)==null?void 0:x.height)??g.height};return Qv(v)},u=(f,h,p={replace:!1})=>{a(g=>g.map(b=>{if(b.id===f){const v=typeof h=="function"?h(b):h;return p.replace&&eG(v)?v:{...b,...v}}return b}))},d=(f,h,p={replace:!1})=>{l(g=>g.map(b=>{if(b.id===f){const v=typeof h=="function"?h(b):h;return p.replace&&Cet(v)?v:{...b,...v}}return b}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var h;return(h=s(f))==null?void 0:h.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(h=>({...h}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:a,setEdges:l,addNodes:f=>{const h=Array.isArray(f)?f:[f];n.nodeQueue.push(p=>[...p,...h])},addEdges:f=>{const h=Array.isArray(f)?f:[f];n.edgeQueue.push(p=>[...p,...h])},toObject:()=>{const{nodes:f=[],edges:h=[],transform:p}=t.getState(),[g,b,v]=p;return{nodes:f.map(y=>({...y})),edges:h.map(y=>({...y})),viewport:{x:g,y:b,zoom:v}}},deleteElements:async({nodes:f=[],edges:h=[]})=>{const{nodes:p,edges:g,onNodesDelete:b,onEdgesDelete:v,triggerNodeChanges:y,triggerEdgeChanges:x,onDelete:w,onBeforeDelete:O}=t.getState(),{nodes:k,edges:S}=await KZe({nodesToRemove:f,edgesToRemove:h,nodes:p,edges:g,onBeforeDelete:O}),E=S.length>0,C=k.length>0;if(E){const N=S.map(JK);v==null||v(S),x(N)}if(C){const N=k.map(JK);b==null||b(k),y(N)}return(C||E)&&(w==null||w({nodes:k,edges:S})),{deletedNodes:k,deletedEdges:S}},getIntersectingNodes:(f,h=!0,p)=>{const g=NK(f),b=g?f:c(f),v=p!==void 0;return b?(p||t.getState().nodes).filter(y=>{const x=t.getState().nodeLookup.get(y.id);if(x&&!g&&(y.id===f.id||!x.internals.positionAbsolute))return!1;const w=Qv(v?y:x),O=AS(w,b);return h&&O>0||O>=w.width*w.height||O>=b.width*b.height}):[]},isNodeIntersecting:(f,h,p=!0)=>{const b=NK(f)?f:c(f);if(!b)return!1;const v=AS(b,h);return p&&v>0||v>=h.width*h.height||v>=b.width*b.height},updateNode:u,updateNodeData:(f,h,p={replace:!1})=>{u(f,g=>{const b=typeof h=="function"?h(g):h;return p.replace?{...g,data:b}:{...g,data:{...g.data,...b}}},p)},updateEdge:d,updateEdgeData:(f,h,p={replace:!1})=>{d(f,g=>{const b=typeof h=="function"?h(g):h;return p.replace?{...g,data:b}:{...g,data:{...g.data,...b}}},p)},getNodesBounds:f=>{const{nodeLookup:h,nodeOrigin:p}=t.getState();return VZe(f,{nodeLookup:h,nodeOrigin:p})},getHandleConnections:({type:f,id:h,nodeId:p})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${p}-${f}${h?`-${h}`:""}`))==null?void 0:g.values())??[])},getNodeConnections:({type:f,handleId:h,nodeId:p})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${p}${f?h?`-${f}-${h}`:`-${f}`:""}`))==null?void 0:g.values())??[])},fitView:async f=>{const h=t.getState().fitViewResolver??YZe();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:h}),n.nodeQueue.push(p=>[...p]),h.promise}}},[]);return m.useMemo(()=>({...r,...e,viewportInitialized:i}),[i])}const nG=e=>e.selected,Ret=typeof window<"u"?window:void 0;function Iet({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=us(),{deleteElements:i}=_R(),r=NS(e,{actInsideInputWithModifier:!1}),s=NS(t,{target:Ret});m.useEffect(()=>{if(r){const{edges:a,nodes:l}=n.getState();i({nodes:l.filter(nG),edges:a.filter(nG)}),n.setState({nodesSelectionActive:!1})}},[r]),m.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])}function Pet(e){const t=us();m.useEffect(()=>{const n=()=>{var r,s,a,l;if(!e.current||!(((s=(r=e.current).checkVisibility)==null?void 0:s.call(r))??!0))return!1;const i=tB(e.current);(i.height===0||i.width===0)&&((l=(a=t.getState()).onError)==null||l.call(a,"004",Fu.error004())),t.setState({width:i.width||500,height:i.height||500})};if(e.current){n(),window.addEventListener("resize",n);const i=new ResizeObserver(()=>n());return i.observe(e.current),()=>{window.removeEventListener("resize",n),i&&e.current&&i.unobserve(e.current)}}},[])}const NR={position:"absolute",width:"100%",height:"100%",top:0,left:0},Det=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Met({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:i=!1,panOnScrollSpeed:r=.5,panOnScrollMode:s=eb.Free,zoomOnDoubleClick:a=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:h,preventScrolling:p=!0,children:g,noWheelClassName:b,noPanClassName:v,onViewportChange:y,isControlledViewport:x,paneClickDistance:w,selectionOnDrag:O}){const k=us(),S=m.useRef(null),{userSelectionActive:E,lib:C,connectionInProgress:N}=ji(Det,cs),_=NS(h),j=m.useRef();Pet(S);const T=m.useCallback(L=>{y==null||y({x:L[0],y:L[1],zoom:L[2]}),x||k.setState({transform:L})},[y,x]);return m.useEffect(()=>{if(S.current){j.current=PJe({domNode:S.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:P=>k.setState($=>$.paneDragging===P?$:{paneDragging:P}),onPanZoomStart:(P,$)=>{const{onViewportChangeStart:M,onMoveStart:B}=k.getState();B==null||B(P,$),M==null||M($)},onPanZoom:(P,$)=>{const{onViewportChange:M,onMove:B}=k.getState();B==null||B(P,$),M==null||M($)},onPanZoomEnd:(P,$)=>{const{onViewportChangeEnd:M,onMoveEnd:B}=k.getState();B==null||B(P,$),M==null||M($)}});const{x:L,y:A,zoom:R}=j.current.getViewport();return k.setState({panZoom:j.current,transform:[L,A,R],domNode:S.current.closest(".react-flow")}),()=>{var P;(P=j.current)==null||P.destroy()}}},[]),m.useEffect(()=>{var L;(L=j.current)==null||L.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:i,panOnScrollSpeed:r,panOnScrollMode:s,zoomOnDoubleClick:a,panOnDrag:l,zoomActivationKeyPressed:_,preventScrolling:p,noPanClassName:v,userSelectionActive:E,noWheelClassName:b,lib:C,onTransformChange:T,connectionInProgress:N,selectionOnDrag:O,paneClickDistance:w})},[e,t,n,i,r,s,a,l,_,p,v,E,b,C,T,N,O,w]),o.jsx("div",{className:"react-flow__renderer",ref:S,style:NR,children:g})}const Let=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function $et(){const{userSelectionActive:e,userSelectionRect:t}=ji(Let,cs);return e&&t?o.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const ZD=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},Fet=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Bet({isSelecting:e,selectionKeyPressed:t,selectionMode:n=CS.Full,panOnDrag:i,autoPanOnSelection:r,paneClickDistance:s,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:d,onPaneScroll:f,onPaneMouseEnter:h,onPaneMouseMove:p,onPaneMouseLeave:g,children:b}){const v=m.useRef(0),y=us(),{userSelectionActive:x,elementsSelectable:w,dragging:O,connectionInProgress:k,panBy:S,autoPanSpeed:E}=ji(Fet,cs),C=w&&(e||x),N=m.useRef(null),_=m.useRef(),j=m.useRef(new Set),T=m.useRef(new Set),L=m.useRef(!1),A=m.useRef({x:0,y:0}),R=m.useRef(!1),P=oe=>{if(L.current||k){L.current=!1;return}u==null||u(oe),y.getState().resetSelectedElements(),y.setState({nodesSelectionActive:!1})},$=oe=>{if(Array.isArray(i)&&(i!=null&&i.includes(2))){oe.preventDefault();return}d==null||d(oe)},M=f?oe=>f(oe):void 0,B=oe=>{L.current&&(oe.stopPropagation(),L.current=!1)},I=oe=>{var rt,Be;const{domNode:re,transform:pe}=y.getState();if(_.current=re==null?void 0:re.getBoundingClientRect(),!_.current)return;const K=oe.target===N.current;if(!K&&!!oe.target.closest(".nokey")||!e||!(a&&K||t)||oe.button!==0||!oe.isPrimary)return;(Be=(rt=oe.target)==null?void 0:rt.setPointerCapture)==null||Be.call(rt,oe.pointerId),L.current=!1;const{x:fe,y:Se}=_u(oe.nativeEvent,_.current),Te=Px({x:fe,y:Se},pe);y.setState({userSelectionRect:{width:0,height:0,startX:Te.x,startY:Te.y,x:fe,y:Se}}),K||(oe.stopPropagation(),oe.preventDefault())};function H(oe,re){const{userSelectionRect:pe}=y.getState();if(!pe)return;const{transform:K,nodeLookup:G,edgeLookup:se,connectionLookup:fe,triggerNodeChanges:Se,triggerEdgeChanges:Te,defaultEdgeOptions:rt}=y.getState(),Be={x:pe.startX,y:pe.startY},{x:Me,y:Ie}=zv(Be,K),qe={startX:Be.x,startY:Be.y,x:oeLe.id)),T.current=new Set;const ke=(rt==null?void 0:rt.selectable)??!0;for(const Le of j.current){const Y=fe.get(Le);if(Y)for(const{edgeId:he}of Y.values()){const Oe=se.get(he);Oe&&(Oe.selectable??ke)&&T.current.add(he)}}if(!jK(Pe,j.current)){const Le=ky(G,j.current,!0);Se(Le)}if(!jK(Ve,T.current)){const Le=ky(se,T.current);Te(Le)}y.setState({userSelectionRect:qe,userSelectionActive:!0,nodesSelectionActive:!1})}function X(){if(!r||!_.current)return;const[oe,re]=Z7(A.current,_.current,E);S({x:oe,y:re}).then(pe=>{if(!L.current||!pe){v.current=requestAnimationFrame(X);return}const{x:K,y:G}=A.current;H(K,G),v.current=requestAnimationFrame(X)})}const Q=()=>{cancelAnimationFrame(v.current),v.current=0,R.current=!1};m.useEffect(()=>()=>Q(),[]);const q=oe=>{const{userSelectionRect:re,transform:pe,resetSelectedElements:K}=y.getState();if(!_.current||!re)return;const{x:G,y:se}=_u(oe.nativeEvent,_.current);A.current={x:G,y:se};const fe=zv({x:re.startX,y:re.startY},pe);if(!L.current){const Se=t?0:s;if(Math.hypot(G-fe.x,se-fe.y)<=Se)return;K(),l==null||l(oe)}L.current=!0,R.current||(X(),R.current=!0),H(G,se)},U=oe=>{var re,pe;oe.button===0&&((pe=(re=oe.target)==null?void 0:re.releasePointerCapture)==null||pe.call(re,oe.pointerId),!x&&oe.target===N.current&&y.getState().userSelectionRect&&(P==null||P(oe)),y.setState({userSelectionActive:!1,userSelectionRect:null}),L.current&&(c==null||c(oe),y.setState({nodesSelectionActive:j.current.size>0})),Q())},te=oe=>{var re,pe;(pe=(re=oe.target)==null?void 0:re.releasePointerCapture)==null||pe.call(re,oe.pointerId),Q()},le=i===!0||Array.isArray(i)&&i.includes(0);return o.jsxs("div",{className:ia(["react-flow__pane",{draggable:le,dragging:O,selection:e}]),onClick:C?void 0:ZD(P,N),onContextMenu:ZD($,N),onWheel:ZD(M,N),onPointerEnter:C?void 0:h,onPointerMove:C?q:p,onPointerUp:C?U:void 0,onPointerCancel:C?te:void 0,onPointerDownCapture:C?I:void 0,onClickCapture:C?B:void 0,onPointerLeave:g,ref:N,style:NR,children:[b,o.jsx($et,{})]})}function r6({id:e,store:t,unselect:n=!1,nodeRef:i}){const{addSelectedNodes:r,unselectNodesAndEdges:s,multiSelectionActive:a,nodeLookup:l,onError:c}=t.getState(),u=l.get(e);if(!u){c==null||c("012",Fu.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&a)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=i==null?void 0:i.current)==null?void 0:d.blur()})):r([e])}function lOe({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:i,nodeId:r,isSelectable:s,nodeClickDistance:a}){const l=us(),[c,u]=m.useState(!1),d=m.useRef();return m.useEffect(()=>{d.current=xJe({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{r6({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),m.useEffect(()=>{if(!(t||!e.current||!d.current))return d.current.update({noDragClassName:n,handleSelector:i,domNode:e.current,isSelectable:s,nodeId:r,nodeClickDistance:a}),()=>{var f;(f=d.current)==null||f.destroy()}},[n,i,t,s,e,r,a]),c}const Uet=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function cOe(){const e=us();return m.useCallback(n=>{const{nodeExtent:i,snapToGrid:r,snapGrid:s,nodesDraggable:a,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,h=Uet(a),p=r?s[0]:5,g=r?s[1]:5,b=n.direction.x*p*n.factor,v=n.direction.y*g*n.factor;for(const[,y]of u){if(!h(y))continue;let x={x:y.internals.positionAbsolute.x+b,y:y.internals.positionAbsolute.y+v};r&&(x=Jk(x,s));const{position:w,positionAbsolute:O}=T1e({nodeId:y.id,nextPosition:x,nodeLookup:u,nodeExtent:i,nodeOrigin:d,onError:l});y.position=w,y.internals.positionAbsolute=O,f.set(y.id,y)}c(f)},[])}const oB=m.createContext(null),Qet=oB.Provider;oB.Consumer;const uOe=()=>m.useContext(oB),zet=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Vet=(e,t,n)=>i=>{const{connectionClickStartHandle:r,connectionMode:s,connection:a}=i,{fromHandle:l,toHandle:c,isValid:u}=a,d=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:d,clickConnecting:(r==null?void 0:r.nodeId)===e&&(r==null?void 0:r.id)===t&&(r==null?void 0:r.type)===n,isPossibleEndHandle:s===Bv.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!r,valid:d&&u}};function Het({type:e="source",position:t=Xt.Top,isValidConnection:n,isConnectable:i=!0,isConnectableStart:r=!0,isConnectableEnd:s=!0,id:a,onConnect:l,children:c,className:u,onMouseDown:d,onTouchStart:f,...h},p){var R,P;const g=a||null,b=e==="target",v=us(),y=uOe(),{connectOnClick:x,noPanClassName:w,rfId:O}=ji(zet,cs),{connectingFrom:k,connectingTo:S,clickConnecting:E,isPossibleEndHandle:C,connectionInProcess:N,clickConnectionInProcess:_,valid:j}=ji(Vet(y,g,e),cs);y||(P=(R=v.getState()).onError)==null||P.call(R,"010",Fu.error010());const T=$=>{const{defaultEdgeOptions:M,onConnect:B,hasDefaultEdges:I}=v.getState(),H={...M,...$};if(I){const{edges:X,setEdges:Q,onError:q}=v.getState();Q(Eet(H,X,{onError:q}))}B==null||B(H),l==null||l(H)},L=$=>{if(!y)return;const M=P1e($.nativeEvent);if(r&&(M&&$.button===0||!M)){const B=v.getState();i6.onPointerDown($.nativeEvent,{handleDomNode:$.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:b,handleId:g,nodeId:y,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:(...I)=>{var H,X;return(X=(H=v.getState()).onConnectEnd)==null?void 0:X.call(H,...I)},updateConnection:B.updateConnection,onConnect:T,isValidConnection:n||((...I)=>{var H,X;return((X=(H=v.getState()).isValidConnection)==null?void 0:X.call(H,...I))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}M?d==null||d($):f==null||f($)},A=$=>{const{onClickConnectStart:M,onClickConnectEnd:B,connectionClickStartHandle:I,connectionMode:H,isValidConnection:X,lib:Q,rfId:q,nodeLookup:U,connection:te}=v.getState();if(!y||!I&&!r)return;if(!I){M==null||M($.nativeEvent,{nodeId:y,handleId:g,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:y,type:e,id:g}});return}const le=R1e($.target),oe=n||X,{connection:re,isValid:pe}=i6.isValid($.nativeEvent,{handle:{nodeId:y,id:g,type:e},connectionMode:H,fromNodeId:I.nodeId,fromHandleId:I.id||null,fromType:I.type,isValidConnection:oe,flowId:q,doc:le,lib:Q,nodeLookup:U});pe&&re&&T(re);const K=structuredClone(te);delete K.inProgress,K.toPosition=K.toHandle?K.toHandle.position:null,B==null||B($,K),v.setState({connectionClickStartHandle:null})};return o.jsx("div",{"data-handleid":g,"data-nodeid":y,"data-handlepos":t,"data-id":`${O}-${y}-${g}-${e}`,className:ia(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",w,u,{source:!b,target:b,connectable:i,connectablestart:r,connectableend:s,clickconnecting:E,connectingfrom:k,connectingto:S,valid:j,connectionindicator:i&&(!N||C)&&(N||_?s:r)}]),onMouseDown:L,onTouchStart:L,onClick:x?A:void 0,ref:p,...h,children:c})}const ul=m.memo(aOe(Het));function qet({data:e,isConnectable:t,sourcePosition:n=Xt.Bottom}){return o.jsxs(o.Fragment,{children:[e==null?void 0:e.label,o.jsx(ul,{type:"source",position:n,isConnectable:t})]})}function Wet({data:e,isConnectable:t,targetPosition:n=Xt.Top,sourcePosition:i=Xt.Bottom}){return o.jsxs(o.Fragment,{children:[o.jsx(ul,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,o.jsx(ul,{type:"source",position:i,isConnectable:t})]})}function Ket(){return null}function Get({data:e,isConnectable:t,targetPosition:n=Xt.Top}){return o.jsxs(o.Fragment,{children:[o.jsx(ul,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const H_={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},iG={input:qet,default:Wet,output:Get,group:Ket};function Xet(e){var t,n,i,r;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((i=e.style)==null?void 0:i.width),height:e.height??((r=e.style)==null?void 0:r.height)}}const Yet=e=>{const{width:t,height:n,x:i,y:r}=Zk(e.nodeLookup,{filter:s=>!!s.selected});return{width:Au(t)?t:null,height:Au(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${i}px,${r}px)`}};function Zet({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const i=us(),{width:r,height:s,transformString:a,userSelectionActive:l}=ji(Yet,cs),c=cOe(),u=m.useRef(null);m.useEffect(()=>{var p;n||(p=u.current)==null||p.focus({preventScroll:!0})},[n]);const d=!l&&r!==null&&s!==null;if(lOe({nodeRef:u,disabled:!d}),!d)return null;const f=e?p=>{const g=i.getState().nodes.filter(b=>b.selected);e(p,g)}:void 0,h=p=>{Object.prototype.hasOwnProperty.call(H_,p.key)&&(p.preventDefault(),c({direction:H_[p.key],factor:p.shiftKey?4:1}))};return o.jsx("div",{className:ia(["react-flow__nodesselection","react-flow__container",t]),style:{transform:a},children:o.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:r,height:s}})})}const rG=typeof window<"u"?window:void 0,Jet=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function dOe({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:r,onPaneContextMenu:s,onPaneScroll:a,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:h,onSelectionEnd:p,multiSelectionKeyCode:g,panActivationKeyCode:b,zoomActivationKeyCode:v,elementsSelectable:y,zoomOnScroll:x,zoomOnPinch:w,panOnScroll:O,panOnScrollSpeed:k,panOnScrollMode:S,zoomOnDoubleClick:E,panOnDrag:C,autoPanOnSelection:N,defaultViewport:_,translateExtent:j,minZoom:T,maxZoom:L,preventScrolling:A,onSelectionContextMenu:R,noWheelClassName:P,noPanClassName:$,disableKeyboardA11y:M,onViewportChange:B,isControlledViewport:I}){const{nodesSelectionActive:H,userSelectionActive:X}=ji(Jet,cs),Q=NS(u,{target:rG}),q=NS(b,{target:rG}),U=q||C,te=q||O,le=d&&U!==!0,oe=Q||X||le;return Iet({deleteKeyCode:c,multiSelectionKeyCode:g}),o.jsx(Met,{onPaneContextMenu:s,elementsSelectable:y,zoomOnScroll:x,zoomOnPinch:w,panOnScroll:te,panOnScrollSpeed:k,panOnScrollMode:S,zoomOnDoubleClick:E,panOnDrag:!Q&&U,defaultViewport:_,translateExtent:j,minZoom:T,maxZoom:L,zoomActivationKeyCode:v,preventScrolling:A,noWheelClassName:P,noPanClassName:$,onViewportChange:B,isControlledViewport:I,paneClickDistance:l,selectionOnDrag:le,children:o.jsxs(Bet,{onSelectionStart:h,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:r,onPaneContextMenu:s,onPaneScroll:a,panOnDrag:U,autoPanOnSelection:N,isSelecting:!!oe,selectionMode:f,selectionKeyPressed:Q,paneClickDistance:l,selectionOnDrag:le,children:[e,H&&o.jsx(Zet,{onSelectionContextMenu:R,noPanClassName:$,disableKeyboardA11y:M})]})})}dOe.displayName="FlowRenderer";const ett=m.memo(dOe),ttt=e=>t=>e?Y7(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function ntt(e){return ji(m.useCallback(ttt(e),[e]),cs)}const itt=e=>e.updateNodeInternals;function rtt(){const e=ji(itt),[t]=m.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const i=new Map;n.forEach(r=>{const s=r.target.getAttribute("data-id");i.set(s,{id:s,nodeElement:r.target,force:!0})}),e(i)}));return m.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function stt({node:e,nodeType:t,hasDimensions:n,resizeObserver:i}){const r=us(),s=m.useRef(null),a=m.useRef(null),l=m.useRef(e.sourcePosition),c=m.useRef(e.targetPosition),u=m.useRef(t),d=n&&!!e.internals.handleBounds;return m.useEffect(()=>{s.current&&!e.hidden&&(!d||a.current!==s.current)&&(a.current&&(i==null||i.unobserve(a.current)),i==null||i.observe(s.current),a.current=s.current)},[d,e.hidden]),m.useEffect(()=>()=>{a.current&&(i==null||i.unobserve(a.current),a.current=null)},[]),m.useEffect(()=>{if(s.current){const f=u.current!==t,h=l.current!==e.sourcePosition,p=c.current!==e.targetPosition;(f||h||p)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),s}function att({id:e,onClick:t,onMouseEnter:n,onMouseMove:i,onMouseLeave:r,onContextMenu:s,onDoubleClick:a,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:h,noPanClassName:p,disableKeyboardA11y:g,rfId:b,nodeTypes:v,nodeClickDistance:y,onError:x}){const{node:w,internals:O,isParent:k}=ji(oe=>{const re=oe.nodeLookup.get(e),pe=oe.parentLookup.has(e);return{node:re,internals:re.internals,isParent:pe}},cs);let S=w.type||"default",E=(v==null?void 0:v[S])||iG[S];E===void 0&&(x==null||x("003",Fu.error003(S)),S="default",E=(v==null?void 0:v.default)||iG.default);const C=!!(w.draggable||l&&typeof w.draggable>"u"),N=!!(w.selectable||c&&typeof w.selectable>"u"),_=!!(w.connectable||u&&typeof w.connectable>"u"),j=!!(w.focusable||d&&typeof w.focusable>"u"),T=us(),L=eB(w),A=stt({node:w,nodeType:S,hasDimensions:L,resizeObserver:f}),R=lOe({nodeRef:A,disabled:w.hidden||!C,noDragClassName:h,handleSelector:w.dragHandle,nodeId:e,isSelectable:N,nodeClickDistance:y}),P=cOe();if(w.hidden)return null;const $=Uh(w),M=Xet(w),B=N||C||t||n||i||r,I=n?oe=>n(oe,{...O.userNode}):void 0,H=i?oe=>i(oe,{...O.userNode}):void 0,X=r?oe=>r(oe,{...O.userNode}):void 0,Q=s?oe=>s(oe,{...O.userNode}):void 0,q=a?oe=>a(oe,{...O.userNode}):void 0,U=oe=>{const{selectNodesOnDrag:re,nodeDragThreshold:pe}=T.getState();N&&(!re||!C||pe>0)&&r6({id:e,store:T,nodeRef:A}),t&&t(oe,{...O.userNode})},te=oe=>{if(!(I1e(oe.nativeEvent)||g)){if(w1e.includes(oe.key)&&N){const re=oe.key==="Escape";r6({id:e,store:T,unselect:re,nodeRef:A})}else if(C&&w.selected&&Object.prototype.hasOwnProperty.call(H_,oe.key)){oe.preventDefault();const{ariaLabelConfig:re}=T.getState();T.setState({ariaLiveMessage:re["node.a11yDescription.ariaLiveMessage"]({direction:oe.key.replace("Arrow","").toLowerCase(),x:~~O.positionAbsolute.x,y:~~O.positionAbsolute.y})}),P({direction:H_[oe.key],factor:oe.shiftKey?4:1})}}},le=()=>{var fe;if(g||!((fe=A.current)!=null&&fe.matches(":focus-visible")))return;const{transform:oe,width:re,height:pe,autoPanOnNodeFocus:K,setCenter:G}=T.getState();if(!K)return;Y7(new Map([[e,w]]),{x:0,y:0,width:re,height:pe},oe,!0).length>0||G(w.position.x+$.width/2,w.position.y+$.height/2,{zoom:oe[2]})};return o.jsx("div",{className:ia(["react-flow__node",`react-flow__node-${S}`,{[p]:C},w.className,{selected:w.selected,selectable:N,parent:k,draggable:C,dragging:R}]),ref:A,style:{zIndex:O.z,transform:`translate(${O.positionAbsolute.x}px,${O.positionAbsolute.y}px)`,pointerEvents:B?"all":"none",visibility:L?"visible":"hidden",...w.style,...M},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:H,onMouseLeave:X,onContextMenu:Q,onClick:U,onDoubleClick:q,onKeyDown:j?te:void 0,tabIndex:j?0:void 0,onFocus:j?le:void 0,role:w.ariaRole??(j?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${eOe}-${b}`,"aria-label":w.ariaLabel,...w.domAttributes,children:o.jsx(Qet,{value:e,children:o.jsx(E,{id:e,data:w.data,type:S,positionAbsoluteX:O.positionAbsolute.x,positionAbsoluteY:O.positionAbsolute.y,selected:w.selected??!1,selectable:N,draggable:C,deletable:w.deletable??!0,isConnectable:_,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:R,dragHandle:w.dragHandle,zIndex:O.z,parentId:w.parentId,...$})})})}var ott=m.memo(att);const ltt=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function fOe(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:r,onError:s}=ji(ltt,cs),a=ntt(e.onlyRenderVisibleElements),l=rtt();return o.jsx("div",{className:"react-flow__nodes",style:NR,children:a.map(c=>o.jsx(ott,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:s},c))})}fOe.displayName="NodeRenderer";const ctt=m.memo(fOe);function utt(e){return ji(m.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const i=[];if(n.width&&n.height)for(const r of n.edges){const s=n.nodeLookup.get(r.source),a=n.nodeLookup.get(r.target);s&&a&&tJe({sourceNode:s,targetNode:a,width:n.width,height:n.height,transform:n.transform})&&i.push(r.id)}return i},[e]),cs)}const dtt=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return o.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},ftt=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return o.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},sG={[TS.Arrow]:dtt,[TS.ArrowClosed]:ftt};function htt(e){const t=us();return m.useMemo(()=>{var r,s;return Object.prototype.hasOwnProperty.call(sG,e)?sG[e]:((s=(r=t.getState()).onError)==null||s.call(r,"009",Fu.error009(e)),null)},[e])}const ptt=({id:e,type:t,color:n,width:i=12.5,height:r=12.5,markerUnits:s="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const c=htt(t);return c?o.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${i}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:l,refX:"0",refY:"0",children:o.jsx(c,{color:n,strokeWidth:a})}):null},hOe=({defaultColor:e,rfId:t})=>{const n=ji(s=>s.edges),i=ji(s=>s.defaultEdgeOptions),r=m.useMemo(()=>cJe(n,{id:t,defaultColor:e,defaultMarkerStart:i==null?void 0:i.markerStart,defaultMarkerEnd:i==null?void 0:i.markerEnd}),[n,i,t,e]);return r.length?o.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:o.jsx("defs",{children:r.map(s=>o.jsx(ptt,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};hOe.displayName="MarkerDefinitions";var mtt=m.memo(hOe);function pOe({x:e,y:t,label:n,labelStyle:i,labelShowBg:r=!0,labelBgStyle:s,labelBgPadding:a=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...d}){const[f,h]=m.useState({x:1,y:0,width:0,height:0}),p=ia(["react-flow__edge-textwrapper",u]),g=m.useRef(null);return m.useEffect(()=>{if(g.current){const b=g.current.getBBox();h({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?o.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:p,visibility:f.width?"visible":"hidden",...d,children:[r&&o.jsx("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:s,rx:l,ry:l}),o.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:g,style:i,children:n}),c]}):null}pOe.displayName="EdgeText";const gtt=m.memo(pOe);function eE({path:e,labelX:t,labelY:n,label:i,labelStyle:r,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return o.jsxs(o.Fragment,{children:[o.jsx("path",{...d,d:e,fill:"none",className:ia(["react-flow__edge-path",d.className])}),u?o.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,i&&Au(t)&&Au(n)?o.jsx(gtt,{x:t,y:n,label:i,labelStyle:r,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function aG({pos:e,x1:t,y1:n,x2:i,y2:r}){return e===Xt.Left||e===Xt.Right?[.5*(t+i),n]:[t,.5*(n+r)]}function mOe({sourceX:e,sourceY:t,sourcePosition:n=Xt.Bottom,targetX:i,targetY:r,targetPosition:s=Xt.Top}){const[a,l]=aG({pos:n,x1:e,y1:t,x2:i,y2:r}),[c,u]=aG({pos:s,x1:i,y1:r,x2:e,y2:t}),[d,f,h,p]=D1e({sourceX:e,sourceY:t,targetX:i,targetY:r,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${a},${l} ${c},${u} ${i},${r}`,d,f,h,p]}function gOe(e){return m.memo(({id:t,sourceX:n,sourceY:i,targetX:r,targetY:s,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:p,style:g,markerEnd:b,markerStart:v,interactionWidth:y})=>{const[x,w,O]=mOe({sourceX:n,sourceY:i,sourcePosition:a,targetX:r,targetY:s,targetPosition:l}),k=e.isInternal?void 0:t;return o.jsx(eE,{id:k,path:x,labelX:w,labelY:O,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:p,style:g,markerEnd:b,markerStart:v,interactionWidth:y})})}const btt=gOe({isInternal:!1}),bOe=gOe({isInternal:!0});btt.displayName="SimpleBezierEdge";bOe.displayName="SimpleBezierEdgeInternal";function yOe(e){return m.memo(({id:t,sourceX:n,sourceY:i,targetX:r,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,sourcePosition:p=Xt.Bottom,targetPosition:g=Xt.Top,markerEnd:b,markerStart:v,pathOptions:y,interactionWidth:x})=>{const[w,O,k]=V_({sourceX:n,sourceY:i,sourcePosition:p,targetX:r,targetY:s,targetPosition:g,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset,stepPosition:y==null?void 0:y.stepPosition}),S=e.isInternal?void 0:t;return o.jsx(eE,{id:S,path:w,labelX:O,labelY:k,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:b,markerStart:v,interactionWidth:x})})}const vOe=yOe({isInternal:!1}),xOe=yOe({isInternal:!0});vOe.displayName="SmoothStepEdge";xOe.displayName="SmoothStepEdgeInternal";function OOe(e){return m.memo(({id:t,...n})=>{var r;const i=e.isInternal?void 0:t;return o.jsx(vOe,{...n,id:i,pathOptions:m.useMemo(()=>{var s;return{borderRadius:0,offset:(s=n.pathOptions)==null?void 0:s.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const ytt=OOe({isInternal:!1}),wOe=OOe({isInternal:!0});ytt.displayName="StepEdge";wOe.displayName="StepEdgeInternal";function SOe(e){return m.memo(({id:t,sourceX:n,sourceY:i,targetX:r,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,interactionWidth:b})=>{const[v,y,x]=$1e({sourceX:n,sourceY:i,targetX:r,targetY:s}),w=e.isInternal?void 0:t;return o.jsx(eE,{id:w,path:v,labelX:y,labelY:x,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:g,interactionWidth:b})})}const vtt=SOe({isInternal:!1}),kOe=SOe({isInternal:!0});vtt.displayName="StraightEdge";kOe.displayName="StraightEdgeInternal";function EOe(e){return m.memo(({id:t,sourceX:n,sourceY:i,targetX:r,targetY:s,sourcePosition:a=Xt.Bottom,targetPosition:l=Xt.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:p,style:g,markerEnd:b,markerStart:v,pathOptions:y,interactionWidth:x})=>{const[w,O,k]=M1e({sourceX:n,sourceY:i,sourcePosition:a,targetX:r,targetY:s,targetPosition:l,curvature:y==null?void 0:y.curvature}),S=e.isInternal?void 0:t;return o.jsx(eE,{id:S,path:w,labelX:O,labelY:k,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:p,style:g,markerEnd:b,markerStart:v,interactionWidth:x})})}const xtt=EOe({isInternal:!1}),COe=EOe({isInternal:!0});xtt.displayName="BezierEdge";COe.displayName="BezierEdgeInternal";const oG={default:COe,straight:kOe,step:wOe,smoothstep:xOe,simplebezier:bOe},lG={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Ott=(e,t,n)=>n===Xt.Left?e-t:n===Xt.Right?e+t:e,wtt=(e,t,n)=>n===Xt.Top?e-t:n===Xt.Bottom?e+t:e,cG="react-flow__edgeupdater";function uG({position:e,centerX:t,centerY:n,radius:i=10,onMouseDown:r,onMouseEnter:s,onMouseOut:a,type:l}){return o.jsx("circle",{onMouseDown:r,onMouseEnter:s,onMouseOut:a,className:ia([cG,`${cG}-${l}`]),cx:Ott(t,i,e),cy:wtt(n,i,e),r:i,stroke:"transparent",fill:"transparent"})}function Stt({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:i,sourceY:r,targetX:s,targetY:a,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:h,setUpdateHover:p}){const g=us(),b=(O,k)=>{if(O.button!==0)return;const{autoPanOnConnect:S,domNode:E,connectionMode:C,connectionRadius:N,lib:_,onConnectStart:j,cancelConnection:T,nodeLookup:L,rfId:A,panBy:R,updateConnection:P}=g.getState(),$=k.type==="target",M=(H,X)=>{h(!1),f==null||f(H,n,k.type,X)},B=H=>u==null?void 0:u(n,H),I=(H,X)=>{h(!0),d==null||d(O,n,k.type),j==null||j(H,X)};i6.onPointerDown(O.nativeEvent,{autoPanOnConnect:S,connectionMode:C,connectionRadius:N,domNode:E,handleId:k.id,nodeId:k.nodeId,nodeLookup:L,isTarget:$,edgeUpdaterType:k.type,lib:_,flowId:A,cancelConnection:T,panBy:R,isValidConnection:(...H)=>{var X,Q;return((Q=(X=g.getState()).isValidConnection)==null?void 0:Q.call(X,...H))??!0},onConnect:B,onConnectStart:I,onConnectEnd:(...H)=>{var X,Q;return(Q=(X=g.getState()).onConnectEnd)==null?void 0:Q.call(X,...H)},onReconnectEnd:M,updateConnection:P,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:O.currentTarget})},v=O=>b(O,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),y=O=>b(O,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),x=()=>p(!0),w=()=>p(!1);return o.jsxs(o.Fragment,{children:[(e===!0||e==="source")&&o.jsx(uG,{position:l,centerX:i,centerY:r,radius:t,onMouseDown:v,onMouseEnter:x,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&o.jsx(uG,{position:c,centerX:s,centerY:a,radius:t,onMouseDown:y,onMouseEnter:x,onMouseOut:w,type:"target"})]})}function ktt({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:i,onClick:r,onDoubleClick:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:h,onReconnectEnd:p,rfId:g,edgeTypes:b,noPanClassName:v,onError:y,disableKeyboardA11y:x}){let w=ji(G=>G.edgeLookup.get(e));const O=ji(G=>G.defaultEdgeOptions);w=O?{...O,...w}:w;let k=w.type||"default",S=(b==null?void 0:b[k])||oG[k];S===void 0&&(y==null||y("011",Fu.error011(k)),k="default",S=(b==null?void 0:b.default)||oG.default);const E=!!(w.focusable||t&&typeof w.focusable>"u"),C=typeof f<"u"&&(w.reconnectable||n&&typeof w.reconnectable>"u"),N=!!(w.selectable||i&&typeof w.selectable>"u"),_=m.useRef(null),[j,T]=m.useState(!1),[L,A]=m.useState(!1),R=us(),{zIndex:P,sourceX:$,sourceY:M,targetX:B,targetY:I,sourcePosition:H,targetPosition:X}=ji(m.useCallback(G=>{const se=G.nodeLookup.get(w.source),fe=G.nodeLookup.get(w.target);if(!se||!fe)return{zIndex:w.zIndex,...lG};const Se=lJe({id:e,sourceNode:se,targetNode:fe,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:G.connectionMode,onError:y});return{zIndex:eJe({selected:w.selected,zIndex:w.zIndex,sourceNode:se,targetNode:fe,elevateOnSelect:G.elevateEdgesOnSelect,zIndexMode:G.zIndexMode}),...Se||lG}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),cs),Q=m.useMemo(()=>w.markerStart?`url('#${t6(w.markerStart,g)}')`:void 0,[w.markerStart,g]),q=m.useMemo(()=>w.markerEnd?`url('#${t6(w.markerEnd,g)}')`:void 0,[w.markerEnd,g]);if(w.hidden||$===null||M===null||B===null||I===null)return null;const U=G=>{var Te;const{addSelectedEdges:se,unselectNodesAndEdges:fe,multiSelectionActive:Se}=R.getState();N&&(R.setState({nodesSelectionActive:!1}),w.selected&&Se?(fe({nodes:[],edges:[w]}),(Te=_.current)==null||Te.blur()):se([e])),r&&r(G,w)},te=s?G=>{s(G,{...w})}:void 0,le=a?G=>{a(G,{...w})}:void 0,oe=l?G=>{l(G,{...w})}:void 0,re=c?G=>{c(G,{...w})}:void 0,pe=u?G=>{u(G,{...w})}:void 0,K=G=>{var se;if(!x&&w1e.includes(G.key)&&N){const{unselectNodesAndEdges:fe,addSelectedEdges:Se}=R.getState();G.key==="Escape"?((se=_.current)==null||se.blur(),fe({edges:[w]})):Se([e])}};return o.jsx("svg",{style:{zIndex:P},children:o.jsxs("g",{className:ia(["react-flow__edge",`react-flow__edge-${k}`,w.className,v,{selected:w.selected,animated:w.animated,inactive:!N&&!r,updating:j,selectable:N}]),onClick:U,onDoubleClick:te,onContextMenu:le,onMouseEnter:oe,onMouseMove:re,onMouseLeave:pe,onKeyDown:E?K:void 0,tabIndex:E?0:void 0,role:w.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":E?`${tOe}-${g}`:void 0,ref:_,...w.domAttributes,children:[!L&&o.jsx(S,{id:e,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:N,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:$,sourceY:M,targetX:B,targetY:I,sourcePosition:H,targetPosition:X,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:Q,markerEnd:q,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),C&&o.jsx(Stt,{edge:w,isReconnectable:C,reconnectRadius:d,onReconnect:f,onReconnectStart:h,onReconnectEnd:p,sourceX:$,sourceY:M,targetX:B,targetY:I,sourcePosition:H,targetPosition:X,setUpdateHover:T,setReconnecting:A})]})})}var Ett=m.memo(ktt);const Ctt=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function TOe({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:i,noPanClassName:r,onReconnect:s,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:h,onReconnectStart:p,onReconnectEnd:g,disableKeyboardA11y:b}){const{edgesFocusable:v,edgesReconnectable:y,elementsSelectable:x,onError:w}=ji(Ctt,cs),O=utt(t);return o.jsxs("div",{className:"react-flow__edges",children:[o.jsx(mtt,{defaultColor:e,rfId:n}),O.map(k=>o.jsx(Ett,{id:k,edgesFocusable:v,edgesReconnectable:y,elementsSelectable:x,noPanClassName:r,onReconnect:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:h,onReconnectStart:p,onReconnectEnd:g,rfId:n,onError:w,edgeTypes:i,disableKeyboardA11y:b},k))]})}TOe.displayName="EdgeRenderer";const Ttt=m.memo(TOe),Att=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function _tt({children:e}){const t=ji(Att);return o.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Ntt(e){const t=_R(),n=m.useRef(!1);m.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const jtt=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function Rtt(e){const t=ji(jtt),n=us();return m.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Itt(e){return e.connection.inProgress?{...e.connection,to:Px(e.connection.to,e.transform)}:{...e.connection}}function Ptt(e){return Itt}function Dtt(e){const t=Ptt();return ji(t,cs)}const Mtt=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Ltt({containerStyle:e,style:t,type:n,component:i}){const{nodesConnectable:r,width:s,height:a,isValid:l,inProgress:c}=ji(Mtt,cs);return!(s&&r&&c)?null:o.jsx("svg",{style:e,width:s,height:a,className:"react-flow__connectionline react-flow__container",children:o.jsx("g",{className:ia(["react-flow__connection",E1e(l)]),children:o.jsx(AOe,{style:t,type:n,CustomComponent:i,isValid:l})})})}const AOe=({style:e,type:t=Np.Bezier,CustomComponent:n,isValid:i})=>{const{inProgress:r,from:s,fromNode:a,fromHandle:l,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:h,pointer:p}=Dtt();if(!r)return;if(n)return o.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:a,fromHandle:l,fromX:s.x,fromY:s.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:h,connectionStatus:E1e(i),toNode:d,toHandle:f,pointer:p});let g="";const b={sourceX:s.x,sourceY:s.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:h};switch(t){case Np.Bezier:[g]=M1e(b);break;case Np.SimpleBezier:[g]=mOe(b);break;case Np.Step:[g]=V_({...b,borderRadius:0});break;case Np.SmoothStep:[g]=V_(b);break;default:[g]=$1e(b)}return o.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};AOe.displayName="ConnectionLine";const $tt={};function dG(e=$tt){m.useRef(e),us(),m.useEffect(()=>{},[e])}function Ftt(){us(),m.useRef(!1),m.useEffect(()=>{},[])}function _Oe({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:i,onEdgeClick:r,onNodeDoubleClick:s,onEdgeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:h,onSelectionEnd:p,connectionLineType:g,connectionLineStyle:b,connectionLineComponent:v,connectionLineContainerStyle:y,selectionKeyCode:x,selectionOnDrag:w,selectionMode:O,multiSelectionKeyCode:k,panActivationKeyCode:S,zoomActivationKeyCode:E,deleteKeyCode:C,onlyRenderVisibleElements:N,elementsSelectable:_,defaultViewport:j,translateExtent:T,minZoom:L,maxZoom:A,preventScrolling:R,defaultMarkerColor:P,zoomOnScroll:$,zoomOnPinch:M,panOnScroll:B,panOnScrollSpeed:I,panOnScrollMode:H,zoomOnDoubleClick:X,panOnDrag:Q,autoPanOnSelection:q,onPaneClick:U,onPaneMouseEnter:te,onPaneMouseMove:le,onPaneMouseLeave:oe,onPaneScroll:re,onPaneContextMenu:pe,paneClickDistance:K,nodeClickDistance:G,onEdgeContextMenu:se,onEdgeMouseEnter:fe,onEdgeMouseMove:Se,onEdgeMouseLeave:Te,reconnectRadius:rt,onReconnect:Be,onReconnectStart:Me,onReconnectEnd:Ie,noDragClassName:qe,noWheelClassName:Pe,noPanClassName:Ve,disableKeyboardA11y:ke,nodeExtent:Le,rfId:Y,viewport:he,onViewportChange:Oe}){return dG(e),dG(t),Ftt(),Ntt(n),Rtt(he),o.jsx(ett,{onPaneClick:U,onPaneMouseEnter:te,onPaneMouseMove:le,onPaneMouseLeave:oe,onPaneContextMenu:pe,onPaneScroll:re,paneClickDistance:K,deleteKeyCode:C,selectionKeyCode:x,selectionOnDrag:w,selectionMode:O,onSelectionStart:h,onSelectionEnd:p,multiSelectionKeyCode:k,panActivationKeyCode:S,zoomActivationKeyCode:E,elementsSelectable:_,zoomOnScroll:$,zoomOnPinch:M,zoomOnDoubleClick:X,panOnScroll:B,panOnScrollSpeed:I,panOnScrollMode:H,panOnDrag:Q,autoPanOnSelection:q,defaultViewport:j,translateExtent:T,minZoom:L,maxZoom:A,onSelectionContextMenu:f,preventScrolling:R,noDragClassName:qe,noWheelClassName:Pe,noPanClassName:Ve,disableKeyboardA11y:ke,onViewportChange:Oe,isControlledViewport:!!he,children:o.jsxs(_tt,{children:[o.jsx(Ttt,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:a,onReconnect:Be,onReconnectStart:Me,onReconnectEnd:Ie,onlyRenderVisibleElements:N,onEdgeContextMenu:se,onEdgeMouseEnter:fe,onEdgeMouseMove:Se,onEdgeMouseLeave:Te,reconnectRadius:rt,defaultMarkerColor:P,noPanClassName:Ve,disableKeyboardA11y:ke,rfId:Y}),o.jsx(Ltt,{style:b,type:g,component:v,containerStyle:y}),o.jsx("div",{className:"react-flow__edgelabel-renderer"}),o.jsx(ctt,{nodeTypes:e,onNodeClick:i,onNodeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:G,onlyRenderVisibleElements:N,noPanClassName:Ve,noDragClassName:qe,disableKeyboardA11y:ke,nodeExtent:Le,rfId:Y}),o.jsx("div",{className:"react-flow__viewport-portal"})]})})}_Oe.displayName="GraphView";const Btt=m.memo(_Oe),Utt=N1e(),fG=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:r,height:s,fitView:a,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:h="basic"}={})=>{const p=new Map,g=new Map,b=new Map,v=new Map,y=i??t??[],x=n??e??[],w=d??[0,0],O=f??ES;U1e(b,v,y);const{nodesInitialized:k}=n6(x,p,g,{nodeOrigin:w,nodeExtent:O,zIndexMode:h});let S=[0,0,1];if(a&&r&&s){const E=Zk(p,{filter:j=>!!((j.width||j.initialWidth)&&(j.height||j.initialHeight))}),{x:C,y:N,zoom:_}=J7(E,r,s,c,u,(l==null?void 0:l.padding)??.1);S=[C,N,_]}return{rfId:"1",width:r??0,height:s??0,transform:S,nodes:x,nodesInitialized:k,nodeLookup:p,parentLookup:g,edges:y,edgeLookup:v,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:i!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:ES,nodeExtent:O,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Bv.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:l,fitViewResolver:null,connection:{...k1e},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Utt,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:S1e,zIndexMode:h,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Qtt=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:r,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:h})=>tet((p,g)=>{async function b(){const{nodeLookup:v,panZoom:y,fitViewOptions:x,fitViewResolver:w,width:O,height:k,minZoom:S,maxZoom:E}=g();y&&(await WZe({nodes:v,width:O,height:k,panZoom:y,minZoom:S,maxZoom:E},x),w==null||w.resolve(!0),p({fitViewResolver:null}))}return{...fG({nodes:e,edges:t,width:r,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:n,defaultEdges:i,zIndexMode:h}),setNodes:v=>{const{nodeLookup:y,parentLookup:x,nodeOrigin:w,elevateNodesOnSelect:O,fitViewQueued:k,zIndexMode:S,nodesSelectionActive:E}=g(),{nodesInitialized:C,hasSelectedNodes:N}=n6(v,y,x,{nodeOrigin:w,nodeExtent:f,elevateNodesOnSelect:O,checkEquality:!0,zIndexMode:S}),_=E&&N;k&&C?(b(),p({nodes:v,nodesInitialized:C,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:_})):p({nodes:v,nodesInitialized:C,nodesSelectionActive:_})},setEdges:v=>{const{connectionLookup:y,edgeLookup:x}=g();U1e(y,x,v),p({edges:v})},setDefaultNodesAndEdges:(v,y)=>{if(v){const{setNodes:x}=g();x(v),p({hasDefaultNodes:!0})}if(y){const{setEdges:x}=g();x(y),p({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:y,nodeLookup:x,parentLookup:w,domNode:O,nodeOrigin:k,nodeExtent:S,debug:E,fitViewQueued:C,zIndexMode:N}=g(),{changes:_,updatedInternals:j}=gJe(v,x,w,O,k,S,N);j&&(fJe(x,w,{nodeOrigin:k,nodeExtent:S,zIndexMode:N}),C?(b(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),(_==null?void 0:_.length)>0&&(E&&console.log("React Flow: trigger node changes",_),y==null||y(_)))},updateNodePositions:(v,y=!1)=>{const x=[];let w=[];const{nodeLookup:O,triggerNodeChanges:k,connection:S,updateConnection:E,onNodesChangeMiddlewareMap:C}=g();for(const[N,_]of v){const j=O.get(N),T=!!(j!=null&&j.expandParent&&(j!=null&&j.parentId)&&(_!=null&&_.position)),L={id:N,type:"position",position:T?{x:Math.max(0,_.position.x),y:Math.max(0,_.position.y)}:_.position,dragging:y};if(j&&S.inProgress&&S.fromNode.id===j.id){const A=xb(j,S.fromHandle,Xt.Left,!0);E({...S,from:A})}T&&j.parentId&&x.push({id:N,parentId:j.parentId,rect:{..._.internals.positionAbsolute,width:_.measured.width??0,height:_.measured.height??0}}),w.push(L)}if(x.length>0){const{parentLookup:N,nodeOrigin:_}=g(),j=aB(x,O,N,_);w.push(...j)}for(const N of C.values())w=N(w);k(w)},triggerNodeChanges:v=>{const{onNodesChange:y,setNodes:x,nodes:w,hasDefaultNodes:O,debug:k}=g();if(v!=null&&v.length){if(O){const S=rOe(v,w);x(S)}k&&console.log("React Flow: trigger node changes",v),y==null||y(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:y,setEdges:x,edges:w,hasDefaultEdges:O,debug:k}=g();if(v!=null&&v.length){if(O){const S=sOe(v,w);x(S)}k&&console.log("React Flow: trigger edge changes",v),y==null||y(v)}},addSelectedNodes:v=>{const{multiSelectionActive:y,edgeLookup:x,nodeLookup:w,triggerNodeChanges:O,triggerEdgeChanges:k}=g();if(y){const S=v.map(E=>xg(E,!0));O(S);return}O(ky(w,new Set([...v]),!0)),k(ky(x))},addSelectedEdges:v=>{const{multiSelectionActive:y,edgeLookup:x,nodeLookup:w,triggerNodeChanges:O,triggerEdgeChanges:k}=g();if(y){const S=v.map(E=>xg(E,!0));k(S);return}k(ky(x,new Set([...v]))),O(ky(w,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:y}={})=>{const{edges:x,nodes:w,nodeLookup:O,triggerNodeChanges:k,triggerEdgeChanges:S}=g(),E=v||w,C=y||x,N=[];for(const j of E){if(!j.selected)continue;const T=O.get(j.id);T&&(T.selected=!1),N.push(xg(j.id,!1))}const _=[];for(const j of C)j.selected&&_.push(xg(j.id,!1));k(N),S(_)},setMinZoom:v=>{const{panZoom:y,maxZoom:x}=g();y==null||y.setScaleExtent([v,x]),p({minZoom:v})},setMaxZoom:v=>{const{panZoom:y,minZoom:x}=g();y==null||y.setScaleExtent([x,v]),p({maxZoom:v})},setTranslateExtent:v=>{var y;(y=g().panZoom)==null||y.setTranslateExtent(v),p({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:y,triggerNodeChanges:x,triggerEdgeChanges:w,elementsSelectable:O}=g();if(!O)return;const k=y.reduce((E,C)=>C.selected?[...E,xg(C.id,!1)]:E,[]),S=v.reduce((E,C)=>C.selected?[...E,xg(C.id,!1)]:E,[]);x(k),w(S)},setNodeExtent:v=>{const{nodes:y,nodeLookup:x,parentLookup:w,nodeOrigin:O,elevateNodesOnSelect:k,nodeExtent:S,zIndexMode:E}=g();v[0][0]===S[0][0]&&v[0][1]===S[0][1]&&v[1][0]===S[1][0]&&v[1][1]===S[1][1]||(n6(y,x,w,{nodeOrigin:O,nodeExtent:v,elevateNodesOnSelect:k,checkEquality:!1,zIndexMode:E}),p({nodeExtent:v}))},panBy:v=>{const{transform:y,width:x,height:w,panZoom:O,translateExtent:k}=g();return bJe({delta:v,panZoom:O,transform:y,translateExtent:k,width:x,height:w})},setCenter:async(v,y,x)=>{const{width:w,height:O,maxZoom:k,panZoom:S}=g();if(!S)return!1;const E=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:k;return await S.setViewport({x:w/2-v*E,y:O/2-y*E,zoom:E},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),!0},cancelConnection:()=>{p({connection:{...k1e}})},updateConnection:v=>{p({connection:v})},reset:()=>p({...fG()})}},Object.is);function NOe({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:i,initialWidth:r,initialHeight:s,initialMinZoom:a,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:p}){const[g]=m.useState(()=>Qtt({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:r,height:s,fitView:u,minZoom:a,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h}));return o.jsx(net,{value:g,children:o.jsx(_et,{children:p})})}function ztt({children:e,nodes:t,edges:n,defaultNodes:i,defaultEdges:r,width:s,height:a,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:h,zIndexMode:p}){return m.useContext(TR)?o.jsx(o.Fragment,{children:e}):o.jsx(NOe,{initialNodes:t,initialEdges:n,defaultNodes:i,defaultEdges:r,initialWidth:s,initialHeight:a,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:h,zIndexMode:p,children:e})}const Vtt={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Htt({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,className:r,nodeTypes:s,edgeTypes:a,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:h,onConnect:p,onConnectStart:g,onConnectEnd:b,onClickConnectStart:v,onClickConnectEnd:y,onNodeMouseEnter:x,onNodeMouseMove:w,onNodeMouseLeave:O,onNodeContextMenu:k,onNodeDoubleClick:S,onNodeDragStart:E,onNodeDrag:C,onNodeDragStop:N,onNodesDelete:_,onEdgesDelete:j,onDelete:T,onSelectionChange:L,onSelectionDragStart:A,onSelectionDrag:R,onSelectionDragStop:P,onSelectionContextMenu:$,onSelectionStart:M,onSelectionEnd:B,onBeforeDelete:I,connectionMode:H,connectionLineType:X=Np.Bezier,connectionLineStyle:Q,connectionLineComponent:q,connectionLineContainerStyle:U,deleteKeyCode:te="Backspace",selectionKeyCode:le="Shift",selectionOnDrag:oe=!1,selectionMode:re=CS.Full,panActivationKeyCode:pe="Space",multiSelectionKeyCode:K=_S()?"Meta":"Control",zoomActivationKeyCode:G=_S()?"Meta":"Control",snapToGrid:se,snapGrid:fe,onlyRenderVisibleElements:Se=!1,selectNodesOnDrag:Te,nodesDraggable:rt,autoPanOnNodeFocus:Be,nodesConnectable:Me,nodesFocusable:Ie,nodeOrigin:qe=nOe,edgesFocusable:Pe,edgesReconnectable:Ve,elementsSelectable:ke=!0,defaultViewport:Le=get,minZoom:Y=.5,maxZoom:he=2,translateExtent:Oe=ES,preventScrolling:Ke=!0,nodeExtent:et,defaultMarkerColor:Ct="#b1b1b7",zoomOnScroll:je=!0,zoomOnPinch:ve=!0,panOnScroll:He=!1,panOnScrollSpeed:it=.5,panOnScrollMode:Ae=eb.Free,zoomOnDoubleClick:Wt=!0,panOnDrag:mn=!0,onPaneClick:qt,onPaneMouseEnter:xt,onPaneMouseMove:Nt,onPaneMouseLeave:at,onPaneScroll:bt,onPaneContextMenu:_e,paneClickDistance:st=1,nodeClickDistance:Re=0,children:gt,onReconnect:ut,onReconnectStart:ye,onReconnectEnd:ze,onEdgeContextMenu:tt,onEdgeDoubleClick:kt,onEdgeMouseEnter:_t,onEdgeMouseMove:rn,onEdgeMouseLeave:en,reconnectRadius:on=10,onNodesChange:J,onEdgesChange:Mt,noDragClassName:Cn="nodrag",noWheelClassName:De="nowheel",noPanClassName:pt="nopan",fitView:ot,fitViewOptions:Vn,connectOnClick:si,attributionPosition:Jn,proOptions:Wi,defaultEdgeOptions:$e,elevateNodesOnSelect:ht=!0,elevateEdgesOnSelect:Yt=!1,disableKeyboardA11y:hn=!1,autoPanOnConnect:tn,autoPanOnNodeDrag:Ei,autoPanOnSelection:Pn=!0,autoPanSpeed:gi,connectionRadius:oi,isValidConnection:bi,onError:Sn,style:rr,id:ci,nodeDragThreshold:Vi,connectionDragThreshold:ds,viewport:kr,onViewportChange:$r,width:_s,height:Fr,colorMode:vs="light",debug:Ns,onScroll:fs,ariaLabelConfig:ba,zIndexMode:jr="basic",...qs},Ia){const Jr=ci||"1",ya=xet(vs),sa=m.useCallback(hs=>{hs.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),fs==null||fs(hs)},[fs]);return o.jsx("div",{"data-testid":"rf__wrapper",...qs,onScroll:sa,style:{...rr,...Vtt},ref:Ia,className:ia(["react-flow",r,ya]),id:ci,role:"application",children:o.jsxs(ztt,{nodes:e,edges:t,width:_s,height:Fr,fitView:ot,fitViewOptions:Vn,minZoom:Y,maxZoom:he,nodeOrigin:qe,nodeExtent:et,zIndexMode:jr,children:[o.jsx(vet,{nodes:e,edges:t,defaultNodes:n,defaultEdges:i,onConnect:p,onConnectStart:g,onConnectEnd:b,onClickConnectStart:v,onClickConnectEnd:y,nodesDraggable:rt,autoPanOnNodeFocus:Be,nodesConnectable:Me,nodesFocusable:Ie,edgesFocusable:Pe,edgesReconnectable:Ve,elementsSelectable:ke,elevateNodesOnSelect:ht,elevateEdgesOnSelect:Yt,minZoom:Y,maxZoom:he,nodeExtent:et,onNodesChange:J,onEdgesChange:Mt,snapToGrid:se,snapGrid:fe,connectionMode:H,translateExtent:Oe,connectOnClick:si,defaultEdgeOptions:$e,fitView:ot,fitViewOptions:Vn,onNodesDelete:_,onEdgesDelete:j,onDelete:T,onNodeDragStart:E,onNodeDrag:C,onNodeDragStop:N,onSelectionDrag:R,onSelectionDragStart:A,onSelectionDragStop:P,onMove:d,onMoveStart:f,onMoveEnd:h,noPanClassName:pt,nodeOrigin:qe,rfId:Jr,autoPanOnConnect:tn,autoPanOnNodeDrag:Ei,autoPanSpeed:gi,onError:Sn,connectionRadius:oi,isValidConnection:bi,selectNodesOnDrag:Te,nodeDragThreshold:Vi,connectionDragThreshold:ds,onBeforeDelete:I,debug:Ns,ariaLabelConfig:ba,zIndexMode:jr}),o.jsx(Btt,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:w,onNodeMouseLeave:O,onNodeContextMenu:k,onNodeDoubleClick:S,nodeTypes:s,edgeTypes:a,connectionLineType:X,connectionLineStyle:Q,connectionLineComponent:q,connectionLineContainerStyle:U,selectionKeyCode:le,selectionOnDrag:oe,selectionMode:re,deleteKeyCode:te,multiSelectionKeyCode:K,panActivationKeyCode:pe,zoomActivationKeyCode:G,onlyRenderVisibleElements:Se,defaultViewport:Le,translateExtent:Oe,minZoom:Y,maxZoom:he,preventScrolling:Ke,zoomOnScroll:je,zoomOnPinch:ve,zoomOnDoubleClick:Wt,panOnScroll:He,panOnScrollSpeed:it,panOnScrollMode:Ae,panOnDrag:mn,autoPanOnSelection:Pn,onPaneClick:qt,onPaneMouseEnter:xt,onPaneMouseMove:Nt,onPaneMouseLeave:at,onPaneScroll:bt,onPaneContextMenu:_e,paneClickDistance:st,nodeClickDistance:Re,onSelectionContextMenu:$,onSelectionStart:M,onSelectionEnd:B,onReconnect:ut,onReconnectStart:ye,onReconnectEnd:ze,onEdgeContextMenu:tt,onEdgeDoubleClick:kt,onEdgeMouseEnter:_t,onEdgeMouseMove:rn,onEdgeMouseLeave:en,reconnectRadius:on,defaultMarkerColor:Ct,noDragClassName:Cn,noWheelClassName:De,noPanClassName:pt,rfId:Jr,disableKeyboardA11y:hn,nodeExtent:et,viewport:kr,onViewportChange:$r}),o.jsx(met,{onSelectionChange:L}),gt,o.jsx(uet,{proOptions:Wi,position:Jn}),o.jsx(cet,{rfId:Jr,disableKeyboardA11y:hn})]})})}var qtt=aOe(Htt);const Wtt=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function Ktt({children:e}){const t=ji(Wtt);return t?$i.createPortal(e,t):null}function Gtt(e){const[t,n]=m.useState(e),i=m.useCallback(r=>n(s=>rOe(r,s)),[]);return[t,n,i]}function Xtt(e){const[t,n]=m.useState(e),i=m.useCallback(r=>n(s=>sOe(r,s)),[]);return[t,n,i]}const Ytt=e=>t=>{if(!e.includeHiddenNodes)return t.nodesInitialized;if(t.nodeLookup.size===0)return!1;for(const[,{internals:n}]of t.nodeLookup)if(n.handleBounds===void 0||!eB(n.userNode))return!1;return!0};function Ztt(e={includeHiddenNodes:!1}){return ji(Ytt(e))}function Jtt({dimensions:e,lineWidth:t,variant:n,className:i}){return o.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ia(["react-flow__background-pattern",n,i])})}function ent({radius:e,className:t}){return o.jsx("circle",{cx:e,cy:e,r:e,className:ia(["react-flow__background-pattern","dots",t])})}var tm;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(tm||(tm={}));const tnt={[tm.Dots]:1,[tm.Lines]:1,[tm.Cross]:6},nnt=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function jOe({id:e,variant:t=tm.Dots,gap:n=20,size:i,lineWidth:r=1,offset:s=0,color:a,bgColor:l,style:c,className:u,patternClassName:d}){const f=m.useRef(null),{transform:h,patternId:p}=ji(nnt,cs),g=i||tnt[t],b=t===tm.Dots,v=t===tm.Cross,y=Array.isArray(n)?n:[n,n],x=[y[0]*h[2]||1,y[1]*h[2]||1],w=g*h[2],O=Array.isArray(s)?s:[s,s],k=v?[w,w]:x,S=[O[0]*h[2]||1+k[0]/2,O[1]*h[2]||1+k[1]/2],E=`${p}${e||""}`;return o.jsxs("svg",{className:ia(["react-flow__background",u]),style:{...c,...NR,"--xy-background-color-props":l,"--xy-background-pattern-color-props":a},ref:f,"data-testid":"rf__background",children:[o.jsx("pattern",{id:E,x:h[0]%x[0],y:h[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:b?o.jsx(ent,{radius:w/2,className:d}):o.jsx(Jtt,{dimensions:k,lineWidth:r,variant:t,className:d})}),o.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}jOe.displayName="Background";const int=m.memo(jOe);function rnt(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:o.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function snt(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:o.jsx("path",{d:"M0 0h32v4.2H0z"})})}function ant(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:o.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function ont(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function lnt(){return o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:o.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function hT({children:e,className:t,...n}){return o.jsx("button",{type:"button",className:ia(["react-flow__controls-button",t]),...n,children:e})}const cnt=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function ROe({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:i=!0,fitViewOptions:r,onZoomIn:s,onZoomOut:a,onFitView:l,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:h="vertical","aria-label":p}){const g=us(),{isInteractive:b,minZoomReached:v,maxZoomReached:y,ariaLabelConfig:x}=ji(cnt,cs),{zoomIn:w,zoomOut:O,fitView:k}=_R(),S=()=>{w(),s==null||s()},E=()=>{O(),a==null||a()},C=()=>{k(r),l==null||l()},N=()=>{g.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),c==null||c(!b)},_=h==="horizontal"?"horizontal":"vertical";return o.jsxs(AR,{className:ia(["react-flow__controls",_,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":p??x["controls.ariaLabel"],children:[t&&o.jsxs(o.Fragment,{children:[o.jsx(hT,{onClick:S,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:y,children:o.jsx(rnt,{})}),o.jsx(hT,{onClick:E,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:v,children:o.jsx(snt,{})})]}),n&&o.jsx(hT,{className:"react-flow__controls-fitview",onClick:C,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:o.jsx(ant,{})}),i&&o.jsx(hT,{className:"react-flow__controls-interactive",onClick:N,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:b?o.jsx(lnt,{}):o.jsx(ont,{})}),d]})}ROe.displayName="Controls";const unt=m.memo(ROe);function dnt({id:e,x:t,y:n,width:i,height:r,style:s,color:a,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:h,onClick:p}){const{background:g,backgroundColor:b}=s||{},v=a||g||b;return o.jsx("rect",{className:ia(["react-flow__minimap-node",{selected:h},u]),x:t,y:n,rx:d,ry:d,width:i,height:r,style:{fill:v,stroke:l,strokeWidth:c},shapeRendering:f,onClick:p?y=>p(y,e):void 0})}const fnt=m.memo(dnt),hnt=e=>e.nodes.map(t=>t.id),JD=e=>e instanceof Function?e:()=>e;function pnt({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:i=5,nodeStrokeWidth:r,nodeComponent:s=fnt,onClick:a}){const l=ji(hnt,cs),c=JD(t),u=JD(e),d=JD(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return o.jsx(o.Fragment,{children:l.map(h=>o.jsx(gnt,{id:h,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:i,nodeStrokeWidth:r,NodeComponent:s,onClick:a,shapeRendering:f},h))})}function mnt({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:i,nodeBorderRadius:r,nodeStrokeWidth:s,shapeRendering:a,NodeComponent:l,onClick:c}){const{node:u,x:d,y:f,width:h,height:p}=ji(g=>{const b=g.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};const v=b.internals.userNode,{x:y,y:x}=b.internals.positionAbsolute,{width:w,height:O}=Uh(v);return{node:v,x:y,y:x,width:w,height:O}},cs);return!u||u.hidden||!eB(u)?null:o.jsx(l,{x:d,y:f,width:h,height:p,style:u.style,selected:!!u.selected,className:i(u),color:t(u),borderRadius:r,strokeColor:n(u),strokeWidth:s,shapeRendering:a,onClick:c,id:u.id})}const gnt=m.memo(mnt);var bnt=m.memo(pnt);const ynt=200,vnt=150,xnt=e=>!e.hidden,Ont=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?_1e(Zk(e.nodeLookup,{filter:xnt}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},wnt="react-flow__minimap-desc";function IOe({style:e,className:t,nodeStrokeColor:n,nodeColor:i,nodeClassName:r="",nodeBorderRadius:s=5,nodeStrokeWidth:a,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:h="bottom-right",onClick:p,onNodeClick:g,pannable:b=!1,zoomable:v=!1,ariaLabel:y,inversePan:x,zoomStep:w=1,offsetScale:O=5}){const k=us(),S=m.useRef(null),{boundingRect:E,viewBB:C,rfId:N,panZoom:_,translateExtent:j,flowWidth:T,flowHeight:L,ariaLabelConfig:A}=ji(Ont,cs),R=(e==null?void 0:e.width)??ynt,P=(e==null?void 0:e.height)??vnt,$=E.width/R,M=E.height/P,B=Math.max($,M),I=B*R,H=B*P,X=O*B,Q=E.x-(I-E.width)/2-X,q=E.y-(H-E.height)/2-X,U=I+X*2,te=H+X*2,le=`${wnt}-${N}`,oe=m.useRef(0),re=m.useRef();oe.current=B,m.useEffect(()=>{if(S.current&&_)return re.current=CJe({domNode:S.current,panZoom:_,getTransform:()=>k.getState().transform,getViewScale:()=>oe.current}),()=>{var se;(se=re.current)==null||se.destroy()}},[_]),m.useEffect(()=>{var se;(se=re.current)==null||se.update({translateExtent:j,width:T,height:L,inversePan:x,pannable:b,zoomStep:w,zoomable:v})},[b,v,x,w,j,T,L]);const pe=p?se=>{var Te;const[fe,Se]=((Te=re.current)==null?void 0:Te.pointer(se))||[0,0];p(se,{x:fe,y:Se})}:void 0,K=g?m.useCallback((se,fe)=>{const Se=k.getState().nodeLookup.get(fe).internals.userNode;g(se,Se)},[]):void 0,G=y??A["minimap.ariaLabel"];return o.jsx(AR,{position:h,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*B:void 0,"--xy-minimap-node-background-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:ia(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:o.jsxs("svg",{width:R,height:P,viewBox:`${Q} ${q} ${U} ${te}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":le,ref:S,onClick:pe,children:[G&&o.jsx("title",{id:le,children:G}),o.jsx(bnt,{onClick:K,nodeColor:i,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:r,nodeStrokeWidth:a,nodeComponent:l}),o.jsx("path",{className:"react-flow__minimap-mask",d:`M${Q-X},${q-X}h${U+X*2}v${te+X*2}h${-U-X*2}z + M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}IOe.displayName="MiniMap";m.memo(IOe);const Snt=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,knt={[Vv.Line]:"right",[Vv.Handle]:"bottom-right"};function Ent({nodeId:e,position:t,variant:n=Vv.Handle,className:i,style:r=void 0,children:s,color:a,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:h,autoScale:p=!0,shouldResize:g,onResizeStart:b,onResize:v,onResizeEnd:y}){const x=uOe(),w=typeof e=="string"?e:x,O=us(),k=m.useRef(null),S=n===Vv.Handle,E=ji(m.useCallback(Snt(S&&p),[S,p]),cs),C=m.useRef(null),N=t??knt[n];m.useEffect(()=>{if(!(!k.current||!w))return C.current||(C.current=FJe({domNode:k.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:j,transform:T,snapGrid:L,snapToGrid:A,nodeOrigin:R,domNode:P}=O.getState();return{nodeLookup:j,transform:T,snapGrid:L,snapToGrid:A,nodeOrigin:R,paneDomNode:P}},onChange:(j,T)=>{const{triggerNodeChanges:L,nodeLookup:A,parentLookup:R,nodeOrigin:P}=O.getState(),$=[],M={x:j.x,y:j.y},B=A.get(w);if(B&&B.expandParent&&B.parentId){const I=B.origin??P,H=j.width??B.measured.width??0,X=j.height??B.measured.height??0,Q={id:B.id,parentId:B.parentId,rect:{width:H,height:X,...j1e({x:j.x??B.position.x,y:j.y??B.position.y},{width:H,height:X},B.parentId,A,I)}},q=aB([Q],A,R,P);$.push(...q),M.x=j.x?Math.max(I[0]*H,j.x):void 0,M.y=j.y?Math.max(I[1]*X,j.y):void 0}if(M.x!==void 0&&M.y!==void 0){const I={id:w,type:"position",position:{...M}};$.push(I)}if(j.width!==void 0&&j.height!==void 0){const H={id:w,type:"dimensions",resizing:!0,setAttributes:h?h==="horizontal"?"width":"height":!0,dimensions:{width:j.width,height:j.height}};$.push(H)}for(const I of T){const H={...I,type:"position"};$.push(H)}L($)},onEnd:({width:j,height:T})=>{const L={id:w,type:"dimensions",resizing:!1,dimensions:{width:j,height:T}};O.getState().triggerNodeChanges([L])}})),C.current.update({controlPosition:N,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:h,onResizeStart:b,onResize:v,onResizeEnd:y,shouldResize:g}),()=>{var j;(j=C.current)==null||j.destroy()}},[N,l,c,u,d,f,b,v,y,g]);const _=N.split("-");return o.jsx("div",{className:ia(["react-flow__resize-control","nodrag",..._,n,i]),ref:k,style:{...r,scale:E,...a&&{[S?"backgroundColor":"borderColor"]:a}},children:s})}m.memo(Ent);var POe=Object.defineProperty,Cnt=(e,t,n)=>t in e?POe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tnt=(e,t)=>{for(var n in t)POe(e,n,{get:t[n],enumerable:!0})},Ant=(e,t,n)=>Cnt(e,t+"",n),DOe={};Tnt(DOe,{Graph:()=>su,alg:()=>lB,json:()=>LOe,version:()=>jnt});var _nt=Object.defineProperty,MOe=(e,t)=>{for(var n in t)_nt(e,n,{get:t[n],enumerable:!0})},su=class{constructor(t){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},t&&(this._isDirected="directed"in t?t.directed:!0,this._isMultigraph="multigraph"in t?t.multigraph:!1,this._isCompound="compound"in t?t.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return typeof t!="function"?this._defaultNodeLabelFn=()=>t:this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(t=>Object.keys(this._in[t]).length===0)}sinks(){return this.nodes().filter(t=>Object.keys(this._out[t]).length===0)}setNodes(t,n){return t.forEach(i=>{n!==void 0?this.setNode(i,n):this.setNode(i)}),this}setNode(t,n){return t in this._nodes?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return t in this._nodes}removeNode(t){if(t in this._nodes){let n=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(i=>{this.setParent(i)}),delete this._children[t]),Object.keys(this._in[t]).forEach(n),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n="\0";else{n+="";for(let i=n;i!==void 0;i=this.parent(i))if(i===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}parent(t){if(this._isCompound){let n=this._parent[t];if(n!=="\0")return n}}children(t="\0"){if(this._isCompound){let n=this._children[t];if(n)return Object.keys(n)}else{if(t==="\0")return this.nodes();if(this.hasNode(t))return[]}return[]}predecessors(t){let n=this._preds[t];if(n)return Object.keys(n)}successors(t){let n=this._sucs[t];if(n)return Object.keys(n)}neighbors(t){let n=this.predecessors(t);if(n){let i=new Set(n);for(let r of this.successors(t))i.add(r);return Array.from(i.values())}}isLeaf(t){let n;return this.isDirected()?n=this.successors(t):n=this.neighbors(t),n.length===0}filterNodes(t){let n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph()),Object.entries(this._nodes).forEach(([s,a])=>{t(s)&&n.setNode(s,a)}),Object.values(this._edgeObjs).forEach(s=>{n.hasNode(s.v)&&n.hasNode(s.w)&&n.setEdge(s,this.edge(s))});let i={},r=s=>{let a=this.parent(s);return!a||n.hasNode(a)?(i[s]=a??void 0,a??void 0):a in i?i[a]:r(a)};return this._isCompound&&n.nodes().forEach(s=>n.setParent(s,r(s))),n}setDefaultEdgeLabel(t){return typeof t!="function"?this._defaultEdgeLabelFn=()=>t:this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,n){return t.reduce((i,r)=>(n!==void 0?this.setEdge(i,r,n):this.setEdge(i,r),r)),this}setEdge(t,n,i,r){let s,a,l,c,u=!1;typeof t=="object"&&t!==null&&"v"in t?(s=t.v,a=t.w,l=t.name,arguments.length===2&&(c=n,u=!0)):(s=t,a=n,l=r,arguments.length>2&&(c=i,u=!0)),s=""+s,a=""+a,l!==void 0&&(l=""+l);let d=_O(this._isDirected,s,a,l);if(d in this._edgeLabels)return u&&(this._edgeLabels[d]=c),this;if(l!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(s),this.setNode(a),this._edgeLabels[d]=u?c:this._defaultEdgeLabelFn(s,a,l);let f=Nnt(this._isDirected,s,a,l);return s=f.v,a=f.w,Object.freeze(f),this._edgeObjs[d]=f,hG(this._preds[a],s),hG(this._sucs[s],a),this._in[a][d]=f,this._out[s][d]=f,this._edgeCount++,this}edge(t,n,i){let r=arguments.length===1?eM(this._isDirected,t):_O(this._isDirected,t,n,i);return this._edgeLabels[r]}edgeAsObj(t,n,i){let r=arguments.length===1?this.edge(t):this.edge(t,n,i);return typeof r!="object"?{label:r}:r}hasEdge(t,n,i){return(arguments.length===1?eM(this._isDirected,t):_O(this._isDirected,t,n,i))in this._edgeLabels}removeEdge(t,n,i){let r=arguments.length===1?eM(this._isDirected,t):_O(this._isDirected,t,n,i),s=this._edgeObjs[r];if(s){let a=s.v,l=s.w;delete this._edgeLabels[r],delete this._edgeObjs[r],pG(this._preds[l],a),pG(this._sucs[a],l),delete this._in[l][r],delete this._out[a][r],this._edgeCount--}return this}inEdges(t,n){return this.isDirected()?this.filterEdges(this._in[t],t,n):this.nodeEdges(t,n)}outEdges(t,n){return this.isDirected()?this.filterEdges(this._out[t],t,n):this.nodeEdges(t,n)}nodeEdges(t,n){if(t in this._nodes)return this.filterEdges({...this._in[t],...this._out[t]},t,n)}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}filterEdges(t,n,i){if(!t)return;let r=Object.values(t);return i?r.filter(s=>s.v===n&&s.w===i||s.v===i&&s.w===n):r}};function hG(e,t){e[t]?e[t]++:e[t]=1}function pG(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function _O(e,t,n,i){let r=""+t,s=""+n;if(!e&&r>s){let a=r;r=s,s=a}return r+""+s+""+(i===void 0?"\0":i)}function Nnt(e,t,n,i){let r=""+t,s=""+n;if(!e&&r>s){let l=r;r=s,s=l}let a={v:r,w:s};return i&&(a.name=i),a}function eM(e,t){return _O(e,t.v,t.w,t.name)}var jnt="4.0.1",LOe={};MOe(LOe,{read:()=>Dnt,write:()=>Rnt});function Rnt(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Int(e),edges:Pnt(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function Int(e){return e.nodes().map(t=>{let n=e.node(t),i=e.parent(t),r={v:t};return n!==void 0&&(r.value=n),i!==void 0&&(r.parent=i),r})}function Pnt(e){return e.edges().map(t=>{let n=e.edge(t),i={v:t.v,w:t.w};return t.name!==void 0&&(i.name=t.name),n!==void 0&&(i.value=n),i})}function Dnt(e){let t=new su(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(n=>{t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(n=>{t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var lB={};MOe(lB,{CycleException:()=>W_,bellmanFord:()=>$Oe,components:()=>$nt,dijkstra:()=>q_,dijkstraAll:()=>Unt,findCycles:()=>Qnt,floydWarshall:()=>Vnt,isAcyclic:()=>qnt,postorder:()=>Knt,preorder:()=>Gnt,prim:()=>Xnt,shortestPaths:()=>Ynt,tarjan:()=>BOe,topsort:()=>UOe});var Mnt=()=>1;function $Oe(e,t,n,i){return Lnt(e,String(t),n||Mnt,i||function(r){return e.outEdges(r)})}function Lnt(e,t,n,i){let r={},s,a=0,l=e.nodes(),c=function(f){let h=n(f);r[f.v].distance+he.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(e,t){let n=this._keyIndices,i=String(e);if(!(i in n)){let r=this._arr,s=r.length;return n[i]=s,r.push({key:i,priority:t}),this._decrease(s),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw new Error(`Key not found: ${e}`);let i=this._arr[n].priority;if(t>i)throw new Error(`New priority is greater than current priority. Key: ${e} Old: ${i} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,i=n+1,r=e;n>1,!(t[i].priority1;function q_(e,t,n,i){let r=function(s){return e.outEdges(s)};return Bnt(e,String(t),n||Fnt,i||r)}function Bnt(e,t,n,i){let r={},s=new FOe,a,l,c=function(u){let d=u.v!==a?u.v:u.w,f=r[d],h=n(u),p=l.distance+h;if(h<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+h);p0&&(a=s.removeMin(),l=r[a],l.distance!==Number.POSITIVE_INFINITY);)i(a).forEach(c);return r}function Unt(e,t,n){return e.nodes().reduce(function(i,r){return i[r]=q_(e,r,t,n),i},{})}function BOe(e){let t=0,n=[],i={},r=[];function s(a){let l=i[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),e.successors(a).forEach(function(c){c in i?i[c].onStack&&(l.lowlink=Math.min(l.lowlink,i[c].index)):(s(c),l.lowlink=Math.min(l.lowlink,i[c].lowlink))}),l.lowlink===l.index){let c=[],u;do u=n.pop(),i[u].onStack=!1,c.push(u);while(a!==u);r.push(c)}}return e.nodes().forEach(function(a){a in i||s(a)}),r}function Qnt(e){return BOe(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var znt=()=>1;function Vnt(e,t,n){return Hnt(e,t||znt,n||function(i){return e.outEdges(i)})}function Hnt(e,t,n){let i={},r=e.nodes();return r.forEach(function(s){i[s]={},i[s][s]={distance:0,predecessor:""},r.forEach(function(a){s!==a&&(i[s][a]={distance:Number.POSITIVE_INFINITY,predecessor:""})}),n(s).forEach(function(a){let l=a.v===s?a.w:a.v,c=t(a);i[s][l]={distance:c,predecessor:s}})}),r.forEach(function(s){let a=i[s];r.forEach(function(l){let c=i[l];r.forEach(function(u){let d=c[s],f=a[u],h=c[u],p=d.distance+f.distance;p{var c;return(c=e.isDirected()?e.successors(l):e.neighbors(l))!=null?c:[]},a={};return t.forEach(function(l){if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);r=QOe(e,l,n==="post",a,s,i,r)}),r}function QOe(e,t,n,i,r,s,a){return t in i||(i[t]=!0,n||(a=s(a,t)),r(t).forEach(function(l){a=QOe(e,l,n,i,r,s,a)}),n&&(a=s(a,t))),a}function zOe(e,t,n){return Wnt(e,t,n,function(i,r){return i.push(r),i},[])}function Knt(e,t){return zOe(e,t,"post")}function Gnt(e,t){return zOe(e,t,"pre")}function Xnt(e,t){let n=new su,i={},r=new FOe,s;function a(c){let u=c.v===s?c.w:c.v,d=r.priority(u);if(d!==void 0){let f=t(c);f0;){if(s=r.removeMin(),s in i)n.setEdge(s,i[s]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(s).forEach(a)}return n}function Ynt(e,t,n,i){return Znt(e,t,n,i??(r=>{let s=e.outEdges(r);return s??[]}))}function Znt(e,t,n,i){if(n===void 0)return q_(e,t,n,i);let r=!1,s=e.nodes();for(let a=0;at.setNode(n,e.node(n))),e.edges().forEach(n=>{let i=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})}),t}function VOe(e){let t=new su({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function mG(e,t){let n=e.x,i=e.y,r=t.x-n,s=t.y-i,a=e.width/2,l=e.height/2;if(!r&&!s)throw new Error("Not possible to find intersection inside of the rectangle");let c,u;return Math.abs(s)*a>Math.abs(r)*l?(s<0&&(l=-l),c=l*r/s,u=l):(r<0&&(a=-a),c=a,u=a*s/r),{x:n+c,y:i+u}}function tE(e){let t=jS(qOe(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let i=e.node(n),r=i.rank;r!==void 0&&(t[r]||(t[r]=[]),t[r][i.order]=n)}),t}function eit(e){let t=e.nodes().map(i=>{let r=e.node(i).rank;return r===void 0?Number.MAX_VALUE:r}),n=_d(Math.min,t);e.nodes().forEach(i=>{let r=e.node(i);Object.hasOwn(r,"rank")&&(r.rank-=n)})}function tit(e){let t=e.nodes().map(a=>e.node(a).rank).filter(a=>a!==void 0),n=_d(Math.min,t),i=[];e.nodes().forEach(a=>{let l=e.node(a).rank-n;i[l]||(i[l]=[]),i[l].push(a)});let r=0,s=e.graph().nodeRankFactor;Array.from(i).forEach((a,l)=>{a===void 0&&l%s!==0?--r:a!==void 0&&r&&a.forEach(c=>e.node(c).rank+=r)})}function gG(e,t,n,i){let r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=i),Dx(e,"border",r,t)}function nit(e,t=HOe){let n=[];for(let i=0;iHOe){let n=nit(t);return e(...n.map(i=>e(...i)))}else return e(...t)}function qOe(e){let t=e.nodes().map(n=>{let i=e.node(n).rank;return i===void 0?Number.MIN_VALUE:i});return _d(Math.max,t)}function iit(e,t){let n={lhs:[],rhs:[]};return e.forEach(i=>{t(i)?n.lhs.push(i):n.rhs.push(i)}),n}function WOe(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}}function KOe(e,t){return t()}var rit=0;function cB(e){let t=++rit;return e+(""+t)}function jS(e,t,n=1){t==null&&(t=e,e=0);let i=s=>sti[t]:n=t,Object.entries(e).reduce((i,[r,s])=>(i[r]=n(s,r),i),{})}function sit(e,t){return e.reduce((n,i,r)=>(n[i]=t[r],n),{})}var RR="\0",ait="3.0.0",oit=class{constructor(){Ant(this,"_sentinel");let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return bG(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&bG(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,lit)),n=n._prev;return"["+e.join(", ")+"]"}};function bG(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function lit(e,t){if(e!=="_next"&&e!=="_prev")return t}var cit=oit,uit=()=>1;function dit(e,t){if(e.nodeCount()<=1)return[];let n=hit(e,t||uit);return fit(n.graph,n.buckets,n.zeroIdx).flatMap(i=>e.outEdges(i.v,i.w)||[])}function fit(e,t,n){var i;let r=[],s=t[t.length-1],a=t[0],l;for(;e.nodeCount();){for(;l=a.dequeue();)tM(e,t,n,l);for(;l=s.dequeue();)tM(e,t,n,l);if(e.nodeCount()){for(let c=t.length-2;c>0;--c)if(l=(i=t[c])==null?void 0:i.dequeue(),l){r=r.concat(tM(e,t,n,l,!0)||[]);break}}}return r}function tM(e,t,n,i,r){let s=[],a=r?s:void 0;return(e.inEdges(i.v)||[]).forEach(l=>{let c=e.edge(l),u=e.node(l.v);r&&s.push({v:l.v,w:l.w}),u.out-=c,s6(t,n,u)}),(e.outEdges(i.v)||[]).forEach(l=>{let c=e.edge(l),u=l.w,d=e.node(u);d.in-=c,s6(t,n,d)}),e.removeNode(i.v),a}function hit(e,t){let n=new su,i=0,r=0;e.nodes().forEach(l=>{n.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let c=n.edge(l.v,l.w)||0,u=t(l),d=c+u;n.setEdge(l.v,l.w,d);let f=n.node(l.v),h=n.node(l.w);r=Math.max(r,f.out+=u),i=Math.max(i,h.in+=u)});let s=pit(r+i+3).map(()=>new cit),a=i+1;return n.nodes().forEach(l=>{s6(s,a,n.node(l))}),{graph:n,buckets:s,zeroIdx:a}}function s6(e,t,n){var i,r,s;n.out?n.in?(s=e[n.out-n.in+t])==null||s.enqueue(n):(r=e[e.length-1])==null||r.enqueue(n):(i=e[0])==null||i.enqueue(n)}function pit(e){let t=[];for(let n=0;n{let i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,cB("rev"))});function t(n){return i=>n.edge(i).weight}}function git(e){let t=[],n={},i={};function r(s){Object.hasOwn(i,s)||(i[s]=!0,n[s]=!0,e.outEdges(s).forEach(a=>{Object.hasOwn(n,a.w)?t.push(a):r(a.w)}),delete n[s])}return e.nodes().forEach(r),t}function bit(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let i=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,i)}})}function yit(e){e.graph().dummyChains=[],e.edges().forEach(t=>vit(e,t))}function vit(e,t){let n=t.v,i=e.node(n).rank,r=t.w,s=e.node(r).rank,a=t.name,l=e.edge(t),c=l.labelRank;if(s===i+1)return;e.removeEdge(t);let u,d,f;for(f=0,++i;i{let n=e.node(t),i=n.edgeLabel,r;for(e.setEdge(n.edgeObj,i);n.dummy;)r=e.successors(t)[0],e.removeNode(t),i.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),t=r,n=e.node(t)})}function uB(e){let t={};function n(i){let r=e.node(i);if(Object.hasOwn(t,i))return r.rank;t[i]=!0;let s=e.outEdges(i),a=s?s.map(c=>c==null?Number.POSITIVE_INFINITY:n(c.w)-e.edge(c).minlen):[],l=_d(Math.min,a);return l===Number.POSITIVE_INFINITY&&(l=0),r.rank=l}e.sources().forEach(n)}function Hv(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var GOe=Oit;function Oit(e){let t=new su({directed:!1}),n=e.nodes();if(n.length===0)throw new Error("Graph must have at least one node");let i=n[0],r=e.nodeCount();t.setNode(i,{});let s,a;for(;wit(t,e){let a=s.v,l=i===a?s.w:a;!e.hasNode(l)&&!Hv(t,s)&&(e.setNode(l,{}),e.setEdge(i,l,{}),n(l))})}return e.nodes().forEach(n),e.nodeCount()}function Sit(e,t){return t.edges().reduce((n,i)=>{let r=Number.POSITIVE_INFINITY;return e.hasNode(i.v)!==e.hasNode(i.w)&&(r=Hv(t,i)),rt.node(i).rank+=n)}var{preorder:Eit,postorder:Cit}=lB,Tit=qb;qb.initLowLimValues=fB;qb.initCutValues=dB;qb.calcCutValue=XOe;qb.leaveEdge=ZOe;qb.enterEdge=JOe;qb.exchangeEdges=ewe;function qb(e){e=Jnt(e),uB(e);let t=GOe(e);fB(t),dB(t,e);let n,i;for(;n=ZOe(t);)i=JOe(t,e,n),ewe(t,e,n,i)}function dB(e,t){let n=Cit(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(i=>Ait(e,t,i))}function Ait(e,t,n){let i=e.node(n).parent,r=e.edge(n,i);r.cutvalue=XOe(e,t,n)}function XOe(e,t,n){let i=e.node(n).parent,r=!0,s=t.edge(n,i),a=0;s||(r=!1,s=t.edge(i,n)),a=s.weight;let l=t.nodeEdges(n);return l&&l.forEach(c=>{let u=c.v===n,d=u?c.w:c.v;if(d!==i){let f=u===r,h=t.edge(c).weight;if(a+=f?h:-h,Nit(e,n,d)){let p=e.edge(n,d).cutvalue;a+=f?-p:p}}}),a}function fB(e,t){arguments.length<2&&(t=e.nodes()[0]),YOe(e,{},1,t)}function YOe(e,t,n,i,r){let s=n,a=e.node(i);t[i]=!0;let l=e.neighbors(i);return l&&l.forEach(c=>{Object.hasOwn(t,c)||(n=YOe(e,t,n,c,i))}),a.low=s,a.lim=n++,r?a.parent=r:delete a.parent,n}function ZOe(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function JOe(e,t,n){let i=n.v,r=n.w;t.hasEdge(i,r)||(i=n.w,r=n.v);let s=e.node(i),a=e.node(r),l=s,c=!1;return s.lim>a.lim&&(l=a,c=!0),t.edges().filter(u=>c===yG(e,e.node(u.v),l)&&c!==yG(e,e.node(u.w),l)).reduce((u,d)=>Hv(t,d)!e.node(r).parent);if(!n)return;let i=Eit(e,[n]);i=i.slice(1),i.forEach(r=>{let s=e.node(r).parent,a=t.edge(r,s),l=!1;a||(a=t.edge(s,r),l=!0),t.node(r).rank=t.node(s).rank+(l?a.minlen:-a.minlen)})}function Nit(e,t,n){return e.hasEdge(t,n)}function yG(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var jit=Rit;function Rit(e){let t=e.graph().ranker;if(typeof t=="function")return t(e);switch(t){case"network-simplex":vG(e);break;case"tight-tree":Pit(e);break;case"longest-path":Iit(e);break;case"none":break;default:vG(e)}}var Iit=uB;function Pit(e){uB(e),GOe(e)}function vG(e){Tit(e)}var Dit=Mit;function Mit(e){let t=$it(e);e.graph().dummyChains.forEach(n=>{let i=e.node(n),r=i.edgeObj,s=Lit(e,t,r.v,r.w),a=s.path,l=s.lca,c=0,u=a[c],d=!0;for(;n!==r.w;){if(i=e.node(n),d){for(;(u=a[c])!==l&&e.node(u).maxRanka||l>t[c].lim));let u=c,d=i;for(;(d=e.parent(d))!==u;)s.push(d);return{path:r.concat(s.reverse()),lca:u}}function $it(e){let t={},n=0;function i(r){let s=n;e.children(r).forEach(i),t[r]={low:s,lim:n++}}return e.children(RR).forEach(i),t}function Fit(e){let t=Dx(e,"root",{},"_root"),n=Bit(e),i=Object.values(n),r=_d(Math.max,i)-1,s=2*r+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=s);let a=Uit(e)+1;e.children(RR).forEach(l=>twe(e,t,s,a,r,n,l)),e.graph().nodeRankFactor=s}function twe(e,t,n,i,r,s,a){var l;let c=e.children(a);if(!c.length){a!==t&&e.setEdge(t,a,{weight:0,minlen:n});return}let u=gG(e,"_bt"),d=gG(e,"_bb"),f=e.node(a);e.setParent(u,a),f.borderTop=u,e.setParent(d,a),f.borderBottom=d,c.forEach(h=>{var p;twe(e,t,n,i,r,s,h);let g=e.node(h),b=g.borderTop?g.borderTop:h,v=g.borderBottom?g.borderBottom:h,y=g.borderTop?i:2*i,x=b!==v?1:r-((p=s[a])!=null?p:0)+1;e.setEdge(u,b,{weight:y,minlen:x,nestingEdge:!0}),e.setEdge(v,d,{weight:y,minlen:x,nestingEdge:!0})}),e.parent(a)||e.setEdge(t,u,{weight:0,minlen:r+((l=s[a])!=null?l:0)})}function Bit(e){let t={};function n(i,r){let s=e.children(i);s&&s.length&&s.forEach(a=>n(a,r+1)),t[i]=r}return e.children(RR).forEach(i=>n(i,1)),t}function Uit(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function Qit(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{e.edge(n).nestingEdge&&e.removeEdge(n)})}var zit=Vit;function Vit(e){function t(n){let i=e.children(n),r=e.node(n);if(i.length&&i.forEach(t),Object.hasOwn(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(let s=r.minRank,a=r.maxRank+1;sOG(e.node(t))),e.edges().forEach(t=>OG(e.edge(t)))}function OG(e){let t=e.width;e.width=e.height,e.height=t}function Wit(e){e.nodes().forEach(t=>nM(e.node(t))),e.edges().forEach(t=>{var n;let i=e.edge(t);(n=i.points)==null||n.forEach(nM),Object.hasOwn(i,"y")&&nM(i)})}function nM(e){e.y=-e.y}function Kit(e){e.nodes().forEach(t=>iM(e.node(t))),e.edges().forEach(t=>{var n;let i=e.edge(t);(n=i.points)==null||n.forEach(iM),Object.hasOwn(i,"x")&&iM(i)})}function iM(e){let t=e.x;e.x=e.y,e.y=t}function Git(e){let t={},n=e.nodes().filter(l=>!e.children(l).length),i=n.map(l=>e.node(l).rank),r=_d(Math.max,i),s=jS(r+1).map(()=>[]);function a(l){if(t[l])return;t[l]=!0;let c=e.node(l);s[c.rank].push(l);let u=e.successors(l);u&&u.forEach(a)}return n.sort((l,c)=>e.node(l).rank-e.node(c).rank).forEach(a),s}function Xit(e,t){let n=0;for(let i=1;id)),r=t.flatMap(u=>{let d=e.outEdges(u);return d?d.map(f=>({pos:i[f.w],weight:e.edge(f).weight})).sort((f,h)=>f.pos-h.pos):[]}),s=1;for(;s{let d=u.pos+s;l[d]+=u.weight;let f=0;for(;d>0;)d%2&&(f+=l[d+1]),d=d-1>>1,l[d]+=u.weight;c+=u.weight*f}),c}function Zit(e,t=[]){return t.map(n=>{let i=e.inEdges(n);if(!i||!i.length)return{v:n};{let r=i.reduce((s,a)=>{let l=e.edge(a),c=e.node(a.v);return{sum:s.sum+l.weight*c.order,weight:s.weight+l.weight}},{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}})}function Jit(e,t){let n={};e.forEach((r,s)=>{let a={indegree:0,in:[],out:[],vs:[r.v],i:s};r.barycenter!==void 0&&(a.barycenter=r.barycenter,a.weight=r.weight),n[r.v]=a}),t.edges().forEach(r=>{let s=n[r.v],a=n[r.w];s!==void 0&&a!==void 0&&(a.indegree++,s.out.push(a))});let i=Object.values(n).filter(r=>!r.indegree);return ert(i)}function ert(e){let t=[];function n(r){return s=>{s.merged||(s.barycenter===void 0||r.barycenter===void 0||s.barycenter>=r.barycenter)&&trt(r,s)}}function i(r){return s=>{s.in.push(r),--s.indegree===0&&e.push(s)}}for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(n(r)),r.out.forEach(i(r))}return t.filter(r=>!r.merged).map(r=>K_(r,["vs","i","barycenter","weight"]))}function trt(e,t){let n=0,i=0;e.weight&&(n+=e.barycenter*e.weight,i+=e.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}function nrt(e,t){let n=iit(e,d=>Object.hasOwn(d,"barycenter")),i=n.lhs,r=n.rhs.sort((d,f)=>f.i-d.i),s=[],a=0,l=0,c=0;i.sort(irt(!!t)),c=wG(s,r,c),i.forEach(d=>{c+=d.vs.length,s.push(d.vs),a+=d.barycenter*d.weight,l+=d.weight,c=wG(s,r,c)});let u={vs:s.flat(1)};return l&&(u.barycenter=a/l,u.weight=l),u}function wG(e,t,n){let i;for(;t.length&&(i=t[t.length-1]).i<=n;)t.pop(),e.push(i.vs),n++;return n}function irt(e){return(t,n)=>t.barycentern.barycenter?1:e?n.i-t.i:t.i-n.i}function iwe(e,t,n,i){let r=e.children(t),s=e.node(t),a=s?s.borderLeft:void 0,l=s?s.borderRight:void 0,c={};a&&(r=r.filter(h=>h!==a&&h!==l));let u=Zit(e,r);u.forEach(h=>{if(e.children(h.v).length){let p=iwe(e,h.v,n,i);c[h.v]=p,Object.hasOwn(p,"barycenter")&&srt(h,p)}});let d=Jit(u,n);rrt(d,c);let f=nrt(d,i);if(a&&l){f.vs=[a,f.vs,l].flat(1);let h=e.predecessors(a);if(h&&h.length){let p=e.node(h[0]),g=e.predecessors(l),b=e.node(g[0]);Object.hasOwn(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+b.order)/(f.weight+2),f.weight+=2}}return f}function rrt(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(i=>t[i]?t[i].vs:i)})}function srt(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}function art(e,t,n,i){i||(i=e.nodes());let r=ort(e),s=new su({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(a=>e.node(a));return i.forEach(a=>{let l=e.node(a),c=e.parent(a);if(l.rank===t||l.minRank<=t&&t<=l.maxRank){s.setNode(a),s.setParent(a,c||r);let u=e[n](a);u&&u.forEach(d=>{let f=d.v===a?d.w:d.v,h=s.edge(f,a),p=h!==void 0?h.weight:0;s.setEdge(f,a,{weight:e.edge(d).weight+p})}),Object.hasOwn(l,"minRank")&&s.setNode(a,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]})}}),s}function ort(e){let t;for(;e.hasNode(t=cB("_root")););return t}function lrt(e,t,n){let i={},r;n.forEach(s=>{let a=e.parent(s),l,c;for(;a;){if(l=e.parent(a),l?(c=i[l],i[l]=a):(c=r,r=a),c&&c!==a){t.setEdge(c,a);return}a=l}})}function rwe(e,t={}){if(typeof t.customOrder=="function"){t.customOrder(e,rwe);return}let n=qOe(e),i=SG(e,jS(1,n+1),"inEdges"),r=SG(e,jS(n-1,-1,-1),"outEdges"),s=Git(e);if(kG(e,s),t.disableOptimalOrderHeuristic)return;let a=Number.POSITIVE_INFINITY,l,c=t.constraints||[];for(let u=0,d=0;d<4;++u,++d){crt(u%2?i:r,u%4>=2,c),s=tE(e);let f=Xit(e,s);f{i.has(s)||i.set(s,[]),i.get(s).push(a)};for(let s of e.nodes()){let a=e.node(s);if(typeof a.rank=="number"&&r(a.rank,s),typeof a.minRank=="number"&&typeof a.maxRank=="number")for(let l=a.minRank;l<=a.maxRank;l++)l!==a.rank&&r(l,s)}return t.map(function(s){return art(e,s,n,i.get(s)||[])})}function crt(e,t,n){let i=new su;e.forEach(function(r){n.forEach(l=>i.setEdge(l.left,l.right));let s=r.graph().root,a=iwe(r,s,i,t);a.vs.forEach((l,c)=>r.node(l).order=c),lrt(r,i,a.vs)})}function kG(e,t){Object.values(t).forEach(n=>n.forEach((i,r)=>e.node(i).order=r))}function urt(e,t){let n={};function i(r,s){let a=0,l=0,c=r.length,u=s[s.length-1];return s.forEach((d,f)=>{let h=frt(e,d),p=h?e.node(h).order:c;(h||d===u)&&(s.slice(l,f+1).forEach(g=>{let b=e.predecessors(g);b&&b.forEach(v=>{let y=e.node(v),x=y.order;(x{let f=s[d];if(f!==void 0&&e.node(f).dummy){let h=e.predecessors(f);h&&h.forEach(p=>{if(p===void 0)return;let g=e.node(p);g.dummy&&(g.orderu)&&swe(n,p,f)})}})}function r(s,a){let l=-1,c=-1,u=0;return a.forEach((d,f)=>{if(e.node(d).dummy==="border"){let h=e.predecessors(d);if(h&&h.length){let p=h[0];if(p===void 0)return;c=e.node(p).order,i(a,u,f,l,c),u=f,l=c}}i(a,u,a.length,c,s.length)}),a}return t.length&&t.reduce(r),n}function frt(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(i=>e.node(i).dummy)}}function swe(e,t,n){if(t>n){let r=t;t=n,n=r}let i=e[t];i||(e[t]=i={}),i[n]=!0}function hrt(e,t,n){if(t>n){let r=t;t=n,n=r}let i=e[t];return i!==void 0&&Object.hasOwn(i,n)}function prt(e,t,n,i){let r={},s={},a={};return t.forEach(l=>{l.forEach((c,u)=>{r[c]=c,s[c]=c,a[c]=u})}),t.forEach(l=>{let c=-1;l.forEach(u=>{let d=i(u);if(d&&d.length){let f=d.sort((p,g)=>{let b=a[p],v=a[g];return(b!==void 0?b:0)-(v!==void 0?v:0)}),h=(f.length-1)/2;for(let p=Math.floor(h),g=Math.ceil(h);p<=g;++p){let b=f[p];if(b===void 0)continue;let v=a[b];if(v!==void 0&&s[u]===u&&c{var y;let x=(y=s[v.v])!=null?y:0,w=a.edge(v);return Math.max(b,x+(w!==void 0?w:0))},0):s[p]=0}function d(p){let g=a.outEdges(p),b=Number.POSITIVE_INFINITY;g&&(b=g.reduce((y,x)=>{let w=s[x.w],O=a.edge(x);return Math.min(y,(w!==void 0?w:0)-(O!==void 0?O:0))},Number.POSITIVE_INFINITY));let v=e.node(p);b!==Number.POSITIVE_INFINITY&&v.borderType!==l&&(s[p]=Math.max(s[p]!==void 0?s[p]:0,b))}function f(p){return a.predecessors(p)||[]}function h(p){return a.successors(p)||[]}return c(u,f),c(d,h),Object.keys(i).forEach(p=>{var g;let b=n[p];b!==void 0&&(s[p]=(g=s[b])!=null?g:0)}),s}function grt(e,t,n,i){let r=new su,s=e.graph(),a=Ort(s.nodesep,s.edgesep,i);return t.forEach(l=>{let c;l.forEach(u=>{let d=n[u];if(d!==void 0){if(r.setNode(d),c!==void 0){let f=n[c];if(f!==void 0){let h=r.edge(f,d);r.setEdge(f,d,Math.max(a(e,u,c),h||0))}}c=u}})}),r}function brt(e,t){return Object.values(t).reduce((n,i)=>{let r=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY;Object.entries(i).forEach(([l,c])=>{let u=wrt(e,l)/2;r=Math.max(c+u,r),s=Math.min(c-u,s)});let a=r-s;return a{["l","r"].forEach(a=>{let l=s+a,c=e[l];if(!c||c===t)return;let u=Object.values(c),d=i-_d(Math.min,u);a!=="l"&&(d=r-_d(Math.max,u)),d&&(e[l]=jR(c,f=>f+d))})})}function vrt(e,t=void 0){let n=e.ul;return n?jR(n,(i,r)=>{var s,a;if(t){let c=t.toLowerCase(),u=e[c];if(u&&u[r]!==void 0)return u[r]}let l=Object.values(e).map(c=>{let u=c[r];return u!==void 0?u:0}).sort((c,u)=>c-u);return(((s=l[1])!=null?s:0)+((a=l[2])!=null?a:0))/2}):{}}function xrt(e){let t=tE(e),n=Object.assign(urt(e,t),drt(e,t)),i={},r;["u","d"].forEach(a=>{r=a==="u"?t:Object.values(t).reverse(),["l","r"].forEach(l=>{l==="r"&&(r=r.map(d=>Object.values(d).reverse()));let c=prt(e,r,n,d=>(a==="u"?e.predecessors(d):e.successors(d))||[]),u=mrt(e,r,c.root,c.align,l==="r");l==="r"&&(u=jR(u,d=>-d)),i[a+l]=u})});let s=brt(e,i);return yrt(i,s),vrt(i,e.graph().align)}function Ort(e,t,n){return(i,r,s)=>{let a=i.node(r),l=i.node(s),c=0,u;if(c+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(c+=n?u:-u),u=void 0,c+=(a.dummy?t:e)/2,c+=(l.dummy?t:e)/2,c+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":u=l.width/2;break;case"r":u=-l.width/2;break}return u&&(c+=n?u:-u),c}}function wrt(e,t){return e.node(t).width}function Srt(e){e=VOe(e),krt(e),Object.entries(xrt(e)).forEach(([t,n])=>e.node(t).x=n)}function krt(e){let t=tE(e),n=e.graph(),i=n.ranksep,r=n.rankalign,s=0;t.forEach(a=>{let l=a.reduce((c,u)=>{var d;let f=(d=e.node(u).height)!=null?d:0;return c>f?c:f},0);a.forEach(c=>{let u=e.node(c);r==="top"?u.y=s+u.height/2:r==="bottom"?u.y=s+l-u.height/2:u.y=s+l/2}),s+=l+i})}function Ert(e,t={}){let n=t.debugTiming?WOe:KOe;return n("layout",()=>{let i=n(" buildLayoutGraph",()=>Drt(e));return n(" runLayout",()=>Crt(i,n,t)),n(" updateInputGraph",()=>Trt(e,i)),i})}function Crt(e,t,n){t(" makeSpaceForEdgeLabels",()=>Mrt(e)),t(" removeSelfEdges",()=>Hrt(e)),t(" acyclic",()=>mit(e)),t(" nestingGraph.run",()=>Fit(e)),t(" rank",()=>jit(VOe(e))),t(" injectEdgeLabelProxies",()=>Lrt(e)),t(" removeEmptyRanks",()=>tit(e)),t(" nestingGraph.cleanup",()=>Qit(e)),t(" normalizeRanks",()=>eit(e)),t(" assignRankMinMax",()=>$rt(e)),t(" removeEdgeLabelProxies",()=>Frt(e)),t(" normalize.run",()=>yit(e)),t(" parentDummyChains",()=>Dit(e)),t(" addBorderSegments",()=>zit(e)),t(" order",()=>rwe(e,n)),t(" insertSelfEdges",()=>qrt(e)),t(" adjustCoordinateSystem",()=>Hit(e)),t(" position",()=>Srt(e)),t(" positionSelfEdges",()=>Wrt(e)),t(" removeBorderNodes",()=>Vrt(e)),t(" normalize.undo",()=>xit(e)),t(" fixupEdgeLabelCoords",()=>Qrt(e)),t(" undoCoordinateSystem",()=>qit(e)),t(" translateGraph",()=>Brt(e)),t(" assignNodeIntersects",()=>Urt(e)),t(" reversePoints",()=>zrt(e)),t(" acyclic.undo",()=>bit(e))}function Trt(e,t){e.nodes().forEach(n=>{let i=e.node(n),r=t.node(n);i&&(i.x=r.x,i.y=r.y,i.order=r.order,i.rank=r.rank,t.children(n).length&&(i.width=r.width,i.height=r.height))}),e.edges().forEach(n=>{let i=e.edge(n),r=t.edge(n);i.points=r.points,Object.hasOwn(r,"x")&&(i.x=r.x,i.y=r.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Art=["nodesep","edgesep","ranksep","marginx","marginy"],_rt={ranksep:50,edgesep:20,nodesep:50,rankdir:"TB",rankalign:"center"},Nrt=["acyclicer","ranker","rankdir","align","rankalign"],jrt=["width","height","rank"],EG={width:0,height:0},Rrt=["minlen","weight","width","height","labeloffset"],Irt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Prt=["labelpos"];function Drt(e){let t=new su({multigraph:!0,compound:!0}),n=sM(e.graph());return t.setGraph(Object.assign({},_rt,rM(n,Art),K_(n,Nrt))),e.nodes().forEach(i=>{let r=sM(e.node(i)),s=rM(r,jrt);Object.keys(EG).forEach(l=>{s[l]===void 0&&(s[l]=EG[l])}),t.setNode(i,s);let a=e.parent(i);a!==void 0&&t.setParent(i,a)}),e.edges().forEach(i=>{let r=sM(e.edge(i));t.setEdge(i,Object.assign({},Irt,rM(r,Rrt),K_(r,Prt)))}),t}function Mrt(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let i=e.edge(n);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function Lrt(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let i=e.node(t.v),r={rank:(e.node(t.w).rank-i.rank)/2+i.rank,e:t};Dx(e,"edge-proxy",r,"_ep")}})}function $rt(e){let t=0;e.nodes().forEach(n=>{let i=e.node(n);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=Math.max(t,i.maxRank))}),e.graph().maxRank=t}function Frt(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy==="edge-proxy"){let i=n;e.edge(i.e).labelRank=n.rank,e.removeNode(t)}})}function Brt(e){let t=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,r=0,s=e.graph(),a=s.marginx||0,l=s.marginy||0;function c(u){let d=u.x,f=u.y,h=u.width,p=u.height;t=Math.min(t,d-h/2),n=Math.max(n,d+h/2),i=Math.min(i,f-p/2),r=Math.max(r,f+p/2)}e.nodes().forEach(u=>c(e.node(u))),e.edges().forEach(u=>{let d=e.edge(u);Object.hasOwn(d,"x")&&c(d)}),t-=a,i-=l,e.nodes().forEach(u=>{let d=e.node(u);d.x-=t,d.y-=i}),e.edges().forEach(u=>{let d=e.edge(u);d.points.forEach(f=>{f.x-=t,f.y-=i}),Object.hasOwn(d,"x")&&(d.x-=t),Object.hasOwn(d,"y")&&(d.y-=i)}),s.width=n-t+a,s.height=r-i+l}function Urt(e){e.edges().forEach(t=>{let n=e.edge(t),i=e.node(t.v),r=e.node(t.w),s,a;n.points?(s=n.points[0],a=n.points[n.points.length-1]):(n.points=[],s=r,a=i),n.points.unshift(mG(i,s)),n.points.push(mG(r,a))})}function Qrt(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function zrt(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function Vrt(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),i=e.node(n.borderTop),r=e.node(n.borderBottom),s=e.node(n.borderLeft[n.borderLeft.length-1]),a=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(a.x-s.x),n.height=Math.abs(r.y-i.y),n.x=s.x+n.width/2,n.y=i.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function Hrt(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function qrt(e){tE(e).forEach(t=>{let n=0;t.forEach((i,r)=>{let s=e.node(i);s.order=r+n,(s.selfEdges||[]).forEach(a=>{Dx(e,"selfedge",{width:a.label.width,height:a.label.height,rank:s.rank,order:r+ ++n,e:a.e,label:a.label},"_se")}),delete s.selfEdges})})}function Wrt(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy==="selfedge"){let i=n,r=e.node(i.e.v),s=r.x+r.width/2,a=r.y,l=n.x-s,c=r.height/2;e.setEdge(i.e,i.label),e.removeNode(t),i.label.points=[{x:s+2*l/3,y:a-c},{x:s+5*l/6,y:a-c},{x:s+l,y:a},{x:s+5*l/6,y:a+c},{x:s+2*l/3,y:a+c}],i.label.x=n.x,i.label.y=n.y}})}function rM(e,t){return jR(K_(e,t),Number)}function sM(e){let t={};return e&&Object.entries(e).forEach(([n,i])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=i}),t}function Krt(e){let t=tE(e),n=new su({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(i=>{n.setNode(i,{label:i}),n.setParent(i,"layer"+e.node(i).rank)}),e.edges().forEach(i=>n.setEdge(i.v,i.w,{},i.name)),t.forEach((i,r)=>{let s="layer"+r;n.setNode(s,{rank:"same"}),i.reduce((a,l)=>(n.setEdge(a,l,{style:"invis"}),l))}),n}var Grt={graphlib:DOe,version:ait,layout:Ert,debug:Krt,util:{time:WOe,notime:KOe}},CG=Grt;/*! For license information please see dagre.esm.js.LEGAL.txt */const NO={llm:{labelKey:"buildCanvas.patterns.llm.label",descriptionKey:"buildCanvas.patterns.llm.description",icon:vbe},sequential:{labelKey:"buildCanvas.patterns.sequential.label",descriptionKey:"buildCanvas.patterns.sequential.description",icon:d7e},parallel:{labelKey:"buildCanvas.patterns.parallel.label",descriptionKey:"buildCanvas.patterns.parallel.description",icon:HFe},loop:{labelKey:"buildCanvas.patterns.loop.label",descriptionKey:"buildCanvas.patterns.loop.description",icon:kbe},a2a:{labelKey:"buildCanvas.patterns.a2a.label",descriptionKey:"buildCanvas.patterns.a2a.description",icon:zj}},a6=220,o6=88,TG=96,AG=34,vw=64,aM=310,Ey=24,awe=56,l6=40,_G=40,Xrt=18,Yrt=58,Zrt=!1,Jrt=e=>e==="sequential"||e==="parallel"||e==="loop";function c6(e,t){const n=e.agentType??"llm";return Jrt(n)||n==="llm"&&(t.length===0||e.subAgents.length>0)}function u6(e,t=[],n="horizontal",i=!1){const r=e.agentType??"llm";if(!c6(e,t))return{width:a6,height:o6};if(i&&e.subAgents.length===0)return{width:aM,height:vw};const s=e.subAgents.map((f,h)=>u6(f,[...t,h],n,i)),a=s.length?Math.max(...s.map(f=>f.width)):0,l=s.length?Math.max(...s.map(f=>f.height)):0,c=s.length&&r!=="parallel"?awe:Ey,u=n==="horizontal"?r!=="parallel":r==="parallel",d=s.length?r==="parallel"?Xrt+_G:r==="loop"?Yrt:0:_G;return u?{width:Math.max(aM,s.reduce((f,h)=>f+h.width,0)+l6*Math.max(0,s.length-1)+c*2),height:vw+Ey+l+d+Ey}:{width:Math.max(aM,a+Ey*2),height:vw+c+s.reduce((f,h)=>f+h.height,0)+l6*Math.max(0,s.length-1)+d+c}}function L1(e){return e.length===0?"agent-root":`agent-${e.join("-")}`}function est(e,t){return e.length===t.length&&e.every((n,i)=>n===t[i])}function NG(e){const t=n=>[n.agentType??"llm",n.subAgents.map(t)];return JSON.stringify(t(e))}function $1(e,t,n,i){const r=(i==null?void 0:i.tone)==="sequential"?"hsl(213 40% 40%)":(i==null?void 0:i.tone)==="loop"?"hsl(151 34% 34%)":"hsl(220 9% 38%)";return{id:`${e}-${t}${i!=null&&i.loop?"-loop":""}`,source:e,target:t,sourceHandle:i!=null&&i.loop?"loop-source":void 0,targetHandle:i!=null&&i.loop?"loop-target":void 0,label:n,type:"insertStep",data:i?{insert:i.insert,loop:i.loop,tone:i.tone}:void 0,animated:i==null?void 0:i.loop,markerEnd:{type:TS.ArrowClosed,width:16,height:16,color:r},style:{stroke:r,strokeWidth:1.5},labelStyle:{fill:"hsl(215 14% 42%)",fontSize:10,fontWeight:600},labelBgStyle:{fill:"hsl(var(--background))",fillOpacity:.92}}}function jG(e,t,n=!1,i){const r=[{id:"terminal-input",type:"terminal",position:{x:0,y:0},data:{kind:"terminal",title:i("buildCanvas.terminals.input")},selectable:!1,draggable:!1},{id:"terminal-output",type:"terminal",position:{x:0,y:0},data:{kind:"terminal",title:i("buildCanvas.terminals.output")},selectable:!1,draggable:!1}],s=[];function a(f,h,p,g,b){const v=f.agentType??"llm",y=L1(h);return c6(f,h)?(l(f,h,p,g,b),y):(r.push({id:y,type:"agent",parentId:p,extent:"parent",position:g,data:{kind:"agent",path:h,agent:f,title:v==="a2a"?i("buildCanvas.patterns.a2a.label"):f.name.trim()||(h.length===0?i("buildCanvas.rootAgent"):i("buildCanvas.unnamedStep")),pattern:v,description:f.description.trim()||i(NO[v].descriptionKey),childCount:f.subAgents.length,containedIn:b}}),y)}function l(f,h,p,g={x:0,y:0},b){const v=f.agentType??"sequential",y=L1(h),x=u6(f,h,t,n);r.push({id:y,type:"group",parentId:p,extent:p?"parent":void 0,position:g,style:{width:x.width,height:x.height},data:{kind:"agent",path:h,agent:f,title:f.name.trim()||(h.length===0?i("buildCanvas.rootAgent"):i(NO[v].labelKey)),pattern:v,description:f.description.trim()||i(NO[v].descriptionKey),childCount:f.subAgents.length,containedIn:b,layoutWidth:x.width,layoutHeight:x.height,compactEmptyGroup:n&&f.subAgents.length===0}});const w=f.subAgents.map((C,N)=>u6(C,[...h,N],t,n)),O=w.length&&v!=="parallel"?awe:Ey,k=t==="horizontal"?v!=="parallel":v==="parallel";let S=O;const E=f.subAgents.map((C,N)=>{const _=w[N],j=k?{x:S,y:vw+Ey}:{x:(x.width-_.width)/2,y:vw+S};return S+=(k?_.width:_.height)+l6,a(C,[...h,N],y,j,v)});if(v==="sequential"||v==="loop"){for(let C=0;C1&&s.push($1(E[E.length-1],E[0],i("buildCanvas.edges.continueLoop"),{loop:!0,tone:"loop"}))}return y}const c=(f,h)=>{const p=f.agentType??"llm",g=L1(h);if(c6(f,h))return l(f,h),[g];if(r.push({id:g,type:"agent",position:{x:0,y:0},data:{kind:"agent",path:h,agent:f,title:p==="a2a"?i("buildCanvas.patterns.a2a.label"):f.name.trim()||(h.length===0?i("buildCanvas.rootAgent"):i("buildCanvas.unnamedStep")),pattern:p,description:f.description.trim()||i(NO[p].descriptionKey),childCount:f.subAgents.length}}),f.subAgents.length===0)return[g];const b=[];return f.subAgents.forEach((v,y)=>{const x=[...h,y],w=L1(x);s.push($1(g,w,i("buildCanvas.edges.call"),{insert:{parentPath:h,index:y}})),b.push(...c(v,x))}),b},u=L1([]),d=c(e,[]);return s.push($1("terminal-input",u)),d.forEach(f=>s.push($1(f,"terminal-output"))),tst(r,s,t)}function tst(e,t,n){const i=new CG.graphlib.Graph().setDefaultEdgeLabel(()=>({}));i.setGraph({rankdir:n==="vertical"?"TB":"LR",ranksep:50,nodesep:34,edgesep:14,marginx:24,marginy:24});const r=new Set(e.filter(s=>!s.parentId).map(s=>s.id));return e.filter(s=>!s.parentId).forEach(s=>{const a=s.data.kind==="terminal";i.setNode(s.id,{width:a?TG:s.data.layoutWidth??a6,height:a?AG:s.data.layoutHeight??o6})}),t.filter(s=>r.has(s.source)&&r.has(s.target)).forEach(s=>i.setEdge(s.source,s.target)),CG.layout(i),{nodes:e.map(s=>{if(s.parentId)return s;const a=i.node(s.id),l=s.data.kind==="terminal",c=l?TG:s.data.layoutWidth??a6,u=l?AG:s.data.layoutHeight??o6;return{...s,position:{x:a.x-c/2,y:a.y-u/2}}}),edges:t}}const IR=m.createContext(null),PR=m.createContext("horizontal");function nst({id:e,sourceX:t,sourceY:n,targetX:i,targetY:r,sourcePosition:s,targetPosition:a,markerEnd:l,style:c,label:u,data:d}){const{t:f}=xe("create"),h=m.useContext(IR),[p,g]=m.useState(!1),[b,v,y]=V_({sourceX:t,sourceY:n,targetX:i,targetY:r,sourcePosition:s,targetPosition:a,offset:d!=null&&d.loop?28:20});return o.jsxs(o.Fragment,{children:[o.jsx(eE,{id:e,path:b,markerEnd:l,style:c}),h&&(d==null?void 0:d.insert)&&o.jsx("path",{d:b,className:"abc-edge-hover-path",onPointerEnter:()=>g(!0),onPointerLeave:()=>g(!1)}),(u||h&&(d==null?void 0:d.insert))&&o.jsx(Ktt,{children:o.jsxs("div",{className:`abc-edge-tools${h&&(d!=null&&d.insert)?" can-insert":""}${p?" is-visible":""}`,style:{transform:`translate(-50%, -50%) translate(${v}px, ${y}px)`},onPointerEnter:()=>g(!0),onPointerLeave:()=>g(!1),children:[u&&o.jsx("span",{className:"abc-edge-label",children:u}),h&&(d==null?void 0:d.insert)&&o.jsx("button",{type:"button",className:"abc-edge-add nodrag nopan","aria-label":f("buildCanvas.actions.insertHere"),title:f("buildCanvas.actions.insertHere"),onClick:x=>{x.stopPropagation(),h==null||h.onInsert(d.insert.parentPath,d.insert.index)},children:o.jsx(Do,{})})]})})]})}function ist({data:e,selected:t}){const{t:n}=xe("create"),i=m.useContext(IR),r=m.useContext(PR),s=r==="vertical"?Xt.Top:Xt.Left,a=r==="vertical"?Xt.Bottom:Xt.Right,l=r==="vertical"?Xt.Right:Xt.Bottom,c=e.pattern??"llm",u=NO[c],d=u.icon;return o.jsxs("div",{className:`abc-node is-${c}${e.containedIn?` is-contained-in-${e.containedIn}`:""}${t?" is-selected":""}`,children:[o.jsx(ul,{type:"target",position:s,className:"abc-handle"}),c!=="llm"&&o.jsx("span",{className:"abc-node-icon",children:o.jsx(d,{})}),o.jsxs("span",{className:"abc-node-copy",children:[o.jsx("span",{className:"abc-node-meta",children:o.jsx("span",{children:n(u.labelKey)})}),o.jsx("strong",{children:e.title}),o.jsx("small",{children:e.description})]}),i&&e.path!==void 0&&e.path.length>0&&o.jsx("button",{type:"button",className:"abc-node-delete nodrag nopan","aria-label":n("buildCanvas.actions.deleteNamed",{name:e.title}),title:n("buildCanvas.actions.deleteNode"),onClick:f=>{f.stopPropagation(),i==null||i.onDelete(e.path)},children:o.jsx(pm,{})}),o.jsx(ul,{type:"source",position:a,className:"abc-handle"}),e.containedIn==="loop"&&o.jsxs(o.Fragment,{children:[o.jsx(ul,{id:"loop-target",type:"target",position:l,className:"abc-handle abc-loop-handle"}),o.jsx(ul,{id:"loop-source",type:"source",position:l,className:"abc-handle abc-loop-handle"})]})]})}function rst({data:e,selected:t}){const{t:n}=xe("create"),i=m.useContext(IR),r=m.useContext(PR),s=r==="vertical"?Xt.Top:Xt.Left,a=r==="vertical"?Xt.Bottom:Xt.Right,l=r==="vertical"?Xt.Right:Xt.Bottom,c=e.pattern??"sequential",u=e.childCount??0,d=n(c==="llm"?"buildCanvas.actions.addSubagent":c==="parallel"?"buildCanvas.actions.addParallelStep":c==="loop"?"buildCanvas.actions.addLoopStep":"buildCanvas.actions.addNextStep");return o.jsxs("div",{className:`abc-group is-${c}${e.compactEmptyGroup?" is-compact-empty":""}${t?" is-selected":""}`,children:[o.jsx(ul,{type:"target",position:s,className:"abc-handle"}),o.jsx("header",{className:"abc-group-head",children:o.jsxs("span",{children:[o.jsx("strong",{title:e.title,children:e.title}),o.jsx("small",{children:e.description})]})}),i&&e.path!==void 0&&u>0&&c!=="parallel"&&o.jsxs("div",{className:"abc-group-boundary-actions",children:[o.jsx("button",{type:"button",className:"abc-group-boundary-add is-start nodrag nopan","aria-label":n("buildCanvas.actions.addFirst"),title:n("buildCanvas.actions.addFirst"),onClick:f=>{f.stopPropagation(),i.onInsert(e.path,0)},children:o.jsx(Do,{})}),o.jsx("button",{type:"button",className:"abc-group-boundary-add is-end nodrag nopan","aria-label":n("buildCanvas.actions.addLast"),title:n("buildCanvas.actions.addLast"),onClick:f=>{f.stopPropagation(),i.onAdd(e.path)},children:o.jsx(Do,{})})]}),i&&e.path!==void 0&&u>0&&c==="parallel"&&o.jsxs("button",{type:"button",className:"abc-group-add abc-group-add-bottom nodrag nopan",onClick:f=>{f.stopPropagation(),i.onAdd(e.path)},children:[o.jsx(Do,{}),o.jsx("span",{children:d})]}),i&&e.path!==void 0&&u===0&&o.jsxs("button",{type:"button",className:"abc-group-add abc-group-add-empty nodrag nopan",onClick:f=>{f.stopPropagation(),i.onAdd(e.path)},children:[o.jsx(Do,{}),o.jsx("span",{children:d})]}),i&&e.path!==void 0&&e.path.length>0&&o.jsx("button",{type:"button",className:"abc-node-delete nodrag nopan","aria-label":n("buildCanvas.actions.deleteNamed",{name:e.title}),title:n("buildCanvas.actions.deleteNode"),onClick:f=>{f.stopPropagation(),i==null||i.onDelete(e.path)},children:o.jsx(pm,{})}),o.jsx(ul,{type:"source",position:a,className:"abc-handle"}),e.containedIn==="loop"&&o.jsxs(o.Fragment,{children:[o.jsx(ul,{id:"loop-target",type:"target",position:l,className:"abc-handle abc-loop-handle"}),o.jsx(ul,{id:"loop-source",type:"source",position:l,className:"abc-handle abc-loop-handle"})]})]})}function sst({data:e}){const t=m.useContext(PR);return o.jsxs("div",{className:"abc-terminal",children:[o.jsx(ul,{type:"target",position:t==="vertical"?Xt.Top:Xt.Left,className:"abc-handle"}),o.jsx("span",{children:e.title}),o.jsx(ul,{type:"source",position:t==="vertical"?Xt.Bottom:Xt.Right,className:"abc-handle"})]})}const ast={agent:ist,group:rst,terminal:sst},ost={insertStep:nst};function lst({draft:e,selectedPath:t,onSelect:n,onAdd:i,onInsert:r,onDelete:s,readOnly:a=!1,interactivePreview:l=!1,direction:c="horizontal"}){const{t:u}=xe("create"),d=m.useMemo(()=>jG(e,c,a,u),[]),[f,h,p]=Gtt(d.nodes),[g,b,v]=Xtt(d.edges),y=Ztt(),x=m.useRef(`${c}:${a?"readonly":"editable"}:${NG(e)}`),w=m.useRef(null),{fitView:O}=_R(),k=m.useMemo(()=>jG(e,c,a,u),[c,e,a,u]),[S,E]=m.useState(()=>window.matchMedia("(max-width: 860px)").matches),C=m.useMemo(()=>a?{padding:.16,minZoom:.05,maxZoom:.9}:S?{padding:.08,minZoom:.35,maxZoom:.9}:{padding:.14,minZoom:.42,maxZoom:1.1},[S,a]),N=m.useCallback((j=0)=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{const T=w.current;if(T&&(T.clientWidth===0||T.clientHeight===0)&&j<8){N(j+1);return}O(C)})})},[C,O]);m.useEffect(()=>{const j=window.matchMedia("(max-width: 860px)"),T=L=>E(L.matches);return j.addEventListener("change",T),()=>j.removeEventListener("change",T)},[]),m.useEffect(()=>{const j=`${c}:${a?"readonly":"editable"}:${NG(e)}`,T=j!==x.current;x.current=j,b(k.edges),h(L=>{const A=new Map(L.map(R=>[R.id,R]));return k.nodes.map(R=>{const P=A.get(R.id);return{...R,measured:!T&&P&&P.type===R.type?P.measured:void 0,position:!T&&P?P.position:R.position,selected:R.data.kind==="agent"&&!!R.data.path&&est(R.data.path,t)}})}),T&&N()},[k,e,N,t,b,h]),m.useEffect(()=>{N()},[S,N]),m.useEffect(()=>{y&&N()},[k,N,y]),m.useEffect(()=>{if(!a||!w.current)return;const j=new ResizeObserver(()=>N());return j.observe(w.current),N(),()=>j.disconnect()},[N,a]);const _=m.useMemo(()=>a?null:{onAdd:i,onInsert:r,onDelete:s},[i,s,r,a]);return o.jsx(PR.Provider,{value:c,children:o.jsx(IR.Provider,{value:_,children:o.jsx("section",{className:`abc-root is-${c}${a?" is-readonly":""}`,"aria-label":u(a?"buildCanvas.readOnlyLabel":"buildCanvas.label"),children:o.jsx("div",{ref:w,className:"abc-canvas",children:o.jsxs(qtt,{nodes:f,edges:g,nodeTypes:ast,edgeTypes:ost,onNodesChange:p,onEdgesChange:v,onNodeClick:(j,T)=>{!a&&T.data.kind==="agent"&&T.data.path&&n(T.data.path)},nodesDraggable:!a,nodesConnectable:!1,nodesFocusable:!a,elementsSelectable:!a,edgesFocusable:!1,edgesReconnectable:!1,panOnDrag:!a||l,zoomOnDoubleClick:l,zoomOnPinch:!a||l,zoomOnScroll:!a||l,fitView:!0,fitViewOptions:C,onInit:()=>N(),minZoom:a?.05:.35,maxZoom:1.6,proOptions:{hideAttribution:!0},ariaLabelConfig:{"controls.ariaLabel":u("buildCanvas.controls.ariaLabel"),"controls.zoomIn.ariaLabel":u("buildCanvas.controls.zoomIn"),"controls.zoomOut.ariaLabel":u("buildCanvas.controls.zoomOut"),"controls.fitView.ariaLabel":u("buildCanvas.controls.fitView")},children:[o.jsx(int,{gap:20,size:1.2,color:"hsl(34 20% 82%)"}),(!a||l)&&o.jsx(unt,{showInteractive:!1}),Zrt]})})})})})}function RS(e){return o.jsx(NOe,{children:o.jsx(lst,{...e})})}Zt.hasResourceBundle("en-US","create")||Zt.addResourceBundle("en-US","create",pse,!0,!0);Zt.hasResourceBundle("zh-CN","create")||Zt.addResourceBundle("zh-CN","create",jce,!0,!0);function It(e,t={}){return Zt.t(e,{...t,ns:"create"})}function nE(e,t){return e.map(n=>({...n,get label(){return It(`${t}.${n.id}.label`)},get desc(){return It(`${t}.${n.id}.description`)}}))}function Hc(e,t){const n={...e};for(const[i,r]of Object.entries(t))Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:()=>It(r)});return n}const owe="https://ark.cn-beijing.volces.com/api/v3/";Hc({key:"MODEL_AGENT_NAME",required:!1,placeholder:"doubao-seed-1-6-250615"},{comment:"traditional.catalog.env.modelAgentName.comment"});const sA=[Hc({key:"MODEL_EMBEDDING_NAME",required:!1,placeholder:"doubao-embedding-vision-250615"},{comment:"traditional.catalog.env.embeddingModelName.comment"}),{key:"MODEL_EMBEDDING_DIM",required:!1,placeholder:"2048"},{key:"MODEL_EMBEDDING_API_BASE",required:!1,placeholder:owe}],G_=[],X_={get label(){return It("traditional.catalog.links.console")},url:"https://console.volcengine.com/vikingdb/openviking"},cst={get label(){return It("traditional.catalog.links.documentation")},url:"https://github.com/volcengine/OpenViking/blob/main/docs/zh/api/05-sessions.md"},lwe="https://api.vikingdb.cn-beijing.volces.com/openviking",ust=`{ "self": {"enabled": true}, "peer": {"enabled": true}, "working_memory": {"enabled": true}, "memory_types": null -}`,lst=[{key:"DATABASE_VIKING_PROJECT",required:!1,placeholder:"default"},{key:"DATABASE_VIKING_REGION",required:!1},{key:"DATABASE_VIKING_COLLECTION_KIND",required:!1},{key:"DATABASE_VIKING_RESOURCE_ID",required:!1}],cst=[qc({key:"DATABASE_VIKINGMEM_PROJECT",required:!1,placeholder:"default",hidden:!0},{comment:"traditional.catalog.env.vikingMemoryProject.comment"}),qc({key:"DATABASE_VIKING_REGION",required:!1,hidden:!0},{comment:"traditional.catalog.env.vikingMemoryRegion.comment"}),qc({key:"DATABASE_VIKINGMEM_MEMORY_TYPE",required:!1,placeholder:"sys_event_v1,sys_profile_v1",hidden:!0},{comment:"traditional.catalog.env.vikingMemoryType.comment"})],MO=[qc({key:"FEISHU_APP_ID",required:!0,placeholder:"cli_xxx"},{comment:"traditional.catalog.env.feishuAppId.comment"}),qc({key:"FEISHU_APP_SECRET",required:!0,secret:!0},{placeholder:"traditional.catalog.env.feishuAppSecret.placeholder",comment:"traditional.catalog.env.feishuAppSecret.comment"})],tv={topK:"3",region:"cn-beijing",endpoint:"https://open.volcengineapi.com/"};function LR(e){if(e==="byteplus"){const t="ap-southeast-1";return{topK:tv.topK,region:t,endpoint:`https://agentkit.${t}.byteplusapi.com/`}}return tv}const lwe=[qc({key:"REGISTRY_SPACE_ID",required:!0},{placeholder:"traditional.catalog.env.registrySpaceId.placeholder",comment:"traditional.catalog.env.registrySpaceId.comment"}),qc({key:"REGISTRY_TOP_K",required:!1,placeholder:tv.topK},{comment:"traditional.catalog.env.registryTopK.comment"}),qc({key:"REGISTRY_REGION",required:!1,placeholder:tv.region},{comment:"traditional.catalog.env.registryRegion.comment"}),qc({key:"REGISTRY_ENDPOINT",required:!1,placeholder:tv.endpoint},{comment:"traditional.catalog.env.registryEndpoint.comment"})],Bx=sE([{id:"web_search",importLine:"from veadk.tools.builtin_tools.web_search import web_search",toolNames:["web_search"],env:Z_},{id:"parallel_web_search",importLine:"from veadk.tools.builtin_tools.parallel_web_search import parallel_web_search",toolNames:["parallel_web_search"],env:Z_},{id:"link_reader",importLine:"from veadk.tools.builtin_tools.link_reader import link_reader",toolNames:["link_reader"],env:[]},{id:"web_scraper",importLine:"from veadk.tools.builtin_tools.web_scraper import web_scraper",toolNames:["web_scraper"],env:[{key:"TOOL_WEB_SCRAPER_ENDPOINT",required:!0},{key:"TOOL_WEB_SCRAPER_API_KEY",required:!0}]},{id:"image_generate",importLine:"from veadk.tools.builtin_tools.image_generate import image_generate",toolNames:["image_generate"],env:[{key:"MODEL_IMAGE_NAME",required:!1,placeholder:"doubao-seedream-5-0-260128"}]},{id:"image_edit",importLine:"from veadk.tools.builtin_tools.image_edit import image_edit",toolNames:["image_edit"],env:[{key:"MODEL_EDIT_NAME",required:!1,placeholder:"doubao-seededit-3-0-i2i-250628"}]},{id:"video_generate",importLine:"from veadk.tools.builtin_tools.video_generate import video_generate, video_task_query",toolNames:["video_generate","video_task_query"],env:[{key:"MODEL_VIDEO_NAME",required:!1,placeholder:"doubao-seedance-2-0-260128"}]},{id:"text_to_speech",importLine:"from veadk.tools.builtin_tools.tts import text_to_speech",toolNames:["text_to_speech"],env:[{key:"TOOL_VESPEECH_APP_ID",required:!0},{key:"TOOL_VESPEECH_SPEAKER",required:!1,placeholder:"zh_female_vv_uranus_bigtts"}]},{id:"run_code",importLine:"from veadk.tools.builtin_tools.run_code import run_code",toolNames:["run_code"],env:[{key:"AGENTKIT_TOOL_ID",required:!0,placeholder:"t-xxxx",get comment(){return It("traditional.catalog.env.agentKitToolId.comment")}},{key:"AGENTKIT_TOOL_REGION",required:!1,placeholder:"cn-beijing",get comment(){return It("traditional.catalog.env.agentKitToolRegion.comment")}}]},{id:"vesearch",importLine:"from veadk.tools.builtin_tools.vesearch import vesearch",toolNames:["vesearch"],env:[{key:"TOOL_VESEARCH_ENDPOINT",required:!0,comment:"VeSearch bot_id"}]}],"traditional.catalog"),ust=new Set(["web_scraper","text_to_speech","vesearch"]),dst=new Set(["web_search","parallel_web_search"]),fst=Bx.filter(e=>!ust.has(e.id));function cwe(e="volcengine"){const t=e==="byteplus"?dst:new Set;return fst.filter(n=>!t.has(n.id))}const nv=sE([{id:"local",env:[]},{id:"sqlite",extraArgs:'local_database_path="./short_term_memory.db"',env:[]},{id:"mysql",env:[{key:"DATABASE_MYSQL_HOST",required:!0},{key:"DATABASE_MYSQL_USER",required:!0},{key:"DATABASE_MYSQL_PASSWORD",required:!0},{key:"DATABASE_MYSQL_DATABASE",required:!0}]},{id:"postgresql",env:[{key:"DATABASE_POSTGRESQL_HOST",required:!0},{key:"DATABASE_POSTGRESQL_PORT",required:!1,placeholder:"5432"},{key:"DATABASE_POSTGRESQL_USER",required:!0},{key:"DATABASE_POSTGRESQL_PASSWORD",required:!0},{key:"DATABASE_POSTGRESQL_DATABASE",required:!0}]}],"traditional.backends.shortTerm"),f6=sE([{id:"local",env:lA,pipExtra:"extensions",needsEmbedding:!0},{id:"opensearch",env:[{key:"DATABASE_OPENSEARCH_HOST",required:!0},{key:"DATABASE_OPENSEARCH_PORT",required:!1,placeholder:"9200"},{key:"DATABASE_OPENSEARCH_USERNAME",required:!0},{key:"DATABASE_OPENSEARCH_PASSWORD",required:!0},...lA],pipExtra:"extensions",needsEmbedding:!0},{id:"redis",env:[{key:"DATABASE_REDIS_HOST",required:!0},{key:"DATABASE_REDIS_PORT",required:!1,placeholder:"6379"},{key:"DATABASE_REDIS_PASSWORD",required:!1},...lA],pipExtra:"extensions",needsEmbedding:!0},{id:"viking",env:cst},{id:"openviking",env:[{key:"DATABASE_OPENVIKING_URL",required:!0,placeholder:owe,get comment(){return It("traditional.catalog.env.openVikingUrl.comment")},link:J_},{key:"DATABASE_OPENVIKING_API_KEY",required:!0,comment:"OpenViking API Key",link:J_},{key:"DATABASE_OPENVIKING_USER_ID",required:!1,placeholder:"default",get comment(){return It("traditional.catalog.env.openVikingMemoryUserId.comment")},get help(){return It("traditional.catalog.env.openVikingMemoryUserId.help")}},{key:"DATABASE_OPENVIKING_MEMORY_POLICY",required:!1,placeholder:ost,get comment(){return It("traditional.catalog.env.openVikingMemoryPolicy.comment")},multiline:!0,format:"json",get help(){return It("traditional.catalog.env.openVikingMemoryPolicy.help")},link:ast}]},{id:"mem0",env:[{key:"DATABASE_MEM0_API_KEY",required:!0},{key:"DATABASE_MEM0_BASE_URL",required:!1}],pipExtra:"database"}],"traditional.backends.longTerm"),om="viking",h6=sE([{id:"viking",env:lst},{id:"opensearch",env:[{key:"DATABASE_OPENSEARCH_HOST",required:!0},{key:"DATABASE_OPENSEARCH_PORT",required:!1,placeholder:"9200"},{key:"DATABASE_OPENSEARCH_USERNAME",required:!0},{key:"DATABASE_OPENSEARCH_PASSWORD",required:!0},...lA],pipExtra:"extensions",needsEmbedding:!0},{id:"context_search",env:[...Z_,{key:"DATABASE_CONTEXT_SEARCH_ENGINE_ID",required:!0},{key:"DATABASE_CONTEXT_SEARCH_ENGINE_ENDPOINT",required:!0},{key:"DATABASE_CONTEXT_SEARCH_ENGINE_APIKEY",required:!0}]},{id:"openviking",env:[{key:"DATABASE_OPENVIKING_URL",required:!0,placeholder:owe,get comment(){return It("traditional.catalog.env.openVikingUrl.comment")},link:J_},{key:"DATABASE_OPENVIKING_API_KEY",required:!0,comment:"OpenViking API Key",link:J_},{key:"DATABASE_OPENVIKING_USER_ID",required:!1,placeholder:"default",get comment(){return It("traditional.catalog.env.openVikingKnowledgeUserId.comment")},get help(){return It("traditional.catalog.env.openVikingKnowledgeUserId.help")}},{key:"DATABASE_OPENVIKING_TARGET_URI",required:!1,placeholder:"viking://user/default/resources//",get comment(){return It("traditional.catalog.env.openVikingTargetUri.comment")},get help(){return It("traditional.catalog.env.openVikingTargetUri.help")}}]}],"traditional.backends.knowledge"),hst=sE([{id:"apmplus",enableFlag:"ENABLE_APMPLUS",env:[{key:"OBSERVABILITY_OPENTELEMETRY_APMPLUS_SERVICE_NAME",required:!1}]},{id:"cozeloop",enableFlag:"ENABLE_COZELOOP",env:[{key:"OBSERVABILITY_OPENTELEMETRY_COZELOOP_API_KEY",required:!0},{key:"OBSERVABILITY_OPENTELEMETRY_COZELOOP_SERVICE_NAME",required:!1,comment:"CozeLoop space_id"}]},{id:"tls",enableFlag:"ENABLE_TLS",env:[...Z_,qc({key:"OBSERVABILITY_OPENTELEMETRY_TLS_SERVICE_NAME",required:!1},{comment:"traditional.catalog.env.tlsServiceName.comment"})]}],"traditional.exporters");function sc(e="volcengine"){return{name:"",description:It("defaults.description"),instruction:It("defaults.instruction"),dynamicAgentDelegation:!1,agentType:"llm",cloudProvider:e,maxIterations:3,a2aUrl:"",tools:[],skills:[],memory:{shortTerm:!1,longTerm:!1},knowledgebase:!1,tracing:!1,subAgents:[],builtinTools:[],customTools:[],mcpTools:[],a2aRegistry:{enabled:!1,registrySpaceId:"",registryTopK:"",registryRegion:"",registryEndpoint:""},modelName:Ah(e),modelSource:"ark",modelProvider:"",modelApiBase:"",shortTermBackend:"local",longTermBackend:"local",longTermMemoryIndex:"",autoSaveSession:!1,knowledgebaseBackend:om,knowledgebaseIndex:"",tracingExporters:[],selectedSkills:[],cloudEnvironment:{environmentId:"",environmentVersionId:""},deployment:{feishuEnabled:!1,modelApiKeyId:"",modelApiKeyName:""}}}function V1(e){return{id:e,get displayName(){return It(`traditional.optimization.options.${e}.label`)},get description(){return It(`traditional.optimization.options.${e}.description`)}}}const pB=[V1("context_engine"),V1("compressor"),V1("verifier"),V1("long_run_control"),V1("mcp_resilience")],pst=[{id:"quality",get displayName(){return It("traditional.optimization.groups.quality")},componentIds:["context_engine","verifier"]},{id:"cost",get displayName(){return It("traditional.optimization.groups.cost")},componentIds:["compressor"]},{id:"stability",get displayName(){return It("traditional.optimization.groups.stability")},componentIds:["long_run_control","mcp_resilience"]}],Ux=pB.map(e=>e.id);function mst(e){return e==="byteplus"?It("traditional.optimization.bytePlusUnavailable"):null}const uwe=["context_engine","compressor","verifier","long_run_control"],gst=new Set(["1","true","yes","on"]),mB=[{id:"default",get displayName(){return It("traditional.optimization.profiles.default.label")},get description(){return It("traditional.optimization.profiles.default.description")},defaultComponents:[],autoAddedComponents:[]},{id:"ops",get displayName(){return It("traditional.optimization.profiles.ops.label")},get description(){return It("traditional.optimization.profiles.ops.description")},defaultComponents:["context_engine","verifier","long_run_control","mcp_resilience"],autoAddedComponents:["sql_readonly"]}];function cA(e){var t;return((t=pB.find(n=>n.id===e))==null?void 0:t.displayName)??e}function bst(e){var t;return((t=mB.find(n=>n.id===e))==null?void 0:t.displayName)??e}function gB(e){const t=mB.find(n=>n.id===e);return t?[...t.defaultComponents]:[]}function $g(e,t="default"){const n=new Set(e);return{enabled:n.size>0,profile:t,componentOverrides:Object.fromEntries(Ux.map(r=>[r,n.has(r)]))}}function bB(e){if(!e)return;const t=e.profile==="ops"?"ops":"default",n=t==="ops"?gB(t):Ux.filter(i=>{var r;return((r=e.componentOverrides)==null?void 0:r[i])===!0});return{...$g(n,t),...e.catalogVersion?{catalogVersion:e.catalogVersion}:{},...e.planHash?{planHash:e.planHash}:{}}}function cM(e){return gst.has((e==null?void 0:e.trim().toLowerCase())??"")}function yst(e){if(!e)return null;try{const t=JSON.parse(e);return t&&typeof t=="object"&&!Array.isArray(t)?t:null}catch{return null}}function vst(e){var a;const t=new Map((e==null?void 0:e.map(({key:l,value:c})=>[l,c]))??[]),n=t.get("HARNESS_SIDECAR_ENABLED");if(n===void 0)return null;const i=((a=t.get("HARNESS_PROFILE"))==null?void 0:a.trim())==="ops"?"ops":"default";if(!cM(n))return $g([],i);const r=yst(t.get("HARNESS_SIDECAR_COMPONENT_OVERRIDES"));if(r){const l={...$g(Ux.filter(c=>r[c]===!0),i),enabled:!0};return i==="ops"?bB(l)??l:l}if(i==="ops")return $g(gB(i),i);const s=[...cM(t.get("HARNESS_MODEL_PROXY_ENABLED"))?uwe:[],...cM(t.get("HARNESS_MCP_GATEWAY_ENABLED"))?["mcp_resilience"]:[]];return{...$g(s,i),enabled:!0}}function xst(e,t){return{...e,modelName:t.modelName||e.modelName,description:t.description,instruction:t.instruction}}function Ost(e){var t;return((t=e.harnessSidecar)==null?void 0:t.profile)??"default"}function eN(e){var n;const t=(n=e.harnessSidecar)==null?void 0:n.componentOverrides;return t?Ux.filter(i=>t[i]):[]}function wst(e){const t=new Set(eN(e));return uwe.filter(n=>t.has(n))}function Sst(e,t){const n=i=>({...i,mcpTools:(i.mcpTools??[]).map(r=>{var a,l;const s=!!(r.authTokenEnv&&(t.has(r.authTokenEnv)||r.authToken));return{...r,credentialConfigured:s,...s?{credentialSourceUrl:((a=r.url)==null?void 0:a.trim())??"",credentialSourceAuthTokenEnv:((l=r.authTokenEnv)==null?void 0:l.trim())??""}:{}}}),subAgents:i.subAgents.map(n),...i.workflow?{workflow:{...i.workflow,nodes:i.workflow.nodes.map(r=>({...r,agent:n(r.agent)}))}}:{}});return n(e)}function Xb(e){const t=(e==null?void 0:e.trim())??"",n=t.indexOf("/");return n<=0||n===t.length-1?{modelName:t,modelProvider:""}:{modelName:t.slice(n+1),modelProvider:t.slice(0,n)}}function yB(e){return Xb(e).modelName}function dwe(e,t,n,i=!1){var c,u,d,f;const r=Xb((t==null?void 0:t.model)||(n==null?void 0:n.model)),s=(t==null?void 0:t.children)??[],a=t==null?void 0:t.type,l=e.agentType==="a2a"&&((c=e.a2aRegistry)!=null&&c.enabled)&&a==="llm"?"a2a":a??e.agentType;return{...e,name:((u=t==null?void 0:t.name)==null?void 0:u.trim())||((d=n==null?void 0:n.name)==null?void 0:d.trim())||e.name,description:(t==null?void 0:t.description)??e.description,instruction:i?e.instruction:(t==null?void 0:t.instruction)??e.instruction,agentType:l,modelName:r.modelName||e.modelName,modelProvider:r.modelProvider||e.modelProvider,skills:((f=t==null?void 0:t.skills)==null?void 0:f.map(h=>h.name))??e.skills,subAgents:e.subAgents.map((h,p)=>dwe(h,s[p],void 0,i))}}function kst(e,t){const n=new Map(t.map(({key:a,value:l})=>[a,l]));if(!["REGISTRY_SPACE_ID","REGISTRY_TOP_K","REGISTRY_REGION","REGISTRY_ENDPOINT"].some(a=>n.has(a)))return e;const r=(a,l)=>n.has(a)?n.get(a)??"":l??"",s=a=>{var l;return{...a,...(l=a.a2aRegistry)!=null&&l.enabled?{a2aRegistry:{...a.a2aRegistry,registrySpaceId:r("REGISTRY_SPACE_ID",a.a2aRegistry.registrySpaceId),registryTopK:r("REGISTRY_TOP_K",a.a2aRegistry.registryTopK),registryRegion:r("REGISTRY_REGION",a.a2aRegistry.registryRegion),registryEndpoint:r("REGISTRY_ENDPOINT",a.a2aRegistry.registryEndpoint)}}:{},subAgents:a.subAgents.map(s)}};return s(e)}function p6(e,t){var c,u,d;const n=e.cloudProvider??t,i=sc(n),r=e.deployment,s=r==null?void 0:r.network,a=e.cloudEnvironment,l=e.a2aRegistry;return{...i,...e,name:e.name??i.name,description:e.description??i.description,instruction:e.instruction??i.instruction,agentType:e.agentType??i.agentType,cloudProvider:n,maxIterations:e.maxIterations??i.maxIterations,a2aUrl:e.a2aUrl??i.a2aUrl,model:e.model??void 0,modelSource:e.modelSource==="ark"||e.modelSource==="custom"?e.modelSource:void 0,modelName:e.modelName??i.modelName,modelProvider:e.modelProvider??i.modelProvider,modelApiBase:e.modelApiBase??i.modelApiBase,memory:{shortTerm:((c=e.memory)==null?void 0:c.shortTerm)??i.memory.shortTerm,longTerm:((u=e.memory)==null?void 0:u.longTerm)??i.memory.longTerm},tools:[...e.tools??[]],skills:[...e.skills??[]],knowledgebase:e.knowledgebase??i.knowledgebase,tracing:e.tracing??i.tracing,harnessSidecar:bB(e.harnessSidecar),subAgents:(e.subAgents??[]).map(f=>p6(f,n)),builtinTools:[...e.builtinTools??[]],customTools:[...e.customTools??[]],mcpTools:[...e.mcpTools??[]],a2aRegistry:{...i.a2aRegistry,...l??{},enabled:(l==null?void 0:l.enabled)??!1,registrySpaceId:(l==null?void 0:l.registrySpaceId)??"",registryTopK:(l==null?void 0:l.registryTopK)??"",registryRegion:(l==null?void 0:l.registryRegion)??"",registryEndpoint:(l==null?void 0:l.registryEndpoint)??""},shortTermBackend:e.shortTermBackend??i.shortTermBackend,longTermBackend:e.longTermBackend??i.longTermBackend,longTermMemoryIndex:e.longTermMemoryIndex??i.longTermMemoryIndex,autoSaveSession:e.autoSaveSession??i.autoSaveSession,knowledgebaseBackend:e.knowledgebaseBackend??i.knowledgebaseBackend,knowledgebaseIndex:e.knowledgebaseIndex??i.knowledgebaseIndex,tracingExporters:[...e.tracingExporters??[]],selectedSkills:[...e.selectedSkills??[]],cloudEnvironment:{...i.cloudEnvironment,...a??{},cliTools:[...(a==null?void 0:a.cliTools)??[]],dockerfile:typeof(a==null?void 0:a.dockerfile)=="string"?a.dockerfile:void 0},deployment:{...i.deployment,...r??{},feishuEnabled:(r==null?void 0:r.feishuEnabled)??!1,runtimeName:(r==null?void 0:r.runtimeName)??void 0,runtimeNameCustomized:(r==null?void 0:r.runtimeNameCustomized)??((d=i.deployment)==null?void 0:d.runtimeNameCustomized),network:s?{...s,vpcId:s.vpcId??"",subnetIds:s.subnetIds??"",enableSharedInternetAccess:s.enableSharedInternetAccess??!1}:void 0,modelApiKeyId:(r==null?void 0:r.modelApiKeyId)??"",modelApiKeyName:(r==null?void 0:r.modelApiKeyName)??"",envValues:(r==null?void 0:r.envValues)??void 0},...e.workflow?{workflow:{...e.workflow,nodes:e.workflow.nodes.map(f=>({...f,agent:p6(f.agent,n)}))}}:{}}}const Est=["动态子智能体协作规则:","Dynamic sub-agent collaboration rules:"],Cst=["collect_resources","create_agents","handoff_to"];function Tst(e){return e.replace(/\\([\\`*_[\]{}()<>#+\-.!|])/g,"$1")}function Ast(e){const t=Est.flatMap(i=>{const r=[];let s=0;for(;si-r),n=t.find((i,r)=>{const s=t[r+1]??e.length,a=Tst(e.slice(i,s));return Cst.every(l=>a.includes(l))});return n===void 0?e:e.slice(0,n).trimEnd()}function _st(e){const t=n=>({...n,instruction:n.dynamicAgentDelegation===!0?Ast(n.instruction):n.instruction,subAgents:n.subAgents.map(t),...n.workflow?{workflow:{...n.workflow,nodes:n.workflow.nodes.map(i=>({...i,agent:t(i.agent)}))}}:{}});return t(e)}function fwe(e,t){var l,c;const n=sc(t),i=[...e.tools??[]],r=Bx.filter(u=>u.toolNames.some(d=>i.includes(d))),s=new Set(r.flatMap(u=>u.toolNames)),a=Xb(e.model);return{...n,modelSource:void 0,name:((l=e.name)==null?void 0:l.trim())??"",description:e.description??"",instruction:e.instruction||n.instruction,agentType:e.type??"llm",modelName:a.modelName,modelProvider:a.modelProvider,tools:i.filter(u=>!s.has(u)),builtinTools:r.map(u=>u.id),skills:((c=e.skills)==null?void 0:c.map(u=>u.name))??[],subAgents:(e.children??[]).map(u=>fwe(u,t))}}function vB(e,t,n=[]){var l,c,u,d;const i=((l=e.draft)==null?void 0:l.cloudProvider)??t,r=Xb(e.model),s=e.draft?p6(e.draft,i):e.graph?fwe(e.graph,i):{...sc(i),modelSource:void 0,name:((c=e.name)==null?void 0:c.trim())||e.appName.trim(),description:e.description??"",instruction:e.instruction||sc(i).instruction,agentType:e.type??"llm",modelName:r.modelName,modelProvider:r.modelProvider,tools:[...e.tools??[]],skills:((u=e.skills)==null?void 0:u.map(f=>f.name))??[]},a=e.draft&&s.dynamicAgentDelegation===!0?_st(s):s;return Sst(dwe(a,e.graph,{name:((d=e.name)==null?void 0:d.trim())||e.appName.trim(),model:e.model},!!e.draft),new Set(n))}function Nst(e,t){const n=i=>{var s;const r=((s=i.modelName)==null?void 0:s.trim())??"";return{...i,modelSource:i.agentType==="llm"||!i.agentType?t.has(r)?"ark":"custom":i.modelSource,subAgents:i.subAgents.map(n),...i.workflow?{workflow:{...i.workflow,nodes:i.workflow.nodes.map(a=>({...a,agent:n(a.agent)}))}}:{}}};return n(e)}function DG({className:e="icon"}){return o.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[o.jsx("path",{d:"M4.5 6.7h4.2M12.3 6.7h7.2"}),o.jsx("path",{d:"M4.5 12h8.2M16.3 12h3.2"}),o.jsx("path",{d:"M4.5 17.3h2.7M10.8 17.3h8.7"}),o.jsx("circle",{cx:"10.5",cy:"6.7",r:"1.8",fill:"currentColor",stroke:"none"}),o.jsx("circle",{cx:"14.5",cy:"12",r:"1.8",fill:"currentColor",stroke:"none"}),o.jsx("circle",{cx:"9",cy:"17.3",r:"1.8",fill:"currentColor",stroke:"none"})]})}const jst={coding:"studioTools.labels.coding",get_city_weather:"studioTools.labels.get_city_weather",get_location_weather:"studioTools.labels.get_location_weather",web_fetch:"studioTools.labels.web_fetch"};function hwe(e,t){const n=Bx.find(r=>r.id===e||r.toolNames.includes(e)),i=jst[e];return i?t(i):(n==null?void 0:n.label)??e}function Rst(){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"m7 7 10 10M17 7 7 17",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function Ist(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"10.8",cy:"10.8",r:"5.8",stroke:"currentColor",strokeWidth:"1.7"}),o.jsx("path",{d:"m15.2 15.2 4 4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function Pst({agentName:e,tools:t,selectedIds:n,loading:i,disabled:r,unavailableReason:s,onChange:a,onClose:l}){const{t:c}=Oe("workspaceTools"),[u,d]=m.useState(""),f=m.useMemo(()=>new Set(n),[n]),h=m.useRef(`studio-tool-${Math.random().toString(36).slice(2)}`),p=m.useMemo(()=>{const b=u.trim().toLowerCase();return b?t.filter(v=>`${v.name} ${v.id} ${v.description}`.toLowerCase().includes(b)):t},[u,t]);m.useEffect(()=>{const b=document.body.style.overflow;document.body.style.overflow="hidden";const v=y=>{y.key==="Escape"&&l()};return document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v),document.body.style.overflow=b}},[l]);const g=b=>{const v=new Set(f);v.has(b)?v.delete(b):v.add(b),a([...v])};return Fi.createPortal(o.jsxs("div",{className:"studio-tool-dialog-layer",children:[o.jsx("button",{type:"button",className:"studio-tool-dialog-scrim","aria-label":c("studioTools.closeDialog"),onClick:l}),o.jsxs("section",{className:"studio-tool-dialog",role:"dialog","aria-modal":"true","aria-labelledby":h.current,children:[o.jsxs("header",{className:"studio-tool-dialog-head",children:[o.jsx("span",{className:"studio-tool-dialog-mark",children:o.jsx(DG,{})}),o.jsxs("div",{children:[o.jsx("h2",{id:h.current,children:c("studioTools.title")}),o.jsx("p",{children:c("studioTools.description",{agentName:e})})]}),o.jsx("button",{type:"button",className:"studio-tool-dialog-close","aria-label":c("studioTools.close"),onClick:l,children:o.jsx(Rst,{})})]}),o.jsxs("div",{className:"studio-tool-dialog-body",children:[o.jsxs("label",{className:"studio-tool-search",children:[o.jsx(Ist,{}),o.jsx("input",{value:u,"aria-label":c("studioTools.searchAria"),placeholder:c("studioTools.searchPlaceholder"),autoFocus:!0,onChange:b=>d(b.target.value)})]}),o.jsx("div",{className:"studio-tool-picker",role:"list","aria-label":c("studioTools.availableAria"),children:i?o.jsx("div",{className:"studio-tool-empty",children:c("studioTools.loading")}):s?o.jsx("div",{className:"studio-tool-empty",children:s}):p.length===0?o.jsx("div",{className:"studio-tool-empty",children:c("studioTools.noMatch")}):p.map(b=>{const v=f.has(b.id);return o.jsxs("article",{className:"studio-tool-option",role:"listitem",children:[o.jsx("span",{className:"studio-tool-option-icon",children:o.jsx(DG,{})}),o.jsxs("span",{className:"studio-tool-option-copy",children:[o.jsx("strong",{children:b.name||hwe(b.id,c)}),o.jsx("code",{children:b.id}),o.jsx("span",{children:b.description})]}),o.jsx("button",{type:"button",disabled:r,"aria-pressed":v,onClick:()=>g(b.id),children:c(v?"studioTools.remove":"studioTools.add")})]},b.id)})})]})]})]}),document.body)}function Tn({as:e="span",className:t="",duration:n=4,spread:i=20,children:r,style:s,...a}){const l=Math.min(Math.max(i,5),45);return o.jsx(e,{className:`text-shimmer${t?` ${t}`:""}`,style:{...s,backgroundImage:`linear-gradient(to right, hsl(var(--muted-foreground)) ${50-l}%, hsl(var(--foreground)) 50%, hsl(var(--muted-foreground)) ${50+l}%)`,animationDuration:`${n}s`},...a,children:r})}const tN=[{id:"ubuntu-22.04",label:"Ubuntu 22.04",image:"ubuntu:22.04"},{id:"ubuntu-24.04",label:"Ubuntu 24.04",image:"ubuntu:24.04"}],pwe=[{id:"aio-sandbox",label:"AIO Sandbox",description:"内置 Sandbox Shell 能力 · Ubuntu 22.04"},{id:"codex-sandbox",label:"Codex Sandbox",description:"内置 Codex CLI、浏览器与代码执行环境"},{id:"ubuntu",label:"Ubuntu",description:"标准 Linux 基础镜像"}],xB="agentkit-cli-2107625663-cn-beijing.cr.volces.com/agentkit/agent-native-requirements-aio:0.2.1-20260831",mwe={volcengine:"enterprise-public-cn-beijing.cr.volces.com/vefaas-public/codexenv:1.1.0",byteplus:"enterprise-public-ap-southeast-1.cr.volces.com/vefaas-public/codexenv:1.1.0"},gwe=[{id:"python-3.10",label:"Python 3.10"},{id:"python-3.12",label:"Python 3.12"}],Dst={"python-3.10":"3.10.18","python-3.12":"3.12.11"},OB=[{id:"tools",label:"工具",description:"常用 CLI 与内容处理工具",options:[{id:"lark-cli",label:"lark-cli",description:"飞书开放平台命令行工具",installer:"pip",packageName:"lark-cli"},{id:"pandoc",label:"pandoc",description:"文档格式转换工具",installer:"apt",packageName:"pandoc"},{id:"opencli",label:"opencli",description:"将网站与桌面应用转换为命令行工具",installer:"npm",packageName:"@jackwener/opencli@1.8.7"}]},{id:"productivity",label:"效率",description:"加速依赖安装、检索和协作",options:[{id:"uv",label:"uv",description:"快速 Python 包与项目管理器",installer:"pip",packageName:"uv"},{id:"ripgrep",label:"ripgrep",description:"高性能文本检索工具",installer:"apt",packageName:"ripgrep"},{id:"jq",label:"jq",description:"JSON 查询与转换工具",installer:"apt",packageName:"jq"},{id:"github-cli",label:"GitHub CLI",description:"在终端中管理 GitHub 工作流",installer:"apt",packageName:"gh"}]},{id:"browser",label:"浏览器自动化",description:"网页操作、测试与内容采集",options:[{id:"playwright",label:"Playwright",description:"浏览器自动化与端到端测试",installer:"pip",packageName:"playwright"},{id:"chromium",label:"Chromium",description:"无头浏览器运行时",installer:"apt",packageName:"chromium"}]},{id:"system",label:"系统与媒体",description:"基础开发、网络和媒体处理能力",options:[{id:"git",label:"Git",description:"代码版本管理",installer:"apt",packageName:"git"},{id:"curl",label:"curl",description:"网络请求与文件下载",installer:"apt",packageName:"curl"},{id:"ffmpeg",label:"FFmpeg",description:"音视频转码与处理",installer:"apt",packageName:"ffmpeg"},{id:"imagemagick",label:"ImageMagick",description:"图片转换与批处理",installer:"apt",packageName:"imagemagick"}]}],Mst=OB.flatMap(e=>e.options),Lst=["build-essential","curl","libbz2-dev","libffi-dev","libgdbm-dev","liblzma-dev","libncursesw5-dev","libreadline-dev","libsqlite3-dev","libssl-dev","tk-dev","uuid-dev","zlib1g-dev"],$st=["xvfb","fonts-noto-color-emoji","fonts-unifont","libfontconfig1","libfreetype6","xfonts-cyrillic","xfonts-scalable","fonts-liberation","fonts-ipafont-gothic","fonts-wqy-zenhei","fonts-tlwg-loma-otf","fonts-freefont-ttf"],Fst={"ubuntu-22.04":["libasound2","libatk-bridge2.0-0","libatk1.0-0","libatspi2.0-0","libcairo2","libcups2","libdbus-1-3","libdrm2","libgbm1","libglib2.0-0","libnspr4","libnss3","libpango-1.0-0","libwayland-client0","libx11-6","libxcb1","libxcomposite1","libxdamage1","libxext6","libxfixes3","libxkbcommon0","libxrandr2"],"ubuntu-24.04":["libasound2t64","libatk-bridge2.0-0t64","libatk1.0-0t64","libatspi2.0-0t64","libcairo2","libcups2t64","libdbus-1-3","libdrm2","libgbm1","libglib2.0-0t64","libnspr4","libnss3","libpango-1.0-0","libx11-6","libxcb1","libxcomposite1","libxdamage1","libxext6","libxfixes3","libxkbcommon0","libxrandr2"]};function H1(e,t){for(const n of t)e.includes(n)||e.push(n)}function Bst(e,t,n,i,r){const s=["ca-certificates"];r||H1(s,i?[`python${n}`,`python${n}-venv`]:Lst);for(const a of t)a.id==="playwright"||a.id==="chromium"||(a.installer==="apt"&&H1(s,[a.packageName]),a.id==="opencli"&&H1(s,["curl","xz-utils"]));return e.optionIds.some(a=>a==="playwright"||a==="chromium")&&(H1(s,$st),H1(s,Fst[e.operatingSystem])),s}const uM={name:"",description:"",baseEnvironment:"aio-sandbox",operatingSystem:"ubuntu-22.04",language:"python-3.12",optionIds:[],selectedSkills:[]};function ph(e){var t;return((t=gwe.find(n=>n.id===e))==null?void 0:t.label)??e}function m6(e){var t;return((t=tN.find(n=>n.id===e))==null?void 0:t.label)??e}function g6(e){var t;return((t=pwe.find(n=>n.id===e))==null?void 0:t.label)??e}function Ust(e){var n;const t=((n=e.match(/^\s*FROM\s+(.+)$/im))==null?void 0:n[1])??"";return{baseEnvironment:/\/codexenv:/i.test(t)?"codex-sandbox":/aio\.sandbox/i.test(e)?"aio-sandbox":"ubuntu",operatingSystem:/ubuntu:24\.04/i.test(t)?"ubuntu-24.04":"ubuntu-22.04"}}function wB(e,t="volcengine"){const n=Mst.filter(b=>e.optionIds.includes(b.id)),i=e.baseEnvironment==="aio-sandbox",r=e.baseEnvironment==="codex-sandbox",s=i||r,a=s?"python-3.12":e.language,l=a.replace("python-",""),c=Dst[a],u=tN.find(b=>b.id===e.operatingSystem)??tN[0],d=e.operatingSystem==="ubuntu-22.04"&&l==="3.10"||e.operatingSystem==="ubuntu-24.04"&&l==="3.12",f=Bst(e,n,l,d,s),h=i?[`ARG AIO_BASE_IMAGE=${xB}`,"ARG AIO_BASE_PLATFORM=linux/amd64","",`# Base environment: AIO Sandbox (${u.label})`,"FROM --platform=${AIO_BASE_PLATFORM} ${AIO_BASE_IMAGE}"]:r?[`ARG CODEX_BASE_IMAGE=${mwe[t]}`,"ARG CODEX_BASE_PLATFORM=linux/amd64","","# Base environment: Codex Sandbox","FROM --platform=${CODEX_BASE_PLATFORM} ${CODEX_BASE_IMAGE}"]:[`# Operating system: ${u.label}`,`FROM ${u.image}`];h.push("","ARG DEBIAN_FRONTEND=noninteractive","ARG APT_MIRROR_URL=http://archive.ubuntu.com/ubuntu","ARG PIP_INDEX_URL=https://pypi.org/simple","ARG PYTHON_SOURCE_BASE_URL=https://www.python.org/ftp/python","ARG PLAYWRIGHT_DOWNLOAD_HOST=https://cdn.playwright.dev","ARG PIP_DEFAULT_TIMEOUT=300","ARG PIP_RETRIES=10","","# Install all system dependencies in one transaction from the provider-local mirror.","RUN set -eux; \\",' mirror="${APT_MIRROR_URL%/}"; \\'," for source_file in /etc/apt/sources.list /etc/apt/sources.list.d/*.sources; do \\",' [ -f "$source_file" ] || continue; \\',' sed -i -E "s#https?://(archive|security).ubuntu.com/ubuntu/?#${mirror}#g" "$source_file"; \\'," done; \\",` printf 'Acquire::Retries "5";\\nAcquire::ForceIPv4 "true";\\nAcquire::http::Timeout "60";\\nAcquire::https::Timeout "60";\\n' > /etc/apt/apt.conf.d/80-veadk-network; \\`," apt-get update; \\"," apt-get install -y --no-install-recommends \\",...f.map(b=>" "+b+" \\")," ; rm -rf /var/lib/apt/lists/*","","ENV PYTHONDONTWRITEBYTECODE=1 \\"," PYTHONUNBUFFERED=1 \\"," PIP_NO_CACHE_DIR=1","",`# Python ${l}`),i?h.push("# Keep Studio dependencies isolated from AIO's system interpreter.","RUN /opt/python3.12/bin/python -m venv /opt/veadk-environment/.venv","","ENV VIRTUAL_ENV=/opt/veadk-environment/.venv \\"," BASH_VENV_PATH=/opt/veadk-environment/.venv \\",' PATH="/opt/veadk-environment/.venv/bin:$PATH"'):r?h.push("# Keep Studio dependencies isolated from the Codex runtime.","RUN python3 -m venv /opt/veadk-environment/.venv","","ENV VIRTUAL_ENV=/opt/veadk-environment/.venv \\",' PATH="/opt/veadk-environment/.venv/bin:$PATH"'):d?h.push(`RUN python${l} -m venv /opt/venv`):h.push(`RUN curl --retry 5 --retry-all-errors --connect-timeout 30 -fsSL "\${PYTHON_SOURCE_BASE_URL}/${c}/Python-${c}.tgz" -o /tmp/python.tgz \\`," && mkdir -p /tmp/python-source \\"," && tar -xzf /tmp/python.tgz --strip-components=1 -C /tmp/python-source \\"," && cd /tmp/python-source \\"," && ./configure --prefix=/opt/python --with-ensurepip=install \\",' && make -j"$(nproc)" \\'," && make install \\",` && /opt/python/bin/python${l} -m venv /opt/venv \\`," && rm -rf /tmp/python-source /tmp/python.tgz"),s||h.push("",'ENV PATH="/opt/venv/bin:$PATH"');const p=new Set(e.optionIds);(p.has("playwright")||p.has("chromium"))&&h.push("","ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright \\"," PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUT=300000"),h.push("","WORKDIR /workspace","","# VeADK","RUN python -m pip install --upgrade veadk-python");let g=!1;for(const b of n)h.push("",`# ${b.label}`),b.id==="opencli"?h.push('RUN node_arch="$(dpkg --print-architecture)" \\',' && case "$node_arch" in amd64) node_arch=x64 ;; arm64) node_arch=arm64 ;; *) echo "Unsupported architecture: $node_arch" >&2; exit 1 ;; esac \\',' && curl --retry 5 --connect-timeout 30 -fsSL "https://nodejs.org/dist/v22.18.0/node-v22.18.0-linux-${node_arch}.tar.xz" -o /tmp/node.tar.xz \\'," && tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \\",` && npm install --global ${b.packageName} \\`," && npm cache clean --force \\"," && rm -f /tmp/node.tar.xz"):b.id==="playwright"||b.id==="chromium"?g||(h.push("RUN python -m pip install --upgrade playwright"),h.push("RUN python -m playwright install chromium"),g=!0):b.installer!=="apt"&&h.push(`RUN python -m pip install --upgrade ${b.packageName}`);return i?h.push("","# Keep AIO's inherited /opt/gem/run.sh startup chain and shell API.","EXPOSE 8080"):r||h.push("",'CMD ["/bin/bash"]'),h.join(` -`)}function Qst(){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"m7 7 10 10M17 7 7 17",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function zst(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"10.8",cy:"10.8",r:"5.8",stroke:"currentColor",strokeWidth:"1.7"}),o.jsx("path",{d:"m15.2 15.2 4 4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function b6(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[o.jsx("path",{d:"M5 7.25A2.25 2.25 0 0 1 7.25 5h9.5A2.25 2.25 0 0 1 19 7.25v9.5A2.25 2.25 0 0 1 16.75 19h-9.5A2.25 2.25 0 0 1 5 16.75v-9.5Z",stroke:"currentColor",strokeWidth:"1.6"}),o.jsx("path",{d:"M8.5 9.25 11 12l-2.5 2.75M12.75 14.75h2.75",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]})}function bwe(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[o.jsx("path",{d:"M4.75 7.25A2.25 2.25 0 0 1 7 5h3l1.5 2h5.5a2.25 2.25 0 0 1 2.25 2.25v7.5A2.25 2.25 0 0 1 17 19H7a2.25 2.25 0 0 1-2.25-2.25v-9.5Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),o.jsx("path",{d:"M8 11.25h8M8 14.75h5.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}function Vst(){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M12 6.5v11M6.5 12h11",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function MG(){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"m7 7 10 10M17 7 7 17",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function LG(){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"m3.5 8.25 2.75 2.75 6.25-6.25",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function il(e){return`${e.environment_id}\0${e.environment_version_id}`}function Ew(e){return e.latestVersion?{environment_id:e.id,environment_version_id:e.latestVersion.versionId}:null}function uA(e,t){return e.environmentIds.flatMap(n=>{const i=t.get(n),r=i?Ew(i):null;return r?[r]:[]})}function Hst({environments:e,workspaces:t,value:n,selectedWorkspaceIds:i,loading:r,error:s,onConfirm:a,onClose:l}){const{t:c}=Oe("workspaceTools"),[u,d]=m.useState(""),[f,h]=m.useState(!1),[p,g]=m.useState(""),b=m.useId(),v=m.useMemo(()=>new Map(e.map(T=>[T.id,T])),[e]),[y,x]=m.useState(()=>new Set(i)),[w,O]=m.useState(()=>{const T=new Set(t.filter(L=>i.includes(L.id)).flatMap(L=>L.environmentIds));return new Set(n.filter(L=>!T.has(L.environment_id)).map(il))}),k=m.useMemo(()=>new Set(t.filter(T=>y.has(T.id)).flatMap(T=>T.environmentIds)),[y,t]),S=m.useMemo(()=>{const T=new Set(w);for(const L of t)if(y.has(L.id))for(const A of uA(L,v))T.add(il(A));return T},[w,y,v,t]),E=m.useMemo(()=>{const T=u.trim().toLocaleLowerCase();return T?e.filter(L=>`${L.name} ${L.description} ${ph(L.language)}`.toLocaleLowerCase().includes(T)):e},[e,u]),C=m.useMemo(()=>{const T=u.trim().toLocaleLowerCase();return T?t.filter(L=>{const A=L.environmentIds.map(R=>{var P;return((P=v.get(R))==null?void 0:P.name)??""}).join(" ");return`${L.name} ${L.description} ${A}`.toLocaleLowerCase().includes(T)}):t},[v,u,t]);m.useEffect(()=>{const T=document.body.style.overflow,L=A=>{A.key==="Escape"&&!f&&l()};return document.body.style.overflow="hidden",document.addEventListener("keydown",L),()=>{document.body.style.overflow=T,document.removeEventListener("keydown",L)}},[l,f]);const N=T=>{const L=Ew(T);if(!L)return;const A=il(L);k.has(T.id)||O(R=>{const P=new Set(R);return P.has(A)?P.delete(A):P.add(A),P})},_=T=>{const L=uA(T,v);L.length!==0&&(x(A=>{const R=new Set(A);return R.has(T.id)?R.delete(T.id):R.add(T.id),R}),O(A=>{const R=new Set(A);for(const P of L)R.delete(il(P));return R}))},j=async()=>{const T=new Map(n.map(A=>[il(A),A])),L=e.flatMap(A=>{const R=Ew(A);if(!R||!S.has(il(R)))return[];const P=T.get(il(R));return[{...R,mount_instance_id:(P==null?void 0:P.mount_instance_id)||crypto.randomUUID()}]});h(!0),g("");try{await a(L,[...y]),l()}catch(A){g(A instanceof Error?A.message:c("sessionEnvironment.mountFailed"))}finally{h(!1)}};return Fi.createPortal(o.jsxs("div",{className:"studio-tool-dialog-layer",children:[o.jsx("button",{type:"button",className:"studio-tool-dialog-scrim","aria-label":c("sessionEnvironment.closeDialog"),disabled:f,onClick:l}),o.jsxs("section",{className:"studio-tool-dialog session-environment-dialog",role:"dialog","aria-modal":"true","aria-labelledby":b,children:[o.jsxs("header",{className:"studio-tool-dialog-head",children:[o.jsx("span",{className:"studio-tool-dialog-mark",children:o.jsx(b6,{})}),o.jsxs("div",{children:[o.jsx("h2",{id:b,children:c("sessionEnvironment.addTitle")}),o.jsx("p",{children:c("sessionEnvironment.description")})]}),o.jsx("button",{type:"button",className:"studio-tool-dialog-close","aria-label":c("sessionEnvironment.closeAdd"),disabled:f,onClick:l,children:o.jsx(Qst,{})})]}),o.jsxs("div",{className:"studio-tool-dialog-body",children:[o.jsxs("label",{className:"studio-tool-search",children:[o.jsx(zst,{}),o.jsx("input",{value:u,"aria-label":c("sessionEnvironment.searchAria"),placeholder:c("sessionEnvironment.searchPlaceholder"),autoFocus:!0,onChange:T=>d(T.target.value)})]}),o.jsx("div",{className:"studio-tool-picker session-environment-picker",role:"group","aria-label":c("sessionEnvironment.availableAria"),children:r?o.jsx("div",{className:"studio-tool-empty",children:c("sessionEnvironment.loading")}):s?o.jsx("div",{className:"studio-tool-empty",children:s}):E.length===0&&C.length===0?o.jsx("div",{className:"studio-tool-empty",children:c("sessionEnvironment.noMatch")}):o.jsxs(o.Fragment,{children:[C.length>0&&o.jsxs("section",{className:"session-environment-picker__group","aria-labelledby":`${b}-workspaces`,children:[o.jsx("h3",{id:`${b}-workspaces`,children:c("sessionEnvironment.workspaces")}),C.map(T=>{const L=uA(T,v),A=y.has(T.id),R=L.length===0;return o.jsxs("label",{className:`studio-tool-option session-environment-option is-workspace${A?" is-selected":""}${R?" is-disabled":""}`,children:[o.jsx("span",{className:"studio-tool-option-icon",children:o.jsx(bwe,{})}),o.jsxs("span",{className:"studio-tool-option-copy",children:[o.jsx("strong",{children:T.name}),o.jsx("span",{children:T.description||c("sessionEnvironment.reuseAll")}),o.jsx("small",{children:c("sessionEnvironment.availableEnvironmentCount",{count:L.length})})]}),o.jsx("input",{type:"checkbox",checked:A,disabled:R,"aria-label":c("sessionEnvironment.selectWorkspace",{name:T.name}),onChange:()=>_(T)}),o.jsx("span",{className:"session-environment-check","aria-hidden":"true",children:o.jsx(LG,{})})]},T.id)})]}),E.length>0&&o.jsxs("section",{className:"session-environment-picker__group","aria-labelledby":`${b}-environments`,children:[o.jsx("h3",{id:`${b}-environments`,children:c("sessionEnvironment.environments")}),E.map(T=>{const L=Ew(T);if(!L)return null;const A=t.filter($=>y.has($.id)&&$.environmentIds.includes(T.id)),R=A.length>0,P=S.has(il(L));return o.jsxs("label",{className:`studio-tool-option session-environment-option${P?" is-selected":""}${R?" is-covered":""}`,children:[o.jsx("span",{className:"studio-tool-option-icon",children:o.jsx(b6,{})}),o.jsxs("span",{className:"studio-tool-option-copy",children:[o.jsx("strong",{children:T.name}),o.jsx("span",{children:R?c("sessionEnvironment.includedByWorkspaces",{names:A.map($=>$.name).join(c("sessionEnvironment.nameSeparator"))}):T.description||ph(T.language)}),o.jsxs("small",{children:[ph(T.language)," · ",L.environment_version_id]})]}),o.jsx("input",{type:"checkbox",checked:P,disabled:R,"aria-label":c("sessionEnvironment.selectEnvironment",{name:T.name}),onChange:()=>N(T)}),o.jsx("span",{className:"session-environment-check","aria-hidden":"true",children:o.jsx(LG,{})})]},il(L))})]})]})})]}),o.jsxs("footer",{className:"session-environment-dialog__footer",children:[o.jsx("span",{className:p?"is-error":"",role:p?"alert":void 0,children:p||c("sessionEnvironment.selectionSummary",{workspaces:c("sessionEnvironment.selectedWorkspaceCount",{count:y.size}),environments:c("sessionEnvironment.coveredEnvironmentCount",{count:S.size})})}),o.jsxs("div",{children:[o.jsx("button",{type:"button",disabled:f,onClick:l,children:c("sessionEnvironment.cancel")}),o.jsx("button",{type:"button",className:"is-primary",disabled:r||f||!!s,onClick:()=>void j(),children:c(f?"sessionEnvironment.mounting":"sessionEnvironment.confirm")})]})]})]})]}),document.body)}function qst({environments:e,workspaces:t,value:n,selectedWorkspaceIds:i,loading:r,disabled:s=!1,error:a="",onChange:l,onRefresh:c}){const{t:u}=Oe("workspaceTools"),[d,f]=m.useState(!1),[h,p]=m.useState(!1),[g,b]=m.useState(""),v=m.useRef(null),y=m.useMemo(()=>new Map(e.flatMap(C=>{const N=Ew(C);return N?[[il(N),C]]:[]})),[e]),x=m.useMemo(()=>new Map(e.map(C=>[C.id,C])),[e]),w=t.filter(C=>i.includes(C.id)),O=new Set(w.flatMap(C=>C.environmentIds)),k=n.filter(C=>!O.has(C.environment_id)),S=()=>{f(!1),requestAnimationFrame(()=>{var C;return(C=v.current)==null?void 0:C.focus()})},E=async(C,N)=>{if(l){p(!0),b("");try{await l(C,N)}catch(_){b(_ instanceof Error?_.message:u("sessionEnvironment.mountFailed"))}finally{p(!1)}}};return o.jsxs("div",{className:"session-environment-select",children:[n.length>0&&o.jsxs("div",{className:"session-environment-list",role:"list","aria-label":u("sessionEnvironment.mountedAria"),children:[w.map(C=>{const N=new Set(uA(C,x).map(_=>_.environment_id));return o.jsxs("div",{className:"session-environment-item is-workspace",role:"listitem",children:[o.jsx("span",{className:"session-environment-item__icon",children:o.jsx(bwe,{})}),o.jsxs("span",{className:"session-environment-item__copy",children:[o.jsx("strong",{children:C.name}),o.jsx("small",{children:u("sessionEnvironment.environmentCount",{count:N.size})})]}),l&&o.jsx("button",{type:"button",className:"topo-remove-capability","aria-label":u("sessionEnvironment.removeWorkspace",{name:C.name}),title:u("sessionEnvironment.remove"),disabled:s||h,onClick:()=>{const _=i.filter(T=>T!==C.id),j=new Set(t.filter(T=>_.includes(T.id)).flatMap(T=>T.environmentIds));E(n.filter(T=>!N.has(T.environment_id)||j.has(T.environment_id)),_)},children:o.jsx(MG,{})})]},`workspace:${C.id}`)}),k.map(C=>{const N=y.get(il(C));return o.jsxs("div",{className:"session-environment-item",role:"listitem",children:[o.jsx("span",{className:"session-environment-item__icon",children:o.jsx(b6,{})}),o.jsxs("span",{className:"session-environment-item__copy",children:[o.jsx("strong",{children:(N==null?void 0:N.name)??C.environment_id}),o.jsx("small",{children:N?ph(N.language):C.environment_version_id})]}),l&&o.jsx("button",{type:"button",className:"topo-remove-capability","aria-label":u("sessionEnvironment.removeEnvironment",{name:(N==null?void 0:N.name)??C.environment_id}),title:u("sessionEnvironment.remove"),disabled:s||h,onClick:()=>void E(n.filter(_=>il(_)!==il(C)),[...i]),children:o.jsx(MG,{})})]},il(C))})]}),l&&o.jsxs("button",{ref:v,type:"button",className:"topo-capability-add-slot","aria-label":u("sessionEnvironment.add"),disabled:s||r||h,onClick:()=>{b(""),f(!0),c==null||c()},children:[o.jsx(Vst,{}),o.jsx("span",{children:n.length>0?u("sessionEnvironment.addMore"):u("sessionEnvironment.addForSession")})]}),g&&o.jsx("p",{className:"is-error",role:"alert",children:g}),(r||a||e.length===0)&&o.jsx("p",{className:a?"is-error":void 0,role:a?"alert":void 0,children:r?u("sessionEnvironment.loadingAvailable"):a||u("sessionEnvironment.empty")}),d&&o.jsx(Hst,{environments:e,workspaces:t,value:n,selectedWorkspaceIds:i,loading:r,error:a,onConfirm:(C,N)=>l==null?void 0:l(C,N),onClose:S})]})}function ywe(e){return 1+e.children.reduce((t,n)=>t+ywe(n),0)}function vwe(e){return e.id||e.name}function Wst(e,t,n){const i=vwe(e);if(e.id&&e.name&&e.name!==i)return e.name;if(t&&i==="agent")return n("agentTopology.mainAgent");const r=/^agent_sub_(\d+)$/.exec(i);return r?n("agentTopology.subAgent",{index:r[1]}):e.name||i}function xwe(e,t,n=!0){return{...e,id:vwe(e),name:Wst(e,n,t),children:e.children.map(i=>xwe(i,t,!1))}}function Owe(e){const t=sc(),n=Xb(e.model);return{...t,name:e.name,description:e.description,instruction:e.instruction||t.instruction,agentType:e.type,modelName:n.modelName,modelProvider:n.modelProvider,tools:e.tools??[],skills:(e.skills??[]).map(i=>i.name),subAgents:e.children.map(Owe)}}function Kst(e){return[...new Set(e.map(t=>t.trim()).filter(Boolean))]}const Gst=new Set(["StudioExternalToolset"]);function Xst(e){return[...new Map(e.filter(t=>t.name.trim()).map(t=>[t.name.trim(),{...t,name:t.name.trim()}])).values()]}function bT({title:e,count:t}){const{t:n}=Oe("workspaceTools");return o.jsxs("div",{className:"topo-module-title",children:[o.jsx("span",{className:"topo-module-label",title:e,children:e}),t!==void 0&&o.jsx("span",{className:"topo-section-count","aria-label":n("agentTopology.itemCount",{count:t}),children:t})]})}function Yst({appName:e,info:t,loading:n,variant:i="rail",studioTools:r=[],selectedStudioToolIds:s=[],managedStudioToolIds:a=[],studioToolsLoading:l=!1,studioToolsDisabled:c=!1,studioToolsUnavailableReason:u="",onStudioToolsChange:d,environments:f=[],workspaces:h=[],selectedEnvironments:p=[],selectedEnvironmentWorkspaceIds:g=[],environmentsLoading:b=!1,environmentsDisabled:v=!1,environmentsError:y="",onEnvironmentsChange:x,onEnvironmentsRefresh:w}){const{t:O}=Oe("workspaceTools"),[k,S]=m.useState(null),[E,C]=m.useState(!1),N=m.useRef(null),_=()=>{C(!1),window.requestAnimationFrame(()=>{var Q;return(Q=N.current)==null?void 0:Q.focus()})};if(m.useEffect(()=>{if(!E)return;const Q=document.body.style.overflow,q=U=>{U.key==="Escape"&&_()};return document.body.style.overflow="hidden",document.addEventListener("keydown",q),()=>{document.body.style.overflow=Q,document.removeEventListener("keydown",q)}},[E]),n&&!t)return o.jsx("aside",{className:`topo is-loading${i==="drawer"?" is-drawer":""}`,"aria-label":O("agentTopology.info"),"aria-live":"polite",children:o.jsx(Tn,{as:"span",className:"topo-loading-label",duration:2.2,children:O("agentTopology.loadingInfo")})});if(!t)return null;const j=yB(t.model),T=xwe(t.graph??{id:t.name,name:t.name,description:t.description,type:t.type??"llm",model:j,tools:t.tools,skills:t.skills,path:[t.name],mentionable:!1,children:[]},O),L=Kst(t.tools).filter(Q=>!Gst.has(Q)).map(Q=>({id:`base:tool:${Q}`,name:Q,label:hwe(Q,O),custom:!1,removable:!1})),A=new Set(L.map(Q=>Q.name)),R=new Set(s),P=new Set(a),$=r.filter(Q=>R.has(Q.id)&&!A.has(Q.id)).map(Q=>({id:`studio:tool:${Q.id}`,name:Q.id,label:Q.name,custom:!0,removable:!P.has(Q.id)})),M=[...L,...$],B=Xst(t.skills),I=!!d,H=Owe(T),X=Q=>o.jsx(DS,{draft:H,direction:"horizontal",selectedPath:[],onSelect:()=>{},onAdd:()=>{},onInsert:()=>{},onDelete:()=>{},readOnly:!0,interactivePreview:!0},Q);return o.jsxs(o.Fragment,{children:[o.jsxs("aside",{className:`topo${i==="drawer"?" is-drawer":""}`,"aria-label":O("agentTopology.infoAndTopology"),children:[o.jsxs("section",{className:"topo-agent-card","aria-label":O("agentTopology.info"),children:[o.jsxs("div",{className:"topo-agent-heading",children:[o.jsx("h2",{title:t.name,children:t.name||O("agentTopology.unnamedAgent")}),j&&o.jsx("span",{title:j,children:j})]}),t.description&&o.jsx("p",{className:"topo-description",title:t.description,children:t.description})]}),o.jsxs("div",{className:"topo-module-stack",children:[o.jsxs("section",{className:"topo-module-card topo-tools-card","aria-label":O("agentTopology.tools"),children:[o.jsx(bT,{title:O("agentTopology.tools"),count:M.length}),o.jsx("div",{className:"topo-module-scroll topo-tools-scroll",role:"region","aria-label":O("agentTopology.toolList"),tabIndex:0,children:M.length>0?o.jsx("div",{className:"topo-tool-list",children:M.map(Q=>o.jsxs("div",{className:"topo-tool",title:Q.name,children:[o.jsxs("span",{className:"topo-capability-title",children:[o.jsxs("span",{className:"topo-capability-copy",children:[o.jsx("span",{className:"topo-capability-name",children:Q.label}),o.jsx("code",{children:Q.name})]}),Q.custom&&o.jsx("span",{className:"topo-custom-badge",children:O("agentTopology.studioTool")})]}),Q.custom&&Q.removable&&o.jsx("button",{type:"button",className:"topo-remove-capability","aria-label":O("agentTopology.removeTool",{name:Q.name}),title:O("agentTopology.remove"),disabled:c,onClick:()=>d==null?void 0:d(s.filter(q=>q!==Q.name)),children:"×"})]},Q.id))}):o.jsx("div",{className:"topo-empty",children:O("agentTopology.notConfigured")})}),I&&o.jsx("div",{className:"topo-capability-add-dock",children:o.jsxs("button",{type:"button",className:"topo-capability-add-slot","aria-label":O("agentTopology.addStudioTool"),disabled:c,onClick:()=>S("tool"),children:[o.jsx("span",{"aria-hidden":"true",children:"+"}),o.jsx("span",{children:O("agentTopology.addStudioToolHere")})]})})]}),o.jsxs("section",{className:"topo-module-card topo-skills-card","aria-label":O("agentTopology.skills"),children:[o.jsx(bT,{title:O("agentTopology.skills"),count:t.skillsPreviewSupported?B.length:void 0}),o.jsx("div",{className:"topo-module-scroll topo-skills-scroll",role:"region","aria-label":O("agentTopology.skillList"),tabIndex:0,children:t.skillsPreviewSupported?B.length>0?o.jsx("div",{className:"topo-skill-list",children:B.map(Q=>o.jsxs("div",{className:"topo-skill",title:Q.description||Q.name,children:[o.jsx("div",{className:"topo-skill-title",children:o.jsx("span",{className:"topo-skill-name",children:Q.name})}),Q.description&&o.jsx("span",{className:"topo-skill-description",children:Q.description})]},`${Q.name}:${Q.description}`))}):o.jsx("div",{className:"topo-empty",children:O("agentTopology.notConfigured")}):o.jsx("div",{className:"topo-empty",children:O("agentTopology.previewUnsupported")})})]}),(x||p.length>0)&&o.jsxs("section",{className:"topo-module-card topo-environment-card","aria-label":O("agentTopology.sessionEnvironment"),children:[o.jsx(bT,{title:O("agentTopology.environment"),count:p.length}),o.jsx(qst,{environments:f,workspaces:h,value:p,selectedWorkspaceIds:g,loading:b,disabled:v,error:y,onChange:x,onRefresh:w})]}),o.jsxs("section",{className:"topo-module-card topo-topology","aria-label":O("agentTopology.agentCanvas"),children:[o.jsxs("div",{className:"topo-canvas-heading",children:[o.jsx(bT,{title:O("agentTopology.topology"),count:ywe(T)}),o.jsx("button",{ref:N,type:"button",className:"topo-canvas-expand","aria-label":O("agentTopology.viewCanvasFullscreen"),title:O("agentTopology.viewFullscreen"),onClick:()=>C(!0),children:o.jsx(Ky,{"aria-hidden":"true"})})]}),o.jsx("div",{className:"topo-canvas-preview",role:"region","aria-label":O("agentTopology.executionCanvas"),children:X(`conversation-canvas:${e}`)})]})]}),k==="tool"&&d&&o.jsx(Pst,{agentName:t.name,tools:r.filter(Q=>!A.has(Q.id)&&!P.has(Q.id)),selectedIds:s,loading:l,disabled:c,unavailableReason:u,onChange:d,onClose:()=>S(null)})]}),E&&Fi.createPortal(o.jsxs("section",{className:"topo-canvas-dialog",role:"dialog","aria-modal":"true","aria-label":O("agentTopology.fullscreenExecutionCanvas"),children:[o.jsxs("header",{className:"topo-canvas-dialog-header",children:[o.jsxs("div",{children:[o.jsx("strong",{children:O("agentTopology.executionCanvas")}),o.jsx("span",{children:t.name})]}),o.jsx("button",{type:"button","aria-label":O("agentTopology.closeFullscreenCanvas"),title:O("agentTopology.close"),onClick:_,autoFocus:!0,children:o.jsx(Ia,{"aria-hidden":"true"})})]}),o.jsx("div",{className:"topo-canvas-dialog-body",children:X(`conversation-canvas-fullscreen:${e}`)})]}),document.body)]})}const aE={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function $G(e){return o.jsxs("svg",{...aE,...e,children:[o.jsx("rect",{x:"3.75",y:"5.25",width:"16.5",height:"13.5",rx:"2"}),o.jsx("path",{d:"m10.25 9 4.8 3-4.8 3V9Z"})]})}function Zst(e){return o.jsxs("svg",{...aE,...e,children:[o.jsx("path",{d:"M12 3.75v10.5M8.4 10.8 12 14.4l3.6-3.6"}),o.jsx("path",{d:"M5 17.25v2h14v-2"})]})}function Jst(e){return o.jsxs("svg",{...aE,...e,children:[o.jsx("path",{d:"M8.75 8.75 6.9 10.6a3.4 3.4 0 0 0 4.8 4.8l1.85-1.85"}),o.jsx("path",{d:"m15.25 15.25 1.85-1.85a3.4 3.4 0 0 0-4.8-4.8l-1.85 1.85"}),o.jsx("path",{d:"m9.4 14.6 5.2-5.2"})]})}function eat(e){return o.jsxs("svg",{...aE,...e,children:[o.jsx("path",{d:"M5 19h3.2L18.6 8.6a1.7 1.7 0 0 0 0-2.4l-.8-.8a1.7 1.7 0 0 0-2.4 0L5 15.8V19Z"}),o.jsx("path",{d:"m13.9 6.9 3.2 3.2M5 15.8 8.2 19"})]})}function wwe(e){return o.jsx("svg",{...aE,...e,children:o.jsx("path",{d:"m6.5 6.5 11 11M17.5 6.5l-11 11"})})}const tat=180,FG=500,dM=10,BG=32;function nat(e){return Array.from(new Set(e.split(/[,,]/).map(t=>t.trim()).filter(Boolean)))}function iat({artifact:e,busy:t,error:n,onClose:i,onSave:r}){const{t:s}=Oe("workspaceTools"),[a,l]=m.useState(e.name),[c,u]=m.useState(e.description??""),[d,f]=m.useState((e.tags??[]).join(",")),[h,p]=m.useState(""),g=m.useId(),b=m.useId(),v=m.useRef(null),y=m.useRef(null),x=m.useRef(t),w=m.useRef(i);m.useEffect(()=>{x.current=t,w.current=i},[t,i]),m.useEffect(()=>{var N,_;const S=document.body.style.overflow,E=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(N=y.current)==null||N.focus(),(_=y.current)==null||_.select();const C=j=>{if(j.key==="Escape"&&!x.current){j.preventDefault(),w.current();return}if(j.key!=="Tab")return;const T=v.current;if(!T)return;const L=Array.from(T.querySelectorAll('button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(P=>P.getClientRects().length>0);if(L.length===0){j.preventDefault();return}const A=L[0],R=L[L.length-1];j.shiftKey&&document.activeElement===A?(j.preventDefault(),R.focus()):!j.shiftKey&&document.activeElement===R&&(j.preventDefault(),A.focus())};return window.addEventListener("keydown",C),()=>{window.removeEventListener("keydown",C),document.body.style.overflow=S,E!=null&&E.isConnected&&E.focus()}},[]);const O=S=>{var N;S.preventDefault();const E=a.trim(),C=nat(d);if(!E){p(s("artifactEdit.nameRequired")),(N=y.current)==null||N.focus();return}if(C.length>dM){p(s("artifactEdit.tooManyTags",{max:dM}));return}if(C.some(_=>_.length>BG)){p(s("artifactEdit.tagTooLong",{max:BG}));return}p(""),r({name:E,description:c.trim(),tags:C})},k=h||n;return Fi.createPortal(o.jsx("div",{className:"artifact-edit-backdrop",onMouseDown:S=>{S.target===S.currentTarget&&!t&&i()},children:o.jsxs("section",{ref:v,className:"artifact-edit-dialog",role:"dialog","aria-modal":"true","aria-labelledby":g,"aria-describedby":b,"aria-busy":t||void 0,children:[o.jsxs("header",{className:"artifact-edit-dialog__header",children:[o.jsxs("div",{children:[o.jsx("h2",{id:g,children:s("artifactEdit.title")}),o.jsx("p",{id:b,children:s("artifactEdit.subtitle")})]}),o.jsx("button",{type:"button",onClick:i,disabled:t,"aria-label":s("artifactEdit.close"),children:o.jsx(wwe,{})})]}),o.jsxs("form",{onSubmit:O,children:[o.jsxs("div",{className:"artifact-edit-dialog__body",children:[o.jsxs("label",{className:"artifact-edit-field",children:[o.jsx("span",{children:s("artifactEdit.name")}),o.jsx("input",{ref:y,value:a,maxLength:tat,disabled:t,"aria-invalid":!!k||void 0,onChange:S=>{l(S.target.value),p("")}})]}),o.jsxs("label",{className:"artifact-edit-field",children:[o.jsx("span",{children:s("artifactEdit.description")}),o.jsx("textarea",{value:c,maxLength:FG,disabled:t,rows:4,placeholder:s("artifactEdit.descriptionPlaceholder"),onChange:S=>u(S.target.value)}),o.jsxs("small",{children:[c.length,"/",FG]})]}),o.jsxs("label",{className:"artifact-edit-field",children:[o.jsx("span",{children:s("artifactEdit.tags")}),o.jsx("input",{value:d,disabled:t,placeholder:s("artifactEdit.tagsPlaceholder",{max:dM}),onChange:S=>{f(S.target.value),p("")}})]}),k?o.jsx("div",{className:"artifact-edit-error",role:"alert",children:k}):null]}),o.jsxs("footer",{className:"artifact-edit-dialog__actions",children:[o.jsx("button",{type:"button",onClick:i,disabled:t,children:s("artifactEdit.cancel")}),o.jsx("button",{type:"submit",className:"is-primary",disabled:t,children:s(t?"artifactEdit.saving":"artifactEdit.save")})]})]})]})}),document.body)}function Swe({label:e,menuLabel:t,items:n,placement:i="bottom-end"}){return o.jsxs(vr,{children:[o.jsx(vr.Trigger,{children:o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"md",iconSize:"sm",uniform:!0,"aria-label":e,title:e,disabled:n.length===0,children:o.jsx(kFe,{"aria-hidden":"true"})})}),o.jsxs(vr.Content,{side:i==="top-end"?"top":"bottom",align:"end",minWidth:148,children:[o.jsx("span",{className:"sr-only",children:t}),n.map(r=>o.jsx(vr.Item,{disabled:r.disabled,onSelect:r.onSelect,children:o.jsx("span",{title:r.title,children:r.label})},r.label))]})]})}const rat="_Alert_1tr02_1",sat="_Content_1tr02_145",aat="_Indicator_1tr02_156",oat="_Message_1tr02_159",lat="_Title_1tr02_162",cat="_Description_1tr02_168",uat="_Actions_1tr02_173",sg={Alert:rat,Content:sat,Indicator:aat,Message:oat,Title:lat,Description:cat,Actions:uat},kb=({color:e="primary",variant:t="outline",title:n,description:i,actions:r,actionsPlacement:s,indicator:a,className:l,actionsClassName:c,ref:u,...d})=>{const f=m.useRef(null),h=m.useRef(null),[p,g]=m.useState("end"),{width:b}=yye({ref:f});return m.useEffect(()=>{var y;const v=((y=h.current)==null?void 0:y.clientWidth)??0;if(v&&b){const x=v>b/3?"bottom":"end";g(x)}},[b]),o.jsxs("div",{ref:Xk([u,f]),className:bi(sg.Alert,l),"data-variant":t,"data-color":e,role:e==="danger"?"alert":void 0,"data-actions-placement":s??p,...d,children:[a===!1?null:o.jsx("div",{className:sg.Indicator,children:a??o.jsx(dat,{color:e})}),o.jsxs("div",{className:sg.Content,children:[o.jsxs("div",{className:sg.Message,children:[n&&o.jsx("div",{className:sg.Title,children:n}),i&&o.jsx("div",{className:sg.Description,children:i})]}),r&&o.jsx("div",{className:bi(sg.Actions,c),ref:h,children:r})]})]})},dat=({color:e})=>{switch(e){case"warning":case"caution":case"danger":return o.jsx(gbe,{});case"success":return o.jsx(fbe,{});default:return o.jsx(hbe,{})}};function fc({title:e,description:t,error:n,confirmLabel:i,cancelLabel:r,closeLabel:s,variant:a="warning",busy:l=!1,onCancel:c,onConfirm:u}){const{t:d}=Oe("shell"),f=r??d("confirm.cancel"),h=s??d("confirm.close"),p=m.useId(),g=m.useId(),b=m.useRef(null),v=m.useRef(l),y=m.useRef(c);return m.useEffect(()=>{v.current=l,y.current=c},[l,c]),m.useEffect(()=>{var k;const x=document.body.style.overflow,w=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(k=b.current)==null||k.focus();const O=S=>{S.key==="Escape"&&!v.current&&y.current()};return window.addEventListener("keydown",O),()=>{document.body.style.overflow=x,window.removeEventListener("keydown",O),w!=null&&w.isConnected&&w.focus()}},[]),Fi.createPortal(o.jsx("div",{className:"studio-confirm-backdrop",onMouseDown:x=>{x.target===x.currentTarget&&!l&&c()},children:o.jsxs("section",{className:`studio-confirm-dialog studio-confirm-dialog--${a}`,role:"alertdialog","aria-modal":"true","aria-labelledby":p,"aria-describedby":g,"aria-busy":l||void 0,children:[o.jsxs("header",{className:"studio-confirm-head",children:[o.jsxs("div",{className:"studio-confirm-title-wrap",children:[o.jsx("span",{className:"studio-confirm-title-icon","aria-hidden":"true",children:o.jsx(gbe,{})}),o.jsx("h2",{id:p,children:e})]}),o.jsx(Ft,{type:"button",className:"studio-confirm-close",color:"secondary",variant:"ghost",size:"lg",uniform:!0,pill:!1,onClick:c,disabled:l,"aria-label":h,children:o.jsx(AF,{})})]}),o.jsxs("div",{className:"studio-confirm-body",children:[o.jsx("p",{id:g,children:t}),n?o.jsx(kb,{className:"studio-confirm-error",color:"danger",variant:"soft",description:n}):null]}),o.jsxs("footer",{className:"studio-confirm-actions",children:[o.jsx(Ft,{ref:b,type:"button",color:"secondary",variant:"ghost",size:"lg",pill:!1,onClick:c,disabled:l,children:f}),o.jsx(Ft,{type:"button",className:"studio-confirm-primary",color:a==="danger"?"danger":"primary",size:"lg",pill:!1,loading:l,onClick:u,disabled:l,children:i})]})]})}),document.body)}const fat="_Container_1a6nz_1",hat="_Input_1a6nz_229",UG={Container:fat,Input:hat},Gr=e=>{const t=m.useRef(null),i=`search-ui-input-${m.useId()}`,{id:r,name:s,type:a="text",variant:l="outline",size:c="md",gutterSize:u,className:d,autoComplete:f,disabled:h=!1,readOnly:p=!1,invalid:g=!1,allowAutofillExtensions:b=a==="password"||!!s||!!f&&f!=="off",onFocus:v,onBlur:y,onAnimationStart:x,onAutofill:w,autoSelect:O,startAdornment:k,endAdornment:S,pill:E,opticallyAlign:C,ref:N,..._}=e,j=R=>{const P=t.current;if(!R.target||!(R.target instanceof Element)||!P||P.contains(R.target)||R.target.closest("button, [type='button'], [role='button'], [role='menuitem']"))return;R.preventDefault(),document.activeElement!==P&&P.focus();const{left:$,top:M}=P.getBoundingClientRect(),{clientX:B,clientY:I}=R,H=I{var R;O&&((R=t.current)==null||R.select())},[O]);const A=R=>{x==null||x(R),R.animationName==="native-autofill-in"&&(w==null||w())};return o.jsxs("div",{className:bi(UG.Container,d),"data-variant":l,"data-size":c,"data-gutter-size":u,"data-focused":T,"data-disabled":h?"":void 0,"data-readonly":p?"":void 0,"data-invalid":g?"":void 0,"data-pill":E?"":void 0,"data-optically-align":C,"data-has-start-adornment":k?"":void 0,"data-has-end-adornment":S?"":void 0,onMouseDown:j,children:[k,o.jsx("input",{..._,ref:Xk([N,t]),id:r||(b?void 0:i),className:UG.Input,type:a,name:s,autoComplete:f,readOnly:p,disabled:h,onFocus:R=>{L(!0),v==null||v(R)},onBlur:R=>{L(!1),y==null||y(R)},onAnimationStart:A,"data-lpignore":b?void 0:!0,"data-1p-ignore":b?void 0:!0}),S]})},pat="_SelectControl_1tyi7_1",mat="_Clear_1tyi7_436",gat="_DropdownIcon_1tyi7_437",bat="_TriggerText_1tyi7_468",yat="_IndicatorWrapper_1tyi7_476",vat="_StartIcon_1tyi7_482",xat="_DropdownIconChevron_1tyi7_534",Oat="_LoadingIndicator_1tyi7_537",Qf={SelectControl:pat,Clear:mat,DropdownIcon:gat,TriggerText:bat,IndicatorWrapper:yat,StartIcon:vat,DropdownIconChevron:xat,LoadingIndicator:Oat},wat=({ref:e,onPointerDown:t,onKeyDown:n,onPointerEnter:i,onInteract:r,invalid:s,disabled:a,children:l,className:c,variant:u="outline",size:d="md",block:f,opticallyAlign:h,pill:p=!0,loading:g,onClearClick:b,selected:v=!1,StartIcon:y,dropdownIconType:x="dropdown",...w})=>{const O=m.useRef(null),S=!!b&&v&&!g&&!a,E=x&&x!=="none"&&!g,C=S||g||E,N=!g&&!a,_=T=>{var L;switch(T.key){case"ArrowDown":case"ArrowUp":case" ":T.stopPropagation(),T.preventDefault(),r?r():(L=O.current)==null||L.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0,pointerType:"mouse"}));break;case"Enter":break;default:n==null||n(T)}},j=T=>{var L;T.button!==2&&(T.stopPropagation(),r?(T.preventDefault(),r()):(t==null||t(T),(L=w.onClick)==null||L.call(w,T)))};return o.jsxs("span",{ref:Xk([O,e]),className:bi(Qf.SelectControl,c),role:"button",tabIndex:a?-1:0,onPointerEnter:T=>{t7(T),i==null||i(T)},onPointerDown:N?j:void 0,onKeyDown:N?_:void 0,"data-variant":u,"data-block":f?"":void 0,"data-pill":p?"":void 0,"data-size":d,"data-optically-align":h,"aria-busy":g?"true":void 0,"data-selected":v,"data-loading":g?"":void 0,"data-invalid":s?"":void 0,"data-disabled":a?"":void 0,"aria-disabled":a,...w,onClick:void 0,children:[y&&o.jsx(y,{className:Qf.StartIcon}),o.jsx("span",{className:Qf.TriggerText,children:l}),C&&o.jsxs("div",{className:Qf.IndicatorWrapper,children:[S&&o.jsx(Ft,{"aria-label":"Clear current value",className:Qf.Clear,onPointerDown:T=>{T.stopPropagation()},onClick:T=>{T.stopPropagation(),T.preventDefault(),b()},color:"secondary",variant:E?"ghost":"solid",size:"3xs",uniform:!0,pill:p,"data-only-child":E?void 0:"",children:o.jsx(AF,{})}),g&&o.jsx(zk,{className:Qf.LoadingIndicator}),E&&o.jsx(Sat,{iconType:x})]})]})},Sat=({iconType:e})=>e==="chevronDown"?o.jsx(vFe,{className:bi(Qf.DropdownIcon,Qf.DropdownIconChevron)}):o.jsx(EFe,{className:Qf.DropdownIcon}),kat="_Menu_n4tw6_3",Eat="_MenuList_n4tw6_5",Cat="_MenuInner_n4tw6_50",Tat="_OptionsList_n4tw6_64",Aat="_Option_n4tw6_64",_at="_PressableInner_n4tw6_111",Nat="_OptionInner_n4tw6_113",jat="_OptionCheck_n4tw6_118",Rat="_OptionIndicatorSlot_n4tw6_123",Iat="_OptionGroupHeading_n4tw6_128",Pat="_OptionHardLimitHeading_n4tw6_140",Dat="_OptionsLimit_n4tw6_147",Mat="_Action_n4tw6_152",Lat="_ActionInner_n4tw6_218",$at="_ActionsContainer_n4tw6_224",Fat="_Search_n4tw6_244",Bat="_SearchEmpty_n4tw6_247",Mr={Menu:kat,MenuList:Eat,MenuInner:Cat,OptionsList:Tat,Option:Aat,PressableInner:_at,OptionInner:Nat,OptionCheck:jat,OptionIndicatorSlot:Rat,OptionGroupHeading:Iat,OptionHardLimitHeading:Pat,OptionsLimit:Dat,Action:Mat,ActionInner:Lat,ActionsContainer:$at,Search:Fat,SearchEmpty:Bat},kwe=m.createContext(null),Hm=()=>{const e=m.use(kwe);if(!e)throw new Error("Select components must be wrapped in ");return e},Vat=({label:e})=>o.jsx(o.Fragment,{children:e}),Hat=({label:e})=>o.jsx(o.Fragment,{children:e}),qat=({values:e,selectedAll:t})=>{const n=t?"All selected":e.length===0?"Select...":e.length===1?e[0].label:`${e.length} selected`;return o.jsx(o.Fragment,{children:n})},Fs=e=>{const{id:t,required:n,value:i,name:r,multiple:s,variant:a="outline",size:l="md",dropdownIconType:c="dropdown",loading:u=!1,clearable:d=!1,disabled:f=!1,placeholder:h="Select...",loadingPlaceholder:p="Loading...",pill:g=!0,listWidth:b,options:v,actions:y=[],side:x="bottom",avoidCollisions:w=!0,onChange:O,optionClassName:k,OptionView:S=Vat,TriggerStartIcon:E,triggerClassName:C,opticallyAlign:N,TriggerView:_,searchPlaceholder:j="",searchPredicate:T=rot,searchEmptyMessage:L="No results found.",listMaxWidth:A="auto"}=e,R=e.block??a!=="ghost",P=e.align??(R?"center":"start"),$=e.alignOffset??(P==="center"?0:-5),M=e.listMinWidth??(R?"auto":300),B=xm((pe,K)=>{if(s){if(!pe.value){O([]);return}if(K){const G=i.filter(fe=>fe!==pe.value),se=b6(v,G);O(se)}else{const G=b6(v,i);O(G.concat(pe))}}else O(pe)}),I=m.useRef(T);I.current=T;const H=m.useMemo(()=>y,[y.length]),X=m.useRef(y);X.current=y;const Q=m.useCallback(pe=>{var K;(K=X.current.find(G=>G.id===pe))==null||K.onSelect(pe)},[]),q=m.useMemo(()=>wB(v)?v.reduce((pe,K)=>pe+K.options.length,0):v.length,[v]),te=`select-trigger-${m.useId()}`,le=q>15,oe=m.useMemo(()=>s?{multiple:!0,value:i,TriggerView:_??qat}:{multiple:!1,value:i,TriggerView:_??Hat},[s,i,_]),re=m.useMemo(()=>({...oe,triggerId:te,id:t,name:r,required:n,options:v,placeholder:h,loadingPlaceholder:p,loading:u,clearable:d,variant:a,pill:g,size:l,dropdownIconType:c,block:R,align:P,alignOffset:$,side:x,avoidCollisions:w,listWidth:b,listMinWidth:M,listMaxWidth:A,searchPlaceholder:j,searchEmptyMessage:L,TriggerStartIcon:E,triggerClassName:C,opticallyAlign:N,optionClassName:k,OptionView:S,actions:H,onActionSelect:Q,onSelectRef:B,searchPredicateRef:I,searchable:le,disabled:f}),[oe,te,t,n,r,v,h,p,u,d,a,g,l,c,R,P,$,x,w,b,M,A,j,L,E,C,N,k,S,H,Q,B,le,f]);return o.jsx(Ewe.Provider,{value:re,children:o.jsx(Kat,{})})},Wat=e=>{const{triggerId:t,id:n,required:i,value:r,multiple:s,options:a,loading:l,disabled:c,clearable:u,name:d,variant:f,pill:h,size:p,dropdownIconType:g,placeholder:b,loadingPlaceholder:v,block:y,opticallyAlign:x,triggerClassName:w,TriggerStartIcon:O,TriggerView:k,onSelectRef:S}=Bm(),{onOpenChange:E,...C}=e,N=s?r[0]:r,_=l?v:b,j=m.useMemo(()=>aot(a,N)||{value:"",label:_},[N,a,_]),T=s?r.length>0:!!r,L=l||!T,A=m.useMemo(()=>jwe(),[]),R=m.useMemo(()=>{if(!s)return{values:[],selectedAll:!1};const M=b6(a,r),B=a.flatMap(I=>"options"in I?I.options:I);return{values:M.length?M:[{value:"",label:_}],selectedAll:B.length<=r.length}},[s,a,r,_]),P=M=>{const B=M.key;if(!s&&Rwe(B)){const I=A(B);M.stopPropagation();const H=Iwe(a,I,N);H&&S.current(H)}},$=()=>{S.current({value:"",label:""}),E==null||E(!1)};return o.jsxs(Eat,{id:t,className:w,selected:!L,variant:f,pill:h,block:y,size:p,disabled:c,loading:l,StartIcon:O,opticallyAlign:x,dropdownIconType:g,onClearClick:u?$:void 0,onInteract:E,onKeyDown:P,...C,children:[s?o.jsx(k,{...R}):o.jsx(k,{...j}),(d||n)&&o.jsx("input",{id:n,name:d,value:N,tabIndex:-1,onFocus:()=>{var M;(M=document.getElementById(t))==null||M.focus()},onChange:()=>{},required:i,className:"sr-only w-full h-0 left-0 bottom-0 pointer-events-none","aria-hidden":"true"})]})},Kat=()=>{const{triggerId:e,loading:t,side:n,align:i,alignOffset:r,avoidCollisions:s,listWidth:a,listMinWidth:l,listMaxWidth:c}=Bm(),[u,d]=m.useState(!1),f=m.useRef(null),h=p=>{const g=p===void 0?!u:p;d(g),g||setTimeout(()=>{var v;if(!f.current)return;const b=document.activeElement;b&&!f.current.contains(b)||(v=document.getElementById(e))==null||v.focus()})};return qk(u,()=>{h(!1)}),o.jsxs(oxe,{open:u,onOpenChange:p=>{t&&p||h(p)},modal:!1,children:[o.jsx(lxe,{asChild:!0,children:o.jsx(Wat,{onOpenChange:h})}),o.jsx(cxe,{forceMount:!0,children:o.jsx(Ix,{className:Dr.Menu,enterDuration:350,exitDuration:200,disableAnimations:!0,children:u&&o.jsx(uxe,{ref:f,forceMount:!0,className:Dr.MenuList,side:n,sideOffset:5,align:i,alignOffset:r,avoidCollisions:s,collisionPadding:{bottom:30,top:30},onOpenAutoFocus:sh,onCloseAutoFocus:sh,onEscapeKeyDown:sh,style:zb({"select-list-width":a,"select-list-min-width":l,"select-list-max-width":c}),children:o.jsx(Gat,{onOpenChange:h})},"dropdown")})})]})},Cwe=m.createContext(null),$x=()=>{const e=m.use(Cwe);if(!e)throw new Error("CustomSelectMenu components must be wrapped in ");return e},Gat=({onOpenChange:e})=>{const{multiple:t,value:n,options:i,searchable:r,searchPredicateRef:s}=Bm(),a=m.useRef(()=>e(!1)),l=m.useRef(null),c=m.useRef(null),u=m.useRef(null),[d,f]=m.useState(""),[h,p]=m.useState(()=>{var N;return((t?n[0]:n)||((N=mT(i))==null?void 0:N.value))??""}),g=m.useMemo(()=>jwe(),[]),v=`select-list-${m.useId()}`,y=m.useRef(t?"":n),x=m.useMemo(()=>d.trim().toLocaleLowerCase(),[d]),w=m.useMemo(()=>sot(i,x,s.current),[i,x,s]),O=m.useMemo(()=>mT(w),[w]),k=m.useRef(!1),S=C=>{const N=C.key,_=t?n[0]:n,j=h||(O==null?void 0:O.value)||_,T=document.activeElement===u.current,L=l.current;if(!L)return;const A=()=>{const $=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,pointerType:"mouse"}),M=Pf(h,L);M==null||M.dispatchEvent($)},R=($,M)=>{p($),M.scrollIntoView({block:"nearest"})},P=()=>{const $=t?n[0]:n;if($){const B=Pf($,L);if(B){R($,B);return}}const M=mT(i);if(M){const B=Pf(M.value,L);B&&R(M.value,B)}};switch(N){case"ArrowDown":{if(C.preventDefault(),!h||!Pf(h,L)){P();return}const $=oot(h,L),M=$==null?void 0:$.getAttribute("data-option-id");$&&M&&R(M,$);return}case"ArrowUp":{if(C.preventDefault(),!h||!Pf(h,L)){P();return}const $=lot(j,L),M=$==null?void 0:$.getAttribute("data-option-id");$&&M&&R(M,$);return}case"Enter":C.preventDefault(),A();return;case" ":if(x&&T)return;C.preventDefault(),A();return}if(Rwe(N)){if(T)return;const $=g(N);C.stopPropagation();const M=Iwe(i,$,h);if(M){const B=Pf(M.value,L);B&&(p(M.value),B.scrollIntoView({block:"nearest"}))}}},E=m.useMemo(()=>({valueRef:y,listId:v,highlightedValue:h,setHighlightedValue:p,requestCloseRef:a,searchTerm:d,setSearchTerm:f,searchInputRef:u,listRef:c}),[v,h,p,d,f]);return m.useEffect(()=>{N_(()=>{if(!l.current)return;const N=Pf(h,l.current);N==null||N.scrollIntoView({block:"center"})});const C=u.current||l.current;return C==null||C.focus({preventScroll:!0}),()=>{k.current=!1}},[]),m.useLayoutEffect(()=>{if(!k.current){k.current=!0;return}if(!c.current)return;c.current.scrollTop=0;const C=mT(w);C&&p(C.value)},[w]),o.jsx(Cwe,{value:E,children:o.jsxs("div",{id:v,className:Dr.MenuInner,onKeyDown:S,ref:l,tabIndex:0,children:[r&&o.jsx(Xat,{value:d,onChange:f}),o.jsx(Yat,{filteredOptions:w}),o.jsx(not,{})]})})},Xat=({value:e,onChange:t})=>{const{searchPlaceholder:n}=Bm(),{listId:i,searchInputRef:r}=$x(),s=a=>{t(a.target.value)};return o.jsx("div",{className:Dr.Search,children:o.jsx(Kr,{startAdornment:o.jsx(MFe,{width:16,height:16,className:"fill-secondary"}),ref:r,value:e,placeholder:n,onChange:s,autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-controls":i,"aria-expanded":!0})})},rE=e=>"options"in e,wB=e=>e[0]&&rE(e[0]),Jy=300,Yat=({filteredOptions:e})=>{const{searchEmptyMessage:t}=Bm(),{listRef:n}=$x();if(!e.length)return typeof t=="string"?o.jsx("p",{className:Dr.SearchEmpty,"data-text-only":!0,children:t}):o.jsx("div",{className:Dr.SearchEmpty,children:t});const i=wB(e),r=!i&&e.length>Jy,s=i?e.map(a=>o.jsx(Jat,{...a},a.label)):e.slice(0,Jy).map(a=>o.jsx(Awe,{...a},a.value));return o.jsxs("div",{className:Dr.OptionsList,ref:n,children:[s,r&&o.jsx(Twe,{numHidden:e.length-Jy})]})},Zat={limit:100,label:"Show all"},Jat=({label:e,options:t,optionsLimit:n=Zat})=>{const i=m.useId(),{searchTerm:r,setHighlightedValue:s}=$x(),[a,l]=m.useState(!1),c=n.limit{l(!0),s(t[n.limit].value)};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:Dr.OptionGroupHeading,children:[o.jsx("div",{className:Dr.OptionIndicatorSlot}),e]}),d.map(h=>o.jsx(Awe,{...h},h.value)),c&&o.jsx(eot,{value:`group-limit-${i}`,label:n.label,onPointerUp:f}),u&&o.jsx(Twe,{numHidden:t.length-Jy})]})},Twe=({numHidden:e})=>o.jsxs("div",{className:Dr.OptionHardLimitHeading,children:[o.jsx("div",{className:Dr.OptionIndicatorSlot}),`…and ${e.toLocaleString()} more options. Use search to refine results further.`]}),eot=({value:e,label:t,onPointerUp:n})=>{const{highlightedValue:i,setHighlightedValue:r}=$x(),s=e===i,a=()=>{s||r(e)},l=()=>{r(c=>c!==e?c:"")};return o.jsx("div",{className:mi(Dr.Option,Dr.OptionsLimit),"data-option-id":e,"data-highlight":s?"":void 0,role:"option","aria-selected":s,onPointerUp:n,onPointerMove:a,onPointerLeave:l,children:o.jsxs("div",{className:mi(Dr.PressableInner,Dr.OptionInner),children:[o.jsx("div",{className:Dr.OptionIndicatorSlot}),t]})})},tot="data-option-id",Awe=e=>{const{optionClassName:t,OptionView:n,value:i,multiple:r,onSelectRef:s}=Bm(),{valueRef:a,requestCloseRef:l,highlightedValue:c,setHighlightedValue:u}=$x(),{value:d,disabled:f,tooltip:h}=e,p=a.current,g=r?i.includes(d):d===p,b=d===c,v=()=>{var w;r?s.current(e,g):(s.current(e),(w=l.current)==null||w.call(l))},y=()=>{b||u(d)},x=()=>{u(w=>w!==d?w:"")};return o.jsx("div",{className:mi(Dr.Option,t),"data-highlight":b?"":void 0,role:"option","aria-selected":b,"data-selected":g?"":void 0,[tot]:d,onPointerUp:f?void 0:v,onPointerMove:f?void 0:y,onPointerLeave:f?void 0:x,"aria-disabled":f,"data-disabled":f?"":void 0,children:o.jsxs("div",{className:Dr.PressableInner,children:[o.jsxs("div",{className:Dr.OptionInner,children:[o.jsx("div",{className:Dr.OptionIndicatorSlot,children:g&&o.jsx(Iv,{className:Dr.OptionCheck})}),o.jsx(n,{...e}),h&&o.jsx($o,{content:h.content,maxWidth:h.maxWidth,side:"right",children:o.jsx(fbe,{})})]}),e.description&&o.jsxs("div",{className:Dr.OptionInner,children:[o.jsx("div",{className:Dr.OptionIndicatorSlot}),e.description]})]})})},not=()=>{const{actions:e}=Bm();return e.length===0?null:o.jsx("div",{className:Dr.ActionsContainer,children:e.map(t=>o.jsx(iot,{...t},t.id))})},iot=({id:e,label:t,Icon:n,className:i})=>{const{onActionSelect:r}=Bm(),{requestCloseRef:s}=$x(),a=c=>{switch(c.key){case"Tab":break;case"Enter":case" ":c.stopPropagation(),l();break;default:c.stopPropagation()}},l=()=>{var c;r(e),(c=s.current)==null||c.call(s)};return o.jsx("div",{className:Dr.Action,onPointerUp:l,onKeyDown:a,tabIndex:0,children:o.jsxs("div",{className:mi(Dr.ActionInner,i),children:[n&&o.jsx(n,{role:"presentation"}),t]})})},rot=(e,t)=>e.label.toLowerCase().includes(t),sot=(e,t,n)=>{const i=t.trim().toLocaleLowerCase();if(!i)return e;const r=s=>n(s,i);return wB(e)?e.reduce((s,a)=>{const l=a.options.filter(r);return l.length&&s.push({...a,options:l}),s},[]):e.reduce((s,a)=>(r(a)&&s.push(a),s),[])},mT=e=>{if(!e.length)return;let t;for(const n of e)if(rE(n)){const i=n.options.find(r=>!r.disabled);if(i){t=i;break}}else if(!n.disabled){t=n;break}return t},aot=(e,t)=>{let n;for(const i of e)if(rE(i)){const r=i.options.find(s=>s.value===t);if(r){n=r;break}}else if(i.value===t){n=i;break}return n},b6=(e,t)=>{let n=[];const i=new Set(t);for(const r of e)if(rE(r)){const s=r.options.filter(a=>i.has(a.value));n=n.concat(s)}else i.has(r.value)&&n.push(r);return n},_we=40,Pf=(e,t)=>t.querySelector(`[data-option-id="${e}"]`),Nwe=e=>e.matches("[data-option-id]:not([data-disabled])"),oot=(e,t)=>{const n=Pf(e,t);let i=n==null?void 0:n.nextElementSibling,r=0;for(;i&&r<_we;){if(Nwe(i))return i;i=i.nextElementSibling,r+=1}},lot=(e,t)=>{const n=Pf(e,t);let i=n==null?void 0:n.previousElementSibling,r=0;for(;i&&r<_we;){if(Nwe(i))return i;i=i.previousElementSibling,r+=1}},jwe=()=>{let e="",t;return n=>(n=n.toLowerCase(),e+=n,t&&clearTimeout(t),t=setTimeout(()=>{e=""},500),n.repeat(e.length)===e?n:e)},Rwe=e=>/^[a-zA-Z0-9]$/.test(e),Iwe=(e,t,n)=>{if(!e.length)return;let i,r,s=!n;const a=({disabled:l,label:c,value:u})=>u===n?(s=!0,!1):!l&&c.toLowerCase().startsWith(t);for(const l of e)if(rE(l)){for(const c of l.options)if(a(c))if(s){r=c;break}else i=i||c}else if(a(l))if(s){r=l;break}else i=i||l;return r||i};function ra(...e){return e.filter(Boolean).join(" ")}const FG=[["14 90% 62%","28 96% 80%","3 44% 24%"],["198 72% 56%","217 88% 79%","189 42% 24%"],["263 66% 63%","291 72% 81%","242 39% 25%"],["146 49% 52%","169 66% 78%","158 38% 23%"],["334 72% 63%","15 87% 80%","350 41% 25%"]];function cot(e){let t=2166136261;for(const a of e)t^=a.charCodeAt(0),t=Math.imul(t,16777619);const n=t>>>0,[i,r,s]=FG[n%FG.length];return{"--resource-identity-accent":i,"--resource-identity-glow":r,"--resource-identity-shadow":s,"--resource-identity-x":`${20+(n>>>7)%61}%`,"--resource-identity-y":`${18+(n>>>15)%57}%`}}function qv({seed:e,className:t}){return o.jsx("span",{className:ra("resource-card__identity-mark",t),style:cot(e),"aria-hidden":"true"})}function uot(e){return o.jsx("svg",{viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",...e,children:o.jsxs("g",{transform:"translate(0.875 0.875)",children:[o.jsx("path",{d:"M5.869 10.719a4.849 4.849 0 1 0 0-9.698 4.849 4.849 0 0 0 0 9.698Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"m11.229 11.229-1.021-1.021",stroke:"currentColor",strokeWidth:"0.984375",strokeLinecap:"round",strokeLinejoin:"round"})]})})}function _h({className:e,...t}){return o.jsx("section",{className:ra("resource-page",e),...t})}function Fx({title:e,description:t,className:n}){return o.jsxs("header",{className:ra("resource-page__header",n),children:[o.jsx("h1",{children:e}),t?o.jsx("p",{children:t}):null]})}function dot({className:e,...t}){return o.jsx("div",{className:ra("resource-detail",e),...t})}function fot({className:e,...t}){return o.jsx("header",{className:ra("resource-detail__header",e),...t})}function hot({title:e,description:t,identitySeed:n,meta:i,backLabel:r,onBack:s}){const{t:a}=xe("ui"),l=r??a("resourceCollection.back");return o.jsxs("div",{className:"resource-detail__heading",children:[s?o.jsx("button",{type:"button",className:"resource-detail__back",onClick:s,"aria-label":l,title:l,children:o.jsx(XFe,{"aria-hidden":"true"})}):null,o.jsxs("div",{className:"resource-detail__heading-copy",children:[o.jsxs("div",{className:"resource-detail__title-row",children:[o.jsx("span",{className:"resource-detail__identity",children:o.jsx(qv,{seed:n})}),o.jsx("h1",{children:e}),i?o.jsx("div",{className:"resource-detail__meta",children:i}):null]}),t?o.jsx("p",{children:t}):null]})]})}function pot({className:e,...t}){return o.jsx("div",{className:ra("resource-detail__actions",e),...t})}function mot({className:e,...t}){return o.jsx("div",{className:ra("resource-detail__body",e),...t})}function sE({title:e,description:t,identitySeed:n,meta:i,backLabel:r,onBack:s,actions:a,className:l,actionsClassName:c,bodyClassName:u,sections:d,activeSectionKey:f,navigationLabel:h,onSectionChange:p,children:g}){var w;const{t:b}=xe("ui"),v=!!(d!=null&&d.length),y=(w=d==null?void 0:d.find(O=>O.key===f))==null?void 0:w.content,x=h??b("resourceCollection.detailNavigation");return o.jsxs(dot,{className:l,children:[o.jsxs(fot,{children:[o.jsx(hot,{title:e,description:t,identitySeed:n,meta:i,backLabel:r,onBack:s}),a?o.jsx(pot,{className:c,children:a}):null]}),o.jsx(mot,{className:ra(v&&"is-split",u),children:v?o.jsxs(o.Fragment,{children:[o.jsx("nav",{className:"resource-detail__navigation","aria-label":x,children:d==null?void 0:d.map(O=>o.jsx($t,{type:"button",color:"secondary",variant:O.key===f?"soft":"ghost",size:"lg",pill:!1,block:!0,"aria-current":O.key===f?"page":void 0,disabled:O.disabled,onClick:()=>p==null?void 0:p(O.key),children:o.jsx("span",{className:"resource-detail__navigation-label",children:O.label})},O.key))}),o.jsx("div",{className:"resource-detail__content",children:y})]}):g})]})}function SB({className:e,...t}){return o.jsx("dl",{className:ra("resource-detail__summary",e),...t})}function Pwe({title:e,description:t,actions:n,className:i}){return o.jsxs("header",{className:ra("resource-detail__section-header",i),children:[o.jsxs("div",{children:[o.jsx("h2",{children:e}),t?o.jsx("p",{children:t}):null]}),n]})}function got({rows:e,rowKey:t,rowLabel:n,columns:i,searchValue:r,onSearchChange:s,searchPlaceholder:a,searchLabel:l,primaryAction:c,rowActions:u,scrollRef:d,onScroll:f,busy:h,footer:p,emptyLabel:g}){const{t:b}=xe("ui"),v=!!u,y=g??b("resourceCollection.noData");return o.jsxs("div",{className:"resource-data-table",children:[o.jsxs("div",{className:"resource-data-table__toolbar",children:[o.jsx("div",{className:"resource-data-table__search",children:o.jsx(Kr,{type:"search",value:r,onChange:x=>s(x.target.value),placeholder:a,"aria-label":l})}),c?o.jsx($t,{type:"button",color:"primary",disabled:c.disabled,title:c.title,onClick:c.onClick,children:c.label}):null]}),o.jsxs("div",{ref:d,className:"resource-data-table__frame","aria-busy":h||void 0,onScroll:f,children:[o.jsxs("table",{className:"resource-data-table__table",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[i.map(x=>o.jsx("th",{scope:"col",className:x.className,children:x.header},x.key)),v?o.jsx("th",{scope:"col",className:"resource-data-table__actions-heading",children:o.jsx("span",{className:"sr-only",children:b("resourceCollection.actions")})}):null]})}),o.jsx("tbody",{children:e.length===0?o.jsx("tr",{children:o.jsx("td",{className:"resource-data-table__empty",colSpan:i.length+(v?1:0),children:y})}):e.map(x=>{const w=t(x),O=(n==null?void 0:n(x))??w;return o.jsxs("tr",{children:[i.map(k=>o.jsx("td",{className:k.className,children:k.render(x)},k.key)),u?o.jsx("td",{className:"resource-data-table__actions",children:o.jsx(kwe,{label:b("resourceCollection.moreActions",{label:O}),menuLabel:b("resourceCollection.actionsFor",{label:O}),items:u(x)})}):null]},w)})})]}),p]})]})}function Kb({className:e,...t}){return o.jsx("div",{className:ra("resource-toolbar",e),...t})}function aE({items:e,value:t,onChange:n,ariaLabel:i,idPrefix:r,className:s}){const a=c=>{c.disabled||n(c.id)},l=(c,u)=>{var g;if(!["ArrowLeft","ArrowRight","Home","End"].includes(c.key))return;c.preventDefault();const d=e.filter(b=>!b.disabled),f=d.findIndex(b=>b.id===u.id),h=c.key==="Home"?0:c.key==="End"?d.length-1:(f+(c.key==="ArrowRight"?1:-1)+d.length)%d.length,p=d[h];p&&(n(p.id),(g=document.getElementById(`${r}-${p.id}-tab`))==null||g.focus())};return o.jsx("nav",{className:ra("resource-tabs",s),"aria-label":i,role:"tablist",children:e.map(c=>o.jsx("button",{type:"button",id:`${r}-${c.id}-tab`,className:t===c.id?"is-active":void 0,role:"tab","aria-selected":t===c.id,"aria-controls":c.panelId,tabIndex:t===c.id?0:-1,disabled:c.disabled,onClick:()=>a(c),onKeyDown:u=>l(u,c),children:c.label},c.id))})}function Om({className:e,...t}){return o.jsxs("label",{className:ra("resource-search",e),children:[o.jsx(uot,{}),o.jsx("input",{type:"search",...t})]})}const bot=150,yot=200;function BG(e){e.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0,pointerType:"mouse",button:0}))}function J_({id:e,ariaLabel:t,value:n,options:i,onChange:r,className:s,disabled:a=!1}){const l=m.useRef(null),c=m.useRef(null),u=m.useRef(null),d=m.useRef(!1),f=m.useCallback(()=>{c.current!==null&&(window.clearTimeout(c.current),c.current=null)},[]),h=m.useCallback(()=>{u.current!==null&&(window.clearTimeout(u.current),u.current=null)},[]),p=m.useCallback(()=>{var y;return((y=l.current)==null?void 0:y.querySelector(".resource-filter-select__trigger"))??null},[]),g=m.useCallback(()=>{h();const y=p();d.current&&(y==null?void 0:y.getAttribute("data-state"))==="open"&&BG(y),d.current=!1},[h,p]),b=m.useCallback(()=>{d.current&&(h(),u.current=window.setTimeout(g,yot))},[h,g]),v=m.useCallback(y=>{var O;if(a||!window.matchMedia("(hover: hover) and (pointer: fine)").matches)return;h();const x=p();if(!x||x.getAttribute("data-state")==="open")return;const w=document.activeElement;w instanceof HTMLElement&&w!==x&&!((O=l.current)!=null&&O.contains(w))&&w.matches("input, textarea, [contenteditable='true']")||(f(),c.current=window.setTimeout(()=>{const k=p();!k||k.getAttribute("data-state")==="open"||(d.current=!0,BG(k))},bot))},[h,f,a,p]);return m.useEffect(()=>{const y=x=>{var E;if(!d.current)return;const w=p();if(!w||w.getAttribute("data-state")!=="open"){d.current=!1,h();return}const O=x.target;if(!(O instanceof Node))return;const k=w.getAttribute("aria-controls"),S=k?document.getElementById(k):null;if((E=l.current)!=null&&E.contains(O)||S!=null&&S.contains(O)){h();return}b()};return document.addEventListener("pointermove",y,{passive:!0}),()=>{document.removeEventListener("pointermove",y),f(),h()}},[h,f,p,b]),o.jsxs("div",{ref:l,className:ra("resource-filter-select",s),onMouseEnter:v,onMouseLeave:()=>{f(),b()},children:[o.jsx("label",{className:"sr-only",htmlFor:e,children:t}),o.jsx(Fs,{id:e,value:n,options:i,size:"md",variant:"ghost",pill:!1,block:!1,align:"end",listMinWidth:160,disabled:a,triggerClassName:"resource-filter-select__trigger",onChange:y=>r(y.value)})]})}const Gb=m.forwardRef(function({className:t,...n},i){return o.jsx("section",{ref:i,className:ra("resource-results",t),...n})});function Vd(){const{t:e}=xe("ui");return o.jsxs("div",{className:"resource-loading-state",role:"status","aria-live":"polite","aria-busy":"true",children:[o.jsx(Bk,{size:16}),o.jsx(En,{as:"span",duration:2.4,children:e("resourceCollection.loading")})]})}function Bx({className:e,...t}){return o.jsx("div",{className:ra("resource-grid",e),...t})}function kB({className:e,footer:t,actions:n,activateLabel:i,onActivate:r,children:s,...a}){return o.jsxs("article",{className:ra("resource-card",r&&"is-interactive",e),...a,children:[r&&i?o.jsx("button",{type:"button",className:"resource-card__target","aria-label":i,title:i,onClick:r}):null,o.jsx("div",{className:"resource-card__content",children:s}),t||n?o.jsxs("footer",{className:"resource-card__footer",children:[t,n?o.jsx("div",{className:"resource-card__actions",children:n}):null]}):null]})}function y6({className:e,iconOnly:t=!1,tone:n="secondary",...i}){return o.jsx("button",{type:"button",className:ra("resource-card__action",`is-${n}`,t&&"is-icon-only",e),...i})}function v6({label:e,icon:t="arrow",tone:n="primary",className:i,children:r,title:s,...a}){const l=t==="play"?o.jsx(PFe,{}):t==="plus"?o.jsx(pbe,{}):o.jsx(bFe,{});return o.jsx(y6,{className:i,iconOnly:!0,tone:n,"aria-label":e,title:s??e,...a,children:r??l})}function EB({leading:e,title:t,titleText:n,subtitle:i,status:r}){return o.jsxs("div",{className:"resource-card__header",children:[o.jsxs("div",{className:"resource-card__identity",children:[e,o.jsxs("div",{className:"resource-card__title-copy",children:[o.jsx("h3",{title:n,children:t}),i]})]}),r]})}function CB({children:e,title:t}){return o.jsx("p",{className:"resource-card__description",title:t,children:e})}function Dwe({items:e,className:t}){return o.jsx("dl",{className:ra("resource-card__metadata",t),children:e.map((n,i)=>o.jsxs("div",{className:n.className,children:[o.jsx("dt",{className:n.hideLabel?"sr-only":void 0,children:n.label}),o.jsx("dd",{title:n.title,children:n.value})]},`${String(n.label)}:${i}`))})}function wb({className:e,icon:t,children:n,...i}){return o.jsxs("button",{type:"button",className:ra("resource-create-card",e),...i,children:[o.jsx("span",{className:"resource-create-card__icon","aria-hidden":"true",children:t}),o.jsx("span",{children:n})]})}const vot=new Set(["avif","bmp","gif","heic","jpeg","jpg","png","svg","tif","tiff","webp"]),xot=new Set(["avi","m4v","mkv","mov","mp4","mpeg","mpg","webm"]),Oot=new Set(["csv","htm","html","json","md","pdf","svg","txt","xml","yaml","yml"]);function Mwe(e){const t=e.lastIndexOf(".");return t<0?"":e.slice(t+1).toLocaleLowerCase()}function eN(e,t){if(!Number.isFinite(e))return t;const n=e;return n>1e10?n:n*1e3}function wot(e){var t,n;return((t=e.actions)==null?void 0:t.artifactDelta)??((n=e.actions)==null?void 0:n.artifact_delta)}function Sot(e){return`${e.replace(/\.pptx$/i,"")}.preview.webp`}function kot(e){var t;return(((t=e.content)==null?void 0:t.parts)??[]).map(n=>n.functionResponse??n.function_response).filter(n=>!!n)}function Eot(e){if(!e)return{};const t=e.result;return t&&typeof t=="object"&&!Array.isArray(t)?t:e}function UG(e,t,n){var i;if(/\.[A-Za-z0-9]{2,8}$/.test(e))return e;try{const r=new URL(t).pathname.split("/").filter(Boolean),a=((i=(r[r.length-1]??"").match(/\.[A-Za-z0-9]{2,8}$/))==null?void 0:i[0])??"";if(a)return`${e}${a}`}catch{}return`${e}.${n==="image"?"png":"mp4"}`}function Cot(e,t){const n=Eot(t),i=e==="image_generate"||e.endsWith("_image_generate"),r=["video_generate","video_task_query"].some(u=>e===u||e.endsWith(`_${u}`));if(!i&&!r)return[];const s=i?"image":"video",a=[],l=n.success_list;if(Array.isArray(l)){for(const u of l)if(!(!u||typeof u!="object"||Array.isArray(u)))for(const[d,f]of Object.entries(u))typeof f=="string"&&f.startsWith("https://")&&a.push({name:UG(d,f,s),url:f,type:s})}const c=n.video_url;if(r&&typeof c=="string"&&c.startsWith("https://")){const u=typeof n.task_id=="string"?n.task_id:void 0;a.push({name:UG(u||"generated-video",c,s),url:c,type:s,taskId:u})}return a}function QG(e,t){return new Date(eN(e,t)||Date.now()).toISOString()}function Tot(e,t){var r;const n=[],i=new Set;for(const s of e)for(const a of s.sessions){const l=eN(a.lastUpdateTime,Date.now()),c=eR(a.events,t);for(const u of a.events??[])for(const d of kot(u)){const f=(d==null?void 0:d.name)??"";for(const h of Cot(f,d==null?void 0:d.response)){const p=`${a.id}:${u.id??""}:${f}:${h.url}`;i.has(p)||(i.add(p),n.push({sourceUrl:h.url,name:h.name,mimeType:h.type==="image"?"image/png":"video/mp4",appName:s.appName,agentId:s.agentId,agentName:((r=s.agentName)==null?void 0:r.trim())||s.appName,sessionId:a.id,sessionTitle:c,sessionUpdatedAt:QG(a.lastUpdateTime,l),createdAt:QG(u.timestamp,l),origin:{runtimeId:s.runtimeId,region:s.region,eventId:u.id,invocationId:u.invocationId??u.invocation_id,toolName:f,taskId:h.taskId}}))}}}return n}function Lwe(e){const t=Mwe(e);return vot.has(t)?"image":xot.has(t)?"video":"document"}function Aot(e){const t=Lwe(e);return t==="image"?"image":t==="video"?"video":Oot.has(Mwe(e))?"frame":"unavailable"}function _ot(e,t,n="en-US"){var r;const i=[];for(const s of e)for(const a of s.sessions){const l=eN(a.lastUpdateTime,0),c=new Map;for(const u of a.events??[]){const d=wot(u);if(!d)continue;const f=eN(u.timestamp,l);for(const[h,p]of Object.entries(d)){if(!h||!Number.isFinite(p))continue;const g=c.get(h);(!g||p>=g.version)&&c.set(h,{filename:h,version:p,createdAt:f})}}for(const u of c.values()){if(/\.preview\.webp$/i.test(u.filename))continue;const d=c.get(Sot(u.filename)),f=d??u,h=d?"image":Aot(u.filename);i.push({id:`${s.appName}:${a.id}:${u.filename}:${u.version}`,appName:s.appName,agentId:s.agentId,sessionId:a.id,sessionTitle:eR(a.events,t),agentName:((r=s.agentName)==null?void 0:r.trim())||s.appName,sessionUpdatedAt:l,name:u.filename,version:u.version,type:Lwe(u.filename),createdAt:u.createdAt||l,origin:{runtimeId:s.runtimeId,region:s.region},preview:{filename:f.filename,version:f.version,mode:h}})}}return i.sort((s,a)=>a.createdAt-s.createdAt||s.name.localeCompare(a.name,n))}function $we(e,t,n){if(!e)return n;const i=new Date(e);if(Number.isNaN(i.getTime()))return n;const r=new Date;return i.getFullYear()===r.getFullYear()&&i.getMonth()===r.getMonth()&&i.getDate()===r.getDate()?new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(i):new Intl.DateTimeFormat(t,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(i)}function Fwe(e){return!e||e<=0?"":e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(e<10*1024*1024?1:0)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`}const uM=40;function Not(e){return[{value:"all",label:e("artifactLibrary.types.all")},{value:"document",label:e("artifactLibrary.types.document")},{value:"image",label:e("artifactLibrary.types.image")},{value:"video",label:e("artifactLibrary.types.video")}]}function jot(e,t){return e(`artifactLibrary.types.${t}`)}function gT(e){return e instanceof Error?e.message:String(e)}function Bwe({artifact:e,large:t=!1}){return o.jsx("div",{className:`library-artifact-preview library-artifact-preview--${e.type}${t?" is-large":""}`,children:e.thumbnailUrl?o.jsxs(o.Fragment,{children:[o.jsx("img",{className:"library-artifact-preview-media",src:e.thumbnailUrl,alt:"",loading:"lazy"}),e.type==="video"?o.jsx("span",{className:"artifact-video-play is-overlay","aria-hidden":"true",children:o.jsx(DG,{})}):null]}):e.type==="document"?o.jsxs("div",{className:"artifact-document-sheet","aria-hidden":"true",children:[o.jsx("span",{className:"is-title"}),o.jsx("span",{}),o.jsx("span",{}),o.jsx("span",{className:"is-short"})]}):e.type==="image"?o.jsxs("div",{className:"artifact-image-scene","aria-hidden":"true",children:[o.jsx("span",{className:"artifact-image-sun"}),o.jsx("span",{className:"artifact-image-plane artifact-image-plane--back"}),o.jsx("span",{className:"artifact-image-plane artifact-image-plane--front"})]}):o.jsxs("div",{className:"artifact-video-frame","aria-hidden":"true",children:[o.jsx("span",{className:"artifact-video-orbit"}),o.jsx("span",{className:"artifact-video-node artifact-video-node--one"}),o.jsx("span",{className:"artifact-video-node artifact-video-node--two"}),o.jsx("span",{className:"artifact-video-play",children:o.jsx(DG,{})})]})})}function Rot({artifact:e,pendingAction:t,disabled:n,onPreview:i,onDownload:r,onEdit:s,onDelete:a,onOpenSource:l,t:c,locale:u}){const d=t===`download:${e.id}`;return o.jsxs("tr",{className:"library-artifact-row",children:[o.jsx("td",{className:"library-artifact-file",children:o.jsxs("button",{type:"button",className:"library-artifact-preview-trigger","aria-label":c("artifactLibrary.previewArtifact",{name:e.name}),disabled:n||!!t,onClick:()=>i(e),children:[o.jsx("div",{className:"library-artifact-thumbnail",children:o.jsx(Bwe,{artifact:e})}),o.jsxs("div",{className:"library-artifact-row-title",children:[o.jsx("span",{className:"library-artifact-row-name",title:e.name,children:e.name}),o.jsx("span",{className:"library-artifact-row-size",children:Fwe(e.sizeBytes)||"—"})]})]})}),o.jsx("td",{className:"library-artifact-source-cell",children:l?o.jsxs("button",{type:"button",className:"library-artifact-source-link",title:`${e.agentName} / ${e.sessionTitle}`,onClick:()=>l(e),children:[o.jsx("span",{children:e.agentName}),o.jsx("span",{"aria-hidden":"true",children:"/"}),o.jsx("span",{children:e.sessionTitle})]}):o.jsxs("span",{title:`${e.agentName} / ${e.sessionTitle}`,children:[e.agentName," / ",e.sessionTitle]})}),o.jsx("td",{className:"library-artifact-time",children:$we(e.updatedAt??e.createdAt,u,c("artifactLibrary.unknownTime"))}),o.jsx("td",{className:"library-artifact-actions-cell",children:o.jsx("div",{className:"library-artifact-actions",children:o.jsx(kwe,{label:c("artifactLibrary.moreActions",{name:e.name}),menuLabel:c("artifactLibrary.actionMenu",{name:e.name}),placement:"bottom-end",items:[{label:c(d?"artifactLibrary.downloading":"artifactLibrary.download"),onSelect:()=>r(e),disabled:n||!!t},...s?[{label:c("artifactLibrary.edit"),onSelect:()=>s(e),disabled:n||!!t||e.canManage===!1}]:[],...a?[{label:c("artifactLibrary.delete"),onSelect:()=>a(e),disabled:n||!!t||e.canManage===!1,danger:!0}]:[]]})})})]})}function Iot({sources:e=[],items:t,userId:n="",active:i=!0,activationRevision:r=0,loading:s=!1,error:a="",onRetry:l,onEdit:c,onDelete:u,onDownload:d,onOpenSource:f,region:h,toolbarLeading:p,toolbarFilters:g}){var Ct,je;const{t:b,i18n:v}=xe("workspaceTools"),y=v.resolvedLanguage||v.language,[x,w]=m.useState("all"),[O,k]=m.useState(""),[S,E]=m.useState(null),[C,N]=m.useState(""),[_,j]=m.useState(""),[T,L]=m.useState(""),[A,R]=m.useState(""),[P,$]=m.useState({}),[M,B]=m.useState(()=>new Set),[I,H]=m.useState(null),[X,Q]=m.useState(!1),[q,U]=m.useState(""),[te,le]=m.useState(null),[oe,re]=m.useState(!1),[pe,K]=m.useState(uM),G=m.useRef(null),se=m.useRef(null),fe=m.useRef(0),Se=m.useRef(null),Te=m.useRef(null),rt=m.useRef(!1),Be=m.useCallback(()=>{fe.current+=1,E(null),N(""),j("")},[]),Me=m.useMemo(()=>t?[...t]:_ot(e,b("library.untitledSession"),y),[t,y,e,b]),Ie=m.useMemo(()=>Me.filter(ve=>!M.has(ve.id)).map(ve=>P[ve.id]??ve),[Me,P,M]);m.useEffect(()=>()=>{fe.current+=1},[]),m.useEffect(()=>()=>{C&&URL.revokeObjectURL(C)},[C]),m.useEffect(()=>{var Ae;if(!S)return;const ve=document.activeElement,He=document.body.style.overflow;document.body.style.overflow="hidden",(Ae=G.current)==null||Ae.focus();const it=Wt=>{if(Wt.key==="Escape"){Wt.preventDefault(),Be();return}if(Wt.key!=="Tab")return;const mn=se.current;if(!mn)return;const qt=Array.from(mn.querySelectorAll('button:not([disabled]), video[controls], iframe, [tabindex]:not([tabindex="-1"])')).filter(at=>at.getClientRects().length>0);if(qt.length===0){Wt.preventDefault();return}const xt=qt[0],Nt=qt[qt.length-1];Wt.shiftKey&&document.activeElement===xt?(Wt.preventDefault(),Nt.focus()):!Wt.shiftKey&&document.activeElement===Nt&&(Wt.preventDefault(),xt.focus())};return document.addEventListener("keydown",it),()=>{document.removeEventListener("keydown",it),document.body.style.overflow=He,ve!=null&&ve.isConnected&&ve.focus()}},[Be,S]);const qe=async ve=>{const He=fe.current+1;if(fe.current=He,L(""),N(""),E(ve),ve.preview.mode!=="unavailable"){if(ve.contentUrl){N(ve.contentUrl);return}j(`preview:${ve.id}`);try{const it=await QF(ve.appName,n,ve.sessionId,ve.preview.filename,ve.preview.version);if(fe.current!==He){URL.revokeObjectURL(it);return}N(it)}catch(it){fe.current===He&&L(b("artifactLibrary.previewFailed",{name:ve.name,message:gT(it)}))}finally{fe.current===He&&j("")}}},Pe=async ve=>{L(""),j(`download:${ve.id}`);try{d?await d(ve):await UF(ve.appName,n,ve.sessionId,ve.name,ve.version),R(b("artifactLibrary.downloadStarted",{name:ve.name}))}catch(He){L(b("artifactLibrary.downloadFailed",{name:ve.name,message:gT(He)}))}finally{j("")}},Ve=async ve=>{if(!(!I||!c)){Q(!0),U("");try{const it=await c(I,ve)??{...I,...ve,updatedAt:Date.now()};$(Ae=>({...Ae,[I.id]:it})),R(b("artifactLibrary.updated",{name:it.name})),H(null)}catch(He){U(gT(He))}finally{Q(!1)}}},ke=async()=>{if(!(!te||!u)){re(!0),L("");try{await u(te),B(ve=>new Set([...ve,te.id])),R(b("artifactLibrary.deleted",{name:te.name})),(S==null?void 0:S.id)===te.id&&Be(),le(null)}catch(ve){L(b("artifactLibrary.deleteFailed",{name:te.name,message:gT(ve)})),le(null)}finally{re(!1)}}},Le=m.useMemo(()=>{const ve=O.trim().toLocaleLowerCase();return Ie.filter(He=>{var it;return(it=He.origin)!=null&&it.region&&He.origin.region!==h||x!=="all"&&He.type!==x?!1:ve?[He.name,He.sessionTitle,He.agentName].some(Ae=>Ae.toLocaleLowerCase().includes(ve)):!0})},[x,Ie,O,h]),Y=m.useMemo(()=>Le.slice(0,pe),[Le,pe]),he=pe{rt.current||(rt.current=!0,K(ve=>ve+uM))},[]);m.useEffect(()=>{K(uM)},[r,x,O,Le.length]),m.useEffect(()=>{rt.current=!1},[pe]),m.useEffect(()=>{const ve=Te.current,He=Se.current;if(!i||!ve||!He||!he)return;const it=new IntersectionObserver(([Ae])=>{Ae.isIntersecting&&Oe()},{root:He,rootMargin:"240px 0px",threshold:.01});return it.observe(ve),()=>it.disconnect()},[i,he,Oe,pe]);const Ke=()=>{const ve=Se.current;!i||!ve||!he||ve.scrollHeight-ve.scrollTop-ve.clientHeight<=240&&Oe()},et=!!O.trim()||x!=="all"||Ie.some(ve=>{var He;return((He=ve.origin)==null?void 0:He.region)&&ve.origin.region!==h});return o.jsxs("div",{className:"artifact-library-page resource-collection",children:[o.jsxs(Kb,{className:"artifact-library-toolbar library-resource-toolbar",children:[p,o.jsxs("div",{className:"resource-toolbar__actions",children:[o.jsx(J_,{id:"artifact-type-filter",ariaLabel:b("artifactLibrary.typeFilter"),value:x,options:Not(b),onChange:w}),g,o.jsx(Om,{"aria-label":b("artifactLibrary.searchAria"),value:O,onChange:ve=>k(ve.target.value),placeholder:b("artifactLibrary.searchPlaceholder")})]})]}),a&&Ie.length>0?o.jsxs("div",{className:"artifact-library-banner",role:"alert",children:[o.jsx("span",{children:a}),l?o.jsx("button",{type:"button",onClick:l,children:b("artifactLibrary.retry")}):null]}):null,T?o.jsxs("div",{className:"artifact-library-banner",role:"alert",children:[o.jsx("span",{children:T}),o.jsx("button",{type:"button",onClick:()=>L(""),children:b("artifactLibrary.close")})]}):null,o.jsx(Gb,{ref:Se,className:"artifact-library-results","aria-label":b("artifactLibrary.listAria"),onScroll:Ke,children:o.jsxs("div",{className:"artifact-library-panel",children:[s&&Ie.length===0?o.jsx(Vd,{}):a&&Ie.length===0?o.jsxs("div",{className:"artifact-library-empty is-error",role:"alert",children:[o.jsx("p",{children:b("artifactLibrary.loadFailed")}),o.jsx("span",{children:a}),l?o.jsx("button",{type:"button",onClick:l,children:b("artifactLibrary.reload")}):null]}):Le.length===0?o.jsxs("div",{className:"artifact-library-empty",children:[o.jsx("p",{children:b(et?"artifactLibrary.noMatch":"artifactLibrary.noArtifacts")}),o.jsx("span",{children:b(et?"artifactLibrary.searchHint":"artifactLibrary.emptyHint")})]}):o.jsx("div",{className:"artifact-library-list",children:o.jsxs("table",{className:"artifact-library-table",children:[o.jsxs("colgroup",{children:[o.jsx("col",{className:"artifact-library-table__file-column"}),o.jsx("col",{className:"artifact-library-table__source-column"}),o.jsx("col",{className:"artifact-library-table__time-column"}),o.jsx("col",{className:"artifact-library-table__actions-column"})]}),o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:b("artifactLibrary.columns.name")}),o.jsx("th",{scope:"col",children:b("artifactLibrary.columns.source")}),o.jsx("th",{scope:"col",children:b("artifactLibrary.columns.updatedAt")}),o.jsx("th",{scope:"col",className:"artifact-library-table__actions-heading",children:b("artifactLibrary.columns.actions")})]})}),o.jsx("tbody",{children:Y.map(ve=>o.jsx(Rot,{artifact:ve,pendingAction:_,disabled:!n&&!t,onPreview:He=>void qe(He),onDownload:He=>void Pe(He),onEdit:c?He=>{U(""),H(He)}:void 0,onDelete:u?le:void 0,onOpenSource:f,t:b,locale:y},ve.id))})]})}),he?o.jsx("div",{ref:Te,className:"artifact-library-load-more",role:"status","aria-live":"polite",children:o.jsx(En,{as:"span",duration:2.4,children:b("artifactLibrary.loadingMore")})}):null]})}),o.jsx("p",{className:"artifact-library-status","aria-live":"polite",children:A}),S?o.jsxs("div",{className:"artifact-library-preview-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"artifact-library-preview-title",children:[o.jsx("button",{type:"button",className:"artifact-library-preview-backdrop","aria-label":b("artifactLibrary.preview.close"),onClick:Be}),o.jsxs("div",{ref:se,className:"artifact-library-preview-panel",children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h2",{id:"artifact-library-preview-title",children:S.name}),o.jsx("p",{children:b("artifactLibrary.preview.meta",{type:jot(b,S.type),version:S.version})})]}),o.jsx("button",{ref:G,type:"button","aria-label":b("artifactLibrary.preview.close"),onClick:Be,children:o.jsx(Swe,{})})]}),o.jsxs("div",{className:"artifact-library-preview-content",children:[o.jsx("div",{className:"artifact-library-preview-canvas",children:_===`preview:${S.id}`?o.jsx(En,{as:"span",duration:2.4,children:b("artifactLibrary.preview.loading")}):C&&S.preview.mode==="image"?o.jsx("img",{src:C,alt:b("artifactLibrary.preview.alt",{name:S.name})}):C&&S.preview.mode==="video"?o.jsx("video",{src:C,controls:!0,"aria-label":b("artifactLibrary.preview.alt",{name:S.name})}):C&&S.preview.mode==="frame"?o.jsx("iframe",{src:C,title:b("artifactLibrary.preview.alt",{name:S.name})}):o.jsxs("div",{className:"artifact-library-preview-unavailable",children:[o.jsx(Bwe,{artifact:S,large:!0}),o.jsx("p",{children:b(T?"artifactLibrary.preview.loadFailed":"artifactLibrary.preview.unsupported")})]})}),o.jsxs("aside",{className:"artifact-library-preview-details","aria-label":b("artifactLibrary.preview.sourceAria"),children:[S.description?o.jsx("p",{className:"artifact-library-preview-description",children:S.description}):null,o.jsxs("dl",{children:[o.jsxs("div",{children:[o.jsx("dt",{children:b("artifactLibrary.preview.agent")}),o.jsx("dd",{title:S.agentName,children:S.agentName})]}),o.jsxs("div",{children:[o.jsx("dt",{children:b("artifactLibrary.preview.session")}),o.jsx("dd",{title:S.sessionTitle,children:S.sessionTitle})]}),(Ct=S.origin)!=null&&Ct.toolName?o.jsxs("div",{children:[o.jsx("dt",{children:b("artifactLibrary.preview.tool")}),o.jsx("dd",{children:S.origin.toolName})]}):null,o.jsxs("div",{children:[o.jsx("dt",{children:b("artifactLibrary.preview.createdAt")}),o.jsx("dd",{children:$we(S.createdAt,y,b("artifactLibrary.unknownTime"))})]}),S.sizeBytes?o.jsxs("div",{children:[o.jsx("dt",{children:b("artifactLibrary.preview.fileSize")}),o.jsx("dd",{children:Fwe(S.sizeBytes)})]}):null]}),(je=S.tags)!=null&&je.length?o.jsx("div",{className:"artifact-library-preview-tags","aria-label":b("artifactLibrary.preview.tags"),children:S.tags.map(ve=>o.jsx("span",{children:ve},ve))}):null]})]}),o.jsxs("footer",{children:[o.jsxs("div",{className:"artifact-library-preview-footer-start",children:[f?o.jsxs("button",{type:"button",className:"is-secondary",onClick:()=>{const ve=S;Be(),f(ve)},children:[o.jsx(nat,{}),b("artifactLibrary.preview.viewSession")]}):null,c?o.jsxs("button",{type:"button",className:"is-secondary",disabled:S.canManage===!1,onClick:()=>{const ve=S;Be(),U(""),H(ve)},children:[o.jsx(iat,{}),b("artifactLibrary.edit")]}):null]}),o.jsxs("button",{type:"button",disabled:_.startsWith("download:")||!n&&!t,onClick:()=>void Pe(S),children:[o.jsx(tat,{}),b("artifactLibrary.download")]})]})]})]}):null,I?o.jsx(aat,{artifact:I,busy:X,error:q,onClose:()=>{X||H(null)},onSave:ve=>void Ve(ve)}):null,te?o.jsx(dc,{title:b("artifactLibrary.deleteDialog.title"),description:b("artifactLibrary.deleteDialog.description",{name:te.name}),confirmLabel:b(oe?"artifactLibrary.deleteDialog.deleting":"artifactLibrary.deleteDialog.confirm"),closeLabel:b("artifactLibrary.deleteDialog.close"),variant:"danger",busy:oe,onCancel:()=>{oe||le(null)},onConfirm:()=>void ke()}):null]})}Zt.hasResourceBundle("en-US","workspaceTools")||Zt.addResourceBundle("en-US","workspaceTools",Zoe,!0,!0);Zt.hasResourceBundle("zh-CN","workspaceTools")||Zt.addResourceBundle("zh-CN","workspaceTools",mfe,!0,!0);function Um(e,t={}){return Zt.t(e,{...t,ns:"workspaceTools"})}function Pot(e,t){if(e&&typeof e=="object"&&"detail"in e){const n=e.detail;if(typeof n=="string"&&n.trim())return n}return t}async function oE(e,t){if(e.ok)return e;let n;try{n=await e.json()}catch{n=void 0}throw new Error(Pot(n,Um("artifactLibrary.api.withStatus",{message:t,status:e.status})))}function dM(e){if(typeof e=="number")return e;if(typeof e!="string")return 0;const t=Date.parse(e);return Number.isFinite(t)?t:0}function Uwe(e){const t=e;return{...t,createdAt:dM(t.createdAt),updatedAt:dM(t.updatedAt),sessionUpdatedAt:dM(t.sessionUpdatedAt)}}async function Qwe(e){const t=await e.json();return Array.isArray(t.items)?t.items.map(Uwe):[]}async function Dot(){const e=await oE(await Ln("/web/artifacts"),Um("artifactLibrary.api.listFailed"));return Qwe(e)}async function Mot(e){if(e.length===0)return Dot();const t=await oE(await Ln("/web/artifacts/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({candidates:e})},24e4),Um("artifactLibrary.api.syncFailed"));return Qwe(t)}async function Lot(e,t){const n=await oE(await Ln(`/web/artifacts/${encodeURIComponent(e.id)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),Um("artifactLibrary.api.updateFailed"));return Uwe(await n.json())}async function $ot(e){await oE(await Ln(`/web/artifacts/${encodeURIComponent(e.id)}`,{method:"DELETE"}),Um("artifactLibrary.api.deleteFailed"))}async function Fot(e){const n=await(await oE(await Ln(`/web/artifacts/${encodeURIComponent(e.id)}/content?download=true`,{},24e4),Um("artifactLibrary.api.downloadFailed"))).blob(),i=URL.createObjectURL(n),r=document.createElement("a");r.href=i,r.download=e.name,document.body.appendChild(r),r.click(),r.remove(),window.setTimeout(()=>URL.revokeObjectURL(i),0)}const zwe="KNOWLEDGE_PROVIDER_ASSOCIATION_INVALID";class MR extends Error{constructor(n,i,r={}){super(n);Di(this,"status");Di(this,"errorCode");Di(this,"requestId");Di(this,"diagnostics");Di(this,"detail");Di(this,"payload");Di(this,"rawBody");this.name="KnowledgeRequestError",this.status=i;const s=typeof r=="string"?{errorCode:r}:r;this.errorCode=s.errorCode||"",this.requestId=s.requestId||"",this.diagnostics=s.diagnostics,this.detail=s.detail,this.payload=s.payload,this.rawBody=s.rawBody||""}}class Vwe extends Error{constructor(n){super(n.map(({region:i,error:r})=>`${i}: ${r.message||V("knowledge.loadFailed")}`).join(` +`));Di(this,"failures");this.name="KnowledgeRegionAggregateError",this.failures=n}}const Bot=new Set(["ak","apikey","sk","accesskey","accesskeyid","authorization","authkey","clientsecret","cookie","credential","credentials","password","passwd","privatekey","secret","secretaccesskey","secretkey","securitytoken","sessiontoken","setcookie","token"]),Uot=6,zG=50,Hwe=4e3;function Qot(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}function zot(e){const t=Qot(e);return Bot.has(t)||t.endsWith("password")||t.endsWith("secret")||t.endsWith("token")||t.endsWith("credential")}function Vot(e){return/<\s*(?:!doctype|html|head|body|script|style)\b/i.test(e)}function RO(e){if(Vot(e))return V("knowledge.htmlHidden");const t=V("knowledge.redacted");return e.replace(/\bBearer\s+[^\s,;]+/gi,`Bearer ${t}`).replace(/\b(?:set-)?cookie\s*:\s*[^\r\n]*/gi,`cookie: ${t}`).replace(/\bAKLT[A-Za-z0-9_-]{6,}\b/g,t).replace(/((?:access[_-]?key(?:[_-]?id)?|secret(?:[_-]?(?:access)?[_-]?key)?|session[_-]?token|security[_-]?token|client[_-]?secret|api[_-]?key|authorization|cookie|[a-z0-9_-]*(?:password|secret|token)|credential|ak|sk)\s*[:=]\s*)(?:"[^"]*"|'[^']*'|[^\s,;&]+)/gi,`$1${t}`).replace(/([?&](?:access[_-]?key|api[_-]?key|client[_-]?secret|security[_-]?token|session[_-]?token|secret|token|password|authorization|cookie|credential)=)[^&#\s]+/gi,`$1${t}`)}function x6(e,t=0,n=new WeakSet){if(e===null||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="string")return RO(e).slice(0,Hwe);if(typeof e!="object")return;if(t>=Uot)return V("knowledge.depthTruncated");if(n.has(e))return V("knowledge.circularReference");if(n.add(e),Array.isArray(e))return e.slice(0,zG).map(r=>x6(r,t+1,n));const i={};return Object.entries(e).slice(0,zG).forEach(([r,s])=>{i[r]=zot(r)?V("knowledge.redacted"):x6(s,t+1,n)}),i}function VG(e){if(e===void 0)return"";const t=x6(e);if(typeof t=="string")return t;if(t===void 0)return"";try{return JSON.stringify(t).slice(0,Hwe)}catch{return V("knowledge.diagnosticsUnavailable")}}function co(e,t){if(e instanceof Vwe)return e.failures.map(({region:a,error:l})=>`${a} +${co(l,t)}`).join(` + +`);if(!(e instanceof MR))return(e instanceof Error?RO(e.message):"")||t;const n=RO(e.message)||t,i=[Number.isFinite(e.status)?V("knowledge.statusCode",{status:e.status}):"",e.errorCode?V("knowledge.errorCode",{code:RO(e.errorCode)}):"",e.requestId?V("knowledge.requestId",{requestId:RO(e.requestId)}):""].filter(Boolean).join(" · "),r=VG(e.diagnostics),s=VG(e.detail);return[n,i,r?V("knowledge.diagnostics",{diagnostics:r}):"",s&&s!==n?V("knowledge.detail",{detail:s}):""].filter(Boolean).join(` +`)}function lA(...e){for(const t of e)if(typeof t=="string"&&t.trim())return t.trim();return""}function Hot(e){return Array.isArray(e)?e.map(t=>{const n=nu(t),i=lA(n.msg,n.message);if(!i)return"";const r=Array.isArray(n.loc)?n.loc.filter(s=>typeof s=="string"||typeof s=="number").map(String).join("."):"";return r?`${r}: ${i}`:i}).filter(Boolean).join("; "):""}function qot(e,t=!0){const n=nu(e),i=Object.prototype.hasOwnProperty.call(n,"detail")?n.detail:typeof e=="string"?e:void 0,r=nu(i);return{message:typeof i=="string"?t?i.trim():"":lA(r.message,n.message,Hot(i)),errorCode:lA(r.errorCode,n.errorCode),requestId:lA(r.requestId,r.request_id,r.RequestId,n.requestId,n.request_id),diagnostics:r.diagnostics??n.diagnostics,detail:i,payload:e}}function nu(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{}}function Mi(e){return typeof e=="string"?e:""}function IS(e,t){return typeof e=="number"&&Number.isFinite(e)?e:t}function TB(e){const t=nu(e);return{id:Mi(t.id),name:Mi(t.name),description:Mi(t.description),providerType:Mi(t.providerType),providerKnowledgeId:Mi(t.providerKnowledgeId),projectName:Mi(t.projectName),region:Mi(t.region),status:Mi(t.status),createdAt:Mi(t.createdAt),updatedAt:Mi(t.updatedAt),ownerId:Mi(t.ownerId),ownerLabel:Mi(t.ownerLabel),canManage:t.canManage===!0}}function lE(e){const t=nu(e);return{id:Mi(t.id),name:Mi(t.name),type:Mi(t.type),sizeBytes:IS(t.sizeBytes,0),status:Mi(t.status),url:Mi(t.url),tosPath:Mi(t.tosPath),metadata:nu(t.metadata),createdAt:Mi(t.createdAt),updatedAt:Mi(t.updatedAt),sourceMarkdown:Mi(t.sourceMarkdown)}}function Wot(e){const t=nu(e),n=t.attachment,i=nu(n);return{id:Mi(t.id),title:Mi(t.title),content:Mi(t.content),attachmentUrl:Mi(t.attachmentUrl)||Mi(i.url)||Mi(i.previewUrl),attachmentType:Mi(t.attachmentType)||Mi(i.type)||Mi(i.mimeType),attachment:n,tableFields:t.tableFields}}async function Ku(e,t={},n=Vo){var f;const i=Hu(Lh(t.headers));i.set("accept","application/json"),t.body&&!(t.body instanceof FormData)&&i.set("content-type","application/json");const r=await fetch(e,{...t,headers:i,signal:xl(t.signal,n)});if(r.ok)return r.status===204?void 0:r.json();const s=await r.text();let a=s,l=!1;if(s)try{a=JSON.parse(s),l=!0}catch{}const c=((f=r.headers.get("content-type"))==null?void 0:f.toLowerCase())||"",u=qot(a,l||c.startsWith("text/plain")),d=r.status===401?V("knowledge.signInRequired"):r.status===403?V("knowledge.forbidden"):r.status===404?V("knowledge.notFound"):r.status===409?V("knowledge.conflict"):V("knowledge.requestFailed",{status:r.status});throw new MR(u.message||d,r.status,{errorCode:u.errorCode,requestId:u.requestId,diagnostics:u.diagnostics,detail:u.detail,payload:u.payload,rawBody:s})}function Xb(e){const t=new URLSearchParams;e.trim()&&t.set("region",e.trim());const n=t.toString();return n?`?${n}`:""}async function Kot(e){var r;const t=new URLSearchParams({region:e.region,pageSize:String(e.pageSize??30)});(r=e.projectName)!=null&&r.trim()&&t.set("projectName",e.projectName.trim()),e.nextToken&&t.set("nextToken",e.nextToken);const n=await Ku(`/web/knowledge-bases?${t.toString()}`,{signal:e.signal}),i=nu(n);return{items:Array.isArray(i.items)?i.items.map(TB):[],nextToken:Mi(i.nextToken)}}function Got(e){return`${e.region}\0${e.id}`}async function Xot(e){var l;const t=[...new Set(e.regions.map(c=>c.trim()).filter(Boolean))],n=e.nextTokens?t.filter(c=>{var u;return!!((u=e.nextTokens)!=null&&u[c])}):t;if(n.length===0)return{items:[],nextTokens:{},failures:[]};const i=await Promise.allSettled(n.map(async c=>{var u;return{region:c,page:await Kot({region:c,projectName:e.projectName,nextToken:(u=e.nextTokens)==null?void 0:u[c],pageSize:e.pageSize,signal:e.signal})}}));if((l=e.signal)!=null&&l.aborted)throw new DOMException("Aborted","AbortError");const r=[],s={},a=new Map;if(i.forEach((c,u)=>{var f;const d=n[u];if(c.status==="rejected"){const h=(f=e.nextTokens)==null?void 0:f[d];h&&(s[d]=h),r.push({region:d,error:c.reason instanceof Error?c.reason:new Error(V("knowledge.loadFailed"))});return}c.value.page.nextToken&&(s[d]=c.value.page.nextToken),c.value.page.items.forEach(h=>{const p=h.region?h:{...h,region:d};a.set(Got(p),p)})}),r.length===n.length)throw new Vwe(r);return{items:[...a.values()],nextTokens:s,failures:r}}function Yot(e){return Ku("/web/knowledge-bases",{method:"POST",body:JSON.stringify(e)},ls).then(TB)}function Zot(e,t,n){return Ku(`/web/knowledge-bases/${encodeURIComponent(e)}${Xb(t)}`,{method:"PATCH",body:JSON.stringify(n)}).then(TB)}function Jot(e,t){return Ku(`/web/knowledge-bases/${encodeURIComponent(e)}${Xb(t)}`,{method:"DELETE"},ls)}async function elt(e,t){var s;const n=new URLSearchParams({region:t.region,offset:String(t.offset??0),limit:String(t.limit??30)});(s=t.documentType)!=null&&s.trim()&&n.set("documentType",t.documentType.trim());const i=await Ku(`/web/knowledge-bases/${encodeURIComponent(e)}/documents?${n.toString()}`,{signal:t.signal}),r=nu(i);return{items:Array.isArray(r.items)?r.items.map(lE):[],offset:IS(r.offset,0),limit:IS(r.limit,t.limit??30),hasMore:r.hasMore===!0}}async function tlt(e,t,n){const i=new URLSearchParams({region:n.region,offset:String(n.offset??0),limit:String(n.limit??20)}),r=await Ku(`/web/knowledge-bases/${encodeURIComponent(e)}/documents/${encodeURIComponent(t)}/preview?${i.toString()}`,{signal:n.signal}),s=nu(r);return{document:lE(s.document),chunks:Array.isArray(s.chunks)?s.chunks.map(Wot):[],sourceMarkdown:Mi(s.sourceMarkdown),offset:IS(s.offset,0),limit:IS(s.limit,n.limit??20),hasMore:s.hasMore===!0}}function nlt(e,t,n){return Ku(`/web/knowledge-bases/${encodeURIComponent(e)}/documents${Xb(t)}`,{method:"POST",body:JSON.stringify(n)},ls).then(lE)}async function ilt(e,t,n){const i=await Ku(`/web/knowledge-bases/${encodeURIComponent(e)}/documents/web-preview${Xb(t)}`,{method:"POST",body:JSON.stringify({sourceType:"url",url:n.url})},ls),r=nu(i);return{name:Mi(r.name),url:Mi(r.url),sourceMarkdown:Mi(r.sourceMarkdown)}}function rlt(e,t,n){var r,s;const i=new FormData;return i.set("file",n.file),(r=n.name)!=null&&r.trim()&&i.set("name",n.name.trim()),(s=n.documentType)!=null&&s.trim()&&i.set("documentType",n.documentType.trim()),n.metadata&&i.set("metadata",JSON.stringify(n.metadata)),Ku(`/web/knowledge-bases/${encodeURIComponent(e)}/documents/upload${Xb(t)}`,{method:"POST",body:i},ls).then(lE)}function slt(e,t,n,i){return Ku(`/web/knowledge-bases/${encodeURIComponent(e)}/documents/${encodeURIComponent(t)}${Xb(n)}`,{method:"PATCH",body:JSON.stringify(i)}).then(lE)}function alt(e,t,n){return Ku(`/web/knowledge-bases/${encodeURIComponent(e)}/documents/${encodeURIComponent(t)}${Xb(n)}`,{method:"DELETE"},ls)}function cE({className:e="",title:t,status:n,description:i,metadata:r,detailAction:s,action:a,auxiliaryAction:l}){return o.jsxs(kB,{className:`library-resource-card ${e}`.trim(),activateLabel:`${s.label} ${t}`,onActivate:s.disabled?void 0:s.onClick,footer:o.jsx(Dwe,{items:r.map(c=>({label:c.label,value:c.value,title:c.title,hideLabel:!0}))}),actions:o.jsxs(o.Fragment,{children:[l?o.jsx(v6,{className:"library-resource-card__auxiliary-action",label:`${l.label} ${t}`,tone:"secondary",disabled:l.disabled,title:l.title??l.label,onClick:l.onClick,children:l.icon}):null,a?o.jsx(v6,{label:`${a.label} ${t}`,icon:a.icon,disabled:a.disabled,title:a.title,onClick:a.onClick}):null]}),children:[o.jsx(EB,{leading:o.jsx(qv,{seed:t}),title:t,titleText:t,status:n}),o.jsx(CB,{title:i,children:i})]})}function UVt(){}function HG(e){const t=[],n=String(e||"");let i=n.indexOf(","),r=0,s=!1;for(;!s;){i===-1&&(i=n.length,s=!0);const a=n.slice(r,i).trim();(a||!s)&&t.push(a),r=i+1,i=n.indexOf(",",r)}return t}function qwe(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const olt=/[$_\p{ID_Start}]/u,llt=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,clt=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,ult=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dlt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wwe={};function QVt(e){return e?olt.test(String.fromCodePoint(e)):!1}function zVt(e,t){const i=(t||Wwe).jsx?clt:llt;return e?i.test(String.fromCodePoint(e)):!1}function qG(e,t){return(Wwe.jsx?dlt:ult).test(e)}const flt=/[ \t\n\f\r]/g;function hlt(e){return typeof e=="object"?e.type==="text"?WG(e.value):!1:WG(e)}function WG(e){return e.replace(flt,"")===""}let uE=class{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}};uE.prototype.normal={};uE.prototype.property={};uE.prototype.space=void 0;function Kwe(e,t){const n={},i={};for(const r of e)Object.assign(n,r.property),Object.assign(i,r.normal);return new uE(n,i,t)}function PS(e){return e.toLowerCase()}class Sl{constructor(t,n){this.attribute=n,this.property=t}}Sl.prototype.attribute="";Sl.prototype.booleanish=!1;Sl.prototype.boolean=!1;Sl.prototype.commaOrSpaceSeparated=!1;Sl.prototype.commaSeparated=!1;Sl.prototype.defined=!1;Sl.prototype.mustUseProperty=!1;Sl.prototype.number=!1;Sl.prototype.overloadedBoolean=!1;Sl.prototype.property="";Sl.prototype.spaceSeparated=!1;Sl.prototype.space=void 0;let plt=0;const ii=Yb(),Xs=Yb(),O6=Yb(),St=Yb(),Ir=Yb(),ev=Yb(),Fl=Yb();function Yb(){return 2**++plt}const w6=Object.freeze(Object.defineProperty({__proto__:null,boolean:ii,booleanish:Xs,commaOrSpaceSeparated:Fl,commaSeparated:ev,number:St,overloadedBoolean:O6,spaceSeparated:Ir},Symbol.toStringTag,{value:"Module"})),fM=Object.keys(w6);class AB extends Sl{constructor(t,n,i,r){let s=-1;if(super(t,n),KG(this,"space",r),typeof i=="number")for(;++s4&&n.slice(0,4)==="data"&&vlt.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(GG,Olt);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!GG.test(s)){let a=s.replace(ylt,xlt);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}r=AB}return new r(i,t)}function xlt(e){return"-"+e.toLowerCase()}function Olt(e){return e.charAt(1).toUpperCase()}const dE=Kwe([Gwe,mlt,Zwe,Jwe,eSe],"html"),Qm=Kwe([Gwe,glt,Zwe,Jwe,eSe],"svg");function XG(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function tSe(e){return e.join(" ").trim()}var _B={},YG=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,wlt=/\n/g,Slt=/^\s*/,klt=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Elt=/^:\s*/,Clt=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Tlt=/^[;\s]*/,Alt=/^\s+|\s+$/g,_lt=` +`,ZG="/",JG="*",Eg="",Nlt="comment",jlt="declaration";function Rlt(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,i=1;function r(g){var b=g.match(wlt);b&&(n+=b.length);var v=g.lastIndexOf(_lt);i=~v?g.length-v:i+g.length}function s(){var g={line:n,column:i};return function(b){return b.position=new a(g),u(),b}}function a(g){this.start=g,this.end={line:n,column:i},this.source=t.source}a.prototype.content=e;function l(g){var b=new Error(t.source+":"+n+":"+i+": "+g);if(b.reason=g,b.filename=t.source,b.line=n,b.column=i,b.source=e,!t.silent)throw b}function c(g){var b=g.exec(e);if(b){var v=b[0];return r(v),e=e.slice(v.length),b}}function u(){c(Slt)}function d(g){var b;for(g=g||[];b=f();)b!==!1&&g.push(b);return g}function f(){var g=s();if(!(ZG!=e.charAt(0)||JG!=e.charAt(1))){for(var b=2;Eg!=e.charAt(b)&&(JG!=e.charAt(b)||ZG!=e.charAt(b+1));)++b;if(b+=2,Eg===e.charAt(b-1))return l("End of comment missing");var v=e.slice(2,b-2);return i+=2,r(v),e=e.slice(b),i+=2,g({type:Nlt,comment:v})}}function h(){var g=s(),b=c(klt);if(b){if(f(),!c(Elt))return l("property missing ':'");var v=c(Clt),y=g({type:jlt,property:eX(b[0].replace(YG,Eg)),value:v?eX(v[0].replace(YG,Eg)):Eg});return c(Tlt),y}}function p(){var g=[];d(g);for(var b;b=h();)b!==!1&&(g.push(b),d(g));return g}return u(),p()}function eX(e){return e?e.replace(Alt,Eg):Eg}var Ilt=Rlt,Plt=Ip&&Ip.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_B,"__esModule",{value:!0});_B.default=Mlt;const Dlt=Plt(Ilt);function Mlt(e,t){let n=null;if(!e||typeof e!="string")return n;const i=(0,Dlt.default)(e),r=typeof t=="function";return i.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:l}=s;r?t(a,l,s):l&&(n=n||{},n[a]=l)}),n}var $R={};Object.defineProperty($R,"__esModule",{value:!0});$R.camelCase=void 0;var Llt=/^--[a-zA-Z0-9_-]+$/,$lt=/-([a-z])/g,Flt=/^[^-]+$/,Blt=/^-(webkit|moz|ms|o|khtml)-/,Ult=/^-(ms)-/,Qlt=function(e){return!e||Flt.test(e)||Llt.test(e)},zlt=function(e,t){return t.toUpperCase()},tX=function(e,t){return"".concat(t,"-")},Vlt=function(e,t){return t===void 0&&(t={}),Qlt(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Ult,tX):e=e.replace(Blt,tX),e.replace($lt,zlt))};$R.camelCase=Vlt;var Hlt=Ip&&Ip.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qlt=Hlt(_B),Wlt=$R;function S6(e,t){var n={};return!e||typeof e!="string"||(0,qlt.default)(e,function(i,r){i&&r&&(n[(0,Wlt.camelCase)(i,t)]=r)}),n}S6.default=S6;var Klt=S6;const Glt=ux(Klt),FR=nSe("end"),Jd=nSe("start");function nSe(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Xlt(e){const t=Jd(e),n=FR(e);if(t&&n)return{start:t,end:n}}function Ow(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nX(e.position):"start"in e||"end"in e?nX(e):"line"in e||"column"in e?k6(e):""}function k6(e){return iX(e&&e.line)+":"+iX(e&&e.column)}function nX(e){return k6(e&&e.start)+"-"+k6(e&&e.end)}function iX(e){return e&&typeof e=="number"?e:1}class yo extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let r="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?r=t:!s.cause&&t&&(a=!0,r=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof i=="string"){const c=i.indexOf(":");c===-1?s.ruleId=i:(s.source=i.slice(0,c),s.ruleId=i.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){const c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Ow(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}yo.prototype.file="";yo.prototype.name="";yo.prototype.reason="";yo.prototype.message="";yo.prototype.stack="";yo.prototype.column=void 0;yo.prototype.line=void 0;yo.prototype.ancestors=void 0;yo.prototype.cause=void 0;yo.prototype.fatal=void 0;yo.prototype.place=void 0;yo.prototype.ruleId=void 0;yo.prototype.source=void 0;const NB={}.hasOwnProperty,Ylt=new Map,Zlt=/[A-Z]/g,Jlt=new Set(["table","tbody","thead","tfoot","tr"]),ect=new Set(["td","th"]),iSe="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tct(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=cct(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=lct(n,t.jsx,t.jsxs)}const r={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Qm:dE,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=rSe(r,e,void 0);return s&&typeof s!="string"?s:r.create(e,r.Fragment,{children:s||void 0},void 0)}function rSe(e,t,n){if(t.type==="element")return nct(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return ict(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return sct(e,t,n);if(t.type==="mdxjsEsm")return rct(e,t);if(t.type==="root")return act(e,t,n);if(t.type==="text")return oct(e,t)}function nct(e,t,n){const i=e.schema;let r=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=Qm,e.schema=r),e.ancestors.push(t);const s=aSe(e,t.tagName,!1),a=uct(e,t);let l=RB(e,t);return Jlt.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!hlt(c):!0})),sSe(e,a,s,t),jB(a,l),e.ancestors.pop(),e.schema=i,e.create(t,s,a,n)}function ict(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}DS(e,t.position)}function rct(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);DS(e,t.position)}function sct(e,t,n){const i=e.schema;let r=i;t.name==="svg"&&i.space==="html"&&(r=Qm,e.schema=r),e.ancestors.push(t);const s=t.name===null?e.Fragment:aSe(e,t.name,!0),a=dct(e,t),l=RB(e,t);return sSe(e,a,s,t),jB(a,l),e.ancestors.pop(),e.schema=i,e.create(t,s,a,n)}function act(e,t,n){const i={};return jB(i,RB(e,t)),e.create(t,e.Fragment,i,n)}function oct(e,t){return t.value}function sSe(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function jB(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function lct(e,t,n){return i;function i(r,s,a,l){const u=Array.isArray(a.children)?n:t;return l?u(s,a,l):u(s,a)}}function cct(e,t){return n;function n(i,r,s,a){const l=Array.isArray(s.children),c=Jd(i);return t(r,s,a,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function uct(e,t){const n={};let i,r;for(r in t.properties)if(r!=="children"&&NB.call(t.properties,r)){const s=fct(e,r,t.properties[r]);if(s){const[a,l]=s;e.tableCellAlignToStyle&&a==="align"&&typeof l=="string"&&ect.has(t.tagName)?i=l:n[a]=l}}if(i){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function dct(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const a=s.expression;a.type;const l=a.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else DS(e,t.position);else{const r=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const l=i.value.data.estree.body[0];l.type,s=e.evaluater.evaluateExpression(l.expression)}else DS(e,t.position);else s=i.value===null?!0:i.value;n[r]=s}return n}function RB(e,t){const n=[];let i=-1;const r=e.passKeys?new Map:Ylt;for(;++ir?0:r+t:t=t>r?r:t,n=n>0?n:0,i.length<1e4)a=Array.from(i),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s0?(sc(e,e.length,0,t),e):t}const aX={}.hasOwnProperty;function lSe(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Du(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ro=zm(/[A-Za-z]/),ho=zm(/[\dA-Za-z]/),Oct=zm(/[#-'*+\--9=?A-Z^-~]/);function tN(e){return e!==null&&(e<32||e===127)}const E6=zm(/\d/),wct=zm(/[\dA-Fa-f]/),Sct=zm(/[!-/:-@[-`{-~]/);function wn(e){return e!==null&&e<-2}function Nr(e){return e!==null&&(e<0||e===32)}function ki(e){return e===-2||e===-1||e===32}const BR=zm(new RegExp("\\p{P}|\\p{S}","u")),Sb=zm(/\s/);function zm(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Qx(e){const t=[];let n=-1,i=0,r=0;for(;++n55295&&s<57344){const l=e.charCodeAt(n+1);s<56320&&l>56319&&l<57344?(a=String.fromCharCode(s,l),r=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(i,n),encodeURIComponent(a)),i=n+r+1,a=""),r&&(n+=r,r=0)}return t.join("")+e.slice(i)}function Qi(e,t,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(c){return ki(c)?(e.enter(n),l(c)):t(c)}function l(c){return ki(c)&&s++a))return;const E=t.events.length;let C=E,N,_;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if(N){_=t.events[C][1].end;break}N=!0}for(y(i),S=E;Sw;){const k=n[O];t.containerState=k[1],k[0].exit.call(t,e)}n.length=w}function x(){r.write([null]),s=void 0,r=void 0,t.containerState._closeFlow=void 0}}function Act(e,t,n){return Qi(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Wv(e){if(e===null||Nr(e)||Sb(e))return 1;if(BR(e))return 2}function UR(e,t,n){const i=[];let r=-1;for(;++r1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[i][1].end},h={...e[n][1].start};lX(f,-c),lX(h,c),a={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[i][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:c>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},r={type:c>1?"strong":"emphasis",start:{...a.start},end:{...l.end}},e[i][1].end={...a.start},e[n][1].start={...l.end},u=[],e[i][1].end.offset-e[i][1].start.offset&&(u=Mc(u,[["enter",e[i][1],t],["exit",e[i][1],t]])),u=Mc(u,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",s,t]]),u=Mc(u,UR(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),u=Mc(u,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Mc(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,sc(e,i-1,n-i+3,u),n=i+u.length-d-2;break}}for(n=-1;++n0&&ki(S)?Qi(e,x,"linePrefix",s+1)(S):x(S)}function x(S){return S===null||wn(S)?e.check(cX,b,O)(S):(e.enter("codeFlowValue"),w(S))}function w(S){return S===null||wn(S)?(e.exit("codeFlowValue"),x(S)):(e.consume(S),w)}function O(S){return e.exit("codeFenced"),t(S)}function k(S,E,C){let N=0;return _;function _(R){return S.enter("lineEnding"),S.consume(R),S.exit("lineEnding"),j}function j(R){return S.enter("codeFencedFence"),ki(R)?Qi(S,T,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):T(R)}function T(R){return R===l?(S.enter("codeFencedFenceSequence"),L(R)):C(R)}function L(R){return R===l?(N++,S.consume(R),L):N>=a?(S.exit("codeFencedFenceSequence"),ki(R)?Qi(S,A,"whitespace")(R):A(R)):C(R)}function A(R){return R===null||wn(R)?(S.exit("codeFencedFence"),E(R)):C(R)}}}function Bct(e,t,n){const i=this;return r;function r(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}const pM={name:"codeIndented",tokenize:Qct},Uct={partial:!0,tokenize:zct};function Qct(e,t,n){const i=this;return r;function r(u){return e.enter("codeIndented"),Qi(e,s,"linePrefix",5)(u)}function s(u){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?c(u):wn(u)?e.attempt(Uct,a,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||wn(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function zct(e,t,n){const i=this;return r;function r(a){return i.parser.lazy[i.now().line]?n(a):wn(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),r):Qi(e,s,"linePrefix",5)(a)}function s(a){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):wn(a)?r(a):n(a)}}const Vct={name:"codeText",previous:qct,resolve:Hct,tokenize:Wct};function Hct(e){let t=e.length-4,n=3,i,r;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const r=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&U1(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),U1(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),U1(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(a):e.interrupt(i.parser.constructs.flow,n,t)(a)}}function pSe(e,t,n,i,r,s,a,l,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return f;function f(y){return y===60?(e.enter(i),e.enter(r),e.enter(s),e.consume(y),e.exit(s),h):y===null||y===32||y===41||tN(y)?n(y):(e.enter(i),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),b(y))}function h(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(r),e.exit(i),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(l),h(y)):y===null||y===60||wn(y)?n(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function b(y){return!d&&(y===null||y===41||Nr(y))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(i),t(y)):d999||p===null||p===91||p===93&&!c||p===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(r),e.consume(p),e.exit(r),e.exit(i),t):wn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||wn(p)||l++>999?(e.exit("chunkString"),d(p)):(e.consume(p),c||(c=!ki(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),l++,f):f(p)}}function gSe(e,t,n,i,r,s){let a;return l;function l(h){return h===34||h===39||h===40?(e.enter(i),e.enter(r),e.consume(h),e.exit(r),a=h===40?41:h,c):n(h)}function c(h){return h===a?(e.enter(r),e.consume(h),e.exit(r),e.exit(i),t):(e.enter(s),u(h))}function u(h){return h===a?(e.exit(s),c(a)):h===null?n(h):wn(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Qi(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===a||h===null||wn(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?f:d)}function f(h){return h===a||h===92?(e.consume(h),d):d(h)}}function ww(e,t){let n;return i;function i(r){return wn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,i):ki(r)?Qi(e,i,n?"linePrefix":"lineSuffix")(r):t(r)}}const tut={name:"definition",tokenize:iut},nut={partial:!0,tokenize:rut};function iut(e,t,n){const i=this;let r;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return mSe.call(i,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return r=Du(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return Nr(p)?ww(e,u)(p):u(p)}function u(p){return pSe(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(nut,f,f)(p)}function f(p){return ki(p)?Qi(e,h,"whitespace")(p):h(p)}function h(p){return p===null||wn(p)?(e.exit("definition"),i.parser.defined.push(r),t(p)):n(p)}}function rut(e,t,n){return i;function i(l){return Nr(l)?ww(e,r)(l):n(l)}function r(l){return gSe(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return ki(l)?Qi(e,a,"whitespace")(l):a(l)}function a(l){return l===null||wn(l)?t(l):n(l)}}const sut={name:"hardBreakEscape",tokenize:aut};function aut(e,t,n){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),r}function r(s){return wn(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const out={name:"headingAtx",resolve:lut,tokenize:cut};function lut(e,t){let n=e.length-2,i=3,r,s;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},s={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},sc(e,i,n-i+1,[["enter",r,t],["enter",s,t],["exit",s,t],["exit",r,t]])),e}function cut(e,t,n){let i=0;return r;function r(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&i++<6?(e.consume(d),a):d===null||Nr(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||wn(d)?(e.exit("atxHeading"),t(d)):ki(d)?Qi(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||Nr(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}const uut=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],dX=["pre","script","style","textarea"],dut={concrete:!0,name:"htmlFlow",resolveTo:put,tokenize:mut},fut={partial:!0,tokenize:but},hut={partial:!0,tokenize:gut};function put(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function mut(e,t,n){const i=this;let r,s,a,l,c;return u;function u(Q){return d(Q)}function d(Q){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(Q),f}function f(Q){return Q===33?(e.consume(Q),h):Q===47?(e.consume(Q),s=!0,b):Q===63?(e.consume(Q),r=3,i.interrupt?t:I):Ro(Q)?(e.consume(Q),a=String.fromCharCode(Q),v):n(Q)}function h(Q){return Q===45?(e.consume(Q),r=2,p):Q===91?(e.consume(Q),r=5,l=0,g):Ro(Q)?(e.consume(Q),r=4,i.interrupt?t:I):n(Q)}function p(Q){return Q===45?(e.consume(Q),i.interrupt?t:I):n(Q)}function g(Q){const q="CDATA[";return Q===q.charCodeAt(l++)?(e.consume(Q),l===q.length?i.interrupt?t:T:g):n(Q)}function b(Q){return Ro(Q)?(e.consume(Q),a=String.fromCharCode(Q),v):n(Q)}function v(Q){if(Q===null||Q===47||Q===62||Nr(Q)){const q=Q===47,U=a.toLowerCase();return!q&&!s&&dX.includes(U)?(r=1,i.interrupt?t(Q):T(Q)):uut.includes(a.toLowerCase())?(r=6,q?(e.consume(Q),y):i.interrupt?t(Q):T(Q)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(Q):s?x(Q):w(Q))}return Q===45||ho(Q)?(e.consume(Q),a+=String.fromCharCode(Q),v):n(Q)}function y(Q){return Q===62?(e.consume(Q),i.interrupt?t:T):n(Q)}function x(Q){return ki(Q)?(e.consume(Q),x):_(Q)}function w(Q){return Q===47?(e.consume(Q),_):Q===58||Q===95||Ro(Q)?(e.consume(Q),O):ki(Q)?(e.consume(Q),w):_(Q)}function O(Q){return Q===45||Q===46||Q===58||Q===95||ho(Q)?(e.consume(Q),O):k(Q)}function k(Q){return Q===61?(e.consume(Q),S):ki(Q)?(e.consume(Q),k):w(Q)}function S(Q){return Q===null||Q===60||Q===61||Q===62||Q===96?n(Q):Q===34||Q===39?(e.consume(Q),c=Q,E):ki(Q)?(e.consume(Q),S):C(Q)}function E(Q){return Q===c?(e.consume(Q),c=null,N):Q===null||wn(Q)?n(Q):(e.consume(Q),E)}function C(Q){return Q===null||Q===34||Q===39||Q===47||Q===60||Q===61||Q===62||Q===96||Nr(Q)?k(Q):(e.consume(Q),C)}function N(Q){return Q===47||Q===62||ki(Q)?w(Q):n(Q)}function _(Q){return Q===62?(e.consume(Q),j):n(Q)}function j(Q){return Q===null||wn(Q)?T(Q):ki(Q)?(e.consume(Q),j):n(Q)}function T(Q){return Q===45&&r===2?(e.consume(Q),P):Q===60&&r===1?(e.consume(Q),$):Q===62&&r===4?(e.consume(Q),H):Q===63&&r===3?(e.consume(Q),I):Q===93&&r===5?(e.consume(Q),B):wn(Q)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(fut,X,L)(Q)):Q===null||wn(Q)?(e.exit("htmlFlowData"),L(Q)):(e.consume(Q),T)}function L(Q){return e.check(hut,A,X)(Q)}function A(Q){return e.enter("lineEnding"),e.consume(Q),e.exit("lineEnding"),R}function R(Q){return Q===null||wn(Q)?L(Q):(e.enter("htmlFlowData"),T(Q))}function P(Q){return Q===45?(e.consume(Q),I):T(Q)}function $(Q){return Q===47?(e.consume(Q),a="",M):T(Q)}function M(Q){if(Q===62){const q=a.toLowerCase();return dX.includes(q)?(e.consume(Q),H):T(Q)}return Ro(Q)&&a.length<8?(e.consume(Q),a+=String.fromCharCode(Q),M):T(Q)}function B(Q){return Q===93?(e.consume(Q),I):T(Q)}function I(Q){return Q===62?(e.consume(Q),H):Q===45&&r===2?(e.consume(Q),I):T(Q)}function H(Q){return Q===null||wn(Q)?(e.exit("htmlFlowData"),X(Q)):(e.consume(Q),H)}function X(Q){return e.exit("htmlFlow"),t(Q)}}function gut(e,t,n){const i=this;return r;function r(a){return wn(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}function but(e,t,n){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(fE,t,n)}}const yut={name:"htmlText",tokenize:vut};function vut(e,t,n){const i=this;let r,s,a;return l;function l(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),c}function c(I){return I===33?(e.consume(I),u):I===47?(e.consume(I),k):I===63?(e.consume(I),w):Ro(I)?(e.consume(I),C):n(I)}function u(I){return I===45?(e.consume(I),d):I===91?(e.consume(I),s=0,g):Ro(I)?(e.consume(I),x):n(I)}function d(I){return I===45?(e.consume(I),p):n(I)}function f(I){return I===null?n(I):I===45?(e.consume(I),h):wn(I)?(a=f,$(I)):(e.consume(I),f)}function h(I){return I===45?(e.consume(I),p):f(I)}function p(I){return I===62?P(I):I===45?h(I):f(I)}function g(I){const H="CDATA[";return I===H.charCodeAt(s++)?(e.consume(I),s===H.length?b:g):n(I)}function b(I){return I===null?n(I):I===93?(e.consume(I),v):wn(I)?(a=b,$(I)):(e.consume(I),b)}function v(I){return I===93?(e.consume(I),y):b(I)}function y(I){return I===62?P(I):I===93?(e.consume(I),y):b(I)}function x(I){return I===null||I===62?P(I):wn(I)?(a=x,$(I)):(e.consume(I),x)}function w(I){return I===null?n(I):I===63?(e.consume(I),O):wn(I)?(a=w,$(I)):(e.consume(I),w)}function O(I){return I===62?P(I):w(I)}function k(I){return Ro(I)?(e.consume(I),S):n(I)}function S(I){return I===45||ho(I)?(e.consume(I),S):E(I)}function E(I){return wn(I)?(a=E,$(I)):ki(I)?(e.consume(I),E):P(I)}function C(I){return I===45||ho(I)?(e.consume(I),C):I===47||I===62||Nr(I)?N(I):n(I)}function N(I){return I===47?(e.consume(I),P):I===58||I===95||Ro(I)?(e.consume(I),_):wn(I)?(a=N,$(I)):ki(I)?(e.consume(I),N):P(I)}function _(I){return I===45||I===46||I===58||I===95||ho(I)?(e.consume(I),_):j(I)}function j(I){return I===61?(e.consume(I),T):wn(I)?(a=j,$(I)):ki(I)?(e.consume(I),j):N(I)}function T(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),r=I,L):wn(I)?(a=T,$(I)):ki(I)?(e.consume(I),T):(e.consume(I),A)}function L(I){return I===r?(e.consume(I),r=void 0,R):I===null?n(I):wn(I)?(a=L,$(I)):(e.consume(I),L)}function A(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||Nr(I)?N(I):(e.consume(I),A)}function R(I){return I===47||I===62||Nr(I)?N(I):n(I)}function P(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function $(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),M}function M(I){return ki(I)?Qi(e,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):B(I)}function B(I){return e.enter("htmlTextData"),a(I)}}const DB={name:"labelEnd",resolveAll:Sut,resolveTo:kut,tokenize:Eut},xut={tokenize:Cut},Out={tokenize:Tut},wut={tokenize:Aut};function Sut(e){let t=-1;const n=[];for(;++t=3&&(u===null||wn(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===r?(e.consume(u),i++,c):(e.exit("thematicBreakSequence"),ki(u)?Qi(e,l,"whitespace")(u):l(u))}}const Jo={continuation:{tokenize:$ut},exit:But,name:"list",tokenize:Lut},Dut={partial:!0,tokenize:Uut},Mut={partial:!0,tokenize:Fut};function Lut(e,t,n){const i=this,r=i.events[i.events.length-1];let s=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,a=0;return l;function l(p){const g=i.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!i.containerState.marker||p===i.containerState.marker:E6(p)){if(i.containerState.type||(i.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(cA,n,u)(p):u(p);if(!i.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return E6(p)&&++a<10?(e.consume(p),c):(!i.interrupt||a<2)&&(i.containerState.marker?p===i.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||p,e.check(fE,i.interrupt?n:d,e.attempt(Dut,h,f))}function d(p){return i.containerState.initialBlankLine=!0,s++,h(p)}function f(p){return ki(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function $ut(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(fE,r,s);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Qi(e,t,"listItemIndent",i.containerState.size+1)(l)}function s(l){return i.containerState.furtherBlankLines||!ki(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(Mut,t,a)(l))}function a(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,Qi(e,e.attempt(Jo,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Fut(e,t,n){const i=this;return Qi(e,r,"listItemIndent",i.containerState.size+1);function r(s){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(s):n(s)}}function But(e){e.exit(this.containerState.type)}function Uut(e,t,n){const i=this;return Qi(e,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(s){const a=i.events[i.events.length-1];return!ki(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const fX={name:"setextUnderline",resolveTo:Qut,tokenize:zut};function Qut(e,t){let n=e.length,i,r,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(r=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",s?(e.splice(r,0,["enter",a,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end={...e[s][1].end}):e[i][1]=a,e.push(["exit",a,t]),e}function zut(e,t,n){const i=this;let r;return s;function s(u){let d=i.events.length,f;for(;d--;)if(i.events[d][1].type!=="lineEnding"&&i.events[d][1].type!=="linePrefix"&&i.events[d][1].type!=="content"){f=i.events[d][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||f)?(e.enter("setextHeadingLine"),r=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===r?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),ki(u)?Qi(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||wn(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const Vut={tokenize:Hut};function Hut(e){const t=this,n=e.attempt(fE,i,e.attempt(this.parser.constructs.flowInitial,r,Qi(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Xct,r)),"linePrefix")));return n;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const qut={resolveAll:ySe()},Wut=bSe("string"),Kut=bSe("text");function bSe(e){return{resolveAll:ySe(e==="text"?Gut:void 0),tokenize:t};function t(n){const i=this,r=this.parser.constructs[e],s=n.attempt(r,a,l);return a;function a(d){return u(d)?s(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),s(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const f=r[d];let h=-1;if(f)for(;++h-1){const l=a[0];typeof l=="string"?a[0]=l.slice(i):a.shift()}s>0&&a.push(e[r].slice(0,s))}return a}function ldt(e,t){let n=-1;const i=[];let r;for(;++n0){const Tt=we.tokenStack[we.tokenStack.length-1];(Tt[1]||bX).call(we,void 0,Tt[0])}for(fe.position={start:mp(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:mp(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je0&&(i.className=["language-"+r[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function vdt(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xdt(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Odt(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),r=qx(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let a,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=s+1,l+=1,e.footnoteCounts.set(i,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+r,id:n+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function wdt(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sdt(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function xSe(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const r=e.all(t),s=r[0];s&&s.type==="text"?s.value="["+s.value:r.unshift({type:"text",value:"["});const a=r[r.length-1];return a&&a.type==="text"?a.value+=i:r.push({type:"text",value:i}),r}function kdt(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return xSe(e,t);const r={src:qx(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,s),e.applyData(t,s)}function Edt(e,t){const n={src:qx(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function Cdt(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function Tdt(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return xSe(e,t);const r={href:qx(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Adt(e,t){const n={href:qx(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function _dt(e,t,n){const i=e.all(t),r=n?Ndt(n):OSe(t),s={},a=[];if(typeof t.checked=="boolean"){const d=i[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},i.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l0){const Ct=Oe.tokenStack[Oe.tokenStack.length-1];(Ct[1]||pX).call(Oe,void 0,Ct[0])}for(he.position={start:up(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:up(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et0&&(i.className=["language-"+r[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function wdt(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sdt(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kdt(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),r=Qx(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let a,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=s+1,l+=1,e.footnoteCounts.set(i,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+r,id:n+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function Edt(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cdt(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function OSe(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const r=e.all(t),s=r[0];s&&s.type==="text"?s.value="["+s.value:r.unshift({type:"text",value:"["});const a=r[r.length-1];return a&&a.type==="text"?a.value+=i:r.push({type:"text",value:i}),r}function Tdt(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return OSe(e,t);const r={src:Qx(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,s),e.applyData(t,s)}function Adt(e,t){const n={src:Qx(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function _dt(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function Ndt(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return OSe(e,t);const r={href:Qx(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function jdt(e,t){const n={href:Qx(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Rdt(e,t,n){const i=e.all(t),r=n?Idt(n):wSe(t),s={},a=[];if(typeof t.checked=="boolean"){const d=i[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},i.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l1}function jdt(e,t){const n={},i=e.all(t);let r=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++r0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=tf(t.children[1]),c=UR(t.children[t.children.length-1]);l&&c&&(a.position={start:l,end:c}),r.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Mdt(e,t,n){const i=n?n.children:void 0,s=(i?i.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,l=a?a.length:t.children.length;let c=-1;const u=[];for(;++c0,!0),i[0]),r=i.index+i[0].length,i=n.exec(t);return s.push(xX(t.slice(r),r>0,!1)),s.join("")}function xX(e,t,n){let i=0,r=e.length;if(t){let s=e.codePointAt(i);for(;s===yX||s===vX;)i++,s=e.codePointAt(i)}if(n){let s=e.codePointAt(r-1);for(;s===yX||s===vX;)r--,s=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function Fdt(e,t){const n={type:"text",value:$dt(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Bdt(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Udt={blockquote:gdt,break:bdt,code:ydt,delete:vdt,emphasis:xdt,footnoteReference:Odt,heading:wdt,html:Sdt,imageReference:kdt,image:Edt,inlineCode:Cdt,linkReference:Tdt,link:Adt,listItem:_dt,list:jdt,paragraph:Rdt,root:Idt,strong:Pdt,table:Ddt,tableCell:Ldt,tableRow:Mdt,text:Fdt,thematicBreak:Bdt,toml:xT,yaml:xT,definition:xT,footnoteDefinition:xT};function xT(){}const wSe=-1,VR=0,Aw=1,sN=2,LB=3,$B=4,FB=5,BB=6,SSe=7,kSe=8,Qdt=typeof self=="object"?self:globalThis,OX=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Qdt[e](t)},zdt=(e,t)=>{const n=(r,s)=>(e.set(s,r),r),i=r=>{if(e.has(r))return e.get(r);const[s,a]=t[r];switch(s){case VR:case wSe:return n(a,r);case Aw:{const l=n([],r);for(const c of a)l.push(i(c));return l}case sN:{const l=n({},r);for(const[c,u]of a)l[i(c)]=i(u);return l}case LB:return n(new Date(a),r);case $B:{const{source:l,flags:c}=a;return n(new RegExp(l,c),r)}case FB:{const l=n(new Map,r);for(const[c,u]of a)l.set(i(c),i(u));return l}case BB:{const l=n(new Set,r);for(const c of a)l.add(i(c));return l}case SSe:{const{name:l,message:c}=a;return n(OX(l,c),r)}case kSe:return n(BigInt(a),r);case"BigInt":return n(Object(BigInt(a)),r);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:l}=new Uint8Array(a);return n(new DataView(l),a)}}return n(OX(s,a),r)};return i},wX=e=>zdt(new Map,e)(0),M0="",{toString:Vdt}={},{keys:Hdt}=Object,W1=e=>{const t=typeof e;if(t!=="object"||!e)return[VR,t];const n=Vdt.call(e).slice(8,-1);switch(n){case"Array":return[Aw,M0];case"Object":return[sN,M0];case"Date":return[LB,M0];case"RegExp":return[$B,M0];case"Map":return[FB,M0];case"Set":return[BB,M0];case"DataView":return[Aw,n]}return n.includes("Array")?[Aw,n]:n.includes("Error")?[SSe,n]:[sN,n]},OT=([e,t])=>e===VR&&(t==="function"||t==="symbol"),qdt=(e,t,n,i)=>{const r=(a,l)=>{const c=i.push(a)-1;return n.set(l,c),c},s=a=>{if(n.has(a))return n.get(a);let[l,c]=W1(a);switch(l){case VR:{let d=a;switch(c){case"bigint":l=kSe,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return r([wSe],a)}return r([l,d],a)}case Aw:{if(c){let h=a;return c==="DataView"?h=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(h=new Uint8Array(a)),r([c,[...h]],a)}const d=[],f=r([l,d],a);for(const h of a)d.push(s(h));return f}case sN:{if(c)switch(c){case"BigInt":return r([c,a.toString()],a);case"Boolean":case"Number":case"String":return r([c,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],f=r([l,d],a);for(const h of Hdt(a))(e||!OT(W1(a[h])))&&d.push([s(h),s(a[h])]);return f}case LB:return r([l,a.toISOString()],a);case $B:{const{source:d,flags:f}=a;return r([l,{source:d,flags:f}],a)}case FB:{const d=[],f=r([l,d],a);for(const[h,p]of a)(e||!(OT(W1(h))||OT(W1(p))))&&d.push([s(h),s(p)]);return f}case BB:{const d=[],f=r([l,d],a);for(const h of a)(e||!OT(W1(h)))&&d.push(s(h));return f}}const{message:u}=a;return r([l,{name:c,message:u}],a)};return s},SX=(e,{json:t,lossy:n}={})=>{const i=[];return qdt(!(t||n),!!t,new Map,i)(e),i},Zv=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?wX(SX(e,t)):structuredClone(e):(e,t)=>wX(SX(e,t));function Wdt(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Kdt(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Gdt(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Wdt,i=e.options.footnoteBackLabel||Kdt,r=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c0&&g.push({type:"text",value:" "});let x=typeof n=="string"?n:n(c,p);typeof x=="string"&&(x={type:"text",value:x}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(c,p),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const x=v.children[v.children.length-1];x&&x.type==="text"?x.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...g)}else d.push(...g);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(u,y),l.push(y)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Zv(a),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` +`});const u={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,u),e.applyData(t,u)}function Idt(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i1}function Pdt(e,t){const n={},i=e.all(t);let r=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++r0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Jd(t.children[1]),c=FR(t.children[t.children.length-1]);l&&c&&(a.position={start:l,end:c}),r.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Fdt(e,t,n){const i=n?n.children:void 0,s=(i?i.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,l=a?a.length:t.children.length;let c=-1;const u=[];for(;++c0,!0),i[0]),r=i.index+i[0].length,i=n.exec(t);return s.push(bX(t.slice(r),r>0,!1)),s.join("")}function bX(e,t,n){let i=0,r=e.length;if(t){let s=e.codePointAt(i);for(;s===mX||s===gX;)i++,s=e.codePointAt(i)}if(n){let s=e.codePointAt(r-1);for(;s===mX||s===gX;)r--,s=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function Qdt(e,t){const n={type:"text",value:Udt(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function zdt(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Vdt={blockquote:vdt,break:xdt,code:Odt,delete:wdt,emphasis:Sdt,footnoteReference:kdt,heading:Edt,html:Cdt,imageReference:Tdt,image:Adt,inlineCode:_dt,linkReference:Ndt,link:jdt,listItem:Rdt,list:Pdt,paragraph:Ddt,root:Mdt,strong:Ldt,table:$dt,tableCell:Bdt,tableRow:Fdt,text:Qdt,thematicBreak:zdt,toml:bT,yaml:bT,definition:bT,footnoteDefinition:bT};function bT(){}const SSe=-1,QR=0,Sw=1,nN=2,MB=3,LB=4,$B=5,FB=6,kSe=7,ESe=8,Hdt=typeof self=="object"?self:globalThis,yX=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Hdt[e](t)},qdt=(e,t)=>{const n=(r,s)=>(e.set(s,r),r),i=r=>{if(e.has(r))return e.get(r);const[s,a]=t[r];switch(s){case QR:case SSe:return n(a,r);case Sw:{const l=n([],r);for(const c of a)l.push(i(c));return l}case nN:{const l=n({},r);for(const[c,u]of a)l[i(c)]=i(u);return l}case MB:return n(new Date(a),r);case LB:{const{source:l,flags:c}=a;return n(new RegExp(l,c),r)}case $B:{const l=n(new Map,r);for(const[c,u]of a)l.set(i(c),i(u));return l}case FB:{const l=n(new Set,r);for(const c of a)l.add(i(c));return l}case kSe:{const{name:l,message:c}=a;return n(yX(l,c),r)}case ESe:return n(BigInt(a),r);case"BigInt":return n(Object(BigInt(a)),r);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:l}=new Uint8Array(a);return n(new DataView(l),a)}}return n(yX(s,a),r)};return i},vX=e=>qdt(new Map,e)(0),R0="",{toString:Wdt}={},{keys:Kdt}=Object,Q1=e=>{const t=typeof e;if(t!=="object"||!e)return[QR,t];const n=Wdt.call(e).slice(8,-1);switch(n){case"Array":return[Sw,R0];case"Object":return[nN,R0];case"Date":return[MB,R0];case"RegExp":return[LB,R0];case"Map":return[$B,R0];case"Set":return[FB,R0];case"DataView":return[Sw,n]}return n.includes("Array")?[Sw,n]:n.includes("Error")?[kSe,n]:[nN,n]},yT=([e,t])=>e===QR&&(t==="function"||t==="symbol"),Gdt=(e,t,n,i)=>{const r=(a,l)=>{const c=i.push(a)-1;return n.set(l,c),c},s=a=>{if(n.has(a))return n.get(a);let[l,c]=Q1(a);switch(l){case QR:{let d=a;switch(c){case"bigint":l=ESe,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return r([SSe],a)}return r([l,d],a)}case Sw:{if(c){let h=a;return c==="DataView"?h=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(h=new Uint8Array(a)),r([c,[...h]],a)}const d=[],f=r([l,d],a);for(const h of a)d.push(s(h));return f}case nN:{if(c)switch(c){case"BigInt":return r([c,a.toString()],a);case"Boolean":case"Number":case"String":return r([c,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const d=[],f=r([l,d],a);for(const h of Kdt(a))(e||!yT(Q1(a[h])))&&d.push([s(h),s(a[h])]);return f}case MB:return r([l,a.toISOString()],a);case LB:{const{source:d,flags:f}=a;return r([l,{source:d,flags:f}],a)}case $B:{const d=[],f=r([l,d],a);for(const[h,p]of a)(e||!(yT(Q1(h))||yT(Q1(p))))&&d.push([s(h),s(p)]);return f}case FB:{const d=[],f=r([l,d],a);for(const h of a)(e||!yT(Q1(h)))&&d.push(s(h));return f}}const{message:u}=a;return r([l,{name:c,message:u}],a)};return s},xX=(e,{json:t,lossy:n}={})=>{const i=[];return Gdt(!(t||n),!!t,new Map,i)(e),i},Kv=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?vX(xX(e,t)):structuredClone(e):(e,t)=>vX(xX(e,t));function Xdt(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Ydt(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Zdt(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Xdt,i=e.options.footnoteBackLabel||Ydt,r=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c0&&g.push({type:"text",value:" "});let x=typeof n=="string"?n:n(c,p);typeof x=="string"&&(x={type:"text",value:x}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(c,p),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const x=v.children[v.children.length-1];x&&x.type==="text"?x.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...g)}else d.push(...g);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(u,y),l.push(y)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Kv(a),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` -`}]}}const gE=function(e){if(e==null)return Jdt;if(typeof e=="function")return HR(e);if(typeof e=="object")return Array.isArray(e)?Xdt(e):Ydt(e);if(typeof e=="string")return Zdt(e);throw new Error("Expected function, string, or object as test")};function Xdt(e){const t=[];let n=-1;for(;++n":""))+")"})}return h;function h(){let p=ESe,g,b,v;if((!t||s(c,u,d[d.length-1]||void 0))&&(p=ift(n(c,d)),p[0]===A6))return p;if("children"in c&&c.children){const y=c;if(y.children&&p[0]!==nft)for(b=(i?y.children.length:-1)+a,v=d.concat(y);b>-1&&b":""))+")"})}return h;function h(){let p=CSe,g,b,v;if((!t||s(c,u,d[d.length-1]||void 0))&&(p=aft(n(c,d)),p[0]===T6))return p;if("children"in c&&c.children){const y=c;if(y.children&&p[0]!==sft)for(b=(i?y.children.length:-1)+a,v=d.concat(y);b>-1&&b0&&n.push({type:"text",value:` -`}),n}function kX(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function EX(e,t){const n=sft(e,t),i=n.one(e,void 0),r=Gdt(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&s.children.push({type:"text",value:` -`},r),s}function uft(e,t){return e&&"run"in e?async function(n,i){const r=EX(n,{file:i,...t});await e.run(r,i)}:function(n,i){return EX(n,{file:i,...e||t})}}function CX(e){if(e)throw e}var hA=Object.prototype.hasOwnProperty,TSe=Object.prototype.toString,TX=Object.defineProperty,AX=Object.getOwnPropertyDescriptor,_X=function(t){return typeof Array.isArray=="function"?Array.isArray(t):TSe.call(t)==="[object Array]"},NX=function(t){if(!t||TSe.call(t)!=="[object Object]")return!1;var n=hA.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&hA.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!i)return!1;var r;for(r in t);return typeof r>"u"||hA.call(t,r)},jX=function(t,n){TX&&n.name==="__proto__"?TX(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},RX=function(t,n){if(n==="__proto__")if(hA.call(t,n)){if(AX)return AX(t,n).value}else return;return t[n]},dft=function e(){var t,n,i,r,s,a,l=arguments[0],c=1,u=arguments.length,d=!1;for(typeof l=="boolean"&&(d=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});ca.length;let c;l&&a.push(r);try{c=e.apply(this,a)}catch(u){const d=u;if(l&&n)throw d;return r(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(s,r):c instanceof Error?r(c):s(c))}function r(a,...l){n||(n=!0,t(a,...l))}function s(a){r(null,a)}}const yd={basename:pft,dirname:mft,extname:gft,join:bft,sep:"/"};function pft(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');yE(e);let n=0,i=-1,r=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(s){n=r+1;break}}else i<0&&(s=!0,i=r+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,l=t.length-1;for(;r--;)if(e.codePointAt(r)===47){if(s){n=r+1;break}}else a<0&&(s=!0,a=r+1),l>-1&&(e.codePointAt(r)===t.codePointAt(l--)?l<0&&(i=r):(l=-1,i=a));return n===i?i=a:i<0&&(i=e.length),e.slice(n,i)}function mft(e){if(yE(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gft(e){yE(e);let t=e.length,n=-1,i=0,r=-1,s=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){i=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?r<0?r=t:s!==1&&(s=1):r>-1&&(s=-1)}return r<0||n<0||s===0||s===1&&r===n-1&&r===i+1?"":e.slice(r,n)}function bft(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vft(e,t){let n="",i=0,r=-1,s=0,a=-1,l,c;for(;++a<=e.length;){if(a2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",i=0):(n=n.slice(0,c),i=n.length-1-n.lastIndexOf("/")),r=a,s=0;continue}}else if(n.length>0){n="",i=0,r=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(r+1,a):n=e.slice(r+1,a),i=a-r-1;r=a,s=0}else l===46&&s>-1?s++:s=-1}return n}function yE(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xft={cwd:Oft};function Oft(){return"/"}function j6(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function wft(e){if(typeof e=="string")e=new URL(e);else if(!j6(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Sft(e)}function Sft(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n0){let[p,...g]=d;const b=i[h][1];N6(b)&&N6(p)&&(p=yM(!0,b,p)),i[h]=[u,p,...g]}}}}const Tft=new UB().freeze();function wM(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function SM(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function kM(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function PX(e){if(!N6(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function DX(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function wT(e){return Aft(e)?e:new ASe(e)}function Aft(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _ft(e){return typeof e=="string"||Nft(e)}function Nft(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jft="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",MX=[],LX={allowDangerousHtml:!0},Rft=/^(https?|ircs?|mailto|xmpp)$/i,Ift=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Pft(e){const t=Dft(e),n=Mft(e);return Lft(t.runSync(t.parse(n),n),e)}function Dft(e){const t=e.rehypePlugins||MX,n=e.remarkPlugins||MX,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...LX}:LX;return Tft().use(mdt).use(n).use(uft,i).use(t)}function Mft(e){const t=e.children||"",n=new ASe;return typeof t=="string"&&(n.value=t),n}function Lft(e,t){const n=t.allowedElements,i=t.allowElement,r=t.components,s=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||$ft;for(const d of Ift)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+jft+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),bE(e,u),Zlt(e,{Fragment:o.Fragment,components:r,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function u(d,f,h){if(d.type==="raw"&&h&&typeof f=="number")return a?h.children.splice(f,1):h.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let p;for(p in mM)if(Object.hasOwn(mM,p)&&Object.hasOwn(d.properties,p)){const g=d.properties[p],b=mM[p];(b===null||b.includes(d.tagName))&&(d.properties[p]=c(String(g||""),p,d))}}if(d.type==="element"){let p=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!p&&i&&typeof f=="number"&&(p=!i(d,f,h)),p&&h&&typeof f=="number")return l&&d.children?h.children.splice(f,1,...d.children):h.children.splice(f,1),f}}}function $ft(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return t===-1||r!==-1&&t>r||n!==-1&&t>n||i!==-1&&t>i||Rft.test(e.slice(0,t))?e:""}function $X(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,r=n.indexOf(t);for(;r!==-1;)i++,r=n.indexOf(t,r+t.length);return i}function Fft(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Bft(e,t,n){const r=gE((n||{}).ignore||[]),s=Uft(t);let a=-1;for(;++a0?{type:"text",value:S}:void 0),S===!1?h.lastIndex=O+1:(g!==O&&x.push({type:"text",value:u.value.slice(g,O)}),Array.isArray(S)?x.push(...S):S&&x.push(S),g=O+w[0].length,y=!0),!h.global)break;w=h.exec(u.value)}return y?(g?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const r=$X(e,"(");let s=$X(e,")");for(;i!==-1&&r>s;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),s++;return[e,n]}function _Se(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Cb(n)||QR(n))&&(!t||n!==47)}NSe.peek=uht;function nht(){this.buffer()}function iht(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function rht(){this.buffer()}function sht(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function aht(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function oht(e){this.exit(e)}function lht(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cht(e){this.exit(e)}function uht(){return"["}function NSe(e,t,n,i){const r=n.createTracker(i);let s=r.move("[^");const a=n.enter("footnoteReference"),l=n.enter("reference");return s+=r.move(n.safe(n.associationId(e),{after:"]",before:s})),l(),a(),s+=r.move("]"),s}function dht(){return{enter:{gfmFootnoteCallString:nht,gfmFootnoteCall:iht,gfmFootnoteDefinitionLabelString:rht,gfmFootnoteDefinition:sht},exit:{gfmFootnoteCallString:aht,gfmFootnoteCall:oht,gfmFootnoteDefinitionLabelString:lht,gfmFootnoteDefinition:cht}}}function fht(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:NSe},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,r,s,a){const l=s.createTracker(a);let c=l.move("[^");const u=s.enter("footnoteDefinition"),d=s.enter("label");return c+=l.move(s.safe(s.associationId(i),{before:c,after:"]"})),d(),c+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),c+=l.move((t?` -`:" ")+s.indentLines(s.containerFlow(i,l.current()),t?jSe:hht))),u(),c}}function hht(e,t,n){return t===0?e:jSe(e,t,n)}function jSe(e,t,n){return(n?"":" ")+e}const pht=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];RSe.peek=vht;function mht(){return{canContainEols:["delete"],enter:{strikethrough:bht},exit:{strikethrough:yht}}}function ght(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pht}],handlers:{delete:RSe}}}function bht(e){this.enter({type:"delete",children:[]},e)}function yht(e){this.exit(e)}function RSe(e,t,n,i){const r=n.createTracker(i),s=n.enter("strikethrough");let a=r.move("~~");return a+=n.containerPhrasing(e,{...r.current(),before:a,after:"~"}),a+=r.move("~~"),s(),a}function vht(){return"~"}function xht(e){return e.length}function Oht(e,t){const n=t||{},i=(n.align||[]).concat(),r=n.stringLength||xht,s=[],a=[],l=[],c=[];let u=0,d=-1;for(;++du&&(u=e[d].length);++yc[y])&&(c[y]=w)}b.push(x)}a[d]=b,l[d]=v}let f=-1;if(typeof i=="object"&&"length"in i)for(;++fc[f]&&(c[f]=x),p[f]=x),h[f]=w}a.splice(1,0,h),l.splice(1,0,p),d=-1;const g=[];for(;++d "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),kht);return r(),a}function kht(e,t,n){return">"+(n?"":" ")+e}function Eht(e,t){return UX(e,t.inConstruct,!0)&&!UX(e,t.notInConstruct,!1)}function UX(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++ia&&(a=s):s=1,r=i+t.length,i=n.indexOf(t,r);return a}function Tht(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Aht(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function _ht(e,t,n,i){const r=Aht(n),s=e.value||"",a=r==="`"?"GraveAccent":"Tilde";if(Tht(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(s,Nht);return f(),h}const l=n.createTracker(i),c=r.repeat(Math.max(Cht(s,r)+1,3)),u=n.enter("codeFenced");let d=l.move(c);if(e.lang){const f=n.enter(`codeFencedLang${a}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:` +`}),n}function OX(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function wX(e,t){const n=lft(e,t),i=n.one(e,void 0),r=Zdt(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&s.children.push({type:"text",value:` +`},r),s}function hft(e,t){return e&&"run"in e?async function(n,i){const r=wX(n,{file:i,...t});await e.run(r,i)}:function(n,i){return wX(n,{file:i,...e||t})}}function SX(e){if(e)throw e}var uA=Object.prototype.hasOwnProperty,ASe=Object.prototype.toString,kX=Object.defineProperty,EX=Object.getOwnPropertyDescriptor,CX=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ASe.call(t)==="[object Array]"},TX=function(t){if(!t||ASe.call(t)!=="[object Object]")return!1;var n=uA.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&uA.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!i)return!1;var r;for(r in t);return typeof r>"u"||uA.call(t,r)},AX=function(t,n){kX&&n.name==="__proto__"?kX(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},_X=function(t,n){if(n==="__proto__")if(uA.call(t,n)){if(EX)return EX(t,n).value}else return;return t[n]},pft=function e(){var t,n,i,r,s,a,l=arguments[0],c=1,u=arguments.length,d=!1;for(typeof l=="boolean"&&(d=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});ca.length;let c;l&&a.push(r);try{c=e.apply(this,a)}catch(u){const d=u;if(l&&n)throw d;return r(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(s,r):c instanceof Error?r(c):s(c))}function r(a,...l){n||(n=!0,t(a,...l))}function s(a){r(null,a)}}const gd={basename:bft,dirname:yft,extname:vft,join:xft,sep:"/"};function bft(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');mE(e);let n=0,i=-1,r=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(s){n=r+1;break}}else i<0&&(s=!0,i=r+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,l=t.length-1;for(;r--;)if(e.codePointAt(r)===47){if(s){n=r+1;break}}else a<0&&(s=!0,a=r+1),l>-1&&(e.codePointAt(r)===t.codePointAt(l--)?l<0&&(i=r):(l=-1,i=a));return n===i?i=a:i<0&&(i=e.length),e.slice(n,i)}function yft(e){if(mE(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function vft(e){mE(e);let t=e.length,n=-1,i=0,r=-1,s=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){i=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?r<0?r=t:s!==1&&(s=1):r>-1&&(s=-1)}return r<0||n<0||s===0||s===1&&r===n-1&&r===i+1?"":e.slice(r,n)}function xft(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function wft(e,t){let n="",i=0,r=-1,s=0,a=-1,l,c;for(;++a<=e.length;){if(a2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",i=0):(n=n.slice(0,c),i=n.length-1-n.lastIndexOf("/")),r=a,s=0;continue}}else if(n.length>0){n="",i=0,r=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(r+1,a):n=e.slice(r+1,a),i=a-r-1;r=a,s=0}else l===46&&s>-1?s++:s=-1}return n}function mE(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Sft={cwd:kft};function kft(){return"/"}function N6(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Eft(e){if(typeof e=="string")e=new URL(e);else if(!N6(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Cft(e)}function Cft(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n0){let[p,...g]=d;const b=i[h][1];_6(b)&&_6(p)&&(p=gM(!0,b,p)),i[h]=[u,p,...g]}}}}const Nft=new BB().freeze();function xM(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function OM(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function wM(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function jX(e){if(!_6(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function RX(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vT(e){return jft(e)?e:new _Se(e)}function jft(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Rft(e){return typeof e=="string"||Ift(e)}function Ift(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Pft="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",IX=[],PX={allowDangerousHtml:!0},Dft=/^(https?|ircs?|mailto|xmpp)$/i,Mft=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Lft(e){const t=$ft(e),n=Fft(e);return Bft(t.runSync(t.parse(n),n),e)}function $ft(e){const t=e.rehypePlugins||IX,n=e.remarkPlugins||IX,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...PX}:PX;return Nft().use(ydt).use(n).use(hft,i).use(t)}function Fft(e){const t=e.children||"",n=new _Se;return typeof t=="string"&&(n.value=t),n}function Bft(e,t){const n=t.allowedElements,i=t.allowElement,r=t.components,s=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||Uft;for(const d of Mft)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+Pft+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),pE(e,u),tct(e,{Fragment:o.Fragment,components:r,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function u(d,f,h){if(d.type==="raw"&&h&&typeof f=="number")return a?h.children.splice(f,1):h.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let p;for(p in hM)if(Object.hasOwn(hM,p)&&Object.hasOwn(d.properties,p)){const g=d.properties[p],b=hM[p];(b===null||b.includes(d.tagName))&&(d.properties[p]=c(String(g||""),p,d))}}if(d.type==="element"){let p=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!p&&i&&typeof f=="number"&&(p=!i(d,f,h)),p&&h&&typeof f=="number")return l&&d.children?h.children.splice(f,1,...d.children):h.children.splice(f,1),f}}}function Uft(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return t===-1||r!==-1&&t>r||n!==-1&&t>n||i!==-1&&t>i||Dft.test(e.slice(0,t))?e:""}function DX(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,r=n.indexOf(t);for(;r!==-1;)i++,r=n.indexOf(t,r+t.length);return i}function Qft(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function zft(e,t,n){const r=hE((n||{}).ignore||[]),s=Vft(t);let a=-1;for(;++a0?{type:"text",value:S}:void 0),S===!1?h.lastIndex=O+1:(g!==O&&x.push({type:"text",value:u.value.slice(g,O)}),Array.isArray(S)?x.push(...S):S&&x.push(S),g=O+w[0].length,y=!0),!h.global)break;w=h.exec(u.value)}return y?(g?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const r=DX(e,"(");let s=DX(e,")");for(;i!==-1&&r>s;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),s++;return[e,n]}function NSe(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Sb(n)||BR(n))&&(!t||n!==47)}jSe.peek=hht;function sht(){this.buffer()}function aht(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function oht(){this.buffer()}function lht(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function cht(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Du(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uht(e){this.exit(e)}function dht(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Du(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fht(e){this.exit(e)}function hht(){return"["}function jSe(e,t,n,i){const r=n.createTracker(i);let s=r.move("[^");const a=n.enter("footnoteReference"),l=n.enter("reference");return s+=r.move(n.safe(n.associationId(e),{after:"]",before:s})),l(),a(),s+=r.move("]"),s}function pht(){return{enter:{gfmFootnoteCallString:sht,gfmFootnoteCall:aht,gfmFootnoteDefinitionLabelString:oht,gfmFootnoteDefinition:lht},exit:{gfmFootnoteCallString:cht,gfmFootnoteCall:uht,gfmFootnoteDefinitionLabelString:dht,gfmFootnoteDefinition:fht}}}function mht(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:jSe},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,r,s,a){const l=s.createTracker(a);let c=l.move("[^");const u=s.enter("footnoteDefinition"),d=s.enter("label");return c+=l.move(s.safe(s.associationId(i),{before:c,after:"]"})),d(),c+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),c+=l.move((t?` +`:" ")+s.indentLines(s.containerFlow(i,l.current()),t?RSe:ght))),u(),c}}function ght(e,t,n){return t===0?e:RSe(e,t,n)}function RSe(e,t,n){return(n?"":" ")+e}const bht=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ISe.peek=wht;function yht(){return{canContainEols:["delete"],enter:{strikethrough:xht},exit:{strikethrough:Oht}}}function vht(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bht}],handlers:{delete:ISe}}}function xht(e){this.enter({type:"delete",children:[]},e)}function Oht(e){this.exit(e)}function ISe(e,t,n,i){const r=n.createTracker(i),s=n.enter("strikethrough");let a=r.move("~~");return a+=n.containerPhrasing(e,{...r.current(),before:a,after:"~"}),a+=r.move("~~"),s(),a}function wht(){return"~"}function Sht(e){return e.length}function kht(e,t){const n=t||{},i=(n.align||[]).concat(),r=n.stringLength||Sht,s=[],a=[],l=[],c=[];let u=0,d=-1;for(;++du&&(u=e[d].length);++yc[y])&&(c[y]=w)}b.push(x)}a[d]=b,l[d]=v}let f=-1;if(typeof i=="object"&&"length"in i)for(;++fc[f]&&(c[f]=x),p[f]=x),h[f]=w}a.splice(1,0,h),l.splice(1,0,p),d=-1;const g=[];for(;++d "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),Tht);return r(),a}function Tht(e,t,n){return">"+(n?"":" ")+e}function Aht(e,t){return $X(e,t.inConstruct,!0)&&!$X(e,t.notInConstruct,!1)}function $X(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++ia&&(a=s):s=1,r=i+t.length,i=n.indexOf(t,r);return a}function Nht(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function jht(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Rht(e,t,n,i){const r=jht(n),s=e.value||"",a=r==="`"?"GraveAccent":"Tilde";if(Nht(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(s,Iht);return f(),h}const l=n.createTracker(i),c=r.repeat(Math.max(_ht(s,r)+1,3)),u=n.enter("codeFenced");let d=l.move(c);if(e.lang){const f=n.enter(`codeFencedLang${a}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:` `,encode:["`"],...l.current()})),f()}return d+=l.move(` `),s&&(d+=l.move(s+` -`)),d+=l.move(c),u(),d}function Nht(e,t,n){return(n?"":" ")+e}function QB(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function jht(e,t,n,i){const r=QB(n),s=r==='"'?"Quote":"Apostrophe",a=n.enter("definition");let l=n.enter("label");const c=n.createTracker(i);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":` -`,...c.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=c.move(" "+r),u+=c.move(n.safe(e.title,{before:u,after:r,...c.current()})),u+=c.move(r),l()),a(),u}function Rht(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function FS(e){return"&#x"+e.toString(16).toUpperCase()+";"}function aN(e,t,n){const i=Yv(e),r=Yv(t);return i===void 0?r===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}PSe.peek=Iht;function PSe(e,t,n,i){const r=Rht(n),s=n.enter("emphasis"),a=n.createTracker(i),l=a.move(r);let c=a.move(n.containerPhrasing(e,{after:r,before:l,...a.current()}));const u=c.charCodeAt(0),d=aN(i.before.charCodeAt(i.before.length-1),u,r);d.inside&&(c=FS(u)+c.slice(1));const f=c.charCodeAt(c.length-1),h=aN(i.after.charCodeAt(0),f,r);h.inside&&(c=c.slice(0,-1)+FS(f));const p=a.move(r);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},l+c+p}function Iht(e,t,n){return n.options.emphasis||"*"}function Pht(e,t){let n=!1;return bE(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,A6}),!!((!e.depth||e.depth<3)&&PB(e)&&(t.options.setext||n))}function Dht(e,t,n,i){const r=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(i);if(Pht(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:` +`)),d+=l.move(c),u(),d}function Iht(e,t,n){return(n?"":" ")+e}function UB(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Pht(e,t,n,i){const r=UB(n),s=r==='"'?"Quote":"Apostrophe",a=n.enter("definition");let l=n.enter("label");const c=n.createTracker(i);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":` +`,...c.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=c.move(" "+r),u+=c.move(n.safe(e.title,{before:u,after:r,...c.current()})),u+=c.move(r),l()),a(),u}function Dht(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function MS(e){return"&#x"+e.toString(16).toUpperCase()+";"}function iN(e,t,n){const i=Wv(e),r=Wv(t);return i===void 0?r===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}DSe.peek=Mht;function DSe(e,t,n,i){const r=Dht(n),s=n.enter("emphasis"),a=n.createTracker(i),l=a.move(r);let c=a.move(n.containerPhrasing(e,{after:r,before:l,...a.current()}));const u=c.charCodeAt(0),d=iN(i.before.charCodeAt(i.before.length-1),u,r);d.inside&&(c=MS(u)+c.slice(1));const f=c.charCodeAt(c.length-1),h=iN(i.after.charCodeAt(0),f,r);h.inside&&(c=c.slice(0,-1)+MS(f));const p=a.move(r);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},l+c+p}function Mht(e,t,n){return n.options.emphasis||"*"}function Lht(e,t){let n=!1;return pE(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,T6}),!!((!e.depth||e.depth<3)&&IB(e)&&(t.options.setext||n))}function $ht(e,t,n,i){const r=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(i);if(Lht(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:` `,after:` `});return f(),d(),h+` `+(r===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(` `))+1))}const a="#".repeat(r),l=n.enter("headingAtx"),c=n.enter("phrasing");s.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:` -`,...s.current()});return/^[\t ]/.test(u)&&(u=FS(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),c(),l(),u}DSe.peek=Mht;function DSe(e){return e.value||""}function Mht(){return"<"}MSe.peek=Lht;function MSe(e,t,n,i){const r=QB(n),s=r==='"'?"Quote":"Apostrophe",a=n.enter("image");let l=n.enter("label");const c=n.createTracker(i);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=c.move(" "+r),u+=c.move(n.safe(e.title,{before:u,after:r,...c.current()})),u+=c.move(r),l()),u+=c.move(")"),a(),u}function Lht(){return"!"}LSe.peek=$ht;function LSe(e,t,n,i){const r=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return a(),n.stack=d,s(),r==="full"||!u||u!==f?c+=l.move(f+"]"):r==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function $ht(){return"!"}$Se.peek=Fht;function $Se(e,t,n){let i=e.value||"",r="`",s=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s\u007F]/.test(e.url))}BSe.peek=Bht;function BSe(e,t,n,i){const r=QB(n),s=r==='"'?"Quote":"Apostrophe",a=n.createTracker(i);let l,c;if(FSe(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),l(),n.stack=d,f}l=n.enter("link"),c=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${s}`),u+=a.move(" "+r),u+=a.move(n.safe(e.title,{before:u,after:r,...a.current()})),u+=a.move(r),c()),u+=a.move(")"),l(),u}function Bht(e,t,n){return FSe(e,n)?"<":"["}USe.peek=Uht;function USe(e,t,n,i){const r=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return a(),n.stack=d,s(),r==="full"||!u||u!==f?c+=l.move(f+"]"):r==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Uht(){return"["}function zB(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Qht(e){const t=zB(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function zht(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function QSe(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Vht(e,t,n,i){const r=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?zht(n):zB(n);const l=e.ordered?a==="."?")":".":Qht(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),QSe(n)===a&&d){let f=-1;for(;++f-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const l=n.createTracker(i);l.move(s+" ".repeat(a-s.length)),l.shift(a);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),d);return c(),u;function d(f,h,p){return h?(p?"":" ".repeat(a))+f:(p?s:s+" ".repeat(a-s.length))+f}}function Wht(e,t,n,i){const r=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,i);return s(),r(),a}const Kht=gE(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ght(e,t,n,i){return(e.children.some(function(a){return Kht(a)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function Xht(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}zSe.peek=Yht;function zSe(e,t,n,i){const r=Xht(n),s=n.enter("strong"),a=n.createTracker(i),l=a.move(r+r);let c=a.move(n.containerPhrasing(e,{after:r,before:l,...a.current()}));const u=c.charCodeAt(0),d=aN(i.before.charCodeAt(i.before.length-1),u,r);d.inside&&(c=FS(u)+c.slice(1));const f=c.charCodeAt(c.length-1),h=aN(i.after.charCodeAt(0),f,r);h.inside&&(c=c.slice(0,-1)+FS(f));const p=a.move(r+r);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},l+c+p}function Yht(e,t,n){return n.options.strong||"*"}function Zht(e,t,n,i){return n.safe(e.value,i)}function Jht(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ept(e,t,n){const i=(QSe(n)+(n.options.ruleSpaces?" ":"")).repeat(Jht(n));return n.options.ruleSpaces?i.slice(0,-1):i}const VSe={blockquote:Sht,break:QX,code:_ht,definition:jht,emphasis:PSe,hardBreak:QX,heading:Dht,html:DSe,image:MSe,imageReference:LSe,inlineCode:$Se,link:BSe,linkReference:USe,list:Vht,listItem:qht,paragraph:Wht,root:Ght,strong:zSe,text:Zht,thematicBreak:ept};function tpt(){return{enter:{table:npt,tableData:zX,tableHeader:zX,tableRow:rpt},exit:{codeText:spt,table:ipt,tableData:AM,tableHeader:AM,tableRow:AM}}}function npt(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function ipt(e){this.exit(e),this.data.inTable=void 0}function rpt(e){this.enter({type:"tableRow",children:[]},e)}function AM(e){this.exit(e)}function zX(e){this.enter({type:"tableCell",children:[]},e)}function spt(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,apt));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function apt(e,t){return t==="|"?t:e}function opt(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,r=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,...s.current()});return/^[\t ]/.test(u)&&(u=MS(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),c(),l(),u}MSe.peek=Fht;function MSe(e){return e.value||""}function Fht(){return"<"}LSe.peek=Bht;function LSe(e,t,n,i){const r=UB(n),s=r==='"'?"Quote":"Apostrophe",a=n.enter("image");let l=n.enter("label");const c=n.createTracker(i);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=c.move(" "+r),u+=c.move(n.safe(e.title,{before:u,after:r,...c.current()})),u+=c.move(r),l()),u+=c.move(")"),a(),u}function Bht(){return"!"}$Se.peek=Uht;function $Se(e,t,n,i){const r=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return a(),n.stack=d,s(),r==="full"||!u||u!==f?c+=l.move(f+"]"):r==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Uht(){return"!"}FSe.peek=Qht;function FSe(e,t,n){let i=e.value||"",r="`",s=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s\u007F]/.test(e.url))}USe.peek=zht;function USe(e,t,n,i){const r=UB(n),s=r==='"'?"Quote":"Apostrophe",a=n.createTracker(i);let l,c;if(BSe(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),l(),n.stack=d,f}l=n.enter("link"),c=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${s}`),u+=a.move(" "+r),u+=a.move(n.safe(e.title,{before:u,after:r,...a.current()})),u+=a.move(r),c()),u+=a.move(")"),l(),u}function zht(e,t,n){return BSe(e,n)?"<":"["}QSe.peek=Vht;function QSe(e,t,n,i){const r=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return a(),n.stack=d,s(),r==="full"||!u||u!==f?c+=l.move(f+"]"):r==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Vht(){return"["}function QB(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Hht(e){const t=QB(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function qht(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function zSe(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Wht(e,t,n,i){const r=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?qht(n):QB(n);const l=e.ordered?a==="."?")":".":Hht(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),zSe(n)===a&&d){let f=-1;for(;++f-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const l=n.createTracker(i);l.move(s+" ".repeat(a-s.length)),l.shift(a);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),d);return c(),u;function d(f,h,p){return h?(p?"":" ".repeat(a))+f:(p?s:s+" ".repeat(a-s.length))+f}}function Xht(e,t,n,i){const r=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,i);return s(),r(),a}const Yht=hE(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Zht(e,t,n,i){return(e.children.some(function(a){return Yht(a)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function Jht(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}VSe.peek=ept;function VSe(e,t,n,i){const r=Jht(n),s=n.enter("strong"),a=n.createTracker(i),l=a.move(r+r);let c=a.move(n.containerPhrasing(e,{after:r,before:l,...a.current()}));const u=c.charCodeAt(0),d=iN(i.before.charCodeAt(i.before.length-1),u,r);d.inside&&(c=MS(u)+c.slice(1));const f=c.charCodeAt(c.length-1),h=iN(i.after.charCodeAt(0),f,r);h.inside&&(c=c.slice(0,-1)+MS(f));const p=a.move(r+r);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},l+c+p}function ept(e,t,n){return n.options.strong||"*"}function tpt(e,t,n,i){return n.safe(e.value,i)}function npt(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ipt(e,t,n){const i=(zSe(n)+(n.options.ruleSpaces?" ":"")).repeat(npt(n));return n.options.ruleSpaces?i.slice(0,-1):i}const HSe={blockquote:Cht,break:FX,code:Rht,definition:Pht,emphasis:DSe,hardBreak:FX,heading:$ht,html:MSe,image:LSe,imageReference:$Se,inlineCode:FSe,link:USe,linkReference:QSe,list:Wht,listItem:Ght,paragraph:Xht,root:Zht,strong:VSe,text:tpt,thematicBreak:ipt};function rpt(){return{enter:{table:spt,tableData:BX,tableHeader:BX,tableRow:opt},exit:{codeText:lpt,table:apt,tableData:CM,tableHeader:CM,tableRow:CM}}}function spt(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function apt(e){this.exit(e),this.data.inTable=void 0}function opt(e){this.enter({type:"tableRow",children:[]},e)}function CM(e){this.exit(e)}function BX(e){this.enter({type:"tableCell",children:[]},e)}function lpt(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,cpt));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function cpt(e,t){return t==="|"?t:e}function upt(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,r=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:a,tableCell:c,tableRow:l}};function a(p,g,b,v){return u(d(p,b,v),p.align)}function l(p,g,b,v){const y=f(p,b,v),x=u([y]);return x.slice(0,x.indexOf(` -`))}function c(p,g,b,v){const y=b.enter("tableCell"),x=b.enter("phrasing"),w=b.containerPhrasing(p,{...v,before:s,after:s});return x(),y(),w}function u(p,g){return Oht(p,{align:g,alignDelimiters:i,padding:n,stringLength:r})}function d(p,g,b){const v=p.children;let y=-1;const x=[],w=g.enter("table");for(;++y0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Ept={tokenize:Ipt,partial:!0};function Cpt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Npt,continuation:{tokenize:jpt},exit:Rpt}},text:{91:{name:"gfmFootnoteCall",tokenize:_pt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Tpt,resolveTo:Apt}}}}function Tpt(e,t,n){const i=this;let r=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;r--;){const c=i.events[r][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!a||!a._balanced)return n(c);const u=Mu(i.sliceSerialize({start:a.end,end:i.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Apt(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...l),e}function _pt(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,a;return l;function l(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(s>999||f===93&&!a||f===null||f===91||_r(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return r.includes(Mu(i.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return _r(f)||(a=!0),s++,e.consume(f),f===92?d:u}function d(f){return f===91||f===92||f===93?(e.consume(f),s++,u):u(f)}}function Npt(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,a=0,l;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(a>999||g===93&&!l||g===null||g===91||_r(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=Mu(i.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return _r(g)||(l=!0),a++,e.consume(g),g===92?f:d}function f(g){return g===91||g===92||g===93?(e.consume(g),a++,d):d(g)}function h(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),r.includes(s)||r.push(s),zi(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function jpt(e,t,n){return e.check(mE,t,e.attempt(Ept,t,n))}function Rpt(e){e.exit("gfmFootnoteDefinition")}function Ipt(e,t,n){const i=this;return zi(e,r,"gfmFootnoteDefinitionIndent",5);function r(s){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function Ppt(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:r};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(a,l){let c=-1;for(;++c1?c(g):(a.consume(g),f++,p);if(f<2&&!n)return c(g);const v=a.exit("strikethroughSequenceTemporary"),y=Yv(g);return v._open=!y||y===2&&!!b,v._close=!b||b===2&&!!y,l(g)}}}class Dpt{constructor(){this.map=[]}add(t,n,i){Mpt(this,t,n,i)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let r=i.pop();for(;r;){for(const s of r)t.push(s);r=i.pop()}this.map.length=0}}function Mpt(e,t,n,i){let r=0;if(!(n===0&&i.length===0)){for(;r-1;){const A=i.events[j][1].type;if(A==="lineEnding"||A==="linePrefix")j--;else break}const T=j>-1?i.events[j][1].type:null,L=T==="tableHead"||T==="tableRow"?S:c;return L===S&&i.parser.lazy[i.now().line]?n(_):L(_)}function c(_){return e.enter("tableHead"),e.enter("tableRow"),u(_)}function u(_){return _===124||(a=!0,s+=1),d(_)}function d(_){return _===null?n(_):kn(_)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),p):n(_):Ci(_)?zi(e,d,"whitespace")(_):(s+=1,a&&(a=!1,r+=1),_===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),f(_)))}function f(_){return _===null||_===124||_r(_)?(e.exit("data"),d(_)):(e.consume(_),_===92?h:f)}function h(_){return _===92||_===124?(e.consume(_),f):f(_)}function p(_){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(_):(e.enter("tableDelimiterRow"),a=!1,Ci(_)?zi(e,g,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):g(_))}function g(_){return _===45||_===58?v(_):_===124?(a=!0,e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),b):k(_)}function b(_){return Ci(_)?zi(e,v,"whitespace")(_):v(_)}function v(_){return _===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),y):_===45?(s+=1,y(_)):_===null||kn(_)?O(_):k(_)}function y(_){return _===45?(e.enter("tableDelimiterFiller"),x(_)):k(_)}function x(_){return _===45?(e.consume(_),x):_===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(_))}function w(_){return Ci(_)?zi(e,O,"whitespace")(_):O(_)}function O(_){return _===124?g(_):_===null||kn(_)?!a||r!==s?k(_):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(_)):k(_)}function k(_){return n(_)}function S(_){return e.enter("tableRow"),E(_)}function E(_){return _===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),E):_===null||kn(_)?(e.exit("tableRow"),t(_)):Ci(_)?zi(e,E,"whitespace")(_):(e.enter("data"),C(_))}function C(_){return _===null||_===124||_r(_)?(e.exit("data"),E(_)):(e.consume(_),_===92?N:C)}function N(_){return _===92||_===124?(e.consume(_),C):C(_)}}function Bpt(e,t){let n=-1,i=!0,r=0,s=[0,0,0,0],a=[0,0,0,0],l=!1,c=0,u,d,f;const h=new Dpt;for(;++nn[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return r!==void 0&&(s.end=Object.assign({},ty(t.events,r)),e.add(r,0,[["exit",s,t]]),s=void 0),s}function HX(e,t,n,i,r){const s=[],a=ty(t.events,n);r&&(r.end=Object.assign({},a),s.push(["exit",r,t])),i.end=Object.assign({},a),s.push(["exit",i,t]),e.add(n+1,0,s)}function ty(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const Upt={name:"tasklistCheck",tokenize:zpt};function Qpt(){return{text:{91:Upt}}}function zpt(e,t,n){const i=this;return r;function r(c){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),s)}function s(c){return _r(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return kn(c)?t(c):Ci(c)?e.check({tokenize:Vpt},t,n)(c):n(c)}}function Vpt(e,t,n){return zi(e,i,"whitespace");function i(r){return r===null?n(r):t(r)}}function Hpt(e){return oSe([gpt(),Cpt(),Ppt(e),$pt(),Qpt()])}const qpt={};function Wpt(e){const t=this,n=e||qpt,i=t.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Hpt(n)),s.push(fpt()),a.push(hpt(n))}const qX=function(e,t,n){const i=gE(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++tu&&(u=d):d&&(u!==void 0&&u>-1&&c.push(` -`.repeat(u)||" "),u=-1,c.push(d))}return c.join("")}function eke(e,t,n){return e.type==="element"?tmt(e,t,n):e.type==="text"?n.whitespace==="normal"?tke(e,n):nmt(e):[]}function tmt(e,t,n){const i=nke(e,n),r=e.children||[];let s=-1,a=[];if(Jpt(e))return a;let l,c;for(I6(e)||XX(e)&&qX(t,e,XX)?c=` -`:Zpt(e)?(l=2,c=2):JSe(e)&&(l=1,c=1);++s]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",g=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],b=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],v=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:b,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:v},k={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},S=[k,f,l,n,e.C_BLOCK_COMMENT_MODE,d,u],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:S.concat([{begin:/\(/,end:/\)/,keywords:O,contains:S.concat(["self"]),relevance:0}]),relevance:0},C={className:"function",begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:O,relevance:0},{begin:p,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,l,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"",keywords:O,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function cmt(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=lmt(e),i=n.keywords;return i.type=[...i.type,...t.type],i.literal=[...i.literal,...t.literal],i.built_in=[...i.built_in,...t.built_in],i._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function qB(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(l);const c={match:/\\"/},u={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),g={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},b=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],v=["true","false"],y={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],w=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:b,literal:v,built_in:[...x,...w,"set","shopt",...O,...k]},contains:[p,e.SHEBANG(),g,f,s,a,y,l,c,u,d,n]}}function umt(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",a="("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",v={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[f,l,n,e.C_BLOCK_COMMENT_MODE,d,u],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:y.concat([{begin:/\(/,end:/\)/,keywords:v,contains:y.concat(["self"]),relevance:0}]),relevance:0},w={begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(h,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,f]};return{name:"C",aliases:["h"],keywords:v,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:f,strings:u,keywords:v}}}function dmt(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",a="(?!struct)("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",g=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],b=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],v=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:b,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:v},k={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},S=[k,f,l,n,e.C_BLOCK_COMMENT_MODE,d,u],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:S.concat([{begin:/\(/,end:/\)/,keywords:O,contains:S.concat(["self"]),relevance:0}]),relevance:0},C={className:"function",begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:O,relevance:0},{begin:p,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,l,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"",keywords:O,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function fmt(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],i=["default","false","null","true"],r=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:r.concat(s),built_in:t,literal:i},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},f=e.inherit(d,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:a},p=e.inherit(h,{illegal:/\n/}),g={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},b={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},v=e.inherit(b,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});h.contains=[b,g,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,c,e.C_BLOCK_COMMENT_MODE],p.contains=[v,g,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,c,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[u,b,g,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},w=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",O={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+w+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[y,c,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},O]}}const hmt=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),pmt=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],mmt=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],gmt=[...pmt,...mmt],bmt=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),ymt=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),vmt=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),xmt=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Omt(e){const t=e.regex,n=hmt(e),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r="and or not only",s=/@-?\w[\w]*(-\w+)*/,a="[a-zA-Z-][a-zA-Z0-9_-]*",l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,i,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+a,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+ymt.join("|")+")"},{begin:":(:)?("+vmt.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+xmt.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:r,attribute:bmt.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+gmt.join("|")+")\\b"}]}}function wmt(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Smt(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"rke(e,t,n-1))}function Emt(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=n+rke("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),c={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},d={className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:c,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:c,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,YX,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},YX,u]}}const ZX="[A-Za-z$_][0-9A-Za-z$_]*",Cmt=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Tmt=["true","false","null","undefined","NaN","Infinity"],ske=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ake=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],oke=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Amt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],_mt=[].concat(oke,ske,ake);function lke(e){const t=e.regex,n=(M,{after:B})=>{const I="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(M,B)=>{const I=M[0].length+M.index,H=M.input[I];if(H==="<"||H===","){B.ignoreMatch();return}H===">"&&(n(M,{after:I})||B.ignoreMatch());let X;const Q=M.input.substring(I);if(X=Q.match(/^\s*=/)){B.ignoreMatch();return}if((X=Q.match(/^\s+extends\s+/))&&X.index===0){B.ignoreMatch();return}}},l={$pattern:ZX,keyword:Cmt,literal:Tmt,built_in:_mt,"variable.language":Amt},c="[0-9](_?[0-9])*",u=`\\.(${c})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${d})((${u})|\\.)?|(${u}))[eE][+-]?(${c})\\b`},{begin:`\\b(${d})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},b={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},x={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},w=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,b,v,{match:/\$\d+/},f];h.contains=w.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(w)});const O=[].concat(x,h.contains),k=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(O)}]),S={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},E={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...ske,...ake]}},N={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},_={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function T(M){return t.concat("(?!",M.join("|"),")")}const L={match:t.concat(/\b/,T([...oke,"super","import"].map(M=>`${M}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},A={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},R={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},P="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",$={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(P)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),N,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,b,v,x,{match:/\$\d+/},f,C,{scope:"attr",match:i+t.lookahead(":"),relevance:0},$,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,e.REGEXP_MODE,{className:"function",begin:P,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[S,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},L,j,E,R,{match:/\$[(.]/}]}}function cke(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],r={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var iy="[0-9](_*[0-9])*",CT=`\\.(${iy})`,TT="[0-9a-fA-F](_*[0-9a-fA-F])*",Nmt={className:"number",variants:[{begin:`(\\b(${iy})((${CT})|\\.)?|(${CT}))[eE][+-]?(${iy})[fFdD]?\\b`},{begin:`\\b(${iy})((${CT})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${CT})[fFdD]?\\b`},{begin:`\\b(${iy})[fFdD]\\b`},{begin:`\\b0[xX]((${TT})\\.?|(${TT})?\\.(${TT}))[pP][+-]?(${iy})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${TT})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function jmt(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},a={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,r]}]};r.contains.push(a);const l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"string"}),"self"]}]},u=Nmt,d=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),f={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=f;return h.variants[1].contains=[f],f.variants[1].contains=[h],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,d,n,i,l,c,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[f,e.C_LINE_COMMENT_MODE,d],relevance:0},e.C_LINE_COMMENT_MODE,d,l,c,a,e.C_NUMBER_MODE]},d]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},l,c]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` -`},u]}}const Rmt=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Imt=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Pmt=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Dmt=[...Imt,...Pmt],Mmt=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),uke=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),dke=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Lmt=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),$mt=uke.concat(dke).sort().reverse();function Fmt(e){const t=Rmt(e),n=$mt,i="and or not only",r="[\\w-]+",s="("+r+"|@\\{"+r+"\\})",a=[],l=[],c=function(w){return{className:"string",begin:"~?"+w+".*?"+w}},u=function(w,O,k){return{className:w,begin:O,relevance:k}},d={$pattern:/[a-z-]+/,keyword:i,attribute:Mmt.join(" ")},f={begin:"\\(",end:"\\)",contains:l,keywords:d,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c("'"),c('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,f,u("variable","@@?"+r,10),u("variable","@\\{"+r+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:r+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const h=l.concat({begin:/\{/,end:/\}/,contains:a}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},g={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Lmt.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},b={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:d,returnEnd:!0,contains:l,relevance:0}},v={className:"variable",variants:[{begin:"@"+r+"\\s*:",relevance:15},{begin:"@"+r}],starts:{end:"[;}]",returnEnd:!0,contains:h}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+r+"\\}"),{begin:"\\b("+Dmt.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",s,0),u("selector-id","#"+s),u("selector-class","\\."+s,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+uke.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+dke.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:h},{begin:"!important"},t.FUNCTION_DISPATCH]},x={begin:r+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,b,v,x,g,y,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:a}}function Bmt(e){const t="\\[=*\\[",n="\\]=*\\]",i={begin:t,end:n,contains:["self"]},r=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[i],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[i],relevance:5}])}}function fke(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},r={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=e.inherit(u,{contains:[]}),h=e.inherit(d,{contains:[]});u.contains.push(h),d.contains.push(f);let p=[n,c];return[u,d,f,h].forEach(y=>{y.contains=y.contains.concat(p)}),p=p.concat(u,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,s,u,d,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},r,i,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Umt(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},c={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function Qmt(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],i=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},a={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[e.BACKSLASH_ESCAPE,s,c],f=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(b,v,y="\\1")=>{const x=y==="\\1"?y:t.concat(y,v);return t.concat(t.concat("(?:",b,")"),v,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,y,i)},p=(b,v,y)=>t.concat(t.concat("(?:",b,")"),v,/(?:\\.|[^\\\/])*?/,y,i),g=[c,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:h("s|tr|y",t.either(...f,{capture:!0}))},{begin:h("s|tr|y","\\(","\\)")},{begin:h("s|tr|y","\\[","\\]")},{begin:h("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...f,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=g,a.contains=g,{name:"Perl",aliases:["pl","pm"],keywords:r,contains:g}}function zmt(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,i=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),r=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),a={scope:"variable",match:"\\$+"+i},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),d=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(c)}),f={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(A,R)=>{R.data._beginMatch=A[1]||A[2]},"on:end":(A,R)=>{R.data._beginMatch!==A[1]&&R.ignoreMatch()}},h=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ -]`,g={scope:"string",variants:[d,u,f,h]},b={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},v=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],O={keyword:y,literal:(A=>{const R=[];return A.forEach(P=>{R.push(P),P.toLowerCase()===P?R.push(P.toUpperCase()):R.push(P.toLowerCase())}),R})(v),built_in:x},k=A=>A.map(R=>R.replace(/\|\d+$/,"")),S={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",k(x).join("\\b|"),"\\b)"),r],scope:{1:"keyword",4:"title.class"}}]},E=t.concat(i,"\\b(?!\\()"),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),E],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[r,t.concat(/::/,t.lookahead(/(?!class\b)/)),E],scope:{1:"title.class",3:"variable.constant"}},{match:[r,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[r,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},N={scope:"attr",match:t.concat(i,t.lookahead(":"),t.lookahead(/(?!::)/))},_={relevance:0,begin:/\(/,end:/\)/,keywords:O,contains:[N,a,C,e.C_BLOCK_COMMENT_MODE,g,b,S]},j={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",k(y).join("\\b|"),"|",k(x).join("\\b|"),"\\b)"),i,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[_]};_.contains.push(j);const T=[N,C,e.C_BLOCK_COMMENT_MODE,g,b,S],L={begin:t.concat(/#\[\s*\\?/,t.either(r,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:v,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:v,keyword:["new","array"]},contains:["self",...T]},...T,{scope:"meta",variants:[{match:r},{match:s}]}]};return{case_insensitive:!1,keywords:O,contains:[L,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},a,j,C,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},S,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:O,contains:["self",L,a,C,e.C_BLOCK_COMMENT_MODE,g,b]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},g,b]}}function Vmt(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function Hmt(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function pke(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},d={begin:/\{\{/,relevance:0},f={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c,d,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c,d,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h="[0-9](_?[0-9])*",p=`(\\b(${h}))?\\.(${h})|\\b(${h})\\.`,g=`\\b|${i.join("|")}`,b={className:"number",relevance:0,variants:[{begin:`(\\b(${h})|(${p}))[eE][+-]?(${h})[jJ]?(?=${g})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${h})[jJ](?=${g})`}]},v={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",c,b,f,e.HASH_COMMENT_MODE]}]};return u.contains=[f,b,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[c,b,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,v,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[b,y,f]}]}}function qmt(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Wmt(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),r=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[r,i]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,i]},{scope:{1:"punctuation",2:"number"},match:[s,i]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,i]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:r},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Kmt(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=t.concat(i,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:a},f={className:"string",contains:[e.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,d]})]}]},h="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",g={className:"number",relevance:0,variants:[{begin:`\\b(${h})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},b={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},S=[f,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/\b(class|module)\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,r],scope:{2:"title.class"},keywords:a},{relevance:0,match:[r,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:i,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[b]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[f,{begin:n}],relevance:0},g,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,u),relevance:0}].concat(c,u);d.contains=S,b.contains=S;const _=[{begin:/^\s*=>/,starts:{end:"$",contains:S}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:S}}];return u.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(_).concat(u).concat(S)}}function Gmt(e){const t=e.regex,n=/(r#)?/,i=t.concat(n,e.UNDERSCORE_IDENT_RE),r=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,r,t.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],c=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:l,literal:c,built_in:u},illegal:""},s]}}const Xmt=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Ymt=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Zmt=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Jmt=[...Ymt,...Zmt],egt=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),tgt=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),ngt=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),igt=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function rgt(e){const t=Xmt(e),n=ngt,i=tgt,r="@[a-z-]+",s="and or not only",l={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Jmt.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+igt.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,l,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:r,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:egt.join(" ")},contains:[{begin:r,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function sgt(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function agt(e){const t=e.regex,n=e.COMMENT("--","$"),i={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},r={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=d,g=[...u,...c].filter(k=>!d.includes(k)),b={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},v={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function x(k){return t.concat(/\b/,t.either(...k.map(S=>S.replace(/\s+/,"\\s+"))),/\b/)}const w={scope:"keyword",match:x(h),relevance:0};function O(k,{exceptions:S,when:E}={}){const C=E;return S=S||[],k.map(N=>N.match(/\|\d+$/)||S.includes(N)?N:C(N)?`${N}|0`:N)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:O(g,{when:k=>k.length<3}),literal:s,type:l,built_in:f},contains:[{scope:"type",match:x(a)},w,y,b,i,r,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,v]}}function mke(e){return e?typeof e=="string"?e:e.source:null}function K1(e){return mr("(?=",e,")")}function mr(...e){return e.map(n=>mke(n)).join("")}function ogt(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function _o(...e){return"("+(ogt(e).capture?"":"?:")+e.map(i=>mke(i)).join("|")+")"}const WB=e=>mr(/\b/,e,/\w$/.test(e)?/\b/:/\B/),lgt=["Protocol","Type"].map(WB),JX=["init","self"].map(WB),cgt=["Any","Self"],_M=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],eY=["false","nil","true"],ugt=["assignment","associativity","higherThan","left","lowerThan","none","right"],dgt=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],tY=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],gke=_o(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),bke=_o(gke,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),NM=mr(gke,bke,"*"),yke=_o(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),oN=_o(yke,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),gd=mr(yke,oN,"*"),AT=mr(/[A-Z]/,oN,"*"),fgt=["attached","autoclosure",mr(/convention\(/,_o("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",mr(/objc\(/,gd,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],hgt=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function pgt(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,n],r={match:[/\./,_o(...lgt,...JX)],className:{2:"keyword"}},s={match:mr(/\./,_o(..._M)),relevance:0},a=_M.filter(Te=>typeof Te=="string").concat(["_|0"]),l=_M.filter(Te=>typeof Te!="string").concat(cgt).map(WB),c={variants:[{className:"keyword",match:_o(...l,...JX)}]},u={$pattern:_o(/\b\w+/,/#\w+/),keyword:a.concat(dgt),literal:eY},d=[r,s,c],f={match:mr(/\./,_o(...tY)),relevance:0},h={className:"built_in",match:mr(/\b/,_o(...tY),/(?=\()/)},p=[f,h],g={match:/->/,relevance:0},b={className:"operator",relevance:0,variants:[{match:NM},{match:`\\.(\\.|${bke})+`}]},v=[g,b],y="([0-9]_*)+",x="([0-9a-fA-F]_*)+",w={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${x})(\\.(${x}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},O=(Te="")=>({className:"subst",variants:[{match:mr(/\\/,Te,/[0\\tnr"']/)},{match:mr(/\\/,Te,/u\{[0-9a-fA-F]{1,8}\}/)}]}),k=(Te="")=>({className:"subst",match:mr(/\\/,Te,/[\t ]*(?:[\r\n]|\r\n)/)}),S=(Te="")=>({className:"subst",label:"interpol",begin:mr(/\\/,Te,/\(/),end:/\)/}),E=(Te="")=>({begin:mr(Te,/"""/),end:mr(/"""/,Te),contains:[O(Te),k(Te),S(Te)]}),C=(Te="")=>({begin:mr(Te,/"/),end:mr(/"/,Te),contains:[O(Te),S(Te)]}),N={className:"string",variants:[E(),E("#"),E("##"),E("###"),C(),C("#"),C("##"),C("###")]},_=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],j={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:_},T=Te=>{const rt=mr(Te,/\//),Be=mr(/\//,Te);return{begin:rt,end:Be,contains:[..._,{scope:"comment",begin:`#(?!.*${Be})`,end:/$/}]}},L={scope:"regexp",variants:[T("###"),T("##"),T("#"),j]},A={match:mr(/`/,gd,/`/)},R={className:"variable",match:/\$\d+/},P={className:"variable",match:`\\$${oN}+`},$=[A,R,P],M={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:hgt,contains:[...v,w,N]}]}},B={scope:"keyword",match:mr(/@/,_o(...fgt),K1(_o(/\(/,/\s+/)))},I={scope:"meta",match:mr(/@/,gd)},H=[M,B,I],X={match:K1(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:mr(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,oN,"+")},{className:"type",match:AT,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:mr(/\s+&\s+/,K1(AT)),relevance:0}]},Q={begin://,keywords:u,contains:[...i,...d,...H,g,X]};X.contains.push(Q);const q={match:mr(gd,/\s*:/),keywords:"_|0",relevance:0},U={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",q,...i,L,...d,...p,...v,w,N,...$,...H,X]},te={begin://,keywords:"repeat each",contains:[...i,X]},le={begin:_o(K1(mr(gd,/\s*:/)),K1(mr(gd,/\s+/,gd,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:gd}]},oe={begin:/\(/,end:/\)/,keywords:u,contains:[le,...i,...d,...v,w,N,...H,X,U],endsParent:!0,illegal:/["']/},re={match:[/(func|macro)/,/\s+/,_o(A.match,gd,NM)],className:{1:"keyword",3:"title.function"},contains:[te,oe,t],illegal:[/\[/,/%/]},he={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[te,oe,t],illegal:/\[|%/},K={match:[/operator/,/\s+/,NM],className:{1:"keyword",3:"title"}},G={begin:[/precedencegroup/,/\s+/,AT],className:{1:"keyword",3:"title"},contains:[X],keywords:[...ugt,...eY],end:/}/},se={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},de={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},ke={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,gd,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[te,...d,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:AT},...d],relevance:0}]};for(const Te of N.variants){const rt=Te.contains.find(Me=>Me.label==="interpol");rt.keywords=u;const Be=[...d,...p,...v,w,N,...$];rt.contains=[...Be,{begin:/\(/,end:/\)/,contains:["self",...Be]}]}return{name:"Swift",keywords:u,contains:[...i,re,he,se,de,ke,K,G,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},L,...d,...p,...v,w,N,...$,...H,X,U]}}const lN="[A-Za-z$_][0-9A-Za-z$_]*",vke=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],xke=["true","false","null","undefined","NaN","Infinity"],Oke=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],wke=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ske=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],kke=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Eke=[].concat(Ske,Oke,wke);function mgt(e){const t=e.regex,n=(M,{after:B})=>{const I="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(M,B)=>{const I=M[0].length+M.index,H=M.input[I];if(H==="<"||H===","){B.ignoreMatch();return}H===">"&&(n(M,{after:I})||B.ignoreMatch());let X;const Q=M.input.substring(I);if(X=Q.match(/^\s*=/)){B.ignoreMatch();return}if((X=Q.match(/^\s+extends\s+/))&&X.index===0){B.ignoreMatch();return}}},l={$pattern:lN,keyword:vke,literal:xke,built_in:Eke,"variable.language":kke},c="[0-9](_?[0-9])*",u=`\\.(${c})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${d})((${u})|\\.)?|(${u}))[eE][+-]?(${c})\\b`},{begin:`\\b(${d})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},b={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},x={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},w=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,b,v,{match:/\$\d+/},f];h.contains=w.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(w)});const O=[].concat(x,h.contains),k=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(O)}]),S={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},E={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Oke,...wke]}},N={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},_={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function T(M){return t.concat("(?!",M.join("|"),")")}const L={match:t.concat(/\b/,T([...Ske,"super","import"].map(M=>`${M}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},A={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},R={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},P="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",$={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(P)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),N,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,b,v,x,{match:/\$\d+/},f,C,{scope:"attr",match:i+t.lookahead(":"),relevance:0},$,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,e.REGEXP_MODE,{className:"function",begin:P,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[S,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},L,j,E,R,{match:/\$[(.]/}]}}function Cke(e){const t=e.regex,n=mgt(e),i=lN,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},a={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[n.exports.CLASS_REFERENCE]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},c=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:lN,keyword:vke.concat(c),literal:xke,built_in:Eke.concat(r),"variable.language":kke},d={className:"meta",begin:"@"+i},f=(b,v,y)=>{const x=b.contains.findIndex(w=>w.label===v);if(x===-1)throw new Error("can not find mode to replace");b.contains.splice(x,1,y)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(d);const h=n.contains.find(b=>b.scope==="attr"),p=Object.assign({},h,{match:t.concat(i,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,h,p]),n.contains=n.contains.concat([d,s,a,p]),f(n,"shebang",e.SHEBANG()),f(n,"use_strict",l);const g=n.contains.find(b=>b.label==="func.def");return g.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function ggt(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},i={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},r=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,c={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,r),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,t.either(s,r),/ +/,t.either(a,l),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},f=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),h=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,i,c,u,d,f,h,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[h]}]}}function bgt(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),i=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],r={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:i},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,r,e.QUOTE_STRING_MODE,c,u,l]}}function ygt(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(s,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),c=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[s,c,l,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[s,a,c,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Tke(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},r={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,r]},l=e.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),h={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},g={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},b={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},v=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},h,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},g,b,s,a],y=[...v];return y.pop(),y.push(l),p.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:v}}const vgt={arduino:cmt,bash:qB,c:umt,cpp:dmt,csharp:fmt,css:Omt,diff:wmt,go:Smt,graphql:kmt,ini:ike,java:Emt,javascript:lke,json:cke,kotlin:jmt,less:Fmt,lua:Bmt,makefile:fke,markdown:hke,objectivec:Umt,perl:Qmt,php:zmt,"php-template":Vmt,plaintext:Hmt,python:pke,"python-repl":qmt,r:Wmt,ruby:Kmt,rust:Gmt,scss:rgt,shell:sgt,sql:agt,swift:pgt,typescript:Cke,vbnet:ggt,wasm:bgt,xml:ygt,yaml:Tke};function Ake(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],i=typeof n;(i==="object"||i==="function")&&!Object.isFrozen(n)&&Ake(n)}),e}let nY=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function _ke(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Hp(e,...t){const n=Object.create(null);for(const i in e)n[i]=e[i];return t.forEach(function(i){for(const r in i)n[r]=i[r]}),n}const xgt="",iY=e=>!!e.scope,Ogt=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((i,r)=>`${i}${"_".repeat(r+1)}`)].join(" ")}return`${t}${e}`};class wgt{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=_ke(t)}openNode(t){if(!iY(t))return;const n=Ogt(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){iY(t)&&(this.buffer+=xgt)}value(){return this.buffer}span(t){this.buffer+=``}}const rY=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class KB{constructor(){this.rootNode=rY(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=rY({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(i=>this._walk(t,i)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{KB._collapse(n)}))}}class Sgt extends KB{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const i=t.root;n&&(i.scope=`language:${n}`),this.add(i)}toHTML(){return new wgt(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function BS(e){return e?typeof e=="string"?e:e.source:null}function Nke(e){return n0("(?=",e,")")}function kgt(e){return n0("(?:",e,")*")}function Egt(e){return n0("(?:",e,")?")}function n0(...e){return e.map(n=>BS(n)).join("")}function Cgt(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function GB(...e){return"("+(Cgt(e).capture?"":"?:")+e.map(i=>BS(i)).join("|")+")"}function jke(e){return new RegExp(e.toString()+"|").exec("").length-1}function Tgt(e,t){const n=e&&e.exec(t);return n&&n.index===0}const Agt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function XB(e,{joinWith:t}){let n=0;return e.map(i=>{n+=1;const r=n;let s=BS(i),a="";for(;s.length>0;){const l=Agt.exec(s);if(!l){a+=s;break}a+=s.substring(0,l.index),s=s.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?a+="\\"+String(Number(l[1])+r):(a+=l[0],l[0]==="("&&n++)}return a}).map(i=>`(${i})`).join(t)}const _gt=/\b\B/,Rke="[a-zA-Z]\\w*",YB="[a-zA-Z_]\\w*",Ike="\\b\\d+(\\.\\d+)?",Pke="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Dke="\\b(0b[01]+)",Ngt="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",jgt=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=n0(t,/.*\b/,e.binary,/\b.*/)),Hp({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},US={begin:"\\\\[\\s\\S]",relevance:0},Rgt={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[US]},Igt={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[US]},Pgt={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},qR=function(e,t,n={}){const i=Hp({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const r=GB("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:n0(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},Dgt=qR("//","$"),Mgt=qR("/\\*","\\*/"),Lgt=qR("#","$"),$gt={scope:"number",begin:Ike,relevance:0},Fgt={scope:"number",begin:Pke,relevance:0},Bgt={scope:"number",begin:Dke,relevance:0},Ugt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[US,{begin:/\[/,end:/\]/,relevance:0,contains:[US]}]},Qgt={scope:"title",begin:Rke,relevance:0},zgt={scope:"title",begin:YB,relevance:0},Vgt={begin:"\\.\\s*"+YB,relevance:0},Hgt=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var _T=Object.freeze({__proto__:null,APOS_STRING_MODE:Rgt,BACKSLASH_ESCAPE:US,BINARY_NUMBER_MODE:Bgt,BINARY_NUMBER_RE:Dke,COMMENT:qR,C_BLOCK_COMMENT_MODE:Mgt,C_LINE_COMMENT_MODE:Dgt,C_NUMBER_MODE:Fgt,C_NUMBER_RE:Pke,END_SAME_AS_BEGIN:Hgt,HASH_COMMENT_MODE:Lgt,IDENT_RE:Rke,MATCH_NOTHING_RE:_gt,METHOD_GUARD:Vgt,NUMBER_MODE:$gt,NUMBER_RE:Ike,PHRASAL_WORDS_MODE:Pgt,QUOTE_STRING_MODE:Igt,REGEXP_MODE:Ugt,RE_STARTERS_RE:Ngt,SHEBANG:jgt,TITLE_MODE:Qgt,UNDERSCORE_IDENT_RE:YB,UNDERSCORE_TITLE_MODE:zgt});function qgt(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Wgt(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Kgt(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=qgt,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Ggt(e,t){Array.isArray(e.illegal)&&(e.illegal=GB(...e.illegal))}function Xgt(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Ygt(e,t){e.relevance===void 0&&(e.relevance=1)}const Zgt=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(i=>{delete e[i]}),e.keywords=n.keywords,e.begin=n0(n.beforeMatch,Nke(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Jgt=["of","and","for","in","not","or","if","then","parent","list","value"],ebt="keyword";function Mke(e,t,n=ebt){const i=Object.create(null);return typeof e=="string"?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(s){Object.assign(i,Mke(e[s],t,s))}),i;function r(s,a){t&&(a=a.map(l=>l.toLowerCase())),a.forEach(function(l){const c=l.split("|");i[c[0]]=[s,tbt(c[0],c[1])]})}}function tbt(e,t){return t?Number(t):nbt(e)?0:1}function nbt(e){return Jgt.includes(e.toLowerCase())}const sY={},rb=e=>{console.error(e)},aY=(e,...t)=>{console.log(`WARN: ${e}`,...t)},L0=(e,t)=>{sY[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),sY[`${e}/${t}`]=!0)},cN=new Error;function Lke(e,t,{key:n}){let i=0;const r=e[n],s={},a={};for(let l=1;l<=t.length;l++)a[l+i]=r[l],s[l+i]=!0,i+=jke(t[l-1]);e[n]=a,e[n]._emit=s,e[n]._multi=!0}function ibt(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw rb("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),cN;if(typeof e.beginScope!="object"||e.beginScope===null)throw rb("beginScope must be object"),cN;Lke(e,e.begin,{key:"beginScope"}),e.begin=XB(e.begin,{joinWith:""})}}function rbt(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw rb("skip, excludeEnd, returnEnd not compatible with endScope: {}"),cN;if(typeof e.endScope!="object"||e.endScope===null)throw rb("endScope must be object"),cN;Lke(e,e.end,{key:"endScope"}),e.end=XB(e.end,{joinWith:""})}}function sbt(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function abt(e){sbt(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),ibt(e),rbt(e)}function obt(e){function t(a,l){return new RegExp(BS(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,l]),this.matchAt+=jke(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(c=>c[1]);this.matcherRe=t(XB(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(l);if(!c)return null;const u=c.findIndex((f,h)=>h>0&&f!==void 0),d=this.matchIndexes[u];return c.splice(0,u),Object.assign(c,d)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const c=new n;return this.rules.slice(l).forEach(([u,d])=>c.addRule(u,d)),c.compile(),this.multiRegexes[l]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,c){this.rules.push([l,c]),c.type==="begin"&&this.count++}exec(l){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let u=c.exec(l);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,u=d.exec(l)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function r(a){const l=new i;return a.contains.forEach(c=>l.addRule(c.begin,{rule:c,type:"begin"})),a.terminatorEnd&&l.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&l.addRule(a.illegal,{type:"illegal"}),l}function s(a,l){const c=a;if(a.isCompiled)return c;[Wgt,Xgt,abt,Zgt].forEach(d=>d(a,l)),e.compilerExtensions.forEach(d=>d(a,l)),a.__beforeBegin=null,[Kgt,Ggt,Ygt].forEach(d=>d(a,l)),a.isCompiled=!0;let u=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),u=a.keywords.$pattern,delete a.keywords.$pattern),u=u||/\w+/,a.keywords&&(a.keywords=Mke(a.keywords,e.case_insensitive)),c.keywordPatternRe=t(u,!0),l&&(a.begin||(a.begin=/\B|\b/),c.beginRe=t(c.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(c.endRe=t(c.end)),c.terminatorEnd=BS(c.end)||"",a.endsWithParent&&l.terminatorEnd&&(c.terminatorEnd+=(a.end?"|":"")+l.terminatorEnd)),a.illegal&&(c.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(d){return lbt(d==="self"?a:d)})),a.contains.forEach(function(d){s(d,c)}),a.starts&&s(a.starts,l),c.matcher=r(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Hp(e.classNameAliases||{}),s(e)}function $ke(e){return e?e.endsWithParent||$ke(e.starts):!1}function lbt(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Hp(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:$ke(e)?Hp(e,{starts:e.starts?Hp(e.starts):null}):Object.isFrozen(e)?Hp(e):e}var cbt="11.11.1";class ubt extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const jM=_ke,oY=Hp,lY=Symbol("nomatch"),dbt=7,Fke=function(e){const t=Object.create(null),n=Object.create(null),i=[];let r=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Sgt};function c(P){return l.noHighlightRe.test(P)}function u(P){let $=P.className+" ";$+=P.parentNode?P.parentNode.className:"";const M=l.languageDetectRe.exec($);if(M){const B=C(M[1]);return B||(aY(s.replace("{}",M[1])),aY("Falling back to no-highlight mode for this block.",P)),B?M[1]:"no-highlight"}return $.split(/\s+/).find(B=>c(B)||C(B))}function d(P,$,M){let B="",I="";typeof $=="object"?(B=P,M=$.ignoreIllegals,I=$.language):(L0("10.7.0","highlight(lang, code, ...args) has been deprecated."),L0("10.7.0",`Please use highlight(code, options) instead. -https://github.com/highlightjs/highlight.js/issues/2277`),I=P,B=$),M===void 0&&(M=!0);const H={code:B,language:I};A("before:highlight",H);const X=H.result?H.result:f(H.language,H.code,M);return X.code=H.code,A("after:highlight",X),X}function f(P,$,M,B){const I=Object.create(null);function H(Y,fe){return Y.keywords[fe]}function X(){if(!Be.keywords){Ie.addText(qe);return}let Y=0;Be.keywordPatternRe.lastIndex=0;let fe=Be.keywordPatternRe.exec(qe),we="";for(;fe;){we+=qe.substring(Y,fe.index);const Ke=ke.case_insensitive?fe[0].toLowerCase():fe[0],Je=H(Be,Ke);if(Je){const[Tt,Ne]=Je;if(Ie.addText(we),we="",I[Ke]=(I[Ke]||0)+1,I[Ke]<=dbt&&(Pe+=Ne),Tt.startsWith("_"))we+=fe[0];else{const ve=ke.classNameAliases[Tt]||Tt;U(fe[0],ve)}}else we+=fe[0];Y=Be.keywordPatternRe.lastIndex,fe=Be.keywordPatternRe.exec(qe)}we+=qe.substring(Y),Ie.addText(we)}function Q(){if(qe==="")return;let Y=null;if(typeof Be.subLanguage=="string"){if(!t[Be.subLanguage]){Ie.addText(qe);return}Y=f(Be.subLanguage,qe,!0,Me[Be.subLanguage]),Me[Be.subLanguage]=Y._top}else Y=p(qe,Be.subLanguage.length?Be.subLanguage:null);Be.relevance>0&&(Pe+=Y.relevance),Ie.__addSublanguage(Y._emitter,Y.language)}function q(){Be.subLanguage!=null?Q():X(),qe=""}function U(Y,fe){Y!==""&&(Ie.startScope(fe),Ie.addText(Y),Ie.endScope())}function te(Y,fe){let we=1;const Ke=fe.length-1;for(;we<=Ke;){if(!Y._emit[we]){we++;continue}const Je=ke.classNameAliases[Y[we]]||Y[we],Tt=fe[we];Je?U(Tt,Je):(qe=Tt,X(),qe=""),we++}}function le(Y,fe){return Y.scope&&typeof Y.scope=="string"&&Ie.openNode(ke.classNameAliases[Y.scope]||Y.scope),Y.beginScope&&(Y.beginScope._wrap?(U(qe,ke.classNameAliases[Y.beginScope._wrap]||Y.beginScope._wrap),qe=""):Y.beginScope._multi&&(te(Y.beginScope,fe),qe="")),Be=Object.create(Y,{parent:{value:Be}}),Be}function oe(Y,fe,we){let Ke=Tgt(Y.endRe,we);if(Ke){if(Y["on:end"]){const Je=new nY(Y);Y["on:end"](fe,Je),Je.isMatchIgnored&&(Ke=!1)}if(Ke){for(;Y.endsParent&&Y.parent;)Y=Y.parent;return Y}}if(Y.endsWithParent)return oe(Y.parent,fe,we)}function re(Y){return Be.matcher.regexIndex===0?(qe+=Y[0],1):(Le=!0,0)}function he(Y){const fe=Y[0],we=Y.rule,Ke=new nY(we),Je=[we.__beforeBegin,we["on:begin"]];for(const Tt of Je)if(Tt&&(Tt(Y,Ke),Ke.isMatchIgnored))return re(fe);return we.skip?qe+=fe:(we.excludeBegin&&(qe+=fe),q(),!we.returnBegin&&!we.excludeBegin&&(qe=fe)),le(we,Y),we.returnBegin?0:fe.length}function K(Y){const fe=Y[0],we=$.substring(Y.index),Ke=oe(Be,Y,we);if(!Ke)return lY;const Je=Be;Be.endScope&&Be.endScope._wrap?(q(),U(fe,Be.endScope._wrap)):Be.endScope&&Be.endScope._multi?(q(),te(Be.endScope,Y)):Je.skip?qe+=fe:(Je.returnEnd||Je.excludeEnd||(qe+=fe),q(),Je.excludeEnd&&(qe=fe));do Be.scope&&Ie.closeNode(),!Be.skip&&!Be.subLanguage&&(Pe+=Be.relevance),Be=Be.parent;while(Be!==Ke.parent);return Ke.starts&&le(Ke.starts,Y),Je.returnEnd?0:fe.length}function G(){const Y=[];for(let fe=Be;fe!==ke;fe=fe.parent)fe.scope&&Y.unshift(fe.scope);Y.forEach(fe=>Ie.openNode(fe))}let se={};function de(Y,fe){const we=fe&&fe[0];if(qe+=Y,we==null)return q(),0;if(se.type==="begin"&&fe.type==="end"&&se.index===fe.index&&we===""){if(qe+=$.slice(fe.index,fe.index+1),!r){const Ke=new Error(`0 width match regex (${P})`);throw Ke.languageName=P,Ke.badRule=se.rule,Ke}return 1}if(se=fe,fe.type==="begin")return he(fe);if(fe.type==="illegal"&&!M){const Ke=new Error('Illegal lexeme "'+we+'" for mode "'+(Be.scope||"")+'"');throw Ke.mode=Be,Ke}else if(fe.type==="end"){const Ke=K(fe);if(Ke!==lY)return Ke}if(fe.type==="illegal"&&we==="")return qe+=` -`,1;if(Ee>1e5&&Ee>fe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return qe+=we,we.length}const ke=C(P);if(!ke)throw rb(s.replace("{}",P)),new Error('Unknown language: "'+P+'"');const Te=obt(ke);let rt="",Be=B||Te;const Me={},Ie=new l.__emitter(l);G();let qe="",Pe=0,Ve=0,Ee=0,Le=!1;try{if(ke.__emitTokens)ke.__emitTokens($,Ie);else{for(Be.matcher.considerAll();;){Ee++,Le?Le=!1:Be.matcher.considerAll(),Be.matcher.lastIndex=Ve;const Y=Be.matcher.exec($);if(!Y)break;const fe=$.substring(Ve,Y.index),we=de(fe,Y);Ve=Y.index+we}de($.substring(Ve))}return Ie.finalize(),rt=Ie.toHTML(),{language:P,value:rt,relevance:Pe,illegal:!1,_emitter:Ie,_top:Be}}catch(Y){if(Y.message&&Y.message.includes("Illegal"))return{language:P,value:jM($),illegal:!0,relevance:0,_illegalBy:{message:Y.message,index:Ve,context:$.slice(Ve-100,Ve+100),mode:Y.mode,resultSoFar:rt},_emitter:Ie};if(r)return{language:P,value:jM($),illegal:!1,relevance:0,errorRaised:Y,_emitter:Ie,_top:Be};throw Y}}function h(P){const $={value:jM(P),illegal:!1,relevance:0,_top:a,_emitter:new l.__emitter(l)};return $._emitter.addText(P),$}function p(P,$){$=$||l.languages||Object.keys(t);const M=h(P),B=$.filter(C).filter(_).map(q=>f(q,P,!1));B.unshift(M);const I=B.sort((q,U)=>{if(q.relevance!==U.relevance)return U.relevance-q.relevance;if(q.language&&U.language){if(C(q.language).supersetOf===U.language)return 1;if(C(U.language).supersetOf===q.language)return-1}return 0}),[H,X]=I,Q=H;return Q.secondBest=X,Q}function g(P,$,M){const B=$&&n[$]||M;P.classList.add("hljs"),P.classList.add(`language-${B}`)}function b(P){let $=null;const M=u(P);if(c(M))return;if(A("before:highlightElement",{el:P,language:M}),P.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",P);return}if(P.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(P)),l.throwUnescapedHTML))throw new ubt("One of your code blocks includes unescaped HTML.",P.innerHTML);$=P;const B=$.textContent,I=M?d(B,{language:M,ignoreIllegals:!0}):p(B);P.innerHTML=I.value,P.dataset.highlighted="yes",g(P,M,I.language),P.result={language:I.language,re:I.relevance,relevance:I.relevance},I.secondBest&&(P.secondBest={language:I.secondBest.language,relevance:I.secondBest.relevance}),A("after:highlightElement",{el:P,result:I,text:B})}function v(P){l=oY(l,P)}const y=()=>{O(),L0("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function x(){O(),L0("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let w=!1;function O(){function P(){O()}if(document.readyState==="loading"){w||window.addEventListener("DOMContentLoaded",P,!1),w=!0;return}document.querySelectorAll(l.cssSelector).forEach(b)}function k(P,$){let M=null;try{M=$(e)}catch(B){if(rb("Language definition for '{}' could not be registered.".replace("{}",P)),r)rb(B);else throw B;M=a}M.name||(M.name=P),t[P]=M,M.rawDefinition=$.bind(null,e),M.aliases&&N(M.aliases,{languageName:P})}function S(P){delete t[P];for(const $ of Object.keys(n))n[$]===P&&delete n[$]}function E(){return Object.keys(t)}function C(P){return P=(P||"").toLowerCase(),t[P]||t[n[P]]}function N(P,{languageName:$}){typeof P=="string"&&(P=[P]),P.forEach(M=>{n[M.toLowerCase()]=$})}function _(P){const $=C(P);return $&&!$.disableAutodetect}function j(P){P["before:highlightBlock"]&&!P["before:highlightElement"]&&(P["before:highlightElement"]=$=>{P["before:highlightBlock"](Object.assign({block:$.el},$))}),P["after:highlightBlock"]&&!P["after:highlightElement"]&&(P["after:highlightElement"]=$=>{P["after:highlightBlock"](Object.assign({block:$.el},$))})}function T(P){j(P),i.push(P)}function L(P){const $=i.indexOf(P);$!==-1&&i.splice($,1)}function A(P,$){const M=P;i.forEach(function(B){B[M]&&B[M]($)})}function R(P){return L0("10.7.0","highlightBlock will be removed entirely in v12.0"),L0("10.7.0","Please use highlightElement now."),b(P)}Object.assign(e,{highlight:d,highlightAuto:p,highlightAll:O,highlightElement:b,highlightBlock:R,configure:v,initHighlighting:y,initHighlightingOnLoad:x,registerLanguage:k,unregisterLanguage:S,listLanguages:E,getLanguage:C,registerAliases:N,autoDetection:_,inherit:oY,addPlugin:T,removePlugin:L}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=cbt,e.regex={concat:n0,lookahead:Nke,either:GB,optional:Egt,anyNumberOfTimes:kgt};for(const P in _T)typeof _T[P]=="object"&&Ake(_T[P]);return Object.assign(e,_T),e},Jv=Fke({});Jv.newInstance=()=>Fke({});var fbt=Jv;Jv.HighlightJS=Jv;Jv.default=Jv;const yo=px(fbt),cY={},hbt="hljs-";function pbt(e){const t=yo.newInstance();return e&&s(e),{highlight:n,highlightAuto:i,listLanguages:r,register:s,registerAlias:a,registered:l};function n(c,u,d){const f=d||cY,h=typeof f.prefix=="string"?f.prefix:hbt;if(!t.getLanguage(c))throw new Error("Unknown language: `"+c+"` is not registered");t.configure({__emitter:mbt,classPrefix:h});const p=t.highlight(u,{ignoreIllegals:!0,language:c});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});const g=p._emitter.root,b=g.data;return b.language=p.language,b.relevance=p.relevance,g}function i(c,u){const f=(u||cY).subset||r();let h=-1,p=0,g;for(;++hp&&(p=v.data.relevance,g=v)}return g||{type:"root",children:[],data:{language:void 0,relevance:p}}}function r(){return t.listLanguages()}function s(c,u){if(typeof c=="string")t.registerLanguage(c,u);else{let d;for(d in c)Object.hasOwn(c,d)&&t.registerLanguage(d,c[d])}}function a(c,u){if(typeof c=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:c});else{let d;for(d in c)if(Object.hasOwn(c,d)){const f=c[d];t.registerAliases(typeof f=="string"?f:[...f],{languageName:d})}}}function l(c){return!!t.getLanguage(c)}}class mbt{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],i=n.children[n.children.length-1];i&&i.type==="text"?i.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const i=this.stack[this.stack.length-1],r=t.root.children;n?i.children.push({type:"element",tagName:"span",properties:{className:[n]},children:r}):i.children.push(...r)}openNode(t){const n=this,i=t.split(".").map(function(a,l){return l?a+"_".repeat(l):n.options.classPrefix+a}),r=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:i},children:[]};r.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const gbt={};function uY(e){const t=e||gbt,n=t.aliases,i=t.detect||!1,r=t.languages||vgt,s=t.plainText,a=t.prefix,l=t.subset;let c="hljs";const u=pbt(r);if(n&&u.registerAlias(n),a){const d=a.indexOf("-");c=d===-1?a:a.slice(0,d)}return function(d,f){bE(d,"element",function(h,p,g){if(h.tagName!=="code"||!g||g.type!=="element"||g.tagName!=="pre")return;const b=bbt(h);if(b===!1||!b&&!i||b&&s&&s.includes(b))return;Array.isArray(h.properties.className)||(h.properties.className=[]),h.properties.className.includes(c)||h.properties.className.unshift(c);const v=emt(h,{whitespace:"pre"});let y;try{y=b?u.highlight(b,v,{prefix:a}):u.highlightAuto(v,{prefix:a,subset:l})}catch(x){const w=x;if(b&&/Unknown language/.test(w.message)){f.message("Cannot highlight as `"+b+"`, it’s not registered",{ancestors:[g,h],cause:w,place:h.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw w}!b&&y.data&&y.data.language&&h.properties.className.push("language-"+y.data.language),y.children.length>0&&(h.children=y.children)})}}function bbt(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let i;for(;++n-1&&s<=t.length){let a=0;for(;;){let l=n[a];if(l===void 0){const c=hY(t,n[a-1]);l=c===-1?t.length+1:c+1,n[a]=l}if(l>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function r(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length1?n[s.line-2]:0)+s.column-1;if(a=55296&&e<=57343}function zbt(e){return e>=56320&&e<=57343}function Vbt(e,t){return(e-55296)*1024+9216+t}function Hke(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function qke(e){return e>=64976&&e<=65007||Qbt.has(e)}var Ge;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Ge||(Ge={}));const Hbt=65536;class qbt{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Hbt,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:i,col:r,offset:s}=this,a=r+n,l=s+n;return{code:t,startLine:i,endLine:i,startCol:a,endCol:a,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(zbt(n))return this.pos++,this._addGap(),Vbt(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,ae.EOF;return this._err(Ge.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let i=0;i=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ae.EOF;const i=this.html.charCodeAt(n);return i===ae.CARRIAGE_RETURN?ae.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ae.EOF;let t=this.html.charCodeAt(this.pos);return t===ae.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,ae.LINE_FEED):t===ae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Vke(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===ae.LINE_FEED||t===ae.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Hke(t)?this._err(Ge.controlCharacterInInputStream):qke(t)&&this._err(Ge.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Wbt=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Kbt=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Gbt(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Kbt.get(e))!==null&&t!==void 0?t:e}var Aa;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Aa||(Aa={}));const Xbt=32;var qp;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(qp||(qp={}));function D6(e){return e>=Aa.ZERO&&e<=Aa.NINE}function Ybt(e){return e>=Aa.UPPER_A&&e<=Aa.UPPER_F||e>=Aa.LOWER_A&&e<=Aa.LOWER_F}function Zbt(e){return e>=Aa.UPPER_A&&e<=Aa.UPPER_Z||e>=Aa.LOWER_A&&e<=Aa.LOWER_Z||D6(e)}function Jbt(e){return e===Aa.EQUALS||Zbt(e)}var xa;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(xa||(xa={}));var Wf;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Wf||(Wf={}));class e0t{constructor(t,n,i){this.decodeTree=t,this.emitCodePoint=n,this.errors=i,this.state=xa.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Wf.Strict}startEntity(t){this.decodeMode=t,this.state=xa.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case xa.EntityStart:return t.charCodeAt(n)===Aa.NUM?(this.state=xa.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=xa.NamedEntity,this.stateNamedEntity(t,n));case xa.NumericStart:return this.stateNumericStart(t,n);case xa.NumericDecimal:return this.stateNumericDecimal(t,n);case xa.NumericHex:return this.stateNumericHex(t,n);case xa.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Xbt)===Aa.LOWER_X?(this.state=xa.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=xa.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,i,r){if(n!==i){const s=i-n;this.result=this.result*Math.pow(r,s)+Number.parseInt(t.substr(n,s),r),this.consumed+=s}}stateNumericHex(t,n){const i=n;for(;n>14;for(;n>14,s!==0){if(a===Aa.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Wf.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:i}=this,r=(i[n]&qp.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,r,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){const{decodeTree:r}=this;return this.emitCodePoint(n===1?r[t]&~qp.VALUE_LENGTH:r[t+1],i),n===3&&this.emitCodePoint(r[t+2],i),i}end(){var t;switch(this.state){case xa.NamedEntity:return this.result!==0&&(this.decodeMode!==Wf.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case xa.NumericDecimal:return this.emitNumericEntity(0,2);case xa.NumericHex:return this.emitNumericEntity(0,3);case xa.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case xa.EntityStart:return 0}}}function t0t(e,t,n,i){const r=(t&qp.BRANCH_LENGTH)>>7,s=t&qp.JUMP_TABLE;if(r===0)return s!==0&&i===s?n:-1;if(s){const c=i-s;return c<0||c>=r?-1:e[n+c]-1}let a=n,l=a+r-1;for(;a<=l;){const c=a+l>>>1,u=e[c];if(ui)l=c-1;else return e[c+r]}return-1}var mt;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(mt||(mt={}));var sb;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(sb||(sb={}));var $c;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})($c||($c={}));var Fe;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(Fe||(Fe={}));var D;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(D||(D={}));const n0t=new Map([[Fe.A,D.A],[Fe.ADDRESS,D.ADDRESS],[Fe.ANNOTATION_XML,D.ANNOTATION_XML],[Fe.APPLET,D.APPLET],[Fe.AREA,D.AREA],[Fe.ARTICLE,D.ARTICLE],[Fe.ASIDE,D.ASIDE],[Fe.B,D.B],[Fe.BASE,D.BASE],[Fe.BASEFONT,D.BASEFONT],[Fe.BGSOUND,D.BGSOUND],[Fe.BIG,D.BIG],[Fe.BLOCKQUOTE,D.BLOCKQUOTE],[Fe.BODY,D.BODY],[Fe.BR,D.BR],[Fe.BUTTON,D.BUTTON],[Fe.CAPTION,D.CAPTION],[Fe.CENTER,D.CENTER],[Fe.CODE,D.CODE],[Fe.COL,D.COL],[Fe.COLGROUP,D.COLGROUP],[Fe.DD,D.DD],[Fe.DESC,D.DESC],[Fe.DETAILS,D.DETAILS],[Fe.DIALOG,D.DIALOG],[Fe.DIR,D.DIR],[Fe.DIV,D.DIV],[Fe.DL,D.DL],[Fe.DT,D.DT],[Fe.EM,D.EM],[Fe.EMBED,D.EMBED],[Fe.FIELDSET,D.FIELDSET],[Fe.FIGCAPTION,D.FIGCAPTION],[Fe.FIGURE,D.FIGURE],[Fe.FONT,D.FONT],[Fe.FOOTER,D.FOOTER],[Fe.FOREIGN_OBJECT,D.FOREIGN_OBJECT],[Fe.FORM,D.FORM],[Fe.FRAME,D.FRAME],[Fe.FRAMESET,D.FRAMESET],[Fe.H1,D.H1],[Fe.H2,D.H2],[Fe.H3,D.H3],[Fe.H4,D.H4],[Fe.H5,D.H5],[Fe.H6,D.H6],[Fe.HEAD,D.HEAD],[Fe.HEADER,D.HEADER],[Fe.HGROUP,D.HGROUP],[Fe.HR,D.HR],[Fe.HTML,D.HTML],[Fe.I,D.I],[Fe.IMG,D.IMG],[Fe.IMAGE,D.IMAGE],[Fe.INPUT,D.INPUT],[Fe.IFRAME,D.IFRAME],[Fe.KEYGEN,D.KEYGEN],[Fe.LABEL,D.LABEL],[Fe.LI,D.LI],[Fe.LINK,D.LINK],[Fe.LISTING,D.LISTING],[Fe.MAIN,D.MAIN],[Fe.MALIGNMARK,D.MALIGNMARK],[Fe.MARQUEE,D.MARQUEE],[Fe.MATH,D.MATH],[Fe.MENU,D.MENU],[Fe.META,D.META],[Fe.MGLYPH,D.MGLYPH],[Fe.MI,D.MI],[Fe.MO,D.MO],[Fe.MN,D.MN],[Fe.MS,D.MS],[Fe.MTEXT,D.MTEXT],[Fe.NAV,D.NAV],[Fe.NOBR,D.NOBR],[Fe.NOFRAMES,D.NOFRAMES],[Fe.NOEMBED,D.NOEMBED],[Fe.NOSCRIPT,D.NOSCRIPT],[Fe.OBJECT,D.OBJECT],[Fe.OL,D.OL],[Fe.OPTGROUP,D.OPTGROUP],[Fe.OPTION,D.OPTION],[Fe.P,D.P],[Fe.PARAM,D.PARAM],[Fe.PLAINTEXT,D.PLAINTEXT],[Fe.PRE,D.PRE],[Fe.RB,D.RB],[Fe.RP,D.RP],[Fe.RT,D.RT],[Fe.RTC,D.RTC],[Fe.RUBY,D.RUBY],[Fe.S,D.S],[Fe.SCRIPT,D.SCRIPT],[Fe.SEARCH,D.SEARCH],[Fe.SECTION,D.SECTION],[Fe.SELECT,D.SELECT],[Fe.SOURCE,D.SOURCE],[Fe.SMALL,D.SMALL],[Fe.SPAN,D.SPAN],[Fe.STRIKE,D.STRIKE],[Fe.STRONG,D.STRONG],[Fe.STYLE,D.STYLE],[Fe.SUB,D.SUB],[Fe.SUMMARY,D.SUMMARY],[Fe.SUP,D.SUP],[Fe.TABLE,D.TABLE],[Fe.TBODY,D.TBODY],[Fe.TEMPLATE,D.TEMPLATE],[Fe.TEXTAREA,D.TEXTAREA],[Fe.TFOOT,D.TFOOT],[Fe.TD,D.TD],[Fe.TH,D.TH],[Fe.THEAD,D.THEAD],[Fe.TITLE,D.TITLE],[Fe.TR,D.TR],[Fe.TRACK,D.TRACK],[Fe.TT,D.TT],[Fe.U,D.U],[Fe.UL,D.UL],[Fe.SVG,D.SVG],[Fe.VAR,D.VAR],[Fe.WBR,D.WBR],[Fe.XMP,D.XMP]]);function Kx(e){var t;return(t=n0t.get(e))!==null&&t!==void 0?t:D.UNKNOWN}const vt=D,i0t={[mt.HTML]:new Set([vt.ADDRESS,vt.APPLET,vt.AREA,vt.ARTICLE,vt.ASIDE,vt.BASE,vt.BASEFONT,vt.BGSOUND,vt.BLOCKQUOTE,vt.BODY,vt.BR,vt.BUTTON,vt.CAPTION,vt.CENTER,vt.COL,vt.COLGROUP,vt.DD,vt.DETAILS,vt.DIR,vt.DIV,vt.DL,vt.DT,vt.EMBED,vt.FIELDSET,vt.FIGCAPTION,vt.FIGURE,vt.FOOTER,vt.FORM,vt.FRAME,vt.FRAMESET,vt.H1,vt.H2,vt.H3,vt.H4,vt.H5,vt.H6,vt.HEAD,vt.HEADER,vt.HGROUP,vt.HR,vt.HTML,vt.IFRAME,vt.IMG,vt.INPUT,vt.LI,vt.LINK,vt.LISTING,vt.MAIN,vt.MARQUEE,vt.MENU,vt.META,vt.NAV,vt.NOEMBED,vt.NOFRAMES,vt.NOSCRIPT,vt.OBJECT,vt.OL,vt.P,vt.PARAM,vt.PLAINTEXT,vt.PRE,vt.SCRIPT,vt.SECTION,vt.SELECT,vt.SOURCE,vt.STYLE,vt.SUMMARY,vt.TABLE,vt.TBODY,vt.TD,vt.TEMPLATE,vt.TEXTAREA,vt.TFOOT,vt.TH,vt.THEAD,vt.TITLE,vt.TR,vt.TRACK,vt.UL,vt.WBR,vt.XMP]),[mt.MATHML]:new Set([vt.MI,vt.MO,vt.MN,vt.MS,vt.MTEXT,vt.ANNOTATION_XML]),[mt.SVG]:new Set([vt.TITLE,vt.FOREIGN_OBJECT,vt.DESC]),[mt.XLINK]:new Set,[mt.XML]:new Set,[mt.XMLNS]:new Set},M6=new Set([vt.H1,vt.H2,vt.H3,vt.H4,vt.H5,vt.H6]);Fe.STYLE,Fe.SCRIPT,Fe.XMP,Fe.IFRAME,Fe.NOEMBED,Fe.NOFRAMES,Fe.PLAINTEXT;var ue;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(ue||(ue={}));const Us={DATA:ue.DATA,RCDATA:ue.RCDATA,RAWTEXT:ue.RAWTEXT,SCRIPT_DATA:ue.SCRIPT_DATA,PLAINTEXT:ue.PLAINTEXT,CDATA_SECTION:ue.CDATA_SECTION};function r0t(e){return e>=ae.DIGIT_0&&e<=ae.DIGIT_9}function $O(e){return e>=ae.LATIN_CAPITAL_A&&e<=ae.LATIN_CAPITAL_Z}function s0t(e){return e>=ae.LATIN_SMALL_A&&e<=ae.LATIN_SMALL_Z}function Op(e){return s0t(e)||$O(e)}function mY(e){return Op(e)||r0t(e)}function NT(e){return e+32}function Kke(e){return e===ae.SPACE||e===ae.LINE_FEED||e===ae.TABULATION||e===ae.FORM_FEED}function gY(e){return Kke(e)||e===ae.SOLIDUS||e===ae.GREATER_THAN_SIGN}function a0t(e){return e===ae.NULL?Ge.nullCharacterReference:e>1114111?Ge.characterReferenceOutsideUnicodeRange:Vke(e)?Ge.surrogateCharacterReference:qke(e)?Ge.noncharacterCharacterReference:Hke(e)||e===ae.CARRIAGE_RETURN?Ge.controlCharacterReference:null}class o0t{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=ue.DATA,this.returnState=ue.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new qbt(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new e0t(Wbt,(i,r)=>{this.preprocessor.pos=this.entityStartPos+r-1,this._flushCodePointConsumedAsCharacterReference(i)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Ge.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(Ge.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const r=a0t(i);r&&this._err(r,1)}}:void 0)}_err(t,n=0){var i,r;(r=(i=this.handler).onParseError)===null||r===void 0||r.call(i,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,i){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n0&&this._err(Ge.endTagWithAttributes),t.selfClosing&&this._err(Ge.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case pi.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case pi.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case pi.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:pi.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Kke(t)?pi.WHITESPACE_CHARACTER:t===ae.NULL?pi.NULL_CHARACTER:pi.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(pi.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=ue.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Wf.Attribute:Wf.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===ue.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===ue.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===ue.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case ue.DATA:{this._stateData(t);break}case ue.RCDATA:{this._stateRcdata(t);break}case ue.RAWTEXT:{this._stateRawtext(t);break}case ue.SCRIPT_DATA:{this._stateScriptData(t);break}case ue.PLAINTEXT:{this._statePlaintext(t);break}case ue.TAG_OPEN:{this._stateTagOpen(t);break}case ue.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case ue.TAG_NAME:{this._stateTagName(t);break}case ue.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case ue.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case ue.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case ue.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case ue.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case ue.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case ue.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case ue.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case ue.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case ue.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case ue.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case ue.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case ue.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case ue.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case ue.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case ue.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case ue.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case ue.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case ue.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case ue.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case ue.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case ue.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case ue.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case ue.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case ue.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case ue.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case ue.BOGUS_COMMENT:{this._stateBogusComment(t);break}case ue.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case ue.COMMENT_START:{this._stateCommentStart(t);break}case ue.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case ue.COMMENT:{this._stateComment(t);break}case ue.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case ue.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case ue.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case ue.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case ue.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case ue.COMMENT_END:{this._stateCommentEnd(t);break}case ue.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case ue.DOCTYPE:{this._stateDoctype(t);break}case ue.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case ue.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case ue.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case ue.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case ue.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case ue.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case ue.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case ue.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case ue.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case ue.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case ue.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case ue.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case ue.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case ue.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case ue.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case ue.CDATA_SECTION:{this._stateCdataSection(t);break}case ue.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case ue.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case ue.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case ue.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case ae.LESS_THAN_SIGN:{this.state=ue.TAG_OPEN;break}case ae.AMPERSAND:{this._startCharacterReference();break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this._emitCodePoint(t);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case ae.AMPERSAND:{this._startCharacterReference();break}case ae.LESS_THAN_SIGN:{this.state=ue.RCDATA_LESS_THAN_SIGN;break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this._emitChars(rs);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case ae.LESS_THAN_SIGN:{this.state=ue.RAWTEXT_LESS_THAN_SIGN;break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this._emitChars(rs);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case ae.LESS_THAN_SIGN:{this.state=ue.SCRIPT_DATA_LESS_THAN_SIGN;break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this._emitChars(rs);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this._emitChars(rs);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Op(t))this._createStartTagToken(),this.state=ue.TAG_NAME,this._stateTagName(t);else switch(t){case ae.EXCLAMATION_MARK:{this.state=ue.MARKUP_DECLARATION_OPEN;break}case ae.SOLIDUS:{this.state=ue.END_TAG_OPEN;break}case ae.QUESTION_MARK:{this._err(Ge.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=ue.BOGUS_COMMENT,this._stateBogusComment(t);break}case ae.EOF:{this._err(Ge.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Ge.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=ue.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Op(t))this._createEndTagToken(),this.state=ue.TAG_NAME,this._stateTagName(t);else switch(t){case ae.GREATER_THAN_SIGN:{this._err(Ge.missingEndTagName),this.state=ue.DATA;break}case ae.EOF:{this._err(Ge.eofBeforeTagName),this._emitChars("");break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this.state=ue.SCRIPT_DATA_ESCAPED,this._emitChars(rs);break}case ae.EOF:{this._err(Ge.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ue.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===ae.SOLIDUS?this.state=ue.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Op(t)?(this._emitChars("<"),this.state=ue.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=ue.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Op(t)?(this.state=ue.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("");break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this.state=ue.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(rs);break}case ae.EOF:{this._err(Ge.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ue.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===ae.SOLIDUS?(this.state=ue.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=ue.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Jo.SCRIPT,!1)&&gY(this.preprocessor.peek(Jo.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const i=this._indexOf(t);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(t,n,i){const r=this._indexOf(t)+1;this.items.splice(r,0,n),this.tagIDs.splice(r,0,i),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==mt.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(t,n){const i=this._indexOfTagNames(t,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(f0t,mt.HTML)}clearBackToTableBodyContext(){this.clearBackTo(d0t,mt.HTML)}clearBackToTableRowContext(){this.clearBackTo(u0t,mt.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===D.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===D.HTML}hasInDynamicScope(t,n){for(let i=this.stackTop;i>=0;i--){const r=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case mt.HTML:{if(r===t)return!0;if(n.has(r))return!1;break}case mt.SVG:{if(vY.has(r))return!1;break}case mt.MATHML:{if(yY.has(r))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,uN)}hasInListItemScope(t){return this.hasInDynamicScope(t,l0t)}hasInButtonScope(t){return this.hasInDynamicScope(t,c0t)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case mt.HTML:{if(M6.has(n))return!0;if(uN.has(n))return!1;break}case mt.SVG:{if(vY.has(n))return!1;break}case mt.MATHML:{if(yY.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===mt.HTML)switch(this.tagIDs[n]){case t:return!0;case D.TABLE:case D.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===mt.HTML)switch(this.tagIDs[t]){case D.TBODY:case D.THEAD:case D.TFOOT:return!0;case D.TABLE:case D.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===mt.HTML)switch(this.tagIDs[n]){case t:return!0;case D.OPTION:case D.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Gke.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&bY.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&bY.has(this.currentTagId);)this.pop()}}const RM=3;var xd;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(xd||(xd={}));const xY={type:xd.Marker};class m0t{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const i=[],r=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let l=0;l[a.name,a.value]));let s=0;for(let a=0;ar.get(c.name)===c.value)&&(s+=1,s>=RM&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(xY)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:xd.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:xd.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(xY);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(i=>i.type===xd.Marker||this.treeAdapter.getTagName(i.element)===t);return n&&n.type===xd.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===xd.Element&&n.element===t)}}const wp={createDocument(){return{nodeName:"#document",mode:$c.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const i=e.childNodes.indexOf(n);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,i){const r=e.childNodes.find(s=>s.nodeName==="#documentType");if(r)r.name=t,r.publicId=n,r.systemId=i;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:i,parentNode:null};wp.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(wp.isTextNode(n)){n.value+=t;return}}wp.appendChild(e,wp.createTextNode(t))},insertTextBefore(e,t,n){const i=e.childNodes[e.childNodes.indexOf(n)-1];i&&wp.isTextNode(i)?i.value+=t:wp.insertBefore(e,wp.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(i=>i.name));for(let i=0;ie.startsWith(n))}function O0t(e){return e.name===Xke&&e.publicId===null&&(e.systemId===null||e.systemId===g0t)}function w0t(e){if(e.name!==Xke)return $c.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===b0t)return $c.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),v0t.has(n))return $c.QUIRKS;let i=t===null?y0t:Yke;if(OY(n,i))return $c.QUIRKS;if(i=t===null?Zke:x0t,OY(n,i))return $c.LIMITED_QUIRKS}return $c.NO_QUIRKS}const wY={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},S0t="definitionurl",k0t="definitionURL",E0t=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),C0t=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:mt.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:mt.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:mt.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:mt.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:mt.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:mt.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:mt.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:mt.XML}],["xml:space",{prefix:"xml",name:"space",namespace:mt.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:mt.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:mt.XMLNS}]]),T0t=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),A0t=new Set([D.B,D.BIG,D.BLOCKQUOTE,D.BODY,D.BR,D.CENTER,D.CODE,D.DD,D.DIV,D.DL,D.DT,D.EM,D.EMBED,D.H1,D.H2,D.H3,D.H4,D.H5,D.H6,D.HEAD,D.HR,D.I,D.IMG,D.LI,D.LISTING,D.MENU,D.META,D.NOBR,D.OL,D.P,D.PRE,D.RUBY,D.S,D.SMALL,D.SPAN,D.STRONG,D.STRIKE,D.SUB,D.SUP,D.TABLE,D.TT,D.U,D.UL,D.VAR]);function _0t(e){const t=e.tagID;return t===D.FONT&&e.attrs.some(({name:i})=>i===sb.COLOR||i===sb.SIZE||i===sb.FACE)||A0t.has(t)}function Jke(e){for(let t=0;t0&&this._setContextModes(t,n)}onItemPop(t,n){var i,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(r=(i=this.treeAdapter).onItemPop)===null||r===void 0||r.call(i,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const i=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===mt.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,mt.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=pe.TEXT}switchToPlaintextParsing(){this.insertionMode=pe.TEXT,this.originalInsertionMode=pe.IN_BODY,this.tokenizer.state=Us.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===Fe.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==mt.HTML))switch(this.fragmentContextID){case D.TITLE:case D.TEXTAREA:{this.tokenizer.state=Us.RCDATA;break}case D.STYLE:case D.XMP:case D.IFRAME:case D.NOEMBED:case D.NOFRAMES:case D.NOSCRIPT:{this.tokenizer.state=Us.RAWTEXT;break}case D.SCRIPT:{this.tokenizer.state=Us.SCRIPT_DATA;break}case D.PLAINTEXT:{this.tokenizer.state=Us.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",i=t.publicId||"",r=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,r),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i??this.document,t)}}_appendElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,n){const i=this.treeAdapter.createElement(t,mt.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,mt.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(Fe.HTML,mt.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,D.HTML)}_appendCommentNode(t,n){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,t.chars,i):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const r=this.treeAdapter.getChildNodes(n),s=i?r.lastIndexOf(i):r.length,a=r[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:c,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:c,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const i=n.location,r=this.treeAdapter.getTagName(t),s=n.type===pi.END_TAG&&r===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,t.tagID===D.SVG&&this.treeAdapter.getTagName(n)===Fe.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===mt.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===D.MGLYPH||t.tagID===D.MALIGNMARK)&&i!==void 0&&!this._isIntegrationPoint(i,n,mt.HTML)}_processToken(t){switch(t.type){case pi.CHARACTER:{this.onCharacter(t);break}case pi.NULL_CHARACTER:{this.onNullCharacter(t);break}case pi.COMMENT:{this.onComment(t);break}case pi.DOCTYPE:{this.onDoctype(t);break}case pi.START_TAG:{this._processStartTag(t);break}case pi.END_TAG:{this.onEndTag(t);break}case pi.EOF:{this.onEof(t);break}case pi.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,i){const r=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return I0t(t,r,s,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(r=>r.type===xd.Marker||this.openElements.contains(r.element)),i=n===-1?t-1:n-1;for(let r=i;r>=0;r--){const s=this.activeFormattingElements.entries[r];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=pe.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(D.P),this.openElements.popUntilTagNamePopped(D.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case D.TR:{this.insertionMode=pe.IN_ROW;return}case D.TBODY:case D.THEAD:case D.TFOOT:{this.insertionMode=pe.IN_TABLE_BODY;return}case D.CAPTION:{this.insertionMode=pe.IN_CAPTION;return}case D.COLGROUP:{this.insertionMode=pe.IN_COLUMN_GROUP;return}case D.TABLE:{this.insertionMode=pe.IN_TABLE;return}case D.BODY:{this.insertionMode=pe.IN_BODY;return}case D.FRAMESET:{this.insertionMode=pe.IN_FRAMESET;return}case D.SELECT:{this._resetInsertionModeForSelect(t);return}case D.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case D.HTML:{this.insertionMode=this.headElement?pe.AFTER_HEAD:pe.BEFORE_HEAD;return}case D.TD:case D.TH:{if(t>0){this.insertionMode=pe.IN_CELL;return}break}case D.HEAD:{if(t>0){this.insertionMode=pe.IN_HEAD;return}break}}this.insertionMode=pe.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===D.TEMPLATE)break;if(i===D.TABLE){this.insertionMode=pe.IN_SELECT_IN_TABLE;return}}this.insertionMode=pe.IN_SELECT}_isElementCausesFosterParenting(t){return tEe.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case D.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===mt.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case D.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const i=this.treeAdapter.getNamespaceURI(t);return i0t[i].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){hvt(this,t);return}switch(this.insertionMode){case pe.INITIAL:{G1(this,t);break}case pe.BEFORE_HTML:{_w(this,t);break}case pe.BEFORE_HEAD:{Nw(this,t);break}case pe.IN_HEAD:{jw(this,t);break}case pe.IN_HEAD_NO_SCRIPT:{Rw(this,t);break}case pe.AFTER_HEAD:{Iw(this,t);break}case pe.IN_BODY:case pe.IN_CAPTION:case pe.IN_CELL:case pe.IN_TEMPLATE:{iEe(this,t);break}case pe.TEXT:case pe.IN_SELECT:case pe.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case pe.IN_TABLE:case pe.IN_TABLE_BODY:case pe.IN_ROW:{IM(this,t);break}case pe.IN_TABLE_TEXT:{cEe(this,t);break}case pe.IN_COLUMN_GROUP:{dN(this,t);break}case pe.AFTER_BODY:{fN(this,t);break}case pe.AFTER_AFTER_BODY:{mA(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){fvt(this,t);return}switch(this.insertionMode){case pe.INITIAL:{G1(this,t);break}case pe.BEFORE_HTML:{_w(this,t);break}case pe.BEFORE_HEAD:{Nw(this,t);break}case pe.IN_HEAD:{jw(this,t);break}case pe.IN_HEAD_NO_SCRIPT:{Rw(this,t);break}case pe.AFTER_HEAD:{Iw(this,t);break}case pe.TEXT:{this._insertCharacters(t);break}case pe.IN_TABLE:case pe.IN_TABLE_BODY:case pe.IN_ROW:{IM(this,t);break}case pe.IN_COLUMN_GROUP:{dN(this,t);break}case pe.AFTER_BODY:{fN(this,t);break}case pe.AFTER_AFTER_BODY:{mA(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){L6(this,t);return}switch(this.insertionMode){case pe.INITIAL:case pe.BEFORE_HTML:case pe.BEFORE_HEAD:case pe.IN_HEAD:case pe.IN_HEAD_NO_SCRIPT:case pe.AFTER_HEAD:case pe.IN_BODY:case pe.IN_TABLE:case pe.IN_CAPTION:case pe.IN_COLUMN_GROUP:case pe.IN_TABLE_BODY:case pe.IN_ROW:case pe.IN_CELL:case pe.IN_SELECT:case pe.IN_SELECT_IN_TABLE:case pe.IN_TEMPLATE:case pe.IN_FRAMESET:case pe.AFTER_FRAMESET:{L6(this,t);break}case pe.IN_TABLE_TEXT:{X1(this,t);break}case pe.AFTER_BODY:{V0t(this,t);break}case pe.AFTER_AFTER_BODY:case pe.AFTER_AFTER_FRAMESET:{H0t(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case pe.INITIAL:{q0t(this,t);break}case pe.BEFORE_HEAD:case pe.IN_HEAD:case pe.IN_HEAD_NO_SCRIPT:case pe.AFTER_HEAD:{this._err(t,Ge.misplacedDoctype);break}case pe.IN_TABLE_TEXT:{X1(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Ge.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?pvt(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case pe.INITIAL:{G1(this,t);break}case pe.BEFORE_HTML:{W0t(this,t);break}case pe.BEFORE_HEAD:{G0t(this,t);break}case pe.IN_HEAD:{Xu(this,t);break}case pe.IN_HEAD_NO_SCRIPT:{Z0t(this,t);break}case pe.AFTER_HEAD:{eyt(this,t);break}case pe.IN_BODY:{Oo(this,t);break}case pe.IN_TABLE:{ex(this,t);break}case pe.IN_TABLE_TEXT:{X1(this,t);break}case pe.IN_CAPTION:{Xyt(this,t);break}case pe.IN_COLUMN_GROUP:{iU(this,t);break}case pe.IN_TABLE_BODY:{GR(this,t);break}case pe.IN_ROW:{XR(this,t);break}case pe.IN_CELL:{Jyt(this,t);break}case pe.IN_SELECT:{fEe(this,t);break}case pe.IN_SELECT_IN_TABLE:{tvt(this,t);break}case pe.IN_TEMPLATE:{ivt(this,t);break}case pe.AFTER_BODY:{svt(this,t);break}case pe.IN_FRAMESET:{avt(this,t);break}case pe.AFTER_FRAMESET:{lvt(this,t);break}case pe.AFTER_AFTER_BODY:{uvt(this,t);break}case pe.AFTER_AFTER_FRAMESET:{dvt(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?mvt(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case pe.INITIAL:{G1(this,t);break}case pe.BEFORE_HTML:{K0t(this,t);break}case pe.BEFORE_HEAD:{X0t(this,t);break}case pe.IN_HEAD:{Y0t(this,t);break}case pe.IN_HEAD_NO_SCRIPT:{J0t(this,t);break}case pe.AFTER_HEAD:{tyt(this,t);break}case pe.IN_BODY:{KR(this,t);break}case pe.TEXT:{Byt(this,t);break}case pe.IN_TABLE:{QS(this,t);break}case pe.IN_TABLE_TEXT:{X1(this,t);break}case pe.IN_CAPTION:{Yyt(this,t);break}case pe.IN_COLUMN_GROUP:{Zyt(this,t);break}case pe.IN_TABLE_BODY:{$6(this,t);break}case pe.IN_ROW:{dEe(this,t);break}case pe.IN_CELL:{evt(this,t);break}case pe.IN_SELECT:{hEe(this,t);break}case pe.IN_SELECT_IN_TABLE:{nvt(this,t);break}case pe.IN_TEMPLATE:{rvt(this,t);break}case pe.AFTER_BODY:{mEe(this,t);break}case pe.IN_FRAMESET:{ovt(this,t);break}case pe.AFTER_FRAMESET:{cvt(this,t);break}case pe.AFTER_AFTER_BODY:{mA(this,t);break}}}onEof(t){switch(this.insertionMode){case pe.INITIAL:{G1(this,t);break}case pe.BEFORE_HTML:{_w(this,t);break}case pe.BEFORE_HEAD:{Nw(this,t);break}case pe.IN_HEAD:{jw(this,t);break}case pe.IN_HEAD_NO_SCRIPT:{Rw(this,t);break}case pe.AFTER_HEAD:{Iw(this,t);break}case pe.IN_BODY:case pe.IN_TABLE:case pe.IN_CAPTION:case pe.IN_COLUMN_GROUP:case pe.IN_TABLE_BODY:case pe.IN_ROW:case pe.IN_CELL:case pe.IN_SELECT:case pe.IN_SELECT_IN_TABLE:{oEe(this,t);break}case pe.TEXT:{Uyt(this,t);break}case pe.IN_TABLE_TEXT:{X1(this,t);break}case pe.IN_TEMPLATE:{pEe(this,t);break}case pe.AFTER_BODY:case pe.IN_FRAMESET:case pe.AFTER_FRAMESET:case pe.AFTER_AFTER_BODY:case pe.AFTER_AFTER_FRAMESET:{nU(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===ae.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case pe.IN_HEAD:case pe.IN_HEAD_NO_SCRIPT:case pe.AFTER_HEAD:case pe.TEXT:case pe.IN_COLUMN_GROUP:case pe.IN_SELECT:case pe.IN_SELECT_IN_TABLE:case pe.IN_FRAMESET:case pe.AFTER_FRAMESET:{this._insertCharacters(t);break}case pe.IN_BODY:case pe.IN_CAPTION:case pe.IN_CELL:case pe.IN_TEMPLATE:case pe.AFTER_BODY:case pe.AFTER_AFTER_BODY:case pe.AFTER_AFTER_FRAMESET:{nEe(this,t);break}case pe.IN_TABLE:case pe.IN_TABLE_BODY:case pe.IN_ROW:{IM(this,t);break}case pe.IN_TABLE_TEXT:{lEe(this,t);break}}}};function $0t(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):aEe(e,t),n}function F0t(e,t){let n=null,i=e.openElements.stackTop;for(;i>=0;i--){const r=e.openElements.items[i];if(r===t.element)break;e._isSpecialElement(r,e.openElements.tagIDs[i])&&(n=r)}return n||(e.openElements.shortenToLength(Math.max(i,0)),e.activeFormattingElements.removeEntry(t)),n}function B0t(e,t,n){let i=t,r=e.openElements.getCommonAncestor(t);for(let s=0,a=r;a!==n;s++,a=r){r=e.openElements.getCommonAncestor(a);const l=e.activeFormattingElements.getElementEntry(a),c=l&&s>=M0t;!l||c?(c&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(a)):(a=U0t(e,l),i===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(a,i),i=a)}return i}function U0t(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function Q0t(e,t,n){const i=e.treeAdapter.getTagName(t),r=Kx(i);if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);r===D.TEMPLATE&&s===mt.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function z0t(e,t,n){const i=e.treeAdapter.getNamespaceURI(n.element),{token:r}=n,s=e.treeAdapter.createElement(r.tagName,i,r.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,r),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,r.tagID)}function tU(e,t){for(let n=0;n=n;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(i);if(r&&!r.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function q0t(e,t){e._setDocumentType(t);const n=t.forceQuirks?$c.QUIRKS:w0t(t);O0t(t)||e._err(t,Ge.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=pe.BEFORE_HTML}function G1(e,t){e._err(t,Ge.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,$c.QUIRKS),e.insertionMode=pe.BEFORE_HTML,e._processToken(t)}function W0t(e,t){t.tagID===D.HTML?(e._insertElement(t,mt.HTML),e.insertionMode=pe.BEFORE_HEAD):_w(e,t)}function K0t(e,t){const n=t.tagID;(n===D.HTML||n===D.HEAD||n===D.BODY||n===D.BR)&&_w(e,t)}function _w(e,t){e._insertFakeRootElement(),e.insertionMode=pe.BEFORE_HEAD,e._processToken(t)}function G0t(e,t){switch(t.tagID){case D.HTML:{Oo(e,t);break}case D.HEAD:{e._insertElement(t,mt.HTML),e.headElement=e.openElements.current,e.insertionMode=pe.IN_HEAD;break}default:Nw(e,t)}}function X0t(e,t){const n=t.tagID;n===D.HEAD||n===D.BODY||n===D.HTML||n===D.BR?Nw(e,t):e._err(t,Ge.endTagWithoutMatchingOpenElement)}function Nw(e,t){e._insertFakeElement(Fe.HEAD,D.HEAD),e.headElement=e.openElements.current,e.insertionMode=pe.IN_HEAD,e._processToken(t)}function Xu(e,t){switch(t.tagID){case D.HTML:{Oo(e,t);break}case D.BASE:case D.BASEFONT:case D.BGSOUND:case D.LINK:case D.META:{e._appendElement(t,mt.HTML),t.ackSelfClosing=!0;break}case D.TITLE:{e._switchToTextParsing(t,Us.RCDATA);break}case D.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Us.RAWTEXT):(e._insertElement(t,mt.HTML),e.insertionMode=pe.IN_HEAD_NO_SCRIPT);break}case D.NOFRAMES:case D.STYLE:{e._switchToTextParsing(t,Us.RAWTEXT);break}case D.SCRIPT:{e._switchToTextParsing(t,Us.SCRIPT_DATA);break}case D.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=pe.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(pe.IN_TEMPLATE);break}case D.HEAD:{e._err(t,Ge.misplacedStartTagForHeadElement);break}default:jw(e,t)}}function Y0t(e,t){switch(t.tagID){case D.HEAD:{e.openElements.pop(),e.insertionMode=pe.AFTER_HEAD;break}case D.BODY:case D.BR:case D.HTML:{jw(e,t);break}case D.TEMPLATE:{i0(e,t);break}default:e._err(t,Ge.endTagWithoutMatchingOpenElement)}}function i0(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==D.TEMPLATE&&e._err(t,Ge.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(D.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Ge.endTagWithoutMatchingOpenElement)}function jw(e,t){e.openElements.pop(),e.insertionMode=pe.AFTER_HEAD,e._processToken(t)}function Z0t(e,t){switch(t.tagID){case D.HTML:{Oo(e,t);break}case D.BASEFONT:case D.BGSOUND:case D.HEAD:case D.LINK:case D.META:case D.NOFRAMES:case D.STYLE:{Xu(e,t);break}case D.NOSCRIPT:{e._err(t,Ge.nestedNoscriptInHead);break}default:Rw(e,t)}}function J0t(e,t){switch(t.tagID){case D.NOSCRIPT:{e.openElements.pop(),e.insertionMode=pe.IN_HEAD;break}case D.BR:{Rw(e,t);break}default:e._err(t,Ge.endTagWithoutMatchingOpenElement)}}function Rw(e,t){const n=t.type===pi.EOF?Ge.openElementsLeftAfterEof:Ge.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=pe.IN_HEAD,e._processToken(t)}function eyt(e,t){switch(t.tagID){case D.HTML:{Oo(e,t);break}case D.BODY:{e._insertElement(t,mt.HTML),e.framesetOk=!1,e.insertionMode=pe.IN_BODY;break}case D.FRAMESET:{e._insertElement(t,mt.HTML),e.insertionMode=pe.IN_FRAMESET;break}case D.BASE:case D.BASEFONT:case D.BGSOUND:case D.LINK:case D.META:case D.NOFRAMES:case D.SCRIPT:case D.STYLE:case D.TEMPLATE:case D.TITLE:{e._err(t,Ge.abandonedHeadElementChild),e.openElements.push(e.headElement,D.HEAD),Xu(e,t),e.openElements.remove(e.headElement);break}case D.HEAD:{e._err(t,Ge.misplacedStartTagForHeadElement);break}default:Iw(e,t)}}function tyt(e,t){switch(t.tagID){case D.BODY:case D.HTML:case D.BR:{Iw(e,t);break}case D.TEMPLATE:{i0(e,t);break}default:e._err(t,Ge.endTagWithoutMatchingOpenElement)}}function Iw(e,t){e._insertFakeElement(Fe.BODY,D.BODY),e.insertionMode=pe.IN_BODY,WR(e,t)}function WR(e,t){switch(t.type){case pi.CHARACTER:{iEe(e,t);break}case pi.WHITESPACE_CHARACTER:{nEe(e,t);break}case pi.COMMENT:{L6(e,t);break}case pi.START_TAG:{Oo(e,t);break}case pi.END_TAG:{KR(e,t);break}case pi.EOF:{oEe(e,t);break}}}function nEe(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function iEe(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function nyt(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function iyt(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function ryt(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,mt.HTML),e.insertionMode=pe.IN_FRAMESET)}function syt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML)}function ayt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&M6.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,mt.HTML)}function oyt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function lyt(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML),n||(e.formElement=e.openElements.current))}function cyt(e,t){e.framesetOk=!1;const n=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const r=e.openElements.tagIDs[i];if(n===D.LI&&r===D.LI||(n===D.DD||n===D.DT)&&(r===D.DD||r===D.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==D.ADDRESS&&r!==D.DIV&&r!==D.P&&e._isSpecialElement(e.openElements.items[i],r))break}e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML)}function uyt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML),e.tokenizer.state=Us.PLAINTEXT}function dyt(e,t){e.openElements.hasInScope(D.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(D.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML),e.framesetOk=!1}function fyt(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Fe.A);n&&(tU(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hyt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pyt(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(D.NOBR)&&(tU(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,mt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function myt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function gyt(e,t){e.treeAdapter.getDocumentMode(e.document)!==$c.QUIRKS&&e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML),e.framesetOk=!1,e.insertionMode=pe.IN_TABLE}function rEe(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,mt.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function sEe(e){const t=Wke(e,sb.TYPE);return t!=null&&t.toLowerCase()===P0t}function byt(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,mt.HTML),sEe(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yyt(e,t){e._appendElement(t,mt.HTML),t.ackSelfClosing=!0}function vyt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._appendElement(t,mt.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function xyt(e,t){t.tagName=Fe.IMG,t.tagID=D.IMG,rEe(e,t)}function Oyt(e,t){e._insertElement(t,mt.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Us.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=pe.TEXT}function wyt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Us.RAWTEXT)}function Syt(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Us.RAWTEXT)}function EY(e,t){e._switchToTextParsing(t,Us.RAWTEXT)}function kyt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===pe.IN_TABLE||e.insertionMode===pe.IN_CAPTION||e.insertionMode===pe.IN_TABLE_BODY||e.insertionMode===pe.IN_ROW||e.insertionMode===pe.IN_CELL?pe.IN_SELECT_IN_TABLE:pe.IN_SELECT}function Eyt(e,t){e.openElements.currentTagId===D.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML)}function Cyt(e,t){e.openElements.hasInScope(D.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,mt.HTML)}function Tyt(e,t){e.openElements.hasInScope(D.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(D.RTC),e._insertElement(t,mt.HTML)}function Ayt(e,t){e._reconstructActiveFormattingElements(),Jke(t),eU(t),t.selfClosing?e._appendElement(t,mt.MATHML):e._insertElement(t,mt.MATHML),t.ackSelfClosing=!0}function _yt(e,t){e._reconstructActiveFormattingElements(),eEe(t),eU(t),t.selfClosing?e._appendElement(t,mt.SVG):e._insertElement(t,mt.SVG),t.ackSelfClosing=!0}function CY(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML)}function Oo(e,t){switch(t.tagID){case D.I:case D.S:case D.B:case D.U:case D.EM:case D.TT:case D.BIG:case D.CODE:case D.FONT:case D.SMALL:case D.STRIKE:case D.STRONG:{hyt(e,t);break}case D.A:{fyt(e,t);break}case D.H1:case D.H2:case D.H3:case D.H4:case D.H5:case D.H6:{ayt(e,t);break}case D.P:case D.DL:case D.OL:case D.UL:case D.DIV:case D.DIR:case D.NAV:case D.MAIN:case D.MENU:case D.ASIDE:case D.CENTER:case D.FIGURE:case D.FOOTER:case D.HEADER:case D.HGROUP:case D.DIALOG:case D.DETAILS:case D.ADDRESS:case D.ARTICLE:case D.SEARCH:case D.SECTION:case D.SUMMARY:case D.FIELDSET:case D.BLOCKQUOTE:case D.FIGCAPTION:{syt(e,t);break}case D.LI:case D.DD:case D.DT:{cyt(e,t);break}case D.BR:case D.IMG:case D.WBR:case D.AREA:case D.EMBED:case D.KEYGEN:{rEe(e,t);break}case D.HR:{vyt(e,t);break}case D.RB:case D.RTC:{Cyt(e,t);break}case D.RT:case D.RP:{Tyt(e,t);break}case D.PRE:case D.LISTING:{oyt(e,t);break}case D.XMP:{wyt(e,t);break}case D.SVG:{_yt(e,t);break}case D.HTML:{nyt(e,t);break}case D.BASE:case D.LINK:case D.META:case D.STYLE:case D.TITLE:case D.SCRIPT:case D.BGSOUND:case D.BASEFONT:case D.TEMPLATE:{Xu(e,t);break}case D.BODY:{iyt(e,t);break}case D.FORM:{lyt(e,t);break}case D.NOBR:{pyt(e,t);break}case D.MATH:{Ayt(e,t);break}case D.TABLE:{gyt(e,t);break}case D.INPUT:{byt(e,t);break}case D.PARAM:case D.TRACK:case D.SOURCE:{yyt(e,t);break}case D.IMAGE:{xyt(e,t);break}case D.BUTTON:{dyt(e,t);break}case D.APPLET:case D.OBJECT:case D.MARQUEE:{myt(e,t);break}case D.IFRAME:{Syt(e,t);break}case D.SELECT:{kyt(e,t);break}case D.OPTION:case D.OPTGROUP:{Eyt(e,t);break}case D.NOEMBED:case D.NOFRAMES:{EY(e,t);break}case D.FRAMESET:{ryt(e,t);break}case D.TEXTAREA:{Oyt(e,t);break}case D.NOSCRIPT:{e.options.scriptingEnabled?EY(e,t):CY(e,t);break}case D.PLAINTEXT:{uyt(e,t);break}case D.COL:case D.TH:case D.TD:case D.TR:case D.HEAD:case D.FRAME:case D.TBODY:case D.TFOOT:case D.THEAD:case D.CAPTION:case D.COLGROUP:break;default:CY(e,t)}}function Nyt(e,t){if(e.openElements.hasInScope(D.BODY)&&(e.insertionMode=pe.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function jyt(e,t){e.openElements.hasInScope(D.BODY)&&(e.insertionMode=pe.AFTER_BODY,mEe(e,t))}function Ryt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Iyt(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(D.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(D.FORM):n&&e.openElements.remove(n))}function Pyt(e){e.openElements.hasInButtonScope(D.P)||e._insertFakeElement(Fe.P,D.P),e._closePElement()}function Dyt(e){e.openElements.hasInListItemScope(D.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(D.LI),e.openElements.popUntilTagNamePopped(D.LI))}function Myt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Lyt(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function $yt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Fyt(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Fe.BR,D.BR),e.openElements.pop(),e.framesetOk=!1}function aEe(e,t){const n=t.tagName,i=t.tagID;for(let r=e.openElements.stackTop;r>0;r--){const s=e.openElements.items[r],a=e.openElements.tagIDs[r];if(i===a&&(i!==D.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=r&&e.openElements.shortenToLength(r);break}if(e._isSpecialElement(s,a))break}}function KR(e,t){switch(t.tagID){case D.A:case D.B:case D.I:case D.S:case D.U:case D.EM:case D.TT:case D.BIG:case D.CODE:case D.FONT:case D.NOBR:case D.SMALL:case D.STRIKE:case D.STRONG:{tU(e,t);break}case D.P:{Pyt(e);break}case D.DL:case D.UL:case D.OL:case D.DIR:case D.DIV:case D.NAV:case D.PRE:case D.MAIN:case D.MENU:case D.ASIDE:case D.BUTTON:case D.CENTER:case D.FIGURE:case D.FOOTER:case D.HEADER:case D.HGROUP:case D.DIALOG:case D.ADDRESS:case D.ARTICLE:case D.DETAILS:case D.SEARCH:case D.SECTION:case D.SUMMARY:case D.LISTING:case D.FIELDSET:case D.BLOCKQUOTE:case D.FIGCAPTION:{Ryt(e,t);break}case D.LI:{Dyt(e);break}case D.DD:case D.DT:{Myt(e,t);break}case D.H1:case D.H2:case D.H3:case D.H4:case D.H5:case D.H6:{Lyt(e);break}case D.BR:{Fyt(e);break}case D.BODY:{Nyt(e,t);break}case D.HTML:{jyt(e,t);break}case D.FORM:{Iyt(e);break}case D.APPLET:case D.OBJECT:case D.MARQUEE:{$yt(e,t);break}case D.TEMPLATE:{i0(e,t);break}default:aEe(e,t)}}function oEe(e,t){e.tmplInsertionModeStack.length>0?pEe(e,t):nU(e,t)}function Byt(e,t){var n;t.tagID===D.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Uyt(e,t){e._err(t,Ge.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function IM(e,t){if(e.openElements.currentTagId!==void 0&&tEe.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=pe.IN_TABLE_TEXT,t.type){case pi.CHARACTER:{cEe(e,t);break}case pi.WHITESPACE_CHARACTER:{lEe(e,t);break}}else vE(e,t)}function Qyt(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,mt.HTML),e.insertionMode=pe.IN_CAPTION}function zyt(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,mt.HTML),e.insertionMode=pe.IN_COLUMN_GROUP}function Vyt(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Fe.COLGROUP,D.COLGROUP),e.insertionMode=pe.IN_COLUMN_GROUP,iU(e,t)}function Hyt(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,mt.HTML),e.insertionMode=pe.IN_TABLE_BODY}function qyt(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Fe.TBODY,D.TBODY),e.insertionMode=pe.IN_TABLE_BODY,GR(e,t)}function Wyt(e,t){e.openElements.hasInTableScope(D.TABLE)&&(e.openElements.popUntilTagNamePopped(D.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Kyt(e,t){sEe(t)?e._appendElement(t,mt.HTML):vE(e,t),t.ackSelfClosing=!0}function Gyt(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,mt.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ex(e,t){switch(t.tagID){case D.TD:case D.TH:case D.TR:{qyt(e,t);break}case D.STYLE:case D.SCRIPT:case D.TEMPLATE:{Xu(e,t);break}case D.COL:{Vyt(e,t);break}case D.FORM:{Gyt(e,t);break}case D.TABLE:{Wyt(e,t);break}case D.TBODY:case D.TFOOT:case D.THEAD:{Hyt(e,t);break}case D.INPUT:{Kyt(e,t);break}case D.CAPTION:{Qyt(e,t);break}case D.COLGROUP:{zyt(e,t);break}default:vE(e,t)}}function QS(e,t){switch(t.tagID){case D.TABLE:{e.openElements.hasInTableScope(D.TABLE)&&(e.openElements.popUntilTagNamePopped(D.TABLE),e._resetInsertionMode());break}case D.TEMPLATE:{i0(e,t);break}case D.BODY:case D.CAPTION:case D.COL:case D.COLGROUP:case D.HTML:case D.TBODY:case D.TD:case D.TFOOT:case D.TH:case D.THEAD:case D.TR:break;default:vE(e,t)}}function vE(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,WR(e,t),e.fosterParentingEnabled=n}function lEe(e,t){e.pendingCharacterTokens.push(t)}function cEe(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function X1(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===D.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===D.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===D.OPTGROUP&&e.openElements.pop();break}case D.OPTION:{e.openElements.currentTagId===D.OPTION&&e.openElements.pop();break}case D.SELECT:{e.openElements.hasInSelectScope(D.SELECT)&&(e.openElements.popUntilTagNamePopped(D.SELECT),e._resetInsertionMode());break}case D.TEMPLATE:{i0(e,t);break}}}function tvt(e,t){const n=t.tagID;n===D.CAPTION||n===D.TABLE||n===D.TBODY||n===D.TFOOT||n===D.THEAD||n===D.TR||n===D.TD||n===D.TH?(e.openElements.popUntilTagNamePopped(D.SELECT),e._resetInsertionMode(),e._processStartTag(t)):fEe(e,t)}function nvt(e,t){const n=t.tagID;n===D.CAPTION||n===D.TABLE||n===D.TBODY||n===D.TFOOT||n===D.THEAD||n===D.TR||n===D.TD||n===D.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(D.SELECT),e._resetInsertionMode(),e.onEndTag(t)):hEe(e,t)}function ivt(e,t){switch(t.tagID){case D.BASE:case D.BASEFONT:case D.BGSOUND:case D.LINK:case D.META:case D.NOFRAMES:case D.SCRIPT:case D.STYLE:case D.TEMPLATE:case D.TITLE:{Xu(e,t);break}case D.CAPTION:case D.COLGROUP:case D.TBODY:case D.TFOOT:case D.THEAD:{e.tmplInsertionModeStack[0]=pe.IN_TABLE,e.insertionMode=pe.IN_TABLE,ex(e,t);break}case D.COL:{e.tmplInsertionModeStack[0]=pe.IN_COLUMN_GROUP,e.insertionMode=pe.IN_COLUMN_GROUP,iU(e,t);break}case D.TR:{e.tmplInsertionModeStack[0]=pe.IN_TABLE_BODY,e.insertionMode=pe.IN_TABLE_BODY,GR(e,t);break}case D.TD:case D.TH:{e.tmplInsertionModeStack[0]=pe.IN_ROW,e.insertionMode=pe.IN_ROW,XR(e,t);break}default:e.tmplInsertionModeStack[0]=pe.IN_BODY,e.insertionMode=pe.IN_BODY,Oo(e,t)}}function rvt(e,t){t.tagID===D.TEMPLATE&&i0(e,t)}function pEe(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(D.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):nU(e,t)}function svt(e,t){t.tagID===D.HTML?Oo(e,t):fN(e,t)}function mEe(e,t){var n;if(t.tagID===D.HTML){if(e.fragmentContext||(e.insertionMode=pe.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===D.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&e._setEndLocation(i,t)}}else fN(e,t)}function fN(e,t){e.insertionMode=pe.IN_BODY,WR(e,t)}function avt(e,t){switch(t.tagID){case D.HTML:{Oo(e,t);break}case D.FRAMESET:{e._insertElement(t,mt.HTML);break}case D.FRAME:{e._appendElement(t,mt.HTML),t.ackSelfClosing=!0;break}case D.NOFRAMES:{Xu(e,t);break}}}function ovt(e,t){t.tagID===D.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==D.FRAMESET&&(e.insertionMode=pe.AFTER_FRAMESET))}function lvt(e,t){switch(t.tagID){case D.HTML:{Oo(e,t);break}case D.NOFRAMES:{Xu(e,t);break}}}function cvt(e,t){t.tagID===D.HTML&&(e.insertionMode=pe.AFTER_AFTER_FRAMESET)}function uvt(e,t){t.tagID===D.HTML?Oo(e,t):mA(e,t)}function mA(e,t){e.insertionMode=pe.IN_BODY,WR(e,t)}function dvt(e,t){switch(t.tagID){case D.HTML:{Oo(e,t);break}case D.NOFRAMES:{Xu(e,t);break}}}function fvt(e,t){t.chars=rs,e._insertCharacters(t)}function hvt(e,t){e._insertCharacters(t),e.framesetOk=!1}function gEe(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==mt.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function pvt(e,t){if(_0t(t))gEe(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(n);i===mt.MATHML?Jke(t):i===mt.SVG&&(N0t(t),eEe(t)),eU(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function mvt(e,t){if(t.tagID===D.P||t.tagID===D.BR){gEe(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const i=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(i)===mt.HTML){e._endTagOutsideForeignContent(t);break}const r=e.treeAdapter.getTagName(i);if(r.toLowerCase()===t.tagName){t.tagName=r,e.openElements.shortenToLength(n);break}}}Fe.AREA,Fe.BASE,Fe.BASEFONT,Fe.BGSOUND,Fe.BR,Fe.COL,Fe.EMBED,Fe.FRAME,Fe.HR,Fe.IMG,Fe.INPUT,Fe.KEYGEN,Fe.LINK,Fe.META,Fe.PARAM,Fe.SOURCE,Fe.TRACK,Fe.WBR;const gvt=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,bvt=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),TY={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function bEe(e,t){const n=Tvt(e),i=ISe("type",{handlers:{root:yvt,element:vvt,text:xvt,comment:vEe,doctype:Ovt,raw:Svt},unknown:kvt}),r={parser:n?new kY(TY):kY.getFragmentParser(void 0,TY),handle(l){i(l,r)},stitches:!1,options:t||{}};i(e,r),Gx(r,tf());const s=n?r.parser.document:r.parser.getFragment(),a=Abt(s,{file:r.options.file});return r.stitches&&bE(a,"comment",function(l,c,u){const d=l;if(d.value.stitch&&u&&c!==void 0){const f=u.children;return f[c]=d.value.stitch,c}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function yEe(e,t){let n=-1;if(e)for(;++n4&&(t.parser.tokenizer.state=0);const n={type:pi.CHARACTER,chars:e.value,location:xE(e)};Gx(t,tf(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ovt(e,t){const n={type:pi.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xE(e)};Gx(t,tf(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function wvt(e,t){t.stitches=!0;const n=Avt(e);if("children"in e&&"children"in n){const i=bEe({type:"root",children:e.children},t.options);n.children=i.children}vEe({type:"comment",value:{stitch:n}},t)}function vEe(e,t){const n=e.value,i={type:pi.COMMENT,data:n,location:xE(e)};Gx(t,tf(e)),t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken)}function Svt(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,xEe(t,tf(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(gvt,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function kvt(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))wvt(n,t);else{let i="";throw bvt.has(n.type)&&(i=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+i)}}function Gx(e,t){xEe(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Us.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function xEe(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Evt(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Us.PLAINTEXT)return;Gx(t,tf(e));const i=t.parser.openElements.current;let r="namespaceURI"in i?i.namespaceURI:Fg.html;r===Fg.html&&n==="svg"&&(r=Fg.svg);const s=Ibt({...e,children:[]},{space:r===Fg.svg?"svg":"html"}),a={type:pi.START_TAG,tagName:n,tagID:Kx(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:xE(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Cvt(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Ubt.includes(n)||t.parser.tokenizer.state===Us.PLAINTEXT)return;Gx(t,UR(e));const i={type:pi.END_TAG,tagName:n,tagID:Kx(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xE(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Us.RCDATA||t.parser.tokenizer.state===Us.RAWTEXT||t.parser.tokenizer.state===Us.SCRIPT_DATA)&&(t.parser.tokenizer.state=Us.DATA)}function Tvt(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function xE(e){const t=tf(e)||{line:void 0,column:void 0,offset:void 0},n=UR(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Avt(e){return"children"in e?Zv({...e,children:[]}):Zv(e)}function _vt(e){return function(t,n){return bEe(t,{...e,file:n})}}const Nvt="modulepreload",jvt=function(e){return"/"+e},AY={},Ud=function(t,n,i){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=jvt(c),c in AY)return;AY[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Nvt,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})};var Rvt=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ivt=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Pvt=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,PM={Space_Separator:Rvt,ID_Start:Ivt,ID_Continue:Pvt},Ms={isSpaceSeparator(e){return typeof e=="string"&&PM.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||PM.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||PM.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let F6,Po,Kf,hN,Tm,Lu,Oa,rU,Pw;var Dvt=function(t,n){F6=String(t),Po="start",Kf=[],hN=0,Tm=1,Lu=0,Oa=void 0,rU=void 0,Pw=void 0;do Oa=Mvt(),Fvt[Po]();while(Oa.type!=="eof");return typeof n=="function"?B6({"":Pw},"",n):Pw};function B6(e,t,n){const i=e[t];if(i!=null&&typeof i=="object")if(Array.isArray(i))for(let r=0;r0;){const n=mh();if(!Ms.isHexDigit(n))throw Wr(dt());e+=dt()}return String.fromCodePoint(parseInt(e,16))}const Fvt={start(){if(Oa.type==="eof")throw lg();DM()},beforePropertyName(){switch(Oa.type){case"identifier":case"string":rU=Oa.value,Po="afterPropertyName";return;case"punctuator":jT();return;case"eof":throw lg()}},afterPropertyName(){if(Oa.type==="eof")throw lg();Po="beforePropertyValue"},beforePropertyValue(){if(Oa.type==="eof")throw lg();DM()},beforeArrayValue(){if(Oa.type==="eof")throw lg();if(Oa.type==="punctuator"&&Oa.value==="]"){jT();return}DM()},afterPropertyValue(){if(Oa.type==="eof")throw lg();switch(Oa.value){case",":Po="beforePropertyName";return;case"}":jT()}},afterArrayValue(){if(Oa.type==="eof")throw lg();switch(Oa.value){case",":Po="beforeArrayValue";return;case"]":jT()}},end(){}};function DM(){let e;switch(Oa.type){case"punctuator":switch(Oa.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=Oa.value;break}if(Pw===void 0)Pw=e;else{const t=Kf[Kf.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,rU,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")Kf.push(e),Array.isArray(e)?Po="beforeArrayValue":Po="beforePropertyName";else{const t=Kf[Kf.length-1];t==null?Po="end":Array.isArray(t)?Po="afterArrayValue":Po="afterPropertyValue"}}function jT(){Kf.pop();const e=Kf[Kf.length-1];e==null?Po="end":Array.isArray(e)?Po="afterArrayValue":Po="afterPropertyValue"}function Wr(e){return pN(e===void 0?`JSON5: invalid end of input at ${Tm}:${Lu}`:`JSON5: invalid character '${wEe(e)}' at ${Tm}:${Lu}`)}function lg(){return pN(`JSON5: invalid end of input at ${Tm}:${Lu}`)}function _Y(){return Lu-=5,pN(`JSON5: invalid identifier character at ${Tm}:${Lu}`)}function Bvt(e){console.warn(`JSON5: '${wEe(e)}' in strings is not valid ECMAScript; consider escaping`)}function wEe(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function pN(e){const t=new SyntaxError(e);return t.lineNumber=Tm,t.columnNumber=Lu,t}var Uvt=function(t,n,i){const r=[];let s="",a,l,c="",u;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(i=n.space,u=n.quote,n=n.replacer),typeof n=="function")l=n;else if(Array.isArray(n)){a=[];for(const b of n){let v;typeof b=="string"?v=b:(typeof b=="number"||b instanceof String||b instanceof Number)&&(v=String(b)),v!==void 0&&a.indexOf(v)<0&&a.push(v)}}return i instanceof Number?i=Number(i):i instanceof String&&(i=String(i)),typeof i=="number"?i>0&&(i=Math.min(10,Math.floor(i)),c=" ".substr(0,i)):typeof i=="string"&&(c=i.substr(0,10)),d("",{"":t});function d(b,v){let y=v[b];switch(y!=null&&(typeof y.toJSON5=="function"?y=y.toJSON5(b):typeof y.toJSON=="function"&&(y=y.toJSON(b))),l&&(y=l.call(v,b,y)),y instanceof Number?y=Number(y):y instanceof String?y=String(y):y instanceof Boolean&&(y=y.valueOf()),y){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof y=="string")return f(y);if(typeof y=="number")return String(y);if(typeof y=="object")return Array.isArray(y)?g(y):h(y)}function f(b){const v={"'":.1,'"':.2},y={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let x="";for(let O=0;Ov[O]=0)throw TypeError("Converting circular structure to JSON5");r.push(b);let v=s;s=s+c;let y=a||Object.keys(b),x=[];for(const O of y){const k=d(O,b);if(k!==void 0){let S=p(O)+":";c!==""&&(S+=" "),S+=k,x.push(S)}}let w;if(x.length===0)w="{}";else{let O;if(c==="")O=x.join(","),w="{"+O+"}";else{let k=`, +`))}function c(p,g,b,v){const y=b.enter("tableCell"),x=b.enter("phrasing"),w=b.containerPhrasing(p,{...v,before:s,after:s});return x(),y(),w}function u(p,g){return kht(p,{align:g,alignDelimiters:i,padding:n,stringLength:r})}function d(p,g,b){const v=p.children;let y=-1;const x=[],w=g.enter("table");for(;++y0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Apt={tokenize:Mpt,partial:!0};function _pt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ipt,continuation:{tokenize:Ppt},exit:Dpt}},text:{91:{name:"gfmFootnoteCall",tokenize:Rpt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Npt,resolveTo:jpt}}}}function Npt(e,t,n){const i=this;let r=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;r--;){const c=i.events[r][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!a||!a._balanced)return n(c);const u=Du(i.sliceSerialize({start:a.end,end:i.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function jpt(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...l),e}function Rpt(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,a;return l;function l(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(s>999||f===93&&!a||f===null||f===91||Nr(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return r.includes(Du(i.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Nr(f)||(a=!0),s++,e.consume(f),f===92?d:u}function d(f){return f===91||f===92||f===93?(e.consume(f),s++,u):u(f)}}function Ipt(e,t,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,a=0,l;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(a>999||g===93&&!l||g===null||g===91||Nr(g))return n(g);if(g===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=Du(i.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Nr(g)||(l=!0),a++,e.consume(g),g===92?f:d}function f(g){return g===91||g===92||g===93?(e.consume(g),a++,d):d(g)}function h(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),r.includes(s)||r.push(s),Qi(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function Ppt(e,t,n){return e.check(fE,t,e.attempt(Apt,t,n))}function Dpt(e){e.exit("gfmFootnoteDefinition")}function Mpt(e,t,n){const i=this;return Qi(e,r,"gfmFootnoteDefinitionIndent",5);function r(s){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function Lpt(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:r};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(a,l){let c=-1;for(;++c1?c(g):(a.consume(g),f++,p);if(f<2&&!n)return c(g);const v=a.exit("strikethroughSequenceTemporary"),y=Wv(g);return v._open=!y||y===2&&!!b,v._close=!b||b===2&&!!y,l(g)}}}class $pt{constructor(){this.map=[]}add(t,n,i){Fpt(this,t,n,i)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let r=i.pop();for(;r;){for(const s of r)t.push(s);r=i.pop()}this.map.length=0}}function Fpt(e,t,n,i){let r=0;if(!(n===0&&i.length===0)){for(;r-1;){const A=i.events[j][1].type;if(A==="lineEnding"||A==="linePrefix")j--;else break}const T=j>-1?i.events[j][1].type:null,L=T==="tableHead"||T==="tableRow"?S:c;return L===S&&i.parser.lazy[i.now().line]?n(_):L(_)}function c(_){return e.enter("tableHead"),e.enter("tableRow"),u(_)}function u(_){return _===124||(a=!0,s+=1),d(_)}function d(_){return _===null?n(_):wn(_)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),p):n(_):ki(_)?Qi(e,d,"whitespace")(_):(s+=1,a&&(a=!1,r+=1),_===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),f(_)))}function f(_){return _===null||_===124||Nr(_)?(e.exit("data"),d(_)):(e.consume(_),_===92?h:f)}function h(_){return _===92||_===124?(e.consume(_),f):f(_)}function p(_){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(_):(e.enter("tableDelimiterRow"),a=!1,ki(_)?Qi(e,g,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):g(_))}function g(_){return _===45||_===58?v(_):_===124?(a=!0,e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),b):k(_)}function b(_){return ki(_)?Qi(e,v,"whitespace")(_):v(_)}function v(_){return _===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),y):_===45?(s+=1,y(_)):_===null||wn(_)?O(_):k(_)}function y(_){return _===45?(e.enter("tableDelimiterFiller"),x(_)):k(_)}function x(_){return _===45?(e.consume(_),x):_===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(_))}function w(_){return ki(_)?Qi(e,O,"whitespace")(_):O(_)}function O(_){return _===124?g(_):_===null||wn(_)?!a||r!==s?k(_):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(_)):k(_)}function k(_){return n(_)}function S(_){return e.enter("tableRow"),E(_)}function E(_){return _===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),E):_===null||wn(_)?(e.exit("tableRow"),t(_)):ki(_)?Qi(e,E,"whitespace")(_):(e.enter("data"),C(_))}function C(_){return _===null||_===124||Nr(_)?(e.exit("data"),E(_)):(e.consume(_),_===92?N:C)}function N(_){return _===92||_===124?(e.consume(_),C):C(_)}}function zpt(e,t){let n=-1,i=!0,r=0,s=[0,0,0,0],a=[0,0,0,0],l=!1,c=0,u,d,f;const h=new $pt;for(;++nn[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;e.add(g,b,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return r!==void 0&&(s.end=Object.assign({},Y0(t.events,r)),e.add(r,0,[["exit",s,t]]),s=void 0),s}function QX(e,t,n,i,r){const s=[],a=Y0(t.events,n);r&&(r.end=Object.assign({},a),s.push(["exit",r,t])),i.end=Object.assign({},a),s.push(["exit",i,t]),e.add(n+1,0,s)}function Y0(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const Vpt={name:"tasklistCheck",tokenize:qpt};function Hpt(){return{text:{91:Vpt}}}function qpt(e,t,n){const i=this;return r;function r(c){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),s)}function s(c){return Nr(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return wn(c)?t(c):ki(c)?e.check({tokenize:Wpt},t,n)(c):n(c)}}function Wpt(e,t,n){return Qi(e,i,"whitespace");function i(r){return r===null?n(r):t(r)}}function Kpt(e){return lSe([vpt(),_pt(),Lpt(e),Upt(),Hpt()])}const Gpt={};function Xpt(e){const t=this,n=e||Gpt,i=t.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Kpt(n)),s.push(mpt()),a.push(gpt(n))}const zX=function(e,t,n){const i=hE(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++tu&&(u=d):d&&(u!==void 0&&u>-1&&c.push(` +`.repeat(u)||" "),u=-1,c.push(d))}return c.join("")}function tke(e,t,n){return e.type==="element"?rmt(e,t,n):e.type==="text"?n.whitespace==="normal"?nke(e,n):smt(e):[]}function rmt(e,t,n){const i=ike(e,n),r=e.children||[];let s=-1,a=[];if(nmt(e))return a;let l,c;for(R6(e)||WX(e)&&zX(t,e,WX)?c=` +`:tmt(e)?(l=2,c=2):eke(e)&&(l=1,c=1);++s]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",g=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],b=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],v=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:b,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:v},k={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},S=[k,f,l,n,e.C_BLOCK_COMMENT_MODE,d,u],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:S.concat([{begin:/\(/,end:/\)/,keywords:O,contains:S.concat(["self"]),relevance:0}]),relevance:0},C={className:"function",begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:O,relevance:0},{begin:p,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,l,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"",keywords:O,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function fmt(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=dmt(e),i=n.keywords;return i.type=[...i.type,...t.type],i.literal=[...i.literal,...t.literal],i.built_in=[...i.built_in,...t.built_in],i._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function HB(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(l);const c={match:/\\"/},u={className:"string",begin:/'/,end:/'/},d={match:/\\'/},f={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),g={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},b=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],v=["true","false"],y={match:/(\/[a-z._-]+)+/},x=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],w=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],k=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:b,literal:v,built_in:[...x,...w,"set","shopt",...O,...k]},contains:[p,e.SHEBANG(),g,f,s,a,y,l,c,u,d,n]}}function hmt(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",a="("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",v={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[f,l,n,e.C_BLOCK_COMMENT_MODE,d,u],x={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:v,contains:y.concat([{begin:/\(/,end:/\)/,keywords:v,contains:y.concat(["self"]),relevance:0}]),relevance:0},w={begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:v,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:v,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(h,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,l,{begin:/\(/,end:/\)/,keywords:v,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,f]};return{name:"C",aliases:["h"],keywords:v,disableAutodetect:!0,illegal:"=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:f,strings:u,keywords:v}}}function pmt(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),i="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",a="(?!struct)("+i+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",l={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},d={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},f={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},h={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},p=t.optional(r)+e.IDENT_RE+"\\s*\\(",g=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],b=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],v=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:b,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:v},k={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},S=[k,f,l,n,e.C_BLOCK_COMMENT_MODE,d,u],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:S.concat([{begin:/\(/,end:/\)/,keywords:O,contains:S.concat(["self"]),relevance:0}]),relevance:0},C={className:"function",begin:"("+a+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:i,keywords:O,relevance:0},{begin:p,returnBegin:!0,contains:[h],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,d]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,u,d,l,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,u,d,l]}]},l,n,e.C_BLOCK_COMMENT_MODE,f]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"",keywords:O,contains:["self",l]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function mmt(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],i=["default","false","null","true"],r=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],a={keyword:r.concat(s),built_in:t,literal:i},l=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),c={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},d={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},f=e.inherit(d,{illegal:/\n/}),h={className:"subst",begin:/\{/,end:/\}/,keywords:a},p=e.inherit(h,{illegal:/\n/}),g={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},b={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]},v=e.inherit(b,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});h.contains=[b,g,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,c,e.C_BLOCK_COMMENT_MODE],p.contains=[v,g,f,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,c,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[u,b,g,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x={begin:"<",end:">",contains:[{beginKeywords:"in out"},l]},w=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",O={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:a,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,c,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},l,x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[l,x,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+w+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:a,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,x],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,relevance:0,contains:[y,c,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},O]}}const gmt=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),bmt=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ymt=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],vmt=[...bmt,...ymt],xmt=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Omt=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),wmt=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Smt=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function kmt(e){const t=e.regex,n=gmt(e),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r="and or not only",s=/@-?\w[\w]*(-\w+)*/,a="[a-zA-Z-][a-zA-Z0-9_-]*",l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,i,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+a,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Omt.join("|")+")"},{begin:":(:)?("+wmt.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Smt.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...l,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...l,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:r,attribute:xmt.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...l,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+vmt.join("|")+")\\b"}]}}function Emt(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Cmt(e){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"ske(e,t,n-1))}function Amt(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",i=n+ske("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),c={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},d={className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:c,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+i+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:c,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,KX,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},KX,u]}}const GX="[A-Za-z$_][0-9A-Za-z$_]*",_mt=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Nmt=["true","false","null","undefined","NaN","Infinity"],ake=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],oke=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],lke=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],jmt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Rmt=[].concat(lke,ake,oke);function cke(e){const t=e.regex,n=(M,{after:B})=>{const I="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(M,B)=>{const I=M[0].length+M.index,H=M.input[I];if(H==="<"||H===","){B.ignoreMatch();return}H===">"&&(n(M,{after:I})||B.ignoreMatch());let X;const Q=M.input.substring(I);if(X=Q.match(/^\s*=/)){B.ignoreMatch();return}if((X=Q.match(/^\s+extends\s+/))&&X.index===0){B.ignoreMatch();return}}},l={$pattern:GX,keyword:_mt,literal:Nmt,built_in:Rmt,"variable.language":jmt},c="[0-9](_?[0-9])*",u=`\\.(${c})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${d})((${u})|\\.)?|(${u}))[eE][+-]?(${c})\\b`},{begin:`\\b(${d})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},b={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},x={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},w=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,b,v,{match:/\$\d+/},f];h.contains=w.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(w)});const O=[].concat(x,h.contains),k=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(O)}]),S={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},E={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...ake,...oke]}},N={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},_={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function T(M){return t.concat("(?!",M.join("|"),")")}const L={match:t.concat(/\b/,T([...lke,"super","import"].map(M=>`${M}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},A={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},R={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},P="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",$={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(P)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),N,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,b,v,x,{match:/\$\d+/},f,C,{scope:"attr",match:i+t.lookahead(":"),relevance:0},$,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,e.REGEXP_MODE,{className:"function",begin:P,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[S,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},L,j,E,R,{match:/\$[(.]/}]}}function uke(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],r={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var J0="[0-9](_*[0-9])*",ST=`\\.(${J0})`,kT="[0-9a-fA-F](_*[0-9a-fA-F])*",Imt={className:"number",variants:[{begin:`(\\b(${J0})((${ST})|\\.)?|(${ST}))[eE][+-]?(${J0})[fFdD]?\\b`},{begin:`\\b(${J0})((${ST})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ST})[fFdD]?\\b`},{begin:`\\b(${J0})[fFdD]\\b`},{begin:`\\b0[xX]((${kT})\\.?|(${kT})?\\.(${kT}))[pP][+-]?(${J0})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${kT})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Pmt(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},a={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,s,r]}]};r.contains.push(a);const l={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"string"}),"self"]}]},u=Imt,d=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),f={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},h=f;return h.variants[1].contains=[f],f.variants[1].contains=[h],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,d,n,i,l,c,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[f,e.C_LINE_COMMENT_MODE,d],relevance:0},e.C_LINE_COMMENT_MODE,d,l,c,a,e.C_NUMBER_MODE]},d]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},l,c]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:` +`},u]}}const Dmt=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Mmt=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Lmt=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],$mt=[...Mmt,...Lmt],Fmt=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),dke=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),fke=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Bmt=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),Umt=dke.concat(fke).sort().reverse();function Qmt(e){const t=Dmt(e),n=Umt,i="and or not only",r="[\\w-]+",s="("+r+"|@\\{"+r+"\\})",a=[],l=[],c=function(w){return{className:"string",begin:"~?"+w+".*?"+w}},u=function(w,O,k){return{className:w,begin:O,relevance:k}},d={$pattern:/[a-z-]+/,keyword:i,attribute:Fmt.join(" ")},f={begin:"\\(",end:"\\)",contains:l,keywords:d,relevance:0};l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c("'"),c('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,f,u("variable","@@?"+r,10),u("variable","@\\{"+r+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:r+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const h=l.concat({begin:/\{/,end:/\}/,contains:a}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(l)},g={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Bmt.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:l}}]},b={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:d,returnEnd:!0,contains:l,relevance:0}},v={className:"variable",variants:[{begin:"@"+r+"\\s*:",relevance:15},{begin:"@"+r}],starts:{end:"[;}]",returnEnd:!0,contains:h}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,u("keyword","all\\b"),u("variable","@\\{"+r+"\\}"),{begin:"\\b("+$mt.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,u("selector-tag",s,0),u("selector-id","#"+s),u("selector-class","\\."+s,0),u("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+dke.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+fke.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:h},{begin:"!important"},t.FUNCTION_DISPATCH]},x={begin:r+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,b,v,x,g,y,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:a}}function zmt(e){const t="\\[=*\\[",n="\\]=*\\]",i={begin:t,end:n,contains:["self"]},r=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[i],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[i],relevance:5}])}}function hke(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},r={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},a={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},l=/[A-Za-z][A-Za-z0-9+.-]*/,c={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,l,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},d={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=e.inherit(u,{contains:[]}),h=e.inherit(d,{contains:[]});u.contains.push(h),d.contains.push(f);let p=[n,c];return[u,d,f,h].forEach(y=>{y.contains=y.contains.concat(p)}),p=p.concat(u,d),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,s,u,d,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},r,i,c,a,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Vmt(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,l={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},c={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:l,illegal:"/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+c.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function Hmt(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],i=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},a={begin:/->\{/,end:/\}/},l={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[l]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},d=[e.BACKSLASH_ESCAPE,s,c],f=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],h=(b,v,y="\\1")=>{const x=y==="\\1"?y:t.concat(y,v);return t.concat(t.concat("(?:",b,")"),v,/(?:\\.|[^\\\/])*?/,x,/(?:\\.|[^\\\/])*?/,y,i)},p=(b,v,y)=>t.concat(t.concat("(?:",b,")"),v,/(?:\\.|[^\\\/])*?/,y,i),g=[c,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),a,{className:"string",contains:d,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:h("s|tr|y",t.either(...f,{capture:!0}))},{begin:h("s|tr|y","\\(","\\)")},{begin:h("s|tr|y","\\[","\\]")},{begin:h("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...f,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,l,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=g,a.contains=g,{name:"Perl",aliases:["pl","pm"],keywords:r,contains:g}}function qmt(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,i=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),r=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=t.concat(/[A-Z]+/,n),a={scope:"variable",match:"\\$+"+i},l={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=e.inherit(e.APOS_STRING_MODE,{illegal:null}),d=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(c)}),f={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(A,R)=>{R.data._beginMatch=A[1]||A[2]},"on:end":(A,R)=>{R.data._beginMatch!==A[1]&&R.ignoreMatch()}},h=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[ +]`,g={scope:"string",variants:[d,u,f,h]},b={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},v=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],x=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],O={keyword:y,literal:(A=>{const R=[];return A.forEach(P=>{R.push(P),P.toLowerCase()===P?R.push(P.toUpperCase()):R.push(P.toLowerCase())}),R})(v),built_in:x},k=A=>A.map(R=>R.replace(/\|\d+$/,"")),S={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",k(x).join("\\b|"),"\\b)"),r],scope:{1:"keyword",4:"title.class"}}]},E=t.concat(i,"\\b(?!\\()"),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),E],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[r,t.concat(/::/,t.lookahead(/(?!class\b)/)),E],scope:{1:"title.class",3:"variable.constant"}},{match:[r,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[r,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},N={scope:"attr",match:t.concat(i,t.lookahead(":"),t.lookahead(/(?!::)/))},_={relevance:0,begin:/\(/,end:/\)/,keywords:O,contains:[N,a,C,e.C_BLOCK_COMMENT_MODE,g,b,S]},j={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",k(y).join("\\b|"),"|",k(x).join("\\b|"),"\\b)"),i,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[_]};_.contains.push(j);const T=[N,C,e.C_BLOCK_COMMENT_MODE,g,b,S],L={begin:t.concat(/#\[\s*\\?/,t.either(r,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:v,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:v,keyword:["new","array"]},contains:["self",...T]},...T,{scope:"meta",variants:[{match:r},{match:s}]}]};return{case_insensitive:!1,keywords:O,contains:[L,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},l,{scope:"variable.language",match:/\$this\b/},a,j,C,{match:[/const/,/\s/,i],scope:{1:"keyword",3:"variable.constant"}},S,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:O,contains:["self",L,a,C,e.C_BLOCK_COMMENT_MODE,g,b]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},g,b]}}function Wmt(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function Kmt(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function mke(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],l={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},c={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:l,illegal:/#/},d={begin:/\{\{/,relevance:0},f={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,c,d,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,c,d,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,d,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,d,u]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h="[0-9](_?[0-9])*",p=`(\\b(${h}))?\\.(${h})|\\b(${h})\\.`,g=`\\b|${i.join("|")}`,b={className:"number",relevance:0,variants:[{begin:`(\\b(${h})|(${p}))[eE][+-]?(${h})[jJ]?(?=${g})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${h})[jJ](?=${g})`}]},v={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:l,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:["self",c,b,f,e.HASH_COMMENT_MODE]}]};return u.contains=[f,b,c],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:l,illegal:/(<\/|\?)|=>/,contains:[c,b,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,v,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[b,y,f]}]}}function Gmt(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Xmt(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,i=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),r=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[r,i]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,i]},{scope:{1:"punctuation",2:"number"},match:[s,i]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,i]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:r},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Ymt(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",i=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=t.concat(i,/(::\w+)*/),a={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},l={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},u=[e.COMMENT("#","$",{contains:[l]}),e.COMMENT("^=begin","^=end",{contains:[l],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],d={className:"subst",begin:/#\{/,end:/\}/,keywords:a},f={className:"string",contains:[e.BACKSLASH_ESCAPE,d],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,d]})]}]},h="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",g={className:"number",relevance:0,variants:[{begin:`\\b(${h})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},b={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:a}]},S=[f,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/\b(class|module)\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:a},{match:[/(include|extend)\s+/,r],scope:{2:"title.class"},keywords:a},{relevance:0,match:[r,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:i,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[b]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[f,{begin:n}],relevance:0},g,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:a},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,d],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,u),relevance:0}].concat(c,u);d.contains=S,b.contains=S;const _=[{begin:/^\s*=>/,starts:{end:"$",contains:S}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:a,contains:S}}];return u.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:a,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(_).concat(u).concat(S)}}function Zmt(e){const t=e.regex,n=/(r#)?/,i=t.concat(n,e.UNDERSCORE_IDENT_RE),r=t.concat(n,e.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,r,t.lookahead(/\s*\(/))},a="([ui](8|16|32|64|128|size)|f(32|64))?",l=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],c=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],d=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:d,keyword:l,literal:c,built_in:u},illegal:""},s]}}const Jmt=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),egt=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],tgt=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],ngt=[...egt,...tgt],igt=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),rgt=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),sgt=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),agt=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function ogt(e){const t=Jmt(e),n=sgt,i=rgt,r="@[a-z-]+",s="and or not only",l={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+ngt.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+i.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},l,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+agt.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,l,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:r,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:igt.join(" ")},contains:[{begin:r,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},l,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function lgt(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function cgt(e){const t=e.regex,n=e.COMMENT("--","$"),i={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},r={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],a=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],d=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=d,g=[...u,...c].filter(k=>!d.includes(k)),b={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},v={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function x(k){return t.concat(/\b/,t.either(...k.map(S=>S.replace(/\s+/,"\\s+"))),/\b/)}const w={scope:"keyword",match:x(h),relevance:0};function O(k,{exceptions:S,when:E}={}){const C=E;return S=S||[],k.map(N=>N.match(/\|\d+$/)||S.includes(N)?N:C(N)?`${N}|0`:N)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:O(g,{when:k=>k.length<3}),literal:s,type:l,built_in:f},contains:[{scope:"type",match:x(a)},w,y,b,i,r,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,v]}}function gke(e){return e?typeof e=="string"?e:e.source:null}function z1(e){return gr("(?=",e,")")}function gr(...e){return e.map(n=>gke(n)).join("")}function ugt(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Ao(...e){return"("+(ugt(e).capture?"":"?:")+e.map(i=>gke(i)).join("|")+")"}const qB=e=>gr(/\b/,e,/\w$/.test(e)?/\b/:/\B/),dgt=["Protocol","Type"].map(qB),XX=["init","self"].map(qB),fgt=["Any","Self"],TM=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],YX=["false","nil","true"],hgt=["assignment","associativity","higherThan","left","lowerThan","none","right"],pgt=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],ZX=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],bke=Ao(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),yke=Ao(bke,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),AM=gr(bke,yke,"*"),vke=Ao(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),rN=Ao(vke,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),pd=gr(vke,rN,"*"),ET=gr(/[A-Z]/,rN,"*"),mgt=["attached","autoclosure",gr(/convention\(/,Ao("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",gr(/objc\(/,pd,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],ggt=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function bgt(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),i=[e.C_LINE_COMMENT_MODE,n],r={match:[/\./,Ao(...dgt,...XX)],className:{2:"keyword"}},s={match:gr(/\./,Ao(...TM)),relevance:0},a=TM.filter(Te=>typeof Te=="string").concat(["_|0"]),l=TM.filter(Te=>typeof Te!="string").concat(fgt).map(qB),c={variants:[{className:"keyword",match:Ao(...l,...XX)}]},u={$pattern:Ao(/\b\w+/,/#\w+/),keyword:a.concat(pgt),literal:YX},d=[r,s,c],f={match:gr(/\./,Ao(...ZX)),relevance:0},h={className:"built_in",match:gr(/\b/,Ao(...ZX),/(?=\()/)},p=[f,h],g={match:/->/,relevance:0},b={className:"operator",relevance:0,variants:[{match:AM},{match:`\\.(\\.|${yke})+`}]},v=[g,b],y="([0-9]_*)+",x="([0-9a-fA-F]_*)+",w={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${x})(\\.(${x}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},O=(Te="")=>({className:"subst",variants:[{match:gr(/\\/,Te,/[0\\tnr"']/)},{match:gr(/\\/,Te,/u\{[0-9a-fA-F]{1,8}\}/)}]}),k=(Te="")=>({className:"subst",match:gr(/\\/,Te,/[\t ]*(?:[\r\n]|\r\n)/)}),S=(Te="")=>({className:"subst",label:"interpol",begin:gr(/\\/,Te,/\(/),end:/\)/}),E=(Te="")=>({begin:gr(Te,/"""/),end:gr(/"""/,Te),contains:[O(Te),k(Te),S(Te)]}),C=(Te="")=>({begin:gr(Te,/"/),end:gr(/"/,Te),contains:[O(Te),S(Te)]}),N={className:"string",variants:[E(),E("#"),E("##"),E("###"),C(),C("#"),C("##"),C("###")]},_=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],j={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:_},T=Te=>{const rt=gr(Te,/\//),Be=gr(/\//,Te);return{begin:rt,end:Be,contains:[..._,{scope:"comment",begin:`#(?!.*${Be})`,end:/$/}]}},L={scope:"regexp",variants:[T("###"),T("##"),T("#"),j]},A={match:gr(/`/,pd,/`/)},R={className:"variable",match:/\$\d+/},P={className:"variable",match:`\\$${rN}+`},$=[A,R,P],M={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:ggt,contains:[...v,w,N]}]}},B={scope:"keyword",match:gr(/@/,Ao(...mgt),z1(Ao(/\(/,/\s+/)))},I={scope:"meta",match:gr(/@/,pd)},H=[M,B,I],X={match:z1(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:gr(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,rN,"+")},{className:"type",match:ET,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:gr(/\s+&\s+/,z1(ET)),relevance:0}]},Q={begin://,keywords:u,contains:[...i,...d,...H,g,X]};X.contains.push(Q);const q={match:gr(pd,/\s*:/),keywords:"_|0",relevance:0},U={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",q,...i,L,...d,...p,...v,w,N,...$,...H,X]},te={begin://,keywords:"repeat each",contains:[...i,X]},le={begin:Ao(z1(gr(pd,/\s*:/)),z1(gr(pd,/\s+/,pd,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:pd}]},oe={begin:/\(/,end:/\)/,keywords:u,contains:[le,...i,...d,...v,w,N,...H,X,U],endsParent:!0,illegal:/["']/},re={match:[/(func|macro)/,/\s+/,Ao(A.match,pd,AM)],className:{1:"keyword",3:"title.function"},contains:[te,oe,t],illegal:[/\[/,/%/]},pe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[te,oe,t],illegal:/\[|%/},K={match:[/operator/,/\s+/,AM],className:{1:"keyword",3:"title"}},G={begin:[/precedencegroup/,/\s+/,ET],className:{1:"keyword",3:"title"},contains:[X],keywords:[...hgt,...YX],end:/}/},se={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},fe={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Se={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,pd,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[te,...d,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:ET},...d],relevance:0}]};for(const Te of N.variants){const rt=Te.contains.find(Me=>Me.label==="interpol");rt.keywords=u;const Be=[...d,...p,...v,w,N,...$];rt.contains=[...Be,{begin:/\(/,end:/\)/,contains:["self",...Be]}]}return{name:"Swift",keywords:u,contains:[...i,re,pe,se,fe,Se,K,G,{beginKeywords:"import",end:/$/,contains:[...i],relevance:0},L,...d,...p,...v,w,N,...$,...H,X,U]}}const sN="[A-Za-z$_][0-9A-Za-z$_]*",xke=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Oke=["true","false","null","undefined","NaN","Infinity"],wke=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Ske=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],kke=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Eke=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Cke=[].concat(kke,wke,Ske);function ygt(e){const t=e.regex,n=(M,{after:B})=>{const I="",end:""},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(M,B)=>{const I=M[0].length+M.index,H=M.input[I];if(H==="<"||H===","){B.ignoreMatch();return}H===">"&&(n(M,{after:I})||B.ignoreMatch());let X;const Q=M.input.substring(I);if(X=Q.match(/^\s*=/)){B.ignoreMatch();return}if((X=Q.match(/^\s+extends\s+/))&&X.index===0){B.ignoreMatch();return}}},l={$pattern:sN,keyword:xke,literal:Oke,built_in:Cke,"variable.language":Eke},c="[0-9](_?[0-9])*",u=`\\.(${c})`,d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${d})((${u})|\\.)?|(${u}))[eE][+-]?(${c})\\b`},{begin:`\\b(${d})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},b={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},v={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},x={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},w=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,b,v,{match:/\$\d+/},f];h.contains=w.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(w)});const O=[].concat(x,h.contains),k=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(O)}]),S={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k},E={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...wke,...Ske]}},N={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},_={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[S],illegal:/%/},j={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function T(M){return t.concat("(?!",M.join("|"),")")}const L={match:t.concat(/\b/,T([...kke,"super","import"].map(M=>`${M}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},A={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},R={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},S]},P="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",$={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(P)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:k,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),N,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,b,v,x,{match:/\$\d+/},f,C,{scope:"attr",match:i+t.lookahead(":"),relevance:0},$,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[x,e.REGEXP_MODE,{className:"function",begin:P,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:k}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:s},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[S,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},A,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[S]},L,j,E,R,{match:/\$[(.]/}]}}function Tke(e){const t=e.regex,n=ygt(e),i=sN,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},a={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[n.exports.CLASS_REFERENCE]},l={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},c=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:sN,keyword:xke.concat(c),literal:Oke,built_in:Cke.concat(r),"variable.language":Eke},d={className:"meta",begin:"@"+i},f=(b,v,y)=>{const x=b.contains.findIndex(w=>w.label===v);if(x===-1)throw new Error("can not find mode to replace");b.contains.splice(x,1,y)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(d);const h=n.contains.find(b=>b.scope==="attr"),p=Object.assign({},h,{match:t.concat(i,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,h,p]),n.contains=n.contains.concat([d,s,a,p]),f(n,"shebang",e.SHEBANG()),f(n,"use_strict",l);const g=n.contains.find(b=>b.label==="func.def");return g.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function vgt(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},i={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},r=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,a=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,l=/\d{1,2}(:\d{1,2}){1,2}/,c={className:"literal",variants:[{begin:t.concat(/# */,t.either(s,r),/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,t.either(s,r),/ +/,t.either(a,l),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},d={className:"label",begin:/^\w+:/},f=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),h=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,i,c,u,d,f,h,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[h]}]}}function xgt(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),i=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],r={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},a={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},l={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:i},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,a,r,e.QUOTE_STRING_MODE,c,u,l]}}function Ogt(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(s,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),c=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[s,c,l,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[s,a,c,l]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Ake(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},r={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,r]},l=e.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),h={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},g={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},b={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},v=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},h,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},g,b,s,a],y=[...v];return y.pop(),y.push(l),p.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:v}}const wgt={arduino:fmt,bash:HB,c:hmt,cpp:pmt,csharp:mmt,css:kmt,diff:Emt,go:Cmt,graphql:Tmt,ini:rke,java:Amt,javascript:cke,json:uke,kotlin:Pmt,less:Qmt,lua:zmt,makefile:hke,markdown:pke,objectivec:Vmt,perl:Hmt,php:qmt,"php-template":Wmt,plaintext:Kmt,python:mke,"python-repl":Gmt,r:Xmt,ruby:Ymt,rust:Zmt,scss:ogt,shell:lgt,sql:cgt,swift:bgt,typescript:Tke,vbnet:vgt,wasm:xgt,xml:Ogt,yaml:Ake};function _ke(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],i=typeof n;(i==="object"||i==="function")&&!Object.isFrozen(n)&&_ke(n)}),e}let JX=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Nke(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function Bp(e,...t){const n=Object.create(null);for(const i in e)n[i]=e[i];return t.forEach(function(i){for(const r in i)n[r]=i[r]}),n}const Sgt="",eY=e=>!!e.scope,kgt=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((i,r)=>`${i}${"_".repeat(r+1)}`)].join(" ")}return`${t}${e}`};class Egt{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Nke(t)}openNode(t){if(!eY(t))return;const n=kgt(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){eY(t)&&(this.buffer+=Sgt)}value(){return this.buffer}span(t){this.buffer+=``}}const tY=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class WB{constructor(){this.rootNode=tY(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=tY({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(i=>this._walk(t,i)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{WB._collapse(n)}))}}class Cgt extends WB{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const i=t.root;n&&(i.scope=`language:${n}`),this.add(i)}toHTML(){return new Egt(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function LS(e){return e?typeof e=="string"?e:e.source:null}function jke(e){return Jb("(?=",e,")")}function Tgt(e){return Jb("(?:",e,")*")}function Agt(e){return Jb("(?:",e,")?")}function Jb(...e){return e.map(n=>LS(n)).join("")}function _gt(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function KB(...e){return"("+(_gt(e).capture?"":"?:")+e.map(i=>LS(i)).join("|")+")"}function Rke(e){return new RegExp(e.toString()+"|").exec("").length-1}function Ngt(e,t){const n=e&&e.exec(t);return n&&n.index===0}const jgt=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function GB(e,{joinWith:t}){let n=0;return e.map(i=>{n+=1;const r=n;let s=LS(i),a="";for(;s.length>0;){const l=jgt.exec(s);if(!l){a+=s;break}a+=s.substring(0,l.index),s=s.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?a+="\\"+String(Number(l[1])+r):(a+=l[0],l[0]==="("&&n++)}return a}).map(i=>`(${i})`).join(t)}const Rgt=/\b\B/,Ike="[a-zA-Z]\\w*",XB="[a-zA-Z_]\\w*",Pke="\\b\\d+(\\.\\d+)?",Dke="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Mke="\\b(0b[01]+)",Igt="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Pgt=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Jb(t,/.*\b/,e.binary,/\b.*/)),Bp({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},$S={begin:"\\\\[\\s\\S]",relevance:0},Dgt={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[$S]},Mgt={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[$S]},Lgt={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},VR=function(e,t,n={}){const i=Bp({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const r=KB("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:Jb(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},$gt=VR("//","$"),Fgt=VR("/\\*","\\*/"),Bgt=VR("#","$"),Ugt={scope:"number",begin:Pke,relevance:0},Qgt={scope:"number",begin:Dke,relevance:0},zgt={scope:"number",begin:Mke,relevance:0},Vgt={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[$S,{begin:/\[/,end:/\]/,relevance:0,contains:[$S]}]},Hgt={scope:"title",begin:Ike,relevance:0},qgt={scope:"title",begin:XB,relevance:0},Wgt={begin:"\\.\\s*"+XB,relevance:0},Kgt=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var CT=Object.freeze({__proto__:null,APOS_STRING_MODE:Dgt,BACKSLASH_ESCAPE:$S,BINARY_NUMBER_MODE:zgt,BINARY_NUMBER_RE:Mke,COMMENT:VR,C_BLOCK_COMMENT_MODE:Fgt,C_LINE_COMMENT_MODE:$gt,C_NUMBER_MODE:Qgt,C_NUMBER_RE:Dke,END_SAME_AS_BEGIN:Kgt,HASH_COMMENT_MODE:Bgt,IDENT_RE:Ike,MATCH_NOTHING_RE:Rgt,METHOD_GUARD:Wgt,NUMBER_MODE:Ugt,NUMBER_RE:Pke,PHRASAL_WORDS_MODE:Lgt,QUOTE_STRING_MODE:Mgt,REGEXP_MODE:Vgt,RE_STARTERS_RE:Igt,SHEBANG:Pgt,TITLE_MODE:Hgt,UNDERSCORE_IDENT_RE:XB,UNDERSCORE_TITLE_MODE:qgt});function Ggt(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Xgt(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Ygt(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Ggt,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Zgt(e,t){Array.isArray(e.illegal)&&(e.illegal=KB(...e.illegal))}function Jgt(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function ebt(e,t){e.relevance===void 0&&(e.relevance=1)}const tbt=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(i=>{delete e[i]}),e.keywords=n.keywords,e.begin=Jb(n.beforeMatch,jke(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},nbt=["of","and","for","in","not","or","if","then","parent","list","value"],ibt="keyword";function Lke(e,t,n=ibt){const i=Object.create(null);return typeof e=="string"?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(s){Object.assign(i,Lke(e[s],t,s))}),i;function r(s,a){t&&(a=a.map(l=>l.toLowerCase())),a.forEach(function(l){const c=l.split("|");i[c[0]]=[s,rbt(c[0],c[1])]})}}function rbt(e,t){return t?Number(t):sbt(e)?0:1}function sbt(e){return nbt.includes(e.toLowerCase())}const nY={},tb=e=>{console.error(e)},iY=(e,...t)=>{console.log(`WARN: ${e}`,...t)},I0=(e,t)=>{nY[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),nY[`${e}/${t}`]=!0)},aN=new Error;function $ke(e,t,{key:n}){let i=0;const r=e[n],s={},a={};for(let l=1;l<=t.length;l++)a[l+i]=r[l],s[l+i]=!0,i+=Rke(t[l-1]);e[n]=a,e[n]._emit=s,e[n]._multi=!0}function abt(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw tb("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),aN;if(typeof e.beginScope!="object"||e.beginScope===null)throw tb("beginScope must be object"),aN;$ke(e,e.begin,{key:"beginScope"}),e.begin=GB(e.begin,{joinWith:""})}}function obt(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw tb("skip, excludeEnd, returnEnd not compatible with endScope: {}"),aN;if(typeof e.endScope!="object"||e.endScope===null)throw tb("endScope must be object"),aN;$ke(e,e.end,{key:"endScope"}),e.end=GB(e.end,{joinWith:""})}}function lbt(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function cbt(e){lbt(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),abt(e),obt(e)}function ubt(e){function t(a,l){return new RegExp(LS(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,l]),this.matchAt+=Rke(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(c=>c[1]);this.matcherRe=t(GB(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(l);if(!c)return null;const u=c.findIndex((f,h)=>h>0&&f!==void 0),d=this.matchIndexes[u];return c.splice(0,u),Object.assign(c,d)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const c=new n;return this.rules.slice(l).forEach(([u,d])=>c.addRule(u,d)),c.compile(),this.multiRegexes[l]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,c){this.rules.push([l,c]),c.type==="begin"&&this.count++}exec(l){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let u=c.exec(l);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){const d=this.getMatcher(0);d.lastIndex=this.lastIndex+1,u=d.exec(l)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function r(a){const l=new i;return a.contains.forEach(c=>l.addRule(c.begin,{rule:c,type:"begin"})),a.terminatorEnd&&l.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&l.addRule(a.illegal,{type:"illegal"}),l}function s(a,l){const c=a;if(a.isCompiled)return c;[Xgt,Jgt,cbt,tbt].forEach(d=>d(a,l)),e.compilerExtensions.forEach(d=>d(a,l)),a.__beforeBegin=null,[Ygt,Zgt,ebt].forEach(d=>d(a,l)),a.isCompiled=!0;let u=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),u=a.keywords.$pattern,delete a.keywords.$pattern),u=u||/\w+/,a.keywords&&(a.keywords=Lke(a.keywords,e.case_insensitive)),c.keywordPatternRe=t(u,!0),l&&(a.begin||(a.begin=/\B|\b/),c.beginRe=t(c.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(c.endRe=t(c.end)),c.terminatorEnd=LS(c.end)||"",a.endsWithParent&&l.terminatorEnd&&(c.terminatorEnd+=(a.end?"|":"")+l.terminatorEnd)),a.illegal&&(c.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(d){return dbt(d==="self"?a:d)})),a.contains.forEach(function(d){s(d,c)}),a.starts&&s(a.starts,l),c.matcher=r(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Bp(e.classNameAliases||{}),s(e)}function Fke(e){return e?e.endsWithParent||Fke(e.starts):!1}function dbt(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Bp(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Fke(e)?Bp(e,{starts:e.starts?Bp(e.starts):null}):Object.isFrozen(e)?Bp(e):e}var fbt="11.11.1";class hbt extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const _M=Nke,rY=Bp,sY=Symbol("nomatch"),pbt=7,Bke=function(e){const t=Object.create(null),n=Object.create(null),i=[];let r=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Cgt};function c(P){return l.noHighlightRe.test(P)}function u(P){let $=P.className+" ";$+=P.parentNode?P.parentNode.className:"";const M=l.languageDetectRe.exec($);if(M){const B=C(M[1]);return B||(iY(s.replace("{}",M[1])),iY("Falling back to no-highlight mode for this block.",P)),B?M[1]:"no-highlight"}return $.split(/\s+/).find(B=>c(B)||C(B))}function d(P,$,M){let B="",I="";typeof $=="object"?(B=P,M=$.ignoreIllegals,I=$.language):(I0("10.7.0","highlight(lang, code, ...args) has been deprecated."),I0("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),I=P,B=$),M===void 0&&(M=!0);const H={code:B,language:I};A("before:highlight",H);const X=H.result?H.result:f(H.language,H.code,M);return X.code=H.code,A("after:highlight",X),X}function f(P,$,M,B){const I=Object.create(null);function H(Y,he){return Y.keywords[he]}function X(){if(!Be.keywords){Ie.addText(qe);return}let Y=0;Be.keywordPatternRe.lastIndex=0;let he=Be.keywordPatternRe.exec(qe),Oe="";for(;he;){Oe+=qe.substring(Y,he.index);const Ke=Se.case_insensitive?he[0].toLowerCase():he[0],et=H(Be,Ke);if(et){const[Ct,je]=et;if(Ie.addText(Oe),Oe="",I[Ke]=(I[Ke]||0)+1,I[Ke]<=pbt&&(Pe+=je),Ct.startsWith("_"))Oe+=he[0];else{const ve=Se.classNameAliases[Ct]||Ct;U(he[0],ve)}}else Oe+=he[0];Y=Be.keywordPatternRe.lastIndex,he=Be.keywordPatternRe.exec(qe)}Oe+=qe.substring(Y),Ie.addText(Oe)}function Q(){if(qe==="")return;let Y=null;if(typeof Be.subLanguage=="string"){if(!t[Be.subLanguage]){Ie.addText(qe);return}Y=f(Be.subLanguage,qe,!0,Me[Be.subLanguage]),Me[Be.subLanguage]=Y._top}else Y=p(qe,Be.subLanguage.length?Be.subLanguage:null);Be.relevance>0&&(Pe+=Y.relevance),Ie.__addSublanguage(Y._emitter,Y.language)}function q(){Be.subLanguage!=null?Q():X(),qe=""}function U(Y,he){Y!==""&&(Ie.startScope(he),Ie.addText(Y),Ie.endScope())}function te(Y,he){let Oe=1;const Ke=he.length-1;for(;Oe<=Ke;){if(!Y._emit[Oe]){Oe++;continue}const et=Se.classNameAliases[Y[Oe]]||Y[Oe],Ct=he[Oe];et?U(Ct,et):(qe=Ct,X(),qe=""),Oe++}}function le(Y,he){return Y.scope&&typeof Y.scope=="string"&&Ie.openNode(Se.classNameAliases[Y.scope]||Y.scope),Y.beginScope&&(Y.beginScope._wrap?(U(qe,Se.classNameAliases[Y.beginScope._wrap]||Y.beginScope._wrap),qe=""):Y.beginScope._multi&&(te(Y.beginScope,he),qe="")),Be=Object.create(Y,{parent:{value:Be}}),Be}function oe(Y,he,Oe){let Ke=Ngt(Y.endRe,Oe);if(Ke){if(Y["on:end"]){const et=new JX(Y);Y["on:end"](he,et),et.isMatchIgnored&&(Ke=!1)}if(Ke){for(;Y.endsParent&&Y.parent;)Y=Y.parent;return Y}}if(Y.endsWithParent)return oe(Y.parent,he,Oe)}function re(Y){return Be.matcher.regexIndex===0?(qe+=Y[0],1):(Le=!0,0)}function pe(Y){const he=Y[0],Oe=Y.rule,Ke=new JX(Oe),et=[Oe.__beforeBegin,Oe["on:begin"]];for(const Ct of et)if(Ct&&(Ct(Y,Ke),Ke.isMatchIgnored))return re(he);return Oe.skip?qe+=he:(Oe.excludeBegin&&(qe+=he),q(),!Oe.returnBegin&&!Oe.excludeBegin&&(qe=he)),le(Oe,Y),Oe.returnBegin?0:he.length}function K(Y){const he=Y[0],Oe=$.substring(Y.index),Ke=oe(Be,Y,Oe);if(!Ke)return sY;const et=Be;Be.endScope&&Be.endScope._wrap?(q(),U(he,Be.endScope._wrap)):Be.endScope&&Be.endScope._multi?(q(),te(Be.endScope,Y)):et.skip?qe+=he:(et.returnEnd||et.excludeEnd||(qe+=he),q(),et.excludeEnd&&(qe=he));do Be.scope&&Ie.closeNode(),!Be.skip&&!Be.subLanguage&&(Pe+=Be.relevance),Be=Be.parent;while(Be!==Ke.parent);return Ke.starts&&le(Ke.starts,Y),et.returnEnd?0:he.length}function G(){const Y=[];for(let he=Be;he!==Se;he=he.parent)he.scope&&Y.unshift(he.scope);Y.forEach(he=>Ie.openNode(he))}let se={};function fe(Y,he){const Oe=he&&he[0];if(qe+=Y,Oe==null)return q(),0;if(se.type==="begin"&&he.type==="end"&&se.index===he.index&&Oe===""){if(qe+=$.slice(he.index,he.index+1),!r){const Ke=new Error(`0 width match regex (${P})`);throw Ke.languageName=P,Ke.badRule=se.rule,Ke}return 1}if(se=he,he.type==="begin")return pe(he);if(he.type==="illegal"&&!M){const Ke=new Error('Illegal lexeme "'+Oe+'" for mode "'+(Be.scope||"")+'"');throw Ke.mode=Be,Ke}else if(he.type==="end"){const Ke=K(he);if(Ke!==sY)return Ke}if(he.type==="illegal"&&Oe==="")return qe+=` +`,1;if(ke>1e5&&ke>he.index*3)throw new Error("potential infinite loop, way more iterations than matches");return qe+=Oe,Oe.length}const Se=C(P);if(!Se)throw tb(s.replace("{}",P)),new Error('Unknown language: "'+P+'"');const Te=ubt(Se);let rt="",Be=B||Te;const Me={},Ie=new l.__emitter(l);G();let qe="",Pe=0,Ve=0,ke=0,Le=!1;try{if(Se.__emitTokens)Se.__emitTokens($,Ie);else{for(Be.matcher.considerAll();;){ke++,Le?Le=!1:Be.matcher.considerAll(),Be.matcher.lastIndex=Ve;const Y=Be.matcher.exec($);if(!Y)break;const he=$.substring(Ve,Y.index),Oe=fe(he,Y);Ve=Y.index+Oe}fe($.substring(Ve))}return Ie.finalize(),rt=Ie.toHTML(),{language:P,value:rt,relevance:Pe,illegal:!1,_emitter:Ie,_top:Be}}catch(Y){if(Y.message&&Y.message.includes("Illegal"))return{language:P,value:_M($),illegal:!0,relevance:0,_illegalBy:{message:Y.message,index:Ve,context:$.slice(Ve-100,Ve+100),mode:Y.mode,resultSoFar:rt},_emitter:Ie};if(r)return{language:P,value:_M($),illegal:!1,relevance:0,errorRaised:Y,_emitter:Ie,_top:Be};throw Y}}function h(P){const $={value:_M(P),illegal:!1,relevance:0,_top:a,_emitter:new l.__emitter(l)};return $._emitter.addText(P),$}function p(P,$){$=$||l.languages||Object.keys(t);const M=h(P),B=$.filter(C).filter(_).map(q=>f(q,P,!1));B.unshift(M);const I=B.sort((q,U)=>{if(q.relevance!==U.relevance)return U.relevance-q.relevance;if(q.language&&U.language){if(C(q.language).supersetOf===U.language)return 1;if(C(U.language).supersetOf===q.language)return-1}return 0}),[H,X]=I,Q=H;return Q.secondBest=X,Q}function g(P,$,M){const B=$&&n[$]||M;P.classList.add("hljs"),P.classList.add(`language-${B}`)}function b(P){let $=null;const M=u(P);if(c(M))return;if(A("before:highlightElement",{el:P,language:M}),P.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",P);return}if(P.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(P)),l.throwUnescapedHTML))throw new hbt("One of your code blocks includes unescaped HTML.",P.innerHTML);$=P;const B=$.textContent,I=M?d(B,{language:M,ignoreIllegals:!0}):p(B);P.innerHTML=I.value,P.dataset.highlighted="yes",g(P,M,I.language),P.result={language:I.language,re:I.relevance,relevance:I.relevance},I.secondBest&&(P.secondBest={language:I.secondBest.language,relevance:I.secondBest.relevance}),A("after:highlightElement",{el:P,result:I,text:B})}function v(P){l=rY(l,P)}const y=()=>{O(),I0("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function x(){O(),I0("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let w=!1;function O(){function P(){O()}if(document.readyState==="loading"){w||window.addEventListener("DOMContentLoaded",P,!1),w=!0;return}document.querySelectorAll(l.cssSelector).forEach(b)}function k(P,$){let M=null;try{M=$(e)}catch(B){if(tb("Language definition for '{}' could not be registered.".replace("{}",P)),r)tb(B);else throw B;M=a}M.name||(M.name=P),t[P]=M,M.rawDefinition=$.bind(null,e),M.aliases&&N(M.aliases,{languageName:P})}function S(P){delete t[P];for(const $ of Object.keys(n))n[$]===P&&delete n[$]}function E(){return Object.keys(t)}function C(P){return P=(P||"").toLowerCase(),t[P]||t[n[P]]}function N(P,{languageName:$}){typeof P=="string"&&(P=[P]),P.forEach(M=>{n[M.toLowerCase()]=$})}function _(P){const $=C(P);return $&&!$.disableAutodetect}function j(P){P["before:highlightBlock"]&&!P["before:highlightElement"]&&(P["before:highlightElement"]=$=>{P["before:highlightBlock"](Object.assign({block:$.el},$))}),P["after:highlightBlock"]&&!P["after:highlightElement"]&&(P["after:highlightElement"]=$=>{P["after:highlightBlock"](Object.assign({block:$.el},$))})}function T(P){j(P),i.push(P)}function L(P){const $=i.indexOf(P);$!==-1&&i.splice($,1)}function A(P,$){const M=P;i.forEach(function(B){B[M]&&B[M]($)})}function R(P){return I0("10.7.0","highlightBlock will be removed entirely in v12.0"),I0("10.7.0","Please use highlightElement now."),b(P)}Object.assign(e,{highlight:d,highlightAuto:p,highlightAll:O,highlightElement:b,highlightBlock:R,configure:v,initHighlighting:y,initHighlightingOnLoad:x,registerLanguage:k,unregisterLanguage:S,listLanguages:E,getLanguage:C,registerAliases:N,autoDetection:_,inherit:rY,addPlugin:T,removePlugin:L}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=fbt,e.regex={concat:Jb,lookahead:jke,either:KB,optional:Agt,anyNumberOfTimes:Tgt};for(const P in CT)typeof CT[P]=="object"&&_ke(CT[P]);return Object.assign(e,CT),e},Gv=Bke({});Gv.newInstance=()=>Bke({});var mbt=Gv;Gv.HighlightJS=Gv;Gv.default=Gv;const go=ux(mbt),aY={},gbt="hljs-";function bbt(e){const t=go.newInstance();return e&&s(e),{highlight:n,highlightAuto:i,listLanguages:r,register:s,registerAlias:a,registered:l};function n(c,u,d){const f=d||aY,h=typeof f.prefix=="string"?f.prefix:gbt;if(!t.getLanguage(c))throw new Error("Unknown language: `"+c+"` is not registered");t.configure({__emitter:ybt,classPrefix:h});const p=t.highlight(u,{ignoreIllegals:!0,language:c});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});const g=p._emitter.root,b=g.data;return b.language=p.language,b.relevance=p.relevance,g}function i(c,u){const f=(u||aY).subset||r();let h=-1,p=0,g;for(;++hp&&(p=v.data.relevance,g=v)}return g||{type:"root",children:[],data:{language:void 0,relevance:p}}}function r(){return t.listLanguages()}function s(c,u){if(typeof c=="string")t.registerLanguage(c,u);else{let d;for(d in c)Object.hasOwn(c,d)&&t.registerLanguage(d,c[d])}}function a(c,u){if(typeof c=="string")t.registerAliases(typeof u=="string"?u:[...u],{languageName:c});else{let d;for(d in c)if(Object.hasOwn(c,d)){const f=c[d];t.registerAliases(typeof f=="string"?f:[...f],{languageName:d})}}}function l(c){return!!t.getLanguage(c)}}class ybt{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],i=n.children[n.children.length-1];i&&i.type==="text"?i.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const i=this.stack[this.stack.length-1],r=t.root.children;n?i.children.push({type:"element",tagName:"span",properties:{className:[n]},children:r}):i.children.push(...r)}openNode(t){const n=this,i=t.split(".").map(function(a,l){return l?a+"_".repeat(l):n.options.classPrefix+a}),r=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:i},children:[]};r.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const vbt={};function oY(e){const t=e||vbt,n=t.aliases,i=t.detect||!1,r=t.languages||wgt,s=t.plainText,a=t.prefix,l=t.subset;let c="hljs";const u=bbt(r);if(n&&u.registerAlias(n),a){const d=a.indexOf("-");c=d===-1?a:a.slice(0,d)}return function(d,f){pE(d,"element",function(h,p,g){if(h.tagName!=="code"||!g||g.type!=="element"||g.tagName!=="pre")return;const b=xbt(h);if(b===!1||!b&&!i||b&&s&&s.includes(b))return;Array.isArray(h.properties.className)||(h.properties.className=[]),h.properties.className.includes(c)||h.properties.className.unshift(c);const v=imt(h,{whitespace:"pre"});let y;try{y=b?u.highlight(b,v,{prefix:a}):u.highlightAuto(v,{prefix:a,subset:l})}catch(x){const w=x;if(b&&/Unknown language/.test(w.message)){f.message("Cannot highlight as `"+b+"`, it’s not registered",{ancestors:[g,h],cause:w,place:h.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw w}!b&&y.data&&y.data.language&&h.properties.className.push("language-"+y.data.language),y.children.length>0&&(h.children=y.children)})}}function xbt(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let i;for(;++n-1&&s<=t.length){let a=0;for(;;){let l=n[a];if(l===void 0){const c=uY(t,n[a-1]);l=c===-1?t.length+1:c+1,n[a]=l}if(l>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function r(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length1?n[s.line-2]:0)+s.column-1;if(a=55296&&e<=57343}function qbt(e){return e>=56320&&e<=57343}function Wbt(e,t){return(e-55296)*1024+9216+t}function qke(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Wke(e){return e>=64976&&e<=65007||Hbt.has(e)}var Ge;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Ge||(Ge={}));const Kbt=65536;class Gbt{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Kbt,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:i,col:r,offset:s}=this,a=r+n,l=s+n;return{code:t,startLine:i,endLine:i,startCol:a,endCol:a,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(qbt(n))return this.pos++,this._addGap(),Wbt(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,ae.EOF;return this._err(Ge.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let i=0;i=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ae.EOF;const i=this.html.charCodeAt(n);return i===ae.CARRIAGE_RETURN?ae.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,ae.EOF;let t=this.html.charCodeAt(this.pos);return t===ae.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,ae.LINE_FEED):t===ae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Hke(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===ae.LINE_FEED||t===ae.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){qke(t)?this._err(Ge.controlCharacterInInputStream):Wke(t)&&this._err(Ge.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const Xbt=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Ybt=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Zbt(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ybt.get(e))!==null&&t!==void 0?t:e}var Ta;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ta||(Ta={}));const Jbt=32;var Up;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Up||(Up={}));function P6(e){return e>=Ta.ZERO&&e<=Ta.NINE}function e0t(e){return e>=Ta.UPPER_A&&e<=Ta.UPPER_F||e>=Ta.LOWER_A&&e<=Ta.LOWER_F}function t0t(e){return e>=Ta.UPPER_A&&e<=Ta.UPPER_Z||e>=Ta.LOWER_A&&e<=Ta.LOWER_Z||P6(e)}function n0t(e){return e===Ta.EQUALS||t0t(e)}var va;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(va||(va={}));var zf;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(zf||(zf={}));class i0t{constructor(t,n,i){this.decodeTree=t,this.emitCodePoint=n,this.errors=i,this.state=va.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=zf.Strict}startEntity(t){this.decodeMode=t,this.state=va.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case va.EntityStart:return t.charCodeAt(n)===Ta.NUM?(this.state=va.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=va.NamedEntity,this.stateNamedEntity(t,n));case va.NumericStart:return this.stateNumericStart(t,n);case va.NumericDecimal:return this.stateNumericDecimal(t,n);case va.NumericHex:return this.stateNumericHex(t,n);case va.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Jbt)===Ta.LOWER_X?(this.state=va.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=va.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,i,r){if(n!==i){const s=i-n;this.result=this.result*Math.pow(r,s)+Number.parseInt(t.substr(n,s),r),this.consumed+=s}}stateNumericHex(t,n){const i=n;for(;n>14;for(;n>14,s!==0){if(a===Ta.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==zf.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:i}=this,r=(i[n]&Up.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,r,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){const{decodeTree:r}=this;return this.emitCodePoint(n===1?r[t]&~Up.VALUE_LENGTH:r[t+1],i),n===3&&this.emitCodePoint(r[t+2],i),i}end(){var t;switch(this.state){case va.NamedEntity:return this.result!==0&&(this.decodeMode!==zf.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case va.NumericDecimal:return this.emitNumericEntity(0,2);case va.NumericHex:return this.emitNumericEntity(0,3);case va.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case va.EntityStart:return 0}}}function r0t(e,t,n,i){const r=(t&Up.BRANCH_LENGTH)>>7,s=t&Up.JUMP_TABLE;if(r===0)return s!==0&&i===s?n:-1;if(s){const c=i-s;return c<0||c>=r?-1:e[n+c]-1}let a=n,l=a+r-1;for(;a<=l;){const c=a+l>>>1,u=e[c];if(ui)l=c-1;else return e[c+r]}return-1}var mt;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(mt||(mt={}));var nb;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(nb||(nb={}));var Lc;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Lc||(Lc={}));var Fe;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(Fe||(Fe={}));var D;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(D||(D={}));const s0t=new Map([[Fe.A,D.A],[Fe.ADDRESS,D.ADDRESS],[Fe.ANNOTATION_XML,D.ANNOTATION_XML],[Fe.APPLET,D.APPLET],[Fe.AREA,D.AREA],[Fe.ARTICLE,D.ARTICLE],[Fe.ASIDE,D.ASIDE],[Fe.B,D.B],[Fe.BASE,D.BASE],[Fe.BASEFONT,D.BASEFONT],[Fe.BGSOUND,D.BGSOUND],[Fe.BIG,D.BIG],[Fe.BLOCKQUOTE,D.BLOCKQUOTE],[Fe.BODY,D.BODY],[Fe.BR,D.BR],[Fe.BUTTON,D.BUTTON],[Fe.CAPTION,D.CAPTION],[Fe.CENTER,D.CENTER],[Fe.CODE,D.CODE],[Fe.COL,D.COL],[Fe.COLGROUP,D.COLGROUP],[Fe.DD,D.DD],[Fe.DESC,D.DESC],[Fe.DETAILS,D.DETAILS],[Fe.DIALOG,D.DIALOG],[Fe.DIR,D.DIR],[Fe.DIV,D.DIV],[Fe.DL,D.DL],[Fe.DT,D.DT],[Fe.EM,D.EM],[Fe.EMBED,D.EMBED],[Fe.FIELDSET,D.FIELDSET],[Fe.FIGCAPTION,D.FIGCAPTION],[Fe.FIGURE,D.FIGURE],[Fe.FONT,D.FONT],[Fe.FOOTER,D.FOOTER],[Fe.FOREIGN_OBJECT,D.FOREIGN_OBJECT],[Fe.FORM,D.FORM],[Fe.FRAME,D.FRAME],[Fe.FRAMESET,D.FRAMESET],[Fe.H1,D.H1],[Fe.H2,D.H2],[Fe.H3,D.H3],[Fe.H4,D.H4],[Fe.H5,D.H5],[Fe.H6,D.H6],[Fe.HEAD,D.HEAD],[Fe.HEADER,D.HEADER],[Fe.HGROUP,D.HGROUP],[Fe.HR,D.HR],[Fe.HTML,D.HTML],[Fe.I,D.I],[Fe.IMG,D.IMG],[Fe.IMAGE,D.IMAGE],[Fe.INPUT,D.INPUT],[Fe.IFRAME,D.IFRAME],[Fe.KEYGEN,D.KEYGEN],[Fe.LABEL,D.LABEL],[Fe.LI,D.LI],[Fe.LINK,D.LINK],[Fe.LISTING,D.LISTING],[Fe.MAIN,D.MAIN],[Fe.MALIGNMARK,D.MALIGNMARK],[Fe.MARQUEE,D.MARQUEE],[Fe.MATH,D.MATH],[Fe.MENU,D.MENU],[Fe.META,D.META],[Fe.MGLYPH,D.MGLYPH],[Fe.MI,D.MI],[Fe.MO,D.MO],[Fe.MN,D.MN],[Fe.MS,D.MS],[Fe.MTEXT,D.MTEXT],[Fe.NAV,D.NAV],[Fe.NOBR,D.NOBR],[Fe.NOFRAMES,D.NOFRAMES],[Fe.NOEMBED,D.NOEMBED],[Fe.NOSCRIPT,D.NOSCRIPT],[Fe.OBJECT,D.OBJECT],[Fe.OL,D.OL],[Fe.OPTGROUP,D.OPTGROUP],[Fe.OPTION,D.OPTION],[Fe.P,D.P],[Fe.PARAM,D.PARAM],[Fe.PLAINTEXT,D.PLAINTEXT],[Fe.PRE,D.PRE],[Fe.RB,D.RB],[Fe.RP,D.RP],[Fe.RT,D.RT],[Fe.RTC,D.RTC],[Fe.RUBY,D.RUBY],[Fe.S,D.S],[Fe.SCRIPT,D.SCRIPT],[Fe.SEARCH,D.SEARCH],[Fe.SECTION,D.SECTION],[Fe.SELECT,D.SELECT],[Fe.SOURCE,D.SOURCE],[Fe.SMALL,D.SMALL],[Fe.SPAN,D.SPAN],[Fe.STRIKE,D.STRIKE],[Fe.STRONG,D.STRONG],[Fe.STYLE,D.STYLE],[Fe.SUB,D.SUB],[Fe.SUMMARY,D.SUMMARY],[Fe.SUP,D.SUP],[Fe.TABLE,D.TABLE],[Fe.TBODY,D.TBODY],[Fe.TEMPLATE,D.TEMPLATE],[Fe.TEXTAREA,D.TEXTAREA],[Fe.TFOOT,D.TFOOT],[Fe.TD,D.TD],[Fe.TH,D.TH],[Fe.THEAD,D.THEAD],[Fe.TITLE,D.TITLE],[Fe.TR,D.TR],[Fe.TRACK,D.TRACK],[Fe.TT,D.TT],[Fe.U,D.U],[Fe.UL,D.UL],[Fe.SVG,D.SVG],[Fe.VAR,D.VAR],[Fe.WBR,D.WBR],[Fe.XMP,D.XMP]]);function Vx(e){var t;return(t=s0t.get(e))!==null&&t!==void 0?t:D.UNKNOWN}const yt=D,a0t={[mt.HTML]:new Set([yt.ADDRESS,yt.APPLET,yt.AREA,yt.ARTICLE,yt.ASIDE,yt.BASE,yt.BASEFONT,yt.BGSOUND,yt.BLOCKQUOTE,yt.BODY,yt.BR,yt.BUTTON,yt.CAPTION,yt.CENTER,yt.COL,yt.COLGROUP,yt.DD,yt.DETAILS,yt.DIR,yt.DIV,yt.DL,yt.DT,yt.EMBED,yt.FIELDSET,yt.FIGCAPTION,yt.FIGURE,yt.FOOTER,yt.FORM,yt.FRAME,yt.FRAMESET,yt.H1,yt.H2,yt.H3,yt.H4,yt.H5,yt.H6,yt.HEAD,yt.HEADER,yt.HGROUP,yt.HR,yt.HTML,yt.IFRAME,yt.IMG,yt.INPUT,yt.LI,yt.LINK,yt.LISTING,yt.MAIN,yt.MARQUEE,yt.MENU,yt.META,yt.NAV,yt.NOEMBED,yt.NOFRAMES,yt.NOSCRIPT,yt.OBJECT,yt.OL,yt.P,yt.PARAM,yt.PLAINTEXT,yt.PRE,yt.SCRIPT,yt.SECTION,yt.SELECT,yt.SOURCE,yt.STYLE,yt.SUMMARY,yt.TABLE,yt.TBODY,yt.TD,yt.TEMPLATE,yt.TEXTAREA,yt.TFOOT,yt.TH,yt.THEAD,yt.TITLE,yt.TR,yt.TRACK,yt.UL,yt.WBR,yt.XMP]),[mt.MATHML]:new Set([yt.MI,yt.MO,yt.MN,yt.MS,yt.MTEXT,yt.ANNOTATION_XML]),[mt.SVG]:new Set([yt.TITLE,yt.FOREIGN_OBJECT,yt.DESC]),[mt.XLINK]:new Set,[mt.XML]:new Set,[mt.XMLNS]:new Set},D6=new Set([yt.H1,yt.H2,yt.H3,yt.H4,yt.H5,yt.H6]);Fe.STYLE,Fe.SCRIPT,Fe.XMP,Fe.IFRAME,Fe.NOEMBED,Fe.NOFRAMES,Fe.PLAINTEXT;var ue;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(ue||(ue={}));const Bs={DATA:ue.DATA,RCDATA:ue.RCDATA,RAWTEXT:ue.RAWTEXT,SCRIPT_DATA:ue.SCRIPT_DATA,PLAINTEXT:ue.PLAINTEXT,CDATA_SECTION:ue.CDATA_SECTION};function o0t(e){return e>=ae.DIGIT_0&&e<=ae.DIGIT_9}function IO(e){return e>=ae.LATIN_CAPITAL_A&&e<=ae.LATIN_CAPITAL_Z}function l0t(e){return e>=ae.LATIN_SMALL_A&&e<=ae.LATIN_SMALL_Z}function gp(e){return l0t(e)||IO(e)}function fY(e){return gp(e)||o0t(e)}function TT(e){return e+32}function Gke(e){return e===ae.SPACE||e===ae.LINE_FEED||e===ae.TABULATION||e===ae.FORM_FEED}function hY(e){return Gke(e)||e===ae.SOLIDUS||e===ae.GREATER_THAN_SIGN}function c0t(e){return e===ae.NULL?Ge.nullCharacterReference:e>1114111?Ge.characterReferenceOutsideUnicodeRange:Hke(e)?Ge.surrogateCharacterReference:Wke(e)?Ge.noncharacterCharacterReference:qke(e)||e===ae.CARRIAGE_RETURN?Ge.controlCharacterReference:null}class u0t{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=ue.DATA,this.returnState=ue.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Gbt(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new i0t(Xbt,(i,r)=>{this.preprocessor.pos=this.entityStartPos+r-1,this._flushCodePointConsumedAsCharacterReference(i)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Ge.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(Ge.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const r=c0t(i);r&&this._err(r,1)}}:void 0)}_err(t,n=0){var i,r;(r=(i=this.handler).onParseError)===null||r===void 0||r.call(i,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,i){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n0&&this._err(Ge.endTagWithAttributes),t.selfClosing&&this._err(Ge.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case fi.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case fi.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case fi.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:fi.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=Gke(t)?fi.WHITESPACE_CHARACTER:t===ae.NULL?fi.NULL_CHARACTER:fi.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(fi.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=ue.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?zf.Attribute:zf.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===ue.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===ue.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===ue.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case ue.DATA:{this._stateData(t);break}case ue.RCDATA:{this._stateRcdata(t);break}case ue.RAWTEXT:{this._stateRawtext(t);break}case ue.SCRIPT_DATA:{this._stateScriptData(t);break}case ue.PLAINTEXT:{this._statePlaintext(t);break}case ue.TAG_OPEN:{this._stateTagOpen(t);break}case ue.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case ue.TAG_NAME:{this._stateTagName(t);break}case ue.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case ue.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case ue.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case ue.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case ue.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case ue.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case ue.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case ue.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case ue.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case ue.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case ue.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case ue.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case ue.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case ue.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case ue.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case ue.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case ue.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case ue.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case ue.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case ue.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case ue.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case ue.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case ue.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case ue.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case ue.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case ue.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case ue.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case ue.BOGUS_COMMENT:{this._stateBogusComment(t);break}case ue.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case ue.COMMENT_START:{this._stateCommentStart(t);break}case ue.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case ue.COMMENT:{this._stateComment(t);break}case ue.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case ue.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case ue.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case ue.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case ue.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case ue.COMMENT_END:{this._stateCommentEnd(t);break}case ue.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case ue.DOCTYPE:{this._stateDoctype(t);break}case ue.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case ue.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case ue.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case ue.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case ue.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case ue.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case ue.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case ue.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case ue.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case ue.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case ue.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case ue.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case ue.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case ue.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case ue.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case ue.CDATA_SECTION:{this._stateCdataSection(t);break}case ue.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case ue.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case ue.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case ue.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case ae.LESS_THAN_SIGN:{this.state=ue.TAG_OPEN;break}case ae.AMPERSAND:{this._startCharacterReference();break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this._emitCodePoint(t);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case ae.AMPERSAND:{this._startCharacterReference();break}case ae.LESS_THAN_SIGN:{this.state=ue.RCDATA_LESS_THAN_SIGN;break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this._emitChars(is);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case ae.LESS_THAN_SIGN:{this.state=ue.RAWTEXT_LESS_THAN_SIGN;break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this._emitChars(is);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case ae.LESS_THAN_SIGN:{this.state=ue.SCRIPT_DATA_LESS_THAN_SIGN;break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this._emitChars(is);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this._emitChars(is);break}case ae.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(gp(t))this._createStartTagToken(),this.state=ue.TAG_NAME,this._stateTagName(t);else switch(t){case ae.EXCLAMATION_MARK:{this.state=ue.MARKUP_DECLARATION_OPEN;break}case ae.SOLIDUS:{this.state=ue.END_TAG_OPEN;break}case ae.QUESTION_MARK:{this._err(Ge.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=ue.BOGUS_COMMENT,this._stateBogusComment(t);break}case ae.EOF:{this._err(Ge.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Ge.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=ue.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(gp(t))this._createEndTagToken(),this.state=ue.TAG_NAME,this._stateTagName(t);else switch(t){case ae.GREATER_THAN_SIGN:{this._err(Ge.missingEndTagName),this.state=ue.DATA;break}case ae.EOF:{this._err(Ge.eofBeforeTagName),this._emitChars("");break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this.state=ue.SCRIPT_DATA_ESCAPED,this._emitChars(is);break}case ae.EOF:{this._err(Ge.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ue.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===ae.SOLIDUS?this.state=ue.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:gp(t)?(this._emitChars("<"),this.state=ue.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=ue.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){gp(t)?(this.state=ue.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("");break}case ae.NULL:{this._err(Ge.unexpectedNullCharacter),this.state=ue.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(is);break}case ae.EOF:{this._err(Ge.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ue.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===ae.SOLIDUS?(this.state=ue.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=ue.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Zo.SCRIPT,!1)&&hY(this.preprocessor.peek(Zo.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const i=this._indexOf(t);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(t,n,i){const r=this._indexOf(t)+1;this.items.splice(r,0,n),this.tagIDs.splice(r,0,i),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==mt.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(t,n){const i=this._indexOfTagNames(t,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(m0t,mt.HTML)}clearBackToTableBodyContext(){this.clearBackTo(p0t,mt.HTML)}clearBackToTableRowContext(){this.clearBackTo(h0t,mt.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===D.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===D.HTML}hasInDynamicScope(t,n){for(let i=this.stackTop;i>=0;i--){const r=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case mt.HTML:{if(r===t)return!0;if(n.has(r))return!1;break}case mt.SVG:{if(gY.has(r))return!1;break}case mt.MATHML:{if(mY.has(r))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,oN)}hasInListItemScope(t){return this.hasInDynamicScope(t,d0t)}hasInButtonScope(t){return this.hasInDynamicScope(t,f0t)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case mt.HTML:{if(D6.has(n))return!0;if(oN.has(n))return!1;break}case mt.SVG:{if(gY.has(n))return!1;break}case mt.MATHML:{if(mY.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===mt.HTML)switch(this.tagIDs[n]){case t:return!0;case D.TABLE:case D.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===mt.HTML)switch(this.tagIDs[t]){case D.TBODY:case D.THEAD:case D.TFOOT:return!0;case D.TABLE:case D.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===mt.HTML)switch(this.tagIDs[n]){case t:return!0;case D.OPTION:case D.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Xke.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&pY.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&pY.has(this.currentTagId);)this.pop()}}const NM=3;var yd;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(yd||(yd={}));const bY={type:yd.Marker};class y0t{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const i=[],r=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let l=0;l[a.name,a.value]));let s=0;for(let a=0;ar.get(c.name)===c.value)&&(s+=1,s>=NM&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(bY)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:yd.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:yd.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(bY);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(i=>i.type===yd.Marker||this.treeAdapter.getTagName(i.element)===t);return n&&n.type===yd.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===yd.Element&&n.element===t)}}const bp={createDocument(){return{nodeName:"#document",mode:Lc.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const i=e.childNodes.indexOf(n);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,i){const r=e.childNodes.find(s=>s.nodeName==="#documentType");if(r)r.name=t,r.publicId=n,r.systemId=i;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:i,parentNode:null};bp.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(bp.isTextNode(n)){n.value+=t;return}}bp.appendChild(e,bp.createTextNode(t))},insertTextBefore(e,t,n){const i=e.childNodes[e.childNodes.indexOf(n)-1];i&&bp.isTextNode(i)?i.value+=t:bp.insertBefore(e,bp.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(i=>i.name));for(let i=0;ie.startsWith(n))}function k0t(e){return e.name===Yke&&e.publicId===null&&(e.systemId===null||e.systemId===v0t)}function E0t(e){if(e.name!==Yke)return Lc.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===x0t)return Lc.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),w0t.has(n))return Lc.QUIRKS;let i=t===null?O0t:Zke;if(yY(n,i))return Lc.QUIRKS;if(i=t===null?Jke:S0t,yY(n,i))return Lc.LIMITED_QUIRKS}return Lc.NO_QUIRKS}const vY={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},C0t="definitionurl",T0t="definitionURL",A0t=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),_0t=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:mt.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:mt.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:mt.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:mt.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:mt.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:mt.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:mt.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:mt.XML}],["xml:space",{prefix:"xml",name:"space",namespace:mt.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:mt.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:mt.XMLNS}]]),N0t=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),j0t=new Set([D.B,D.BIG,D.BLOCKQUOTE,D.BODY,D.BR,D.CENTER,D.CODE,D.DD,D.DIV,D.DL,D.DT,D.EM,D.EMBED,D.H1,D.H2,D.H3,D.H4,D.H5,D.H6,D.HEAD,D.HR,D.I,D.IMG,D.LI,D.LISTING,D.MENU,D.META,D.NOBR,D.OL,D.P,D.PRE,D.RUBY,D.S,D.SMALL,D.SPAN,D.STRONG,D.STRIKE,D.SUB,D.SUP,D.TABLE,D.TT,D.U,D.UL,D.VAR]);function R0t(e){const t=e.tagID;return t===D.FONT&&e.attrs.some(({name:i})=>i===nb.COLOR||i===nb.SIZE||i===nb.FACE)||j0t.has(t)}function eEe(e){for(let t=0;t0&&this._setContextModes(t,n)}onItemPop(t,n){var i,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(r=(i=this.treeAdapter).onItemPop)===null||r===void 0||r.call(i,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const i=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===mt.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,mt.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=me.TEXT}switchToPlaintextParsing(){this.insertionMode=me.TEXT,this.originalInsertionMode=me.IN_BODY,this.tokenizer.state=Bs.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===Fe.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==mt.HTML))switch(this.fragmentContextID){case D.TITLE:case D.TEXTAREA:{this.tokenizer.state=Bs.RCDATA;break}case D.STYLE:case D.XMP:case D.IFRAME:case D.NOEMBED:case D.NOFRAMES:case D.NOSCRIPT:{this.tokenizer.state=Bs.RAWTEXT;break}case D.SCRIPT:{this.tokenizer.state=Bs.SCRIPT_DATA;break}case D.PLAINTEXT:{this.tokenizer.state=Bs.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",i=t.publicId||"",r=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,r),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i??this.document,t)}}_appendElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,n){const i=this.treeAdapter.createElement(t,mt.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,mt.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(Fe.HTML,mt.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,D.HTML)}_appendCommentNode(t,n){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,t.chars,i):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const r=this.treeAdapter.getChildNodes(n),s=i?r.lastIndexOf(i):r.length,a=r[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:c,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:c,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const i=n.location,r=this.treeAdapter.getTagName(t),s=n.type===fi.END_TAG&&r===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,t.tagID===D.SVG&&this.treeAdapter.getTagName(n)===Fe.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===mt.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===D.MGLYPH||t.tagID===D.MALIGNMARK)&&i!==void 0&&!this._isIntegrationPoint(i,n,mt.HTML)}_processToken(t){switch(t.type){case fi.CHARACTER:{this.onCharacter(t);break}case fi.NULL_CHARACTER:{this.onNullCharacter(t);break}case fi.COMMENT:{this.onComment(t);break}case fi.DOCTYPE:{this.onDoctype(t);break}case fi.START_TAG:{this._processStartTag(t);break}case fi.END_TAG:{this.onEndTag(t);break}case fi.EOF:{this.onEof(t);break}case fi.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,i){const r=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return M0t(t,r,s,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(r=>r.type===yd.Marker||this.openElements.contains(r.element)),i=n===-1?t-1:n-1;for(let r=i;r>=0;r--){const s=this.activeFormattingElements.entries[r];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=me.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(D.P),this.openElements.popUntilTagNamePopped(D.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case D.TR:{this.insertionMode=me.IN_ROW;return}case D.TBODY:case D.THEAD:case D.TFOOT:{this.insertionMode=me.IN_TABLE_BODY;return}case D.CAPTION:{this.insertionMode=me.IN_CAPTION;return}case D.COLGROUP:{this.insertionMode=me.IN_COLUMN_GROUP;return}case D.TABLE:{this.insertionMode=me.IN_TABLE;return}case D.BODY:{this.insertionMode=me.IN_BODY;return}case D.FRAMESET:{this.insertionMode=me.IN_FRAMESET;return}case D.SELECT:{this._resetInsertionModeForSelect(t);return}case D.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case D.HTML:{this.insertionMode=this.headElement?me.AFTER_HEAD:me.BEFORE_HEAD;return}case D.TD:case D.TH:{if(t>0){this.insertionMode=me.IN_CELL;return}break}case D.HEAD:{if(t>0){this.insertionMode=me.IN_HEAD;return}break}}this.insertionMode=me.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===D.TEMPLATE)break;if(i===D.TABLE){this.insertionMode=me.IN_SELECT_IN_TABLE;return}}this.insertionMode=me.IN_SELECT}_isElementCausesFosterParenting(t){return nEe.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case D.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===mt.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case D.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const i=this.treeAdapter.getNamespaceURI(t);return a0t[i].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gvt(this,t);return}switch(this.insertionMode){case me.INITIAL:{V1(this,t);break}case me.BEFORE_HTML:{kw(this,t);break}case me.BEFORE_HEAD:{Ew(this,t);break}case me.IN_HEAD:{Cw(this,t);break}case me.IN_HEAD_NO_SCRIPT:{Tw(this,t);break}case me.AFTER_HEAD:{Aw(this,t);break}case me.IN_BODY:case me.IN_CAPTION:case me.IN_CELL:case me.IN_TEMPLATE:{rEe(this,t);break}case me.TEXT:case me.IN_SELECT:case me.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case me.IN_TABLE:case me.IN_TABLE_BODY:case me.IN_ROW:{jM(this,t);break}case me.IN_TABLE_TEXT:{uEe(this,t);break}case me.IN_COLUMN_GROUP:{lN(this,t);break}case me.AFTER_BODY:{cN(this,t);break}case me.AFTER_AFTER_BODY:{fA(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){mvt(this,t);return}switch(this.insertionMode){case me.INITIAL:{V1(this,t);break}case me.BEFORE_HTML:{kw(this,t);break}case me.BEFORE_HEAD:{Ew(this,t);break}case me.IN_HEAD:{Cw(this,t);break}case me.IN_HEAD_NO_SCRIPT:{Tw(this,t);break}case me.AFTER_HEAD:{Aw(this,t);break}case me.TEXT:{this._insertCharacters(t);break}case me.IN_TABLE:case me.IN_TABLE_BODY:case me.IN_ROW:{jM(this,t);break}case me.IN_COLUMN_GROUP:{lN(this,t);break}case me.AFTER_BODY:{cN(this,t);break}case me.AFTER_AFTER_BODY:{fA(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){M6(this,t);return}switch(this.insertionMode){case me.INITIAL:case me.BEFORE_HTML:case me.BEFORE_HEAD:case me.IN_HEAD:case me.IN_HEAD_NO_SCRIPT:case me.AFTER_HEAD:case me.IN_BODY:case me.IN_TABLE:case me.IN_CAPTION:case me.IN_COLUMN_GROUP:case me.IN_TABLE_BODY:case me.IN_ROW:case me.IN_CELL:case me.IN_SELECT:case me.IN_SELECT_IN_TABLE:case me.IN_TEMPLATE:case me.IN_FRAMESET:case me.AFTER_FRAMESET:{M6(this,t);break}case me.IN_TABLE_TEXT:{H1(this,t);break}case me.AFTER_BODY:{W0t(this,t);break}case me.AFTER_AFTER_BODY:case me.AFTER_AFTER_FRAMESET:{K0t(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case me.INITIAL:{G0t(this,t);break}case me.BEFORE_HEAD:case me.IN_HEAD:case me.IN_HEAD_NO_SCRIPT:case me.AFTER_HEAD:{this._err(t,Ge.misplacedDoctype);break}case me.IN_TABLE_TEXT:{H1(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Ge.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?bvt(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case me.INITIAL:{V1(this,t);break}case me.BEFORE_HTML:{X0t(this,t);break}case me.BEFORE_HEAD:{Z0t(this,t);break}case me.IN_HEAD:{Gu(this,t);break}case me.IN_HEAD_NO_SCRIPT:{tyt(this,t);break}case me.AFTER_HEAD:{iyt(this,t);break}case me.IN_BODY:{vo(this,t);break}case me.IN_TABLE:{Xv(this,t);break}case me.IN_TABLE_TEXT:{H1(this,t);break}case me.IN_CAPTION:{Jyt(this,t);break}case me.IN_COLUMN_GROUP:{nU(this,t);break}case me.IN_TABLE_BODY:{WR(this,t);break}case me.IN_ROW:{KR(this,t);break}case me.IN_CELL:{nvt(this,t);break}case me.IN_SELECT:{hEe(this,t);break}case me.IN_SELECT_IN_TABLE:{rvt(this,t);break}case me.IN_TEMPLATE:{avt(this,t);break}case me.AFTER_BODY:{lvt(this,t);break}case me.IN_FRAMESET:{cvt(this,t);break}case me.AFTER_FRAMESET:{dvt(this,t);break}case me.AFTER_AFTER_BODY:{hvt(this,t);break}case me.AFTER_AFTER_FRAMESET:{pvt(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?yvt(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case me.INITIAL:{V1(this,t);break}case me.BEFORE_HTML:{Y0t(this,t);break}case me.BEFORE_HEAD:{J0t(this,t);break}case me.IN_HEAD:{eyt(this,t);break}case me.IN_HEAD_NO_SCRIPT:{nyt(this,t);break}case me.AFTER_HEAD:{ryt(this,t);break}case me.IN_BODY:{qR(this,t);break}case me.TEXT:{zyt(this,t);break}case me.IN_TABLE:{FS(this,t);break}case me.IN_TABLE_TEXT:{H1(this,t);break}case me.IN_CAPTION:{evt(this,t);break}case me.IN_COLUMN_GROUP:{tvt(this,t);break}case me.IN_TABLE_BODY:{L6(this,t);break}case me.IN_ROW:{fEe(this,t);break}case me.IN_CELL:{ivt(this,t);break}case me.IN_SELECT:{pEe(this,t);break}case me.IN_SELECT_IN_TABLE:{svt(this,t);break}case me.IN_TEMPLATE:{ovt(this,t);break}case me.AFTER_BODY:{gEe(this,t);break}case me.IN_FRAMESET:{uvt(this,t);break}case me.AFTER_FRAMESET:{fvt(this,t);break}case me.AFTER_AFTER_BODY:{fA(this,t);break}}}onEof(t){switch(this.insertionMode){case me.INITIAL:{V1(this,t);break}case me.BEFORE_HTML:{kw(this,t);break}case me.BEFORE_HEAD:{Ew(this,t);break}case me.IN_HEAD:{Cw(this,t);break}case me.IN_HEAD_NO_SCRIPT:{Tw(this,t);break}case me.AFTER_HEAD:{Aw(this,t);break}case me.IN_BODY:case me.IN_TABLE:case me.IN_CAPTION:case me.IN_COLUMN_GROUP:case me.IN_TABLE_BODY:case me.IN_ROW:case me.IN_CELL:case me.IN_SELECT:case me.IN_SELECT_IN_TABLE:{lEe(this,t);break}case me.TEXT:{Vyt(this,t);break}case me.IN_TABLE_TEXT:{H1(this,t);break}case me.IN_TEMPLATE:{mEe(this,t);break}case me.AFTER_BODY:case me.IN_FRAMESET:case me.AFTER_FRAMESET:case me.AFTER_AFTER_BODY:case me.AFTER_AFTER_FRAMESET:{tU(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===ae.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case me.IN_HEAD:case me.IN_HEAD_NO_SCRIPT:case me.AFTER_HEAD:case me.TEXT:case me.IN_COLUMN_GROUP:case me.IN_SELECT:case me.IN_SELECT_IN_TABLE:case me.IN_FRAMESET:case me.AFTER_FRAMESET:{this._insertCharacters(t);break}case me.IN_BODY:case me.IN_CAPTION:case me.IN_CELL:case me.IN_TEMPLATE:case me.AFTER_BODY:case me.AFTER_AFTER_BODY:case me.AFTER_AFTER_FRAMESET:{iEe(this,t);break}case me.IN_TABLE:case me.IN_TABLE_BODY:case me.IN_ROW:{jM(this,t);break}case me.IN_TABLE_TEXT:{cEe(this,t);break}}}};function U0t(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):oEe(e,t),n}function Q0t(e,t){let n=null,i=e.openElements.stackTop;for(;i>=0;i--){const r=e.openElements.items[i];if(r===t.element)break;e._isSpecialElement(r,e.openElements.tagIDs[i])&&(n=r)}return n||(e.openElements.shortenToLength(Math.max(i,0)),e.activeFormattingElements.removeEntry(t)),n}function z0t(e,t,n){let i=t,r=e.openElements.getCommonAncestor(t);for(let s=0,a=r;a!==n;s++,a=r){r=e.openElements.getCommonAncestor(a);const l=e.activeFormattingElements.getElementEntry(a),c=l&&s>=F0t;!l||c?(c&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(a)):(a=V0t(e,l),i===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(a,i),i=a)}return i}function V0t(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function H0t(e,t,n){const i=e.treeAdapter.getTagName(t),r=Vx(i);if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);r===D.TEMPLATE&&s===mt.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function q0t(e,t,n){const i=e.treeAdapter.getNamespaceURI(n.element),{token:r}=n,s=e.treeAdapter.createElement(r.tagName,i,r.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,r),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,r.tagID)}function eU(e,t){for(let n=0;n<$0t;n++){const i=U0t(e,t);if(!i)break;const r=Q0t(e,i);if(!r)break;e.activeFormattingElements.bookmark=i;const s=z0t(e,r,i.element),a=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(s),a&&H0t(e,a,s),q0t(e,r,i)}}function M6(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function W0t(e,t){e._appendCommentNode(t,e.openElements.items[0])}function K0t(e,t){e._appendCommentNode(t,e.document)}function tU(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=n;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(i);if(r&&!r.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function G0t(e,t){e._setDocumentType(t);const n=t.forceQuirks?Lc.QUIRKS:E0t(t);k0t(t)||e._err(t,Ge.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=me.BEFORE_HTML}function V1(e,t){e._err(t,Ge.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Lc.QUIRKS),e.insertionMode=me.BEFORE_HTML,e._processToken(t)}function X0t(e,t){t.tagID===D.HTML?(e._insertElement(t,mt.HTML),e.insertionMode=me.BEFORE_HEAD):kw(e,t)}function Y0t(e,t){const n=t.tagID;(n===D.HTML||n===D.HEAD||n===D.BODY||n===D.BR)&&kw(e,t)}function kw(e,t){e._insertFakeRootElement(),e.insertionMode=me.BEFORE_HEAD,e._processToken(t)}function Z0t(e,t){switch(t.tagID){case D.HTML:{vo(e,t);break}case D.HEAD:{e._insertElement(t,mt.HTML),e.headElement=e.openElements.current,e.insertionMode=me.IN_HEAD;break}default:Ew(e,t)}}function J0t(e,t){const n=t.tagID;n===D.HEAD||n===D.BODY||n===D.HTML||n===D.BR?Ew(e,t):e._err(t,Ge.endTagWithoutMatchingOpenElement)}function Ew(e,t){e._insertFakeElement(Fe.HEAD,D.HEAD),e.headElement=e.openElements.current,e.insertionMode=me.IN_HEAD,e._processToken(t)}function Gu(e,t){switch(t.tagID){case D.HTML:{vo(e,t);break}case D.BASE:case D.BASEFONT:case D.BGSOUND:case D.LINK:case D.META:{e._appendElement(t,mt.HTML),t.ackSelfClosing=!0;break}case D.TITLE:{e._switchToTextParsing(t,Bs.RCDATA);break}case D.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Bs.RAWTEXT):(e._insertElement(t,mt.HTML),e.insertionMode=me.IN_HEAD_NO_SCRIPT);break}case D.NOFRAMES:case D.STYLE:{e._switchToTextParsing(t,Bs.RAWTEXT);break}case D.SCRIPT:{e._switchToTextParsing(t,Bs.SCRIPT_DATA);break}case D.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=me.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(me.IN_TEMPLATE);break}case D.HEAD:{e._err(t,Ge.misplacedStartTagForHeadElement);break}default:Cw(e,t)}}function eyt(e,t){switch(t.tagID){case D.HEAD:{e.openElements.pop(),e.insertionMode=me.AFTER_HEAD;break}case D.BODY:case D.BR:case D.HTML:{Cw(e,t);break}case D.TEMPLATE:{e0(e,t);break}default:e._err(t,Ge.endTagWithoutMatchingOpenElement)}}function e0(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==D.TEMPLATE&&e._err(t,Ge.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(D.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Ge.endTagWithoutMatchingOpenElement)}function Cw(e,t){e.openElements.pop(),e.insertionMode=me.AFTER_HEAD,e._processToken(t)}function tyt(e,t){switch(t.tagID){case D.HTML:{vo(e,t);break}case D.BASEFONT:case D.BGSOUND:case D.HEAD:case D.LINK:case D.META:case D.NOFRAMES:case D.STYLE:{Gu(e,t);break}case D.NOSCRIPT:{e._err(t,Ge.nestedNoscriptInHead);break}default:Tw(e,t)}}function nyt(e,t){switch(t.tagID){case D.NOSCRIPT:{e.openElements.pop(),e.insertionMode=me.IN_HEAD;break}case D.BR:{Tw(e,t);break}default:e._err(t,Ge.endTagWithoutMatchingOpenElement)}}function Tw(e,t){const n=t.type===fi.EOF?Ge.openElementsLeftAfterEof:Ge.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=me.IN_HEAD,e._processToken(t)}function iyt(e,t){switch(t.tagID){case D.HTML:{vo(e,t);break}case D.BODY:{e._insertElement(t,mt.HTML),e.framesetOk=!1,e.insertionMode=me.IN_BODY;break}case D.FRAMESET:{e._insertElement(t,mt.HTML),e.insertionMode=me.IN_FRAMESET;break}case D.BASE:case D.BASEFONT:case D.BGSOUND:case D.LINK:case D.META:case D.NOFRAMES:case D.SCRIPT:case D.STYLE:case D.TEMPLATE:case D.TITLE:{e._err(t,Ge.abandonedHeadElementChild),e.openElements.push(e.headElement,D.HEAD),Gu(e,t),e.openElements.remove(e.headElement);break}case D.HEAD:{e._err(t,Ge.misplacedStartTagForHeadElement);break}default:Aw(e,t)}}function ryt(e,t){switch(t.tagID){case D.BODY:case D.HTML:case D.BR:{Aw(e,t);break}case D.TEMPLATE:{e0(e,t);break}default:e._err(t,Ge.endTagWithoutMatchingOpenElement)}}function Aw(e,t){e._insertFakeElement(Fe.BODY,D.BODY),e.insertionMode=me.IN_BODY,HR(e,t)}function HR(e,t){switch(t.type){case fi.CHARACTER:{rEe(e,t);break}case fi.WHITESPACE_CHARACTER:{iEe(e,t);break}case fi.COMMENT:{M6(e,t);break}case fi.START_TAG:{vo(e,t);break}case fi.END_TAG:{qR(e,t);break}case fi.EOF:{lEe(e,t);break}}}function iEe(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function rEe(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function syt(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function ayt(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function oyt(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,mt.HTML),e.insertionMode=me.IN_FRAMESET)}function lyt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML)}function cyt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&D6.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,mt.HTML)}function uyt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function dyt(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML),n||(e.formElement=e.openElements.current))}function fyt(e,t){e.framesetOk=!1;const n=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const r=e.openElements.tagIDs[i];if(n===D.LI&&r===D.LI||(n===D.DD||n===D.DT)&&(r===D.DD||r===D.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==D.ADDRESS&&r!==D.DIV&&r!==D.P&&e._isSpecialElement(e.openElements.items[i],r))break}e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML)}function hyt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML),e.tokenizer.state=Bs.PLAINTEXT}function pyt(e,t){e.openElements.hasInScope(D.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(D.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML),e.framesetOk=!1}function myt(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Fe.A);n&&(eU(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gyt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function byt(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(D.NOBR)&&(eU(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,mt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yyt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function vyt(e,t){e.treeAdapter.getDocumentMode(e.document)!==Lc.QUIRKS&&e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._insertElement(t,mt.HTML),e.framesetOk=!1,e.insertionMode=me.IN_TABLE}function sEe(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,mt.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function aEe(e){const t=Kke(e,nb.TYPE);return t!=null&&t.toLowerCase()===L0t}function xyt(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,mt.HTML),aEe(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Oyt(e,t){e._appendElement(t,mt.HTML),t.ackSelfClosing=!0}function wyt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._appendElement(t,mt.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Syt(e,t){t.tagName=Fe.IMG,t.tagID=D.IMG,sEe(e,t)}function kyt(e,t){e._insertElement(t,mt.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Bs.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=me.TEXT}function Eyt(e,t){e.openElements.hasInButtonScope(D.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Bs.RAWTEXT)}function Cyt(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Bs.RAWTEXT)}function wY(e,t){e._switchToTextParsing(t,Bs.RAWTEXT)}function Tyt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===me.IN_TABLE||e.insertionMode===me.IN_CAPTION||e.insertionMode===me.IN_TABLE_BODY||e.insertionMode===me.IN_ROW||e.insertionMode===me.IN_CELL?me.IN_SELECT_IN_TABLE:me.IN_SELECT}function Ayt(e,t){e.openElements.currentTagId===D.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML)}function _yt(e,t){e.openElements.hasInScope(D.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,mt.HTML)}function Nyt(e,t){e.openElements.hasInScope(D.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(D.RTC),e._insertElement(t,mt.HTML)}function jyt(e,t){e._reconstructActiveFormattingElements(),eEe(t),JB(t),t.selfClosing?e._appendElement(t,mt.MATHML):e._insertElement(t,mt.MATHML),t.ackSelfClosing=!0}function Ryt(e,t){e._reconstructActiveFormattingElements(),tEe(t),JB(t),t.selfClosing?e._appendElement(t,mt.SVG):e._insertElement(t,mt.SVG),t.ackSelfClosing=!0}function SY(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mt.HTML)}function vo(e,t){switch(t.tagID){case D.I:case D.S:case D.B:case D.U:case D.EM:case D.TT:case D.BIG:case D.CODE:case D.FONT:case D.SMALL:case D.STRIKE:case D.STRONG:{gyt(e,t);break}case D.A:{myt(e,t);break}case D.H1:case D.H2:case D.H3:case D.H4:case D.H5:case D.H6:{cyt(e,t);break}case D.P:case D.DL:case D.OL:case D.UL:case D.DIV:case D.DIR:case D.NAV:case D.MAIN:case D.MENU:case D.ASIDE:case D.CENTER:case D.FIGURE:case D.FOOTER:case D.HEADER:case D.HGROUP:case D.DIALOG:case D.DETAILS:case D.ADDRESS:case D.ARTICLE:case D.SEARCH:case D.SECTION:case D.SUMMARY:case D.FIELDSET:case D.BLOCKQUOTE:case D.FIGCAPTION:{lyt(e,t);break}case D.LI:case D.DD:case D.DT:{fyt(e,t);break}case D.BR:case D.IMG:case D.WBR:case D.AREA:case D.EMBED:case D.KEYGEN:{sEe(e,t);break}case D.HR:{wyt(e,t);break}case D.RB:case D.RTC:{_yt(e,t);break}case D.RT:case D.RP:{Nyt(e,t);break}case D.PRE:case D.LISTING:{uyt(e,t);break}case D.XMP:{Eyt(e,t);break}case D.SVG:{Ryt(e,t);break}case D.HTML:{syt(e,t);break}case D.BASE:case D.LINK:case D.META:case D.STYLE:case D.TITLE:case D.SCRIPT:case D.BGSOUND:case D.BASEFONT:case D.TEMPLATE:{Gu(e,t);break}case D.BODY:{ayt(e,t);break}case D.FORM:{dyt(e,t);break}case D.NOBR:{byt(e,t);break}case D.MATH:{jyt(e,t);break}case D.TABLE:{vyt(e,t);break}case D.INPUT:{xyt(e,t);break}case D.PARAM:case D.TRACK:case D.SOURCE:{Oyt(e,t);break}case D.IMAGE:{Syt(e,t);break}case D.BUTTON:{pyt(e,t);break}case D.APPLET:case D.OBJECT:case D.MARQUEE:{yyt(e,t);break}case D.IFRAME:{Cyt(e,t);break}case D.SELECT:{Tyt(e,t);break}case D.OPTION:case D.OPTGROUP:{Ayt(e,t);break}case D.NOEMBED:case D.NOFRAMES:{wY(e,t);break}case D.FRAMESET:{oyt(e,t);break}case D.TEXTAREA:{kyt(e,t);break}case D.NOSCRIPT:{e.options.scriptingEnabled?wY(e,t):SY(e,t);break}case D.PLAINTEXT:{hyt(e,t);break}case D.COL:case D.TH:case D.TD:case D.TR:case D.HEAD:case D.FRAME:case D.TBODY:case D.TFOOT:case D.THEAD:case D.CAPTION:case D.COLGROUP:break;default:SY(e,t)}}function Iyt(e,t){if(e.openElements.hasInScope(D.BODY)&&(e.insertionMode=me.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Pyt(e,t){e.openElements.hasInScope(D.BODY)&&(e.insertionMode=me.AFTER_BODY,gEe(e,t))}function Dyt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Myt(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(D.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(D.FORM):n&&e.openElements.remove(n))}function Lyt(e){e.openElements.hasInButtonScope(D.P)||e._insertFakeElement(Fe.P,D.P),e._closePElement()}function $yt(e){e.openElements.hasInListItemScope(D.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(D.LI),e.openElements.popUntilTagNamePopped(D.LI))}function Fyt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Byt(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Uyt(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Qyt(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Fe.BR,D.BR),e.openElements.pop(),e.framesetOk=!1}function oEe(e,t){const n=t.tagName,i=t.tagID;for(let r=e.openElements.stackTop;r>0;r--){const s=e.openElements.items[r],a=e.openElements.tagIDs[r];if(i===a&&(i!==D.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=r&&e.openElements.shortenToLength(r);break}if(e._isSpecialElement(s,a))break}}function qR(e,t){switch(t.tagID){case D.A:case D.B:case D.I:case D.S:case D.U:case D.EM:case D.TT:case D.BIG:case D.CODE:case D.FONT:case D.NOBR:case D.SMALL:case D.STRIKE:case D.STRONG:{eU(e,t);break}case D.P:{Lyt(e);break}case D.DL:case D.UL:case D.OL:case D.DIR:case D.DIV:case D.NAV:case D.PRE:case D.MAIN:case D.MENU:case D.ASIDE:case D.BUTTON:case D.CENTER:case D.FIGURE:case D.FOOTER:case D.HEADER:case D.HGROUP:case D.DIALOG:case D.ADDRESS:case D.ARTICLE:case D.DETAILS:case D.SEARCH:case D.SECTION:case D.SUMMARY:case D.LISTING:case D.FIELDSET:case D.BLOCKQUOTE:case D.FIGCAPTION:{Dyt(e,t);break}case D.LI:{$yt(e);break}case D.DD:case D.DT:{Fyt(e,t);break}case D.H1:case D.H2:case D.H3:case D.H4:case D.H5:case D.H6:{Byt(e);break}case D.BR:{Qyt(e);break}case D.BODY:{Iyt(e,t);break}case D.HTML:{Pyt(e,t);break}case D.FORM:{Myt(e);break}case D.APPLET:case D.OBJECT:case D.MARQUEE:{Uyt(e,t);break}case D.TEMPLATE:{e0(e,t);break}default:oEe(e,t)}}function lEe(e,t){e.tmplInsertionModeStack.length>0?mEe(e,t):tU(e,t)}function zyt(e,t){var n;t.tagID===D.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Vyt(e,t){e._err(t,Ge.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function jM(e,t){if(e.openElements.currentTagId!==void 0&&nEe.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=me.IN_TABLE_TEXT,t.type){case fi.CHARACTER:{uEe(e,t);break}case fi.WHITESPACE_CHARACTER:{cEe(e,t);break}}else gE(e,t)}function Hyt(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,mt.HTML),e.insertionMode=me.IN_CAPTION}function qyt(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,mt.HTML),e.insertionMode=me.IN_COLUMN_GROUP}function Wyt(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Fe.COLGROUP,D.COLGROUP),e.insertionMode=me.IN_COLUMN_GROUP,nU(e,t)}function Kyt(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,mt.HTML),e.insertionMode=me.IN_TABLE_BODY}function Gyt(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Fe.TBODY,D.TBODY),e.insertionMode=me.IN_TABLE_BODY,WR(e,t)}function Xyt(e,t){e.openElements.hasInTableScope(D.TABLE)&&(e.openElements.popUntilTagNamePopped(D.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Yyt(e,t){aEe(t)?e._appendElement(t,mt.HTML):gE(e,t),t.ackSelfClosing=!0}function Zyt(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,mt.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Xv(e,t){switch(t.tagID){case D.TD:case D.TH:case D.TR:{Gyt(e,t);break}case D.STYLE:case D.SCRIPT:case D.TEMPLATE:{Gu(e,t);break}case D.COL:{Wyt(e,t);break}case D.FORM:{Zyt(e,t);break}case D.TABLE:{Xyt(e,t);break}case D.TBODY:case D.TFOOT:case D.THEAD:{Kyt(e,t);break}case D.INPUT:{Yyt(e,t);break}case D.CAPTION:{Hyt(e,t);break}case D.COLGROUP:{qyt(e,t);break}default:gE(e,t)}}function FS(e,t){switch(t.tagID){case D.TABLE:{e.openElements.hasInTableScope(D.TABLE)&&(e.openElements.popUntilTagNamePopped(D.TABLE),e._resetInsertionMode());break}case D.TEMPLATE:{e0(e,t);break}case D.BODY:case D.CAPTION:case D.COL:case D.COLGROUP:case D.HTML:case D.TBODY:case D.TD:case D.TFOOT:case D.TH:case D.THEAD:case D.TR:break;default:gE(e,t)}}function gE(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,HR(e,t),e.fosterParentingEnabled=n}function cEe(e,t){e.pendingCharacterTokens.push(t)}function uEe(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function H1(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===D.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===D.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===D.OPTGROUP&&e.openElements.pop();break}case D.OPTION:{e.openElements.currentTagId===D.OPTION&&e.openElements.pop();break}case D.SELECT:{e.openElements.hasInSelectScope(D.SELECT)&&(e.openElements.popUntilTagNamePopped(D.SELECT),e._resetInsertionMode());break}case D.TEMPLATE:{e0(e,t);break}}}function rvt(e,t){const n=t.tagID;n===D.CAPTION||n===D.TABLE||n===D.TBODY||n===D.TFOOT||n===D.THEAD||n===D.TR||n===D.TD||n===D.TH?(e.openElements.popUntilTagNamePopped(D.SELECT),e._resetInsertionMode(),e._processStartTag(t)):hEe(e,t)}function svt(e,t){const n=t.tagID;n===D.CAPTION||n===D.TABLE||n===D.TBODY||n===D.TFOOT||n===D.THEAD||n===D.TR||n===D.TD||n===D.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(D.SELECT),e._resetInsertionMode(),e.onEndTag(t)):pEe(e,t)}function avt(e,t){switch(t.tagID){case D.BASE:case D.BASEFONT:case D.BGSOUND:case D.LINK:case D.META:case D.NOFRAMES:case D.SCRIPT:case D.STYLE:case D.TEMPLATE:case D.TITLE:{Gu(e,t);break}case D.CAPTION:case D.COLGROUP:case D.TBODY:case D.TFOOT:case D.THEAD:{e.tmplInsertionModeStack[0]=me.IN_TABLE,e.insertionMode=me.IN_TABLE,Xv(e,t);break}case D.COL:{e.tmplInsertionModeStack[0]=me.IN_COLUMN_GROUP,e.insertionMode=me.IN_COLUMN_GROUP,nU(e,t);break}case D.TR:{e.tmplInsertionModeStack[0]=me.IN_TABLE_BODY,e.insertionMode=me.IN_TABLE_BODY,WR(e,t);break}case D.TD:case D.TH:{e.tmplInsertionModeStack[0]=me.IN_ROW,e.insertionMode=me.IN_ROW,KR(e,t);break}default:e.tmplInsertionModeStack[0]=me.IN_BODY,e.insertionMode=me.IN_BODY,vo(e,t)}}function ovt(e,t){t.tagID===D.TEMPLATE&&e0(e,t)}function mEe(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(D.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):tU(e,t)}function lvt(e,t){t.tagID===D.HTML?vo(e,t):cN(e,t)}function gEe(e,t){var n;if(t.tagID===D.HTML){if(e.fragmentContext||(e.insertionMode=me.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===D.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&e._setEndLocation(i,t)}}else cN(e,t)}function cN(e,t){e.insertionMode=me.IN_BODY,HR(e,t)}function cvt(e,t){switch(t.tagID){case D.HTML:{vo(e,t);break}case D.FRAMESET:{e._insertElement(t,mt.HTML);break}case D.FRAME:{e._appendElement(t,mt.HTML),t.ackSelfClosing=!0;break}case D.NOFRAMES:{Gu(e,t);break}}}function uvt(e,t){t.tagID===D.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==D.FRAMESET&&(e.insertionMode=me.AFTER_FRAMESET))}function dvt(e,t){switch(t.tagID){case D.HTML:{vo(e,t);break}case D.NOFRAMES:{Gu(e,t);break}}}function fvt(e,t){t.tagID===D.HTML&&(e.insertionMode=me.AFTER_AFTER_FRAMESET)}function hvt(e,t){t.tagID===D.HTML?vo(e,t):fA(e,t)}function fA(e,t){e.insertionMode=me.IN_BODY,HR(e,t)}function pvt(e,t){switch(t.tagID){case D.HTML:{vo(e,t);break}case D.NOFRAMES:{Gu(e,t);break}}}function mvt(e,t){t.chars=is,e._insertCharacters(t)}function gvt(e,t){e._insertCharacters(t),e.framesetOk=!1}function bEe(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==mt.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function bvt(e,t){if(R0t(t))bEe(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(n);i===mt.MATHML?eEe(t):i===mt.SVG&&(I0t(t),tEe(t)),JB(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function yvt(e,t){if(t.tagID===D.P||t.tagID===D.BR){bEe(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const i=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(i)===mt.HTML){e._endTagOutsideForeignContent(t);break}const r=e.treeAdapter.getTagName(i);if(r.toLowerCase()===t.tagName){t.tagName=r,e.openElements.shortenToLength(n);break}}}Fe.AREA,Fe.BASE,Fe.BASEFONT,Fe.BGSOUND,Fe.BR,Fe.COL,Fe.EMBED,Fe.FRAME,Fe.HR,Fe.IMG,Fe.INPUT,Fe.KEYGEN,Fe.LINK,Fe.META,Fe.PARAM,Fe.SOURCE,Fe.TRACK,Fe.WBR;const vvt=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,xvt=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),kY={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function yEe(e,t){const n=Nvt(e),i=PSe("type",{handlers:{root:Ovt,element:wvt,text:Svt,comment:xEe,doctype:kvt,raw:Cvt},unknown:Tvt}),r={parser:n?new OY(kY):OY.getFragmentParser(void 0,kY),handle(l){i(l,r)},stitches:!1,options:t||{}};i(e,r),Hx(r,Jd());const s=n?r.parser.document:r.parser.getFragment(),a=jbt(s,{file:r.options.file});return r.stitches&&pE(a,"comment",function(l,c,u){const d=l;if(d.value.stitch&&u&&c!==void 0){const f=u.children;return f[c]=d.value.stitch,c}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function vEe(e,t){let n=-1;if(e)for(;++n4&&(t.parser.tokenizer.state=0);const n={type:fi.CHARACTER,chars:e.value,location:bE(e)};Hx(t,Jd(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function kvt(e,t){const n={type:fi.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:bE(e)};Hx(t,Jd(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Evt(e,t){t.stitches=!0;const n=jvt(e);if("children"in e&&"children"in n){const i=yEe({type:"root",children:e.children},t.options);n.children=i.children}xEe({type:"comment",value:{stitch:n}},t)}function xEe(e,t){const n=e.value,i={type:fi.COMMENT,data:n,location:bE(e)};Hx(t,Jd(e)),t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken)}function Cvt(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,OEe(t,Jd(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(vvt,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function Tvt(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Evt(n,t);else{let i="";throw xvt.has(n.type)&&(i=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+i)}}function Hx(e,t){OEe(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Bs.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function OEe(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Avt(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Bs.PLAINTEXT)return;Hx(t,Jd(e));const i=t.parser.openElements.current;let r="namespaceURI"in i?i.namespaceURI:Mg.html;r===Mg.html&&n==="svg"&&(r=Mg.svg);const s=Mbt({...e,children:[]},{space:r===Mg.svg?"svg":"html"}),a={type:fi.START_TAG,tagName:n,tagID:Vx(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:bE(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function _vt(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Vbt.includes(n)||t.parser.tokenizer.state===Bs.PLAINTEXT)return;Hx(t,FR(e));const i={type:fi.END_TAG,tagName:n,tagID:Vx(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:bE(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Bs.RCDATA||t.parser.tokenizer.state===Bs.RAWTEXT||t.parser.tokenizer.state===Bs.SCRIPT_DATA)&&(t.parser.tokenizer.state=Bs.DATA)}function Nvt(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function bE(e){const t=Jd(e)||{line:void 0,column:void 0,offset:void 0},n=FR(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function jvt(e){return"children"in e?Kv({...e,children:[]}):Kv(e)}function Rvt(e){return function(t,n){return yEe(t,{...e,file:n})}}const Ivt="modulepreload",Pvt=function(e){return"/"+e},EY={},Fd=function(t,n,i){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=Pvt(c),c in EY)return;EY[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Ivt,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})};var Dvt=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Mvt=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Lvt=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,RM={Space_Separator:Dvt,ID_Start:Mvt,ID_Continue:Lvt},Ds={isSpaceSeparator(e){return typeof e=="string"&&RM.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||RM.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="‌"||e==="‍"||RM.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let $6,Io,Vf,uN,wm,Mu,xa,iU,_w;var $vt=function(t,n){$6=String(t),Io="start",Vf=[],uN=0,wm=1,Mu=0,xa=void 0,iU=void 0,_w=void 0;do xa=Fvt(),Qvt[Io]();while(xa.type!=="eof");return typeof n=="function"?F6({"":_w},"",n):_w};function F6(e,t,n){const i=e[t];if(i!=null&&typeof i=="object")if(Array.isArray(i))for(let r=0;r0;){const n=uh();if(!Ds.isHexDigit(n))throw qr(dt());e+=dt()}return String.fromCodePoint(parseInt(e,16))}const Qvt={start(){if(xa.type==="eof")throw rg();IM()},beforePropertyName(){switch(xa.type){case"identifier":case"string":iU=xa.value,Io="afterPropertyName";return;case"punctuator":AT();return;case"eof":throw rg()}},afterPropertyName(){if(xa.type==="eof")throw rg();Io="beforePropertyValue"},beforePropertyValue(){if(xa.type==="eof")throw rg();IM()},beforeArrayValue(){if(xa.type==="eof")throw rg();if(xa.type==="punctuator"&&xa.value==="]"){AT();return}IM()},afterPropertyValue(){if(xa.type==="eof")throw rg();switch(xa.value){case",":Io="beforePropertyName";return;case"}":AT()}},afterArrayValue(){if(xa.type==="eof")throw rg();switch(xa.value){case",":Io="beforeArrayValue";return;case"]":AT()}},end(){}};function IM(){let e;switch(xa.type){case"punctuator":switch(xa.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=xa.value;break}if(_w===void 0)_w=e;else{const t=Vf[Vf.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,iU,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")Vf.push(e),Array.isArray(e)?Io="beforeArrayValue":Io="beforePropertyName";else{const t=Vf[Vf.length-1];t==null?Io="end":Array.isArray(t)?Io="afterArrayValue":Io="afterPropertyValue"}}function AT(){Vf.pop();const e=Vf[Vf.length-1];e==null?Io="end":Array.isArray(e)?Io="afterArrayValue":Io="afterPropertyValue"}function qr(e){return dN(e===void 0?`JSON5: invalid end of input at ${wm}:${Mu}`:`JSON5: invalid character '${SEe(e)}' at ${wm}:${Mu}`)}function rg(){return dN(`JSON5: invalid end of input at ${wm}:${Mu}`)}function CY(){return Mu-=5,dN(`JSON5: invalid identifier character at ${wm}:${Mu}`)}function zvt(e){console.warn(`JSON5: '${SEe(e)}' in strings is not valid ECMAScript; consider escaping`)}function SEe(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function dN(e){const t=new SyntaxError(e);return t.lineNumber=wm,t.columnNumber=Mu,t}var Vvt=function(t,n,i){const r=[];let s="",a,l,c="",u;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(i=n.space,u=n.quote,n=n.replacer),typeof n=="function")l=n;else if(Array.isArray(n)){a=[];for(const b of n){let v;typeof b=="string"?v=b:(typeof b=="number"||b instanceof String||b instanceof Number)&&(v=String(b)),v!==void 0&&a.indexOf(v)<0&&a.push(v)}}return i instanceof Number?i=Number(i):i instanceof String&&(i=String(i)),typeof i=="number"?i>0&&(i=Math.min(10,Math.floor(i)),c=" ".substr(0,i)):typeof i=="string"&&(c=i.substr(0,10)),d("",{"":t});function d(b,v){let y=v[b];switch(y!=null&&(typeof y.toJSON5=="function"?y=y.toJSON5(b):typeof y.toJSON=="function"&&(y=y.toJSON(b))),l&&(y=l.call(v,b,y)),y instanceof Number?y=Number(y):y instanceof String?y=String(y):y instanceof Boolean&&(y=y.valueOf()),y){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof y=="string")return f(y);if(typeof y=="number")return String(y);if(typeof y=="object")return Array.isArray(y)?g(y):h(y)}function f(b){const v={"'":.1,'"':.2},y={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let x="";for(let O=0;Ov[O]=0)throw TypeError("Converting circular structure to JSON5");r.push(b);let v=s;s=s+c;let y=a||Object.keys(b),x=[];for(const O of y){const k=d(O,b);if(k!==void 0){let S=p(O)+":";c!==""&&(S+=" "),S+=k,x.push(S)}}let w;if(x.length===0)w="{}";else{let O;if(c==="")O=x.join(","),w="{"+O+"}";else{let k=`, `+s;O=x.join(k),w=`{ `+s+O+`, -`+v+"}"}}return r.pop(),s=v,w}function p(b){if(b.length===0)return f(b);const v=String.fromCodePoint(b.codePointAt(0));if(!Ms.isIdStartChar(v))return f(b);for(let y=v.length;y=0)throw TypeError("Converting circular structure to JSON5");r.push(b);let v=s;s=s+c;let y=[];for(let w=0;w=0)throw TypeError("Converting circular structure to JSON5");r.push(b);let v=s;s=s+c;let y=[];for(let w=0;w30)throw new Error("ECharts option nesting is too deep");if(typeof e=="number"&&!Number.isFinite(e))throw new Error("ECharts option contains a non-finite number");if(typeof e=="string"&&Hvt.test(e.trim()))throw new Error("ECharts option contains an external resource");if(Array.isArray(e)){for(const n of e)mN(n,t+1);return}if(BO(e))for(const[n,i]of Object.entries(e)){if(Vvt.has(n))throw new Error("ECharts option contains an unsafe key");mN(i,t+1)}}function qvt(e){var i;const t=e.trim(),n=t.match(/^(?:(?:const|let|var)\s+)?option\s*=\s*([\s\S]*?)\s*;?$/);return((i=n==null?void 0:n[1])==null?void 0:i.trim())||t}function Wvt(e,t){let n=1,i="",r=!1,s=!1,a=!1;for(let l=t+1;li+2)throw new Error("Invalid ECharts gradient argument count");const r=n.slice(0,i).map(Kvt),s=n[i],a=n[i+1]??!1;if(!Array.isArray(s)||typeof a!="boolean")throw new Error("Invalid ECharts gradient data");return e==="linear"?{type:e,x:r[0],y:r[1],x2:r[2],y2:r[3],colorStops:s,global:a}:{type:e,x:r[0],y:r[1],r:r[2],colorStops:s,global:a}}function Xvt(e,t){const n=/^(?:new\s+)?echarts\.graphic\.(LinearGradient|RadialGradient)\s*\(/;let i="",r=!1,s=!1,a=!1;for(let l=t;lzvt)throw new Error("ECharts option is too large");const n=Yvt(qvt(e));let i;try{i=SEe.parse(n)}catch(a){throw/\bfunction\s*\(|=>/.test(n)?new Error("ECharts function callbacks are not supported"):a}if(!BO(i))throw new Error("ECharts option must be a data object");mN(i);const r={...i};r.aria={...BO(r.aria)?r.aria:{},enabled:!0};const s=r.tooltip;return BO(s)?r.tooltip={...s,renderMode:"richText"}:Array.isArray(s)&&(r.tooltip=s.map(a=>BO(a)?{...a,renderMode:"richText"}:a)),t&&(r.animation=!1),r}let MM;function Jvt(){return MM??(MM=Ud(()=>import("../visualizations/echarts/index-CGT341lL.js"),[]).catch(e=>{throw MM=void 0,e})),MM}function ext({source:e}){const{t}=Oe("conversation"),n=m.useRef(null),[i,r]=m.useState(!1),[s,a]=m.useState("");return m.useEffect(()=>{let l=!1,c,u,d;r(!1);try{d=Zvt(e,window.matchMedia("(prefers-reduced-motion: reduce)").matches),a("")}catch{a("invalid");return}return Jvt().then(f=>{const h=n.current;l||!h||(c=f.init(h,void 0,{renderer:"svg"}),c.setOption(d,{notMerge:!0}),typeof ResizeObserver<"u"&&(u=new ResizeObserver(()=>c==null?void 0:c.resize()),u.observe(h)),r(!0))}).catch(()=>{c==null||c.dispose(),c=void 0,l||a("render")}),()=>{l=!0,u==null||u.disconnect(),c==null||c.dispose()}},[e]),o.jsxs("div",{className:`echarts-diagram${s?" echarts-diagram--error":""}`,role:"img","aria-label":t("visualization.echartsAria"),"aria-busy":!i&&!s,children:[o.jsx("div",{ref:n,className:"echarts-diagram__canvas",hidden:!!s}),!i&&!s?o.jsx("div",{className:"echarts-diagram__state","aria-live":"polite",children:o.jsx(Tn,{duration:2.2,spread:15,children:t("visualization.rendering")})}):null,s?o.jsx("p",{className:"echarts-diagram__error",role:"alert",children:t(s==="invalid"?"visualization.invalidEcharts":"visualization.renderFailed")}):null]})}const txt=m.memo(ext);let NY,jY=Promise.resolve(),nxt=0;function ixt(){return NY??(NY=Ud(async()=>{const{default:e}=await import("../visualizations/mermaid/mermaid.core-C8O8nWja.js").then(t=>t.ay);return{default:e}},__vite__mapDeps([0,1])).then(({default:e})=>(e.initialize({startOnLoad:!1,securityLevel:"strict",suppressErrorRendering:!0,theme:"neutral"}),e))),NY}function rxt(e){const t=jY.then(async()=>{const n=await ixt(),i=`mermaid-diagram-${nxt+=1}`;return n.render(i,e)});return jY=t.then(()=>{},()=>{}),t}function sxt({source:e}){const{t}=Oe("conversation"),n=m.useRef(null),[i,r]=m.useState(null),[s,a]=m.useState(!1);return m.useEffect(()=>{let l=!1;return r(null),a(!1),rxt(e).then(c=>{l||r(c)}).catch(()=>{l||a(!0)}),()=>{l=!0}},[e]),m.useEffect(()=>{!(i!=null&&i.bindFunctions)||!n.current||i.bindFunctions(n.current)},[i]),s?o.jsx("div",{className:"mermaid-diagram mermaid-diagram--error",children:o.jsx("p",{className:"mermaid-diagram__error",role:"alert",children:t("visualization.mermaidFailed")})}):i?o.jsx("div",{ref:n,className:"mermaid-diagram",role:"img","aria-label":t("visualization.mermaidAria"),dangerouslySetInnerHTML:{__html:i.svg}}):o.jsx("div",{className:"mermaid-diagram mermaid-diagram--loading","aria-live":"polite",children:o.jsx(Tn,{duration:2.2,spread:15,children:t("visualization.rendering")})})}const axt=m.memo(sxt),oxt="_SegmentedControl_1sl7d_1",lxt="_SegmentedControlOption_1sl7d_140",cxt="_SegmentedControlThumb_1sl7d_219",Q6={SegmentedControl:oxt,SegmentedControlOption:lxt,SegmentedControlThumb:cxt},zc=({value:e,onChange:t,children:n,block:i,pill:r=!0,size:s="md",gutterSize:a,className:l,onClick:c,...u})=>{const d=m.useRef(null),f=m.useRef(null),h=m.useCallback(g=>{const b=d.current,v=f.current;if(!b||!v)return;const y=b==null?void 0:b.querySelector('[data-state="on"]');if(!y)return;const x=b.clientWidth;let w=Math.floor(y.clientWidth);const O=y.offsetLeft;if(x-(w+O)<2&&(w=w-1),v.style.width=`${Math.floor(w)}px`,v.style.transform=`translateX(${O}px)`,b.scrollWidth>x){const k=x*.15,S=b.scrollLeft,E=y.offsetLeft,C=E+w;(ES+x-k)&&g&&y.scrollIntoView({block:"nearest",inline:"center",behavior:"smooth"})}},[]);yye({ref:d,onResize:()=>{const g=f.current;if(!g)return;const b=g.style.transition;g.style.transition="",h(!1),g.style.transition=b}}),m.useLayoutEffect(()=>{const g=d.current,b=f.current;!g||!b||(h(!!b.style.transition),b.style.transition||I_(()=>{b.style.transition="width 300ms var(--cubic-enter), transform 300ms var(--cubic-enter)"}))},[h,e,s,a,r]);const p=g=>{g&&t&&t(g)};return o.jsxs(oWe,{ref:d,className:bi(Q6.SegmentedControl,l),type:"single",value:e,loop:!1,onValueChange:p,onClick:c,"data-block":i?"":void 0,"data-pill":r?"":void 0,"data-size":s,"data-gutter-size":a,...u,children:[o.jsx("div",{className:Q6.SegmentedControlThumb,ref:f}),n]})},uxt=({children:e,...t})=>o.jsx(fWe,{className:Q6.SegmentedControlOption,...t,onPointerEnter:t7,children:o.jsx("span",{className:"relative",children:e})});zc.Option=uxt;function dxt({children:e,label:t,language:n,source:i,streaming:r=!1}){const{t:s}=Oe("conversation"),[a,l]=m.useState("preview"),c=r?"code":a;return o.jsxs("section",{className:"visualization-card","aria-label":s("visualization.cardAria",{label:t}),children:[o.jsx("div",{className:"visualization-card__toolbar",children:o.jsxs(zc,{className:"visualization-card__tabs",value:c,size:"sm",gutterSize:"sm",pill:!1,"aria-label":s("visualization.viewAria",{label:t}),onChange:u=>{r||l(u)},children:[o.jsx(zc.Option,{value:"preview",disabled:r,children:s("visualization.preview")}),o.jsx(zc.Option,{value:"code",children:s("visualization.code")})]})}),o.jsx("div",{className:"visualization-card__body",children:c==="code"?o.jsx("pre",{className:"visualization-card__code",children:o.jsx("code",{className:`language-${n}`,children:i})}):e})]})}const fxt=m.memo(dxt);function hxt(e){const t=e==null?void 0:e.trim().toLowerCase();if(t==="mermaid")return"mermaid";if(t==="echart"||t==="echarts")return"echarts"}const kEe=[".mp4",".webm",".mov",".m4v",".ogg",".avi"];function z6(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(z6).join(""):m.isValidElement(e)?z6(e.props.children):""}function pxt(e){var i;const t=m.Children.toArray(e)[0];if(!m.isValidElement(t))return;const n=(i=t.props.className)==null?void 0:i.split(/\s+/).find(r=>r.startsWith("language-"));return hxt(n==null?void 0:n.slice(9))}function EEe(e){if(!e)return!1;try{const t=e.toLowerCase();return kEe.some(n=>t.includes(n))}catch{return!1}}function mxt(e){var i;const t=(i=e==null?void 0:e.properties)==null?void 0:i.href;if(!t)return!1;if(EEe(t))return!0;const n=e==null?void 0:e.children;if(n&&Array.isArray(n)){const r=n.map(s=>(s==null?void 0:s.value)||"").join("").toLowerCase();return kEe.some(s=>r.includes(s))}return!1}function gxt({text:e,className:t,allowRawHtml:n=!0,streaming:i=!1}){const{t:r}=Oe("conversation"),[s,a]=m.useState(null),l=(d,f)=>{if(d.src)return d.src;if(f){const h=g=>{var b;if(!g)return null;if(g.type==="source"&&((b=g.properties)!=null&&b.src))return g.properties.src;if(g.children)for(const v of g.children){const y=h(v);if(y)return y}return null},p=h({children:f});if(p)return p}return""},c=d=>{try{const h=new URL(d).pathname.split("/");return h[h.length-1]||"video.mp4"}catch{return"video.mp4"}},u=d=>d?Array.isArray(d)?d.map(f=>(f==null?void 0:f.value)||"").join("")||"video":(d==null?void 0:d.value)||"video":"video";return o.jsxs("div",{className:t?`md ${t}`:"md",children:[o.jsx(Pft,{remarkPlugins:[Wpt],rehypePlugins:n?[_vt,uY]:[uY],components:{pre:({node:d,children:f,...h})=>{const p=pxt(f);if(p==="mermaid"||p==="echarts"){const g=z6(f).replace(/\n$/,"");return o.jsx(fxt,{label:p==="mermaid"?"Mermaid":"ECharts",language:p,source:g,streaming:i,children:p==="mermaid"?o.jsx(axt,{source:g}):o.jsx(txt,{source:g})})}return o.jsx("pre",{...h,children:f})},a:({node:d,...f})=>{const h=f.href;if(h&&(EEe(h)||mxt(d))){const p=h,g=u(d==null?void 0:d.children);return o.jsxs("div",{className:"video-container",children:[o.jsxs("button",{type:"button",className:"video-preview-trigger","aria-label":r("markdown.playVideo",{name:g}),onClick:()=>a({src:p,title:g}),children:[o.jsx("video",{src:p,playsInline:!0,className:"video-thumbnail",preload:"metadata"}),o.jsx("span",{className:"video-preview-hint","aria-hidden":"true",children:o.jsx(Ky,{})})]}),o.jsx("div",{className:"video-caption",children:o.jsx("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"video-link-text",children:g})})]})}return o.jsx("a",{...f,target:"_blank",rel:"noopener noreferrer"})},img:({node:d,src:f,alt:h,...p})=>{const g=o.jsx("img",{...p,src:f,alt:h??"",loading:"lazy"});return f?o.jsx(dbe,{src:f,children:o.jsxs("button",{type:"button",className:"image-preview-trigger","aria-label":r("markdown.enlargeImage",{name:h||r("markdown.image")}),children:[g,o.jsx("span",{className:"image-preview-hint","aria-hidden":"true",children:o.jsx(Ky,{})})]})}):g},video:({node:d,src:f,children:h,...p})=>{const g=l({src:f},h);return g?o.jsx("div",{className:"video-container",children:o.jsxs("button",{type:"button",className:"video-preview-trigger","aria-label":r("markdown.enlargeVideo"),onClick:()=>a({src:g}),children:[o.jsx("video",{src:g,...p,playsInline:!0,className:"video-thumbnail",children:h}),o.jsx("span",{className:"video-preview-hint","aria-hidden":"true",children:o.jsx(Ky,{})})]})}):o.jsx("video",{src:f,controls:!0,playsInline:!0,className:"video-inline",...p,children:h})}},children:e}),s&&o.jsx("div",{className:"video-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":r("markdown.videoPreview"),onClick:()=>a(null),children:o.jsxs("div",{className:"video-viewer",onClick:d=>d.stopPropagation(),children:[o.jsxs("div",{className:"video-viewer-header",children:[o.jsx("div",{className:"video-viewer-title",children:s.title||c(s.src)}),o.jsxs("nav",{className:"video-viewer-nav",children:[o.jsx("a",{href:s.src,download:s.title||c(s.src),"aria-label":r("markdown.downloadVideo"),title:r("markdown.downloadVideo"),className:"video-viewer-download",children:o.jsx(Hj,{})}),o.jsx("button",{type:"button",className:"video-viewer-close","aria-label":r("markdown.close"),onClick:()=>a(null),children:o.jsx(Ia,{})})]})]}),o.jsx("div",{className:"video-viewer-body",children:o.jsx("video",{src:s.src,controls:!0,autoPlay:!0,playsInline:!0,className:"video-fullscreen"})})]})})]})}const Uu=m.memo(gxt);function LM(e){return(e==null?void 0:e.trim())||qm("resourceMetadata.unknownSource")}function CEe(e){return(e==null?void 0:e.trim())||qm("resourceMetadata.unknownCreator")}function bxt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M5 5.5A2.5 2.5 0 0 1 7.5 3H19v16H7.5A2.5 2.5 0 0 0 5 21.5v-16Z"}),o.jsx("path",{d:"M5 18.5A2.5 2.5 0 0 1 7.5 16H19"}),o.jsx("path",{d:"M9 7h6M9 10h4"})]})}function yxt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M6 3h8l4 4v14H6V3Z"}),o.jsx("path",{d:"M14 3v5h5M9 12h6M9 16h6"})]})}function vxt(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"m7 7 10 10M17 7 7 17"})})}function xxt(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"M12 5v14M5 12h14"})})}function OE({title:e,children:t,onClose:n,busy:i=!1,className:r=""}){const{t:s}=Oe("ui"),a=m.useId(),l=m.useRef(null),c=m.useRef(null),u=m.useRef(i),d=m.useRef(n);return m.useEffect(()=>{u.current=i,d.current=n},[i,n]),m.useEffect(()=>{var g;const f=document.activeElement instanceof HTMLElement?document.activeElement:null,h=document.body.style.overflow;document.body.style.overflow="hidden",(g=l.current)==null||g.focus();const p=b=>{if(b.key==="Escape"&&!u.current){d.current();return}if(b.key!=="Tab")return;const v=c.current;if(!v)return;const y=Array.from(v.querySelectorAll('button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), a[href], audio[controls], video[controls], iframe, [tabindex]:not([tabindex="-1"])')).filter(O=>O.getClientRects().length>0);if(y.length===0){b.preventDefault();return}const x=y[0],w=y[y.length-1];b.shiftKey&&(document.activeElement===x||!v.contains(document.activeElement))?(b.preventDefault(),w.focus()):!b.shiftKey&&(document.activeElement===w||!v.contains(document.activeElement))&&(b.preventDefault(),x.focus())};return window.addEventListener("keydown",p),()=>{window.removeEventListener("keydown",p),document.body.style.overflow=h,f!=null&&f.isConnected&&f.focus()}},[]),Fi.createPortal(o.jsx("div",{className:"knowledge-dialog-backdrop",onMouseDown:f=>{f.target===f.currentTarget&&!i&&n()},children:o.jsxs("section",{ref:c,className:`knowledge-dialog${r?` ${r}`:""}`,role:"dialog","aria-modal":"true","aria-labelledby":a,"aria-busy":i||void 0,children:[o.jsxs("header",{className:"knowledge-dialog__header",children:[o.jsx("h2",{id:a,children:e}),o.jsx("button",{ref:l,type:"button",onClick:n,disabled:i,"aria-label":s("common.close"),children:o.jsx(vxt,{})})]}),t]})}),document.body)}function zS({message:e}){return e?o.jsx("div",{className:"knowledge-form-error",role:"alert",children:e}):null}function V6(e){return e instanceof DOMException&&e.name==="AbortError"}function Oxt(e,t){if(!e)return"";const n=Date.parse(e);return Number.isFinite(n)?new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(n):e}const TEe=[".jpg",".jpeg",".png"].join(","),wxt=new Set(TEe.split(",")),AEe=[".pdf",".pptx",".docx",".xlsx",".txt"].join(","),Sxt=new Set(AEe.split(",")),kxt=200*1024*1024;function H6(e){const t=e.lastIndexOf(".");return t<0?"":e.slice(t).toLocaleLowerCase()}function Ext(e,t,n){return e.size>kxt?n("knowledge.errors.fileTooLarge"):t==="image"?wxt.has(H6(e.name))?"":n("knowledge.errors.invalidImageType"):Sxt.has(H6(e.name))?"":n("knowledge.errors.invalidDocumentType")}function sU(e){return e<=0?"-":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function q6(e){var r;const t=e.type.trim().replace(/^\./,"");if(t)return t.toUpperCase();const n=e.name.trim(),i=n.includes(".")?(r=n.split(".").pop())==null?void 0:r.trim():"";return i?i.toUpperCase():"-"}function Cxt({region:e,onClose:t,onCreated:n}){const{t:i}=Oe("ui"),[r,s]=m.useState(""),[a,l]=m.useState(""),[c,u]=m.useState(!1),[d,f]=m.useState(!1),[h,p]=m.useState(""),g=r.trim(),b=!!(g&&!/^[A-Za-z][A-Za-z0-9_]{0,47}$/.test(g)),v=async y=>{if(y.preventDefault(),u(!0),!g||b)return;f(!0),p("");const x={name:g,description:a.trim()||void 0,region:e};try{n(await Kot(x))}catch(w){p(fo(w,i("knowledge.errors.createBase")))}finally{f(!1)}};return o.jsx(OE,{title:i("knowledge.createBase"),onClose:t,busy:d,children:o.jsxs("form",{onSubmit:y=>void v(y),children:[o.jsxs("div",{className:"knowledge-dialog__body",children:[o.jsxs("label",{children:[o.jsx("span",{children:i("common.name")}),o.jsx("input",{autoFocus:!0,value:r,maxLength:48,"aria-invalid":c&&b||void 0,"aria-describedby":"knowledge-name-help",onBlur:()=>u(!0),onChange:y=>s(y.target.value)})]}),o.jsx("p",{id:"knowledge-name-help",className:`knowledge-dialog__note${c&&b?" is-error":""}`,role:c&&b?"alert":void 0,children:i(c&&b?"knowledge.invalidName":"knowledge.nameHelp")}),o.jsxs("label",{children:[o.jsx("span",{children:i("knowledge.optionalDescription")}),o.jsx("textarea",{value:a,maxLength:80,onChange:y=>l(y.target.value)})]}),o.jsx(zS,{message:h})]}),o.jsxs("footer",{className:"knowledge-dialog__actions",children:[o.jsx("button",{type:"button",onClick:t,disabled:d,children:i("common.cancel")}),o.jsx("button",{type:"submit",className:"is-primary",disabled:d||!g||b,children:i(d?"common.creating":"common.create")})]})]})})}function Txt({item:e,onClose:t,onUpdated:n}){const{t:i}=Oe("ui"),[r,s]=m.useState(e.description),[a,l]=m.useState(!1),[c,u]=m.useState(""),d=async f=>{f.preventDefault(),l(!0),u("");try{n(await Got(e.id,e.region,{description:r.trim()}))}catch(h){u(fo(h,i("knowledge.errors.updateBase")))}finally{l(!1)}};return o.jsx(OE,{title:i("knowledge.editBase"),onClose:t,busy:a,children:o.jsxs("form",{onSubmit:f=>void d(f),children:[o.jsxs("div",{className:"knowledge-dialog__body",children:[o.jsxs("label",{children:[o.jsx("span",{children:i("common.name")}),o.jsx("input",{value:e.name,disabled:!0})]}),o.jsxs("label",{children:[o.jsx("span",{children:i("common.description")}),o.jsx("textarea",{autoFocus:!0,value:r,maxLength:80,onChange:f=>s(f.target.value)})]}),o.jsx("p",{className:"knowledge-dialog__note",children:i("knowledge.descriptionOnly")}),o.jsx(zS,{message:c})]}),o.jsxs("footer",{className:"knowledge-dialog__actions",children:[o.jsx("button",{type:"button",onClick:t,disabled:a,children:i("common.cancel")}),o.jsx("button",{type:"submit",className:"is-primary",disabled:a,children:i(a?"common.saving":"common.save")})]})]})})}function _Ee(e,t){if(!e.trim())return{};const n=JSON.parse(e);if(!n||Array.isArray(n)||typeof n!="object")throw new Error(t);return n}function Axt({base:e,onClose:t,onCreated:n,onAssociationInvalid:i}){const{t:r}=Oe("ui"),[s,a]=m.useState("document"),[l,c]=m.useState(""),[u,d]=m.useState(""),[f,h]=m.useState(""),[p,g]=m.useState(null),[b,v]=m.useState(!1),[y,x]=m.useState("{}"),[w,O]=m.useState(""),[k,S]=m.useState(""),[E,C]=m.useState(null),N=m.useRef(null),_=m.useRef(null),j=m.useRef(null),T=m.useRef(0),L=!!w;m.useEffect(()=>{var M;E&&!L&&((M=j.current)==null||M.focus())},[L,E]);const A=M=>{L||M===s||(a(M),g(null),h(""),c(""),d(""),S(""),C(null),v(!1),T.current=0,N.current&&(N.current.value=""))},R=M=>{if(!M||s==="web")return;const B=Ext(M,s,r);if(B){g(null),c(""),d(""),S(B);return}g(M),S(""),c(M.name.replace(/\.[^.]+$/,"")),d(H6(M.name).slice(1))},P=async M=>{if(M.preventDefault(),s==="web"?!f.trim():!p)return;let B;try{B=_Ee(y,r("knowledge.errors.metadataObject"))}catch(I){S(fo(I,r("knowledge.errors.metadataFormat")));return}O(s==="web"?E?"save":"preview":"upload"),S("");try{if(s==="web")if(E){const I={sourceType:"url",metadata:E.metadata,url:E.preview.url,sourceTitle:E.preview.name,sourceMarkdown:E.preview.sourceMarkdown};await Jot(e.id,e.region,I),n()}else{const I=await elt(e.id,e.region,{url:f.trim()});if(!I.sourceMarkdown.trim())throw new Error(r("knowledge.errors.noWebPreview"));C({preview:I,metadata:B})}else p&&(await tlt(e.id,e.region,{file:p,name:l.trim()||void 0,documentType:u.trim()||void 0,metadata:B}),n())}catch(I){I instanceof $R&&I.errorCode===Qwe?i(I):S(fo(I,r(s==="web"?E?"knowledge.errors.addWeb":"knowledge.errors.previewWeb":"knowledge.errors.uploadFile")))}finally{O("")}},$=()=>{L||(C(null),S(""),requestAnimationFrame(()=>{var M;return(M=_.current)==null?void 0:M.focus()}))};return o.jsx(OE,{title:r(E?"knowledge.previewWeb":"knowledge.addData"),onClose:t,busy:L,className:E?"knowledge-dialog--preview knowledge-dialog--web-confirm":"",children:o.jsx("form",{onSubmit:M=>void P(M),children:E?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"knowledge-preview knowledge-web-preview",children:[o.jsxs("div",{className:"knowledge-preview__meta",children:[o.jsx("strong",{title:E.preview.name,children:E.preview.name}),o.jsx("a",{href:E.preview.url,target:"_blank",rel:"noopener noreferrer",children:r("knowledge.openOriginalWeb")})]}),o.jsx("div",{className:"knowledge-preview__body","aria-live":"polite",children:o.jsx("div",{className:"knowledge-preview__markdown-shell",children:o.jsx(Uu,{text:E.preview.sourceMarkdown,allowRawHtml:!1,className:"knowledge-preview__markdown"})})}),k?o.jsx("div",{className:"knowledge-web-preview__error",children:o.jsx(zS,{message:k})}):null]}),o.jsxs("footer",{className:"knowledge-dialog__actions",children:[o.jsx("button",{type:"button",className:"is-back",onClick:$,disabled:L,children:r("knowledge.backToEdit")}),o.jsx("button",{type:"button",onClick:t,disabled:L,children:r("common.cancel")}),o.jsx("button",{ref:j,type:"submit",className:"is-primary",disabled:L,children:r(w==="save"?"common.adding":"knowledge.confirmAdd")})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"knowledge-dialog__body",children:[o.jsx("div",{className:"knowledge-source-tabs",role:"tablist","aria-label":r("knowledge.source"),children:[["image",r("knowledge.image")],["document",r("knowledge.documentFile")],["web",r("knowledge.webPage")]].map(([M,B])=>o.jsx("button",{type:"button",role:"tab",id:`knowledge-source-${M}-tab`,"aria-controls":`knowledge-source-${M}-panel`,"aria-selected":s===M,tabIndex:s===M?0:-1,className:s===M?"is-active":"",disabled:L,onClick:()=>A(M),onKeyDown:I=>{const H=["image","document","web"];if(!["ArrowLeft","ArrowRight","Home","End"].includes(I.key))return;I.preventDefault();const X=H.indexOf(M),Q=I.key==="Home"?H[0]:I.key==="End"?H[H.length-1]:H[(X+(I.key==="ArrowRight"?1:-1)+H.length)%H.length];A(Q),requestAnimationFrame(()=>{var q;return(q=document.getElementById(`knowledge-source-${Q}-tab`))==null?void 0:q.focus()})},children:B},M))}),o.jsx("div",{id:`knowledge-source-${s}-panel`,className:"knowledge-source-panel",role:"tabpanel","aria-labelledby":`knowledge-source-${s}-tab`,children:s==="web"?o.jsxs(o.Fragment,{children:[o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.webUrl")}),o.jsx("input",{ref:_,autoFocus:!0,type:"url",value:f,disabled:L,onChange:M=>{h(M.target.value),S("")},placeholder:"https://example.com/article"})]}),o.jsx("div",{className:"knowledge-upload-status",role:"status","aria-live":"polite",children:w==="preview"?o.jsx(Tn,{children:r("knowledge.generatingWebPreview")}):null})]}):o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:N,className:"knowledge-upload-input",type:"file","aria-label":r("knowledge.selectFile"),accept:s==="image"?TEe:AEe,disabled:L,onChange:M=>{var B;R(((B=M.currentTarget.files)==null?void 0:B[0])??null),M.currentTarget.value=""}}),o.jsxs("button",{type:"button",className:`knowledge-upload-dropzone${b?" is-dragging":""}${p?" is-ready":""}`,disabled:L,onClick:()=>{var M;return(M=N.current)==null?void 0:M.click()},onDragEnter:M=>{M.preventDefault(),!L&&(T.current+=1,v(!0))},onDragOver:M=>{M.preventDefault(),L||(M.dataTransfer.dropEffect="copy")},onDragLeave:M=>{M.preventDefault(),T.current=Math.max(0,T.current-1),T.current===0&&v(!1)},onDrop:M=>{var B;M.preventDefault(),T.current=0,v(!1),L||R(((B=M.dataTransfer.files)==null?void 0:B[0])??null)},children:[o.jsx("strong",{children:p?p.name:r("knowledge.selectOrDropFile")}),o.jsx("span",{children:p?r("knowledge.selectedFile",{size:sU(p.size)}):r(s==="image"?"knowledge.imageFileHelp":"knowledge.documentFileHelp")})]}),o.jsx("div",{className:"knowledge-upload-status",role:"status","aria-live":"polite",children:L?o.jsx(Tn,{children:r("knowledge.uploadingFile")}):null})]})}),s!=="web"?o.jsxs("div",{className:"knowledge-dialog__fields",children:[o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.optionalName")}),o.jsx("input",{value:l,disabled:L,maxLength:256,onChange:M=>c(M.target.value)})]}),o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.optionalType")}),o.jsx("input",{value:u,disabled:L,maxLength:64,onChange:M=>d(M.target.value),placeholder:"pdf, docx, png"})]})]}):null,o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.metadataJson")}),o.jsx("textarea",{className:"is-code",value:y,disabled:L,onChange:M=>x(M.target.value),spellCheck:!1})]}),o.jsx(zS,{message:k})]}),o.jsxs("footer",{className:"knowledge-dialog__actions",children:[o.jsx("button",{type:"button",onClick:t,disabled:L,children:r("common.cancel")}),o.jsx("button",{type:"submit",className:"is-primary",disabled:L||(s==="web"?!f.trim():!p),children:r(L?s==="web"?"common.generating":"common.uploading":s==="web"?"knowledge.generatePreview":"knowledge.uploadFile")})]})]})})})}function _xt({base:e,item:t,onClose:n,onUpdated:i}){const{t:r}=Oe("ui"),[s,a]=m.useState(()=>JSON.stringify(t.metadata??{},null,2)),[l,c]=m.useState(!1),[u,d]=m.useState(""),f=async h=>{h.preventDefault();let p;try{p=_Ee(s,r("knowledge.errors.metadataObject"))}catch(g){d(fo(g,r("knowledge.errors.metadataFormat")));return}c(!0),d("");try{i(await nlt(e.id,t.id,e.region,{metadata:p}))}catch(g){d(fo(g,r("knowledge.errors.updateDocument")))}finally{c(!1)}};return o.jsx(OE,{title:r("knowledge.editMetadata"),onClose:n,busy:l,children:o.jsxs("form",{onSubmit:h=>void f(h),children:[o.jsxs("div",{className:"knowledge-dialog__body",children:[o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.knowledge")}),o.jsx("input",{value:t.name||t.id,disabled:!0})]}),o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.metadataJson")}),o.jsx("textarea",{autoFocus:!0,className:"is-code knowledge-metadata-editor",value:s,onChange:h=>a(h.target.value),spellCheck:!1})]}),o.jsx(zS,{message:u})]}),o.jsxs("footer",{className:"knowledge-dialog__actions",children:[o.jsx("button",{type:"button",onClick:n,disabled:l,children:r("common.cancel")}),o.jsx("button",{type:"submit",className:"is-primary",disabled:l,children:r(l?"common.saving":"common.save")})]})]})})}const NEe=new Set(["avif","bmp","gif","jpeg","jpg","png","svg","webp"]),jEe=new Set(["aac","flac","m4a","mp3","ogg","wav","webm"]),REe=new Set(["m4v","mov","mp4","mpeg","mpg","ogg","webm"]),Nxt=new Set(["pdf"]),jxt=new Set(["doc","docx","ppt","pptx","xls","xlsx"]),Rxt=new Set(["creating","indexing","pending","processing","queued","submitted"]),Ixt=new Set(["error","failed","unavailable"]);function RY(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{}}function RT(e){if(e==null||e==="")return"-";if(["string","number","boolean"].includes(typeof e))return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function Pxt(e,t){if(Array.isArray(e)){if(e.length===0)return null;const r=e.map(RY);if(r.some(s=>Object.keys(s).length>0)){const s=[...new Set(r.flatMap(a=>Object.keys(a)))];return{columns:s,rows:r.map(a=>s.map(l=>RT(a[l])))}}return{columns:[t("knowledge.value")],rows:e.map(s=>[RT(s)])}}const n=RY(e),i=Object.entries(n);if(i.length===0)return null;if(i.every(([,r])=>Array.isArray(r))){const r=i.map(([a])=>a),s=Math.max(...i.map(([,a])=>a.length));return{columns:r,rows:Array.from({length:s},(a,l)=>i.map(([,c])=>RT(c[l])))}}return{columns:[t("knowledge.field"),t("knowledge.value")],rows:i.map(([r,s])=>[r,RT(s)])}}function IEe(e){const t=e.trim();if(!t||t.startsWith("//"))return"";if(t.startsWith("/"))return t;try{const n=new URL(t);return["http:","https:"].includes(n.protocol)?n.href:""}catch{return""}}function Dxt(e){const t=IEe(e);return t.startsWith("http://")||t.startsWith("https://")?t:""}function Mxt(e){var r;const t=e.attachmentType.trim().toLocaleLowerCase();if(t==="image"||t==="doc-image"||t.startsWith("image/"))return"image";if(t==="audio"||t.startsWith("audio/"))return"audio";if(t==="video"||t.startsWith("video/"))return"video";if(t==="pdf"||t==="application/pdf")return"pdf";const n=e.attachmentUrl.split(/[?#]/,1)[0],i=n.includes(".")?((r=n.split(".").pop())==null?void 0:r.toLocaleLowerCase())??"":"";return NEe.has(i)?"image":jEe.has(i)?"audio":REe.has(i)?"video":Nxt.has(i)?"pdf":t||i?"file":"none"}function Lxt(e,t){const n=e.status.trim().toLocaleLowerCase();if(Rxt.has(n))return{title:t("knowledge.preview.processingTitle"),detail:t("knowledge.preview.processingDetail")};if(Ixt.has(n))return{title:t("knowledge.preview.failedTitle"),detail:t("knowledge.preview.failedDetail")};const i=q6(e).toLocaleLowerCase();return i==="pdf"||jxt.has(i)?{title:t("knowledge.preview.noParsedTitle"),detail:t("knowledge.preview.noParsedDetail")}:NEe.has(i)||jEe.has(i)||REe.has(i)?{title:t("knowledge.preview.noMediaTitle"),detail:t("knowledge.preview.noMediaDetail")}:{title:t("knowledge.preview.noDataTitle"),detail:t("knowledge.preview.noDataDetail")}}function $xt({chunk:e}){const{t}=Oe("ui"),[n,i]=m.useState(!1),r=IEe(e.attachmentUrl),s=Mxt(e);return!r||s==="none"?null:n?o.jsx("div",{className:"knowledge-preview__attachment-error",children:t("knowledge.preview.attachmentError")}):s==="image"?o.jsx("img",{className:"knowledge-preview__image",src:r,alt:e.title||t("knowledge.preview.imageAlt"),loading:"lazy",onError:()=>i(!0)}):s==="audio"?o.jsx("audio",{className:"knowledge-preview__audio",src:r,controls:!0,preload:"metadata",onError:()=>i(!0),children:t("knowledge.preview.audioUnsupported")}):s==="video"?o.jsx("video",{className:"knowledge-preview__video",src:r,controls:!0,playsInline:!0,preload:"metadata",onError:()=>i(!0),children:t("knowledge.preview.videoUnsupported")}):s==="pdf"?o.jsxs("div",{className:"knowledge-preview__pdf",children:[o.jsx("iframe",{src:r,title:e.title?t("knowledge.preview.namedPdf",{name:e.title}):t("knowledge.preview.pdf"),sandbox:"",referrerPolicy:"no-referrer",onError:()=>i(!0)}),o.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:t("knowledge.preview.openPdf")})]}):o.jsxs("div",{className:"knowledge-preview__file-fallback",children:[o.jsx("p",{children:t("knowledge.preview.fileUnsupported")}),o.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:t("knowledge.preview.openOriginalFile")})]})}function Fxt({base:e,item:t,onClose:n}){const{t:i}=Oe("ui"),[r,s]=m.useState([]),[a,l]=m.useState(t),[c,u]=m.useState(""),[d,f]=m.useState(!0),[h,p]=m.useState(!1),[g,b]=m.useState(!1),[v,y]=m.useState(""),x=m.useRef(0),w=m.useRef(null),O=m.useCallback(async(C=0)=>{var j;(j=w.current)==null||j.abort();const N=new AbortController;w.current=N;const _=x.current+1;x.current=_,C>0?p(!0):f(!0),y(""),C===0&&(s([]),b(!1));try{const T=await Zot(e.id,t.id,{region:e.region,offset:C,signal:N.signal});if(x.current!==_)return;l(T.document.id?T.document:t),u(T.sourceMarkdown||T.document.sourceMarkdown),s(L=>C>0?[...L,...T.chunks]:T.chunks),b(T.hasMore)}catch(T){!V6(T)&&x.current===_&&y(fo(T,i("knowledge.errors.loadPreview")))}finally{x.current===_&&(f(!1),p(!1))}},[e.id,e.region,t,i]);m.useEffect(()=>(O(),()=>{var C;(C=w.current)==null||C.abort(),x.current+=1}),[O]);const k=Dxt(a.url||t.url),S=Lxt(a,i),E=a.metadata._veadk_content_format==="markdown";return o.jsx(OE,{title:a.name||t.name||t.id,onClose:n,className:"knowledge-dialog--preview",children:o.jsxs("div",{className:"knowledge-preview",children:[a.sizeBytes>0||k?o.jsxs("div",{className:"knowledge-preview__meta",children:[a.sizeBytes>0?o.jsx("span",{children:sU(a.sizeBytes)}):null,k?o.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",children:i("knowledge.openOriginalWeb")}):null]}):null,o.jsx("div",{className:"knowledge-preview__body","aria-live":"polite",children:c?o.jsx("div",{className:"knowledge-preview__markdown-shell",children:o.jsx(Uu,{text:c,allowRawHtml:!1,className:"knowledge-preview__markdown"})}):d?o.jsx("div",{className:"knowledge-preview__state",role:"status",children:o.jsx(Tn,{as:"span",duration:2.4,children:i("knowledge.preview.loading")})}):v&&r.length===0?o.jsxs("div",{className:"knowledge-preview__state is-error",role:"alert",children:[o.jsx("p",{children:v}),o.jsx("button",{type:"button",onClick:()=>void O(),children:i("common.retry")})]}):r.length===0?o.jsxs("div",{className:"knowledge-preview__state",children:[o.jsx("p",{children:S.title}),o.jsx("span",{children:k?i("knowledge.preview.openOriginalHint"):S.detail}),o.jsx("button",{type:"button",onClick:()=>void O(),children:i("common.reload")})]}):o.jsxs("div",{className:"knowledge-preview__chunks",children:[r.map((C,N)=>{const _=Pxt(C.tableFields,i),j=C.id||`${N}:${C.title}`;return o.jsxs("article",{className:"knowledge-preview__chunk",children:[o.jsx("header",{children:o.jsx("h3",{children:C.title||i("knowledge.preview.chunk",{index:N+1})})}),C.content?E?o.jsx(Uu,{text:C.content,allowRawHtml:!1,className:"knowledge-preview__markdown"}):o.jsx("p",{className:"knowledge-preview__content",children:C.content}):null,_?o.jsx("div",{className:"knowledge-preview__table-wrap",children:o.jsxs("table",{children:[o.jsx("thead",{children:o.jsx("tr",{children:_.columns.map((T,L)=>o.jsx("th",{scope:"col",children:T},`${T}:${L}`))})}),o.jsx("tbody",{children:_.rows.map((T,L)=>o.jsx("tr",{children:T.map((A,R)=>o.jsx("td",{children:A},R))},L))})]})}):null,o.jsx($xt,{chunk:C})]},j)}),v?o.jsx("div",{className:"knowledge-preview__more-error",role:"alert",children:v}):null,g?o.jsx("button",{type:"button",className:"knowledge-preview__load-more",disabled:h,onClick:()=>void O(r.length),children:h?o.jsx(Tn,{as:"span",duration:2.4,children:i("knowledge.preview.loadingMore")}):i("knowledge.preview.loadMore")}):null]})})]})})}function Bxt({cloudProvider:e,region:t,active:n=!0,activationRevision:i=0,onDetailChange:r,toolbarLeading:s,toolbarFilters:a}){const{t:l,i18n:c}=Oe("ui"),[u,d]=m.useState([]),[f,h]=m.useState({}),[p,g]=m.useState([]),[b,v]=m.useState(""),[y,x]=m.useState("overview"),[w,O]=m.useState(""),[k,S]=m.useState(""),[E,C]=m.useState(!0),[N,_]=m.useState(!1),[j,T]=m.useState(""),[L,A]=m.useState([]),[R,P]=m.useState(!1),[$,M]=m.useState(""),[B,I]=m.useState(""),[H,X]=m.useState(""),[Q,q]=m.useState(!1),[U,te]=m.useState(!1),[le,oe]=m.useState(!1),[re,he]=m.useState(null),[K,G]=m.useState(null),[se,de]=m.useState(null),[ke,Te]=m.useState(null),[rt,Be]=m.useState(null),[Me,Ie]=m.useState(!1),qe=m.useRef(0),Pe=m.useRef(0),Ve=m.useRef([]),Ee=m.useRef(!1),Le=m.useRef(!1),Y=m.useRef(null),fe=m.useRef(null),we=m.useRef({}),Ke=m.useRef(!1),Je=m.useRef(null),Tt=m.useRef(null),Ne=m.useRef(null),ve=m.useRef(null),He=m.useMemo(()=>[t],[t]),it=m.useCallback(ye=>`${ye.region}\0${ye.id}`,[]),Ae=u.find(ye=>it(ye)===b)??null,Kt=!!(Ae&&H===it(Ae));m.useEffect(()=>{r==null||r(!!Ae)},[r,Ae]),m.useEffect(()=>{x("overview"),S("")},[b]);const gn=m.useMemo(()=>{const ye=w.trim().toLocaleLowerCase();return ye?u.filter(ze=>[ze.name,ze.description,ze.ownerLabel,ze.providerKnowledgeId].some(et=>et.toLocaleLowerCase().includes(ye))):u},[u,w]),Wt=m.useMemo(()=>{const ye=k.trim().toLocaleLowerCase();return ye?L.filter(ze=>[ze.name,ze.id,q6(ze)].some(et=>et.toLocaleLowerCase().includes(ye))):L},[k,L]);m.useEffect(()=>{G(null)},[Ae==null?void 0:Ae.id,Ae==null?void 0:Ae.region]);const Ot=m.useCallback(async(ye=!1)=>{var Et;if(ye&&(Ke.current||Object.keys(we.current).length===0))return;(Et=Y.current)==null||Et.abort();const ze=new AbortController;Y.current=ze;const et=qe.current+1;qe.current=et,Ke.current=!0,ye?_(!0):C(!0),T(""),ye||g([]);try{const _t=await Wot({regions:He,nextTokens:ye?we.current:void 0,signal:ze.signal});if(qe.current!==et)return;d(en=>ye?[...en,..._t.items.filter(on=>!en.some(J=>it(J)===it(on)))]:_t.items),we.current=_t.nextTokens,h(_t.nextTokens);const rn=_t.failures.map(({region:en,error:on})=>`${Th(en,e)}: ${fo(on,l("common.loadFailed"))}`);g(en=>ye?[...new Set([...en,...rn])]:rn),ye||v(en=>_t.items.some(on=>it(on)===en)?en:"")}catch(_t){if(V6(_t))return;qe.current===et&&(ye?g(rn=>[...new Set([...rn,fo(_t,l("knowledge.errors.loadMoreBases"))])]):T(fo(_t,l("knowledge.errors.loadBases"))))}finally{qe.current===et&&(Ke.current=!1,C(!1),_(!1))}},[it,e,He,l]),Nt=m.useCallback(async(ye,ze=!1)=>{var _t;if(ze&&Ee.current)return;(_t=fe.current)==null||_t.abort();const et=new AbortController;fe.current=et;const Et=Pe.current+1;Pe.current=Et,ze||(Ve.current=[],Le.current=!1,A([]),q(!1),I("")),Ee.current=!0,P(!0),ze?I(""):M("");try{const rn=await Yot(ye.id,{region:ye.region,offset:ze?Ve.current.length:0,signal:et.signal});if(Pe.current!==Et)return;X(Lt=>Lt===it(ye)?"":Lt);const en=Ve.current,on=ze?[...en,...rn.items.filter(Lt=>!Lt.id||!en.some(An=>An.id===Lt.id))]:rn.items,J=rn.hasMore&&(!ze||on.length>en.length);Ve.current=on,Le.current=J,A(on),q(J)}catch(rn){if(V6(rn))return;Pe.current===Et&&(rn instanceof $R&&rn.errorCode===Qwe&&(X(it(ye)),he(on=>on&&it(on)===it(ye)?null:on)),ze?I(fo(rn,l("knowledge.errors.loadMoreData"))):M(fo(rn,l("knowledge.errors.loadData"))))}finally{Pe.current===Et&&(Ee.current=!1,P(!1))}},[it,l]);m.useEffect(()=>{var ye;(ye=Y.current)==null||ye.abort(),qe.current+=1,Ke.current=!1,we.current={},d([]),h({}),g([]),v(""),X(""),T(""),C(!0)},[e]),m.useEffect(()=>{if(n)return Ot(),()=>{var ye;(ye=Y.current)==null||ye.abort(),qe.current+=1,Ke.current=!1}},[n,i,Ot]),m.useEffect(()=>{var ye,ze;if(!n){(ye=fe.current)==null||ye.abort(),Pe.current+=1,Ee.current=!1;return}if(!Ae){(ze=fe.current)==null||ze.abort(),Pe.current+=1,Ve.current=[],Ee.current=!1,Le.current=!1,A([]),q(!1),I("");return}return Nt(Ae),()=>{var et;(et=fe.current)==null||et.abort(),Pe.current+=1,Ee.current=!1}},[n,i,Ae==null?void 0:Ae.id,Ae==null?void 0:Ae.region]);const at=n&&!Ae&&!w.trim()&&!E&&!N&&!j&&Object.keys(f).length>0;m.useEffect(()=>{const ye=Tt.current,ze=Je.current;if(!ye||!ze||!at)return;const et=new IntersectionObserver(([Et])=>{Et.isIntersecting&&Ot(!0)},{root:ze,rootMargin:"240px 0px",threshold:.01});return et.observe(ye),()=>et.disconnect()},[at,Ot]);const bt=()=>{const ye=Je.current;!ye||!at||ye.scrollHeight-ye.scrollTop-ye.clientHeight<=240&&Ot(!0)},_e=!!(Ae&&L.length>0&&Q&&!R&&!B);m.useEffect(()=>{const ye=ve.current,ze=Ne.current;if(!Ae||!ye||!ze||!_e)return;const et=new IntersectionObserver(([Et])=>{Et.isIntersecting&&Nt(Ae,!0)},{root:Ne.current,rootMargin:"240px 0px",threshold:.01});return et.observe(ye),()=>et.disconnect()},[_e,Nt,Ae==null?void 0:Ae.id,Ae==null?void 0:Ae.region]);const st=()=>{const ye=Ne.current;if(!Ae||!ye||!Le.current||Ee.current||B)return;const{scrollHeight:ze,scrollTop:et,clientHeight:Et}=ye;ze-et-Et<=240&&Nt(Ae,!0)},je=ye=>{d(ze=>ze.map(et=>it(et)===it(ye)?ye:et))},gt=async()=>{if(ke){Ie(!0);try{await Xot(ke.id,ke.region),d(ye=>ye.filter(ze=>it(ze)!==it(ke))),X(ye=>ye===it(ke)?"":ye),b===it(ke)&&v(""),Te(null)}catch(ye){T(fo(ye,l("knowledge.errors.deleteBase"))),Te(null)}finally{Ie(!1)}}},ut=async()=>{if(!(!Ae||!rt)){Ie(!0);try{await ilt(Ae.id,rt.id,Ae.region);const ye=Ve.current.filter(ze=>ze.id!==rt.id);Ve.current=ye,A(ye),Be(null)}catch(ye){M(fo(ye,l("knowledge.errors.deleteDocument"))),Be(null)}finally{Ie(!1)}}};return o.jsxs("section",{className:`knowledge-library${Ae?" is-detail":" resource-collection"}`,"aria-label":l("knowledge.library"),children:[Ae?o.jsx(lE,{className:"knowledge-library__detail",title:Ae.name,description:Ae.description||l("common.noDescription"),identitySeed:Ae.name,backLabel:l("knowledge.backToList"),onBack:()=>v(""),sections:[{key:"overview",label:l("skillCenter.overview"),content:o.jsx("section",{className:"knowledge-overview",children:o.jsxs(kB,{className:"knowledge-overview__summary",children:[o.jsxs("div",{children:[o.jsx("dt",{children:l("knowledge.provider")}),o.jsx("dd",{children:Ae.providerType||"-"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:l("knowledge.knowledgeId")}),o.jsx("dd",{className:"knowledge-keyboard-reveal",tabIndex:0,title:Ae.providerKnowledgeId,children:Ae.providerKnowledgeId||"-"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:l("knowledge.project")}),o.jsx("dd",{children:Ae.projectName||"default"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:l("knowledge.creator")}),o.jsx("dd",{children:LM(Ae.ownerLabel)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:l("skillCenter.updatedAt")}),o.jsx("dd",{children:Oxt(Ae.updatedAt,c.resolvedLanguage??c.language)||"-"})]})]})})},{key:"data",label:l("knowledge.data"),content:o.jsx("section",{className:"knowledge-documents",children:o.jsx("div",{className:`knowledge-documents__body${L.length>0?" is-table":""}`,"aria-live":"polite",children:R&&L.length===0?o.jsx(qd,{}):$&&L.length===0?o.jsxs("div",{className:"knowledge-library__state is-error",role:"alert",children:[o.jsx("p",{children:$}),Kt&&Ae.canManage?o.jsx("button",{type:"button",onClick:()=>Te(Ae),children:l("knowledge.deleteInvalidAssociation")}):o.jsx("button",{type:"button",onClick:()=>void Nt(Ae),children:l("common.retry")})]}):L.length===0?o.jsxs("div",{className:"knowledge-library__state",children:[o.jsx(yxt,{}),o.jsx("p",{children:l("knowledge.noData")}),Ae.canManage&&o.jsx("button",{type:"button",onClick:()=>he(Ae),children:l("knowledge.addFirstData")})]}):o.jsx(hot,{rows:Wt,rowKey:ye=>ye.id,rowLabel:ye=>ye.name||ye.id,columns:[{key:"name",header:l("common.name"),className:"is-primary-column",render:ye=>o.jsx("span",{title:ye.name||ye.id,children:ye.name||ye.id})},{key:"format",header:l("knowledge.format"),className:"is-compact-column",render:ye=>q6(ye)},{key:"size",header:l("knowledge.size"),className:"is-compact-column",render:ye=>sU(ye.sizeBytes)}],searchValue:k,onSearchChange:S,searchPlaceholder:l("knowledge.searchData"),searchLabel:l("knowledge.searchLibraryData"),primaryAction:Ae.canManage?{label:l(Kt?"knowledge.associationInvalid":"knowledge.addData"),disabled:Kt,title:Kt?l("knowledge.providerMissing"):void 0,onClick:()=>he(Ae)}:void 0,rowActions:ye=>[{label:l("common.preview"),onSelect:()=>G(ye)},...Ae.canManage?[{label:l("common.edit"),onSelect:()=>de(ye)},{label:l("common.delete"),onSelect:()=>Be(ye),danger:!0}]:[]],scrollRef:Ne,onScroll:st,busy:R,emptyLabel:l("knowledge.noMatchingData"),footer:R?o.jsxs("div",{className:"knowledge-document-pagination",role:"status","aria-live":"polite",children:[o.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),o.jsx("span",{children:l("knowledge.loadingMoreData")})]}):B?o.jsxs("div",{className:"knowledge-document-pagination is-error",role:"alert",children:[o.jsx("span",{children:B}),o.jsx("button",{type:"button",onClick:()=>void Nt(Ae,!0),children:l("knowledge.retryLoading")})]}):Q?o.jsx("div",{ref:ve,className:"knowledge-document-pagination",role:"status","aria-live":"polite",children:l("skillCenter.scrollForMore")}):null})})})}],activeSectionKey:y,navigationLabel:l("knowledge.details"),onSectionChange:x,actions:Ae.canManage?o.jsxs(o.Fragment,{children:[o.jsx(Ft,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,onClick:()=>Te(Ae),children:l("common.delete")}),o.jsx(Ft,{type:"button",color:"primary",size:"lg",pill:!1,onClick:()=>oe(!0),children:l("common.edit")})]}):void 0}):o.jsxs(o.Fragment,{children:[o.jsxs(Yb,{className:"knowledge-library__toolbar library-resource-toolbar",children:[s,o.jsxs("div",{className:"resource-toolbar__actions",children:[a,o.jsx(Cm,{value:w,onChange:ye=>O(ye.target.value),placeholder:l("knowledge.searchBases"),"aria-label":l("knowledge.searchBases")})]})]}),o.jsxs(Zb,{ref:Je,"aria-live":"polite",onScroll:bt,children:[p.length>0&&!E&&o.jsxs("div",{className:"knowledge-region-warning",role:"status",children:[o.jsx("span",{children:l("knowledge.someBasesFailed")}),o.jsx("button",{type:"button",onClick:()=>void Ot(),children:l("common.retry")})]}),E&&u.length===0?o.jsx(qd,{}):j?o.jsxs("div",{className:"knowledge-library__state is-error",role:"alert",children:[o.jsx("p",{children:j}),o.jsx("button",{type:"button",onClick:()=>void Ot(),children:l("common.retry")})]}):gn.length===0&&w.trim()?o.jsxs("div",{className:"knowledge-library__state",children:[o.jsx(bxt,{}),o.jsx("p",{children:l("knowledge.noMatchingBases")})]}):o.jsxs(Vx,{children:[w.trim()?null:o.jsx(Eb,{"aria-label":l("knowledge.createBase"),icon:o.jsx(xxt,{}),onClick:()=>te(!0),children:l("knowledge.createBase")}),gn.map(ye=>o.jsx(fE,{className:"knowledge-card",title:ye.name,description:ye.description||l("common.noDescription"),metadata:[{label:l("knowledge.creator"),value:LM(ye.ownerLabel),title:LM(ye.ownerLabel)},{label:l("knowledge.project"),value:ye.projectName||"default",title:ye.projectName||"default"}],action:{label:H===it(ye)?l("knowledge.associationInvalid"):l("knowledge.addData"),icon:"plus",disabled:!ye.canManage||H===it(ye),title:ye.canManage?H===it(ye)?l("knowledge.providerMissing"):void 0:l("knowledge.noManagePermission"),onClick:()=>he(ye)},detailAction:{label:l("common.viewDetails"),onClick:()=>v(it(ye))}},it(ye)))]}),at||N?o.jsx("div",{ref:Tt,className:"my-agent-load-more",role:"status","aria-live":"polite",children:N?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),o.jsx("span",{children:l("knowledge.loadingMoreBases")})]}):at?o.jsx("span",{children:l("skillCenter.scrollForMore")}):null}):null]})]}),U&&o.jsx(Cxt,{region:t,onClose:()=>te(!1),onCreated:ye=>{d(ze=>[ye,...ze]),v(it(ye)),te(!1)}}),Ae&&le&&o.jsx(Txt,{item:Ae,onClose:()=>oe(!1),onUpdated:ye=>{je(ye),oe(!1)}}),Ae&&K&&o.jsx(Fxt,{base:Ae,item:K,onClose:()=>G(null)}),re&&o.jsx(Axt,{base:re,onClose:()=>he(null),onAssociationInvalid:ye=>{X(it(re)),Ae&&it(Ae)===it(re)&&M(fo(ye,l("knowledge.associationInvalid"))),he(null)},onCreated:()=>{Ae&&it(Ae)===it(re)&&Nt(Ae),he(null)}}),Ae&&se&&o.jsx(_xt,{base:Ae,item:se,onClose:()=>de(null),onUpdated:ye=>{const ze=Ve.current.map(et=>et.id===ye.id?ye:et);Ve.current=ze,A(ze),de(null)}}),ke&&o.jsx(fc,{title:l("knowledge.deleteBaseTitle"),description:l("knowledge.deleteBaseDescription",{name:ke.name}),confirmLabel:l(Me?"common.deleting":"common.delete"),variant:"danger",busy:Me,onCancel:()=>Te(null),onConfirm:()=>void gt()}),rt&&o.jsx(fc,{title:l("knowledge.deleteDocumentTitle"),description:l("knowledge.deleteDocumentDescription",{name:rt.name||rt.id}),confirmLabel:l(Me?"common.deleting":"common.delete"),variant:"danger",busy:Me,onCancel:()=>Be(null),onConfirm:()=>void ut()})]})}const Uxt="_EmptyMessage_1r5gu_1",Qxt="_IconBadge_1r5gu_16",zxt="_Title_1r5gu_54",Vxt="_Description_1r5gu_69",Hxt="_ActionRow_1r5gu_77",wE={EmptyMessage:Uxt,IconBadge:Qxt,Title:zxt,Description:Vxt,ActionRow:Hxt},Sn=({children:e,className:t,fill:n="static"})=>o.jsx("div",{className:bi(wE.EmptyMessage,t),"data-fill":n,children:e}),qxt=({size:e="md",color:t="secondary",children:n,className:i})=>o.jsx("div",{className:bi(wE.IconBadge,i),"data-size":e,"data-color":t,children:n}),Wxt=({children:e,className:t,color:n="secondary"})=>o.jsx("div",{className:bi(wE.Title,t),"data-color":n,children:e}),Kxt=({children:e,className:t})=>o.jsx("div",{className:bi(wE.Description,t),children:e}),Gxt=({children:e,className:t})=>o.jsx("div",{className:bi(wE.ActionRow,t),children:e});Sn.Icon=qxt;Sn.Title=Wxt;Sn.Description=Kxt;Sn.ActionRow=Gxt;const Xxt="/web/skill-management";class Yxt extends Error{constructor(t,n,i="SKILL_MANAGEMENT_ERROR",r="",s,a=""){super(t),this.status=n,this.code=i,this.statusText=r,this.originalError=s,this.rawResponse=a,this.name="SkillManagementApiError"}}async function Kh(e,t={},n=Ho){return fetch($o(`${Xxt}${e}`),{...t,headers:qu(Qh(t.headers)),signal:Ol(t.signal,n)})}async function PEe(e,t){let n=t,i="SKILL_MANAGEMENT_ERROR",r;const s=await e.text().catch(()=>"");try{const a=JSON.parse(s);typeof a.detail=="string"?n=a.detail:a.detail&&(n=a.detail.message||t,i=a.detail.code||i,r=a.detail.originalError)}catch{s.trim()&&(n=V("common.fallbackWithDetail",{fallback:t,detail:s.trim()}))}return new Yxt(n,e.status,i,e.statusText,r,s)}async function Gh(e,t){if(!e.ok)throw await PEe(e,t);return e.json()}async function Zxt(e){const t=new URLSearchParams({region:e.region,page:String(e.page),page_size:String(e.pageSize)});return e.project&&t.set("project",e.project),Gh(await Kh(`/spaces?${t}`,{signal:e.signal}),V("skills.listSpacesFailed"))}async function Jxt(e){return Gh(await Kh("/spaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),V("skills.createSpaceFailed"))}async function e1t(e){return Gh(await Kh(`/spaces/${encodeURIComponent(e.spaceId)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,description:e.description,region:e.region})}),V("skills.updateSpaceFailed"))}async function t1t(e){const t=new URLSearchParams({region:e.region});await Gh(await Kh(`/spaces/${encodeURIComponent(e.spaceId)}?${t}`,{method:"DELETE"}),V("skills.deleteSpaceFailed"))}async function n1t(e){const t=new URLSearchParams({region:e.region});return e.project&&t.set("project",e.project),Gh(await Kh(`/spaces/${encodeURIComponent(e.spaceId)}/skills?${t}`,{method:"POST",headers:{"Content-Type":"application/zip"},body:e.file},cs),V("skills.uploadFailed"))}async function i1t(e){return Gh(await Kh("/validate",{method:"POST",headers:{"Content-Type":"application/zip"},body:e},cs),V("skills.validateFailed"))}async function r1t(e){const t=new URLSearchParams({region:e.region});await Gh(await Kh(`/spaces/${encodeURIComponent(e.spaceId)}/skills/${encodeURIComponent(e.skillId)}?${t}`,{method:"DELETE"}),V("skills.deleteFailed"))}async function s1t(e){const t=new URLSearchParams({region:e.region});e.version&&t.set("version",e.version),e.skillSpaceName&&t.set("skill_space_name",e.skillSpaceName),e.skillName&&t.set("skill_name",e.skillName);const n=await Gh(await Kh(`/spaces/${encodeURIComponent(e.spaceId)}/skills/${encodeURIComponent(e.skillId)}/files?${t}`),V("skills.listFilesFailed"));return Array.isArray(n.files)?n.files:[]}async function a1t(e){var l;const t=new URLSearchParams({region:e.region});e.version&&t.set("version",e.version),e.skillSpaceName&&t.set("skill_space_name",e.skillSpaceName),e.skillName&&t.set("skill_name",e.skillName);const n=await Kh(`/spaces/${encodeURIComponent(e.spaceId)}/skills/${encodeURIComponent(e.skillId)}/archive?${t}`,{},cs);n.ok||await Gh(n,V("skills.downloadFailed"));const r=((l=(n.headers.get("content-disposition")||"").match(/filename="([^"]+)"/))==null?void 0:l[1])||`${e.fallbackName}.zip`,s=URL.createObjectURL(await n.blob()),a=document.createElement("a");a.href=s,a.download=r,a.click(),URL.revokeObjectURL(s)}async function YR(e){const t=await fetch(e,{headers:{accept:"application/json"},signal:Ol(void 0,Ho)});if(!t.ok)throw await PEe(t,It("helpers.skills.agentKitRequestFailed"));return t.json()}async function DEe(){return(await YR("/web/skill-spaces")).items||[]}async function MEe(e,t){const n=t?`?region=${encodeURIComponent(t)}`:"";return(await YR(`/web/skill-spaces/${encodeURIComponent(e)}/skills${n}`)).items||[]}async function o1t(e,t){const n=new URLSearchParams({region:t.region,page:String(t.page),page_size:String(t.pageSize)});return t.project&&n.set("project",t.project),YR(`/web/skill-spaces/${encodeURIComponent(e)}/skills?${n.toString()}`)}async function l1t(e,t,n,i,r,s,a){const l=[];n&&l.push(`version=${encodeURIComponent(n)}`),i&&l.push(`region=${encodeURIComponent(i)}`),r&&l.push(`project=${encodeURIComponent(r)}`),s&&l.push(`skill_name=${encodeURIComponent(s)}`),a&&l.push(`skill_space_name=${encodeURIComponent(a)}`);const c=l.length>0?`?${l.join("&")}`:"";return YR(`/web/skill-spaces/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}${c}`)}function c1t(e,t){return{source:"skillspace",id:`ss:${e.id}/${t.skillId}/${t.version}`,name:t.skillName,description:t.skillDescription,folder:t.skillName,skillSpaceId:e.id,skillSpaceName:e.name,skillSpaceRegion:e.region,skillId:t.skillId,version:t.version}}function u1t(e,t,n="volcengine"){return n==="byteplus"?"":`https://console.volcengine.com/agentkit/${(t||"cn-beijing")==="cn-beijing"?"cn":"cn-shanghai"}/skillspace/detail/${encodeURIComponent(e)}`}Zt.hasResourceBundle("en-US","skills")||Zt.addResourceBundle("en-US","skills",Kae,!0,!0);Zt.hasResourceBundle("zh-CN","skills")||Zt.addResourceBundle("zh-CN","skills",dde,!0,!0);function Mt(e,t={}){return Zt.t(e,{...t,ns:"skills"})}const d1t="/web/skill-workbench";class W6 extends Error{constructor(t,n,i="SKILL_WORKBENCH_ERROR",r=!1,s="",a,l=""){super(t),this.status=n,this.code=i,this.retryable=r,this.statusText=s,this.originalError=a,this.rawResponse=l,this.name="SkillWorkbenchApiError"}}function eu(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Error(Mt("api.invalidFormat",{label:t}));return e}function IY(e,t){if(e!=null){if(typeof e!="string"||!e.trim()||e.trim().length>256)throw new Error(Mt("api.invalidFormat",{label:t}));return e.trim()}}function f1t(e){if(e!=null){if(e==="pending"||e==="ready"||e==="failed"||e==="unknown")return e;throw new Error(Mt("api.invalidFormat",{label:Mt("api.recoveryStatus")}))}}async function Wd(e,t={},n=Ho){return fetch($o(`${d1t}${e}`),{...t,headers:Qh(t.headers),signal:Ol(t.signal,n)})}async function aU(e,t){var i;const n=await e.text().catch(()=>"");try{const r=eu(JSON.parse(n),Mt("api.errorResponse")),s=r.detail&&typeof r.detail=="object"?eu(r.detail,Mt("api.errorDetails")):r;return new W6(typeof s.message=="string"?s.message:t,e.status,typeof s.code=="string"?s.code:"SKILL_WORKBENCH_ERROR",s.retryable===!0,e.statusText,s.originalError&&typeof s.originalError=="object"?s.originalError:void 0,n)}catch{const r=((i=e.headers.get("content-type"))==null?void 0:i.split(";",1)[0])||Mt("api.missingContentType");return new W6(Mt("api.gatewayError",{fallback:t,status:e.status,contentType:r}),e.status,"SKILL_WORKBENCH_ERROR",!1,e.statusText,void 0,n)}}async function Am(e,t){if(!e.ok)throw await aU(e,t);const n=e.headers.get("content-type")??"";if(!n.includes("application/json")){const i=n.split(";",1)[0]||Mt("api.missingContentType");throw new Error(Mt("api.nonJson",{fallback:t,status:e.status,contentType:i}))}return e.json()}function h1t(e){return Array.isArray(e)?e.map(t=>{const n=eu(t,Mt("api.activity")),i=n.kind,r=n.status;if(typeof n.id!="string"||!["status","thinking","message","tool"].includes(String(i))||!["running","done"].includes(String(r)))throw new Error(Mt("api.invalidActivity"));if(i==="tool"){if(typeof n.name!="string")throw new Error(Mt("api.invalidToolActivity"));return{id:n.id,kind:i,status:r,name:n.name,...n.input!==void 0?{args:n.input}:{},...n.output!==void 0?{response:n.output}:{}}}if(typeof n.text!="string")throw new Error(Mt("api.invalidTextActivity"));return{id:n.id,kind:i,status:r,text:n.text}}):[]}function p1t(e){if(e==null)return;const t=eu(e,Mt("api.publication"));if(typeof t.revision!="number"||typeof t.skillId!="string"||typeof t.version!="string"||!Array.isArray(t.skillSpaceIds)||!t.skillSpaceIds.every(n=>typeof n=="string")||t.disposition!=="create-new"&&t.disposition!=="update-source"||!Gj(t.region)||typeof t.projectName!="string")throw new Error(Mt("api.invalidFormat",{label:Mt("api.publication")}));return{revision:t.revision,skillId:t.skillId,version:t.version,skillSpaceIds:t.skillSpaceIds,disposition:t.disposition,region:t.region,projectName:t.projectName}}function VS(e){const t=eu(e,Mt("api.task"));if(typeof t.jobId!="string"||t.operation!=="create"&&t.operation!=="optimize"||typeof t.intent!="string"||typeof t.revision!="number"||typeof t.state!="string")throw new Error(Mt("api.invalidFormat",{label:Mt("api.task")}));const n=Array.isArray(t.files)?t.files.flatMap(l=>{const c=eu(l,Mt("api.file"));return typeof c.path=="string"&&typeof c.size=="number"?[{path:c.path,size:c.size}]:[]}):[];if(!["running","ready","failed","cancelled","expired","published"].includes(t.state))throw new Error(Mt("api.unknownTaskState"));const r=IY(t.toolId,"Tool ID"),s=IY(t.sessionId,"Session ID"),a=f1t(t.recoveryStatus);return{jobId:t.jobId,operation:t.operation,intent:t.intent,...typeof t.model=="string"?{model:t.model}:{},...typeof t.style=="string"?{style:t.style}:{},...typeof t.requestedName=="string"?{requestedName:t.requestedName}:{},revision:t.revision,...r?{toolId:r}:{},...s?{sessionId:s}:{},...typeof t.sessionTtlSeconds=="number"?{sessionTtlSeconds:t.sessionTtlSeconds}:{},...typeof t.expiresAt=="string"?{expiresAt:t.expiresAt}:{},...typeof t.recoveryAvailable=="boolean"?{recoveryAvailable:t.recoveryAvailable}:{},...a?{recoveryStatus:a}:{},...typeof t.recoveredFromSnapshot=="boolean"?{recoveredFromSnapshot:t.recoveredFromSnapshot}:{},state:t.state,stage:typeof t.stage=="string"?t.stage:"generating",activities:h1t(t.activities),files:n,...t.source&&typeof t.source=="object"?{source:t.source}:{},...typeof t.name=="string"?{name:t.name}:{},...typeof t.description=="string"?{description:t.description}:{},...typeof t.skillMd=="string"?{skillMd:t.skillMd}:{},...typeof t.error=="string"?{error:t.error}:{},...t.validation&&typeof t.validation=="object"?{validation:t.validation}:{},...t.publication?{publication:p1t(t.publication)}:{}}}async function ZR(e){const t=eu(await Am(await Wd("/capabilities",{signal:e}),Mt("api.loadCapability")),Mt("api.capability"));return{enabled:t.enabled===!0,reason:typeof t.reason=="string"?t.reason:"",operations:Array.isArray(t.operations)?t.operations.filter(n=>n==="create"||n==="optimize"):[],models:Array.isArray(t.models)?t.models.flatMap(n=>{if(!n||typeof n!="object")return[];const i=n;return typeof i.id=="string"&&typeof i.label=="string"?[{id:i.id,label:i.label}]:[]}):[],styles:t.styles&&typeof t.styles=="object"&&!Array.isArray(t.styles)?Object.fromEntries(Object.entries(t.styles).filter(n=>typeof n[1]=="string")):{},...typeof t.maxUploadBytes=="number"?{maxUploadBytes:t.maxUploadBytes}:{}}}async function m1t(e){if(e.file){const n=new URLSearchParams({operation:"optimize",intent:e.intent});e.jobId&&n.set("job_id",e.jobId),e.model&&n.set("model",e.model),e.style&&n.set("style",e.style),e.name&&n.set("name",e.name);const i=await Wd(`/tasks/from-upload?${n}`,{method:"POST",body:e.file,headers:{"Content-Type":"application/zip"},signal:e.signal},cs);return VS(await Am(i,Mt("api.startOptimization")))}const t=await Wd("/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operation:e.operation,intent:e.intent,...e.model?{model:e.model}:{},...e.style?{style:e.style}:{},...e.name?{name:e.name}:{},...e.jobId?{jobId:e.jobId}:{},...e.source?{source:{kind:"skill-center",skillId:e.source.skillId,skillName:e.source.name,version:e.source.version,region:e.source.region,projectName:e.source.projectName,skillSpaceId:e.source.skillSpaceId,skillSpaceName:e.source.skillSpaceName}}:{}}),signal:e.signal},cs);return VS(await Am(t,Mt("api.startTask")))}async function g1t(e,t){return VS(await Am(await Wd(`/tasks/${encodeURIComponent(e)}`,{signal:t}),Mt("api.loadTask")))}async function $M(e,t,n){const i=new URLSearchParams;i.set("expected_revision",String(t));const r=eu(await Am(await Wd(`/tasks/${encodeURIComponent(e)}/artifact?${i.toString()}`,{signal:n}),Mt("api.loadArtifact")),Mt("api.artifact"));if(r.jobId!==e||r.revision!==t||!Number.isSafeInteger(r.revision)||r.revision<1||typeof r.sha256!="string"||!/^[0-9a-f]{64}$/.test(r.sha256)||typeof r.name!="string"||typeof r.description!="string"||!Array.isArray(r.files))throw new Error(Mt("api.invalidFormat",{label:Mt("api.artifact")}));const s=r.files.map(a=>{const l=eu(a,Mt("api.artifactFile"));if(typeof l.path!="string"||typeof l.size!="number"||typeof l.content!="string")throw new Error(Mt("api.invalidFormat",{label:Mt("api.artifactFile")}));return{path:l.path,size:l.size,content:l.content}});return{jobId:r.jobId,revision:r.revision,sha256:r.sha256,name:r.name,description:r.description,files:s}}async function FM(e){const t=await Wd(`/tasks/${encodeURIComponent(e.jobId)}/refinements`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({intent:e.intent,expectedRevision:e.expectedRevision})},cs);return VS(await Am(t,Mt("api.refine")))}async function b1t(e){const t=await Wd(`/tasks/${encodeURIComponent(e.jobId)}/stop`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expectedRevision:e.expectedRevision})});return VS(await Am(t,Mt("api.stop")))}async function y1t(e){const t=await Wd(`/tasks/${encodeURIComponent(e.jobId)}/publish-stream`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/x-ndjson"},body:JSON.stringify({disposition:e.disposition,expectedRevision:e.expectedRevision,expectedArtifactSha256:e.expectedArtifactSha256,skillSpaceIds:e.skillSpaceIds??[],projectName:e.projectName,region:e.region}),signal:e.signal},0);if(!t.ok)throw await aU(t,Mt("api.publish"));if(!(t.headers.get("content-type")??"").includes("application/x-ndjson"))throw new Error(Mt("api.nonNdjson"));if(!t.body)throw new Error(Mt("api.missingStream"));const i=new Set(["preparing","uploading","registering","activating","publishing"]);let r=null,s="";const a=new TextDecoder,l=t.body.getReader(),c=u=>{var h;if(!u.trim())return;const d=eu(JSON.parse(u),Mt("api.publishProgress"));if(d.type==="progress"){if(typeof d.phase!="string"||!i.has(d.phase)||typeof d.message!="string")throw new Error(Mt("api.invalidPublishProgress"));(h=e.onProgress)==null||h.call(e,{phase:d.phase,message:d.message});return}if(d.type==="error"){const p=eu(d.error,Mt("api.publishError"));throw new W6(typeof p.message=="string"?p.message:Mt("api.publish"),500,typeof p.code=="string"?p.code:"SKILL_PUBLISH_FAILED",p.retryable===!0,"",p.originalError&&typeof p.originalError=="object"?p.originalError:void 0,JSON.stringify(d.error))}if(d.type!=="complete")throw new Error(Mt("api.unknownPublishEvent"));const f=eu(d.result,Mt("api.publishResult"));if(typeof f.skillId!="string"||typeof f.version!="string"||!Array.isArray(f.skillSpaceIds)||!f.skillSpaceIds.every(p=>typeof p=="string")||f.disposition!=="create-new"&&f.disposition!=="update-source"||!Gj(f.region)||typeof f.projectName!="string")throw new Error(Mt("api.invalidFormat",{label:Mt("api.publishResult")}));r={skillId:f.skillId,version:f.version,skillSpaceIds:f.skillSpaceIds,disposition:f.disposition,region:f.region,projectName:f.projectName}};for(;;){const{value:u,done:d}=await l.read();s+=a.decode(u,{stream:!d});const f=s.split(` -`);if(s=f.pop()??"",f.forEach(c),d)break}if(c(s),!r)throw new Error(Mt("api.streamEnded"));return r}async function v1t(e){await Am(await Wd(`/tasks/${encodeURIComponent(e)}`,{method:"DELETE"}),Mt("api.deleteTask"))}async function x1t(e,t,n){var c;const i=new URLSearchParams;i.set("expected_revision",String(t)),i.set("expected_sha256",n);const r=await Wd(`/tasks/${encodeURIComponent(e)}/download?${i.toString()}`,{},cs);if(!r.ok)throw await aU(r,Mt("api.download"));const a=((c=(r.headers.get("content-disposition")??"").match(/filename="([^"]+)"/))==null?void 0:c[1])??"skill.zip",l=URL.createObjectURL(await r.blob());try{const u=document.createElement("a");u.href=l,u.download=a,u.click()}finally{URL.revokeObjectURL(l)}}const O1t={formatDate(e){const t=e.value??e.date??e.timestamp;if(t==null)return"";const n=new Date(t);return isNaN(n.getTime())?String(t):n.toLocaleString()}};function w1t(e,t){if(!t||t==="/")return e;const n=t.replace(/^\//,"").split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));let i=e;for(const r of n){if(i==null||typeof i!="object")return;i=i[r]}return i}function S1t(e){return typeof e=="object"&&e!==null&&typeof e.path=="string"}function k1t(e){return typeof e=="object"&&e!==null&&typeof e.call=="string"}function oU(e,t){if(S1t(e))return w1t(t,e.path);if(k1t(e)){const n=O1t[e.call],i={};for(const[r,s]of Object.entries(e.args??{}))i[r]=oU(s,t);return n?n(i):`[unknown fn: ${e.call}]`}return e}function E1t(e,t){const n=oU(e,t);return n==null?"":typeof n=="string"?n:String(n)}const LEe=new Map;function r0(e,t){LEe.set(e,t)}function C1t(e){return LEe.get(e)}function T1t(e,t,n){const i=t.replace(/^\//,"").split("/").map(s=>s.replace(/~1/g,"/").replace(/~0/g,"~"));let r=e;for(let s=0;soU(i,e.dataModel),resolveString:i=>E1t(i,e.dataModel),dispatchAction:t,render:i=>{if(!i)return null;const r=e.components[i];if(!r)return null;const s=C1t(r.component)??A1t;return o.jsx(s,{node:r,ctx:n},i)}};return o.jsx("div",{className:"a2ui-surface","data-a2ui-surface":e.surfaceId,children:n.render(e.rootId)})}function FEe(e){const t=m.useRef(null),n=m.useRef(!0),i=28,r=m.useCallback(()=>{const s=t.current;s&&(n.current=s.scrollHeight-s.scrollTop-s.clientHeight{const s=t.current;s&&n.current&&(s.scrollTop=s.scrollHeight)},[e]),{ref:t,onScroll:r}}function JR({value:e,skillPrefix:t="/",onRemoveSkill:n,onRemoveAgent:i}){const{t:r}=Oe("conversation");return e.skills.length===0&&!e.targetAgent?null:o.jsxs("div",{className:"invocation-chips","aria-label":r("invocation.ariaLabel"),children:[e.skills.map(s=>o.jsxs("span",{className:"invocation-chip invocation-chip--skill",title:s.description,children:[o.jsx(mS,{"aria-hidden":!0}),o.jsxs("span",{children:[t,s.name]}),n?o.jsx("button",{type:"button",onClick:()=>n(s.name),"aria-label":r("invocation.removeSkill",{name:s.name}),children:o.jsx(Ia,{})}):null]},s.name)),e.targetAgent?o.jsxs("span",{className:"invocation-chip invocation-chip--agent",title:e.targetAgent.description,children:[o.jsx(vbe,{"aria-hidden":!0}),o.jsx("span",{children:e.targetAgent.name}),i?o.jsx("button",{type:"button",onClick:i,"aria-label":r("invocation.removeAgent",{name:e.targetAgent.name}),children:o.jsx(Ia,{})}):null]}):null]})}function lU(e=""){return e.startsWith("image/")?"image":e.startsWith("video/")?"video":e==="application/pdf"?"pdf":e==="text/markdown"?"markdown":"text"}function BEe(e){var n,i,r,s;const t=lU(e.mimeType);return t==="pdf"?"PDF":t==="markdown"?"MD":t==="video"?((i=(n=e.mimeType)==null?void 0:n.split("/")[1])==null?void 0:i.toUpperCase())??"VIDEO":t==="image"?((s=(r=e.mimeType)==null?void 0:r.split("/")[1])==null?void 0:s.toUpperCase())??"IMAGE":"TXT"}function UEe(e){return e?e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`:""}function QEe(e,t){return e.previewUrl?e.previewUrl:e.data?`data:${e.mimeType??"application/octet-stream"};base64,${e.data}`:e.uri?Gbe(t,e.uri):""}function N1t({kind:e}){return e==="image"?o.jsx(jF,{}):e==="video"?o.jsx(wbe,{}):e==="pdf"?o.jsx(r7e,{}):o.jsx(_F,{})}function eI({appName:e,items:t,compact:n=!1,onRemove:i}){const{t:r}=Oe("conversation"),[s,a]=m.useState(null);return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:`media-grid${n?" media-grid--compact":""}`,children:t.map(l=>{const c=lU(l.mimeType),u=QEe(l,e),d=l.status==="uploading"||l.status==="error"||!u,f=o.jsxs("button",{type:"button",className:"media-card-main",disabled:d,onClick:c==="image"?void 0:()=>a(l),"aria-label":r("media.preview",{name:l.name??r("media.attachment")}),children:[c==="image"&&u?o.jsx("img",{className:"media-card-image",src:u,alt:l.name??r("media.image"),loading:"lazy"}):c==="video"&&u?o.jsxs("div",{className:"media-card-video-container",children:[o.jsx("video",{className:"media-card-video",src:u,muted:!0,playsInline:!0,preload:"metadata","aria-hidden":"true"}),o.jsx("span",{className:"media-card-video-play",children:o.jsx(g7e,{})})]}):o.jsx("span",{className:"media-card-icon",children:o.jsx(N1t,{kind:c})}),o.jsxs("span",{className:"media-card-copy",children:[o.jsx("span",{className:"media-card-name",children:l.name??r("media.attachment")}),o.jsxs("span",{className:"media-card-meta",children:[o.jsx("span",{className:"media-card-type",children:BEe(l)}),l.status==="uploading"?o.jsxs(o.Fragment,{children:[o.jsx(mi,{className:"media-card-spinner"})," ",r("media.uploading")]}):l.status==="error"?l.error??r("media.uploadFailed"):UEe(l.sizeBytes)]})]}),!n&&l.status!=="uploading"&&l.status!=="error"?o.jsx(Ky,{className:"media-card-open"}):null]});return o.jsxs(pr.div,{className:`media-card media-card--${c}${l.status==="error"?" media-card--error":""}`,layout:!0,initial:{opacity:0,scale:.985,y:4},animate:{opacity:1,scale:1,y:0},children:[c==="image"&&!d?o.jsx(dbe,{src:u,children:f}):f,i?o.jsx("button",{type:"button",className:"media-card-remove","aria-label":r("media.remove",{name:l.name??r("media.attachment")}),onClick:()=>i(l.id),children:o.jsx(Ia,{})}):null]},l.id)})}),o.jsx(Iu,{children:s?o.jsx(j1t,{appName:e,item:s,onClose:()=>a(null)}):null})]})}function j1t({appName:e,item:t,onClose:n}){const{t:i}=Oe("conversation"),r=m.useMemo(()=>QEe(t,e),[e,t]),s=lU(t.mimeType),[a,l]=m.useState(""),[c,u]=m.useState(s==="text"||s==="markdown"),[d,f]=m.useState("");return m.useEffect(()=>{const h=p=>{p.key==="Escape"&&n()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[n]),m.useEffect(()=>{if(s!=="text"&&s!=="markdown")return;const h=new AbortController;return u(!0),f(""),fetch(r,{signal:h.signal}).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.text()}).then(l).catch(p=>{h.signal.aborted||f(p instanceof Error?p.message:String(p))}).finally(()=>{h.signal.aborted||u(!1)}),()=>h.abort()},[s,r]),o.jsx(pr.div,{className:"media-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":i("media.previewDialog",{name:t.name??i("media.attachment")}),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onMouseDown:h=>{h.target===h.currentTarget&&n()},children:o.jsxs(pr.div,{className:"media-viewer",initial:{opacity:0,y:18,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.99},transition:{type:"spring",stiffness:420,damping:30},children:[o.jsxs("header",{className:"media-viewer-header",children:[o.jsxs("div",{children:[o.jsx("strong",{children:t.name??i("media.attachment")}),o.jsxs("span",{children:[BEe(t),t.sizeBytes?` · ${UEe(t.sizeBytes)}`:""]})]}),o.jsxs("nav",{children:[o.jsx("a",{href:r,download:t.name,"aria-label":i("media.download"),children:o.jsx(Hj,{})}),o.jsx("button",{type:"button",onClick:n,"aria-label":i("media.close"),children:o.jsx(Ia,{})})]})]}),o.jsxs("div",{className:`media-viewer-body media-viewer-body--${s}`,children:[s==="image"?o.jsx("img",{src:r,alt:t.name??i("media.image")}):null,s==="video"?o.jsx("div",{className:"media-viewer-video-wrapper",children:o.jsx("video",{src:r,controls:!0,autoPlay:!0,playsInline:!0,preload:"auto",className:"media-viewer-video"})}):null,s==="pdf"?o.jsx("iframe",{src:r,title:t.name??"PDF"}):null,c?o.jsxs("div",{className:"media-viewer-loading",children:[o.jsx(mi,{})," ",i("media.reading")]}):null,!c&&d?o.jsx("div",{className:"media-viewer-loading",children:i("media.loadFailed",{error:d})}):null,!c&&s==="markdown"?o.jsx("div",{className:"media-document",children:o.jsx(Uu,{text:a})}):null,!c&&s==="text"?o.jsx("pre",{className:"media-document media-document--plain",children:a}):null]})]})})}function PY(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"10.25",cy:"10.25",r:"6.25"}),o.jsx("path",{d:"M4.15 10.25h12.2M10.25 4c1.65 1.72 2.5 3.8 2.5 6.25s-.85 4.53-2.5 6.25M10.25 4c-1.65 1.72-2.5 3.8-2.5 6.25s.85 4.53 2.5 6.25M14.8 14.8 20 20"})]})}function R1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"3.25",y:"5.25",width:"15.5",height:"13.5",rx:"2.25"}),o.jsx("circle",{cx:"8.1",cy:"9.3",r:"1.35"}),o.jsx("path",{d:"m4.7 16.5 3.65-3.7 2.45 2.25 2.2-2.2 4.35 4.1"}),o.jsx("path",{d:"m19.4 2.75.48 1.37 1.37.48-1.37.48-.48 1.37-.48-1.37-1.37-.48 1.37-.48.48-1.37Z",fill:"currentColor",stroke:"none"})]})}function cU(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{className:"video-generate-icon__body",d:"M3.25 9h17.5v7.35a2.4 2.4 0 0 1-2.4 2.4H5.65a2.4 2.4 0 0 1-2.4-2.4V9Z"}),o.jsxs("g",{className:"video-generate-icon__clapper",children:[o.jsx("path",{d:"M3.25 9V7.65a2.4 2.4 0 0 1 2.4-2.4h12.7a2.4 2.4 0 0 1 2.4 2.4V9H3.25Z"}),o.jsx("path",{d:"M6.75 5.25 9.3 9M12 5.25 14.55 9M17.25 5.25 19.8 9"})]}),o.jsx("path",{d:"m10.25 11.45 4 2.55-4 2.55v-5.1Z"})]})}function I1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M4.25 5.25h15.5v10.5H4.25zM8.25 19.75h7.5M12 15.75v4"}),o.jsx("path",{d:"m7.25 12.75 2.35-2.4 2.15 1.65 3.4-3.6 1.6 1.55"}),o.jsx("circle",{cx:"7.25",cy:"8.4",r:".7",fill:"currentColor",stroke:"none"})]})}function P1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M5 7.4c0-1.55 3.13-2.8 7-2.8s7 1.25 7 2.8-3.13 2.8-7 2.8-7-1.25-7-2.8Z"}),o.jsx("path",{d:"M5 7.4v4.55c0 1.55 3.13 2.8 7 2.8s7-1.25 7-2.8V7.4M5 11.95v4.55c0 1.55 3.13 2.8 7 2.8s7-1.25 7-2.8v-4.55"}),o.jsx("path",{d:"M8.2 12.25h.01M8.2 16.8h.01"})]})}function D1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M4.25 4.25h4.5v15.5h-4.5zM8.75 5.75h5v14h-5zM13.75 4.25h4.1v10.25h-4.1z"}),o.jsx("path",{d:"M5.75 7h1.5M10.25 8.25h2M10.25 11h2M15.15 7h1.3"}),o.jsx("circle",{cx:"17.45",cy:"17.35",r:"2.45"}),o.jsx("path",{d:"m19.25 19.15 1.55 1.55"})]})}function M1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M4.25 6.25h6.25c1 0 1.5.55 1.5 1.45v11.05c0-.9-.5-1.45-1.5-1.45H4.25V6.25Z"}),o.jsx("path",{d:"M19.75 9.1v8.2H13.5c-1 0-1.5.55-1.5 1.45V7.7c0-.9.5-1.45 1.5-1.45h2.15"}),o.jsx("path",{d:"m19 3.2.58 1.62 1.62.58-1.62.58L19 7.6l-.58-1.62-1.62-.58 1.62-.58L19 3.2Z",fill:"currentColor",stroke:"none"})]})}function L1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"m4.2 8.4 1.15 10.2h13.3L19.8 8.4"}),o.jsx("path",{d:"M4.2 8.4h15.6L17.9 5H6.1L4.2 8.4Z"}),o.jsx("path",{d:"M7.2 12.2c1.1-1 2.25 1.25 3.4.25 1.05-.9 2.15 1.3 3.3.25"}),o.jsx("path",{d:"m8.2 15.1 1.45 1.35 1.45-1.35M13.55 16.45h2.35"})]})}function $1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"6",cy:"6.25",r:"2.25"}),o.jsx("circle",{cx:"18",cy:"6.25",r:"2.25"}),o.jsx("circle",{cx:"12",cy:"17.75",r:"2.25"}),o.jsx("path",{d:"m7.7 7.75 2.7 7.55M16.3 7.75l-2.7 7.55M8.25 6.25h7.5"})]})}function DY(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"9",cy:"8",r:"3"}),o.jsx("path",{d:"M3.75 18.75c.45-3.05 2.2-4.65 5.25-4.65s4.8 1.6 5.25 4.65"}),o.jsx("path",{d:"M17.75 4.25v5.5M15 7h5.5M16 13.25h4.25M18.125 11.125v4.25"})]})}function F1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"4",y:"4.25",width:"16",height:"5",rx:"1.5"}),o.jsx("rect",{x:"4",y:"14.75",width:"16",height:"5",rx:"1.5"}),o.jsx("path",{d:"M7.25 6.75h.01M7.25 17.25h.01M10 6.75h6.5M10 17.25h6.5"})]})}function B1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M6 3.75h8l4 4v12.5H6V3.75Z"}),o.jsx("path",{d:"M14 3.75v4h4M8.75 11h6.5M8.75 14.25h6.5M8.75 17.5h4"})]})}function MY(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"3.75",y:"4.5",width:"16.5",height:"15",rx:"2.5"}),o.jsx("path",{d:"m7.5 9 2.75 2.5L7.5 14M12.5 14h4"}),o.jsx("path",{d:"M3.75 7.5h16.5",opacity:".62"})]})}function uU(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"m6 3.25 4.5 4.75L6 12.75"})})}function U1t({definition:e,label:t,done:n,open:i,onToggle:r}){const{t:s}=Oe("conversation"),a=e.icon,l=n?e.doneLabel:e.runningLabel,c=t??s(`blocks.tools.${e.name}.${n?"done":"running"}`,{defaultValue:l});return o.jsxs("button",{type:"button",className:`builtin-tool-head${n?" is-done":" is-running"}`,"data-tool-tone":e.tone,onClick:r,"aria-expanded":i,children:[o.jsx("span",{className:"builtin-tool-icon","aria-hidden":"true",children:o.jsx(a,{})}),n?o.jsx("span",{className:"builtin-tool-label",children:c}):o.jsx(Tn,{className:"builtin-tool-label",duration:2.4,spread:18,"aria-live":"polite",children:c}),o.jsx(uU,{className:`builtin-tool-chevron${i?" is-open":""}`})]})}function oc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function On(e){return typeof e=="string"?e:""}function LY(e){return typeof e=="number"&&Number.isFinite(e)?e:0}function Vc(e){return Array.isArray(e)?e:[]}function K6(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return{}}const n=oc(t)??{};return oc(n.result)??n}function tI(e){if(typeof e=="string")try{return tI(JSON.parse(e))}catch{return e}const t=oc(e);if(!t)return"";const n=oc(t.result);return On(t.error)||On(t.message)||On(n==null?void 0:n.error)||On(n==null?void 0:n.message)}function Q1t(e){if(e.kind==="tool")return"tool";if(e.kind==="knowledge_base")return"knowledge_base";const t=oc(e.metadata),n=On(t==null?void 0:t.source_type).toLowerCase(),i=On(e.source).toLowerCase();return n==="skillhub"||i.startsWith("skill_hub:")?"skill_hub":"skill_space"}const zEe={tool:"Tools",knowledge:"AgentKit Knowledge Base",skillCenter:"AgentKit Skill Center",unknownSource:"Unknown source",unnamedResource:"Unnamed resource",unnamedAgent:"Unnamed agent"};function z1t(e,t){return e==="veadk_builtin_tools"?t.tool:e==="agentkit_knowledge"?t.knowledge:e.startsWith("skill_hub:")?`Skill Hub ${e.slice(10)}`:e.startsWith("skill_space:")?`${t.skillCenter} ${e.slice(12)}`:e||t.unknownSource}function V1t(e){return e==="veadk_builtin_tools"?"tool":e==="agentkit_knowledge"?"knowledge_base":e.startsWith("skill_hub:")?"skill_hub":"skill_space"}function H1t(e,t=zEe){const n=K6(e),i=oc(n.capabilities)??{},r=Vc(n.resources).flatMap(a=>{const l=oc(a);if(!l)return[];const c=l.kind==="tool"?"tool":l.kind==="knowledge_base"?"knowledge_base":"skill";return[{ref:On(l.ref),kind:c,category:Q1t(l),name:On(l.name)||On(l.ref)||t.unnamedResource,description:On(l.description),source:On(l.source),version:On(l.version)}]}),s=Vc(n.sources).flatMap(a=>{const l=oc(a);if(!l)return[];const c=On(l.source),u=On(l.status),d=u==="error"?"error":u==="skipped"?"skipped":"ok";return[{source:c,category:V1t(c),label:z1t(c,t),status:d,count:LY(l.count),message:On(l.message),searchKeywords:Vc(l.search_keywords).map(On).filter(Boolean)}]});return{collectionId:On(n.collection_id),capabilities:{googleAdkVersion:On(i.google_adk_version),agentTypes:Vc(i.agent_types).map(On).filter(Boolean),maxOrchestrationDepth:LY(i.max_orchestration_depth)},resources:r,sources:s,counts:{all:r.length,skill_hub:r.filter(a=>a.category==="skill_hub").length,skill_space:r.filter(a=>a.category==="skill_space").length,knowledge_base:r.filter(a=>a.category==="knowledge_base").length,tool:r.filter(a=>a.category==="tool").length}}}function q1t(e,t){return{resources:e.resources.filter(n=>n.category===t),sources:e.sources.filter(n=>n.category===t)}}function VEe(e,t,n=zEe){const i=K6(e),r=K6(t),s=new Map(Vc(r.results).flatMap(d=>{const f=oc(d),h=On(f==null?void 0:f.name);return f&&h?[[h,f]]:[]})),a=Vc(i.agents).flatMap(d=>{const f=oc(d),h=On(f==null?void 0:f.name);return f&&h?[f]:[]}),l=new Set(a.map(d=>On(d.name))),c=[...s.entries()].filter(([d])=>!l.has(d)).map(([d])=>({name:d})),u=[...a,...c].map(d=>{const f=On(d.name),h=Vc(d.nodes).flatMap(E=>{const C=oc(E);return C?[C]:[]}),p=On(d.root_node),g=h.find(E=>On(E.id)===p),b=h.filter(E=>On(E.id)!==p).map(E=>({id:On(E.id)||n.unnamedAgent,type:On(E.type)||"llm",description:On(E.description)})),v=s.get(f),y=On(v==null?void 0:v.status),x=y==="failed"?"failed":y==="completed"?"completed":"running",w=$Y(v==null?void 0:v.resources),O=w.length>0?w:$Y(h.flatMap(E=>Vc(E.resources))),k=FY(v==null?void 0:v.python_tools),S=k.length>0?k:FY(h.flatMap(E=>Vc(E.python_tools)));return{name:f,description:On(v==null?void 0:v.description)||On(g==null?void 0:g.description)||On(d.task),task:On(d.task),rootType:On(v==null?void 0:v.root_type)||On(g==null?void 0:g.type)||"llm",nodeCount:h.length,subAgentCount:b.length,resourceCount:O.length,pythonToolCount:S.length,skills:O.filter(E=>E.kind==="skill"),knowledgeBases:O.filter(E=>E.kind==="knowledge_base"),builtinTools:O.filter(E=>E.kind==="tool"),pythonTools:S,subAgents:b,status:x,output:On(v==null?void 0:v.output),error:On(v==null?void 0:v.error)}});return{collectionId:On(r.collection_id)||On(i.collection_id),agents:u,completedCount:u.filter(d=>d.status==="completed").length,failedCount:u.filter(d=>d.status==="failed").length,runningCount:u.filter(d=>d.status==="running").length}}function W1t(e,t){return!!tI(t)||VEe(e,t).failedCount>0}function $Y(e){const t=new Set;return Vc(e).flatMap(n=>{const i=oc(n),r=On(i?i.ref:n);if(!r||t.has(r))return[];t.add(r);const s=On(i==null?void 0:i.kind),a=s==="tool"||r.startsWith("veadk_tool:")?"tool":s==="knowledge_base"||r.startsWith("agentkit_kb:")?"knowledge_base":"skill",l=r.split(":");return[{ref:r,kind:a,name:On(i==null?void 0:i.name)||l[l.length-1]||r,description:On(i==null?void 0:i.description),version:On(i==null?void 0:i.version),source:On(i==null?void 0:i.source)}]})}function FY(e){const t=new Set;return Vc(e).flatMap(n=>{const i=oc(n),r=On(i==null?void 0:i.name),s=On(i==null?void 0:i.code),a=`${r}\0${s}`;return!i||!r||t.has(a)?[]:(t.add(a),[{name:r,description:On(i.description),code:s,entrypoint:On(i.entrypoint)||r,dependencies:Vc(i.dependencies).map(On).filter(Boolean)}])})}function K1t({branch:e}){return o.jsxs("div",{className:`branch-compare__body${e.status==="running"?" is-streaming":""}`,"aria-live":"polite",children:[e.content?o.jsx(Uu,{text:e.content,streaming:e.status==="running"}):null,e.status==="running"?o.jsx("span",{className:"branch-compare__caret","aria-hidden":"true"}):null,e.error?o.jsx("p",{className:"branch-compare__error",children:e.error}):null]})}function G1t({args:e,response:t,status:n,onBranchSelect:i}){const{t:r}=Oe("conversation"),s=m.useMemo(()=>uye(e,t,n),[e,t,n]),[a,l]=m.useState(0);return o.jsxs("section",{className:"branch-compare","aria-label":r("blocks.branchCompare.ariaLabel"),children:[o.jsx("div",{className:"branch-compare__tabs",role:"tablist","aria-label":r("blocks.branchCompare.selectDirection"),children:s.branches.map((c,u)=>o.jsx("button",{className:`branch-compare__tab${a===u?" is-active":""}`,type:"button",role:"tab","aria-selected":a===u,"aria-controls":`branch-compare-panel-${u}`,onClick:()=>l(u),children:o.jsx(ga,{color:"info",size:"sm",variant:"soft",children:c.label})},`${c.label}:${u}`))}),o.jsx("div",{className:"branch-compare__branches",children:s.branches.map((c,u)=>o.jsxs("article",{className:`branch-compare__branch${a===u?" is-active":""}`,id:`branch-compare-panel-${u}`,role:"tabpanel",children:[o.jsx("header",{className:"branch-compare__head",children:o.jsx(ga,{color:"info",size:"sm",variant:"soft",children:c.label})}),o.jsx(K1t,{branch:c}),o.jsx("footer",{className:"branch-compare__footer",children:o.jsx(Ft,{type:"button",color:"info",variant:"ghost",size:"sm",pill:!1,disabled:c.status!=="completed",onClick:()=>i==null?void 0:i(c),children:r("blocks.branchCompare.continue")})})]},`${c.label}:${u}`))})]})}function HEe({controlled:e,default:t,name:n,state:i="value"}){const{current:r}=m.useRef(e!==void 0),[s,a]=m.useState(t),l=r?e:s,c=m.useCallback(u=>{r||a(u)},[]);return[l,c]}const dU={...$b},BY={};function Tb(e,t){const n=m.useRef(BY);return n.current===BY&&(n.current=e(t)),n}const BM=dU.useInsertionEffect,X1t=BM&&BM!==dU.useLayoutEffect?BM:e=>e();function Ka(e){const t=Tb(Y1t).current;return t.next=e,X1t(t.effect),t.trampoline}function Y1t(){const e={next:void 0,callback:Z1t,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Z1t(){}const J1t=()=>{},gl=typeof document<"u"?m.useLayoutEffect:J1t,qEe=m.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function eOt(){return m.useContext(qEe)}function tOt(e){const{children:t,elementsRef:n,labelsRef:i,onMapChange:r}=e,s=Ka(r),[,a]=m.useState(!1),l=Tb(iOt).current,c=Tb(nOt).current,u=m.useRef(0),d=m.useRef(!0),f=m.useRef([]),h=m.useRef(null),p=Ka(()=>{d.current||(d.current=!0,a(k=>!k))}),g=Ka((k,S)=>{c.set(k,S),p()}),b=Ka(k=>{c.delete(k),p()}),v=Ka(k=>{const S=new Map;return n.current.length=0,i&&(i.current.length=0),k.forEach(E=>{var C,N;S.set(E.element,{...E.registration.metadata??{},index:E.index}),n.current[E.index]=E.element,i&&(i.current[E.index]=E.registration.label!==void 0?E.registration.label:((N=(C=E.registration.textRef)==null?void 0:C.current)==null?void 0:N.textContent)??E.element.textContent)}),u.current=n.current.length,S});function y(k){var C;if((C=h.current)==null||C.disconnect(),h.current=null,typeof MutationObserver!="function"||k.length<2)return;const S=new MutationObserver(N=>{if(!aOt(N))return;let _=null;for(const j of k)if(j.isConnected){if(_&&WEe(_,j)>0){S.disconnect(),p();return}_=j}});h.current=S;const E=new Set;for(let N=1;NS.observe(N,{childList:!0}))}const x=Ka(()=>{const[k,S]=rOt(c),E=v(k);y(S),f.current=k,d.current=!1,l.forEach(C=>C(E)),s(E)});gl(()=>(d.current||v(f.current),()=>{n.current=[],i&&(i.current=[])}),[n,i,v]),gl(()=>{d.current&&x()}),gl(()=>()=>{var k;(k=h.current)==null||k.disconnect(),d.current=!0},[]);const w=Ka(k=>(l.add(k),()=>{l.delete(k)})),O=m.useMemo(()=>({register:g,unregister:b,subscribeMapChange:w,nextIndexRef:u}),[g,b,w,u]);return o.jsx(qEe.Provider,{value:O,children:t})}function nOt(){return new Map}function iOt(){return new Set}function rOt(e){const t=new Set,n=[],i=[];e.forEach((s,a)=>{if(!a.isConnected)return;const l=s.index,c={index:l??-1,element:a,registration:s};l===null?i.push(c):l>=0&&(t.add(l),n.push(c))});let r=0;return i.sort((s,a)=>WEe(s.element,a.element)),i.forEach(s=>{for(;t.has(r);)r+=1;s.index=r,n.push(s),r+=1}),t.size>0&&n.sort((s,a)=>s.index-a.index),[n,i.map(s=>s.element)]}function sOt(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function aOt(e){for(const t of e)for(let n=0;ns.searchParams.append("args[]",a)),`${t} error #${i}; visit ${s} for the full message.`}}const SE=oOt("https://base-ui.com/production-error","Base UI"),KEe=m.createContext(void 0);function GEe(){const e=m.useContext(KEe);if(e===void 0)throw new Error(SE(10));return e}function gN(e,t,n,i){const r=Tb(XEe).current;return cOt(r,e,t,n,i)&&YEe(r,[e,t,n,i]),r.callback}function lOt(e){const t=Tb(XEe).current;return uOt(t,e)&&YEe(t,e),t.callback}function XEe(){return{callback:null,cleanup:null,refs:[]}}function cOt(e,t,n,i,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==i||e.refs[3]!==r}function uOt(e,t){return e.refs.length!==t.length||e.refs.some((n,i)=>n!==t[i])}function YEe(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const i=Array(t.length).fill(null);for(let r=0;r{for(let r=0;r=e}function UY(e){if(!m.isValidElement(e))return null;const t=e,n=t.props;return(fOt(19)?n==null?void 0:n.ref:t.ref)??null}function G6(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const hOt=Object.freeze([]),jy=Object.freeze({});function pOt(e,t){const n={};for(const i in e){const r=e[i];if(t!=null&&t.hasOwnProperty(i)){const s=t[i](r);s!=null&&Object.assign(n,s);continue}r===!0?n[`data-${i.toLowerCase()}`]="":r&&(n[`data-${i.toLowerCase()}`]=r.toString())}return n}function mOt(e,t){return typeof e=="function"?e(t):e}function ZEe(e,t){return typeof e=="function"?e(t):e}const fU={};function hU(e,t,n,i,r){if(!n&&!i&&!e)return bN(t);let s=bN(e);return t&&(s=gA(s,t)),n&&(s=gA(s,n)),i&&(s=gA(s,i)),s}function gOt(e){if(e.length===0)return fU;if(e.length===1)return bN(e[0]);let t=bN(e[0]);for(let n=1;n=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function pU(e){return typeof e=="function"}function eCe(e,t){return pU(e)?e(t):e??fU}function vOt(e,t){return t?e?(...n)=>{const i=n[0];if(iCe(i)){const s=i;yN(s);const a=t(...n);return s.baseUIHandlerPrevented||e==null||e(...n),a}const r=t(...n);return e==null||e(...n),r}:tCe(t):e}function tCe(e){return e&&((...t)=>{const n=t[0];return iCe(n)&&yN(n),e(...t)})}function yN(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function nCe(e,t){return t?e?t+" "+e:t:e}function iCe(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function kE(e,t,n={}){const i=t.render,r=xOt(t,n);if(n.enabled===!1)return null;const s=n.state??jy;return SOt(e,i,r,s)}function xOt(e,t={}){const{className:n,style:i,render:r}=e,{state:s=jy,ref:a,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?mOt(n,s):void 0,f=u?ZEe(i,s):void 0,h=u?pOt(s,c):jy,p=u&&l?OOt(l):void 0,g=u?G6(h,p)??{}:jy;return typeof document<"u"&&(u?Array.isArray(a)?g.ref=lOt([g.ref,UY(r),...a]):g.ref=gN(g.ref,UY(r),a):gN(null,null)),u?(d!==void 0&&(g.className=nCe(g.className,d)),f!==void 0&&(g.style=G6(g.style,f)),g):jy}function OOt(e){return Array.isArray(e)?gOt(e):hU(void 0,e)}const wOt=Symbol.for("react.lazy");function SOt(e,t,n,i){if(t){if(typeof t=="function")return t(n,i);const r=hU(n,t.props);r.ref=n.ref;let s=t;return(s==null?void 0:s.$$typeof)===wOt&&(s=m.Children.toArray(t)[0]),m.cloneElement(s,r)}if(e&&typeof e=="string")return kOt(e,n);throw new Error(SE(8))}function kOt(e,t){return e==="button"?m.createElement("button",{type:"button",...t,key:t.key}):e==="img"?m.createElement("img",{alt:"",...t,key:t.key}):m.createElement(e,t)}const EOt={value:()=>null},rCe=m.forwardRef(function(t,n){const{render:i,className:r,disabled:s=!1,hiddenUntilFound:a,keepMounted:l,loopFocus:c,onValueChange:u,multiple:d=!1,orientation:f="vertical",value:h,defaultValue:p,style:g,...b}=t,v=m.useMemo(()=>{if(h===void 0)return p??[]},[h,p]),y=m.useRef([]),[x,w]=HEe({controlled:h,default:v,name:"Accordion",state:"value"}),O=Ka((C,N,_)=>{if(d)if(N){const j=x.slice();if(j.push(C),u==null||u(j,_),_.isCanceled)return;w(j)}else{const j=x.filter(T=>T!==C);if(u==null||u(j,_),_.isCanceled)return;w(j)}else{const j=x[0]===C?[]:[C];if(u==null||u(j,_),_.isCanceled)return;w(j)}}),k=m.useMemo(()=>({value:x,disabled:s,orientation:f}),[x,s,f]),S=m.useMemo(()=>({disabled:s,handleValueChange:O,hiddenUntilFound:a??!1,keepMounted:l??!1,state:k,value:x}),[s,O,a,l,k,x]),E=kE("div",t,{state:k,ref:n,props:b,stateAttributesMapping:EOt});return o.jsx(KEe.Provider,{value:S,children:o.jsx(tOt,{elementsRef:y,children:E})})});let QY=0;function COt(e,t="mui"){const[n,i]=m.useState(e),r=e||n;return m.useEffect(()=>{n==null&&(QY+=1,i(`${t}-${QY}`))},[n,t]),r}const zY=dU.useId;function TOt(e,t){if(zY!==void 0){const n=zY();return`${t}-${n}`}return COt(e,t)}function X6(e){return TOt(e,"base-ui")}const AOt="none",_Ot="trigger-press";function sCe(e,t,n,i){let r=!1,s=!1;const a=jy;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){s=!0},get isCanceled(){return r},get isPropagationAllowed(){return s},trigger:n,...a}}function NOt(e){m.useEffect(e,hOt)}const IT=null;let jOt=class{constructor(){Mi(this,"callbacks",[]);Mi(this,"callbacksCount",0);Mi(this,"nextId",1);Mi(this,"startId",1);Mi(this,"isScheduled",!1);Mi(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let s=0;s=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}},PT=new jOt;class Wl{constructor(){Mi(this,"currentId",IT);Mi(this,"cancel",()=>{this.currentId!==IT&&(PT.cancel(this.currentId),this.currentId=IT)});Mi(this,"disposeEffect",()=>this.cancel)}static create(){return new Wl}static request(t){return PT.request(t)}static cancel(t){return PT.cancel(t)}request(t){this.cancel(),this.currentId=PT.request(()=>{this.currentId=IT,t()})}}function ROt(){const e=Tb(Wl.create).current;return NOt(e.disposeEffect),e}function IOt(e,t=!1,n=!1){const[i,r]=m.useState(e&&t?"idle":void 0),[s,a]=m.useState(e);return e&&!s&&(a(!0),r("starting")),!e&&s&&i!=="ending"&&!n&&r("ending"),!e&&!s&&i==="ending"&&r(void 0),gl(()=>{if(!e&&s&&i!=="ending"&&n){const l=Wl.request(()=>{r("ending")});return()=>{Wl.cancel(l)}}},[e,s,i,n]),gl(()=>{if(!e||t)return;const l=Wl.request(()=>{r(void 0)});return()=>{Wl.cancel(l)}},[t,e]),gl(()=>{if(!e||!t)return;e&&s&&i!=="idle"&&r("starting");const l=Wl.request(()=>{r("idle")});return()=>{Wl.cancel(l)}},[t,e,s,i]),{mounted:s,setMounted:a,transitionStatus:i}}function POt(e){const{open:t,defaultOpen:n,onOpenChange:i,disabled:r}=e,[s,a]=HEe({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:l,setMounted:c,transitionStatus:u}=IOt(s,!0,!0),d=X6(),[f,h]=m.useState(),p=f===null?void 0:f??d,g=Ka(b=>{const v=!s,y=sCe(_Ot,b.nativeEvent);i(v,y),!y.isCanceled&&a(v)});return m.useMemo(()=>({defaultPanelId:d,disabled:r,handleTrigger:g,mounted:l,open:s,panelId:p,setMounted:c,setOpen:a,setPanelIdState:h,transitionStatus:u}),[d,r,g,l,s,p,c,a,h,u])}const aCe=m.createContext(void 0);function oCe(){const e=m.useContext(aCe);if(e===void 0)throw new Error(SE(15));return e}function DOt(e={}){const{guess:t,label:n,metadata:i,textRef:r,index:s}=e,{register:a,unregister:l,subscribeMapChange:c,nextIndexRef:u}=eOt(),d=m.useRef(-1),[f,h]=m.useState(s==null&&t?()=>{if(d.current===-1){const v=u.current;u.current+=1,d.current=v}return d.current}:-1),p=s??f,g=m.useRef(null),b=m.useCallback(v=>{const y=g.current;y&&l(y),g.current=v,v&&a(v,{metadata:i??null,index:s??null,label:n,textRef:r})},[s,a,l,i,n,r]);return gl(()=>{if(s==null)return c(v=>{var x;const y=g.current?(x=v.get(g.current))==null?void 0:x.index:null;y!=null&&h(y)})},[s,c]),{ref:b,index:p}}const lCe=m.createContext(void 0);function mU(){const e=m.useContext(lCe);if(e===void 0)throw new Error(SE(9));return e}let VY=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const MOt={"data-starting-style":""},LOt={"data-ending-style":""},$Ot={transitionStatus(e){return e==="starting"?MOt:e==="ending"?LOt:null}};let gU=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=VY.startingStyle]="startingStyle",e[e.endingStyle=VY.endingStyle]="endingStyle",e}({}),FOt=function(e){return e.panelOpen="data-panel-open",e}({});const BOt={[gU.open]:""},UOt={[gU.closed]:""},QOt={open(e){return e?{[FOt.panelOpen]:""}:null}},zOt={open(e){return e?BOt:UOt}};let VOt=function(e){return e.index="data-index",e.disabled="data-disabled",e.open="data-open",e}({});const bU={...zOt,index:e=>({[VOt.index]:String(e)}),...$Ot,value:()=>null},cCe=m.forwardRef(function(t,n){const{className:i,disabled:r=!1,onOpenChange:s,render:a,value:l,style:c,...u}=t,{ref:d,index:f}=DOt(),h=gN(n,d),{disabled:p,handleValueChange:g,state:b,value:v}=GEe(),y=X6(),x=l??y,w=r||p,O=v.indexOf(x)!==-1,k=Ka((P,$)=>{s==null||s(P,$),!$.isCanceled&&g(x,P,$)}),S=POt({open:O,onOpenChange:k,disabled:w}),E=m.useMemo(()=>({open:S.open,disabled:S.disabled,transitionStatus:S.transitionStatus}),[S.open,S.disabled,S.transitionStatus]),C=m.useMemo(()=>({...S,onOpenChange:k,state:E}),[S,E,k]),N=m.useMemo(()=>({...b,hidden:!O&&!S.mounted,index:f,disabled:w,open:O}),[S.mounted,w,f,O,b]),_=X6(),[j,T]=m.useState(),L=j===null?void 0:j??_,A=m.useMemo(()=>({defaultTriggerId:_,open:O,state:N,setTriggerId:T,triggerId:L}),[_,O,N,T,L]),R=kE("div",t,{state:N,ref:h,props:u,stateAttributesMapping:bU});return o.jsx(aCe.Provider,{value:C,children:o.jsx(lCe.Provider,{value:A,children:R})})}),uCe=m.forwardRef(function(t,n){const{render:i,className:r,style:s,...a}=t,{state:l}=mU();return kE("h3",t,{state:l,ref:n,props:a,stateAttributesMapping:bU})}),HOt=m.createContext(void 0);function qOt(e=!1){const t=m.useContext(HOt);if(t===void 0&&!e)throw new Error(SE(16));return t}function WOt(e){const{focusableWhenDisabled:t,disabled:n,composite:i=!1,tabIndex:r=0,isNativeButton:s}=e,a=i&&t!==!1,l=i&&t===!1;return{props:m.useMemo(()=>{const u={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return i||(u.tabIndex=r,!s&&n&&(u.tabIndex=t?r:-1)),(s&&(t||a)||!s&&n)&&(u["aria-disabled"]=n),s&&(!t||l)&&(u.disabled=n),u},[i,n,t,a,l,s,r])}}function UM(e,t,{detail:n=0}={}){e.dispatchEvent(new(go(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function KOt(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:i=0,native:r=!0,composite:s}=e,a=m.useRef(null),l=qOt(!0),c=s??l!==void 0,{props:u}=WOt({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:i,isNativeButton:r}),d=m.useCallback(()=>{const p=a.current;QM(p)&&c&&t&&u.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,u.disabled,c]);gl(d,[d]);const f=m.useCallback((p={})=>{const{onClick:g,onMouseDown:b,onKeyUp:v,onKeyDown:y,onPointerDown:x,...w}=p;return hU({onClick(O){if(t){O.preventDefault();return}g==null||g(O)},onMouseDown(O){t||b==null||b(O)},onKeyDown(O){if(t||(yN(O),y==null||y(O),O.baseUIHandlerPrevented))return;const k=O.target===O.currentTarget,S=O.currentTarget,E=QM(S),C=!r&&GOt(S),N=k&&(r?E:!C),_=O.key==="Enter",j=O.key===" ",T=S.getAttribute("role"),L=(T==null?void 0:T.startsWith("menuitem"))||T==="option"||T==="gridcell";if(k&&c&&j){if(O.defaultPrevented&&L)return;O.preventDefault(),(!r||E)&&(O.preventBaseUIHandler(),UM(S,O));return}if(!N||r||!j&&!_){k&&C&&j&&O.preventDefault();return}O.defaultPrevented||(O.preventDefault(),_&&(O.preventBaseUIHandler(),UM(S,O)))},onKeyUp(O){if(!t){if(yN(O),v==null||v(O),O.target===O.currentTarget&&r&&c&&QM(O.currentTarget)&&O.key===" "){O.preventDefault();return}O.baseUIHandlerPrevented||O.target===O.currentTarget&&!r&&!c&&!O.defaultPrevented&&O.key===" "&&(O.preventBaseUIHandler(),UM(O.currentTarget,O))}},onPointerDown(O){if(t){O.preventDefault();return}x==null||x(O)}},r?{type:"button"}:{role:"button"},u,w)},[t,u,c,r]),h=Ka(p=>{a.current=p,d()});return{getButtonProps:f,buttonRef:h}}function QM(e){return Jd(e)&&e.tagName==="BUTTON"}function GOt(e){return Jd(e)&&e.tagName==="A"&&!!e.href}const dCe=m.forwardRef(function(t,n){const{disabled:i,className:r,id:s,render:a,nativeButton:l=!0,style:c,...u}=t,{panelId:d,open:f,handleTrigger:h,disabled:p}=oCe(),g=i||p,{getButtonProps:b,buttonRef:v}=KOt({disabled:g,focusableWhenDisabled:!0,native:l}),{defaultTriggerId:y,state:x,setTriggerId:w}=mU(),O=s||void 0,k=O??y;return gl(()=>(w(C=>O??(C===null?void 0:C)),()=>{w(C=>C===O?null:C)}),[O,w]),kE("button",t,{state:x,ref:[n,v],props:[{"aria-controls":f?d:void 0,"aria-expanded":f,id:k,onClick:h},u,b],stateAttributesMapping:QOt})});function XOt(e,t,n,i){return e.addEventListener(t,n,i),()=>{e.removeEventListener(t,n,i)}}function YOt(e){const t=Tb(ZOt,e).current;return t.next=e,gl(t.effect),t}function ZOt(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function JOt(e){return e==null?e:"current"in e?e.current:e}function fCe(e,t=!1){const n=ROt();return Ka((i,r=null)=>{n.cancel();const s=JOt(e);if(s==null)return;const a=s,l=()=>{Fi.flushSync(i)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function c(){Promise.all(a.getAnimations().map(u=>u.finished)).then(()=>{r!=null&&r.aborted||l()},()=>{if(r!=null&&r.aborted)return;if(a.getAnimations().some(d=>d.pending||d.playState!=="finished")){c();return}l()})}if(t){const u="data-starting-style";if(!a.hasAttribute(u)){n.request(c);return}const d=new MutationObserver(()=>{a.hasAttribute(u)||(d.disconnect(),c())});d.observe(a,{attributes:!0,attributeFilter:[u]}),r==null||r.addEventListener("abort",()=>d.disconnect(),{once:!0});return}n.request(c)})}function ewt(e){const{enabled:t=!0,open:n,ref:i,onComplete:r}=e,s=Ka(r),a=fCe(i,n);m.useEffect(()=>{if(!t)return;const l=new AbortController;return a(s,l.signal),()=>{l.abort()}},[t,n,s,a])}const Y1={height:void 0,width:void 0};function twt(e){const{externalRef:t,hiddenUntilFound:n,id:i,keepMounted:r,mounted:s,onOpenChange:a,open:l,setMounted:c,setOpen:u,transitionStatus:d}=e,f=m.useRef(null),h=m.useRef(null),[p,g]=m.useState(Y1),b=m.useRef(Y1),v=m.useRef(!1),y=m.useRef(l),x=m.useRef(!1),[w,O]=m.useState(!1),k=m.useRef(null),S=gN(t,f),E=YOt(l),C=fCe(f),N=!l&&!s,_=w?"idle":d,j=l&&(y.current||x.current),T=!l&&s&&h.current==="css-animation"&&p.height===void 0&&p.width===void 0?b.current:p,L=n&&N&&h.current!=="css-animation",A=Ka((B,I=!0)=>{I&&(b.current=B),g(B)}),R=Ka(()=>{var B;(B=k.current)==null||B.call(k),k.current=null}),P=Ka(B=>{R(),k.current=()=>{k.current=null,B()}}),$=Ka(()=>{l&&s&&h.current==="css-animation"&&(x.current=!0)});gl(()=>{!w||d==="starting"||O(!1)},[w,d]),m.useEffect(()=>()=>{$(),R()},[$,R]),gl(()=>{const B=f.current;if(!B)return;!l&&k.current&&R();const I=nwt(B,j);if(h.current=I,l&&d==="idle"&&y.current&&I==="css-animation"){b.current=$0(B);return}if(l&&d==="starting"){const Q=v.current;if(v.current=!1,I==="none"){A($0(B)),O(!0);return}if(I==="css-transition"){const te=iwt(B);if(A($0(B)),!Q)return te;const le=DT(B,"transition-duration","0s");return P(le),O(!0),te}A($0(B));const q=DT(B,"animation-name","none");if(!Q){q();return}const U=DT(B,"animation-duration","0s");q(),P(U),O(!0);return}if(!l&&s&&(d==="idle"||d==="starting")){if(y.current=!1,x.current=!1,I==="none"){A(Y1,!1),c(!1);return}A($0(B));return}if(d!=="ending")return;if(I==="none"){c(!1);return}const H=$0(B);if(!(H.height>0||H.width>0)){c(!1);return}A(H),I==="css-animation"&&DT(B,"animation-name","none")()},[s,l,R,A,c,P,j,d]),ewt({enabled:l&&s&&_==="idle",open:!0,ref:f,onComplete(){l&&A(Y1,!1)}}),m.useEffect(()=>{if(l||!s||_!=="ending"||!f.current)return;const I=new AbortController;let H=-1;function X(){E.current||(c(!1),A(Y1,!1))}return H=Wl.request(()=>{C(X,I.signal)}),()=>{Wl.cancel(H),I.abort()}},[E,s,l,_,C,A,c]),gl(()=>{const B=f.current;!B||!n||!N||B.setAttribute("hidden","until-found")},[N,n]),m.useEffect(function(){const I=f.current;if(!I)return;function H(X){const Q=sCe(AOt,X);a(!0,Q),!Q.isCanceled&&(v.current=!0,u(!0))}return XOt(I,"beforematch",H)},[a,u]);const M=r||n||s||l;return{height:T.height,props:{...L?{[gU.startingStyle]:""}:void 0,hidden:N,id:i},ref:S,shouldPreventOpenAnimation:j,shouldRender:M,transitionStatus:_,width:T.width}}function $0(e){return{height:e.scrollHeight,width:e.scrollWidth}}function nwt(e,t){const n=go(e).getComputedStyle(e),i=(n.animationName.split(",").map(s=>s.trim()).some(s=>s!==""&&s!=="none")||t)&&HY(n.animationDuration),r=HY(n.transitionDuration);return i&&r||r?"css-transition":i?"css-animation":"none"}function HY(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function DT(e,t,n){const i=e.style.getPropertyValue(t),r=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(i===""){e.style.removeProperty(t);return}e.style.setProperty(t,i,r)}}function iwt(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(r=>{e.style.setProperty(r,"initial","important")});function n(){Object.entries(t).forEach(([r,s])=>{if(s===""){e.style.removeProperty(r);return}e.style.setProperty(r,s)})}const i=Wl.request(n);return()=>{Wl.cancel(i),n()}}let qY=function(e){return e.accordionPanelHeight="--accordion-panel-height",e.accordionPanelWidth="--accordion-panel-width",e}({});const hCe=m.forwardRef(function(t,n){const{className:i,hiddenUntilFound:r,keepMounted:s,id:a,render:l,style:c,...u}=t,{hiddenUntilFound:d,keepMounted:f}=GEe(),{defaultPanelId:h,mounted:p,onOpenChange:g,open:b,setMounted:v,setOpen:y,setPanelIdState:x,transitionStatus:w}=oCe(),O=r??d,k=s??f,S=a||void 0,E=a??h;gl(()=>(x(I=>S??(I===null?void 0:I)),()=>{x(I=>I===S?null:I)}),[S,x]);const{height:C,props:N,ref:_,shouldPreventOpenAnimation:j,shouldRender:T,transitionStatus:L,width:A}=twt({externalRef:n,hiddenUntilFound:O,id:E,keepMounted:k,mounted:p,onOpenChange:g,open:b,setMounted:v,setOpen:y,transitionStatus:w}),{state:R,triggerId:P}=mU(),$={...R,transitionStatus:L},M=ZEe(c,$),B=kE("div",{...t,style:void 0},{state:$,ref:_,props:[N,{"aria-labelledby":P,role:"region",style:{[qY.accordionPanelHeight]:C===void 0?"auto":`${C}px`,[qY.accordionPanelWidth]:A===void 0?"auto":`${A}px`}},u,M?{style:M}:void 0,j?{style:{animationName:"none"}}:void 0],stateAttributesMapping:bU});return T?B:null}),rwt=(e,t)=>{const n=e.currentTarget,i={x:e.clientX,y:e.clientY},r=swt(i,n.getBoundingClientRect()),s=awt(i,r),a=owt(t.getBoundingClientRect());return cwt([...s,...a])};function swt(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function awt(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function owt(e){const{top:t,right:n,bottom:i,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:i},{x:r,y:i}]}function lwt(e,t){const{x:n,y:i}=e;let r=!1;for(let s=0,a=t.length-1;si!=h>i&&n<(f-u)*(i-d)/(h-d)+u&&(r=!r)}return r}function cwt(e){const t=e.slice();return t.sort((n,i)=>n.xi.x?1:n.yi.y?1:0),uwt(t)}function uwt(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const dwt="_Transition_1wdpp_1",fwt="_Popover_1wdpp_3",pCe={Transition:dwt,Popover:fwt},mCe=m.createContext(null),nI=()=>{const e=m.use(mCe);if(!e)throw new Error("Popover components must be wrapped in ");return e},lm=({open:e,onOpenChange:t,showOnHover:n=!1,hoverOpenDelay:i=150,children:r})=>{const[s,a]=m.useState(!1),[l,c]=m.useState(!1),u=m.useRef(null),d=m.useRef(null),f=m.useRef(void 0),h=m.useRef(!1),p=m.useRef(!1),g=e??s,[b,v]=m.useState(!1);e7(()=>v(!1),b?500:null);const y=Em(t),x=Em(E=>{var C,N;clearTimeout(f.current),g!==E&&(E||(c(!1),n&&h.current&&((C=u.current)==null||C.focus()),h.current=!1),(N=y.current)==null||N.call(y,E),a(E),n&&v(E))}),w=m.useCallback(E=>{x.current(E)},[x]),O=m.useCallback(()=>{f.current=setTimeout(()=>w(!0),i)},[w,i]),k=m.useCallback(()=>{clearTimeout(f.current)},[]);m.useEffect(()=>()=>{clearTimeout(f.current)},[]);const S=m.useMemo(()=>({open:g,setOpen:w,shake:l,setShake:c,showOnHover:n,temporarilyPreventClickToClose:b,onTriggerEnter:O,onTriggerLeave:k,isPointerInTransitRef:p,triggerRef:u,contentRef:d,hoverOpenFocusedWithTab:h}),[g,w,l,c,n,b,h,p,O,k]);return o.jsx(mCe,{value:S,children:o.jsx(axe,{open:g,onOpenChange:w,modal:!1,children:r})})},hwt=({children:e,onPointerDown:t,onClick:n})=>{const{setOpen:i,showOnHover:r,temporarilyPreventClickToClose:s,onTriggerEnter:a,onTriggerLeave:l,isPointerInTransitRef:c,triggerRef:u,contentRef:d}=nI(),f=m.useRef(!1),h=b=>{!(b.currentTarget.nodeName.toLocaleLowerCase()==="a")&&s&&(b.preventDefault(),b.stopPropagation())},p=b=>{b.pointerType!=="touch"&&!f.current&&!c.current&&(a(),f.current=!0)},g=()=>{f.current&&(l(),f.current=!1)};return o.jsx(oxe,{asChild:!0,ref:u,onPointerDown:b=>{h(b),t==null||t(b)},onClick:b=>{h(b),n==null||n(b)},onPointerMove:r?p:void 0,onPointerLeave:r?g:void 0,onFocus:r?()=>i(!0):void 0,onBlur:r?()=>{setTimeout(()=>{var b;(b=d.current)!=null&&b.contains(document.activeElement)||i(!1)},50)}:void 0,children:e})},gCe=({children:e,avoidCollisions:t,width:n,minWidth:i,maxWidth:r,side:s,sideOffset:a=8,align:l,alignOffset:c,translucent:u,className:d,autoFocus:f=!0})=>{const{showOnHover:h,shake:p,contentRef:g}=nI(),b=v=>{const y=g.current;if(y&&v.target===y&&v.key==="Tab"&&v.shiftKey){v.preventDefault(),v.stopPropagation();const x=Oye(y),w=x[x.length-1];w==null||w.focus()}};return m.useEffect(()=>{const v=g.current;!v||!f||v!=null&&v.contains(document.activeElement)||h||v.focus({preventScroll:!0})},[g,h,f]),o.jsx(cxe,{forceMount:!0,ref:g,className:bi(pCe.Popover,d),style:qb({"popover-width":n,"popover-min-width":i,"popover-max-width":r}),onCloseAutoFocus:h?uh:void 0,"data-animate":p?"shake":void 0,"data-translucent":u?"true":void 0,side:s,sideOffset:a,align:l,alignOffset:c??(l==="center"?0:-5),avoidCollisions:t??!0,hideWhenDetached:!0,collisionPadding:20,onOpenAutoFocus:uh,onEscapeKeyDown:uh,onKeyDown:b,children:e})},pwt=e=>{const{setOpen:t,triggerRef:n,contentRef:i,isPointerInTransitRef:r,hoverOpenFocusedWithTab:s}=nI(),[a,l]=m.useState(null),c=m.useCallback(()=>{l(null),r.current=!1},[r]),u=m.useCallback((d,f)=>{const h=rwt(d,f);l(h),r.current=!0},[r]);return m.useEffect(()=>()=>c(),[c]),m.useEffect(()=>{const d=n.current,f=i.current;if(!d||!f)return;const h=g=>u(g,f),p=g=>u(g,d);return d.addEventListener("pointerleave",h),f.addEventListener("pointerleave",p),()=>{d.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",p)}},[i,n,u,c]),m.useEffect(()=>{if(!a)return;const d=f=>{const h=n.current,p=i.current,g=f.target,b={x:f.clientX,y:f.clientY},v=(h==null?void 0:h.contains(g))||(p==null?void 0:p.contains(g)),y=!lwt(b,a),x=g.hasAttribute("aria-haspopup");v?c():(y||x)&&(c(),t(!1))};return document.addEventListener("pointermove",d),()=>document.removeEventListener("pointermove",d)},[a,t,c,n,i]),m.useEffect(()=>{const d=f=>{if(i.current&&f.key==="Tab"&&!f.shiftKey){const[h]=Oye(i.current);h&&(f.preventDefault(),h.focus(),s.current=!0,document.removeEventListener("keydown",d))}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[i,s]),o.jsx(gCe,{...e})},mwt=e=>{const{open:t,showOnHover:n,setOpen:i}=nI();return Gk(t,()=>{i(!1)}),o.jsx(lxe,{forceMount:!0,children:o.jsx(Lx,{enterDuration:600,exitDuration:300,className:pCe.Transition,disableAnimations:!0,children:t&&(n?o.jsx(pwt,{...e},"popover-hover"):o.jsx(gCe,{...e},"popover"))})})};lm.Trigger=hwt;lm.Content=mwt;const gwt=["skill_hub","skill_space","knowledge_base","tool"];function bCe(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"m4 6 4 4 4-4"})})}function yCe({label:e}){return o.jsx("div",{className:"create-agent-card__loading",role:"status","aria-label":e,children:[0,1,2].map(t=>o.jsxs("div",{className:"create-agent-card__skeleton-row","aria-hidden":"true",children:[o.jsx("span",{}),o.jsx("span",{})]},t))})}function bwt(e,t){return e.kind==="tool"?t("blocks.createAgents.builtinTool"):e.kind==="knowledge_base"?t("blocks.createAgents.knowledgeBase"):e.source.startsWith("skill_hub:")?"Skill Hub":e.source.startsWith("skill_space:")?t("blocks.createAgents.skillCenter"):"Skill"}function zM({label:e,resources:t}){const{t:n}=Oe("conversation");return t.length===0?null:o.jsxs("section",{className:"create-agent-card__popover-section",children:[o.jsx("h4",{children:e}),o.jsx("div",{className:"create-agent-card__popover-list",children:t.map(i=>o.jsxs("div",{className:"create-agent-card__popover-item",children:[o.jsxs("div",{className:"create-agent-card__popover-item-heading",children:[o.jsx("strong",{children:i.name}),o.jsx(ga,{color:"secondary",size:"sm",variant:"soft",children:bwt(i,n)})]}),i.description?o.jsx("p",{children:i.description}):null]},i.ref))})]})}function ywt({tools:e}){const{t}=Oe("conversation");return e.length===0?null:o.jsxs("section",{className:"create-agent-card__popover-section",children:[o.jsx("h4",{children:t("blocks.createAgents.selfAuthoredTools")}),o.jsx(rCe,{children:e.map((n,i)=>o.jsxs(cCe,{className:"create-agent-card__python-tool",value:`${n.name}:${i}`,children:[o.jsx(uCe,{className:"create-agent-card__python-tool-header",children:o.jsxs(dCe,{className:"create-agent-card__python-tool-trigger",children:[o.jsxs("span",{children:[o.jsx("strong",{children:n.name}),n.description?o.jsx("small",{children:n.description}):null]}),o.jsxs("span",{className:"create-agent-card__python-tool-meta",children:[o.jsx(ga,{color:"secondary",size:"sm",variant:"soft",children:t("blocks.createAgents.selfAuthoredTools")}),o.jsx(bCe,{className:"create-agent-card__python-tool-chevron"})]})]})}),o.jsxs(hCe,{className:"create-agent-card__python-tool-panel",children:[n.dependencies.length>0?o.jsx("div",{className:"create-agent-card__python-tool-dependencies",children:t("blocks.createAgents.dependencies",{items:n.dependencies.join(", ")})}):null,o.jsx("pre",{tabIndex:0,"aria-label":t("blocks.createAgents.fullCode",{name:n.name}),children:o.jsx("code",{children:n.code})})]})]},`${n.name}:${i}`))})]})}function vwt({agents:e}){const{t}=Oe("conversation");return e.length===0?null:o.jsxs("section",{className:"create-agent-card__popover-section",children:[o.jsx("h4",{children:t("blocks.createAgents.subAgents")}),o.jsx("div",{className:"create-agent-card__popover-list",children:e.map(n=>o.jsxs("div",{className:"create-agent-card__popover-item",children:[o.jsxs("div",{className:"create-agent-card__popover-item-heading",children:[o.jsx("strong",{children:n.id}),o.jsx(ga,{color:"secondary",size:"sm",variant:"soft",children:t(`blocks.createAgents.agentTypes.${n.type}`,{defaultValue:n.type})})]}),n.description?o.jsx("p",{children:n.description}):null]},n.id))})]})}function MT({label:e,count:t,icon:n,children:i}){const{t:r}=Oe("conversation"),s=o.jsxs("button",{className:"create-agent-card__resource-metric",type:"button",disabled:t===0,"aria-label":r("blocks.createAgents.itemCount",{label:e,count:t}),children:[n,o.jsx("span",{children:t})]});return t===0?s:o.jsxs(lm,{showOnHover:!0,hoverOpenDelay:120,children:[o.jsx(lm.Trigger,{children:s}),o.jsx(lm.Content,{side:"top",align:"start",minWidth:"auto",maxWidth:360,className:"create-agent-card__resource-popover",children:i})]})}function xwt({response:e,status:t}){const{t:n}=Oe("conversation"),i=m.useMemo(()=>({tool:n("blocks.createAgents.sourceLabels.tool"),knowledge:n("blocks.createAgents.sourceLabels.knowledge"),skillCenter:n("blocks.createAgents.sourceLabels.skillCenter"),unknownSource:n("blocks.createAgents.sourceLabels.unknown"),unnamedResource:n("blocks.createAgents.unnamedResource"),unnamedAgent:n("blocks.createAgents.unnamedAgent")}),[n]),r=m.useMemo(()=>H1t(e,i),[i,e]),s=m.useMemo(()=>gwt.map(c=>{const u=q1t(r,c);return{value:c,label:n(`blocks.createAgents.categories.${c}`),...u,searchKeywords:[...new Set(u.sources.flatMap(d=>d.searchKeywords))]}}),[r,n]),a=t==="failed",l=a?tI(e):"";return o.jsx("section",{className:"create-agent-tool-card","aria-label":n("blocks.createAgents.collectionAria"),children:t==="running"?o.jsx(yCe,{label:n("blocks.createAgents.retrieving")}):a?o.jsxs("div",{className:"create-agent-card__message is-error",role:"alert",children:[o.jsx("span",{className:"create-agent-card__message-title",children:n("blocks.createAgents.retrievalFailed")}),o.jsx("span",{children:l||n("blocks.createAgents.checkConfig")})]}):o.jsx(rCe,{className:"create-agent-card__accordion",children:s.map(c=>o.jsxs(cCe,{className:"create-agent-card__accordion-item",value:c.value,children:[o.jsx(uCe,{className:"create-agent-card__accordion-header",children:o.jsxs(dCe,{className:"create-agent-card__accordion-trigger",children:[o.jsx("span",{children:c.label}),o.jsxs("span",{className:"create-agent-card__accordion-meta",children:[o.jsx(ga,{color:"secondary",size:"sm",variant:"soft",children:c.sources.length===0?c.value==="skill_hub"?n("blocks.createAgents.notSearched"):n("blocks.createAgents.notConfigured"):c.resources.length}),o.jsx(bCe,{className:"create-agent-card__accordion-chevron"})]})]})}),o.jsx(hCe,{className:"create-agent-card__accordion-content",children:o.jsxs("div",{className:"create-agent-card__accordion-scroll",role:"region","aria-label":n("blocks.createAgents.resourceList",{label:c.label}),tabIndex:0,children:[c.value==="skill_hub"&&c.searchKeywords.length>0?o.jsxs("div",{className:"create-agent-card__search-keywords",children:[o.jsx("span",{children:n("blocks.createAgents.searchKeywords")}),o.jsx("span",{children:c.searchKeywords.join("、")})]}):null,c.resources.length>0?o.jsx("div",{className:"create-agent-card__resource-list",children:c.resources.map(u=>o.jsx("div",{className:"create-agent-card__resource",children:o.jsxs("div",{className:"create-agent-card__resource-main",children:[o.jsxs("div",{className:"create-agent-card__resource-title",children:[o.jsx("span",{className:"create-agent-card__resource-name",children:u.name}),u.version?o.jsx(ga,{className:"create-agent-card__resource-version",color:"secondary",size:"sm",variant:"soft",children:u.version}):null]}),u.description?o.jsx("p",{children:u.description}):null]})},u.ref))}):o.jsxs("div",{className:"create-agent-card__empty-category",children:[o.jsx("p",{children:c.sources.length===0?c.value==="skill_hub"?n("blocks.createAgents.skillHubSkipped"):n("blocks.createAgents.sourceSkipped",{label:c.label}):n("blocks.createAgents.noResources")}),c.sources.filter(u=>u.message).map(u=>o.jsx("p",{className:"create-agent-card__raw-source-error",children:u.message},u.source))]})]})})]},c.value))},r.collectionId||"collected-resources")})}function Owt({args:e,response:t,status:n}){const{t:i}=Oe("conversation"),r=m.useMemo(()=>({tool:i("blocks.createAgents.sourceLabels.tool"),knowledge:i("blocks.createAgents.sourceLabels.knowledge"),skillCenter:i("blocks.createAgents.sourceLabels.skillCenter"),unknownSource:i("blocks.createAgents.sourceLabels.unknown"),unnamedResource:i("blocks.createAgents.unnamedResource"),unnamedAgent:i("blocks.createAgents.unnamedAgent")}),[i]),s=m.useMemo(()=>VEe(e,t,r),[e,r,t]),a=n==="failed"?tI(t):"";return o.jsxs("section",{className:"create-agent-tool-card is-agent-results","aria-label":i("blocks.createAgents.resultAria"),children:[a?o.jsxs("div",{className:"create-agent-card__message is-error",role:"alert",children:[o.jsx("span",{className:"create-agent-card__message-title",children:i("blocks.createAgents.creationFailed")}),o.jsx("span",{children:a})]}):null,s.agents.length>0?o.jsx("div",{className:"create-agent-card__agent-grid",children:s.agents.map(l=>{const c=n==="failed"?"failed":l.status,u=l.error||c==="failed"&&a,d=l.builtinTools.length+l.pythonTools.length;return o.jsxs(EB,{className:`create-agent-card__agent-card${u?" is-error":""}`,children:[o.jsx(CB,{leading:o.jsx(Xv,{seed:l.name}),title:l.name,titleText:l.name,status:o.jsx(ga,{color:"secondary",size:"sm",variant:"soft",children:i(`blocks.createAgents.agentTypes.${l.rootType}`,{defaultValue:l.rootType})})}),l.description?o.jsx(TB,{children:l.description}):null,u?o.jsx("div",{className:"create-agent-card__agent-result is-error",role:"alert",children:u}):null,o.jsxs("div",{className:"create-agent-card__agent-resources","aria-label":i("blocks.createAgents.agentResources",{name:l.name}),children:[o.jsx(MT,{label:i("blocks.createAgents.skill"),count:l.skills.length,icon:o.jsx(V2,{"aria-hidden":"true"}),children:o.jsx(zM,{label:i("blocks.createAgents.skill"),resources:l.skills})}),o.jsx(MT,{label:i("blocks.createAgents.knowledgeBase"),count:l.knowledgeBases.length,icon:o.jsx(Qxe,{"aria-hidden":"true"}),children:o.jsx(zM,{label:i("blocks.createAgents.knowledgeBase"),resources:l.knowledgeBases})}),o.jsxs(MT,{label:i("blocks.createAgents.toolsLabel"),count:d,icon:o.jsx($Fe,{"aria-hidden":"true"}),children:[o.jsx(zM,{label:i("blocks.createAgents.builtinTool"),resources:l.builtinTools}),o.jsx(ywt,{tools:l.pythonTools})]}),o.jsx(MT,{label:i("blocks.createAgents.subAgents"),count:l.subAgentCount,icon:o.jsx(BFe,{"aria-hidden":"true"}),children:o.jsx(vwt,{agents:l.subAgents})})]})]},l.name)})}):n==="running"?o.jsx(yCe,{label:i("blocks.createAgents.creating")}):o.jsxs("div",{className:"create-agent-card__message",children:[o.jsx("span",{className:"create-agent-card__message-title",children:i("blocks.createAgents.noAgents")}),o.jsx("span",{children:i("blocks.createAgents.noAgentResult")})]})]})}const wwt={web_search:{name:"web_search",runningLabel:"Searching the web",doneLabel:"Web search complete",tone:"search",icon:PY},link_reader:{name:"link_reader",runningLabel:"Reading webpage",doneLabel:"Webpage read complete",tone:"search",icon:PY},run_code:{name:"run_code",runningLabel:"Running code in the AgentKit sandbox",doneLabel:"Code execution completed in the AgentKit sandbox",tone:"sandbox",icon:L1t},list_envs:{name:"list_envs",runningLabel:"Checking available environments",doneLabel:"Available environments loaded",tone:"resources",icon:F1t},get_env_manifest:{name:"get_env_manifest",runningLabel:"Loading the environment manifest",doneLabel:"Environment manifest loaded",tone:"knowledge",icon:B1t},execute_in_sandbox:{name:"execute_in_sandbox",runningLabel:"Running a command in the environment",doneLabel:"Command completed in the environment",tone:"sandbox",icon:MY},delegate_to_codex_sandbox:{name:"delegate_to_codex_sandbox",runningLabel:"Codex Sandbox is running",doneLabel:"Codex Sandbox completed",failedLabel:"Codex Sandbox failed",tone:"sandbox",icon:MY},image_generate:{name:"image_generate",runningLabel:"Generating image",doneLabel:"Image generated",tone:"image",icon:R1t},video_generate:{name:"video_generate",runningLabel:"Generating video",doneLabel:"Video generated",tone:"video",icon:cU},ppt_generate:{name:"ppt_generate",runningLabel:"Generating presentation",doneLabel:"Presentation generated",tone:"presentation",icon:I1t},load_memory:{name:"load_memory",runningLabel:"Searching long-term memory",doneLabel:"Memory search complete",tone:"memory",icon:P1t},load_knowledgebase:{name:"load_knowledgebase",runningLabel:"Searching the knowledge base",doneLabel:"Knowledge base search complete",tone:"knowledge",icon:D1t},load_skill:{name:"load_skill",runningLabel:"Loading skill",doneLabel:"Skill loaded",tone:"skill",icon:M1t},collect_resources:{name:"collect_resources",runningLabel:"Collecting available resources",doneLabel:"Resource collection complete",failedLabel:"Resource collection failed",tone:"resources",icon:$1t,detailRenderer:xwt},create_agents:{name:"create_agents",runningLabel:"Creating and running agents",doneLabel:"Agent creation complete",failedLabel:"Agent creation failed",tone:"agent",icon:DY,detailRenderer:Owt},branch_compare:{name:"branch_compare",runningLabel:"",doneLabel:"",failedLabel:"",tone:"search",icon:DY,detailRenderer:G1t,hideHeader:!0}};function Swt(e){return wwt[e]}function vCe(e){return o.jsx("svg",{viewBox:"0 0 111 117",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M0 5.6016C7.82288e-05 0.621244 6.02226 -1.87314 9.54395 1.64847L40.1289 32.2334L68.5732 3.7891C69.5834 2.77903 70.9533 2.21099 72.3818 2.21097H82.7031C82.7917 2.20658 82.8806 2.20414 82.9697 2.20414H104.775C109.574 2.20427 111.977 8.00691 108.584 11.4004L64.916 55.0664C64.3075 55.8528 63.9436 56.7647 63.8242 57.6993C63.7142 56.4884 63.1964 55.3069 62.2695 54.3799L45.4082 37.5186H45.4072L40.124 32.2354L17.832 54.5284C16.7671 55.5933 16.2416 56.993 16.2549 58.3887C16.2417 59.7843 16.7672 61.1842 17.832 62.2491L39.9287 84.3467L9.54395 114.733C6.0223 118.255 0.000223474 115.761 0 110.78V5.6016ZM63.8018 58.8702C63.8962 59.9086 64.2936 60.9229 64.9961 61.7735L108.591 105.368C111.984 108.762 109.58 114.564 104.781 114.564H94.4336C94.3543 114.568 94.274 114.569 94.1934 114.569H72.3877C70.9592 114.569 69.5892 114.002 68.5791 112.992L39.9336 84.3467L58.4531 65.8282L58.4453 65.8203L62.2695 61.9981C63.1476 61.12 63.6567 60.0136 63.8018 58.8702Z",fill:"currentColor"})})}function kwt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M6 3h8l4 4v14H6Z"}),o.jsx("path",{d:"M14 3v5h5"}),o.jsx("path",{d:"m10 12-2 2 2 2M14 12l2 2-2 2"})]})}function Ewt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M12 3 19 6v5c0 4.6-2.8 7.8-7 10-4.2-2.2-7-5.4-7-10V6l7-3Z"}),o.jsx("path",{d:"m9 12 2 2 4-4"})]})}function Cwt(e,t){const n=new Map(e.map(a=>[a.path,a.content])),i=new Map(t.map(a=>[a.path,a.content])),r=new Set([...n.keys(),...i.keys()]),s=[];for(const a of[...r].sort((l,c)=>l.localeCompare(c))){const l=n.get(a),c=i.get(a);l!==c&&s.push({path:a,status:l===void 0?"added":c===void 0?"deleted":"modified",before:l??"",after:c??""})}return s}function Gm(e){return{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,...e}}function xCe(e){return o.jsx("svg",{...Gm(e),children:o.jsx("path",{d:"m9 7-5 5 5 5M15 7l5 5-5 5M13.5 4l-3 16"})})}function VM(e){return o.jsx("svg",{...Gm(e),children:o.jsx("path",{d:"M6.5 3.75h7l4 4V20.25h-11zM13.5 3.75v4h4M9 12h6M9 15.5h4.5"})})}function Twt(e){return o.jsx("svg",{...Gm(e),children:o.jsx("path",{d:"M3.75 7.25h6l1.75 2h8.75v9.25H3.75zM3.75 7.25V5.5h5l1.5 1.75"})})}function Awt(e){return o.jsx("svg",{...Gm(e),children:o.jsx("path",{d:"m9 5 7 7-7 7"})})}function OCe(e){return o.jsx("svg",{...Gm(e),children:o.jsx("path",{d:"m6.5 6.5 11 11M17.5 6.5l-11 11"})})}function _wt(e){return o.jsxs("svg",{...Gm(e),children:[o.jsx("circle",{cx:"12",cy:"12",r:"3.25"}),o.jsx("path",{d:"M12 2.75v2M12 19.25v2M2.75 12h2M19.25 12h2M5.45 5.45l1.4 1.4M17.15 17.15l1.4 1.4M18.55 5.45l-1.4 1.4M6.85 17.15l-1.4 1.4"})]})}function Nwt(e){return o.jsx("svg",{...Gm(e),children:o.jsx("path",{d:"M19.25 15.25A8 8 0 0 1 8.75 4.75a8 8 0 1 0 10.5 10.5Z"})})}function jwt(e){return o.jsxs("svg",{...Gm(e),children:[o.jsx("path",{d:"M19.25 8.25V4.5l-1.8 1.8a7.5 7.5 0 1 0 1.8 7.65"}),o.jsx("path",{d:"M19.25 4.5H15.5"})]})}const Rwt=m.lazy(()=>Ud(()=>Promise.resolve().then(()=>YNe),void 0)),Iwt=m.lazy(()=>Ud(()=>import("../chunks/CodeDiffEditor-BwQXqX7L.js"),[])),wCe="veadk-code-workspace-theme";function Pwt(e){const t={name:"",children:new Map};for(const n of e){const i=n.path.split("/").filter(Boolean);let r=t;i.forEach((s,a)=>{let l=r.children.get(s);l||(l={name:s,children:new Map},r.children.set(s,l)),a===i.length-1&&(l.path=n.path),r=l})}return t}function Dwt(e,t=!1){return[...e.children.values()].sort((n,i)=>{const r=n.children.size>0&&n.path===void 0,s=i.children.size>0&&i.path===void 0;return r!==s?t?r?1:-1:r?-1:1:n.name.localeCompare(i.name)})}function Mwt(){if(typeof window>"u")return"light";try{return window.localStorage.getItem(wCe)==="dark"?"dark":"light"}catch{return"light"}}function Lwt(e){return e===""?0:e.split(` -`).length}function HS({project:e,open:t,onClose:n,onChange:i,readOnly:r=!1,comparison:s}){var L;const{t:a}=Oe("workspaceTools"),l=m.useId(),c=m.useRef(null),u=m.useRef(null),d=m.useRef(n),[f,h]=m.useState(Mwt),p=m.useMemo(()=>s?Cwt(s.baseProject.files,e.files):[],[s,e.files]),g=m.useMemo(()=>s?p.map(A=>({path:A.path,content:A.status==="deleted"?A.before:A.after})):e.files,[p,s,e.files]),b=m.useMemo(()=>new Map(p.map(A=>[A.path,A.status])),[p]),[v,y]=m.useState(((L=g[0])==null?void 0:L.path)??null),[x,w]=m.useState(new Set),O=m.useMemo(()=>Pwt(g),[g]),k=g.find(A=>A.path===v)??null,S=p.find(A=>A.path===v)??null;if(d.current=n,m.useEffect(()=>{try{window.localStorage.setItem(wCe,f)}catch{}},[f]),m.useEffect(()=>{var $;if(!t)return;const A=document.body.style.overflow,R=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",($=u.current)==null||$.focus();const P=M=>{if(M.key==="Escape"){M.preventDefault(),d.current();return}if(M.key!=="Tab"||!c.current)return;const B=[...c.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')].filter(X=>X.offsetParent!==null);if(B.length===0)return;const I=B[0],H=B[B.length-1];M.shiftKey&&document.activeElement===I?(M.preventDefault(),H.focus()):!M.shiftKey&&document.activeElement===H&&(M.preventDefault(),I.focus())};return window.addEventListener("keydown",P),()=>{document.body.style.overflow=A,window.removeEventListener("keydown",P),R!=null&&R.isConnected&&R.focus()}},[t]),m.useEffect(()=>{k||g.length===0||y(g[0].path)},[g,k]),!t)return null;function E(A){w(R=>{const P=new Set(R);return P.has(A)?P.delete(A):P.add(A),P})}function C(A){return A?o.jsx("span",{className:`code-browser-change is-${A}`,children:a(`codeBrowser.change.${A}`)}):null}function N(A,R,P){return Dwt(A,R===0).map($=>{const M=P?`${P}/${$.name}`:$.name;if(!($.children.size>0&&$.path===void 0)&&$.path){const H=b.get($.path);return o.jsxs("button",{type:"button",className:`code-browser-file${v===$.path?" is-active":""}`,style:{paddingLeft:`${12+R*16}px`},onClick:()=>y($.path??null),title:$.path,"aria-pressed":v===$.path,children:[o.jsx(VM,{}),o.jsx("span",{children:$.name}),C(H)]},M)}const I=x.has(M);return o.jsxs("div",{children:[o.jsxs("button",{type:"button",className:"code-browser-folder",style:{paddingLeft:`${10+R*16}px`},onClick:()=>E(M),"aria-expanded":!I,children:[o.jsx(Awt,{className:I?"":"is-open"}),o.jsx(Twt,{}),o.jsx("span",{children:$.name})]}),!I&&N($,R+1,M)]},M)})}function _(A){!k||s||i({...e,files:e.files.map(R=>R.path===k.path?{...R,content:A}:R)})}const j=f==="light"?"dark":"light",T=a(s?"codeBrowser.noChanges":"codeBrowser.chooseFile");return Fi.createPortal(o.jsx("div",{className:"code-browser-backdrop",onMouseDown:A=>{A.target===A.currentTarget&&n()},children:o.jsxs("section",{ref:c,className:`code-browser-dialog is-${f}`,role:"dialog","aria-modal":"true","aria-labelledby":l,children:[o.jsxs("header",{className:"code-browser-head",children:[o.jsxs("div",{className:"code-browser-title-wrap",children:[o.jsx("span",{className:"code-browser-title-icon",children:o.jsx(xCe,{})}),o.jsxs("div",{children:[o.jsx("h2",{id:l,children:a(s?"codeBrowser.compareTitle":"codeBrowser.workspaceTitle")}),o.jsx("p",{title:e.name,children:e.name||a("codeBrowser.projectFallback")})]})]}),o.jsxs("div",{className:"code-browser-head-actions",children:[o.jsx("button",{type:"button",className:"code-browser-icon-button",onClick:()=>h(j),"aria-label":a("codeBrowser.switchTheme"),title:a("codeBrowser.switchThemeTitle",{theme:a(`codeBrowser.themes.${j}`)}),children:f==="light"?o.jsx(Nwt,{}):o.jsx(_wt,{})}),o.jsx("button",{ref:u,type:"button",className:"code-browser-icon-button",onClick:n,"aria-label":a("codeBrowser.closeWorkspace"),title:a("codeBrowser.close"),children:o.jsx(OCe,{})})]})]}),o.jsxs("div",{className:"code-browser-workspace",children:[o.jsxs("aside",{className:"code-browser-sidebar","aria-label":a(s?"codeBrowser.changedFiles":"codeBrowser.projectFiles"),children:[o.jsxs("div",{className:"code-browser-sidebar-head",children:[o.jsx("span",{children:a(s?"codeBrowser.changes":"codeBrowser.files")}),o.jsx("span",{children:g.length})]}),o.jsx("div",{className:"code-browser-tree",children:g.length>0?N(O,0,""):o.jsx("div",{className:"code-browser-empty",children:T})})]}),o.jsxs("main",{className:"code-browser-main",children:[o.jsx("div",{className:"code-browser-tabs",role:"tablist","aria-label":a("codeBrowser.openFiles"),children:k?o.jsxs("div",{className:"code-browser-tab",role:"tab","aria-selected":"true",children:[o.jsx(VM,{}),o.jsx("span",{children:k.path.split("/").pop()}),C(S==null?void 0:S.status)]}):null}),o.jsxs("div",{className:"code-browser-path",children:[o.jsx(VM,{}),o.jsx("span",{children:(k==null?void 0:k.path)??a("codeBrowser.noFileSelected")})]}),s?o.jsxs("div",{className:"code-browser-diff-labels","aria-label":a("codeBrowser.comparisonDirection"),children:[o.jsx("span",{children:s.baseLabel??a("codeBrowser.before")}),o.jsx("span",{children:s.targetLabel??a("codeBrowser.after")})]}):null,o.jsx("div",{className:"code-browser-editor",children:k?o.jsx(m.Suspense,{fallback:o.jsx("div",{className:"code-browser-empty",children:a("codeBrowser.loadingEditor")}),children:S?o.jsx(Iwt,{before:S.before,after:S.after,path:S.path,theme:f}):o.jsx(Rwt,{value:k.content,path:k.path,onChange:_,readOnly:r,theme:f})}):o.jsx("div",{className:"code-browser-empty",children:T})}),o.jsxs("footer",{className:"code-browser-statusbar",children:[o.jsx("span",{children:s?a("codeBrowser.changedFileCount",{count:p.length}):a("codeBrowser.fileCount",{count:e.files.length})}),o.jsx("span",{children:k?a("codeBrowser.lineCount",{count:Lwt(k.content)}):"UTF-8"})]})]})]})]})}),document.body)}function $wt({project:e,onChange:t,className:n="",label:i}){const{t:r}=Oe("workspaceTools"),[s,a]=m.useState(!1),l=i??r("codeBrowser.viewSource");return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:`code-browser-trigger ${n}`.trim(),onClick:()=>a(!0),"aria-label":r("codeBrowser.viewSourceAria"),title:l,children:[o.jsx(xCe,{}),o.jsx("span",{children:l})]}),o.jsx(HS,{project:e,open:s,onClose:()=>a(!1),onChange:t})]})}const SCe="send_a2ui_json_to_client",Fwt=28,Bwt=3e3;function Uwt(e,t,n){let i=t;for(let r=0;r65535?2:1}return i}function Qwt(e){return e<=4?1:Math.min(18,Math.max(2,Math.ceil(e/6)))}function kCe(e,t,n,i){const[r,s]=m.useState(()=>t?"":e),a=m.useRef(r),l=m.useRef(e),c=m.useRef(null),u=m.useRef(0),d=m.useRef(n);return l.current=e,d.current=n,m.useEffect(()=>{const f=a.current,h=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!t||h||!e.startsWith(f)){c.current!==null&&window.cancelAnimationFrame(c.current),c.current=null,f!==e&&(a.current=e,s(e));return}if(f===e||c.current!==null)return;const p=g=>{const b=l.current,v=a.current;if(!b.startsWith(v)){a.current=b,s(b),c.current=null;return}if(g-u.current{var f;(f=d.current)==null||f.call(d)},[r]),m.useEffect(()=>{r===e&&(i==null||i())},[r,i,e]),m.useEffect(()=>()=>{c.current!==null&&(window.cancelAnimationFrame(c.current),c.current=null)},[]),r}function zwt(){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o.jsx("path",{d:"M14.3 5.25a4.6 4.6 0 0 0-5.55 5.55L3.6 15.95a1.8 1.8 0 0 0 0 2.55l1.9 1.9a1.8 1.8 0 0 0 2.55 0l5.15-5.15a4.6 4.6 0 0 0 5.55-5.55l-2.9 2.9-2.45-.55-.55-2.45 2.9-2.9a4.6 4.6 0 0 0-1.45-1.45Z"})})}function Vwt(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("path",{d:"m4.5 7 1.8 1.8L9.5 5.5"}),o.jsx("path",{d:"M12 7h7.5"}),o.jsx("path",{d:"m4.5 13 1.8 1.8 3.2-3.3"}),o.jsx("path",{d:"M12 13h7.5"}),o.jsx("path",{d:"M5 19h4"}),o.jsx("path",{d:"M12 19h7.5"})]})}function Hwt(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("path",{d:"M5 5v7.25A3.75 3.75 0 0 0 8.75 16H19"}),o.jsx("path",{d:"m15.5 12.5 3.5 3.5-3.5 3.5"})]})}function qwt({activity:e}){const{t}=Oe("conversation"),n=[["Agent Session",e.agentSessionId],["Sandbox Session",e.sandboxSessionId],["Codex Thread",e.threadId]].filter(i=>!!i[1]);return n.length?o.jsx("dl",{className:"codex-sandbox-run__identity","aria-label":t("blocks.sandboxIdentity"),children:n.map(([i,r])=>o.jsxs("div",{children:[o.jsx("dt",{children:i}),o.jsx("dd",{title:r,children:r})]},i))}):null}function Wwt(e,t,n){if(e!=="load_skill"||t==null||typeof t!="object"||Array.isArray(t))return;const i=t.skill_name;if(!(typeof i!="string"||!i.trim()))return n("blocks.useSkill",{name:i.trim()})}function ECe({text:e,done:t,answerStarted:n=!1,streaming:i=!1,onStreamFrame:r}){const{t:s}=Oe("conversation"),[a,l]=m.useState(!(t||n)),c=m.useRef(!1);m.useEffect(()=>{c.current||l(!(t||n))},[n,t]);const u=()=>{c.current=!0,l(g=>!g)},d=e.replace(/\r\n?/g,` +`+v+"]"}return r.pop(),s=v,x}};const Hvt={parse:$vt,stringify:Vvt};var kEe=Hvt;const qvt=2e5,Wvt=new Set(["__proto__","constructor","prototype"]),Kvt=/^(?:https?:|data:|blob:|file:|javascript:|image:\/\/)/i;function DO(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function fN(e,t=0){if(t>30)throw new Error("ECharts option nesting is too deep");if(typeof e=="number"&&!Number.isFinite(e))throw new Error("ECharts option contains a non-finite number");if(typeof e=="string"&&Kvt.test(e.trim()))throw new Error("ECharts option contains an external resource");if(Array.isArray(e)){for(const n of e)fN(n,t+1);return}if(DO(e))for(const[n,i]of Object.entries(e)){if(Wvt.has(n))throw new Error("ECharts option contains an unsafe key");fN(i,t+1)}}function Gvt(e){var i;const t=e.trim(),n=t.match(/^(?:(?:const|let|var)\s+)?option\s*=\s*([\s\S]*?)\s*;?$/);return((i=n==null?void 0:n[1])==null?void 0:i.trim())||t}function Xvt(e,t){let n=1,i="",r=!1,s=!1,a=!1;for(let l=t+1;li+2)throw new Error("Invalid ECharts gradient argument count");const r=n.slice(0,i).map(Yvt),s=n[i],a=n[i+1]??!1;if(!Array.isArray(s)||typeof a!="boolean")throw new Error("Invalid ECharts gradient data");return e==="linear"?{type:e,x:r[0],y:r[1],x2:r[2],y2:r[3],colorStops:s,global:a}:{type:e,x:r[0],y:r[1],r:r[2],colorStops:s,global:a}}function Jvt(e,t){const n=/^(?:new\s+)?echarts\.graphic\.(LinearGradient|RadialGradient)\s*\(/;let i="",r=!1,s=!1,a=!1;for(let l=t;lqvt)throw new Error("ECharts option is too large");const n=ext(Gvt(e));let i;try{i=kEe.parse(n)}catch(a){throw/\bfunction\s*\(|=>/.test(n)?new Error("ECharts function callbacks are not supported"):a}if(!DO(i))throw new Error("ECharts option must be a data object");fN(i);const r={...i};r.aria={...DO(r.aria)?r.aria:{},enabled:!0};const s=r.tooltip;return DO(s)?r.tooltip={...s,renderMode:"richText"}:Array.isArray(s)&&(r.tooltip=s.map(a=>DO(a)?{...a,renderMode:"richText"}:a)),t&&(r.animation=!1),r}let PM;function nxt(){return PM??(PM=Fd(()=>import("../visualizations/echarts/index-CGT341lL.js"),[]).catch(e=>{throw PM=void 0,e})),PM}function ixt({source:e}){const{t}=xe("conversation"),n=m.useRef(null),[i,r]=m.useState(!1),[s,a]=m.useState("");return m.useEffect(()=>{let l=!1,c,u,d;r(!1);try{d=txt(e,window.matchMedia("(prefers-reduced-motion: reduce)").matches),a("")}catch{a("invalid");return}return nxt().then(f=>{const h=n.current;l||!h||(c=f.init(h,void 0,{renderer:"svg"}),c.setOption(d,{notMerge:!0}),typeof ResizeObserver<"u"&&(u=new ResizeObserver(()=>c==null?void 0:c.resize()),u.observe(h)),r(!0))}).catch(()=>{c==null||c.dispose(),c=void 0,l||a("render")}),()=>{l=!0,u==null||u.disconnect(),c==null||c.dispose()}},[e]),o.jsxs("div",{className:`echarts-diagram${s?" echarts-diagram--error":""}`,role:"img","aria-label":t("visualization.echartsAria"),"aria-busy":!i&&!s,children:[o.jsx("div",{ref:n,className:"echarts-diagram__canvas",hidden:!!s}),!i&&!s?o.jsx("div",{className:"echarts-diagram__state","aria-live":"polite",children:o.jsx(En,{duration:2.2,spread:15,children:t("visualization.rendering")})}):null,s?o.jsx("p",{className:"echarts-diagram__error",role:"alert",children:t(s==="invalid"?"visualization.invalidEcharts":"visualization.renderFailed")}):null]})}const rxt=m.memo(ixt);let TY,AY=Promise.resolve(),sxt=0;function axt(){return TY??(TY=Fd(async()=>{const{default:e}=await import("../visualizations/mermaid/mermaid.core-Czk7O9j0.js").then(t=>t.ay);return{default:e}},__vite__mapDeps([0,1])).then(({default:e})=>(e.initialize({startOnLoad:!1,securityLevel:"strict",suppressErrorRendering:!0,theme:"neutral"}),e))),TY}function oxt(e){const t=AY.then(async()=>{const n=await axt(),i=`mermaid-diagram-${sxt+=1}`;return n.render(i,e)});return AY=t.then(()=>{},()=>{}),t}function lxt({source:e}){const{t}=xe("conversation"),n=m.useRef(null),[i,r]=m.useState(null),[s,a]=m.useState(!1);return m.useEffect(()=>{let l=!1;return r(null),a(!1),oxt(e).then(c=>{l||r(c)}).catch(()=>{l||a(!0)}),()=>{l=!0}},[e]),m.useEffect(()=>{!(i!=null&&i.bindFunctions)||!n.current||i.bindFunctions(n.current)},[i]),s?o.jsx("div",{className:"mermaid-diagram mermaid-diagram--error",children:o.jsx("p",{className:"mermaid-diagram__error",role:"alert",children:t("visualization.mermaidFailed")})}):i?o.jsx("div",{ref:n,className:"mermaid-diagram",role:"img","aria-label":t("visualization.mermaidAria"),dangerouslySetInnerHTML:{__html:i.svg}}):o.jsx("div",{className:"mermaid-diagram mermaid-diagram--loading","aria-live":"polite",children:o.jsx(En,{duration:2.2,spread:15,children:t("visualization.rendering")})})}const cxt=m.memo(lxt),uxt="_SegmentedControl_1sl7d_1",dxt="_SegmentedControlOption_1sl7d_140",fxt="_SegmentedControlThumb_1sl7d_219",U6={SegmentedControl:uxt,SegmentedControlOption:dxt,SegmentedControlThumb:fxt},Qc=({value:e,onChange:t,children:n,block:i,pill:r=!0,size:s="md",gutterSize:a,className:l,onClick:c,...u})=>{const d=m.useRef(null),f=m.useRef(null),h=m.useCallback(g=>{const b=d.current,v=f.current;if(!b||!v)return;const y=b==null?void 0:b.querySelector('[data-state="on"]');if(!y)return;const x=b.clientWidth;let w=Math.floor(y.clientWidth);const O=y.offsetLeft;if(x-(w+O)<2&&(w=w-1),v.style.width=`${Math.floor(w)}px`,v.style.transform=`translateX(${O}px)`,b.scrollWidth>x){const k=x*.15,S=b.scrollLeft,E=y.offsetLeft,C=E+w;(ES+x-k)&&g&&y.scrollIntoView({block:"nearest",inline:"center",behavior:"smooth"})}},[]);vye({ref:d,onResize:()=>{const g=f.current;if(!g)return;const b=g.style.transition;g.style.transition="",h(!1),g.style.transition=b}}),m.useLayoutEffect(()=>{const g=d.current,b=f.current;!g||!b||(h(!!b.style.transition),b.style.transition||N_(()=>{b.style.transition="width 300ms var(--cubic-enter), transform 300ms var(--cubic-enter)"}))},[h,e,s,a,r]);const p=g=>{g&&t&&t(g)};return o.jsxs(uWe,{ref:d,className:mi(U6.SegmentedControl,l),type:"single",value:e,loop:!1,onValueChange:p,onClick:c,"data-block":i?"":void 0,"data-pill":r?"":void 0,"data-size":s,"data-gutter-size":a,...u,children:[o.jsx("div",{className:U6.SegmentedControlThumb,ref:f}),n]})},hxt=({children:e,...t})=>o.jsx(mWe,{className:U6.SegmentedControlOption,...t,onPointerEnter:e7,children:o.jsx("span",{className:"relative",children:e})});Qc.Option=hxt;function pxt({children:e,label:t,language:n,source:i,streaming:r=!1}){const{t:s}=xe("conversation"),[a,l]=m.useState("preview"),c=r?"code":a;return o.jsxs("section",{className:"visualization-card","aria-label":s("visualization.cardAria",{label:t}),children:[o.jsx("div",{className:"visualization-card__toolbar",children:o.jsxs(Qc,{className:"visualization-card__tabs",value:c,size:"sm",gutterSize:"sm",pill:!1,"aria-label":s("visualization.viewAria",{label:t}),onChange:u=>{r||l(u)},children:[o.jsx(Qc.Option,{value:"preview",disabled:r,children:s("visualization.preview")}),o.jsx(Qc.Option,{value:"code",children:s("visualization.code")})]})}),o.jsx("div",{className:"visualization-card__body",children:c==="code"?o.jsx("pre",{className:"visualization-card__code",children:o.jsx("code",{className:`language-${n}`,children:i})}):e})]})}const mxt=m.memo(pxt);function gxt(e){const t=e==null?void 0:e.trim().toLowerCase();if(t==="mermaid")return"mermaid";if(t==="echart"||t==="echarts")return"echarts"}const EEe=[".mp4",".webm",".mov",".m4v",".ogg",".avi"];function Q6(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Q6).join(""):m.isValidElement(e)?Q6(e.props.children):""}function bxt(e){var i;const t=m.Children.toArray(e)[0];if(!m.isValidElement(t))return;const n=(i=t.props.className)==null?void 0:i.split(/\s+/).find(r=>r.startsWith("language-"));return gxt(n==null?void 0:n.slice(9))}function CEe(e){if(!e)return!1;try{const t=e.toLowerCase();return EEe.some(n=>t.includes(n))}catch{return!1}}function yxt(e){var i;const t=(i=e==null?void 0:e.properties)==null?void 0:i.href;if(!t)return!1;if(CEe(t))return!0;const n=e==null?void 0:e.children;if(n&&Array.isArray(n)){const r=n.map(s=>(s==null?void 0:s.value)||"").join("").toLowerCase();return EEe.some(s=>r.includes(s))}return!1}function vxt({text:e,className:t,allowRawHtml:n=!0,streaming:i=!1}){const{t:r}=xe("conversation"),[s,a]=m.useState(null),l=(d,f)=>{if(d.src)return d.src;if(f){const h=g=>{var b;if(!g)return null;if(g.type==="source"&&((b=g.properties)!=null&&b.src))return g.properties.src;if(g.children)for(const v of g.children){const y=h(v);if(y)return y}return null},p=h({children:f});if(p)return p}return""},c=d=>{try{const h=new URL(d).pathname.split("/");return h[h.length-1]||"video.mp4"}catch{return"video.mp4"}},u=d=>d?Array.isArray(d)?d.map(f=>(f==null?void 0:f.value)||"").join("")||"video":(d==null?void 0:d.value)||"video":"video";return o.jsxs("div",{className:t?`md ${t}`:"md",children:[o.jsx(Lft,{remarkPlugins:[Xpt],rehypePlugins:n?[Rvt,oY]:[oY],components:{pre:({node:d,children:f,...h})=>{const p=bxt(f);if(p==="mermaid"||p==="echarts"){const g=Q6(f).replace(/\n$/,"");return o.jsx(mxt,{label:p==="mermaid"?"Mermaid":"ECharts",language:p,source:g,streaming:i,children:p==="mermaid"?o.jsx(cxt,{source:g}):o.jsx(rxt,{source:g})})}return o.jsx("pre",{...h,children:f})},a:({node:d,...f})=>{const h=f.href;if(h&&(CEe(h)||yxt(d))){const p=h,g=u(d==null?void 0:d.children);return o.jsxs("div",{className:"video-container",children:[o.jsxs("button",{type:"button",className:"video-preview-trigger","aria-label":r("markdown.playVideo",{name:g}),onClick:()=>a({src:p,title:g}),children:[o.jsx("video",{src:p,playsInline:!0,className:"video-thumbnail",preload:"metadata"}),o.jsx("span",{className:"video-preview-hint","aria-hidden":"true",children:o.jsx(Vy,{})})]}),o.jsx("div",{className:"video-caption",children:o.jsx("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"video-link-text",children:g})})]})}return o.jsx("a",{...f,target:"_blank",rel:"noopener noreferrer"})},img:({node:d,src:f,alt:h,...p})=>{const g=o.jsx("img",{...p,src:f,alt:h??"",loading:"lazy"});return f?o.jsx(ube,{src:f,children:o.jsxs("button",{type:"button",className:"image-preview-trigger","aria-label":r("markdown.enlargeImage",{name:h||r("markdown.image")}),children:[g,o.jsx("span",{className:"image-preview-hint","aria-hidden":"true",children:o.jsx(Vy,{})})]})}):g},video:({node:d,src:f,children:h,...p})=>{const g=l({src:f},h);return g?o.jsx("div",{className:"video-container",children:o.jsxs("button",{type:"button",className:"video-preview-trigger","aria-label":r("markdown.enlargeVideo"),onClick:()=>a({src:g}),children:[o.jsx("video",{src:g,...p,playsInline:!0,className:"video-thumbnail",children:h}),o.jsx("span",{className:"video-preview-hint","aria-hidden":"true",children:o.jsx(Vy,{})})]})}):o.jsx("video",{src:f,controls:!0,playsInline:!0,className:"video-inline",...p,children:h})}},children:e}),s&&o.jsx("div",{className:"video-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":r("markdown.videoPreview"),onClick:()=>a(null),children:o.jsxs("div",{className:"video-viewer",onClick:d=>d.stopPropagation(),children:[o.jsxs("div",{className:"video-viewer-header",children:[o.jsx("div",{className:"video-viewer-title",children:s.title||c(s.src)}),o.jsxs("nav",{className:"video-viewer-nav",children:[o.jsx("a",{href:s.src,download:s.title||c(s.src),"aria-label":r("markdown.downloadVideo"),title:r("markdown.downloadVideo"),className:"video-viewer-download",children:o.jsx(Qj,{})}),o.jsx("button",{type:"button",className:"video-viewer-close","aria-label":r("markdown.close"),onClick:()=>a(null),children:o.jsx(Ra,{})})]})]}),o.jsx("div",{className:"video-viewer-body",children:o.jsx("video",{src:s.src,controls:!0,autoPlay:!0,playsInline:!0,className:"video-fullscreen"})})]})})]})}const Bu=m.memo(vxt);function DM(e){return(e==null?void 0:e.trim())||Um("resourceMetadata.unknownSource")}function TEe(e){return(e==null?void 0:e.trim())||Um("resourceMetadata.unknownCreator")}function xxt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M5 5.5A2.5 2.5 0 0 1 7.5 3H19v16H7.5A2.5 2.5 0 0 0 5 21.5v-16Z"}),o.jsx("path",{d:"M5 18.5A2.5 2.5 0 0 1 7.5 16H19"}),o.jsx("path",{d:"M9 7h6M9 10h4"})]})}function Oxt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M6 3h8l4 4v14H6V3Z"}),o.jsx("path",{d:"M14 3v5h5M9 12h6M9 16h6"})]})}function wxt(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"m7 7 10 10M17 7 7 17"})})}function Sxt(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"M12 5v14M5 12h14"})})}function yE({title:e,children:t,onClose:n,busy:i=!1,className:r=""}){const{t:s}=xe("ui"),a=m.useId(),l=m.useRef(null),c=m.useRef(null),u=m.useRef(i),d=m.useRef(n);return m.useEffect(()=>{u.current=i,d.current=n},[i,n]),m.useEffect(()=>{var g;const f=document.activeElement instanceof HTMLElement?document.activeElement:null,h=document.body.style.overflow;document.body.style.overflow="hidden",(g=l.current)==null||g.focus();const p=b=>{if(b.key==="Escape"&&!u.current){d.current();return}if(b.key!=="Tab")return;const v=c.current;if(!v)return;const y=Array.from(v.querySelectorAll('button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), a[href], audio[controls], video[controls], iframe, [tabindex]:not([tabindex="-1"])')).filter(O=>O.getClientRects().length>0);if(y.length===0){b.preventDefault();return}const x=y[0],w=y[y.length-1];b.shiftKey&&(document.activeElement===x||!v.contains(document.activeElement))?(b.preventDefault(),w.focus()):!b.shiftKey&&(document.activeElement===w||!v.contains(document.activeElement))&&(b.preventDefault(),x.focus())};return window.addEventListener("keydown",p),()=>{window.removeEventListener("keydown",p),document.body.style.overflow=h,f!=null&&f.isConnected&&f.focus()}},[]),$i.createPortal(o.jsx("div",{className:"knowledge-dialog-backdrop",onMouseDown:f=>{f.target===f.currentTarget&&!i&&n()},children:o.jsxs("section",{ref:c,className:`knowledge-dialog${r?` ${r}`:""}`,role:"dialog","aria-modal":"true","aria-labelledby":a,"aria-busy":i||void 0,children:[o.jsxs("header",{className:"knowledge-dialog__header",children:[o.jsx("h2",{id:a,children:e}),o.jsx("button",{ref:l,type:"button",onClick:n,disabled:i,"aria-label":s("common.close"),children:o.jsx(wxt,{})})]}),t]})}),document.body)}function BS({message:e}){return e?o.jsx("div",{className:"knowledge-form-error",role:"alert",children:e}):null}function z6(e){return e instanceof DOMException&&e.name==="AbortError"}function kxt(e,t){if(!e)return"";const n=Date.parse(e);return Number.isFinite(n)?new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(n):e}const AEe=[".jpg",".jpeg",".png"].join(","),Ext=new Set(AEe.split(",")),_Ee=[".pdf",".pptx",".docx",".xlsx",".txt"].join(","),Cxt=new Set(_Ee.split(",")),Txt=200*1024*1024;function V6(e){const t=e.lastIndexOf(".");return t<0?"":e.slice(t).toLocaleLowerCase()}function Axt(e,t,n){return e.size>Txt?n("knowledge.errors.fileTooLarge"):t==="image"?Ext.has(V6(e.name))?"":n("knowledge.errors.invalidImageType"):Cxt.has(V6(e.name))?"":n("knowledge.errors.invalidDocumentType")}function rU(e){return e<=0?"-":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function H6(e){var r;const t=e.type.trim().replace(/^\./,"");if(t)return t.toUpperCase();const n=e.name.trim(),i=n.includes(".")?(r=n.split(".").pop())==null?void 0:r.trim():"";return i?i.toUpperCase():"-"}function _xt({region:e,onClose:t,onCreated:n}){const{t:i}=xe("ui"),[r,s]=m.useState(""),[a,l]=m.useState(""),[c,u]=m.useState(!1),[d,f]=m.useState(!1),[h,p]=m.useState(""),g=r.trim(),b=!!(g&&!/^[A-Za-z][A-Za-z0-9_]{0,47}$/.test(g)),v=async y=>{if(y.preventDefault(),u(!0),!g||b)return;f(!0),p("");const x={name:g,description:a.trim()||void 0,region:e};try{n(await Yot(x))}catch(w){p(co(w,i("knowledge.errors.createBase")))}finally{f(!1)}};return o.jsx(yE,{title:i("knowledge.createBase"),onClose:t,busy:d,children:o.jsxs("form",{onSubmit:y=>void v(y),children:[o.jsxs("div",{className:"knowledge-dialog__body",children:[o.jsxs("label",{children:[o.jsx("span",{children:i("common.name")}),o.jsx("input",{autoFocus:!0,value:r,maxLength:48,"aria-invalid":c&&b||void 0,"aria-describedby":"knowledge-name-help",onBlur:()=>u(!0),onChange:y=>s(y.target.value)})]}),o.jsx("p",{id:"knowledge-name-help",className:`knowledge-dialog__note${c&&b?" is-error":""}`,role:c&&b?"alert":void 0,children:i(c&&b?"knowledge.invalidName":"knowledge.nameHelp")}),o.jsxs("label",{children:[o.jsx("span",{children:i("knowledge.optionalDescription")}),o.jsx("textarea",{value:a,maxLength:80,onChange:y=>l(y.target.value)})]}),o.jsx(BS,{message:h})]}),o.jsxs("footer",{className:"knowledge-dialog__actions",children:[o.jsx("button",{type:"button",onClick:t,disabled:d,children:i("common.cancel")}),o.jsx("button",{type:"submit",className:"is-primary",disabled:d||!g||b,children:i(d?"common.creating":"common.create")})]})]})})}function Nxt({item:e,onClose:t,onUpdated:n}){const{t:i}=xe("ui"),[r,s]=m.useState(e.description),[a,l]=m.useState(!1),[c,u]=m.useState(""),d=async f=>{f.preventDefault(),l(!0),u("");try{n(await Zot(e.id,e.region,{description:r.trim()}))}catch(h){u(co(h,i("knowledge.errors.updateBase")))}finally{l(!1)}};return o.jsx(yE,{title:i("knowledge.editBase"),onClose:t,busy:a,children:o.jsxs("form",{onSubmit:f=>void d(f),children:[o.jsxs("div",{className:"knowledge-dialog__body",children:[o.jsxs("label",{children:[o.jsx("span",{children:i("common.name")}),o.jsx("input",{value:e.name,disabled:!0})]}),o.jsxs("label",{children:[o.jsx("span",{children:i("common.description")}),o.jsx("textarea",{autoFocus:!0,value:r,maxLength:80,onChange:f=>s(f.target.value)})]}),o.jsx("p",{className:"knowledge-dialog__note",children:i("knowledge.descriptionOnly")}),o.jsx(BS,{message:c})]}),o.jsxs("footer",{className:"knowledge-dialog__actions",children:[o.jsx("button",{type:"button",onClick:t,disabled:a,children:i("common.cancel")}),o.jsx("button",{type:"submit",className:"is-primary",disabled:a,children:i(a?"common.saving":"common.save")})]})]})})}function NEe(e,t){if(!e.trim())return{};const n=JSON.parse(e);if(!n||Array.isArray(n)||typeof n!="object")throw new Error(t);return n}function jxt({base:e,onClose:t,onCreated:n,onAssociationInvalid:i}){const{t:r}=xe("ui"),[s,a]=m.useState("document"),[l,c]=m.useState(""),[u,d]=m.useState(""),[f,h]=m.useState(""),[p,g]=m.useState(null),[b,v]=m.useState(!1),[y,x]=m.useState("{}"),[w,O]=m.useState(""),[k,S]=m.useState(""),[E,C]=m.useState(null),N=m.useRef(null),_=m.useRef(null),j=m.useRef(null),T=m.useRef(0),L=!!w;m.useEffect(()=>{var M;E&&!L&&((M=j.current)==null||M.focus())},[L,E]);const A=M=>{L||M===s||(a(M),g(null),h(""),c(""),d(""),S(""),C(null),v(!1),T.current=0,N.current&&(N.current.value=""))},R=M=>{if(!M||s==="web")return;const B=Axt(M,s,r);if(B){g(null),c(""),d(""),S(B);return}g(M),S(""),c(M.name.replace(/\.[^.]+$/,"")),d(V6(M.name).slice(1))},P=async M=>{if(M.preventDefault(),s==="web"?!f.trim():!p)return;let B;try{B=NEe(y,r("knowledge.errors.metadataObject"))}catch(I){S(co(I,r("knowledge.errors.metadataFormat")));return}O(s==="web"?E?"save":"preview":"upload"),S("");try{if(s==="web")if(E){const I={sourceType:"url",metadata:E.metadata,url:E.preview.url,sourceTitle:E.preview.name,sourceMarkdown:E.preview.sourceMarkdown};await nlt(e.id,e.region,I),n()}else{const I=await ilt(e.id,e.region,{url:f.trim()});if(!I.sourceMarkdown.trim())throw new Error(r("knowledge.errors.noWebPreview"));C({preview:I,metadata:B})}else p&&(await rlt(e.id,e.region,{file:p,name:l.trim()||void 0,documentType:u.trim()||void 0,metadata:B}),n())}catch(I){I instanceof MR&&I.errorCode===zwe?i(I):S(co(I,r(s==="web"?E?"knowledge.errors.addWeb":"knowledge.errors.previewWeb":"knowledge.errors.uploadFile")))}finally{O("")}},$=()=>{L||(C(null),S(""),requestAnimationFrame(()=>{var M;return(M=_.current)==null?void 0:M.focus()}))};return o.jsx(yE,{title:r(E?"knowledge.previewWeb":"knowledge.addData"),onClose:t,busy:L,className:E?"knowledge-dialog--preview knowledge-dialog--web-confirm":"",children:o.jsx("form",{onSubmit:M=>void P(M),children:E?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"knowledge-preview knowledge-web-preview",children:[o.jsxs("div",{className:"knowledge-preview__meta",children:[o.jsx("strong",{title:E.preview.name,children:E.preview.name}),o.jsx("a",{href:E.preview.url,target:"_blank",rel:"noopener noreferrer",children:r("knowledge.openOriginalWeb")})]}),o.jsx("div",{className:"knowledge-preview__body","aria-live":"polite",children:o.jsx("div",{className:"knowledge-preview__markdown-shell",children:o.jsx(Bu,{text:E.preview.sourceMarkdown,allowRawHtml:!1,className:"knowledge-preview__markdown"})})}),k?o.jsx("div",{className:"knowledge-web-preview__error",children:o.jsx(BS,{message:k})}):null]}),o.jsxs("footer",{className:"knowledge-dialog__actions",children:[o.jsx("button",{type:"button",className:"is-back",onClick:$,disabled:L,children:r("knowledge.backToEdit")}),o.jsx("button",{type:"button",onClick:t,disabled:L,children:r("common.cancel")}),o.jsx("button",{ref:j,type:"submit",className:"is-primary",disabled:L,children:r(w==="save"?"common.adding":"knowledge.confirmAdd")})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"knowledge-dialog__body",children:[o.jsx("div",{className:"knowledge-source-tabs",role:"tablist","aria-label":r("knowledge.source"),children:[["image",r("knowledge.image")],["document",r("knowledge.documentFile")],["web",r("knowledge.webPage")]].map(([M,B])=>o.jsx("button",{type:"button",role:"tab",id:`knowledge-source-${M}-tab`,"aria-controls":`knowledge-source-${M}-panel`,"aria-selected":s===M,tabIndex:s===M?0:-1,className:s===M?"is-active":"",disabled:L,onClick:()=>A(M),onKeyDown:I=>{const H=["image","document","web"];if(!["ArrowLeft","ArrowRight","Home","End"].includes(I.key))return;I.preventDefault();const X=H.indexOf(M),Q=I.key==="Home"?H[0]:I.key==="End"?H[H.length-1]:H[(X+(I.key==="ArrowRight"?1:-1)+H.length)%H.length];A(Q),requestAnimationFrame(()=>{var q;return(q=document.getElementById(`knowledge-source-${Q}-tab`))==null?void 0:q.focus()})},children:B},M))}),o.jsx("div",{id:`knowledge-source-${s}-panel`,className:"knowledge-source-panel",role:"tabpanel","aria-labelledby":`knowledge-source-${s}-tab`,children:s==="web"?o.jsxs(o.Fragment,{children:[o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.webUrl")}),o.jsx("input",{ref:_,autoFocus:!0,type:"url",value:f,disabled:L,onChange:M=>{h(M.target.value),S("")},placeholder:"https://example.com/article"})]}),o.jsx("div",{className:"knowledge-upload-status",role:"status","aria-live":"polite",children:w==="preview"?o.jsx(En,{children:r("knowledge.generatingWebPreview")}):null})]}):o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:N,className:"knowledge-upload-input",type:"file","aria-label":r("knowledge.selectFile"),accept:s==="image"?AEe:_Ee,disabled:L,onChange:M=>{var B;R(((B=M.currentTarget.files)==null?void 0:B[0])??null),M.currentTarget.value=""}}),o.jsxs("button",{type:"button",className:`knowledge-upload-dropzone${b?" is-dragging":""}${p?" is-ready":""}`,disabled:L,onClick:()=>{var M;return(M=N.current)==null?void 0:M.click()},onDragEnter:M=>{M.preventDefault(),!L&&(T.current+=1,v(!0))},onDragOver:M=>{M.preventDefault(),L||(M.dataTransfer.dropEffect="copy")},onDragLeave:M=>{M.preventDefault(),T.current=Math.max(0,T.current-1),T.current===0&&v(!1)},onDrop:M=>{var B;M.preventDefault(),T.current=0,v(!1),L||R(((B=M.dataTransfer.files)==null?void 0:B[0])??null)},children:[o.jsx("strong",{children:p?p.name:r("knowledge.selectOrDropFile")}),o.jsx("span",{children:p?r("knowledge.selectedFile",{size:rU(p.size)}):r(s==="image"?"knowledge.imageFileHelp":"knowledge.documentFileHelp")})]}),o.jsx("div",{className:"knowledge-upload-status",role:"status","aria-live":"polite",children:L?o.jsx(En,{children:r("knowledge.uploadingFile")}):null})]})}),s!=="web"?o.jsxs("div",{className:"knowledge-dialog__fields",children:[o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.optionalName")}),o.jsx("input",{value:l,disabled:L,maxLength:256,onChange:M=>c(M.target.value)})]}),o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.optionalType")}),o.jsx("input",{value:u,disabled:L,maxLength:64,onChange:M=>d(M.target.value),placeholder:"pdf, docx, png"})]})]}):null,o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.metadataJson")}),o.jsx("textarea",{className:"is-code",value:y,disabled:L,onChange:M=>x(M.target.value),spellCheck:!1})]}),o.jsx(BS,{message:k})]}),o.jsxs("footer",{className:"knowledge-dialog__actions",children:[o.jsx("button",{type:"button",onClick:t,disabled:L,children:r("common.cancel")}),o.jsx("button",{type:"submit",className:"is-primary",disabled:L||(s==="web"?!f.trim():!p),children:r(L?s==="web"?"common.generating":"common.uploading":s==="web"?"knowledge.generatePreview":"knowledge.uploadFile")})]})]})})})}function Rxt({base:e,item:t,onClose:n,onUpdated:i}){const{t:r}=xe("ui"),[s,a]=m.useState(()=>JSON.stringify(t.metadata??{},null,2)),[l,c]=m.useState(!1),[u,d]=m.useState(""),f=async h=>{h.preventDefault();let p;try{p=NEe(s,r("knowledge.errors.metadataObject"))}catch(g){d(co(g,r("knowledge.errors.metadataFormat")));return}c(!0),d("");try{i(await slt(e.id,t.id,e.region,{metadata:p}))}catch(g){d(co(g,r("knowledge.errors.updateDocument")))}finally{c(!1)}};return o.jsx(yE,{title:r("knowledge.editMetadata"),onClose:n,busy:l,children:o.jsxs("form",{onSubmit:h=>void f(h),children:[o.jsxs("div",{className:"knowledge-dialog__body",children:[o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.knowledge")}),o.jsx("input",{value:t.name||t.id,disabled:!0})]}),o.jsxs("label",{children:[o.jsx("span",{children:r("knowledge.metadataJson")}),o.jsx("textarea",{autoFocus:!0,className:"is-code knowledge-metadata-editor",value:s,onChange:h=>a(h.target.value),spellCheck:!1})]}),o.jsx(BS,{message:u})]}),o.jsxs("footer",{className:"knowledge-dialog__actions",children:[o.jsx("button",{type:"button",onClick:n,disabled:l,children:r("common.cancel")}),o.jsx("button",{type:"submit",className:"is-primary",disabled:l,children:r(l?"common.saving":"common.save")})]})]})})}const jEe=new Set(["avif","bmp","gif","jpeg","jpg","png","svg","webp"]),REe=new Set(["aac","flac","m4a","mp3","ogg","wav","webm"]),IEe=new Set(["m4v","mov","mp4","mpeg","mpg","ogg","webm"]),Ixt=new Set(["pdf"]),Pxt=new Set(["doc","docx","ppt","pptx","xls","xlsx"]),Dxt=new Set(["creating","indexing","pending","processing","queued","submitted"]),Mxt=new Set(["error","failed","unavailable"]);function _Y(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{}}function _T(e){if(e==null||e==="")return"-";if(["string","number","boolean"].includes(typeof e))return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function Lxt(e,t){if(Array.isArray(e)){if(e.length===0)return null;const r=e.map(_Y);if(r.some(s=>Object.keys(s).length>0)){const s=[...new Set(r.flatMap(a=>Object.keys(a)))];return{columns:s,rows:r.map(a=>s.map(l=>_T(a[l])))}}return{columns:[t("knowledge.value")],rows:e.map(s=>[_T(s)])}}const n=_Y(e),i=Object.entries(n);if(i.length===0)return null;if(i.every(([,r])=>Array.isArray(r))){const r=i.map(([a])=>a),s=Math.max(...i.map(([,a])=>a.length));return{columns:r,rows:Array.from({length:s},(a,l)=>i.map(([,c])=>_T(c[l])))}}return{columns:[t("knowledge.field"),t("knowledge.value")],rows:i.map(([r,s])=>[r,_T(s)])}}function PEe(e){const t=e.trim();if(!t||t.startsWith("//"))return"";if(t.startsWith("/"))return t;try{const n=new URL(t);return["http:","https:"].includes(n.protocol)?n.href:""}catch{return""}}function $xt(e){const t=PEe(e);return t.startsWith("http://")||t.startsWith("https://")?t:""}function Fxt(e){var r;const t=e.attachmentType.trim().toLocaleLowerCase();if(t==="image"||t==="doc-image"||t.startsWith("image/"))return"image";if(t==="audio"||t.startsWith("audio/"))return"audio";if(t==="video"||t.startsWith("video/"))return"video";if(t==="pdf"||t==="application/pdf")return"pdf";const n=e.attachmentUrl.split(/[?#]/,1)[0],i=n.includes(".")?((r=n.split(".").pop())==null?void 0:r.toLocaleLowerCase())??"":"";return jEe.has(i)?"image":REe.has(i)?"audio":IEe.has(i)?"video":Ixt.has(i)?"pdf":t||i?"file":"none"}function Bxt(e,t){const n=e.status.trim().toLocaleLowerCase();if(Dxt.has(n))return{title:t("knowledge.preview.processingTitle"),detail:t("knowledge.preview.processingDetail")};if(Mxt.has(n))return{title:t("knowledge.preview.failedTitle"),detail:t("knowledge.preview.failedDetail")};const i=H6(e).toLocaleLowerCase();return i==="pdf"||Pxt.has(i)?{title:t("knowledge.preview.noParsedTitle"),detail:t("knowledge.preview.noParsedDetail")}:jEe.has(i)||REe.has(i)||IEe.has(i)?{title:t("knowledge.preview.noMediaTitle"),detail:t("knowledge.preview.noMediaDetail")}:{title:t("knowledge.preview.noDataTitle"),detail:t("knowledge.preview.noDataDetail")}}function Uxt({chunk:e}){const{t}=xe("ui"),[n,i]=m.useState(!1),r=PEe(e.attachmentUrl),s=Fxt(e);return!r||s==="none"?null:n?o.jsx("div",{className:"knowledge-preview__attachment-error",children:t("knowledge.preview.attachmentError")}):s==="image"?o.jsx("img",{className:"knowledge-preview__image",src:r,alt:e.title||t("knowledge.preview.imageAlt"),loading:"lazy",onError:()=>i(!0)}):s==="audio"?o.jsx("audio",{className:"knowledge-preview__audio",src:r,controls:!0,preload:"metadata",onError:()=>i(!0),children:t("knowledge.preview.audioUnsupported")}):s==="video"?o.jsx("video",{className:"knowledge-preview__video",src:r,controls:!0,playsInline:!0,preload:"metadata",onError:()=>i(!0),children:t("knowledge.preview.videoUnsupported")}):s==="pdf"?o.jsxs("div",{className:"knowledge-preview__pdf",children:[o.jsx("iframe",{src:r,title:e.title?t("knowledge.preview.namedPdf",{name:e.title}):t("knowledge.preview.pdf"),sandbox:"",referrerPolicy:"no-referrer",onError:()=>i(!0)}),o.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:t("knowledge.preview.openPdf")})]}):o.jsxs("div",{className:"knowledge-preview__file-fallback",children:[o.jsx("p",{children:t("knowledge.preview.fileUnsupported")}),o.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:t("knowledge.preview.openOriginalFile")})]})}function Qxt({base:e,item:t,onClose:n}){const{t:i}=xe("ui"),[r,s]=m.useState([]),[a,l]=m.useState(t),[c,u]=m.useState(""),[d,f]=m.useState(!0),[h,p]=m.useState(!1),[g,b]=m.useState(!1),[v,y]=m.useState(""),x=m.useRef(0),w=m.useRef(null),O=m.useCallback(async(C=0)=>{var j;(j=w.current)==null||j.abort();const N=new AbortController;w.current=N;const _=x.current+1;x.current=_,C>0?p(!0):f(!0),y(""),C===0&&(s([]),b(!1));try{const T=await tlt(e.id,t.id,{region:e.region,offset:C,signal:N.signal});if(x.current!==_)return;l(T.document.id?T.document:t),u(T.sourceMarkdown||T.document.sourceMarkdown),s(L=>C>0?[...L,...T.chunks]:T.chunks),b(T.hasMore)}catch(T){!z6(T)&&x.current===_&&y(co(T,i("knowledge.errors.loadPreview")))}finally{x.current===_&&(f(!1),p(!1))}},[e.id,e.region,t,i]);m.useEffect(()=>(O(),()=>{var C;(C=w.current)==null||C.abort(),x.current+=1}),[O]);const k=$xt(a.url||t.url),S=Bxt(a,i),E=a.metadata._veadk_content_format==="markdown";return o.jsx(yE,{title:a.name||t.name||t.id,onClose:n,className:"knowledge-dialog--preview",children:o.jsxs("div",{className:"knowledge-preview",children:[a.sizeBytes>0||k?o.jsxs("div",{className:"knowledge-preview__meta",children:[a.sizeBytes>0?o.jsx("span",{children:rU(a.sizeBytes)}):null,k?o.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",children:i("knowledge.openOriginalWeb")}):null]}):null,o.jsx("div",{className:"knowledge-preview__body","aria-live":"polite",children:c?o.jsx("div",{className:"knowledge-preview__markdown-shell",children:o.jsx(Bu,{text:c,allowRawHtml:!1,className:"knowledge-preview__markdown"})}):d?o.jsx("div",{className:"knowledge-preview__state",role:"status",children:o.jsx(En,{as:"span",duration:2.4,children:i("knowledge.preview.loading")})}):v&&r.length===0?o.jsxs("div",{className:"knowledge-preview__state is-error",role:"alert",children:[o.jsx("p",{children:v}),o.jsx("button",{type:"button",onClick:()=>void O(),children:i("common.retry")})]}):r.length===0?o.jsxs("div",{className:"knowledge-preview__state",children:[o.jsx("p",{children:S.title}),o.jsx("span",{children:k?i("knowledge.preview.openOriginalHint"):S.detail}),o.jsx("button",{type:"button",onClick:()=>void O(),children:i("common.reload")})]}):o.jsxs("div",{className:"knowledge-preview__chunks",children:[r.map((C,N)=>{const _=Lxt(C.tableFields,i),j=C.id||`${N}:${C.title}`;return o.jsxs("article",{className:"knowledge-preview__chunk",children:[o.jsx("header",{children:o.jsx("h3",{children:C.title||i("knowledge.preview.chunk",{index:N+1})})}),C.content?E?o.jsx(Bu,{text:C.content,allowRawHtml:!1,className:"knowledge-preview__markdown"}):o.jsx("p",{className:"knowledge-preview__content",children:C.content}):null,_?o.jsx("div",{className:"knowledge-preview__table-wrap",children:o.jsxs("table",{children:[o.jsx("thead",{children:o.jsx("tr",{children:_.columns.map((T,L)=>o.jsx("th",{scope:"col",children:T},`${T}:${L}`))})}),o.jsx("tbody",{children:_.rows.map((T,L)=>o.jsx("tr",{children:T.map((A,R)=>o.jsx("td",{children:A},R))},L))})]})}):null,o.jsx(Uxt,{chunk:C})]},j)}),v?o.jsx("div",{className:"knowledge-preview__more-error",role:"alert",children:v}):null,g?o.jsx("button",{type:"button",className:"knowledge-preview__load-more",disabled:h,onClick:()=>void O(r.length),children:h?o.jsx(En,{as:"span",duration:2.4,children:i("knowledge.preview.loadingMore")}):i("knowledge.preview.loadMore")}):null]})})]})})}function zxt({cloudProvider:e,region:t,active:n=!0,activationRevision:i=0,onDetailChange:r,toolbarLeading:s,toolbarFilters:a}){const{t:l,i18n:c}=xe("ui"),[u,d]=m.useState([]),[f,h]=m.useState({}),[p,g]=m.useState([]),[b,v]=m.useState(""),[y,x]=m.useState("overview"),[w,O]=m.useState(""),[k,S]=m.useState(""),[E,C]=m.useState(!0),[N,_]=m.useState(!1),[j,T]=m.useState(""),[L,A]=m.useState([]),[R,P]=m.useState(!1),[$,M]=m.useState(""),[B,I]=m.useState(""),[H,X]=m.useState(""),[Q,q]=m.useState(!1),[U,te]=m.useState(!1),[le,oe]=m.useState(!1),[re,pe]=m.useState(null),[K,G]=m.useState(null),[se,fe]=m.useState(null),[Se,Te]=m.useState(null),[rt,Be]=m.useState(null),[Me,Ie]=m.useState(!1),qe=m.useRef(0),Pe=m.useRef(0),Ve=m.useRef([]),ke=m.useRef(!1),Le=m.useRef(!1),Y=m.useRef(null),he=m.useRef(null),Oe=m.useRef({}),Ke=m.useRef(!1),et=m.useRef(null),Ct=m.useRef(null),je=m.useRef(null),ve=m.useRef(null),He=m.useMemo(()=>[t],[t]),it=m.useCallback(ye=>`${ye.region}\0${ye.id}`,[]),Ae=u.find(ye=>it(ye)===b)??null,Wt=!!(Ae&&H===it(Ae));m.useEffect(()=>{r==null||r(!!Ae)},[r,Ae]),m.useEffect(()=>{x("overview"),S("")},[b]);const mn=m.useMemo(()=>{const ye=w.trim().toLocaleLowerCase();return ye?u.filter(ze=>[ze.name,ze.description,ze.ownerLabel,ze.providerKnowledgeId].some(tt=>tt.toLocaleLowerCase().includes(ye))):u},[u,w]),qt=m.useMemo(()=>{const ye=k.trim().toLocaleLowerCase();return ye?L.filter(ze=>[ze.name,ze.id,H6(ze)].some(tt=>tt.toLocaleLowerCase().includes(ye))):L},[k,L]);m.useEffect(()=>{G(null)},[Ae==null?void 0:Ae.id,Ae==null?void 0:Ae.region]);const xt=m.useCallback(async(ye=!1)=>{var kt;if(ye&&(Ke.current||Object.keys(Oe.current).length===0))return;(kt=Y.current)==null||kt.abort();const ze=new AbortController;Y.current=ze;const tt=qe.current+1;qe.current=tt,Ke.current=!0,ye?_(!0):C(!0),T(""),ye||g([]);try{const _t=await Xot({regions:He,nextTokens:ye?Oe.current:void 0,signal:ze.signal});if(qe.current!==tt)return;d(en=>ye?[...en,..._t.items.filter(on=>!en.some(J=>it(J)===it(on)))]:_t.items),Oe.current=_t.nextTokens,h(_t.nextTokens);const rn=_t.failures.map(({region:en,error:on})=>`${wh(en,e)}: ${co(on,l("common.loadFailed"))}`);g(en=>ye?[...new Set([...en,...rn])]:rn),ye||v(en=>_t.items.some(on=>it(on)===en)?en:"")}catch(_t){if(z6(_t))return;qe.current===tt&&(ye?g(rn=>[...new Set([...rn,co(_t,l("knowledge.errors.loadMoreBases"))])]):T(co(_t,l("knowledge.errors.loadBases"))))}finally{qe.current===tt&&(Ke.current=!1,C(!1),_(!1))}},[it,e,He,l]),Nt=m.useCallback(async(ye,ze=!1)=>{var _t;if(ze&&ke.current)return;(_t=he.current)==null||_t.abort();const tt=new AbortController;he.current=tt;const kt=Pe.current+1;Pe.current=kt,ze||(Ve.current=[],Le.current=!1,A([]),q(!1),I("")),ke.current=!0,P(!0),ze?I(""):M("");try{const rn=await elt(ye.id,{region:ye.region,offset:ze?Ve.current.length:0,signal:tt.signal});if(Pe.current!==kt)return;X(Mt=>Mt===it(ye)?"":Mt);const en=Ve.current,on=ze?[...en,...rn.items.filter(Mt=>!Mt.id||!en.some(Cn=>Cn.id===Mt.id))]:rn.items,J=rn.hasMore&&(!ze||on.length>en.length);Ve.current=on,Le.current=J,A(on),q(J)}catch(rn){if(z6(rn))return;Pe.current===kt&&(rn instanceof MR&&rn.errorCode===zwe&&(X(it(ye)),pe(on=>on&&it(on)===it(ye)?null:on)),ze?I(co(rn,l("knowledge.errors.loadMoreData"))):M(co(rn,l("knowledge.errors.loadData"))))}finally{Pe.current===kt&&(ke.current=!1,P(!1))}},[it,l]);m.useEffect(()=>{var ye;(ye=Y.current)==null||ye.abort(),qe.current+=1,Ke.current=!1,Oe.current={},d([]),h({}),g([]),v(""),X(""),T(""),C(!0)},[e]),m.useEffect(()=>{if(n)return xt(),()=>{var ye;(ye=Y.current)==null||ye.abort(),qe.current+=1,Ke.current=!1}},[n,i,xt]),m.useEffect(()=>{var ye,ze;if(!n){(ye=he.current)==null||ye.abort(),Pe.current+=1,ke.current=!1;return}if(!Ae){(ze=he.current)==null||ze.abort(),Pe.current+=1,Ve.current=[],ke.current=!1,Le.current=!1,A([]),q(!1),I("");return}return Nt(Ae),()=>{var tt;(tt=he.current)==null||tt.abort(),Pe.current+=1,ke.current=!1}},[n,i,Ae==null?void 0:Ae.id,Ae==null?void 0:Ae.region]);const at=n&&!Ae&&!w.trim()&&!E&&!N&&!j&&Object.keys(f).length>0;m.useEffect(()=>{const ye=Ct.current,ze=et.current;if(!ye||!ze||!at)return;const tt=new IntersectionObserver(([kt])=>{kt.isIntersecting&&xt(!0)},{root:ze,rootMargin:"240px 0px",threshold:.01});return tt.observe(ye),()=>tt.disconnect()},[at,xt]);const bt=()=>{const ye=et.current;!ye||!at||ye.scrollHeight-ye.scrollTop-ye.clientHeight<=240&&xt(!0)},_e=!!(Ae&&L.length>0&&Q&&!R&&!B);m.useEffect(()=>{const ye=ve.current,ze=je.current;if(!Ae||!ye||!ze||!_e)return;const tt=new IntersectionObserver(([kt])=>{kt.isIntersecting&&Nt(Ae,!0)},{root:je.current,rootMargin:"240px 0px",threshold:.01});return tt.observe(ye),()=>tt.disconnect()},[_e,Nt,Ae==null?void 0:Ae.id,Ae==null?void 0:Ae.region]);const st=()=>{const ye=je.current;if(!Ae||!ye||!Le.current||ke.current||B)return;const{scrollHeight:ze,scrollTop:tt,clientHeight:kt}=ye;ze-tt-kt<=240&&Nt(Ae,!0)},Re=ye=>{d(ze=>ze.map(tt=>it(tt)===it(ye)?ye:tt))},gt=async()=>{if(Se){Ie(!0);try{await Jot(Se.id,Se.region),d(ye=>ye.filter(ze=>it(ze)!==it(Se))),X(ye=>ye===it(Se)?"":ye),b===it(Se)&&v(""),Te(null)}catch(ye){T(co(ye,l("knowledge.errors.deleteBase"))),Te(null)}finally{Ie(!1)}}},ut=async()=>{if(!(!Ae||!rt)){Ie(!0);try{await alt(Ae.id,rt.id,Ae.region);const ye=Ve.current.filter(ze=>ze.id!==rt.id);Ve.current=ye,A(ye),Be(null)}catch(ye){M(co(ye,l("knowledge.errors.deleteDocument"))),Be(null)}finally{Ie(!1)}}};return o.jsxs("section",{className:`knowledge-library${Ae?" is-detail":" resource-collection"}`,"aria-label":l("knowledge.library"),children:[Ae?o.jsx(sE,{className:"knowledge-library__detail",title:Ae.name,description:Ae.description||l("common.noDescription"),identitySeed:Ae.name,backLabel:l("knowledge.backToList"),onBack:()=>v(""),sections:[{key:"overview",label:l("skillCenter.overview"),content:o.jsx("section",{className:"knowledge-overview",children:o.jsxs(SB,{className:"knowledge-overview__summary",children:[o.jsxs("div",{children:[o.jsx("dt",{children:l("knowledge.provider")}),o.jsx("dd",{children:Ae.providerType||"-"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:l("knowledge.knowledgeId")}),o.jsx("dd",{className:"knowledge-keyboard-reveal",tabIndex:0,title:Ae.providerKnowledgeId,children:Ae.providerKnowledgeId||"-"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:l("knowledge.project")}),o.jsx("dd",{children:Ae.projectName||"default"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:l("knowledge.creator")}),o.jsx("dd",{children:DM(Ae.ownerLabel)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:l("skillCenter.updatedAt")}),o.jsx("dd",{children:kxt(Ae.updatedAt,c.resolvedLanguage??c.language)||"-"})]})]})})},{key:"data",label:l("knowledge.data"),content:o.jsx("section",{className:"knowledge-documents",children:o.jsx("div",{className:`knowledge-documents__body${L.length>0?" is-table":""}`,"aria-live":"polite",children:R&&L.length===0?o.jsx(Vd,{}):$&&L.length===0?o.jsxs("div",{className:"knowledge-library__state is-error",role:"alert",children:[o.jsx("p",{children:$}),Wt&&Ae.canManage?o.jsx("button",{type:"button",onClick:()=>Te(Ae),children:l("knowledge.deleteInvalidAssociation")}):o.jsx("button",{type:"button",onClick:()=>void Nt(Ae),children:l("common.retry")})]}):L.length===0?o.jsxs("div",{className:"knowledge-library__state",children:[o.jsx(Oxt,{}),o.jsx("p",{children:l("knowledge.noData")}),Ae.canManage&&o.jsx("button",{type:"button",onClick:()=>pe(Ae),children:l("knowledge.addFirstData")})]}):o.jsx(got,{rows:qt,rowKey:ye=>ye.id,rowLabel:ye=>ye.name||ye.id,columns:[{key:"name",header:l("common.name"),className:"is-primary-column",render:ye=>o.jsx("span",{title:ye.name||ye.id,children:ye.name||ye.id})},{key:"format",header:l("knowledge.format"),className:"is-compact-column",render:ye=>H6(ye)},{key:"size",header:l("knowledge.size"),className:"is-compact-column",render:ye=>rU(ye.sizeBytes)}],searchValue:k,onSearchChange:S,searchPlaceholder:l("knowledge.searchData"),searchLabel:l("knowledge.searchLibraryData"),primaryAction:Ae.canManage?{label:l(Wt?"knowledge.associationInvalid":"knowledge.addData"),disabled:Wt,title:Wt?l("knowledge.providerMissing"):void 0,onClick:()=>pe(Ae)}:void 0,rowActions:ye=>[{label:l("common.preview"),onSelect:()=>G(ye)},...Ae.canManage?[{label:l("common.edit"),onSelect:()=>fe(ye)},{label:l("common.delete"),onSelect:()=>Be(ye),danger:!0}]:[]],scrollRef:je,onScroll:st,busy:R,emptyLabel:l("knowledge.noMatchingData"),footer:R?o.jsxs("div",{className:"knowledge-document-pagination",role:"status","aria-live":"polite",children:[o.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),o.jsx("span",{children:l("knowledge.loadingMoreData")})]}):B?o.jsxs("div",{className:"knowledge-document-pagination is-error",role:"alert",children:[o.jsx("span",{children:B}),o.jsx("button",{type:"button",onClick:()=>void Nt(Ae,!0),children:l("knowledge.retryLoading")})]}):Q?o.jsx("div",{ref:ve,className:"knowledge-document-pagination",role:"status","aria-live":"polite",children:l("skillCenter.scrollForMore")}):null})})})}],activeSectionKey:y,navigationLabel:l("knowledge.details"),onSectionChange:x,actions:Ae.canManage?o.jsxs(o.Fragment,{children:[o.jsx($t,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,onClick:()=>Te(Ae),children:l("common.delete")}),o.jsx($t,{type:"button",color:"primary",size:"lg",pill:!1,onClick:()=>oe(!0),children:l("common.edit")})]}):void 0}):o.jsxs(o.Fragment,{children:[o.jsxs(Kb,{className:"knowledge-library__toolbar library-resource-toolbar",children:[s,o.jsxs("div",{className:"resource-toolbar__actions",children:[a,o.jsx(Om,{value:w,onChange:ye=>O(ye.target.value),placeholder:l("knowledge.searchBases"),"aria-label":l("knowledge.searchBases")})]})]}),o.jsxs(Gb,{ref:et,"aria-live":"polite",onScroll:bt,children:[p.length>0&&!E&&o.jsxs("div",{className:"knowledge-region-warning",role:"status",children:[o.jsx("span",{children:l("knowledge.someBasesFailed")}),o.jsx("button",{type:"button",onClick:()=>void xt(),children:l("common.retry")})]}),E&&u.length===0?o.jsx(Vd,{}):j?o.jsxs("div",{className:"knowledge-library__state is-error",role:"alert",children:[o.jsx("p",{children:j}),o.jsx("button",{type:"button",onClick:()=>void xt(),children:l("common.retry")})]}):mn.length===0&&w.trim()?o.jsxs("div",{className:"knowledge-library__state",children:[o.jsx(xxt,{}),o.jsx("p",{children:l("knowledge.noMatchingBases")})]}):o.jsxs(Bx,{children:[w.trim()?null:o.jsx(wb,{"aria-label":l("knowledge.createBase"),icon:o.jsx(Sxt,{}),onClick:()=>te(!0),children:l("knowledge.createBase")}),mn.map(ye=>o.jsx(cE,{className:"knowledge-card",title:ye.name,description:ye.description||l("common.noDescription"),metadata:[{label:l("knowledge.creator"),value:DM(ye.ownerLabel),title:DM(ye.ownerLabel)},{label:l("knowledge.project"),value:ye.projectName||"default",title:ye.projectName||"default"}],action:{label:H===it(ye)?l("knowledge.associationInvalid"):l("knowledge.addData"),icon:"plus",disabled:!ye.canManage||H===it(ye),title:ye.canManage?H===it(ye)?l("knowledge.providerMissing"):void 0:l("knowledge.noManagePermission"),onClick:()=>pe(ye)},detailAction:{label:l("common.viewDetails"),onClick:()=>v(it(ye))}},it(ye)))]}),at||N?o.jsx("div",{ref:Ct,className:"my-agent-load-more",role:"status","aria-live":"polite",children:N?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),o.jsx("span",{children:l("knowledge.loadingMoreBases")})]}):at?o.jsx("span",{children:l("skillCenter.scrollForMore")}):null}):null]})]}),U&&o.jsx(_xt,{region:t,onClose:()=>te(!1),onCreated:ye=>{d(ze=>[ye,...ze]),v(it(ye)),te(!1)}}),Ae&&le&&o.jsx(Nxt,{item:Ae,onClose:()=>oe(!1),onUpdated:ye=>{Re(ye),oe(!1)}}),Ae&&K&&o.jsx(Qxt,{base:Ae,item:K,onClose:()=>G(null)}),re&&o.jsx(jxt,{base:re,onClose:()=>pe(null),onAssociationInvalid:ye=>{X(it(re)),Ae&&it(Ae)===it(re)&&M(co(ye,l("knowledge.associationInvalid"))),pe(null)},onCreated:()=>{Ae&&it(Ae)===it(re)&&Nt(Ae),pe(null)}}),Ae&&se&&o.jsx(Rxt,{base:Ae,item:se,onClose:()=>fe(null),onUpdated:ye=>{const ze=Ve.current.map(tt=>tt.id===ye.id?ye:tt);Ve.current=ze,A(ze),fe(null)}}),Se&&o.jsx(dc,{title:l("knowledge.deleteBaseTitle"),description:l("knowledge.deleteBaseDescription",{name:Se.name}),confirmLabel:l(Me?"common.deleting":"common.delete"),variant:"danger",busy:Me,onCancel:()=>Te(null),onConfirm:()=>void gt()}),rt&&o.jsx(dc,{title:l("knowledge.deleteDocumentTitle"),description:l("knowledge.deleteDocumentDescription",{name:rt.name||rt.id}),confirmLabel:l(Me?"common.deleting":"common.delete"),variant:"danger",busy:Me,onCancel:()=>Be(null),onConfirm:()=>void ut()})]})}const Vxt="_EmptyMessage_1r5gu_1",Hxt="_IconBadge_1r5gu_16",qxt="_Title_1r5gu_54",Wxt="_Description_1r5gu_69",Kxt="_ActionRow_1r5gu_77",vE={EmptyMessage:Vxt,IconBadge:Hxt,Title:qxt,Description:Wxt,ActionRow:Kxt},On=({children:e,className:t,fill:n="static"})=>o.jsx("div",{className:mi(vE.EmptyMessage,t),"data-fill":n,children:e}),Gxt=({size:e="md",color:t="secondary",children:n,className:i})=>o.jsx("div",{className:mi(vE.IconBadge,i),"data-size":e,"data-color":t,children:n}),Xxt=({children:e,className:t,color:n="secondary"})=>o.jsx("div",{className:mi(vE.Title,t),"data-color":n,children:e}),Yxt=({children:e,className:t})=>o.jsx("div",{className:mi(vE.Description,t),children:e}),Zxt=({children:e,className:t})=>o.jsx("div",{className:mi(vE.ActionRow,t),children:e});On.Icon=Gxt;On.Title=Xxt;On.Description=Yxt;On.ActionRow=Zxt;const Jxt="/web/skill-management";class e1t extends Error{constructor(t,n,i="SKILL_MANAGEMENT_ERROR",r="",s,a=""){super(t),this.status=n,this.code=i,this.statusText=r,this.originalError=s,this.rawResponse=a,this.name="SkillManagementApiError"}}async function zh(e,t={},n=Vo){return fetch(Lo(`${Jxt}${e}`),{...t,headers:Hu(Lh(t.headers)),signal:xl(t.signal,n)})}async function DEe(e,t){let n=t,i="SKILL_MANAGEMENT_ERROR",r;const s=await e.text().catch(()=>"");try{const a=JSON.parse(s);typeof a.detail=="string"?n=a.detail:a.detail&&(n=a.detail.message||t,i=a.detail.code||i,r=a.detail.originalError)}catch{s.trim()&&(n=V("common.fallbackWithDetail",{fallback:t,detail:s.trim()}))}return new e1t(n,e.status,i,e.statusText,r,s)}async function Vh(e,t){if(!e.ok)throw await DEe(e,t);return e.json()}async function t1t(e){const t=new URLSearchParams({region:e.region,page:String(e.page),page_size:String(e.pageSize)});return e.project&&t.set("project",e.project),Vh(await zh(`/spaces?${t}`,{signal:e.signal}),V("skills.listSpacesFailed"))}async function n1t(e){return Vh(await zh("/spaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),V("skills.createSpaceFailed"))}async function i1t(e){return Vh(await zh(`/spaces/${encodeURIComponent(e.spaceId)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,description:e.description,region:e.region})}),V("skills.updateSpaceFailed"))}async function r1t(e){const t=new URLSearchParams({region:e.region});await Vh(await zh(`/spaces/${encodeURIComponent(e.spaceId)}?${t}`,{method:"DELETE"}),V("skills.deleteSpaceFailed"))}async function s1t(e){const t=new URLSearchParams({region:e.region});return e.project&&t.set("project",e.project),Vh(await zh(`/spaces/${encodeURIComponent(e.spaceId)}/skills?${t}`,{method:"POST",headers:{"Content-Type":"application/zip"},body:e.file},ls),V("skills.uploadFailed"))}async function a1t(e){return Vh(await zh("/validate",{method:"POST",headers:{"Content-Type":"application/zip"},body:e},ls),V("skills.validateFailed"))}async function o1t(e){const t=new URLSearchParams({region:e.region});await Vh(await zh(`/spaces/${encodeURIComponent(e.spaceId)}/skills/${encodeURIComponent(e.skillId)}?${t}`,{method:"DELETE"}),V("skills.deleteFailed"))}async function l1t(e){const t=new URLSearchParams({region:e.region});e.version&&t.set("version",e.version),e.skillSpaceName&&t.set("skill_space_name",e.skillSpaceName),e.skillName&&t.set("skill_name",e.skillName);const n=await Vh(await zh(`/spaces/${encodeURIComponent(e.spaceId)}/skills/${encodeURIComponent(e.skillId)}/files?${t}`),V("skills.listFilesFailed"));return Array.isArray(n.files)?n.files:[]}async function c1t(e){var l;const t=new URLSearchParams({region:e.region});e.version&&t.set("version",e.version),e.skillSpaceName&&t.set("skill_space_name",e.skillSpaceName),e.skillName&&t.set("skill_name",e.skillName);const n=await zh(`/spaces/${encodeURIComponent(e.spaceId)}/skills/${encodeURIComponent(e.skillId)}/archive?${t}`,{},ls);n.ok||await Vh(n,V("skills.downloadFailed"));const r=((l=(n.headers.get("content-disposition")||"").match(/filename="([^"]+)"/))==null?void 0:l[1])||`${e.fallbackName}.zip`,s=URL.createObjectURL(await n.blob()),a=document.createElement("a");a.href=s,a.download=r,a.click(),URL.revokeObjectURL(s)}async function GR(e){const t=await fetch(e,{headers:{accept:"application/json"},signal:xl(void 0,Vo)});if(!t.ok)throw await DEe(t,It("helpers.skills.agentKitRequestFailed"));return t.json()}async function MEe(){return(await GR("/web/skill-spaces")).items||[]}async function LEe(e,t){const n=t?`?region=${encodeURIComponent(t)}`:"";return(await GR(`/web/skill-spaces/${encodeURIComponent(e)}/skills${n}`)).items||[]}async function u1t(e,t){const n=new URLSearchParams({region:t.region,page:String(t.page),page_size:String(t.pageSize)});return t.project&&n.set("project",t.project),GR(`/web/skill-spaces/${encodeURIComponent(e)}/skills?${n.toString()}`)}async function d1t(e,t,n,i,r,s,a){const l=[];n&&l.push(`version=${encodeURIComponent(n)}`),i&&l.push(`region=${encodeURIComponent(i)}`),r&&l.push(`project=${encodeURIComponent(r)}`),s&&l.push(`skill_name=${encodeURIComponent(s)}`),a&&l.push(`skill_space_name=${encodeURIComponent(a)}`);const c=l.length>0?`?${l.join("&")}`:"";return GR(`/web/skill-spaces/${encodeURIComponent(e)}/skills/${encodeURIComponent(t)}${c}`)}function f1t(e,t){return{source:"skillspace",id:`ss:${e.id}/${t.skillId}/${t.version}`,name:t.skillName,description:t.skillDescription,folder:t.skillName,skillSpaceId:e.id,skillSpaceName:e.name,skillSpaceRegion:e.region,skillId:t.skillId,version:t.version}}function h1t(e,t,n="volcengine"){return n==="byteplus"?"":`https://console.volcengine.com/agentkit/${(t||"cn-beijing")==="cn-beijing"?"cn":"cn-shanghai"}/skillspace/detail/${encodeURIComponent(e)}`}Zt.hasResourceBundle("en-US","skills")||Zt.addResourceBundle("en-US","skills",Wae,!0,!0);Zt.hasResourceBundle("zh-CN","skills")||Zt.addResourceBundle("zh-CN","skills",ude,!0,!0);function Dt(e,t={}){return Zt.t(e,{...t,ns:"skills"})}const p1t="/web/skill-workbench";class q6 extends Error{constructor(t,n,i="SKILL_WORKBENCH_ERROR",r=!1,s="",a,l=""){super(t),this.status=n,this.code=i,this.retryable=r,this.statusText=s,this.originalError=a,this.rawResponse=l,this.name="SkillWorkbenchApiError"}}function Jc(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Error(Dt("api.invalidFormat",{label:t}));return e}function NY(e,t){if(e!=null){if(typeof e!="string"||!e.trim()||e.trim().length>256)throw new Error(Dt("api.invalidFormat",{label:t}));return e.trim()}}function m1t(e){if(e!=null){if(e==="pending"||e==="ready"||e==="failed"||e==="unknown")return e;throw new Error(Dt("api.invalidFormat",{label:Dt("api.recoveryStatus")}))}}async function Hd(e,t={},n=Vo){return fetch(Lo(`${p1t}${e}`),{...t,headers:Lh(t.headers),signal:xl(t.signal,n)})}async function sU(e,t){var i;const n=await e.text().catch(()=>"");try{const r=Jc(JSON.parse(n),Dt("api.errorResponse")),s=r.detail&&typeof r.detail=="object"?Jc(r.detail,Dt("api.errorDetails")):r;return new q6(typeof s.message=="string"?s.message:t,e.status,typeof s.code=="string"?s.code:"SKILL_WORKBENCH_ERROR",s.retryable===!0,e.statusText,s.originalError&&typeof s.originalError=="object"?s.originalError:void 0,n)}catch{const r=((i=e.headers.get("content-type"))==null?void 0:i.split(";",1)[0])||Dt("api.missingContentType");return new q6(Dt("api.gatewayError",{fallback:t,status:e.status,contentType:r}),e.status,"SKILL_WORKBENCH_ERROR",!1,e.statusText,void 0,n)}}async function Sm(e,t){if(!e.ok)throw await sU(e,t);const n=e.headers.get("content-type")??"";if(!n.includes("application/json")){const i=n.split(";",1)[0]||Dt("api.missingContentType");throw new Error(Dt("api.nonJson",{fallback:t,status:e.status,contentType:i}))}return e.json()}function g1t(e){return Array.isArray(e)?e.map(t=>{const n=Jc(t,Dt("api.activity")),i=n.kind,r=n.status;if(typeof n.id!="string"||!["status","thinking","message","tool"].includes(String(i))||!["running","done"].includes(String(r)))throw new Error(Dt("api.invalidActivity"));if(i==="tool"){if(typeof n.name!="string")throw new Error(Dt("api.invalidToolActivity"));return{id:n.id,kind:i,status:r,name:n.name,...n.input!==void 0?{args:n.input}:{},...n.output!==void 0?{response:n.output}:{}}}if(typeof n.text!="string")throw new Error(Dt("api.invalidTextActivity"));return{id:n.id,kind:i,status:r,text:n.text}}):[]}function b1t(e){if(e==null)return;const t=Jc(e,Dt("api.publication"));if(typeof t.revision!="number"||typeof t.skillId!="string"||typeof t.version!="string"||!Array.isArray(t.skillSpaceIds)||!t.skillSpaceIds.every(n=>typeof n=="string")||t.disposition!=="create-new"&&t.disposition!=="update-source"||!qj(t.region)||typeof t.projectName!="string")throw new Error(Dt("api.invalidFormat",{label:Dt("api.publication")}));return{revision:t.revision,skillId:t.skillId,version:t.version,skillSpaceIds:t.skillSpaceIds,disposition:t.disposition,region:t.region,projectName:t.projectName}}function US(e){const t=Jc(e,Dt("api.task"));if(typeof t.jobId!="string"||t.operation!=="create"&&t.operation!=="optimize"||typeof t.intent!="string"||typeof t.revision!="number"||typeof t.state!="string")throw new Error(Dt("api.invalidFormat",{label:Dt("api.task")}));const n=Array.isArray(t.files)?t.files.flatMap(l=>{const c=Jc(l,Dt("api.file"));return typeof c.path=="string"&&typeof c.size=="number"?[{path:c.path,size:c.size}]:[]}):[];if(!["running","ready","failed","cancelled","expired","published"].includes(t.state))throw new Error(Dt("api.unknownTaskState"));const r=NY(t.toolId,"Tool ID"),s=NY(t.sessionId,"Session ID"),a=m1t(t.recoveryStatus);return{jobId:t.jobId,operation:t.operation,intent:t.intent,...typeof t.model=="string"?{model:t.model}:{},...typeof t.style=="string"?{style:t.style}:{},...typeof t.requestedName=="string"?{requestedName:t.requestedName}:{},revision:t.revision,...r?{toolId:r}:{},...s?{sessionId:s}:{},...typeof t.sessionTtlSeconds=="number"?{sessionTtlSeconds:t.sessionTtlSeconds}:{},...typeof t.expiresAt=="string"?{expiresAt:t.expiresAt}:{},...typeof t.recoveryAvailable=="boolean"?{recoveryAvailable:t.recoveryAvailable}:{},...a?{recoveryStatus:a}:{},...typeof t.recoveredFromSnapshot=="boolean"?{recoveredFromSnapshot:t.recoveredFromSnapshot}:{},state:t.state,stage:typeof t.stage=="string"?t.stage:"generating",activities:g1t(t.activities),files:n,...t.source&&typeof t.source=="object"?{source:t.source}:{},...typeof t.name=="string"?{name:t.name}:{},...typeof t.description=="string"?{description:t.description}:{},...typeof t.skillMd=="string"?{skillMd:t.skillMd}:{},...typeof t.error=="string"?{error:t.error}:{},...t.validation&&typeof t.validation=="object"?{validation:t.validation}:{},...t.publication?{publication:b1t(t.publication)}:{}}}async function XR(e){const t=Jc(await Sm(await Hd("/capabilities",{signal:e}),Dt("api.loadCapability")),Dt("api.capability"));return{enabled:t.enabled===!0,reason:typeof t.reason=="string"?t.reason:"",operations:Array.isArray(t.operations)?t.operations.filter(n=>n==="create"||n==="optimize"):[],models:Array.isArray(t.models)?t.models.flatMap(n=>{if(!n||typeof n!="object")return[];const i=n;return typeof i.id=="string"&&typeof i.label=="string"?[{id:i.id,label:i.label}]:[]}):[],styles:t.styles&&typeof t.styles=="object"&&!Array.isArray(t.styles)?Object.fromEntries(Object.entries(t.styles).filter(n=>typeof n[1]=="string")):{},...typeof t.maxUploadBytes=="number"?{maxUploadBytes:t.maxUploadBytes}:{}}}async function y1t(e){if(e.file){const n=new URLSearchParams({operation:"optimize",intent:e.intent});e.jobId&&n.set("job_id",e.jobId),e.model&&n.set("model",e.model),e.style&&n.set("style",e.style),e.name&&n.set("name",e.name);const i=await Hd(`/tasks/from-upload?${n}`,{method:"POST",body:e.file,headers:{"Content-Type":"application/zip"},signal:e.signal},ls);return US(await Sm(i,Dt("api.startOptimization")))}const t=await Hd("/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operation:e.operation,intent:e.intent,...e.model?{model:e.model}:{},...e.style?{style:e.style}:{},...e.name?{name:e.name}:{},...e.jobId?{jobId:e.jobId}:{},...e.source?{source:{kind:"skill-center",skillId:e.source.skillId,skillName:e.source.name,version:e.source.version,region:e.source.region,projectName:e.source.projectName,skillSpaceId:e.source.skillSpaceId,skillSpaceName:e.source.skillSpaceName}}:{}}),signal:e.signal},ls);return US(await Sm(t,Dt("api.startTask")))}async function v1t(e,t){return US(await Sm(await Hd(`/tasks/${encodeURIComponent(e)}`,{signal:t}),Dt("api.loadTask")))}async function MM(e,t,n){const i=new URLSearchParams;i.set("expected_revision",String(t));const r=Jc(await Sm(await Hd(`/tasks/${encodeURIComponent(e)}/artifact?${i.toString()}`,{signal:n}),Dt("api.loadArtifact")),Dt("api.artifact"));if(r.jobId!==e||r.revision!==t||!Number.isSafeInteger(r.revision)||r.revision<1||typeof r.sha256!="string"||!/^[0-9a-f]{64}$/.test(r.sha256)||typeof r.name!="string"||typeof r.description!="string"||!Array.isArray(r.files))throw new Error(Dt("api.invalidFormat",{label:Dt("api.artifact")}));const s=r.files.map(a=>{const l=Jc(a,Dt("api.artifactFile"));if(typeof l.path!="string"||typeof l.size!="number"||typeof l.content!="string")throw new Error(Dt("api.invalidFormat",{label:Dt("api.artifactFile")}));return{path:l.path,size:l.size,content:l.content}});return{jobId:r.jobId,revision:r.revision,sha256:r.sha256,name:r.name,description:r.description,files:s}}async function LM(e){const t=await Hd(`/tasks/${encodeURIComponent(e.jobId)}/refinements`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({intent:e.intent,expectedRevision:e.expectedRevision})},ls);return US(await Sm(t,Dt("api.refine")))}async function x1t(e){const t=await Hd(`/tasks/${encodeURIComponent(e.jobId)}/stop`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expectedRevision:e.expectedRevision})});return US(await Sm(t,Dt("api.stop")))}async function O1t(e){const t=await Hd(`/tasks/${encodeURIComponent(e.jobId)}/publish-stream`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/x-ndjson"},body:JSON.stringify({disposition:e.disposition,expectedRevision:e.expectedRevision,expectedArtifactSha256:e.expectedArtifactSha256,skillSpaceIds:e.skillSpaceIds??[],projectName:e.projectName,region:e.region}),signal:e.signal},0);if(!t.ok)throw await sU(t,Dt("api.publish"));if(!(t.headers.get("content-type")??"").includes("application/x-ndjson"))throw new Error(Dt("api.nonNdjson"));if(!t.body)throw new Error(Dt("api.missingStream"));const i=new Set(["preparing","uploading","registering","activating","publishing"]);let r=null,s="";const a=new TextDecoder,l=t.body.getReader(),c=u=>{var h;if(!u.trim())return;const d=Jc(JSON.parse(u),Dt("api.publishProgress"));if(d.type==="progress"){if(typeof d.phase!="string"||!i.has(d.phase)||typeof d.message!="string")throw new Error(Dt("api.invalidPublishProgress"));(h=e.onProgress)==null||h.call(e,{phase:d.phase,message:d.message});return}if(d.type==="error"){const p=Jc(d.error,Dt("api.publishError"));throw new q6(typeof p.message=="string"?p.message:Dt("api.publish"),500,typeof p.code=="string"?p.code:"SKILL_PUBLISH_FAILED",p.retryable===!0,"",p.originalError&&typeof p.originalError=="object"?p.originalError:void 0,JSON.stringify(d.error))}if(d.type!=="complete")throw new Error(Dt("api.unknownPublishEvent"));const f=Jc(d.result,Dt("api.publishResult"));if(typeof f.skillId!="string"||typeof f.version!="string"||!Array.isArray(f.skillSpaceIds)||!f.skillSpaceIds.every(p=>typeof p=="string")||f.disposition!=="create-new"&&f.disposition!=="update-source"||!qj(f.region)||typeof f.projectName!="string")throw new Error(Dt("api.invalidFormat",{label:Dt("api.publishResult")}));r={skillId:f.skillId,version:f.version,skillSpaceIds:f.skillSpaceIds,disposition:f.disposition,region:f.region,projectName:f.projectName}};for(;;){const{value:u,done:d}=await l.read();s+=a.decode(u,{stream:!d});const f=s.split(` +`);if(s=f.pop()??"",f.forEach(c),d)break}if(c(s),!r)throw new Error(Dt("api.streamEnded"));return r}async function w1t(e){await Sm(await Hd(`/tasks/${encodeURIComponent(e)}`,{method:"DELETE"}),Dt("api.deleteTask"))}async function S1t(e,t,n){var c;const i=new URLSearchParams;i.set("expected_revision",String(t)),i.set("expected_sha256",n);const r=await Hd(`/tasks/${encodeURIComponent(e)}/download?${i.toString()}`,{},ls);if(!r.ok)throw await sU(r,Dt("api.download"));const a=((c=(r.headers.get("content-disposition")??"").match(/filename="([^"]+)"/))==null?void 0:c[1])??"skill.zip",l=URL.createObjectURL(await r.blob());try{const u=document.createElement("a");u.href=l,u.download=a,u.click()}finally{URL.revokeObjectURL(l)}}const k1t={formatDate(e){const t=e.value??e.date??e.timestamp;if(t==null)return"";const n=new Date(t);return isNaN(n.getTime())?String(t):n.toLocaleString()}};function E1t(e,t){if(!t||t==="/")return e;const n=t.replace(/^\//,"").split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));let i=e;for(const r of n){if(i==null||typeof i!="object")return;i=i[r]}return i}function C1t(e){return typeof e=="object"&&e!==null&&typeof e.path=="string"}function T1t(e){return typeof e=="object"&&e!==null&&typeof e.call=="string"}function aU(e,t){if(C1t(e))return E1t(t,e.path);if(T1t(e)){const n=k1t[e.call],i={};for(const[r,s]of Object.entries(e.args??{}))i[r]=aU(s,t);return n?n(i):`[unknown fn: ${e.call}]`}return e}function A1t(e,t){const n=aU(e,t);return n==null?"":typeof n=="string"?n:String(n)}const $Ee=new Map;function t0(e,t){$Ee.set(e,t)}function _1t(e){return $Ee.get(e)}function N1t(e,t,n){const i=t.replace(/^\//,"").split("/").map(s=>s.replace(/~1/g,"/").replace(/~0/g,"~"));let r=e;for(let s=0;saU(i,e.dataModel),resolveString:i=>A1t(i,e.dataModel),dispatchAction:t,render:i=>{if(!i)return null;const r=e.components[i];if(!r)return null;const s=_1t(r.component)??j1t;return o.jsx(s,{node:r,ctx:n},i)}};return o.jsx("div",{className:"a2ui-surface","data-a2ui-surface":e.surfaceId,children:n.render(e.rootId)})}function BEe(e){const t=m.useRef(null),n=m.useRef(!0),i=28,r=m.useCallback(()=>{const s=t.current;s&&(n.current=s.scrollHeight-s.scrollTop-s.clientHeight{const s=t.current;s&&n.current&&(s.scrollTop=s.scrollHeight)},[e]),{ref:t,onScroll:r}}function YR({value:e,skillPrefix:t="/",onRemoveSkill:n,onRemoveAgent:i}){const{t:r}=xe("conversation");return e.skills.length===0&&!e.targetAgent?null:o.jsxs("div",{className:"invocation-chips","aria-label":r("invocation.ariaLabel"),children:[e.skills.map(s=>o.jsxs("span",{className:"invocation-chip invocation-chip--skill",title:s.description,children:[o.jsx(uS,{"aria-hidden":!0}),o.jsxs("span",{children:[t,s.name]}),n?o.jsx("button",{type:"button",onClick:()=>n(s.name),"aria-label":r("invocation.removeSkill",{name:s.name}),children:o.jsx(Ra,{})}):null]},s.name)),e.targetAgent?o.jsxs("span",{className:"invocation-chip invocation-chip--agent",title:e.targetAgent.description,children:[o.jsx(ybe,{"aria-hidden":!0}),o.jsx("span",{children:e.targetAgent.name}),i?o.jsx("button",{type:"button",onClick:i,"aria-label":r("invocation.removeAgent",{name:e.targetAgent.name}),children:o.jsx(Ra,{})}):null]}):null]})}function oU(e=""){return e.startsWith("image/")?"image":e.startsWith("video/")?"video":e==="application/pdf"?"pdf":e==="text/markdown"?"markdown":"text"}function UEe(e){var n,i,r,s;const t=oU(e.mimeType);return t==="pdf"?"PDF":t==="markdown"?"MD":t==="video"?((i=(n=e.mimeType)==null?void 0:n.split("/")[1])==null?void 0:i.toUpperCase())??"VIDEO":t==="image"?((s=(r=e.mimeType)==null?void 0:r.split("/")[1])==null?void 0:s.toUpperCase())??"IMAGE":"TXT"}function QEe(e){return e?e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`:""}function zEe(e,t){return e.previewUrl?e.previewUrl:e.data?`data:${e.mimeType??"application/octet-stream"};base64,${e.data}`:e.uri?Kbe(t,e.uri):""}function I1t({kind:e}){return e==="image"?o.jsx(NF,{}):e==="video"?o.jsx(Obe,{}):e==="pdf"?o.jsx(s7e,{}):o.jsx(AF,{})}function ZR({appName:e,items:t,compact:n=!1,onRemove:i}){const{t:r}=xe("conversation"),[s,a]=m.useState(null);return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:`media-grid${n?" media-grid--compact":""}`,children:t.map(l=>{const c=oU(l.mimeType),u=zEe(l,e),d=l.status==="uploading"||l.status==="error"||!u,f=o.jsxs("button",{type:"button",className:"media-card-main",disabled:d,onClick:c==="image"?void 0:()=>a(l),"aria-label":r("media.preview",{name:l.name??r("media.attachment")}),children:[c==="image"&&u?o.jsx("img",{className:"media-card-image",src:u,alt:l.name??r("media.image"),loading:"lazy"}):c==="video"&&u?o.jsxs("div",{className:"media-card-video-container",children:[o.jsx("video",{className:"media-card-video",src:u,muted:!0,playsInline:!0,preload:"metadata","aria-hidden":"true"}),o.jsx("span",{className:"media-card-video-play",children:o.jsx(b7e,{})})]}):o.jsx("span",{className:"media-card-icon",children:o.jsx(I1t,{kind:c})}),o.jsxs("span",{className:"media-card-copy",children:[o.jsx("span",{className:"media-card-name",children:l.name??r("media.attachment")}),o.jsxs("span",{className:"media-card-meta",children:[o.jsx("span",{className:"media-card-type",children:UEe(l)}),l.status==="uploading"?o.jsxs(o.Fragment,{children:[o.jsx(hi,{className:"media-card-spinner"})," ",r("media.uploading")]}):l.status==="error"?l.error??r("media.uploadFailed"):QEe(l.sizeBytes)]})]}),!n&&l.status!=="uploading"&&l.status!=="error"?o.jsx(Vy,{className:"media-card-open"}):null]});return o.jsxs(mr.div,{className:`media-card media-card--${c}${l.status==="error"?" media-card--error":""}`,layout:!0,initial:{opacity:0,scale:.985,y:4},animate:{opacity:1,scale:1,y:0},children:[c==="image"&&!d?o.jsx(ube,{src:u,children:f}):f,i?o.jsx("button",{type:"button",className:"media-card-remove","aria-label":r("media.remove",{name:l.name??r("media.attachment")}),onClick:()=>i(l.id),children:o.jsx(Ra,{})}):null]},l.id)})}),o.jsx(Ru,{children:s?o.jsx(P1t,{appName:e,item:s,onClose:()=>a(null)}):null})]})}function P1t({appName:e,item:t,onClose:n}){const{t:i}=xe("conversation"),r=m.useMemo(()=>zEe(t,e),[e,t]),s=oU(t.mimeType),[a,l]=m.useState(""),[c,u]=m.useState(s==="text"||s==="markdown"),[d,f]=m.useState("");return m.useEffect(()=>{const h=p=>{p.key==="Escape"&&n()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[n]),m.useEffect(()=>{if(s!=="text"&&s!=="markdown")return;const h=new AbortController;return u(!0),f(""),fetch(r,{signal:h.signal}).then(p=>{if(!p.ok)throw new Error(`HTTP ${p.status}`);return p.text()}).then(l).catch(p=>{h.signal.aborted||f(p instanceof Error?p.message:String(p))}).finally(()=>{h.signal.aborted||u(!1)}),()=>h.abort()},[s,r]),o.jsx(mr.div,{className:"media-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":i("media.previewDialog",{name:t.name??i("media.attachment")}),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onMouseDown:h=>{h.target===h.currentTarget&&n()},children:o.jsxs(mr.div,{className:"media-viewer",initial:{opacity:0,y:18,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.99},transition:{type:"spring",stiffness:420,damping:30},children:[o.jsxs("header",{className:"media-viewer-header",children:[o.jsxs("div",{children:[o.jsx("strong",{children:t.name??i("media.attachment")}),o.jsxs("span",{children:[UEe(t),t.sizeBytes?` · ${QEe(t.sizeBytes)}`:""]})]}),o.jsxs("nav",{children:[o.jsx("a",{href:r,download:t.name,"aria-label":i("media.download"),children:o.jsx(Qj,{})}),o.jsx("button",{type:"button",onClick:n,"aria-label":i("media.close"),children:o.jsx(Ra,{})})]})]}),o.jsxs("div",{className:`media-viewer-body media-viewer-body--${s}`,children:[s==="image"?o.jsx("img",{src:r,alt:t.name??i("media.image")}):null,s==="video"?o.jsx("div",{className:"media-viewer-video-wrapper",children:o.jsx("video",{src:r,controls:!0,autoPlay:!0,playsInline:!0,preload:"auto",className:"media-viewer-video"})}):null,s==="pdf"?o.jsx("iframe",{src:r,title:t.name??"PDF"}):null,c?o.jsxs("div",{className:"media-viewer-loading",children:[o.jsx(hi,{})," ",i("media.reading")]}):null,!c&&d?o.jsx("div",{className:"media-viewer-loading",children:i("media.loadFailed",{error:d})}):null,!c&&s==="markdown"?o.jsx("div",{className:"media-document",children:o.jsx(Bu,{text:a})}):null,!c&&s==="text"?o.jsx("pre",{className:"media-document media-document--plain",children:a}):null]})]})})}function jY(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"10.25",cy:"10.25",r:"6.25"}),o.jsx("path",{d:"M4.15 10.25h12.2M10.25 4c1.65 1.72 2.5 3.8 2.5 6.25s-.85 4.53-2.5 6.25M10.25 4c-1.65 1.72-2.5 3.8-2.5 6.25s.85 4.53 2.5 6.25M14.8 14.8 20 20"})]})}function D1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"3.25",y:"5.25",width:"15.5",height:"13.5",rx:"2.25"}),o.jsx("circle",{cx:"8.1",cy:"9.3",r:"1.35"}),o.jsx("path",{d:"m4.7 16.5 3.65-3.7 2.45 2.25 2.2-2.2 4.35 4.1"}),o.jsx("path",{d:"m19.4 2.75.48 1.37 1.37.48-1.37.48-.48 1.37-.48-1.37-1.37-.48 1.37-.48.48-1.37Z",fill:"currentColor",stroke:"none"})]})}function lU(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{className:"video-generate-icon__body",d:"M3.25 9h17.5v7.35a2.4 2.4 0 0 1-2.4 2.4H5.65a2.4 2.4 0 0 1-2.4-2.4V9Z"}),o.jsxs("g",{className:"video-generate-icon__clapper",children:[o.jsx("path",{d:"M3.25 9V7.65a2.4 2.4 0 0 1 2.4-2.4h12.7a2.4 2.4 0 0 1 2.4 2.4V9H3.25Z"}),o.jsx("path",{d:"M6.75 5.25 9.3 9M12 5.25 14.55 9M17.25 5.25 19.8 9"})]}),o.jsx("path",{d:"m10.25 11.45 4 2.55-4 2.55v-5.1Z"})]})}function M1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M4.25 5.25h15.5v10.5H4.25zM8.25 19.75h7.5M12 15.75v4"}),o.jsx("path",{d:"m7.25 12.75 2.35-2.4 2.15 1.65 3.4-3.6 1.6 1.55"}),o.jsx("circle",{cx:"7.25",cy:"8.4",r:".7",fill:"currentColor",stroke:"none"})]})}function L1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M5 7.4c0-1.55 3.13-2.8 7-2.8s7 1.25 7 2.8-3.13 2.8-7 2.8-7-1.25-7-2.8Z"}),o.jsx("path",{d:"M5 7.4v4.55c0 1.55 3.13 2.8 7 2.8s7-1.25 7-2.8V7.4M5 11.95v4.55c0 1.55 3.13 2.8 7 2.8s7-1.25 7-2.8v-4.55"}),o.jsx("path",{d:"M8.2 12.25h.01M8.2 16.8h.01"})]})}function $1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M4.25 4.25h4.5v15.5h-4.5zM8.75 5.75h5v14h-5zM13.75 4.25h4.1v10.25h-4.1z"}),o.jsx("path",{d:"M5.75 7h1.5M10.25 8.25h2M10.25 11h2M15.15 7h1.3"}),o.jsx("circle",{cx:"17.45",cy:"17.35",r:"2.45"}),o.jsx("path",{d:"m19.25 19.15 1.55 1.55"})]})}function F1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M4.25 6.25h6.25c1 0 1.5.55 1.5 1.45v11.05c0-.9-.5-1.45-1.5-1.45H4.25V6.25Z"}),o.jsx("path",{d:"M19.75 9.1v8.2H13.5c-1 0-1.5.55-1.5 1.45V7.7c0-.9.5-1.45 1.5-1.45h2.15"}),o.jsx("path",{d:"m19 3.2.58 1.62 1.62.58-1.62.58L19 7.6l-.58-1.62-1.62-.58 1.62-.58L19 3.2Z",fill:"currentColor",stroke:"none"})]})}function B1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"m4.2 8.4 1.15 10.2h13.3L19.8 8.4"}),o.jsx("path",{d:"M4.2 8.4h15.6L17.9 5H6.1L4.2 8.4Z"}),o.jsx("path",{d:"M7.2 12.2c1.1-1 2.25 1.25 3.4.25 1.05-.9 2.15 1.3 3.3.25"}),o.jsx("path",{d:"m8.2 15.1 1.45 1.35 1.45-1.35M13.55 16.45h2.35"})]})}function U1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"6",cy:"6.25",r:"2.25"}),o.jsx("circle",{cx:"18",cy:"6.25",r:"2.25"}),o.jsx("circle",{cx:"12",cy:"17.75",r:"2.25"}),o.jsx("path",{d:"m7.7 7.75 2.7 7.55M16.3 7.75l-2.7 7.55M8.25 6.25h7.5"})]})}function RY(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"9",cy:"8",r:"3"}),o.jsx("path",{d:"M3.75 18.75c.45-3.05 2.2-4.65 5.25-4.65s4.8 1.6 5.25 4.65"}),o.jsx("path",{d:"M17.75 4.25v5.5M15 7h5.5M16 13.25h4.25M18.125 11.125v4.25"})]})}function Q1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"4",y:"4.25",width:"16",height:"5",rx:"1.5"}),o.jsx("rect",{x:"4",y:"14.75",width:"16",height:"5",rx:"1.5"}),o.jsx("path",{d:"M7.25 6.75h.01M7.25 17.25h.01M10 6.75h6.5M10 17.25h6.5"})]})}function z1t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M6 3.75h8l4 4v12.5H6V3.75Z"}),o.jsx("path",{d:"M14 3.75v4h4M8.75 11h6.5M8.75 14.25h6.5M8.75 17.5h4"})]})}function IY(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"3.75",y:"4.5",width:"16.5",height:"15",rx:"2.5"}),o.jsx("path",{d:"m7.5 9 2.75 2.5L7.5 14M12.5 14h4"}),o.jsx("path",{d:"M3.75 7.5h16.5",opacity:".62"})]})}function cU(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"m6 3.25 4.5 4.75L6 12.75"})})}function V1t({definition:e,label:t,done:n,open:i,onToggle:r}){const{t:s}=xe("conversation"),a=e.icon,l=n?e.doneLabel:e.runningLabel,c=t??s(`blocks.tools.${e.name}.${n?"done":"running"}`,{defaultValue:l});return o.jsxs("button",{type:"button",className:`builtin-tool-head${n?" is-done":" is-running"}`,"data-tool-tone":e.tone,onClick:r,"aria-expanded":i,children:[o.jsx("span",{className:"builtin-tool-icon","aria-hidden":"true",children:o.jsx(a,{})}),n?o.jsx("span",{className:"builtin-tool-label",children:c}):o.jsx(En,{className:"builtin-tool-label",duration:2.4,spread:18,"aria-live":"polite",children:c}),o.jsx(cU,{className:`builtin-tool-chevron${i?" is-open":""}`})]})}function ac(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function vn(e){return typeof e=="string"?e:""}function PY(e){return typeof e=="number"&&Number.isFinite(e)?e:0}function zc(e){return Array.isArray(e)?e:[]}function W6(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return{}}const n=ac(t)??{};return ac(n.result)??n}function JR(e){if(typeof e=="string")try{return JR(JSON.parse(e))}catch{return e}const t=ac(e);if(!t)return"";const n=ac(t.result);return vn(t.error)||vn(t.message)||vn(n==null?void 0:n.error)||vn(n==null?void 0:n.message)}function H1t(e){if(e.kind==="tool")return"tool";if(e.kind==="knowledge_base")return"knowledge_base";const t=ac(e.metadata),n=vn(t==null?void 0:t.source_type).toLowerCase(),i=vn(e.source).toLowerCase();return n==="skillhub"||i.startsWith("skill_hub:")?"skill_hub":"skill_space"}const VEe={tool:"Tools",knowledge:"AgentKit Knowledge Base",skillCenter:"AgentKit Skill Center",unknownSource:"Unknown source",unnamedResource:"Unnamed resource",unnamedAgent:"Unnamed agent"};function q1t(e,t){return e==="veadk_builtin_tools"?t.tool:e==="agentkit_knowledge"?t.knowledge:e.startsWith("skill_hub:")?`Skill Hub ${e.slice(10)}`:e.startsWith("skill_space:")?`${t.skillCenter} ${e.slice(12)}`:e||t.unknownSource}function W1t(e){return e==="veadk_builtin_tools"?"tool":e==="agentkit_knowledge"?"knowledge_base":e.startsWith("skill_hub:")?"skill_hub":"skill_space"}function K1t(e,t=VEe){const n=W6(e),i=ac(n.capabilities)??{},r=zc(n.resources).flatMap(a=>{const l=ac(a);if(!l)return[];const c=l.kind==="tool"?"tool":l.kind==="knowledge_base"?"knowledge_base":"skill";return[{ref:vn(l.ref),kind:c,category:H1t(l),name:vn(l.name)||vn(l.ref)||t.unnamedResource,description:vn(l.description),source:vn(l.source),version:vn(l.version)}]}),s=zc(n.sources).flatMap(a=>{const l=ac(a);if(!l)return[];const c=vn(l.source),u=vn(l.status),d=u==="error"?"error":u==="skipped"?"skipped":"ok";return[{source:c,category:W1t(c),label:q1t(c,t),status:d,count:PY(l.count),message:vn(l.message),searchKeywords:zc(l.search_keywords).map(vn).filter(Boolean)}]});return{collectionId:vn(n.collection_id),capabilities:{googleAdkVersion:vn(i.google_adk_version),agentTypes:zc(i.agent_types).map(vn).filter(Boolean),maxOrchestrationDepth:PY(i.max_orchestration_depth)},resources:r,sources:s,counts:{all:r.length,skill_hub:r.filter(a=>a.category==="skill_hub").length,skill_space:r.filter(a=>a.category==="skill_space").length,knowledge_base:r.filter(a=>a.category==="knowledge_base").length,tool:r.filter(a=>a.category==="tool").length}}}function G1t(e,t){return{resources:e.resources.filter(n=>n.category===t),sources:e.sources.filter(n=>n.category===t)}}function HEe(e,t,n=VEe){const i=W6(e),r=W6(t),s=new Map(zc(r.results).flatMap(d=>{const f=ac(d),h=vn(f==null?void 0:f.name);return f&&h?[[h,f]]:[]})),a=zc(i.agents).flatMap(d=>{const f=ac(d),h=vn(f==null?void 0:f.name);return f&&h?[f]:[]}),l=new Set(a.map(d=>vn(d.name))),c=[...s.entries()].filter(([d])=>!l.has(d)).map(([d])=>({name:d})),u=[...a,...c].map(d=>{const f=vn(d.name),h=zc(d.nodes).flatMap(E=>{const C=ac(E);return C?[C]:[]}),p=vn(d.root_node),g=h.find(E=>vn(E.id)===p),b=h.filter(E=>vn(E.id)!==p).map(E=>({id:vn(E.id)||n.unnamedAgent,type:vn(E.type)||"llm",description:vn(E.description)})),v=s.get(f),y=vn(v==null?void 0:v.status),x=y==="failed"?"failed":y==="completed"?"completed":"running",w=DY(v==null?void 0:v.resources),O=w.length>0?w:DY(h.flatMap(E=>zc(E.resources))),k=MY(v==null?void 0:v.python_tools),S=k.length>0?k:MY(h.flatMap(E=>zc(E.python_tools)));return{name:f,description:vn(v==null?void 0:v.description)||vn(g==null?void 0:g.description)||vn(d.task),task:vn(d.task),rootType:vn(v==null?void 0:v.root_type)||vn(g==null?void 0:g.type)||"llm",nodeCount:h.length,subAgentCount:b.length,resourceCount:O.length,pythonToolCount:S.length,skills:O.filter(E=>E.kind==="skill"),knowledgeBases:O.filter(E=>E.kind==="knowledge_base"),builtinTools:O.filter(E=>E.kind==="tool"),pythonTools:S,subAgents:b,status:x,output:vn(v==null?void 0:v.output),error:vn(v==null?void 0:v.error)}});return{collectionId:vn(r.collection_id)||vn(i.collection_id),agents:u,completedCount:u.filter(d=>d.status==="completed").length,failedCount:u.filter(d=>d.status==="failed").length,runningCount:u.filter(d=>d.status==="running").length}}function X1t(e,t){return!!JR(t)||HEe(e,t).failedCount>0}function DY(e){const t=new Set;return zc(e).flatMap(n=>{const i=ac(n),r=vn(i?i.ref:n);if(!r||t.has(r))return[];t.add(r);const s=vn(i==null?void 0:i.kind),a=s==="tool"||r.startsWith("veadk_tool:")?"tool":s==="knowledge_base"||r.startsWith("agentkit_kb:")?"knowledge_base":"skill",l=r.split(":");return[{ref:r,kind:a,name:vn(i==null?void 0:i.name)||l[l.length-1]||r,description:vn(i==null?void 0:i.description),version:vn(i==null?void 0:i.version),source:vn(i==null?void 0:i.source)}]})}function MY(e){const t=new Set;return zc(e).flatMap(n=>{const i=ac(n),r=vn(i==null?void 0:i.name),s=vn(i==null?void 0:i.code),a=`${r}\0${s}`;return!i||!r||t.has(a)?[]:(t.add(a),[{name:r,description:vn(i.description),code:s,entrypoint:vn(i.entrypoint)||r,dependencies:zc(i.dependencies).map(vn).filter(Boolean)}])})}function Y1t({branch:e}){return o.jsxs("div",{className:`branch-compare__body${e.status==="running"?" is-streaming":""}`,"aria-live":"polite",children:[e.content?o.jsx(Bu,{text:e.content,streaming:e.status==="running"}):null,e.status==="running"?o.jsx("span",{className:"branch-compare__caret","aria-hidden":"true"}):null,e.error?o.jsx("p",{className:"branch-compare__error",children:e.error}):null]})}function Z1t({args:e,response:t,status:n,onBranchSelect:i}){const{t:r}=xe("conversation"),s=m.useMemo(()=>cye(e,t,n),[e,t,n]),[a,l]=m.useState(0);return o.jsxs("section",{className:"branch-compare","aria-label":r("blocks.branchCompare.ariaLabel"),children:[o.jsx("div",{className:"branch-compare__tabs",role:"tablist","aria-label":r("blocks.branchCompare.selectDirection"),children:s.branches.map((c,u)=>o.jsx("button",{className:`branch-compare__tab${a===u?" is-active":""}`,type:"button",role:"tab","aria-selected":a===u,"aria-controls":`branch-compare-panel-${u}`,onClick:()=>l(u),children:o.jsx(ma,{color:"info",size:"sm",variant:"soft",children:c.label})},`${c.label}:${u}`))}),o.jsx("div",{className:"branch-compare__branches",children:s.branches.map((c,u)=>o.jsxs("article",{className:`branch-compare__branch${a===u?" is-active":""}`,id:`branch-compare-panel-${u}`,role:"tabpanel",children:[o.jsx("header",{className:"branch-compare__head",children:o.jsx(ma,{color:"info",size:"sm",variant:"soft",children:c.label})}),o.jsx(Y1t,{branch:c}),o.jsx("footer",{className:"branch-compare__footer",children:o.jsx($t,{type:"button",color:"info",variant:"ghost",size:"sm",pill:!1,disabled:c.status!=="completed",onClick:()=>i==null?void 0:i(c),children:r("blocks.branchCompare.continue")})})]},`${c.label}:${u}`))})]})}function qEe({controlled:e,default:t,name:n,state:i="value"}){const{current:r}=m.useRef(e!==void 0),[s,a]=m.useState(t),l=r?e:s,c=m.useCallback(u=>{r||a(u)},[]);return[l,c]}const uU={...Db},LY={};function kb(e,t){const n=m.useRef(LY);return n.current===LY&&(n.current=e(t)),n}const $M=uU.useInsertionEffect,J1t=$M&&$M!==uU.useLayoutEffect?$M:e=>e();function Wa(e){const t=kb(eOt).current;return t.next=e,J1t(t.effect),t.trampoline}function eOt(){const e={next:void 0,callback:tOt,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function tOt(){}const nOt=()=>{},ml=typeof document<"u"?m.useLayoutEffect:nOt,WEe=m.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function iOt(){return m.useContext(WEe)}function rOt(e){const{children:t,elementsRef:n,labelsRef:i,onMapChange:r}=e,s=Wa(r),[,a]=m.useState(!1),l=kb(aOt).current,c=kb(sOt).current,u=m.useRef(0),d=m.useRef(!0),f=m.useRef([]),h=m.useRef(null),p=Wa(()=>{d.current||(d.current=!0,a(k=>!k))}),g=Wa((k,S)=>{c.set(k,S),p()}),b=Wa(k=>{c.delete(k),p()}),v=Wa(k=>{const S=new Map;return n.current.length=0,i&&(i.current.length=0),k.forEach(E=>{var C,N;S.set(E.element,{...E.registration.metadata??{},index:E.index}),n.current[E.index]=E.element,i&&(i.current[E.index]=E.registration.label!==void 0?E.registration.label:((N=(C=E.registration.textRef)==null?void 0:C.current)==null?void 0:N.textContent)??E.element.textContent)}),u.current=n.current.length,S});function y(k){var C;if((C=h.current)==null||C.disconnect(),h.current=null,typeof MutationObserver!="function"||k.length<2)return;const S=new MutationObserver(N=>{if(!cOt(N))return;let _=null;for(const j of k)if(j.isConnected){if(_&&KEe(_,j)>0){S.disconnect(),p();return}_=j}});h.current=S;const E=new Set;for(let N=1;NS.observe(N,{childList:!0}))}const x=Wa(()=>{const[k,S]=oOt(c),E=v(k);y(S),f.current=k,d.current=!1,l.forEach(C=>C(E)),s(E)});ml(()=>(d.current||v(f.current),()=>{n.current=[],i&&(i.current=[])}),[n,i,v]),ml(()=>{d.current&&x()}),ml(()=>()=>{var k;(k=h.current)==null||k.disconnect(),d.current=!0},[]);const w=Wa(k=>(l.add(k),()=>{l.delete(k)})),O=m.useMemo(()=>({register:g,unregister:b,subscribeMapChange:w,nextIndexRef:u}),[g,b,w,u]);return o.jsx(WEe.Provider,{value:O,children:t})}function sOt(){return new Map}function aOt(){return new Set}function oOt(e){const t=new Set,n=[],i=[];e.forEach((s,a)=>{if(!a.isConnected)return;const l=s.index,c={index:l??-1,element:a,registration:s};l===null?i.push(c):l>=0&&(t.add(l),n.push(c))});let r=0;return i.sort((s,a)=>KEe(s.element,a.element)),i.forEach(s=>{for(;t.has(r);)r+=1;s.index=r,n.push(s),r+=1}),t.size>0&&n.sort((s,a)=>s.index-a.index),[n,i.map(s=>s.element)]}function lOt(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function cOt(e){for(const t of e)for(let n=0;ns.searchParams.append("args[]",a)),`${t} error #${i}; visit ${s} for the full message.`}}const xE=uOt("https://base-ui.com/production-error","Base UI"),GEe=m.createContext(void 0);function XEe(){const e=m.useContext(GEe);if(e===void 0)throw new Error(xE(10));return e}function hN(e,t,n,i){const r=kb(YEe).current;return fOt(r,e,t,n,i)&&ZEe(r,[e,t,n,i]),r.callback}function dOt(e){const t=kb(YEe).current;return hOt(t,e)&&ZEe(t,e),t.callback}function YEe(){return{callback:null,cleanup:null,refs:[]}}function fOt(e,t,n,i,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==i||e.refs[3]!==r}function hOt(e,t){return e.refs.length!==t.length||e.refs.some((n,i)=>n!==t[i])}function ZEe(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const i=Array(t.length).fill(null);for(let r=0;r{for(let r=0;r=e}function $Y(e){if(!m.isValidElement(e))return null;const t=e,n=t.props;return(mOt(19)?n==null?void 0:n.ref:t.ref)??null}function K6(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const gOt=Object.freeze([]),Ty=Object.freeze({});function bOt(e,t){const n={};for(const i in e){const r=e[i];if(t!=null&&t.hasOwnProperty(i)){const s=t[i](r);s!=null&&Object.assign(n,s);continue}r===!0?n[`data-${i.toLowerCase()}`]="":r&&(n[`data-${i.toLowerCase()}`]=r.toString())}return n}function yOt(e,t){return typeof e=="function"?e(t):e}function JEe(e,t){return typeof e=="function"?e(t):e}const dU={};function fU(e,t,n,i,r){if(!n&&!i&&!e)return pN(t);let s=pN(e);return t&&(s=hA(s,t)),n&&(s=hA(s,n)),i&&(s=hA(s,i)),s}function vOt(e){if(e.length===0)return dU;if(e.length===1)return pN(e[0]);let t=pN(e[0]);for(let n=1;n=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function hU(e){return typeof e=="function"}function tCe(e,t){return hU(e)?e(t):e??dU}function wOt(e,t){return t?e?(...n)=>{const i=n[0];if(rCe(i)){const s=i;mN(s);const a=t(...n);return s.baseUIHandlerPrevented||e==null||e(...n),a}const r=t(...n);return e==null||e(...n),r}:nCe(t):e}function nCe(e){return e&&((...t)=>{const n=t[0];return rCe(n)&&mN(n),e(...t)})}function mN(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function iCe(e,t){return t?e?t+" "+e:t:e}function rCe(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function OE(e,t,n={}){const i=t.render,r=SOt(t,n);if(n.enabled===!1)return null;const s=n.state??Ty;return COt(e,i,r,s)}function SOt(e,t={}){const{className:n,style:i,render:r}=e,{state:s=Ty,ref:a,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?yOt(n,s):void 0,f=u?JEe(i,s):void 0,h=u?bOt(s,c):Ty,p=u&&l?kOt(l):void 0,g=u?K6(h,p)??{}:Ty;return typeof document<"u"&&(u?Array.isArray(a)?g.ref=dOt([g.ref,$Y(r),...a]):g.ref=hN(g.ref,$Y(r),a):hN(null,null)),u?(d!==void 0&&(g.className=iCe(g.className,d)),f!==void 0&&(g.style=K6(g.style,f)),g):Ty}function kOt(e){return Array.isArray(e)?vOt(e):fU(void 0,e)}const EOt=Symbol.for("react.lazy");function COt(e,t,n,i){if(t){if(typeof t=="function")return t(n,i);const r=fU(n,t.props);r.ref=n.ref;let s=t;return(s==null?void 0:s.$$typeof)===EOt&&(s=m.Children.toArray(t)[0]),m.cloneElement(s,r)}if(e&&typeof e=="string")return TOt(e,n);throw new Error(xE(8))}function TOt(e,t){return e==="button"?m.createElement("button",{type:"button",...t,key:t.key}):e==="img"?m.createElement("img",{alt:"",...t,key:t.key}):m.createElement(e,t)}const AOt={value:()=>null},sCe=m.forwardRef(function(t,n){const{render:i,className:r,disabled:s=!1,hiddenUntilFound:a,keepMounted:l,loopFocus:c,onValueChange:u,multiple:d=!1,orientation:f="vertical",value:h,defaultValue:p,style:g,...b}=t,v=m.useMemo(()=>{if(h===void 0)return p??[]},[h,p]),y=m.useRef([]),[x,w]=qEe({controlled:h,default:v,name:"Accordion",state:"value"}),O=Wa((C,N,_)=>{if(d)if(N){const j=x.slice();if(j.push(C),u==null||u(j,_),_.isCanceled)return;w(j)}else{const j=x.filter(T=>T!==C);if(u==null||u(j,_),_.isCanceled)return;w(j)}else{const j=x[0]===C?[]:[C];if(u==null||u(j,_),_.isCanceled)return;w(j)}}),k=m.useMemo(()=>({value:x,disabled:s,orientation:f}),[x,s,f]),S=m.useMemo(()=>({disabled:s,handleValueChange:O,hiddenUntilFound:a??!1,keepMounted:l??!1,state:k,value:x}),[s,O,a,l,k,x]),E=OE("div",t,{state:k,ref:n,props:b,stateAttributesMapping:AOt});return o.jsx(GEe.Provider,{value:S,children:o.jsx(rOt,{elementsRef:y,children:E})})});let FY=0;function _Ot(e,t="mui"){const[n,i]=m.useState(e),r=e||n;return m.useEffect(()=>{n==null&&(FY+=1,i(`${t}-${FY}`))},[n,t]),r}const BY=uU.useId;function NOt(e,t){if(BY!==void 0){const n=BY();return`${t}-${n}`}return _Ot(e,t)}function G6(e){return NOt(e,"base-ui")}const jOt="none",ROt="trigger-press";function aCe(e,t,n,i){let r=!1,s=!1;const a=Ty;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){s=!0},get isCanceled(){return r},get isPropagationAllowed(){return s},trigger:n,...a}}function IOt(e){m.useEffect(e,gOt)}const NT=null;let POt=class{constructor(){Di(this,"callbacks",[]);Di(this,"callbacksCount",0);Di(this,"nextId",1);Di(this,"startId",1);Di(this,"isScheduled",!1);Di(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let s=0;s=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}},jT=new POt;class ql{constructor(){Di(this,"currentId",NT);Di(this,"cancel",()=>{this.currentId!==NT&&(jT.cancel(this.currentId),this.currentId=NT)});Di(this,"disposeEffect",()=>this.cancel)}static create(){return new ql}static request(t){return jT.request(t)}static cancel(t){return jT.cancel(t)}request(t){this.cancel(),this.currentId=jT.request(()=>{this.currentId=NT,t()})}}function DOt(){const e=kb(ql.create).current;return IOt(e.disposeEffect),e}function MOt(e,t=!1,n=!1){const[i,r]=m.useState(e&&t?"idle":void 0),[s,a]=m.useState(e);return e&&!s&&(a(!0),r("starting")),!e&&s&&i!=="ending"&&!n&&r("ending"),!e&&!s&&i==="ending"&&r(void 0),ml(()=>{if(!e&&s&&i!=="ending"&&n){const l=ql.request(()=>{r("ending")});return()=>{ql.cancel(l)}}},[e,s,i,n]),ml(()=>{if(!e||t)return;const l=ql.request(()=>{r(void 0)});return()=>{ql.cancel(l)}},[t,e]),ml(()=>{if(!e||!t)return;e&&s&&i!=="idle"&&r("starting");const l=ql.request(()=>{r("idle")});return()=>{ql.cancel(l)}},[t,e,s,i]),{mounted:s,setMounted:a,transitionStatus:i}}function LOt(e){const{open:t,defaultOpen:n,onOpenChange:i,disabled:r}=e,[s,a]=qEe({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:l,setMounted:c,transitionStatus:u}=MOt(s,!0,!0),d=G6(),[f,h]=m.useState(),p=f===null?void 0:f??d,g=Wa(b=>{const v=!s,y=aCe(ROt,b.nativeEvent);i(v,y),!y.isCanceled&&a(v)});return m.useMemo(()=>({defaultPanelId:d,disabled:r,handleTrigger:g,mounted:l,open:s,panelId:p,setMounted:c,setOpen:a,setPanelIdState:h,transitionStatus:u}),[d,r,g,l,s,p,c,a,h,u])}const oCe=m.createContext(void 0);function lCe(){const e=m.useContext(oCe);if(e===void 0)throw new Error(xE(15));return e}function $Ot(e={}){const{guess:t,label:n,metadata:i,textRef:r,index:s}=e,{register:a,unregister:l,subscribeMapChange:c,nextIndexRef:u}=iOt(),d=m.useRef(-1),[f,h]=m.useState(s==null&&t?()=>{if(d.current===-1){const v=u.current;u.current+=1,d.current=v}return d.current}:-1),p=s??f,g=m.useRef(null),b=m.useCallback(v=>{const y=g.current;y&&l(y),g.current=v,v&&a(v,{metadata:i??null,index:s??null,label:n,textRef:r})},[s,a,l,i,n,r]);return ml(()=>{if(s==null)return c(v=>{var x;const y=g.current?(x=v.get(g.current))==null?void 0:x.index:null;y!=null&&h(y)})},[s,c]),{ref:b,index:p}}const cCe=m.createContext(void 0);function pU(){const e=m.useContext(cCe);if(e===void 0)throw new Error(xE(9));return e}let UY=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const FOt={"data-starting-style":""},BOt={"data-ending-style":""},UOt={transitionStatus(e){return e==="starting"?FOt:e==="ending"?BOt:null}};let mU=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=UY.startingStyle]="startingStyle",e[e.endingStyle=UY.endingStyle]="endingStyle",e}({}),QOt=function(e){return e.panelOpen="data-panel-open",e}({});const zOt={[mU.open]:""},VOt={[mU.closed]:""},HOt={open(e){return e?{[QOt.panelOpen]:""}:null}},qOt={open(e){return e?zOt:VOt}};let WOt=function(e){return e.index="data-index",e.disabled="data-disabled",e.open="data-open",e}({});const gU={...qOt,index:e=>({[WOt.index]:String(e)}),...UOt,value:()=>null},uCe=m.forwardRef(function(t,n){const{className:i,disabled:r=!1,onOpenChange:s,render:a,value:l,style:c,...u}=t,{ref:d,index:f}=$Ot(),h=hN(n,d),{disabled:p,handleValueChange:g,state:b,value:v}=XEe(),y=G6(),x=l??y,w=r||p,O=v.indexOf(x)!==-1,k=Wa((P,$)=>{s==null||s(P,$),!$.isCanceled&&g(x,P,$)}),S=LOt({open:O,onOpenChange:k,disabled:w}),E=m.useMemo(()=>({open:S.open,disabled:S.disabled,transitionStatus:S.transitionStatus}),[S.open,S.disabled,S.transitionStatus]),C=m.useMemo(()=>({...S,onOpenChange:k,state:E}),[S,E,k]),N=m.useMemo(()=>({...b,hidden:!O&&!S.mounted,index:f,disabled:w,open:O}),[S.mounted,w,f,O,b]),_=G6(),[j,T]=m.useState(),L=j===null?void 0:j??_,A=m.useMemo(()=>({defaultTriggerId:_,open:O,state:N,setTriggerId:T,triggerId:L}),[_,O,N,T,L]),R=OE("div",t,{state:N,ref:h,props:u,stateAttributesMapping:gU});return o.jsx(oCe.Provider,{value:C,children:o.jsx(cCe.Provider,{value:A,children:R})})}),dCe=m.forwardRef(function(t,n){const{render:i,className:r,style:s,...a}=t,{state:l}=pU();return OE("h3",t,{state:l,ref:n,props:a,stateAttributesMapping:gU})}),KOt=m.createContext(void 0);function GOt(e=!1){const t=m.useContext(KOt);if(t===void 0&&!e)throw new Error(xE(16));return t}function XOt(e){const{focusableWhenDisabled:t,disabled:n,composite:i=!1,tabIndex:r=0,isNativeButton:s}=e,a=i&&t!==!1,l=i&&t===!1;return{props:m.useMemo(()=>{const u={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return i||(u.tabIndex=r,!s&&n&&(u.tabIndex=t?r:-1)),(s&&(t||a)||!s&&n)&&(u["aria-disabled"]=n),s&&(!t||l)&&(u.disabled=n),u},[i,n,t,a,l,s,r])}}function FM(e,t,{detail:n=0}={}){e.dispatchEvent(new(po(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function YOt(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:i=0,native:r=!0,composite:s}=e,a=m.useRef(null),l=GOt(!0),c=s??l!==void 0,{props:u}=XOt({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:i,isNativeButton:r}),d=m.useCallback(()=>{const p=a.current;BM(p)&&c&&t&&u.disabled===void 0&&p.disabled&&(p.disabled=!1)},[t,u.disabled,c]);ml(d,[d]);const f=m.useCallback((p={})=>{const{onClick:g,onMouseDown:b,onKeyUp:v,onKeyDown:y,onPointerDown:x,...w}=p;return fU({onClick(O){if(t){O.preventDefault();return}g==null||g(O)},onMouseDown(O){t||b==null||b(O)},onKeyDown(O){if(t||(mN(O),y==null||y(O),O.baseUIHandlerPrevented))return;const k=O.target===O.currentTarget,S=O.currentTarget,E=BM(S),C=!r&&ZOt(S),N=k&&(r?E:!C),_=O.key==="Enter",j=O.key===" ",T=S.getAttribute("role"),L=(T==null?void 0:T.startsWith("menuitem"))||T==="option"||T==="gridcell";if(k&&c&&j){if(O.defaultPrevented&&L)return;O.preventDefault(),(!r||E)&&(O.preventBaseUIHandler(),FM(S,O));return}if(!N||r||!j&&!_){k&&C&&j&&O.preventDefault();return}O.defaultPrevented||(O.preventDefault(),_&&(O.preventBaseUIHandler(),FM(S,O)))},onKeyUp(O){if(!t){if(mN(O),v==null||v(O),O.target===O.currentTarget&&r&&c&&BM(O.currentTarget)&&O.key===" "){O.preventDefault();return}O.baseUIHandlerPrevented||O.target===O.currentTarget&&!r&&!c&&!O.defaultPrevented&&O.key===" "&&(O.preventBaseUIHandler(),FM(O.currentTarget,O))}},onPointerDown(O){if(t){O.preventDefault();return}x==null||x(O)}},r?{type:"button"}:{role:"button"},u,w)},[t,u,c,r]),h=Wa(p=>{a.current=p,d()});return{getButtonProps:f,buttonRef:h}}function BM(e){return Yd(e)&&e.tagName==="BUTTON"}function ZOt(e){return Yd(e)&&e.tagName==="A"&&!!e.href}const fCe=m.forwardRef(function(t,n){const{disabled:i,className:r,id:s,render:a,nativeButton:l=!0,style:c,...u}=t,{panelId:d,open:f,handleTrigger:h,disabled:p}=lCe(),g=i||p,{getButtonProps:b,buttonRef:v}=YOt({disabled:g,focusableWhenDisabled:!0,native:l}),{defaultTriggerId:y,state:x,setTriggerId:w}=pU(),O=s||void 0,k=O??y;return ml(()=>(w(C=>O??(C===null?void 0:C)),()=>{w(C=>C===O?null:C)}),[O,w]),OE("button",t,{state:x,ref:[n,v],props:[{"aria-controls":f?d:void 0,"aria-expanded":f,id:k,onClick:h},u,b],stateAttributesMapping:HOt})});function JOt(e,t,n,i){return e.addEventListener(t,n,i),()=>{e.removeEventListener(t,n,i)}}function ewt(e){const t=kb(twt,e).current;return t.next=e,ml(t.effect),t}function twt(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function nwt(e){return e==null?e:"current"in e?e.current:e}function hCe(e,t=!1){const n=DOt();return Wa((i,r=null)=>{n.cancel();const s=nwt(e);if(s==null)return;const a=s,l=()=>{$i.flushSync(i)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function c(){Promise.all(a.getAnimations().map(u=>u.finished)).then(()=>{r!=null&&r.aborted||l()},()=>{if(r!=null&&r.aborted)return;if(a.getAnimations().some(d=>d.pending||d.playState!=="finished")){c();return}l()})}if(t){const u="data-starting-style";if(!a.hasAttribute(u)){n.request(c);return}const d=new MutationObserver(()=>{a.hasAttribute(u)||(d.disconnect(),c())});d.observe(a,{attributes:!0,attributeFilter:[u]}),r==null||r.addEventListener("abort",()=>d.disconnect(),{once:!0});return}n.request(c)})}function iwt(e){const{enabled:t=!0,open:n,ref:i,onComplete:r}=e,s=Wa(r),a=hCe(i,n);m.useEffect(()=>{if(!t)return;const l=new AbortController;return a(s,l.signal),()=>{l.abort()}},[t,n,s,a])}const q1={height:void 0,width:void 0};function rwt(e){const{externalRef:t,hiddenUntilFound:n,id:i,keepMounted:r,mounted:s,onOpenChange:a,open:l,setMounted:c,setOpen:u,transitionStatus:d}=e,f=m.useRef(null),h=m.useRef(null),[p,g]=m.useState(q1),b=m.useRef(q1),v=m.useRef(!1),y=m.useRef(l),x=m.useRef(!1),[w,O]=m.useState(!1),k=m.useRef(null),S=hN(t,f),E=ewt(l),C=hCe(f),N=!l&&!s,_=w?"idle":d,j=l&&(y.current||x.current),T=!l&&s&&h.current==="css-animation"&&p.height===void 0&&p.width===void 0?b.current:p,L=n&&N&&h.current!=="css-animation",A=Wa((B,I=!0)=>{I&&(b.current=B),g(B)}),R=Wa(()=>{var B;(B=k.current)==null||B.call(k),k.current=null}),P=Wa(B=>{R(),k.current=()=>{k.current=null,B()}}),$=Wa(()=>{l&&s&&h.current==="css-animation"&&(x.current=!0)});ml(()=>{!w||d==="starting"||O(!1)},[w,d]),m.useEffect(()=>()=>{$(),R()},[$,R]),ml(()=>{const B=f.current;if(!B)return;!l&&k.current&&R();const I=swt(B,j);if(h.current=I,l&&d==="idle"&&y.current&&I==="css-animation"){b.current=P0(B);return}if(l&&d==="starting"){const Q=v.current;if(v.current=!1,I==="none"){A(P0(B)),O(!0);return}if(I==="css-transition"){const te=awt(B);if(A(P0(B)),!Q)return te;const le=RT(B,"transition-duration","0s");return P(le),O(!0),te}A(P0(B));const q=RT(B,"animation-name","none");if(!Q){q();return}const U=RT(B,"animation-duration","0s");q(),P(U),O(!0);return}if(!l&&s&&(d==="idle"||d==="starting")){if(y.current=!1,x.current=!1,I==="none"){A(q1,!1),c(!1);return}A(P0(B));return}if(d!=="ending")return;if(I==="none"){c(!1);return}const H=P0(B);if(!(H.height>0||H.width>0)){c(!1);return}A(H),I==="css-animation"&&RT(B,"animation-name","none")()},[s,l,R,A,c,P,j,d]),iwt({enabled:l&&s&&_==="idle",open:!0,ref:f,onComplete(){l&&A(q1,!1)}}),m.useEffect(()=>{if(l||!s||_!=="ending"||!f.current)return;const I=new AbortController;let H=-1;function X(){E.current||(c(!1),A(q1,!1))}return H=ql.request(()=>{C(X,I.signal)}),()=>{ql.cancel(H),I.abort()}},[E,s,l,_,C,A,c]),ml(()=>{const B=f.current;!B||!n||!N||B.setAttribute("hidden","until-found")},[N,n]),m.useEffect(function(){const I=f.current;if(!I)return;function H(X){const Q=aCe(jOt,X);a(!0,Q),!Q.isCanceled&&(v.current=!0,u(!0))}return JOt(I,"beforematch",H)},[a,u]);const M=r||n||s||l;return{height:T.height,props:{...L?{[mU.startingStyle]:""}:void 0,hidden:N,id:i},ref:S,shouldPreventOpenAnimation:j,shouldRender:M,transitionStatus:_,width:T.width}}function P0(e){return{height:e.scrollHeight,width:e.scrollWidth}}function swt(e,t){const n=po(e).getComputedStyle(e),i=(n.animationName.split(",").map(s=>s.trim()).some(s=>s!==""&&s!=="none")||t)&&QY(n.animationDuration),r=QY(n.transitionDuration);return i&&r||r?"css-transition":i?"css-animation":"none"}function QY(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function RT(e,t,n){const i=e.style.getPropertyValue(t),r=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(i===""){e.style.removeProperty(t);return}e.style.setProperty(t,i,r)}}function awt(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(r=>{e.style.setProperty(r,"initial","important")});function n(){Object.entries(t).forEach(([r,s])=>{if(s===""){e.style.removeProperty(r);return}e.style.setProperty(r,s)})}const i=ql.request(n);return()=>{ql.cancel(i),n()}}let zY=function(e){return e.accordionPanelHeight="--accordion-panel-height",e.accordionPanelWidth="--accordion-panel-width",e}({});const pCe=m.forwardRef(function(t,n){const{className:i,hiddenUntilFound:r,keepMounted:s,id:a,render:l,style:c,...u}=t,{hiddenUntilFound:d,keepMounted:f}=XEe(),{defaultPanelId:h,mounted:p,onOpenChange:g,open:b,setMounted:v,setOpen:y,setPanelIdState:x,transitionStatus:w}=lCe(),O=r??d,k=s??f,S=a||void 0,E=a??h;ml(()=>(x(I=>S??(I===null?void 0:I)),()=>{x(I=>I===S?null:I)}),[S,x]);const{height:C,props:N,ref:_,shouldPreventOpenAnimation:j,shouldRender:T,transitionStatus:L,width:A}=rwt({externalRef:n,hiddenUntilFound:O,id:E,keepMounted:k,mounted:p,onOpenChange:g,open:b,setMounted:v,setOpen:y,transitionStatus:w}),{state:R,triggerId:P}=pU(),$={...R,transitionStatus:L},M=JEe(c,$),B=OE("div",{...t,style:void 0},{state:$,ref:_,props:[N,{"aria-labelledby":P,role:"region",style:{[zY.accordionPanelHeight]:C===void 0?"auto":`${C}px`,[zY.accordionPanelWidth]:A===void 0?"auto":`${A}px`}},u,M?{style:M}:void 0,j?{style:{animationName:"none"}}:void 0],stateAttributesMapping:gU});return T?B:null}),owt=(e,t)=>{const n=e.currentTarget,i={x:e.clientX,y:e.clientY},r=lwt(i,n.getBoundingClientRect()),s=cwt(i,r),a=uwt(t.getBoundingClientRect());return fwt([...s,...a])};function lwt(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function cwt(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function uwt(e){const{top:t,right:n,bottom:i,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:i},{x:r,y:i}]}function dwt(e,t){const{x:n,y:i}=e;let r=!1;for(let s=0,a=t.length-1;si!=h>i&&n<(f-u)*(i-d)/(h-d)+u&&(r=!r)}return r}function fwt(e){const t=e.slice();return t.sort((n,i)=>n.xi.x?1:n.yi.y?1:0),hwt(t)}function hwt(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const pwt="_Transition_1wdpp_1",mwt="_Popover_1wdpp_3",mCe={Transition:pwt,Popover:mwt},gCe=m.createContext(null),eI=()=>{const e=m.use(gCe);if(!e)throw new Error("Popover components must be wrapped in ");return e},im=({open:e,onOpenChange:t,showOnHover:n=!1,hoverOpenDelay:i=150,children:r})=>{const[s,a]=m.useState(!1),[l,c]=m.useState(!1),u=m.useRef(null),d=m.useRef(null),f=m.useRef(void 0),h=m.useRef(!1),p=m.useRef(!1),g=e??s,[b,v]=m.useState(!1);JF(()=>v(!1),b?500:null);const y=xm(t),x=xm(E=>{var C,N;clearTimeout(f.current),g!==E&&(E||(c(!1),n&&h.current&&((C=u.current)==null||C.focus()),h.current=!1),(N=y.current)==null||N.call(y,E),a(E),n&&v(E))}),w=m.useCallback(E=>{x.current(E)},[x]),O=m.useCallback(()=>{f.current=setTimeout(()=>w(!0),i)},[w,i]),k=m.useCallback(()=>{clearTimeout(f.current)},[]);m.useEffect(()=>()=>{clearTimeout(f.current)},[]);const S=m.useMemo(()=>({open:g,setOpen:w,shake:l,setShake:c,showOnHover:n,temporarilyPreventClickToClose:b,onTriggerEnter:O,onTriggerLeave:k,isPointerInTransitRef:p,triggerRef:u,contentRef:d,hoverOpenFocusedWithTab:h}),[g,w,l,c,n,b,h,p,O,k]);return o.jsx(gCe,{value:S,children:o.jsx(oxe,{open:g,onOpenChange:w,modal:!1,children:r})})},gwt=({children:e,onPointerDown:t,onClick:n})=>{const{setOpen:i,showOnHover:r,temporarilyPreventClickToClose:s,onTriggerEnter:a,onTriggerLeave:l,isPointerInTransitRef:c,triggerRef:u,contentRef:d}=eI(),f=m.useRef(!1),h=b=>{!(b.currentTarget.nodeName.toLocaleLowerCase()==="a")&&s&&(b.preventDefault(),b.stopPropagation())},p=b=>{b.pointerType!=="touch"&&!f.current&&!c.current&&(a(),f.current=!0)},g=()=>{f.current&&(l(),f.current=!1)};return o.jsx(lxe,{asChild:!0,ref:u,onPointerDown:b=>{h(b),t==null||t(b)},onClick:b=>{h(b),n==null||n(b)},onPointerMove:r?p:void 0,onPointerLeave:r?g:void 0,onFocus:r?()=>i(!0):void 0,onBlur:r?()=>{setTimeout(()=>{var b;(b=d.current)!=null&&b.contains(document.activeElement)||i(!1)},50)}:void 0,children:e})},bCe=({children:e,avoidCollisions:t,width:n,minWidth:i,maxWidth:r,side:s,sideOffset:a=8,align:l,alignOffset:c,translucent:u,className:d,autoFocus:f=!0})=>{const{showOnHover:h,shake:p,contentRef:g}=eI(),b=v=>{const y=g.current;if(y&&v.target===y&&v.key==="Tab"&&v.shiftKey){v.preventDefault(),v.stopPropagation();const x=wye(y),w=x[x.length-1];w==null||w.focus()}};return m.useEffect(()=>{const v=g.current;!v||!f||v!=null&&v.contains(document.activeElement)||h||v.focus({preventScroll:!0})},[g,h,f]),o.jsx(uxe,{forceMount:!0,ref:g,className:mi(mCe.Popover,d),style:zb({"popover-width":n,"popover-min-width":i,"popover-max-width":r}),onCloseAutoFocus:h?sh:void 0,"data-animate":p?"shake":void 0,"data-translucent":u?"true":void 0,side:s,sideOffset:a,align:l,alignOffset:c??(l==="center"?0:-5),avoidCollisions:t??!0,hideWhenDetached:!0,collisionPadding:20,onOpenAutoFocus:sh,onEscapeKeyDown:sh,onKeyDown:b,children:e})},bwt=e=>{const{setOpen:t,triggerRef:n,contentRef:i,isPointerInTransitRef:r,hoverOpenFocusedWithTab:s}=eI(),[a,l]=m.useState(null),c=m.useCallback(()=>{l(null),r.current=!1},[r]),u=m.useCallback((d,f)=>{const h=owt(d,f);l(h),r.current=!0},[r]);return m.useEffect(()=>()=>c(),[c]),m.useEffect(()=>{const d=n.current,f=i.current;if(!d||!f)return;const h=g=>u(g,f),p=g=>u(g,d);return d.addEventListener("pointerleave",h),f.addEventListener("pointerleave",p),()=>{d.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",p)}},[i,n,u,c]),m.useEffect(()=>{if(!a)return;const d=f=>{const h=n.current,p=i.current,g=f.target,b={x:f.clientX,y:f.clientY},v=(h==null?void 0:h.contains(g))||(p==null?void 0:p.contains(g)),y=!dwt(b,a),x=g.hasAttribute("aria-haspopup");v?c():(y||x)&&(c(),t(!1))};return document.addEventListener("pointermove",d),()=>document.removeEventListener("pointermove",d)},[a,t,c,n,i]),m.useEffect(()=>{const d=f=>{if(i.current&&f.key==="Tab"&&!f.shiftKey){const[h]=wye(i.current);h&&(f.preventDefault(),h.focus(),s.current=!0,document.removeEventListener("keydown",d))}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[i,s]),o.jsx(bCe,{...e})},ywt=e=>{const{open:t,showOnHover:n,setOpen:i}=eI();return qk(t,()=>{i(!1)}),o.jsx(cxe,{forceMount:!0,children:o.jsx(Ix,{enterDuration:600,exitDuration:300,className:mCe.Transition,disableAnimations:!0,children:t&&(n?o.jsx(bwt,{...e},"popover-hover"):o.jsx(bCe,{...e},"popover"))})})};im.Trigger=gwt;im.Content=ywt;const vwt=["skill_hub","skill_space","knowledge_base","tool"];function yCe(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"m4 6 4 4 4-4"})})}function vCe({label:e}){return o.jsx("div",{className:"create-agent-card__loading",role:"status","aria-label":e,children:[0,1,2].map(t=>o.jsxs("div",{className:"create-agent-card__skeleton-row","aria-hidden":"true",children:[o.jsx("span",{}),o.jsx("span",{})]},t))})}function xwt(e,t){return e.kind==="tool"?t("blocks.createAgents.builtinTool"):e.kind==="knowledge_base"?t("blocks.createAgents.knowledgeBase"):e.source.startsWith("skill_hub:")?"Skill Hub":e.source.startsWith("skill_space:")?t("blocks.createAgents.skillCenter"):"Skill"}function UM({label:e,resources:t}){const{t:n}=xe("conversation");return t.length===0?null:o.jsxs("section",{className:"create-agent-card__popover-section",children:[o.jsx("h4",{children:e}),o.jsx("div",{className:"create-agent-card__popover-list",children:t.map(i=>o.jsxs("div",{className:"create-agent-card__popover-item",children:[o.jsxs("div",{className:"create-agent-card__popover-item-heading",children:[o.jsx("strong",{children:i.name}),o.jsx(ma,{color:"secondary",size:"sm",variant:"soft",children:xwt(i,n)})]}),i.description?o.jsx("p",{children:i.description}):null]},i.ref))})]})}function Owt({tools:e}){const{t}=xe("conversation");return e.length===0?null:o.jsxs("section",{className:"create-agent-card__popover-section",children:[o.jsx("h4",{children:t("blocks.createAgents.selfAuthoredTools")}),o.jsx(sCe,{children:e.map((n,i)=>o.jsxs(uCe,{className:"create-agent-card__python-tool",value:`${n.name}:${i}`,children:[o.jsx(dCe,{className:"create-agent-card__python-tool-header",children:o.jsxs(fCe,{className:"create-agent-card__python-tool-trigger",children:[o.jsxs("span",{children:[o.jsx("strong",{children:n.name}),n.description?o.jsx("small",{children:n.description}):null]}),o.jsxs("span",{className:"create-agent-card__python-tool-meta",children:[o.jsx(ma,{color:"secondary",size:"sm",variant:"soft",children:t("blocks.createAgents.selfAuthoredTools")}),o.jsx(yCe,{className:"create-agent-card__python-tool-chevron"})]})]})}),o.jsxs(pCe,{className:"create-agent-card__python-tool-panel",children:[n.dependencies.length>0?o.jsx("div",{className:"create-agent-card__python-tool-dependencies",children:t("blocks.createAgents.dependencies",{items:n.dependencies.join(", ")})}):null,o.jsx("pre",{tabIndex:0,"aria-label":t("blocks.createAgents.fullCode",{name:n.name}),children:o.jsx("code",{children:n.code})})]})]},`${n.name}:${i}`))})]})}function wwt({agents:e}){const{t}=xe("conversation");return e.length===0?null:o.jsxs("section",{className:"create-agent-card__popover-section",children:[o.jsx("h4",{children:t("blocks.createAgents.subAgents")}),o.jsx("div",{className:"create-agent-card__popover-list",children:e.map(n=>o.jsxs("div",{className:"create-agent-card__popover-item",children:[o.jsxs("div",{className:"create-agent-card__popover-item-heading",children:[o.jsx("strong",{children:n.id}),o.jsx(ma,{color:"secondary",size:"sm",variant:"soft",children:t(`blocks.createAgents.agentTypes.${n.type}`,{defaultValue:n.type})})]}),n.description?o.jsx("p",{children:n.description}):null]},n.id))})]})}function IT({label:e,count:t,icon:n,children:i}){const{t:r}=xe("conversation"),s=o.jsxs("button",{className:"create-agent-card__resource-metric",type:"button",disabled:t===0,"aria-label":r("blocks.createAgents.itemCount",{label:e,count:t}),children:[n,o.jsx("span",{children:t})]});return t===0?s:o.jsxs(im,{showOnHover:!0,hoverOpenDelay:120,children:[o.jsx(im.Trigger,{children:s}),o.jsx(im.Content,{side:"top",align:"start",minWidth:"auto",maxWidth:360,className:"create-agent-card__resource-popover",children:i})]})}function Swt({response:e,status:t}){const{t:n}=xe("conversation"),i=m.useMemo(()=>({tool:n("blocks.createAgents.sourceLabels.tool"),knowledge:n("blocks.createAgents.sourceLabels.knowledge"),skillCenter:n("blocks.createAgents.sourceLabels.skillCenter"),unknownSource:n("blocks.createAgents.sourceLabels.unknown"),unnamedResource:n("blocks.createAgents.unnamedResource"),unnamedAgent:n("blocks.createAgents.unnamedAgent")}),[n]),r=m.useMemo(()=>K1t(e,i),[i,e]),s=m.useMemo(()=>vwt.map(c=>{const u=G1t(r,c);return{value:c,label:n(`blocks.createAgents.categories.${c}`),...u,searchKeywords:[...new Set(u.sources.flatMap(d=>d.searchKeywords))]}}),[r,n]),a=t==="failed",l=a?JR(e):"";return o.jsx("section",{className:"create-agent-tool-card","aria-label":n("blocks.createAgents.collectionAria"),children:t==="running"?o.jsx(vCe,{label:n("blocks.createAgents.retrieving")}):a?o.jsxs("div",{className:"create-agent-card__message is-error",role:"alert",children:[o.jsx("span",{className:"create-agent-card__message-title",children:n("blocks.createAgents.retrievalFailed")}),o.jsx("span",{children:l||n("blocks.createAgents.checkConfig")})]}):o.jsx(sCe,{className:"create-agent-card__accordion",children:s.map(c=>o.jsxs(uCe,{className:"create-agent-card__accordion-item",value:c.value,children:[o.jsx(dCe,{className:"create-agent-card__accordion-header",children:o.jsxs(fCe,{className:"create-agent-card__accordion-trigger",children:[o.jsx("span",{children:c.label}),o.jsxs("span",{className:"create-agent-card__accordion-meta",children:[o.jsx(ma,{color:"secondary",size:"sm",variant:"soft",children:c.sources.length===0?c.value==="skill_hub"?n("blocks.createAgents.notSearched"):n("blocks.createAgents.notConfigured"):c.resources.length}),o.jsx(yCe,{className:"create-agent-card__accordion-chevron"})]})]})}),o.jsx(pCe,{className:"create-agent-card__accordion-content",children:o.jsxs("div",{className:"create-agent-card__accordion-scroll",role:"region","aria-label":n("blocks.createAgents.resourceList",{label:c.label}),tabIndex:0,children:[c.value==="skill_hub"&&c.searchKeywords.length>0?o.jsxs("div",{className:"create-agent-card__search-keywords",children:[o.jsx("span",{children:n("blocks.createAgents.searchKeywords")}),o.jsx("span",{children:c.searchKeywords.join("、")})]}):null,c.resources.length>0?o.jsx("div",{className:"create-agent-card__resource-list",children:c.resources.map(u=>o.jsx("div",{className:"create-agent-card__resource",children:o.jsxs("div",{className:"create-agent-card__resource-main",children:[o.jsxs("div",{className:"create-agent-card__resource-title",children:[o.jsx("span",{className:"create-agent-card__resource-name",children:u.name}),u.version?o.jsx(ma,{className:"create-agent-card__resource-version",color:"secondary",size:"sm",variant:"soft",children:u.version}):null]}),u.description?o.jsx("p",{children:u.description}):null]})},u.ref))}):o.jsxs("div",{className:"create-agent-card__empty-category",children:[o.jsx("p",{children:c.sources.length===0?c.value==="skill_hub"?n("blocks.createAgents.skillHubSkipped"):n("blocks.createAgents.sourceSkipped",{label:c.label}):n("blocks.createAgents.noResources")}),c.sources.filter(u=>u.message).map(u=>o.jsx("p",{className:"create-agent-card__raw-source-error",children:u.message},u.source))]})]})})]},c.value))},r.collectionId||"collected-resources")})}function kwt({args:e,response:t,status:n}){const{t:i}=xe("conversation"),r=m.useMemo(()=>({tool:i("blocks.createAgents.sourceLabels.tool"),knowledge:i("blocks.createAgents.sourceLabels.knowledge"),skillCenter:i("blocks.createAgents.sourceLabels.skillCenter"),unknownSource:i("blocks.createAgents.sourceLabels.unknown"),unnamedResource:i("blocks.createAgents.unnamedResource"),unnamedAgent:i("blocks.createAgents.unnamedAgent")}),[i]),s=m.useMemo(()=>HEe(e,t,r),[e,r,t]),a=n==="failed"?JR(t):"";return o.jsxs("section",{className:"create-agent-tool-card is-agent-results","aria-label":i("blocks.createAgents.resultAria"),children:[a?o.jsxs("div",{className:"create-agent-card__message is-error",role:"alert",children:[o.jsx("span",{className:"create-agent-card__message-title",children:i("blocks.createAgents.creationFailed")}),o.jsx("span",{children:a})]}):null,s.agents.length>0?o.jsx("div",{className:"create-agent-card__agent-grid",children:s.agents.map(l=>{const c=n==="failed"?"failed":l.status,u=l.error||c==="failed"&&a,d=l.builtinTools.length+l.pythonTools.length;return o.jsxs(kB,{className:`create-agent-card__agent-card${u?" is-error":""}`,children:[o.jsx(EB,{leading:o.jsx(qv,{seed:l.name}),title:l.name,titleText:l.name,status:o.jsx(ma,{color:"secondary",size:"sm",variant:"soft",children:i(`blocks.createAgents.agentTypes.${l.rootType}`,{defaultValue:l.rootType})})}),l.description?o.jsx(CB,{children:l.description}):null,u?o.jsx("div",{className:"create-agent-card__agent-result is-error",role:"alert",children:u}):null,o.jsxs("div",{className:"create-agent-card__agent-resources","aria-label":i("blocks.createAgents.agentResources",{name:l.name}),children:[o.jsx(IT,{label:i("blocks.createAgents.skill"),count:l.skills.length,icon:o.jsx(U2,{"aria-hidden":"true"}),children:o.jsx(UM,{label:i("blocks.createAgents.skill"),resources:l.skills})}),o.jsx(IT,{label:i("blocks.createAgents.knowledgeBase"),count:l.knowledgeBases.length,icon:o.jsx(zxe,{"aria-hidden":"true"}),children:o.jsx(UM,{label:i("blocks.createAgents.knowledgeBase"),resources:l.knowledgeBases})}),o.jsxs(IT,{label:i("blocks.createAgents.toolsLabel"),count:d,icon:o.jsx(FFe,{"aria-hidden":"true"}),children:[o.jsx(UM,{label:i("blocks.createAgents.builtinTool"),resources:l.builtinTools}),o.jsx(Owt,{tools:l.pythonTools})]}),o.jsx(IT,{label:i("blocks.createAgents.subAgents"),count:l.subAgentCount,icon:o.jsx(UFe,{"aria-hidden":"true"}),children:o.jsx(wwt,{agents:l.subAgents})})]})]},l.name)})}):n==="running"?o.jsx(vCe,{label:i("blocks.createAgents.creating")}):o.jsxs("div",{className:"create-agent-card__message",children:[o.jsx("span",{className:"create-agent-card__message-title",children:i("blocks.createAgents.noAgents")}),o.jsx("span",{children:i("blocks.createAgents.noAgentResult")})]})]})}const Ewt={web_search:{name:"web_search",runningLabel:"Searching the web",doneLabel:"Web search complete",tone:"search",icon:jY},link_reader:{name:"link_reader",runningLabel:"Reading webpage",doneLabel:"Webpage read complete",tone:"search",icon:jY},run_code:{name:"run_code",runningLabel:"Running code in the AgentKit sandbox",doneLabel:"Code execution completed in the AgentKit sandbox",tone:"sandbox",icon:B1t},list_envs:{name:"list_envs",runningLabel:"Checking available environments",doneLabel:"Available environments loaded",tone:"resources",icon:Q1t},get_env_manifest:{name:"get_env_manifest",runningLabel:"Loading the environment manifest",doneLabel:"Environment manifest loaded",tone:"knowledge",icon:z1t},execute_in_sandbox:{name:"execute_in_sandbox",runningLabel:"Running a command in the environment",doneLabel:"Command completed in the environment",tone:"sandbox",icon:IY},delegate_to_codex_sandbox:{name:"delegate_to_codex_sandbox",runningLabel:"Codex Sandbox is running",doneLabel:"Codex Sandbox completed",failedLabel:"Codex Sandbox failed",tone:"sandbox",icon:IY},image_generate:{name:"image_generate",runningLabel:"Generating image",doneLabel:"Image generated",tone:"image",icon:D1t},video_generate:{name:"video_generate",runningLabel:"Generating video",doneLabel:"Video generated",tone:"video",icon:lU},ppt_generate:{name:"ppt_generate",runningLabel:"Generating presentation",doneLabel:"Presentation generated",tone:"presentation",icon:M1t},load_memory:{name:"load_memory",runningLabel:"Searching long-term memory",doneLabel:"Memory search complete",tone:"memory",icon:L1t},load_knowledgebase:{name:"load_knowledgebase",runningLabel:"Searching the knowledge base",doneLabel:"Knowledge base search complete",tone:"knowledge",icon:$1t},load_skill:{name:"load_skill",runningLabel:"Loading skill",doneLabel:"Skill loaded",tone:"skill",icon:F1t},collect_resources:{name:"collect_resources",runningLabel:"Collecting available resources",doneLabel:"Resource collection complete",failedLabel:"Resource collection failed",tone:"resources",icon:U1t,detailRenderer:Swt},create_agents:{name:"create_agents",runningLabel:"Creating and running agents",doneLabel:"Agent creation complete",failedLabel:"Agent creation failed",tone:"agent",icon:RY,detailRenderer:kwt},branch_compare:{name:"branch_compare",runningLabel:"",doneLabel:"",failedLabel:"",tone:"search",icon:RY,detailRenderer:Z1t,hideHeader:!0}};function Cwt(e){return Ewt[e]}function xCe(e){return o.jsx("svg",{viewBox:"0 0 111 117",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M0 5.6016C7.82288e-05 0.621244 6.02226 -1.87314 9.54395 1.64847L40.1289 32.2334L68.5732 3.7891C69.5834 2.77903 70.9533 2.21099 72.3818 2.21097H82.7031C82.7917 2.20658 82.8806 2.20414 82.9697 2.20414H104.775C109.574 2.20427 111.977 8.00691 108.584 11.4004L64.916 55.0664C64.3075 55.8528 63.9436 56.7647 63.8242 57.6993C63.7142 56.4884 63.1964 55.3069 62.2695 54.3799L45.4082 37.5186H45.4072L40.124 32.2354L17.832 54.5284C16.7671 55.5933 16.2416 56.993 16.2549 58.3887C16.2417 59.7843 16.7672 61.1842 17.832 62.2491L39.9287 84.3467L9.54395 114.733C6.0223 118.255 0.000223474 115.761 0 110.78V5.6016ZM63.8018 58.8702C63.8962 59.9086 64.2936 60.9229 64.9961 61.7735L108.591 105.368C111.984 108.762 109.58 114.564 104.781 114.564H94.4336C94.3543 114.568 94.274 114.569 94.1934 114.569H72.3877C70.9592 114.569 69.5892 114.002 68.5791 112.992L39.9336 84.3467L58.4531 65.8282L58.4453 65.8203L62.2695 61.9981C63.1476 61.12 63.6567 60.0136 63.8018 58.8702Z",fill:"currentColor"})})}function Twt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M6 3h8l4 4v14H6Z"}),o.jsx("path",{d:"M14 3v5h5"}),o.jsx("path",{d:"m10 12-2 2 2 2M14 12l2 2-2 2"})]})}function Awt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M12 3 19 6v5c0 4.6-2.8 7.8-7 10-4.2-2.2-7-5.4-7-10V6l7-3Z"}),o.jsx("path",{d:"m9 12 2 2 4-4"})]})}function _wt(e,t){const n=new Map(e.map(a=>[a.path,a.content])),i=new Map(t.map(a=>[a.path,a.content])),r=new Set([...n.keys(),...i.keys()]),s=[];for(const a of[...r].sort((l,c)=>l.localeCompare(c))){const l=n.get(a),c=i.get(a);l!==c&&s.push({path:a,status:l===void 0?"added":c===void 0?"deleted":"modified",before:l??"",after:c??""})}return s}function Vm(e){return{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,...e}}function OCe(e){return o.jsx("svg",{...Vm(e),children:o.jsx("path",{d:"m9 7-5 5 5 5M15 7l5 5-5 5M13.5 4l-3 16"})})}function QM(e){return o.jsx("svg",{...Vm(e),children:o.jsx("path",{d:"M6.5 3.75h7l4 4V20.25h-11zM13.5 3.75v4h4M9 12h6M9 15.5h4.5"})})}function Nwt(e){return o.jsx("svg",{...Vm(e),children:o.jsx("path",{d:"M3.75 7.25h6l1.75 2h8.75v9.25H3.75zM3.75 7.25V5.5h5l1.5 1.75"})})}function jwt(e){return o.jsx("svg",{...Vm(e),children:o.jsx("path",{d:"m9 5 7 7-7 7"})})}function wCe(e){return o.jsx("svg",{...Vm(e),children:o.jsx("path",{d:"m6.5 6.5 11 11M17.5 6.5l-11 11"})})}function Rwt(e){return o.jsxs("svg",{...Vm(e),children:[o.jsx("circle",{cx:"12",cy:"12",r:"3.25"}),o.jsx("path",{d:"M12 2.75v2M12 19.25v2M2.75 12h2M19.25 12h2M5.45 5.45l1.4 1.4M17.15 17.15l1.4 1.4M18.55 5.45l-1.4 1.4M6.85 17.15l-1.4 1.4"})]})}function Iwt(e){return o.jsx("svg",{...Vm(e),children:o.jsx("path",{d:"M19.25 15.25A8 8 0 0 1 8.75 4.75a8 8 0 1 0 10.5 10.5Z"})})}function Pwt(e){return o.jsxs("svg",{...Vm(e),children:[o.jsx("path",{d:"M19.25 8.25V4.5l-1.8 1.8a7.5 7.5 0 1 0 1.8 7.65"}),o.jsx("path",{d:"M19.25 4.5H15.5"})]})}const Dwt=m.lazy(()=>Fd(()=>Promise.resolve().then(()=>ZNe),void 0)),Mwt=m.lazy(()=>Fd(()=>import("../chunks/CodeDiffEditor-Bb0YLkgm.js"),[])),SCe="veadk-code-workspace-theme";function Lwt(e){const t={name:"",children:new Map};for(const n of e){const i=n.path.split("/").filter(Boolean);let r=t;i.forEach((s,a)=>{let l=r.children.get(s);l||(l={name:s,children:new Map},r.children.set(s,l)),a===i.length-1&&(l.path=n.path),r=l})}return t}function $wt(e,t=!1){return[...e.children.values()].sort((n,i)=>{const r=n.children.size>0&&n.path===void 0,s=i.children.size>0&&i.path===void 0;return r!==s?t?r?1:-1:r?-1:1:n.name.localeCompare(i.name)})}function Fwt(){if(typeof window>"u")return"light";try{return window.localStorage.getItem(SCe)==="dark"?"dark":"light"}catch{return"light"}}function Bwt(e){return e===""?0:e.split(` +`).length}function QS({project:e,open:t,onClose:n,onChange:i,readOnly:r=!1,comparison:s}){var L;const{t:a}=xe("workspaceTools"),l=m.useId(),c=m.useRef(null),u=m.useRef(null),d=m.useRef(n),[f,h]=m.useState(Fwt),p=m.useMemo(()=>s?_wt(s.baseProject.files,e.files):[],[s,e.files]),g=m.useMemo(()=>s?p.map(A=>({path:A.path,content:A.status==="deleted"?A.before:A.after})):e.files,[p,s,e.files]),b=m.useMemo(()=>new Map(p.map(A=>[A.path,A.status])),[p]),[v,y]=m.useState(((L=g[0])==null?void 0:L.path)??null),[x,w]=m.useState(new Set),O=m.useMemo(()=>Lwt(g),[g]),k=g.find(A=>A.path===v)??null,S=p.find(A=>A.path===v)??null;if(d.current=n,m.useEffect(()=>{try{window.localStorage.setItem(SCe,f)}catch{}},[f]),m.useEffect(()=>{var $;if(!t)return;const A=document.body.style.overflow,R=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",($=u.current)==null||$.focus();const P=M=>{if(M.key==="Escape"){M.preventDefault(),d.current();return}if(M.key!=="Tab"||!c.current)return;const B=[...c.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')].filter(X=>X.offsetParent!==null);if(B.length===0)return;const I=B[0],H=B[B.length-1];M.shiftKey&&document.activeElement===I?(M.preventDefault(),H.focus()):!M.shiftKey&&document.activeElement===H&&(M.preventDefault(),I.focus())};return window.addEventListener("keydown",P),()=>{document.body.style.overflow=A,window.removeEventListener("keydown",P),R!=null&&R.isConnected&&R.focus()}},[t]),m.useEffect(()=>{k||g.length===0||y(g[0].path)},[g,k]),!t)return null;function E(A){w(R=>{const P=new Set(R);return P.has(A)?P.delete(A):P.add(A),P})}function C(A){return A?o.jsx("span",{className:`code-browser-change is-${A}`,children:a(`codeBrowser.change.${A}`)}):null}function N(A,R,P){return $wt(A,R===0).map($=>{const M=P?`${P}/${$.name}`:$.name;if(!($.children.size>0&&$.path===void 0)&&$.path){const H=b.get($.path);return o.jsxs("button",{type:"button",className:`code-browser-file${v===$.path?" is-active":""}`,style:{paddingLeft:`${12+R*16}px`},onClick:()=>y($.path??null),title:$.path,"aria-pressed":v===$.path,children:[o.jsx(QM,{}),o.jsx("span",{children:$.name}),C(H)]},M)}const I=x.has(M);return o.jsxs("div",{children:[o.jsxs("button",{type:"button",className:"code-browser-folder",style:{paddingLeft:`${10+R*16}px`},onClick:()=>E(M),"aria-expanded":!I,children:[o.jsx(jwt,{className:I?"":"is-open"}),o.jsx(Nwt,{}),o.jsx("span",{children:$.name})]}),!I&&N($,R+1,M)]},M)})}function _(A){!k||s||i({...e,files:e.files.map(R=>R.path===k.path?{...R,content:A}:R)})}const j=f==="light"?"dark":"light",T=a(s?"codeBrowser.noChanges":"codeBrowser.chooseFile");return $i.createPortal(o.jsx("div",{className:"code-browser-backdrop",onMouseDown:A=>{A.target===A.currentTarget&&n()},children:o.jsxs("section",{ref:c,className:`code-browser-dialog is-${f}`,role:"dialog","aria-modal":"true","aria-labelledby":l,children:[o.jsxs("header",{className:"code-browser-head",children:[o.jsxs("div",{className:"code-browser-title-wrap",children:[o.jsx("span",{className:"code-browser-title-icon",children:o.jsx(OCe,{})}),o.jsxs("div",{children:[o.jsx("h2",{id:l,children:a(s?"codeBrowser.compareTitle":"codeBrowser.workspaceTitle")}),o.jsx("p",{title:e.name,children:e.name||a("codeBrowser.projectFallback")})]})]}),o.jsxs("div",{className:"code-browser-head-actions",children:[o.jsx("button",{type:"button",className:"code-browser-icon-button",onClick:()=>h(j),"aria-label":a("codeBrowser.switchTheme"),title:a("codeBrowser.switchThemeTitle",{theme:a(`codeBrowser.themes.${j}`)}),children:f==="light"?o.jsx(Iwt,{}):o.jsx(Rwt,{})}),o.jsx("button",{ref:u,type:"button",className:"code-browser-icon-button",onClick:n,"aria-label":a("codeBrowser.closeWorkspace"),title:a("codeBrowser.close"),children:o.jsx(wCe,{})})]})]}),o.jsxs("div",{className:"code-browser-workspace",children:[o.jsxs("aside",{className:"code-browser-sidebar","aria-label":a(s?"codeBrowser.changedFiles":"codeBrowser.projectFiles"),children:[o.jsxs("div",{className:"code-browser-sidebar-head",children:[o.jsx("span",{children:a(s?"codeBrowser.changes":"codeBrowser.files")}),o.jsx("span",{children:g.length})]}),o.jsx("div",{className:"code-browser-tree",children:g.length>0?N(O,0,""):o.jsx("div",{className:"code-browser-empty",children:T})})]}),o.jsxs("main",{className:"code-browser-main",children:[o.jsx("div",{className:"code-browser-tabs",role:"tablist","aria-label":a("codeBrowser.openFiles"),children:k?o.jsxs("div",{className:"code-browser-tab",role:"tab","aria-selected":"true",children:[o.jsx(QM,{}),o.jsx("span",{children:k.path.split("/").pop()}),C(S==null?void 0:S.status)]}):null}),o.jsxs("div",{className:"code-browser-path",children:[o.jsx(QM,{}),o.jsx("span",{children:(k==null?void 0:k.path)??a("codeBrowser.noFileSelected")})]}),s?o.jsxs("div",{className:"code-browser-diff-labels","aria-label":a("codeBrowser.comparisonDirection"),children:[o.jsx("span",{children:s.baseLabel??a("codeBrowser.before")}),o.jsx("span",{children:s.targetLabel??a("codeBrowser.after")})]}):null,o.jsx("div",{className:"code-browser-editor",children:k?o.jsx(m.Suspense,{fallback:o.jsx("div",{className:"code-browser-empty",children:a("codeBrowser.loadingEditor")}),children:S?o.jsx(Mwt,{before:S.before,after:S.after,path:S.path,theme:f}):o.jsx(Dwt,{value:k.content,path:k.path,onChange:_,readOnly:r,theme:f})}):o.jsx("div",{className:"code-browser-empty",children:T})}),o.jsxs("footer",{className:"code-browser-statusbar",children:[o.jsx("span",{children:s?a("codeBrowser.changedFileCount",{count:p.length}):a("codeBrowser.fileCount",{count:e.files.length})}),o.jsx("span",{children:k?a("codeBrowser.lineCount",{count:Bwt(k.content)}):"UTF-8"})]})]})]})]})}),document.body)}function Uwt({project:e,onChange:t,className:n="",label:i}){const{t:r}=xe("workspaceTools"),[s,a]=m.useState(!1),l=i??r("codeBrowser.viewSource");return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:`code-browser-trigger ${n}`.trim(),onClick:()=>a(!0),"aria-label":r("codeBrowser.viewSourceAria"),title:l,children:[o.jsx(OCe,{}),o.jsx("span",{children:l})]}),o.jsx(QS,{project:e,open:s,onClose:()=>a(!1),onChange:t})]})}const kCe="send_a2ui_json_to_client",Qwt=28,zwt=3e3;function Vwt(e,t,n){let i=t;for(let r=0;r65535?2:1}return i}function Hwt(e){return e<=4?1:Math.min(18,Math.max(2,Math.ceil(e/6)))}function ECe(e,t,n,i){const[r,s]=m.useState(()=>t?"":e),a=m.useRef(r),l=m.useRef(e),c=m.useRef(null),u=m.useRef(0),d=m.useRef(n);return l.current=e,d.current=n,m.useEffect(()=>{const f=a.current,h=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!t||h||!e.startsWith(f)){c.current!==null&&window.cancelAnimationFrame(c.current),c.current=null,f!==e&&(a.current=e,s(e));return}if(f===e||c.current!==null)return;const p=g=>{const b=l.current,v=a.current;if(!b.startsWith(v)){a.current=b,s(b),c.current=null;return}if(g-u.current{var f;(f=d.current)==null||f.call(d)},[r]),m.useEffect(()=>{r===e&&(i==null||i())},[r,i,e]),m.useEffect(()=>()=>{c.current!==null&&(window.cancelAnimationFrame(c.current),c.current=null)},[]),r}function qwt(){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o.jsx("path",{d:"M14.3 5.25a4.6 4.6 0 0 0-5.55 5.55L3.6 15.95a1.8 1.8 0 0 0 0 2.55l1.9 1.9a1.8 1.8 0 0 0 2.55 0l5.15-5.15a4.6 4.6 0 0 0 5.55-5.55l-2.9 2.9-2.45-.55-.55-2.45 2.9-2.9a4.6 4.6 0 0 0-1.45-1.45Z"})})}function Wwt(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("path",{d:"m4.5 7 1.8 1.8L9.5 5.5"}),o.jsx("path",{d:"M12 7h7.5"}),o.jsx("path",{d:"m4.5 13 1.8 1.8 3.2-3.3"}),o.jsx("path",{d:"M12 13h7.5"}),o.jsx("path",{d:"M5 19h4"}),o.jsx("path",{d:"M12 19h7.5"})]})}function Kwt(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("path",{d:"M5 5v7.25A3.75 3.75 0 0 0 8.75 16H19"}),o.jsx("path",{d:"m15.5 12.5 3.5 3.5-3.5 3.5"})]})}function Gwt({activity:e}){const{t}=xe("conversation"),n=[["Agent Session",e.agentSessionId],["Sandbox Session",e.sandboxSessionId],["Codex Thread",e.threadId]].filter(i=>!!i[1]);return n.length?o.jsx("dl",{className:"codex-sandbox-run__identity","aria-label":t("blocks.sandboxIdentity"),children:n.map(([i,r])=>o.jsxs("div",{children:[o.jsx("dt",{children:i}),o.jsx("dd",{title:r,children:r})]},i))}):null}function Xwt(e,t,n){if(e!=="load_skill"||t==null||typeof t!="object"||Array.isArray(t))return;const i=t.skill_name;if(!(typeof i!="string"||!i.trim()))return n("blocks.useSkill",{name:i.trim()})}function CCe({text:e,done:t,answerStarted:n=!1,streaming:i=!1,onStreamFrame:r}){const{t:s}=xe("conversation"),[a,l]=m.useState(!(t||n)),c=m.useRef(!1);m.useEffect(()=>{c.current||l(!(t||n))},[n,t]);const u=()=>{c.current=!0,l(g=>!g)},d=e.replace(/\r\n?/g,` `).trimStart().split(/\n{2,}/).map(g=>g.replace(/[^\S\n]*\n[^\S\n]*/g,(b,v,y)=>{const x=y[v-1]??"",w=y[v+b.length]??"";return!x||!w||new RegExp("\\p{Script=Han}","u").test(x)&&new RegExp("\\p{Script=Han}","u").test(w)||/[(\[{“‘/]/u.test(x)||/[),.\]},。!?;:、”’]/u.test(w)?"":" "})).join(` -`),f=kCe(d,!t||i,r),{ref:h,onScroll:p}=FEe(f);return o.jsxs("div",{className:"block-thinking",children:[o.jsxs("button",{className:"think-head",onClick:u,type:"button",children:[o.jsx("span",{className:"think-icon","aria-hidden":"true",children:o.jsx(vCe,{className:`thinking-logo ${t?"":"is-active"}`})}),t?o.jsx("span",{className:"think-label think-label--done",children:s("blocks.thinkingDone")}):o.jsx(Tn,{className:"think-label",duration:2.4,spread:18,children:s("blocks.thinking")}),o.jsx(Fk,{className:`chev ${a?"open":""}`})]}),o.jsx("div",{className:`think-collapse ${a&&f?"open":""}`,children:o.jsx("div",{className:"think-collapse-inner",children:o.jsx("div",{className:"think-body scroll",ref:h,onScroll:p,children:f})})})]})}function Kwt({text:e}){return o.jsx("div",{className:"block-progress",role:"status","aria-live":"polite","aria-atomic":"true",children:o.jsxs("div",{className:"think-head progress-head",children:[o.jsx("span",{className:"think-icon","aria-hidden":"true",children:o.jsx(vCe,{className:"thinking-logo is-active"})}),o.jsx(Tn,{className:"think-label",duration:2.4,spread:18,children:e})]})})}function Gwt({value:e,onResolve:t,onResolveComparison:n,onDownload:i,onDeploy:r}){const{t:s,i18n:a}=Oe("conversation"),[l,c]=m.useState(e.files?e:null),[u,d]=m.useState(!1),[f,h]=m.useState(!1),[p,g]=m.useState(null),[b,v]=m.useState(null),[y,x]=m.useState(""),[w,O]=m.useState(null),k=new Date(e.validatedAt),S=e.validatedAt?Number.isNaN(k.getTime())?e.validatedAt:k.toLocaleString(a.resolvedLanguage??a.language,{hour12:!1}):s("blocks.justNow");m.useEffect(()=>{if(!w)return;const T=window.setTimeout(()=>O(null),Bwt);return()=>window.clearTimeout(T)},[w]);async function E(){if(l)return l;if(!t)throw new Error(s("blocks.sourceUnavailable"));const T=await t(e);return c(T),T}async function C(){v("source"),x(""),O(null);try{await E(),d(!0)}catch(T){x(T instanceof Error?T.message:String(T))}finally{v(null)}}async function N(){if(i){v("download"),x(""),O(null);try{await i(e),O({message:s("blocks.downloadStarted")})}catch(T){x(T instanceof Error?T.message:String(T))}finally{v(null)}}}async function _(){if(n){v("compare"),x(""),O(null);try{const T=p??await n(e);g(T),h(!0)}catch(T){x(T instanceof Error?T.message:String(T))}finally{v(null)}}}async function j(){v("deploy"),x(""),O(null);try{r==null||r(await E())}catch(T){x(T instanceof Error?T.message:String(T))}finally{v(null)}}return o.jsxs(o.Fragment,{children:[o.jsxs("section",{className:`delivery-card${e.verified?" is-verified":" is-unverified"}`,"aria-label":e.verified?s("blocks.verifiedDelivery"):s("blocks.generatedSource"),children:[o.jsxs("header",{className:"delivery-card-header",children:[o.jsx("span",{className:"delivery-card-icon",children:e.verified?o.jsx(Ewt,{}):o.jsx(kwt,{})}),o.jsxs("div",{children:[o.jsx("strong",{children:e.verified?s("blocks.verifiedDelivery"):s("blocks.generatedSource")}),o.jsx("span",{children:e.agentName})]})]}),o.jsxs("dl",{className:"delivery-card-grid",children:[o.jsxs("div",{children:[o.jsx("dt",{children:s("blocks.entryPoint")}),o.jsx("dd",{children:o.jsx("code",{children:e.entryPoint})})]}),o.jsxs("div",{children:[o.jsx("dt",{children:s("blocks.fileCount")}),o.jsx("dd",{children:e.fileCount})]}),o.jsxs("div",{children:[o.jsx("dt",{children:s("blocks.size")}),o.jsxs("dd",{children:[(e.artifactSize/1024).toFixed(1)," KiB"]})]}),o.jsxs("div",{children:[o.jsx("dt",{children:e.verified?s("blocks.validationTime"):s("blocks.generationTime")}),o.jsx("dd",{children:S})]})]}),o.jsxs("p",{className:"delivery-card-gates",children:[e.verified?s("blocks.checksPassed",{count:e.gateSummary.length}):s("blocks.sourceReady")," ","· ",o.jsx("code",{children:e.artifactSha256.slice(0,12)})]}),e.verified?null:o.jsx("p",{className:"delivery-card-guidance",children:s("blocks.sourceGuidance")}),o.jsxs("div",{className:"delivery-card-actions",children:[o.jsxs("button",{type:"button",className:"delivery-card-secondary",onClick:()=>void C(),disabled:!t||b!==null,children:[b==="source"?o.jsx(mi,{className:"spin","aria-hidden":"true"}):null,s("blocks.viewSource")]}),e.projectId&&e.versionId&&e.parentVersionId?o.jsxs("button",{type:"button",className:"delivery-card-secondary",onClick:()=>void _(),disabled:!n||b!==null,children:[b==="compare"?o.jsx(mi,{className:"spin","aria-hidden":"true"}):null,s(b==="compare"?"blocks.preparing":"blocks.viewChanges")]}):null,o.jsxs("button",{type:"button",className:"delivery-card-secondary",onClick:()=>void N(),disabled:!i||b!==null,"aria-busy":b==="download",children:[b==="download"?o.jsx(mi,{className:"spin","aria-hidden":"true"}):null,s(b==="download"?"blocks.preparing":"blocks.downloadSource")]}),o.jsxs("button",{type:"button",onClick:()=>void j(),disabled:!e.deployable||!r||!t||b!==null,title:e.deployable?void 0:s("blocks.sourceNotReady"),children:[b==="deploy"?o.jsx(mi,{className:"spin","aria-hidden":"true"}):null,s("blocks.manualDeploy")]})]}),y?o.jsx("p",{className:"delivery-card-error",role:"alert",children:y}):null,w?o.jsx("p",{className:"delivery-card-status",role:"status","aria-live":"polite",children:w.message}):null]}),o.jsx(HS,{project:{name:e.agentName,files:(l==null?void 0:l.files)??[]},open:u,onClose:()=>d(!1),onChange:()=>{},readOnly:!0}),o.jsx(HS,{project:{name:(p==null?void 0:p.target.agentName)??e.agentName,files:(p==null?void 0:p.target.files)??[]},comparison:p?{baseProject:{name:p.base.agentName,files:p.base.files??[]},baseLabel:s("blocks.beforeOptimization"),targetLabel:s("blocks.afterOptimization")}:void 0,open:f,onClose:()=>h(!1),onChange:()=>{},readOnly:!0})]})}function CCe(){return o.jsx(ECe,{text:"",done:!1})}const Xwt=m.memo(function({text:t,streaming:n,onStreamFrame:i,onStreamComplete:r}){const s=kCe(t,n,i,r);return s?o.jsx("div",{className:"bubble",children:o.jsx(Uu,{text:s,streaming:n})}):null});function Ywt({title:e,summary:t,items:n,done:i}){const{t:r}=Oe("conversation"),[s,a]=m.useState(!i),l=m.useRef(!1);m.useEffect(()=>{l.current||a(!i)},[i]);const c=()=>{l.current=!0,a(u=>!u)};return o.jsxs("div",{className:"block-plan",children:[o.jsxs("button",{className:"plan-head",type:"button",onClick:c,"aria-expanded":n.length>0?s:void 0,disabled:n.length===0,children:[o.jsx("span",{className:"plan-icon","aria-hidden":"true",children:o.jsx(Vwt,{})}),i?o.jsx("span",{className:"plan-title",children:e}):o.jsx(Tn,{className:"plan-title",duration:2.2,spread:15,children:e}),t?o.jsx("span",{className:"plan-summary",children:t}):null,n.length>0?o.jsx(uU,{className:`plan-chevron${s?" is-open":""}`}):null]}),o.jsx("div",{className:`think-collapse ${s&&n.length>0?"open":""}`,children:o.jsx("div",{className:"think-collapse-inner",children:n.length>0?o.jsx("ol",{className:"plan-items",children:n.map((u,d)=>o.jsxs("li",{"data-status":u.status,children:[o.jsx("span",{className:"plan-item-marker","aria-hidden":"true"}),o.jsx("span",{className:"plan-item-text",children:u.text}),o.jsx("small",{children:r(`blocks.planStatuses.${u.status}`)})]},`${d}:${u.text}`))}):null})})]})}function Zwt(e){if(!e||typeof e!="object")return[];const t=e,n=t.result;let i=[];if(Array.isArray(t.studio_artifacts))i=t.studio_artifacts;else if(n&&typeof n=="object"){const r=n.studio_artifacts;Array.isArray(r)&&(i=r)}return i.flatMap(r=>{if(!r||typeof r!="object")return[];const s=r;return typeof s.name=="string"&&typeof s.contentUrl=="string"?[{name:s.name,contentUrl:s.contentUrl}]:[]})}function Jwt({name:e,args:t,response:n,done:i,status:r,defaultOpen:s=!1,retrying:a=!1,codexActivity:l,onBranchSelect:c,onAction:u}){const{t:d}=Oe("conversation"),h=e==="create_agents"&&i&&W1t(t,n)?"failed":r??(i?"completed":"running"),p=e==="create_agents"&&h==="failed"&&a,g=Swt(e),b=g==null?void 0:g.detailRenderer,v=(g==null?void 0:g.hideHeader)===!0,y=v||s||!!b||!!l,[x,w]=m.useState(y),O=m.useRef(!1);m.useEffect(()=>{!O.current&&y&&w(!0)},[y]);const k=()=>{O.current=!0,w(_=>!_)},S=e===SCe?d("blocks.renderUi"):e,E=Zwt(n),C=n==null?null:typeof n=="string"?n:JSON.stringify(n,null,2),N=C&&C.length>2e3?`${C.slice(0,2e3)} -${d("blocks.truncated")}`:C;return o.jsxs(pr.div,{className:`block-tool${g?" block-tool--builtin":""}`,"data-status":h,initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},children:[g&&!v?o.jsx(U1t,{definition:g,label:p?d("blocks.agentAdjusting"):h==="failed"?d(`blocks.tools.${g.name}.failed`,{defaultValue:g.failedLabel??g.doneLabel}):Wwt(e,t,d),done:i,open:x,onToggle:k}):g?null:o.jsxs("button",{className:"tool-head tool-head--generic",onClick:k,type:"button","aria-expanded":x,children:[o.jsx("span",{className:"tool-icon tool-icon--generic","aria-hidden":"true",children:o.jsx(zwt,{})}),i?o.jsx("span",{className:"tool-name",children:S}):o.jsx(Tn,{className:"tool-name",duration:2.2,spread:15,children:S}),o.jsx(uU,{className:`tool-chevron${x?" is-open":""}`})]}),o.jsx("div",{className:`${v?"":"think-collapse "}${x?"open":""}`,children:o.jsxs("div",{className:"think-collapse-inner",children:[l?o.jsxs("section",{className:"codex-sandbox-run","aria-label":d("blocks.sandboxDetails"),children:[o.jsxs("div",{className:"codex-sandbox-run__label",children:[o.jsxs("span",{className:"codex-sandbox-run__badge",children:[o.jsx(Hwt,{}),o.jsx("span",{children:"Codex Sandbox"})]}),o.jsx("span",{className:"codex-sandbox-run__title",children:l.title})]}),o.jsx(qwt,{activity:l}),o.jsx("div",{className:"codex-sandbox-run__stream",children:l.items.length>0?o.jsx(EE,{blocks:l.items.map(_=>_.block),streaming:!i,onAction:u}):o.jsx(Tn,{className:"codex-sandbox-run__empty",children:d("blocks.waitingCodex")})})]}):null,b?o.jsx(b,{args:t,response:n,status:h,onBranchSelect:c}):l?null:o.jsxs("div",{className:"tool-detail",children:[t!=null&&o.jsxs("div",{className:"tool-section",children:[o.jsx("div",{className:"tool-section-label",children:d("blocks.arguments")}),o.jsx("pre",{className:"tool-args",children:JSON.stringify(t,null,2)})]}),N!=null&&o.jsxs("div",{className:"tool-section",children:[o.jsx("div",{className:"tool-section-label",children:d("blocks.result")}),o.jsx("pre",{className:"tool-args tool-result",children:N})]}),E.length>0&&o.jsxs("div",{className:"tool-section",children:[o.jsx("div",{className:"tool-section-label",children:d("blocks.artifacts")}),o.jsx("div",{className:"studio-tool-artifacts",children:E.map(_=>o.jsx("a",{href:_.contentUrl,download:_.name,children:d("blocks.downloadNamed",{name:_.name})},`${_.contentUrl}:${_.name}`))})]})]})]})})]})}function eSt({block:e,onDownload:t,onPreview:n}){const{t:i}=Oe("conversation"),[r,s]=m.useState(""),[a,l]=m.useState(""),[c,u]=m.useState(null);m.useEffect(()=>()=>{c&&URL.revokeObjectURL(c.url)},[c]);const d=()=>u(null),f=async(g,b)=>{if(t){s(`download:${g}`),l("");try{await t(g,b)}catch(v){l(v instanceof Error?v.message:String(v))}finally{s("")}}},h=async(g,b,v)=>{if(n){s(`preview:${v}`),l("");try{const y=await n(g,b);u({name:v,url:y})}catch(y){l(y instanceof Error?y.message:String(y))}finally{s("")}}},p=e.files.filter(g=>!g.filename.endsWith(".preview.webp"));return o.jsxs("div",{className:"artifact-list",children:[p.map(g=>{const b=`${g.filename.replace(/\.pptx$/i,"")}.preview.webp`,v=e.files.find(y=>y.filename===b);return o.jsxs("div",{className:"artifact-card",children:[o.jsx("span",{className:"artifact-card__icon","aria-hidden":"true",children:o.jsx(_F,{})}),o.jsxs("span",{className:"artifact-card__copy",children:[o.jsx("span",{className:"artifact-card__name",children:g.filename}),o.jsx("span",{className:"artifact-card__hint",children:i("blocks.powerpoint")})]}),o.jsxs("span",{className:"artifact-card__actions",children:[v&&o.jsxs("button",{className:"artifact-card__action",type:"button",disabled:!n||r!=="",onClick:()=>void h(v.filename,v.version,g.filename),children:[r===`preview:${g.filename}`?o.jsx(mi,{className:"spin"}):o.jsx(t7e,{}),i("blocks.preview")]}),o.jsxs("button",{className:"artifact-card__action artifact-card__action--primary",type:"button",disabled:!t||r!=="",onClick:()=>void f(g.filename,g.version),children:[r===`download:${g.filename}`?o.jsx(mi,{className:"spin"}):o.jsx(Hj,{}),i("blocks.download")]})]})]},`${g.filename}:${g.version}`)}),a&&o.jsx("div",{className:"artifact-card__error",children:a}),c&&o.jsxs("div",{className:"artifact-preview",role:"dialog","aria-modal":"true","aria-label":i("blocks.previewDialog",{name:c.name}),children:[o.jsx("button",{className:"artifact-preview__backdrop",type:"button","aria-label":i("blocks.closePreview"),onClick:d}),o.jsxs("div",{className:"artifact-preview__panel",children:[o.jsxs("div",{className:"artifact-preview__header",children:[o.jsx("span",{children:c.name}),o.jsx("button",{type:"button","aria-label":i("blocks.closePreview"),onClick:d,children:o.jsx(Ia,{})})]}),o.jsx("div",{className:"artifact-preview__canvas",children:o.jsx("img",{src:c.url,alt:i("blocks.slidePreview",{name:c.name})})})]})]})]})}function tSt({block:e,onAuth:t}){const{t:n}=Oe("conversation"),[i,r]=m.useState(e.done?"done":"idle"),[s,a]=m.useState(""),l=e.label||n("blocks.mcpToolset"),c=(()=>{try{return e.authUri?new URL(e.authUri).host:""}catch{return""}})(),u=async()=>{if(t){a(""),r("authorizing");try{await t(e),r("done")}catch(f){a(f instanceof Error?f.message:String(f)),r("idle")}}};return e.done||i==="done"?o.jsxs(pr.div,{className:"auth-card-collapsed",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[o.jsx(yW,{className:"auth-card-icon auth-card-icon--done"}),o.jsx("span",{children:n("blocks.authorized",{tool:l})})]}):o.jsxs(pr.div,{className:"auth-card",initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},children:[o.jsxs("div",{className:"auth-card-head",children:[o.jsx(yW,{className:"auth-card-icon"}),o.jsx("span",{className:"auth-card-title",children:n("blocks.authorizationRequired",{tool:l})})]}),o.jsxs("p",{className:"auth-card-desc",children:[o.jsx(zA,{t:n,i18nKey:"blocks.oauthDescription",values:{tool:l},components:{code:o.jsx("code",{className:"auth-card-code"})}}),c&&o.jsxs(o.Fragment,{children:[" ",o.jsx(zA,{t:n,i18nKey:"blocks.oauthProvider",values:{provider:c},components:{code:o.jsx("code",{className:"auth-card-code"})}})," "]}),n("blocks.oauthContinue")]}),o.jsx("button",{className:"auth-card-btn",onClick:u,disabled:i==="authorizing"||!e.authUri,children:i==="authorizing"?o.jsxs(o.Fragment,{children:[o.jsx(mi,{className:"cw-i spin"})," ",n("blocks.waitingAuthorization")]}):o.jsx(o.Fragment,{children:n("blocks.authorize")})}),!e.authUri&&o.jsx("div",{className:"auth-card-err",children:n("blocks.missingAuthorizationUrl")}),s&&o.jsx("div",{className:"auth-card-err",children:s})]})}function EE({blocks:e,appName:t="",streaming:n=!1,onStreamFrame:i,onStreamComplete:r,onAction:s,onAuth:a,onArtifactDownload:l,onArtifactPreview:c,onResolveDelivery:u,onResolveDeliveryComparison:d,onDownloadDelivery:f,onDeployDelivery:h,onBranchSelect:p}){const g=e.reduce((b,v,y)=>v.kind==="text"?y:b,-1);return o.jsx(o.Fragment,{children:e.map((b,v)=>{switch(b.kind){case"progress":return o.jsx(Kwt,{text:b.text},"build-progress");case"thinking":{const y=e.slice(v+1).some(x=>x.kind==="text"&&!!x.text.trim());return o.jsx(ECe,{text:b.text,done:b.done,answerStarted:y,streaming:n,onStreamFrame:i},v)}case"text":{const y=b.text.replace(/^\s+/,"");return y?o.jsx(Xwt,{text:y,streaming:n,onStreamFrame:i,onStreamComplete:v===g?r:void 0},v):null}case"plan":return o.jsx(Ywt,{title:b.title,summary:b.summary,items:b.items,done:b.done},v);case"attachment":return o.jsx(eI,{appName:t,items:b.files},v);case"artifact":return o.jsx(eSt,{block:b,onDownload:l,onPreview:c},v);case"delivery":return o.jsx(Gwt,{value:b.value,onResolve:u,onResolveComparison:d,onDownload:f,onDeploy:h},v);case"invocation":return o.jsx(JR,{value:b.value},v);case"tool":{if(b.name===SCe&&b.done)return null;const y=b.name==="create_agents"&&e.slice(v+1).some(x=>x.kind==="tool"&&x.name==="create_agents");return o.jsx(Jwt,{name:b.name,args:b.args,response:b.response,done:b.done,status:b.status,defaultOpen:b.defaultOpen,retrying:b.name==="create_agents"&&(n||y),codexActivity:b.codexActivity,onBranchSelect:p,onAction:s},v)}case"agent-transfer":return null;case"auth":return o.jsx(tSt,{block:b,onAuth:a},v);case"a2ui":return $Ee(b.messages).filter(y=>y.components[y.rootId]).map(y=>o.jsx(pr.div,{initial:{opacity:0,y:8,scale:.985},animate:{opacity:1,y:0,scale:1},transition:{type:"spring",stiffness:380,damping:30},children:o.jsx(_1t,{surface:y,onAction:s})},`${v}-${y.surfaceId}`));default:return null}})})}const nSt=()=>{};function iSt(e){if(e.kind==="message")return{kind:"text",text:e.text};if(e.kind==="thinking")return{kind:"thinking",text:e.text,done:e.status==="done"};if(e.kind==="tool")return{kind:"tool",name:e.name,args:e.args,response:e.response,done:e.status==="done"};throw new Error(Mt("conversation.unsupportedActivity"))}function rSt({activities:e}){const{t}=Oe("skills"),n=m.useMemo(()=>e.filter(i=>i.kind!=="status").map(iSt),[e]);return n.length===0?null:o.jsx("div",{className:"skill-conversation","aria-label":t("conversation.ariaLabel"),"aria-live":"polite",children:o.jsx(EE,{blocks:n,onAction:nSt})})}function WY(){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"m7 9 5 5 5-5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function bA({label:e,value:t,options:n,onChange:i,disabled:r=!1,allowCustom:s=!1,required:a=!1,placeholder:l,error:c}){const{t:u}=Oe("skills"),d=l??u("configSelect.placeholder"),f=m.useId(),h=m.useId(),p=m.useId(),g=m.useRef(null),b=m.useRef(null),v=m.useRef(null),y=m.useRef(null),x=m.useRef([]),w=n.findIndex(R=>R.value===t),O=t.trim().toLocaleLowerCase(),k=s&&O?n.filter(R=>R.value.toLocaleLowerCase().includes(O)||R.label.toLocaleLowerCase().includes(O)):n,[S,E]=m.useState(!1),[C,N]=m.useState(Math.max(0,w)),_=w>=0?n[w]:void 0,j=r||!s&&n.length===0,T=(R=!1)=>{E(!1),R&&window.requestAnimationFrame(()=>{var P,$;return s?(P=v.current)==null?void 0:P.focus():($=b.current)==null?void 0:$.focus()})},L=R=>{j||k.length!==0&&(N(Math.min(Math.max(R,0),k.length-1)),E(!0))};m.useEffect(()=>{if(!S)return;const R=y.current,P=s?void 0:window.requestAnimationFrame(()=>{var I;(I=x.current[C])==null||I.focus()}),$=I=>{if(!R)return;const H=R.scrollTop<=0,X=R.scrollTop+R.clientHeight>=R.scrollHeight-1;(R.scrollHeight<=R.clientHeight||I.deltaY<0&&H||I.deltaY>0&&X)&&I.preventDefault(),I.stopPropagation()},M=I=>{var H;I.target instanceof Node&&!((H=g.current)!=null&&H.contains(I.target))&&T()},B=I=>{I.key==="Escape"&&T(!0)};return R==null||R.addEventListener("wheel",$,{passive:!1}),window.addEventListener("pointerdown",M),window.addEventListener("keydown",B),()=>{P!==void 0&&window.cancelAnimationFrame(P),R==null||R.removeEventListener("wheel",$),window.removeEventListener("pointerdown",M),window.removeEventListener("keydown",B)}},[C,s,S]);const A=R=>{var $;if(k.length===0)return;const P=(R+k.length)%k.length;N(P),($=x.current[P])==null||$.focus()};return o.jsxs("div",{ref:g,className:`skill-config-select${S?" is-open":""}`,onBlur:R=>{var P;(!R.relatedTarget||!((P=g.current)!=null&&P.contains(R.relatedTarget)))&&T()},children:[o.jsxs("span",{id:h,className:"skill-config-select__label",children:[e,a?o.jsx("span",{className:"skill-required-mark","aria-hidden":"true",children:"*"}):null]}),s?o.jsxs("div",{className:`skill-config-select__trigger is-editable${r?" is-disabled":""}`,"aria-expanded":S,children:[o.jsx("input",{ref:v,value:t,disabled:r,role:"combobox","aria-autocomplete":"list","aria-expanded":S,"aria-controls":S?f:void 0,"aria-labelledby":h,"aria-required":a,"aria-invalid":!!c,"aria-describedby":c?p:void 0,placeholder:d,onChange:R=>{i(R.target.value),N(0),n.length>0&&E(!0)},onClick:()=>{!S&&k.length>0&&L(0)},onKeyDown:R=>{var P,$;if(!(R.nativeEvent.isComposing||R.keyCode===229))if(R.key==="ArrowDown")R.preventDefault(),S?(P=x.current[C])==null||P.focus():L(0);else if(R.key==="ArrowUp")R.preventDefault(),S?($=x.current[k.length-1])==null||$.focus():L(k.length-1);else if(R.key==="Enter"&&S){R.preventDefault();const M=k[C];M&&i(M.value),T()}else R.key==="Escape"&&(R.preventDefault(),T())}}),o.jsx("button",{type:"button",className:"skill-config-select__toggle",disabled:r||n.length===0,"aria-label":u(S?"configSelect.collapseOptions":"configSelect.expandOptions"),onClick:()=>{S?T():L(0)},children:o.jsx(WY,{})})]}):o.jsxs("button",{ref:b,type:"button",className:"skill-config-select__trigger",disabled:j,"aria-haspopup":"listbox","aria-expanded":S,"aria-controls":S?f:void 0,"aria-labelledby":h,"aria-required":a,onClick:()=>{S?T():L(w>=0?w:0)},onKeyDown:R=>{R.key==="ArrowDown"?(R.preventDefault(),L(w>=0?w:0)):R.key==="ArrowUp"&&(R.preventDefault(),L(w>=0?w:n.length-1))},children:[o.jsx("span",{className:_?void 0:"is-placeholder",title:_==null?void 0:_.label,children:(_==null?void 0:_.label)||(n.length===0?u("configSelect.noOptions"):d)}),o.jsx(WY,{})]}),S?o.jsxs("div",{ref:y,id:f,className:"skill-config-select__menu",role:"listbox","aria-labelledby":h,children:[k.length===0?o.jsx("div",{className:"skill-config-select__empty",role:"status",children:u("configSelect.noMatches")}):null,k.map((R,P)=>{const $=R.value===t;return o.jsx("button",{ref:M=>{x.current[P]=M},type:"button",role:"option","aria-selected":$,tabIndex:P===C?0:-1,className:`skill-config-select__option${$?" is-selected":""}`,title:R.label,onFocus:()=>N(P),onClick:()=>{i(R.value),T(!0)},onKeyDown:M=>{M.key==="Enter"||M.key===" "?(M.preventDefault(),i(R.value),T(!0)):M.key==="ArrowDown"?(M.preventDefault(),A(P+1)):M.key==="ArrowUp"?(M.preventDefault(),A(P-1)):M.key==="Home"?(M.preventDefault(),A(0)):M.key==="End"&&(M.preventDefault(),A(n.length-1))},children:R.label},R.value)})]}):null,c?o.jsx("span",{id:p,className:"skill-config-select__error",role:"alert",children:c}):null]})}function ka(e,t){return e instanceof Error?e:typeof e=="string"&&e.trim()?new Error(e.trim()):new Error(t)}function ll({error:e}){var s,a,l,c,u;const{t}=Oe("skills"),n=e,i=(a=(s=n.originalError)==null?void 0:s.message)==null?void 0:a.trim(),r=[typeof n.status=="number"?`HTTP ${n.status}${n.statusText?` ${n.statusText}`:""}`:"",n.code?t("errorDetails.code",{code:n.code}):"",(l=n.originalError)!=null&&l.type?t("errorDetails.type",{type:n.originalError.type}):"",(c=n.originalError)!=null&&c.repr&&n.originalError.repr!==i?t("errorDetails.representation",{value:n.originalError.repr}):"",(u=n.rawResponse)!=null&&u.trim()?t("errorDetails.rawResponse",{value:n.rawResponse.trim()}):""].filter(Boolean);return o.jsxs("div",{className:"skill-error-details",children:[o.jsx("div",{className:"skill-error-details__summary",children:e.message}),i?o.jsx("div",{className:"skill-error-details__original",children:t("errorDetails.original",{message:i})}):null,r.length>0?o.jsxs("details",{children:[o.jsx("summary",{children:t("errorDetails.details")}),o.jsx("pre",{children:r.join(` -`)})]}):null]})}const yU=Symbol.for("yaml.alias"),Y6=Symbol.for("yaml.document"),cm=Symbol.for("yaml.map"),TCe=Symbol.for("yaml.pair"),Kd=Symbol.for("yaml.scalar"),Xx=Symbol.for("yaml.seq"),ru=Symbol.for("yaml.node.type"),Yx=e=>!!e&&typeof e=="object"&&e[ru]===yU,CE=e=>!!e&&typeof e=="object"&&e[ru]===Y6,TE=e=>!!e&&typeof e=="object"&&e[ru]===cm,Hs=e=>!!e&&typeof e=="object"&&e[ru]===TCe,$r=e=>!!e&&typeof e=="object"&&e[ru]===Kd,AE=e=>!!e&&typeof e=="object"&&e[ru]===Xx;function Qs(e){if(e&&typeof e=="object")switch(e[ru]){case cm:case Xx:return!0}return!1}function Vs(e){if(e&&typeof e=="object")switch(e[ru]){case yU:case cm:case Kd:case Xx:return!0}return!1}const ACe=e=>($r(e)||Qs(e))&&!!e.anchor,Eg=Symbol("break visit"),sSt=Symbol("skip children"),Dw=Symbol("remove node");function Zx(e,t){const n=aSt(t);CE(e)?Ry(null,e.contents,n,Object.freeze([e]))===Dw&&(e.contents=null):Ry(null,e,n,Object.freeze([]))}Zx.BREAK=Eg;Zx.SKIP=sSt;Zx.REMOVE=Dw;function Ry(e,t,n,i){const r=oSt(e,t,n,i);if(Vs(r)||Hs(r))return lSt(e,i,r),Ry(e,r,n,i);if(typeof r!="symbol"){if(Qs(t)){i=Object.freeze(i.concat(t));for(let s=0;se.replace(/[!,[\]{}]/g,t=>cSt[t]);class jo{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},jo.defaultYaml,t),this.tags=Object.assign({},jo.defaultTags,n)}clone(){const t=new jo(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new jo(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:jo.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},jo.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:jo.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},jo.defaultTags),this.atNextDocument=!1);const i=t.trim().split(/[ \t]+/),r=i.shift();switch(r){case"%TAG":{if(i.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;const[s,a]=i;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=i;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const a=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,a),!1}}default:return n(0,`Unknown directive ${r}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const a=t.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}const[,i,r]=t.match(/^(.*!)([^!]*)$/s);r||n(`The ${t} tag has no suffix`);const s=this.tags[i];if(s)try{return s+decodeURIComponent(r)}catch(a){return n(String(a)),null}return i==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,i]of Object.entries(this.tags))if(t.startsWith(i))return n+uSt(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);let r;if(t&&i.length>0&&Vs(t.contents)){const s={};Zx(t.contents,(a,l)=>{Vs(l)&&l.tag&&(s[l.tag]=!0)}),r=Object.keys(s)}else r=[];for(const[s,a]of i)s==="!!"&&a==="tag:yaml.org,2002:"||(!t||r.some(l=>l.startsWith(a)))&&n.push(`%TAG ${s} ${a}`);return n.join(` -`)}}jo.defaultYaml={explicit:!1,version:"1.2"};jo.defaultTags={"!!":"tag:yaml.org,2002:"};function _Ce(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function NCe(e){const t=new Set;return Zx(e,{Value(n,i){i.anchor&&t.add(i.anchor)}}),t}function jCe(e,t){for(let n=1;;++n){const i=`${e}${n}`;if(!t.has(i))return i}}function dSt(e,t){const n=[],i=new Map;let r=null;return{onAnchor:s=>{n.push(s),r??(r=NCe(e));const a=jCe(t,r);return r.add(a),a},setAnchors:()=>{for(const s of n){const a=i.get(s);if(typeof a=="object"&&a.anchor&&($r(a.node)||Qs(a.node)))a.node.anchor=a.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=s,l}}},sourceObjects:i}}function Iy(e,t,n,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let r=0,s=i.length;rtu(i,String(r),n));if(e&&typeof e.toJSON=="function"){if(!n||!ACe(e))return e.toJSON(t,n);const i={aliasCount:0,count:1,res:void 0};n.anchors.set(e,i),n.onCreate=s=>{i.res=s,delete n.onCreate};const r=e.toJSON(t,n);return n.onCreate&&n.onCreate(r),r}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class vU{constructor(t){Object.defineProperty(this,ru,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:s}={}){if(!CE(t))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=tu(this,"",a);if(typeof r=="function")for(const{count:c,res:u}of a.anchors.values())r(u,c);return typeof s=="function"?Iy(s,{"":l},"",l):l}}let xU=class extends vU{constructor(t){super(yU),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if((n==null?void 0:n.maxAliasCount)===0)throw new ReferenceError("Alias resolution is disabled");let i;n!=null&&n.aliasResolveCache?i=n.aliasResolveCache:(i=[],Zx(t,{Node:(s,a)=>{(Yx(a)||ACe(a))&&i.push(a)}}),n&&(n.aliasResolveCache=i));let r;for(const s of i){if(s===this)break;s.anchor===this.source&&(r=s)}return r}toJSON(t,n){if(!n)return{source:this.source};const{anchors:i,doc:r,maxAliasCount:s}=n,a=this.resolve(r,n);if(!a){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let l=i.get(a);if(l||(tu(a,null,n),l=i.get(a)),(l==null?void 0:l.res)===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=yA(r,a,i)),l.count*l.aliasCount>s)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return l.res}toString(t,n,i){const r=`*${this.source}`;if(t){if(_Ce(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${r} `}return r}};function yA(e,t,n){if(Yx(t)){const i=t.resolve(e),r=n&&i&&n.get(i);return r?r.count*r.aliasCount:0}else if(Qs(t)){let i=0;for(const r of t.items){const s=yA(e,r,n);s>i&&(i=s)}return i}else if(Hs(t)){const i=yA(e,t.key,n),r=yA(e,t.value,n);return Math.max(i,r)}return 1}const RCe=e=>!e||typeof e!="function"&&typeof e!="object";class Gn extends vU{constructor(t){super(Kd),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:tu(this.value,t,n)}toString(){return String(this.value)}}Gn.BLOCK_FOLDED="BLOCK_FOLDED";Gn.BLOCK_LITERAL="BLOCK_LITERAL";Gn.PLAIN="PLAIN";Gn.QUOTE_DOUBLE="QUOTE_DOUBLE";Gn.QUOTE_SINGLE="QUOTE_SINGLE";const fSt="tag:yaml.org,2002:";function hSt(e,t,n){if(t){const i=n.filter(s=>s.tag===t),r=i.find(s=>!s.format)??i[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(i=>{var r;return((r=i.identify)==null?void 0:r.call(i,e))&&!i.format})}function qS(e,t,n){var f,h,p;if(CE(e)&&(e=e.contents),Vs(e))return e;if(Hs(e)){const g=(h=(f=n.schema[cm]).createNode)==null?void 0:h.call(f,n.schema,null,n);return g.items.push(e),g}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:i,onAnchor:r,onTagObj:s,schema:a,sourceObjects:l}=n;let c;if(i&&e&&typeof e=="object"){if(c=l.get(e),c)return c.anchor??(c.anchor=r(e)),new xU(c.anchor);c={anchor:null,node:null},l.set(e,c)}t!=null&&t.startsWith("!!")&&(t=fSt+t.slice(2));let u=hSt(e,t,a.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const g=new Gn(e);return c&&(c.node=g),g}u=e instanceof Map?a[cm]:Symbol.iterator in Object(e)?a[Xx]:a[cm]}s&&(s(u),delete n.onTagObj);const d=u!=null&&u.createNode?u.createNode(n.schema,e,n):typeof((p=u==null?void 0:u.nodeClass)==null?void 0:p.from)=="function"?u.nodeClass.from(n.schema,e,n):new Gn(e);return t?d.tag=t:u.default||(d.tag=u.tag),c&&(c.node=d),d}function vN(e,t,n){let i=n;for(let r=t.length-1;r>=0;--r){const s=t[r];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=i,i=a}else i=new Map([[s,i]])}return qS(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const UO=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class ICe extends vU{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(i=>Vs(i)||Hs(i)?i.clone(t):i),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(UO(t))this.add(n);else{const[i,...r]=t,s=this.get(i,!0);if(Qs(s))s.addIn(r,n);else if(s===void 0&&this.schema)this.set(i,vN(this.schema,r,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}deleteIn(t){const[n,...i]=t;if(i.length===0)return this.delete(n);const r=this.get(n,!0);if(Qs(r))return r.deleteIn(i);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}getIn(t,n){const[i,...r]=t,s=this.get(i,!0);return r.length===0?!n&&$r(s)?s.value:s:Qs(s)?s.getIn(r,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Hs(n))return!1;const i=n.value;return i==null||t&&$r(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){const[n,...i]=t;if(i.length===0)return this.has(n);const r=this.get(n,!0);return Qs(r)?r.hasIn(i):!1}setIn(t,n){const[i,...r]=t;if(r.length===0)this.set(i,n);else{const s=this.get(i,!0);if(Qs(s))s.setIn(r,n);else if(s===void 0&&this.schema)this.set(i,vN(this.schema,r,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}}const pSt=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function ih(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Bg=(e,t,n)=>e.endsWith(` -`)?ih(n,t):n.includes(` +`),f=ECe(d,!t||i,r),{ref:h,onScroll:p}=BEe(f);return o.jsxs("div",{className:"block-thinking",children:[o.jsxs("button",{className:"think-head",onClick:u,type:"button",children:[o.jsx("span",{className:"think-icon","aria-hidden":"true",children:o.jsx(xCe,{className:`thinking-logo ${t?"":"is-active"}`})}),t?o.jsx("span",{className:"think-label think-label--done",children:s("blocks.thinkingDone")}):o.jsx(En,{className:"think-label",duration:2.4,spread:18,children:s("blocks.thinking")}),o.jsx(Mk,{className:`chev ${a?"open":""}`})]}),o.jsx("div",{className:`think-collapse ${a&&f?"open":""}`,children:o.jsx("div",{className:"think-collapse-inner",children:o.jsx("div",{className:"think-body scroll",ref:h,onScroll:p,children:f})})})]})}function Ywt({text:e}){return o.jsx("div",{className:"block-progress",role:"status","aria-live":"polite","aria-atomic":"true",children:o.jsxs("div",{className:"think-head progress-head",children:[o.jsx("span",{className:"think-icon","aria-hidden":"true",children:o.jsx(xCe,{className:"thinking-logo is-active"})}),o.jsx(En,{className:"think-label",duration:2.4,spread:18,children:e})]})})}function Zwt({value:e,onResolve:t,onResolveComparison:n,onDownload:i,onDeploy:r}){const{t:s,i18n:a}=xe("conversation"),[l,c]=m.useState(e.files?e:null),[u,d]=m.useState(!1),[f,h]=m.useState(!1),[p,g]=m.useState(null),[b,v]=m.useState(null),[y,x]=m.useState(""),[w,O]=m.useState(null),k=new Date(e.validatedAt),S=e.validatedAt?Number.isNaN(k.getTime())?e.validatedAt:k.toLocaleString(a.resolvedLanguage??a.language,{hour12:!1}):s("blocks.justNow");m.useEffect(()=>{if(!w)return;const T=window.setTimeout(()=>O(null),zwt);return()=>window.clearTimeout(T)},[w]);async function E(){if(l)return l;if(!t)throw new Error(s("blocks.sourceUnavailable"));const T=await t(e);return c(T),T}async function C(){v("source"),x(""),O(null);try{await E(),d(!0)}catch(T){x(T instanceof Error?T.message:String(T))}finally{v(null)}}async function N(){if(i){v("download"),x(""),O(null);try{await i(e),O({message:s("blocks.downloadStarted")})}catch(T){x(T instanceof Error?T.message:String(T))}finally{v(null)}}}async function _(){if(n){v("compare"),x(""),O(null);try{const T=p??await n(e);g(T),h(!0)}catch(T){x(T instanceof Error?T.message:String(T))}finally{v(null)}}}async function j(){v("deploy"),x(""),O(null);try{r==null||r(await E())}catch(T){x(T instanceof Error?T.message:String(T))}finally{v(null)}}return o.jsxs(o.Fragment,{children:[o.jsxs("section",{className:`delivery-card${e.verified?" is-verified":" is-unverified"}`,"aria-label":e.verified?s("blocks.verifiedDelivery"):s("blocks.generatedSource"),children:[o.jsxs("header",{className:"delivery-card-header",children:[o.jsx("span",{className:"delivery-card-icon",children:e.verified?o.jsx(Awt,{}):o.jsx(Twt,{})}),o.jsxs("div",{children:[o.jsx("strong",{children:e.verified?s("blocks.verifiedDelivery"):s("blocks.generatedSource")}),o.jsx("span",{children:e.agentName})]})]}),o.jsxs("dl",{className:"delivery-card-grid",children:[o.jsxs("div",{children:[o.jsx("dt",{children:s("blocks.entryPoint")}),o.jsx("dd",{children:o.jsx("code",{children:e.entryPoint})})]}),o.jsxs("div",{children:[o.jsx("dt",{children:s("blocks.fileCount")}),o.jsx("dd",{children:e.fileCount})]}),o.jsxs("div",{children:[o.jsx("dt",{children:s("blocks.size")}),o.jsxs("dd",{children:[(e.artifactSize/1024).toFixed(1)," KiB"]})]}),o.jsxs("div",{children:[o.jsx("dt",{children:e.verified?s("blocks.validationTime"):s("blocks.generationTime")}),o.jsx("dd",{children:S})]})]}),o.jsxs("p",{className:"delivery-card-gates",children:[e.verified?s("blocks.checksPassed",{count:e.gateSummary.length}):s("blocks.sourceReady")," ","· ",o.jsx("code",{children:e.artifactSha256.slice(0,12)})]}),e.verified?null:o.jsx("p",{className:"delivery-card-guidance",children:s("blocks.sourceGuidance")}),o.jsxs("div",{className:"delivery-card-actions",children:[o.jsxs("button",{type:"button",className:"delivery-card-secondary",onClick:()=>void C(),disabled:!t||b!==null,children:[b==="source"?o.jsx(hi,{className:"spin","aria-hidden":"true"}):null,s("blocks.viewSource")]}),e.projectId&&e.versionId&&e.parentVersionId?o.jsxs("button",{type:"button",className:"delivery-card-secondary",onClick:()=>void _(),disabled:!n||b!==null,children:[b==="compare"?o.jsx(hi,{className:"spin","aria-hidden":"true"}):null,s(b==="compare"?"blocks.preparing":"blocks.viewChanges")]}):null,o.jsxs("button",{type:"button",className:"delivery-card-secondary",onClick:()=>void N(),disabled:!i||b!==null,"aria-busy":b==="download",children:[b==="download"?o.jsx(hi,{className:"spin","aria-hidden":"true"}):null,s(b==="download"?"blocks.preparing":"blocks.downloadSource")]}),o.jsxs("button",{type:"button",onClick:()=>void j(),disabled:!e.deployable||!r||!t||b!==null,title:e.deployable?void 0:s("blocks.sourceNotReady"),children:[b==="deploy"?o.jsx(hi,{className:"spin","aria-hidden":"true"}):null,s("blocks.manualDeploy")]})]}),y?o.jsx("p",{className:"delivery-card-error",role:"alert",children:y}):null,w?o.jsx("p",{className:"delivery-card-status",role:"status","aria-live":"polite",children:w.message}):null]}),o.jsx(QS,{project:{name:e.agentName,files:(l==null?void 0:l.files)??[]},open:u,onClose:()=>d(!1),onChange:()=>{},readOnly:!0}),o.jsx(QS,{project:{name:(p==null?void 0:p.target.agentName)??e.agentName,files:(p==null?void 0:p.target.files)??[]},comparison:p?{baseProject:{name:p.base.agentName,files:p.base.files??[]},baseLabel:s("blocks.beforeOptimization"),targetLabel:s("blocks.afterOptimization")}:void 0,open:f,onClose:()=>h(!1),onChange:()=>{},readOnly:!0})]})}function TCe(){return o.jsx(CCe,{text:"",done:!1})}const Jwt=m.memo(function({text:t,streaming:n,onStreamFrame:i,onStreamComplete:r}){const s=ECe(t,n,i,r);return s?o.jsx("div",{className:"bubble",children:o.jsx(Bu,{text:s,streaming:n})}):null});function eSt({title:e,summary:t,items:n,done:i}){const{t:r}=xe("conversation"),[s,a]=m.useState(!i),l=m.useRef(!1);m.useEffect(()=>{l.current||a(!i)},[i]);const c=()=>{l.current=!0,a(u=>!u)};return o.jsxs("div",{className:"block-plan",children:[o.jsxs("button",{className:"plan-head",type:"button",onClick:c,"aria-expanded":n.length>0?s:void 0,disabled:n.length===0,children:[o.jsx("span",{className:"plan-icon","aria-hidden":"true",children:o.jsx(Wwt,{})}),i?o.jsx("span",{className:"plan-title",children:e}):o.jsx(En,{className:"plan-title",duration:2.2,spread:15,children:e}),t?o.jsx("span",{className:"plan-summary",children:t}):null,n.length>0?o.jsx(cU,{className:`plan-chevron${s?" is-open":""}`}):null]}),o.jsx("div",{className:`think-collapse ${s&&n.length>0?"open":""}`,children:o.jsx("div",{className:"think-collapse-inner",children:n.length>0?o.jsx("ol",{className:"plan-items",children:n.map((u,d)=>o.jsxs("li",{"data-status":u.status,children:[o.jsx("span",{className:"plan-item-marker","aria-hidden":"true"}),o.jsx("span",{className:"plan-item-text",children:u.text}),o.jsx("small",{children:r(`blocks.planStatuses.${u.status}`)})]},`${d}:${u.text}`))}):null})})]})}function tSt(e){if(!e||typeof e!="object")return[];const t=e,n=t.result;let i=[];if(Array.isArray(t.studio_artifacts))i=t.studio_artifacts;else if(n&&typeof n=="object"){const r=n.studio_artifacts;Array.isArray(r)&&(i=r)}return i.flatMap(r=>{if(!r||typeof r!="object")return[];const s=r;return typeof s.name=="string"&&typeof s.contentUrl=="string"?[{name:s.name,contentUrl:s.contentUrl}]:[]})}function nSt({name:e,args:t,response:n,done:i,status:r,defaultOpen:s=!1,retrying:a=!1,codexActivity:l,onBranchSelect:c,onAction:u}){const{t:d}=xe("conversation"),h=e==="create_agents"&&i&&X1t(t,n)?"failed":r??(i?"completed":"running"),p=e==="create_agents"&&h==="failed"&&a,g=Cwt(e),b=g==null?void 0:g.detailRenderer,v=(g==null?void 0:g.hideHeader)===!0,y=v||s||!!b||!!l,[x,w]=m.useState(y),O=m.useRef(!1);m.useEffect(()=>{!O.current&&y&&w(!0)},[y]);const k=()=>{O.current=!0,w(_=>!_)},S=e===kCe?d("blocks.renderUi"):e,E=tSt(n),C=n==null?null:typeof n=="string"?n:JSON.stringify(n,null,2),N=C&&C.length>2e3?`${C.slice(0,2e3)} +${d("blocks.truncated")}`:C;return o.jsxs(mr.div,{className:`block-tool${g?" block-tool--builtin":""}`,"data-status":h,initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},children:[g&&!v?o.jsx(V1t,{definition:g,label:p?d("blocks.agentAdjusting"):h==="failed"?d(`blocks.tools.${g.name}.failed`,{defaultValue:g.failedLabel??g.doneLabel}):Xwt(e,t,d),done:i,open:x,onToggle:k}):g?null:o.jsxs("button",{className:"tool-head tool-head--generic",onClick:k,type:"button","aria-expanded":x,children:[o.jsx("span",{className:"tool-icon tool-icon--generic","aria-hidden":"true",children:o.jsx(qwt,{})}),i?o.jsx("span",{className:"tool-name",children:S}):o.jsx(En,{className:"tool-name",duration:2.2,spread:15,children:S}),o.jsx(cU,{className:`tool-chevron${x?" is-open":""}`})]}),o.jsx("div",{className:`${v?"":"think-collapse "}${x?"open":""}`,children:o.jsxs("div",{className:"think-collapse-inner",children:[l?o.jsxs("section",{className:"codex-sandbox-run","aria-label":d("blocks.sandboxDetails"),children:[o.jsxs("div",{className:"codex-sandbox-run__label",children:[o.jsxs("span",{className:"codex-sandbox-run__badge",children:[o.jsx(Kwt,{}),o.jsx("span",{children:"Codex Sandbox"})]}),o.jsx("span",{className:"codex-sandbox-run__title",children:l.title})]}),o.jsx(Gwt,{activity:l}),o.jsx("div",{className:"codex-sandbox-run__stream",children:l.items.length>0?o.jsx(wE,{blocks:l.items.map(_=>_.block),streaming:!i,onAction:u}):o.jsx(En,{className:"codex-sandbox-run__empty",children:d("blocks.waitingCodex")})})]}):null,b?o.jsx(b,{args:t,response:n,status:h,onBranchSelect:c}):l?null:o.jsxs("div",{className:"tool-detail",children:[t!=null&&o.jsxs("div",{className:"tool-section",children:[o.jsx("div",{className:"tool-section-label",children:d("blocks.arguments")}),o.jsx("pre",{className:"tool-args",children:JSON.stringify(t,null,2)})]}),N!=null&&o.jsxs("div",{className:"tool-section",children:[o.jsx("div",{className:"tool-section-label",children:d("blocks.result")}),o.jsx("pre",{className:"tool-args tool-result",children:N})]}),E.length>0&&o.jsxs("div",{className:"tool-section",children:[o.jsx("div",{className:"tool-section-label",children:d("blocks.artifacts")}),o.jsx("div",{className:"studio-tool-artifacts",children:E.map(_=>o.jsx("a",{href:_.contentUrl,download:_.name,children:d("blocks.downloadNamed",{name:_.name})},`${_.contentUrl}:${_.name}`))})]})]})]})})]})}function iSt({block:e,onDownload:t,onPreview:n}){const{t:i}=xe("conversation"),[r,s]=m.useState(""),[a,l]=m.useState(""),[c,u]=m.useState(null);m.useEffect(()=>()=>{c&&URL.revokeObjectURL(c.url)},[c]);const d=()=>u(null),f=async(g,b)=>{if(t){s(`download:${g}`),l("");try{await t(g,b)}catch(v){l(v instanceof Error?v.message:String(v))}finally{s("")}}},h=async(g,b,v)=>{if(n){s(`preview:${v}`),l("");try{const y=await n(g,b);u({name:v,url:y})}catch(y){l(y instanceof Error?y.message:String(y))}finally{s("")}}},p=e.files.filter(g=>!g.filename.endsWith(".preview.webp"));return o.jsxs("div",{className:"artifact-list",children:[p.map(g=>{const b=`${g.filename.replace(/\.pptx$/i,"")}.preview.webp`,v=e.files.find(y=>y.filename===b);return o.jsxs("div",{className:"artifact-card",children:[o.jsx("span",{className:"artifact-card__icon","aria-hidden":"true",children:o.jsx(AF,{})}),o.jsxs("span",{className:"artifact-card__copy",children:[o.jsx("span",{className:"artifact-card__name",children:g.filename}),o.jsx("span",{className:"artifact-card__hint",children:i("blocks.powerpoint")})]}),o.jsxs("span",{className:"artifact-card__actions",children:[v&&o.jsxs("button",{className:"artifact-card__action",type:"button",disabled:!n||r!=="",onClick:()=>void h(v.filename,v.version,g.filename),children:[r===`preview:${g.filename}`?o.jsx(hi,{className:"spin"}):o.jsx(n7e,{}),i("blocks.preview")]}),o.jsxs("button",{className:"artifact-card__action artifact-card__action--primary",type:"button",disabled:!t||r!=="",onClick:()=>void f(g.filename,g.version),children:[r===`download:${g.filename}`?o.jsx(hi,{className:"spin"}):o.jsx(Qj,{}),i("blocks.download")]})]})]},`${g.filename}:${g.version}`)}),a&&o.jsx("div",{className:"artifact-card__error",children:a}),c&&o.jsxs("div",{className:"artifact-preview",role:"dialog","aria-modal":"true","aria-label":i("blocks.previewDialog",{name:c.name}),children:[o.jsx("button",{className:"artifact-preview__backdrop",type:"button","aria-label":i("blocks.closePreview"),onClick:d}),o.jsxs("div",{className:"artifact-preview__panel",children:[o.jsxs("div",{className:"artifact-preview__header",children:[o.jsx("span",{children:c.name}),o.jsx("button",{type:"button","aria-label":i("blocks.closePreview"),onClick:d,children:o.jsx(Ra,{})})]}),o.jsx("div",{className:"artifact-preview__canvas",children:o.jsx("img",{src:c.url,alt:i("blocks.slidePreview",{name:c.name})})})]})]})]})}function rSt({block:e,onAuth:t}){const{t:n}=xe("conversation"),[i,r]=m.useState(e.done?"done":"idle"),[s,a]=m.useState(""),l=e.label||n("blocks.mcpToolset"),c=(()=>{try{return e.authUri?new URL(e.authUri).host:""}catch{return""}})(),u=async()=>{if(t){a(""),r("authorizing");try{await t(e),r("done")}catch(f){a(f instanceof Error?f.message:String(f)),r("idle")}}};return e.done||i==="done"?o.jsxs(mr.div,{className:"auth-card-collapsed",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[o.jsx(gW,{className:"auth-card-icon auth-card-icon--done"}),o.jsx("span",{children:n("blocks.authorized",{tool:l})})]}):o.jsxs(mr.div,{className:"auth-card",initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},children:[o.jsxs("div",{className:"auth-card-head",children:[o.jsx(gW,{className:"auth-card-icon"}),o.jsx("span",{className:"auth-card-title",children:n("blocks.authorizationRequired",{tool:l})})]}),o.jsxs("p",{className:"auth-card-desc",children:[o.jsx(BA,{t:n,i18nKey:"blocks.oauthDescription",values:{tool:l},components:{code:o.jsx("code",{className:"auth-card-code"})}}),c&&o.jsxs(o.Fragment,{children:[" ",o.jsx(BA,{t:n,i18nKey:"blocks.oauthProvider",values:{provider:c},components:{code:o.jsx("code",{className:"auth-card-code"})}})," "]}),n("blocks.oauthContinue")]}),o.jsx("button",{className:"auth-card-btn",onClick:u,disabled:i==="authorizing"||!e.authUri,children:i==="authorizing"?o.jsxs(o.Fragment,{children:[o.jsx(hi,{className:"cw-i spin"})," ",n("blocks.waitingAuthorization")]}):o.jsx(o.Fragment,{children:n("blocks.authorize")})}),!e.authUri&&o.jsx("div",{className:"auth-card-err",children:n("blocks.missingAuthorizationUrl")}),s&&o.jsx("div",{className:"auth-card-err",children:s})]})}function wE({blocks:e,appName:t="",streaming:n=!1,onStreamFrame:i,onStreamComplete:r,onAction:s,onAuth:a,onArtifactDownload:l,onArtifactPreview:c,onResolveDelivery:u,onResolveDeliveryComparison:d,onDownloadDelivery:f,onDeployDelivery:h,onBranchSelect:p}){const g=e.reduce((b,v,y)=>v.kind==="text"?y:b,-1);return o.jsx(o.Fragment,{children:e.map((b,v)=>{switch(b.kind){case"progress":return o.jsx(Ywt,{text:b.text},"build-progress");case"thinking":{const y=e.slice(v+1).some(x=>x.kind==="text"&&!!x.text.trim());return o.jsx(CCe,{text:b.text,done:b.done,answerStarted:y,streaming:n,onStreamFrame:i},v)}case"text":{const y=b.text.replace(/^\s+/,"");return y?o.jsx(Jwt,{text:y,streaming:n,onStreamFrame:i,onStreamComplete:v===g?r:void 0},v):null}case"plan":return o.jsx(eSt,{title:b.title,summary:b.summary,items:b.items,done:b.done},v);case"attachment":return o.jsx(ZR,{appName:t,items:b.files},v);case"artifact":return o.jsx(iSt,{block:b,onDownload:l,onPreview:c},v);case"delivery":return o.jsx(Zwt,{value:b.value,onResolve:u,onResolveComparison:d,onDownload:f,onDeploy:h},v);case"invocation":return o.jsx(YR,{value:b.value},v);case"tool":{if(b.name===kCe&&b.done)return null;const y=b.name==="create_agents"&&e.slice(v+1).some(x=>x.kind==="tool"&&x.name==="create_agents");return o.jsx(nSt,{name:b.name,args:b.args,response:b.response,done:b.done,status:b.status,defaultOpen:b.defaultOpen,retrying:b.name==="create_agents"&&(n||y),codexActivity:b.codexActivity,onBranchSelect:p,onAction:s},v)}case"agent-transfer":return null;case"auth":return o.jsx(rSt,{block:b,onAuth:a},v);case"a2ui":return FEe(b.messages).filter(y=>y.components[y.rootId]).map(y=>o.jsx(mr.div,{initial:{opacity:0,y:8,scale:.985},animate:{opacity:1,y:0,scale:1},transition:{type:"spring",stiffness:380,damping:30},children:o.jsx(R1t,{surface:y,onAction:s})},`${v}-${y.surfaceId}`));default:return null}})})}const sSt=()=>{};function aSt(e){if(e.kind==="message")return{kind:"text",text:e.text};if(e.kind==="thinking")return{kind:"thinking",text:e.text,done:e.status==="done"};if(e.kind==="tool")return{kind:"tool",name:e.name,args:e.args,response:e.response,done:e.status==="done"};throw new Error(Dt("conversation.unsupportedActivity"))}function oSt({activities:e}){const{t}=xe("skills"),n=m.useMemo(()=>e.filter(i=>i.kind!=="status").map(aSt),[e]);return n.length===0?null:o.jsx("div",{className:"skill-conversation","aria-label":t("conversation.ariaLabel"),"aria-live":"polite",children:o.jsx(wE,{blocks:n,onAction:sSt})})}function VY(){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"m7 9 5 5 5-5",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function pA({label:e,value:t,options:n,onChange:i,disabled:r=!1,allowCustom:s=!1,required:a=!1,placeholder:l,error:c}){const{t:u}=xe("skills"),d=l??u("configSelect.placeholder"),f=m.useId(),h=m.useId(),p=m.useId(),g=m.useRef(null),b=m.useRef(null),v=m.useRef(null),y=m.useRef(null),x=m.useRef([]),w=n.findIndex(R=>R.value===t),O=t.trim().toLocaleLowerCase(),k=s&&O?n.filter(R=>R.value.toLocaleLowerCase().includes(O)||R.label.toLocaleLowerCase().includes(O)):n,[S,E]=m.useState(!1),[C,N]=m.useState(Math.max(0,w)),_=w>=0?n[w]:void 0,j=r||!s&&n.length===0,T=(R=!1)=>{E(!1),R&&window.requestAnimationFrame(()=>{var P,$;return s?(P=v.current)==null?void 0:P.focus():($=b.current)==null?void 0:$.focus()})},L=R=>{j||k.length!==0&&(N(Math.min(Math.max(R,0),k.length-1)),E(!0))};m.useEffect(()=>{if(!S)return;const R=y.current,P=s?void 0:window.requestAnimationFrame(()=>{var I;(I=x.current[C])==null||I.focus()}),$=I=>{if(!R)return;const H=R.scrollTop<=0,X=R.scrollTop+R.clientHeight>=R.scrollHeight-1;(R.scrollHeight<=R.clientHeight||I.deltaY<0&&H||I.deltaY>0&&X)&&I.preventDefault(),I.stopPropagation()},M=I=>{var H;I.target instanceof Node&&!((H=g.current)!=null&&H.contains(I.target))&&T()},B=I=>{I.key==="Escape"&&T(!0)};return R==null||R.addEventListener("wheel",$,{passive:!1}),window.addEventListener("pointerdown",M),window.addEventListener("keydown",B),()=>{P!==void 0&&window.cancelAnimationFrame(P),R==null||R.removeEventListener("wheel",$),window.removeEventListener("pointerdown",M),window.removeEventListener("keydown",B)}},[C,s,S]);const A=R=>{var $;if(k.length===0)return;const P=(R+k.length)%k.length;N(P),($=x.current[P])==null||$.focus()};return o.jsxs("div",{ref:g,className:`skill-config-select${S?" is-open":""}`,onBlur:R=>{var P;(!R.relatedTarget||!((P=g.current)!=null&&P.contains(R.relatedTarget)))&&T()},children:[o.jsxs("span",{id:h,className:"skill-config-select__label",children:[e,a?o.jsx("span",{className:"skill-required-mark","aria-hidden":"true",children:"*"}):null]}),s?o.jsxs("div",{className:`skill-config-select__trigger is-editable${r?" is-disabled":""}`,"aria-expanded":S,children:[o.jsx("input",{ref:v,value:t,disabled:r,role:"combobox","aria-autocomplete":"list","aria-expanded":S,"aria-controls":S?f:void 0,"aria-labelledby":h,"aria-required":a,"aria-invalid":!!c,"aria-describedby":c?p:void 0,placeholder:d,onChange:R=>{i(R.target.value),N(0),n.length>0&&E(!0)},onClick:()=>{!S&&k.length>0&&L(0)},onKeyDown:R=>{var P,$;if(!(R.nativeEvent.isComposing||R.keyCode===229))if(R.key==="ArrowDown")R.preventDefault(),S?(P=x.current[C])==null||P.focus():L(0);else if(R.key==="ArrowUp")R.preventDefault(),S?($=x.current[k.length-1])==null||$.focus():L(k.length-1);else if(R.key==="Enter"&&S){R.preventDefault();const M=k[C];M&&i(M.value),T()}else R.key==="Escape"&&(R.preventDefault(),T())}}),o.jsx("button",{type:"button",className:"skill-config-select__toggle",disabled:r||n.length===0,"aria-label":u(S?"configSelect.collapseOptions":"configSelect.expandOptions"),onClick:()=>{S?T():L(0)},children:o.jsx(VY,{})})]}):o.jsxs("button",{ref:b,type:"button",className:"skill-config-select__trigger",disabled:j,"aria-haspopup":"listbox","aria-expanded":S,"aria-controls":S?f:void 0,"aria-labelledby":h,"aria-required":a,onClick:()=>{S?T():L(w>=0?w:0)},onKeyDown:R=>{R.key==="ArrowDown"?(R.preventDefault(),L(w>=0?w:0)):R.key==="ArrowUp"&&(R.preventDefault(),L(w>=0?w:n.length-1))},children:[o.jsx("span",{className:_?void 0:"is-placeholder",title:_==null?void 0:_.label,children:(_==null?void 0:_.label)||(n.length===0?u("configSelect.noOptions"):d)}),o.jsx(VY,{})]}),S?o.jsxs("div",{ref:y,id:f,className:"skill-config-select__menu",role:"listbox","aria-labelledby":h,children:[k.length===0?o.jsx("div",{className:"skill-config-select__empty",role:"status",children:u("configSelect.noMatches")}):null,k.map((R,P)=>{const $=R.value===t;return o.jsx("button",{ref:M=>{x.current[P]=M},type:"button",role:"option","aria-selected":$,tabIndex:P===C?0:-1,className:`skill-config-select__option${$?" is-selected":""}`,title:R.label,onFocus:()=>N(P),onClick:()=>{i(R.value),T(!0)},onKeyDown:M=>{M.key==="Enter"||M.key===" "?(M.preventDefault(),i(R.value),T(!0)):M.key==="ArrowDown"?(M.preventDefault(),A(P+1)):M.key==="ArrowUp"?(M.preventDefault(),A(P-1)):M.key==="Home"?(M.preventDefault(),A(0)):M.key==="End"&&(M.preventDefault(),A(n.length-1))},children:R.label},R.value)})]}):null,c?o.jsx("span",{id:p,className:"skill-config-select__error",role:"alert",children:c}):null]})}function Sa(e,t){return e instanceof Error?e:typeof e=="string"&&e.trim()?new Error(e.trim()):new Error(t)}function ol({error:e}){var s,a,l,c,u;const{t}=xe("skills"),n=e,i=(a=(s=n.originalError)==null?void 0:s.message)==null?void 0:a.trim(),r=[typeof n.status=="number"?`HTTP ${n.status}${n.statusText?` ${n.statusText}`:""}`:"",n.code?t("errorDetails.code",{code:n.code}):"",(l=n.originalError)!=null&&l.type?t("errorDetails.type",{type:n.originalError.type}):"",(c=n.originalError)!=null&&c.repr&&n.originalError.repr!==i?t("errorDetails.representation",{value:n.originalError.repr}):"",(u=n.rawResponse)!=null&&u.trim()?t("errorDetails.rawResponse",{value:n.rawResponse.trim()}):""].filter(Boolean);return o.jsxs("div",{className:"skill-error-details",children:[o.jsx("div",{className:"skill-error-details__summary",children:e.message}),i?o.jsx("div",{className:"skill-error-details__original",children:t("errorDetails.original",{message:i})}):null,r.length>0?o.jsxs("details",{children:[o.jsx("summary",{children:t("errorDetails.details")}),o.jsx("pre",{children:r.join(` +`)})]}):null]})}const bU=Symbol.for("yaml.alias"),X6=Symbol.for("yaml.document"),rm=Symbol.for("yaml.map"),ACe=Symbol.for("yaml.pair"),qd=Symbol.for("yaml.scalar"),qx=Symbol.for("yaml.seq"),iu=Symbol.for("yaml.node.type"),Wx=e=>!!e&&typeof e=="object"&&e[iu]===bU,SE=e=>!!e&&typeof e=="object"&&e[iu]===X6,kE=e=>!!e&&typeof e=="object"&&e[iu]===rm,Vs=e=>!!e&&typeof e=="object"&&e[iu]===ACe,Lr=e=>!!e&&typeof e=="object"&&e[iu]===qd,EE=e=>!!e&&typeof e=="object"&&e[iu]===qx;function Us(e){if(e&&typeof e=="object")switch(e[iu]){case rm:case qx:return!0}return!1}function zs(e){if(e&&typeof e=="object")switch(e[iu]){case bU:case rm:case qd:case qx:return!0}return!1}const _Ce=e=>(Lr(e)||Us(e))&&!!e.anchor,Og=Symbol("break visit"),lSt=Symbol("skip children"),Nw=Symbol("remove node");function Kx(e,t){const n=cSt(t);SE(e)?Ay(null,e.contents,n,Object.freeze([e]))===Nw&&(e.contents=null):Ay(null,e,n,Object.freeze([]))}Kx.BREAK=Og;Kx.SKIP=lSt;Kx.REMOVE=Nw;function Ay(e,t,n,i){const r=uSt(e,t,n,i);if(zs(r)||Vs(r))return dSt(e,i,r),Ay(e,r,n,i);if(typeof r!="symbol"){if(Us(t)){i=Object.freeze(i.concat(t));for(let s=0;se.replace(/[!,[\]{}]/g,t=>fSt[t]);class No{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},No.defaultYaml,t),this.tags=Object.assign({},No.defaultTags,n)}clone(){const t=new No(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new No(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:No.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},No.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:No.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},No.defaultTags),this.atNextDocument=!1);const i=t.trim().split(/[ \t]+/),r=i.shift();switch(r){case"%TAG":{if(i.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;const[s,a]=i;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=i;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const a=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,a),!1}}default:return n(0,`Unknown directive ${r}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const a=t.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}const[,i,r]=t.match(/^(.*!)([^!]*)$/s);r||n(`The ${t} tag has no suffix`);const s=this.tags[i];if(s)try{return s+decodeURIComponent(r)}catch(a){return n(String(a)),null}return i==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,i]of Object.entries(this.tags))if(t.startsWith(i))return n+hSt(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);let r;if(t&&i.length>0&&zs(t.contents)){const s={};Kx(t.contents,(a,l)=>{zs(l)&&l.tag&&(s[l.tag]=!0)}),r=Object.keys(s)}else r=[];for(const[s,a]of i)s==="!!"&&a==="tag:yaml.org,2002:"||(!t||r.some(l=>l.startsWith(a)))&&n.push(`%TAG ${s} ${a}`);return n.join(` +`)}}No.defaultYaml={explicit:!1,version:"1.2"};No.defaultTags={"!!":"tag:yaml.org,2002:"};function NCe(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function jCe(e){const t=new Set;return Kx(e,{Value(n,i){i.anchor&&t.add(i.anchor)}}),t}function RCe(e,t){for(let n=1;;++n){const i=`${e}${n}`;if(!t.has(i))return i}}function pSt(e,t){const n=[],i=new Map;let r=null;return{onAnchor:s=>{n.push(s),r??(r=jCe(e));const a=RCe(t,r);return r.add(a),a},setAnchors:()=>{for(const s of n){const a=i.get(s);if(typeof a=="object"&&a.anchor&&(Lr(a.node)||Us(a.node)))a.node.anchor=a.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=s,l}}},sourceObjects:i}}function _y(e,t,n,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let r=0,s=i.length;reu(i,String(r),n));if(e&&typeof e.toJSON=="function"){if(!n||!_Ce(e))return e.toJSON(t,n);const i={aliasCount:0,count:1,res:void 0};n.anchors.set(e,i),n.onCreate=s=>{i.res=s,delete n.onCreate};const r=e.toJSON(t,n);return n.onCreate&&n.onCreate(r),r}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class yU{constructor(t){Object.defineProperty(this,iu,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:s}={}){if(!SE(t))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=eu(this,"",a);if(typeof r=="function")for(const{count:c,res:u}of a.anchors.values())r(u,c);return typeof s=="function"?_y(s,{"":l},"",l):l}}let vU=class extends yU{constructor(t){super(bU),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if((n==null?void 0:n.maxAliasCount)===0)throw new ReferenceError("Alias resolution is disabled");let i;n!=null&&n.aliasResolveCache?i=n.aliasResolveCache:(i=[],Kx(t,{Node:(s,a)=>{(Wx(a)||_Ce(a))&&i.push(a)}}),n&&(n.aliasResolveCache=i));let r;for(const s of i){if(s===this)break;s.anchor===this.source&&(r=s)}return r}toJSON(t,n){if(!n)return{source:this.source};const{anchors:i,doc:r,maxAliasCount:s}=n,a=this.resolve(r,n);if(!a){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let l=i.get(a);if(l||(eu(a,null,n),l=i.get(a)),(l==null?void 0:l.res)===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=mA(r,a,i)),l.count*l.aliasCount>s)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return l.res}toString(t,n,i){const r=`*${this.source}`;if(t){if(NCe(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${r} `}return r}};function mA(e,t,n){if(Wx(t)){const i=t.resolve(e),r=n&&i&&n.get(i);return r?r.count*r.aliasCount:0}else if(Us(t)){let i=0;for(const r of t.items){const s=mA(e,r,n);s>i&&(i=s)}return i}else if(Vs(t)){const i=mA(e,t.key,n),r=mA(e,t.value,n);return Math.max(i,r)}return 1}const ICe=e=>!e||typeof e!="function"&&typeof e!="object";class Wn extends yU{constructor(t){super(qd),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:eu(this.value,t,n)}toString(){return String(this.value)}}Wn.BLOCK_FOLDED="BLOCK_FOLDED";Wn.BLOCK_LITERAL="BLOCK_LITERAL";Wn.PLAIN="PLAIN";Wn.QUOTE_DOUBLE="QUOTE_DOUBLE";Wn.QUOTE_SINGLE="QUOTE_SINGLE";const mSt="tag:yaml.org,2002:";function gSt(e,t,n){if(t){const i=n.filter(s=>s.tag===t),r=i.find(s=>!s.format)??i[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(i=>{var r;return((r=i.identify)==null?void 0:r.call(i,e))&&!i.format})}function zS(e,t,n){var f,h,p;if(SE(e)&&(e=e.contents),zs(e))return e;if(Vs(e)){const g=(h=(f=n.schema[rm]).createNode)==null?void 0:h.call(f,n.schema,null,n);return g.items.push(e),g}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:i,onAnchor:r,onTagObj:s,schema:a,sourceObjects:l}=n;let c;if(i&&e&&typeof e=="object"){if(c=l.get(e),c)return c.anchor??(c.anchor=r(e)),new vU(c.anchor);c={anchor:null,node:null},l.set(e,c)}t!=null&&t.startsWith("!!")&&(t=mSt+t.slice(2));let u=gSt(e,t,a.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const g=new Wn(e);return c&&(c.node=g),g}u=e instanceof Map?a[rm]:Symbol.iterator in Object(e)?a[qx]:a[rm]}s&&(s(u),delete n.onTagObj);const d=u!=null&&u.createNode?u.createNode(n.schema,e,n):typeof((p=u==null?void 0:u.nodeClass)==null?void 0:p.from)=="function"?u.nodeClass.from(n.schema,e,n):new Wn(e);return t?d.tag=t:u.default||(d.tag=u.tag),c&&(c.node=d),d}function gN(e,t,n){let i=n;for(let r=t.length-1;r>=0;--r){const s=t[r];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=i,i=a}else i=new Map([[s,i]])}return zS(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const MO=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class PCe extends yU{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(i=>zs(i)||Vs(i)?i.clone(t):i),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(MO(t))this.add(n);else{const[i,...r]=t,s=this.get(i,!0);if(Us(s))s.addIn(r,n);else if(s===void 0&&this.schema)this.set(i,gN(this.schema,r,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}deleteIn(t){const[n,...i]=t;if(i.length===0)return this.delete(n);const r=this.get(n,!0);if(Us(r))return r.deleteIn(i);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}getIn(t,n){const[i,...r]=t,s=this.get(i,!0);return r.length===0?!n&&Lr(s)?s.value:s:Us(s)?s.getIn(r,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Vs(n))return!1;const i=n.value;return i==null||t&&Lr(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){const[n,...i]=t;if(i.length===0)return this.has(n);const r=this.get(n,!0);return Us(r)?r.hasIn(i):!1}setIn(t,n){const[i,...r]=t;if(r.length===0)this.set(i,n);else{const s=this.get(i,!0);if(Us(s))s.setIn(r,n);else if(s===void 0&&this.schema)this.set(i,gN(this.schema,r,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}}const bSt=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Zf(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Lg=(e,t,n)=>e.endsWith(` +`)?Zf(n,t):n.includes(` `)?` -`+ih(n,t):(e.endsWith(" ")?"":" ")+n,PCe="flow",Z6="block",vA="quoted";function iI(e,t,n="flow",{indentAtStart:i,lineWidth:r=80,minContentWidth:s=20,onFold:a,onOverflow:l}={}){if(!r||r<0)return e;rr-Math.max(2,s)?u.push(0):f=r-i);let h,p,g=!1,b=-1,v=-1,y=-1;n===Z6&&(b=KY(e,b,t.length),b!==-1&&(f=b+c));for(let w;w=e[b+=1];){if(n===vA&&w==="\\"){switch(v=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}y=b}if(w===` -`)n===Z6&&(b=KY(e,b,t.length)),f=b+t.length+c,h=void 0;else{if(w===" "&&p&&p!==" "&&p!==` +`+Zf(n,t):(e.endsWith(" ")?"":" ")+n,DCe="flow",Y6="block",gA="quoted";function tI(e,t,n="flow",{indentAtStart:i,lineWidth:r=80,minContentWidth:s=20,onFold:a,onOverflow:l}={}){if(!r||r<0)return e;rr-Math.max(2,s)?u.push(0):f=r-i);let h,p,g=!1,b=-1,v=-1,y=-1;n===Y6&&(b=HY(e,b,t.length),b!==-1&&(f=b+c));for(let w;w=e[b+=1];){if(n===gA&&w==="\\"){switch(v=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}y=b}if(w===` +`)n===Y6&&(b=HY(e,b,t.length)),f=b+t.length+c,h=void 0;else{if(w===" "&&p&&p!==" "&&p!==` `&&p!==" "){const O=e[b+1];O&&O!==" "&&O!==` -`&&O!==" "&&(h=b)}if(b>=f)if(h)u.push(h),f=h+c,h=void 0;else if(n===vA){for(;p===" "||p===" ";)p=w,w=e[b+=1],g=!0;const O=b>y+1?b-2:v-1;if(d[O])return e;u.push(O),d[O]=!0,f=O+c,h=void 0}else g=!0}p=w}if(g&&l&&l(),u.length===0)return e;a&&a();let x=e.slice(0,u[0]);for(let w=0;w({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),sI=e=>/^(%|---|\.\.\.)/m.test(e);function mSt(e,t,n){if(!t||t<0)return!1;const i=t-n,r=e.length;if(r<=i)return!1;for(let s=0,a=0;si)return!0;if(a=s+1,r-a<=i)return!1}return!0}function Mw(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:i}=t,r=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(sI(e)?" ":"");let a="",l=0;for(let c=0,u=n[c];u;u=n[++c])if(u===" "&&n[c+1]==="\\"&&n[c+2]==="n"&&(a+=n.slice(l,c)+"\\ ",c+=1,l=c,u="\\"),u==="\\")switch(n[c+1]){case"u":{a+=n.slice(l,c);const d=n.substr(c+2,4);switch(d){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:d.substr(0,2)==="00"?a+="\\x"+d.substr(2):a+=n.substr(c,6)}c+=5,l=c+1}break;case"n":if(i||n[c+2]==='"'||n.length=f)if(h)u.push(h),f=h+c,h=void 0;else if(n===gA){for(;p===" "||p===" ";)p=w,w=e[b+=1],g=!0;const O=b>y+1?b-2:v-1;if(d[O])return e;u.push(O),d[O]=!0,f=O+c,h=void 0}else g=!0}p=w}if(g&&l&&l(),u.length===0)return e;a&&a();let x=e.slice(0,u[0]);for(let w=0;w({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),iI=e=>/^(%|---|\.\.\.)/m.test(e);function ySt(e,t,n){if(!t||t<0)return!1;const i=t-n,r=e.length;if(r<=i)return!1;for(let s=0,a=0;si)return!0;if(a=s+1,r-a<=i)return!1}return!0}function jw(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:i}=t,r=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(iI(e)?" ":"");let a="",l=0;for(let c=0,u=n[c];u;u=n[++c])if(u===" "&&n[c+1]==="\\"&&n[c+2]==="n"&&(a+=n.slice(l,c)+"\\ ",c+=1,l=c,u="\\"),u==="\\")switch(n[c+1]){case"u":{a+=n.slice(l,c);const d=n.substr(c+2,4);switch(d){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:d.substr(0,2)==="00"?a+="\\x"+d.substr(2):a+=n.substr(c,6)}c+=5,l=c+1}break;case"n":if(i||n[c+2]==='"'||n.length `;let f,h;for(h=n.length;h>0;--h){const k=n[h-1];if(k!==` `&&k!==" "&&k!==" ")break}let p=n.substring(h);const g=p.indexOf(` `);g===-1?f="-":n===p||g!==p.length-1?(f="+",s&&s()):f="",p&&(n=n.slice(0,-p.length),p[p.length-1]===` -`&&(p=p.slice(0,-1)),p=p.replace(e$,`$&${u}`));let b=!1,v,y=-1;for(v=0;v{S=!0});const C=iI(`${x}${k}${p}`,u,Z6,E);if(!S)return`>${O} +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);let S=!1;const E=nI(i,!0);a!=="folded"&&t!==Wn.BLOCK_FOLDED&&(E.onOverflow=()=>{S=!0});const C=tI(`${x}${k}${p}`,u,Y6,E);if(!S)return`>${O} ${u}${C}`}return n=n.replace(/\n+/g,`$&${u}`),`|${O} -${u}${x}${n}${p}`}function gSt(e,t,n,i){const{type:r,value:s}=e,{actualString:a,implicitKey:l,indent:c,indentStep:u,inFlow:d}=t;if(l&&s.includes(` -`)||d&&/[[\]{},]/.test(s))return Py(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||d||!s.includes(` -`)?Py(s,t):xA(e,t,n,i);if(!l&&!d&&r!==Gn.PLAIN&&s.includes(` -`))return xA(e,t,n,i);if(sI(s)){if(c==="")return t.forceBlockIndent=!0,xA(e,t,n,i);if(l&&c===u)return Py(s,t)}const f=s.replace(/\n+/g,`$& -${c}`);if(a){const h=b=>{var v;return b.default&&b.tag!=="tag:yaml.org,2002:str"&&((v=b.test)==null?void 0:v.test(f))},{compat:p,tags:g}=t.doc.schema;if(g.some(h)||p!=null&&p.some(h))return Py(s,t)}return l?f:iI(f,c,PCe,rI(t,!1))}function OU(e,t,n,i){const{implicitKey:r,inFlow:s}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:l}=e;l!==Gn.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(l=Gn.QUOTE_DOUBLE);const c=d=>{switch(d){case Gn.BLOCK_FOLDED:case Gn.BLOCK_LITERAL:return r||s?Py(a.value,t):xA(a,t,n,i);case Gn.QUOTE_DOUBLE:return Mw(a.value,t);case Gn.QUOTE_SINGLE:return J6(a.value,t);case Gn.PLAIN:return gSt(a,t,n,i);default:return null}};let u=c(l);if(u===null){const{defaultKeyType:d,defaultStringType:f}=t.options,h=r&&d||f;if(u=c(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}function DCe(e,t){const n=Object.assign({blockQuote:!0,commentString:pSt,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let i;switch(n.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:i,options:n}}function bSt(e,t){var r;if(t.tag){const s=e.filter(a=>a.tag===t.tag);if(s.length>0)return s.find(a=>a.format===t.format)??s[0]}let n,i;if($r(t)){i=t.value;let s=e.filter(a=>{var l;return(l=a.identify)==null?void 0:l.call(a,i)});if(s.length>1){const a=s.filter(l=>l.test);a.length>0&&(s=a)}n=s.find(a=>a.format===t.format)??s.find(a=>!a.format)}else i=t,n=e.find(s=>s.nodeClass&&i instanceof s.nodeClass);if(!n){const s=((r=i==null?void 0:i.constructor)==null?void 0:r.name)??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${s} value`)}return n}function ySt(e,t,{anchors:n,doc:i}){if(!i.directives)return"";const r=[],s=($r(e)||Qs(e))&&e.anchor;s&&_Ce(s)&&(n.add(s),r.push(`&${s}`));const a=e.tag??(t.default?null:t.tag);return a&&r.push(i.directives.tagString(a)),r.join(" ")}function tx(e,t,n,i){var c;if(Hs(e))return e.toString(t,n,i);if(Yx(e)){if(t.doc.directives)return e.toString(t);if((c=t.resolvedAliases)!=null&&c.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let r;const s=Vs(e)?e:t.doc.createNode(e,{onTagObj:u=>r=u});r??(r=bSt(t.doc.schema.tags,s));const a=ySt(s,r,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const l=typeof r.stringify=="function"?r.stringify(s,t,n,i):$r(s)?OU(s,t,n,i):s.toString(t,n,i);return a?$r(s)||l[0]==="{"||l[0]==="["?`${a} ${l}`:`${a} -${t.indent}${l}`:l}function vSt({key:e,value:t},n,i,r){const{allNullValues:s,doc:a,indent:l,indentStep:c,options:{commentString:u,indentSeq:d,simpleKeys:f}}=n;let h=Vs(e)&&e.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Qs(e)||!Vs(e)&&typeof e=="object"){const E="With simple keys, collection cannot be used as a key value";throw new Error(E)}}let p=!f&&(!e||h&&t==null&&!n.inFlow||Qs(e)||($r(e)?e.type===Gn.BLOCK_FOLDED||e.type===Gn.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(f||!s),indent:l+c});let g=!1,b=!1,v=tx(e,n,()=>g=!0,()=>b=!0);if(!p&&!n.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(n.inFlow){if(s||t==null)return g&&i&&i(),v===""?"?":p?`? ${v}`:v}else if(s&&!f||t==null&&p)return v=`? ${v}`,h&&!g?v+=Bg(v,n.indent,u(h)):b&&r&&r(),v;g&&(h=null),p?(h&&(v+=Bg(v,n.indent,u(h))),v=`? ${v} -${l}:`):(v=`${v}:`,h&&(v+=Bg(v,n.indent,u(h))));let y,x,w;Vs(t)?(y=!!t.spaceBefore,x=t.commentBefore,w=t.comment):(y=!1,x=null,w=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!p&&!h&&$r(t)&&(n.indentAtStart=v.length+1),b=!1,!d&&c.length>=2&&!n.inFlow&&!p&&AE(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let O=!1;const k=tx(t,n,()=>O=!0,()=>b=!0);let S=" ";if(h||y||x){if(S=y?` +${u}${x}${n}${p}`}function vSt(e,t,n,i){const{type:r,value:s}=e,{actualString:a,implicitKey:l,indent:c,indentStep:u,inFlow:d}=t;if(l&&s.includes(` +`)||d&&/[[\]{},]/.test(s))return Ny(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return l||d||!s.includes(` +`)?Ny(s,t):bA(e,t,n,i);if(!l&&!d&&r!==Wn.PLAIN&&s.includes(` +`))return bA(e,t,n,i);if(iI(s)){if(c==="")return t.forceBlockIndent=!0,bA(e,t,n,i);if(l&&c===u)return Ny(s,t)}const f=s.replace(/\n+/g,`$& +${c}`);if(a){const h=b=>{var v;return b.default&&b.tag!=="tag:yaml.org,2002:str"&&((v=b.test)==null?void 0:v.test(f))},{compat:p,tags:g}=t.doc.schema;if(g.some(h)||p!=null&&p.some(h))return Ny(s,t)}return l?f:tI(f,c,DCe,nI(t,!1))}function xU(e,t,n,i){const{implicitKey:r,inFlow:s}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:l}=e;l!==Wn.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(l=Wn.QUOTE_DOUBLE);const c=d=>{switch(d){case Wn.BLOCK_FOLDED:case Wn.BLOCK_LITERAL:return r||s?Ny(a.value,t):bA(a,t,n,i);case Wn.QUOTE_DOUBLE:return jw(a.value,t);case Wn.QUOTE_SINGLE:return Z6(a.value,t);case Wn.PLAIN:return vSt(a,t,n,i);default:return null}};let u=c(l);if(u===null){const{defaultKeyType:d,defaultStringType:f}=t.options,h=r&&d||f;if(u=c(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}function MCe(e,t){const n=Object.assign({blockQuote:!0,commentString:bSt,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let i;switch(n.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:i,options:n}}function xSt(e,t){var r;if(t.tag){const s=e.filter(a=>a.tag===t.tag);if(s.length>0)return s.find(a=>a.format===t.format)??s[0]}let n,i;if(Lr(t)){i=t.value;let s=e.filter(a=>{var l;return(l=a.identify)==null?void 0:l.call(a,i)});if(s.length>1){const a=s.filter(l=>l.test);a.length>0&&(s=a)}n=s.find(a=>a.format===t.format)??s.find(a=>!a.format)}else i=t,n=e.find(s=>s.nodeClass&&i instanceof s.nodeClass);if(!n){const s=((r=i==null?void 0:i.constructor)==null?void 0:r.name)??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${s} value`)}return n}function OSt(e,t,{anchors:n,doc:i}){if(!i.directives)return"";const r=[],s=(Lr(e)||Us(e))&&e.anchor;s&&NCe(s)&&(n.add(s),r.push(`&${s}`));const a=e.tag??(t.default?null:t.tag);return a&&r.push(i.directives.tagString(a)),r.join(" ")}function Yv(e,t,n,i){var c;if(Vs(e))return e.toString(t,n,i);if(Wx(e)){if(t.doc.directives)return e.toString(t);if((c=t.resolvedAliases)!=null&&c.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let r;const s=zs(e)?e:t.doc.createNode(e,{onTagObj:u=>r=u});r??(r=xSt(t.doc.schema.tags,s));const a=OSt(s,r,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const l=typeof r.stringify=="function"?r.stringify(s,t,n,i):Lr(s)?xU(s,t,n,i):s.toString(t,n,i);return a?Lr(s)||l[0]==="{"||l[0]==="["?`${a} ${l}`:`${a} +${t.indent}${l}`:l}function wSt({key:e,value:t},n,i,r){const{allNullValues:s,doc:a,indent:l,indentStep:c,options:{commentString:u,indentSeq:d,simpleKeys:f}}=n;let h=zs(e)&&e.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Us(e)||!zs(e)&&typeof e=="object"){const E="With simple keys, collection cannot be used as a key value";throw new Error(E)}}let p=!f&&(!e||h&&t==null&&!n.inFlow||Us(e)||(Lr(e)?e.type===Wn.BLOCK_FOLDED||e.type===Wn.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(f||!s),indent:l+c});let g=!1,b=!1,v=Yv(e,n,()=>g=!0,()=>b=!0);if(!p&&!n.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(n.inFlow){if(s||t==null)return g&&i&&i(),v===""?"?":p?`? ${v}`:v}else if(s&&!f||t==null&&p)return v=`? ${v}`,h&&!g?v+=Lg(v,n.indent,u(h)):b&&r&&r(),v;g&&(h=null),p?(h&&(v+=Lg(v,n.indent,u(h))),v=`? ${v} +${l}:`):(v=`${v}:`,h&&(v+=Lg(v,n.indent,u(h))));let y,x,w;zs(t)?(y=!!t.spaceBefore,x=t.commentBefore,w=t.comment):(y=!1,x=null,w=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!p&&!h&&Lr(t)&&(n.indentAtStart=v.length+1),b=!1,!d&&c.length>=2&&!n.inFlow&&!p&&EE(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let O=!1;const k=Yv(t,n,()=>O=!0,()=>b=!0);let S=" ";if(h||y||x){if(S=y?` `:"",x){const E=u(x);S+=` -${ih(E,n.indent)}`}k===""&&!n.inFlow?S===` +${Zf(E,n.indent)}`}k===""&&!n.inFlow?S===` `&&w&&(S=` `):S+=` -${n.indent}`}else if(!p&&Qs(t)){const E=k[0],C=k.indexOf(` +${n.indent}`}else if(!p&&Us(t)){const E=k[0],C=k.indexOf(` `),N=C!==-1,_=n.inFlow??t.flow??t.items.length===0;if(N||!_){let j=!1;if(N&&(E==="&"||E==="!")){let T=k.indexOf(" ");E==="&"&&T!==-1&&Te===LT||typeof e=="symbol"&&e.description===LT,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Gn(Symbol(LT)),{addToJSMap:LCe}),stringify:()=>LT},xSt=(e,t)=>(gh.identify(t)||$r(t)&&(!t.type||t.type===Gn.PLAIN)&&gh.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===gh.tag&&n.default));function LCe(e,t,n){const i=$Ce(e,n);if(AE(i))for(const r of i.items)HM(e,t,r);else if(Array.isArray(i))for(const r of i)HM(e,t,r);else HM(e,t,i)}function HM(e,t,n){const i=$Ce(e,n);if(!TE(i))throw new Error("Merge sources must be maps or map aliases");const r=i.toJSON(null,e,Map);for(const[s,a]of r)t instanceof Map?t.has(s)||t.set(s,a):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function $Ce(e,t){return e&&Yx(t)?t.resolve(e.doc,e):t}function FCe(e,t,{key:n,value:i}){if(Vs(n)&&n.addToJSMap)n.addToJSMap(e,t,i);else if(xSt(e,n))LCe(e,t,i);else{const r=tu(n,"",e);if(t instanceof Map)t.set(r,tu(i,r,e));else if(t instanceof Set)t.add(r);else{const s=OSt(n,r,e),a=tu(i,s,e);s in t?Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[s]=a}}return t}function OSt(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Vs(e)&&(n!=null&&n.doc)){const i=DCe(n.doc,{});i.anchors=new Set;for(const s of n.anchors.keys())i.anchors.add(s.anchor);i.inFlow=!0,i.inStringifyKey=!0;const r=e.toString(i);if(!n.mapKeyWarned){let s=JSON.stringify(r);s.length>40&&(s=s.substring(0,36)+'..."'),MCe(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function wU(e,t,n){const i=qS(e,void 0,n),r=qS(t,void 0,n);return new Bo(i,r)}class Bo{constructor(t,n=null){Object.defineProperty(this,ru,{value:TCe}),this.key=t,this.value=n}clone(t){let{key:n,value:i}=this;return Vs(n)&&(n=n.clone(t)),Vs(i)&&(i=i.clone(t)),new Bo(n,i)}toJSON(t,n){const i=n!=null&&n.mapAsMap?new Map:{};return FCe(n,i,this)}toString(t,n,i){return t!=null&&t.doc?vSt(this,t,n,i):JSON.stringify(this)}}function BCe(e,t,n){return(t.inFlow??e.flow?SSt:wSt)(e,t,n)}function wSt({comment:e,items:t},n,{blockItemPrefix:i,flowChars:r,itemIndent:s,onChompKeep:a,onComment:l}){const{indent:c,options:{commentString:u}}=n,d=Object.assign({},n,{indent:s,type:null});let f=!1;const h=[];for(let g=0;gv=null,()=>f=!0);v&&(y+=Bg(y,s,u(v))),f&&v&&(f=!1),h.push(i+y)}let p;if(h.length===0)p=r.start+r.end;else{p=h[0];for(let g=1;ge===PT||typeof e=="symbol"&&e.description===PT,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Wn(Symbol(PT)),{addToJSMap:$Ce}),stringify:()=>PT},SSt=(e,t)=>(dh.identify(t)||Lr(t)&&(!t.type||t.type===Wn.PLAIN)&&dh.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===dh.tag&&n.default));function $Ce(e,t,n){const i=FCe(e,n);if(EE(i))for(const r of i.items)zM(e,t,r);else if(Array.isArray(i))for(const r of i)zM(e,t,r);else zM(e,t,i)}function zM(e,t,n){const i=FCe(e,n);if(!kE(i))throw new Error("Merge sources must be maps or map aliases");const r=i.toJSON(null,e,Map);for(const[s,a]of r)t instanceof Map?t.has(s)||t.set(s,a):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function FCe(e,t){return e&&Wx(t)?t.resolve(e.doc,e):t}function BCe(e,t,{key:n,value:i}){if(zs(n)&&n.addToJSMap)n.addToJSMap(e,t,i);else if(SSt(e,n))$Ce(e,t,i);else{const r=eu(n,"",e);if(t instanceof Map)t.set(r,eu(i,r,e));else if(t instanceof Set)t.add(r);else{const s=kSt(n,r,e),a=eu(i,s,e);s in t?Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[s]=a}}return t}function kSt(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(zs(e)&&(n!=null&&n.doc)){const i=MCe(n.doc,{});i.anchors=new Set;for(const s of n.anchors.keys())i.anchors.add(s.anchor);i.inFlow=!0,i.inStringifyKey=!0;const r=e.toString(i);if(!n.mapKeyWarned){let s=JSON.stringify(r);s.length>40&&(s=s.substring(0,36)+'..."'),LCe(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function OU(e,t,n){const i=zS(e,void 0,n),r=zS(t,void 0,n);return new Fo(i,r)}class Fo{constructor(t,n=null){Object.defineProperty(this,iu,{value:ACe}),this.key=t,this.value=n}clone(t){let{key:n,value:i}=this;return zs(n)&&(n=n.clone(t)),zs(i)&&(i=i.clone(t)),new Fo(n,i)}toJSON(t,n){const i=n!=null&&n.mapAsMap?new Map:{};return BCe(n,i,this)}toString(t,n,i){return t!=null&&t.doc?wSt(this,t,n,i):JSON.stringify(this)}}function UCe(e,t,n){return(t.inFlow??e.flow?CSt:ESt)(e,t,n)}function ESt({comment:e,items:t},n,{blockItemPrefix:i,flowChars:r,itemIndent:s,onChompKeep:a,onComment:l}){const{indent:c,options:{commentString:u}}=n,d=Object.assign({},n,{indent:s,type:null});let f=!1;const h=[];for(let g=0;gv=null,()=>f=!0);v&&(y+=Lg(y,s,u(v))),f&&v&&(f=!1),h.push(i+y)}let p;if(h.length===0)p=r.start+r.end;else{p=h[0];for(let g=1;gv=null);u||(u=f.length>d||y.includes(` -`)),g0&&(u||(u=f.reduce((x,w)=>x+w.length+2,2)+(y.length+2)>t.options.lineWidth)),u&&(y+=",")),v&&(y+=Bg(y,i,l(v))),f.push(y),d=f.length}const{start:h,end:p}=n;if(f.length===0)return h+p;if(!u){const g=f.reduce((b,v)=>b+v.length+2,2);u=t.options.lineWidth>0&&g>t.options.lineWidth}if(u){let g=h;for(const b of f)g+=b?` +`+Zf(u(e),c),l&&l()):f&&a&&a(),p}function CSt({items:e},t,{flowChars:n,itemIndent:i}){const{indent:r,indentStep:s,flowCollectionPadding:a,options:{commentString:l}}=t;i+=s;const c=Object.assign({},t,{indent:i,inFlow:!0,type:null});let u=!1,d=0;const f=[];for(let g=0;gv=null);u||(u=f.length>d||y.includes(` +`)),g0&&(u||(u=f.reduce((x,w)=>x+w.length+2,2)+(y.length+2)>t.options.lineWidth)),u&&(y+=",")),v&&(y+=Lg(y,i,l(v))),f.push(y),d=f.length}const{start:h,end:p}=n;if(f.length===0)return h+p;if(!u){const g=f.reduce((b,v)=>b+v.length+2,2);u=t.options.lineWidth>0&&g>t.options.lineWidth}if(u){let g=h;for(const b of f)g+=b?` ${s}${r}${b}`:` `;return`${g} -${r}${p}`}else return`${h}${a}${f.join(" ")}${a}${p}`}function xN({indent:e,options:{commentString:t}},n,i,r){if(i&&r&&(i=i.replace(/^\n+/,"")),i){const s=ih(t(i),e);n.push(s.trimStart())}}function Ug(e,t){const n=$r(t)?t.value:t;for(const i of e)if(Hs(i)&&(i.key===t||i.key===n||$r(i.key)&&i.key.value===n))return i}class Hc extends ICe{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(cm,t),this.items=[]}static from(t,n,i){const{keepUndefined:r,replacer:s}=i,a=new this(t),l=(c,u)=>{if(typeof s=="function")u=s.call(n,c,u);else if(Array.isArray(s)&&!s.includes(c))return;(u!==void 0||r)&&a.items.push(wU(c,u,i))};if(n instanceof Map)for(const[c,u]of n)l(c,u);else if(n&&typeof n=="object")for(const c of Object.keys(n))l(c,n[c]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){var a;let i;Hs(t)?i=t:!t||typeof t!="object"||!("key"in t)?i=new Bo(t,t==null?void 0:t.value):i=new Bo(t.key,t.value);const r=Ug(this.items,i.key),s=(a=this.schema)==null?void 0:a.sortMapEntries;if(r){if(!n)throw new Error(`Key ${i.key} already set`);$r(r.value)&&RCe(i.value)?r.value.value=i.value:r.value=i.value}else if(s){const l=this.items.findIndex(c=>s(i,c)<0);l===-1?this.items.push(i):this.items.splice(l,0,i)}else this.items.push(i)}delete(t){const n=Ug(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const i=Ug(this.items,t),r=i==null?void 0:i.value;return(!n&&$r(r)?r.value:r)??void 0}has(t){return!!Ug(this.items,t)}set(t,n){this.add(new Bo(t,n),!0)}toJSON(t,n,i){const r=i?new i:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(r);for(const s of this.items)FCe(n,r,s);return r}toString(t,n,i){if(!t)return JSON.stringify(this);for(const r of this.items)if(!Hs(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),BCe(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:n})}}const Jx={collection:"map",default:!0,nodeClass:Hc,tag:"tag:yaml.org,2002:map",resolve(e,t){return TE(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Hc.from(e,t,n)};class Ab extends ICe{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Xx,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=$T(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const i=$T(t);if(typeof i!="number")return;const r=this.items[i];return!n&&$r(r)?r.value:r}has(t){const n=$T(t);return typeof n=="number"&&n=0?t:null}const e1={collection:"seq",default:!0,nodeClass:Ab,tag:"tag:yaml.org,2002:seq",resolve(e,t){return AE(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Ab.from(e,t,n)},aI={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,i){return t=Object.assign({actualString:!0},t),OU(e,t,n,i)}},oI={identify:e=>e==null,createNode:()=>new Gn(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Gn(null),stringify:({source:e},t)=>typeof e=="string"&&oI.test.test(e)?e:t.options.nullStr},SU={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Gn(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&SU.test.test(e)){const i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?n.options.trueStr:n.options.falseStr}};function Yu({format:e,minFractionDigits:t,tag:n,value:i}){if(typeof i=="bigint")return String(i);const r=typeof i=="number"?i:Number(i);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=Object.is(i,-0)?"-0":JSON.stringify(i);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let l=t-(s.length-a-1);for(;l-- >0;)s+="0"}return s}const UCe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Yu},QCe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Yu(e)}},zCe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Gn(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Yu},lI=e=>typeof e=="bigint"||Number.isInteger(e),kU=(e,t,n,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),n);function VCe(e,t,n){const{value:i}=e;return lI(i)&&i>=0?n+i.toString(t):Yu(e)}const HCe={identify:e=>lI(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>kU(e,2,8,n),stringify:e=>VCe(e,8,"0o")},qCe={identify:lI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>kU(e,0,10,n),stringify:Yu},WCe={identify:e=>lI(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>kU(e,2,16,n),stringify:e=>VCe(e,16,"0x")},kSt=[Jx,e1,aI,oI,SU,HCe,qCe,WCe,UCe,QCe,zCe];function GY(e){return typeof e=="bigint"||Number.isInteger(e)}const FT=({value:e})=>JSON.stringify(e),ESt=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:FT},{identify:e=>e==null,createNode:()=>new Gn(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:FT},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:FT},{identify:GY,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>GY(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:FT}],CSt={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},TSt=[Jx,e1].concat(ESt,CSt),EU={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(n.length);for(let r=0;r1&&t("Each pair must have its own sequence indicator");const r=i.items[0]||new Bo(new Gn(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore} +${r}${p}`}else return`${h}${a}${f.join(" ")}${a}${p}`}function bN({indent:e,options:{commentString:t}},n,i,r){if(i&&r&&(i=i.replace(/^\n+/,"")),i){const s=Zf(t(i),e);n.push(s.trimStart())}}function $g(e,t){const n=Lr(t)?t.value:t;for(const i of e)if(Vs(i)&&(i.key===t||i.key===n||Lr(i.key)&&i.key.value===n))return i}class Vc extends PCe{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(rm,t),this.items=[]}static from(t,n,i){const{keepUndefined:r,replacer:s}=i,a=new this(t),l=(c,u)=>{if(typeof s=="function")u=s.call(n,c,u);else if(Array.isArray(s)&&!s.includes(c))return;(u!==void 0||r)&&a.items.push(OU(c,u,i))};if(n instanceof Map)for(const[c,u]of n)l(c,u);else if(n&&typeof n=="object")for(const c of Object.keys(n))l(c,n[c]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){var a;let i;Vs(t)?i=t:!t||typeof t!="object"||!("key"in t)?i=new Fo(t,t==null?void 0:t.value):i=new Fo(t.key,t.value);const r=$g(this.items,i.key),s=(a=this.schema)==null?void 0:a.sortMapEntries;if(r){if(!n)throw new Error(`Key ${i.key} already set`);Lr(r.value)&&ICe(i.value)?r.value.value=i.value:r.value=i.value}else if(s){const l=this.items.findIndex(c=>s(i,c)<0);l===-1?this.items.push(i):this.items.splice(l,0,i)}else this.items.push(i)}delete(t){const n=$g(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const i=$g(this.items,t),r=i==null?void 0:i.value;return(!n&&Lr(r)?r.value:r)??void 0}has(t){return!!$g(this.items,t)}set(t,n){this.add(new Fo(t,n),!0)}toJSON(t,n,i){const r=i?new i:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(r);for(const s of this.items)BCe(n,r,s);return r}toString(t,n,i){if(!t)return JSON.stringify(this);for(const r of this.items)if(!Vs(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),UCe(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:n})}}const Gx={collection:"map",default:!0,nodeClass:Vc,tag:"tag:yaml.org,2002:map",resolve(e,t){return kE(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Vc.from(e,t,n)};class Eb extends PCe{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(qx,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=DT(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const i=DT(t);if(typeof i!="number")return;const r=this.items[i];return!n&&Lr(r)?r.value:r}has(t){const n=DT(t);return typeof n=="number"&&n=0?t:null}const Xx={collection:"seq",default:!0,nodeClass:Eb,tag:"tag:yaml.org,2002:seq",resolve(e,t){return EE(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Eb.from(e,t,n)},rI={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,i){return t=Object.assign({actualString:!0},t),xU(e,t,n,i)}},sI={identify:e=>e==null,createNode:()=>new Wn(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Wn(null),stringify:({source:e},t)=>typeof e=="string"&&sI.test.test(e)?e:t.options.nullStr},wU={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Wn(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&wU.test.test(e)){const i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?n.options.trueStr:n.options.falseStr}};function Xu({format:e,minFractionDigits:t,tag:n,value:i}){if(typeof i=="bigint")return String(i);const r=typeof i=="number"?i:Number(i);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=Object.is(i,-0)?"-0":JSON.stringify(i);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let l=t-(s.length-a-1);for(;l-- >0;)s+="0"}return s}const QCe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Xu},zCe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Xu(e)}},VCe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Wn(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Xu},aI=e=>typeof e=="bigint"||Number.isInteger(e),SU=(e,t,n,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),n);function HCe(e,t,n){const{value:i}=e;return aI(i)&&i>=0?n+i.toString(t):Xu(e)}const qCe={identify:e=>aI(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>SU(e,2,8,n),stringify:e=>HCe(e,8,"0o")},WCe={identify:aI,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>SU(e,0,10,n),stringify:Xu},KCe={identify:e=>aI(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>SU(e,2,16,n),stringify:e=>HCe(e,16,"0x")},TSt=[Gx,Xx,rI,sI,wU,qCe,WCe,KCe,QCe,zCe,VCe];function qY(e){return typeof e=="bigint"||Number.isInteger(e)}const MT=({value:e})=>JSON.stringify(e),ASt=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:MT},{identify:e=>e==null,createNode:()=>new Wn(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:MT},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:MT},{identify:qY,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>qY(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:MT}],_St={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},NSt=[Gx,Xx].concat(ASt,_St),kU={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(n.length);for(let r=0;r1&&t("Each pair must have its own sequence indicator");const r=i.items[0]||new Fo(new Wn(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore} ${r.key.commentBefore}`:i.commentBefore),i.comment){const s=r.value??r.key;s.comment=s.comment?`${i.comment} -${s.comment}`:i.comment}i=r}e.items[n]=Hs(i)?i:new Bo(i)}}else t("Expected a sequence for this tag");return e}function GCe(e,t,n){const{replacer:i}=n,r=new Ab(e);r.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof i=="function"&&(a=i.call(t,String(s++),a));let l,c;if(Array.isArray(a))if(a.length===2)l=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const u=Object.keys(a);if(u.length===1)l=u[0],c=a[l];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else l=a;r.items.push(wU(l,c,n))}return r}const CU={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:KCe,createNode:GCe};class sv extends Ab{constructor(){super(),this.add=Hc.prototype.add.bind(this),this.delete=Hc.prototype.delete.bind(this),this.get=Hc.prototype.get.bind(this),this.has=Hc.prototype.has.bind(this),this.set=Hc.prototype.set.bind(this),this.tag=sv.tag}toJSON(t,n){if(!n)return super.toJSON(t);const i=new Map;n!=null&&n.onCreate&&n.onCreate(i);for(const r of this.items){let s,a;if(Hs(r)?(s=tu(r.key,"",n),a=tu(r.value,s,n)):s=tu(r,"",n),i.has(s))throw new Error("Ordered maps must not include duplicate keys");i.set(s,a)}return i}static from(t,n,i){const r=GCe(t,n,i),s=new this;return s.items=r.items,s}}sv.tag="tag:yaml.org,2002:omap";const TU={collection:"seq",identify:e=>e instanceof Map,nodeClass:sv,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=KCe(e,t),i=[];for(const{key:r}of n.items)$r(r)&&(i.includes(r.value)?t(`Ordered maps must not include duplicate keys: ${r.value}`):i.push(r.value));return Object.assign(new sv,n)},createNode:(e,t,n)=>sv.from(e,t,n)};function XCe({value:e,source:t},n){return t&&(e?YCe:ZCe).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const YCe={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Gn(!0),stringify:XCe},ZCe={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Gn(!1),stringify:XCe},ASt={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Yu},_St={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Yu(e)}},NSt={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Gn(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const i=e.substring(n+1).replace(/_/g,"");i[i.length-1]==="0"&&(t.minFractionDigits=i.length)}return t},stringify:Yu},_E=e=>typeof e=="bigint"||Number.isInteger(e);function cI(e,t,n,{intAsBigInt:i}){const r=e[0];if((r==="-"||r==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const a=BigInt(e);return r==="-"?BigInt(-1)*a:a}const s=parseInt(e,n);return r==="-"?-1*s:s}function AU(e,t,n){const{value:i}=e;if(_E(i)){const r=i.toString(t);return i<0?"-"+n+r.substr(1):n+r}return Yu(e)}const jSt={identify:_E,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>cI(e,2,2,n),stringify:e=>AU(e,2,"0b")},RSt={identify:_E,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>cI(e,1,8,n),stringify:e=>AU(e,8,"0")},ISt={identify:_E,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>cI(e,0,10,n),stringify:Yu},PSt={identify:_E,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>cI(e,2,16,n),stringify:e=>AU(e,16,"0x")};class av extends Hc{constructor(t){super(t),this.tag=av.tag}add(t){let n;Hs(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new Bo(t.key,null):n=new Bo(t,null),Ug(this.items,n.key)||this.items.push(n)}get(t,n){const i=Ug(this.items,t);return!n&&Hs(i)?$r(i.key)?i.key.value:i.key:i}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const i=Ug(this.items,t);i&&!n?this.items.splice(this.items.indexOf(i),1):!i&&n&&this.items.push(new Bo(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,i);throw new Error("Set items must all have null values")}static from(t,n,i){const{replacer:r}=i,s=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof r=="function"&&(a=r.call(n,a,a)),s.items.push(wU(a,null,i));return s}}av.tag="tag:yaml.org,2002:set";const _U={collection:"map",identify:e=>e instanceof Set,nodeClass:av,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>av.from(e,t,n),resolve(e,t){if(TE(e)){if(e.hasAllNullValues(!0))return Object.assign(new av,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function NU(e,t){const n=e[0],i=n==="-"||n==="+"?e.substring(1):e,r=a=>t?BigInt(a):Number(a),s=i.replace(/_/g,"").split(":").reduce((a,l)=>a*r(60)+r(l),r(0));return n==="-"?r(-1)*s:s}function JCe(e){let{value:t}=e,n=a=>a;if(typeof t=="bigint")n=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return Yu(e);let i="";t<0&&(i="-",t*=n(-1));const r=n(60),s=[t%r];return t<60?s.unshift(0):(t=(t-s[0])/r,s.unshift(t%r),t>=60&&(t=(t-s[0])/r,s.unshift(t))),i+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const eTe={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>NU(e,n),stringify:JCe},tTe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>NU(e,!1),stringify:JCe},uI={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(uI.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,i,r,s,a,l]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(n,i-1,r,s||0,a||0,l||0,c);const d=t[8];if(d&&d!=="Z"){let f=NU(d,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},XY=[Jx,e1,aI,oI,YCe,ZCe,jSt,RSt,ISt,PSt,ASt,_St,NSt,EU,gh,TU,CU,_U,eTe,tTe,uI],YY=new Map([["core",kSt],["failsafe",[Jx,e1,aI]],["json",TSt],["yaml11",XY],["yaml-1.1",XY]]),ZY={binary:EU,bool:SU,float:zCe,floatExp:QCe,floatNaN:UCe,floatTime:tTe,int:qCe,intHex:WCe,intOct:HCe,intTime:eTe,map:Jx,merge:gh,null:oI,omap:TU,pairs:CU,seq:e1,set:_U,timestamp:uI},DSt={"tag:yaml.org,2002:binary":EU,"tag:yaml.org,2002:merge":gh,"tag:yaml.org,2002:omap":TU,"tag:yaml.org,2002:pairs":CU,"tag:yaml.org,2002:set":_U,"tag:yaml.org,2002:timestamp":uI};function qM(e,t,n){const i=YY.get(t);if(i&&!e)return n&&!i.includes(gh)?i.concat(gh):i.slice();let r=i;if(!r)if(Array.isArray(e))r=[];else{const s=Array.from(YY.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${s} or define customTags array`)}if(Array.isArray(e))for(const s of e)r=r.concat(s);else typeof e=="function"&&(r=e(r.slice()));return n&&(r=r.concat(gh)),r.reduce((s,a)=>{const l=typeof a=="string"?ZY[a]:a;if(!l){const c=JSON.stringify(a),u=Object.keys(ZY).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return s.includes(l)||s.push(l),s},[])}const MSt=(e,t)=>e.keyt.key?1:0;let LSt=class nTe{constructor({compat:t,customTags:n,merge:i,resolveKnownTags:r,schema:s,sortMapEntries:a,toStringDefaults:l}){this.compat=Array.isArray(t)?qM(t,"compat"):t?qM(null,t):null,this.name=typeof s=="string"&&s||"core",this.knownTags=r?DSt:{},this.tags=qM(n,this.name,i),this.toStringOptions=l??null,Object.defineProperty(this,cm,{value:Jx}),Object.defineProperty(this,Kd,{value:aI}),Object.defineProperty(this,Xx,{value:e1}),this.sortMapEntries=typeof a=="function"?a:a===!0?MSt:null}clone(){const t=Object.create(nTe.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function $St(e,t){var c;const n=[];let i=t.directives===!0;if(t.directives!==!1&&e.directives){const u=e.directives.toString(e);u?(n.push(u),i=!0):e.directives.docStart&&(i=!0)}i&&n.push("---");const r=DCe(e,t),{commentString:s}=r.options;if(e.commentBefore){n.length!==1&&n.unshift("");const u=s(e.commentBefore);n.unshift(ih(u,""))}let a=!1,l=null;if(e.contents){if(Vs(e.contents)){if(e.contents.spaceBefore&&i&&n.push(""),e.contents.commentBefore){const f=s(e.contents.commentBefore);n.push(ih(f,""))}r.forceBlockIndent=!!e.comment,l=e.contents.comment}const u=l?void 0:()=>a=!0;let d=tx(e.contents,r,()=>l=null,u);l&&(d+=Bg(d,"",s(l))),(d[0]==="|"||d[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${d}`:n.push(d)}else n.push(tx(e.contents,r));if((c=e.directives)!=null&&c.docEnd)if(e.comment){const u=s(e.comment);u.includes(` -`)?(n.push("..."),n.push(ih(u,""))):n.push(`... ${u}`)}else n.push("...");else{let u=e.comment;u&&a&&(u=u.replace(/^\n+/,"")),u&&((!a||l)&&n[n.length-1]!==""&&n.push(""),n.push(ih(s(u),"")))}return n.join(` +${s.comment}`:i.comment}i=r}e.items[n]=Vs(i)?i:new Fo(i)}}else t("Expected a sequence for this tag");return e}function XCe(e,t,n){const{replacer:i}=n,r=new Eb(e);r.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof i=="function"&&(a=i.call(t,String(s++),a));let l,c;if(Array.isArray(a))if(a.length===2)l=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const u=Object.keys(a);if(u.length===1)l=u[0],c=a[l];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else l=a;r.items.push(OU(l,c,n))}return r}const EU={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:GCe,createNode:XCe};class tv extends Eb{constructor(){super(),this.add=Vc.prototype.add.bind(this),this.delete=Vc.prototype.delete.bind(this),this.get=Vc.prototype.get.bind(this),this.has=Vc.prototype.has.bind(this),this.set=Vc.prototype.set.bind(this),this.tag=tv.tag}toJSON(t,n){if(!n)return super.toJSON(t);const i=new Map;n!=null&&n.onCreate&&n.onCreate(i);for(const r of this.items){let s,a;if(Vs(r)?(s=eu(r.key,"",n),a=eu(r.value,s,n)):s=eu(r,"",n),i.has(s))throw new Error("Ordered maps must not include duplicate keys");i.set(s,a)}return i}static from(t,n,i){const r=XCe(t,n,i),s=new this;return s.items=r.items,s}}tv.tag="tag:yaml.org,2002:omap";const CU={collection:"seq",identify:e=>e instanceof Map,nodeClass:tv,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=GCe(e,t),i=[];for(const{key:r}of n.items)Lr(r)&&(i.includes(r.value)?t(`Ordered maps must not include duplicate keys: ${r.value}`):i.push(r.value));return Object.assign(new tv,n)},createNode:(e,t,n)=>tv.from(e,t,n)};function YCe({value:e,source:t},n){return t&&(e?ZCe:JCe).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const ZCe={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Wn(!0),stringify:YCe},JCe={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Wn(!1),stringify:YCe},jSt={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Xu},RSt={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Xu(e)}},ISt={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Wn(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const i=e.substring(n+1).replace(/_/g,"");i[i.length-1]==="0"&&(t.minFractionDigits=i.length)}return t},stringify:Xu},CE=e=>typeof e=="bigint"||Number.isInteger(e);function oI(e,t,n,{intAsBigInt:i}){const r=e[0];if((r==="-"||r==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const a=BigInt(e);return r==="-"?BigInt(-1)*a:a}const s=parseInt(e,n);return r==="-"?-1*s:s}function TU(e,t,n){const{value:i}=e;if(CE(i)){const r=i.toString(t);return i<0?"-"+n+r.substr(1):n+r}return Xu(e)}const PSt={identify:CE,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>oI(e,2,2,n),stringify:e=>TU(e,2,"0b")},DSt={identify:CE,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>oI(e,1,8,n),stringify:e=>TU(e,8,"0")},MSt={identify:CE,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>oI(e,0,10,n),stringify:Xu},LSt={identify:CE,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>oI(e,2,16,n),stringify:e=>TU(e,16,"0x")};class nv extends Vc{constructor(t){super(t),this.tag=nv.tag}add(t){let n;Vs(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new Fo(t.key,null):n=new Fo(t,null),$g(this.items,n.key)||this.items.push(n)}get(t,n){const i=$g(this.items,t);return!n&&Vs(i)?Lr(i.key)?i.key.value:i.key:i}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const i=$g(this.items,t);i&&!n?this.items.splice(this.items.indexOf(i),1):!i&&n&&this.items.push(new Fo(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,i);throw new Error("Set items must all have null values")}static from(t,n,i){const{replacer:r}=i,s=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof r=="function"&&(a=r.call(n,a,a)),s.items.push(OU(a,null,i));return s}}nv.tag="tag:yaml.org,2002:set";const AU={collection:"map",identify:e=>e instanceof Set,nodeClass:nv,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>nv.from(e,t,n),resolve(e,t){if(kE(e)){if(e.hasAllNullValues(!0))return Object.assign(new nv,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function _U(e,t){const n=e[0],i=n==="-"||n==="+"?e.substring(1):e,r=a=>t?BigInt(a):Number(a),s=i.replace(/_/g,"").split(":").reduce((a,l)=>a*r(60)+r(l),r(0));return n==="-"?r(-1)*s:s}function eTe(e){let{value:t}=e,n=a=>a;if(typeof t=="bigint")n=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return Xu(e);let i="";t<0&&(i="-",t*=n(-1));const r=n(60),s=[t%r];return t<60?s.unshift(0):(t=(t-s[0])/r,s.unshift(t%r),t>=60&&(t=(t-s[0])/r,s.unshift(t))),i+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const tTe={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>_U(e,n),stringify:eTe},nTe={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>_U(e,!1),stringify:eTe},lI={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(lI.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,i,r,s,a,l]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0;let u=Date.UTC(n,i-1,r,s||0,a||0,l||0,c);const d=t[8];if(d&&d!=="Z"){let f=_U(d,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},WY=[Gx,Xx,rI,sI,ZCe,JCe,PSt,DSt,MSt,LSt,jSt,RSt,ISt,kU,dh,CU,EU,AU,tTe,nTe,lI],KY=new Map([["core",TSt],["failsafe",[Gx,Xx,rI]],["json",NSt],["yaml11",WY],["yaml-1.1",WY]]),GY={binary:kU,bool:wU,float:VCe,floatExp:zCe,floatNaN:QCe,floatTime:nTe,int:WCe,intHex:KCe,intOct:qCe,intTime:tTe,map:Gx,merge:dh,null:sI,omap:CU,pairs:EU,seq:Xx,set:AU,timestamp:lI},$St={"tag:yaml.org,2002:binary":kU,"tag:yaml.org,2002:merge":dh,"tag:yaml.org,2002:omap":CU,"tag:yaml.org,2002:pairs":EU,"tag:yaml.org,2002:set":AU,"tag:yaml.org,2002:timestamp":lI};function VM(e,t,n){const i=KY.get(t);if(i&&!e)return n&&!i.includes(dh)?i.concat(dh):i.slice();let r=i;if(!r)if(Array.isArray(e))r=[];else{const s=Array.from(KY.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${s} or define customTags array`)}if(Array.isArray(e))for(const s of e)r=r.concat(s);else typeof e=="function"&&(r=e(r.slice()));return n&&(r=r.concat(dh)),r.reduce((s,a)=>{const l=typeof a=="string"?GY[a]:a;if(!l){const c=JSON.stringify(a),u=Object.keys(GY).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return s.includes(l)||s.push(l),s},[])}const FSt=(e,t)=>e.keyt.key?1:0;let BSt=class iTe{constructor({compat:t,customTags:n,merge:i,resolveKnownTags:r,schema:s,sortMapEntries:a,toStringDefaults:l}){this.compat=Array.isArray(t)?VM(t,"compat"):t?VM(null,t):null,this.name=typeof s=="string"&&s||"core",this.knownTags=r?$St:{},this.tags=VM(n,this.name,i),this.toStringOptions=l??null,Object.defineProperty(this,rm,{value:Gx}),Object.defineProperty(this,qd,{value:rI}),Object.defineProperty(this,qx,{value:Xx}),this.sortMapEntries=typeof a=="function"?a:a===!0?FSt:null}clone(){const t=Object.create(iTe.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function USt(e,t){var c;const n=[];let i=t.directives===!0;if(t.directives!==!1&&e.directives){const u=e.directives.toString(e);u?(n.push(u),i=!0):e.directives.docStart&&(i=!0)}i&&n.push("---");const r=MCe(e,t),{commentString:s}=r.options;if(e.commentBefore){n.length!==1&&n.unshift("");const u=s(e.commentBefore);n.unshift(Zf(u,""))}let a=!1,l=null;if(e.contents){if(zs(e.contents)){if(e.contents.spaceBefore&&i&&n.push(""),e.contents.commentBefore){const f=s(e.contents.commentBefore);n.push(Zf(f,""))}r.forceBlockIndent=!!e.comment,l=e.contents.comment}const u=l?void 0:()=>a=!0;let d=Yv(e.contents,r,()=>l=null,u);l&&(d+=Lg(d,"",s(l))),(d[0]==="|"||d[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${d}`:n.push(d)}else n.push(Yv(e.contents,r));if((c=e.directives)!=null&&c.docEnd)if(e.comment){const u=s(e.comment);u.includes(` +`)?(n.push("..."),n.push(Zf(u,""))):n.push(`... ${u}`)}else n.push("...");else{let u=e.comment;u&&a&&(u=u.replace(/^\n+/,"")),u&&((!a||l)&&n[n.length-1]!==""&&n.push(""),n.push(Zf(s(u),"")))}return n.join(` `)+` -`}class NE{constructor(t,n,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ru,{value:Y6});let r=null;typeof n=="function"||Array.isArray(n)?r=n:i===void 0&&n&&(i=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=s;let{version:a}=s;i!=null&&i._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new jo({version:a}),this.setSchema(a,i),this.contents=t===void 0?null:this.createNode(t,r,i)}clone(){const t=Object.create(NE.prototype,{[ru]:{value:Y6}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Vs(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){F0(this.contents)&&this.contents.add(t)}addIn(t,n){F0(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const i=NCe(this);t.anchor=!n||i.has(n)?jCe(n||"a",i):n}return new xU(t.anchor)}createNode(t,n,i){let r;if(typeof n=="function")t=n.call({"":t},"",t),r=n;else if(Array.isArray(n)){const v=x=>typeof x=="number"||x instanceof String||x instanceof Number,y=n.filter(v).map(String);y.length>0&&(n=n.concat(y)),r=n}else i===void 0&&n&&(i=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:a,flow:l,keepUndefined:c,onTagObj:u,tag:d}=i??{},{onAnchor:f,setAnchors:h,sourceObjects:p}=dSt(this,a||"a"),g={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:f,onTagObj:u,replacer:r,schema:this.schema,sourceObjects:p},b=qS(t,d,g);return l&&Qs(b)&&(b.flow=!0),h(),b}createPair(t,n,i={}){const r=this.createNode(t,null,i),s=this.createNode(n,null,i);return new Bo(r,s)}delete(t){return F0(this.contents)?this.contents.delete(t):!1}deleteIn(t){return UO(t)?this.contents==null?!1:(this.contents=null,!0):F0(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Qs(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return UO(t)?!n&&$r(this.contents)?this.contents.value:this.contents:Qs(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Qs(this.contents)?this.contents.has(t):!1}hasIn(t){return UO(t)?this.contents!==void 0:Qs(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=vN(this.schema,[t],n):F0(this.contents)&&this.contents.set(t,n)}setIn(t,n){UO(t)?this.contents=n:this.contents==null?this.contents=vN(this.schema,Array.from(t),n):F0(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let i;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new jo({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new jo({version:t}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{const r=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(i)this.schema=new LSt(Object.assign(i,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:i,maxAliasCount:r,onAnchor:s,reviver:a}={}){const l={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},c=tu(this.contents,n??"",l);if(typeof s=="function")for(const{count:u,res:d}of l.anchors.values())s(d,u);return typeof a=="function"?Iy(a,{"":c},"",c):c}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return $St(this,t)}}function F0(e){if(Qs(e))return!0;throw new Error("Expected a YAML collection as document contents")}class iTe extends Error{constructor(t,n,i,r){super(),this.name=t,this.code=i,this.message=r,this.pos=n}}class QO extends iTe{constructor(t,n,i){super("YAMLParseError",t,n,i)}}class FSt extends iTe{constructor(t,n,i){super("YAMLWarning",t,n,i)}}const JY=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(l=>t.linePos(l));const{line:i,col:r}=n.linePos[0];n.message+=` at line ${i}, column ${r}`;let s=r-1,a=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){const l=Math.min(s-39,a.length-79);a="…"+a.substring(l),s-=l-1}if(a.length>80&&(a=a.substring(0,79)+"…"),i>1&&/^ *$/.test(a.substring(0,s))){let l=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);l.length>80&&(l=l.substring(0,79)+`… +`}class TE{constructor(t,n,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,iu,{value:X6});let r=null;typeof n=="function"||Array.isArray(n)?r=n:i===void 0&&n&&(i=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=s;let{version:a}=s;i!=null&&i._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new No({version:a}),this.setSchema(a,i),this.contents=t===void 0?null:this.createNode(t,r,i)}clone(){const t=Object.create(TE.prototype,{[iu]:{value:X6}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=zs(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){D0(this.contents)&&this.contents.add(t)}addIn(t,n){D0(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const i=jCe(this);t.anchor=!n||i.has(n)?RCe(n||"a",i):n}return new vU(t.anchor)}createNode(t,n,i){let r;if(typeof n=="function")t=n.call({"":t},"",t),r=n;else if(Array.isArray(n)){const v=x=>typeof x=="number"||x instanceof String||x instanceof Number,y=n.filter(v).map(String);y.length>0&&(n=n.concat(y)),r=n}else i===void 0&&n&&(i=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:a,flow:l,keepUndefined:c,onTagObj:u,tag:d}=i??{},{onAnchor:f,setAnchors:h,sourceObjects:p}=pSt(this,a||"a"),g={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:f,onTagObj:u,replacer:r,schema:this.schema,sourceObjects:p},b=zS(t,d,g);return l&&Us(b)&&(b.flow=!0),h(),b}createPair(t,n,i={}){const r=this.createNode(t,null,i),s=this.createNode(n,null,i);return new Fo(r,s)}delete(t){return D0(this.contents)?this.contents.delete(t):!1}deleteIn(t){return MO(t)?this.contents==null?!1:(this.contents=null,!0):D0(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Us(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return MO(t)?!n&&Lr(this.contents)?this.contents.value:this.contents:Us(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Us(this.contents)?this.contents.has(t):!1}hasIn(t){return MO(t)?this.contents!==void 0:Us(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=gN(this.schema,[t],n):D0(this.contents)&&this.contents.set(t,n)}setIn(t,n){MO(t)?this.contents=n:this.contents==null?this.contents=gN(this.schema,Array.from(t),n):D0(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let i;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new No({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new No({version:t}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{const r=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(i)this.schema=new BSt(Object.assign(i,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:i,maxAliasCount:r,onAnchor:s,reviver:a}={}){const l={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},c=eu(this.contents,n??"",l);if(typeof s=="function")for(const{count:u,res:d}of l.anchors.values())s(d,u);return typeof a=="function"?_y(a,{"":c},"",c):c}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return USt(this,t)}}function D0(e){if(Us(e))return!0;throw new Error("Expected a YAML collection as document contents")}class rTe extends Error{constructor(t,n,i,r){super(),this.name=t,this.code=i,this.message=r,this.pos=n}}class LO extends rTe{constructor(t,n,i){super("YAMLParseError",t,n,i)}}class QSt extends rTe{constructor(t,n,i){super("YAMLWarning",t,n,i)}}const XY=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(l=>t.linePos(l));const{line:i,col:r}=n.linePos[0];n.message+=` at line ${i}, column ${r}`;let s=r-1,a=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){const l=Math.min(s-39,a.length-79);a="…"+a.substring(l),s-=l-1}if(a.length>80&&(a=a.substring(0,79)+"…"),i>1&&/^ *$/.test(a.substring(0,s))){let l=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);l.length>80&&(l=l.substring(0,79)+`… `),a=l+a}if(/[^ ]/.test(a)){let l=1;const c=n.linePos[1];(c==null?void 0:c.line)===i&&c.col>r&&(l=Math.max(1,Math.min(c.col-r,80-s)));const u=" ".repeat(s)+"^".repeat(l);n.message+=`: ${a} ${u} -`}};function nx(e,{flow:t,indicator:n,next:i,offset:r,onError:s,parentIndent:a,startOnNewline:l}){let c=!1,u=l,d=l,f="",h="",p=!1,g=!1,b=null,v=null,y=null,x=null,w=null,O=null,k=null;for(const C of e)switch(g&&(C.type!=="space"&&C.type!=="newline"&&C.type!=="comma"&&s(C.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),b&&(u&&C.type!=="comment"&&C.type!=="newline"&&s(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),b=null),C.type){case"space":!t&&(n!=="doc-start"||(i==null?void 0:i.type)!=="flow-collection")&&C.source.includes(" ")&&(b=C),d=!0;break;case"comment":{d||s(C,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const N=C.source.substring(1)||" ";f?f+=h+N:f=N,h="",u=!1;break}case"newline":u?f?f+=C.source:(!O||n!=="seq-item-ind")&&(c=!0):h+=C.source,u=!0,p=!0,(v||y)&&(x=C),d=!0;break;case"anchor":v&&s(C,"MULTIPLE_ANCHORS","A node can have at most one anchor"),C.source.endsWith(":")&&s(C.offset+C.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=C,k??(k=C.offset),u=!1,d=!1,g=!0;break;case"tag":{y&&s(C,"MULTIPLE_TAGS","A node can have at most one tag"),y=C,k??(k=C.offset),u=!1,d=!1,g=!0;break}case n:(v||y)&&s(C,"BAD_PROP_ORDER",`Anchors and tags must be after the ${C.source} indicator`),O&&s(C,"UNEXPECTED_TOKEN",`Unexpected ${C.source} in ${t??"collection"}`),O=C,u=n==="seq-item-ind"||n==="explicit-key-ind",d=!1;break;case"comma":if(t){w&&s(C,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),w=C,u=!1,d=!1;break}default:s(C,"UNEXPECTED_TOKEN",`Unexpected ${C.type} token`),u=!1,d=!1}const S=e[e.length-1],E=S?S.offset+S.source.length:r;return g&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b&&(u&&b.indent<=a||(i==null?void 0:i.type)==="block-map"||(i==null?void 0:i.type)==="block-seq")&&s(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:O,spaceBefore:c,comment:f,hasNewline:p,anchor:v,tag:y,newlineAfterProp:x,end:E,start:k??E}}function WS(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(` -`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(WS(t.key)||WS(t.value))return!0}return!1;default:return!0}}function t$(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&WS(t)&&n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function rTe(e,t,n){const{uniqueKeys:i}=e.options;if(i===!1)return!1;const r=typeof i=="function"?i:(s,a)=>s===a||$r(s)&&$r(a)&&s.value===a.value;return t.some(s=>r(s.key,n))}const eZ="All mapping items must start at the same column";function BSt({composeNode:e,composeEmptyNode:t},n,i,r,s){var d;const a=(s==null?void 0:s.nodeClass)??Hc,l=new a(n.schema);n.atRoot&&(n.atRoot=!1);let c=i.offset,u=null;for(const f of i.items){const{start:h,key:p,sep:g,value:b}=f,v=nx(h,{indicator:"explicit-key-ind",next:p??(g==null?void 0:g[0]),offset:c,onError:r,parentIndent:i.indent,startOnNewline:!0}),y=!v.found;if(y){if(p&&(p.type==="block-seq"?r(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==i.indent&&r(c,"BAD_INDENT",eZ)),!v.anchor&&!v.tag&&!g){u=v.end,v.comment&&(l.comment?l.comment+=` -`+v.comment:l.comment=v.comment);continue}(v.newlineAfterProp||WS(p))&&r(p??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((d=v.found)==null?void 0:d.indent)!==i.indent&&r(c,"BAD_INDENT",eZ);n.atKey=!0;const x=v.end,w=p?e(n,p,v,r):t(n,x,h,null,v,r);n.schema.compat&&t$(i.indent,p,r),n.atKey=!1,rTe(n,l.items,w)&&r(x,"DUPLICATE_KEY","Map keys must be unique");const O=nx(g??[],{indicator:"map-value-ind",next:b,offset:w.range[2],onError:r,parentIndent:i.indent,startOnNewline:!p||p.type==="block-scalar"});if(c=O.end,O.found){y&&((b==null?void 0:b.type)==="block-map"&&!O.hasNewline&&r(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&v.starte&&(e.type==="block-map"||e.type==="block-seq");function QSt({composeNode:e,composeEmptyNode:t},n,i,r,s){var v;const a=i.start.source==="{",l=a?"flow map":"flow sequence",c=(s==null?void 0:s.nodeClass)??(a?Hc:Ab),u=new c(n.schema);u.flow=!0;const d=n.atRoot;d&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=i.offset+i.start.source.length;for(let y=0;y0){const y=jE(g,b,n.options.strict,r);y.comment&&(u.comment?u.comment+=` -`+y.comment:u.comment=y.comment),u.range=[i.offset,b,y.offset]}else u.range=[i.offset,b,b];return u}function GM(e,t,n,i,r,s){const a=n.type==="block-map"?BSt(e,t,n,i,s):n.type==="block-seq"?USt(e,t,n,i,s):QSt(e,t,n,i,s),l=a.constructor;return r==="!"||r===l.tagName?(a.tag=l.tagName,a):(r&&(a.tag=r),a)}function zSt(e,t,n,i,r){var h;const s=i.tag,a=s?t.directives.tagName(s.source,p=>r(s,"TAG_RESOLVE_FAILED",p)):null;if(n.type==="block-seq"){const{anchor:p,newlineAfterProp:g}=i,b=p&&s?p.offset>s.offset?p:s:p??s;b&&(!g||g.offsetp.tag===a&&p.collection===l);if(!c){const p=t.schema.knownTags[a];if((p==null?void 0:p.collection)===l)t.schema.tags.push(Object.assign({},p,{default:!1})),c=p;else return p?r(s,"BAD_COLLECTION_TYPE",`${p.tag} used for ${l} collection, but expects ${p.collection??"scalar"}`,!0):r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),GM(e,t,n,r,a)}const u=GM(e,t,n,r,a,c),d=((h=c.resolve)==null?void 0:h.call(c,u,p=>r(s,"TAG_RESOLVE_FAILED",p),t.options))??u,f=Vs(d)?d:new Gn(d);return f.range=u.range,f.tag=a,c!=null&&c.format&&(f.format=c.format),f}function VSt(e,t,n){const i=t.offset,r=HSt(t,e.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};const s=r.mode===">"?Gn.BLOCK_FOLDED:Gn.BLOCK_LITERAL,a=t.source?qSt(t.source):[];let l=a.length;for(let b=a.length-1;b>=0;--b){const v=a[b][1];if(v===""||v==="\r")l=b;else break}if(l===0){const b=r.chomp==="+"&&a.length>0?` +`}};function Zv(e,{flow:t,indicator:n,next:i,offset:r,onError:s,parentIndent:a,startOnNewline:l}){let c=!1,u=l,d=l,f="",h="",p=!1,g=!1,b=null,v=null,y=null,x=null,w=null,O=null,k=null;for(const C of e)switch(g&&(C.type!=="space"&&C.type!=="newline"&&C.type!=="comma"&&s(C.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),b&&(u&&C.type!=="comment"&&C.type!=="newline"&&s(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),b=null),C.type){case"space":!t&&(n!=="doc-start"||(i==null?void 0:i.type)!=="flow-collection")&&C.source.includes(" ")&&(b=C),d=!0;break;case"comment":{d||s(C,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const N=C.source.substring(1)||" ";f?f+=h+N:f=N,h="",u=!1;break}case"newline":u?f?f+=C.source:(!O||n!=="seq-item-ind")&&(c=!0):h+=C.source,u=!0,p=!0,(v||y)&&(x=C),d=!0;break;case"anchor":v&&s(C,"MULTIPLE_ANCHORS","A node can have at most one anchor"),C.source.endsWith(":")&&s(C.offset+C.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=C,k??(k=C.offset),u=!1,d=!1,g=!0;break;case"tag":{y&&s(C,"MULTIPLE_TAGS","A node can have at most one tag"),y=C,k??(k=C.offset),u=!1,d=!1,g=!0;break}case n:(v||y)&&s(C,"BAD_PROP_ORDER",`Anchors and tags must be after the ${C.source} indicator`),O&&s(C,"UNEXPECTED_TOKEN",`Unexpected ${C.source} in ${t??"collection"}`),O=C,u=n==="seq-item-ind"||n==="explicit-key-ind",d=!1;break;case"comma":if(t){w&&s(C,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),w=C,u=!1,d=!1;break}default:s(C,"UNEXPECTED_TOKEN",`Unexpected ${C.type} token`),u=!1,d=!1}const S=e[e.length-1],E=S?S.offset+S.source.length:r;return g&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b&&(u&&b.indent<=a||(i==null?void 0:i.type)==="block-map"||(i==null?void 0:i.type)==="block-seq")&&s(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:O,spaceBefore:c,comment:f,hasNewline:p,anchor:v,tag:y,newlineAfterProp:x,end:E,start:k??E}}function VS(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(` +`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(VS(t.key)||VS(t.value))return!0}return!1;default:return!0}}function e$(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&VS(t)&&n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function sTe(e,t,n){const{uniqueKeys:i}=e.options;if(i===!1)return!1;const r=typeof i=="function"?i:(s,a)=>s===a||Lr(s)&&Lr(a)&&s.value===a.value;return t.some(s=>r(s.key,n))}const YY="All mapping items must start at the same column";function zSt({composeNode:e,composeEmptyNode:t},n,i,r,s){var d;const a=(s==null?void 0:s.nodeClass)??Vc,l=new a(n.schema);n.atRoot&&(n.atRoot=!1);let c=i.offset,u=null;for(const f of i.items){const{start:h,key:p,sep:g,value:b}=f,v=Zv(h,{indicator:"explicit-key-ind",next:p??(g==null?void 0:g[0]),offset:c,onError:r,parentIndent:i.indent,startOnNewline:!0}),y=!v.found;if(y){if(p&&(p.type==="block-seq"?r(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==i.indent&&r(c,"BAD_INDENT",YY)),!v.anchor&&!v.tag&&!g){u=v.end,v.comment&&(l.comment?l.comment+=` +`+v.comment:l.comment=v.comment);continue}(v.newlineAfterProp||VS(p))&&r(p??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((d=v.found)==null?void 0:d.indent)!==i.indent&&r(c,"BAD_INDENT",YY);n.atKey=!0;const x=v.end,w=p?e(n,p,v,r):t(n,x,h,null,v,r);n.schema.compat&&e$(i.indent,p,r),n.atKey=!1,sTe(n,l.items,w)&&r(x,"DUPLICATE_KEY","Map keys must be unique");const O=Zv(g??[],{indicator:"map-value-ind",next:b,offset:w.range[2],onError:r,parentIndent:i.indent,startOnNewline:!p||p.type==="block-scalar"});if(c=O.end,O.found){y&&((b==null?void 0:b.type)==="block-map"&&!O.hasNewline&&r(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&v.starte&&(e.type==="block-map"||e.type==="block-seq");function HSt({composeNode:e,composeEmptyNode:t},n,i,r,s){var v;const a=i.start.source==="{",l=a?"flow map":"flow sequence",c=(s==null?void 0:s.nodeClass)??(a?Vc:Eb),u=new c(n.schema);u.flow=!0;const d=n.atRoot;d&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=i.offset+i.start.source.length;for(let y=0;y0){const y=AE(g,b,n.options.strict,r);y.comment&&(u.comment?u.comment+=` +`+y.comment:u.comment=y.comment),u.range=[i.offset,b,y.offset]}else u.range=[i.offset,b,b];return u}function WM(e,t,n,i,r,s){const a=n.type==="block-map"?zSt(e,t,n,i,s):n.type==="block-seq"?VSt(e,t,n,i,s):HSt(e,t,n,i,s),l=a.constructor;return r==="!"||r===l.tagName?(a.tag=l.tagName,a):(r&&(a.tag=r),a)}function qSt(e,t,n,i,r){var h;const s=i.tag,a=s?t.directives.tagName(s.source,p=>r(s,"TAG_RESOLVE_FAILED",p)):null;if(n.type==="block-seq"){const{anchor:p,newlineAfterProp:g}=i,b=p&&s?p.offset>s.offset?p:s:p??s;b&&(!g||g.offsetp.tag===a&&p.collection===l);if(!c){const p=t.schema.knownTags[a];if((p==null?void 0:p.collection)===l)t.schema.tags.push(Object.assign({},p,{default:!1})),c=p;else return p?r(s,"BAD_COLLECTION_TYPE",`${p.tag} used for ${l} collection, but expects ${p.collection??"scalar"}`,!0):r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),WM(e,t,n,r,a)}const u=WM(e,t,n,r,a,c),d=((h=c.resolve)==null?void 0:h.call(c,u,p=>r(s,"TAG_RESOLVE_FAILED",p),t.options))??u,f=zs(d)?d:new Wn(d);return f.range=u.range,f.tag=a,c!=null&&c.format&&(f.format=c.format),f}function WSt(e,t,n){const i=t.offset,r=KSt(t,e.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};const s=r.mode===">"?Wn.BLOCK_FOLDED:Wn.BLOCK_LITERAL,a=t.source?GSt(t.source):[];let l=a.length;for(let b=a.length-1;b>=0;--b){const v=a[b][1];if(v===""||v==="\r")l=b;else break}if(l===0){const b=r.chomp==="+"&&a.length>0?` `.repeat(Math.max(1,a.length-1)):"";let v=i+r.length;return t.source&&(v+=t.source.length),{value:b,type:s,comment:r.comment,range:[i,v,v]}}let c=t.indent+r.indent,u=t.offset+r.length,d=0;for(let b=0;bc&&(c=v.length);else{v.length=l;--b)a[b][0].length>c&&(l=b+1);let f="",h="",p=!1;for(let b=0;bc||y[0]===" "?(h===" "?h=` `:!p&&h===` `&&(h=` @@ -653,66 +653,66 @@ ${u} `+a[b][0].slice(c);f[f.length-1]!==` `&&(f+=` `);break;default:f+=` -`}const g=i+r.length+t.source.length;return{value:f,type:s,comment:r.comment,range:[i,g,g]}}function HSt({offset:e,props:t},n,i){if(t[0].type!=="block-scalar-header")return i(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:r}=t[0],s=r[0];let a=0,l="",c=-1;for(let h=1;hn(i+h,p,g);switch(r){case"scalar":l=Gn.PLAIN,c=KSt(s,u);break;case"single-quoted-scalar":l=Gn.QUOTE_SINGLE,c=GSt(s,u);break;case"double-quoted-scalar":l=Gn.QUOTE_DOUBLE,c=XSt(s,u);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[i,i+s.length,i+s.length]}}const d=i+s.length,f=jE(a,d,t,n);return{value:c,type:l,comment:f.comment,range:[i,d,f.offset]}}function KSt(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),sTe(e)}function GSt(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),sTe(e.slice(1,-1)).replace(/''/g,"'")}function sTe(e){let t,n;try{t=new RegExp(`(.*?)(?n(i+h,p,g);switch(r){case"scalar":l=Wn.PLAIN,c=YSt(s,u);break;case"single-quoted-scalar":l=Wn.QUOTE_SINGLE,c=ZSt(s,u);break;case"double-quoted-scalar":l=Wn.QUOTE_DOUBLE,c=JSt(s,u);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[i,i+s.length,i+s.length]}}const d=i+s.length,f=AE(a,d,t,n);return{value:c,type:l,comment:f.comment,range:[i,d,f.offset]}}function YSt(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),aTe(e)}function ZSt(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),aTe(e.slice(1,-1)).replace(/''/g,"'")}function aTe(e){let t,n;try{t=new RegExp(`(.*?)(?s?e.slice(s,i+1):r)}else n+=r}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function YSt(e,t){let n="",i=e[t+1];for(;(i===" "||i===" "||i===` +`)&&(n+=i>s?e.slice(s,i+1):r)}else n+=r}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function ekt(e,t){let n="",i=e[t+1];for(;(i===" "||i===" "||i===` `||i==="\r")&&!(i==="\r"&&e[t+2]!==` `);)i===` `&&(n+=` -`),t+=1,i=e[t+1];return n||(n=" "),{fold:n,offset:t}}const ZSt={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` -`,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function JSt(e,t,n,i){const r=e.substr(t,n),a=r.length===n&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(a)}catch{const l=e.substr(t-2,n+2);return i(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}}function aTe(e,t,n,i){const{value:r,type:s,comment:a,range:l}=t.type==="block-scalar"?VSt(e,t,i):WSt(t,e.options.strict,i),c=n?e.directives.tagName(n.source,f=>i(n,"TAG_RESOLVE_FAILED",f)):null;let u;e.options.stringKeys&&e.atKey?u=e.schema[Kd]:c?u=ekt(e.schema,r,c,n,i):t.type==="scalar"?u=tkt(e,r,t,i):u=e.schema[Kd];let d;try{const f=u.resolve(r,h=>i(n??t,"TAG_RESOLVE_FAILED",h),e.options);d=$r(f)?f:new Gn(f)}catch(f){const h=f instanceof Error?f.message:String(f);i(n??t,"TAG_RESOLVE_FAILED",h),d=new Gn(r)}return d.range=l,d.source=r,s&&(d.type=s),c&&(d.tag=c),u.format&&(d.format=u.format),a&&(d.comment=a),d}function ekt(e,t,n,i,r){var l;if(n==="!")return e[Kd];const s=[];for(const c of e.tags)if(!c.collection&&c.tag===n)if(c.default&&c.test)s.push(c);else return c;for(const c of s)if((l=c.test)!=null&&l.test(t))return c;const a=e.knownTags[n];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Kd])}function tkt({atKey:e,directives:t,schema:n},i,r,s){const a=n.tags.find(l=>{var c;return(l.default===!0||e&&l.default==="key")&&((c=l.test)==null?void 0:c.test(i))})||n[Kd];if(n.compat){const l=n.compat.find(c=>{var u;return c.default&&((u=c.test)==null?void 0:u.test(i))})??n[Kd];if(a.tag!==l.tag){const c=t.tagString(a.tag),u=t.tagString(l.tag),d=`Value may be parsed as either ${c} or ${u}`;s(r,"TAG_RESOLVE_FAILED",d,!0)}}return a}function nkt(e,t,n){if(t){n??(n=t.length);for(let i=n-1;i>=0;--i){let r=t[i];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++i];(r==null?void 0:r.type)==="space";)e+=r.source.length,r=t[++i];break}}return e}const ikt={composeNode:oTe,composeEmptyNode:jU};function oTe(e,t,n,i){const r=e.atKey,{spaceBefore:s,comment:a,anchor:l,tag:c}=n;let u,d=!0;switch(t.type){case"alias":u=rkt(e,t,i),(l||c)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=aTe(e,t,c,i),l&&(u.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=zSt(ikt,e,t,n,i),l&&(u.anchor=l.source.substring(1))}catch(f){const h=f instanceof Error?f.message:String(f);i(t,"RESOURCE_EXHAUSTION",h)}break;default:{const f=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",f),d=!1}}return u??(u=jU(e,t.offset,void 0,null,n,i)),l&&u.anchor===""&&i(l,"BAD_ALIAS","Anchor cannot be an empty string"),r&&e.options.stringKeys&&(!$r(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&i(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(u.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?u.comment=a:u.commentBefore=a),e.options.keepSourceTokens&&d&&(u.srcToken=t),u}function jU(e,t,n,i,{spaceBefore:r,comment:s,anchor:a,tag:l,end:c},u){const d={type:"scalar",offset:nkt(t,n,i),indent:-1,source:""},f=aTe(e,d,l,u);return a&&(f.anchor=a.source.substring(1),f.anchor===""&&u(a,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=c),f}function rkt({options:e},{offset:t,source:n,end:i},r){const s=new xU(n.substring(1));s.source===""&&r(t,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&r(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const a=t+n.length,l=jE(i,a,e.strict,r);return s.range=[t,a,l.offset],l.comment&&(s.comment=l.comment),s}function skt(e,t,{offset:n,start:i,value:r,end:s},a){const l=Object.assign({_directives:t},e),c=new NE(void 0,l),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=nx(i,{indicator:"doc-start",next:r??(s==null?void 0:s[0]),offset:n,onError:a,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!d.hasNewline&&a(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=r?oTe(u,r,d,a):jU(u,d.end,i,null,d,a);const f=c.contents.range[2],h=jE(s,f,!1,a);return h.comment&&(c.comment=h.comment),c.range=[n,f,h.offset],c}function Z1(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function tZ(e){var r;let t="",n=!1,i=!1;for(let s=0;si(n,"TAG_RESOLVE_FAILED",f)):null;let u;e.options.stringKeys&&e.atKey?u=e.schema[qd]:c?u=ikt(e.schema,r,c,n,i):t.type==="scalar"?u=rkt(e,r,t,i):u=e.schema[qd];let d;try{const f=u.resolve(r,h=>i(n??t,"TAG_RESOLVE_FAILED",h),e.options);d=Lr(f)?f:new Wn(f)}catch(f){const h=f instanceof Error?f.message:String(f);i(n??t,"TAG_RESOLVE_FAILED",h),d=new Wn(r)}return d.range=l,d.source=r,s&&(d.type=s),c&&(d.tag=c),u.format&&(d.format=u.format),a&&(d.comment=a),d}function ikt(e,t,n,i,r){var l;if(n==="!")return e[qd];const s=[];for(const c of e.tags)if(!c.collection&&c.tag===n)if(c.default&&c.test)s.push(c);else return c;for(const c of s)if((l=c.test)!=null&&l.test(t))return c;const a=e.knownTags[n];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[qd])}function rkt({atKey:e,directives:t,schema:n},i,r,s){const a=n.tags.find(l=>{var c;return(l.default===!0||e&&l.default==="key")&&((c=l.test)==null?void 0:c.test(i))})||n[qd];if(n.compat){const l=n.compat.find(c=>{var u;return c.default&&((u=c.test)==null?void 0:u.test(i))})??n[qd];if(a.tag!==l.tag){const c=t.tagString(a.tag),u=t.tagString(l.tag),d=`Value may be parsed as either ${c} or ${u}`;s(r,"TAG_RESOLVE_FAILED",d,!0)}}return a}function skt(e,t,n){if(t){n??(n=t.length);for(let i=n-1;i>=0;--i){let r=t[i];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++i];(r==null?void 0:r.type)==="space";)e+=r.source.length,r=t[++i];break}}return e}const akt={composeNode:lTe,composeEmptyNode:NU};function lTe(e,t,n,i){const r=e.atKey,{spaceBefore:s,comment:a,anchor:l,tag:c}=n;let u,d=!0;switch(t.type){case"alias":u=okt(e,t,i),(l||c)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=oTe(e,t,c,i),l&&(u.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=qSt(akt,e,t,n,i),l&&(u.anchor=l.source.substring(1))}catch(f){const h=f instanceof Error?f.message:String(f);i(t,"RESOURCE_EXHAUSTION",h)}break;default:{const f=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",f),d=!1}}return u??(u=NU(e,t.offset,void 0,null,n,i)),l&&u.anchor===""&&i(l,"BAD_ALIAS","Anchor cannot be an empty string"),r&&e.options.stringKeys&&(!Lr(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&i(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(u.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?u.comment=a:u.commentBefore=a),e.options.keepSourceTokens&&d&&(u.srcToken=t),u}function NU(e,t,n,i,{spaceBefore:r,comment:s,anchor:a,tag:l,end:c},u){const d={type:"scalar",offset:skt(t,n,i),indent:-1,source:""},f=oTe(e,d,l,u);return a&&(f.anchor=a.source.substring(1),f.anchor===""&&u(a,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(f.spaceBefore=!0),s&&(f.comment=s,f.range[2]=c),f}function okt({options:e},{offset:t,source:n,end:i},r){const s=new vU(n.substring(1));s.source===""&&r(t,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&r(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const a=t+n.length,l=AE(i,a,e.strict,r);return s.range=[t,a,l.offset],l.comment&&(s.comment=l.comment),s}function lkt(e,t,{offset:n,start:i,value:r,end:s},a){const l=Object.assign({_directives:t},e),c=new TE(void 0,l),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},d=Zv(i,{indicator:"doc-start",next:r??(s==null?void 0:s[0]),offset:n,onError:a,parentIndent:0,startOnNewline:!0});d.found&&(c.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!d.hasNewline&&a(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=r?lTe(u,r,d,a):NU(u,d.end,i,null,d,a);const f=c.contents.range[2],h=AE(s,f,!1,a);return h.comment&&(c.comment=h.comment),c.range=[n,f,h.offset],c}function W1(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function ZY(e){var r;let t="",n=!1,i=!1;for(let s=0;s{const a=Z1(n);s?this.warnings.push(new FSt(a,i,r)):this.errors.push(new QO(a,i,r))},this.directives=new jo({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:i,afterEmptyLine:r}=tZ(this.prelude);if(i){const s=t.contents;if(n)t.comment=t.comment?`${t.comment} -${i}`:i;else if(r||t.directives.docStart||!s)t.commentBefore=i;else if(Qs(s)&&!s.flow&&s.items.length>0){let a=s.items[0];Hs(a)&&(a=a.key);const l=a.commentBefore;a.commentBefore=l?`${i} +`)+(a.substring(1)||" "),n=!0,i=!1;break;case"%":((r=e[s+1])==null?void 0:r[0])!=="#"&&(s+=1),n=!1;break;default:n||(i=!0),n=!1}}return{comment:t,afterEmptyLine:i}}let ckt=class{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,i,r,s)=>{const a=W1(n);s?this.warnings.push(new QSt(a,i,r)):this.errors.push(new LO(a,i,r))},this.directives=new No({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:i,afterEmptyLine:r}=ZY(this.prelude);if(i){const s=t.contents;if(n)t.comment=t.comment?`${t.comment} +${i}`:i;else if(r||t.directives.docStart||!s)t.commentBefore=i;else if(Us(s)&&!s.flow&&s.items.length>0){let a=s.items[0];Vs(a)&&(a=a.key);const l=a.commentBefore;a.commentBefore=l?`${i} ${l}`:i}else{const a=s.commentBefore;s.commentBefore=a?`${i} -${a}`:i}}if(n){for(let s=0;s{const s=Z1(t);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",i,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=skt(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new QO(Z1(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){const i="Unexpected doc-end without preceding document";this.errors.push(new QO(Z1(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;const n=jE(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const i=this.doc.comment;this.doc.comment=i?`${i} -${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new QO(Z1(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const i=Object.assign({_directives:this.directives},this.options),r=new NE(void 0,i);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],this.decorate(r,!1),yield r}}};const lTe="\uFEFF",cTe="",uTe="",n$="";function okt(e){switch(e){case lTe:return"byte-order-mark";case cTe:return"doc-mode";case uTe:return"flow-error-end";case n$:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +${a}`:i}}if(n){for(let s=0;s{const s=W1(t);s[0]+=n,this.onError(s,"BAD_DIRECTIVE",i,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=lkt(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new LO(W1(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){const i="Unexpected doc-end without preceding document";this.errors.push(new LO(W1(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;const n=AE(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const i=this.doc.comment;this.doc.comment=i?`${i} +${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new LO(W1(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const i=Object.assign({_directives:this.directives},this.options),r=new TE(void 0,i);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],this.decorate(r,!1),yield r}}};const cTe="\uFEFF",uTe="",dTe="",t$="";function ukt(e){switch(e){case cTe:return"byte-order-mark";case uTe:return"doc-mode";case dTe:return"flow-error-end";case t$:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` `:case`\r -`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function bu(e){switch(e){case void 0:case" ":case` -`:case"\r":case" ":return!0;default:return!1}}const nZ=new Set("0123456789ABCDEFabcdef"),lkt=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),BT=new Set(",[]{}"),ckt=new Set(` ,[]{} -\r `),XM=e=>!e||ckt.has(e);class ukt{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let i=this.next??"stream";for(;i&&(n||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===` +`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function gu(e){switch(e){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}const JY=new Set("0123456789ABCDEFabcdef"),dkt=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),LT=new Set(",[]{}"),fkt=new Set(` ,[]{} +\r `),KM=e=>!e||fkt.has(e);class hkt{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let i=this.next??"stream";for(;i&&(n||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===` `?!0:n==="\r"?this.buffer[t+1]===` `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let i=0;for(;n===" ";)n=this.buffer[++i+t];if(n==="\r"){const r=this.buffer[i+t+1];if(r===` `||!r&&!this.atEnd)return t+i+1}return n===` -`||i>=this.indentNext||!n&&!this.atEnd?t+i:-1}if(n==="-"||n==="."){const i=this.buffer.substr(t,3);if((i==="---"||i==="...")&&bu(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&tthis.indentValue&&!bu(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&bu(n)){const i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(XM),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,i=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=i=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const r=this.getLine();if(r===null)return this.setNext("flow");if((i!==-1&&i=this.indentNext||!n&&!this.atEnd?t+i:-1}if(n==="-"||n==="."){const i=this.buffer.substr(t,3);if((i==="---"||i==="...")&&gu(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&tthis.indentValue&&!gu(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&gu(n)){const i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(KM),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,i=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=i=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const r=this.getLine();if(r===null)return this.setNext("flow");if((i!==-1&&i"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>bu(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,i;e:for(let s=this.pos;i=this.buffer[s];++s)switch(i){case" ":n+=1;break;case` +`,s)}r!==-1&&(n=r-(i[r-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>gu(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,i;e:for(let s=this.pos;i=this.buffer[s];++s)switch(i){case" ":n+=1;break;case` `:t=s,n=0;break;case"\r":{const a=this.buffer[s+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===` `)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const s=this.continueScalar(t+1);if(s===-1)break;t=this.buffer.indexOf(` `,s)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let r=t+1;for(i=this.buffer[r];i===" ";)i=this.buffer[++r];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===` `;)i=this.buffer[++r];t=r-1}else if(!this.blockScalarKeep)do{let s=t-1,a=this.buffer[s];a==="\r"&&(a=this.buffer[--s]);const l=s;for(;a===" ";)a=this.buffer[--s];if(a===` -`&&s>=this.pos&&s+1+n>l)t=s;else break}while(!0);return yield n$,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,i=this.pos-1,r;for(;r=this.buffer[++i];)if(r===":"){const s=this.buffer[i+1];if(bu(s)||t&&BT.has(s))break;n=i}else if(bu(r)){let s=this.buffer[i+1];if(r==="\r"&&(s===` +`&&s>=this.pos&&s+1+n>l)t=s;else break}while(!0);return yield t$,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,i=this.pos-1,r;for(;r=this.buffer[++i];)if(r===":"){const s=this.buffer[i+1];if(gu(s)||t&<.has(s))break;n=i}else if(gu(r)){let s=this.buffer[i+1];if(r==="\r"&&(s===` `?(i+=1,r=` -`,s=this.buffer[i+1]):n=i),s==="#"||t&&BT.has(s))break;if(r===` -`){const a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(t&&BT.has(r))break;n=i}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield n$,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const i=this.buffer.slice(this.pos,t);return i?(yield i,this.pos+=i.length,i.length):(n&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(XM),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{const n=this.flowLevel>0,i=this.charAt(1);if(bu(i)||n&&BT.has(i)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!bu(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(lkt.has(n))n=this.buffer[++t];else if(n==="%"&&nZ.has(this.buffer[t+1])&&nZ.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===` +`,s=this.buffer[i+1]):n=i),s==="#"||t&<.has(s))break;if(r===` +`){const a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(t&<.has(r))break;n=i}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield t$,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const i=this.buffer.slice(this.pos,t);return i?(yield i,this.pos+=i.length,i.length):(n&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(KM),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{const n=this.flowLevel>0,i=this.charAt(1);if(gu(i)||n&<.has(i)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!gu(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(dkt.has(n))n=this.buffer[++t];else if(n==="%"&&JY.has(this.buffer[t+1])&&JY.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===` `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===` -`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,i;do i=this.buffer[++n];while(i===" "||t&&i===" ");const r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(t){let n=this.pos,i=this.buffer[n];for(;!t(i);)i=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class dkt{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,i=this.lineStarts.length;for(;n>1;this.lineStarts[s]=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function ON(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const i=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in i?i.indent:0:n.type==="flow-collection"&&i.type==="document"&&(n.indent=0),n.type==="flow-collection"&&rZ(n),i.type){case"document":i.value=n;break;case"block-scalar":i.props.push(n);break;case"block-map":{const r=i.items[i.items.length-1];if(r.value){i.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{const r=i.items[i.items.length-1];r.value?i.items.push({start:[],value:n}):r.value=n;break}case"flow-collection":{const r=i.items[i.items.length-1];!r||r.value?i.items.push({start:[],key:n,sep:[]}):r.sep?r.value=n:Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const r=n.items[n.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&iZ(r.start)===-1&&(n.indent===0||r.start.every(s=>s.type!=="comment"||s.indent0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(t){let n=this.pos,i=this.buffer[n];for(;!t(i);)i=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class pkt{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,i=this.lineStarts.length;for(;n>1;this.lineStarts[s]=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function yN(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const i=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in i?i.indent:0:n.type==="flow-collection"&&i.type==="document"&&(n.indent=0),n.type==="flow-collection"&&tZ(n),i.type){case"document":i.value=n;break;case"block-scalar":i.props.push(n);break;case"block-map":{const r=i.items[i.items.length-1];if(r.value){i.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{const r=i.items[i.items.length-1];r.value?i.items.push({start:[],value:n}):r.value=n;break}case"flow-collection":{const r=i.items[i.items.length-1];!r||r.value?i.items.push({start:[],key:n,sep:[]}):r.sep?r.value=n:Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const r=n.items[n.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&eZ(r.start)===-1&&(n.indent===0||r.start.every(s=>s.type!=="comment"||s.indent=t.indent){const r=!this.onKeyLine&&this.indent===t.indent,s=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let a=[];if(s&&n.sep&&!n.value){const l=[];for(let c=0;ct.indent&&(l.length=0);break;default:l.length=0}}l.length>=2&&(a=n.sep.splice(l[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(a.push(this.sourceToken),t.items.push({start:a}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):s||n.value?(a.push(this.sourceToken),t.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Tp(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(dTe(n.key)&&!Tp(n.sep,"newline")){const l=B0(n.start),c=n.key,u=n.sep;u.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:c,sep:u}]})}else a.length>0?n.sep=n.sep.concat(a,this.sourceToken):n.sep.push(this.sourceToken);else if(Tp(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const l=B0(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||s?t.items.push({start:a,key:null,sep:[this.sourceToken]}):Tp(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);s||n.value?(t.items.push({start:a,key:l,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(l):(Object.assign(n,{key:l,sep:[]}),this.onKeyLine=!0);return}default:{const l=this.startBlockValue(t);if(l){if(l.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Tp(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&t.items.push({start:a});this.stack.push(l);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var i;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const r="end"in n.value?n.value.end:void 0,s=Array.isArray(r)?r[r.length-1]:void 0;(s==null?void 0:s.type)==="comment"?r==null||r.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const r=t.items[t.items.length-2],s=(i=r==null?void 0:r.value)==null?void 0:i.end;if(Array.isArray(s)){ON(s,n.start),s.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||Tp(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const r=this.startBlockValue(t);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while((i==null?void 0:i.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:r,sep:[]}):n.sep?this.stack.push(r):Object.assign(n,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const i=this.startBlockValue(t);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{const i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===t.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){const r=UT(i),s=B0(r);rZ(t);const a=t.end.splice(1,t.end.length);a.push(this.sourceToken);const l={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:s,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(` +`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var i;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const r="end"in n.value?n.value.end:void 0,s=Array.isArray(r)?r[r.length-1]:void 0;(s==null?void 0:s.type)==="comment"?r==null||r.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const r=t.items[t.items.length-2],s=(i=r==null?void 0:r.value)==null?void 0:i.end;if(Array.isArray(s)){yN(s,n.start),s.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const r=!this.onKeyLine&&this.indent===t.indent,s=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let a=[];if(s&&n.sep&&!n.value){const l=[];for(let c=0;ct.indent&&(l.length=0);break;default:l.length=0}}l.length>=2&&(a=n.sep.splice(l[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(a.push(this.sourceToken),t.items.push({start:a}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):s||n.value?(a.push(this.sourceToken),t.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(wp(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(fTe(n.key)&&!wp(n.sep,"newline")){const l=M0(n.start),c=n.key,u=n.sep;u.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:c,sep:u}]})}else a.length>0?n.sep=n.sep.concat(a,this.sourceToken):n.sep.push(this.sourceToken);else if(wp(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const l=M0(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||s?t.items.push({start:a,key:null,sep:[this.sourceToken]}):wp(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);s||n.value?(t.items.push({start:a,key:l,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(l):(Object.assign(n,{key:l,sep:[]}),this.onKeyLine=!0);return}default:{const l=this.startBlockValue(t);if(l){if(l.type==="block-seq"){if(!n.explicitKey&&n.sep&&!wp(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&t.items.push({start:a});this.stack.push(l);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var i;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const r="end"in n.value?n.value.end:void 0,s=Array.isArray(r)?r[r.length-1]:void 0;(s==null?void 0:s.type)==="comment"?r==null||r.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const r=t.items[t.items.length-2],s=(i=r==null?void 0:r.value)==null?void 0:i.end;if(Array.isArray(s)){yN(s,n.start),s.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||wp(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const r=this.startBlockValue(t);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while((i==null?void 0:i.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:r,sep:[]}):n.sep?this.stack.push(r):Object.assign(n,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const i=this.startBlockValue(t);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{const i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===t.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){const r=$T(i),s=M0(r);tZ(t);const a=t.end.splice(1,t.end.length);a.push(this.sourceToken);const l={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:s,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(` `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(` -`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=UT(t),i=B0(n);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=UT(t),i=B0(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function hkt(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new dkt||null,prettyErrors:t}}function fTe(e,t={}){const{lineCounter:n,prettyErrors:i}=hkt(t),r=new fkt(n==null?void 0:n.addNewLine),s=new akt(t);let a=null;for(const l of s.compose(r.parse(e),!0,e.length))if(!a)a=l;else if(a.options.logLevel!=="silent"){a.errors.push(new QO(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&n&&(a.errors.forEach(JY(e,n)),a.warnings.forEach(JY(e,n))),a}function pkt(e,t,n){let i;const r=fTe(e,n);if(!r)return null;if(r.warnings.forEach(s=>MCe(r.options.logLevel,s)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:i},n))}function RU(e,t,n){let i=null;if(typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const r=Math.round(n);n=r<1?void 0:r>8?{indent:8}:{indent:r}}if(e===void 0){const{keepUndefined:r}=n??t??{};if(!r)return}return CE(e)&&!i?e.toString(n):new NE(e,i,n).toString(n)}const hTe=1024;let mkt=0,Wc=class{constructor(t,n){this.from=t,this.to=n}};class Pn{constructor(t={}){this.id=mkt++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=t.combine||null}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=ra.match(t)),n=>{let i=t(n);return i===void 0?null:[this,i]}}}Pn.closedBy=new Pn({deserialize:e=>e.split(" ")});Pn.openedBy=new Pn({deserialize:e=>e.split(" ")});Pn.group=new Pn({deserialize:e=>e.split(" ")});Pn.isolate=new Pn({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});Pn.contextHash=new Pn({perNode:!0});Pn.lookAhead=new Pn({perNode:!0});Pn.mounted=new Pn({perNode:!0});class ov{constructor(t,n,i,r=!1){this.tree=t,this.overlay=n,this.parser=i,this.bracketed=r}static get(t){return t&&t.props&&t.props[Pn.mounted.id]}}const gkt=Object.create(null);class ra{constructor(t,n,i,r=0){this.name=t,this.props=n,this.id=i,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):gkt,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),r=new ra(t.name||"",n,t.id,i);if(t.props){for(let s of t.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(t){return this.props[t.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(t){if(typeof t=="string"){if(this.name==t)return!0;let n=this.prop(Pn.group);return n?n.indexOf(t)>-1:!1}return this.id==t}static match(t){let n=Object.create(null);for(let i in t)for(let r of i.split(" "))n[r]=t[i];return i=>{for(let r=i.prop(Pn.group),s=-1;s<(r?r.length:0);s++){let a=n[s<0?i.name:r[s]];if(a)return a}}}}ra.none=new ra("",Object.create(null),0,8);class t1{constructor(t){this.types=t;for(let n=0;n0;for(let c=this.cursor(a|tr.IncludeAnonymous);;){let u=!1;if(c.from<=s&&c.to>=r&&(!l&&c.type.isAnonymous||n(c)!==!1)){if(c.firstChild())continue;u=!0}for(;u&&i&&(l||!c.type.isAnonymous)&&i(c),!c.nextSibling();){if(!c.parent())return;u=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let n in this.props)t.push([+n,this.props[n]]);return t}balance(t={}){return this.children.length<=8?this:DU(ra.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new gi(this.type,n,i,r,this.propValues),t.makeTree||((n,i,r)=>new gi(ra.none,n,i,r)))}static build(t){return xkt(t)}}gi.empty=new gi(ra.none,[],[],0);class IU{constructor(t,n){this.buffer=t,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new IU(this.buffer,this.index)}}class _m{constructor(t,n,i){this.buffer=t,this.length=n,this.set=i}get type(){return ra.none}toString(){let t=[];for(let n=0;n0));c=a[c+3]);return l}slice(t,n,i){let r=this.buffer,s=new Uint16Array(n-t),a=0;for(let l=t,c=0;l=t&&nt;case 1:return n<=t&&i>t;case 2:return i>t;case 4:return!0}}function KS(e,t,n,i){for(var r;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?l.length:-1;t!=u;t+=n){let d=l[t],f=c[t]+a.from,h;if(!(!(s&tr.EnterBracketed&&d instanceof gi&&(h=ov.get(d))&&!h.overlay&&h.bracketed&&i>=f&&i<=f+d.length)&&!pTe(r,i,f,f+d.length))){if(d instanceof _m){if(s&tr.ExcludeBuffers)continue;let p=d.findChild(0,d.buffer.length,n,i-f,r);if(p>-1)return new Rd(new bkt(a,d,t,f),null,p)}else if(s&tr.IncludeAnonymous||!d.type.isAnonymous||PU(d)){let p;if(!(s&tr.IgnoreMounts)&&(p=ov.get(d))&&!p.overlay)return new vo(p.tree,f,t,a);let g=new vo(d,f,t,a);return s&tr.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(n<0?d.children.length-1:0,n,i,r,s)}}}if(s&tr.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?t=a.index+n:t=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}prop(t){return this._tree.prop(t)}enter(t,n,i=0){let r;if(!(i&tr.IgnoreOverlays)&&(r=ov.get(this._tree))&&r.overlay){let s=t-this.from,a=i&tr.EnterBracketed&&r.bracketed;for(let{from:l,to:c}of r.overlay)if((n>0||a?l<=s:l=s:c>s))return new vo(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,i)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function aZ(e,t,n,i){let r=e.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let a=!1;!a;)if(a=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(t)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function i$(e,t,n=t.length-1){for(let i=e;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(t[n]&&t[n]!=i.name)return!1;n--}}return!0}class bkt{constructor(t,n,i,r){this.parent=t,this.buffer=n,this.index=i,this.start=r}}class Rd extends mTe{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,n,i){super(),this.context=t,this._parent=n,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}child(t,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t,n-this.context.start,i);return s<0?null:new Rd(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}prop(t){return this.type.prop(t)}enter(t,n,i=0){if(i&tr.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return s<0?null:new Rd(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Rd(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Rd(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let a=i.buffer[this.index+1];t.push(i.slice(r,s,a)),n.push(0)}return new gi(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function gTe(e){if(!e.length)return null;let t=0,n=e[0];for(let s=1;sn.from||a.to=t){let l=new vo(a.tree,a.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(KS(l,t,n,!1))}}return r?gTe(r):i}class wN{get name(){return this.type.name}constructor(t,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~tr.EnterBracketed,t instanceof vo)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let i=t._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return t?(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0):!1}yieldBuf(t,n){this.index=t;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[t]],this.from=i+r.buffer[t+1],this.to=i+r.buffer[t+2],!0}yield(t){return t?t instanceof vo?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],t,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,n,i=this.mode){return this.buffer?i&tr.ExcludeBuffers?!1:this.enterChild(1,t,n):this.yield(this._tree.enter(t,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&tr.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&tr.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(t<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let n,i,{buffer:r}=this;if(r){if(t>0){if(this.index-1)for(let s=n+t,a=t<0?-1:i._tree.children.length;s!=a;s+=t){let l=i._tree.children[s];if(this.mode&tr.IncludeAnonymous||l instanceof _m||!l.type.isAnonymous||PU(l))return!1}return!0}move(t,n){if(n&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,n=0){for(;(this.from==this.to||(n<1?this.from>=t:this.from>t)||(n>-1?this.to<=t:this.to=0;){for(let a=t;a;a=a._parent)if(a.index==r){if(r==this.index)return a;n=a,i=s+1;break e}r=this.stack[--s]}for(let r=i;r=0;s--){if(s<0)return i$(this._tree,t,r);let a=i[n.buffer[this.stack[s]]];if(!a.isAnonymous){if(t[r]&&t[r]!=a.name)return!1;r--}}return!0}}function PU(e){return e.children.some(t=>t instanceof _m||!t.type.isAnonymous||PU(t))}function xkt(e){var t;let{buffer:n,nodeSet:i,maxBufferLength:r=hTe,reused:s=[],minRepeatType:a=i.types.length}=e,l=Array.isArray(n)?new IU(n,n.length):n,c=i.types,u=0,d=0;function f(k,S,E,C,N,_){let{id:j,start:T,end:L,size:A}=l,R=d,P=u;if(A<0)if(l.next(),A==-1){let H=s[j];E.push(H),C.push(T-k);return}else if(A==-3){u=j;return}else if(A==-4){d=j;return}else throw new RangeError(`Unrecognized record size: ${A}`);let $=c[j],M,B,I=T-k;if(L-T<=r&&(B=v(l.pos-S,N))){let H=new Uint16Array(B.size-B.skip),X=l.pos-B.size,Q=H.length;for(;l.pos>X;)Q=y(B.start,H,Q);M=new _m(H,L-B.start,i),I=B.start-k}else{let H=l.pos-A;l.next();let X=[],Q=[],q=j>=a?j:-1,U=0,te=L;for(;l.pos>H;)q>=0&&l.id==q&&l.size>=0?(l.end<=te-r&&(g(X,Q,T,U,l.end,te,q,R,P),U=X.length,te=l.end),l.next()):_>2500?h(T,H,X,Q):f(T,H,X,Q,q,_+1);if(q>=0&&U>0&&U-1&&U>0){let le=p($,P);M=DU($,X,Q,0,X.length,0,L-T,le,le)}else M=b($,X,Q,L-T,R-L,P)}E.push(M),C.push(I)}function h(k,S,E,C){let N=[],_=0,j=-1;for(;l.pos>S;){let{id:T,start:L,end:A,size:R}=l;if(R>4)l.next();else{if(j>-1&&L=0;A-=3)T[R++]=N[A],T[R++]=N[A+1]-L,T[R++]=N[A+2]-L,T[R++]=R;E.push(new _m(T,N[2]-L,i)),C.push(L-k)}}function p(k,S){return(E,C,N)=>{let _=0,j=E.length-1,T,L;if(j>=0&&(T=E[j])instanceof gi){if(!j&&T.type==k&&T.length==N)return T;(L=T.prop(Pn.lookAhead))&&(_=C[j]+T.length+L)}return b(k,E,C,N,_,S)}}function g(k,S,E,C,N,_,j,T,L){let A=[],R=[];for(;k.length>C;)A.push(k.pop()),R.push(S.pop()+E-N);k.push(b(i.types[j],A,R,_-N,T-_,L)),S.push(N-E)}function b(k,S,E,C,N,_,j){if(_){let T=[Pn.contextHash,_];j=j?[T].concat(j):[T]}if(N>25){let T=[Pn.lookAhead,N];j=j?[T].concat(j):[T]}return new gi(k,S,E,C,j)}function v(k,S){let E=l.fork(),C=0,N=0,_=0,j=E.end-r,T={size:0,start:0,skip:0};e:for(let L=E.pos-k;E.pos>L;){let A=E.size;if(E.id==S&&A>=0){T.size=C,T.start=N,T.skip=_,_+=4,C+=4,E.next();continue}let R=E.pos-A;if(A<0||R=a?4:0,$=E.start;for(E.next();E.pos>R;){if(E.size<0)if(E.size==-3||E.size==-4)P+=4;else break e;else E.id>=a&&(P+=4);E.next()}N=$,C+=A,_+=P}return(S<0||C==k)&&(T.size=C,T.start=N,T.skip=_),T.size>4?T:void 0}function y(k,S,E){let{id:C,start:N,end:_,size:j}=l;if(l.next(),j>=0&&C4){let L=l.pos-(j-4);for(;l.pos>L;)E=y(k,S,E)}S[--E]=T,S[--E]=_-k,S[--E]=N-k,S[--E]=C}else j==-3?u=C:j==-4&&(d=C);return E}let x=[],w=[];for(;l.pos>0;)f(e.start||0,e.bufferStart||0,x,w,-1,0);let O=(t=e.length)!==null&&t!==void 0?t:x.length?w[0]+x[0].length:0;return new gi(c[e.topID],x.reverse(),w.reverse(),O)}const oZ=new WeakMap;function OA(e,t){if(!e.isAnonymous||t instanceof _m||t.type!=e)return 1;let n=oZ.get(t);if(n==null){n=1;for(let i of t.children){if(i.type!=e||!(i instanceof gi)){n=1;break}n+=OA(e,i)}oZ.set(t,n)}return n}function DU(e,t,n,i,r,s,a,l,c){let u=0;for(let g=i;g=d)break;S+=E}if(w==O+1){if(S>d){let E=g[O];p(E.children,E.positions,0,E.children.length,b[O]+x);continue}f.push(g[O])}else{let E=b[w-1]+g[w-1].length-k;f.push(DU(e,g,b,O,w,k,E,null,c))}h.push(k+x-s)}}return p(t,n,i,r,0),(l||c)(f,h,a)}class MU{constructor(){this.map=new WeakMap}setBuffer(t,n,i){let r=this.map.get(t);r||this.map.set(t,r=new Map),r.set(n,i)}getBuffer(t,n){let i=this.map.get(t);return i&&i.get(n)}set(t,n){t instanceof Rd?this.setBuffer(t.context.buffer,t.index,n):t instanceof vo&&this.map.set(t.tree,n)}get(t){return t instanceof Rd?this.getBuffer(t.context.buffer,t.index):t instanceof vo?this.map.get(t.tree):void 0}cursorSet(t,n){t.buffer?this.setBuffer(t.buffer.buffer,t.index,n):this.map.set(t.tree,n)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class bh{constructor(t,n,i,r,s=!1,a=!1){this.from=t,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],i=!1){let r=[new bh(0,t.length,t,0,!1,i)];for(let s of n)s.to>t.length&&r.push(s);return r}static applyChanges(t,n,i=128){if(!n.length)return t;let r=[],s=1,a=t.length?t[0]:null;for(let l=0,c=0,u=0;;l++){let d=l=i)for(;a&&a.from=h.from||f<=h.to||u){let p=Math.max(h.from,c)-u,g=Math.min(h.to,f)-u;h=p>=g?null:new bh(p,g,h.tree,h.offset+u,l>0,!!d)}if(h&&r.push(h),a.to>f)break;a=snew Wc(r.from,r.to)):[new Wc(0,0)]:[new Wc(0,t.length)],this.createParse(t,n||[],i)}parse(t,n,i){let r=this.startParse(t,n,i);for(;;){let s=r.advance();if(s)return s}}}class Okt{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,n){return this.string.slice(t,n)}}function bTe(e){return(t,n,i,r)=>new Skt(t,e,n,i,r)}class lZ{constructor(t,n,i,r,s,a){this.parser=t,this.parse=n,this.overlay=i,this.bracketed=r,this.target=s,this.from=a}}function cZ(e){if(!e.length||e.some(t=>t.from>=t.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class wkt{constructor(t,n,i,r,s,a,l,c){this.parser=t,this.predicate=n,this.mounts=i,this.index=r,this.start=s,this.bracketed=a,this.target=l,this.prev=c,this.depth=0,this.ranges=[]}}const r$=new Pn({perNode:!0});class Skt{constructor(t,n,i,r,s){this.nest=n,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new gi(i.type,i.children,i.positions,i.length,i.propValues.concat([[r$,this.stoppedAt]]))),i}let t=this.inner[this.innerDone],n=t.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),t.target.props);i[Pn.mounted.id]=new ov(n,t.overlay,t.parser,t.bracketed),t.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)l=!1;else if(t.hasNode(r)){if(n){let u=n.mounts.find(d=>d.frag.from<=r.from&&d.frag.to>=r.to&&d.mount.overlay);if(u)for(let d of u.mount.overlay){let f=d.from+u.pos,h=d.to+u.pos;f>=r.from&&h<=r.to&&!n.ranges.some(p=>p.fromf)&&n.ranges.push({from:f,to:h})}}l=!1}else if(i&&(a=kkt(i.ranges,r.from,r.to)))l=a!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.fromnew Wc(f.from-r.from,f.to-r.from)):null,!!s.bracketed,r.tree,d.length?d[0].from:r.from)),s.overlay?d.length&&(i={ranges:d,depth:0,prev:i}):l=!1}}else if(n&&(c=n.predicate(r))&&(c===!0&&(c=new Wc(r.from,r.to)),c.from=0&&n.ranges[u].to==c.from?n.ranges[u]={from:n.ranges[u].from,to:c.to}:n.ranges.push(c)}if(l&&r.firstChild())n&&n.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let u=fZ(this.ranges,n.ranges);u.length&&(cZ(u),this.inner.splice(n.index,0,new lZ(n.parser,n.parser.startParse(this.input,hZ(n.mounts,u),u),n.ranges.map(d=>new Wc(d.from-n.start,d.to-n.start)),n.bracketed,n.target,u[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function kkt(e,t,n){for(let i of e){if(i.from>=n)break;if(i.to>t)return i.from<=t&&i.to>=n?2:1}return 0}function uZ(e,t,n,i,r,s){if(t=t&&n.enter(i,1,tr.IgnoreOverlays|tr.ExcludeBuffers)))if(n.to<=t)n.next(!1)||(this.done=!0);else break}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==t.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof gi)n=n.children[0];else break}return!1}}let Ckt=class{constructor(t){var n;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let i=this.curFrag=t[0];this.curTo=(n=i.tree.prop(r$))!==null&&n!==void 0?n:i.to,this.inner=new dZ(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(t=n.tree.prop(r$))!==null&&t!==void 0?t:n.to,this.inner=new dZ(n.tree,-n.offset)}}findMounts(t,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let s=this.inner.cursor.node;s;s=s.parent){let a=(i=s.tree)===null||i===void 0?void 0:i.prop(Pn.mounted);if(a&&a.parser==n)for(let l=this.fragI;l=s.to)break;c.tree==this.curFrag.tree&&r.push({frag:c,pos:s.from-c.offset,mount:a})}}}return r}};function fZ(e,t){let n=null,i=t;for(let r=1,s=0;r=l)break;c.to<=a||(n||(i=n=t.slice()),c.froml&&n.splice(s+1,0,new Wc(l,c.to))):c.to>l?n[s--]=new Wc(l,c.to):n.splice(s--,1))}}return i}function Tkt(e,t,n,i){let r=0,s=0,a=!1,l=!1,c=-1e9,u=[];for(;;){let d=r==e.length?1e9:a?e[r].to:e[r].from,f=s==t.length?1e9:l?t[s].to:t[s].from;if(a!=l){let h=Math.max(c,n),p=Math.min(d,f,i);hnew Wc(h.from+i,h.to+i)),f=Tkt(t,d,c,u);for(let h=0,p=c;;h++){let g=h==f.length,b=g?u:f[h].from;if(b>p&&n.push(new bh(p,b,r.tree,-a,s.from>=p||s.openStart,s.to<=b||s.openEnd)),g)break;p=f[h].to}}else n.push(new bh(c,u,r.tree,-a,s.from>=a||s.openStart,s.to<=l||s.openEnd))}return n}let s$=[],yTe=[];(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,n=0;t>1;if(e=yTe[i])t=i+1;else return!0;if(t==n)return!1}}function pZ(e){return e>=127462&&e<=127487}const mZ=8205;function _kt(e,t,n=!0,i=!0){return(n?vTe:Nkt)(e,t,i)}function vTe(e,t,n){if(t==e.length)return t;t&&xTe(e.charCodeAt(t))&&OTe(e.charCodeAt(t-1))&&t--;let i=YM(e,t);for(t+=gZ(i);t=0&&pZ(YM(e,a));)s++,a-=2;if(s%2==0)break;t+=2}else break}return t}function Nkt(e,t,n){for(;t>1;){let i=vTe(e,t-2,n);if(i=56320&&e<57344}function OTe(e){return e>=55296&&e<56320}function gZ(e){return e<65536?1:2}let Zi=class wTe{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,n,i){[t,n]=ix(this,t,n);let r=[];return this.decompose(0,t,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Sd.from(r,this.length-(n-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,n=this.length){[t,n]=ix(this,t,n);let i=[];return this.decompose(t,n,i,0),Sd.from(i,n-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let n=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),r=new Lw(this),s=new Lw(t);for(let a=n,l=n;;){if(r.next(a),s.next(a),a=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(t=1){return new Lw(this,t)}iterRange(t,n=this.length){return new STe(this,t,n)}iterLines(t,n){let i;if(t==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(t).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new kTe(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?wTe.empty:t.length<=32?new Ls(t):Sd.from(Ls.split(t,[]))}};class Ls extends Zi{constructor(t,n=jkt(t)){super(),this.text=t,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(t,n,i,r){for(let s=0;;s++){let a=this.text[s],l=r+a.length;if((n?i:l)>=t)return new Rkt(r,l,i,a);r=l+1,i++}}decompose(t,n,i,r){let s=t<=0&&n>=this.length?this:new Ls(bZ(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(r&1){let a=i.pop(),l=wA(s.text,a.text.slice(),0,s.length);if(l.length<=32)i.push(new Ls(l,a.length+s.length));else{let c=l.length>>1;i.push(new Ls(l.slice(0,c)),new Ls(l.slice(c)))}}else i.push(s)}replace(t,n,i){if(!(i instanceof Ls))return super.replace(t,n,i);[t,n]=ix(this,t,n);let r=wA(this.text,wA(i.text,bZ(this.text,0,t)),n),s=this.length+i.length-(n-t);return r.length<=32?new Ls(r,s):Sd.from(Ls.split(r,[]),s)}sliceString(t,n=this.length,i=` -`){[t,n]=ix(this,t,n);let r="";for(let s=0,a=0;s<=n&&at&&a&&(r+=i),ts&&(r+=l.slice(Math.max(0,t-s),n-s)),s=c+1}return r}flatten(t){for(let n of this.text)t.push(n)}scanIdentical(){return 0}static split(t,n){let i=[],r=-1;for(let s of t)i.push(s),r+=s.length+1,i.length==32&&(n.push(new Ls(i,r)),i=[],r=-1);return r>-1&&n.push(new Ls(i,r)),n}}class Sd extends Zi{constructor(t,n){super(),this.children=t,this.length=n,this.lines=0;for(let i of t)this.lines+=i.lines}lineInner(t,n,i,r){for(let s=0;;s++){let a=this.children[s],l=r+a.length,c=i+a.lines-1;if((n?c:l)>=t)return a.lineInner(t,n,i,r);r=l+1,i=c+1}}decompose(t,n,i,r){for(let s=0,a=0;a<=n&&s=a){let u=r&((a<=t?1:0)|(c>=n?2:0));a>=t&&c<=n&&!u?i.push(l):l.decompose(t-a,n-a,i,u)}a=c+1}}replace(t,n,i){if([t,n]=ix(this,t,n),i.lines=s&&n<=l){let c=a.replace(t-s,n-s,i),u=this.lines-a.lines+c.lines;if(c.lines>4&&c.lines>u>>6){let d=this.children.slice();return d[r]=c,new Sd(d,this.length-(n-t)+i.length)}return super.replace(s,l,c)}s=l+1}return super.replace(t,n,i)}sliceString(t,n=this.length,i=` -`){[t,n]=ix(this,t,n);let r="";for(let s=0,a=0;st&&s&&(r+=i),ta&&(r+=l.sliceString(t-a,n-a,i)),a=c+1}return r}flatten(t){for(let n of this.children)n.flatten(t)}scanIdentical(t,n){if(!(t instanceof Sd))return 0;let i=0,[r,s,a,l]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==a||s==l)return i;let c=this.children[r],u=t.children[s];if(c!=u)return i+c.scanIdentical(u,n);i+=c.length+1}}static from(t,n=t.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let p of t)i+=p.lines;if(i<32){let p=[];for(let g of t)g.flatten(p);return new Ls(p,n)}let r=Math.max(32,i>>5),s=r<<1,a=r>>1,l=[],c=0,u=-1,d=[];function f(p){let g;if(p.lines>s&&p instanceof Sd)for(let b of p.children)f(b);else p.lines>a&&(c>a||!c)?(h(),l.push(p)):p instanceof Ls&&c&&(g=d[d.length-1])instanceof Ls&&p.lines+g.lines<=32?(c+=p.lines,u+=p.length+1,d[d.length-1]=new Ls(g.text.concat(p.text),g.length+1+p.length)):(c+p.lines>r&&h(),c+=p.lines,u+=p.length+1,d.push(p))}function h(){c!=0&&(l.push(d.length==1?d[0]:Sd.from(d,u)),u=-1,c=d.length=0)}for(let p of t)f(p);return h(),l.length==1?l[0]:new Sd(l,n)}}Zi.empty=new Ls([""],0);function jkt(e){let t=-1;for(let n of e)t+=n.length+1;return t}function wA(e,t,n=0,i=1e9){for(let r=0,s=0,a=!0;s=n&&(c>i&&(l=l.slice(0,i-r)),r0?1:(t instanceof Ls?t.text.length:t.children.length)<<1]}nextInner(t,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],a=s>>1,l=r instanceof Ls?r.text.length:r.children.length;if(a==(n>0?l:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,t==0)return this.lineBreak=!0,this.value=` -`,this;t--}else if(r instanceof Ls){let c=r.text[a+(n<0?-1:0)];if(this.offsets[i]+=n,c.length>Math.max(0,t))return this.value=t==0?c:n>0?c.slice(t):c.slice(0,c.length-t),this;t-=c.length}else{let c=r.children[a+(n<0?-1:0)];t>c.length?(t-=c.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(n>0?1:(c instanceof Ls?c.text.length:c.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class STe{constructor(t,n,i){this.value="",this.done=!1,this.cursor=new Lw(t,n>i?-1:1),this.pos=n>i?t.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(t,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:r}=this.cursor.next(t);return this.pos+=(r.length+t)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class kTe{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:n,lineBreak:i,value:r}=this.inner.next(t);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Zi.prototype[Symbol.iterator]=function(){return this.iter()},Lw.prototype[Symbol.iterator]=STe.prototype[Symbol.iterator]=kTe.prototype[Symbol.iterator]=function(){return this});let Rkt=class{constructor(t,n,i,r){this.from=t,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function ix(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function ja(e,t,n=!0,i=!0){return _kt(e,t,n,i)}function Ikt(e){return e>=56320&&e<57344}function Pkt(e){return e>=55296&&e<56320}function al(e,t){let n=e.charCodeAt(t);if(!Pkt(n)||t+1==e.length)return n;let i=e.charCodeAt(t+1);return Ikt(i)?(n-55296<<10)+(i-56320)+65536:n}function LU(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function kd(e){return e<65536?1:2}const a$=/\r\n?|\n/;var Za=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(Za||(Za={}));class Qd{constructor(t){this.sections=t}get length(){let t=0;for(let n=0;nt)return s+(t-r);s+=l}else{if(i!=Za.Simple&&u>=t&&(i==Za.TrackDel&&rt||i==Za.TrackBefore&&rt))return null;if(u>t||u==t&&n<0&&!l)return t==r||n<0?s:s+c;s+=c}r=u}if(t>r)throw new RangeError(`Position ${t} is out of range for changeset of length ${r}`);return s}touchesRange(t,n=t){for(let i=0,r=0;i=0&&r<=n&&l>=t)return rn?"cover":!0;r=l}return!1}toString(){let t="";for(let n=0;n=0?":"+r:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Qd(t)}static create(t){return new Qd(t)}}class pa extends Qd{constructor(t,n){super(t),this.inserted=n}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return o$(this,(n,i,r,s,a)=>t=t.replace(r,r+(i-n),a),!1),t}mapDesc(t,n=!1){return l$(this,t,n,!0)}invert(t){let n=this.sections.slice(),i=[];for(let r=0,s=0;r=0){n[r]=l,n[r+1]=a;let c=r>>1;for(;i.length0&&Wp(i,n,s.text),s.forward(d),l+=d}let u=t[a++];for(;l>1].toJSON()))}return t}static of(t,n,i){let r=[],s=[],a=0,l=null;function c(d=!1){if(!d&&!r.length)return;ah||f<0||h>n)throw new RangeError(`Invalid change range ${f} to ${h} (in doc of length ${n})`);let g=p?typeof p=="string"?Zi.of(p.split(i||a$)):p:Zi.empty,b=g.length;if(f==h&&b==0)return;fa&&ho(r,f-a,-1),ho(r,h-f,b),Wp(s,r,g),a=h}}return u(t),c(!l),l}static empty(t){return new pa(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;rl&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length=0&&n<=0&&n==e[r+1]?e[r]+=t:r>=0&&t==0&&e[r]==0?e[r+1]+=n:i?(e[r]+=t,e[r+1]+=n):e.push(t,n)}function Wp(e,t,n){if(n.length==0)return;let i=t.length-2>>1;if(i>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)l=e.sections[a++],c=e.sections[a++];t(r,u,s,d,f),r=u,s=d}}}function l$(e,t,n,i=!1){let r=[],s=i?[]:null,a=new GS(e),l=new GS(t);for(let c=-1;;){if(a.done&&l.len||l.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&l.ins==-1){let u=Math.min(a.len,l.len);ho(r,u,-1),a.forward(u),l.forward(u)}else if(l.ins>=0&&(a.ins<0||c==a.i||a.off==0&&(l.len=0&&c=0){let u=0,d=a.len;for(;d;)if(l.ins==-1){let f=Math.min(d,l.len);u+=f,d-=f,l.forward(f)}else if(l.ins==0&&l.lenc||a.ins>=0&&a.len>c)&&(l||i.length>u),s.forward2(c),a.forward(c)}}}}class GS{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return n>=t.length?Zi.empty:t[n]}textBit(t){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!t?Zi.empty:n[i].slice(this.off,t==null?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){this.ins==-1?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class Mp{constructor(t,n,i,r){this.from=t,this.to=n,this.flags=i,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let t=this.flags&7;return t==7?null:t}map(t,n=-1){let i,r;return this.empty?i=r=t.mapPos(this.from,n):(i=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Mp(i,r,this.flags,this.goalColumn)}extend(t,n=t,i=0){if(t<=this.anchor&&n>=this.anchor)return Ze.range(t,n,void 0,void 0,i);let r=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return Ze.range(this.anchor,r,void 0,void 0,i)}eq(t,n=!1){return this.anchor==t.anchor&&this.head==t.head&&this.goalColumn==t.goalColumn&&(!n||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ze.range(t.anchor,t.head)}static create(t,n,i,r){return new Mp(t,n,i,r)}}class Ze{constructor(t,n){this.ranges=t,this.mainIndex=n}map(t,n=-1){return t.empty?this:Ze.create(this.ranges.map(i=>i.map(t,n)),this.mainIndex)}eq(t,n=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;it.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ze(t.ranges.map(n=>Mp.fromJSON(n)),t.main)}static single(t,n=t){return new Ze([Ze.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;rr.from-s.from),n=t.indexOf(i);for(let r=1;rs.head?Ze.range(c,l):Ze.range(l,c))}}return new Ze(t,n)}}function CTe(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let $U=0;class Vt{constructor(t,n,i,r,s){this.combine=t,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=$U++,this.default=t([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(t={}){return new Vt(t.combine||(n=>n),t.compareInput||((n,i)=>n===i),t.compare||(t.combine?(n,i)=>n===i:FU),!!t.static,t.enables)}of(t){return new SA([],this,0,t)}compute(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new SA(t,this,1,n)}computeN(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new SA(t,this,2,n)}from(t,n){return n||(n=i=>i),this.compute([t],i=>n(i.field(t)))}}function FU(e,t){return e==t||e.length==t.length&&e.every((n,i)=>n===t[i])}class SA{constructor(t,n,i,r){this.dependencies=t,this.facet=n,this.type=i,this.value=r,this.id=$U++}dynamicSlot(t){var n;let i=this.value,r=this.facet.compareInput,s=this.id,a=t[s]>>1,l=this.type==2,c=!1,u=!1,d=[];for(let f of this.dependencies)f=="doc"?c=!0:f=="selection"?u=!0:((n=t[f.id])!==null&&n!==void 0?n:1)&1||d.push(t[f.id]);return{create(f){return f.values[a]=i(f),1},update(f,h){if(c&&h.docChanged||u&&(h.docChanged||h.selection)||c$(f,d)){let p=i(f);if(l?!yZ(p,f.values[a],r):!r(p,f.values[a]))return f.values[a]=p,1}return 0},reconfigure:(f,h)=>{let p,g=h.config.address[s];if(g!=null){let b=kN(h,g);if(this.dependencies.every(v=>v instanceof Vt?h.facet(v)===f.facet(v):v instanceof io?h.field(v,!1)==f.field(v,!1):!0)||(l?yZ(p=i(f),b,r):r(p=i(f),b)))return f.values[a]=b,0}else p=i(f);return f.values[a]=p,1}}}get extension(){return this}}function yZ(e,t,n){if(e.length!=t.length)return!1;for(let i=0;ie[c.id]),r=n.map(c=>c.type),s=i.filter(c=>!(c&1)),a=e[t.id]>>1;function l(c){let u=[];for(let d=0;di===r),t);return t.provide&&(n.provides=t.provide(n)),n}create(t){let n=t.facet(zT).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(t)}slot(t){let n=t[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],a=this.updateF(s,r);return this.compareF(s,a)?0:(i.values[n]=a,1)},reconfigure:(i,r)=>{let s=i.facet(zT),a=r.facet(zT),l;return(l=s.find(c=>c.field==this))&&l!=a.find(c=>c.field==this)?(i.values[n]=l.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(t){return[this,zT.of({field:this,create:t})]}get extension(){return this}}const Ng={lowest:4,low:3,default:2,high:1,highest:0};function J1(e){return t=>new TTe(t,e)}const Xh={highest:J1(Ng.highest),high:J1(Ng.high),default:J1(Ng.default),low:J1(Ng.low),lowest:J1(Ng.lowest)};class TTe{constructor(t,n){this.inner=t,this.prec=n}get extension(){return this}}class fI{of(t){return new u$(this,t)}reconfigure(t){return fI.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class u${constructor(t,n){this.compartment=t,this.inner=n}get extension(){return this}}class SN{constructor(t,n,i,r,s,a){for(this.base=t,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,n,i){let r=[],s=Object.create(null),a=new Map;for(let h of Mkt(t,n,a))h instanceof io?r.push(h):(s[h.facet.id]||(s[h.facet.id]=[])).push(h);let l=Object.create(null),c=[],u=[];for(let h of r)l[h.id]=u.length<<1,u.push(p=>h.slot(p));let d=i==null?void 0:i.config.facets;for(let h in s){let p=s[h],g=p[0].facet,b=d&&d[h]||[];if(p.every(v=>v.type==0))if(l[g.id]=c.length<<1|1,FU(b,p))c.push(i.facet(g));else{let v=g.combine(p.map(y=>y.value));c.push(i&&g.compare(v,i.facet(g))?i.facet(g):v)}else{for(let v of p)v.type==0?(l[v.id]=c.length<<1|1,c.push(v.value)):(l[v.id]=u.length<<1,u.push(y=>v.dynamicSlot(y)));l[g.id]=u.length<<1,u.push(v=>Dkt(v,g,p))}}let f=u.map(h=>h(l));return new SN(t,a,f,l,c,s)}}function Mkt(e,t,n){let i=[[],[],[],[],[]],r=new Map;function s(a,l){let c=r.get(a);if(c!=null){if(c<=l)return;let u=i[c].indexOf(a);u>-1&&i[c].splice(u,1),a instanceof u$&&n.delete(a.compartment)}if(r.set(a,l),Array.isArray(a))for(let u of a)s(u,l);else if(a instanceof u$){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=t.get(a.compartment)||a.inner;n.set(a.compartment,u),s(u,l)}else if(a instanceof TTe)s(a.inner,a.prec);else if(a instanceof io)i[l].push(a),a.provides&&s(a.provides,l);else if(a instanceof SA)i[l].push(a),a.facet.extensions&&s(a.facet.extensions,Ng.default);else{let u=a.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${a}).`);if(u==a)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,l)}}return s(e,Ng.default),i.reduce((a,l)=>a.concat(l))}function $w(e,t){if(t&1)return 2;let n=t>>1,i=e.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;e.status[n]=4;let r=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|r}function kN(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}const ATe=Vt.define(),d$=Vt.define({combine:e=>e.some(t=>t),static:!0}),_Te=Vt.define({combine:e=>e.length?e[0]:void 0,static:!0}),NTe=Vt.define(),jTe=Vt.define(),RTe=Vt.define(),ITe=Vt.define({combine:e=>e.length?e[0]:!1});class rf{constructor(t,n){this.type=t,this.value=n}static define(){return new Lkt}}class Lkt{of(t){return new rf(this,t)}}class $kt{constructor(t){this.map=t}of(t){return new Fn(this,t)}}class Fn{constructor(t,n){this.type=t,this.value=n}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new Fn(this.type,n)}is(t){return this.type==t}static define(t={}){return new $kt(t.map||(n=>n))}static mapEffects(t,n){if(!t.length)return t;let i=[];for(let r of t){let s=r.map(n);s&&i.push(s)}return i}}Fn.reconfigure=Fn.define();Fn.appendConfig=Fn.define();class ia{constructor(t,n,i,r,s,a){this.startState=t,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=a,this._doc=null,this._state=null,i&&CTe(i,n.newLength),s.some(l=>l.type==ia.time)||(this.annotations=s.concat(ia.time.of(Date.now())))}static create(t,n,i,r,s,a){return new ia(t,n,i,r,s,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let n of this.annotations)if(n.type==t)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(ia.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]=="."))}}ia.time=rf.define();ia.userEvent=rf.define();ia.addToHistory=rf.define();ia.remote=rf.define();function Fkt(e,t){let n=[];for(let i=0,r=0;;){let s,a;if(i=e[i]))s=e[i++],a=e[i++];else if(r=0;r--){let s=i[r](e);s instanceof ia?e=s:Array.isArray(s)&&s.length==1&&s[0]instanceof ia?e=s[0]:e=DTe(t,lv(s),!1)}return e}function Ukt(e){let t=e.startState,n=t.facet(RTe),i=e;for(let r=n.length-1;r>=0;r--){let s=n[r](e);s&&Object.keys(s).length&&(i=PTe(i,f$(t,s,e.changes.newLength),!0))}return i==e?e:ia.create(t,e.changes,e.selection,i.effects,i.annotations,i.scrollIntoView)}const Qkt=[];function lv(e){return e==null?Qkt:Array.isArray(e)?e:[e]}var ls=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(ls||(ls={}));const zkt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let h$;try{h$=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Vkt(e){if(h$)return h$.test(e);for(let t=0;t"€"&&(n.toUpperCase()!=n.toLowerCase()||zkt.test(n)))return!0}return!1}function Hkt(e){return t=>{if(!/\S/.test(t))return ls.Space;if(Vkt(t))return ls.Word;for(let n=0;n-1)return ls.Word;return ls.Other}}class ji{constructor(t,n,i,r,s,a){this.config=t,this.doc=n,this.selection=i,this.values=r,this.status=t.statusTemplate.slice(),this.computeSlot=s,a&&(a._state=this);for(let l=0;lr.set(u,c)),n=null),r.set(l.value.compartment,l.value.extension)):l.is(Fn.reconfigure)?(n=null,i=l.value):l.is(Fn.appendConfig)&&(n=null,i=lv(i).concat(l.value));let s;n?s=t.startState.values.slice():(n=SN.resolve(i,r,this),s=new ji(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(c,u)=>u.reconfigure(c,this),null).values);let a=t.startState.facet(d$)?t.newSelection:t.newSelection.asSingle();new ji(n,t.newDoc,a,s,(l,c)=>c.update(l,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:t},range:Ze.cursor(n.from+t.length)}))}changeByRange(t){let n=this.selection,i=t(n.ranges[0]),r=this.changes(i.changes),s=[i.range],a=lv(i.effects);for(let l=1;la.spec.fromJSON(l,c)))}}return ji.create({doc:t.doc,selection:Ze.fromJSON(t.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(t={}){let n=SN.resolve(t.extensions||[],new Map),i=t.doc instanceof Zi?t.doc:Zi.of((t.doc||"").split(n.staticFacet(ji.lineSeparator)||a$)),r=t.selection?t.selection instanceof Ze?t.selection:Ze.single(t.selection.anchor,t.selection.head):Ze.single(0);return CTe(r,i.length),n.staticFacet(d$)||(r=r.asSingle()),new ji(n,i,r,n.dynamicSlots.map(()=>null),(s,a)=>a.create(s),null)}get tabSize(){return this.facet(ji.tabSize)}get lineBreak(){return this.facet(ji.lineSeparator)||` -`}get readOnly(){return this.facet(ITe)}phrase(t,...n){for(let i of this.facet(ji.phrases))if(Object.prototype.hasOwnProperty.call(i,t)){t=i[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),t}languageDataAt(t,n,i=-1){let r=[];for(let s of this.facet(ATe))for(let a of s(this,n,i))Object.prototype.hasOwnProperty.call(a,t)&&r.push(a[t]);return r}charCategorizer(t){let n=this.languageDataAt("wordChars",t);return Hkt(n.length?n[0]:"")}wordAt(t){let{text:n,from:i,length:r}=this.doc.lineAt(t),s=this.charCategorizer(t),a=t-i,l=t-i;for(;a>0;){let c=ja(n,a,!1);if(s(n.slice(c,a))!=ls.Word)break;a=c}for(;le.length?e[0]:4});ji.lineSeparator=_Te;ji.readOnly=ITe;ji.phrases=Vt.define({compare(e,t){let n=Object.keys(e),i=Object.keys(t);return n.length==i.length&&n.every(r=>e[r]==t[r])}});ji.languageData=ATe;ji.changeFilter=NTe;ji.transactionFilter=jTe;ji.transactionExtender=RTe;fI.reconfigure=Fn.define();function sf(e,t,n={}){let i={};for(let r of e)for(let s of Object.keys(r)){let a=r[s],l=i[s];if(l===void 0)i[s]=a;else if(!(l===a||a===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](l,a);else throw new Error("Config merge conflict for field "+s)}for(let r in t)i[r]===void 0&&(i[r]=t[r]);return i}class Nm{eq(t){return this==t}range(t,n=t){return XS.create(t,n,this)}}Nm.prototype.startSide=Nm.prototype.endSide=0;Nm.prototype.point=!1;Nm.prototype.mapMode=Za.TrackDel;function BU(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}class XS{constructor(t,n,i){this.from=t,this.to=n,this.value=i}static create(t,n,i){return new XS(t,n,i)}}function p$(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class UU{constructor(t,n,i,r){this.from=t,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(t,n,i,r=0){let s=i?this.to:this.from;for(let a=r,l=s.length;;){if(a==l)return a;let c=a+l>>1,u=s[c]-t||(i?this.value[c].endSide:this.value[c].startSide)-n;if(c==a)return u>=0?a:l;u>=0?l=c:a=c+1}}between(t,n,i,r){for(let s=this.findIndex(n,-1e9,!0),a=this.findIndex(i,1e9,!1,s);sp||h==p&&u.startSide>0&&u.endSide<=0)continue;(p-h||u.endSide-u.startSide)<0||(a<0&&(a=h),u.point&&(l=Math.max(l,p-h)),i.push(u),r.push(h-a),s.push(p-a))}return{mapped:i.length?new UU(r,s,i,l):null,pos:a}}}class Ei{constructor(t,n,i,r){this.chunkPos=t,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(t,n,i,r){return new Ei(t,n,i,r)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let n of this.chunk)t+=n.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=t,a=t.filter;if(n.length==0&&!a)return this;if(i&&(n=n.slice().sort(p$)),this.isEmpty)return n.length?Ei.of(n):this;let l=new MTe(this,null,-1).goto(0),c=0,u=[],d=new Dh;for(;l.value||c=0){let f=n[c++];d.addInner(f.from,f.to,f.value)||u.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||sl.to||s=s&&t<=s+a.length&&a.between(s,t-s,n-s,i)===!1)return}this.nextLayer.between(t,n,i)}}iter(t=0){return YS.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,n=0){return YS.from(t).goto(n)}static compare(t,n,i,r,s=-1){let a=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),c=vZ(a,l,i),u=new eO(a,c,s),d=new eO(l,c,s);i.iterGaps((f,h,p)=>xZ(u,f,d,h,p,r)),i.empty&&i.length==0&&xZ(u,0,d,0,0,r)}static eq(t,n,i=0,r){r==null&&(r=999999999);let s=t.filter(d=>!d.isEmpty&&n.indexOf(d)<0),a=n.filter(d=>!d.isEmpty&&t.indexOf(d)<0);if(s.length!=a.length)return!1;if(!s.length)return!0;let l=vZ(s,a),c=new eO(s,l,0).goto(i),u=new eO(a,l,0).goto(i);for(;;){if(c.to!=u.to||!m$(c.active,u.active)||c.point&&(!u.point||!BU(c.point,u.point)))return!1;if(c.to>r)return!0;c.next(),u.next()}}static spans(t,n,i,r,s=-1){let a=new eO(t,null,s).goto(n),l=n,c=a.openStart;for(;;){let u=Math.min(a.to,i);if(a.point){let d=a.activeForPoint(a.to),f=a.pointFroml&&(r.span(l,u,a.active,c),c=a.openEnd(u));if(a.to>i)return c+(a.point&&a.to>i?1:0);l=a.to,a.next()}}static of(t,n=!1){let i=new Dh;for(let r of t instanceof XS?[t]:n?qkt(t):t)i.add(r.from,r.to,r.value);return i.finish()}static join(t){if(!t.length)return Ei.empty;let n=t[t.length-1];for(let i=t.length-2;i>=0;i--)for(let r=t[i];r!=Ei.empty;r=r.nextLayer)n=new Ei(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}Ei.empty=new Ei([],[],null,-1);function qkt(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(p$);t=i}return e}Ei.empty.nextLayer=Ei.empty;class Dh{finishChunk(t){this.chunks.push(new UU(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,i){this.addInner(t,n,i)||(this.nextLayer||(this.nextLayer=new Dh)).add(t,n,i)}addInner(t,n,i){let r=t-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-t)),!0)}addChunk(t,n){if((t-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(t);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+t,this.lastTo=n.to[i]+t,!0}finish(){return this.finishInner(Ei.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return t;let n=Ei.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,n}}function vZ(e,t,n){let i=new Map;for(let s of e)for(let a=0;a=this.minPoint)break}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new MTe(a,n,i,s));return r.length==1?r[0]:new YS(r)}get startSide(){return this.value?this.value.startSide:0}goto(t,n=-1e9){for(let i of this.heap)i.goto(t,n);for(let i=this.heap.length>>1;i>=0;i--)ZM(this.heap,i);return this.next(),this}forward(t,n){for(let i of this.heap)i.forward(t,n);for(let i=this.heap.length>>1;i>=0;i--)ZM(this.heap,i);(this.to-t||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),ZM(this.heap,0)}}}function ZM(e,t){for(let n=e[t];;){let i=(t<<1)+1;if(i>=e.length)break;let r=e[i];if(i+1=0&&(r=e[i+1],i++),n.compare(r)<0)break;e[i]=n,e[t]=r,t=i}}class eO{constructor(t,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=YS.from(t,n,i)}goto(t,n=-1e9){return this.cursor.goto(t,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=n,this.openStart=-1,this.next(),this}forward(t,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(t,n)}removeActive(t){VT(this.active,t),VT(this.activeTo,t),VT(this.activeRank,t),this.minActive=OZ(this.active,this.activeTo)}addActive(t){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n0;)n++;HT(this.active,n,i),HT(this.activeTo,n,r),HT(this.activeRank,n,s),t&&HT(t,n,this.cursor.from),this.minActive=OZ(this.active,this.activeTo)}next(){let t=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>t){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&VT(i,r)}else if(this.cursor.value)if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(t){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)n++;return n}}function xZ(e,t,n,i,r,s){e.goto(t),n.goto(i);let a=i+r,l=i,c=i-t,u=!!s.boundChange;for(let d=!1;;){let f=e.to+c-n.to,h=f||e.endSide-n.endSide,p=h<0?e.to+c:n.to,g=Math.min(p,a);if(e.point||n.point?(e.point&&n.point&&BU(e.point,n.point)&&m$(e.activeForPoint(e.to),n.activeForPoint(n.to))||s.comparePoint(l,g,e.point,n.point),d=!1):(d&&s.boundChange(l),g>l&&!m$(e.active,n.active)&&s.compareRange(l,g,e.active,n.active),u&&ga)break;l=p,h<=0&&e.next(),h>=0&&n.next()}}function m$(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;i--)e[i+1]=e[i];e[t]=n}function OZ(e,t){let n=-1,i=1e9;for(let r=0;r=t)return r;if(r==e.length)break;s+=e.charCodeAt(r)==9?n-s%n:1,r=ja(e,r)}return i===!0?-1:e.length}const b$="ͼ",wZ=typeof Symbol>"u"?"__"+b$:Symbol.for(b$),y$=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),SZ=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class jm{constructor(t,n){this.rules=[];let{finish:i}=n||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function s(a,l,c,u){let d=[],f=/^@(\w+)\b/.exec(a[0]),h=f&&f[1]=="keyframes";if(f&&l==null)return c.push(a[0]+";");for(let p in l){let g=l[p];if(/&/.test(p))s(p.split(/,\s*/).map(b=>a.map(v=>b.replace(/&/,v))).reduce((b,v)=>b.concat(v)),g,c);else if(g&&typeof g=="object"){if(!f)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(r(p),g,d,h)}else g!=null&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+g+";")}(d.length||h)&&c.push((i&&!f&&!u?a.map(i):a).join(", ")+" {"+d.join(" ")+"}")}for(let a in t)s(r(a),t[a],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let t=SZ[wZ]||1;return SZ[wZ]=t+1,b$+t.toString(36)}static mount(t,n,i){let r=t[y$],s=i&&i.nonce;r?s&&r.setNonce(s):r=new Wkt(t,s),r.mount(Array.isArray(n)?n:[n],t)}}let kZ=new Map;class Wkt{constructor(t,n){let i=t.ownerDocument||t,r=i.defaultView;if(!t.head&&t.adoptedStyleSheets&&r.CSSStyleSheet){let s=kZ.get(i);if(s)return t[y$]=s;this.sheet=new r.CSSStyleSheet,kZ.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],t[y$]=this}mount(t,n){let i=this.sheet,r=0,s=0;for(let a=0;a-1&&(this.modules.splice(c,1),s--,c=-1),c==-1){if(this.modules.splice(s++,0,l),i)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Kkt=typeof navigator<"u"&&/Mac/.test(navigator.platform),Gkt=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ga=0;Ga<10;Ga++)Rm[48+Ga]=Rm[96+Ga]=String(Ga);for(var Ga=1;Ga<=24;Ga++)Rm[Ga+111]="F"+Ga;for(var Ga=65;Ga<=90;Ga++)Rm[Ga]=String.fromCharCode(Ga+32),ZS[Ga]=String.fromCharCode(Ga);for(var JM in Rm)ZS.hasOwnProperty(JM)||(ZS[JM]=Rm[JM]);function Xkt(e){var t=Kkt&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Gkt&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?ZS:Rm)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function yr(){var e=arguments[0];typeof e=="string"&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?e.setAttribute(i,r):r!=null&&(e[i]=r)}t++}for(;t2);var zt={mac:TZ||/Mac/.test(Ro.platform),windows:/Win/.test(Ro.platform),linux:/Linux|X11/.test(Ro.platform),ie:hI,ie_version:$Te?v$.documentMode||6:O$?+O$[1]:x$?+x$[1]:0,gecko:EZ,gecko_version:EZ?+(/Firefox\/(\d+)/.exec(Ro.userAgent)||[0,0])[1]:0,chrome:!!e5,chrome_version:e5?+e5[1]:0,ios:TZ,android:/Android\b/.test(Ro.userAgent),webkit:CZ,webkit_version:CZ?+(/\bAppleWebKit\/(\d+)/.exec(Ro.userAgent)||[0,0])[1]:0,safari:w$,safari_version:w$?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Ro.userAgent)||[0,0])[1]:0,tabSize:v$.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function QU(e,t){for(let n in e)n=="class"&&t.class?t.class+=" "+e.class:n=="style"&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}const EN=Object.create(null);function zU(e,t,n){if(e==t)return!0;e||(e=EN),t||(t=EN);let i=Object.keys(e),r=Object.keys(t);if(i.length-0!=r.length-0)return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||e[s]!==t[s]))return!1;return!0}function Ykt(e,t){for(let n=e.attributes.length-1;n>=0;n--){let i=e.attributes[n].name;t[i]==null&&e.removeAttribute(i)}for(let n in t){let i=t[n];n=="style"?e.style.cssText=i:e.getAttribute(n)!=i&&e.setAttribute(n,i)}}function AZ(e,t,n){let i=!1;if(t)for(let r in t)n&&r in n||(i=!0,r=="style"?e.style.cssText="":e.removeAttribute(r));if(n)for(let r in n)t&&t[r]==n[r]||(i=!0,r=="style"?e.style.cssText=n[r]:e.setAttribute(r,n[r]));return i}function Zkt(e){let t=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new _b(t,n,n,i,t.widget||null,!1)}static replace(t){let n=!!t.block,i,r;if(t.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:a}=FTe(t,n);i=(s?n?-3e8:-1:5e8)-1,r=(a?n?2e8:1:-6e8)+1}return new _b(t,i,r,n,t.widget||null,!0)}static line(t){return new IE(t)}static set(t,n=!1){return Ei.of(t,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}mn.none=Ei.empty;class RE extends mn{constructor(t){let{start:n,end:i}=FTe(t);super(n?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?QU(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||EN}eq(t){return this==t||t instanceof RE&&this.tagName==t.tagName&&zU(this.attrs,t.attrs)}range(t,n=t){if(t>=n)throw new RangeError("Mark decorations may not be empty");return super.range(t,n)}}RE.prototype.point=!1;class IE extends mn{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof IE&&this.spec.class==t.spec.class&&zU(this.spec.attributes,t.spec.attributes)}range(t,n=t){if(n!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,n)}}IE.prototype.mapMode=Za.TrackBefore;IE.prototype.point=!0;class _b extends mn{constructor(t,n,i,r,s,a){super(n,i,s,t),this.block=r,this.isReplace=a,this.mapMode=r?n<=0?Za.TrackBefore:Za.TrackAfter:Za.TrackDel}get type(){return this.startSide!=this.endSide?no.WidgetRange:this.startSide<=0?no.WidgetBefore:no.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof _b&&Jkt(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,n=t){if(this.isReplace&&(t>n||t==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,n)}}_b.prototype.point=!0;function FTe(e,t=!1){let{inclusiveStart:n,inclusiveEnd:i}=e;return n==null&&(n=e.inclusive),i==null&&(i=e.inclusive),{start:n??t,end:i??t}}function Jkt(e,t){return e==t||!!(e&&t&&e.compare(t))}function cv(e,t,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=e?n[r]=Math.max(n[r],t):n.push(e,t)}class JS extends Nm{constructor(t,n,i){super(),this.tagName=t,this.attributes=n,this.rank=i}eq(t){return t==this||t instanceof JS&&this.tagName==t.tagName&&zU(this.attributes,t.attributes)}static create(t){return new JS(t.tagName,t.attributes||EN,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(t,n=!1){return Ei.of(t,n)}}JS.prototype.startSide=JS.prototype.endSide=-1;function ek(e){let t;return e.nodeType==11?t=e.getSelection?e:e.ownerDocument:t=e,t.getSelection()}function S$(e,t){return t?e==t||e.contains(t.nodeType!=1?t.parentNode:t):!1}function Fw(e,t){if(!t.anchorNode)return!1;try{return S$(e,t.anchorNode)}catch{return!1}}function Bw(e){return e.nodeType==3?nk(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function Uw(e,t,n,i){return n?_Z(e,t,n,i,-1)||_Z(e,t,n,i,1):!1}function Im(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function CN(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function _Z(e,t,n,i,r){for(;;){if(e==n&&t==i)return!0;if(t==(r<0?0:Mh(e))){if(e.nodeName=="DIV")return!1;let s=e.parentNode;if(!s||s.nodeType!=1)return!1;t=Im(e)+(r<0?0:1),e=s}else if(e.nodeType==1){if(e=e.childNodes[t+(r<0?-1:0)],e.nodeType==1&&e.contentEditable=="false")return!1;t=r<0?Mh(e):0}else return!1}}function Mh(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function tk(e,t){let{left:n,right:i}=e;if(n==i)return e;let r=t?n:i;return{left:r,right:r,top:e.top,bottom:e.bottom}}function eEt(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function BTe(e,t){let n=t.width/e.offsetWidth,i=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(t.height-e.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function tEt(e,t,n,i,r,s,a,l){let c=e.ownerDocument,u=c.defaultView||window;for(let d=e,f=!1;d&&!f;)if(d.nodeType==1){let h,p=d==c.body,g=1,b=1;if(p)h=eEt(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(d).position)&&(f=!0),d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth){d=d.assignedSlot||d.parentNode;continue}let x=d.getBoundingClientRect();({scaleX:g,scaleY:b}=BTe(d,x)),h={left:x.left,right:x.left+d.clientWidth*g,top:x.top,bottom:x.top+d.clientHeight*b}}let v=0,y=0;if(r=="nearest")t.top0&&t.bottom>h.bottom+y&&(y=t.bottom-h.bottom+a)):t.bottom>h.bottom-a&&(y=t.bottom-h.bottom+a,n<0&&t.top-y0&&t.right>h.right+v&&(v=t.right-h.right+s)):t.right>h.right-s&&(v=t.right-h.right+s,n<0&&t.lefth.bottom||t.lefth.right)&&(t={left:Math.max(t.left,h.left),right:Math.min(t.right,h.right),top:Math.max(t.top,h.top),bottom:Math.min(t.bottom,h.bottom)}),d=d.assignedSlot||d.parentNode}else if(d.nodeType==11)d=d.host;else break}function UTe(e,t=!0){let n=e.ownerDocument,i=null,r=null;for(let s=e.parentNode;s&&!(s==n.body||(!t||i)&&r);)if(s.nodeType==1)!r&&s.scrollHeight>s.clientHeight&&(r=s),t&&!i&&s.scrollWidth>s.clientWidth&&(i=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:i,y:r}}class nEt{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:n,focusNode:i}=t;this.set(n,Math.min(t.anchorOffset,n?Mh(n):0),i,Math.min(t.focusOffset,i?Mh(i):0))}set(t,n,i,r){this.anchorNode=t,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let Cg=null;zt.safari&&zt.safari_version>=26&&(Cg=!1);function QTe(e){if(e.setActive)return e.setActive();if(Cg)return e.focus(Cg);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(Cg==null?{get preventScroll(){return Cg={preventScroll:!0},!0}}:void 0),!Cg){Cg=!1;for(let n=0;nMath.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function VTe(e,t){for(let n=e,i=t;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=Mh(n)}else if(n.parentNode&&!CN(n))i=Im(n),n=n.parentNode;else return null}}function HTe(e,t){for(let n=e,i=t;;){if(n.nodeType==3&&i=n){if(l.level==i)return a;(s<0||(r!=0?r<0?l.fromn:t[s].level>l.level))&&(s=a)}}if(s<0)throw new RangeError("Index out of range");return s}}function KTe(e,t){if(e.length!=t.length)return!1;for(let n=0;n=0;b-=3)if(fd[b+1]==-p){let v=fd[b+2],y=v&2?r:v&4?v&1?s:r:0;y&&(Cr[f]=Cr[fd[b]]=y),l=b;break}}else{if(fd.length==189)break;fd[l++]=f,fd[l++]=h,fd[l++]=c}else if((g=Cr[f])==2||g==1){let b=g==r;c=b?0:1;for(let v=l-3;v>=0;v-=3){let y=fd[v+2];if(y&2)break;if(b)fd[v+2]|=2;else{if(y&4)break;fd[v+2]|=4}}}}}function uEt(e,t,n,i){for(let r=0,s=i;r<=n.length;r++){let a=r?n[r-1].to:e,l=rc;)g==v&&(g=n[--b].from,v=b?n[b-1].to:e),Cr[--g]=p;c=d}else s=u,c++}}}function E$(e,t,n,i,r,s,a){let l=i%2?2:1;if(i%2==r%2)for(let c=t,u=0;cc&&a.push(new Id(c,b.from,p));let v=b.direction==Nb!=!(p%2);C$(e,v?i+1:i,r,b.inner,b.from,b.to,a),c=b.to}g=b.to}else{if(g==n||(d?Cr[g]!=l:Cr[g]==l))break;g++}h?E$(e,c,g,i+1,r,h,a):ct;){let d=!0,f=!1;if(!u||c>s[u-1].to){let b=Cr[c-1];b!=l&&(d=!1,f=b==16)}let h=!d&&l==1?[]:null,p=d?i:i+1,g=c;e:for(;;)if(u&&g==s[u-1].to){if(f)break e;let b=s[--u];if(!d)for(let v=b.from,y=u;;){if(v==t)break e;if(y&&s[y-1].to==v)v=s[--y].from;else{if(Cr[v-1]==l)break e;break}}if(h)h.push(b);else{b.toCr.length;)Cr[Cr.length]=256;let i=[],r=t==Nb?0:1;return C$(e,r,r,n,0,e.length,i),i}function GTe(e){return[new Id(0,e,0)]}let XTe="";function fEt(e,t,n,i,r){var s;let a=i.head-e.from,l=Id.find(t,a,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),c=t[l],u=c.side(r,n);if(a==u){let h=l+=r?1:-1;if(h<0||h>=t.length)return null;c=t[l=h],a=c.side(!r,n),u=c.side(r,n)}let d=ja(e.text,a,c.forward(r,n));(dc.to)&&(d=u),XTe=e.text.slice(Math.min(a,d),Math.max(a,d));let f=l==(r?t.length-1:0)?null:t[l+(r?1:-1)];return f&&d==u&&f.level+(r?0:1)e.some(t=>t)}),r2e=Vt.define({combine:e=>e.some(t=>t)}),s2e=Vt.define();class dv{constructor(t,n,i,r,s,a=!1){this.range=t,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=a}map(t){return t.empty?this:new dv(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new dv(Ze.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const qT=Fn.define({map:(e,t)=>e.map(t)}),a2e=Fn.define();function fl(e,t,n){let i=e.facet(e2e);i.length?i[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}const Gf=Vt.define({combine:e=>e.length?e[0]:!0});let pEt=0;const Dy=Vt.define({combine(e){return e.filter((t,n)=>{for(let i=0;i{let c=[];return a&&c.push(pI.of(u=>{let d=u.plugin(l);return d?a(d):mn.none})),s&&c.push(s(l)),c})}static fromClass(t,n){return Ns.define((i,r)=>new t(i,r),n)}}class t5{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(t){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(fl(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(t,this.spec.arg)}catch(n){fl(t.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){fl(t.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const o2e=Vt.define(),WU=Vt.define(),pI=Vt.define(),l2e=Vt.define(),KU=Vt.define(),PE=Vt.define(),c2e=Vt.define();function jZ(e,t){let n=e.state.facet(c2e);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(e):s),r=[];return Ei.spans(i,t.from,t.to,{point(){},span(s,a,l,c){let u=s-t.from,d=a-t.from,f=r;for(let h=l.length-1;h>=0;h--,c--){let p=l[h].spec.bidiIsolate,g;if(p==null&&(p=hEt(t.text,u,d)),c>0&&f.length&&(g=f[f.length-1]).to==u&&g.direction==p)g.to=d,f=g.inner;else{let b={from:u,to:d,direction:p,inner:[]};f.push(b),f=b.inner}}}}),r}const u2e=Vt.define();function GU(e){let t=0,n=0,i=0,r=0;for(let s of e.state.facet(u2e)){let a=s(e);a&&(a.left!=null&&(t=Math.max(t,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(i=Math.max(i,a.top)),a.bottom!=null&&(r=Math.max(r,a.bottom)))}return{left:t,right:n,top:i,bottom:r}}const zO=Vt.define();class Kc{constructor(t,n,i,r){this.fromA=t,this.toA=n,this.fromB=i,this.toB=r}join(t){return new Kc(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let n=t.length,i=this;for(;n>0;n--){let r=t[n-1];if(!(r.fromA>i.toA)){if(r.toAr.push(new Kc(s,a,l,c))),this.changedRanges=r}static create(t,n,i){return new TN(t,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const mEt=[];class _s{constructor(t,n,i=0){this.dom=t,this.length=n,this.flags=i,this.parent=null,t.cmTile=this}get breakAfter(){return this.flags&1}get children(){return mEt}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(t){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&Ykt(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(t){this.dom=t,t.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t,n=this.posAtStart){let i=n;for(let r of this.children){if(r==t)return i;i+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}covers(t){return!0}coordsIn(t,n,i){return null}domPosFor(t,n){let i=Im(this.dom),r=this.length?t>0:n>0;return new ju(this.parent.dom,i+(r?1:0),t==0||t==this.length)}markDirty(t){this.flags&=-3,t&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let t=this;t;t=t.parent)if(t instanceof gI)return t;return null}static get(t){return t.cmTile}}class mI extends _s{constructor(t){super(t,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(t){this.children.push(t),t.parent=this}sync(t){if(this.flags&2)return;super.sync(t);let n=this.dom,i=null,r,s=(t==null?void 0:t.node)==n?t:null,a=0;for(let l of this.children){if(l.sync(t),a+=l.length+l.breakAfter,r=i?i.nextSibling:n.firstChild,s&&r!=l.dom&&(s.written=!0),l.dom.parentNode==n)for(;r&&r!=l.dom;)r=RZ(r);else n.insertBefore(l.dom,r);i=l.dom}for(r=i?i.nextSibling:n.firstChild,s&&r&&(s.written=!0);r;)r=RZ(r);this.length=a}}function RZ(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class gI extends mI{constructor(t,n){super(n),this.view=t}owns(t){for(;t;t=t.parent)if(t==this)return!0;return!1}isBlock(){return!0}nearest(t){for(;;){if(!t)return null;let n=_s.get(t);if(n&&this.owns(n))return n;t=t.parentNode}}blockTiles(t){for(let n=[],i=this,r=0,s=0;;)if(r==i.children.length){if(!n.length)return;i=i.parent,i.breakAfter&&s++,r=n.pop()}else{let a=i.children[r++];if(a instanceof yh)n.push(r),i=a,r=0;else{let l=s+a.length,c=t(a,s);if(c!==void 0)return c;s=l+a.breakAfter}}}resolveBlock(t,n){let i,r=-1,s,a=-1;if(this.blockTiles((l,c)=>{let u=c+l.length;if(t>=c&&t<=u){if(l.isWidget()&&n>=-1&&n<=1){if(l.flags&32)return!0;l.flags&16&&(i=void 0)}(ct||t==c&&(n>1?l.length:l.covers(-1)))&&(!s||!l.isWidget()&&s.isWidget())&&(s=l,a=t-c)}}),!i&&!s)throw new Error("No tile at position "+t);return i&&n<0||!s?{tile:i,offset:r}:{tile:s,offset:a}}}class yh extends mI{constructor(t,n){super(t),this.wrapper=n}isBlock(){return!0}covers(t){return this.children.length?t<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let i=new yh(n||document.createElement(t.tagName),t);return n||(i.flags|=4),i}}class rx extends mI{constructor(t,n){super(t),this.attrs=n}isLine(){return!0}static start(t,n,i){let r=new rx(n||document.createElement("div"),t);return(!n||!i)&&(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(t,n,i){let r=null,s=-1,a=null,l=-1;function c(d,f){for(let h=0,p=0;h=f&&(g.isComposite()?c(g,f-p):(!a||a.isHidden&&(n>0&&!(a.flags&32)||i&&bEt(a,g)))&&(b>f||g.flags&32)?(a=g,l=f-p):(pr&&(t=r);let s=t,a=t,l=0;t==0&&n<0||t==r&&n>=0?zt.chrome||zt.gecko||(t?(s--,l=1):a=0)?0:c.length-1];return zt.safari&&!l&&u.width==0&&(u=Array.prototype.find.call(c,d=>d.width)||u),i==null?u:tk(u,(l?l>0:n<0)==i)}static of(t,n){let i=new Qg(n||document.createTextNode(t),t);return n||(i.flags|=2),i}}class jb extends _s{constructor(t,n,i,r){super(t,n,r),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(t){return this.flags&48?!1:(this.flags&(t<0?64:128))>0}coordsIn(t,n){return this.coordsInWidget(t,n,!1)}coordsInWidget(t,n,i){let r=this.widget.coordsAt(this.dom,t,n);if(r)return r;if(i)return tk(this.dom.getBoundingClientRect(),this.length?t==0:n<=0);{let s=this.dom.getClientRects(),a=null;if(!s.length)return null;let l=this.flags&16?!0:this.flags&32?!1:t>0;for(let c=l?s.length-1:0;a=s[c],!(t>0?c==0:c==s.length-1||a.top0==i)}}class yEt{constructor(t){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=t}advance(t,n,i){let{tile:r,index:s,beforeBreak:a,parents:l}=this;for(;t||n>0;)if(r.isComposite())if(a){if(!t)break;i&&i.break(),t--,a=!1}else if(s==r.children.length){if(!t&&!l.length)break;i&&i.leave(r),a=!!r.breakAfter,{tile:r,index:s}=l.pop(),s++}else{let c=r.children[s],u=c.breakAfter;(n>0?c.length<=t:c.length=0;l--){let c=n.marks[l],u=r.lastChild;if(u instanceof cl&&u.mark.eq(c.mark))u.dom!=c.dom&&u.setDOM(n5(c.dom)),r=u;else{if(this.cache.reused.get(c)){let f=_s.get(c.dom);f&&f.setDOM(n5(c.dom))}let d=cl.of(c.mark,c.dom);r.append(d),r=d}this.cache.reused.set(c,2)}let s=_s.get(t.text);s&&this.cache.reused.set(s,2);let a=new Qg(t.text,t.text.nodeValue);a.flags|=8,this.pos=t.range.toB,r.append(a)}addInlineWidget(t,n,i){let r=this.afterWidget&&t.flags&48&&(this.afterWidget.flags&48)==(t.flags&48);r||this.flushBuffer();let s=this.ensureMarks(n,i);!r&&!(t.flags&16)&&s.append(this.getBuffer(1)),s.append(t),this.pos+=t.length,this.afterWidget=t}addMark(t,n,i){this.flushBuffer(),this.ensureMarks(n,i).append(t),this.pos+=t.length,this.afterWidget=null}addBlockWidget(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}continueWidget(t){let n=this.afterWidget||this.lastBlock;n.length+=t,this.pos+=t}addLineStart(t,n){var i;t||(t=d2e);let r=rx.start(t,n||((i=this.cache.find(rx))===null||i===void 0?void 0:i.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(t){this.blockPosCovered()||this.addLineStart(t)}ensureLine(t){this.curLine||this.addLineStart(t)}ensureMarks(t,n){var i;let r=this.curLine;for(let s=t.length-1;s>=0;s--){let a=t[s],l;if(n>0&&(l=r.lastChild)&&l instanceof cl&&l.mark.eq(a))r=l,n--;else{let c=cl.of(a,(i=this.cache.find(cl,u=>u.mark.eq(a)))===null||i===void 0?void 0:i.dom);r.append(c),r=c,n=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let t=this.curLine.lastChild;(!t||!IZ(this.curLine,!1)||t.dom.nodeName!="BR"&&t.isWidget()&&!(zt.ios&&IZ(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(i5,0,32)||new jb(i5.toDOM(),0,i5,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let t=this.wrappers.length-1;t>=0;t--)this.wrappers[t].to=this.pos){let n=t.rank*102+t.value.rank,i=new vEt(t.from,t.to,t.value,n),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-i.rank||this.wrappers[r-1].to-i.to)<0;)r--;this.wrappers.splice(r,0,i)}this.wrapperPos=this.pos}getBlockPos(){var t;this.updateBlockWrappers();let n=this.root;for(let i of this.wrappers){let r=n.lastChild;if(i.froma.wrapper.eq(i.wrapper)))===null||t===void 0?void 0:t.dom);n.append(s),n=s}}return n}blockPosCovered(){let t=this.lastBlock;return t!=null&&!t.breakAfter&&(!t.isWidget()||(t.flags&160)>0)}getBuffer(t){let n=2|(t<0?16:32),i=this.cache.find(AN,void 0,1);return i&&(i.flags=n),i||new AN(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class OEt{constructor(t){this.skipCount=0,this.text="",this.textOff=0,this.cursor=t.iter()}skip(t){this.textOff+t<=this.text.length?this.textOff+=t:(this.skipCount+=t-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(t){if(this.textOff==this.text.length){let{value:r,lineBreak:s,done:a}=this.cursor.next(this.skipCount);if(this.skipCount=0,a)throw new Error("Ran out of text content when drawing inline views");this.text=r;let l=this.textOff=Math.min(t,r.length);return s?null:r.slice(0,l)}let n=Math.min(this.text.length,this.textOff+t),i=this.text.slice(this.textOff,n);return this.textOff=n,i}}const _N=[jb,rx,Qg,cl,AN,yh,gI];for(let e=0;e<_N.length;e++)_N[e].bucket=e;class wEt{constructor(t){this.view=t,this.buckets=_N.map(()=>[]),this.index=_N.map(()=>0),this.reused=new Map}add(t){let n=t.constructor.bucket,i=this.buckets[n];i.length<6?i.push(t):i[this.index[n]=(this.index[n]+1)%6]=t}find(t,n,i=2){let r=t.bucket,s=this.buckets[r],a=this.index[r];for(let l=0;l{if(this.cache.add(a),a.isComposite())return!1},enter:a=>this.cache.add(a),leave:()=>{},break:()=>{}}}run(t,n){let i=n&&this.getCompositionContext(n.text);for(let r=0,s=0,a=0;;){let l=ar){let u=c-r;this.preserve(u,!a,!l),r=c,s+=u}if(!l)break;n&&l.fromA<=n.range.fromA&&l.toA>=n.range.toA?(this.forward(l.fromA,n.range.fromA,n.range.fromA{if(a.isWidget())if(this.openWidget)this.builder.continueWidget(c-l);else{let u=c>0||l{a.isLine()?this.builder.addLineStart(a.attrs,this.cache.maybeReuse(a)):(this.cache.add(a),a instanceof cl&&r.unshift(a.mark)),this.openWidget=!1},leave:a=>{a.isLine()?r.length&&(r.length=s=0):a instanceof cl&&(r.shift(),s=Math.min(s,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(t)}emit(t,n){let i=null,r=this.builder,s=-1,a=Ei.spans(this.decorations,t,n,{point:(l,c,u,d,f,h)=>{if(u instanceof _b){if(this.disallowBlockEffectsFor[h]){if(u.block)throw new RangeError("Block decorations may not be specified via plugins");if(c>this.view.state.doc.lineAt(l).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=d.length,f>d.length)r.continueWidget(c-l);else{let p=u.widget||(u.block?sx.block:sx.inline),g=kEt(u),b=this.cache.findWidget(p,c-l,g)||jb.of(p,this.view,c-l,g);u.block?(u.startSide>0&&r.addLineStartIfNotCovered(i),r.addBlockWidget(b)):(r.ensureLine(i),r.addInlineWidget(b,d,f))}i=null}else i=EEt(i,u);c>l&&this.text.skip(c-l)},span:(l,c,u,d)=>{for(let f=l;f-1&&(this.openWidget=a>s),this.openWidget||r.addLineStartIfNotCovered(i),this.openMarks=a}forward(t,n,i=1){n-t<=10?this.old.advance(n-t,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-t-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(t){let n=[],i=null;for(let r=t.parentNode;;r=r.parentNode){let s=_s.get(r);if(r==this.view.contentDOM)break;s instanceof cl?n.push(s):s!=null&&s.isLine()?i=s:s instanceof yh||(r.nodeName=="DIV"&&!i&&r!=this.view.contentDOM?i=new rx(r,d2e):i||n.push(cl.of(new RE({tagName:r.nodeName.toLowerCase(),attributes:Zkt(r)}),r)))}return{line:i,marks:n}}}function IZ(e,t){let n=i=>{for(let r of i.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function kEt(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}const d2e={class:"cm-line"};function EEt(e,t){let n=t.spec.attributes,i=t.spec.class;return!n&&!i||(e||(e={class:"cm-line"}),n&&QU(n,e),i&&(e.class+=" "+i)),e}function CEt(e){let t=[];for(let n=e.parents.length;n>1;n--){let i=n==e.parents.length?e.tile:e.parents[n].tile;i instanceof cl&&t.push(i.mark)}return t}function n5(e){let t=_s.get(e);return t&&t.setDOM(e.cloneNode()),e}class sx extends Zu{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}sx.inline=new sx("span");sx.block=new sx("div");const i5=new class extends Zu{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class PZ{constructor(t){this.view=t,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=mn.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new gI(t,t.contentDOM),this.updateInner([new Kc(0,0,0,t.state.doc.length)],null)}update(t){var n;let i=t.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:d,toA:f})=>fthis.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!DEt(t.changes,this.hasComposition)&&!t.selectionSet&&(r=t.state.selection.main.head));let s=r>-1?AEt(this.view,t.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:d,to:f}=this.hasComposition;i=new Kc(d,f,t.changes.mapPos(d,-1),t.changes.mapPos(f,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(zt.ie||zt.chrome)&&!s&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,l=this.blockWrappers;this.updateDeco();let c=jEt(a,this.decorations,t.changes);c.length&&(i=Kc.extendWithRanges(i,c));let u=IEt(l,this.blockWrappers,t.changes);return u.length&&(i=Kc.extendWithRanges(i,u)),s&&!i.some(d=>d.fromA<=s.range.fromA&&d.toA>=s.range.toA)&&(i=s.range.addToSet(i.slice())),this.tile.flags&2&&i.length==0?!1:(this.updateInner(i,s),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,n){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(n||t.length){let a=this.tile,l=new SEt(this.view,a,this.blockWrappers,this.decorations,this.dynamicDecorationMap);n&&_s.get(n.text)&&l.cache.reused.set(_s.get(n.text),2),this.tile=l.run(t,n),A$(a,l.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=zt.chrome||zt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||i.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to-1)&&Fw(i,this.view.observer.selectionRange)&&!(r&&i.contains(r));if(!(s||n||a))return;let l=this.forceSelection;this.forceSelection=!1;let c=this.view.state.selection.main,u,d;if(c.empty?d=u=this.inlineDOMNearPos(c.anchor,c.assoc||1):(d=this.inlineDOMNearPos(c.head,c.head==c.from?1:-1),u=this.inlineDOMNearPos(c.anchor,c.anchor==c.from?1:-1)),zt.gecko&&c.empty&&!this.hasComposition&&TEt(u)){let h=document.createTextNode("");this.view.observer.ignore(()=>u.node.insertBefore(h,u.node.childNodes[u.offset]||null)),u=d=new ju(h,0),l=!0}let f=this.view.observer.selectionRange;(l||!f.focusNode||(!Uw(u.node,u.offset,f.anchorNode,f.anchorOffset)||!Uw(d.node,d.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,c))&&(this.view.observer.ignore(()=>{zt.android&&zt.chrome&&i.contains(f.focusNode)&&PEt(f.focusNode,i)&&(i.blur(),i.focus({preventScroll:!0}));let h=ek(this.view.root);if(h)if(c.empty){if(zt.gecko){let p=_Et(u.node,u.offset);if(p&&p!=3){let g=(p==1?VTe:HTe)(u.node,u.offset);g&&(u=new ju(g.node,g.offset))}}h.collapse(u.node,u.offset),c.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=c.bidiLevel)}else if(h.extend){h.collapse(u.node,u.offset);try{h.extend(d.node,d.offset)}catch{}}else{let p=document.createRange();c.anchor>c.head&&([u,d]=[d,u]),p.setEnd(d.node,d.offset),p.setStart(u.node,u.offset),h.removeAllRanges(),h.addRange(p)}a&&this.view.root.activeElement==i&&(i.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(u,d)),this.impreciseAnchor=u.precise?null:new ju(f.anchorNode,f.anchorOffset),this.impreciseHead=d.precise?null:new ju(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(t,n){return this.hasComposition&&n.empty&&Uw(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,n=t.state.selection.main,i=ek(t.root),{anchorNode:r,anchorOffset:s}=t.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let a=this.lineAt(n.head,n.assoc);if(!a)return;let l=a.posAtStart;if(n.head==l||n.head==l+a.length)return;let c=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!c||!u||c.bottom>u.top)return;let d=this.domAtPos(n.head+n.assoc,n.assoc);i.collapse(d.node,d.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let f=t.observer.selectionRange;t.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&i.collapse(r,s)}posFromDOM(t,n){let i=this.tile.nearest(t);if(!i)return this.tile.dom.compareDocumentPosition(t)&2?0:this.view.state.doc.length;let r=i.posAtStart;if(i.isComposite()){let s;if(t==i.dom)s=i.dom.childNodes[n];else{let a=Mh(t)==0?0:n==0?-1:1;for(;;){let l=t.parentNode;if(l==i.dom)break;a==0&&l.firstChild!=l.lastChild&&(t==l.firstChild?a=-1:a=1),t=l}a<0?s=t:s=t.nextSibling}if(s==i.dom.firstChild)return r;for(;s&&!_s.get(s);)s=s.nextSibling;if(!s)return r+i.length;for(let a=0,l=r;;a++){let c=i.children[a];if(c.dom==s)return l;l+=c.length+c.breakAfter}}else return i.isText()?t==i.dom?r+n:r+(n?i.length:0):r}domAtPos(t,n){let{tile:i,offset:r}=this.tile.resolveBlock(t,n);return i.isWidget()?i.domPosFor(r,n):i.domIn(r,n)}inlineDOMNearPos(t,n){let i,r=-1,s=!1,a,l=-1,c=!1;return this.tile.blockTiles((u,d)=>{if(u.isWidget()){if(u.flags&32&&d>=t)return!0;u.flags&16&&(s=!0)}else{let f=d+u.length;if(d<=t&&(i=u,r=t-d,s=f=t&&!a&&(a=u,l=t-d,c=d>t),d>t&&a)return!0}}),!i&&!a?this.domAtPos(t,n):(s&&a?i=null:c&&i&&(a=null),i&&n<0||!a?i.domIn(r,n):a.domIn(l,n))}coordsAt(t,n,i){let{tile:r,offset:s}=this.tile.resolveBlock(t,n);return r.isWidget()?r.widget instanceof r5?null:r.coordsInWidget(s,n,!0):r.coordsIn(s,n,i)}lineAt(t,n){let{tile:i}=this.tile.resolveBlock(t,n);return i.isLine()?i:null}coordsForChar(t){let{tile:n,offset:i}=this.tile.resolveBlock(t,1);if(!n.isLine())return null;function r(s,a){if(s.isComposite())for(let l of s.children){if(l.length>=a){let c=r(l,a);if(c)return c}if(a-=l.length,a<0)break}else if(s.isText()&&aMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,c=this.view.textDirection==Tr.LTR,u=0,d=(f,h,p)=>{for(let g=0;gr);g++){let b=f.children[g],v=h+b.length,y=b.dom.getBoundingClientRect(),{height:x}=y;if(p&&!g&&(u+=y.top-p.top),b instanceof yh)v>i&&d(b,h,y);else if(h>=i&&(u>0&&n.push(-u),n.push(x+u),u=0,a)){let w=b.dom.lastChild,O=w?Bw(w):[];if(O.length){let k=O[O.length-1],S=c?k.right-y.left:y.right-k.left;S>l&&(l=S,this.minWidth=s,this.minWidthFrom=h,this.minWidthTo=v)}}p&&g==f.children.length-1&&(u+=p.bottom-y.bottom),h=v+b.breakAfter}};return d(this.tile,0,null),n}textDirectionAt(t){let{tile:n}=this.tile.resolveBlock(t,1);return getComputedStyle(n.dom).direction=="rtl"?Tr.RTL:Tr.LTR}measureTextSize(){let t=this.tile.blockTiles(a=>{if(a.isLine()&&a.children.length&&a.length<=20){let l=0,c;for(let u of a.children){if(!u.isText()||/[^ -~]/.test(u.text))return;let d=Bw(u.dom);if(d.length!=1)return;l+=d[0].width,c=d[0].height}if(l)return{lineHeight:a.dom.getBoundingClientRect().height,charWidth:l/a.length,textHeight:c}}});if(t)return t;let n=document.createElement("div"),i,r,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let a=Bw(n.firstChild)[0];i=n.getBoundingClientRect().height,r=a&&a.width?a.width/27:7,s=a&&a.height?a.height:i,n.remove()}),{lineHeight:i,charWidth:r,textHeight:s}}computeBlockGapDeco(){let t=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],a=s?s.from-1:this.view.state.doc.length;if(a>i){let l=(n.lineBlockAt(a).bottom-n.lineBlockAt(i).top)/this.view.scaleY;t.push(mn.replace({widget:new r5(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,a))}if(!s)break;i=s.to+1}return mn.set(t)}updateDeco(){let t=1,n=this.view.state.facet(pI).map(s=>(this.dynamicDecorationMap[t++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(KU).map((s,a)=>{let l=typeof s=="function";return l&&(i=!0),l?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[t++]=i,n.push(Ei.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];ttypeof s=="function"?s(this.view):s)}scrollIntoView(t){if(t.isSnapshot){let u=this.view.viewState.lineBlockAt(t.range.head);this.view.scrollDOM.scrollTop=u.top-t.yMargin,this.view.scrollDOM.scrollLeft=t.xMargin;return}for(let u of this.view.state.facet(s2e))try{if(u(this.view,t.range,t))return!0}catch(d){fl(this.view.state,d,"scroll handler")}let{range:n}=t,i=this.coordsAt(n.head,n.assoc||(n.head>n.anchor?-1:1)),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=GU(this.view),a={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:l,offsetHeight:c}=this.view.scrollDOM;if(tEt(this.view.scrollDOM,a,n.head1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottomi.isWidget()||i.children.some(n);return n(this.tile.resolveBlock(t,1).tile)}destroy(){A$(this.tile)}}function A$(e,t){let n=t==null?void 0:t.get(e);if(n!=1){n==null&&e.destroy();for(let i of e.children)A$(i,t)}}function TEt(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable=="false")&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable=="false")}function f2e(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let i=VTe(n.focusNode,n.focusOffset),r=HTe(n.focusNode,n.focusOffset),s=i||r;if(r&&i&&r.node!=i.node){let l=_s.get(r.node);if(!l||l.isText()&&l.text!=r.node.nodeValue)s=r;else if(e.docView.lastCompositionAfterCursor){let c=_s.get(i.node);!c||c.isText()&&c.text!=i.node.nodeValue||(s=r)}}if(e.docView.lastCompositionAfterCursor=s!=i,!s)return null;let a=t-s.offset;return{from:a,to:a+s.node.nodeValue.length,node:s.node}}function AEt(e,t,n){let i=f2e(e,n);if(!i)return null;let{node:r,from:s,to:a}=i,l=r.nodeValue;if(/[\n\r]/.test(l)||e.state.doc.sliceString(i.from,i.to)!=l)return null;let c=t.invertedDesc;return{range:new Kc(c.mapPos(s),c.mapPos(a),s,a),text:r}}function _Et(e,t){return e.nodeType!=1?0:(t&&e.childNodes[t-1].contentEditable=="false"?1:0)|(t{it.from&&(n=!0)}),n}class r5 extends Zu{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function MEt(e,t,n=1){let i=e.charCategorizer(t),r=e.doc.lineAt(t),s=t-r.from;if(r.length==0)return Ze.cursor(t);s==0?n=1:s==r.length&&(n=-1);let a=s,l=s;n<0?a=ja(r.text,s,!1):l=ja(r.text,s);let c=i(r.text.slice(a,l));for(;a>0;){let u=ja(r.text,a,!1);if(i(r.text.slice(u,a))!=c)break;a=u}for(;le.defaultLineHeight*1.5){let l=e.viewState.heightOracle.textHeight,c=Math.floor((r-n.top-(e.defaultLineHeight-l)*.5)/l);s+=c*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+g$(a,s,e.state.tabSize)}function _$(e,t,n){let i=e.lineBlockAt(t);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>t)break;if(!(s.tot)return s;(!r||s.type==no.Text&&(r.type!=s.type||(n<0?s.fromt)))&&(r=s)}}return r||i}return i}function $Et(e,t,n,i){let r=_$(e,t.head,t.assoc||-1),s=!i||r.type!=no.Text||!(e.lineWrapping||r.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>r.from?t.head-1:t.head);if(s){let a=e.dom.getBoundingClientRect(),l=e.textDirectionAt(r.from),c=e.posAtCoords({x:n==(l==Tr.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(c!=null)return Ze.cursor(c,n?-1:1)}return Ze.cursor(n?r.to:r.from,n?-1:1)}function DZ(e,t,n,i){let r=e.state.doc.lineAt(t.head),s=e.bidiSpans(r),a=e.textDirectionAt(r.from);for(let l=t,c=null;;){let u=fEt(r,s,a,l,n),d=XTe;if(!u){if(r.number==(n?e.state.doc.lines:1))return l;d=` -`,r=e.state.doc.line(r.number+(n?1:-1)),s=e.bidiSpans(r),u=e.visualLineSide(r,!n)}if(c){if(!c(d))return l}else{if(!i)return u;c=i(d)}l=u}}function FEt(e,t,n){let i=e.state.charCategorizer(t),r=i(n);return s=>{let a=i(s);return r==ls.Space&&(r=a),r==a}}function BEt(e,t,n,i){let r=t.head,s=n?1:-1;if(r==(n?e.state.doc.length:0))return Ze.cursor(r,t.assoc);let a=t.goalColumn,l,c=e.contentDOM.getBoundingClientRect(),u=e.coordsAtPos(r,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),d=e.documentTop;if(u)a==null&&(a=u.left-c.left),l=s<0?u.top:u.bottom;else{let g=e.viewState.lineBlockAt(r);a==null&&(a=Math.min(c.right-c.left,e.defaultCharacterWidth*(r-g.from))),l=(s<0?g.top:g.bottom)+d}let f=c.left+a,h=e.viewState.heightOracle.textHeight>>1,p=i??h;for(let g=0;;g+=h){let b=l+(p+g)*s,v=N$(e,{x:f,y:b},!1,s);if(n?b>c.bottom:bl:x{if(t>s&&tr(e)),n.from,t.head>n.from?-1:1);return i==n.from?n:Ze.cursor(i,ie.viewState.docHeight)return new Ed(e.state.doc.length,-1);if(u=e.elementAtHeight(c),i==null)break;if(u.type==no.Text){if(i<0?u.toe.viewport.to)break;let h=e.docView.coordsAt(i<0?u.from:u.to,i>0?-1:1);if(h&&(i<0?h.top<=c+s:h.bottom>=c+s))break}let f=e.viewState.heightOracle.textHeight/2;c=i>0?u.bottom+f:u.top-f}if(e.viewport.from>=u.to||e.viewport.to<=u.from){if(n)return null;if(u.type==no.Text){let f=LEt(e,r,u,a,l);return new Ed(f,f==u.from?1:-1)}}if(u.type!=no.Text)return c<(u.top+u.bottom)/2?new Ed(u.from,1):new Ed(u.to,-1);let d=e.docView.lineAt(u.from,2);return(!d||d.length!=u.length)&&(d=e.docView.lineAt(u.from,-2)),new UEt(e,a,l,e.textDirectionAt(u.from)).scanTile(d,u.from)}class UEt{constructor(t,n,i,r){this.view=t,this.x=n,this.y=i,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(t){return(!this.line||this.line.from>t||this.line.to1||i.length&&(i[0].level!=this.baseDir||i[0].to+r.from>1;t:if(a.has(b)){let y=r+Math.floor(Math.random()*g);for(let x=0;x1)){if(x.bottomthis.y)(!u||u.top>x.top)&&(u=x),w=-1;else{let O=x.left>this.x?this.x-x.left:x.right(g+g+b)/3)return this.y=c.bottom-1,this.scan(t,n,!0);if(u&&u.top<(g+b+b)/3)return this.y=u.top+1,this.scan(t,n,!0)}let p=(l?this.dirAt(t[d],1):this.baseDir)==Tr.LTR;return{i:d,after:this.x>(h.left+h.right)/2==p}}scanText(t,n){let i=[];for(let s=0;s{let a=i[s]-n,l=i[s+1]-n;return nk(t.dom,a,l).getClientRects()});return r.after?new Ed(i[r.i+1],-1):new Ed(i[r.i],1)}scanTile(t,n){if(!t.length)return new Ed(n,1);if(t.children.length==1){let l=t.children[0];if(l.isText())return this.scanText(l,n);if(l.isComposite())return this.scanTile(l,n)}let i=[n];for(let l=0,c=n;l{let c=t.children[l];return c.flags&48?null:(c.dom.nodeType==1?c.dom:nk(c.dom,0,c.length)).getClientRects()}),s=t.children[r.i],a=i[r.i];return s.isText()?this.scanText(s,a):s.isComposite()?this.scanTile(s,a):r.after?new Ed(i[r.i+1],-1):new Ed(a,1)}}const ry="￿";class QEt{constructor(t,n){this.points=t,this.view=n,this.text="",this.lineSeparator=n.state.facet(ji.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=ry}readRange(t,n){if(!t)return this;let i=t.parentNode;for(let r=t;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let a=_s.get(r),l=r.nextSibling;if(l==n){a!=null&&a.breakAfter&&!l&&i!=this.view.contentDOM&&this.lineBreak();break}let c=_s.get(l);(a&&c?a.breakAfter:(a?a.breakAfter:CN(r))||CN(l)&&(r.nodeName!="BR"||a!=null&&a.isWidget())&&this.text.length>s)&&!VEt(l,n)&&this.lineBreak(),r=l}return this.findPointBefore(i,n),this}readTextNode(t){let n=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,a=1,l;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),a=this.lineSeparator.length):(l=r.exec(n))&&(s=l.index,a=l[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),a>1)for(let c of this.points)c.node==t&&c.pos>this.text.length&&(c.pos-=a-1);i=s+a}}readNode(t){let n=_s.get(t),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(t,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else t.nodeType==3?this.readTextNode(t):t.nodeName=="BR"?t.nextSibling&&this.lineBreak():t.nodeType==1&&this.readRange(t.firstChild,null)}findPointBefore(t,n){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(t,n){for(let i of this.points)(t.nodeType==3?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(zEt(t,i.node,i.offset)?n:0))}}function zEt(e,t,n){for(;;){if(!t||n-1;let{impreciseHead:s,impreciseAnchor:a}=t.docView,l=t.state.selection;if(t.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=p2e(t.docView.tile,n,i,0))){let c=s||a?[]:WEt(t),u=new QEt(c,t);u.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=u.text,this.newSel=KEt(c,this.bounds.from)}else{let c=t.observer.selectionRange,u=s&&s.node==c.focusNode&&s.offset==c.focusOffset||!S$(t.contentDOM,c.focusNode)?l.main.head:t.docView.posFromDOM(c.focusNode,c.focusOffset),d=a&&a.node==c.anchorNode&&a.offset==c.anchorOffset||!S$(t.contentDOM,c.anchorNode)?l.main.anchor:t.docView.posFromDOM(c.anchorNode,c.anchorOffset),f=t.viewport;if((zt.ios||zt.chrome)&&u!=d&&Math.min(u,d)<=l.main.from&&Math.max(u,d)>=l.main.to&&(f.from>0||f.to-1&&l.ranges.length>1)this.newSel=l.replaceRange(Ze.range(d,u));else if(t.lineWrapping&&d==u&&!(l.main.empty&&l.main.head==u)&&t.inputState.lastTouchTime>Date.now()-100){let h=t.coordsAtPos(u,-1),p=0;h&&(p=t.inputState.lastTouchY<=h.bottom?-1:1),this.newSel=Ze.create([Ze.cursor(u,p)])}else this.newSel=Ze.single(d,u)}}}function p2e(e,t,n,i){if(e.isComposite()){let r=-1,s=-1,a=-1,l=-1;for(let c=0,u=i,d=i;cn)return p2e(f,t,n,u);if(h>=t&&r==-1&&(r=c,s=u),u>n&&f.dom.parentNode==e.dom){a=c,l=d;break}d=h,u=h+f.breakAfter}return{from:s,to:l<0?i+e.length:l,startDOM:(r?e.children[r-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:a=0?e.children[a].dom:null}}else return e.isText()?{from:i,to:i+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function m2e(e,t){let n,{newSel:i}=t,{state:r}=e,s=r.selection.main,a=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:l,to:c}=t.bounds,u=s.from,d=null;(a===8||zt.android&&t.text.length=l&&s.to<=c&&(t.typeOver||f!=t.text)&&f.slice(0,s.from-l)==t.text.slice(0,s.from-l)&&f.slice(s.to-l)==t.text.slice(h=t.text.length-(f.length-(s.to-l)))?n={from:s.from,to:s.to,insert:Zi.of(t.text.slice(s.from-l,h).split(ry))}:(p=g2e(f,t.text,u-l,d))&&(zt.chrome&&a==13&&p.toB==p.from+2&&t.text.slice(p.from,p.toB)==ry+ry&&p.toB--,n={from:l+p.from,to:l+p.toA,insert:Zi.of(t.text.slice(p.from,p.toB).split(ry))})}else i&&(!e.hasFocus&&r.facet(Gf)||NN(i,s))&&(i=null);if(!n&&!i)return!1;if((zt.mac||zt.android)&&n&&n.from==n.to&&n.from==s.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=Ze.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:Zi.of([n.insert.toString().replace("."," ")])}):r.doc.lineAt(s.from).toDate.now()-50?n={from:s.from,to:s.to,insert:r.toText(e.inputState.insertingText)}:zt.chrome&&n&&n.from==n.to&&n.from==s.head&&n.insert.toString()==` - `&&e.lineWrapping&&(i&&(i=Ze.single(i.main.anchor-1,i.main.head-1)),n={from:s.from,to:s.to,insert:Zi.of([" "])}),n)return XU(e,n,i,a);if(i&&!NN(i,s)){let l=!1,c="select";return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin=="select"&&(l=!0),c=e.inputState.lastSelectionOrigin,c=="select.pointer"&&(i=h2e(r.facet(PE).map(u=>u(e)),i))),e.dispatch({selection:i,scrollIntoView:l,userEvent:c}),!0}else return!1}function XU(e,t,n,i=-1){if(zt.ios&&e.inputState.flushIOSKey(t))return!0;let r=e.state.selection.main;if(zt.android&&(t.to==r.to&&(t.from==r.from||t.from==r.from-1&&e.state.sliceDoc(t.from,r.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&uv(e.contentDOM,"Enter",13)||(t.from==r.from-1&&t.to==r.to&&t.insert.length==0||i==8&&t.insert.lengthr.head)&&uv(e.contentDOM,"Backspace",8)||t.from==r.from&&t.to==r.to+1&&t.insert.length==0&&uv(e.contentDOM,"Delete",46)))return!0;let s=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a,l=()=>a||(a=qEt(e,t,n));return e.state.facet(t2e).some(c=>c(e,t.from,t.to,s,l))||e.dispatch(l()),!0}function qEt(e,t,n){let i,r=e.state,s=r.selection.main,a=-1;if(t.from==t.to&&t.froms.to){let c=t.fromf(e)),u,c);t.from==d&&(a=d)}if(a>-1)i={changes:t,selection:Ze.cursor(t.from+t.insert.length,-1)};else if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let c=s.fromt.to?r.sliceDoc(t.to,s.to):"";i=r.replaceSelection(e.state.toText(c+t.insert.sliceString(0,void 0,e.state.lineBreak)+u))}else{let c=r.changes(t),u=n&&n.main.to<=c.newLength?n.main:void 0;if(r.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=s.to+10&&t.to>=s.to-10){let d=e.state.sliceDoc(t.from,t.to),f,h=n&&f2e(e,n.main.head);if(h){let g=t.insert.length-(t.to-t.from);f={from:h.from,to:h.to-g}}else f=e.state.doc.lineAt(s.head);let p=s.to-t.to;i=r.changeByRange(g=>{if(g.from==s.from&&g.to==s.to)return{changes:c,range:u||g.map(c)};let b=g.to-p,v=b-d.length;if(e.state.sliceDoc(v,b)!=d||b>=f.from&&v<=f.to)return{range:g};let y=r.changes({from:v,to:b,insert:t.insert}),x=g.to-s.to;return{changes:y,range:u?Ze.range(Math.max(0,u.anchor+x),Math.max(0,u.head+x)):g.map(y)}})}else i={changes:c,selection:u&&r.selection.replaceRange(u)}}let l="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,l+=".compose",e.inputState.compositionFirstChange&&(l+=".start",e.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:l,scrollIntoView:!0})}function g2e(e,t,n,i){let r=Math.min(e.length,t.length),s=0;for(;s0&&l>0&&e.charCodeAt(a-1)==t.charCodeAt(l-1);)a--,l--;if(i=="end"){let c=Math.max(0,s-Math.min(a,l));n-=a+c-s}if(a=a?s-n:0;s-=c,l=s+(l-a),a=s}else if(l=l?s-n:0;s-=c,a=s+(a-l),l=s}return{from:s,toA:a,toB:l}}function WEt(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=e.observer.selectionRange;return n&&(t.push(new MZ(n,i)),(r!=n||s!=i)&&t.push(new MZ(r,s))),t}function KEt(e,t){if(e.length==0)return null;let n=e[0].pos,i=e.length==2?e[1].pos:n;return n>-1&&i>-1?Ze.single(n+t,i+t):null}function NN(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}class GEt{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,zt.safari&&t.contentDOM.addEventListener("input",()=>null),zt.gecko&&dCt(t.contentDOM.ownerDocument)}handleEvent(t){!rCt(this.view,t)||this.ignoreDuringComposition(t)||t.type=="keydown"&&this.keydown(t)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(t.type,t)):this.runHandlers(t.type,t))}runHandlers(t,n){let i=this.handlers[t];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(t){let n=YEt(t),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let a=!n[s].handlers.length,l=i[s];l&&a!=!l.handlers.length&&(r.removeEventListener(s,this.handleEvent),l=null),l||r.addEventListener(s,this.handleEvent,{passive:a})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&t.keyCode!=27&&y2e.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),zt.android&&zt.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;if(zt.ios&&!t.synthetic&&!t.altKey&&!t.metaKey&&(b2e.some(n=>n.keyCode==t.keyCode)&&!t.ctrlKey||ZEt.indexOf(t.key)>-1&&t.ctrlKey)){let n={ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey,shiftKey:t.shiftKey};return n.shiftKey&&zt.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&XEt(this.view.win)&&(n.shiftKey=!1),this.pendingIOSKey={key:t.key,keyCode:t.keyCode,mods:n},setTimeout(()=>this.flushIOSKey(),250),!0}return t.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(t){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&t&&t.from0?!0:zt.safari&&!zt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function XEt(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function LZ(e,t){return(n,i)=>{try{return t.call(e,i,n)}catch(r){fl(n.state,r)}}}function YEt(e){let t=Object.create(null);function n(i){return t[i]||(t[i]={observers:[],handlers:[]})}for(let i of e){let r=i.spec,s=r&&r.plugin.domEventHandlers,a=r&&r.plugin.domEventObservers;if(s)for(let l in s){let c=s[l];c&&n(l).handlers.push(LZ(i.value,c))}if(a)for(let l in a){let c=a[l];c&&n(l).observers.push(LZ(i.value,c))}}for(let i in zu)n(i).handlers.push(zu[i]);for(let i in Qo)n(i).observers.push(Qo[i]);return t}const b2e=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],ZEt="dthko",y2e=[16,17,18,20,91,92,224,225],WT=6;function KT(e){return Math.max(0,e)*.7+8}function JEt(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}class eCt{constructor(t,n,i,r){this.view=t,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=UTe(t.contentDOM),this.atoms=t.state.facet(PE).map(a=>a(t));let s=t.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=t.state.facet(ji.allowMultipleSelections)&&tCt(t,n),this.dragging=iCt(t,n)&&O2e(n)==1?null:!1}start(t){this.dragging===!1&&this.select(t)}move(t){if(t.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&JEt(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let n=0,i=0,r=0,s=0,a=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=GU(this.view);t.clientX-c.left<=r+WT?n=-KT(r-t.clientX):t.clientX+c.right>=a-WT&&(n=KT(t.clientX-a)),t.clientY-c.top<=s+WT?i=-KT(s-t.clientY):t.clientY+c.bottom>=l-WT&&(i=KT(t.clientY-l)),this.setScrollSpeed(n,i)}up(t){this.dragging==null&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,n){this.scrollSpeed={x:t,y:n},t||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:n}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(t||n)&&this.view.win.scrollBy(t,n),this.dragging===!1&&this.select(this.lastEvent)}select(t){let{view:n}=this,i=h2e(this.atoms,this.style.get(t,this.extend,this.multiple));(this.mustSelect||!i.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(t)&&setTimeout(()=>this.select(this.lastEvent),20)}}function tCt(e,t){let n=e.state.facet(YTe);return n.length?n[0](t):zt.mac?t.metaKey:t.ctrlKey}function nCt(e,t){let n=e.state.facet(ZTe);return n.length?n[0](t):zt.mac?!t.altKey:!t.ctrlKey}function iCt(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let i=ek(e.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s=t.clientX&&a.top<=t.clientY&&a.bottom>=t.clientY)return!0}return!1}function rCt(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,i;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=_s.get(n))&&i.isWidget()&&!i.isHidden&&i.widget.ignoreEvent(t))return!1;return!0}const zu=Object.create(null),Qo=Object.create(null),v2e=zt.ie&&zt.ie_version<15||zt.ios&&zt.webkit_version<604;function sCt(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),x2e(e,n.value)},50)}function bI(e,t,n){for(let i of e.facet(t))n=i(n,e);return n}function x2e(e,t){t=bI(e.state,HU,t);let{state:n}=e,i,r=1,s=n.toText(t),a=s.lines==n.selection.ranges.length;if(j$!=null&&n.selection.ranges.every(c=>c.empty)&&j$==s.toString()){let c=-1;i=n.changeByRange(u=>{let d=n.doc.lineAt(u.from);if(d.from==c)return{range:u};c=d.from;let f=n.toText((a?s.line(r++).text:t)+n.lineBreak);return{changes:{from:d.from,insert:f},range:Ze.cursor(u.from+f.length)}})}else a?i=n.changeByRange(c=>{let u=s.line(r++);return{changes:{from:c.from,to:c.to,insert:u.text},range:Ze.cursor(c.from+u.length)}}):i=n.replaceSelection(s);e.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Qo.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,zt.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())};Qo.wheel=Qo.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()};zu.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1);Qo.touchstart=(e,t)=>{let n=e.inputState,i=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),i&&(n.lastTouchX=i.clientX,n.lastTouchY=i.clientY),n.setSelectionOrigin("select.pointer")};Qo.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")};Qo.touchend=(e,t)=>{e.inputState.touchActive=!1};zu.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of e.state.facet(JTe))if(n=i(e,t),n)break;if(!n&&t.button==0&&(n=oCt(e,t)),n){let i=!e.hasFocus;e.inputState.startMouseSelection(new eCt(e,t,n,i)),i&&e.observer.ignore(()=>{QTe(e.contentDOM);let s=e.root.activeElement;s&&!s.contains(e.contentDOM)&&s.blur()});let r=e.inputState.mouseSelection;if(r)return r.start(t),r.dragging===!1}else e.inputState.setSelectionOrigin("select.pointer");return!1};function $Z(e,t,n,i){if(i==1)return Ze.cursor(t,n);if(i==2)return MEt(e.state,t,n);{let r=e.docView.lineAt(t,n),s=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:s.from,l=r?r.posAtEnd:s.to;return lDate.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(BZ+1)%3:1}function oCt(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),i=O2e(t),r=e.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,a,l){let c=e.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),u,d=$Z(e,c.pos,c.assoc,i);if(n.pos!=c.pos&&!a){let f=$Z(e,n.pos,n.assoc,i),h=Math.min(f.from,d.from),p=Math.max(f.to,d.to);d=h1&&(u=lCt(r,c.pos))?u:l?r.addRange(d):Ze.create([d])}}}function lCt(e,t){for(let n=0;n=t)return Ze.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}zu.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let s=r.posAtStart,a=s+r.length;(s>=n.to||a<=n.from)&&(n=Ze.undirectionalRange(s,a))}}let{inputState:i}=e;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",bI(e.state,qU,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1};zu.dragend=e=>(e.inputState.draggedContent=null,!1);function QZ(e,t,n,i){if(n=bI(e.state,HU,n),!n)return;let r=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:s}=e.inputState,a=i&&s&&nCt(e,t)?{from:s.from,to:s.to}:null,l={from:r,insert:n},c=e.state.changes(a?[a,l]:l);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(r,-1),head:c.mapPos(r,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}zu.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&QZ(e,t,i.filter(a=>a!=null).join(e.state.lineBreak),!1)};for(let a=0;a{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[a]=l.result),s()},l.readAsText(n[a])}return!0}else{let i=t.dataTransfer.getData("Text");if(i)return QZ(e,t,i,!0),!0}return!1};zu.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=v2e?null:t.clipboardData;return n?(x2e(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(sCt(e),!1)};function cCt(e,t){let n=e.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=t,i.focus(),i.selectionEnd=t.length,i.selectionStart=0,setTimeout(()=>{i.remove(),e.focus()},50)}function uCt(e){let t=[],n=[],i=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let r=-1;for(let{from:s}of e.selection.ranges){let a=e.doc.lineAt(s);a.number>r&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),r=a.number}i=!0}return{text:bI(e,qU,t.join(e.lineBreak)),ranges:n,linewise:i}}let j$=null;zu.copy=zu.cut=(e,t)=>{if(!Fw(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:i,linewise:r}=uCt(e.state);if(!n&&!r)return!1;j$=r?n:null,t.type=="cut"&&!e.state.readOnly&&e.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=v2e?null:t.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(cCt(e,n),!1)};const w2e=rf.define();function S2e(e,t){let n=[];for(let i of e.facet(n2e)){let r=i(e,t);r&&n.push(r)}return n.length?e.update({effects:n,annotations:w2e.of(!0)}):null}function k2e(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=S2e(e.state,t);n?e.dispatch(n):e.update([])}},10)}Qo.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),k2e(e)};Qo.blur=e=>{e.observer.clearSelectionRange(),k2e(e)};Qo.compositionstart=Qo.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange==null&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))};Qo.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,zt.chrome&&zt.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))};Qo.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()};zu.beforeinput=(e,t)=>{var n,i;if((t.inputType=="insertText"||t.inputType=="insertCompositionText")&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType=="insertReplacementText"&&e.observer.editContext){let s=(n=t.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=t.getTargetRanges();if(s&&a.length){let l=a[0],c=e.posAtDOM(l.startContainer,l.startOffset),u=e.posAtDOM(l.endContainer,l.endOffset);return XU(e,{from:c,to:u,insert:e.state.toText(s)},null),!0}}let r;if(zt.chrome&&zt.android&&(r=b2e.find(s=>s.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>s+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return zt.ios&&t.inputType=="deleteContentForward"&&e.observer.flushSoon(),zt.safari&&t.inputType=="insertText"&&e.inputState.composing>=0&&setTimeout(()=>Qo.compositionend(e,t),20),!1};const zZ=new Set;function dCt(e){zZ.has(e)||(zZ.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}const VZ=["pre-wrap","normal","pre-line","break-spaces"];let ax=!1;function HZ(){ax=!1}class fCt{constructor(t){this.lineWrapping=t,this.doc=Zi.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-t-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return VZ.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let n=!1;for(let i=0;i-1,c=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,c){this.heightSamples={};for(let u=0;u0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>kA&&(ax=!0),this.height=t)}replace(t,n,i){return Uo.of(i)}decomposeLeft(t,n){n.push(this)}decomposeRight(t,n){n.push(this)}applyChanges(t,n,i,r){let s=this,a=i.doc;for(let l=r.length-1;l>=0;l--){let{fromA:c,toA:u,fromB:d,toB:f}=r[l],h=s.lineAt(c,Dr.ByPosNoHeight,i.setDoc(n),0,0),p=h.to>=u?h:s.lineAt(u,Dr.ByPosNoHeight,i,0,0);for(f+=p.to-u,u=p.to;l>0&&h.from<=r[l-1].toA;)c=r[l-1].fromA,d=r[l-1].fromB,l--,cs*2){let l=t[n-1];l.break?t.splice(--n,1,l.left,null,l.right):t.splice(--n,1,l.left,l.right),i+=1+l.break,r-=l.size}else if(s>r*2){let l=t[i];l.break?t.splice(i,1,l.left,null,l.right):t.splice(i,1,l.left,l.right),i+=2+l.break,s-=l.size}else break;else if(r=s&&a(this.lineAt(0,Dr.ByPos,i,r,s))}setMeasuredHeight(t){let n=t.heights[t.index++];n<0?(this.spaceAbove=-n,n=t.heights[t.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(t,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class zl extends E2e{constructor(t,n,i){super(t,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(t,n){return new Au(n,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,i){let r=i[0];return i.length==1&&(r instanceof zl||r instanceof Wa&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Wa?r=new zl(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):Uo.of(i)}updateHeight(t,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setMeasuredHeight(r):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Wa extends Uo{constructor(t){super(t,0)}heightMetrics(t,n){let i=t.doc.lineAt(n).number,r=t.doc.lineAt(n+this.length).number,s=r-i+1,a,l=0;if(t.lineWrapping){let c=Math.min(this.height,t.lineHeight*s);a=c/s,this.length>s+1&&(l=(this.height-c)/(this.length-s-1))}else a=this.height/s;return{firstLine:i,lastLine:r,perLine:a,perChar:l}}blockAt(t,n,i,r){let{firstLine:s,lastLine:a,perLine:l,perChar:c}=this.heightMetrics(n,r);if(n.lineWrapping){let u=r+(t0){let s=i[i.length-1];s instanceof Wa?i[i.length-1]=new Wa(s.length+r):i.push(null,new Wa(r-1))}if(t>0){let s=i[0];s instanceof Wa?i[0]=new Wa(t+s.length):i.unshift(new Wa(t-1),null)}return Uo.of(i)}decomposeLeft(t,n){n.push(new Wa(t-1),null)}decomposeRight(t,n){n.push(null,new Wa(this.length-t-1))}updateHeight(t,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let a=[],l=Math.max(n,r.from),c=-1;for(r.from>n&&a.push(new Wa(r.from-n-1).updateHeight(t,n));l<=s&&r.more;){let d=t.doc.lineAt(l).length;a.length&&a.push(null);let f=r.heights[r.index++],h=0;f<0&&(h=-f,f=r.heights[r.index++]),c==-1?c=f:Math.abs(f-c)>=kA&&(c=-2);let p=new zl(d,f,h);p.outdated=!1,a.push(p),l+=d+1}l<=s&&a.push(null,new Wa(s-l).updateHeight(t,l));let u=Uo.of(a);return(c<0||Math.abs(u.height-this.height)>=kA||Math.abs(c-this.heightMetrics(t,n).perLine)>=kA)&&(ax=!0),jN(this,u)}else(i||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class mCt extends Uo{constructor(t,n,i){super(t.length+n+i.length,t.height+i.height,n|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return this.flags&1}blockAt(t,n,i,r){let s=i+this.left.height;return tl))return u;let d=n==Dr.ByPosNoHeight?Dr.ByPosNoHeight:Dr.ByPos;return c?u.join(this.right.lineAt(l,d,i,a,l)):this.left.lineAt(l,d,i,r,s).join(u)}forEachLine(t,n,i,r,s,a){let l=r+this.left.height,c=s+this.left.length+this.break;if(this.break)t=c&&this.right.forEachLine(t,n,i,l,c,a);else{let u=this.lineAt(c,Dr.ByPos,i,r,s);t=t&&u.from<=n&&a(u),n>u.to&&this.right.forEachLine(u.to+1,n,i,l,c,a)}}replace(t,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(t-r,n-r,i));let s=[];t>0&&this.decomposeLeft(t,s);let a=s.length;for(let l of i)s.push(l);if(t>0&&qZ(s,a-1),n=i&&n.push(null)),t>i&&this.right.decomposeLeft(t-i,n)}decomposeRight(t,n){let i=this.left.length,r=i+this.break;if(t>=r)return this.right.decomposeRight(t-r,n);t2*n.size||n.size>2*t.size?Uo.of(this.break?[t,null,n]:[t,n]):(this.left=jN(this.left,t),this.right=jN(this.right,n),this.setHeight(t.height+n.height),this.outdated=t.outdated||n.outdated,this.size=t.size+n.size,this.length=t.length+this.break+n.length,this)}updateHeight(t,n=0,i=!1,r){let{left:s,right:a}=this,l=n+s.length+this.break,c=null;return r&&r.from<=n+s.length&&r.more?c=s=s.updateHeight(t,n,i,r):s.updateHeight(t,n,i),r&&r.from<=l+a.length&&r.more?c=a=a.updateHeight(t,l,i,r):a.updateHeight(t,l,i),c?this.balanced(s,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function qZ(e,t){let n,i;e[t]==null&&(n=e[t-1])instanceof Wa&&(i=e[t+1])instanceof Wa&&e.splice(t-1,3,new Wa(n.length+1+i.length))}const gCt=5;class YU{constructor(t,n){this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof zl?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new zl(i-this.pos,-1,0)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(t,n,i){if(t=gCt)&&this.addLineDeco(r,s,a)}else n>t&&this.span(t,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=n,this.writtenTot&&this.nodes.push(new zl(this.pos-t,-1,0)),this.writtenTo=this.pos}blankContent(t,n){let i=new Wa(n-t);return this.oracle.doc.lineAt(t).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof zl)return t;let n=new zl(0,-1,0);return this.nodes.push(n),n}addBlock(t){this.enterLine();let n=t.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,n&&n.endSide>0&&(this.covering=t)}addLineDeco(t,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,t),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(t){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof zl)&&!this.isCovered?this.nodes.push(new zl(0,-1,0)):(this.writtenTod.clientHeight||d.scrollWidth>d.clientWidth)&&f.overflow!="visible"){let h=d.getBoundingClientRect();s=Math.max(s,h.left),a=Math.min(a,h.right),l=Math.max(l,h.top),c=Math.min(u==e.parentNode?r.innerHeight:c,h.bottom)}u=f.position=="absolute"||f.position=="fixed"?d.offsetParent:d.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-n.left,right:Math.max(s,a)-n.left,top:l-(n.top+t),bottom:Math.max(l,c)-(n.top+t)}}function xCt(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left0&&t.top0}function OCt(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class a5{constructor(t,n,i,r){this.from=t,this.to=n,this.size=i,this.displaySize=r}static same(t,n){if(t.length!=n.length)return!1;for(let i=0;itypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new fCt(i),this.stateDeco=GZ(n),this.heightMap=Uo.empty().applyChanges(this.stateDeco,Zi.empty,this.heightOracle.setDoc(n.doc),[new Kc(0,0,0,n.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=mn.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=t.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!t.some(({from:s,to:a})=>r>=s&&r<=a)){let{from:s,to:a}=this.lineBlockAt(r);t.push(new GT(s,a))}}return this.viewports=t.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?KZ:new ZU(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,t=>{this.viewportLines.push(VO(t,this.scaler))})}update(t,n=null){this.state=t.state;let i=this.stateDeco;this.stateDeco=GZ(this.state);let r=t.changedRanges,s=Kc.extendWithRanges(r,bCt(i,this.stateDeco,t?t.changes:pa.empty(this.state.doc.length))),a=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);HZ(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=a||ax)&&(t.flags|=2),l?(this.scrollAnchorPos=t.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let c=s.length?this.mapViewport(this.viewport,t.changes):this.viewport;(n&&(n.range.headc.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,n));let u=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,t.flags|=this.updateForViewport(),(u||!t.changes.empty||t.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(t.selectionSet||t.focusChanged)&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(r2e)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:t}=this,n=t.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Tr.RTL:Tr.LTR;let a=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",l=n.getBoundingClientRect(),c=a||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let u=0,d=0;if(l.width&&l.height){let{scaleX:k,scaleY:S}=BTe(n,l);(k>.005&&Math.abs(this.scaleX-k)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=k,this.scaleY=S,u|=16,a=c=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,h=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=h)&&(this.paddingTop=f,this.paddingBottom=h,u|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(r.lineWrapping&&(c=!0),this.editorWidth=t.scrollDOM.clientWidth,u|=16);let p=UTe(this.view.contentDOM,!1).y;p!=this.scrollParent&&(this.scrollParent=p,this.scrollAnchorHeight=-1,this.scrollOffset=0);let g=this.getScrollOffset();this.scrollOffset!=g&&(this.scrollAnchorHeight=-1,this.scrollOffset=g),this.scrolledToBottom=zTe(this.scrollParent||t.win);let b=(this.printing?OCt:vCt)(n,this.paddingTop),v=b.top-this.pixelViewport.top,y=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let x=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(x!=this.inView&&(this.inView=x,x&&(c=!0)),!this.inView&&!this.scrollTarget&&!xCt(t.dom))return 0;let w=l.width;if((this.contentDOMWidth!=w||this.editorHeight!=t.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=t.scrollDOM.clientHeight,u|=16),c){let k=t.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(k)&&(a=!0),a||r.lineWrapping&&Math.abs(w-this.contentDOMWidth)>r.charWidth){let{lineHeight:S,charWidth:E,textHeight:C}=t.docView.measureTextSize();a=S>0&&r.refresh(s,S,E,C,Math.max(5,w/E),k),a&&(t.docView.minWidth=0,u|=16)}v>0&&y>0?d=Math.max(v,y):v<0&&y<0&&(d=Math.min(v,y)),HZ();for(let S of this.viewports){let E=S.from==this.viewport.from?k:t.docView.measureVisibleLineHeights(S);this.heightMap=(a?Uo.empty().applyChanges(this.stateDeco,Zi.empty,this.heightOracle,[new Kc(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new hCt(S.from,E))}ax&&(u|=2)}let O=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return O&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),u|=this.updateForViewport()),(u&2||O)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,t)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,n){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:l}=this,c=new GT(r.lineAt(a-i*1e3,Dr.ByHeight,s,0,0).from,r.lineAt(l+(1-i)*1e3,Dr.ByHeight,s,0,0).to);if(n){let{head:u}=n.range;if(uc.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(u,Dr.ByPos,s,0,0),h;n.y=="center"?h=(f.top+f.bottom)/2-d/2:n.y=="start"||n.y=="nearest"&&u=l+Math.max(10,Math.min(i,250)))&&r>a-2*1e3&&s>1,a=r<<1;if(this.defaultTextDirection!=Tr.LTR&&!i)return[];let l=[],c=(d,f,h,p)=>{if(f-dd&&yy.from>=h.from&&y.to<=h.to&&Math.abs(y.from-d)y.fromx));if(!v){if(fw.from<=f&&w.to>=f)){let w=n.moveToLineBoundary(Ze.cursor(f),!1,!0).head;w>d&&(f=w)}let y=this.gapSize(h,d,f,p),x=i||y<2e6?y:2e6;v=new a5(d,f,y,x)}l.push(v)},u=d=>{if(d.length2e6)for(let S of t)S.from>=d.from&&S.fromd.from&&c(d.from,p,d,f),gn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(t){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];Ei.spans(n,this.viewport.from,this.viewport.to,{span(s,a){i.push({from:s,to:a})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(n=>n.from<=t&&n.to>=t)||VO(this.heightMap.lineAt(t,Dr.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=t&&n.bottom>=t)||VO(this.heightMap.lineAt(this.scaler.fromDOM(t),Dr.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(t){let n=this.lineBlockAtHeight(t+8);return n.from>=this.viewport.from||this.viewportLines[0].top-t>200?n:this.viewportLines[0]}elementAtHeight(t){return VO(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class GT{constructor(t,n){this.from=t,this.to=n}}function SCt(e,t,n){let i=[],r=e,s=0;return Ei.spans(n,e,t,{span(){},point(a,l){a>r&&(i.push({from:r,to:a}),s+=a-r),r=l}},20),r=1)return t[t.length-1].to;let i=Math.floor(e*n);for(let r=0;;r++){let{from:s,to:a}=t[r],l=a-s;if(i<=l)return s+i;i-=l}}function YT(e,t){let n=0;for(let{from:i,to:r}of e.ranges){if(t<=r){n+=t-i;break}n+=r-i}return n/e.total}function kCt(e,t){for(let n of e)if(t(n))return n}const KZ={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function GZ(e){let t=e.facet(pI).filter(i=>typeof i!="function"),n=e.facet(KU).filter(i=>typeof i!="function");return n.length&&t.push(Ei.join(n)),t}class ZU{constructor(t,n,i){let r=0,s=0,a=0;this.viewports=i.map(({from:l,to:c})=>{let u=n.lineAt(l,Dr.ByPos,t,0,0).top,d=n.lineAt(c,Dr.ByPos,t,0,0).bottom;return r+=d-u,{from:l,to:c,top:u,bottom:d,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let l of this.viewports)l.domTop=a+(l.top-s)*this.scale,a=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(t){for(let n=0,i=0,r=0;;n++){let s=nn.from==t.viewports[i].from&&n.to==t.viewports[i].to):!1}}function VO(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),i=t.toDOM(e.bottom);return new Au(e.from,e.length,n,i-n,Array.isArray(e._content)?e._content.map(r=>VO(r,t)):e._content)}const ZT=Vt.define({combine:e=>e.join(" ")}),R$=Vt.define({combine:e=>e.indexOf(!0)>-1}),I$=jm.newName(),C2e=jm.newName(),T2e=jm.newName(),A2e={"&light":"."+C2e,"&dark":"."+T2e};function P$(e,t,n){return new jm(t,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return e;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):e+" "+i}})}const ECt=P$("."+I$,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},A2e),CCt={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},o5=zt.ie&&zt.ie_version<=11;class TCt{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new nEt,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(zt.ie&&zt.ie_version<=11||zt.ios&&t.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&zt.android&&t.constructor.EDIT_CONTEXT!==!1&&!(zt.chrome&&zt.chrome_version<126)&&(this.editContext=new _Ct(t),t.state.facet(Gf)&&(t.contentDOM.editContext=this.editContext.editContext)),o5&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(t){(t.type=="change"||!t.type)&&!t.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((n,i)=>n!=t[i]))){this.gapIntersection.disconnect();for(let n of t)this.gapIntersection.observe(n);this.gaps=t}}onSelectionChange(t){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(Gf)?i.root.activeElement!=this.dom:!Fw(this.dom,r))return;let s=r.anchorNode&&i.docView.tile.nearest(r.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(t)){n||(this.selectionChanged=!1);return}(zt.ie&&zt.ie_version<=11||zt.android&&zt.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Uw(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,n=ek(t.root);if(!n)return!1;let i=zt.safari&&t.root.nodeType==11&&t.root.activeElement==this.dom&&ACt(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=Fw(this.dom,i);return r&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&uv(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||t=="Enter")&&(this.delayedAndroidKey={key:t,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of t){let a=this.readMutation(s);a&&(a.typeOver&&(r=!0),n==-1?{from:n,to:i}=a:(n=Math.min(a.from,n),i=Math.max(a.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:t,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Fw(this.dom,this.selectionRange);if(t<0&&!r)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new HEt(this.view,t,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=m2e(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!NN(this.view.state.selection,n.newSel.main))&&this.view.update([]),r}readMutation(t){let n=this.view.docView.tile.nearest(t.target);if(!n||n.isWidget())return null;if(n.markDirty(t.type=="attributes"),t.type=="childList"){let i=XZ(n,t.previousSibling||t.target.previousSibling,-1),r=XZ(n,t.nextSibling||t.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return t.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(Gf)!=t.state.facet(Gf)&&(t.view.contentDOM.editContext=t.state.facet(Gf)?this.editContext.editContext:null))}destroy(){var t,n,i;this.stop(),(t=this.intersection)===null||t===void 0||t.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function XZ(e,t,n){for(;t;){let i=_s.get(t);if(i&&i.parent==e)return i;let r=t.parentNode;t=r!=e.dom?r:n>0?t.nextSibling:t.previousSibling}return null}function YZ(e,t){let n=t.startContainer,i=t.startOffset,r=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor,1);return Uw(a.node,a.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function ACt(e,t){if(t.getComposedRanges){let r=t.getComposedRanges(e.root)[0];if(r)return YZ(e,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",i,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",i,!0),n?YZ(e,n):null}class _Ct{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let n=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=i=>{let r=t.state.selection.main,{anchor:s,head:a}=r,l=this.toEditorPos(i.updateRangeStart),c=this.toEditorPos(i.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:l,drifted:!1});let u=c-l>i.text.length;l==this.from&&sthis.to&&(c=s);let d=g2e(t.state.sliceDoc(l,c),i.text,(u?r.from:r.to)-l,u?"end":null);if(!d){let h=Ze.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));NN(h,r)||t.dispatch({selection:h,userEvent:"select"});return}let f={from:d.from+l,to:d.toA+l,insert:Zi.of(i.text.slice(d.from,d.toB).split(` -`))};if((zt.mac||zt.android)&&f.from==a-1&&/^\. ?$/.test(i.text)&&t.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:l,to:c,insert:Zi.of([i.text.replace("."," ")])}),this.pendingContextChange=f,!t.state.readOnly){let h=this.to-this.from+(f.to-f.from+f.insert.length);XU(t,f,Ze.single(this.toEditorPos(i.selectionStart,h),this.toEditorPos(i.selectionEnd,h)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)),f.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(n.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let a=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);a{let r=[];for(let s of i.getTextFormats()){let a=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(l)){let c=this.toEditorPos(s.rangeStart),u=this.toEditorPos(s.rangeEnd);if(c{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(t.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{let r=ek(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let n=0,i=!1,r=this.pendingContextChange;return t.changes.iterChanges((s,a,l,c,u)=>{if(i)return;let d=u.length-(a-s);if(r&&a>=r.to)if(r.from==s&&r.to==a&&r.insert.eq(u)){r=this.pendingContextChange=null,n+=d,this.to+=d;return}else r=null,this.revertPending(t.state);if(s+=n,a+=n,a<=this.from)this.from+=d,this.to+=d;else if(sthis.to||this.to-this.from+u.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(a),u.toString()),this.to+=d}n+=d}),r&&!i&&this.revertPending(t.state),!i}update(t){let n=this.pendingContextChange,i=t.startState.selection.main;this.composing&&(this.composing.drifted||!t.changes.touchesRange(i.from,i.to)&&t.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):!this.applyEdits(t)||!this.rangeIsValid(t.state)?(this.pendingContextChange=null,this.reset(t.state)):(t.docChanged||t.selectionSet||n)&&this.setSelection(t.state),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:n}=t.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(t.doc.length,n+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),t.doc.sliceString(n.from,n.to))}setSelection(t){let{main:n}=t.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(t){let{head:n}=t.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(t,n=this.to-this.from){t=Math.min(t,n);let i=this.composing;return i&&i.drifted?i.editorBase+(t-i.contextBase):t+this.from}toContextPos(t){let n=this.composing;return n&&n.drifted?n.contextBase+(t-n.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class Pt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:i}=t;this.dispatchTransactions=t.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=t.root||iEt(t.parent)||document,this.viewState=new WZ(this,t.state||ji.create(t)),t.scrollTo&&t.scrollTo.is(qT)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Dy).map(r=>new t5(r));for(let r of this.plugins)r.update(this);this.observer=new TCt(this),this.inputState=new GEt(this),this.inputState.ensureHandlers(this.plugins),this.docView=new PZ(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...t){let n=t.length==1&&t[0]instanceof ia?t:t.length==1&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(n,this)}update(t){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let h of t){if(h.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=h.state}if(this.destroyed){this.viewState.state=s;return}let a=this.hasFocus,l=0,c=null;t.some(h=>h.annotation(w2e))?(this.inputState.notifiedFocused=a,l=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,c=S2e(s,a),c||(l=1));let u=this.observer.delayedAndroidKey,d=null;if(u?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(d=null)):this.observer.clear(),s.facet(ji.phrases)!=this.state.facet(ji.phrases))return this.setState(s);r=TN.create(this,s,t),r.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let h of t){if(f&&(f=f.map(h.changes)),h.scrollIntoView){let{main:p}=h.state.selection,{x:g,y:b}=this.state.facet(Pt.cursorScrollMargin);f=new dv(p.empty?p:Ze.cursor(p.head,p.head>p.anchor?-1:1),"nearest","nearest",b,g)}for(let p of h.effects)p.is(qT)&&(f=p.value.clip(this.state))}this.viewState.update(r,f),this.bidiCache=RN.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(zO)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(ZT)!=r.state.facet(ZT)&&(this.viewState.mustMeasureContent=!0),(n||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let h of this.state.facet(T$))try{h(r)}catch(p){fl(this.state,p,"update listener")}(c||d)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),d&&!m2e(this,d)&&u.force&&uv(this.contentDOM,u.key,u.keyCode)})}setState(t){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new WZ(this,t),this.plugins=t.facet(Dy).map(i=>new t5(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new PZ(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(t){let n=t.startState.facet(Dy),i=t.state.facet(Dy);if(n!=i){let r=[];for(let s of i){let a=n.indexOf(s);if(a<0)r.push(new t5(s));else{let l=this.plugins[a];l.mustUpdate=t,r.push(l)}}for(let s of this.plugins)s.mustUpdate!=t&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=t;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,t&&this.observer.forceFlush();let n=null,i=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(a<0)if(zTe(i||this.win))s=-1,a=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(r);s=p.from,a=p.top}this.updateState=1;let c=this.viewState.measure();if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];c&4||([this.measureRequests,u]=[u,this.measureRequests]);let d=u.map(p=>{try{return p.read(this)}catch(g){return fl(this.state,g),ZZ}}),f=TN.create(this,this.state,[]),h=!1;f.flags|=c,n?n.flags|=c:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),h=this.docView.update(f),h&&this.docViewUpdate());for(let p=0;p1||g<-1)&&!(zt.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(i==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r=r+g,i?i.scrollTop+=g:this.win.scrollBy(0,g),a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(T$))l(n)}get themeClasses(){return I$+" "+(this.state.facet(R$)?T2e:C2e)+" "+this.state.facet(ZT)}updateAttrs(){let t=JZ(this,o2e,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Gf)?"true":"false",class:"cm-content",style:`${zt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),JZ(this,WU,n);let i=this.observer.ignore(()=>{let r=AZ(this.contentDOM,this.contentAttrs,n),s=AZ(this.dom,this.editorAttrs,t);return r||s});return this.editorAttrs=t,this.contentAttrs=n,i}showAnnouncements(t){let n=!0;for(let i of t)for(let r of i.effects)if(r.is(Pt.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(zO);let t=this.state.facet(Pt.cspNonce);jm.mount(this.root,this.styleModules.concat(ECt).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let n=0;ni.plugin==t)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,n,i){return s5(this,t,DZ(this,t,n,i))}moveByGroup(t,n){return s5(this,t,DZ(this,t,n,i=>FEt(this,t.head,i)))}visualLineSide(t,n){let i=this.bidiSpans(t),r=this.textDirectionAt(t.from),s=i[n?i.length-1:0];return Ze.cursor(s.side(n,r)+t.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(t,n,i=!0){return $Et(this,t,n,i)}moveVertically(t,n,i){return s5(this,t,BEt(this,t,n,i))}domAtPos(t,n=1){return this.docView.domAtPos(t,n)}posAtDOM(t,n=0){return this.docView.posFromDOM(t,n)}posAtCoords(t,n=!0){this.readMeasured();let i=N$(this,t,n);return i&&i.pos}posAndSideAtCoords(t,n=!0){return this.readMeasured(),N$(this,t,n)}coordsAtPos(t,n=1){this.readMeasured();let i=this.state.doc.lineAt(t),r=this.bidiSpans(i),s=r[Id.find(r,t-i.from,-1,n)];return this.docView.coordsAt(t,n,s.dir==Tr.RTL)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(i2e)||tthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>NCt)return GTe(t.length);let n=this.textDirectionAt(t.from),i;for(let s of this.bidiCache)if(s.from==t.from&&s.dir==n&&(s.fresh||KTe(s.isolates,i=jZ(this,t))))return s.order;i||(i=jZ(this,t));let r=dEt(t.text,n,i);return this.bidiCache.push(new RN(t.from,t.to,n,i,!0,r)),r}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||zt.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{QTe(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,n={}){var i,r,s,a;return qT.of(new dv(typeof t=="number"?Ze.cursor(t):t,(i=n.y)!==null&&i!==void 0?i:"nearest",(r=n.x)!==null&&r!==void 0?r:"nearest",(s=n.yMargin)!==null&&s!==void 0?s:5,(a=n.xMargin)!==null&&a!==void 0?a:5))}scrollSnapshot(){let{scrollTop:t,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(t);return qT.of(new dv(Ze.cursor(i.from),"start","start",i.top-t,n,!0))}setTabFocusMode(t){t==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof t=="boolean"?this.inputState.tabFocusMode=t?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return Ns.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return Ns.define(()=>({}),{eventObservers:t})}static theme(t,n){let i=jm.newName(),r=[ZT.of(i),zO.of(P$(`.${i}`,t))];return n&&n.dark&&r.push(R$.of(!0)),r}static baseTheme(t){return Xh.lowest(zO.of(P$("."+I$,t,A2e)))}static findFromDOM(t){var n;let i=t.querySelector(".cm-content"),r=i&&_s.get(i)||_s.get(t);return((n=r==null?void 0:r.root)===null||n===void 0?void 0:n.view)||null}}Pt.styleModule=zO;Pt.inputHandler=t2e;Pt.clipboardInputFilter=HU;Pt.clipboardOutputFilter=qU;Pt.scrollHandler=s2e;Pt.focusChangeEffect=n2e;Pt.perLineTextDirection=i2e;Pt.exceptionSink=e2e;Pt.updateListener=T$;Pt.editable=Gf;Pt.mouseSelectionStyle=JTe;Pt.dragMovesSelection=ZTe;Pt.clickAddsSelectionRange=YTe;Pt.decorations=pI;Pt.blockWrappers=l2e;Pt.outerDecorations=KU;Pt.atomicRanges=PE;Pt.bidiIsolatedRanges=c2e;Pt.cursorScrollMargin=Vt.define({combine:e=>{let t=5,n=5;for(let i of e)typeof i=="number"?t=n=i:{x:t,y:n}=i;return{x:t,y:n}}});Pt.scrollMargins=u2e;Pt.darkTheme=R$;Pt.cspNonce=Vt.define({combine:e=>e.length?e[0]:""});Pt.contentAttributes=WU;Pt.editorAttributes=o2e;Pt.lineWrapping=Pt.contentAttributes.of({class:"cm-lineWrapping"});Pt.announce=Fn.define();const NCt=4096,ZZ={};class RN{constructor(t,n,i,r,s,a){this.from=t,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=a}static update(t,n){if(n.empty&&!t.some(s=>s.fresh))return t;let i=[],r=t.length?t[t.length-1].dir:Tr.LTR;for(let s=Math.max(0,t.length-10);s=0;r--){let s=i[r],a=typeof s=="function"?s(e):s;a&&QU(a,n)}return n}const jCt=zt.mac?"mac":zt.windows?"win":zt.linux?"linux":"key";function RCt(e,t){const n=e.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,a,l;for(let c=0;ci.concat(r),[]))),n}function PCt(e,t,n){return N2e(_2e(e.state),t,e,n)}let Lp=null;const DCt=4e3;function MCt(e,t=jCt){let n=Object.create(null),i=Object.create(null),r=(a,l)=>{let c=i[a];if(c==null)i[a]=l;else if(c!=l)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},s=(a,l,c,u,d)=>{var f,h;let p=n[a]||(n[a]=Object.create(null)),g=l.split(/ (?!$)/).map(y=>RCt(y,t));for(let y=1;y{let O=Lp={view:w,prefix:x,scope:a};return setTimeout(()=>{Lp==O&&(Lp=null)},DCt),!0}]})}let b=g.join(" ");r(b,!1);let v=p[b]||(p[b]={preventDefault:!1,stopPropagation:!1,run:((h=(f=p._any)===null||f===void 0?void 0:f.run)===null||h===void 0?void 0:h.slice())||[]});c&&v.run.push(c),u&&(v.preventDefault=!0),d&&(v.stopPropagation=!0)};for(let a of e){let l=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let u of l){let d=n[u]||(n[u]=Object.create(null));d._any||(d._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=a;for(let h in d)d[h].run.push(p=>f(p,D$))}let c=a[t]||a.key;if(c)for(let u of l)s(u,c,a.run,a.preventDefault,a.stopPropagation),a.shift&&s(u,"Shift-"+c,a.shift,a.preventDefault,a.stopPropagation)}return n}let D$=null;function N2e(e,t,n,i){D$=t;let r=Xkt(t),s=al(r,0),a=kd(s)==r.length&&r!=" ",l="",c=!1,u=!1,d=!1;Lp&&Lp.view==n&&Lp.scope==i&&(l=Lp.prefix+" ",y2e.indexOf(t.keyCode)<0&&(u=!0,Lp=null));let f=new Set,h=v=>{if(v){for(let y of v.run)if(!f.has(y)&&(f.add(y),y(n)))return v.stopPropagation&&(d=!0),!0;v.preventDefault&&(v.stopPropagation&&(d=!0),u=!0)}return!1},p=e[i],g,b;return p&&(h(p[l+JT(r,t,!a)])?c=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(zt.windows&&t.ctrlKey&&t.altKey)&&!(zt.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(g=Rm[t.keyCode])&&g!=r?(h(p[l+JT(g,t,!0)])||t.shiftKey&&(b=ZS[t.keyCode])!=r&&b!=g&&h(p[l+JT(b,t,!1)]))&&(c=!0):a&&t.shiftKey&&h(p[l+JT(r,t,!0)])&&(c=!0),!c&&h(p._any)&&(c=!0)),u&&(c=!0),c&&d&&t.stopPropagation(),D$=null,c}class ab{constructor(t,n,i,r,s){this.className=t,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,n){return n.className!=this.className?!1:(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width!=null&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,n,i){if(i.empty){let r=t.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=j2e(t);return[new ab(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return LCt(t,n,i)}}function j2e(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==Tr.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function tJ(e,t,n,i){let r=e.coordsAtPos(t,n*2);if(!r)return i;let s=e.dom.getBoundingClientRect(),a=(r.top+r.bottom)/2,l=e.posAtCoords({x:s.left+1,y:a}),c=e.posAtCoords({x:s.right-1,y:a});return l==null||c==null?i:{from:Math.max(i.from,Math.min(l,c)),to:Math.min(i.to,Math.max(l,c))}}function LCt(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let i=Math.max(n.from,e.viewport.from),r=Math.min(n.to,e.viewport.to),s=e.textDirection==Tr.LTR,a=e.contentDOM,l=a.getBoundingClientRect(),c=j2e(e),u=a.querySelector(".cm-line"),d=u&&window.getComputedStyle(u),f=l.left+(d?parseInt(d.paddingLeft)+Math.min(0,parseInt(d.textIndent)):0),h=l.right-(d?parseInt(d.paddingRight):0),p=_$(e,i,1),g=_$(e,r,-1),b=p.type==no.Text?p:null,v=g.type==no.Text?g:null;if(b&&(e.lineWrapping||p.widgetLineBreaks)&&(b=tJ(e,i,1,b)),v&&(e.lineWrapping||g.widgetLineBreaks)&&(v=tJ(e,r,-1,v)),b&&v&&b.from==v.from&&b.to==v.to)return x(w(n.from,n.to,b));{let k=b?w(n.from,null,b):O(p,!1),S=v?w(null,n.to,v):O(g,!0),E=[];return(b||p).to<(v||g).from-(b&&v?1:0)||p.widgetLineBreaks>1&&k.bottom+e.defaultLineHeight/2T&&A.from=P)break;I>R&&j(Math.max(B,R),k==null&&B<=T,Math.min(I,P),S==null&&I>=L,M.dir)}if(R=$.to+1,R>=P)break}return _.length==0&&j(T,k==null,L,S==null,e.textDirection),{top:C,bottom:N,horizontal:_}}function O(k,S){let E=l.top+(S?k.top:k.bottom);return{top:E,bottom:E,horizontal:[]}}}function $Ct(e,t){return e.constructor==t.constructor&&e.eq(t)}class FCt{constructor(t,n){this.view=t,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,t)}update(t){t.startState.facet(EA)!=t.state.facet(EA)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){this.layer.updateOnDocViewUpdate!==!1&&t.requestMeasure(this.measureReq)}setOrder(t){let n=0,i=t.facet(EA);for(;n!$Ct(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of t)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=t,zt.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const EA=Vt.define();function R2e(e){return[Ns.define(t=>new FCt(t,e)),EA.of(e)]}const ox=Vt.define({combine(e){return sf(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(t,n)=>Math.min(t,n),drawRangeCursor:(t,n)=>t||n})}});function BCt(e={}){return[ox.of(e),UCt,QCt,zCt,r2e.of(!0)]}function I2e(e){return e.startState.facet(ox)!=e.state.facet(ox)}const UCt=R2e({above:!0,markers(e){let{state:t}=e,n=t.facet(ox),i=[];for(let r of t.selection.ranges){let s=r==t.selection.main;if(r.empty||n.drawRangeCursor&&!(s&&zt.ios&&n.iosSelectionHandles)){let a=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=r.empty?r:Ze.cursor(r.head,r.assoc);for(let c of ab.forRange(e,a,l))i.push(c)}}return i},update(e,t){e.transactions.some(i=>i.selection)&&(t.style.animationName=t.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=I2e(e);return n&&nJ(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){nJ(t.state,e)},class:"cm-cursorLayer"});function nJ(e,t){t.style.animationDuration=e.facet(ox).cursorBlinkRate+"ms"}const QCt=R2e({above:!1,markers(e){let t=[],{main:n,ranges:i}=e.state.selection;for(let r of i)if(!r.empty)for(let s of ab.forRange(e,"cm-selectionBackground",r))t.push(s);if(zt.ios&&!n.empty&&e.state.facet(ox).iosSelectionHandles){for(let r of ab.forRange(e,"cm-selectionHandle cm-selectionHandle-start",Ze.cursor(n.from,1)))t.push(r);for(let r of ab.forRange(e,"cm-selectionHandle cm-selectionHandle-end",Ze.cursor(n.to,1)))t.push(r)}return t},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||I2e(e)},class:"cm-selectionLayer"}),zCt=Xh.highest(Pt.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),P2e=Fn.define({map(e,t){return e==null?null:t.mapPos(e)}}),HO=io.define({create(){return null},update(e,t){return e!=null&&(e=t.changes.mapPos(e)),t.effects.reduce((n,i)=>i.is(P2e)?i.value:n,e)}}),VCt=Ns.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(HO);n==null?this.cursor!=null&&((t=this.cursor)===null||t===void 0||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(HO)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(HO),n=t!=null&&e.coordsAtPos(t);if(!n)return null;let i=e.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-i.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(HO)!=e&&this.view.dispatch({effects:P2e.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){(e.target==this.view.contentDOM||!this.view.contentDOM.contains(e.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function HCt(){return[HO,VCt]}function iJ(e,t,n,i,r){t.lastIndex=0;for(let s=e.iterRange(n,i),a=n,l;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;l=t.exec(s.value);)r(a+l.index,l)}function qCt(e,t){let n=e.visibleRanges;if(n.length==1&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(e.state.doc.lineAt(r).from,r-t),s=Math.min(e.state.doc.lineAt(s).to,s+t),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class WCt{constructor(t){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:a=1e3}=t;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(l,c,u,d)=>r(d,u,u+l[0].length,l,c);else if(typeof i=="function")this.addMatch=(l,c,u,d)=>{let f=i(l,c,u);f&&d(u,u+l[0].length,f)};else if(i)this.addMatch=(l,c,u,d)=>d(u,u+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=a}createDeco(t){let n=new Dh,i=n.add.bind(n);for(let{from:r,to:s}of qCt(t,this.maxLength))iJ(t.state.doc,this.regexp,r,s,(a,l)=>this.addMatch(l,t,a,i));return n.finish()}updateDeco(t,n){let i=1e9,r=-1;return t.docChanged&&t.changes.iterChanges((s,a,l,c)=>{c>=t.view.viewport.from&&l<=t.view.viewport.to&&(i=Math.min(l,i),r=Math.max(c,r))}),t.viewportMoved||r-i>1e3?this.createDeco(t.view):r>-1?this.updateRange(t.view,n.map(t.changes),i,r):n}updateRange(t,n,i,r){for(let s of t.visibleRanges){let a=Math.max(s.from,i),l=Math.min(s.to,r);if(l>=a){let c=t.state.doc.lineAt(a),u=c.toc.from;a--)if(this.boundary.test(c.text[a-1-c.from])){d=a;break}for(;lh.push(y.range(b,v));if(c==u)for(this.regexp.lastIndex=d-c.from;(p=this.regexp.exec(c.text))&&p.indexthis.addMatch(v,t,b,g));n=n.update({filterFrom:d,filterTo:f,filter:(b,v)=>bf,add:h})}}return n}}const M$=/x/.unicode!=null?"gu":"g",KCt=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,M$),GCt={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let l5=null;function XCt(){var e;if(l5==null&&typeof document<"u"&&document.body){let t=document.body.style;l5=((e=t.tabSize)!==null&&e!==void 0?e:t.MozTabSize)!=null}return l5||!1}const CA=Vt.define({combine(e){let t=sf(e,{render:null,specialChars:KCt,addSpecialChars:null});return(t.replaceTabs=!XCt())&&(t.specialChars=new RegExp(" |"+t.specialChars.source,M$)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,M$)),t}});function YCt(e={}){return[CA.of(e),ZCt()]}let rJ=null;function ZCt(){return rJ||(rJ=Ns.fromClass(class{constructor(e){this.view=e,this.decorations=mn.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(CA)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new WCt({regexp:e.specialChars,decoration:(t,n,i)=>{let{doc:r}=n.state,s=al(t[0],0);if(s==9){let a=r.lineAt(i),l=n.state.tabSize,c=Qu(a.text,l,i-a.from);return mn.replace({widget:new nTt((l-c%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=mn.replace({widget:new tTt(e,s)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(CA);e.startState.facet(CA)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))}const JCt="•";function eTt(e){return e>=32?JCt:e==10?"␤":String.fromCharCode(9216+e)}class tTt extends Zu{constructor(t,n){super(),this.options=t,this.code=n}eq(t){return t.code==this.code}toDOM(t){let n=eTt(this.code),i=t.state.phrase("Control character")+" "+(GCt[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class nTt extends Zu{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent=" ",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}function iTt(){return sTt}const rTt=mn.line({class:"cm-activeLine"}),sTt=Ns.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let i of e.state.selection.ranges){let r=e.lineBlockAt(i.head);r.from>t&&(n.push(rTt.range(r.from)),t=r.from)}return mn.set(n)}},{decorations:e=>e.decorations});class aTt extends Zu{constructor(t){super(),this.content=t}toDOM(t){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(t):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(t){let n=t.firstChild?Bw(t.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(t.parentNode),r=tk(n[0],i.direction!="rtl"),s=parseInt(i.lineHeight);return r.bottom-r.top>s*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+s}:r}ignoreEvent(){return!1}}function oTt(e){let t=Ns.fromClass(class{constructor(n){this.view=n,this.placeholder=e?mn.set([mn.widget({widget:new aTt(e),side:1}).range(0)]):mn.none}get decorations(){return this.view.state.doc.length?mn.none:this.placeholder}},{decorations:n=>n.decorations});return typeof e=="string"?[t,Pt.contentAttributes.of({"aria-placeholder":e})]:t}const L$=2e3;function lTt(e,t,n){let i=Math.min(t.line,n.line),r=Math.max(t.line,n.line),s=[];if(t.off>L$||n.off>L$||t.col<0||n.col<0){let a=Math.min(t.off,n.off),l=Math.max(t.off,n.off);for(let c=i;c<=r;c++){let u=e.doc.line(c);u.length<=l&&s.push(Ze.range(u.from+a,u.to+l))}}else{let a=Math.min(t.col,n.col),l=Math.max(t.col,n.col);for(let c=i;c<=r;c++){let u=e.doc.line(c),d=g$(u.text,a,e.tabSize,!0);if(d<0)s.push(Ze.cursor(u.to));else{let f=g$(u.text,l,e.tabSize);s.push(Ze.range(u.from+d,u.from+f))}}}return s}function cTt(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}function sJ(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),i=e.state.doc.lineAt(n),r=n-i.from,s=r>L$?-1:r==i.length?cTt(e,t.clientX):Qu(i.text,e.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function uTt(e,t){let n=sJ(e,t),i=e.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),a=r.state.doc.lineAt(s);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},i=i.map(r.changes)}},get(r,s,a){let l=sJ(e,r);if(!l)return i;let c=lTt(e.state,n,l);return c.length?a?Ze.create(c.concat(i.ranges)):Ze.create(c):i}}:null}function dTt(e){let t=n=>n.altKey&&n.button==0;return Pt.mouseSelectionStyle.of((n,i)=>t(i)?uTt(n,i):null)}const fTt={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},hTt={style:"cursor: crosshair"};function pTt(e={}){let[t,n]=fTt[e.key||"Alt"],i=Ns.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==t||n(r))},keyup(r){(r.keyCode==t||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,Pt.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?hTt:null})]}const e2="-10000px";class D2e{constructor(t,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=t.state.facet(n),this.tooltips=this.input.filter(a=>a);let s=null;this.tooltipViews=this.tooltips.map(a=>s=i(a,s))}update(t,n){var i;let r=t.state.facet(this.facet),s=r.filter(c=>c);if(r===this.input){for(let c of this.tooltipViews)c.update&&c.update(t);return!1}let a=[],l=n?[]:null;for(let c=0;cn[u]=c),n.length=l.length),this.input=r,this.tooltips=s,this.tooltipViews=a,!0}}function mTt(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}const c5=Vt.define({combine:e=>{var t,n,i;return{position:zt.ios?"absolute":((t=e.find(r=>r.position))===null||t===void 0?void 0:t.position)||"fixed",parent:((n=e.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=e.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||mTt}}}),aJ=new WeakMap,JU=Ns.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(c5);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new D2e(e,eQ,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,i=e.state.facet(c5);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),i=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=e2,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(e=i.destroy)===null||e===void 0||e.call(i);this.parent&&this.container.remove(),(t=this.resizeObserver)===null||t===void 0||t.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(zt.safari){let a=s.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(e=s.width/this.parent.offsetWidth,t=s.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=GU(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,a)=>{let l=this.manager.tooltipViews[a];return l.getCoords?l.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(c5).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:s}=e,a=[];for(let l=0;l=Math.min(n.bottom,i.bottom)||f.rightMath.min(n.right,i.right)+.1)){d.style.top=e2;continue}let p=c.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,g=p?7:0,b=h.right-h.left,v=(t=aJ.get(u))!==null&&t!==void 0?t:h.bottom-h.top,y=u.offset||bTt,x=this.view.textDirection==Tr.LTR,w=h.width>i.right-i.left?x?i.left:i.right-h.width:x?Math.max(i.left,Math.min(f.left-(p?14:0)+y.x,i.right-b)):Math.min(Math.max(i.left,f.left-b+(p?14:0)-y.x),i.right-b),O=this.above[l];!c.strictSide&&(O?f.top-v-g-y.yi.bottom)&&O==i.bottom-f.bottom>f.top-i.top&&(O=this.above[l]=!O);let k=(O?f.top-i.top:i.bottom-f.bottom)-g;if(kw&&C.topS&&(S=O?C.top-v-2-g:C.bottom+g+2);if(this.position=="absolute"?(d.style.top=(S-e.parent.top)/s+"px",oJ(d,(w-e.parent.left)/r)):(d.style.top=S/s+"px",oJ(d,w/r)),p){let C=f.left+(x?y.x:-y.x)-(w+14-7);p.style.left=C/r+"px"}u.overlap!==!0&&a.push({left:w,top:S,right:E,bottom:S+v}),d.classList.toggle("cm-tooltip-above",O),d.classList.toggle("cm-tooltip-below",!O),u.positioned&&u.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=e2}},{eventObservers:{scroll(){this.maybeMeasure()}}});function oJ(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}const gTt=Pt.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),bTt={x:0,y:0},eQ=Vt.define({enables:[JU,gTt]}),IN=Vt.define({combine:e=>e.reduce((t,n)=>t.concat(n),[])});class yI{static create(t){return new yI(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new D2e(t,IN,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(t,n){let i=t.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(t){for(let n of this.manager.tooltipViews)n.mount&&n.mount(t);this.mounted=!0}positioned(t){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let n of this.manager.tooltipViews)(t=n.destroy)===null||t===void 0||t.call(n)}passProp(t){let n;for(let i of this.manager.tooltipViews){let r=i[t];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const yTt=eQ.compute([IN],e=>{let t=e.facet(IN);return t.length===0?null:{pos:Math.min(...t.map(n=>n.pos)),end:Math.max(...t.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:yI.create,above:t[0].above,arrow:t.some(n=>n.arrow)}}),M2e=Vt.define();class vTt{constructor(t,n,i,r,s,a){this.view=t,this.source=n,this.field=i,this.locked=r,this.setHover=s,this.hoverTime=a,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(t){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;ta.bottom||n.xa.right+t.defaultCharacterWidth)return;let l=t.bidiSpans(t.state.doc.lineAt(r)).find(u=>u.from<=r&&u.to>=r),c=l&&l.dir==Tr.RTL?-1:1;s=n.x{if(l&&!(Array.isArray(l)&&!l.length)){let c=Array.isArray(l)?l:[l];r&&this.locked.set(c,r),t.dispatch({effects:this.setHover.of(c)})}};if(s&&"then"in s){let l=this.pending={pos:n};s.then(c=>{this.pending==l&&(this.pending=null,a(c))},c=>fl(t.state,c,"hover tooltip"))}else a(s)}get tooltip(){let t=this.view.plugin(JU),n=t?t.manager.tooltips.findIndex(i=>i.create==yI.create):-1;return n>-1?t.manager.tooltipViews[n]:null}mousemove(t){var n,i;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&!this.locked.has(r)&&s&&!xTt(s.dom,t)||this.pending){let{pos:a}=r[0]||this.pending,l=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:a;(a==l?this.view.posAtCoords(this.lastMove)!=a:!OTt(this.view,a,l,t.clientX,t.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length&&!this.locked.has(n)){let{tooltip:i}=this;i&&i.dom.contains(t.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let n=i=>{t.removeEventListener("mouseleave",n);let{active:r}=this;r.length&&!this.locked.has(r)&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const t2=4;function xTt(e,t){let{left:n,right:i,top:r,bottom:s}=e.getBoundingClientRect(),a;if(a=e.querySelector(".cm-tooltip-arrow")){let l=a.getBoundingClientRect();r=Math.min(l.top,r),s=Math.max(l.bottom,s)}return t.clientX>=n-t2&&t.clientX<=i+t2&&t.clientY>=r-t2&&t.clientY<=s+t2}function OTt(e,t,n,i,r,s){let a=e.scrollDOM.getBoundingClientRect(),l=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>i||a.rightr||Math.min(a.bottom,l)=t&&c<=n}function wTt(e,t={}){let n=Fn.define(),i=new WeakMap,r=io.define({create(){return[]},update(a,l){let c=i.get(a);if(a.length&&(t.hideOnChange&&(l.docChanged||l.selection)?a=[]:c&&c(l)?a=[]:t.hideOn&&(a=a.filter(u=>!t.hideOn(l,u)))),l.docChanged&&a.length){let u=[];for(let d of a){let f=l.changes.mapPos(d.pos,-1,Za.TrackDel);if(f!=null){let h=Object.assign(Object.create(null),d);h.pos=f,h.end!=null&&(h.end=l.changes.mapPos(h.end)),u.push(h)}}a=u}for(let u of l.effects)u.is(n)&&(a=u.value,c=void 0),(u.is(kTt)&&!u.value||u.value==r)&&(a=[]);return a.length&&c&&i.set(a,c),a},provide:a=>IN.from(a)});const s=Ns.define(a=>new vTt(a,e,r,i,n,t.hoverTime||300));return{active:r,extension:[r,s,M2e.of(s),yTt]}}function STt(e,t,n,i={}){var r;let s=e.state.facet(M2e).map(a=>e.plugin(a)).filter(a=>!!a);if(i.tooltip&&i.tooltip.active){let a=s.find(l=>l.field==i.tooltip.active);a&&(s=[a])}for(let a of s)a.activateHover(e,t,n,(r=i.until)!==null&&r!==void 0?r:()=>!1)}function L2e(e,t){let n=e.plugin(JU);if(!n)return null;let i=n.manager.tooltips.indexOf(t);return i<0?null:n.manager.tooltipViews[i]}const kTt=Fn.define(),lJ=Vt.define({combine(e){let t,n;for(let i of e)t=t||i.topContainer,n=n||i.bottomContainer;return{topContainer:t,bottomContainer:n}}});function tQ(e,t){let n=e.plugin($2e),i=n?n.specs.indexOf(t):-1;return i>-1?n.panels[i]:null}const $2e=Ns.fromClass(class{constructor(e){this.input=e.state.facet(ik),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(e));let t=e.state.facet(lJ);this.top=new n2(e,!0,t.topContainer),this.bottom=new n2(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(e){let t=e.state.facet(lJ);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new n2(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new n2(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(ik);if(n!=this.input){let i=n.filter(c=>c),r=[],s=[],a=[],l=[];for(let c of i){let u=this.specs.indexOf(c),d;u<0?(d=c(e.view),l.push(d)):(d=this.panels[u],d.update&&d.update(e)),r.push(d),(d.top?s:a).push(d)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(a);for(let c of l)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let i of this.panels)i.update&&i.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>Pt.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class n2{constructor(t,n,i){this.view=t,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let n of this.panels)n.destroy&&t.indexOf(n)<0&&n.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let t=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;t!=n.dom;)t=cJ(t);t=t.nextSibling}else this.dom.insertBefore(n.dom,t);for(;t;)t=cJ(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function cJ(e){let t=e.nextSibling;return e.remove(),t}const ik=Vt.define({enables:$2e});function ETt(e,t){let n,i=new Promise(a=>n=a),r=a=>CTt(a,t,n);e.state.field(u5,!1)?e.dispatch({effects:F2e.of(r)}):e.dispatch({effects:Fn.appendConfig.of(u5.init(()=>[r]))});let s=B2e.of(r);return{close:s,result:i.then(a=>((e.win.queueMicrotask||(c=>e.win.setTimeout(c,10)))(()=>{e.state.field(u5).indexOf(r)>-1&&e.dispatch({effects:s})}),a))}}const u5=io.define({create(){return[]},update(e,t){for(let n of t.effects)n.is(F2e)?e=[n.value].concat(e):n.is(B2e)&&(e=e.filter(i=>i!=n.value));return e},provide:e=>ik.computeN([e],t=>t.field(e))}),F2e=Fn.define(),B2e=Fn.define();function CTt(e,t,n){let i=t.content?t.content(e,()=>a(null)):null;if(!i){if(i=yr("form"),t.input){let l=yr("input",t.input);/^(text|password|number|email|tel|url)$/.test(l.type)&&l.classList.add("cm-textfield"),l.name||(l.name="input"),i.appendChild(yr("label",(t.label||"")+": ",l))}else i.appendChild(document.createTextNode(t.label||""));i.appendChild(document.createTextNode(" ")),i.appendChild(yr("button",{class:"cm-button",type:"submit"},t.submitLabel||"OK"))}let r=i.nodeName=="FORM"?[i]:i.querySelectorAll("form");for(let l=0;l{u.keyCode==27?(u.preventDefault(),a(null)):u.keyCode==13&&(u.preventDefault(),a(c))}),c.addEventListener("submit",u=>{u.preventDefault(),a(c)})}let s=yr("div",i,yr("button",{onclick:()=>a(null),"aria-label":e.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));t.class&&(s.className=t.class),s.classList.add("cm-dialog");function a(l){s.contains(s.ownerDocument.activeElement)&&e.focus(),n(l)}return{dom:s,top:t.top,mount:()=>{if(t.focus){let l;typeof t.focus=="string"?l=i.querySelector(t.focus):l=i.querySelector("input")||i.querySelector("button"),l&&"select"in l?l.select():l&&"focus"in l&&l.focus()}}}}class Lh extends Nm{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}Lh.prototype.elementClass="";Lh.prototype.toDOM=void 0;Lh.prototype.mapMode=Za.TrackBefore;Lh.prototype.startSide=Lh.prototype.endSide=-1;Lh.prototype.point=!0;const TA=Vt.define(),TTt=Vt.define(),ATt={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ei.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},zw=Vt.define();function _Tt(e){return[U2e(),zw.of({...ATt,...e})]}const uJ=Vt.define({combine:e=>e.some(t=>t)});function U2e(e){return[NTt]}const NTt=Ns.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(zw).map(t=>new fJ(e,t)),this.fixed=!e.state.facet(uJ);for(let t of this.gutters)t.config.side=="after"?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,i=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(e.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet(uJ)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ei.iter(this.view.state.facet(TA),this.view.viewport.from),i=[],r=this.gutters.map(s=>new jTt(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let a=!0;for(let l of s.type)if(l.type==no.Text&&a){$$(n,i,l.from);for(let c of r)c.line(this.view,l,i);a=!1}else if(l.widget)for(let c of r)c.widget(this.view,l)}else if(s.type==no.Text){$$(n,i,s.from);for(let a of r)a.line(this.view,s,i)}else if(s.widget)for(let a of r)a.widget(this.view,s);for(let s of r)s.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(zw),n=e.state.facet(zw),i=e.docChanged||e.heightChanged||e.viewportChanged||!Ei.eq(e.startState.facet(TA),e.state.facet(TA),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let r of this.gutters)r.update(e)&&(i=!0);else{i=!0;let r=[];for(let s of n){let a=t.indexOf(s);a<0?r.push(new fJ(this.view,s)):(this.gutters[a].update(e),r.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>Pt.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*t.scaleX,r=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==Tr.LTR?{left:i,right:r}:{right:i,left:r}})});function dJ(e){return Array.isArray(e)?e:[e]}function $$(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class jTt{constructor(t,n,i){this.gutter=t,this.height=i,this.i=0,this.cursor=Ei.iter(t.markers,n.from)}addElement(t,n,i){let{gutter:r}=this,s=(n.top-this.height)/t.scaleY,a=n.height/t.scaleY;if(this.i==r.elements.length){let l=new Q2e(t,a,s,i);r.elements.push(l),r.dom.appendChild(l.dom)}else r.elements[this.i].update(t,a,s,i);this.height=n.bottom,this.i++}line(t,n,i){let r=[];$$(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(t,n,r);s&&r.unshift(s);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(t,n,r)}widget(t,n){let i=this.gutter.config.widgetMarker(t,n.widget,n),r=i?[i]:null;for(let s of t.state.facet(TTt)){let a=s(t,n.widget,n);a&&(r||(r=[])).push(a)}r&&this.addElement(t,n,r)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let n=t.elements.pop();t.dom.removeChild(n.dom),n.destroy()}}}class fJ{constructor(t,n){this.view=t,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let c=s.getBoundingClientRect();a=(c.top+c.bottom)/2}else a=r.clientY;let l=t.lineBlockAtHeight(a-t.documentTop);n.domEventHandlers[i](t,l,r)&&r.preventDefault()});this.markers=dJ(n.markers(t)),n.initialSpacer&&(this.spacer=new Q2e(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let n=this.markers;if(this.markers=dJ(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],t);r!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[r])}let i=t.view.viewport;return!Ei.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(t):!1)}destroy(){for(let t of this.elements)t.destroy()}}class Q2e{constructor(t,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,n,i,r)}update(t,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),RTt(this.markers,r)||this.setMarkers(t,r)}setMarkers(t,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,a=0;;){let l=a,c=ss(l,c,u)||a(l,c,u):a}return i}})}});class d5 extends Lh{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function f5(e,t){return e.state.facet(My).formatNumber(t,e.state)}const DTt=zw.compute([My],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(t){return t.state.facet(ITt)},lineMarker(t,n,i){return i.some(r=>r.toDOM)?null:new d5(f5(t,t.state.doc.lineAt(n.from).number))},widgetMarker:(t,n,i)=>{for(let r of t.state.facet(PTt)){let s=r(t,n,i);if(s)return s}return null},lineMarkerChange:t=>t.startState.facet(My)!=t.state.facet(My),initialSpacer(t){return new d5(f5(t,hJ(t.state.doc.lines)))},updateSpacer(t,n){let i=f5(n.view,hJ(n.view.state.doc.lines));return i==t.number?t:new d5(i)},domEventHandlers:e.facet(My).domEventHandlers,side:"before"}));function z2e(e={}){return[My.of(e),U2e(),DTt]}function hJ(e){let t=9;for(;t{let t=[],n=-1;for(let i of e.selection.ranges){let r=e.doc.lineAt(i.head).from;r>n&&(n=r,t.push(MTt.range(r)))}return Ei.of(t)});function $Tt(){return LTt}let FTt=0,Od=class F${constructor(t,n,i,r){this.name=t,this.set=n,this.base=i,this.modified=r,this.id=FTt++}toString(){let{name:t}=this;for(let n of this.modified)n.name&&(t=`${n.name}(${t})`);return t}static define(t,n){let i=typeof t=="string"?t:"?";if(t instanceof F$&&(n=t),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let r=new F$(i,[],null,[]);if(r.set.push(r),n)for(let s of n.set)r.set.push(s);return r}static defineModifier(t){let n=new PN(t);return i=>i.modified.indexOf(n)>-1?i:PN.get(i.base||i,i.modified.concat(n).sort((r,s)=>r.id-s.id))}},BTt=0;class PN{constructor(t){this.name=t,this.instances=[],this.id=BTt++}static get(t,n){if(!n.length)return t;let i=n[0].instances.find(l=>l.base==t&&UTt(n,l.modified));if(i)return i;let r=[],s=new Od(t.name,r,t,n);for(let l of n)l.instances.push(s);let a=QTt(n);for(let l of t.set)if(!l.modified.length)for(let c of a)r.push(PN.get(l,c));return s}}function UTt(e,t){return e.length==t.length&&e.every((n,i)=>n==t[i])}function QTt(e){let t=[[]];for(let n=0;ni.length-n.length)}function Yh(e){let t=Object.create(null);for(let n in e){let i=e[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],a=2,l=r;for(let f=0;;){if(l=="..."&&f>0&&f+3==r.length){a=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!h)throw new RangeError("Invalid path: "+r);if(s.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==r.length)break;let p=r[f++];if(f==r.length&&p=="!"){a=0;break}if(p!="/")throw new RangeError("Invalid path: "+r);l=r.slice(f)}let c=s.length-1,u=s[c];if(!u)throw new RangeError("Invalid path: "+r);let d=new rk(i,a,c>0?s.slice(0,c):null);t[u]=d.sort(t[u])}}return V2e.add(t)}const V2e=new Pn({combine(e,t){let n,i,r;for(;e||t;){if(!e||t&&e.depth>=t.depth?(r=t,t=t.next):(r=e,e=e.next),n&&n.mode==r.mode&&!r.context&&!n.context)continue;let s=new rk(r.tags,r.mode,r.context);n?n.next=s:i=s,n=s}return i}});let rk=class{constructor(t,n,i,r){this.tags=t,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth{let a=r;for(let l of s)for(let c of l.set){let u=n[c.id];if(u){a=a?a+" "+u:u;break}}return a},scope:i}}function zTt(e,t){let n=null;for(let i of e){let r=i.style(t);r&&(n=n?n+" "+r:r)}return n}function VTt(e,t,n,i=0,r=e.length){let s=new HTt(i,Array.isArray(t)?t:[t],n);s.highlightRange(e.cursor(),i,r,"",s.highlighters),s.flush(r)}class HTt{constructor(t,n,i){this.at=t,this.highlighters=n,this.span=i,this.class=""}startSpan(t,n){n!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=n)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,n,i,r,s){let{type:a,from:l,to:c}=t;if(l>=i||c<=n)return;a.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(a)));let u=r,d=qTt(t)||rk.empty,f=zTt(s,d.tags);if(f&&(u&&(u+=" "),u+=f,d.mode==1&&(r+=(r?" ":"")+f)),this.startSpan(Math.max(n,l),u),d.opaque)return;let h=t.tree&&t.tree.prop(Pn.mounted);if(h&&h.overlay){let p=t.node.enter(h.overlay[0].from+l,1),g=this.highlighters.filter(v=>!v.scope||v.scope(h.tree.type)),b=t.firstChild();for(let v=0,y=l;;v++){let x=v=w||!t.nextSibling())););if(!x||w>i)break;y=x.to+l,y>n&&(this.highlightRange(p.cursor(),Math.max(n,x.from+l),Math.min(i,y),"",g),this.startSpan(Math.min(i,y),u))}b&&t.parent()}else if(t.firstChild()){h&&(r="");do if(!(t.to<=n)){if(t.from>=i)break;this.highlightRange(t,n,i,r,s),this.startSpan(Math.min(i,t.to),u)}while(t.nextSibling());t.parent()}}}function qTt(e){let t=e.type.prop(V2e);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}const $t=Od.define,i2=$t(),Ap=$t(),pJ=$t(Ap),mJ=$t(Ap),_p=$t(),r2=$t(_p),h5=$t(_p),bd=$t(),cg=$t(bd),hd=$t(),pd=$t(),B$=$t(),tO=$t(B$),s2=$t(),ne={comment:i2,lineComment:$t(i2),blockComment:$t(i2),docComment:$t(i2),name:Ap,variableName:$t(Ap),typeName:pJ,tagName:$t(pJ),propertyName:mJ,attributeName:$t(mJ),className:$t(Ap),labelName:$t(Ap),namespace:$t(Ap),macroName:$t(Ap),literal:_p,string:r2,docString:$t(r2),character:$t(r2),attributeValue:$t(r2),number:h5,integer:$t(h5),float:$t(h5),bool:$t(_p),regexp:$t(_p),escape:$t(_p),color:$t(_p),url:$t(_p),keyword:hd,self:$t(hd),null:$t(hd),atom:$t(hd),unit:$t(hd),modifier:$t(hd),operatorKeyword:$t(hd),controlKeyword:$t(hd),definitionKeyword:$t(hd),moduleKeyword:$t(hd),operator:pd,derefOperator:$t(pd),arithmeticOperator:$t(pd),logicOperator:$t(pd),bitwiseOperator:$t(pd),compareOperator:$t(pd),updateOperator:$t(pd),definitionOperator:$t(pd),typeOperator:$t(pd),controlOperator:$t(pd),punctuation:B$,separator:$t(B$),bracket:tO,angleBracket:$t(tO),squareBracket:$t(tO),paren:$t(tO),brace:$t(tO),content:bd,heading:cg,heading1:$t(cg),heading2:$t(cg),heading3:$t(cg),heading4:$t(cg),heading5:$t(cg),heading6:$t(cg),contentSeparator:$t(bd),list:$t(bd),quote:$t(bd),emphasis:$t(bd),strong:$t(bd),link:$t(bd),monospace:$t(bd),strikethrough:$t(bd),inserted:$t(),deleted:$t(),changed:$t(),invalid:$t(),meta:s2,documentMeta:$t(s2),annotation:$t(s2),processingInstruction:$t(s2),definition:Od.defineModifier("definition"),constant:Od.defineModifier("constant"),function:Od.defineModifier("function"),standard:Od.defineModifier("standard"),local:Od.defineModifier("local"),special:Od.defineModifier("special")};for(let e in ne){let t=ne[e];t instanceof Od&&(t.name=e)}H2e([{tag:ne.link,class:"tok-link"},{tag:ne.heading,class:"tok-heading"},{tag:ne.emphasis,class:"tok-emphasis"},{tag:ne.strong,class:"tok-strong"},{tag:ne.keyword,class:"tok-keyword"},{tag:ne.atom,class:"tok-atom"},{tag:ne.bool,class:"tok-bool"},{tag:ne.url,class:"tok-url"},{tag:ne.labelName,class:"tok-labelName"},{tag:ne.inserted,class:"tok-inserted"},{tag:ne.deleted,class:"tok-deleted"},{tag:ne.literal,class:"tok-literal"},{tag:ne.string,class:"tok-string"},{tag:ne.number,class:"tok-number"},{tag:[ne.regexp,ne.escape,ne.special(ne.string)],class:"tok-string2"},{tag:ne.variableName,class:"tok-variableName"},{tag:ne.local(ne.variableName),class:"tok-variableName tok-local"},{tag:ne.definition(ne.variableName),class:"tok-variableName tok-definition"},{tag:ne.special(ne.variableName),class:"tok-variableName2"},{tag:ne.definition(ne.propertyName),class:"tok-propertyName tok-definition"},{tag:ne.typeName,class:"tok-typeName"},{tag:ne.namespace,class:"tok-namespace"},{tag:ne.className,class:"tok-className"},{tag:ne.macroName,class:"tok-macroName"},{tag:ne.propertyName,class:"tok-propertyName"},{tag:ne.operator,class:"tok-operator"},{tag:ne.comment,class:"tok-comment"},{tag:ne.meta,class:"tok-meta"},{tag:ne.invalid,class:"tok-invalid"},{tag:ne.punctuation,class:"tok-punctuation"}]);var p5;const Kp=new Pn;function vI(e){return Vt.define({combine:e?t=>t.concat(e):void 0})}const nQ=new Pn;class Zl{constructor(t,n,i=[],r=""){this.data=t,this.name=r,ji.prototype.hasOwnProperty("tree")||Object.defineProperty(ji.prototype,"tree",{get(){return wr(this)}}),this.parser=n,this.extension=[Pm.of(this),ji.languageData.of((s,a,l)=>{let c=gJ(s,a,l),u=c.type.prop(Kp);if(!u)return[];let d=s.facet(u),f=c.type.prop(nQ);if(f){let h=c.resolve(a-c.from,l);for(let p of f)if(p.test(h,s)){let g=s.facet(p.facet);return p.type=="replace"?g:g.concat(d)}}return d})].concat(i)}isActiveAt(t,n,i=-1){return gJ(t,n,i).type.prop(Kp)==this.data}findRegions(t){let n=t.facet(Pm);if((n==null?void 0:n.data)==this.data)return[{from:0,to:t.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,a)=>{if(s.prop(Kp)==this.data){i.push({from:a,to:a+s.length});return}let l=s.prop(Pn.mounted);if(l){if(l.tree.prop(Kp)==this.data){if(l.overlay)for(let c of l.overlay)i.push({from:c.from+a,to:c.to+a});else i.push({from:a,to:a+s.length});return}else if(l.overlay){let c=i.length;if(r(l.tree,l.overlay[0].from+a),i.length>c)return}}for(let c=0;ci.isTop?n:void 0)]}),t.name)}configure(t,n){return new $h(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function wr(e){let t=e.field(Zl.state,!1);return t?t.tree:gi.empty}class WTt{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,n){let i=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,n):this.string.slice(t-i,n-i)}}let nO=null;class Rb{constructor(t,n,i=[],r,s,a,l,c){this.parser=t,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=a,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(t,n,i){return new Rb(t,n,[],gi.empty,0,i,[],null)}startParse(){return this.parser.startParse(new WTt(this.state.doc),this.fragments)}work(t,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=gi.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof t=="number"){let r=Date.now()+t;t=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped(bh.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let n=nO;nO=this;try{return t()}finally{nO=n}}withoutTempSkipped(t){for(let n;n=this.tempSkipped.pop();)t=bJ(t,n.from,n.to);return t}changes(t,n){let{fragments:i,tree:r,treeLen:s,viewport:a,skipped:l}=this;if(this.takeTree(),!t.empty){let c=[];if(t.iterChangedRanges((u,d,f,h)=>c.push({fromA:u,toA:d,fromB:f,toB:h})),i=bh.applyChanges(i,c),r=gi.empty,s=0,a={from:t.mapPos(a.from,-1),to:t.mapPos(a.to,1)},this.skipped.length){l=[];for(let u of this.skipped){let d=t.mapPos(u.from,1),f=t.mapPos(u.to,-1);dt.from&&(this.fragments=bJ(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,n){this.skipped.push({from:t,to:n})}static getSkippingParser(t){return new class extends dI{createParse(n,i,r){let s=r[0].from,a=r[r.length-1].to;return{parsedPos:s,advance(){let c=nO;if(c){for(let u of r)c.tempSkipped.push(u);t&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,t]):t)}return this.parsedPos=a,new gi(ra.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let n=this.fragments;return this.treeLen>=t&&n.length&&n[0].from==0&&n[0].to>=t}static get(){return nO}}function bJ(e,t,n){return bh.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class lx{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new lx(n)}static init(t){let n=Math.min(3e3,t.doc.length),i=Rb.create(t.facet(Pm).parser,t,{from:0,to:n});return i.work(20,n)||i.takeTree(),new lx(i)}}Zl.state=io.define({create:lx.init,update(e,t){for(let n of t.effects)if(n.is(Zl.setState))return n.value;return t.startState.facet(Pm)!=t.state.facet(Pm)?lx.init(t.state):e.apply(t)}});let q2e=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(q2e=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const m5=typeof navigator<"u"&&(!((p5=navigator.scheduling)===null||p5===void 0)&&p5.isInputPending)?()=>navigator.scheduling.isInputPending():null,KTt=Ns.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let n=this.view.state.field(Zl.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(Zl.state);(n.tree!=n.context.tree||!n.context.isDone(t.doc.length))&&(this.working=q2e(this.work))}work(t){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,c=s.context.work(()=>m5&&m5()||Date.now()>a,r+(l?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Zl.setState.of(new lx(s.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(n=>fl(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Pm=Vt.define({combine(e){return e.length?e[0]:null},enables:e=>[Zl.state,KTt,Pt.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class Dm{constructor(t,n=[]){this.language=t,this.support=n,this.extension=[t,n]}}class DN{constructor(t,n,i,r,s,a=void 0){this.name=t,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=s,this.support=a,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:n,support:i}=t;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new DN(t.name,(t.alias||[]).concat(t.name).map(r=>r.toLowerCase()),t.extensions||[],t.filename,n,i)}static matchFilename(t,n){for(let r of t)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of t)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(t,n,i=!0){n=n.toLowerCase();for(let r of t)if(r.alias.some(s=>s==n))return r;if(i)for(let r of t)for(let s of r.alias){let a=n.indexOf(s);if(a>-1&&(s.length>2||!/\w/.test(n[a-1])&&!/\w/.test(n[a+s.length])))return r}return null}}const GTt=Vt.define(),i1=Vt.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(n=>n!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function Ib(e){let t=e.facet(i1);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function sk(e,t){let n="",i=e.tabSize,r=e.facet(i1)[0];if(r==" "){for(;t>=i;)n+=" ",t-=i;r=" "}for(let s=0;s=t?XTt(e,n,t):null}class xI{constructor(t,n={}){this.state=t,this.options=n,this.unit=Ib(t)}lineAt(t,n=1){let i=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==t?{text:"",from:t}:(n<0?r-1&&(s+=a-this.countColumn(i,i.search(/\S|$/))),s}countColumn(t,n=t.length){return Qu(t,this.state.tabSize,n)}lineIndent(t,n=1){let{text:i,from:r}=this.lineAt(t,n),s=this.options.overrideIndentation;if(s){let a=s(r);if(a>-1)return a}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Zh=new Pn;function XTt(e,t,n){let i=t.resolveStack(n),r=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let a=r;a&&!(a.fromi.node.to||a.from==i.node.from&&a.type==i.node.type);a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)i={node:s[a],next:i}}return W2e(i,e,n)}function W2e(e,t,n){for(let i=e;i;i=i.next){let r=ZTt(i.node);if(r)return r(rQ.create(t,n,i))}return 0}function YTt(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function ZTt(e){let t=e.type.prop(Zh);if(t)return t;let n=e.firstChild,i;if(n&&(i=n.type.prop(Pn.closedBy))){let r=e.lastChild,s=r&&i.indexOf(r.name)>-1;return a=>K2e(a,!0,1,void 0,s&&!YTt(a)?r.from:void 0)}return e.parent==null?JTt:null}function JTt(){return 0}class rQ extends xI{constructor(t,n,i){super(t.state,t.options),this.base=t,this.pos=n,this.context=i}get node(){return this.context.node}static create(t,n,i){return new rQ(t,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let n=this.state.doc.lineAt(t.from);for(;;){let i=t.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(e2t(i,t))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return W2e(this.context.next,this.base,this.pos)}}function e2t(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function t2t(e){let t=e.node,n=t.childAfter(t.from),i=t.lastChild;if(!n)return null;let r=e.options.simulateBreak,s=e.state.doc.lineAt(n.from),a=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let l=n.to;;){let c=t.childAfter(l);if(!c||c==i)return null;if(!c.type.isSkipped){if(c.from>=a)return null;let u=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+u}}l=c.to}}function fv({closing:e,align:t=!0,units:n=1}){return i=>K2e(i,t,n,e)}function K2e(e,t,n,i,r){let s=e.textAfter,a=s.match(/^\s*/)[0].length,l=i&&s.slice(a,a+i.length)==i||r==e.pos+a,c=t?t2t(e):null;return c?l?e.column(c.from):e.column(c.to):e.baseIndent+(l?0:e.unit*n)}const n2t=e=>e.baseIndent;function hv({except:e,units:t=1}={}){return n=>{let i=e&&e.test(n.textAfter);return n.baseIndent+(i?0:t*n.unit)}}const i2t=200;function r2t(){return ji.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:i}=e.newSelection.main,r=n.lineAt(i);if(i>r.from+i2t)return e;let s=n.sliceString(r.from,i);if(!t.some(u=>u.test(s)))return e;let{state:a}=e,l=-1,c=[];for(let{head:u}of a.selection.ranges){let d=a.doc.lineAt(u);if(d.from==l)continue;l=d.from;let f=iQ(a,d.from);if(f==null)continue;let h=/^\s*/.exec(d.text)[0],p=sk(a,f);h!=p&&c.push({from:d.from,to:d.from+h.length,insert:p})}return c.length?[e,{changes:c,sequential:!0}]:e})}const G2e=Vt.define(),Jh=new Pn;function DE(e){let t=e.firstChild,n=e.lastChild;return t&&t.ton)continue;if(s&&l.from=t&&u.to>n&&(s=u)}}return s}function a2t(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function MN(e,t,n){for(let i of e.facet(G2e)){let r=i(e,t,n);if(r)return r}return s2t(e,t,n)}function X2e(e,t){let n=t.mapPos(e.from,1),i=t.mapPos(e.to,-1);return n>=i?void 0:{from:n,to:i}}const OI=Fn.define({map:X2e}),ME=Fn.define({map:X2e});function Y2e(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(i=>i.from<=n&&i.to>=n)||t.push(e.lineBlockAt(n));return t}const Pb=io.define({create(){return mn.none},update(e,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges((i,r)=>e=yJ(e,i,r)),e=e.map(t.changes);let n=[];for(let i of t.effects)i.is(OI)&&!o2t(e,i.value.from,i.value.to)?n.push(i.value):i.is(ME)&&(e=e.update({filter:(r,s)=>i.value.from!=r||i.value.to!=s,filterFrom:i.value.from,filterTo:i.value.to}));if(n.length){let{preparePlaceholder:i}=t.state.facet(eAe),r=n.map(s=>(i?mn.replace({widget:new p2t(i(t.state,s))}):vJ).range(s.from,s.to));e=e.update({add:r})}return t.selection&&(e=yJ(e,t.selection.main.head)),e},provide:e=>Pt.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n{rt&&(i=!0)}),i?e.update({filterFrom:t,filterTo:n,filter:(r,s)=>r>=n||s<=t}):e}function LN(e,t,n){var i;let r=null;return(i=e.field(Pb,!1))===null||i===void 0||i.between(t,n,(s,a)=>{(!r||r.from>s)&&(r={from:s,to:a})}),r}function o2t(e,t,n){let i=!1;return e.between(t,t,(r,s)=>{r==t&&s==n&&(i=!0)}),i}function Z2e(e,t){return e.field(Pb,!1)?t:t.concat(Fn.appendConfig.of(tAe()))}const l2t=e=>{for(let t of Y2e(e)){let n=MN(e.state,t.from,t.to);if(n)return e.dispatch({effects:Z2e(e.state,[OI.of(n),J2e(e,n)])}),!0}return!1},c2t=e=>{if(!e.state.field(Pb,!1))return!1;let t=[];for(let n of Y2e(e)){let i=LN(e.state,n.from,n.to);i&&t.push(ME.of(i),J2e(e,i,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function J2e(e,t,n=!0){let i=e.state.doc.lineAt(t.from).number,r=e.state.doc.lineAt(t.to).number;return Pt.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${e.state.phrase("to")} ${r}.`)}const u2t=e=>{let{state:t}=e,n=[];for(let i=0;i{let t=e.state.field(Pb,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(i,r)=>{n.push(ME.of({from:i,to:r}))}),e.dispatch({effects:n}),!0},f2t=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:l2t},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:c2t},{key:"Ctrl-Alt-[",run:u2t},{key:"Ctrl-Alt-]",run:d2t}],h2t={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},eAe=Vt.define({combine(e){return sf(e,h2t)}});function tAe(e){return[Pb,b2t]}function nAe(e,t){let{state:n}=e,i=n.facet(eAe),r=a=>{let l=e.lineBlockAt(e.posAtDOM(a.target)),c=LN(e.state,l.from,l.to);c&&e.dispatch({effects:ME.of(c)}),a.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(e,r,t);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const vJ=mn.replace({widget:new class extends Zu{toDOM(e){return nAe(e,null)}}});class p2t extends Zu{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return nAe(t,this.value)}}const m2t={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class g5 extends Lh{constructor(t,n){super(),this.config=t,this.open=n}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=t.state.phrase(this.open?"Fold line":"Unfold line"),n}}function g2t(e={}){let t={...m2t,...e},n=new g5(t,!0),i=new g5(t,!1),r=Ns.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Pm)!=a.state.facet(Pm)||a.startState.field(Pb,!1)!=a.state.field(Pb,!1)||wr(a.startState)!=wr(a.state)||t.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let l=new Dh;for(let c of a.viewportLineBlocks){let u=LN(a.state,c.from,c.to)?i:MN(a.state,c.from,c.to)?n:null;u&&l.add(c.from,c.from,u)}return l.finish()}}),{domEventHandlers:s}=t;return[r,_Tt({class:"cm-foldGutter",markers(a){var l;return((l=a.plugin(r))===null||l===void 0?void 0:l.markers)||Ei.empty},initialSpacer(){return new g5(t,!1)},domEventHandlers:{...s,click:(a,l,c)=>{if(s.click&&s.click(a,l,c))return!0;let u=LN(a.state,l.from,l.to);if(u)return a.dispatch({effects:ME.of(u)}),!0;let d=MN(a.state,l.from,l.to);return d?(a.dispatch({effects:OI.of(d)}),!0):!1}}}),tAe()]}const b2t=Pt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class LE{constructor(t,n){this.specs=t;let i;function r(l){let c=jm.newName();return(i||(i=Object.create(null)))["."+c]=l,c}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,a=n.scope;this.scope=a instanceof Zl?l=>l.prop(Kp)==a.data:a?l=>l==a:void 0,this.style=H2e(t.map(l=>({tag:l.tag,class:l.class||r(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=i?new jm(i):null,this.themeType=n.themeType}static define(t,n){return new LE(t,n||{})}}const U$=Vt.define(),iAe=Vt.define({combine(e){return e.length?[e[0]]:null}});function AA(e){let t=e.facet(U$);return t.length?t:e.facet(iAe)}function rAe(e,t){let n=[v2t],i;return e instanceof LE&&(e.module&&n.push(Pt.styleModule.of(e.module)),i=e.themeType),t!=null&&t.fallback?n.push(iAe.of(e)):i?n.push(U$.computeN([Pt.darkTheme],r=>r.facet(Pt.darkTheme)==(i=="dark")?[e]:[])):n.push(U$.of(e)),n}function tHt(e,t,n){let i=AA(e),r=null;if(i){for(let s of i)if(!s.scope||n){let a=s.style(t);a&&(r=r?r+" "+a:a)}}return r}class y2t{constructor(t){this.markCache=Object.create(null),this.tree=wr(t.state),this.decorations=this.buildDeco(t,AA(t.state)),this.decoratedTo=t.viewport.to}update(t){let n=wr(t.state),i=AA(t.state),r=i!=AA(t.startState),{viewport:s}=t.view,a=t.changes.mapPos(this.decoratedTo,1);n.length=s.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=a):(n!=this.tree||t.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(t.view,i),this.decoratedTo=s.to)}buildDeco(t,n){if(!n||!this.tree.length)return mn.none;let i=new Dh;for(let{from:r,to:s}of t.visibleRanges)VTt(this.tree,n,(a,l,c)=>{i.add(a,l,this.markCache[c]||(this.markCache[c]=mn.mark({class:c})))},r,s);return i.finish()}}const v2t=Xh.high(Ns.fromClass(y2t,{decorations:e=>e.decorations})),x2t=LE.define([{tag:ne.meta,color:"#404740"},{tag:ne.link,textDecoration:"underline"},{tag:ne.heading,textDecoration:"underline",fontWeight:"bold"},{tag:ne.emphasis,fontStyle:"italic"},{tag:ne.strong,fontWeight:"bold"},{tag:ne.strikethrough,textDecoration:"line-through"},{tag:ne.keyword,color:"#708"},{tag:[ne.atom,ne.bool,ne.url,ne.contentSeparator,ne.labelName],color:"#219"},{tag:[ne.literal,ne.inserted],color:"#164"},{tag:[ne.string,ne.deleted],color:"#a11"},{tag:[ne.regexp,ne.escape,ne.special(ne.string)],color:"#e40"},{tag:ne.definition(ne.variableName),color:"#00f"},{tag:ne.local(ne.variableName),color:"#30a"},{tag:[ne.typeName,ne.namespace],color:"#085"},{tag:ne.className,color:"#167"},{tag:[ne.special(ne.variableName),ne.macroName],color:"#256"},{tag:ne.definition(ne.propertyName),color:"#00c"},{tag:ne.comment,color:"#940"},{tag:ne.invalid,color:"#f00"}]),O2t=Pt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),sAe=1e4,aAe="()[]{}",oAe=Vt.define({combine(e){return sf(e,{afterCursor:!0,brackets:aAe,maxScanDistance:sAe,renderMatch:k2t})}}),w2t=mn.mark({class:"cm-matchingBracket"}),S2t=mn.mark({class:"cm-nonmatchingBracket"});function k2t(e){let t=[],n=e.matched?w2t:S2t;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function xJ(e){let t=[],n=e.facet(oAe);for(let i of e.selection.ranges){if(!i.empty)continue;let r=Pd(e,i.head,-1,n)||i.head>0&&Pd(e,i.head-1,1,n)||n.afterCursor&&(Pd(e,i.head,1,n)||i.heade.decorations}),C2t=[E2t,O2t];function T2t(e={}){return[oAe.of(e),C2t]}const lAe=new Pn;function Q$(e,t,n){let i=e.prop(t<0?Pn.openedBy:Pn.closedBy);if(i)return i;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function z$(e){let t=e.type.prop(lAe);return t?t(e.node):e}function Pd(e,t,n,i={}){let r=i.maxScanDistance||sAe,s=i.brackets||aAe,a=wr(e),l=a.resolveInner(t,n);for(let c=l;c;c=c.parent){let u=Q$(c.type,n,s);if(u&&c.from0?t>=d.from&&td.from&&t<=d.to))return A2t(e,t,n,c,d,u,s)}}return _2t(e,t,n,a,l.type,r,s)}function A2t(e,t,n,i,r,s,a){let l=i.parent,c={from:r.from,to:r.to},u=0,d=l==null?void 0:l.cursor();if(d&&(n<0?d.childBefore(i.from):d.childAfter(i.to)))do if(n<0?d.to<=i.from:d.from>=i.to){if(u==0&&s.indexOf(d.type.name)>-1&&d.from0)return null;let u={from:n<0?t-1:t,to:n>0?t+1:t},d=e.doc.iterRange(t,n>0?e.doc.length:0),f=0;for(let h=0;!d.next().done&&h<=s;){let p=d.value;n<0&&(h+=p.length);let g=t+h*n;for(let b=n>0?0:p.length-1,v=n>0?p.length:-1;b!=v;b+=n){let y=a.indexOf(p[b]);if(!(y<0||i.resolveInner(g+b,1).type!=r))if(y%2==0==n>0)f++;else{if(f==1)return{start:u,end:{from:g+b,to:g+b+1},matched:y>>1==c>>1};f--}}n>0&&(h+=p.length)}return d.done?{start:u,matched:!1}:null}function OJ(e,t,n,i=0,r=0){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));let s=r;for(let a=i;a=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.posn}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let n=this.string.indexOf(t,this.pos);if(n>-1)return this.pos=n,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosi?a.toLowerCase():a,s=this.string.substr(this.pos,t.length);return r(s)==r(t)?(n!==!1&&(this.pos+=t.length),!0):null}else{let r=this.string.slice(this.pos).match(t);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function N2t(e){return{name:e.name||"",token:e.token,blankLine:e.blankLine||(()=>{}),startState:e.startState||(()=>!0),copyState:e.copyState||j2t,indent:e.indent||(()=>null),languageData:e.languageData||{},tokenTable:e.tokenTable||oQ,mergeTokens:e.mergeTokens!==!1}}function j2t(e){if(typeof e!="object")return e;let t={};for(let n in e){let i=e[n];t[n]=i instanceof Array?i.slice():i}return t}const wJ=new WeakMap;class sQ extends Zl{constructor(t){let n=vI(t.languageData),i=N2t(t),r,s=new class extends dI{createParse(a,l,c){return new I2t(r,a,l,c)}};super(n,s,[],t.name),this.topNode=M2t(n,this),r=this,this.streamParser=i,this.stateAfter=new Pn({perNode:!0}),this.tokenTable=t.tokenTable?new hAe(i.tokenTable):D2t}static define(t){return new sQ(t)}getIndent(t){let n,{overrideIndentation:i}=t.options;i&&(n=wJ.get(t.state),n!=null&&n1e4)return null;for(;s=i&&n+t.length<=r&&t.prop(e.stateAfter);if(s)return{state:e.streamParser.copyState(s),pos:n+t.length};for(let a=t.children.length-1;a>=0;a--){let l=t.children[a],c=n+t.positions[a],u=l instanceof gi&&c=t.length)return t;!r&&n==0&&t.type==e.topNode&&(r=!0);for(let s=t.children.length-1;s>=0;s--){let a=t.positions[s],l=t.children[s],c;if(an&&aQ(e,s.tree,0-s.offset,n,l),u;if(c&&c.pos<=i&&(u=uAe(e,s.tree,n+s.offset,c.pos+s.offset,!1)))return{state:c.state,tree:u}}return{state:e.streamParser.startState(r?Ib(r):4),tree:gi.empty}}let I2t=class{constructor(t,n,i,r){this.lang=t,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=Rb.get(),a=r[0].from,{state:l,tree:c}=R2t(t,i,a,this.to,s==null?void 0:s.state);this.state=l,this.parsedPos=this.chunkStart=a+c.length;for(let u=0;uu.from<=s.viewport.from&&u.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(Ib(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let t=Rb.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),i=Math.min(n,this.chunkStart+512);for(t&&(i=Math.min(i,t.viewport.to));this.parsedPos=n?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let n=this.input.chunk(t);if(this.input.lineChunks)n==` +`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=$T(t),i=M0(n);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=$T(t),i=M0(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function gkt(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new pkt||null,prettyErrors:t}}function hTe(e,t={}){const{lineCounter:n,prettyErrors:i}=gkt(t),r=new mkt(n==null?void 0:n.addNewLine),s=new ckt(t);let a=null;for(const l of s.compose(r.parse(e),!0,e.length))if(!a)a=l;else if(a.options.logLevel!=="silent"){a.errors.push(new LO(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&n&&(a.errors.forEach(XY(e,n)),a.warnings.forEach(XY(e,n))),a}function bkt(e,t,n){let i;const r=hTe(e,n);if(!r)return null;if(r.warnings.forEach(s=>LCe(r.options.logLevel,s)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:i},n))}function jU(e,t,n){let i=null;if(typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const r=Math.round(n);n=r<1?void 0:r>8?{indent:8}:{indent:r}}if(e===void 0){const{keepUndefined:r}=n??t??{};if(!r)return}return SE(e)&&!i?e.toString(n):new TE(e,i,n).toString(n)}const pTe=1024;let ykt=0,qc=class{constructor(t,n){this.from=t,this.to=n}};class In{constructor(t={}){this.id=ykt++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=t.combine||null}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=na.match(t)),n=>{let i=t(n);return i===void 0?null:[this,i]}}}In.closedBy=new In({deserialize:e=>e.split(" ")});In.openedBy=new In({deserialize:e=>e.split(" ")});In.group=new In({deserialize:e=>e.split(" ")});In.isolate=new In({deserialize:e=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}});In.contextHash=new In({perNode:!0});In.lookAhead=new In({perNode:!0});In.mounted=new In({perNode:!0});class iv{constructor(t,n,i,r=!1){this.tree=t,this.overlay=n,this.parser=i,this.bracketed=r}static get(t){return t&&t.props&&t.props[In.mounted.id]}}const vkt=Object.create(null);class na{constructor(t,n,i,r=0){this.name=t,this.props=n,this.id=i,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):vkt,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),r=new na(t.name||"",n,t.id,i);if(t.props){for(let s of t.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(t){return this.props[t.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(t){if(typeof t=="string"){if(this.name==t)return!0;let n=this.prop(In.group);return n?n.indexOf(t)>-1:!1}return this.id==t}static match(t){let n=Object.create(null);for(let i in t)for(let r of i.split(" "))n[r]=t[i];return i=>{for(let r=i.prop(In.group),s=-1;s<(r?r.length:0);s++){let a=n[s<0?i.name:r[s]];if(a)return a}}}}na.none=new na("",Object.create(null),0,8);class Yx{constructor(t){this.types=t;for(let n=0;n0;for(let c=this.cursor(a|er.IncludeAnonymous);;){let u=!1;if(c.from<=s&&c.to>=r&&(!l&&c.type.isAnonymous||n(c)!==!1)){if(c.firstChild())continue;u=!0}for(;u&&i&&(l||!c.type.isAnonymous)&&i(c),!c.nextSibling();){if(!c.parent())return;u=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let n in this.props)t.push([+n,this.props[n]]);return t}balance(t={}){return this.children.length<=8?this:PU(na.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new pi(this.type,n,i,r,this.propValues),t.makeTree||((n,i,r)=>new pi(na.none,n,i,r)))}static build(t){return Skt(t)}}pi.empty=new pi(na.none,[],[],0);class RU{constructor(t,n){this.buffer=t,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new RU(this.buffer,this.index)}}class km{constructor(t,n,i){this.buffer=t,this.length=n,this.set=i}get type(){return na.none}toString(){let t=[];for(let n=0;n0));c=a[c+3]);return l}slice(t,n,i){let r=this.buffer,s=new Uint16Array(n-t),a=0;for(let l=t,c=0;l=t&&nt;case 1:return n<=t&&i>t;case 2:return i>t;case 4:return!0}}function HS(e,t,n,i){for(var r;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?l.length:-1;t!=u;t+=n){let d=l[t],f=c[t]+a.from,h;if(!(!(s&er.EnterBracketed&&d instanceof pi&&(h=iv.get(d))&&!h.overlay&&h.bracketed&&i>=f&&i<=f+d.length)&&!mTe(r,i,f,f+d.length))){if(d instanceof km){if(s&er.ExcludeBuffers)continue;let p=d.findChild(0,d.buffer.length,n,i-f,r);if(p>-1)return new Nd(new xkt(a,d,t,f),null,p)}else if(s&er.IncludeAnonymous||!d.type.isAnonymous||IU(d)){let p;if(!(s&er.IgnoreMounts)&&(p=iv.get(d))&&!p.overlay)return new bo(p.tree,f,t,a);let g=new bo(d,f,t,a);return s&er.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(n<0?d.children.length-1:0,n,i,r,s)}}}if(s&er.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?t=a.index+n:t=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}prop(t){return this._tree.prop(t)}enter(t,n,i=0){let r;if(!(i&er.IgnoreOverlays)&&(r=iv.get(this._tree))&&r.overlay){let s=t-this.from,a=i&er.EnterBracketed&&r.bracketed;for(let{from:l,to:c}of r.overlay)if((n>0||a?l<=s:l=s:c>s))return new bo(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,i)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function iZ(e,t,n,i){let r=e.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let a=!1;!a;)if(a=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(t)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function n$(e,t,n=t.length-1){for(let i=e;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(t[n]&&t[n]!=i.name)return!1;n--}}return!0}class xkt{constructor(t,n,i,r){this.parent=t,this.buffer=n,this.index=i,this.start=r}}class Nd extends gTe{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,n,i){super(),this.context=t,this._parent=n,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}child(t,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t,n-this.context.start,i);return s<0?null:new Nd(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}prop(t){return this.type.prop(t)}enter(t,n,i=0){if(i&er.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return s<0?null:new Nd(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Nd(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Nd(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let a=i.buffer[this.index+1];t.push(i.slice(r,s,a)),n.push(0)}return new pi(this.type,t,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function bTe(e){if(!e.length)return null;let t=0,n=e[0];for(let s=1;sn.from||a.to=t){let l=new bo(a.tree,a.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(HS(l,t,n,!1))}}return r?bTe(r):i}class vN{get name(){return this.type.name}constructor(t,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~er.EnterBracketed,t instanceof bo)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let i=t._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return t?(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0):!1}yieldBuf(t,n){this.index=t;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[t]],this.from=i+r.buffer[t+1],this.to=i+r.buffer[t+2],!0}yield(t){return t?t instanceof bo?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],t,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,n,i=this.mode){return this.buffer?i&er.ExcludeBuffers?!1:this.enterChild(1,t,n):this.yield(this._tree.enter(t,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&er.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&er.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(t<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let n,i,{buffer:r}=this;if(r){if(t>0){if(this.index-1)for(let s=n+t,a=t<0?-1:i._tree.children.length;s!=a;s+=t){let l=i._tree.children[s];if(this.mode&er.IncludeAnonymous||l instanceof km||!l.type.isAnonymous||IU(l))return!1}return!0}move(t,n){if(n&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,n=0){for(;(this.from==this.to||(n<1?this.from>=t:this.from>t)||(n>-1?this.to<=t:this.to=0;){for(let a=t;a;a=a._parent)if(a.index==r){if(r==this.index)return a;n=a,i=s+1;break e}r=this.stack[--s]}for(let r=i;r=0;s--){if(s<0)return n$(this._tree,t,r);let a=i[n.buffer[this.stack[s]]];if(!a.isAnonymous){if(t[r]&&t[r]!=a.name)return!1;r--}}return!0}}function IU(e){return e.children.some(t=>t instanceof km||!t.type.isAnonymous||IU(t))}function Skt(e){var t;let{buffer:n,nodeSet:i,maxBufferLength:r=pTe,reused:s=[],minRepeatType:a=i.types.length}=e,l=Array.isArray(n)?new RU(n,n.length):n,c=i.types,u=0,d=0;function f(k,S,E,C,N,_){let{id:j,start:T,end:L,size:A}=l,R=d,P=u;if(A<0)if(l.next(),A==-1){let H=s[j];E.push(H),C.push(T-k);return}else if(A==-3){u=j;return}else if(A==-4){d=j;return}else throw new RangeError(`Unrecognized record size: ${A}`);let $=c[j],M,B,I=T-k;if(L-T<=r&&(B=v(l.pos-S,N))){let H=new Uint16Array(B.size-B.skip),X=l.pos-B.size,Q=H.length;for(;l.pos>X;)Q=y(B.start,H,Q);M=new km(H,L-B.start,i),I=B.start-k}else{let H=l.pos-A;l.next();let X=[],Q=[],q=j>=a?j:-1,U=0,te=L;for(;l.pos>H;)q>=0&&l.id==q&&l.size>=0?(l.end<=te-r&&(g(X,Q,T,U,l.end,te,q,R,P),U=X.length,te=l.end),l.next()):_>2500?h(T,H,X,Q):f(T,H,X,Q,q,_+1);if(q>=0&&U>0&&U-1&&U>0){let le=p($,P);M=PU($,X,Q,0,X.length,0,L-T,le,le)}else M=b($,X,Q,L-T,R-L,P)}E.push(M),C.push(I)}function h(k,S,E,C){let N=[],_=0,j=-1;for(;l.pos>S;){let{id:T,start:L,end:A,size:R}=l;if(R>4)l.next();else{if(j>-1&&L=0;A-=3)T[R++]=N[A],T[R++]=N[A+1]-L,T[R++]=N[A+2]-L,T[R++]=R;E.push(new km(T,N[2]-L,i)),C.push(L-k)}}function p(k,S){return(E,C,N)=>{let _=0,j=E.length-1,T,L;if(j>=0&&(T=E[j])instanceof pi){if(!j&&T.type==k&&T.length==N)return T;(L=T.prop(In.lookAhead))&&(_=C[j]+T.length+L)}return b(k,E,C,N,_,S)}}function g(k,S,E,C,N,_,j,T,L){let A=[],R=[];for(;k.length>C;)A.push(k.pop()),R.push(S.pop()+E-N);k.push(b(i.types[j],A,R,_-N,T-_,L)),S.push(N-E)}function b(k,S,E,C,N,_,j){if(_){let T=[In.contextHash,_];j=j?[T].concat(j):[T]}if(N>25){let T=[In.lookAhead,N];j=j?[T].concat(j):[T]}return new pi(k,S,E,C,j)}function v(k,S){let E=l.fork(),C=0,N=0,_=0,j=E.end-r,T={size:0,start:0,skip:0};e:for(let L=E.pos-k;E.pos>L;){let A=E.size;if(E.id==S&&A>=0){T.size=C,T.start=N,T.skip=_,_+=4,C+=4,E.next();continue}let R=E.pos-A;if(A<0||R=a?4:0,$=E.start;for(E.next();E.pos>R;){if(E.size<0)if(E.size==-3||E.size==-4)P+=4;else break e;else E.id>=a&&(P+=4);E.next()}N=$,C+=A,_+=P}return(S<0||C==k)&&(T.size=C,T.start=N,T.skip=_),T.size>4?T:void 0}function y(k,S,E){let{id:C,start:N,end:_,size:j}=l;if(l.next(),j>=0&&C4){let L=l.pos-(j-4);for(;l.pos>L;)E=y(k,S,E)}S[--E]=T,S[--E]=_-k,S[--E]=N-k,S[--E]=C}else j==-3?u=C:j==-4&&(d=C);return E}let x=[],w=[];for(;l.pos>0;)f(e.start||0,e.bufferStart||0,x,w,-1,0);let O=(t=e.length)!==null&&t!==void 0?t:x.length?w[0]+x[0].length:0;return new pi(c[e.topID],x.reverse(),w.reverse(),O)}const rZ=new WeakMap;function yA(e,t){if(!e.isAnonymous||t instanceof km||t.type!=e)return 1;let n=rZ.get(t);if(n==null){n=1;for(let i of t.children){if(i.type!=e||!(i instanceof pi)){n=1;break}n+=yA(e,i)}rZ.set(t,n)}return n}function PU(e,t,n,i,r,s,a,l,c){let u=0;for(let g=i;g=d)break;S+=E}if(w==O+1){if(S>d){let E=g[O];p(E.children,E.positions,0,E.children.length,b[O]+x);continue}f.push(g[O])}else{let E=b[w-1]+g[w-1].length-k;f.push(PU(e,g,b,O,w,k,E,null,c))}h.push(k+x-s)}}return p(t,n,i,r,0),(l||c)(f,h,a)}class DU{constructor(){this.map=new WeakMap}setBuffer(t,n,i){let r=this.map.get(t);r||this.map.set(t,r=new Map),r.set(n,i)}getBuffer(t,n){let i=this.map.get(t);return i&&i.get(n)}set(t,n){t instanceof Nd?this.setBuffer(t.context.buffer,t.index,n):t instanceof bo&&this.map.set(t.tree,n)}get(t){return t instanceof Nd?this.getBuffer(t.context.buffer,t.index):t instanceof bo?this.map.get(t.tree):void 0}cursorSet(t,n){t.buffer?this.setBuffer(t.buffer.buffer,t.index,n):this.map.set(t.tree,n)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class fh{constructor(t,n,i,r,s=!1,a=!1){this.from=t,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],i=!1){let r=[new fh(0,t.length,t,0,!1,i)];for(let s of n)s.to>t.length&&r.push(s);return r}static applyChanges(t,n,i=128){if(!n.length)return t;let r=[],s=1,a=t.length?t[0]:null;for(let l=0,c=0,u=0;;l++){let d=l=i)for(;a&&a.from=h.from||f<=h.to||u){let p=Math.max(h.from,c)-u,g=Math.min(h.to,f)-u;h=p>=g?null:new fh(p,g,h.tree,h.offset+u,l>0,!!d)}if(h&&r.push(h),a.to>f)break;a=snew qc(r.from,r.to)):[new qc(0,0)]:[new qc(0,t.length)],this.createParse(t,n||[],i)}parse(t,n,i){let r=this.startParse(t,n,i);for(;;){let s=r.advance();if(s)return s}}}class kkt{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,n){return this.string.slice(t,n)}}function yTe(e){return(t,n,i,r)=>new Ckt(t,e,n,i,r)}class sZ{constructor(t,n,i,r,s,a){this.parser=t,this.parse=n,this.overlay=i,this.bracketed=r,this.target=s,this.from=a}}function aZ(e){if(!e.length||e.some(t=>t.from>=t.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class Ekt{constructor(t,n,i,r,s,a,l,c){this.parser=t,this.predicate=n,this.mounts=i,this.index=r,this.start=s,this.bracketed=a,this.target=l,this.prev=c,this.depth=0,this.ranges=[]}}const i$=new In({perNode:!0});class Ckt{constructor(t,n,i,r,s){this.nest=n,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new pi(i.type,i.children,i.positions,i.length,i.propValues.concat([[i$,this.stoppedAt]]))),i}let t=this.inner[this.innerDone],n=t.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),t.target.props);i[In.mounted.id]=new iv(n,t.overlay,t.parser,t.bracketed),t.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let n=this.innerDone;n=this.stoppedAt)l=!1;else if(t.hasNode(r)){if(n){let u=n.mounts.find(d=>d.frag.from<=r.from&&d.frag.to>=r.to&&d.mount.overlay);if(u)for(let d of u.mount.overlay){let f=d.from+u.pos,h=d.to+u.pos;f>=r.from&&h<=r.to&&!n.ranges.some(p=>p.fromf)&&n.ranges.push({from:f,to:h})}}l=!1}else if(i&&(a=Tkt(i.ranges,r.from,r.to)))l=a!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.fromnew qc(f.from-r.from,f.to-r.from)):null,!!s.bracketed,r.tree,d.length?d[0].from:r.from)),s.overlay?d.length&&(i={ranges:d,depth:0,prev:i}):l=!1}}else if(n&&(c=n.predicate(r))&&(c===!0&&(c=new qc(r.from,r.to)),c.from=0&&n.ranges[u].to==c.from?n.ranges[u]={from:n.ranges[u].from,to:c.to}:n.ranges.push(c)}if(l&&r.firstChild())n&&n.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let u=cZ(this.ranges,n.ranges);u.length&&(aZ(u),this.inner.splice(n.index,0,new sZ(n.parser,n.parser.startParse(this.input,uZ(n.mounts,u),u),n.ranges.map(d=>new qc(d.from-n.start,d.to-n.start)),n.bracketed,n.target,u[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function Tkt(e,t,n){for(let i of e){if(i.from>=n)break;if(i.to>t)return i.from<=t&&i.to>=n?2:1}return 0}function oZ(e,t,n,i,r,s){if(t=t&&n.enter(i,1,er.IgnoreOverlays|er.ExcludeBuffers)))if(n.to<=t)n.next(!1)||(this.done=!0);else break}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==t.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof pi)n=n.children[0];else break}return!1}}let _kt=class{constructor(t){var n;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let i=this.curFrag=t[0];this.curTo=(n=i.tree.prop(i$))!==null&&n!==void 0?n:i.to,this.inner=new lZ(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(t=n.tree.prop(i$))!==null&&t!==void 0?t:n.to,this.inner=new lZ(n.tree,-n.offset)}}findMounts(t,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let s=this.inner.cursor.node;s;s=s.parent){let a=(i=s.tree)===null||i===void 0?void 0:i.prop(In.mounted);if(a&&a.parser==n)for(let l=this.fragI;l=s.to)break;c.tree==this.curFrag.tree&&r.push({frag:c,pos:s.from-c.offset,mount:a})}}}return r}};function cZ(e,t){let n=null,i=t;for(let r=1,s=0;r=l)break;c.to<=a||(n||(i=n=t.slice()),c.froml&&n.splice(s+1,0,new qc(l,c.to))):c.to>l?n[s--]=new qc(l,c.to):n.splice(s--,1))}}return i}function Nkt(e,t,n,i){let r=0,s=0,a=!1,l=!1,c=-1e9,u=[];for(;;){let d=r==e.length?1e9:a?e[r].to:e[r].from,f=s==t.length?1e9:l?t[s].to:t[s].from;if(a!=l){let h=Math.max(c,n),p=Math.min(d,f,i);hnew qc(h.from+i,h.to+i)),f=Nkt(t,d,c,u);for(let h=0,p=c;;h++){let g=h==f.length,b=g?u:f[h].from;if(b>p&&n.push(new fh(p,b,r.tree,-a,s.from>=p||s.openStart,s.to<=b||s.openEnd)),g)break;p=f[h].to}}else n.push(new fh(c,u,r.tree,-a,s.from>=a||s.openStart,s.to<=l||s.openEnd))}return n}let r$=[],vTe=[];(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,n=0;t>1;if(e=vTe[i])t=i+1;else return!0;if(t==n)return!1}}function dZ(e){return e>=127462&&e<=127487}const fZ=8205;function Rkt(e,t,n=!0,i=!0){return(n?xTe:Ikt)(e,t,i)}function xTe(e,t,n){if(t==e.length)return t;t&&OTe(e.charCodeAt(t))&&wTe(e.charCodeAt(t-1))&&t--;let i=GM(e,t);for(t+=hZ(i);t=0&&dZ(GM(e,a));)s++,a-=2;if(s%2==0)break;t+=2}else break}return t}function Ikt(e,t,n){for(;t>1;){let i=xTe(e,t-2,n);if(i=56320&&e<57344}function wTe(e){return e>=55296&&e<56320}function hZ(e){return e<65536?1:2}let Yi=class STe{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,n,i){[t,n]=Jv(this,t,n);let r=[];return this.decompose(0,t,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Od.from(r,this.length-(n-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,n=this.length){[t,n]=Jv(this,t,n);let i=[];return this.decompose(t,n,i,0),Od.from(i,n-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let n=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),r=new Rw(this),s=new Rw(t);for(let a=n,l=n;;){if(r.next(a),s.next(a),a=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(t=1){return new Rw(this,t)}iterRange(t,n=this.length){return new kTe(this,t,n)}iterLines(t,n){let i;if(t==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(t).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new ETe(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?STe.empty:t.length<=32?new Ms(t):Od.from(Ms.split(t,[]))}};class Ms extends Yi{constructor(t,n=Pkt(t)){super(),this.text=t,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(t,n,i,r){for(let s=0;;s++){let a=this.text[s],l=r+a.length;if((n?i:l)>=t)return new Dkt(r,l,i,a);r=l+1,i++}}decompose(t,n,i,r){let s=t<=0&&n>=this.length?this:new Ms(pZ(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(r&1){let a=i.pop(),l=vA(s.text,a.text.slice(),0,s.length);if(l.length<=32)i.push(new Ms(l,a.length+s.length));else{let c=l.length>>1;i.push(new Ms(l.slice(0,c)),new Ms(l.slice(c)))}}else i.push(s)}replace(t,n,i){if(!(i instanceof Ms))return super.replace(t,n,i);[t,n]=Jv(this,t,n);let r=vA(this.text,vA(i.text,pZ(this.text,0,t)),n),s=this.length+i.length-(n-t);return r.length<=32?new Ms(r,s):Od.from(Ms.split(r,[]),s)}sliceString(t,n=this.length,i=` +`){[t,n]=Jv(this,t,n);let r="";for(let s=0,a=0;s<=n&&at&&a&&(r+=i),ts&&(r+=l.slice(Math.max(0,t-s),n-s)),s=c+1}return r}flatten(t){for(let n of this.text)t.push(n)}scanIdentical(){return 0}static split(t,n){let i=[],r=-1;for(let s of t)i.push(s),r+=s.length+1,i.length==32&&(n.push(new Ms(i,r)),i=[],r=-1);return r>-1&&n.push(new Ms(i,r)),n}}class Od extends Yi{constructor(t,n){super(),this.children=t,this.length=n,this.lines=0;for(let i of t)this.lines+=i.lines}lineInner(t,n,i,r){for(let s=0;;s++){let a=this.children[s],l=r+a.length,c=i+a.lines-1;if((n?c:l)>=t)return a.lineInner(t,n,i,r);r=l+1,i=c+1}}decompose(t,n,i,r){for(let s=0,a=0;a<=n&&s=a){let u=r&((a<=t?1:0)|(c>=n?2:0));a>=t&&c<=n&&!u?i.push(l):l.decompose(t-a,n-a,i,u)}a=c+1}}replace(t,n,i){if([t,n]=Jv(this,t,n),i.lines=s&&n<=l){let c=a.replace(t-s,n-s,i),u=this.lines-a.lines+c.lines;if(c.lines>4&&c.lines>u>>6){let d=this.children.slice();return d[r]=c,new Od(d,this.length-(n-t)+i.length)}return super.replace(s,l,c)}s=l+1}return super.replace(t,n,i)}sliceString(t,n=this.length,i=` +`){[t,n]=Jv(this,t,n);let r="";for(let s=0,a=0;st&&s&&(r+=i),ta&&(r+=l.sliceString(t-a,n-a,i)),a=c+1}return r}flatten(t){for(let n of this.children)n.flatten(t)}scanIdentical(t,n){if(!(t instanceof Od))return 0;let i=0,[r,s,a,l]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==a||s==l)return i;let c=this.children[r],u=t.children[s];if(c!=u)return i+c.scanIdentical(u,n);i+=c.length+1}}static from(t,n=t.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let p of t)i+=p.lines;if(i<32){let p=[];for(let g of t)g.flatten(p);return new Ms(p,n)}let r=Math.max(32,i>>5),s=r<<1,a=r>>1,l=[],c=0,u=-1,d=[];function f(p){let g;if(p.lines>s&&p instanceof Od)for(let b of p.children)f(b);else p.lines>a&&(c>a||!c)?(h(),l.push(p)):p instanceof Ms&&c&&(g=d[d.length-1])instanceof Ms&&p.lines+g.lines<=32?(c+=p.lines,u+=p.length+1,d[d.length-1]=new Ms(g.text.concat(p.text),g.length+1+p.length)):(c+p.lines>r&&h(),c+=p.lines,u+=p.length+1,d.push(p))}function h(){c!=0&&(l.push(d.length==1?d[0]:Od.from(d,u)),u=-1,c=d.length=0)}for(let p of t)f(p);return h(),l.length==1?l[0]:new Od(l,n)}}Yi.empty=new Ms([""],0);function Pkt(e){let t=-1;for(let n of e)t+=n.length+1;return t}function vA(e,t,n=0,i=1e9){for(let r=0,s=0,a=!0;s=n&&(c>i&&(l=l.slice(0,i-r)),r0?1:(t instanceof Ms?t.text.length:t.children.length)<<1]}nextInner(t,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],a=s>>1,l=r instanceof Ms?r.text.length:r.children.length;if(a==(n>0?l:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,t==0)return this.lineBreak=!0,this.value=` +`,this;t--}else if(r instanceof Ms){let c=r.text[a+(n<0?-1:0)];if(this.offsets[i]+=n,c.length>Math.max(0,t))return this.value=t==0?c:n>0?c.slice(t):c.slice(0,c.length-t),this;t-=c.length}else{let c=r.children[a+(n<0?-1:0)];t>c.length?(t-=c.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(n>0?1:(c instanceof Ms?c.text.length:c.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class kTe{constructor(t,n,i){this.value="",this.done=!1,this.cursor=new Rw(t,n>i?-1:1),this.pos=n>i?t.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(t,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:r}=this.cursor.next(t);return this.pos+=(r.length+t)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ETe{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:n,lineBreak:i,value:r}=this.inner.next(t);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Yi.prototype[Symbol.iterator]=function(){return this.iter()},Rw.prototype[Symbol.iterator]=kTe.prototype[Symbol.iterator]=ETe.prototype[Symbol.iterator]=function(){return this});let Dkt=class{constructor(t,n,i,r){this.from=t,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function Jv(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function Na(e,t,n=!0,i=!0){return Rkt(e,t,n,i)}function Mkt(e){return e>=56320&&e<57344}function Lkt(e){return e>=55296&&e<56320}function sl(e,t){let n=e.charCodeAt(t);if(!Lkt(n)||t+1==e.length)return n;let i=e.charCodeAt(t+1);return Mkt(i)?(n-55296<<10)+(i-56320)+65536:n}function MU(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function wd(e){return e<65536?1:2}const s$=/\r\n?|\n/;var Ya=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(Ya||(Ya={}));class Bd{constructor(t){this.sections=t}get length(){let t=0;for(let n=0;nt)return s+(t-r);s+=l}else{if(i!=Ya.Simple&&u>=t&&(i==Ya.TrackDel&&rt||i==Ya.TrackBefore&&rt))return null;if(u>t||u==t&&n<0&&!l)return t==r||n<0?s:s+c;s+=c}r=u}if(t>r)throw new RangeError(`Position ${t} is out of range for changeset of length ${r}`);return s}touchesRange(t,n=t){for(let i=0,r=0;i=0&&r<=n&&l>=t)return rn?"cover":!0;r=l}return!1}toString(){let t="";for(let n=0;n=0?":"+r:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Bd(t)}static create(t){return new Bd(t)}}class ha extends Bd{constructor(t,n){super(t),this.inserted=n}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return a$(this,(n,i,r,s,a)=>t=t.replace(r,r+(i-n),a),!1),t}mapDesc(t,n=!1){return o$(this,t,n,!0)}invert(t){let n=this.sections.slice(),i=[];for(let r=0,s=0;r=0){n[r]=l,n[r+1]=a;let c=r>>1;for(;i.length0&&Qp(i,n,s.text),s.forward(d),l+=d}let u=t[a++];for(;l>1].toJSON()))}return t}static of(t,n,i){let r=[],s=[],a=0,l=null;function c(d=!1){if(!d&&!r.length)return;ah||f<0||h>n)throw new RangeError(`Invalid change range ${f} to ${h} (in doc of length ${n})`);let g=p?typeof p=="string"?Yi.of(p.split(i||s$)):p:Yi.empty,b=g.length;if(f==h&&b==0)return;fa&&uo(r,f-a,-1),uo(r,h-f,b),Qp(s,r,g),a=h}}return u(t),c(!l),l}static empty(t){return new ha(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;rl&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length=0&&n<=0&&n==e[r+1]?e[r]+=t:r>=0&&t==0&&e[r]==0?e[r+1]+=n:i?(e[r]+=t,e[r+1]+=n):e.push(t,n)}function Qp(e,t,n){if(n.length==0)return;let i=t.length-2>>1;if(i>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)l=e.sections[a++],c=e.sections[a++];t(r,u,s,d,f),r=u,s=d}}}function o$(e,t,n,i=!1){let r=[],s=i?[]:null,a=new qS(e),l=new qS(t);for(let c=-1;;){if(a.done&&l.len||l.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&l.ins==-1){let u=Math.min(a.len,l.len);uo(r,u,-1),a.forward(u),l.forward(u)}else if(l.ins>=0&&(a.ins<0||c==a.i||a.off==0&&(l.len=0&&c=0){let u=0,d=a.len;for(;d;)if(l.ins==-1){let f=Math.min(d,l.len);u+=f,d-=f,l.forward(f)}else if(l.ins==0&&l.lenc||a.ins>=0&&a.len>c)&&(l||i.length>u),s.forward2(c),a.forward(c)}}}}class qS{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return n>=t.length?Yi.empty:t[n]}textBit(t){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!t?Yi.empty:n[i].slice(this.off,t==null?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){this.ins==-1?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class jp{constructor(t,n,i,r){this.from=t,this.to=n,this.flags=i,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let t=this.flags&7;return t==7?null:t}map(t,n=-1){let i,r;return this.empty?i=r=t.mapPos(this.from,n):(i=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new jp(i,r,this.flags,this.goalColumn)}extend(t,n=t,i=0){if(t<=this.anchor&&n>=this.anchor)return Ze.range(t,n,void 0,void 0,i);let r=Math.abs(t-this.anchor)>Math.abs(n-this.anchor)?t:n;return Ze.range(this.anchor,r,void 0,void 0,i)}eq(t,n=!1){return this.anchor==t.anchor&&this.head==t.head&&this.goalColumn==t.goalColumn&&(!n||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Ze.range(t.anchor,t.head)}static create(t,n,i,r){return new jp(t,n,i,r)}}class Ze{constructor(t,n){this.ranges=t,this.mainIndex=n}map(t,n=-1){return t.empty?this:Ze.create(this.ranges.map(i=>i.map(t,n)),this.mainIndex)}eq(t,n=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;it.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ze(t.ranges.map(n=>jp.fromJSON(n)),t.main)}static single(t,n=t){return new Ze([Ze.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;rr.from-s.from),n=t.indexOf(i);for(let r=1;rs.head?Ze.range(c,l):Ze.range(l,c))}}return new Ze(t,n)}}function TTe(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let LU=0;class Vt{constructor(t,n,i,r,s){this.combine=t,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=LU++,this.default=t([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(t={}){return new Vt(t.combine||(n=>n),t.compareInput||((n,i)=>n===i),t.compare||(t.combine?(n,i)=>n===i:$U),!!t.static,t.enables)}of(t){return new xA([],this,0,t)}compute(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new xA(t,this,1,n)}computeN(t,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new xA(t,this,2,n)}from(t,n){return n||(n=i=>i),this.compute([t],i=>n(i.field(t)))}}function $U(e,t){return e==t||e.length==t.length&&e.every((n,i)=>n===t[i])}class xA{constructor(t,n,i,r){this.dependencies=t,this.facet=n,this.type=i,this.value=r,this.id=LU++}dynamicSlot(t){var n;let i=this.value,r=this.facet.compareInput,s=this.id,a=t[s]>>1,l=this.type==2,c=!1,u=!1,d=[];for(let f of this.dependencies)f=="doc"?c=!0:f=="selection"?u=!0:((n=t[f.id])!==null&&n!==void 0?n:1)&1||d.push(t[f.id]);return{create(f){return f.values[a]=i(f),1},update(f,h){if(c&&h.docChanged||u&&(h.docChanged||h.selection)||l$(f,d)){let p=i(f);if(l?!mZ(p,f.values[a],r):!r(p,f.values[a]))return f.values[a]=p,1}return 0},reconfigure:(f,h)=>{let p,g=h.config.address[s];if(g!=null){let b=ON(h,g);if(this.dependencies.every(v=>v instanceof Vt?h.facet(v)===f.facet(v):v instanceof no?h.field(v,!1)==f.field(v,!1):!0)||(l?mZ(p=i(f),b,r):r(p=i(f),b)))return f.values[a]=b,0}else p=i(f);return f.values[a]=p,1}}}get extension(){return this}}function mZ(e,t,n){if(e.length!=t.length)return!1;for(let i=0;ie[c.id]),r=n.map(c=>c.type),s=i.filter(c=>!(c&1)),a=e[t.id]>>1;function l(c){let u=[];for(let d=0;di===r),t);return t.provide&&(n.provides=t.provide(n)),n}create(t){let n=t.facet(BT).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(t)}slot(t){let n=t[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],a=this.updateF(s,r);return this.compareF(s,a)?0:(i.values[n]=a,1)},reconfigure:(i,r)=>{let s=i.facet(BT),a=r.facet(BT),l;return(l=s.find(c=>c.field==this))&&l!=a.find(c=>c.field==this)?(i.values[n]=l.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(t){return[this,BT.of({field:this,create:t})]}get extension(){return this}}const Cg={lowest:4,low:3,default:2,high:1,highest:0};function K1(e){return t=>new ATe(t,e)}const Hh={highest:K1(Cg.highest),high:K1(Cg.high),default:K1(Cg.default),low:K1(Cg.low),lowest:K1(Cg.lowest)};class ATe{constructor(t,n){this.inner=t,this.prec=n}get extension(){return this}}class uI{of(t){return new c$(this,t)}reconfigure(t){return uI.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class c${constructor(t,n){this.compartment=t,this.inner=n}get extension(){return this}}class xN{constructor(t,n,i,r,s,a){for(this.base=t,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,n,i){let r=[],s=Object.create(null),a=new Map;for(let h of Fkt(t,n,a))h instanceof no?r.push(h):(s[h.facet.id]||(s[h.facet.id]=[])).push(h);let l=Object.create(null),c=[],u=[];for(let h of r)l[h.id]=u.length<<1,u.push(p=>h.slot(p));let d=i==null?void 0:i.config.facets;for(let h in s){let p=s[h],g=p[0].facet,b=d&&d[h]||[];if(p.every(v=>v.type==0))if(l[g.id]=c.length<<1|1,$U(b,p))c.push(i.facet(g));else{let v=g.combine(p.map(y=>y.value));c.push(i&&g.compare(v,i.facet(g))?i.facet(g):v)}else{for(let v of p)v.type==0?(l[v.id]=c.length<<1|1,c.push(v.value)):(l[v.id]=u.length<<1,u.push(y=>v.dynamicSlot(y)));l[g.id]=u.length<<1,u.push(v=>$kt(v,g,p))}}let f=u.map(h=>h(l));return new xN(t,a,f,l,c,s)}}function Fkt(e,t,n){let i=[[],[],[],[],[]],r=new Map;function s(a,l){let c=r.get(a);if(c!=null){if(c<=l)return;let u=i[c].indexOf(a);u>-1&&i[c].splice(u,1),a instanceof c$&&n.delete(a.compartment)}if(r.set(a,l),Array.isArray(a))for(let u of a)s(u,l);else if(a instanceof c$){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=t.get(a.compartment)||a.inner;n.set(a.compartment,u),s(u,l)}else if(a instanceof ATe)s(a.inner,a.prec);else if(a instanceof no)i[l].push(a),a.provides&&s(a.provides,l);else if(a instanceof xA)i[l].push(a),a.facet.extensions&&s(a.facet.extensions,Cg.default);else{let u=a.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${a}).`);if(u==a)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(u,l)}}return s(e,Cg.default),i.reduce((a,l)=>a.concat(l))}function Iw(e,t){if(t&1)return 2;let n=t>>1,i=e.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;e.status[n]=4;let r=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|r}function ON(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}const _Te=Vt.define(),u$=Vt.define({combine:e=>e.some(t=>t),static:!0}),NTe=Vt.define({combine:e=>e.length?e[0]:void 0,static:!0}),jTe=Vt.define(),RTe=Vt.define(),ITe=Vt.define(),PTe=Vt.define({combine:e=>e.length?e[0]:!1});class tf{constructor(t,n){this.type=t,this.value=n}static define(){return new Bkt}}class Bkt{of(t){return new tf(this,t)}}class Ukt{constructor(t){this.map=t}of(t){return new $n(this,t)}}class $n{constructor(t,n){this.type=t,this.value=n}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new $n(this.type,n)}is(t){return this.type==t}static define(t={}){return new Ukt(t.map||(n=>n))}static mapEffects(t,n){if(!t.length)return t;let i=[];for(let r of t){let s=r.map(n);s&&i.push(s)}return i}}$n.reconfigure=$n.define();$n.appendConfig=$n.define();class ta{constructor(t,n,i,r,s,a){this.startState=t,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=a,this._doc=null,this._state=null,i&&TTe(i,n.newLength),s.some(l=>l.type==ta.time)||(this.annotations=s.concat(ta.time.of(Date.now())))}static create(t,n,i,r,s,a){return new ta(t,n,i,r,s,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let n of this.annotations)if(n.type==t)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(ta.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]=="."))}}ta.time=tf.define();ta.userEvent=tf.define();ta.addToHistory=tf.define();ta.remote=tf.define();function Qkt(e,t){let n=[];for(let i=0,r=0;;){let s,a;if(i=e[i]))s=e[i++],a=e[i++];else if(r=0;r--){let s=i[r](e);s instanceof ta?e=s:Array.isArray(s)&&s.length==1&&s[0]instanceof ta?e=s[0]:e=MTe(t,rv(s),!1)}return e}function Vkt(e){let t=e.startState,n=t.facet(ITe),i=e;for(let r=n.length-1;r>=0;r--){let s=n[r](e);s&&Object.keys(s).length&&(i=DTe(i,d$(t,s,e.changes.newLength),!0))}return i==e?e:ta.create(t,e.changes,e.selection,i.effects,i.annotations,i.scrollIntoView)}const Hkt=[];function rv(e){return e==null?Hkt:Array.isArray(e)?e:[e]}var os=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(os||(os={}));const qkt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let f$;try{f$=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Wkt(e){if(f$)return f$.test(e);for(let t=0;t"€"&&(n.toUpperCase()!=n.toLowerCase()||qkt.test(n)))return!0}return!1}function Kkt(e){return t=>{if(!/\S/.test(t))return os.Space;if(Wkt(t))return os.Word;for(let n=0;n-1)return os.Word;return os.Other}}class _i{constructor(t,n,i,r,s,a){this.config=t,this.doc=n,this.selection=i,this.values=r,this.status=t.statusTemplate.slice(),this.computeSlot=s,a&&(a._state=this);for(let l=0;lr.set(u,c)),n=null),r.set(l.value.compartment,l.value.extension)):l.is($n.reconfigure)?(n=null,i=l.value):l.is($n.appendConfig)&&(n=null,i=rv(i).concat(l.value));let s;n?s=t.startState.values.slice():(n=xN.resolve(i,r,this),s=new _i(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(c,u)=>u.reconfigure(c,this),null).values);let a=t.startState.facet(u$)?t.newSelection:t.newSelection.asSingle();new _i(n,t.newDoc,a,s,(l,c)=>c.update(l,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:t},range:Ze.cursor(n.from+t.length)}))}changeByRange(t){let n=this.selection,i=t(n.ranges[0]),r=this.changes(i.changes),s=[i.range],a=rv(i.effects);for(let l=1;la.spec.fromJSON(l,c)))}}return _i.create({doc:t.doc,selection:Ze.fromJSON(t.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(t={}){let n=xN.resolve(t.extensions||[],new Map),i=t.doc instanceof Yi?t.doc:Yi.of((t.doc||"").split(n.staticFacet(_i.lineSeparator)||s$)),r=t.selection?t.selection instanceof Ze?t.selection:Ze.single(t.selection.anchor,t.selection.head):Ze.single(0);return TTe(r,i.length),n.staticFacet(u$)||(r=r.asSingle()),new _i(n,i,r,n.dynamicSlots.map(()=>null),(s,a)=>a.create(s),null)}get tabSize(){return this.facet(_i.tabSize)}get lineBreak(){return this.facet(_i.lineSeparator)||` +`}get readOnly(){return this.facet(PTe)}phrase(t,...n){for(let i of this.facet(_i.phrases))if(Object.prototype.hasOwnProperty.call(i,t)){t=i[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),t}languageDataAt(t,n,i=-1){let r=[];for(let s of this.facet(_Te))for(let a of s(this,n,i))Object.prototype.hasOwnProperty.call(a,t)&&r.push(a[t]);return r}charCategorizer(t){let n=this.languageDataAt("wordChars",t);return Kkt(n.length?n[0]:"")}wordAt(t){let{text:n,from:i,length:r}=this.doc.lineAt(t),s=this.charCategorizer(t),a=t-i,l=t-i;for(;a>0;){let c=Na(n,a,!1);if(s(n.slice(c,a))!=os.Word)break;a=c}for(;le.length?e[0]:4});_i.lineSeparator=NTe;_i.readOnly=PTe;_i.phrases=Vt.define({compare(e,t){let n=Object.keys(e),i=Object.keys(t);return n.length==i.length&&n.every(r=>e[r]==t[r])}});_i.languageData=_Te;_i.changeFilter=jTe;_i.transactionFilter=RTe;_i.transactionExtender=ITe;uI.reconfigure=$n.define();function nf(e,t,n={}){let i={};for(let r of e)for(let s of Object.keys(r)){let a=r[s],l=i[s];if(l===void 0)i[s]=a;else if(!(l===a||a===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](l,a);else throw new Error("Config merge conflict for field "+s)}for(let r in t)i[r]===void 0&&(i[r]=t[r]);return i}class Em{eq(t){return this==t}range(t,n=t){return WS.create(t,n,this)}}Em.prototype.startSide=Em.prototype.endSide=0;Em.prototype.point=!1;Em.prototype.mapMode=Ya.TrackDel;function FU(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}class WS{constructor(t,n,i){this.from=t,this.to=n,this.value=i}static create(t,n,i){return new WS(t,n,i)}}function h$(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class BU{constructor(t,n,i,r){this.from=t,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(t,n,i,r=0){let s=i?this.to:this.from;for(let a=r,l=s.length;;){if(a==l)return a;let c=a+l>>1,u=s[c]-t||(i?this.value[c].endSide:this.value[c].startSide)-n;if(c==a)return u>=0?a:l;u>=0?l=c:a=c+1}}between(t,n,i,r){for(let s=this.findIndex(n,-1e9,!0),a=this.findIndex(i,1e9,!1,s);sp||h==p&&u.startSide>0&&u.endSide<=0)continue;(p-h||u.endSide-u.startSide)<0||(a<0&&(a=h),u.point&&(l=Math.max(l,p-h)),i.push(u),r.push(h-a),s.push(p-a))}return{mapped:i.length?new BU(r,s,i,l):null,pos:a}}}class Si{constructor(t,n,i,r){this.chunkPos=t,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(t,n,i,r){return new Si(t,n,i,r)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let n of this.chunk)t+=n.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=t,a=t.filter;if(n.length==0&&!a)return this;if(i&&(n=n.slice().sort(h$)),this.isEmpty)return n.length?Si.of(n):this;let l=new LTe(this,null,-1).goto(0),c=0,u=[],d=new Nh;for(;l.value||c=0){let f=n[c++];d.addInner(f.from,f.to,f.value)||u.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||sl.to||s=s&&t<=s+a.length&&a.between(s,t-s,n-s,i)===!1)return}this.nextLayer.between(t,n,i)}}iter(t=0){return KS.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,n=0){return KS.from(t).goto(n)}static compare(t,n,i,r,s=-1){let a=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),l=n.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=s),c=gZ(a,l,i),u=new G1(a,c,s),d=new G1(l,c,s);i.iterGaps((f,h,p)=>bZ(u,f,d,h,p,r)),i.empty&&i.length==0&&bZ(u,0,d,0,0,r)}static eq(t,n,i=0,r){r==null&&(r=999999999);let s=t.filter(d=>!d.isEmpty&&n.indexOf(d)<0),a=n.filter(d=>!d.isEmpty&&t.indexOf(d)<0);if(s.length!=a.length)return!1;if(!s.length)return!0;let l=gZ(s,a),c=new G1(s,l,0).goto(i),u=new G1(a,l,0).goto(i);for(;;){if(c.to!=u.to||!p$(c.active,u.active)||c.point&&(!u.point||!FU(c.point,u.point)))return!1;if(c.to>r)return!0;c.next(),u.next()}}static spans(t,n,i,r,s=-1){let a=new G1(t,null,s).goto(n),l=n,c=a.openStart;for(;;){let u=Math.min(a.to,i);if(a.point){let d=a.activeForPoint(a.to),f=a.pointFroml&&(r.span(l,u,a.active,c),c=a.openEnd(u));if(a.to>i)return c+(a.point&&a.to>i?1:0);l=a.to,a.next()}}static of(t,n=!1){let i=new Nh;for(let r of t instanceof WS?[t]:n?Gkt(t):t)i.add(r.from,r.to,r.value);return i.finish()}static join(t){if(!t.length)return Si.empty;let n=t[t.length-1];for(let i=t.length-2;i>=0;i--)for(let r=t[i];r!=Si.empty;r=r.nextLayer)n=new Si(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}Si.empty=new Si([],[],null,-1);function Gkt(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(h$);t=i}return e}Si.empty.nextLayer=Si.empty;class Nh{finishChunk(t){this.chunks.push(new BU(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,i){this.addInner(t,n,i)||(this.nextLayer||(this.nextLayer=new Nh)).add(t,n,i)}addInner(t,n,i){let r=t-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-t)),!0)}addChunk(t,n){if((t-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(t);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+t,this.lastTo=n.to[i]+t,!0}finish(){return this.finishInner(Si.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return t;let n=Si.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,n}}function gZ(e,t,n){let i=new Map;for(let s of e)for(let a=0;a=this.minPoint)break}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&r.push(new LTe(a,n,i,s));return r.length==1?r[0]:new KS(r)}get startSide(){return this.value?this.value.startSide:0}goto(t,n=-1e9){for(let i of this.heap)i.goto(t,n);for(let i=this.heap.length>>1;i>=0;i--)XM(this.heap,i);return this.next(),this}forward(t,n){for(let i of this.heap)i.forward(t,n);for(let i=this.heap.length>>1;i>=0;i--)XM(this.heap,i);(this.to-t||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),XM(this.heap,0)}}}function XM(e,t){for(let n=e[t];;){let i=(t<<1)+1;if(i>=e.length)break;let r=e[i];if(i+1=0&&(r=e[i+1],i++),n.compare(r)<0)break;e[i]=n,e[t]=r,t=i}}class G1{constructor(t,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=KS.from(t,n,i)}goto(t,n=-1e9){return this.cursor.goto(t,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=n,this.openStart=-1,this.next(),this}forward(t,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(t,n)}removeActive(t){UT(this.active,t),UT(this.activeTo,t),UT(this.activeRank,t),this.minActive=yZ(this.active,this.activeTo)}addActive(t){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n0;)n++;QT(this.active,n,i),QT(this.activeTo,n,r),QT(this.activeRank,n,s),t&&QT(t,n,this.cursor.from),this.minActive=yZ(this.active,this.activeTo)}next(){let t=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>t){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&UT(i,r)}else if(this.cursor.value)if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&i[r]=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(t){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)n++;return n}}function bZ(e,t,n,i,r,s){e.goto(t),n.goto(i);let a=i+r,l=i,c=i-t,u=!!s.boundChange;for(let d=!1;;){let f=e.to+c-n.to,h=f||e.endSide-n.endSide,p=h<0?e.to+c:n.to,g=Math.min(p,a);if(e.point||n.point?(e.point&&n.point&&FU(e.point,n.point)&&p$(e.activeForPoint(e.to),n.activeForPoint(n.to))||s.comparePoint(l,g,e.point,n.point),d=!1):(d&&s.boundChange(l),g>l&&!p$(e.active,n.active)&&s.compareRange(l,g,e.active,n.active),u&&ga)break;l=p,h<=0&&e.next(),h>=0&&n.next()}}function p$(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;i--)e[i+1]=e[i];e[t]=n}function yZ(e,t){let n=-1,i=1e9;for(let r=0;r=t)return r;if(r==e.length)break;s+=e.charCodeAt(r)==9?n-s%n:1,r=Na(e,r)}return i===!0?-1:e.length}const g$="ͼ",vZ=typeof Symbol>"u"?"__"+g$:Symbol.for(g$),b$=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),xZ=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Cm{constructor(t,n){this.rules=[];let{finish:i}=n||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function s(a,l,c,u){let d=[],f=/^@(\w+)\b/.exec(a[0]),h=f&&f[1]=="keyframes";if(f&&l==null)return c.push(a[0]+";");for(let p in l){let g=l[p];if(/&/.test(p))s(p.split(/,\s*/).map(b=>a.map(v=>b.replace(/&/,v))).reduce((b,v)=>b.concat(v)),g,c);else if(g&&typeof g=="object"){if(!f)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(r(p),g,d,h)}else g!=null&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+g+";")}(d.length||h)&&c.push((i&&!f&&!u?a.map(i):a).join(", ")+" {"+d.join(" ")+"}")}for(let a in t)s(r(a),t[a],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let t=xZ[vZ]||1;return xZ[vZ]=t+1,g$+t.toString(36)}static mount(t,n,i){let r=t[b$],s=i&&i.nonce;r?s&&r.setNonce(s):r=new Xkt(t,s),r.mount(Array.isArray(n)?n:[n],t)}}let OZ=new Map;class Xkt{constructor(t,n){let i=t.ownerDocument||t,r=i.defaultView;if(!t.head&&t.adoptedStyleSheets&&r.CSSStyleSheet){let s=OZ.get(i);if(s)return t[b$]=s;this.sheet=new r.CSSStyleSheet,OZ.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],t[b$]=this}mount(t,n){let i=this.sheet,r=0,s=0;for(let a=0;a-1&&(this.modules.splice(c,1),s--,c=-1),c==-1){if(this.modules.splice(s++,0,l),i)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ykt=typeof navigator<"u"&&/Mac/.test(navigator.platform),Zkt=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ka=0;Ka<10;Ka++)Tm[48+Ka]=Tm[96+Ka]=String(Ka);for(var Ka=1;Ka<=24;Ka++)Tm[Ka+111]="F"+Ka;for(var Ka=65;Ka<=90;Ka++)Tm[Ka]=String.fromCharCode(Ka+32),GS[Ka]=String.fromCharCode(Ka);for(var YM in Tm)GS.hasOwnProperty(YM)||(GS[YM]=Tm[YM]);function Jkt(e){var t=Ykt&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Zkt&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?GS:Tm)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function vr(){var e=arguments[0];typeof e=="string"&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?e.setAttribute(i,r):r!=null&&(e[i]=r)}t++}for(;t2);var zt={mac:kZ||/Mac/.test(jo.platform),windows:/Win/.test(jo.platform),linux:/Linux|X11/.test(jo.platform),ie:dI,ie_version:FTe?y$.documentMode||6:x$?+x$[1]:v$?+v$[1]:0,gecko:wZ,gecko_version:wZ?+(/Firefox\/(\d+)/.exec(jo.userAgent)||[0,0])[1]:0,chrome:!!ZM,chrome_version:ZM?+ZM[1]:0,ios:kZ,android:/Android\b/.test(jo.userAgent),webkit:SZ,webkit_version:SZ?+(/\bAppleWebKit\/(\d+)/.exec(jo.userAgent)||[0,0])[1]:0,safari:O$,safari_version:O$?+(/\bVersion\/(\d+(\.\d+)?)/.exec(jo.userAgent)||[0,0])[1]:0,tabSize:y$.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function UU(e,t){for(let n in e)n=="class"&&t.class?t.class+=" "+e.class:n=="style"&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}const wN=Object.create(null);function QU(e,t,n){if(e==t)return!0;e||(e=wN),t||(t=wN);let i=Object.keys(e),r=Object.keys(t);if(i.length-0!=r.length-0)return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||e[s]!==t[s]))return!1;return!0}function eEt(e,t){for(let n=e.attributes.length-1;n>=0;n--){let i=e.attributes[n].name;t[i]==null&&e.removeAttribute(i)}for(let n in t){let i=t[n];n=="style"?e.style.cssText=i:e.getAttribute(n)!=i&&e.setAttribute(n,i)}}function EZ(e,t,n){let i=!1;if(t)for(let r in t)n&&r in n||(i=!0,r=="style"?e.style.cssText="":e.removeAttribute(r));if(n)for(let r in n)t&&t[r]==n[r]||(i=!0,r=="style"?e.style.cssText=n[r]:e.setAttribute(r,n[r]));return i}function tEt(e){let t=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Cb(t,n,n,i,t.widget||null,!1)}static replace(t){let n=!!t.block,i,r;if(t.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:a}=BTe(t,n);i=(s?n?-3e8:-1:5e8)-1,r=(a?n?2e8:1:-6e8)+1}return new Cb(t,i,r,n,t.widget||null,!0)}static line(t){return new NE(t)}static set(t,n=!1){return Si.of(t,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}pn.none=Si.empty;class _E extends pn{constructor(t){let{start:n,end:i}=BTe(t);super(n?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?UU(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||wN}eq(t){return this==t||t instanceof _E&&this.tagName==t.tagName&&QU(this.attrs,t.attrs)}range(t,n=t){if(t>=n)throw new RangeError("Mark decorations may not be empty");return super.range(t,n)}}_E.prototype.point=!1;class NE extends pn{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof NE&&this.spec.class==t.spec.class&&QU(this.spec.attributes,t.spec.attributes)}range(t,n=t){if(n!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,n)}}NE.prototype.mapMode=Ya.TrackBefore;NE.prototype.point=!0;class Cb extends pn{constructor(t,n,i,r,s,a){super(n,i,s,t),this.block=r,this.isReplace=a,this.mapMode=r?n<=0?Ya.TrackBefore:Ya.TrackAfter:Ya.TrackDel}get type(){return this.startSide!=this.endSide?to.WidgetRange:this.startSide<=0?to.WidgetBefore:to.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof Cb&&nEt(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,n=t){if(this.isReplace&&(t>n||t==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,n)}}Cb.prototype.point=!0;function BTe(e,t=!1){let{inclusiveStart:n,inclusiveEnd:i}=e;return n==null&&(n=e.inclusive),i==null&&(i=e.inclusive),{start:n??t,end:i??t}}function nEt(e,t){return e==t||!!(e&&t&&e.compare(t))}function sv(e,t,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=e?n[r]=Math.max(n[r],t):n.push(e,t)}class XS extends Em{constructor(t,n,i){super(),this.tagName=t,this.attributes=n,this.rank=i}eq(t){return t==this||t instanceof XS&&this.tagName==t.tagName&&QU(this.attributes,t.attributes)}static create(t){return new XS(t.tagName,t.attributes||wN,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(t,n=!1){return Si.of(t,n)}}XS.prototype.startSide=XS.prototype.endSide=-1;function YS(e){let t;return e.nodeType==11?t=e.getSelection?e:e.ownerDocument:t=e,t.getSelection()}function w$(e,t){return t?e==t||e.contains(t.nodeType!=1?t.parentNode:t):!1}function Pw(e,t){if(!t.anchorNode)return!1;try{return w$(e,t.anchorNode)}catch{return!1}}function Dw(e){return e.nodeType==3?JS(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function Mw(e,t,n,i){return n?CZ(e,t,n,i,-1)||CZ(e,t,n,i,1):!1}function Am(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function SN(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function CZ(e,t,n,i,r){for(;;){if(e==n&&t==i)return!0;if(t==(r<0?0:jh(e))){if(e.nodeName=="DIV")return!1;let s=e.parentNode;if(!s||s.nodeType!=1)return!1;t=Am(e)+(r<0?0:1),e=s}else if(e.nodeType==1){if(e=e.childNodes[t+(r<0?-1:0)],e.nodeType==1&&e.contentEditable=="false")return!1;t=r<0?jh(e):0}else return!1}}function jh(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function ZS(e,t){let{left:n,right:i}=e;if(n==i)return e;let r=t?n:i;return{left:r,right:r,top:e.top,bottom:e.bottom}}function iEt(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function UTe(e,t){let n=t.width/e.offsetWidth,i=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(t.height-e.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function rEt(e,t,n,i,r,s,a,l){let c=e.ownerDocument,u=c.defaultView||window;for(let d=e,f=!1;d&&!f;)if(d.nodeType==1){let h,p=d==c.body,g=1,b=1;if(p)h=iEt(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(d).position)&&(f=!0),d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth){d=d.assignedSlot||d.parentNode;continue}let x=d.getBoundingClientRect();({scaleX:g,scaleY:b}=UTe(d,x)),h={left:x.left,right:x.left+d.clientWidth*g,top:x.top,bottom:x.top+d.clientHeight*b}}let v=0,y=0;if(r=="nearest")t.top0&&t.bottom>h.bottom+y&&(y=t.bottom-h.bottom+a)):t.bottom>h.bottom-a&&(y=t.bottom-h.bottom+a,n<0&&t.top-y0&&t.right>h.right+v&&(v=t.right-h.right+s)):t.right>h.right-s&&(v=t.right-h.right+s,n<0&&t.lefth.bottom||t.lefth.right)&&(t={left:Math.max(t.left,h.left),right:Math.min(t.right,h.right),top:Math.max(t.top,h.top),bottom:Math.min(t.bottom,h.bottom)}),d=d.assignedSlot||d.parentNode}else if(d.nodeType==11)d=d.host;else break}function QTe(e,t=!0){let n=e.ownerDocument,i=null,r=null;for(let s=e.parentNode;s&&!(s==n.body||(!t||i)&&r);)if(s.nodeType==1)!r&&s.scrollHeight>s.clientHeight&&(r=s),t&&!i&&s.scrollWidth>s.clientWidth&&(i=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:i,y:r}}class sEt{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:n,focusNode:i}=t;this.set(n,Math.min(t.anchorOffset,n?jh(n):0),i,Math.min(t.focusOffset,i?jh(i):0))}set(t,n,i,r){this.anchorNode=t,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let wg=null;zt.safari&&zt.safari_version>=26&&(wg=!1);function zTe(e){if(e.setActive)return e.setActive();if(wg)return e.focus(wg);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(wg==null?{get preventScroll(){return wg={preventScroll:!0},!0}}:void 0),!wg){wg=!1;for(let n=0;nMath.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function HTe(e,t){for(let n=e,i=t;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=jh(n)}else if(n.parentNode&&!SN(n))i=Am(n),n=n.parentNode;else return null}}function qTe(e,t){for(let n=e,i=t;;){if(n.nodeType==3&&i=n){if(l.level==i)return a;(s<0||(r!=0?r<0?l.fromn:t[s].level>l.level))&&(s=a)}}if(s<0)throw new RangeError("Index out of range");return s}}function GTe(e,t){if(e.length!=t.length)return!1;for(let n=0;n=0;b-=3)if(ud[b+1]==-p){let v=ud[b+2],y=v&2?r:v&4?v&1?s:r:0;y&&(Tr[f]=Tr[ud[b]]=y),l=b;break}}else{if(ud.length==189)break;ud[l++]=f,ud[l++]=h,ud[l++]=c}else if((g=Tr[f])==2||g==1){let b=g==r;c=b?0:1;for(let v=l-3;v>=0;v-=3){let y=ud[v+2];if(y&2)break;if(b)ud[v+2]|=2;else{if(y&4)break;ud[v+2]|=4}}}}}function hEt(e,t,n,i){for(let r=0,s=i;r<=n.length;r++){let a=r?n[r-1].to:e,l=rc;)g==v&&(g=n[--b].from,v=b?n[b-1].to:e),Tr[--g]=p;c=d}else s=u,c++}}}function k$(e,t,n,i,r,s,a){let l=i%2?2:1;if(i%2==r%2)for(let c=t,u=0;cc&&a.push(new jd(c,b.from,p));let v=b.direction==Tb!=!(p%2);E$(e,v?i+1:i,r,b.inner,b.from,b.to,a),c=b.to}g=b.to}else{if(g==n||(d?Tr[g]!=l:Tr[g]==l))break;g++}h?k$(e,c,g,i+1,r,h,a):ct;){let d=!0,f=!1;if(!u||c>s[u-1].to){let b=Tr[c-1];b!=l&&(d=!1,f=b==16)}let h=!d&&l==1?[]:null,p=d?i:i+1,g=c;e:for(;;)if(u&&g==s[u-1].to){if(f)break e;let b=s[--u];if(!d)for(let v=b.from,y=u;;){if(v==t)break e;if(y&&s[y-1].to==v)v=s[--y].from;else{if(Tr[v-1]==l)break e;break}}if(h)h.push(b);else{b.toTr.length;)Tr[Tr.length]=256;let i=[],r=t==Tb?0:1;return E$(e,r,r,n,0,e.length,i),i}function XTe(e){return[new jd(0,e,0)]}let YTe="";function mEt(e,t,n,i,r){var s;let a=i.head-e.from,l=jd.find(t,a,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),c=t[l],u=c.side(r,n);if(a==u){let h=l+=r?1:-1;if(h<0||h>=t.length)return null;c=t[l=h],a=c.side(!r,n),u=c.side(r,n)}let d=Na(e.text,a,c.forward(r,n));(dc.to)&&(d=u),YTe=e.text.slice(Math.min(a,d),Math.max(a,d));let f=l==(r?t.length-1:0)?null:t[l+(r?1:-1)];return f&&d==u&&f.level+(r?0:1)e.some(t=>t)}),s2e=Vt.define({combine:e=>e.some(t=>t)}),a2e=Vt.define();class ov{constructor(t,n,i,r,s,a=!1){this.range=t,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=a}map(t){return t.empty?this:new ov(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new ov(Ze.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const zT=$n.define({map:(e,t)=>e.map(t)}),o2e=$n.define();function dl(e,t,n){let i=e.facet(t2e);i.length?i[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}const Hf=Vt.define({combine:e=>e.length?e[0]:!0});let bEt=0;const jy=Vt.define({combine(e){return e.filter((t,n)=>{for(let i=0;i{let c=[];return a&&c.push(fI.of(u=>{let d=u.plugin(l);return d?a(d):pn.none})),s&&c.push(s(l)),c})}static fromClass(t,n){return As.define((i,r)=>new t(i,r),n)}}class JM{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(t){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(dl(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(t,this.spec.arg)}catch(n){dl(t.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){dl(t.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const l2e=Vt.define(),qU=Vt.define(),fI=Vt.define(),c2e=Vt.define(),WU=Vt.define(),jE=Vt.define(),u2e=Vt.define();function AZ(e,t){let n=e.state.facet(u2e);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(e):s),r=[];return Si.spans(i,t.from,t.to,{point(){},span(s,a,l,c){let u=s-t.from,d=a-t.from,f=r;for(let h=l.length-1;h>=0;h--,c--){let p=l[h].spec.bidiIsolate,g;if(p==null&&(p=gEt(t.text,u,d)),c>0&&f.length&&(g=f[f.length-1]).to==u&&g.direction==p)g.to=d,f=g.inner;else{let b={from:u,to:d,direction:p,inner:[]};f.push(b),f=b.inner}}}}),r}const d2e=Vt.define();function KU(e){let t=0,n=0,i=0,r=0;for(let s of e.state.facet(d2e)){let a=s(e);a&&(a.left!=null&&(t=Math.max(t,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(i=Math.max(i,a.top)),a.bottom!=null&&(r=Math.max(r,a.bottom)))}return{left:t,right:n,top:i,bottom:r}}const $O=Vt.define();class Wc{constructor(t,n,i,r){this.fromA=t,this.toA=n,this.fromB=i,this.toB=r}join(t){return new Wc(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let n=t.length,i=this;for(;n>0;n--){let r=t[n-1];if(!(r.fromA>i.toA)){if(r.toAr.push(new Wc(s,a,l,c))),this.changedRanges=r}static create(t,n,i){return new kN(t,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const yEt=[];class Ts{constructor(t,n,i=0){this.dom=t,this.length=n,this.flags=i,this.parent=null,t.cmTile=this}get breakAfter(){return this.flags&1}get children(){return yEt}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(t){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&eEt(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(t){this.dom=t,t.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t,n=this.posAtStart){let i=n;for(let r of this.children){if(r==t)return i;i+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}covers(t){return!0}coordsIn(t,n,i){return null}domPosFor(t,n){let i=Am(this.dom),r=this.length?t>0:n>0;return new Nu(this.parent.dom,i+(r?1:0),t==0||t==this.length)}markDirty(t){this.flags&=-3,t&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let t=this;t;t=t.parent)if(t instanceof pI)return t;return null}static get(t){return t.cmTile}}class hI extends Ts{constructor(t){super(t,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(t){this.children.push(t),t.parent=this}sync(t){if(this.flags&2)return;super.sync(t);let n=this.dom,i=null,r,s=(t==null?void 0:t.node)==n?t:null,a=0;for(let l of this.children){if(l.sync(t),a+=l.length+l.breakAfter,r=i?i.nextSibling:n.firstChild,s&&r!=l.dom&&(s.written=!0),l.dom.parentNode==n)for(;r&&r!=l.dom;)r=_Z(r);else n.insertBefore(l.dom,r);i=l.dom}for(r=i?i.nextSibling:n.firstChild,s&&r&&(s.written=!0);r;)r=_Z(r);this.length=a}}function _Z(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class pI extends hI{constructor(t,n){super(n),this.view=t}owns(t){for(;t;t=t.parent)if(t==this)return!0;return!1}isBlock(){return!0}nearest(t){for(;;){if(!t)return null;let n=Ts.get(t);if(n&&this.owns(n))return n;t=t.parentNode}}blockTiles(t){for(let n=[],i=this,r=0,s=0;;)if(r==i.children.length){if(!n.length)return;i=i.parent,i.breakAfter&&s++,r=n.pop()}else{let a=i.children[r++];if(a instanceof hh)n.push(r),i=a,r=0;else{let l=s+a.length,c=t(a,s);if(c!==void 0)return c;s=l+a.breakAfter}}}resolveBlock(t,n){let i,r=-1,s,a=-1;if(this.blockTiles((l,c)=>{let u=c+l.length;if(t>=c&&t<=u){if(l.isWidget()&&n>=-1&&n<=1){if(l.flags&32)return!0;l.flags&16&&(i=void 0)}(ct||t==c&&(n>1?l.length:l.covers(-1)))&&(!s||!l.isWidget()&&s.isWidget())&&(s=l,a=t-c)}}),!i&&!s)throw new Error("No tile at position "+t);return i&&n<0||!s?{tile:i,offset:r}:{tile:s,offset:a}}}class hh extends hI{constructor(t,n){super(t),this.wrapper=n}isBlock(){return!0}covers(t){return this.children.length?t<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let i=new hh(n||document.createElement(t.tagName),t);return n||(i.flags|=4),i}}class ex extends hI{constructor(t,n){super(t),this.attrs=n}isLine(){return!0}static start(t,n,i){let r=new ex(n||document.createElement("div"),t);return(!n||!i)&&(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(t,n,i){let r=null,s=-1,a=null,l=-1;function c(d,f){for(let h=0,p=0;h=f&&(g.isComposite()?c(g,f-p):(!a||a.isHidden&&(n>0&&!(a.flags&32)||i&&xEt(a,g)))&&(b>f||g.flags&32)?(a=g,l=f-p):(pr&&(t=r);let s=t,a=t,l=0;t==0&&n<0||t==r&&n>=0?zt.chrome||zt.gecko||(t?(s--,l=1):a=0)?0:c.length-1];return zt.safari&&!l&&u.width==0&&(u=Array.prototype.find.call(c,d=>d.width)||u),i==null?u:ZS(u,(l?l>0:n<0)==i)}static of(t,n){let i=new Fg(n||document.createTextNode(t),t);return n||(i.flags|=2),i}}class Ab extends Ts{constructor(t,n,i,r){super(t,n,r),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(t){return this.flags&48?!1:(this.flags&(t<0?64:128))>0}coordsIn(t,n){return this.coordsInWidget(t,n,!1)}coordsInWidget(t,n,i){let r=this.widget.coordsAt(this.dom,t,n);if(r)return r;if(i)return ZS(this.dom.getBoundingClientRect(),this.length?t==0:n<=0);{let s=this.dom.getClientRects(),a=null;if(!s.length)return null;let l=this.flags&16?!0:this.flags&32?!1:t>0;for(let c=l?s.length-1:0;a=s[c],!(t>0?c==0:c==s.length-1||a.top0==i)}}class OEt{constructor(t){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=t}advance(t,n,i){let{tile:r,index:s,beforeBreak:a,parents:l}=this;for(;t||n>0;)if(r.isComposite())if(a){if(!t)break;i&&i.break(),t--,a=!1}else if(s==r.children.length){if(!t&&!l.length)break;i&&i.leave(r),a=!!r.breakAfter,{tile:r,index:s}=l.pop(),s++}else{let c=r.children[s],u=c.breakAfter;(n>0?c.length<=t:c.length=0;l--){let c=n.marks[l],u=r.lastChild;if(u instanceof ll&&u.mark.eq(c.mark))u.dom!=c.dom&&u.setDOM(e5(c.dom)),r=u;else{if(this.cache.reused.get(c)){let f=Ts.get(c.dom);f&&f.setDOM(e5(c.dom))}let d=ll.of(c.mark,c.dom);r.append(d),r=d}this.cache.reused.set(c,2)}let s=Ts.get(t.text);s&&this.cache.reused.set(s,2);let a=new Fg(t.text,t.text.nodeValue);a.flags|=8,this.pos=t.range.toB,r.append(a)}addInlineWidget(t,n,i){let r=this.afterWidget&&t.flags&48&&(this.afterWidget.flags&48)==(t.flags&48);r||this.flushBuffer();let s=this.ensureMarks(n,i);!r&&!(t.flags&16)&&s.append(this.getBuffer(1)),s.append(t),this.pos+=t.length,this.afterWidget=t}addMark(t,n,i){this.flushBuffer(),this.ensureMarks(n,i).append(t),this.pos+=t.length,this.afterWidget=null}addBlockWidget(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}continueWidget(t){let n=this.afterWidget||this.lastBlock;n.length+=t,this.pos+=t}addLineStart(t,n){var i;t||(t=f2e);let r=ex.start(t,n||((i=this.cache.find(ex))===null||i===void 0?void 0:i.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(t){this.blockPosCovered()||this.addLineStart(t)}ensureLine(t){this.curLine||this.addLineStart(t)}ensureMarks(t,n){var i;let r=this.curLine;for(let s=t.length-1;s>=0;s--){let a=t[s],l;if(n>0&&(l=r.lastChild)&&l instanceof ll&&l.mark.eq(a))r=l,n--;else{let c=ll.of(a,(i=this.cache.find(ll,u=>u.mark.eq(a)))===null||i===void 0?void 0:i.dom);r.append(c),r=c,n=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let t=this.curLine.lastChild;(!t||!NZ(this.curLine,!1)||t.dom.nodeName!="BR"&&t.isWidget()&&!(zt.ios&&NZ(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(t5,0,32)||new Ab(t5.toDOM(),0,t5,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let t=this.wrappers.length-1;t>=0;t--)this.wrappers[t].to=this.pos){let n=t.rank*102+t.value.rank,i=new wEt(t.from,t.to,t.value,n),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-i.rank||this.wrappers[r-1].to-i.to)<0;)r--;this.wrappers.splice(r,0,i)}this.wrapperPos=this.pos}getBlockPos(){var t;this.updateBlockWrappers();let n=this.root;for(let i of this.wrappers){let r=n.lastChild;if(i.froma.wrapper.eq(i.wrapper)))===null||t===void 0?void 0:t.dom);n.append(s),n=s}}return n}blockPosCovered(){let t=this.lastBlock;return t!=null&&!t.breakAfter&&(!t.isWidget()||(t.flags&160)>0)}getBuffer(t){let n=2|(t<0?16:32),i=this.cache.find(EN,void 0,1);return i&&(i.flags=n),i||new EN(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class kEt{constructor(t){this.skipCount=0,this.text="",this.textOff=0,this.cursor=t.iter()}skip(t){this.textOff+t<=this.text.length?this.textOff+=t:(this.skipCount+=t-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(t){if(this.textOff==this.text.length){let{value:r,lineBreak:s,done:a}=this.cursor.next(this.skipCount);if(this.skipCount=0,a)throw new Error("Ran out of text content when drawing inline views");this.text=r;let l=this.textOff=Math.min(t,r.length);return s?null:r.slice(0,l)}let n=Math.min(this.text.length,this.textOff+t),i=this.text.slice(this.textOff,n);return this.textOff=n,i}}const CN=[Ab,ex,Fg,ll,EN,hh,pI];for(let e=0;e[]),this.index=CN.map(()=>0),this.reused=new Map}add(t){let n=t.constructor.bucket,i=this.buckets[n];i.length<6?i.push(t):i[this.index[n]=(this.index[n]+1)%6]=t}find(t,n,i=2){let r=t.bucket,s=this.buckets[r],a=this.index[r];for(let l=0;l{if(this.cache.add(a),a.isComposite())return!1},enter:a=>this.cache.add(a),leave:()=>{},break:()=>{}}}run(t,n){let i=n&&this.getCompositionContext(n.text);for(let r=0,s=0,a=0;;){let l=ar){let u=c-r;this.preserve(u,!a,!l),r=c,s+=u}if(!l)break;n&&l.fromA<=n.range.fromA&&l.toA>=n.range.toA?(this.forward(l.fromA,n.range.fromA,n.range.fromA{if(a.isWidget())if(this.openWidget)this.builder.continueWidget(c-l);else{let u=c>0||l{a.isLine()?this.builder.addLineStart(a.attrs,this.cache.maybeReuse(a)):(this.cache.add(a),a instanceof ll&&r.unshift(a.mark)),this.openWidget=!1},leave:a=>{a.isLine()?r.length&&(r.length=s=0):a instanceof ll&&(r.shift(),s=Math.min(s,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(t)}emit(t,n){let i=null,r=this.builder,s=-1,a=Si.spans(this.decorations,t,n,{point:(l,c,u,d,f,h)=>{if(u instanceof Cb){if(this.disallowBlockEffectsFor[h]){if(u.block)throw new RangeError("Block decorations may not be specified via plugins");if(c>this.view.state.doc.lineAt(l).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=d.length,f>d.length)r.continueWidget(c-l);else{let p=u.widget||(u.block?tx.block:tx.inline),g=TEt(u),b=this.cache.findWidget(p,c-l,g)||Ab.of(p,this.view,c-l,g);u.block?(u.startSide>0&&r.addLineStartIfNotCovered(i),r.addBlockWidget(b)):(r.ensureLine(i),r.addInlineWidget(b,d,f))}i=null}else i=AEt(i,u);c>l&&this.text.skip(c-l)},span:(l,c,u,d)=>{for(let f=l;f-1&&(this.openWidget=a>s),this.openWidget||r.addLineStartIfNotCovered(i),this.openMarks=a}forward(t,n,i=1){n-t<=10?this.old.advance(n-t,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-t-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(t){let n=[],i=null;for(let r=t.parentNode;;r=r.parentNode){let s=Ts.get(r);if(r==this.view.contentDOM)break;s instanceof ll?n.push(s):s!=null&&s.isLine()?i=s:s instanceof hh||(r.nodeName=="DIV"&&!i&&r!=this.view.contentDOM?i=new ex(r,f2e):i||n.push(ll.of(new _E({tagName:r.nodeName.toLowerCase(),attributes:tEt(r)}),r)))}return{line:i,marks:n}}}function NZ(e,t){let n=i=>{for(let r of i.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function TEt(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}const f2e={class:"cm-line"};function AEt(e,t){let n=t.spec.attributes,i=t.spec.class;return!n&&!i||(e||(e={class:"cm-line"}),n&&UU(n,e),i&&(e.class+=" "+i)),e}function _Et(e){let t=[];for(let n=e.parents.length;n>1;n--){let i=n==e.parents.length?e.tile:e.parents[n].tile;i instanceof ll&&t.push(i.mark)}return t}function e5(e){let t=Ts.get(e);return t&&t.setDOM(e.cloneNode()),e}class tx extends Yu{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}tx.inline=new tx("span");tx.block=new tx("div");const t5=new class extends Yu{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class jZ{constructor(t){this.view=t,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=pn.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new pI(t,t.contentDOM),this.updateInner([new Wc(0,0,0,t.state.doc.length)],null)}update(t){var n;let i=t.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:d,toA:f})=>fthis.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!$Et(t.changes,this.hasComposition)&&!t.selectionSet&&(r=t.state.selection.main.head));let s=r>-1?jEt(this.view,t.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:d,to:f}=this.hasComposition;i=new Wc(d,f,t.changes.mapPos(d,-1),t.changes.mapPos(f,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(zt.ie||zt.chrome)&&!s&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,l=this.blockWrappers;this.updateDeco();let c=PEt(a,this.decorations,t.changes);c.length&&(i=Wc.extendWithRanges(i,c));let u=MEt(l,this.blockWrappers,t.changes);return u.length&&(i=Wc.extendWithRanges(i,u)),s&&!i.some(d=>d.fromA<=s.range.fromA&&d.toA>=s.range.toA)&&(i=s.range.addToSet(i.slice())),this.tile.flags&2&&i.length==0?!1:(this.updateInner(i,s),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,n){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(n||t.length){let a=this.tile,l=new CEt(this.view,a,this.blockWrappers,this.decorations,this.dynamicDecorationMap);n&&Ts.get(n.text)&&l.cache.reused.set(Ts.get(n.text),2),this.tile=l.run(t,n),T$(a,l.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=zt.chrome||zt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||i.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to-1)&&Pw(i,this.view.observer.selectionRange)&&!(r&&i.contains(r));if(!(s||n||a))return;let l=this.forceSelection;this.forceSelection=!1;let c=this.view.state.selection.main,u,d;if(c.empty?d=u=this.inlineDOMNearPos(c.anchor,c.assoc||1):(d=this.inlineDOMNearPos(c.head,c.head==c.from?1:-1),u=this.inlineDOMNearPos(c.anchor,c.anchor==c.from?1:-1)),zt.gecko&&c.empty&&!this.hasComposition&&NEt(u)){let h=document.createTextNode("");this.view.observer.ignore(()=>u.node.insertBefore(h,u.node.childNodes[u.offset]||null)),u=d=new Nu(h,0),l=!0}let f=this.view.observer.selectionRange;(l||!f.focusNode||(!Mw(u.node,u.offset,f.anchorNode,f.anchorOffset)||!Mw(d.node,d.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,c))&&(this.view.observer.ignore(()=>{zt.android&&zt.chrome&&i.contains(f.focusNode)&&LEt(f.focusNode,i)&&(i.blur(),i.focus({preventScroll:!0}));let h=YS(this.view.root);if(h)if(c.empty){if(zt.gecko){let p=REt(u.node,u.offset);if(p&&p!=3){let g=(p==1?HTe:qTe)(u.node,u.offset);g&&(u=new Nu(g.node,g.offset))}}h.collapse(u.node,u.offset),c.bidiLevel!=null&&h.caretBidiLevel!==void 0&&(h.caretBidiLevel=c.bidiLevel)}else if(h.extend){h.collapse(u.node,u.offset);try{h.extend(d.node,d.offset)}catch{}}else{let p=document.createRange();c.anchor>c.head&&([u,d]=[d,u]),p.setEnd(d.node,d.offset),p.setStart(u.node,u.offset),h.removeAllRanges(),h.addRange(p)}a&&this.view.root.activeElement==i&&(i.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(u,d)),this.impreciseAnchor=u.precise?null:new Nu(f.anchorNode,f.anchorOffset),this.impreciseHead=d.precise?null:new Nu(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(t,n){return this.hasComposition&&n.empty&&Mw(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,n=t.state.selection.main,i=YS(t.root),{anchorNode:r,anchorOffset:s}=t.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let a=this.lineAt(n.head,n.assoc);if(!a)return;let l=a.posAtStart;if(n.head==l||n.head==l+a.length)return;let c=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!c||!u||c.bottom>u.top)return;let d=this.domAtPos(n.head+n.assoc,n.assoc);i.collapse(d.node,d.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let f=t.observer.selectionRange;t.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=n.from&&i.collapse(r,s)}posFromDOM(t,n){let i=this.tile.nearest(t);if(!i)return this.tile.dom.compareDocumentPosition(t)&2?0:this.view.state.doc.length;let r=i.posAtStart;if(i.isComposite()){let s;if(t==i.dom)s=i.dom.childNodes[n];else{let a=jh(t)==0?0:n==0?-1:1;for(;;){let l=t.parentNode;if(l==i.dom)break;a==0&&l.firstChild!=l.lastChild&&(t==l.firstChild?a=-1:a=1),t=l}a<0?s=t:s=t.nextSibling}if(s==i.dom.firstChild)return r;for(;s&&!Ts.get(s);)s=s.nextSibling;if(!s)return r+i.length;for(let a=0,l=r;;a++){let c=i.children[a];if(c.dom==s)return l;l+=c.length+c.breakAfter}}else return i.isText()?t==i.dom?r+n:r+(n?i.length:0):r}domAtPos(t,n){let{tile:i,offset:r}=this.tile.resolveBlock(t,n);return i.isWidget()?i.domPosFor(r,n):i.domIn(r,n)}inlineDOMNearPos(t,n){let i,r=-1,s=!1,a,l=-1,c=!1;return this.tile.blockTiles((u,d)=>{if(u.isWidget()){if(u.flags&32&&d>=t)return!0;u.flags&16&&(s=!0)}else{let f=d+u.length;if(d<=t&&(i=u,r=t-d,s=f=t&&!a&&(a=u,l=t-d,c=d>t),d>t&&a)return!0}}),!i&&!a?this.domAtPos(t,n):(s&&a?i=null:c&&i&&(a=null),i&&n<0||!a?i.domIn(r,n):a.domIn(l,n))}coordsAt(t,n,i){let{tile:r,offset:s}=this.tile.resolveBlock(t,n);return r.isWidget()?r.widget instanceof n5?null:r.coordsInWidget(s,n,!0):r.coordsIn(s,n,i)}lineAt(t,n){let{tile:i}=this.tile.resolveBlock(t,n);return i.isLine()?i:null}coordsForChar(t){let{tile:n,offset:i}=this.tile.resolveBlock(t,1);if(!n.isLine())return null;function r(s,a){if(s.isComposite())for(let l of s.children){if(l.length>=a){let c=r(l,a);if(c)return c}if(a-=l.length,a<0)break}else if(s.isText()&&aMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,c=this.view.textDirection==Ar.LTR,u=0,d=(f,h,p)=>{for(let g=0;gr);g++){let b=f.children[g],v=h+b.length,y=b.dom.getBoundingClientRect(),{height:x}=y;if(p&&!g&&(u+=y.top-p.top),b instanceof hh)v>i&&d(b,h,y);else if(h>=i&&(u>0&&n.push(-u),n.push(x+u),u=0,a)){let w=b.dom.lastChild,O=w?Dw(w):[];if(O.length){let k=O[O.length-1],S=c?k.right-y.left:y.right-k.left;S>l&&(l=S,this.minWidth=s,this.minWidthFrom=h,this.minWidthTo=v)}}p&&g==f.children.length-1&&(u+=p.bottom-y.bottom),h=v+b.breakAfter}};return d(this.tile,0,null),n}textDirectionAt(t){let{tile:n}=this.tile.resolveBlock(t,1);return getComputedStyle(n.dom).direction=="rtl"?Ar.RTL:Ar.LTR}measureTextSize(){let t=this.tile.blockTiles(a=>{if(a.isLine()&&a.children.length&&a.length<=20){let l=0,c;for(let u of a.children){if(!u.isText()||/[^ -~]/.test(u.text))return;let d=Dw(u.dom);if(d.length!=1)return;l+=d[0].width,c=d[0].height}if(l)return{lineHeight:a.dom.getBoundingClientRect().height,charWidth:l/a.length,textHeight:c}}});if(t)return t;let n=document.createElement("div"),i,r,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let a=Dw(n.firstChild)[0];i=n.getBoundingClientRect().height,r=a&&a.width?a.width/27:7,s=a&&a.height?a.height:i,n.remove()}),{lineHeight:i,charWidth:r,textHeight:s}}computeBlockGapDeco(){let t=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],a=s?s.from-1:this.view.state.doc.length;if(a>i){let l=(n.lineBlockAt(a).bottom-n.lineBlockAt(i).top)/this.view.scaleY;t.push(pn.replace({widget:new n5(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,a))}if(!s)break;i=s.to+1}return pn.set(t)}updateDeco(){let t=1,n=this.view.state.facet(fI).map(s=>(this.dynamicDecorationMap[t++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(WU).map((s,a)=>{let l=typeof s=="function";return l&&(i=!0),l?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[t++]=i,n.push(Si.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];ttypeof s=="function"?s(this.view):s)}scrollIntoView(t){if(t.isSnapshot){let u=this.view.viewState.lineBlockAt(t.range.head);this.view.scrollDOM.scrollTop=u.top-t.yMargin,this.view.scrollDOM.scrollLeft=t.xMargin;return}for(let u of this.view.state.facet(a2e))try{if(u(this.view,t.range,t))return!0}catch(d){dl(this.view.state,d,"scroll handler")}let{range:n}=t,i=this.coordsAt(n.head,n.assoc||(n.head>n.anchor?-1:1)),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=KU(this.view),a={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:l,offsetHeight:c}=this.view.scrollDOM;if(rEt(this.view.scrollDOM,a,n.head1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottomi.isWidget()||i.children.some(n);return n(this.tile.resolveBlock(t,1).tile)}destroy(){T$(this.tile)}}function T$(e,t){let n=t==null?void 0:t.get(e);if(n!=1){n==null&&e.destroy();for(let i of e.children)T$(i,t)}}function NEt(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable=="false")&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable=="false")}function h2e(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let i=HTe(n.focusNode,n.focusOffset),r=qTe(n.focusNode,n.focusOffset),s=i||r;if(r&&i&&r.node!=i.node){let l=Ts.get(r.node);if(!l||l.isText()&&l.text!=r.node.nodeValue)s=r;else if(e.docView.lastCompositionAfterCursor){let c=Ts.get(i.node);!c||c.isText()&&c.text!=i.node.nodeValue||(s=r)}}if(e.docView.lastCompositionAfterCursor=s!=i,!s)return null;let a=t-s.offset;return{from:a,to:a+s.node.nodeValue.length,node:s.node}}function jEt(e,t,n){let i=h2e(e,n);if(!i)return null;let{node:r,from:s,to:a}=i,l=r.nodeValue;if(/[\n\r]/.test(l)||e.state.doc.sliceString(i.from,i.to)!=l)return null;let c=t.invertedDesc;return{range:new Wc(c.mapPos(s),c.mapPos(a),s,a),text:r}}function REt(e,t){return e.nodeType!=1?0:(t&&e.childNodes[t-1].contentEditable=="false"?1:0)|(t{it.from&&(n=!0)}),n}class n5 extends Yu{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function FEt(e,t,n=1){let i=e.charCategorizer(t),r=e.doc.lineAt(t),s=t-r.from;if(r.length==0)return Ze.cursor(t);s==0?n=1:s==r.length&&(n=-1);let a=s,l=s;n<0?a=Na(r.text,s,!1):l=Na(r.text,s);let c=i(r.text.slice(a,l));for(;a>0;){let u=Na(r.text,a,!1);if(i(r.text.slice(u,a))!=c)break;a=u}for(;le.defaultLineHeight*1.5){let l=e.viewState.heightOracle.textHeight,c=Math.floor((r-n.top-(e.defaultLineHeight-l)*.5)/l);s+=c*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+m$(a,s,e.state.tabSize)}function A$(e,t,n){let i=e.lineBlockAt(t);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>t)break;if(!(s.tot)return s;(!r||s.type==to.Text&&(r.type!=s.type||(n<0?s.fromt)))&&(r=s)}}return r||i}return i}function UEt(e,t,n,i){let r=A$(e,t.head,t.assoc||-1),s=!i||r.type!=to.Text||!(e.lineWrapping||r.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>r.from?t.head-1:t.head);if(s){let a=e.dom.getBoundingClientRect(),l=e.textDirectionAt(r.from),c=e.posAtCoords({x:n==(l==Ar.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(c!=null)return Ze.cursor(c,n?-1:1)}return Ze.cursor(n?r.to:r.from,n?-1:1)}function RZ(e,t,n,i){let r=e.state.doc.lineAt(t.head),s=e.bidiSpans(r),a=e.textDirectionAt(r.from);for(let l=t,c=null;;){let u=mEt(r,s,a,l,n),d=YTe;if(!u){if(r.number==(n?e.state.doc.lines:1))return l;d=` +`,r=e.state.doc.line(r.number+(n?1:-1)),s=e.bidiSpans(r),u=e.visualLineSide(r,!n)}if(c){if(!c(d))return l}else{if(!i)return u;c=i(d)}l=u}}function QEt(e,t,n){let i=e.state.charCategorizer(t),r=i(n);return s=>{let a=i(s);return r==os.Space&&(r=a),r==a}}function zEt(e,t,n,i){let r=t.head,s=n?1:-1;if(r==(n?e.state.doc.length:0))return Ze.cursor(r,t.assoc);let a=t.goalColumn,l,c=e.contentDOM.getBoundingClientRect(),u=e.coordsAtPos(r,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),d=e.documentTop;if(u)a==null&&(a=u.left-c.left),l=s<0?u.top:u.bottom;else{let g=e.viewState.lineBlockAt(r);a==null&&(a=Math.min(c.right-c.left,e.defaultCharacterWidth*(r-g.from))),l=(s<0?g.top:g.bottom)+d}let f=c.left+a,h=e.viewState.heightOracle.textHeight>>1,p=i??h;for(let g=0;;g+=h){let b=l+(p+g)*s,v=_$(e,{x:f,y:b},!1,s);if(n?b>c.bottom:bl:x{if(t>s&&tr(e)),n.from,t.head>n.from?-1:1);return i==n.from?n:Ze.cursor(i,ie.viewState.docHeight)return new Sd(e.state.doc.length,-1);if(u=e.elementAtHeight(c),i==null)break;if(u.type==to.Text){if(i<0?u.toe.viewport.to)break;let h=e.docView.coordsAt(i<0?u.from:u.to,i>0?-1:1);if(h&&(i<0?h.top<=c+s:h.bottom>=c+s))break}let f=e.viewState.heightOracle.textHeight/2;c=i>0?u.bottom+f:u.top-f}if(e.viewport.from>=u.to||e.viewport.to<=u.from){if(n)return null;if(u.type==to.Text){let f=BEt(e,r,u,a,l);return new Sd(f,f==u.from?1:-1)}}if(u.type!=to.Text)return c<(u.top+u.bottom)/2?new Sd(u.from,1):new Sd(u.to,-1);let d=e.docView.lineAt(u.from,2);return(!d||d.length!=u.length)&&(d=e.docView.lineAt(u.from,-2)),new VEt(e,a,l,e.textDirectionAt(u.from)).scanTile(d,u.from)}class VEt{constructor(t,n,i,r){this.view=t,this.x=n,this.y=i,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(t){return(!this.line||this.line.from>t||this.line.to1||i.length&&(i[0].level!=this.baseDir||i[0].to+r.from>1;t:if(a.has(b)){let y=r+Math.floor(Math.random()*g);for(let x=0;x1)){if(x.bottomthis.y)(!u||u.top>x.top)&&(u=x),w=-1;else{let O=x.left>this.x?this.x-x.left:x.right(g+g+b)/3)return this.y=c.bottom-1,this.scan(t,n,!0);if(u&&u.top<(g+b+b)/3)return this.y=u.top+1,this.scan(t,n,!0)}let p=(l?this.dirAt(t[d],1):this.baseDir)==Ar.LTR;return{i:d,after:this.x>(h.left+h.right)/2==p}}scanText(t,n){let i=[];for(let s=0;s{let a=i[s]-n,l=i[s+1]-n;return JS(t.dom,a,l).getClientRects()});return r.after?new Sd(i[r.i+1],-1):new Sd(i[r.i],1)}scanTile(t,n){if(!t.length)return new Sd(n,1);if(t.children.length==1){let l=t.children[0];if(l.isText())return this.scanText(l,n);if(l.isComposite())return this.scanTile(l,n)}let i=[n];for(let l=0,c=n;l{let c=t.children[l];return c.flags&48?null:(c.dom.nodeType==1?c.dom:JS(c.dom,0,c.length)).getClientRects()}),s=t.children[r.i],a=i[r.i];return s.isText()?this.scanText(s,a):s.isComposite()?this.scanTile(s,a):r.after?new Sd(i[r.i+1],-1):new Sd(a,1)}}const ey="￿";class HEt{constructor(t,n){this.points=t,this.view=n,this.text="",this.lineSeparator=n.state.facet(_i.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=ey}readRange(t,n){if(!t)return this;let i=t.parentNode;for(let r=t;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let a=Ts.get(r),l=r.nextSibling;if(l==n){a!=null&&a.breakAfter&&!l&&i!=this.view.contentDOM&&this.lineBreak();break}let c=Ts.get(l);(a&&c?a.breakAfter:(a?a.breakAfter:SN(r))||SN(l)&&(r.nodeName!="BR"||a!=null&&a.isWidget())&&this.text.length>s)&&!WEt(l,n)&&this.lineBreak(),r=l}return this.findPointBefore(i,n),this}readTextNode(t){let n=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,a=1,l;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),a=this.lineSeparator.length):(l=r.exec(n))&&(s=l.index,a=l[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),a>1)for(let c of this.points)c.node==t&&c.pos>this.text.length&&(c.pos-=a-1);i=s+a}}readNode(t){let n=Ts.get(t),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(t,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else t.nodeType==3?this.readTextNode(t):t.nodeName=="BR"?t.nextSibling&&this.lineBreak():t.nodeType==1&&this.readRange(t.firstChild,null)}findPointBefore(t,n){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(t,n){for(let i of this.points)(t.nodeType==3?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(qEt(t,i.node,i.offset)?n:0))}}function qEt(e,t,n){for(;;){if(!t||n-1;let{impreciseHead:s,impreciseAnchor:a}=t.docView,l=t.state.selection;if(t.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=m2e(t.docView.tile,n,i,0))){let c=s||a?[]:XEt(t),u=new HEt(c,t);u.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=u.text,this.newSel=YEt(c,this.bounds.from)}else{let c=t.observer.selectionRange,u=s&&s.node==c.focusNode&&s.offset==c.focusOffset||!w$(t.contentDOM,c.focusNode)?l.main.head:t.docView.posFromDOM(c.focusNode,c.focusOffset),d=a&&a.node==c.anchorNode&&a.offset==c.anchorOffset||!w$(t.contentDOM,c.anchorNode)?l.main.anchor:t.docView.posFromDOM(c.anchorNode,c.anchorOffset),f=t.viewport;if((zt.ios||zt.chrome)&&u!=d&&Math.min(u,d)<=l.main.from&&Math.max(u,d)>=l.main.to&&(f.from>0||f.to-1&&l.ranges.length>1)this.newSel=l.replaceRange(Ze.range(d,u));else if(t.lineWrapping&&d==u&&!(l.main.empty&&l.main.head==u)&&t.inputState.lastTouchTime>Date.now()-100){let h=t.coordsAtPos(u,-1),p=0;h&&(p=t.inputState.lastTouchY<=h.bottom?-1:1),this.newSel=Ze.create([Ze.cursor(u,p)])}else this.newSel=Ze.single(d,u)}}}function m2e(e,t,n,i){if(e.isComposite()){let r=-1,s=-1,a=-1,l=-1;for(let c=0,u=i,d=i;cn)return m2e(f,t,n,u);if(h>=t&&r==-1&&(r=c,s=u),u>n&&f.dom.parentNode==e.dom){a=c,l=d;break}d=h,u=h+f.breakAfter}return{from:s,to:l<0?i+e.length:l,startDOM:(r?e.children[r-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:a=0?e.children[a].dom:null}}else return e.isText()?{from:i,to:i+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function g2e(e,t){let n,{newSel:i}=t,{state:r}=e,s=r.selection.main,a=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:l,to:c}=t.bounds,u=s.from,d=null;(a===8||zt.android&&t.text.length=l&&s.to<=c&&(t.typeOver||f!=t.text)&&f.slice(0,s.from-l)==t.text.slice(0,s.from-l)&&f.slice(s.to-l)==t.text.slice(h=t.text.length-(f.length-(s.to-l)))?n={from:s.from,to:s.to,insert:Yi.of(t.text.slice(s.from-l,h).split(ey))}:(p=b2e(f,t.text,u-l,d))&&(zt.chrome&&a==13&&p.toB==p.from+2&&t.text.slice(p.from,p.toB)==ey+ey&&p.toB--,n={from:l+p.from,to:l+p.toA,insert:Yi.of(t.text.slice(p.from,p.toB).split(ey))})}else i&&(!e.hasFocus&&r.facet(Hf)||TN(i,s))&&(i=null);if(!n&&!i)return!1;if((zt.mac||zt.android)&&n&&n.from==n.to&&n.from==s.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=Ze.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:Yi.of([n.insert.toString().replace("."," ")])}):r.doc.lineAt(s.from).toDate.now()-50?n={from:s.from,to:s.to,insert:r.toText(e.inputState.insertingText)}:zt.chrome&&n&&n.from==n.to&&n.from==s.head&&n.insert.toString()==` + `&&e.lineWrapping&&(i&&(i=Ze.single(i.main.anchor-1,i.main.head-1)),n={from:s.from,to:s.to,insert:Yi.of([" "])}),n)return GU(e,n,i,a);if(i&&!TN(i,s)){let l=!1,c="select";return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin=="select"&&(l=!0),c=e.inputState.lastSelectionOrigin,c=="select.pointer"&&(i=p2e(r.facet(jE).map(u=>u(e)),i))),e.dispatch({selection:i,scrollIntoView:l,userEvent:c}),!0}else return!1}function GU(e,t,n,i=-1){if(zt.ios&&e.inputState.flushIOSKey(t))return!0;let r=e.state.selection.main;if(zt.android&&(t.to==r.to&&(t.from==r.from||t.from==r.from-1&&e.state.sliceDoc(t.from,r.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&av(e.contentDOM,"Enter",13)||(t.from==r.from-1&&t.to==r.to&&t.insert.length==0||i==8&&t.insert.lengthr.head)&&av(e.contentDOM,"Backspace",8)||t.from==r.from&&t.to==r.to+1&&t.insert.length==0&&av(e.contentDOM,"Delete",46)))return!0;let s=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a,l=()=>a||(a=GEt(e,t,n));return e.state.facet(n2e).some(c=>c(e,t.from,t.to,s,l))||e.dispatch(l()),!0}function GEt(e,t,n){let i,r=e.state,s=r.selection.main,a=-1;if(t.from==t.to&&t.froms.to){let c=t.fromf(e)),u,c);t.from==d&&(a=d)}if(a>-1)i={changes:t,selection:Ze.cursor(t.from+t.insert.length,-1)};else if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let c=s.fromt.to?r.sliceDoc(t.to,s.to):"";i=r.replaceSelection(e.state.toText(c+t.insert.sliceString(0,void 0,e.state.lineBreak)+u))}else{let c=r.changes(t),u=n&&n.main.to<=c.newLength?n.main:void 0;if(r.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=s.to+10&&t.to>=s.to-10){let d=e.state.sliceDoc(t.from,t.to),f,h=n&&h2e(e,n.main.head);if(h){let g=t.insert.length-(t.to-t.from);f={from:h.from,to:h.to-g}}else f=e.state.doc.lineAt(s.head);let p=s.to-t.to;i=r.changeByRange(g=>{if(g.from==s.from&&g.to==s.to)return{changes:c,range:u||g.map(c)};let b=g.to-p,v=b-d.length;if(e.state.sliceDoc(v,b)!=d||b>=f.from&&v<=f.to)return{range:g};let y=r.changes({from:v,to:b,insert:t.insert}),x=g.to-s.to;return{changes:y,range:u?Ze.range(Math.max(0,u.anchor+x),Math.max(0,u.head+x)):g.map(y)}})}else i={changes:c,selection:u&&r.selection.replaceRange(u)}}let l="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,l+=".compose",e.inputState.compositionFirstChange&&(l+=".start",e.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:l,scrollIntoView:!0})}function b2e(e,t,n,i){let r=Math.min(e.length,t.length),s=0;for(;s0&&l>0&&e.charCodeAt(a-1)==t.charCodeAt(l-1);)a--,l--;if(i=="end"){let c=Math.max(0,s-Math.min(a,l));n-=a+c-s}if(a=a?s-n:0;s-=c,l=s+(l-a),a=s}else if(l=l?s-n:0;s-=c,a=s+(a-l),l=s}return{from:s,toA:a,toB:l}}function XEt(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=e.observer.selectionRange;return n&&(t.push(new IZ(n,i)),(r!=n||s!=i)&&t.push(new IZ(r,s))),t}function YEt(e,t){if(e.length==0)return null;let n=e[0].pos,i=e.length==2?e[1].pos:n;return n>-1&&i>-1?Ze.single(n+t,i+t):null}function TN(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}class ZEt{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,zt.safari&&t.contentDOM.addEventListener("input",()=>null),zt.gecko&&pCt(t.contentDOM.ownerDocument)}handleEvent(t){!oCt(this.view,t)||this.ignoreDuringComposition(t)||t.type=="keydown"&&this.keydown(t)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(t.type,t)):this.runHandlers(t.type,t))}runHandlers(t,n){let i=this.handlers[t];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(t){let n=eCt(t),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let a=!n[s].handlers.length,l=i[s];l&&a!=!l.handlers.length&&(r.removeEventListener(s,this.handleEvent),l=null),l||r.addEventListener(s,this.handleEvent,{passive:a})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&t.keyCode!=27&&v2e.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),zt.android&&zt.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;if(zt.ios&&!t.synthetic&&!t.altKey&&!t.metaKey&&(y2e.some(n=>n.keyCode==t.keyCode)&&!t.ctrlKey||tCt.indexOf(t.key)>-1&&t.ctrlKey)){let n={ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey,shiftKey:t.shiftKey};return n.shiftKey&&zt.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&JEt(this.view.win)&&(n.shiftKey=!1),this.pendingIOSKey={key:t.key,keyCode:t.keyCode,mods:n},setTimeout(()=>this.flushIOSKey(),250),!0}return t.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(t){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&t&&t.from0?!0:zt.safari&&!zt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function JEt(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function PZ(e,t){return(n,i)=>{try{return t.call(e,i,n)}catch(r){dl(n.state,r)}}}function eCt(e){let t=Object.create(null);function n(i){return t[i]||(t[i]={observers:[],handlers:[]})}for(let i of e){let r=i.spec,s=r&&r.plugin.domEventHandlers,a=r&&r.plugin.domEventObservers;if(s)for(let l in s){let c=s[l];c&&n(l).handlers.push(PZ(i.value,c))}if(a)for(let l in a){let c=a[l];c&&n(l).observers.push(PZ(i.value,c))}}for(let i in Qu)n(i).handlers.push(Qu[i]);for(let i in Uo)n(i).observers.push(Uo[i]);return t}const y2e=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],tCt="dthko",v2e=[16,17,18,20,91,92,224,225],VT=6;function HT(e){return Math.max(0,e)*.7+8}function nCt(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}class iCt{constructor(t,n,i,r){this.view=t,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=QTe(t.contentDOM),this.atoms=t.state.facet(jE).map(a=>a(t));let s=t.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=t.state.facet(_i.allowMultipleSelections)&&rCt(t,n),this.dragging=aCt(t,n)&&w2e(n)==1?null:!1}start(t){this.dragging===!1&&this.select(t)}move(t){if(t.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&nCt(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let n=0,i=0,r=0,s=0,a=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=KU(this.view);t.clientX-c.left<=r+VT?n=-HT(r-t.clientX):t.clientX+c.right>=a-VT&&(n=HT(t.clientX-a)),t.clientY-c.top<=s+VT?i=-HT(s-t.clientY):t.clientY+c.bottom>=l-VT&&(i=HT(t.clientY-l)),this.setScrollSpeed(n,i)}up(t){this.dragging==null&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,n){this.scrollSpeed={x:t,y:n},t||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:n}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(t||n)&&this.view.win.scrollBy(t,n),this.dragging===!1&&this.select(this.lastEvent)}select(t){let{view:n}=this,i=p2e(this.atoms,this.style.get(t,this.extend,this.multiple));(this.mustSelect||!i.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(t)&&setTimeout(()=>this.select(this.lastEvent),20)}}function rCt(e,t){let n=e.state.facet(ZTe);return n.length?n[0](t):zt.mac?t.metaKey:t.ctrlKey}function sCt(e,t){let n=e.state.facet(JTe);return n.length?n[0](t):zt.mac?!t.altKey:!t.ctrlKey}function aCt(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let i=YS(e.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s=t.clientX&&a.top<=t.clientY&&a.bottom>=t.clientY)return!0}return!1}function oCt(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,i;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=Ts.get(n))&&i.isWidget()&&!i.isHidden&&i.widget.ignoreEvent(t))return!1;return!0}const Qu=Object.create(null),Uo=Object.create(null),x2e=zt.ie&&zt.ie_version<15||zt.ios&&zt.webkit_version<604;function lCt(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),O2e(e,n.value)},50)}function mI(e,t,n){for(let i of e.facet(t))n=i(n,e);return n}function O2e(e,t){t=mI(e.state,VU,t);let{state:n}=e,i,r=1,s=n.toText(t),a=s.lines==n.selection.ranges.length;if(N$!=null&&n.selection.ranges.every(c=>c.empty)&&N$==s.toString()){let c=-1;i=n.changeByRange(u=>{let d=n.doc.lineAt(u.from);if(d.from==c)return{range:u};c=d.from;let f=n.toText((a?s.line(r++).text:t)+n.lineBreak);return{changes:{from:d.from,insert:f},range:Ze.cursor(u.from+f.length)}})}else a?i=n.changeByRange(c=>{let u=s.line(r++);return{changes:{from:c.from,to:c.to,insert:u.text},range:Ze.cursor(c.from+u.length)}}):i=n.replaceSelection(s);e.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Uo.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,zt.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())};Uo.wheel=Uo.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()};Qu.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1);Uo.touchstart=(e,t)=>{let n=e.inputState,i=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),i&&(n.lastTouchX=i.clientX,n.lastTouchY=i.clientY),n.setSelectionOrigin("select.pointer")};Uo.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")};Uo.touchend=(e,t)=>{e.inputState.touchActive=!1};Qu.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of e.state.facet(e2e))if(n=i(e,t),n)break;if(!n&&t.button==0&&(n=uCt(e,t)),n){let i=!e.hasFocus;e.inputState.startMouseSelection(new iCt(e,t,n,i)),i&&e.observer.ignore(()=>{zTe(e.contentDOM);let s=e.root.activeElement;s&&!s.contains(e.contentDOM)&&s.blur()});let r=e.inputState.mouseSelection;if(r)return r.start(t),r.dragging===!1}else e.inputState.setSelectionOrigin("select.pointer");return!1};function DZ(e,t,n,i){if(i==1)return Ze.cursor(t,n);if(i==2)return FEt(e.state,t,n);{let r=e.docView.lineAt(t,n),s=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:s.from,l=r?r.posAtEnd:s.to;return lDate.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(LZ+1)%3:1}function uCt(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),i=w2e(t),r=e.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,a,l){let c=e.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),u,d=DZ(e,c.pos,c.assoc,i);if(n.pos!=c.pos&&!a){let f=DZ(e,n.pos,n.assoc,i),h=Math.min(f.from,d.from),p=Math.max(f.to,d.to);d=h1&&(u=dCt(r,c.pos))?u:l?r.addRange(d):Ze.create([d])}}}function dCt(e,t){for(let n=0;n=t)return Ze.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}Qu.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let s=r.posAtStart,a=s+r.length;(s>=n.to||a<=n.from)&&(n=Ze.undirectionalRange(s,a))}}let{inputState:i}=e;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",mI(e.state,HU,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1};Qu.dragend=e=>(e.inputState.draggedContent=null,!1);function FZ(e,t,n,i){if(n=mI(e.state,VU,n),!n)return;let r=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:s}=e.inputState,a=i&&s&&sCt(e,t)?{from:s.from,to:s.to}:null,l={from:r,insert:n},c=e.state.changes(a?[a,l]:l);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(r,-1),head:c.mapPos(r,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}Qu.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&FZ(e,t,i.filter(a=>a!=null).join(e.state.lineBreak),!1)};for(let a=0;a{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[a]=l.result),s()},l.readAsText(n[a])}return!0}else{let i=t.dataTransfer.getData("Text");if(i)return FZ(e,t,i,!0),!0}return!1};Qu.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=x2e?null:t.clipboardData;return n?(O2e(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(lCt(e),!1)};function fCt(e,t){let n=e.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=t,i.focus(),i.selectionEnd=t.length,i.selectionStart=0,setTimeout(()=>{i.remove(),e.focus()},50)}function hCt(e){let t=[],n=[],i=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let r=-1;for(let{from:s}of e.selection.ranges){let a=e.doc.lineAt(s);a.number>r&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),r=a.number}i=!0}return{text:mI(e,HU,t.join(e.lineBreak)),ranges:n,linewise:i}}let N$=null;Qu.copy=Qu.cut=(e,t)=>{if(!Pw(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:i,linewise:r}=hCt(e.state);if(!n&&!r)return!1;N$=r?n:null,t.type=="cut"&&!e.state.readOnly&&e.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=x2e?null:t.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(fCt(e,n),!1)};const S2e=tf.define();function k2e(e,t){let n=[];for(let i of e.facet(i2e)){let r=i(e,t);r&&n.push(r)}return n.length?e.update({effects:n,annotations:S2e.of(!0)}):null}function E2e(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=k2e(e.state,t);n?e.dispatch(n):e.update([])}},10)}Uo.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),E2e(e)};Uo.blur=e=>{e.observer.clearSelectionRange(),E2e(e)};Uo.compositionstart=Uo.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange==null&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))};Uo.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,zt.chrome&&zt.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))};Uo.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()};Qu.beforeinput=(e,t)=>{var n,i;if((t.inputType=="insertText"||t.inputType=="insertCompositionText")&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType=="insertReplacementText"&&e.observer.editContext){let s=(n=t.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=t.getTargetRanges();if(s&&a.length){let l=a[0],c=e.posAtDOM(l.startContainer,l.startOffset),u=e.posAtDOM(l.endContainer,l.endOffset);return GU(e,{from:c,to:u,insert:e.state.toText(s)},null),!0}}let r;if(zt.chrome&&zt.android&&(r=y2e.find(s=>s.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>s+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return zt.ios&&t.inputType=="deleteContentForward"&&e.observer.flushSoon(),zt.safari&&t.inputType=="insertText"&&e.inputState.composing>=0&&setTimeout(()=>Uo.compositionend(e,t),20),!1};const BZ=new Set;function pCt(e){BZ.has(e)||(BZ.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}const UZ=["pre-wrap","normal","pre-line","break-spaces"];let nx=!1;function QZ(){nx=!1}class mCt{constructor(t){this.lineWrapping=t,this.doc=Yi.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-t-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return UZ.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let n=!1;for(let i=0;i-1,c=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,c){this.heightSamples={};for(let u=0;u0}set outdated(t){this.flags=(t?2:0)|this.flags&-3}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>OA&&(nx=!0),this.height=t)}replace(t,n,i){return Bo.of(i)}decomposeLeft(t,n){n.push(this)}decomposeRight(t,n){n.push(this)}applyChanges(t,n,i,r){let s=this,a=i.doc;for(let l=r.length-1;l>=0;l--){let{fromA:c,toA:u,fromB:d,toB:f}=r[l],h=s.lineAt(c,Pr.ByPosNoHeight,i.setDoc(n),0,0),p=h.to>=u?h:s.lineAt(u,Pr.ByPosNoHeight,i,0,0);for(f+=p.to-u,u=p.to;l>0&&h.from<=r[l-1].toA;)c=r[l-1].fromA,d=r[l-1].fromB,l--,cs*2){let l=t[n-1];l.break?t.splice(--n,1,l.left,null,l.right):t.splice(--n,1,l.left,l.right),i+=1+l.break,r-=l.size}else if(s>r*2){let l=t[i];l.break?t.splice(i,1,l.left,null,l.right):t.splice(i,1,l.left,l.right),i+=2+l.break,s-=l.size}else break;else if(r=s&&a(this.lineAt(0,Pr.ByPos,i,r,s))}setMeasuredHeight(t){let n=t.heights[t.index++];n<0?(this.spaceAbove=-n,n=t.heights[t.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(t,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ql extends C2e{constructor(t,n,i){super(t,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(t,n){return new Tu(n,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,i){let r=i[0];return i.length==1&&(r instanceof Ql||r instanceof qa&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof qa?r=new Ql(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):Bo.of(i)}updateHeight(t,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setMeasuredHeight(r):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class qa extends Bo{constructor(t){super(t,0)}heightMetrics(t,n){let i=t.doc.lineAt(n).number,r=t.doc.lineAt(n+this.length).number,s=r-i+1,a,l=0;if(t.lineWrapping){let c=Math.min(this.height,t.lineHeight*s);a=c/s,this.length>s+1&&(l=(this.height-c)/(this.length-s-1))}else a=this.height/s;return{firstLine:i,lastLine:r,perLine:a,perChar:l}}blockAt(t,n,i,r){let{firstLine:s,lastLine:a,perLine:l,perChar:c}=this.heightMetrics(n,r);if(n.lineWrapping){let u=r+(t0){let s=i[i.length-1];s instanceof qa?i[i.length-1]=new qa(s.length+r):i.push(null,new qa(r-1))}if(t>0){let s=i[0];s instanceof qa?i[0]=new qa(t+s.length):i.unshift(new qa(t-1),null)}return Bo.of(i)}decomposeLeft(t,n){n.push(new qa(t-1),null)}decomposeRight(t,n){n.push(null,new qa(this.length-t-1))}updateHeight(t,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let a=[],l=Math.max(n,r.from),c=-1;for(r.from>n&&a.push(new qa(r.from-n-1).updateHeight(t,n));l<=s&&r.more;){let d=t.doc.lineAt(l).length;a.length&&a.push(null);let f=r.heights[r.index++],h=0;f<0&&(h=-f,f=r.heights[r.index++]),c==-1?c=f:Math.abs(f-c)>=OA&&(c=-2);let p=new Ql(d,f,h);p.outdated=!1,a.push(p),l+=d+1}l<=s&&a.push(null,new qa(s-l).updateHeight(t,l));let u=Bo.of(a);return(c<0||Math.abs(u.height-this.height)>=OA||Math.abs(c-this.heightMetrics(t,n).perLine)>=OA)&&(nx=!0),AN(this,u)}else(i||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class yCt extends Bo{constructor(t,n,i){super(t.length+n+i.length,t.height+i.height,n|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return this.flags&1}blockAt(t,n,i,r){let s=i+this.left.height;return tl))return u;let d=n==Pr.ByPosNoHeight?Pr.ByPosNoHeight:Pr.ByPos;return c?u.join(this.right.lineAt(l,d,i,a,l)):this.left.lineAt(l,d,i,r,s).join(u)}forEachLine(t,n,i,r,s,a){let l=r+this.left.height,c=s+this.left.length+this.break;if(this.break)t=c&&this.right.forEachLine(t,n,i,l,c,a);else{let u=this.lineAt(c,Pr.ByPos,i,r,s);t=t&&u.from<=n&&a(u),n>u.to&&this.right.forEachLine(u.to+1,n,i,l,c,a)}}replace(t,n,i){let r=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(t-r,n-r,i));let s=[];t>0&&this.decomposeLeft(t,s);let a=s.length;for(let l of i)s.push(l);if(t>0&&zZ(s,a-1),n=i&&n.push(null)),t>i&&this.right.decomposeLeft(t-i,n)}decomposeRight(t,n){let i=this.left.length,r=i+this.break;if(t>=r)return this.right.decomposeRight(t-r,n);t2*n.size||n.size>2*t.size?Bo.of(this.break?[t,null,n]:[t,n]):(this.left=AN(this.left,t),this.right=AN(this.right,n),this.setHeight(t.height+n.height),this.outdated=t.outdated||n.outdated,this.size=t.size+n.size,this.length=t.length+this.break+n.length,this)}updateHeight(t,n=0,i=!1,r){let{left:s,right:a}=this,l=n+s.length+this.break,c=null;return r&&r.from<=n+s.length&&r.more?c=s=s.updateHeight(t,n,i,r):s.updateHeight(t,n,i),r&&r.from<=l+a.length&&r.more?c=a=a.updateHeight(t,l,i,r):a.updateHeight(t,l,i),c?this.balanced(s,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function zZ(e,t){let n,i;e[t]==null&&(n=e[t-1])instanceof qa&&(i=e[t+1])instanceof qa&&e.splice(t-1,3,new qa(n.length+1+i.length))}const vCt=5;class XU{constructor(t,n){this.pos=t,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Ql?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ql(i-this.pos,-1,0)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(t,n,i){if(t=vCt)&&this.addLineDeco(r,s,a)}else n>t&&this.span(t,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=n,this.writtenTot&&this.nodes.push(new Ql(this.pos-t,-1,0)),this.writtenTo=this.pos}blankContent(t,n){let i=new qa(n-t);return this.oracle.doc.lineAt(t).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Ql)return t;let n=new Ql(0,-1,0);return this.nodes.push(n),n}addBlock(t){this.enterLine();let n=t.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,n&&n.endSide>0&&(this.covering=t)}addLineDeco(t,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,t),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(t){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ql)&&!this.isCovered?this.nodes.push(new Ql(0,-1,0)):(this.writtenTod.clientHeight||d.scrollWidth>d.clientWidth)&&f.overflow!="visible"){let h=d.getBoundingClientRect();s=Math.max(s,h.left),a=Math.min(a,h.right),l=Math.max(l,h.top),c=Math.min(u==e.parentNode?r.innerHeight:c,h.bottom)}u=f.position=="absolute"||f.position=="fixed"?d.offsetParent:d.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:s-n.left,right:Math.max(s,a)-n.left,top:l-(n.top+t),bottom:Math.max(l,c)-(n.top+t)}}function SCt(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left0&&t.top0}function kCt(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class r5{constructor(t,n,i,r){this.from=t,this.to=n,this.size=i,this.displaySize=r}static same(t,n){if(t.length!=n.length)return!1;for(let i=0;itypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new mCt(i),this.stateDeco=qZ(n),this.heightMap=Bo.empty().applyChanges(this.stateDeco,Yi.empty,this.heightOracle.setDoc(n.doc),[new Wc(0,0,0,n.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=pn.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=t.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!t.some(({from:s,to:a})=>r>=s&&r<=a)){let{from:s,to:a}=this.lineBlockAt(r);t.push(new qT(s,a))}}return this.viewports=t.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?HZ:new YU(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,t=>{this.viewportLines.push(FO(t,this.scaler))})}update(t,n=null){this.state=t.state;let i=this.stateDeco;this.stateDeco=qZ(this.state);let r=t.changedRanges,s=Wc.extendWithRanges(r,xCt(i,this.stateDeco,t?t.changes:ha.empty(this.state.doc.length))),a=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);QZ(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=a||nx)&&(t.flags|=2),l?(this.scrollAnchorPos=t.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let c=s.length?this.mapViewport(this.viewport,t.changes):this.viewport;(n&&(n.range.headc.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,n));let u=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,t.flags|=this.updateForViewport(),(u||!t.changes.empty||t.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(t.selectionSet||t.focusChanged)&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(s2e)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:t}=this,n=t.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Ar.RTL:Ar.LTR;let a=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",l=n.getBoundingClientRect(),c=a||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let u=0,d=0;if(l.width&&l.height){let{scaleX:k,scaleY:S}=UTe(n,l);(k>.005&&Math.abs(this.scaleX-k)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=k,this.scaleY=S,u|=16,a=c=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,h=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=h)&&(this.paddingTop=f,this.paddingBottom=h,u|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(r.lineWrapping&&(c=!0),this.editorWidth=t.scrollDOM.clientWidth,u|=16);let p=QTe(this.view.contentDOM,!1).y;p!=this.scrollParent&&(this.scrollParent=p,this.scrollAnchorHeight=-1,this.scrollOffset=0);let g=this.getScrollOffset();this.scrollOffset!=g&&(this.scrollAnchorHeight=-1,this.scrollOffset=g),this.scrolledToBottom=VTe(this.scrollParent||t.win);let b=(this.printing?kCt:wCt)(n,this.paddingTop),v=b.top-this.pixelViewport.top,y=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let x=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(x!=this.inView&&(this.inView=x,x&&(c=!0)),!this.inView&&!this.scrollTarget&&!SCt(t.dom))return 0;let w=l.width;if((this.contentDOMWidth!=w||this.editorHeight!=t.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=t.scrollDOM.clientHeight,u|=16),c){let k=t.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(k)&&(a=!0),a||r.lineWrapping&&Math.abs(w-this.contentDOMWidth)>r.charWidth){let{lineHeight:S,charWidth:E,textHeight:C}=t.docView.measureTextSize();a=S>0&&r.refresh(s,S,E,C,Math.max(5,w/E),k),a&&(t.docView.minWidth=0,u|=16)}v>0&&y>0?d=Math.max(v,y):v<0&&y<0&&(d=Math.min(v,y)),QZ();for(let S of this.viewports){let E=S.from==this.viewport.from?k:t.docView.measureVisibleLineHeights(S);this.heightMap=(a?Bo.empty().applyChanges(this.stateDeco,Yi.empty,this.heightOracle,[new Wc(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new gCt(S.from,E))}nx&&(u|=2)}let O=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return O&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),u|=this.updateForViewport()),(u&2||O)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,t)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,n){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:l}=this,c=new qT(r.lineAt(a-i*1e3,Pr.ByHeight,s,0,0).from,r.lineAt(l+(1-i)*1e3,Pr.ByHeight,s,0,0).to);if(n){let{head:u}=n.range;if(uc.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=r.lineAt(u,Pr.ByPos,s,0,0),h;n.y=="center"?h=(f.top+f.bottom)/2-d/2:n.y=="start"||n.y=="nearest"&&u=l+Math.max(10,Math.min(i,250)))&&r>a-2*1e3&&s>1,a=r<<1;if(this.defaultTextDirection!=Ar.LTR&&!i)return[];let l=[],c=(d,f,h,p)=>{if(f-dd&&yy.from>=h.from&&y.to<=h.to&&Math.abs(y.from-d)y.fromx));if(!v){if(fw.from<=f&&w.to>=f)){let w=n.moveToLineBoundary(Ze.cursor(f),!1,!0).head;w>d&&(f=w)}let y=this.gapSize(h,d,f,p),x=i||y<2e6?y:2e6;v=new r5(d,f,y,x)}l.push(v)},u=d=>{if(d.length2e6)for(let S of t)S.from>=d.from&&S.fromd.from&&c(d.from,p,d,f),gn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(t){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];Si.spans(n,this.viewport.from,this.viewport.to,{span(s,a){i.push({from:s,to:a})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(n=>n.from<=t&&n.to>=t)||FO(this.heightMap.lineAt(t,Pr.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=t&&n.bottom>=t)||FO(this.heightMap.lineAt(this.scaler.fromDOM(t),Pr.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(t){let n=this.lineBlockAtHeight(t+8);return n.from>=this.viewport.from||this.viewportLines[0].top-t>200?n:this.viewportLines[0]}elementAtHeight(t){return FO(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class qT{constructor(t,n){this.from=t,this.to=n}}function CCt(e,t,n){let i=[],r=e,s=0;return Si.spans(n,e,t,{span(){},point(a,l){a>r&&(i.push({from:r,to:a}),s+=a-r),r=l}},20),r=1)return t[t.length-1].to;let i=Math.floor(e*n);for(let r=0;;r++){let{from:s,to:a}=t[r],l=a-s;if(i<=l)return s+i;i-=l}}function KT(e,t){let n=0;for(let{from:i,to:r}of e.ranges){if(t<=r){n+=t-i;break}n+=r-i}return n/e.total}function TCt(e,t){for(let n of e)if(t(n))return n}const HZ={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function qZ(e){let t=e.facet(fI).filter(i=>typeof i!="function"),n=e.facet(WU).filter(i=>typeof i!="function");return n.length&&t.push(Si.join(n)),t}class YU{constructor(t,n,i){let r=0,s=0,a=0;this.viewports=i.map(({from:l,to:c})=>{let u=n.lineAt(l,Pr.ByPos,t,0,0).top,d=n.lineAt(c,Pr.ByPos,t,0,0).bottom;return r+=d-u,{from:l,to:c,top:u,bottom:d,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let l of this.viewports)l.domTop=a+(l.top-s)*this.scale,a=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(t){for(let n=0,i=0,r=0;;n++){let s=nn.from==t.viewports[i].from&&n.to==t.viewports[i].to):!1}}function FO(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),i=t.toDOM(e.bottom);return new Tu(e.from,e.length,n,i-n,Array.isArray(e._content)?e._content.map(r=>FO(r,t)):e._content)}const GT=Vt.define({combine:e=>e.join(" ")}),j$=Vt.define({combine:e=>e.indexOf(!0)>-1}),R$=Cm.newName(),T2e=Cm.newName(),A2e=Cm.newName(),_2e={"&light":"."+T2e,"&dark":"."+A2e};function I$(e,t,n){return new Cm(t,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return e;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):e+" "+i}})}const ACt=I$("."+R$,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},_2e),_Ct={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},s5=zt.ie&&zt.ie_version<=11;class NCt{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new sEt,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(zt.ie&&zt.ie_version<=11||zt.ios&&t.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&zt.android&&t.constructor.EDIT_CONTEXT!==!1&&!(zt.chrome&&zt.chrome_version<126)&&(this.editContext=new RCt(t),t.state.facet(Hf)&&(t.contentDOM.editContext=this.editContext.editContext)),s5&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(t){(t.type=="change"||!t.type)&&!t.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((n,i)=>n!=t[i]))){this.gapIntersection.disconnect();for(let n of t)this.gapIntersection.observe(n);this.gaps=t}}onSelectionChange(t){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(Hf)?i.root.activeElement!=this.dom:!Pw(this.dom,r))return;let s=r.anchorNode&&i.docView.tile.nearest(r.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(t)){n||(this.selectionChanged=!1);return}(zt.ie&&zt.ie_version<=11||zt.android&&zt.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Mw(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,n=YS(t.root);if(!n)return!1;let i=zt.safari&&t.root.nodeType==11&&t.root.activeElement==this.dom&&jCt(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=Pw(this.dom,i);return r&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&av(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||t=="Enter")&&(this.delayedAndroidKey={key:t,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of t){let a=this.readMutation(s);a&&(a.typeOver&&(r=!0),n==-1?{from:n,to:i}=a:(n=Math.min(a.from,n),i=Math.max(a.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:t,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Pw(this.dom,this.selectionRange);if(t<0&&!r)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new KEt(this.view,t,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=g2e(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!TN(this.view.state.selection,n.newSel.main))&&this.view.update([]),r}readMutation(t){let n=this.view.docView.tile.nearest(t.target);if(!n||n.isWidget())return null;if(n.markDirty(t.type=="attributes"),t.type=="childList"){let i=WZ(n,t.previousSibling||t.target.previousSibling,-1),r=WZ(n,t.nextSibling||t.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return t.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(Hf)!=t.state.facet(Hf)&&(t.view.contentDOM.editContext=t.state.facet(Hf)?this.editContext.editContext:null))}destroy(){var t,n,i;this.stop(),(t=this.intersection)===null||t===void 0||t.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function WZ(e,t,n){for(;t;){let i=Ts.get(t);if(i&&i.parent==e)return i;let r=t.parentNode;t=r!=e.dom?r:n>0?t.nextSibling:t.previousSibling}return null}function KZ(e,t){let n=t.startContainer,i=t.startOffset,r=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor,1);return Mw(a.node,a.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function jCt(e,t){if(t.getComposedRanges){let r=t.getComposedRanges(e.root)[0];if(r)return KZ(e,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",i,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",i,!0),n?KZ(e,n):null}class RCt{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let n=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=i=>{let r=t.state.selection.main,{anchor:s,head:a}=r,l=this.toEditorPos(i.updateRangeStart),c=this.toEditorPos(i.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:l,drifted:!1});let u=c-l>i.text.length;l==this.from&&sthis.to&&(c=s);let d=b2e(t.state.sliceDoc(l,c),i.text,(u?r.from:r.to)-l,u?"end":null);if(!d){let h=Ze.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));TN(h,r)||t.dispatch({selection:h,userEvent:"select"});return}let f={from:d.from+l,to:d.toA+l,insert:Yi.of(i.text.slice(d.from,d.toB).split(` +`))};if((zt.mac||zt.android)&&f.from==a-1&&/^\. ?$/.test(i.text)&&t.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:l,to:c,insert:Yi.of([i.text.replace("."," ")])}),this.pendingContextChange=f,!t.state.readOnly){let h=this.to-this.from+(f.to-f.from+f.insert.length);GU(t,f,Ze.single(this.toEditorPos(i.selectionStart,h),this.toEditorPos(i.selectionEnd,h)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)),f.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(n.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let a=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);a{let r=[];for(let s of i.getTextFormats()){let a=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(l)){let c=this.toEditorPos(s.rangeStart),u=this.toEditorPos(s.rangeEnd);if(c{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(t.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{let r=YS(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let n=0,i=!1,r=this.pendingContextChange;return t.changes.iterChanges((s,a,l,c,u)=>{if(i)return;let d=u.length-(a-s);if(r&&a>=r.to)if(r.from==s&&r.to==a&&r.insert.eq(u)){r=this.pendingContextChange=null,n+=d,this.to+=d;return}else r=null,this.revertPending(t.state);if(s+=n,a+=n,a<=this.from)this.from+=d,this.to+=d;else if(sthis.to||this.to-this.from+u.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(a),u.toString()),this.to+=d}n+=d}),r&&!i&&this.revertPending(t.state),!i}update(t){let n=this.pendingContextChange,i=t.startState.selection.main;this.composing&&(this.composing.drifted||!t.changes.touchesRange(i.from,i.to)&&t.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):!this.applyEdits(t)||!this.rangeIsValid(t.state)?(this.pendingContextChange=null,this.reset(t.state)):(t.docChanged||t.selectionSet||n)&&this.setSelection(t.state),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:n}=t.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(t.doc.length,n+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),t.doc.sliceString(n.from,n.to))}setSelection(t){let{main:n}=t.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(t){let{head:n}=t.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(t,n=this.to-this.from){t=Math.min(t,n);let i=this.composing;return i&&i.drifted?i.editorBase+(t-i.contextBase):t+this.from}toContextPos(t){let n=this.composing;return n&&n.drifted?n.contextBase+(t-n.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class Pt{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:i}=t;this.dispatchTransactions=t.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=t.root||aEt(t.parent)||document,this.viewState=new VZ(this,t.state||_i.create(t)),t.scrollTo&&t.scrollTo.is(zT)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(jy).map(r=>new JM(r));for(let r of this.plugins)r.update(this);this.observer=new NCt(this),this.inputState=new ZEt(this),this.inputState.ensureHandlers(this.plugins),this.docView=new jZ(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...t){let n=t.length==1&&t[0]instanceof ta?t:t.length==1&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(n,this)}update(t){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let h of t){if(h.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=h.state}if(this.destroyed){this.viewState.state=s;return}let a=this.hasFocus,l=0,c=null;t.some(h=>h.annotation(S2e))?(this.inputState.notifiedFocused=a,l=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,c=k2e(s,a),c||(l=1));let u=this.observer.delayedAndroidKey,d=null;if(u?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(d=null)):this.observer.clear(),s.facet(_i.phrases)!=this.state.facet(_i.phrases))return this.setState(s);r=kN.create(this,s,t),r.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let h of t){if(f&&(f=f.map(h.changes)),h.scrollIntoView){let{main:p}=h.state.selection,{x:g,y:b}=this.state.facet(Pt.cursorScrollMargin);f=new ov(p.empty?p:Ze.cursor(p.head,p.head>p.anchor?-1:1),"nearest","nearest",b,g)}for(let p of h.effects)p.is(zT)&&(f=p.value.clip(this.state))}this.viewState.update(r,f),this.bidiCache=_N.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet($O)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(GT)!=r.state.facet(GT)&&(this.viewState.mustMeasureContent=!0),(n||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let h of this.state.facet(C$))try{h(r)}catch(p){dl(this.state,p,"update listener")}(c||d)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),d&&!g2e(this,d)&&u.force&&av(this.contentDOM,u.key,u.keyCode)})}setState(t){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new VZ(this,t),this.plugins=t.facet(jy).map(i=>new JM(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new jZ(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(t){let n=t.startState.facet(jy),i=t.state.facet(jy);if(n!=i){let r=[];for(let s of i){let a=n.indexOf(s);if(a<0)r.push(new JM(s));else{let l=this.plugins[a];l.mustUpdate=t,r.push(l)}}for(let s of this.plugins)s.mustUpdate!=t&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=t;for(let r=0;r-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,t&&this.observer.forceFlush();let n=null,i=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(a<0)if(VTe(i||this.win))s=-1,a=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(r);s=p.from,a=p.top}this.updateState=1;let c=this.viewState.measure();if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];c&4||([this.measureRequests,u]=[u,this.measureRequests]);let d=u.map(p=>{try{return p.read(this)}catch(g){return dl(this.state,g),GZ}}),f=kN.create(this,this.state,[]),h=!1;f.flags|=c,n?n.flags|=c:n=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),h=this.docView.update(f),h&&this.docViewUpdate());for(let p=0;p1||g<-1)&&!(zt.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(i==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r=r+g,i?i.scrollTop+=g:this.win.scrollBy(0,g),a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(C$))l(n)}get themeClasses(){return R$+" "+(this.state.facet(j$)?A2e:T2e)+" "+this.state.facet(GT)}updateAttrs(){let t=XZ(this,l2e,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Hf)?"true":"false",class:"cm-content",style:`${zt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),XZ(this,qU,n);let i=this.observer.ignore(()=>{let r=EZ(this.contentDOM,this.contentAttrs,n),s=EZ(this.dom,this.editorAttrs,t);return r||s});return this.editorAttrs=t,this.contentAttrs=n,i}showAnnouncements(t){let n=!0;for(let i of t)for(let r of i.effects)if(r.is(Pt.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet($O);let t=this.state.facet(Pt.cspNonce);Cm.mount(this.root,this.styleModules.concat(ACt).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(t.key!=null){for(let n=0;ni.plugin==t)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,n,i){return i5(this,t,RZ(this,t,n,i))}moveByGroup(t,n){return i5(this,t,RZ(this,t,n,i=>QEt(this,t.head,i)))}visualLineSide(t,n){let i=this.bidiSpans(t),r=this.textDirectionAt(t.from),s=i[n?i.length-1:0];return Ze.cursor(s.side(n,r)+t.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(t,n,i=!0){return UEt(this,t,n,i)}moveVertically(t,n,i){return i5(this,t,zEt(this,t,n,i))}domAtPos(t,n=1){return this.docView.domAtPos(t,n)}posAtDOM(t,n=0){return this.docView.posFromDOM(t,n)}posAtCoords(t,n=!0){this.readMeasured();let i=_$(this,t,n);return i&&i.pos}posAndSideAtCoords(t,n=!0){return this.readMeasured(),_$(this,t,n)}coordsAtPos(t,n=1){this.readMeasured();let i=this.state.doc.lineAt(t),r=this.bidiSpans(i),s=r[jd.find(r,t-i.from,-1,n)];return this.docView.coordsAt(t,n,s.dir==Ar.RTL)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(r2e)||tthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>ICt)return XTe(t.length);let n=this.textDirectionAt(t.from),i;for(let s of this.bidiCache)if(s.from==t.from&&s.dir==n&&(s.fresh||GTe(s.isolates,i=AZ(this,t))))return s.order;i||(i=AZ(this,t));let r=pEt(t.text,n,i);return this.bidiCache.push(new _N(t.from,t.to,n,i,!0,r)),r}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||zt.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{zTe(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,n={}){var i,r,s,a;return zT.of(new ov(typeof t=="number"?Ze.cursor(t):t,(i=n.y)!==null&&i!==void 0?i:"nearest",(r=n.x)!==null&&r!==void 0?r:"nearest",(s=n.yMargin)!==null&&s!==void 0?s:5,(a=n.xMargin)!==null&&a!==void 0?a:5))}scrollSnapshot(){let{scrollTop:t,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(t);return zT.of(new ov(Ze.cursor(i.from),"start","start",i.top-t,n,!0))}setTabFocusMode(t){t==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof t=="boolean"?this.inputState.tabFocusMode=t?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return As.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return As.define(()=>({}),{eventObservers:t})}static theme(t,n){let i=Cm.newName(),r=[GT.of(i),$O.of(I$(`.${i}`,t))];return n&&n.dark&&r.push(j$.of(!0)),r}static baseTheme(t){return Hh.lowest($O.of(I$("."+R$,t,_2e)))}static findFromDOM(t){var n;let i=t.querySelector(".cm-content"),r=i&&Ts.get(i)||Ts.get(t);return((n=r==null?void 0:r.root)===null||n===void 0?void 0:n.view)||null}}Pt.styleModule=$O;Pt.inputHandler=n2e;Pt.clipboardInputFilter=VU;Pt.clipboardOutputFilter=HU;Pt.scrollHandler=a2e;Pt.focusChangeEffect=i2e;Pt.perLineTextDirection=r2e;Pt.exceptionSink=t2e;Pt.updateListener=C$;Pt.editable=Hf;Pt.mouseSelectionStyle=e2e;Pt.dragMovesSelection=JTe;Pt.clickAddsSelectionRange=ZTe;Pt.decorations=fI;Pt.blockWrappers=c2e;Pt.outerDecorations=WU;Pt.atomicRanges=jE;Pt.bidiIsolatedRanges=u2e;Pt.cursorScrollMargin=Vt.define({combine:e=>{let t=5,n=5;for(let i of e)typeof i=="number"?t=n=i:{x:t,y:n}=i;return{x:t,y:n}}});Pt.scrollMargins=d2e;Pt.darkTheme=j$;Pt.cspNonce=Vt.define({combine:e=>e.length?e[0]:""});Pt.contentAttributes=qU;Pt.editorAttributes=l2e;Pt.lineWrapping=Pt.contentAttributes.of({class:"cm-lineWrapping"});Pt.announce=$n.define();const ICt=4096,GZ={};class _N{constructor(t,n,i,r,s,a){this.from=t,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=a}static update(t,n){if(n.empty&&!t.some(s=>s.fresh))return t;let i=[],r=t.length?t[t.length-1].dir:Ar.LTR;for(let s=Math.max(0,t.length-10);s=0;r--){let s=i[r],a=typeof s=="function"?s(e):s;a&&UU(a,n)}return n}const PCt=zt.mac?"mac":zt.windows?"win":zt.linux?"linux":"key";function DCt(e,t){const n=e.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,a,l;for(let c=0;ci.concat(r),[]))),n}function LCt(e,t,n){return j2e(N2e(e.state),t,e,n)}let Rp=null;const $Ct=4e3;function FCt(e,t=PCt){let n=Object.create(null),i=Object.create(null),r=(a,l)=>{let c=i[a];if(c==null)i[a]=l;else if(c!=l)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},s=(a,l,c,u,d)=>{var f,h;let p=n[a]||(n[a]=Object.create(null)),g=l.split(/ (?!$)/).map(y=>DCt(y,t));for(let y=1;y{let O=Rp={view:w,prefix:x,scope:a};return setTimeout(()=>{Rp==O&&(Rp=null)},$Ct),!0}]})}let b=g.join(" ");r(b,!1);let v=p[b]||(p[b]={preventDefault:!1,stopPropagation:!1,run:((h=(f=p._any)===null||f===void 0?void 0:f.run)===null||h===void 0?void 0:h.slice())||[]});c&&v.run.push(c),u&&(v.preventDefault=!0),d&&(v.stopPropagation=!0)};for(let a of e){let l=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let u of l){let d=n[u]||(n[u]=Object.create(null));d._any||(d._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=a;for(let h in d)d[h].run.push(p=>f(p,P$))}let c=a[t]||a.key;if(c)for(let u of l)s(u,c,a.run,a.preventDefault,a.stopPropagation),a.shift&&s(u,"Shift-"+c,a.shift,a.preventDefault,a.stopPropagation)}return n}let P$=null;function j2e(e,t,n,i){P$=t;let r=Jkt(t),s=sl(r,0),a=wd(s)==r.length&&r!=" ",l="",c=!1,u=!1,d=!1;Rp&&Rp.view==n&&Rp.scope==i&&(l=Rp.prefix+" ",v2e.indexOf(t.keyCode)<0&&(u=!0,Rp=null));let f=new Set,h=v=>{if(v){for(let y of v.run)if(!f.has(y)&&(f.add(y),y(n)))return v.stopPropagation&&(d=!0),!0;v.preventDefault&&(v.stopPropagation&&(d=!0),u=!0)}return!1},p=e[i],g,b;return p&&(h(p[l+XT(r,t,!a)])?c=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(zt.windows&&t.ctrlKey&&t.altKey)&&!(zt.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(g=Tm[t.keyCode])&&g!=r?(h(p[l+XT(g,t,!0)])||t.shiftKey&&(b=GS[t.keyCode])!=r&&b!=g&&h(p[l+XT(b,t,!1)]))&&(c=!0):a&&t.shiftKey&&h(p[l+XT(r,t,!0)])&&(c=!0),!c&&h(p._any)&&(c=!0)),u&&(c=!0),c&&d&&t.stopPropagation(),P$=null,c}class ib{constructor(t,n,i,r,s){this.className=t,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,n){return n.className!=this.className?!1:(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",this.width!=null&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,n,i){if(i.empty){let r=t.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=R2e(t);return[new ib(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return BCt(t,n,i)}}function R2e(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==Ar.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function ZZ(e,t,n,i){let r=e.coordsAtPos(t,n*2);if(!r)return i;let s=e.dom.getBoundingClientRect(),a=(r.top+r.bottom)/2,l=e.posAtCoords({x:s.left+1,y:a}),c=e.posAtCoords({x:s.right-1,y:a});return l==null||c==null?i:{from:Math.max(i.from,Math.min(l,c)),to:Math.min(i.to,Math.max(l,c))}}function BCt(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let i=Math.max(n.from,e.viewport.from),r=Math.min(n.to,e.viewport.to),s=e.textDirection==Ar.LTR,a=e.contentDOM,l=a.getBoundingClientRect(),c=R2e(e),u=a.querySelector(".cm-line"),d=u&&window.getComputedStyle(u),f=l.left+(d?parseInt(d.paddingLeft)+Math.min(0,parseInt(d.textIndent)):0),h=l.right-(d?parseInt(d.paddingRight):0),p=A$(e,i,1),g=A$(e,r,-1),b=p.type==to.Text?p:null,v=g.type==to.Text?g:null;if(b&&(e.lineWrapping||p.widgetLineBreaks)&&(b=ZZ(e,i,1,b)),v&&(e.lineWrapping||g.widgetLineBreaks)&&(v=ZZ(e,r,-1,v)),b&&v&&b.from==v.from&&b.to==v.to)return x(w(n.from,n.to,b));{let k=b?w(n.from,null,b):O(p,!1),S=v?w(null,n.to,v):O(g,!0),E=[];return(b||p).to<(v||g).from-(b&&v?1:0)||p.widgetLineBreaks>1&&k.bottom+e.defaultLineHeight/2T&&A.from=P)break;I>R&&j(Math.max(B,R),k==null&&B<=T,Math.min(I,P),S==null&&I>=L,M.dir)}if(R=$.to+1,R>=P)break}return _.length==0&&j(T,k==null,L,S==null,e.textDirection),{top:C,bottom:N,horizontal:_}}function O(k,S){let E=l.top+(S?k.top:k.bottom);return{top:E,bottom:E,horizontal:[]}}}function UCt(e,t){return e.constructor==t.constructor&&e.eq(t)}class QCt{constructor(t,n){this.view=t,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,t)}update(t){t.startState.facet(wA)!=t.state.facet(wA)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){this.layer.updateOnDocViewUpdate!==!1&&t.requestMeasure(this.measureReq)}setOrder(t){let n=0,i=t.facet(wA);for(;n!UCt(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of t)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=t,zt.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const wA=Vt.define();function I2e(e){return[As.define(t=>new QCt(t,e)),wA.of(e)]}const ix=Vt.define({combine(e){return nf(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(t,n)=>Math.min(t,n),drawRangeCursor:(t,n)=>t||n})}});function zCt(e={}){return[ix.of(e),VCt,HCt,qCt,s2e.of(!0)]}function P2e(e){return e.startState.facet(ix)!=e.state.facet(ix)}const VCt=I2e({above:!0,markers(e){let{state:t}=e,n=t.facet(ix),i=[];for(let r of t.selection.ranges){let s=r==t.selection.main;if(r.empty||n.drawRangeCursor&&!(s&&zt.ios&&n.iosSelectionHandles)){let a=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=r.empty?r:Ze.cursor(r.head,r.assoc);for(let c of ib.forRange(e,a,l))i.push(c)}}return i},update(e,t){e.transactions.some(i=>i.selection)&&(t.style.animationName=t.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=P2e(e);return n&&JZ(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){JZ(t.state,e)},class:"cm-cursorLayer"});function JZ(e,t){t.style.animationDuration=e.facet(ix).cursorBlinkRate+"ms"}const HCt=I2e({above:!1,markers(e){let t=[],{main:n,ranges:i}=e.state.selection;for(let r of i)if(!r.empty)for(let s of ib.forRange(e,"cm-selectionBackground",r))t.push(s);if(zt.ios&&!n.empty&&e.state.facet(ix).iosSelectionHandles){for(let r of ib.forRange(e,"cm-selectionHandle cm-selectionHandle-start",Ze.cursor(n.from,1)))t.push(r);for(let r of ib.forRange(e,"cm-selectionHandle cm-selectionHandle-end",Ze.cursor(n.to,1)))t.push(r)}return t},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||P2e(e)},class:"cm-selectionLayer"}),qCt=Hh.highest(Pt.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),D2e=$n.define({map(e,t){return e==null?null:t.mapPos(e)}}),BO=no.define({create(){return null},update(e,t){return e!=null&&(e=t.changes.mapPos(e)),t.effects.reduce((n,i)=>i.is(D2e)?i.value:n,e)}}),WCt=As.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(BO);n==null?this.cursor!=null&&((t=this.cursor)===null||t===void 0||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(BO)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(BO),n=t!=null&&e.coordsAtPos(t);if(!n)return null;let i=e.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-i.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(BO)!=e&&this.view.dispatch({effects:D2e.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){(e.target==this.view.contentDOM||!this.view.contentDOM.contains(e.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function KCt(){return[BO,WCt]}function eJ(e,t,n,i,r){t.lastIndex=0;for(let s=e.iterRange(n,i),a=n,l;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;l=t.exec(s.value);)r(a+l.index,l)}function GCt(e,t){let n=e.visibleRanges;if(n.length==1&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(e.state.doc.lineAt(r).from,r-t),s=Math.min(e.state.doc.lineAt(s).to,s+t),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class XCt{constructor(t){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:a=1e3}=t;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(l,c,u,d)=>r(d,u,u+l[0].length,l,c);else if(typeof i=="function")this.addMatch=(l,c,u,d)=>{let f=i(l,c,u);f&&d(u,u+l[0].length,f)};else if(i)this.addMatch=(l,c,u,d)=>d(u,u+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=a}createDeco(t){let n=new Nh,i=n.add.bind(n);for(let{from:r,to:s}of GCt(t,this.maxLength))eJ(t.state.doc,this.regexp,r,s,(a,l)=>this.addMatch(l,t,a,i));return n.finish()}updateDeco(t,n){let i=1e9,r=-1;return t.docChanged&&t.changes.iterChanges((s,a,l,c)=>{c>=t.view.viewport.from&&l<=t.view.viewport.to&&(i=Math.min(l,i),r=Math.max(c,r))}),t.viewportMoved||r-i>1e3?this.createDeco(t.view):r>-1?this.updateRange(t.view,n.map(t.changes),i,r):n}updateRange(t,n,i,r){for(let s of t.visibleRanges){let a=Math.max(s.from,i),l=Math.min(s.to,r);if(l>=a){let c=t.state.doc.lineAt(a),u=c.toc.from;a--)if(this.boundary.test(c.text[a-1-c.from])){d=a;break}for(;lh.push(y.range(b,v));if(c==u)for(this.regexp.lastIndex=d-c.from;(p=this.regexp.exec(c.text))&&p.indexthis.addMatch(v,t,b,g));n=n.update({filterFrom:d,filterTo:f,filter:(b,v)=>bf,add:h})}}return n}}const D$=/x/.unicode!=null?"gu":"g",YCt=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,D$),ZCt={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let a5=null;function JCt(){var e;if(a5==null&&typeof document<"u"&&document.body){let t=document.body.style;a5=((e=t.tabSize)!==null&&e!==void 0?e:t.MozTabSize)!=null}return a5||!1}const SA=Vt.define({combine(e){let t=nf(e,{render:null,specialChars:YCt,addSpecialChars:null});return(t.replaceTabs=!JCt())&&(t.specialChars=new RegExp(" |"+t.specialChars.source,D$)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,D$)),t}});function eTt(e={}){return[SA.of(e),tTt()]}let tJ=null;function tTt(){return tJ||(tJ=As.fromClass(class{constructor(e){this.view=e,this.decorations=pn.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(SA)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new XCt({regexp:e.specialChars,decoration:(t,n,i)=>{let{doc:r}=n.state,s=sl(t[0],0);if(s==9){let a=r.lineAt(i),l=n.state.tabSize,c=Uu(a.text,l,i-a.from);return pn.replace({widget:new sTt((l-c%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=pn.replace({widget:new rTt(e,s)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(SA);e.startState.facet(SA)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))}const nTt="•";function iTt(e){return e>=32?nTt:e==10?"␤":String.fromCharCode(9216+e)}class rTt extends Yu{constructor(t,n){super(),this.options=t,this.code=n}eq(t){return t.code==this.code}toDOM(t){let n=iTt(this.code),i=t.state.phrase("Control character")+" "+(ZCt[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class sTt extends Yu{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent=" ",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}function aTt(){return lTt}const oTt=pn.line({class:"cm-activeLine"}),lTt=As.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let i of e.state.selection.ranges){let r=e.lineBlockAt(i.head);r.from>t&&(n.push(oTt.range(r.from)),t=r.from)}return pn.set(n)}},{decorations:e=>e.decorations});class cTt extends Yu{constructor(t){super(),this.content=t}toDOM(t){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(t):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(t){let n=t.firstChild?Dw(t.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(t.parentNode),r=ZS(n[0],i.direction!="rtl"),s=parseInt(i.lineHeight);return r.bottom-r.top>s*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+s}:r}ignoreEvent(){return!1}}function uTt(e){let t=As.fromClass(class{constructor(n){this.view=n,this.placeholder=e?pn.set([pn.widget({widget:new cTt(e),side:1}).range(0)]):pn.none}get decorations(){return this.view.state.doc.length?pn.none:this.placeholder}},{decorations:n=>n.decorations});return typeof e=="string"?[t,Pt.contentAttributes.of({"aria-placeholder":e})]:t}const M$=2e3;function dTt(e,t,n){let i=Math.min(t.line,n.line),r=Math.max(t.line,n.line),s=[];if(t.off>M$||n.off>M$||t.col<0||n.col<0){let a=Math.min(t.off,n.off),l=Math.max(t.off,n.off);for(let c=i;c<=r;c++){let u=e.doc.line(c);u.length<=l&&s.push(Ze.range(u.from+a,u.to+l))}}else{let a=Math.min(t.col,n.col),l=Math.max(t.col,n.col);for(let c=i;c<=r;c++){let u=e.doc.line(c),d=m$(u.text,a,e.tabSize,!0);if(d<0)s.push(Ze.cursor(u.to));else{let f=m$(u.text,l,e.tabSize);s.push(Ze.range(u.from+d,u.from+f))}}}return s}function fTt(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}function nJ(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),i=e.state.doc.lineAt(n),r=n-i.from,s=r>M$?-1:r==i.length?fTt(e,t.clientX):Uu(i.text,e.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function hTt(e,t){let n=nJ(e,t),i=e.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),a=r.state.doc.lineAt(s);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},i=i.map(r.changes)}},get(r,s,a){let l=nJ(e,r);if(!l)return i;let c=dTt(e.state,n,l);return c.length?a?Ze.create(c.concat(i.ranges)):Ze.create(c):i}}:null}function pTt(e){let t=n=>n.altKey&&n.button==0;return Pt.mouseSelectionStyle.of((n,i)=>t(i)?hTt(n,i):null)}const mTt={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},gTt={style:"cursor: crosshair"};function bTt(e={}){let[t,n]=mTt[e.key||"Alt"],i=As.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==t||n(r))},keyup(r){(r.keyCode==t||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,Pt.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?gTt:null})]}const YT="-10000px";class M2e{constructor(t,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=t.state.facet(n),this.tooltips=this.input.filter(a=>a);let s=null;this.tooltipViews=this.tooltips.map(a=>s=i(a,s))}update(t,n){var i;let r=t.state.facet(this.facet),s=r.filter(c=>c);if(r===this.input){for(let c of this.tooltipViews)c.update&&c.update(t);return!1}let a=[],l=n?[]:null;for(let c=0;cn[u]=c),n.length=l.length),this.input=r,this.tooltips=s,this.tooltipViews=a,!0}}function yTt(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}const o5=Vt.define({combine:e=>{var t,n,i;return{position:zt.ios?"absolute":((t=e.find(r=>r.position))===null||t===void 0?void 0:t.position)||"fixed",parent:((n=e.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=e.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||yTt}}}),iJ=new WeakMap,ZU=As.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(o5);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new M2e(e,JU,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,i=e.state.facet(o5);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),i=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=YT,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(e=i.destroy)===null||e===void 0||e.call(i);this.parent&&this.container.remove(),(t=this.resizeObserver)===null||t===void 0||t.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(zt.safari){let a=s.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(e=s.width/this.parent.offsetWidth,t=s.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=KU(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,a)=>{let l=this.manager.tooltipViews[a];return l.getCoords?l.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(o5).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:s}=e,a=[];for(let l=0;l=Math.min(n.bottom,i.bottom)||f.rightMath.min(n.right,i.right)+.1)){d.style.top=YT;continue}let p=c.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,g=p?7:0,b=h.right-h.left,v=(t=iJ.get(u))!==null&&t!==void 0?t:h.bottom-h.top,y=u.offset||xTt,x=this.view.textDirection==Ar.LTR,w=h.width>i.right-i.left?x?i.left:i.right-h.width:x?Math.max(i.left,Math.min(f.left-(p?14:0)+y.x,i.right-b)):Math.min(Math.max(i.left,f.left-b+(p?14:0)-y.x),i.right-b),O=this.above[l];!c.strictSide&&(O?f.top-v-g-y.yi.bottom)&&O==i.bottom-f.bottom>f.top-i.top&&(O=this.above[l]=!O);let k=(O?f.top-i.top:i.bottom-f.bottom)-g;if(kw&&C.topS&&(S=O?C.top-v-2-g:C.bottom+g+2);if(this.position=="absolute"?(d.style.top=(S-e.parent.top)/s+"px",rJ(d,(w-e.parent.left)/r)):(d.style.top=S/s+"px",rJ(d,w/r)),p){let C=f.left+(x?y.x:-y.x)-(w+14-7);p.style.left=C/r+"px"}u.overlap!==!0&&a.push({left:w,top:S,right:E,bottom:S+v}),d.classList.toggle("cm-tooltip-above",O),d.classList.toggle("cm-tooltip-below",!O),u.positioned&&u.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=YT}},{eventObservers:{scroll(){this.maybeMeasure()}}});function rJ(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}const vTt=Pt.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),xTt={x:0,y:0},JU=Vt.define({enables:[ZU,vTt]}),NN=Vt.define({combine:e=>e.reduce((t,n)=>t.concat(n),[])});class gI{static create(t){return new gI(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new M2e(t,NN,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(t,n){let i=t.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(t){for(let n of this.manager.tooltipViews)n.mount&&n.mount(t);this.mounted=!0}positioned(t){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let n of this.manager.tooltipViews)(t=n.destroy)===null||t===void 0||t.call(n)}passProp(t){let n;for(let i of this.manager.tooltipViews){let r=i[t];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const OTt=JU.compute([NN],e=>{let t=e.facet(NN);return t.length===0?null:{pos:Math.min(...t.map(n=>n.pos)),end:Math.max(...t.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:gI.create,above:t[0].above,arrow:t.some(n=>n.arrow)}}),L2e=Vt.define();class wTt{constructor(t,n,i,r,s,a){this.view=t,this.source=n,this.field=i,this.locked=r,this.setHover=s,this.hoverTime=a,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(t){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;ta.bottom||n.xa.right+t.defaultCharacterWidth)return;let l=t.bidiSpans(t.state.doc.lineAt(r)).find(u=>u.from<=r&&u.to>=r),c=l&&l.dir==Ar.RTL?-1:1;s=n.x{if(l&&!(Array.isArray(l)&&!l.length)){let c=Array.isArray(l)?l:[l];r&&this.locked.set(c,r),t.dispatch({effects:this.setHover.of(c)})}};if(s&&"then"in s){let l=this.pending={pos:n};s.then(c=>{this.pending==l&&(this.pending=null,a(c))},c=>dl(t.state,c,"hover tooltip"))}else a(s)}get tooltip(){let t=this.view.plugin(ZU),n=t?t.manager.tooltips.findIndex(i=>i.create==gI.create):-1;return n>-1?t.manager.tooltipViews[n]:null}mousemove(t){var n,i;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&!this.locked.has(r)&&s&&!STt(s.dom,t)||this.pending){let{pos:a}=r[0]||this.pending,l=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:a;(a==l?this.view.posAtCoords(this.lastMove)!=a:!kTt(this.view,a,l,t.clientX,t.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length&&!this.locked.has(n)){let{tooltip:i}=this;i&&i.dom.contains(t.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let n=i=>{t.removeEventListener("mouseleave",n);let{active:r}=this;r.length&&!this.locked.has(r)&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const ZT=4;function STt(e,t){let{left:n,right:i,top:r,bottom:s}=e.getBoundingClientRect(),a;if(a=e.querySelector(".cm-tooltip-arrow")){let l=a.getBoundingClientRect();r=Math.min(l.top,r),s=Math.max(l.bottom,s)}return t.clientX>=n-ZT&&t.clientX<=i+ZT&&t.clientY>=r-ZT&&t.clientY<=s+ZT}function kTt(e,t,n,i,r,s){let a=e.scrollDOM.getBoundingClientRect(),l=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>i||a.rightr||Math.min(a.bottom,l)=t&&c<=n}function ETt(e,t={}){let n=$n.define(),i=new WeakMap,r=no.define({create(){return[]},update(a,l){let c=i.get(a);if(a.length&&(t.hideOnChange&&(l.docChanged||l.selection)?a=[]:c&&c(l)?a=[]:t.hideOn&&(a=a.filter(u=>!t.hideOn(l,u)))),l.docChanged&&a.length){let u=[];for(let d of a){let f=l.changes.mapPos(d.pos,-1,Ya.TrackDel);if(f!=null){let h=Object.assign(Object.create(null),d);h.pos=f,h.end!=null&&(h.end=l.changes.mapPos(h.end)),u.push(h)}}a=u}for(let u of l.effects)u.is(n)&&(a=u.value,c=void 0),(u.is(TTt)&&!u.value||u.value==r)&&(a=[]);return a.length&&c&&i.set(a,c),a},provide:a=>NN.from(a)});const s=As.define(a=>new wTt(a,e,r,i,n,t.hoverTime||300));return{active:r,extension:[r,s,L2e.of(s),OTt]}}function CTt(e,t,n,i={}){var r;let s=e.state.facet(L2e).map(a=>e.plugin(a)).filter(a=>!!a);if(i.tooltip&&i.tooltip.active){let a=s.find(l=>l.field==i.tooltip.active);a&&(s=[a])}for(let a of s)a.activateHover(e,t,n,(r=i.until)!==null&&r!==void 0?r:()=>!1)}function $2e(e,t){let n=e.plugin(ZU);if(!n)return null;let i=n.manager.tooltips.indexOf(t);return i<0?null:n.manager.tooltipViews[i]}const TTt=$n.define(),sJ=Vt.define({combine(e){let t,n;for(let i of e)t=t||i.topContainer,n=n||i.bottomContainer;return{topContainer:t,bottomContainer:n}}});function eQ(e,t){let n=e.plugin(F2e),i=n?n.specs.indexOf(t):-1;return i>-1?n.panels[i]:null}const F2e=As.fromClass(class{constructor(e){this.input=e.state.facet(ek),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(e));let t=e.state.facet(sJ);this.top=new JT(e,!0,t.topContainer),this.bottom=new JT(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(e){let t=e.state.facet(sJ);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new JT(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new JT(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(ek);if(n!=this.input){let i=n.filter(c=>c),r=[],s=[],a=[],l=[];for(let c of i){let u=this.specs.indexOf(c),d;u<0?(d=c(e.view),l.push(d)):(d=this.panels[u],d.update&&d.update(e)),r.push(d),(d.top?s:a).push(d)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(a);for(let c of l)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let i of this.panels)i.update&&i.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>Pt.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class JT{constructor(t,n,i){this.view=t,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let n of this.panels)n.destroy&&t.indexOf(n)<0&&n.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let t=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;t!=n.dom;)t=aJ(t);t=t.nextSibling}else this.dom.insertBefore(n.dom,t);for(;t;)t=aJ(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function aJ(e){let t=e.nextSibling;return e.remove(),t}const ek=Vt.define({enables:F2e});function ATt(e,t){let n,i=new Promise(a=>n=a),r=a=>_Tt(a,t,n);e.state.field(l5,!1)?e.dispatch({effects:B2e.of(r)}):e.dispatch({effects:$n.appendConfig.of(l5.init(()=>[r]))});let s=U2e.of(r);return{close:s,result:i.then(a=>((e.win.queueMicrotask||(c=>e.win.setTimeout(c,10)))(()=>{e.state.field(l5).indexOf(r)>-1&&e.dispatch({effects:s})}),a))}}const l5=no.define({create(){return[]},update(e,t){for(let n of t.effects)n.is(B2e)?e=[n.value].concat(e):n.is(U2e)&&(e=e.filter(i=>i!=n.value));return e},provide:e=>ek.computeN([e],t=>t.field(e))}),B2e=$n.define(),U2e=$n.define();function _Tt(e,t,n){let i=t.content?t.content(e,()=>a(null)):null;if(!i){if(i=vr("form"),t.input){let l=vr("input",t.input);/^(text|password|number|email|tel|url)$/.test(l.type)&&l.classList.add("cm-textfield"),l.name||(l.name="input"),i.appendChild(vr("label",(t.label||"")+": ",l))}else i.appendChild(document.createTextNode(t.label||""));i.appendChild(document.createTextNode(" ")),i.appendChild(vr("button",{class:"cm-button",type:"submit"},t.submitLabel||"OK"))}let r=i.nodeName=="FORM"?[i]:i.querySelectorAll("form");for(let l=0;l{u.keyCode==27?(u.preventDefault(),a(null)):u.keyCode==13&&(u.preventDefault(),a(c))}),c.addEventListener("submit",u=>{u.preventDefault(),a(c)})}let s=vr("div",i,vr("button",{onclick:()=>a(null),"aria-label":e.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));t.class&&(s.className=t.class),s.classList.add("cm-dialog");function a(l){s.contains(s.ownerDocument.activeElement)&&e.focus(),n(l)}return{dom:s,top:t.top,mount:()=>{if(t.focus){let l;typeof t.focus=="string"?l=i.querySelector(t.focus):l=i.querySelector("input")||i.querySelector("button"),l&&"select"in l?l.select():l&&"focus"in l&&l.focus()}}}}class Rh extends Em{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}Rh.prototype.elementClass="";Rh.prototype.toDOM=void 0;Rh.prototype.mapMode=Ya.TrackBefore;Rh.prototype.startSide=Rh.prototype.endSide=-1;Rh.prototype.point=!0;const kA=Vt.define(),NTt=Vt.define(),jTt={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Si.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},$w=Vt.define();function RTt(e){return[Q2e(),$w.of({...jTt,...e})]}const oJ=Vt.define({combine:e=>e.some(t=>t)});function Q2e(e){return[ITt]}const ITt=As.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet($w).map(t=>new cJ(e,t)),this.fixed=!e.state.facet(oJ);for(let t of this.gutters)t.config.side=="after"?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,i=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(e.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet(oJ)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Si.iter(this.view.state.facet(kA),this.view.viewport.from),i=[],r=this.gutters.map(s=>new PTt(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let a=!0;for(let l of s.type)if(l.type==to.Text&&a){L$(n,i,l.from);for(let c of r)c.line(this.view,l,i);a=!1}else if(l.widget)for(let c of r)c.widget(this.view,l)}else if(s.type==to.Text){L$(n,i,s.from);for(let a of r)a.line(this.view,s,i)}else if(s.widget)for(let a of r)a.widget(this.view,s);for(let s of r)s.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet($w),n=e.state.facet($w),i=e.docChanged||e.heightChanged||e.viewportChanged||!Si.eq(e.startState.facet(kA),e.state.facet(kA),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let r of this.gutters)r.update(e)&&(i=!0);else{i=!0;let r=[];for(let s of n){let a=t.indexOf(s);a<0?r.push(new cJ(this.view,s)):(this.gutters[a].update(e),r.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>Pt.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*t.scaleX,r=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==Ar.LTR?{left:i,right:r}:{right:i,left:r}})});function lJ(e){return Array.isArray(e)?e:[e]}function L$(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class PTt{constructor(t,n,i){this.gutter=t,this.height=i,this.i=0,this.cursor=Si.iter(t.markers,n.from)}addElement(t,n,i){let{gutter:r}=this,s=(n.top-this.height)/t.scaleY,a=n.height/t.scaleY;if(this.i==r.elements.length){let l=new z2e(t,a,s,i);r.elements.push(l),r.dom.appendChild(l.dom)}else r.elements[this.i].update(t,a,s,i);this.height=n.bottom,this.i++}line(t,n,i){let r=[];L$(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(t,n,r);s&&r.unshift(s);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(t,n,r)}widget(t,n){let i=this.gutter.config.widgetMarker(t,n.widget,n),r=i?[i]:null;for(let s of t.state.facet(NTt)){let a=s(t,n.widget,n);a&&(r||(r=[])).push(a)}r&&this.addElement(t,n,r)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let n=t.elements.pop();t.dom.removeChild(n.dom),n.destroy()}}}class cJ{constructor(t,n){this.view=t,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let c=s.getBoundingClientRect();a=(c.top+c.bottom)/2}else a=r.clientY;let l=t.lineBlockAtHeight(a-t.documentTop);n.domEventHandlers[i](t,l,r)&&r.preventDefault()});this.markers=lJ(n.markers(t)),n.initialSpacer&&(this.spacer=new z2e(t,0,0,[n.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let n=this.markers;if(this.markers=lJ(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],t);r!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[r])}let i=t.view.viewport;return!Si.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(t):!1)}destroy(){for(let t of this.elements)t.destroy()}}class z2e{constructor(t,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,n,i,r)}update(t,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),DTt(this.markers,r)||this.setMarkers(t,r)}setMarkers(t,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,a=0;;){let l=a,c=ss(l,c,u)||a(l,c,u):a}return i}})}});class c5 extends Rh{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function u5(e,t){return e.state.facet(Ry).formatNumber(t,e.state)}const $Tt=$w.compute([Ry],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(t){return t.state.facet(MTt)},lineMarker(t,n,i){return i.some(r=>r.toDOM)?null:new c5(u5(t,t.state.doc.lineAt(n.from).number))},widgetMarker:(t,n,i)=>{for(let r of t.state.facet(LTt)){let s=r(t,n,i);if(s)return s}return null},lineMarkerChange:t=>t.startState.facet(Ry)!=t.state.facet(Ry),initialSpacer(t){return new c5(u5(t,uJ(t.state.doc.lines)))},updateSpacer(t,n){let i=u5(n.view,uJ(n.view.state.doc.lines));return i==t.number?t:new c5(i)},domEventHandlers:e.facet(Ry).domEventHandlers,side:"before"}));function V2e(e={}){return[Ry.of(e),Q2e(),$Tt]}function uJ(e){let t=9;for(;t{let t=[],n=-1;for(let i of e.selection.ranges){let r=e.doc.lineAt(i.head).from;r>n&&(n=r,t.push(FTt.range(r)))}return Si.of(t)});function UTt(){return BTt}let QTt=0,vd=class $${constructor(t,n,i,r){this.name=t,this.set=n,this.base=i,this.modified=r,this.id=QTt++}toString(){let{name:t}=this;for(let n of this.modified)n.name&&(t=`${n.name}(${t})`);return t}static define(t,n){let i=typeof t=="string"?t:"?";if(t instanceof $$&&(n=t),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let r=new $$(i,[],null,[]);if(r.set.push(r),n)for(let s of n.set)r.set.push(s);return r}static defineModifier(t){let n=new jN(t);return i=>i.modified.indexOf(n)>-1?i:jN.get(i.base||i,i.modified.concat(n).sort((r,s)=>r.id-s.id))}},zTt=0;class jN{constructor(t){this.name=t,this.instances=[],this.id=zTt++}static get(t,n){if(!n.length)return t;let i=n[0].instances.find(l=>l.base==t&&VTt(n,l.modified));if(i)return i;let r=[],s=new vd(t.name,r,t,n);for(let l of n)l.instances.push(s);let a=HTt(n);for(let l of t.set)if(!l.modified.length)for(let c of a)r.push(jN.get(l,c));return s}}function VTt(e,t){return e.length==t.length&&e.every((n,i)=>n==t[i])}function HTt(e){let t=[[]];for(let n=0;ni.length-n.length)}function qh(e){let t=Object.create(null);for(let n in e){let i=e[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],a=2,l=r;for(let f=0;;){if(l=="..."&&f>0&&f+3==r.length){a=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!h)throw new RangeError("Invalid path: "+r);if(s.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==r.length)break;let p=r[f++];if(f==r.length&&p=="!"){a=0;break}if(p!="/")throw new RangeError("Invalid path: "+r);l=r.slice(f)}let c=s.length-1,u=s[c];if(!u)throw new RangeError("Invalid path: "+r);let d=new tk(i,a,c>0?s.slice(0,c):null);t[u]=d.sort(t[u])}}return H2e.add(t)}const H2e=new In({combine(e,t){let n,i,r;for(;e||t;){if(!e||t&&e.depth>=t.depth?(r=t,t=t.next):(r=e,e=e.next),n&&n.mode==r.mode&&!r.context&&!n.context)continue;let s=new tk(r.tags,r.mode,r.context);n?n.next=s:i=s,n=s}return i}});let tk=class{constructor(t,n,i,r){this.tags=t,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth{let a=r;for(let l of s)for(let c of l.set){let u=n[c.id];if(u){a=a?a+" "+u:u;break}}return a},scope:i}}function qTt(e,t){let n=null;for(let i of e){let r=i.style(t);r&&(n=n?n+" "+r:r)}return n}function WTt(e,t,n,i=0,r=e.length){let s=new KTt(i,Array.isArray(t)?t:[t],n);s.highlightRange(e.cursor(),i,r,"",s.highlighters),s.flush(r)}class KTt{constructor(t,n,i){this.at=t,this.highlighters=n,this.span=i,this.class=""}startSpan(t,n){n!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=n)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,n,i,r,s){let{type:a,from:l,to:c}=t;if(l>=i||c<=n)return;a.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(a)));let u=r,d=GTt(t)||tk.empty,f=qTt(s,d.tags);if(f&&(u&&(u+=" "),u+=f,d.mode==1&&(r+=(r?" ":"")+f)),this.startSpan(Math.max(n,l),u),d.opaque)return;let h=t.tree&&t.tree.prop(In.mounted);if(h&&h.overlay){let p=t.node.enter(h.overlay[0].from+l,1),g=this.highlighters.filter(v=>!v.scope||v.scope(h.tree.type)),b=t.firstChild();for(let v=0,y=l;;v++){let x=v=w||!t.nextSibling())););if(!x||w>i)break;y=x.to+l,y>n&&(this.highlightRange(p.cursor(),Math.max(n,x.from+l),Math.min(i,y),"",g),this.startSpan(Math.min(i,y),u))}b&&t.parent()}else if(t.firstChild()){h&&(r="");do if(!(t.to<=n)){if(t.from>=i)break;this.highlightRange(t,n,i,r,s),this.startSpan(Math.min(i,t.to),u)}while(t.nextSibling());t.parent()}}}function GTt(e){let t=e.type.prop(H2e);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}const Lt=vd.define,e2=Lt(),Sp=Lt(),dJ=Lt(Sp),fJ=Lt(Sp),kp=Lt(),t2=Lt(kp),d5=Lt(kp),md=Lt(),sg=Lt(md),dd=Lt(),fd=Lt(),F$=Lt(),X1=Lt(F$),n2=Lt(),ne={comment:e2,lineComment:Lt(e2),blockComment:Lt(e2),docComment:Lt(e2),name:Sp,variableName:Lt(Sp),typeName:dJ,tagName:Lt(dJ),propertyName:fJ,attributeName:Lt(fJ),className:Lt(Sp),labelName:Lt(Sp),namespace:Lt(Sp),macroName:Lt(Sp),literal:kp,string:t2,docString:Lt(t2),character:Lt(t2),attributeValue:Lt(t2),number:d5,integer:Lt(d5),float:Lt(d5),bool:Lt(kp),regexp:Lt(kp),escape:Lt(kp),color:Lt(kp),url:Lt(kp),keyword:dd,self:Lt(dd),null:Lt(dd),atom:Lt(dd),unit:Lt(dd),modifier:Lt(dd),operatorKeyword:Lt(dd),controlKeyword:Lt(dd),definitionKeyword:Lt(dd),moduleKeyword:Lt(dd),operator:fd,derefOperator:Lt(fd),arithmeticOperator:Lt(fd),logicOperator:Lt(fd),bitwiseOperator:Lt(fd),compareOperator:Lt(fd),updateOperator:Lt(fd),definitionOperator:Lt(fd),typeOperator:Lt(fd),controlOperator:Lt(fd),punctuation:F$,separator:Lt(F$),bracket:X1,angleBracket:Lt(X1),squareBracket:Lt(X1),paren:Lt(X1),brace:Lt(X1),content:md,heading:sg,heading1:Lt(sg),heading2:Lt(sg),heading3:Lt(sg),heading4:Lt(sg),heading5:Lt(sg),heading6:Lt(sg),contentSeparator:Lt(md),list:Lt(md),quote:Lt(md),emphasis:Lt(md),strong:Lt(md),link:Lt(md),monospace:Lt(md),strikethrough:Lt(md),inserted:Lt(),deleted:Lt(),changed:Lt(),invalid:Lt(),meta:n2,documentMeta:Lt(n2),annotation:Lt(n2),processingInstruction:Lt(n2),definition:vd.defineModifier("definition"),constant:vd.defineModifier("constant"),function:vd.defineModifier("function"),standard:vd.defineModifier("standard"),local:vd.defineModifier("local"),special:vd.defineModifier("special")};for(let e in ne){let t=ne[e];t instanceof vd&&(t.name=e)}q2e([{tag:ne.link,class:"tok-link"},{tag:ne.heading,class:"tok-heading"},{tag:ne.emphasis,class:"tok-emphasis"},{tag:ne.strong,class:"tok-strong"},{tag:ne.keyword,class:"tok-keyword"},{tag:ne.atom,class:"tok-atom"},{tag:ne.bool,class:"tok-bool"},{tag:ne.url,class:"tok-url"},{tag:ne.labelName,class:"tok-labelName"},{tag:ne.inserted,class:"tok-inserted"},{tag:ne.deleted,class:"tok-deleted"},{tag:ne.literal,class:"tok-literal"},{tag:ne.string,class:"tok-string"},{tag:ne.number,class:"tok-number"},{tag:[ne.regexp,ne.escape,ne.special(ne.string)],class:"tok-string2"},{tag:ne.variableName,class:"tok-variableName"},{tag:ne.local(ne.variableName),class:"tok-variableName tok-local"},{tag:ne.definition(ne.variableName),class:"tok-variableName tok-definition"},{tag:ne.special(ne.variableName),class:"tok-variableName2"},{tag:ne.definition(ne.propertyName),class:"tok-propertyName tok-definition"},{tag:ne.typeName,class:"tok-typeName"},{tag:ne.namespace,class:"tok-namespace"},{tag:ne.className,class:"tok-className"},{tag:ne.macroName,class:"tok-macroName"},{tag:ne.propertyName,class:"tok-propertyName"},{tag:ne.operator,class:"tok-operator"},{tag:ne.comment,class:"tok-comment"},{tag:ne.meta,class:"tok-meta"},{tag:ne.invalid,class:"tok-invalid"},{tag:ne.punctuation,class:"tok-punctuation"}]);var f5;const zp=new In;function bI(e){return Vt.define({combine:e?t=>t.concat(e):void 0})}const tQ=new In;class Yl{constructor(t,n,i=[],r=""){this.data=t,this.name=r,_i.prototype.hasOwnProperty("tree")||Object.defineProperty(_i.prototype,"tree",{get(){return Sr(this)}}),this.parser=n,this.extension=[_m.of(this),_i.languageData.of((s,a,l)=>{let c=hJ(s,a,l),u=c.type.prop(zp);if(!u)return[];let d=s.facet(u),f=c.type.prop(tQ);if(f){let h=c.resolve(a-c.from,l);for(let p of f)if(p.test(h,s)){let g=s.facet(p.facet);return p.type=="replace"?g:g.concat(d)}}return d})].concat(i)}isActiveAt(t,n,i=-1){return hJ(t,n,i).type.prop(zp)==this.data}findRegions(t){let n=t.facet(_m);if((n==null?void 0:n.data)==this.data)return[{from:0,to:t.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,a)=>{if(s.prop(zp)==this.data){i.push({from:a,to:a+s.length});return}let l=s.prop(In.mounted);if(l){if(l.tree.prop(zp)==this.data){if(l.overlay)for(let c of l.overlay)i.push({from:c.from+a,to:c.to+a});else i.push({from:a,to:a+s.length});return}else if(l.overlay){let c=i.length;if(r(l.tree,l.overlay[0].from+a),i.length>c)return}}for(let c=0;ci.isTop?n:void 0)]}),t.name)}configure(t,n){return new Ih(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Sr(e){let t=e.field(Yl.state,!1);return t?t.tree:pi.empty}class XTt{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,n){let i=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,n):this.string.slice(t-i,n-i)}}let Y1=null;class _b{constructor(t,n,i=[],r,s,a,l,c){this.parser=t,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=a,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(t,n,i){return new _b(t,n,[],pi.empty,0,i,[],null)}startParse(){return this.parser.startParse(new XTt(this.state.doc),this.fragments)}work(t,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=pi.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof t=="number"){let r=Date.now()+t;t=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=t,this.tree=n,this.fragments=this.withoutTempSkipped(fh.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let n=Y1;Y1=this;try{return t()}finally{Y1=n}}withoutTempSkipped(t){for(let n;n=this.tempSkipped.pop();)t=pJ(t,n.from,n.to);return t}changes(t,n){let{fragments:i,tree:r,treeLen:s,viewport:a,skipped:l}=this;if(this.takeTree(),!t.empty){let c=[];if(t.iterChangedRanges((u,d,f,h)=>c.push({fromA:u,toA:d,fromB:f,toB:h})),i=fh.applyChanges(i,c),r=pi.empty,s=0,a={from:t.mapPos(a.from,-1),to:t.mapPos(a.to,1)},this.skipped.length){l=[];for(let u of this.skipped){let d=t.mapPos(u.from,1),f=t.mapPos(u.to,-1);dt.from&&(this.fragments=pJ(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,n){this.skipped.push({from:t,to:n})}static getSkippingParser(t){return new class extends cI{createParse(n,i,r){let s=r[0].from,a=r[r.length-1].to;return{parsedPos:s,advance(){let c=Y1;if(c){for(let u of r)c.tempSkipped.push(u);t&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,t]):t)}return this.parsedPos=a,new pi(na.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let n=this.fragments;return this.treeLen>=t&&n.length&&n[0].from==0&&n[0].to>=t}static get(){return Y1}}function pJ(e,t,n){return fh.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class rx{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new rx(n)}static init(t){let n=Math.min(3e3,t.doc.length),i=_b.create(t.facet(_m).parser,t,{from:0,to:n});return i.work(20,n)||i.takeTree(),new rx(i)}}Yl.state=no.define({create:rx.init,update(e,t){for(let n of t.effects)if(n.is(Yl.setState))return n.value;return t.startState.facet(_m)!=t.state.facet(_m)?rx.init(t.state):e.apply(t)}});let W2e=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<"u"&&(W2e=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const h5=typeof navigator<"u"&&(!((f5=navigator.scheduling)===null||f5===void 0)&&f5.isInputPending)?()=>navigator.scheduling.isInputPending():null,YTt=As.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let n=this.view.state.field(Yl.state).context;(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(Yl.state);(n.tree!=n.context.tree||!n.context.isDone(t.doc.length))&&(this.working=W2e(this.work))}work(t){this.working=null;let n=Date.now();if(this.chunkEndr+1e3,c=s.context.work(()=>h5&&h5()||Date.now()>a,r+(l?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Yl.setState.of(new rx(s.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(n=>dl(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),_m=Vt.define({combine(e){return e.length?e[0]:null},enables:e=>[Yl.state,YTt,Pt.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class Nm{constructor(t,n=[]){this.language=t,this.support=n,this.extension=[t,n]}}class RN{constructor(t,n,i,r,s,a=void 0){this.name=t,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=s,this.support=a,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(t=>this.support=t,t=>{throw this.loading=null,t}))}static of(t){let{load:n,support:i}=t;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new RN(t.name,(t.alias||[]).concat(t.name).map(r=>r.toLowerCase()),t.extensions||[],t.filename,n,i)}static matchFilename(t,n){for(let r of t)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of t)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(t,n,i=!0){n=n.toLowerCase();for(let r of t)if(r.alias.some(s=>s==n))return r;if(i)for(let r of t)for(let s of r.alias){let a=n.indexOf(s);if(a>-1&&(s.length>2||!/\w/.test(n[a-1])&&!/\w/.test(n[a+s.length])))return r}return null}}const ZTt=Vt.define(),Jx=Vt.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(n=>n!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function Nb(e){let t=e.facet(Jx);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function nk(e,t){let n="",i=e.tabSize,r=e.facet(Jx)[0];if(r==" "){for(;t>=i;)n+=" ",t-=i;r=" "}for(let s=0;s=t?JTt(e,n,t):null}class yI{constructor(t,n={}){this.state=t,this.options=n,this.unit=Nb(t)}lineAt(t,n=1){let i=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==t?{text:"",from:t}:(n<0?r-1&&(s+=a-this.countColumn(i,i.search(/\S|$/))),s}countColumn(t,n=t.length){return Uu(t,this.state.tabSize,n)}lineIndent(t,n=1){let{text:i,from:r}=this.lineAt(t,n),s=this.options.overrideIndentation;if(s){let a=s(r);if(a>-1)return a}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Wh=new In;function JTt(e,t,n){let i=t.resolveStack(n),r=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let a=r;a&&!(a.fromi.node.to||a.from==i.node.from&&a.type==i.node.type);a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)i={node:s[a],next:i}}return K2e(i,e,n)}function K2e(e,t,n){for(let i=e;i;i=i.next){let r=t2t(i.node);if(r)return r(iQ.create(t,n,i))}return 0}function e2t(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function t2t(e){let t=e.type.prop(Wh);if(t)return t;let n=e.firstChild,i;if(n&&(i=n.type.prop(In.closedBy))){let r=e.lastChild,s=r&&i.indexOf(r.name)>-1;return a=>G2e(a,!0,1,void 0,s&&!e2t(a)?r.from:void 0)}return e.parent==null?n2t:null}function n2t(){return 0}class iQ extends yI{constructor(t,n,i){super(t.state,t.options),this.base=t,this.pos=n,this.context=i}get node(){return this.context.node}static create(t,n,i){return new iQ(t,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let n=this.state.doc.lineAt(t.from);for(;;){let i=t.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(i2t(i,t))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return K2e(this.context.next,this.base,this.pos)}}function i2t(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function r2t(e){let t=e.node,n=t.childAfter(t.from),i=t.lastChild;if(!n)return null;let r=e.options.simulateBreak,s=e.state.doc.lineAt(n.from),a=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let l=n.to;;){let c=t.childAfter(l);if(!c||c==i)return null;if(!c.type.isSkipped){if(c.from>=a)return null;let u=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+u}}l=c.to}}function lv({closing:e,align:t=!0,units:n=1}){return i=>G2e(i,t,n,e)}function G2e(e,t,n,i,r){let s=e.textAfter,a=s.match(/^\s*/)[0].length,l=i&&s.slice(a,a+i.length)==i||r==e.pos+a,c=t?r2t(e):null;return c?l?e.column(c.from):e.column(c.to):e.baseIndent+(l?0:e.unit*n)}const s2t=e=>e.baseIndent;function cv({except:e,units:t=1}={}){return n=>{let i=e&&e.test(n.textAfter);return n.baseIndent+(i?0:t*n.unit)}}const a2t=200;function o2t(){return _i.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:i}=e.newSelection.main,r=n.lineAt(i);if(i>r.from+a2t)return e;let s=n.sliceString(r.from,i);if(!t.some(u=>u.test(s)))return e;let{state:a}=e,l=-1,c=[];for(let{head:u}of a.selection.ranges){let d=a.doc.lineAt(u);if(d.from==l)continue;l=d.from;let f=nQ(a,d.from);if(f==null)continue;let h=/^\s*/.exec(d.text)[0],p=nk(a,f);h!=p&&c.push({from:d.from,to:d.from+h.length,insert:p})}return c.length?[e,{changes:c,sequential:!0}]:e})}const X2e=Vt.define(),Kh=new In;function RE(e){let t=e.firstChild,n=e.lastChild;return t&&t.ton)continue;if(s&&l.from=t&&u.to>n&&(s=u)}}return s}function c2t(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function IN(e,t,n){for(let i of e.facet(X2e)){let r=i(e,t,n);if(r)return r}return l2t(e,t,n)}function Y2e(e,t){let n=t.mapPos(e.from,1),i=t.mapPos(e.to,-1);return n>=i?void 0:{from:n,to:i}}const vI=$n.define({map:Y2e}),IE=$n.define({map:Y2e});function Z2e(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(i=>i.from<=n&&i.to>=n)||t.push(e.lineBlockAt(n));return t}const jb=no.define({create(){return pn.none},update(e,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges((i,r)=>e=mJ(e,i,r)),e=e.map(t.changes);let n=[];for(let i of t.effects)i.is(vI)&&!u2t(e,i.value.from,i.value.to)?n.push(i.value):i.is(IE)&&(e=e.update({filter:(r,s)=>i.value.from!=r||i.value.to!=s,filterFrom:i.value.from,filterTo:i.value.to}));if(n.length){let{preparePlaceholder:i}=t.state.facet(tAe),r=n.map(s=>(i?pn.replace({widget:new b2t(i(t.state,s))}):gJ).range(s.from,s.to));e=e.update({add:r})}return t.selection&&(e=mJ(e,t.selection.main.head)),e},provide:e=>Pt.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n{rt&&(i=!0)}),i?e.update({filterFrom:t,filterTo:n,filter:(r,s)=>r>=n||s<=t}):e}function PN(e,t,n){var i;let r=null;return(i=e.field(jb,!1))===null||i===void 0||i.between(t,n,(s,a)=>{(!r||r.from>s)&&(r={from:s,to:a})}),r}function u2t(e,t,n){let i=!1;return e.between(t,t,(r,s)=>{r==t&&s==n&&(i=!0)}),i}function J2e(e,t){return e.field(jb,!1)?t:t.concat($n.appendConfig.of(nAe()))}const d2t=e=>{for(let t of Z2e(e)){let n=IN(e.state,t.from,t.to);if(n)return e.dispatch({effects:J2e(e.state,[vI.of(n),eAe(e,n)])}),!0}return!1},f2t=e=>{if(!e.state.field(jb,!1))return!1;let t=[];for(let n of Z2e(e)){let i=PN(e.state,n.from,n.to);i&&t.push(IE.of(i),eAe(e,i,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function eAe(e,t,n=!0){let i=e.state.doc.lineAt(t.from).number,r=e.state.doc.lineAt(t.to).number;return Pt.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${e.state.phrase("to")} ${r}.`)}const h2t=e=>{let{state:t}=e,n=[];for(let i=0;i{let t=e.state.field(jb,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(i,r)=>{n.push(IE.of({from:i,to:r}))}),e.dispatch({effects:n}),!0},m2t=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:d2t},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:f2t},{key:"Ctrl-Alt-[",run:h2t},{key:"Ctrl-Alt-]",run:p2t}],g2t={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},tAe=Vt.define({combine(e){return nf(e,g2t)}});function nAe(e){return[jb,x2t]}function iAe(e,t){let{state:n}=e,i=n.facet(tAe),r=a=>{let l=e.lineBlockAt(e.posAtDOM(a.target)),c=PN(e.state,l.from,l.to);c&&e.dispatch({effects:IE.of(c)}),a.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(e,r,t);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const gJ=pn.replace({widget:new class extends Yu{toDOM(e){return iAe(e,null)}}});class b2t extends Yu{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return iAe(t,this.value)}}const y2t={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class p5 extends Rh{constructor(t,n){super(),this.config=t,this.open=n}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=t.state.phrase(this.open?"Fold line":"Unfold line"),n}}function v2t(e={}){let t={...y2t,...e},n=new p5(t,!0),i=new p5(t,!1),r=As.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(_m)!=a.state.facet(_m)||a.startState.field(jb,!1)!=a.state.field(jb,!1)||Sr(a.startState)!=Sr(a.state)||t.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let l=new Nh;for(let c of a.viewportLineBlocks){let u=PN(a.state,c.from,c.to)?i:IN(a.state,c.from,c.to)?n:null;u&&l.add(c.from,c.from,u)}return l.finish()}}),{domEventHandlers:s}=t;return[r,RTt({class:"cm-foldGutter",markers(a){var l;return((l=a.plugin(r))===null||l===void 0?void 0:l.markers)||Si.empty},initialSpacer(){return new p5(t,!1)},domEventHandlers:{...s,click:(a,l,c)=>{if(s.click&&s.click(a,l,c))return!0;let u=PN(a.state,l.from,l.to);if(u)return a.dispatch({effects:IE.of(u)}),!0;let d=IN(a.state,l.from,l.to);return d?(a.dispatch({effects:vI.of(d)}),!0):!1}}}),nAe()]}const x2t=Pt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class PE{constructor(t,n){this.specs=t;let i;function r(l){let c=Cm.newName();return(i||(i=Object.create(null)))["."+c]=l,c}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,a=n.scope;this.scope=a instanceof Yl?l=>l.prop(zp)==a.data:a?l=>l==a:void 0,this.style=q2e(t.map(l=>({tag:l.tag,class:l.class||r(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=i?new Cm(i):null,this.themeType=n.themeType}static define(t,n){return new PE(t,n||{})}}const B$=Vt.define(),rAe=Vt.define({combine(e){return e.length?[e[0]]:null}});function EA(e){let t=e.facet(B$);return t.length?t:e.facet(rAe)}function sAe(e,t){let n=[w2t],i;return e instanceof PE&&(e.module&&n.push(Pt.styleModule.of(e.module)),i=e.themeType),t!=null&&t.fallback?n.push(rAe.of(e)):i?n.push(B$.computeN([Pt.darkTheme],r=>r.facet(Pt.darkTheme)==(i=="dark")?[e]:[])):n.push(B$.of(e)),n}function iHt(e,t,n){let i=EA(e),r=null;if(i){for(let s of i)if(!s.scope||n){let a=s.style(t);a&&(r=r?r+" "+a:a)}}return r}class O2t{constructor(t){this.markCache=Object.create(null),this.tree=Sr(t.state),this.decorations=this.buildDeco(t,EA(t.state)),this.decoratedTo=t.viewport.to}update(t){let n=Sr(t.state),i=EA(t.state),r=i!=EA(t.startState),{viewport:s}=t.view,a=t.changes.mapPos(this.decoratedTo,1);n.length=s.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=a):(n!=this.tree||t.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(t.view,i),this.decoratedTo=s.to)}buildDeco(t,n){if(!n||!this.tree.length)return pn.none;let i=new Nh;for(let{from:r,to:s}of t.visibleRanges)WTt(this.tree,n,(a,l,c)=>{i.add(a,l,this.markCache[c]||(this.markCache[c]=pn.mark({class:c})))},r,s);return i.finish()}}const w2t=Hh.high(As.fromClass(O2t,{decorations:e=>e.decorations})),S2t=PE.define([{tag:ne.meta,color:"#404740"},{tag:ne.link,textDecoration:"underline"},{tag:ne.heading,textDecoration:"underline",fontWeight:"bold"},{tag:ne.emphasis,fontStyle:"italic"},{tag:ne.strong,fontWeight:"bold"},{tag:ne.strikethrough,textDecoration:"line-through"},{tag:ne.keyword,color:"#708"},{tag:[ne.atom,ne.bool,ne.url,ne.contentSeparator,ne.labelName],color:"#219"},{tag:[ne.literal,ne.inserted],color:"#164"},{tag:[ne.string,ne.deleted],color:"#a11"},{tag:[ne.regexp,ne.escape,ne.special(ne.string)],color:"#e40"},{tag:ne.definition(ne.variableName),color:"#00f"},{tag:ne.local(ne.variableName),color:"#30a"},{tag:[ne.typeName,ne.namespace],color:"#085"},{tag:ne.className,color:"#167"},{tag:[ne.special(ne.variableName),ne.macroName],color:"#256"},{tag:ne.definition(ne.propertyName),color:"#00c"},{tag:ne.comment,color:"#940"},{tag:ne.invalid,color:"#f00"}]),k2t=Pt.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),aAe=1e4,oAe="()[]{}",lAe=Vt.define({combine(e){return nf(e,{afterCursor:!0,brackets:oAe,maxScanDistance:aAe,renderMatch:T2t})}}),E2t=pn.mark({class:"cm-matchingBracket"}),C2t=pn.mark({class:"cm-nonmatchingBracket"});function T2t(e){let t=[],n=e.matched?E2t:C2t;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function bJ(e){let t=[],n=e.facet(lAe);for(let i of e.selection.ranges){if(!i.empty)continue;let r=Rd(e,i.head,-1,n)||i.head>0&&Rd(e,i.head-1,1,n)||n.afterCursor&&(Rd(e,i.head,1,n)||i.heade.decorations}),_2t=[A2t,k2t];function N2t(e={}){return[lAe.of(e),_2t]}const cAe=new In;function U$(e,t,n){let i=e.prop(t<0?In.openedBy:In.closedBy);if(i)return i;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function Q$(e){let t=e.type.prop(cAe);return t?t(e.node):e}function Rd(e,t,n,i={}){let r=i.maxScanDistance||aAe,s=i.brackets||oAe,a=Sr(e),l=a.resolveInner(t,n);for(let c=l;c;c=c.parent){let u=U$(c.type,n,s);if(u&&c.from0?t>=d.from&&td.from&&t<=d.to))return j2t(e,t,n,c,d,u,s)}}return R2t(e,t,n,a,l.type,r,s)}function j2t(e,t,n,i,r,s,a){let l=i.parent,c={from:r.from,to:r.to},u=0,d=l==null?void 0:l.cursor();if(d&&(n<0?d.childBefore(i.from):d.childAfter(i.to)))do if(n<0?d.to<=i.from:d.from>=i.to){if(u==0&&s.indexOf(d.type.name)>-1&&d.from0)return null;let u={from:n<0?t-1:t,to:n>0?t+1:t},d=e.doc.iterRange(t,n>0?e.doc.length:0),f=0;for(let h=0;!d.next().done&&h<=s;){let p=d.value;n<0&&(h+=p.length);let g=t+h*n;for(let b=n>0?0:p.length-1,v=n>0?p.length:-1;b!=v;b+=n){let y=a.indexOf(p[b]);if(!(y<0||i.resolveInner(g+b,1).type!=r))if(y%2==0==n>0)f++;else{if(f==1)return{start:u,end:{from:g+b,to:g+b+1},matched:y>>1==c>>1};f--}}n>0&&(h+=p.length)}return d.done?{start:u,matched:!1}:null}function yJ(e,t,n,i=0,r=0){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));let s=r;for(let a=i;a=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.posn}eatSpace(){let t=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t}skipToEnd(){this.pos=this.string.length}skipTo(t){let n=this.string.indexOf(t,this.pos);if(n>-1)return this.pos=n,!0}backUp(t){this.pos-=t}column(){return this.lastColumnPosi?a.toLowerCase():a,s=this.string.substr(this.pos,t.length);return r(s)==r(t)?(n!==!1&&(this.pos+=t.length),!0):null}else{let r=this.string.slice(this.pos).match(t);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function I2t(e){return{name:e.name||"",token:e.token,blankLine:e.blankLine||(()=>{}),startState:e.startState||(()=>!0),copyState:e.copyState||P2t,indent:e.indent||(()=>null),languageData:e.languageData||{},tokenTable:e.tokenTable||aQ,mergeTokens:e.mergeTokens!==!1}}function P2t(e){if(typeof e!="object")return e;let t={};for(let n in e){let i=e[n];t[n]=i instanceof Array?i.slice():i}return t}const vJ=new WeakMap;class rQ extends Yl{constructor(t){let n=bI(t.languageData),i=I2t(t),r,s=new class extends cI{createParse(a,l,c){return new M2t(r,a,l,c)}};super(n,s,[],t.name),this.topNode=F2t(n,this),r=this,this.streamParser=i,this.stateAfter=new In({perNode:!0}),this.tokenTable=t.tokenTable?new pAe(i.tokenTable):$2t}static define(t){return new rQ(t)}getIndent(t){let n,{overrideIndentation:i}=t.options;i&&(n=vJ.get(t.state),n!=null&&n1e4)return null;for(;s=i&&n+t.length<=r&&t.prop(e.stateAfter);if(s)return{state:e.streamParser.copyState(s),pos:n+t.length};for(let a=t.children.length-1;a>=0;a--){let l=t.children[a],c=n+t.positions[a],u=l instanceof pi&&c=t.length)return t;!r&&n==0&&t.type==e.topNode&&(r=!0);for(let s=t.children.length-1;s>=0;s--){let a=t.positions[s],l=t.children[s],c;if(an&&sQ(e,s.tree,0-s.offset,n,l),u;if(c&&c.pos<=i&&(u=dAe(e,s.tree,n+s.offset,c.pos+s.offset,!1)))return{state:c.state,tree:u}}return{state:e.streamParser.startState(r?Nb(r):4),tree:pi.empty}}let M2t=class{constructor(t,n,i,r){this.lang=t,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=_b.get(),a=r[0].from,{state:l,tree:c}=D2t(t,i,a,this.to,s==null?void 0:s.state);this.state=l,this.parsedPos=this.chunkStart=a+c.length;for(let u=0;uu.from<=s.viewport.from&&u.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(Nb(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let t=_b.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),i=Math.min(n,this.chunkStart+512);for(t&&(i=Math.min(i,t.viewport.to));this.parsedPos=n?this.finish():t&&this.parsedPos>=t.viewport.to?(t.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(t){this.stoppedAt=t}lineAfter(t){let n=this.input.chunk(t);if(this.input.lineChunks)n==` `&&(n="");else{let i=n.indexOf(` -`);i>-1&&(n=n.slice(0,i))}return t+n.length<=this.to?n:n.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,n=this.lineAfter(t),i=t+n.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(n=n.slice(0,s-(i-n.length)),r++,r==this.ranges.length))break;let a=this.ranges[r].from,l=this.lineAfter(a);n+=l,i=a+l.length}return{line:n,end:i}}skipGapsTo(t,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=t+n;if(i>0?r>s:r>=s)break;let a=this.ranges[++this.rangeIndex].from;n+=a-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(n,r,1),n+=r;let l=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-l}let a=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&a>=0&&this.chunk[a]==t&&this.chunk[a+2]==n?this.chunk[a+2]=i:this.chunk.push(t,n,i,s),r}parseLine(t){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,a=new cAe(n,t?t.state.tabSize:4,t?Ib(t.state):2);if(a.eol())s.blankLine(this.state,a.indentUnit);else for(;!a.eol();){let l=dAe(s.token,a,this.state);if(l&&(r=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+a.start,this.parsedPos+a.pos,r)),a.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPost.start)return r}throw new Error("Stream parser failed to advance stream.")}const oQ=Object.create(null),ak=[ra.none],P2t=new t1(ak),SJ=[],kJ=Object.create(null),fAe=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])fAe[e]=pAe(oQ,t);class hAe{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),fAe)}resolve(t){return t?this.table[t]||(this.table[t]=pAe(this.extra,t)):0}}const D2t=new hAe(oQ);function b5(e,t){SJ.indexOf(e)>-1||(SJ.push(e),console.warn(t))}function pAe(e,t){let n=[];for(let l of t.split(" ")){let c=[];for(let u of l.split(".")){let d=e[u]||ne[u];d?typeof d=="function"?c.length?c=c.map(d):b5(u,`Modifier ${u} used at start of tag`):c.length?b5(u,`Tag ${u} used as modifier`):c=Array.isArray(d)?d:[d]:b5(u,`Unknown highlighting tag ${u}`)}for(let u of c)n.push(u)}if(!n.length)return 0;let i=t.replace(/ /g,"_"),r=i+" "+n.map(l=>l.id),s=kJ[r];if(s)return s.id;let a=kJ[r]=ra.define({id:ak.length,name:i,props:[Yh({[i]:n})]});return ak.push(a),a.id}function M2t(e,t){let n=ra.define({id:ak.length,name:"Document",props:[Kp.add(()=>e),Zh.add(()=>i=>t.getIndent(i))],top:!0});return ak.push(n),n}Tr.RTL,Tr.LTR;var EJ={};class $N{constructor(t,n,i,r,s,a,l,c,u,d=0,f){this.p=t,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=a,this.buffer=l,this.bufferBase=c,this.curContext=u,this.lookAhead=d,this.parent=f}toString(){return`[${this.stack.filter((t,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,n,i=0){let r=t.parser.context;return new $N(t,[],n,i,i,0,[],0,r?new CJ(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var n;let i=t>>19,r=t&65535,{parser:s}=this.p,a=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=d):this.p.lastBigReductionSizec;)this.stack.pop();this.reduceContext(r,u)}storeNode(t,n,i,r=4,s=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&this.buffer[a-4]==0&&this.buffer[a-1]>-1){if(n==i)return;if(this.buffer[a-2]>=n){this.buffer[a-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(t,n,i,r);else{let a=this.buffer.length;if(a>0&&(this.buffer[a-4]!=0||this.buffer[a-1]<0)){let l=!1;for(let c=a;c>0&&this.buffer[c-2]>i;c-=4)if(this.buffer[c-1]>=0){l=!0;break}if(l)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,r>4&&(r-=4)}this.buffer[a]=t,this.buffer[a+1]=n,this.buffer[a+2]=i,this.buffer[a+3]=r}}shift(t,n,i,r){if(t&131072)this.pushState(t&65535,this.pos);else if(t&262144)this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4);else{let s=t,{parser:a}=this.p;this.pos=r;let l=a.stateFlag(s,1);!l&&(r>i||n<=a.maxNode)&&(this.reducePos=r),this.pushState(s,l?i:Math.min(i,this.reducePos)),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}}apply(t,n,i,r){t&65536?this.reduce(t):this.shift(t,n,i,r)}useNode(t,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let r=this.pos;this.reducePos=this.pos=r+t.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let i=t.buffer.slice(n),r=t.bufferBase+n;for(;t&&r==t.bufferBase;)t=t.parent;return new $N(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,t)}recoverByDelete(t,n){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(t){for(let n=new L2t(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,t);if(i==0)return!1;if(!(i&65536))return!0;n.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,a;sc&1&&l==a)||r.push(n[s],a)}n=r}let i=[];for(let r=0;r>19,r=n&65535,s=this.stack.length-i*3;if(s<0||t.getGoto(this.stack[s],r,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:t}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),t.allActions(r,a=>{if(!(a&393216))if(a&65536){let l=(a>>19)-s;if(l>1){let c=a&65535,u=this.stack.length-l*3;if(u>=0&&t.getGoto(this.stack[u],c,!1)>=0)return l<<19|65536|c}}else{let l=i(a,s+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let n=0;n0&&this.emitLookAhead()}}class CJ{constructor(t,n){this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0}}class L2t{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let n=t&65535,i=t>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class FN{constructor(t,n,i){this.stack=t,this.pos=n,this.index=i,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new FN(t,n,n-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new FN(this.stack,this.pos,this.index)}}function qO(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let i=0,r=0;i=92&&a--,a>=34&&a--;let c=a-32;if(c>=46&&(c-=46,l=!0),s+=c,l)break;s*=46}n?n[r++]=s:n=new t(s)}return n}class _A{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const TJ=new _A;class $2t{constructor(t,n){this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=TJ,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(t,n){let i=this.range,r=this.rangeIndex,s=this.pos+t;for(;si.to:s>=i.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];s+=a.from-i.to,i=a}return s}clipPos(t){if(t>=this.range.from&&tt)return Math.max(t,n.from);return this.end}peek(t){let n=this.chunkOff+t,i,r;if(n>=0&&n=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(t,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,n){if(n?(this.token=n,n.start=t,n.lookAhead=t+1,n.value=n.extended=-1):this.token=TJ,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,n-this.chunkPos);if(t>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,n-this.chunk2Pos);if(t>=this.range.from&&n<=this.range.to)return this.input.read(t,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>t&&(i+=this.input.read(Math.max(r.from,t),Math.min(r.to,n)))}return i}}class pv{constructor(t,n){this.data=t,this.id=n}token(t,n){let{parser:i}=n.p;mAe(this.data,t,n,this.id,i.data,i.tokenPrecTable)}}pv.prototype.contextual=pv.prototype.fallback=pv.prototype.extend=!1;class BN{constructor(t,n,i){this.precTable=n,this.elseToken=i,this.data=typeof t=="string"?qO(t):t}token(t,n){let i=t.pos,r=0;for(;;){let s=t.next<0,a=t.resolveOffset(1,1);if(mAe(this.data,t,n,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,a==null)break;t.reset(a,t.token)}r&&(t.reset(i,t.token),t.acceptToken(this.elseToken,r))}}BN.prototype.contextual=pv.prototype.fallback=pv.prototype.extend=!1;class qs{constructor(t,n={}){this.token=t,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function mAe(e,t,n,i,r,s){let a=0,l=1<0){let g=e[p];if(c.allows(g)&&(t.token.value==-1||t.token.value==g||F2t(g,t.token.value,r,s))){t.acceptToken(g);break}}let d=t.next,f=0,h=e[a+2];if(t.next<0&&h>f&&e[u+h*3-3]==65535){a=e[u+h*3-1];continue e}for(;f>1,g=u+p+(p<<1),b=e[g],v=e[g+1]||65536;if(d=v)f=p+1;else{a=e[g+2],t.advance();continue e}}break}}function AJ(e,t,n){for(let i=t,r;(r=e[i])!=65535;i++)if(r==n)return i-t;return-1}function F2t(e,t,n,i){let r=AJ(n,i,t);return r<0||AJ(n,i,e)t)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,t-25)):Math.min(e.length,Math.max(i.from+1,t+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:e.length}}let B2t=class{constructor(t,n){this.fragments=t,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?_J(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?_J(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(tt)return this.nextStart=a,null;if(s instanceof gi){if(a==t){if(a=Math.max(this.safeFrom,t)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+s.length}}};class U2t{constructor(t,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(i=>new _A)}getActions(t){let n=0,i=null,{parser:r}=t.p,{tokenizers:s}=r,a=r.stateSlot(t.state,3),l=t.curContext?t.curContext.hash:0,c=0;for(let u=0;uf.end+25&&(c=Math.max(f.lookAhead,c)),f.value!=0)){let h=n;if(f.extended>-1&&(n=this.addActions(t,f.extended,f.end,n)),n=this.addActions(t,f.value,f.end,n),!d.extend&&(i=f,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return c&&t.setLookAhead(c),!i&&t.pos==this.stream.end&&(i=new _A,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,n=this.addActions(t,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let n=new _A,{pos:i,p:r}=t;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(t,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,t),i),t.value>-1){let{parser:s}=i.p;for(let a=0;a=0&&i.p.parser.dialect.allows(l>>1)){l&1?t.extended=l>>1:t.value=l>>1;break}}}else t.value=0,t.end=this.stream.clipPos(r+1)}putAction(t,n,i,r){for(let s=0;st.bufferLength*4?new B2t(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&t.length==1){let[a]=t;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;an)i.push(l);else{if(this.advanceStack(l,i,t))continue;{r||(r=[],s=[]),r.push(l);let c=this.tokens.getMainToken(l);s.push(c.value,c.end)}}break}}if(!i.length){let a=r&&V2t(r);if(a)return Pl&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Pl&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(a)return Pl&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((l,c)=>c.score-l.score);i.length>a;)i.pop();i.some(l=>l.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let a=0;a500&&u.buffer.length>500)if((l.score-u.score||l.buffer.length-u.buffer.length)>0)i.splice(c--,1);else{i.splice(a--,1);continue e}}}i.length>12&&(i.sort((a,l)=>l.score-a.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let a=1;a ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let u=t.curContext&&t.curContext.tracker.strict,d=u?t.curContext.hash:0;for(let f=this.fragments.nodeAt(r);f;){let h=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(t.state,f.type.id):-1;if(h>-1&&f.length&&(!u||(f.prop(Pn.contextHash)||0)==d))return t.useNode(f,h),Pl&&console.log(a+this.stackID(t)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof gi)||f.children.length==0||f.positions[0]>0)break;let p=f.children[0];if(p instanceof gi&&f.positions[0]==0)f=p;else break}}let l=s.stateSlot(t.state,4);if(l>0)return t.reduce(l),Pl&&console.log(a+this.stackID(t)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let c=this.tokens.getActions(t);for(let u=0;ur?n.push(g):i.push(g)}return!1}advanceFully(t,n){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return NJ(t,n),!0}}runRecovery(t,n,i){let r=null,s=!1;for(let a=0;a ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Pl&&console.log(d+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),h=d;for(let p=0;p<10&&f.forceReduce()&&(Pl&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));p++)Pl&&(h=this.stackID(f)+" -> ");for(let p of l.recoverByInsert(c))Pl&&console.log(d+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>l.pos?(u==l.pos&&(u++,c=0),l.recoverByDelete(c,u),Pl&&console.log(d+this.stackID(l)+` (via recover-delete ${this.parser.getName(c)})`),NJ(l,i)):(!r||r.scoree;class wI{constructor(t){this.start=t.start,this.shift=t.shift||v5,this.reduce=t.reduce||v5,this.reuse=t.reuse||v5,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class Fh extends dI{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let n=t.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;lt.topRules[l][1]),r=[];for(let l=0;l=0)s(d,c,l[u++]);else{let f=l[u+-d];for(let h=-d;h>0;h--)s(l[u++],c,f);u++}}}this.nodeSet=new t1(n.map((l,c)=>ra.define({name:c>=this.minRepeatTerm?void 0:l,id:c,props:r[c],top:i.indexOf(c)>-1,error:c==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(c)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=hTe;let a=qO(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new pv(a,l):l),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,n,i){let r=new Q2t(this,t,n,i);for(let s of this.wrappers)r=s(r,t,n,i);return r}getGoto(t,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let a=r[s++],l=a&1,c=r[s++];if(l&&i)return c;for(let u=s+(a>>1);s0}validAction(t,n){return!!this.allActions(t,i=>i==n?!0:null)}allActions(t,n){let i=this.stateSlot(t,4),r=i?n(i):void 0;for(let s=this.stateSlot(t,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=zf(this.data,s+2);else break;r=n(zf(this.data,s+1))}return r}nextStates(t){let n=[];for(let i=this.stateSlot(t,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=zf(this.data,i+2);else break;if(!(this.data[i+2]&1)){let r=this.data[i+1];n.some((s,a)=>a&1&&s==r)||n.push(this.data[i],r)}}return n}configure(t){let n=Object.assign(Object.create(Fh.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let i=this.topRules[t.top];if(!i)throw new RangeError(`Invalid top rule name ${t.top}`);n.top=i}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=t.tokenizers.find(s=>s.from==i);return r?r.to:i})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=t.specializers.find(l=>l.from==i.external);if(!s)return i;let a=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=jJ(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let n=this.dynamicPrecedences;return n==null?0:n[t]||0}parseDialect(t){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(t)for(let s of t.split(" ")){let a=n.indexOf(s);a>=0&&(i[a]=!0)}let r=null;for(let s=0;si)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scoree.external(n,i)<<1|t}return e.get}const H2t=316,q2t=317,RJ=1,W2t=2,K2t=3,G2t=4,X2t=318,Y2t=320,Z2t=321,J2t=5,eAt=6,tAt=0,V$=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],gAe=125,nAt=59,H$=47,iAt=42,rAt=43,sAt=45,aAt=60,oAt=44,lAt=63,cAt=46,uAt=91,dAt=new wI({start:!1,shift(e,t){return t==J2t||t==eAt||t==Y2t?e:t==Z2t},strict:!1}),fAt=new qs((e,t)=>{let{next:n}=e;(n==gAe||n==-1||t.context)&&e.acceptToken(X2t)},{contextual:!0,fallback:!0}),hAt=new qs((e,t)=>{let{next:n}=e,i;V$.indexOf(n)>-1||n==H$&&((i=e.peek(1))==H$||i==iAt)||n!=gAe&&n!=nAt&&n!=-1&&!t.context&&e.acceptToken(H2t)},{contextual:!0}),pAt=new qs((e,t)=>{e.next==uAt&&!t.context&&e.acceptToken(q2t)},{contextual:!0}),mAt=new qs((e,t)=>{let{next:n}=e;if(n==rAt||n==sAt){if(e.advance(),n==e.next){e.advance();let i=!t.context&&t.canShift(RJ);e.acceptToken(i?RJ:W2t)}}else n==lAt&&e.peek(1)==cAt&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(K2t))},{contextual:!0});function x5(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}const gAt=new qs((e,t)=>{if(e.next!=aAt||!t.dialectEnabled(tAt)||(e.advance(),e.next==H$))return;let n=0;for(;V$.indexOf(e.next)>-1;)e.advance(),n++;if(x5(e.next,!0)){for(e.advance(),n++;x5(e.next,!1);)e.advance(),n++;for(;V$.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==oAt)return;for(let i=0;;i++){if(i==7){if(!x5(e.next,!0))return;break}if(e.next!="extends".charCodeAt(i))break;e.advance(),n++}}e.acceptToken(G2t,-n)}),bAt=Yh({"get set async static":ne.modifier,"for while do if else switch try catch finally return throw break continue default case defer":ne.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":ne.operatorKeyword,"let var const using function class extends":ne.definitionKeyword,"import export from":ne.moduleKeyword,"with debugger new":ne.keyword,TemplateString:ne.special(ne.string),super:ne.atom,BooleanLiteral:ne.bool,this:ne.self,null:ne.null,Star:ne.modifier,VariableName:ne.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":ne.function(ne.variableName),VariableDefinition:ne.definition(ne.variableName),Label:ne.labelName,PropertyName:ne.propertyName,PrivatePropertyName:ne.special(ne.propertyName),"CallExpression/MemberExpression/PropertyName":ne.function(ne.propertyName),"FunctionDeclaration/VariableDefinition":ne.function(ne.definition(ne.variableName)),"ClassDeclaration/VariableDefinition":ne.definition(ne.className),"NewExpression/VariableName":ne.className,PropertyDefinition:ne.definition(ne.propertyName),PrivatePropertyDefinition:ne.definition(ne.special(ne.propertyName)),UpdateOp:ne.updateOperator,"LineComment Hashbang":ne.lineComment,BlockComment:ne.blockComment,Number:ne.number,String:ne.string,Escape:ne.escape,ArithOp:ne.arithmeticOperator,LogicOp:ne.logicOperator,BitOp:ne.bitwiseOperator,CompareOp:ne.compareOperator,RegExp:ne.regexp,Equals:ne.definitionOperator,Arrow:ne.function(ne.punctuation),": Spread":ne.punctuation,"( )":ne.paren,"[ ]":ne.squareBracket,"{ }":ne.brace,"InterpolationStart InterpolationEnd":ne.special(ne.brace),".":ne.derefOperator,", ;":ne.separator,"@":ne.meta,TypeName:ne.typeName,TypeDefinition:ne.definition(ne.typeName),"type enum interface implements namespace module declare":ne.definitionKeyword,"abstract global Privacy readonly override":ne.modifier,"is keyof unique infer asserts":ne.operatorKeyword,JSXAttributeValue:ne.attributeValue,JSXText:ne.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":ne.angleBracket,"JSXIdentifier JSXNameSpacedName":ne.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":ne.attributeName,"JSXBuiltin/JSXIdentifier":ne.standard(ne.tagName)}),yAt={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},vAt={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},xAt={__proto__:null,"<":193},OAt=Fh.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-EtOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-EPO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-ERQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<VO!l$xO#jROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!OVO!l$xO#jVO!l$xO#jROe!iOpkOrPO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]VO!l$xO#j^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOrROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]WO!l$xO#jgPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{SU+P%]S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mR>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o>UPS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^T)z$u){V+P%]S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SS#q]SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uSSR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:mSR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:oS)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mSS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:mS#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^Q+T%aQ/c*Oo4OP>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^n=rTQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o4OP>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f]>^nZ>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f]>^nZ>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.lPQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.nSR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:dAt,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[bAt],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[hAt,pAt,mAt,gAt,2,3,4,5,6,7,8,9,10,11,12,13,14,fAt,new BN("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new BN("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>yAt[e]||-1},{term:343,get:e=>vAt[e]||-1},{term:95,get:e=>xAt[e]||-1}],tokenPrec:15201});class lQ{constructor(t,n,i,r){this.state=t,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let n=wr(this.state).resolveInner(this.pos,-1);for(;n&&t.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(t){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(yAe(t,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(t,n,i){t=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function IJ(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function wAt(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[n,i]=t.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:wAt(t);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:t,validFor:n}:null}}function bAe(e,t){return n=>{for(let i=wr(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(e.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return t(n)}}class PJ{constructor(t,n,i,r){this.completion=t,this.source=n,this.match=i,this.score=r}}function ob(e){return e.selection.main.from}function yAe(e,t){var n;let{source:i}=e,r=t&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?e:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":"")}const uQ=rf.define();function SAt(e,t,n,i){let{main:r}=e.selection,s=n-r.from,a=i-r.from;return{...e.changeByRange(l=>{if(l!=r&&n!=i&&e.sliceDoc(l.from+s,l.from+a)!=e.sliceDoc(n,i))return{range:l};let c=e.toText(t);return{changes:{from:l.from+s,to:i==r.from?l.to:l.from+a,insert:c},range:Ze.cursor(l.from+s+c.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const DJ=new WeakMap;function kAt(e){if(!Array.isArray(e))return e;let t=DJ.get(e);return t||DJ.set(e,t=cQ(e)),t}const UN=Fn.define(),ok=Fn.define();class EAt{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(S=LU(k))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(!x||E==1&&v||O==0&&E!=0)&&(n[f]==k||i[f]==k&&(h=!0)?a[f++]=x:a.length&&(y=!1)),O=E,x+=kd(k)}return f==c&&a[0]==0&&y?this.result(-100+(h?-200:0),a,t):p==c&&g==0?this.ret(-200-t.length+(b==t.length?0:-100),[0,b]):l>-1?this.ret(-700-t.length,[l,l+this.pattern.length]):p==c?this.ret(-900-t.length,[g,b]):f==c?this.result(-100+(h?-200:0)+-700+(y?0:-1100),a,t):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,t)}result(t,n,i){let r=[],s=0;for(let a of n){let l=a+(this.astral?kd(al(i,a)):1);s&&r[s-1]==a?r[s-1]=l:(r[s++]=a,r[s++]=l)}return this.ret(t-i.length,r)}}class CAt{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:TAt,filterStrict:!1,compareCompletions:(t,n)=>(t.sortText||t.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,n)=>t&&n,closeOnBlur:(t,n)=>t&&n,icons:(t,n)=>t&&n,tooltipClass:(t,n)=>i=>MJ(t(i),n(i)),optionClass:(t,n)=>i=>MJ(t(i),n(i)),addToOptions:(t,n)=>t.concat(n),filterStrict:(t,n)=>t||n})}});function MJ(e,t){return e?t?e+" "+t:e:t}function TAt(e,t,n,i,r,s){let a=e.textDirection==Tr.RTL,l=a,c=!1,u="top",d,f,h=t.left-r.left,p=r.right-t.right,g=i.right-i.left,b=i.bottom-i.top;if(l&&h=b||x>t.top?d=n.bottom-t.top:(u="bottom",d=t.bottom-n.top)}let v=(t.bottom-t.top)/s.offsetHeight,y=(t.right-t.left)/s.offsetWidth;return{style:`${u}: ${d/v}px; max-width: ${f/y}px`,class:"cm-completionInfo-"+(c?a?"left-narrow":"right-narrow":l?"left":"right")}}const dQ=Fn.define();function AAt(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),t.push({render(n,i,r,s){let a=document.createElement("span");a.className="cm-completionLabel";let l=n.displayLabel||n.label,c=0;for(let u=0;uc&&a.appendChild(document.createTextNode(l.slice(c,d)));let h=a.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(l.slice(d,f))),h.className="cm-completionMatchedText",c=f}return cn.position-i.position).map(n=>n.render)}function O5(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let r=Math.floor(t/n);return{from:r*n,to:(r+1)*n}}let i=Math.ceil((e-t)/n);return{from:e-i*n,to:e-(i-1)*n}}class _At{constructor(t,n,i){this.view=t,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let r=t.state.field(n),{options:s,selected:a}=r.open,l=t.state.facet(_a);this.optionContent=AAt(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=O5(s.length,a,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",c=>{let{options:u}=t.state.field(n).open;for(let d=c.target,f;d&&d!=this.dom;d=d.parentNode)if(d.nodeName=="LI"&&(f=/-(\d+)$/.exec(d.id))&&+f[1]this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;d!=null&&(t.dispatch({effects:dQ.of(d)}),c.preventDefault())}}),this.dom.addEventListener("focusout",c=>{let u=t.state.field(this.stateField,!1);u&&u.tooltip&&t.state.facet(_a).closeOnBlur&&c.relatedTarget!=t.contentDOM&&t.dispatch({effects:ok.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(t,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(t){var n;let i=t.state.field(this.stateField),r=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),i!=r){let{options:s,selected:a,disabled:l}=i.open;(!r.open||r.open.options!=s)&&(this.range=O5(s.length,a,t.state.facet(_a).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),l!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(t){let n=this.tooltipClass(t);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),n=t.open;(n.selected>-1&&n.selected=this.range.to)&&(this.range=O5(n.options.length,n.selected,this.view.state.facet(_a).maxRenderedOptions),this.showOptions(n.options,t.id));let i=this.updateSelectedOption(n.selected);if(i){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:s}=r;if(!s)return;let a=typeof s=="string"?document.createTextNode(s):s(r);if(!a)return;"then"in a?a.then(l=>{l&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(l,r)}).catch(l=>fl(this.view.state,l,"completion info")):(this.addInfoPane(a,r),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(t,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),t.nodeType!=null)i.appendChild(t),this.infoDestroy=null;else{let{dom:r,destroy:s}=t;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&(i.removeAttribute("aria-selected"),i.removeAttribute("aria-describedby"));return n&&jAt(this.list,n),n}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=t.getBoundingClientRect(),s=this.space;if(!s){let a=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottom{a.target==r&&a.preventDefault()});let s=null;for(let a=i.from;ai.from||i.from==0))if(s=h,typeof u!="string"&&u.header)r.appendChild(u.header(u));else{let p=r.appendChild(document.createElement("completion-section"));p.textContent=h}}const d=r.appendChild(document.createElement("li"));d.id=n+"-"+a,d.setAttribute("role","option");let f=this.optionClass(l);f&&(d.className=f);for(let h of this.optionContent){let p=h(l,this.view.state,this.view,c);p&&d.appendChild(p)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew _At(n,e,t)}function jAt(e,t){let n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),r=n.height/e.offsetHeight;i.topn.bottom&&(e.scrollTop+=(i.bottom-n.bottom)/r)}function LJ(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}function RAt(e,t){let n=[],i=null,r=null,s=d=>{n.push(d);let{section:f}=d.completion;if(f){i||(i=[]);let h=typeof f=="string"?f:f.name;i.some(p=>p.name==h)||i.push(typeof f=="string"?{name:h}:f)}},a=t.facet(_a);for(let d of e)if(d.hasResult()){let f=d.result.getMatch;if(d.result.filter===!1)for(let h of d.result.options)s(new PJ(h,d.source,f?f(h):[],1e9-n.length));else{let h=t.sliceDoc(d.from,d.to),p,g=a.filterStrict?new CAt(h):new EAt(h);for(let b of d.result.options)if(p=g.match(b.label)){let v=b.displayLabel?f?f(b,p.matched):[]:p.matched,y=p.score+(b.boost||0);if(s(new PJ(b,d.source,v,y)),typeof b.section=="object"&&b.section.rank==="dynamic"){let{name:x}=b.section;r||(r=Object.create(null)),r[x]=Math.max(y,r[x]||-1e9)}}}}if(i){let d=Object.create(null),f=0,h=(p,g)=>(p.rank==="dynamic"&&g.rank==="dynamic"?r[g.name]-r[p.name]:0)||(typeof p.rank=="number"?p.rank:1e9)-(typeof g.rank=="number"?g.rank:1e9)||(p.nameh.score-f.score||u(f.completion,h.completion))){let f=d.completion;!c||c.label!=f.label||c.detail!=f.detail||c.type!=null&&f.type!=null&&c.type!=f.type||c.apply!=f.apply||c.boost!=f.boost?l.push(d):LJ(d.completion)>LJ(c)&&(l[l.length-1]=d),c=d.completion}return l}class Ly{constructor(t,n,i,r,s,a){this.options=t,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new Ly(this.options,$J(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,i,r,s,a){if(r&&!a&&t.some(u=>u.isPending))return r.setDisabled();let l=RAt(t,n);if(!l.length)return r&&t.some(u=>u.isPending)?r.setDisabled():null;let c=n.facet(_a).selectOnOpen?0:-1;if(r&&r.selected!=c&&r.selected!=-1){let u=r.options[r.selected].completion;for(let d=0;dd.hasResult()?Math.min(u,d.from):u,1e8),create:$At,above:s.aboveCursor},r?r.timestamp:Date.now(),c,!1)}map(t){return new Ly(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Ly(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class QN{constructor(t,n,i){this.active=t,this.id=n,this.open=i}static start(){return new QN(MAt,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,i=n.facet(_a),s=(i.override||n.languageDataAt("autocomplete",ob(n)).map(kAt)).map(c=>(this.active.find(d=>d.source==c)||new Gc(c,this.active.some(d=>d.state!=0)?1:0)).update(t,i));s.length==this.active.length&&s.every((c,u)=>c==this.active[u])&&(s=this.active);let a=this.open,l=t.effects.some(c=>c.is(fQ));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||s.some(c=>c.hasResult()&&t.changes.touchesRange(c.from,c.to))||!IAt(s,this.active)||l?a=Ly.build(s,n,this.id,a,i,l):a&&a.disabled&&!s.some(c=>c.isPending)&&(a=null),!a&&s.every(c=>!c.isPending)&&s.some(c=>c.hasResult())&&(s=s.map(c=>c.hasResult()?new Gc(c.source,0):c));for(let c of t.effects)c.is(dQ)&&(a=a&&a.setSelected(c.value,this.id));return s==this.active&&a==this.open?this:new QN(s,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?PAt:DAt}}function IAt(e,t){if(e==t)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=e+"-"+t),n}const MAt=[];function vAe(e,t){if(e.isUserEvent("input.complete")){let i=e.annotation(uQ);if(i&&t.activateOnCompletion(i))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class Gc{constructor(t,n,i=!1){this.source=t,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let i=vAe(t,n),r=this;(i&8||i&16&&this.touches(t))&&(r=new Gc(r.source,0)),i&4&&r.state==0&&(r=new Gc(this.source,1)),r=r.updateFor(t,i);for(let s of t.effects)if(s.is(UN))r=new Gc(r.source,1,s.value);else if(s.is(ok))r=new Gc(r.source,0);else if(s.is(fQ))for(let a of s.value)a.source==r.source&&(r=a);return r}updateFor(t,n){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(ob(t.state))}}class mv extends Gc{constructor(t,n,i,r,s,a){super(t,3,n),this.limit=i,this.result=r,this.from=s,this.to=a}hasResult(){return!0}updateFor(t,n){var i;if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let s=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),l=ob(t.state);if(l>a||!r||n&2&&(ob(t.startState)==this.from||ln.map(t))}}),ol=io.define({create(){return QN.start()},update(e,t){return e.update(t)},provide:e=>[eQ.from(e,t=>t.tooltip),Pt.contentAttributes.from(e,t=>t.attrs)]});function hQ(e,t){const n=t.completion.apply||t.completion.label;let i=e.state.field(ol).active.find(r=>r.source==t.source);return i instanceof mv?(typeof n=="string"?e.dispatch({...SAt(e.state,n,i.from,i.to),annotations:uQ.of(t.completion)}):n(e,t.completion,i.from,i.to),!0):!1}const $At=NAt(ol,hQ);function a2(e,t="option"){return n=>{let i=n.state.field(ol,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(e?1:-1):e?0:a-1;return l<0?l=t=="page"?0:a-1:l>=a&&(l=t=="page"?a-1:0),n.dispatch({effects:dQ.of(l)}),!0}}const FAt=e=>{let t=e.state.field(ol,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.state.field(ol,!1)?(e.dispatch({effects:UN.of(!0)}),!0):!1,BAt=e=>{let t=e.state.field(ol,!1);return!t||!t.active.some(n=>n.state!=0)?!1:(e.dispatch({effects:ok.of(null)}),!0)};class UAt{constructor(t,n){this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const QAt=50,zAt=1e3,VAt=Ns.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(ol).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(ol),n=e.state.facet(_a);if(!e.selectionSet&&!e.docChanged&&e.startState.field(ol)==t)return;let i=e.transactions.some(s=>{let a=vAe(s,n);return a&8||(s.selection||s.docChanged)&&!(a&3)});for(let s=0;sQAt&&Date.now()-a.time>zAt){for(let l of a.context.abortListeners)try{l()}catch(c){fl(this.view.state,c)}a.context.abortListeners=null,this.running.splice(s--,1)}else a.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(s=>s.effects.some(a=>a.is(UN)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(s=>s.isPending&&!this.running.some(a=>a.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of e.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(ol);for(let n of t.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(_a).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=ob(t),i=new lQ(t,n,e.explicit,this.view),r=new UAt(e,i);this.running.push(r),Promise.resolve(e.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:ok.of(null)}),fl(this.view.state,s)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(_a).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(_a),i=this.view.state.field(ol);for(let r=0;rl.source==s.active.source);if(a&&a.isPending)if(s.done==null){let l=new Gc(s.active.source,0);for(let c of s.updates)l=l.update(c,n);l.isPending||t.push(l)}else this.startQuery(a)}(t.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:fQ.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(ol,!1);if(t&&t.tooltip&&this.view.state.facet(_a).closeOnBlur){let n=t.open&&L2e(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ok.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:UN.of(!1)}),20),this.composing=0}}}),HAt=typeof navigator=="object"&&/Win/.test(navigator.platform),qAt=Xh.highest(Pt.domEventHandlers({keydown(e,t){let n=t.state.field(ol,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(HAt&&e.altKey)||e.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(a=>a.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(e.key)>-1&&hQ(t,i),!1}})),xAe=Pt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class WAt{constructor(t,n,i,r){this.field=t,this.line=n,this.from=i,this.to=r}}class pQ{constructor(t,n,i){this.field=t,this.from=n,this.to=i}map(t){let n=t.mapPos(this.from,-1,Za.TrackDel),i=t.mapPos(this.to,1,Za.TrackDel);return n==null||i==null?null:new pQ(this.field,n,i)}}class mQ{constructor(t,n){this.lines=t,this.fieldPositions=n}instantiate(t,n){let i=[],r=[n],s=t.doc.lineAt(n),a=/^\s*/.exec(s.text)[0];for(let c of this.lines){if(i.length){let u=a,d=/^\t*/.exec(c)[0].length;for(let f=0;fnew pQ(c.field,r[c.line]+c.from,r[c.line]+c.to));return{text:i,ranges:l}}static parse(t){let n=[],i=[],r=[],s;for(let a of t.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let l=s[1]?+s[1]:null,c=s[2]||s[3]||"",u=-1;l===0&&(l=1e9);let d=c.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f=u&&h.field++}for(let f of r)if(f.line==i.length&&f.from>s.index){let h=s[2]?3+(s[1]||"").length:2;f.from-=h,f.to-=h}r.push(new WAt(u,i.length,s.index,s.index+d.length)),a=a.slice(0,s.index)+c+a.slice(s.index+s[0].length)}a=a.replace(/\\([{}])/g,(l,c,u)=>{for(let d of r)d.line==i.length&&d.from>u&&(d.from--,d.to--);return c}),i.push(a)}return new mQ(i,r)}}let KAt=mn.widget({widget:new class extends Zu{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),GAt=mn.mark({class:"cm-snippetField"});class r1{constructor(t,n){this.ranges=t,this.active=n,this.deco=mn.set(t.map(i=>(i.from==i.to?KAt:GAt).range(i.from,i.to)),!0)}map(t){let n=[];for(let i of this.ranges){let r=i.map(t);if(!r)return null;n.push(r)}return new r1(n,this.active)}selectionInsideField(t){return t.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const $E=Fn.define({map(e,t){return e&&e.map(t)}}),XAt=Fn.define(),lk=io.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is($E))return n.value;if(n.is(XAt)&&e)return new r1(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>Pt.decorations.from(e,t=>t?t.deco:mn.none)});function gQ(e,t){return Ze.create(e.filter(n=>n.field==t).map(n=>Ze.range(n.from,n.to)))}function YAt(e){let t=mQ.parse(e);return(n,i,r,s)=>{let{text:a,ranges:l}=t.instantiate(n.state,r),{main:c}=n.state.selection,u={changes:{from:r,to:s==c.from?c.to:s,insert:Zi.of(a)},scrollIntoView:!0,annotations:i?[uQ.of(i),ia.userEvent.of("input.complete")]:void 0};if(l.length&&(u.selection=gQ(l,0)),l.some(d=>d.field>0)){let d=new r1(l,0),f=u.effects=[$E.of(d)];n.state.field(lk,!1)===void 0&&f.push(Fn.appendConfig.of([lk,n_t,i_t,xAe]))}n.dispatch(n.state.update(u))}}function OAe(e){return({state:t,dispatch:n})=>{let i=t.field(lk,!1);if(!i||e<0&&i.active==0)return!1;let r=i.active+e,s=e>0&&!i.ranges.some(a=>a.field==r+e);return n(t.update({selection:gQ(i.ranges,r),effects:$E.of(s?null:new r1(i.ranges,r)),scrollIntoView:!0})),!0}}const ZAt=({state:e,dispatch:t})=>e.field(lk,!1)?(t(e.update({effects:$E.of(null)})),!0):!1,JAt=OAe(1),e_t=OAe(-1),t_t=[{key:"Tab",run:JAt,shift:e_t},{key:"Escape",run:ZAt}],FJ=Vt.define({combine(e){return e.length?e[0]:t_t}}),n_t=Xh.highest(n1.compute([FJ],e=>e.facet(FJ)));function bs(e,t){return{...t,apply:YAt(e)}}const i_t=Pt.domEventHandlers({mousedown(e,t){let n=t.state.field(lk,!1),i;if(!n||(i=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(t.dispatch({selection:gQ(n.ranges,r.field),effects:$E.of(n.ranges.some(s=>s.field>r.field)?new r1(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),ck={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},zg=Fn.define({map(e,t){let n=t.mapPos(e,-1,Za.TrackAfter);return n??void 0}}),bQ=new class extends Nm{};bQ.startSide=1;bQ.endSide=-1;const wAe=io.define({create(){return Ei.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of t.effects)n.is(zg)&&(e=e.update({add:[bQ.range(n.value,n.value+1)]}));return e}});function r_t(){return[a_t,wAe]}const S5="()[]{}<>«»»«[]{}";function SAe(e){for(let t=0;t{if((s_t?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let r=e.state.selection.main;if(i.length>2||i.length==2&&kd(al(i,0))==1||t!=r.from||n!=r.to)return!1;let s=c_t(e.state,i);return s?(e.dispatch(s),!0):!1}),o_t=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=kAe(e,e.selection.main.head).brackets||ck.brackets,r=null,s=e.changeByRange(a=>{if(a.empty){let l=u_t(e.doc,a.head);for(let c of i)if(c==l&&SI(e.doc,a.head)==SAe(al(c,0)))return{changes:{from:a.head-c.length,to:a.head+c.length},range:Ze.cursor(a.head-c.length)}}return{range:r=a}});return r||t(e.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},l_t=[{key:"Backspace",run:o_t}];function c_t(e,t){let n=kAe(e,e.selection.main.head),i=n.brackets||ck.brackets;for(let r of i){let s=SAe(al(r,0));if(t==r)return s==r?h_t(e,r,i.indexOf(r+r+r)>-1,n):d_t(e,r,s,n.before||ck.before);if(t==s&&EAe(e,e.selection.main.from))return f_t(e,r,s)}return null}function EAe(e,t){let n=!1;return e.field(wAe).between(0,e.doc.length,i=>{i==t&&(n=!0)}),n}function SI(e,t){let n=e.sliceString(t,t+2);return n.slice(0,kd(al(n,0)))}function u_t(e,t){let n=e.sliceString(t-2,t);return kd(al(n,0))==n.length?n:n.slice(1)}function d_t(e,t,n,i){let r=null,s=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:zg.of(a.to+t.length),range:Ze.range(a.anchor+t.length,a.head+t.length)};let l=SI(e.doc,a.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:t+n,from:a.head},effects:zg.of(a.head+t.length),range:Ze.cursor(a.head+t.length)}:{range:r=a}});return r?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function f_t(e,t,n){let i=null,r=e.changeByRange(s=>s.empty&&SI(e.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:Ze.cursor(s.head+n.length)}:i={range:s});return i?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function h_t(e,t,n,i){let r=i.stringPrefixes||ck.stringPrefixes,s=null,a=e.changeByRange(l=>{if(!l.empty)return{changes:[{insert:t,from:l.from},{insert:t,from:l.to}],effects:zg.of(l.to+t.length),range:Ze.range(l.anchor+t.length,l.head+t.length)};let c=l.head,u=SI(e.doc,c),d;if(u==t){if(BJ(e,c))return{changes:{insert:t+t,from:c},effects:zg.of(c+t.length),range:Ze.cursor(c+t.length)};if(EAe(e,c)){let h=n&&e.sliceDoc(c,c+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:c,to:c+h.length,insert:h},range:Ze.cursor(c+h.length)}}}else{if(n&&e.sliceDoc(c-2*t.length,c)==t+t&&(d=UJ(e,c-2*t.length,r))>-1&&BJ(e,d))return{changes:{insert:t+t+t+t,from:c},effects:zg.of(c+t.length),range:Ze.cursor(c+t.length)};if(e.charCategorizer(c)(u)!=ls.Word&&UJ(e,c,r)>-1&&!p_t(e,c,t,r))return{changes:{insert:t+t,from:c},effects:zg.of(c+t.length),range:Ze.cursor(c+t.length)}}return{range:s=l}});return s?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function BJ(e,t){let n=wr(e).resolveInner(t+1);return n.parent&&n.from==t}function p_t(e,t,n,i){let r=wr(e).resolveInner(t,-1),s=i.reduce((a,l)=>Math.max(a,l.length),0);for(let a=0;a<5;a++){let l=e.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),c=l.indexOf(n);if(!c||c>-1&&i.indexOf(l.slice(0,c))>-1){let d=r.firstChild;for(;d&&d.from==r.from&&d.to-d.from>n.length+c;){if(e.sliceDoc(d.to-n.length,d.to)==n)return!1;d=d.firstChild}return!0}let u=r.to==t&&r.parent;if(!u)break;r=u}return!1}function UJ(e,t,n){let i=e.charCategorizer(t);if(i(e.sliceDoc(t-1,t))!=ls.Word)return t;for(let r of n){let s=t-r.length;if(e.sliceDoc(s,t)==r&&i(e.sliceDoc(s-1,s))!=ls.Word)return s}return-1}function m_t(e={}){return[qAt,ol,_a.of(e),VAt,g_t,xAe]}const CAe=[{key:"Ctrl-Space",run:w5},{mac:"Alt-`",run:w5},{mac:"Alt-i",run:w5},{key:"Escape",run:BAt},{key:"ArrowDown",run:a2(!0)},{key:"ArrowUp",run:a2(!1)},{key:"PageDown",run:a2(!0,"page")},{key:"PageUp",run:a2(!1,"page")},{key:"Enter",run:FAt}],g_t=Xh.highest(n1.computeN([_a],e=>e.facet(_a).defaultKeymap?[CAe]:[])),TAe=[bs("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),bs("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),bs("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),bs("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),bs("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),bs(`try { +`);i>-1&&(n=n.slice(0,i))}return t+n.length<=this.to?n:n.slice(0,this.to-t)}nextLine(){let t=this.parsedPos,n=this.lineAfter(t),i=t+n.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(n=n.slice(0,s-(i-n.length)),r++,r==this.ranges.length))break;let a=this.ranges[r].from,l=this.lineAfter(a);n+=l,i=a+l.length}return{line:n,end:i}}skipGapsTo(t,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=t+n;if(i>0?r>s:r>=s)break;let a=this.ranges[++this.rangeIndex].from;n+=a-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(n,r,1),n+=r;let l=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-l}let a=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&a>=0&&this.chunk[a]==t&&this.chunk[a+2]==n?this.chunk[a+2]=i:this.chunk.push(t,n,i,s),r}parseLine(t){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,a=new uAe(n,t?t.state.tabSize:4,t?Nb(t.state):2);if(a.eol())s.blankLine(this.state,a.indentUnit);else for(;!a.eol();){let l=fAe(s.token,a,this.state);if(l&&(r=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+a.start,this.parsedPos+a.pos,r)),a.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPost.start)return r}throw new Error("Stream parser failed to advance stream.")}const aQ=Object.create(null),ik=[na.none],L2t=new Yx(ik),xJ=[],OJ=Object.create(null),hAe=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])hAe[e]=mAe(aQ,t);class pAe{constructor(t){this.extra=t,this.table=Object.assign(Object.create(null),hAe)}resolve(t){return t?this.table[t]||(this.table[t]=mAe(this.extra,t)):0}}const $2t=new pAe(aQ);function m5(e,t){xJ.indexOf(e)>-1||(xJ.push(e),console.warn(t))}function mAe(e,t){let n=[];for(let l of t.split(" ")){let c=[];for(let u of l.split(".")){let d=e[u]||ne[u];d?typeof d=="function"?c.length?c=c.map(d):m5(u,`Modifier ${u} used at start of tag`):c.length?m5(u,`Tag ${u} used as modifier`):c=Array.isArray(d)?d:[d]:m5(u,`Unknown highlighting tag ${u}`)}for(let u of c)n.push(u)}if(!n.length)return 0;let i=t.replace(/ /g,"_"),r=i+" "+n.map(l=>l.id),s=OJ[r];if(s)return s.id;let a=OJ[r]=na.define({id:ik.length,name:i,props:[qh({[i]:n})]});return ik.push(a),a.id}function F2t(e,t){let n=na.define({id:ik.length,name:"Document",props:[zp.add(()=>e),Wh.add(()=>i=>t.getIndent(i))],top:!0});return ik.push(n),n}Ar.RTL,Ar.LTR;var wJ={};class DN{constructor(t,n,i,r,s,a,l,c,u,d=0,f){this.p=t,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=a,this.buffer=l,this.bufferBase=c,this.curContext=u,this.lookAhead=d,this.parent=f}toString(){return`[${this.stack.filter((t,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,n,i=0){let r=t.parser.context;return new DN(t,[],n,i,i,0,[],0,r?new SJ(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var n;let i=t>>19,r=t&65535,{parser:s}=this.p,a=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=d):this.p.lastBigReductionSizec;)this.stack.pop();this.reduceContext(r,u)}storeNode(t,n,i,r=4,s=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&this.buffer[a-4]==0&&this.buffer[a-1]>-1){if(n==i)return;if(this.buffer[a-2]>=n){this.buffer[a-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(t,n,i,r);else{let a=this.buffer.length;if(a>0&&(this.buffer[a-4]!=0||this.buffer[a-1]<0)){let l=!1;for(let c=a;c>0&&this.buffer[c-2]>i;c-=4)if(this.buffer[c-1]>=0){l=!0;break}if(l)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,r>4&&(r-=4)}this.buffer[a]=t,this.buffer[a+1]=n,this.buffer[a+2]=i,this.buffer[a+3]=r}}shift(t,n,i,r){if(t&131072)this.pushState(t&65535,this.pos);else if(t&262144)this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4);else{let s=t,{parser:a}=this.p;this.pos=r;let l=a.stateFlag(s,1);!l&&(r>i||n<=a.maxNode)&&(this.reducePos=r),this.pushState(s,l?i:Math.min(i,this.reducePos)),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}}apply(t,n,i,r){t&65536?this.reduce(t):this.shift(t,n,i,r)}useNode(t,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let r=this.pos;this.reducePos=this.pos=r+t.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let i=t.buffer.slice(n),r=t.bufferBase+n;for(;t&&r==t.bufferBase;)t=t.parent;return new DN(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,t)}recoverByDelete(t,n){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(t){for(let n=new B2t(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,t);if(i==0)return!1;if(!(i&65536))return!0;n.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,a;sc&1&&l==a)||r.push(n[s],a)}n=r}let i=[];for(let r=0;r>19,r=n&65535,s=this.stack.length-i*3;if(s<0||t.getGoto(this.stack[s],r,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:t}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),t.allActions(r,a=>{if(!(a&393216))if(a&65536){let l=(a>>19)-s;if(l>1){let c=a&65535,u=this.stack.length-l*3;if(u>=0&&t.getGoto(this.stack[u],c,!1)>=0)return l<<19|65536|c}}else{let l=i(a,s+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let n=0;n0&&this.emitLookAhead()}}class SJ{constructor(t,n){this.tracker=t,this.context=n,this.hash=t.strict?t.hash(n):0}}class B2t{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let n=t&65535,i=t>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class MN{constructor(t,n,i){this.stack=t,this.pos=n,this.index=i,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new MN(t,n,n-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new MN(this.stack,this.pos,this.index)}}function UO(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let i=0,r=0;i=92&&a--,a>=34&&a--;let c=a-32;if(c>=46&&(c-=46,l=!0),s+=c,l)break;s*=46}n?n[r++]=s:n=new t(s)}return n}class CA{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const kJ=new CA;class U2t{constructor(t,n){this.input=t,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=kJ,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(t,n){let i=this.range,r=this.rangeIndex,s=this.pos+t;for(;si.to:s>=i.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];s+=a.from-i.to,i=a}return s}clipPos(t){if(t>=this.range.from&&tt)return Math.max(t,n.from);return this.end}peek(t){let n=this.chunkOff+t,i,r;if(n>=0&&n=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(t,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,n){if(n?(this.token=n,n.start=t,n.lookAhead=t+1,n.value=n.extended=-1):this.token=kJ,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,n-this.chunkPos);if(t>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,n-this.chunk2Pos);if(t>=this.range.from&&n<=this.range.to)return this.input.read(t,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>t&&(i+=this.input.read(Math.max(r.from,t),Math.min(r.to,n)))}return i}}class uv{constructor(t,n){this.data=t,this.id=n}token(t,n){let{parser:i}=n.p;gAe(this.data,t,n,this.id,i.data,i.tokenPrecTable)}}uv.prototype.contextual=uv.prototype.fallback=uv.prototype.extend=!1;class LN{constructor(t,n,i){this.precTable=n,this.elseToken=i,this.data=typeof t=="string"?UO(t):t}token(t,n){let i=t.pos,r=0;for(;;){let s=t.next<0,a=t.resolveOffset(1,1);if(gAe(this.data,t,n,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,a==null)break;t.reset(a,t.token)}r&&(t.reset(i,t.token),t.acceptToken(this.elseToken,r))}}LN.prototype.contextual=uv.prototype.fallback=uv.prototype.extend=!1;class Hs{constructor(t,n={}){this.token=t,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function gAe(e,t,n,i,r,s){let a=0,l=1<0){let g=e[p];if(c.allows(g)&&(t.token.value==-1||t.token.value==g||Q2t(g,t.token.value,r,s))){t.acceptToken(g);break}}let d=t.next,f=0,h=e[a+2];if(t.next<0&&h>f&&e[u+h*3-3]==65535){a=e[u+h*3-1];continue e}for(;f>1,g=u+p+(p<<1),b=e[g],v=e[g+1]||65536;if(d=v)f=p+1;else{a=e[g+2],t.advance();continue e}}break}}function EJ(e,t,n){for(let i=t,r;(r=e[i])!=65535;i++)if(r==n)return i-t;return-1}function Q2t(e,t,n,i){let r=EJ(n,i,t);return r<0||EJ(n,i,e)t)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,t-25)):Math.min(e.length,Math.max(i.from+1,t+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:e.length}}let z2t=class{constructor(t,n){this.fragments=t,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?CJ(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?CJ(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(tt)return this.nextStart=a,null;if(s instanceof pi){if(a==t){if(a=Math.max(this.safeFrom,t)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+s.length}}};class V2t{constructor(t,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(i=>new CA)}getActions(t){let n=0,i=null,{parser:r}=t.p,{tokenizers:s}=r,a=r.stateSlot(t.state,3),l=t.curContext?t.curContext.hash:0,c=0;for(let u=0;uf.end+25&&(c=Math.max(f.lookAhead,c)),f.value!=0)){let h=n;if(f.extended>-1&&(n=this.addActions(t,f.extended,f.end,n)),n=this.addActions(t,f.value,f.end,n),!d.extend&&(i=f,n>h))break}}for(;this.actions.length>n;)this.actions.pop();return c&&t.setLookAhead(c),!i&&t.pos==this.stream.end&&(i=new CA,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,n=this.addActions(t,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let n=new CA,{pos:i,p:r}=t;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(t,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,t),i),t.value>-1){let{parser:s}=i.p;for(let a=0;a=0&&i.p.parser.dialect.allows(l>>1)){l&1?t.extended=l>>1:t.value=l>>1;break}}}else t.value=0,t.end=this.stream.clipPos(r+1)}putAction(t,n,i,r){for(let s=0;st.bufferLength*4?new z2t(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&t.length==1){let[a]=t;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;an)i.push(l);else{if(this.advanceStack(l,i,t))continue;{r||(r=[],s=[]),r.push(l);let c=this.tokens.getMainToken(l);s.push(c.value,c.end)}}break}}if(!i.length){let a=r&&W2t(r);if(a)return Il&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Il&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(a)return Il&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((l,c)=>c.score-l.score);i.length>a;)i.pop();i.some(l=>l.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let a=0;a500&&u.buffer.length>500)if((l.score-u.score||l.buffer.length-u.buffer.length)>0)i.splice(c--,1);else{i.splice(a--,1);continue e}}}i.length>12&&(i.sort((a,l)=>l.score-a.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let a=1;a ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let u=t.curContext&&t.curContext.tracker.strict,d=u?t.curContext.hash:0;for(let f=this.fragments.nodeAt(r);f;){let h=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(t.state,f.type.id):-1;if(h>-1&&f.length&&(!u||(f.prop(In.contextHash)||0)==d))return t.useNode(f,h),Il&&console.log(a+this.stackID(t)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof pi)||f.children.length==0||f.positions[0]>0)break;let p=f.children[0];if(p instanceof pi&&f.positions[0]==0)f=p;else break}}let l=s.stateSlot(t.state,4);if(l>0)return t.reduce(l),Il&&console.log(a+this.stackID(t)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let c=this.tokens.getActions(t);for(let u=0;ur?n.push(g):i.push(g)}return!1}advanceFully(t,n){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return TJ(t,n),!0}}runRecovery(t,n,i){let r=null,s=!1;for(let a=0;a ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Il&&console.log(d+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),h=d;for(let p=0;p<10&&f.forceReduce()&&(Il&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));p++)Il&&(h=this.stackID(f)+" -> ");for(let p of l.recoverByInsert(c))Il&&console.log(d+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>l.pos?(u==l.pos&&(u++,c=0),l.recoverByDelete(c,u),Il&&console.log(d+this.stackID(l)+` (via recover-delete ${this.parser.getName(c)})`),TJ(l,i)):(!r||r.scoree;class xI{constructor(t){this.start=t.start,this.shift=t.shift||b5,this.reduce=t.reduce||b5,this.reuse=t.reuse||b5,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class Ph extends cI{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let n=t.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;lt.topRules[l][1]),r=[];for(let l=0;l=0)s(d,c,l[u++]);else{let f=l[u+-d];for(let h=-d;h>0;h--)s(l[u++],c,f);u++}}}this.nodeSet=new Yx(n.map((l,c)=>na.define({name:c>=this.minRepeatTerm?void 0:l,id:c,props:r[c],top:i.indexOf(c)>-1,error:c==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(c)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=pTe;let a=UO(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new uv(a,l):l),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,n,i){let r=new H2t(this,t,n,i);for(let s of this.wrappers)r=s(r,t,n,i);return r}getGoto(t,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let a=r[s++],l=a&1,c=r[s++];if(l&&i)return c;for(let u=s+(a>>1);s0}validAction(t,n){return!!this.allActions(t,i=>i==n?!0:null)}allActions(t,n){let i=this.stateSlot(t,4),r=i?n(i):void 0;for(let s=this.stateSlot(t,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Ff(this.data,s+2);else break;r=n(Ff(this.data,s+1))}return r}nextStates(t){let n=[];for(let i=this.stateSlot(t,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Ff(this.data,i+2);else break;if(!(this.data[i+2]&1)){let r=this.data[i+1];n.some((s,a)=>a&1&&s==r)||n.push(this.data[i],r)}}return n}configure(t){let n=Object.assign(Object.create(Ph.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let i=this.topRules[t.top];if(!i)throw new RangeError(`Invalid top rule name ${t.top}`);n.top=i}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=t.tokenizers.find(s=>s.from==i);return r?r.to:i})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=t.specializers.find(l=>l.from==i.external);if(!s)return i;let a=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=AJ(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let n=this.dynamicPrecedences;return n==null?0:n[t]||0}parseDialect(t){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(t)for(let s of t.split(" ")){let a=n.indexOf(s);a>=0&&(i[a]=!0)}let r=null;for(let s=0;si)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scoree.external(n,i)<<1|t}return e.get}const K2t=316,G2t=317,_J=1,X2t=2,Y2t=3,Z2t=4,J2t=318,eAt=320,tAt=321,nAt=5,iAt=6,rAt=0,z$=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],bAe=125,sAt=59,V$=47,aAt=42,oAt=43,lAt=45,cAt=60,uAt=44,dAt=63,fAt=46,hAt=91,pAt=new xI({start:!1,shift(e,t){return t==nAt||t==iAt||t==eAt?e:t==tAt},strict:!1}),mAt=new Hs((e,t)=>{let{next:n}=e;(n==bAe||n==-1||t.context)&&e.acceptToken(J2t)},{contextual:!0,fallback:!0}),gAt=new Hs((e,t)=>{let{next:n}=e,i;z$.indexOf(n)>-1||n==V$&&((i=e.peek(1))==V$||i==aAt)||n!=bAe&&n!=sAt&&n!=-1&&!t.context&&e.acceptToken(K2t)},{contextual:!0}),bAt=new Hs((e,t)=>{e.next==hAt&&!t.context&&e.acceptToken(G2t)},{contextual:!0}),yAt=new Hs((e,t)=>{let{next:n}=e;if(n==oAt||n==lAt){if(e.advance(),n==e.next){e.advance();let i=!t.context&&t.canShift(_J);e.acceptToken(i?_J:X2t)}}else n==dAt&&e.peek(1)==fAt&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(Y2t))},{contextual:!0});function y5(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}const vAt=new Hs((e,t)=>{if(e.next!=cAt||!t.dialectEnabled(rAt)||(e.advance(),e.next==V$))return;let n=0;for(;z$.indexOf(e.next)>-1;)e.advance(),n++;if(y5(e.next,!0)){for(e.advance(),n++;y5(e.next,!1);)e.advance(),n++;for(;z$.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==uAt)return;for(let i=0;;i++){if(i==7){if(!y5(e.next,!0))return;break}if(e.next!="extends".charCodeAt(i))break;e.advance(),n++}}e.acceptToken(Z2t,-n)}),xAt=qh({"get set async static":ne.modifier,"for while do if else switch try catch finally return throw break continue default case defer":ne.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":ne.operatorKeyword,"let var const using function class extends":ne.definitionKeyword,"import export from":ne.moduleKeyword,"with debugger new":ne.keyword,TemplateString:ne.special(ne.string),super:ne.atom,BooleanLiteral:ne.bool,this:ne.self,null:ne.null,Star:ne.modifier,VariableName:ne.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":ne.function(ne.variableName),VariableDefinition:ne.definition(ne.variableName),Label:ne.labelName,PropertyName:ne.propertyName,PrivatePropertyName:ne.special(ne.propertyName),"CallExpression/MemberExpression/PropertyName":ne.function(ne.propertyName),"FunctionDeclaration/VariableDefinition":ne.function(ne.definition(ne.variableName)),"ClassDeclaration/VariableDefinition":ne.definition(ne.className),"NewExpression/VariableName":ne.className,PropertyDefinition:ne.definition(ne.propertyName),PrivatePropertyDefinition:ne.definition(ne.special(ne.propertyName)),UpdateOp:ne.updateOperator,"LineComment Hashbang":ne.lineComment,BlockComment:ne.blockComment,Number:ne.number,String:ne.string,Escape:ne.escape,ArithOp:ne.arithmeticOperator,LogicOp:ne.logicOperator,BitOp:ne.bitwiseOperator,CompareOp:ne.compareOperator,RegExp:ne.regexp,Equals:ne.definitionOperator,Arrow:ne.function(ne.punctuation),": Spread":ne.punctuation,"( )":ne.paren,"[ ]":ne.squareBracket,"{ }":ne.brace,"InterpolationStart InterpolationEnd":ne.special(ne.brace),".":ne.derefOperator,", ;":ne.separator,"@":ne.meta,TypeName:ne.typeName,TypeDefinition:ne.definition(ne.typeName),"type enum interface implements namespace module declare":ne.definitionKeyword,"abstract global Privacy readonly override":ne.modifier,"is keyof unique infer asserts":ne.operatorKeyword,JSXAttributeValue:ne.attributeValue,JSXText:ne.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":ne.angleBracket,"JSXIdentifier JSXNameSpacedName":ne.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":ne.attributeName,"JSXBuiltin/JSXIdentifier":ne.standard(ne.tagName)}),OAt={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},wAt={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},SAt={__proto__:null,"<":193},kAt=Ph.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-EtOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-EPO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-ERQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<VO!l$xO#jROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!OVO!l$xO#jVO!l$xO#jROe!iOpkOrPO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]VO!l$xO#j^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOrROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]WO!l$xO#jgPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{SU+P%]S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mR>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o>UPS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^T)z$u){V+P%]S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SS#q]SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uSSR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:mSR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:oS)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mSS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:mS#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^Q+T%aQ/c*Oo4OP>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^n=rTQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o4OP>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f]>^nZ>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f]>^nZ>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.lPQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.nSR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:pAt,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[xAt],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[gAt,bAt,yAt,vAt,2,3,4,5,6,7,8,9,10,11,12,13,14,mAt,new LN("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new LN("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>OAt[e]||-1},{term:343,get:e=>wAt[e]||-1},{term:95,get:e=>SAt[e]||-1}],tokenPrec:15201});class oQ{constructor(t,n,i,r){this.state=t,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let n=Sr(this.state).resolveInner(this.pos,-1);for(;n&&t.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(t){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(vAe(t,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(t,n,i){t=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function NJ(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function EAt(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let s=1;stypeof r=="string"?{label:r}:r),[n,i]=t.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:EAt(t);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:t,validFor:n}:null}}function yAe(e,t){return n=>{for(let i=Sr(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(e.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return t(n)}}class jJ{constructor(t,n,i,r){this.completion=t,this.source=n,this.match=i,this.score=r}}function rb(e){return e.selection.main.from}function vAe(e,t){var n;let{source:i}=e,r=t&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?e:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":"")}const cQ=tf.define();function CAt(e,t,n,i){let{main:r}=e.selection,s=n-r.from,a=i-r.from;return{...e.changeByRange(l=>{if(l!=r&&n!=i&&e.sliceDoc(l.from+s,l.from+a)!=e.sliceDoc(n,i))return{range:l};let c=e.toText(t);return{changes:{from:l.from+s,to:i==r.from?l.to:l.from+a,insert:c},range:Ze.cursor(l.from+s+c.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const RJ=new WeakMap;function TAt(e){if(!Array.isArray(e))return e;let t=RJ.get(e);return t||RJ.set(e,t=lQ(e)),t}const $N=$n.define(),rk=$n.define();class AAt{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(S=MU(k))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(!x||E==1&&v||O==0&&E!=0)&&(n[f]==k||i[f]==k&&(h=!0)?a[f++]=x:a.length&&(y=!1)),O=E,x+=wd(k)}return f==c&&a[0]==0&&y?this.result(-100+(h?-200:0),a,t):p==c&&g==0?this.ret(-200-t.length+(b==t.length?0:-100),[0,b]):l>-1?this.ret(-700-t.length,[l,l+this.pattern.length]):p==c?this.ret(-900-t.length,[g,b]):f==c?this.result(-100+(h?-200:0)+-700+(y?0:-1100),a,t):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,t)}result(t,n,i){let r=[],s=0;for(let a of n){let l=a+(this.astral?wd(sl(i,a)):1);s&&r[s-1]==a?r[s-1]=l:(r[s++]=a,r[s++]=l)}return this.ret(t-i.length,r)}}class _At{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:NAt,filterStrict:!1,compareCompletions:(t,n)=>(t.sortText||t.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,n)=>t&&n,closeOnBlur:(t,n)=>t&&n,icons:(t,n)=>t&&n,tooltipClass:(t,n)=>i=>IJ(t(i),n(i)),optionClass:(t,n)=>i=>IJ(t(i),n(i)),addToOptions:(t,n)=>t.concat(n),filterStrict:(t,n)=>t||n})}});function IJ(e,t){return e?t?e+" "+t:e:t}function NAt(e,t,n,i,r,s){let a=e.textDirection==Ar.RTL,l=a,c=!1,u="top",d,f,h=t.left-r.left,p=r.right-t.right,g=i.right-i.left,b=i.bottom-i.top;if(l&&h=b||x>t.top?d=n.bottom-t.top:(u="bottom",d=t.bottom-n.top)}let v=(t.bottom-t.top)/s.offsetHeight,y=(t.right-t.left)/s.offsetWidth;return{style:`${u}: ${d/v}px; max-width: ${f/y}px`,class:"cm-completionInfo-"+(c?a?"left-narrow":"right-narrow":l?"left":"right")}}const uQ=$n.define();function jAt(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),t.push({render(n,i,r,s){let a=document.createElement("span");a.className="cm-completionLabel";let l=n.displayLabel||n.label,c=0;for(let u=0;uc&&a.appendChild(document.createTextNode(l.slice(c,d)));let h=a.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(l.slice(d,f))),h.className="cm-completionMatchedText",c=f}return cn.position-i.position).map(n=>n.render)}function v5(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let r=Math.floor(t/n);return{from:r*n,to:(r+1)*n}}let i=Math.ceil((e-t)/n);return{from:e-i*n,to:e-(i-1)*n}}class RAt{constructor(t,n,i){this.view=t,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let r=t.state.field(n),{options:s,selected:a}=r.open,l=t.state.facet(Aa);this.optionContent=jAt(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=v5(s.length,a,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",c=>{let{options:u}=t.state.field(n).open;for(let d=c.target,f;d&&d!=this.dom;d=d.parentNode)if(d.nodeName=="LI"&&(f=/-(\d+)$/.exec(d.id))&&+f[1]this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;d!=null&&(t.dispatch({effects:uQ.of(d)}),c.preventDefault())}}),this.dom.addEventListener("focusout",c=>{let u=t.state.field(this.stateField,!1);u&&u.tooltip&&t.state.facet(Aa).closeOnBlur&&c.relatedTarget!=t.contentDOM&&t.dispatch({effects:rk.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(t,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(t){var n;let i=t.state.field(this.stateField),r=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),i!=r){let{options:s,selected:a,disabled:l}=i.open;(!r.open||r.open.options!=s)&&(this.range=v5(s.length,a,t.state.facet(Aa).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),l!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(t){let n=this.tooltipClass(t);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),n=t.open;(n.selected>-1&&n.selected=this.range.to)&&(this.range=v5(n.options.length,n.selected,this.view.state.facet(Aa).maxRenderedOptions),this.showOptions(n.options,t.id));let i=this.updateSelectedOption(n.selected);if(i){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:s}=r;if(!s)return;let a=typeof s=="string"?document.createTextNode(s):s(r);if(!a)return;"then"in a?a.then(l=>{l&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(l,r)}).catch(l=>dl(this.view.state,l,"completion info")):(this.addInfoPane(a,r),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(t,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),t.nodeType!=null)i.appendChild(t),this.infoDestroy=null;else{let{dom:r,destroy:s}=t;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&(i.removeAttribute("aria-selected"),i.removeAttribute("aria-describedby"));return n&&PAt(this.list,n),n}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=t.getBoundingClientRect(),s=this.space;if(!s){let a=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottom{a.target==r&&a.preventDefault()});let s=null;for(let a=i.from;ai.from||i.from==0))if(s=h,typeof u!="string"&&u.header)r.appendChild(u.header(u));else{let p=r.appendChild(document.createElement("completion-section"));p.textContent=h}}const d=r.appendChild(document.createElement("li"));d.id=n+"-"+a,d.setAttribute("role","option");let f=this.optionClass(l);f&&(d.className=f);for(let h of this.optionContent){let p=h(l,this.view.state,this.view,c);p&&d.appendChild(p)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.tonew RAt(n,e,t)}function PAt(e,t){let n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),r=n.height/e.offsetHeight;i.topn.bottom&&(e.scrollTop+=(i.bottom-n.bottom)/r)}function PJ(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}function DAt(e,t){let n=[],i=null,r=null,s=d=>{n.push(d);let{section:f}=d.completion;if(f){i||(i=[]);let h=typeof f=="string"?f:f.name;i.some(p=>p.name==h)||i.push(typeof f=="string"?{name:h}:f)}},a=t.facet(Aa);for(let d of e)if(d.hasResult()){let f=d.result.getMatch;if(d.result.filter===!1)for(let h of d.result.options)s(new jJ(h,d.source,f?f(h):[],1e9-n.length));else{let h=t.sliceDoc(d.from,d.to),p,g=a.filterStrict?new _At(h):new AAt(h);for(let b of d.result.options)if(p=g.match(b.label)){let v=b.displayLabel?f?f(b,p.matched):[]:p.matched,y=p.score+(b.boost||0);if(s(new jJ(b,d.source,v,y)),typeof b.section=="object"&&b.section.rank==="dynamic"){let{name:x}=b.section;r||(r=Object.create(null)),r[x]=Math.max(y,r[x]||-1e9)}}}}if(i){let d=Object.create(null),f=0,h=(p,g)=>(p.rank==="dynamic"&&g.rank==="dynamic"?r[g.name]-r[p.name]:0)||(typeof p.rank=="number"?p.rank:1e9)-(typeof g.rank=="number"?g.rank:1e9)||(p.nameh.score-f.score||u(f.completion,h.completion))){let f=d.completion;!c||c.label!=f.label||c.detail!=f.detail||c.type!=null&&f.type!=null&&c.type!=f.type||c.apply!=f.apply||c.boost!=f.boost?l.push(d):PJ(d.completion)>PJ(c)&&(l[l.length-1]=d),c=d.completion}return l}class Iy{constructor(t,n,i,r,s,a){this.options=t,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new Iy(this.options,DJ(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,i,r,s,a){if(r&&!a&&t.some(u=>u.isPending))return r.setDisabled();let l=DAt(t,n);if(!l.length)return r&&t.some(u=>u.isPending)?r.setDisabled():null;let c=n.facet(Aa).selectOnOpen?0:-1;if(r&&r.selected!=c&&r.selected!=-1){let u=r.options[r.selected].completion;for(let d=0;dd.hasResult()?Math.min(u,d.from):u,1e8),create:UAt,above:s.aboveCursor},r?r.timestamp:Date.now(),c,!1)}map(t){return new Iy(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Iy(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class FN{constructor(t,n,i){this.active=t,this.id=n,this.open=i}static start(){return new FN(FAt,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,i=n.facet(Aa),s=(i.override||n.languageDataAt("autocomplete",rb(n)).map(TAt)).map(c=>(this.active.find(d=>d.source==c)||new Kc(c,this.active.some(d=>d.state!=0)?1:0)).update(t,i));s.length==this.active.length&&s.every((c,u)=>c==this.active[u])&&(s=this.active);let a=this.open,l=t.effects.some(c=>c.is(dQ));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||s.some(c=>c.hasResult()&&t.changes.touchesRange(c.from,c.to))||!MAt(s,this.active)||l?a=Iy.build(s,n,this.id,a,i,l):a&&a.disabled&&!s.some(c=>c.isPending)&&(a=null),!a&&s.every(c=>!c.isPending)&&s.some(c=>c.hasResult())&&(s=s.map(c=>c.hasResult()?new Kc(c.source,0):c));for(let c of t.effects)c.is(uQ)&&(a=a&&a.setSelected(c.value,this.id));return s==this.active&&a==this.open?this:new FN(s,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?LAt:$At}}function MAt(e,t){if(e==t)return!0;for(let n=0,i=0;;){for(;n-1&&(n["aria-activedescendant"]=e+"-"+t),n}const FAt=[];function xAe(e,t){if(e.isUserEvent("input.complete")){let i=e.annotation(cQ);if(i&&t.activateOnCompletion(i))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class Kc{constructor(t,n,i=!1){this.source=t,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let i=xAe(t,n),r=this;(i&8||i&16&&this.touches(t))&&(r=new Kc(r.source,0)),i&4&&r.state==0&&(r=new Kc(this.source,1)),r=r.updateFor(t,i);for(let s of t.effects)if(s.is($N))r=new Kc(r.source,1,s.value);else if(s.is(rk))r=new Kc(r.source,0);else if(s.is(dQ))for(let a of s.value)a.source==r.source&&(r=a);return r}updateFor(t,n){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(rb(t.state))}}class dv extends Kc{constructor(t,n,i,r,s,a){super(t,3,n),this.limit=i,this.result=r,this.from=s,this.to=a}hasResult(){return!0}updateFor(t,n){var i;if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let s=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),l=rb(t.state);if(l>a||!r||n&2&&(rb(t.startState)==this.from||ln.map(t))}}),al=no.define({create(){return FN.start()},update(e,t){return e.update(t)},provide:e=>[JU.from(e,t=>t.tooltip),Pt.contentAttributes.from(e,t=>t.attrs)]});function fQ(e,t){const n=t.completion.apply||t.completion.label;let i=e.state.field(al).active.find(r=>r.source==t.source);return i instanceof dv?(typeof n=="string"?e.dispatch({...CAt(e.state,n,i.from,i.to),annotations:cQ.of(t.completion)}):n(e,t.completion,i.from,i.to),!0):!1}const UAt=IAt(al,fQ);function i2(e,t="option"){return n=>{let i=n.state.field(al,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+r*(e?1:-1):e?0:a-1;return l<0?l=t=="page"?0:a-1:l>=a&&(l=t=="page"?a-1:0),n.dispatch({effects:uQ.of(l)}),!0}}const QAt=e=>{let t=e.state.field(al,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.state.field(al,!1)?(e.dispatch({effects:$N.of(!0)}),!0):!1,zAt=e=>{let t=e.state.field(al,!1);return!t||!t.active.some(n=>n.state!=0)?!1:(e.dispatch({effects:rk.of(null)}),!0)};class VAt{constructor(t,n){this.active=t,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const HAt=50,qAt=1e3,WAt=As.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(al).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(al),n=e.state.facet(Aa);if(!e.selectionSet&&!e.docChanged&&e.startState.field(al)==t)return;let i=e.transactions.some(s=>{let a=xAe(s,n);return a&8||(s.selection||s.docChanged)&&!(a&3)});for(let s=0;sHAt&&Date.now()-a.time>qAt){for(let l of a.context.abortListeners)try{l()}catch(c){dl(this.view.state,c)}a.context.abortListeners=null,this.running.splice(s--,1)}else a.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(s=>s.effects.some(a=>a.is($N)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(s=>s.isPending&&!this.running.some(a=>a.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of e.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(al);for(let n of t.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Aa).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=rb(t),i=new oQ(t,n,e.explicit,this.view),r=new VAt(e,i);this.running.push(r),Promise.resolve(e.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:rk.of(null)}),dl(this.view.state,s)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Aa).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(Aa),i=this.view.state.field(al);for(let r=0;rl.source==s.active.source);if(a&&a.isPending)if(s.done==null){let l=new Kc(s.active.source,0);for(let c of s.updates)l=l.update(c,n);l.isPending||t.push(l)}else this.startQuery(a)}(t.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:dQ.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(al,!1);if(t&&t.tooltip&&this.view.state.facet(Aa).closeOnBlur){let n=t.open&&$2e(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:rk.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:$N.of(!1)}),20),this.composing=0}}}),KAt=typeof navigator=="object"&&/Win/.test(navigator.platform),GAt=Hh.highest(Pt.domEventHandlers({keydown(e,t){let n=t.state.field(al,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(KAt&&e.altKey)||e.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(a=>a.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(e.key)>-1&&fQ(t,i),!1}})),OAe=Pt.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class XAt{constructor(t,n,i,r){this.field=t,this.line=n,this.from=i,this.to=r}}class hQ{constructor(t,n,i){this.field=t,this.from=n,this.to=i}map(t){let n=t.mapPos(this.from,-1,Ya.TrackDel),i=t.mapPos(this.to,1,Ya.TrackDel);return n==null||i==null?null:new hQ(this.field,n,i)}}class pQ{constructor(t,n){this.lines=t,this.fieldPositions=n}instantiate(t,n){let i=[],r=[n],s=t.doc.lineAt(n),a=/^\s*/.exec(s.text)[0];for(let c of this.lines){if(i.length){let u=a,d=/^\t*/.exec(c)[0].length;for(let f=0;fnew hQ(c.field,r[c.line]+c.from,r[c.line]+c.to));return{text:i,ranges:l}}static parse(t){let n=[],i=[],r=[],s;for(let a of t.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let l=s[1]?+s[1]:null,c=s[2]||s[3]||"",u=-1;l===0&&(l=1e9);let d=c.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f=u&&h.field++}for(let f of r)if(f.line==i.length&&f.from>s.index){let h=s[2]?3+(s[1]||"").length:2;f.from-=h,f.to-=h}r.push(new XAt(u,i.length,s.index,s.index+d.length)),a=a.slice(0,s.index)+c+a.slice(s.index+s[0].length)}a=a.replace(/\\([{}])/g,(l,c,u)=>{for(let d of r)d.line==i.length&&d.from>u&&(d.from--,d.to--);return c}),i.push(a)}return new pQ(i,r)}}let YAt=pn.widget({widget:new class extends Yu{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),ZAt=pn.mark({class:"cm-snippetField"});class e1{constructor(t,n){this.ranges=t,this.active=n,this.deco=pn.set(t.map(i=>(i.from==i.to?YAt:ZAt).range(i.from,i.to)),!0)}map(t){let n=[];for(let i of this.ranges){let r=i.map(t);if(!r)return null;n.push(r)}return new e1(n,this.active)}selectionInsideField(t){return t.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const DE=$n.define({map(e,t){return e&&e.map(t)}}),JAt=$n.define(),sk=no.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(DE))return n.value;if(n.is(JAt)&&e)return new e1(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>Pt.decorations.from(e,t=>t?t.deco:pn.none)});function mQ(e,t){return Ze.create(e.filter(n=>n.field==t).map(n=>Ze.range(n.from,n.to)))}function e_t(e){let t=pQ.parse(e);return(n,i,r,s)=>{let{text:a,ranges:l}=t.instantiate(n.state,r),{main:c}=n.state.selection,u={changes:{from:r,to:s==c.from?c.to:s,insert:Yi.of(a)},scrollIntoView:!0,annotations:i?[cQ.of(i),ta.userEvent.of("input.complete")]:void 0};if(l.length&&(u.selection=mQ(l,0)),l.some(d=>d.field>0)){let d=new e1(l,0),f=u.effects=[DE.of(d)];n.state.field(sk,!1)===void 0&&f.push($n.appendConfig.of([sk,s_t,a_t,OAe]))}n.dispatch(n.state.update(u))}}function wAe(e){return({state:t,dispatch:n})=>{let i=t.field(sk,!1);if(!i||e<0&&i.active==0)return!1;let r=i.active+e,s=e>0&&!i.ranges.some(a=>a.field==r+e);return n(t.update({selection:mQ(i.ranges,r),effects:DE.of(s?null:new e1(i.ranges,r)),scrollIntoView:!0})),!0}}const t_t=({state:e,dispatch:t})=>e.field(sk,!1)?(t(e.update({effects:DE.of(null)})),!0):!1,n_t=wAe(1),i_t=wAe(-1),r_t=[{key:"Tab",run:n_t,shift:i_t},{key:"Escape",run:t_t}],MJ=Vt.define({combine(e){return e.length?e[0]:r_t}}),s_t=Hh.highest(Zx.compute([MJ],e=>e.facet(MJ)));function bs(e,t){return{...t,apply:e_t(e)}}const a_t=Pt.domEventHandlers({mousedown(e,t){let n=t.state.field(sk,!1),i;if(!n||(i=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(t.dispatch({selection:mQ(n.ranges,r.field),effects:DE.of(n.ranges.some(s=>s.field>r.field)?new e1(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),ak={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Bg=$n.define({map(e,t){let n=t.mapPos(e,-1,Ya.TrackAfter);return n??void 0}}),gQ=new class extends Em{};gQ.startSide=1;gQ.endSide=-1;const SAe=no.define({create(){return Si.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of t.effects)n.is(Bg)&&(e=e.update({add:[gQ.range(n.value,n.value+1)]}));return e}});function o_t(){return[c_t,SAe]}const O5="()[]{}<>«»»«[]{}";function kAe(e){for(let t=0;t{if((l_t?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let r=e.state.selection.main;if(i.length>2||i.length==2&&wd(sl(i,0))==1||t!=r.from||n!=r.to)return!1;let s=f_t(e.state,i);return s?(e.dispatch(s),!0):!1}),u_t=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=EAe(e,e.selection.main.head).brackets||ak.brackets,r=null,s=e.changeByRange(a=>{if(a.empty){let l=h_t(e.doc,a.head);for(let c of i)if(c==l&&OI(e.doc,a.head)==kAe(sl(c,0)))return{changes:{from:a.head-c.length,to:a.head+c.length},range:Ze.cursor(a.head-c.length)}}return{range:r=a}});return r||t(e.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},d_t=[{key:"Backspace",run:u_t}];function f_t(e,t){let n=EAe(e,e.selection.main.head),i=n.brackets||ak.brackets;for(let r of i){let s=kAe(sl(r,0));if(t==r)return s==r?g_t(e,r,i.indexOf(r+r+r)>-1,n):p_t(e,r,s,n.before||ak.before);if(t==s&&CAe(e,e.selection.main.from))return m_t(e,r,s)}return null}function CAe(e,t){let n=!1;return e.field(SAe).between(0,e.doc.length,i=>{i==t&&(n=!0)}),n}function OI(e,t){let n=e.sliceString(t,t+2);return n.slice(0,wd(sl(n,0)))}function h_t(e,t){let n=e.sliceString(t-2,t);return wd(sl(n,0))==n.length?n:n.slice(1)}function p_t(e,t,n,i){let r=null,s=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:Bg.of(a.to+t.length),range:Ze.range(a.anchor+t.length,a.head+t.length)};let l=OI(e.doc,a.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:t+n,from:a.head},effects:Bg.of(a.head+t.length),range:Ze.cursor(a.head+t.length)}:{range:r=a}});return r?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function m_t(e,t,n){let i=null,r=e.changeByRange(s=>s.empty&&OI(e.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:Ze.cursor(s.head+n.length)}:i={range:s});return i?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function g_t(e,t,n,i){let r=i.stringPrefixes||ak.stringPrefixes,s=null,a=e.changeByRange(l=>{if(!l.empty)return{changes:[{insert:t,from:l.from},{insert:t,from:l.to}],effects:Bg.of(l.to+t.length),range:Ze.range(l.anchor+t.length,l.head+t.length)};let c=l.head,u=OI(e.doc,c),d;if(u==t){if(LJ(e,c))return{changes:{insert:t+t,from:c},effects:Bg.of(c+t.length),range:Ze.cursor(c+t.length)};if(CAe(e,c)){let h=n&&e.sliceDoc(c,c+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:c,to:c+h.length,insert:h},range:Ze.cursor(c+h.length)}}}else{if(n&&e.sliceDoc(c-2*t.length,c)==t+t&&(d=$J(e,c-2*t.length,r))>-1&&LJ(e,d))return{changes:{insert:t+t+t+t,from:c},effects:Bg.of(c+t.length),range:Ze.cursor(c+t.length)};if(e.charCategorizer(c)(u)!=os.Word&&$J(e,c,r)>-1&&!b_t(e,c,t,r))return{changes:{insert:t+t,from:c},effects:Bg.of(c+t.length),range:Ze.cursor(c+t.length)}}return{range:s=l}});return s?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function LJ(e,t){let n=Sr(e).resolveInner(t+1);return n.parent&&n.from==t}function b_t(e,t,n,i){let r=Sr(e).resolveInner(t,-1),s=i.reduce((a,l)=>Math.max(a,l.length),0);for(let a=0;a<5;a++){let l=e.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),c=l.indexOf(n);if(!c||c>-1&&i.indexOf(l.slice(0,c))>-1){let d=r.firstChild;for(;d&&d.from==r.from&&d.to-d.from>n.length+c;){if(e.sliceDoc(d.to-n.length,d.to)==n)return!1;d=d.firstChild}return!0}let u=r.to==t&&r.parent;if(!u)break;r=u}return!1}function $J(e,t,n){let i=e.charCategorizer(t);if(i(e.sliceDoc(t-1,t))!=os.Word)return t;for(let r of n){let s=t-r.length;if(e.sliceDoc(s,t)==r&&i(e.sliceDoc(s-1,s))!=os.Word)return s}return-1}function y_t(e={}){return[GAt,al,Aa.of(e),WAt,v_t,OAe]}const TAe=[{key:"Ctrl-Space",run:x5},{mac:"Alt-`",run:x5},{mac:"Alt-i",run:x5},{key:"Escape",run:zAt},{key:"ArrowDown",run:i2(!0)},{key:"ArrowUp",run:i2(!1)},{key:"PageDown",run:i2(!0,"page")},{key:"PageUp",run:i2(!1,"page")},{key:"Enter",run:QAt}],v_t=Hh.highest(Zx.computeN([Aa],e=>e.facet(Aa).defaultKeymap?[TAe]:[])),AAe=[bs("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),bs("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),bs("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),bs("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),bs("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),bs(`try { \${} } catch (\${error}) { \${} @@ -724,36 +724,36 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),bs('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),bs('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],b_t=TAe.concat([bs("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),bs("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),bs("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),QJ=new MU,AAe=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function iO(e){return(t,n)=>{let i=t.node.getChild("VariableDefinition");return i&&n(i,e),!0}}const y_t=["FunctionDeclaration"],v_t={FunctionDeclaration:iO("function"),ClassDeclaration:iO("class"),ClassExpression:()=>!0,EnumDeclaration:iO("constant"),TypeAliasDeclaration:iO("type"),NamespaceDeclaration:iO("namespace"),VariableDefinition(e,t){e.matchContext(y_t)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function _Ae(e,t){let n=QJ.get(t);if(n)return n;let i=[],r=!0;function s(a,l){let c=e.sliceString(a.from,a.to);i.push({label:c,type:l})}return t.cursor(tr.IncludeAnonymous).iterate(a=>{if(r)r=!1;else if(a.name){let l=v_t[a.name];if(l&&l(a,s)||AAe.has(a.name))return!1}else if(a.to-a.from>8192){for(let l of _Ae(e,a.node))i.push(l);return!1}}),QJ.set(t,i),i}const zJ=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,NAe=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function x_t(e){let t=wr(e.state).resolveInner(e.pos,-1);if(NAe.indexOf(t.name)>-1)return null;let n=t.name=="VariableName"||t.to-t.from<20&&zJ.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let i=[];for(let r=t;r;r=r.parent)AAe.has(r.name)&&(i=i.concat(_Ae(e.state.doc,r)));return{options:i,from:n?t.from:e.pos,validFor:zJ}}const zd=$h.define({name:"javascript",parser:OAt.configure({props:[Zh.add({IfStatement:hv({except:/^\s*({|else\b)/}),TryStatement:hv({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:n2t,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),i=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:i?1:2)*e.unit},Block:fv({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":hv({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Jh.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":DE,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name=="JSXSelfClosingTag")return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){var t;let n=(t=e.firstChild)===null||t===void 0?void 0:t.nextSibling,i=e.lastChild;return!n||n.type.isError?null:{from:n.to,to:i.type.isError?e.to:i.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),jAe={test:e=>/^JSX/.test(e.name),facet:vI({commentTokens:{block:{open:"{/*",close:"*/}"}}})},RAe=zd.configure({dialect:"ts"},"typescript"),IAe=zd.configure({dialect:"jsx",props:[nQ.add(e=>e.isTop?[jAe]:void 0)]}),PAe=zd.configure({dialect:"jsx ts",props:[nQ.add(e=>e.isTop?[jAe]:void 0)]},"typescript");let DAe=e=>({label:e,type:"keyword"});const MAe="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(DAe),O_t=MAe.concat(["declare","implements","private","protected","public"].map(DAe));function q$(e={}){let t=e.jsx?e.typescript?PAe:IAe:e.typescript?RAe:zd,n=e.typescript?b_t.concat(O_t):TAe.concat(MAe);return new Dm(t,[zd.data.of({autocomplete:bAe(NAe,cQ(n))}),zd.data.of({autocomplete:x_t}),e.jsx?k_t:[]])}function w_t(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(e.name=="JSXEscape"||!e.parent)return null;e=e.parent}}function VJ(e,t,n=e.length){for(let i=t==null?void 0:t.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return e.sliceString(i.from,Math.min(i.to,n));return""}const S_t=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),k_t=Pt.inputHandler.of((e,t,n,i,r)=>{if((S_t?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||i!=">"&&i!="/"||!zd.isActiveAt(e.state,t,-1))return!1;let s=r(),{state:a}=s,l=a.changeByRange(c=>{var u;let{head:d}=c,f=wr(a).resolveInner(d-1,-1),h;if(f.name=="JSXStartTag"&&(f=f.parent),!(a.doc.sliceString(d-1,d)!=i||f.name=="JSXAttributeValue"&&f.to>d)){if(i==">"&&f.name=="JSXFragmentTag")return{range:c,changes:{from:d,insert:""}};if(i=="/"&&f.name=="JSXStartCloseTag"){let p=f.parent,g=p.parent;if(g&&p.from==d-2&&((h=VJ(a.doc,g.firstChild,d))||((u=g.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let b=`${h}>`;return{range:Ze.cursor(d+b.length,-1),changes:{from:d,insert:b}}}}else if(i==">"){let p=w_t(f);if(p&&p.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(d,d+2))&&(h=VJ(a.doc,p,d)))return{range:c,changes:{from:d,insert:``}}}}return{range:c}});return l.changes.empty?!1:(e.dispatch([s,a.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),E_t=Yh({String:ne.string,Number:ne.number,"True False":ne.bool,PropertyName:ne.propertyName,Null:ne.null,", :":ne.separator,"[ ]":ne.squareBracket,"{ }":ne.brace}),C_t=Fh.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[E_t],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),T_t=$h.define({name:"json",parser:C_t.configure({props:[Zh.add({Object:hv({except:/^\s*\}/}),Array:hv({except:/^\s*\]/})}),Jh.add({"Object Array":DE})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function A_t(){return new Dm(T_t)}class zN{static create(t,n,i,r,s){let a=r+(r<<8)+t+(n<<4)|0;return new zN(t,n,i,a,s,[],[])}constructor(t,n,i,r,s,a,l){this.type=t,this.value=n,this.from=i,this.hash=r,this.end=s,this.children=a,this.positions=l,this.hashProp=[[Pn.contextHash,r]]}addChild(t,n){t.prop(Pn.contextHash)!=this.hash&&(t=new gi(t.type,t.children,t.positions,t.length,this.hashProp)),this.children.push(t),this.positions.push(n)}toTree(t,n=this.end){let i=this.children.length-1;return i>=0&&(n=Math.max(n,this.positions[i]+this.children[i].length+this.from)),new gi(t.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,s,a)=>new gi(ra.none,r,s,a,this.hashProp)})}}var Ct;(function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"})(Ct||(Ct={}));class __t{constructor(t,n){this.start=t,this.content=n,this.marks=[],this.parsers=[]}}class N_t{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let t=this.skipSpace(this.basePos);this.indent=this.countIndent(t,this.pos,this.indent),this.pos=t,this.next=t==this.text.length?-1:this.text.charCodeAt(t)}skipSpace(t){return Vw(this.text,t)}reset(t){for(this.text=t,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(t){this.basePos=t,this.baseIndent=this.countIndent(t,this.pos,this.indent)}moveBaseColumn(t){this.baseIndent=t,this.basePos=this.findColumn(t)}addMarker(t){this.markers.push(t)}countIndent(t,n=0,i=0){for(let r=n;r=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(e.type==Ct.OrderedList?xQ:vQ)(n,t,!1);return i>0&&(e.type!=Ct.BulletList||yQ(n,t,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==e.value}const LAe={[Ct.Blockquote](e,t,n){return n.next!=62?!1:(n.markers.push(Ui(Ct.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(ou(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[Ct.ListItem](e,t,n){return n.indent-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[Ct.OrderedList]:HJ,[Ct.BulletList]:HJ,[Ct.Document](){return!0}};function ou(e){return e==32||e==9||e==10||e==13}function Vw(e,t=0){for(;tn&&ou(e.charCodeAt(t-1));)t--;return t}function $Ae(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(qAe.SetextHeading)>-1||i<3?-1:1}function BAe(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function vQ(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||ou(e.text.charCodeAt(e.pos+1)))&&(!n||BAe(t,Ct.BulletList)||e.skipSpace(e.pos+2)=48&&r<=57;){i++;if(i==e.text.length)return-1;r=e.text.charCodeAt(i)}return i==e.pos||i>e.pos+9||r!=46&&r!=41||ie.pos+1||e.next!=49)?-1:i+1-e.pos}function UAe(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t6?-1:n}function QAe(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t/,VAe=/\?>/,K$=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/,HAe=/\?>/,W$=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*/i.exec(i);if(s)return e.append(Ui(Ct.Comment,n,n+1+s[0].length));let a=/^\?[^]*?\?>/.exec(i);if(a)return e.append(Ui(Ct.ProcessingInstruction,n,n+1+a[0].length));let l=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return l?e.append(Ui(Ct.HTMLTag,n,n+1+l[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let i=n+1;for(;e.char(i)==t;)i++;let r=e.slice(n-1,n),s=e.slice(i,i+1),a=dk.test(r),l=dk.test(s),c=/\s|^$/.test(r),u=/\s|^$/.test(s),d=!u&&(!l||c||a),f=!c&&(!a||u||l),h=d&&(t==42||!f||a),p=f&&(t==42||!d||l);return e.append(new Vl(t==95?YAe:ZAe,n,i,(h?1:0)|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(Ui(Ct.HardBreak,n,n+2));if(t==32){let i=n+1;for(;e.char(i)==32;)i++;if(e.char(i)==10&&i>=n+2)return e.append(Ui(Ct.HardBreak,n,i+1))}return-1},Link(e,t,n){return t==91?e.append(new Vl(jg,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new Vl(VN,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let i=e.parts.length-1;i>=0;i--){let r=e.parts[i];if(r instanceof Vl&&(r.type==jg||r.type==VN)){if(!r.side||e.skipSpace(r.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[i]=null,-1;let s=e.takeContent(i),a=e.parts[i]=M_t(e,s,r.type==jg?Ct.Link:Ct.Image,r.from,n+1);if(r.type==jg)for(let l=0;lt?Ui(Ct.URL,t+n,s+n):s==e.length?null:!1}}function e_e(e,t,n){let i=e.charCodeAt(t);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let s=t+1,a=!1;s=this.end?-1:this.text.charCodeAt(t-this.offset)}get end(){return this.offset+this.text.length}slice(t,n){return this.text.slice(t-this.offset,n-this.offset)}append(t){return this.parts.push(t),t.to}addDelimiter(t,n,i,r,s){return this.append(new Vl(t,n,i,(r?1:0)|(s?2:0)))}get hasOpenLink(){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof Vl&&(n.type==jg||n.type==VN))return!0}return!1}addElement(t){return this.append(t)}resolveMarkers(t){for(let i=t;i=t;c--){let b=this.parts[c];if(b instanceof Vl&&b.side&1&&b.type==r.type&&!(s&&(r.side&1||b.side&2)&&(b.to-b.from+a)%3==0&&((b.to-b.from)%3||a%3))){l=b;break}}if(!l)continue;let u=r.type.resolve,d=[],f=l.from,h=r.to;if(s){let b=Math.min(2,l.to-l.from,a);f=l.to-b,h=r.from+b,u=b==1?"Emphasis":"StrongEmphasis"}l.type.mark&&d.push(this.elt(l.type.mark,f,l.to));for(let b=c+1;b=0;n--){let i=this.parts[n];if(i instanceof Vl&&i.type==t&&i.side&1)return n}return null}takeContent(t){let n=this.resolveMarkers(t);return this.parts.length=t,n}getDelimiterAt(t){let n=this.parts[t];return n instanceof Vl?n:null}skipSpace(t){return Vw(this.text,t-this.offset)+this.offset}elt(t,n,i,r){return typeof t=="string"?Ui(this.parser.getNodeType(t),n,i,r):new XAe(t,n)}}OQ.linkStart=jg;OQ.imageStart=VN;function X$(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),i=0;for(let r of t){for(;i(t?t-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=` -`;)s--;this.fragmentEnd=s?s-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=t+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(t){let n=this.cursor.tree;return n&&n.prop(Pn.contextHash)==t}takeNodes(t){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),s=t.absoluteLineStart,a=s,l=t.block.children.length,c=a,u=l;for(;;){if(n.to-i>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let d=n_e(n.from-i,t.ranges);if(n.to-i<=t.ranges[t.rangeI].to)t.addNode(n.tree,d);else{let f=new gi(t.parser.nodeSet.types[Ct.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(f,n.tree),t.addNode(f,d)}if(n.type.is("Block")&&(L_t.indexOf(n.type.id)<0?(a=n.to-i,l=t.block.children.length):(a=c,l=u),c=n.to-i,u=t.block.children.length),!n.nextSibling())break}for(;t.block.children.length>l;)t.block.children.pop(),t.block.positions.pop();return a-s}}function n_e(e,t){let n=e;for(let i=1;io2[e]),Object.keys(o2).map(e=>qAe[e]),Object.keys(o2),I_t,LAe,Object.keys(E5).map(e=>E5[e]),Object.keys(E5),[]);function U_t(e,t,n){let i=[];for(let r=e.firstChild,s=t;;r=r.nextSibling){let a=r?r.from:n;if(a>s&&i.push({from:s,to:a}),!r)break;s=r.to}return i}function Q_t(e){let{codeParser:t,htmlParser:n}=e;return{wrap:bTe((r,s)=>{let a=r.type.id;if(t&&(a==Ct.CodeBlock||a==Ct.FencedCode)){let l="";if(a==Ct.FencedCode){let u=r.node.getChild(Ct.CodeInfo);u&&(l=s.read(u.from,u.to))}let c=t(l);if(c)return{parser:c,overlay:u=>u.type.id==Ct.CodeText,bracketed:a==Ct.FencedCode}}else if(n&&(a==Ct.HTMLBlock||a==Ct.HTMLTag||a==Ct.CommentBlock))return{parser:n,overlay:U_t(r.node,r.from,r.to)};return null})}}const z_t={resolve:"Strikethrough",mark:"StrikethroughMark"},V_t={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":ne.strikethrough}},{name:"StrikethroughMark",style:ne.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let i=e.slice(n-1,n),r=e.slice(n+2,n+3),s=/\s|^$/.test(i),a=/\s|^$/.test(r),l=dk.test(i),c=dk.test(r);return e.addDelimiter(z_t,n,n+2,!a&&(!c||s||l),!s&&(!l||a||c))},after:"Emphasis"}]};function Hw(e,t,n=0,i,r=0){let s=0,a=!0,l=-1,c=-1,u=!1,d=()=>{i.push(e.elt("TableCell",r+l,r+c,e.parser.parseInline(t.slice(l,c),r+l)))};for(let f=n;f-1)&&s++,a=!1,i&&(l>-1&&d(),i.push(e.elt("TableDelimiter",f+r,f+r+1))),l=c=-1):(u||h!=32&&h!=9)&&(l<0&&(l=f),c=f+1),u=!u&&h==92}return l>-1&&(s++,i&&d()),s}function GJ(e,t){for(let n=t;n\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class XJ{constructor(){this.rows=null}nextLine(t,n,i){if(this.rows==null){this.rows=!1;let r;if((n.next==45||n.next==58||n.next==124)&&i_e.test(r=n.text.slice(n.pos))){let s=[];Hw(t,i.content,0,s,i.start)==Hw(t,r,0)&&(this.rows=[t.elt("TableHeader",i.start,i.start+i.content.length,s),t.elt("TableDelimiter",t.lineStart+n.pos,t.lineStart+n.text.length)])}}else if(this.rows){let r=[];Hw(t,n.text,n.pos,r,t.lineStart),this.rows.push(t.elt("TableRow",t.lineStart+n.pos,t.lineStart+n.text.length,r))}return!1}finish(t,n){return this.rows?(t.addLeafElement(n,t.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const H_t={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":ne.heading}},"TableRow",{name:"TableCell",style:ne.content},{name:"TableDelimiter",style:ne.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return GJ(t.content,0)?new XJ:null},endLeaf(e,t,n){if(n.parsers.some(r=>r instanceof XJ)||!GJ(t.text,t.basePos))return!1;let i=e.peekLine();return i_e.test(i)&&Hw(e,t.text,t.basePos)==Hw(e,i,t.basePos)},before:"SetextHeading"}]};class q_t{nextLine(){return!1}finish(t,n){return t.addLeafElement(n,t.elt("Task",n.start,n.start+n.content.length,[t.elt("TaskMarker",n.start,n.start+3),...t.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const W_t={defineNodes:[{name:"Task",block:!0,style:ne.list},{name:"TaskMarker",style:ne.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new q_t:null},after:"SetextHeading"}]},YJ=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,ZJ=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,K_t=/[\w-]+\.[\w-]+($|[/:])/,JJ=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,eee=/\/[a-zA-Z\d@.]+/gy;function tee(e,t,n,i){let r=0;for(let s=t;s-1)return-1;let i=t+n[0].length;for(;;){let r=e[i-1],s;if(/[?!.,:*_~]/.test(r)||r==")"&&tee(e,t,i,")")>tee(e,t,i,"("))i--;else if(r==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,i))))i=t+s.index;else break}return i}function nee(e,t){JJ.lastIndex=t;let n=JJ.exec(e);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:t+n[0].length-(i=="."?1:0)}const X_t={parseInline:[{name:"Autolink",parse(e,t,n){let i=n-e.offset;if(i&&/\w/.test(e.text[i-1]))return-1;YJ.lastIndex=i;let r=YJ.exec(e.text),s=-1;if(!r)return-1;if(r[1]||r[2]){if(s=G_t(e.text,i+r[0].length),s>-1&&e.hasOpenLink){let a=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(i,s));s=i+a[0].length}}else r[3]?s=nee(e.text,i):(s=nee(e.text,i+r[0].length),s>-1&&r[0]=="xmpp:"&&(eee.lastIndex=s,r=eee.exec(e.text),r&&(s=r.index+r[0].length)));return s<0?-1:(e.addElement(e.elt("URL",n,s+e.offset)),s+e.offset)}}]},Y_t=[H_t,W_t,V_t,X_t];function r_e(e,t,n){return(i,r,s)=>{if(r!=e||i.char(s+1)==e)return-1;let a=[i.elt(n,s,s+1)];for(let l=s+1;l=65&&e<=90||e==95||e>=97&&e<=122||e>=161}let aee=null,oee=null,lee=0;function Z$(e,t){let n=e.pos+t;if(lee==n&&oee==e)return aee;let i=e.peek(t),r="";for(;kNt(i);)r+=String.fromCharCode(i),i=e.peek(++t);return oee=e,lee=n,aee=r?r.toLowerCase():i==ENt||i==CNt?void 0:null}const f_e=60,HN=62,SQ=47,ENt=63,CNt=33,TNt=45;function cee(e,t){this.name=e,this.parent=t}const ANt=[wQ,l_e,s_e,a_e,o_e],_Nt=new wI({start:null,shift(e,t,n,i){return ANt.indexOf(t)>-1?new cee(Z$(i,1)||"",e):e},reduce(e,t){return t==c_e&&e?e.parent:e},reuse(e,t,n,i){let r=t.type.id;return r==wQ||r==yNt?new cee(Z$(i,1)||"",e):e},strict:!1}),NNt=new qs((e,t)=>{if(e.next!=f_e){e.next<0&&t.context&&e.acceptToken(C5);return}e.advance();let n=e.next==SQ;n&&e.advance();let i=Z$(e,0);if(i===void 0)return;if(!i)return e.acceptToken(n?fNt:dNt);let r=t.context?t.context.name:null;if(n){if(i==r)return e.acceptToken(lNt);if(r&&SNt[r])return e.acceptToken(C5,-2);if(t.dialectEnabled(xNt))return e.acceptToken(cNt);for(let s=t.context;s;s=s.parent)if(s.name==i)return;e.acceptToken(uNt)}else{if(i=="script")return e.acceptToken(s_e);if(i=="style")return e.acceptToken(a_e);if(i=="textarea")return e.acceptToken(o_e);if(wNt.hasOwnProperty(i))return e.acceptToken(l_e);r&&see[r]&&see[r][i]?e.acceptToken(C5,-1):e.acceptToken(wQ)}},{contextual:!0}),jNt=new qs(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(ree);break}if(e.next==TNt)t++;else if(e.next==HN&&t>=2){n>=3&&e.acceptToken(ree,-2);break}else t=0;e.advance()}});function RNt(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const INt=new qs((e,t)=>{if(e.next==SQ&&e.peek(1)==HN){let n=t.dialectEnabled(ONt)||RNt(t.context);e.acceptToken(n?oNt:iee,2)}else e.next==HN&&e.acceptToken(iee,1)});function kQ(e,t,n){let i=2+e.length;return new qs(r=>{for(let s=0,a=0,l=0;;l++){if(r.next<0){l&&r.acceptToken(t);break}if(s==0&&r.next==f_e||s==1&&r.next==SQ||s>=2&&sa?r.acceptToken(t,-a):r.acceptToken(n,-(a-2));break}else if((r.next==10||r.next==13)&&l){r.acceptToken(t,1);break}else s=a=0;r.advance()}})}const PNt=kQ("script",tNt,nNt),DNt=kQ("style",iNt,rNt),MNt=kQ("textarea",sNt,aNt),LNt=Yh({"Text RawText IncompleteTag IncompleteCloseTag":ne.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":ne.angleBracket,TagName:ne.tagName,"MismatchedCloseTag/TagName":[ne.tagName,ne.invalid],AttributeName:ne.attributeName,"AttributeValue UnquotedAttributeValue":ne.attributeValue,Is:ne.definitionOperator,"EntityReference CharacterReference":ne.character,Comment:ne.blockComment,ProcessingInst:ne.processingInstruction,DoctypeDecl:ne.documentMeta}),$Nt=Fh.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:_Nt,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[LNt],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let u=l.type.id;if(u==mNt)return T5(l,c,n);if(u==gNt)return T5(l,c,i);if(u==bNt)return T5(l,c,r);if(u==c_e&&s.length){let d=l.node,f=d.firstChild,h=f&&uee(f,c),p;if(h){for(let g of s)if(g.tag==h&&(!g.attrs||g.attrs(p||(p=h_e(f,c))))){let b=d.lastChild,v=b.type.id==vNt?b.from:d.to;if(v>f.to)return{parser:g.parser,overlay:[{from:f.to,to:v}]}}}}if(a&&u==u_e){let d=l.node,f;if(f=d.firstChild){let h=a[c.read(f.from,f.to)];if(h)for(let p of h){if(p.tagName&&p.tagName!=uee(d.parent,c))continue;let g=d.lastChild;if(g.type.id==Y$){let b=g.from+1,v=g.lastChild,y=g.to-(v&&v.isError?0:1);if(y>b)return{parser:p.parser,overlay:[{from:b,to:y}],bracketed:!0}}else if(g.type.id==d_e)return{parser:p.parser,overlay:[{from:g.from,to:g.to}]}}}}return null})}const FNt=145,dee=1,BNt=146,UNt=147,m_e=2,QNt=148,zNt=3,VNt=4,g_e=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],HNt=58,qNt=40,b_e=95,WNt=91,NA=45,KNt=46,GNt=35,XNt=37,YNt=38,ZNt=92,JNt=10,ejt=42;function fk(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function EQ(e){return e>=48&&e<=57}function fee(e){return EQ(e)||e>=97&&e<=102||e>=65&&e<=70}const y_e=(e,t,n)=>(i,r)=>{for(let s=!1,a=0,l=0;;l++){let{next:c}=i;if(fk(c)||c==NA||c==b_e||s&&EQ(c))!s&&(c!=NA||l>0)&&(s=!0),a===l&&c==NA&&a++,i.advance();else if(c==ZNt&&i.peek(1)!=JNt){if(i.advance(),fee(i.next)){do i.advance();while(fee(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();s=!0}else{s&&i.acceptToken(a==2&&r.canShift(m_e)?t:c==qNt?n:e);break}}},tjt=new qs(y_e(BNt,m_e,UNt),{contextual:!0}),njt=new qs(y_e(QNt,zNt,VNt),{contextual:!0}),ijt=new qs(e=>{if(g_e.includes(e.peek(-1))){let{next:t}=e;(fk(t)||t==b_e||t==GNt||t==KNt||t==ejt||t==WNt||t==HNt&&fk(e.peek(1))||t==NA||t==YNt)&&e.acceptToken(FNt)}}),rjt=new qs(e=>{if(!g_e.includes(e.peek(-1))){let{next:t}=e;if(t==XNt&&(e.advance(),e.acceptToken(dee)),fk(t)){do e.advance();while(fk(e.next)||EQ(e.next));e.acceptToken(dee)}}}),sjt=Yh({"AtKeyword import charset namespace keyframes media supports font-feature-values":ne.definitionKeyword,"from to selector scope MatchFlag":ne.keyword,NamespaceName:ne.namespace,KeyframeName:ne.labelName,KeyframeRangeName:ne.operatorKeyword,TagName:ne.tagName,ClassName:ne.className,PseudoClassName:ne.constant(ne.className),IdName:ne.labelName,"FeatureName PropertyName":ne.propertyName,AttributeName:ne.attributeName,NumberLiteral:ne.number,KeywordQuery:ne.keyword,UnaryQueryOp:ne.operatorKeyword,"CallTag ValueName FontName":ne.atom,VariableName:ne.variableName,Callee:ne.operatorKeyword,Unit:ne.unit,"UniversalSelector NestingSelector":ne.definitionOperator,"MatchOp CompareOp":ne.compareOperator,"ChildOp SiblingOp, LogicOp":ne.logicOperator,BinOp:ne.arithmeticOperator,Important:ne.modifier,Comment:ne.blockComment,ColorLiteral:ne.color,"ParenthesizedContent StringLiteral":ne.string,":":ne.punctuation,"PseudoOp #":ne.derefOperator,"; , |":ne.separator,"( )":ne.paren,"[ ]":ne.squareBracket,"{ }":ne.brace}),ajt={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:152,"url-prefix":152,domain:152,regexp:152},ojt={__proto__:null,or:104,and:104,not:112,only:112,layer:206},ljt={__proto__:null,selector:118,style:124,layer:202},cjt={__proto__:null,"@import":198,"@media":210,"@charset":214,"@namespace":218,"@keyframes":224,"@supports":236,"@scope":240,"@font-feature-values":246},ujt={__proto__:null,to:243},djt=Fh.deserialize({version:14,states:"MlQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FnO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#EOO'dQdO'#EQO'oQdO'#EXO'oQdO'#E[OOQP'#Fn'#FnO)RQhO'#E}OOQS'#Fm'#FmOOQS'#FQ'#FQQYQdOOO)YQdO'#EbO*iQhO'#EhO)YQdO'#EjO*pQdO'#ElO*{QdO'#EoO)}QhO'#EuO+TQdO'#EwO+`QdO'#EzO+eQaO'#CfO+lQ`O'#E_O+qQ`O'#F{O+|QdO'#F{QOQ`OOP,WO&jO'#CaPOOO)CA])CA]OOQP'#Ci'#CiOOQP,59R,59RO%VQdO,59ROOQP'#Cm'#CmOOQP,59V,59VO&XQdO,59VO,cQdO,59YO'_QdO,5:jO'dQdO,5:lO'oQdO,5:sO'oQdO,5:uO'oQdO,5:vO'oQdO'#FXO,nQ`O,58}O,vQdO'#E^OOQS,58},58}OOQP'#Cq'#CqOOQO'#D|'#D|OOQP,59Y,59YO,}Q`O,59YO-SQ`O,59YOOQP'#EP'#EPOOQP,5:j,5:jO-XQpO'#ERO-dQdO'#ESO-iQ`O'#ESO-nQpO,5:lO.XQaO,5:sO.oQaO,5:vOOQW'#D^'#D^O/nQhO'#DgO0RQhO,5;iO)}QhO'#DeO0`Q`O'#DnO0eQhO'#DxOOQW'#Ft'#FtOOQS,5;i,5;iO0jQ`O'#DhO0oQ`O'#DkOOQS-E9O-E9OOOQ['#Cv'#CvO0tQdO'#CwO1[QdO'#C}O1rQdO'#DQO2YQ!pO'#DSO4fQ!jO,5:|OOQO'#DX'#DXO-SQ`O'#DWO4vQ!nO'#FqO6|Q`O'#DYO7RQ`O'#DyOOQ['#Fq'#FqO7WQhO'#GOO7fQ`O,5;SO7kQ!bO,5;UOOQS'#En'#EnO7sQ`O,5;WO7xQdO,5;WOOQO'#Eq'#EqO8QQ`O,5;ZO8VQhO,5;aO'oQdO'#DjOOQS,5;c,5;cO0jQ`O,5;cO8_QdO,5;cOOQS'#F`'#F`O8gQdO'#E|O7fQ`O,5;fO8oQdO,5:yO9PQdO'#FZO9^Q`O,5lQhO'#DoOOQW,5:Y,5:YOOQW,5:d,5:dOOQW,5:S,5:SO>vQhO,5:VO?bQ!fO'#FrOOQS'#Fr'#FrOOQS'#FS'#FSO@rQdO,59cOOQ[,59c,59cOAYQdO,59iOOQ[,59i,59iOApQdO,59lOOQ[,59l,59lOOQ[,59n,59nO)YQdO,59pOBWQhO'#EdOOQW'#Ed'#EdOBuQ`O1G0hO4oQhO1G0hOOQ[,59r,59rO)}QhO'#D[OOQ[,59t,59tOBzQ#tO,5:eOCVQhO'#F]OCdQ`O,5vQhO'#DmOI_QhO'#DqOIgQhO'#DsOIlQhO'#FwOOQO'#Fw'#FwOItQ!bO'#DwOOQO'#Fy'#FyOOQO'#Fv'#FvOIyQ`O1G/qOOQS-E9Q-E9QOOQ[1G.}1G.}OOQ[1G/T1G/TOOQ[1G/W1G/WOOQ[1G/[1G/[OJOQdO,5;OOOQS7+&S7+&SOJTQ`O7+&SOJYQhO'#D]OJbQ`O,59vO)}QhO,59vOOQ[1G0P1G0POJjQ`O1G0POJoQhO,5;wOOQO-E9Z-E9ZOOQS7+&^7+&^OJ}QbO'#DSOOQO'#Et'#EtOK]Q`O'#EsOOQO'#Es'#EsOKhQ`O'#F^OKpQdO,5;^OOQS,5;^,5;^OOQ[1G/p1G/pOOQS7+&i7+&iO7fQ`O7+&iOK{Q!fO'#FYO)YQdO'#FYOMSQdO7+&POOQO7+&P7+&POOQO,5:{,5:{OOQO1G1a1G1aOMgQ!bO<vQhO'#DrOOQO,5:],5:]O! hQhO,5:_OGUQhO,5:cOOQW7+%]7+%]OOQO'#Ef'#EfO! pQ`O1G0jOOQS<xAN>xO!#zQ`OAN>xO!$PQaO,5;rOOQO-E9U-E9UO!$ZQdO,5;qOOQO-E9T-E9TOOQW<vQhO'#DuOOQO1G/y1G/yO!%vQ!bO1G/}OJOQdO'#F[O!&OQ`O7+&UOOQW7+&U7+&UO!&WQ!bO1G/cOOQ[7+$|7+$|O!&cQhO7+$|P!&jQ`O'#FTOOQO,5;y,5;yOOQO-E9]-E9]OOQS1G1d1G1dOOQPG24dG24dO!&oQ`OAN>ZO)YQdO1G1[O!&tQ`O7+'jOOQO1G/x1G/xO!&|Q`O,5:aO!$eQhO7+%iOOQO,5;v,5;vOOQO-E9Y-E9YOOQW<Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!o`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$[~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%j~'yh$[~!o`OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%jj)jS$qYOy%jz;'S%j;'S;=`%{<%lO%j~)yWOY)vZr)vrs*cs#O)v#O#P*h#P;'S)v;'S;=`+d<%lO)v~*hOw~~*kRO;'S)v;'S;=`*t;=`O)v~*wXOY)vZr)vrs*cs#O)v#O#P*h#P;'S)v;'S;=`+d;=`<%l)v<%lO)v~+gP;=`<%l)vj+oYmYOy%jz!Q%j!Q![,_![!c%j!c!i,_!i#T%j#T#Z,_#Z;'S%j;'S;=`%{<%lO%jj,dY!o`Oy%jz!Q%j!Q![-S![!c%j!c!i-S!i#T%j#T#Z-S#Z;'S%j;'S;=`%{<%lO%jj-XY!o`Oy%jz!Q%j!Q![-w![!c%j!c!i-w!i#T%j#T#Z-w#Z;'S%j;'S;=`%{<%lO%jj.OYuY!o`Oy%jz!Q%j!Q![.n![!c%j!c!i.n!i#T%j#T#Z.n#Z;'S%j;'S;=`%{<%lO%jj.uYuY!o`Oy%jz!Q%j!Q![/e![!c%j!c!i/e!i#T%j#T#Z/e#Z;'S%j;'S;=`%{<%lO%jj/jY!o`Oy%jz!Q%j!Q![0Y![!c%j!c!i0Y!i#T%j#T#Z0Y#Z;'S%j;'S;=`%{<%lO%jj0aYuY!o`Oy%jz!Q%j!Q![1P![!c%j!c!i1P!i#T%j#T#Z1P#Z;'S%j;'S;=`%{<%lO%jj1UY!o`Oy%jz!Q%j!Q![1t![!c%j!c!i1t!i#T%j#T#Z1t#Z;'S%j;'S;=`%{<%lO%jj1{SuY!o`Oy%jz;'S%j;'S;=`%{<%lO%jd2[UOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jd2uS!yS!o`Oy%jz;'S%j;'S;=`%{<%lO%jb3WS^QOy%jz;'S%j;'S;=`%{<%lO%j~3gWOY3dZw3dwx*cx#O3d#O#P4P#P;'S3d;'S;=`4{<%lO3d~4SRO;'S3d;'S;=`4];=`O3d~4`XOY3dZw3dwx*cx#O3d#O#P4P#P;'S3d;'S;=`4{;=`<%l3d<%lO3d~5OP;=`<%l3dj5WShYOy%jz;'S%j;'S;=`%{<%lO%j~5iOg~n5pUWQyWOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jj6ZWyW#PQOy%jz!O%j!O!P6s!P!Q%j!Q![9x![;'S%j;'S;=`%{<%lO%jj6xU!o`Oy%jz!Q%j!Q![7[![;'S%j;'S;=`%{<%lO%jj7cY!o`$gYOy%jz!Q%j!Q![7[![!g%j!g!h8R!h#X%j#X#Y8R#Y;'S%j;'S;=`%{<%lO%jj8WY!o`Oy%jz{%j{|8v|}%j}!O8v!O!Q%j!Q![9_![;'S%j;'S;=`%{<%lO%jj8{U!o`Oy%jz!Q%j!Q![9_![;'S%j;'S;=`%{<%lO%jj9fU!o`$gYOy%jz!Q%j!Q![9_![;'S%j;'S;=`%{<%lO%jj:P[!o`$gYOy%jz!O%j!O!P7[!P!Q%j!Q![9x![!g%j!g!h8R!h#X%j#X#Y8R#Y;'S%j;'S;=`%{<%lO%jj:zS!dYOy%jz;'S%j;'S;=`%{<%lO%jj;]WyWOy%jz!O%j!O!P6s!P!Q%j!Q![9x![;'S%j;'S;=`%{<%lO%jj;zU`YOy%jz!Q%j!Q![7[![;'S%j;'S;=`%{<%lO%j~VUcYOy%jz![%j![!]>i!];'S%j;'S;=`%{<%lO%jj>pSdY!o`Oy%jz;'S%j;'S;=`%{<%lO%jj?RSnYOy%jz;'S%j;'S;=`%{<%lO%jh?dU!WWOy%jz!_%j!_!`?v!`;'S%j;'S;=`%{<%lO%jh?}S!WW!o`Oy%jz;'S%j;'S;=`%{<%lO%jl@bS!WW!ySOy%jz;'S%j;'S;=`%{<%lO%jj@uV!|Q!WWOy%jz!_%j!_!`?v!`!aA[!a;'S%j;'S;=`%{<%lO%jbAcS!|Q!o`Oy%jz;'S%j;'S;=`%{<%lO%jjArYOy%jz}%j}!OBb!O!c%j!c!}CP!}#T%j#T#oCP#o;'S%j;'S;=`%{<%lO%jjBgW!o`Oy%jz!c%j!c!}CP!}#T%j#T#oCP#o;'S%j;'S;=`%{<%lO%jjCW[lY!o`Oy%jz}%j}!OCP!O!Q%j!Q![CP![!c%j!c!}CP!}#T%j#T#oCP#o;'S%j;'S;=`%{<%lO%jhDRS!zWOy%jz;'S%j;'S;=`%{<%lO%jjDdSpYOy%jz;'S%j;'S;=`%{<%lO%jnDuSo^Oy%jz;'S%j;'S;=`%{<%lO%jjEWU!zWOy%jz#a%j#a#bEj#b;'S%j;'S;=`%{<%lO%jbEoU!o`Oy%jz#d%j#d#eFR#e;'S%j;'S;=`%{<%lO%jbFWU!o`Oy%jz#c%j#c#dFj#d;'S%j;'S;=`%{<%lO%jbFoU!o`Oy%jz#f%j#f#gGR#g;'S%j;'S;=`%{<%lO%jbGWU!o`Oy%jz#h%j#h#iGj#i;'S%j;'S;=`%{<%lO%jbGoU!o`Oy%jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!o`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!o`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$pQ!o`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$cUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU#PQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[ijt,rjt,tjt,njt,1,2,3,4,new BN("m~RRYZ[z{a~~g~aO$_~~dP!P!Qg~lO$`~~",28,152)],topRules:{StyleSheet:[0,6],Styles:[1,126]},dynamicPrecedences:{94:1},specialized:[{term:147,get:e=>ajt[e]||-1},{term:148,get:e=>ojt[e]||-1},{term:4,get:e=>ljt[e]||-1},{term:28,get:e=>cjt[e]||-1},{term:146,get:e=>ujt[e]||-1}],tokenPrec:2405});let A5=null;function _5(){if(!A5&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let i in e)i!="cssText"&&i!="cssFloat"&&typeof e[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(t.push(i),n.add(i)));A5=t.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return A5||[]}const hee=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),pee=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),fjt=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),hjt=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),Cf=/^(\w[\w-]*|-\w[\w-]*|)$/,pjt=/^-(-[\w-]*)?$/;function mjt(e,t){var n;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let i=(n=e.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:t.sliceString(i.from,i.to)=="var"}const mee=new MU,gjt=["Declaration"];function bjt(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function v_e(e,t,n){if(t.to-t.from>4096){let i=mee.get(t);if(i)return i;let r=[],s=new Set,a=t.cursor(tr.IncludeAnonymous);if(a.firstChild())do for(let l of v_e(e,a.node,n))s.has(l.label)||(s.add(l.label),r.push(l));while(a.nextSibling());return mee.set(t,r),r}else{let i=[],r=new Set;return t.cursor().iterate(s=>{var a;if(n(s)&&s.matchContext(gjt)&&((a=s.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let l=e.sliceString(s.from,s.to);r.has(l)||(r.add(l),i.push({label:l,type:"variable"}))}}),i}}const yjt=e=>t=>{let{state:n,pos:i}=t,r=wr(n).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:_5(),validFor:Cf};if(r.name=="ValueName")return{from:r.from,options:pee,validFor:Cf};if(r.name=="PseudoClassName")return{from:r.from,options:hee,validFor:Cf};if(e(r)||(t.explicit||s)&&mjt(r,n.doc))return{from:e(r)||s?r.from:i,options:v_e(n.doc,bjt(r),e),validFor:pjt};if(r.name=="TagName"){for(let{parent:c}=r;c;c=c.parent)if(c.name=="Block")return{from:r.from,options:_5(),validFor:Cf};return{from:r.from,options:fjt,validFor:Cf}}if(r.name=="AtKeyword")return{from:r.from,options:hjt,validFor:Cf};if(!t.explicit)return null;let a=r.resolve(i),l=a.childBefore(i);return l&&l.name==":"&&a.name=="PseudoClassSelector"?{from:i,options:hee,validFor:Cf}:l&&l.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:i,options:pee,validFor:Cf}:a.name=="Block"||a.name=="Styles"?{from:i,options:_5(),validFor:Cf}:null},vjt=yjt(e=>e.name=="VariableName"),qN=$h.define({name:"css",parser:djt.configure({props:[Zh.add({Declaration:hv()}),Jh.add({"Block KeyframeList":DE})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function xjt(){return new Dm(qN,qN.data.of({autocomplete:vjt}))}const sO=["_blank","_self","_top","_parent"],N5=["ascii","utf-8","utf-16","latin1","latin1"],j5=["get","post","put","delete"],R5=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Dl=["true","false"],fn={},Ojt={a:{attrs:{href:null,ping:null,type:null,media:null,target:sO,hreflang:null}},abbr:fn,address:fn,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:fn,aside:fn,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:fn,base:{attrs:{href:null,target:sO}},bdi:fn,bdo:fn,blockquote:{attrs:{cite:null}},body:fn,br:fn,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:R5,formmethod:j5,formnovalidate:["novalidate"],formtarget:sO,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:fn,center:fn,cite:fn,code:fn,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:fn,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:fn,div:fn,dl:fn,dt:fn,em:fn,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:fn,figure:fn,footer:fn,form:{attrs:{action:null,name:null,"accept-charset":N5,autocomplete:["on","off"],enctype:R5,method:j5,novalidate:["novalidate"],target:sO}},h1:fn,h2:fn,h3:fn,h4:fn,h5:fn,h6:fn,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:fn,hgroup:fn,hr:fn,html:{attrs:{manifest:null}},i:fn,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:R5,formmethod:j5,formnovalidate:["novalidate"],formtarget:sO,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:fn,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:fn,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:fn,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:N5,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:fn,noscript:fn,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:fn,param:{attrs:{name:null,value:null}},pre:fn,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:fn,rt:fn,ruby:fn,samp:fn,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:N5}},section:fn,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:fn,source:{attrs:{src:null,type:null,media:null}},span:fn,strong:fn,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:fn,summary:fn,sup:fn,table:fn,tbody:fn,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:fn,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:fn,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:fn,time:{attrs:{datetime:null}},title:fn,tr:fn,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:fn,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:fn},x_e={accesskey:null,class:null,contenteditable:Dl,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Dl,autocorrect:Dl,autocapitalize:Dl,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Dl,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Dl,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Dl,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Dl,"aria-hidden":Dl,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Dl,"aria-multiselectable":Dl,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Dl,"aria-relevant":null,"aria-required":Dl,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},O_e="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of O_e)x_e[e]=null;class hk{constructor(t,n){this.tags={...Ojt,...t},this.globalAttrs={...x_e,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}hk.default=new hk;function ux(e,t,n=e.length){if(!t)return"";let i=t.firstChild,r=i&&i.getChild("TagName");return r?e.sliceString(r.from,Math.min(r.to,n)):""}function dx(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function w_e(e,t,n){let i=n.tags[ux(e,dx(t))];return(i==null?void 0:i.children)||n.allTags}function CQ(e,t){let n=[];for(let i=dx(t);i&&!i.type.isTop;i=dx(i.parent)){let r=ux(e,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(t.name=="EndTag"||t.from>=i.firstChild.to)&&n.push(r)}return n}const S_e=/^[:\-\.\w\u00b7-\uffff]*$/;function gee(e,t,n,i,r){let s=/\s*>/.test(e.sliceDoc(r,r+5))?"":">",a=dx(n,n.name=="StartTag"||n.name=="TagName");return{from:i,to:r,options:w_e(e.doc,a,t).map(l=>({label:l,type:"type"})).concat(CQ(e.doc,n).map((l,c)=>({label:"/"+l,apply:"/"+l+s,type:"type",boost:99-c}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function bee(e,t,n,i){let r=/\s*>/.test(e.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:CQ(e.doc,t).map((s,a)=>({label:s,apply:s+r,type:"type",boost:99-a})),validFor:S_e}}function wjt(e,t,n,i){let r=[],s=0;for(let a of w_e(e.doc,n,t))r.push({label:"<"+a,type:"type"});for(let a of CQ(e.doc,n))r.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Sjt(e,t,n,i,r){let s=dx(n),a=s?t.tags[ux(e.doc,s)]:null,l=a&&a.attrs?Object.keys(a.attrs):[],c=a&&a.globalAttrs===!1?l:l.length?l.concat(t.globalAttrNames):t.globalAttrNames;return{from:i,to:r,options:c.map(u=>({label:u,type:"property"})),validFor:S_e}}function kjt(e,t,n,i,r){var s;let a=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),l=[],c;if(a){let u=e.sliceDoc(a.from,a.to),d=t.globalAttrs[u];if(!d){let f=dx(n),h=f?t.tags[ux(e.doc,f)]:null;d=(h==null?void 0:h.attrs)&&h.attrs[u]}if(d){let f=e.sliceDoc(i,r).toLowerCase(),h='"',p='"';/^['"]/.test(f)?(c=f[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",p=e.sliceDoc(r,r+1)==f[0]?"":f[0],f=f.slice(1),i++):c=/^[^\s<>='"]*$/;for(let g of d)l.push({label:g,apply:h+g+p,type:"constant"})}}return{from:i,to:r,options:l,validFor:c}}function k_e(e,t){let{state:n,pos:i}=t,r=wr(n).resolveInner(i,-1),s=r.resolve(i);for(let a=i,l;s==r&&(l=r.childBefore(a));){let c=l.lastChild;if(!c||!c.type.isError||c.fromk_e(i,r)}const Tjt=zd.parser.configure({top:"SingleExpression"}),E_e=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:RAe.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:IAe.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:PAe.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:Tjt},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:zd.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:qN.parser}],C_e=[{name:"style",parser:qN.parser.configure({top:"Styles"})}].concat(O_e.map(e=>({name:e,parser:zd.parser}))),T_e=$h.define({name:"html",parser:$Nt.configure({props:[Zh.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].lengthe.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),jA=T_e.configure({wrap:p_e(E_e,C_e)});function Ajt(e={}){let t="",n;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=p_e((e.nestedLanguages||[]).concat(E_e),(e.nestedAttributes||[]).concat(C_e)));let i=n?T_e.configure({wrap:n,dialect:t}):t?jA.configure({dialect:t}):jA;return new Dm(i,[jA.data.of({autocomplete:Cjt(e)}),e.autoCloseTags!==!1?_jt:[],q$().support,xjt().support])}const yee=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),_jt=Pt.inputHandler.of((e,t,n,i,r)=>{if(e.composing||e.state.readOnly||t!=n||i!=">"&&i!="/"||!jA.isActiveAt(e.state,t,-1))return!1;let s=r(),{state:a}=s,l=a.changeByRange(c=>{var u,d,f;let h=a.doc.sliceString(c.from-1,c.to)==i,{head:p}=c,g=wr(a).resolveInner(p,-1),b;if(h&&i==">"&&g.name=="EndTag"){let v=g.parent;if(((d=(u=v.parent)===null||u===void 0?void 0:u.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(b=ux(a.doc,v.parent,p))&&!yee.has(b)){let y=p+(a.doc.sliceString(p,p+1)===">"?1:0),x=``;return{range:c,changes:{from:p,to:y,insert:x}}}}else if(h&&i=="/"&&g.name=="IncompleteCloseTag"){let v=g.parent;if(g.from==p-2&&((f=v.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(b=ux(a.doc,v,p))&&!yee.has(b)){let y=p+(a.doc.sliceString(p,p+1)===">"?1:0),x=`${b}>`;return{range:Ze.cursor(p+x.length,-1),changes:{from:p,to:y,insert:x}}}}return{range:c}});return l.changes.empty?!1:(e.dispatch([s,a.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),A_e=vI({commentTokens:{block:{open:""}}}),__e=new Pn,N_e=B_t.configure({props:[Jh.add(e=>!e.is("Block")||e.is("Document")||J$(e)!=null||Njt(e)?void 0:(t,n)=>({from:n.doc.lineAt(t.from).to,to:t.to})),__e.add(J$),Zh.add({Document:()=>null}),Kp.add({Document:A_e})]});function J$(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Njt(e){return e.name=="OrderedList"||e.name=="BulletList"}function jjt(e,t){let n=e;for(;;){let i=n.nextSibling,r;if(!i||(r=J$(i.type))!=null&&r<=t)break;n=i}return n.to}const Rjt=G2e.of((e,t,n)=>{for(let i=wr(e).resolveInner(n,-1);i&&!(i.fromn)return{from:n,to:s}}return null});function TQ(e){return new Zl(A_e,e,[],"markdown")}const Ijt=TQ(N_e),Pjt=N_e.configure([Y_t,J_t,Z_t,eNt,{props:[Jh.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),WN=TQ(Pjt);function Djt(e,t){return n=>{if(n&&e){let i=null;if(n=/\S*/.exec(n)[0],typeof e=="function"?i=e(n):i=DN.matchLanguageName(e,n,!0),i instanceof DN)return i.support?i.support.language.parser:Rb.getSkippingParser(i.load());if(i)return i.parser}return t?t.parser:null}}let I5=class{constructor(t,n,i,r,s,a,l){this.node=t,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=s,this.type=a,this.item=l}blank(t,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(t!=null){for(;i.length0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(t,n){let i=this.node.name=="OrderedList"?String(+R_e(this.item,t)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}};function j_e(e,t){let n=[],i=[];for(let r=e;r;r=r.parent){if(r.name=="FencedCode")return i;(r.name=="ListItem"||r.name=="Blockquote")&&n.push(r)}for(let r=n.length-1;r>=0;r--){let s=n[r],a,l=t.lineAt(s.from),c=s.from-l.from;if(s.name=="Blockquote"&&(a=/^ *>( ?)/.exec(l.text.slice(c))))i.push(new I5(s,c,c+a[0].length,"",a[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(a=/^( *)\d+([.)])( *)/.exec(l.text.slice(c)))){let u=a[3],d=a[0].length;u.length>=4&&(u=u.slice(0,u.length-4),d-=4),i.push(new I5(s.parent,c,c+d,a[1],u,a[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(c)))){let u=a[4],d=a[0].length;u.length>4&&(u=u.slice(0,u.length-4),d-=4);let f=a[2];a[3]&&(f+=a[3].replace(/[xX]/," ")),i.push(new I5(s.parent,c,c+d,a[1],u,f,s))}}return i}function R_e(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function P5(e,t,n,i=0){for(let r=-1,s=e;;){if(s.name=="ListItem"){let l=R_e(s,t),c=+l[2];if(r>=0){if(c!=r+1)return;n.push({from:s.from+l[1].length,to:s.from+l[0].length,insert:String(r+2+i)})}r=c}let a=s.nextSibling;if(!a)break;s=a}}function AQ(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(i1)!=" ")return e;let i=Qu(e,4,n),r="";for(let s=i;s>0;)s>=4?(r+=" ",s-=4):(r+=" ",s--);return r+e.slice(n)}const Mjt=(e={})=>({state:t,dispatch:n})=>{let i=wr(t),{doc:r}=t,s=null,a=t.changeByRange(l=>{if(!l.empty||!WN.isActiveAt(t,l.from,-1)&&!WN.isActiveAt(t,l.from,1))return s={range:l};let c=l.from,u=r.lineAt(c),d=j_e(i.resolveInner(c,-1),r);for(;d.length&&d[d.length-1].from>c-u.from;)d.pop();if(!d.length)return s={range:l};let f=d[d.length-1];if(f.to-f.spaceAfter.length>c-u.from)return s={range:l};let h=c>=f.to-f.spaceAfter.length&&!/\S/.test(u.text.slice(f.to));if(f.item&&h){let y=f.node.firstChild,x=f.node.getChild("ListItem","ListItem");if(y.to>=c||x&&x.to0&&!/[^\s>]/.test(r.lineAt(u.from-1).text)||e.nonTightLists===!1){let w=d.length>1?d[d.length-2]:null,O,k="";w&&w.item?(O=u.from+w.from,k=w.marker(r,1)):O=u.from+(w?w.to:0);let S=[{from:O,to:c,insert:k}];return f.node.name=="OrderedList"&&P5(f.item,r,S,-2),w&&w.node.name=="OrderedList"&&P5(w.item,r,S),{range:Ze.cursor(O+k.length),changes:S}}else{let w=xee(d,t,u);return{range:Ze.cursor(c+w.length+1),changes:{from:u.from,insert:w+t.lineBreak}}}}if(f.node.name=="Blockquote"&&h&&u.from){let y=r.lineAt(u.from-1),x=/>\s*$/.exec(y.text);if(x&&x.index==f.from){let w=t.changes([{from:y.from+x.index,to:y.to},{from:u.from+f.from,to:u.to}]);return{range:l.map(w),changes:w}}}let p=[];f.node.name=="OrderedList"&&P5(f.item,r,p);let g=f.item&&f.item.from]*/.exec(u.text)[0].length>=f.to)for(let y=0,x=d.length-1;y<=x;y++)b+=y==x&&!g?d[y].marker(r,1):d[y].blank(yu.from&&/\s/.test(u.text.charAt(v-u.from-1));)v--;return b=AQ(b,t),$jt(f.node,t.doc)&&(b=xee(d,t,u)+t.lineBreak+b),p.push({from:v,to:c,insert:t.lineBreak+b}),{range:Ze.cursor(v+b.length+1),changes:p}});return s?!1:(n(t.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)},Ljt=Mjt();function vee(e){return e.name=="QuoteMark"||e.name=="ListMark"}function $jt(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let n=e.firstChild,i=e.getChild("ListItem","ListItem");if(!i)return!1;let r=t.lineAt(n.to),s=t.lineAt(i.from),a=/^[\s>]*$/.test(r.text);return r.number+(a?0:1){let n=wr(e),i=null,r=e.changeByRange(s=>{let a=s.from,{doc:l}=e;if(s.empty&&WN.isActiveAt(e,s.from)){let c=l.lineAt(a),u=j_e(Fjt(n,a),l);if(u.length){let d=u[u.length-1],f=d.to-d.spaceAfter.length+(d.spaceAfter?1:0);if(a-c.from>f&&!/\S/.test(c.text.slice(f,a-c.from)))return{range:Ze.cursor(c.from+f),changes:{from:c.from+f,to:a}};if(a-c.from==f&&(d.item&&c.from<=d.item.from||/^[\s>]*$/.test(c.text.slice(0,d.to)))){let h=c.from+d.from;if(d.item&&d.node.from{var n;let{main:i}=t.state.selection;if(i.empty)return!1;let r=(n=e.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r="https://"+r),!WN.isActiveAt(t.state,i.from,1)))return!1;let s=wr(t.state),a=!1;return s.iterate({from:i.from,to:i.to,enter:l=>{(l.from>i.from||Hjt.test(l.name))&&(a=!0)},leave:l=>{l.to=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}const qRt=new qs((e,t)=>{let n;if(e.next<0)e.acceptToken(Xjt);else if(t.context.flags&RA)M5(e.next)&&e.acceptToken(Gjt,1);else if(((n=e.peek(-1))<0||M5(n))&&t.canShift(Oee)){let i=0;for(;e.next==_Q||e.next==EI;)e.advance(),i++;(e.next==Db||e.next==pk||e.next==NQ)&&e.acceptToken(Oee,-i)}else M5(e.next)&&e.acceptToken(Kjt,1)},{contextual:!0}),WRt=new qs((e,t)=>{let n=t.context;if(n.flags)return;let i=e.peek(-1);if(i==Db||i==pk){let r=0,s=0;for(;;){if(e.next==_Q)r++;else if(e.next==EI)r+=8-r%8;else break;e.advance(),s++}r!=n.indent&&e.next!=Db&&e.next!=pk&&e.next!=NQ&&(r[e,t|B_e])),XRt=new wI({start:KRt,reduce(e,t,n,i){return e.flags&RA&&HRt.has(t)||(t==hRt||t==L_e)&&e.flags&B_e?e.parent:e},shift(e,t,n,i){return t==P_e?new IA(e,GRt(i.read(i.pos,n.pos)),0):t==D_e?e.parent:t==Jjt||t==iRt||t==aRt||t==M_e?new IA(e,0,RA):Eee.has(t)?new IA(e,0,Eee.get(t)|e.flags&RA):e},hash(e){return e.hash}}),YRt=new qs(e=>{for(let t=0;t<5;t++){if(e.next!="print".charCodeAt(t))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let t=0;;t++){let n=e.peek(t);if(!(n==_Q||n==EI)){n!=$Rt&&n!=FRt&&n!=Db&&n!=pk&&n!=NQ&&e.acceptToken(Wjt);return}}}),ZRt=new qs((e,t)=>{let{flags:n}=t.context,i=n&If?F_e:$_e,r=(n&Pf)>0,s=!(n&Df),a=(n&Mf)>0,l=e.pos;for(;!(e.next<0);)if(a&&e.next==e8)if(e.peek(1)==e8)e.advance(2);else{if(e.pos==l){e.acceptToken(M_e,1);return}break}else if(s&&e.next==kee){if(e.pos==l){e.advance();let c=e.next;c>=0&&(e.advance(),JRt(e,c)),e.acceptToken(Zjt);return}break}else if(e.next==kee&&!s&&e.peek(1)>-1)e.advance(2);else if(e.next==i&&(!r||e.peek(1)==i&&e.peek(2)==i)){if(e.pos==l){e.acceptToken(wee,r?3:1);return}break}else if(e.next==Db){if(r)e.advance();else if(e.pos==l){e.acceptToken(wee);return}break}else e.advance();e.pos>l&&e.acceptToken(Yjt)});function JRt(e,t){if(t==BRt)for(let n=0;n<2&&e.next>=48&&e.next<=55;n++)e.advance();else if(t==URt)for(let n=0;n<2&&L5(e.next);n++)e.advance();else if(t==zRt)for(let n=0;n<4&&L5(e.next);n++)e.advance();else if(t==VRt)for(let n=0;n<8&&L5(e.next);n++)e.advance();else if(t==QRt&&e.next==e8){for(e.advance();e.next>=0&&e.next!=See&&e.next!=$_e&&e.next!=F_e&&e.next!=Db;)e.advance();e.next==See&&e.advance()}}const eIt=Yh({'async "*" "**" FormatConversion FormatSpec':ne.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":ne.controlKeyword,"in not and or is del":ne.operatorKeyword,"from def class global nonlocal lambda":ne.definitionKeyword,import:ne.moduleKeyword,"with as print":ne.keyword,Boolean:ne.bool,None:ne.null,VariableName:ne.variableName,"CallExpression/VariableName":ne.function(ne.variableName),"FunctionDefinition/VariableName":ne.function(ne.definition(ne.variableName)),"ClassDefinition/VariableName":ne.definition(ne.className),PropertyName:ne.propertyName,"CallExpression/MemberExpression/PropertyName":ne.function(ne.propertyName),Comment:ne.lineComment,Number:ne.number,String:ne.string,FormatString:ne.special(ne.string),Escape:ne.escape,UpdateOp:ne.updateOperator,"ArithOp!":ne.arithmeticOperator,BitOp:ne.bitwiseOperator,CompareOp:ne.compareOperator,AssignOp:ne.definitionOperator,Ellipsis:ne.punctuation,At:ne.meta,"( )":ne.paren,"[ ]":ne.squareBracket,"{ }":ne.brace,".":ne.derefOperator,", ;":ne.separator}),tIt={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},nIt=Fh.deserialize({version:14,states:"##jQ`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO5TQdO'#DoOOQS,5:Y,5:YO5hQdO'#HdOOQS,5:],5:]O5uQ!fO,5:]O5zQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8jQdO,59bO8oQdO,59bO8vQdO,59jO8}QdO'#HTO:TQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:lQdO,59aO'vQdO,59aO:zQdO,59aOOQS,59y,59yO;PQdO,5:RO'vQdO,5:ROOQS,5:Q,5:QO;_QdO,5:QO;dQdO,5:XO'vQdO,5:XO'vQdO,5:VOOQS,5:U,5:UO;uQdO,5:UO;zQdO,5:WOOOW'#Fy'#FyOOOOQS'#Ds'#DsOOQS1G/w1G/wOOQS1G.|1G.|O!/[QtO1G.|O!/cQtO1G.|O1lQdO1G.|O!0OQdO1G/UOOQS'#DZ'#DZO0rQdO,59tOOQS1G.{1G.{O!0VQdO1G/eO!0gQdO1G/eO!0oQdO1G/fO'vQdO'#H[O!0tQdO'#H[O!0yQtO1G.{O!1ZQdO,59iO!2aQdO,5=zO!2qQdO,5=zO!2yQdO1G/mO!3OQtO1G/mOOQS1G/l1G/lO!3`QdO,5=uO!4VQdO,5=uO0rQdO1G/qO!4tQdO1G/sO!4yQtO1G/sO!5ZQtO1G/qOOQS1G/p1G/pOOQS1G/r1G/rOOOW-E9w-E9wOOQS1G/{1G/{O!5kQdO'#HxO0rQdO'#HxO!5|QdO,5>cOOOW-E9x-E9xOOQS1G/|1G/|OOQS-E9{-E9{O!6[Q#xO1G2zO!6{QtO1G2zO'vQdO,5kOOQS1G1`1G1`O!8RQdO1G1`OOQS'#DV'#DVO0rQdO,5=qOOQS,5=q,5=qO!8WQdO'#FrO!8cQdO,59oO!8kQdO1G/XO!8uQtO,5=uOOQS1G3`1G3`OOQS,5:m,5:mO!9fQdO'#GtOOQS,5jO!;ZQdO,5>jO1XQdO,5>jO!;lQdO,5>iOOQS-E:R-E:RO!;qQdO1G0lO!;|QdO1G0lO!lO!lO!hO!=VQdO,5>hO!=hQdO'#EpO0rQdO1G0tO!=sQdO1G0tO!=xQgO1G0zO!AvQgO1G0}O!EqQdO,5>oO!E{QdO,5>oO!FTQtO,5>oO0rQdO1G1PO!F_QdO1G1PO4iQdO1G1UO!!vQdO1G1WOOQV,5;a,5;aO!FdQfO,5;aO!FiQgO1G1QO!JjQdO'#GZO4iQdO1G1QO4iQdO1G1QO!JzQdO,5>pO!KXQdO,5>pO1XQdO,5>pOOQV1G1U1G1UO!KaQdO'#FSO!KrQ!fO1G1WO!KzQdO1G1WOOQV1G1]1G1]O4iQdO1G1]O!LPQdO1G1]O!LXQdO'#F^OOQV1G1b1G1bO!#ZQtO1G1bPOOO1G2v1G2vP!L^OSO1G2vOOQS,5=},5=}OOQS'#Dp'#DpO0rQdO,5=}O!LfQdO,5=|O!LyQdO,5=|OOQS1G/u1G/uO!MRQdO,5>PO!McQdO,5>PO!MkQdO,5>PO!NOQdO,5>PO!N`QdO,5>POOQS1G3j1G3jOOQS7+$h7+$hO!8kQdO7+$pO#!RQdO1G.|O#!YQdO1G.|OOQS1G/`1G/`OOQS,5<`,5<`O'vQdO,5<`OOQS7+%P7+%PO#!aQdO7+%POOQS-E9r-E9rOOQS7+%Q7+%QO#!qQdO,5=vO'vQdO,5=vOOQS7+$g7+$gO#!vQdO7+%PO##OQdO7+%QO##TQdO1G3fOOQS7+%X7+%XO##eQdO1G3fO##mQdO7+%XOOQS,5<_,5<_O'vQdO,5<_O##rQdO1G3aOOQS-E9q-E9qO#$iQdO7+%]OOQS7+%_7+%_O#$wQdO1G3aO#%fQdO7+%_O#%kQdO1G3gO#%{QdO1G3gO#&TQdO7+%]O#&YQdO,5>dO#&sQdO,5>dO#&sQdO,5>dOOQS'#Dx'#DxO#'UO&jO'#DzO#'aO`O'#HyOOOW1G3}1G3}O#'fQdO1G3}O#'nQdO1G3}O#'yQ#xO7+(fO#(jQtO1G2UP#)TQdO'#GOOOQS,5nQdO,5sQdO1G4OOOQS-E9y-E9yO#?^QdO1G4OO<[QdO'#H{OOOO'#D{'#D{OOOO'#F|'#F|O#?oO&jO,5:fOOOW,5>e,5>eOOOW7+)i7+)iO#?zQdO7+)iO#@SQdO1G2zO#@mQdO1G2zP'vQdO'#FuO0rQdO<mO#BQQdO,5>mOOQS1G0v1G0vOOQS<rO#KgQdO,5>rO#KrQdO,5>rO#K}QdO,5>qO#L`QdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<VAN>VO$ oQdO<cAN>cO0rQdO1G1|O$!PQtO1G1|P$!ZQdO'#FvOOQS1G2R1G2RP$!hQdO'#F{O$!uQdO7+)jO$#`QdO,5>gOOOO-E9z-E9zOOOW<tO$4{QdO,5>tO1XQdO,5vO$)nQdO,5>vOOQS1G1p1G1pOOQS,5<[,5<[OOQU7+'P7+'PO$+zQdO1G/iO$)nQdO,5wO$8zQdO,5>wOOQS1G1s1G1sOOQS7+'S7+'SP$)nQdO'#GdO$9SQdO1G4bO$9^QdO1G4bO$9fQdO1G4bOOQS7+%T7+%TO$9tQdO1G1tO$:SQtO'#FaO$:ZQdO,5<}OOQS,5<},5<}O$:iQdO1G4cOOQS-E:a-E:aO$)nQdO,5<|O$:pQdO,5<|O$:uQdO7+)|OOQS-E:`-E:`O$;PQdO7+)|O$)nQdO,5S~O%cOS%^OSSOS%]PQ~OPdOVaOfoOhYOopOs!POvqO!PrO!Q{O!T!SO!U!RO!XZO!][O!h`O!r`O!s`O!t`O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#l!QO#o!TO#s!UO#u!VO#z!WO#}hO$P!XO%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~O%]!YO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%j![O%k!]O%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aO~Ok%xXl%xXm%xXn%xXo%xXp%xXs%xXz%xX{%xX!x%xX#g%xX%[%xX%_%xX%z%xXg%xX!T%xX!U%xX%{%xX!W%xX![%xX!Q%xX#[%xXt%xX!m%xX~P%SOfoOhYO!XZO!][O!h`O!r`O!s`O!t`O%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~Oz%wX{%wX#g%wX%[%wX%_%wX%z%wX~Ok!pOl!qOm!oOn!oOo!rOp!sOs!tO!x%wX~P)pOV!zOg!|Oo0cOv0qO!PrO~P'vOV#OOo0cOv0qO!W#PO~P'vOV#SOa#TOo0cOv0qO![#UO~P'vOQ#XO%`#XO%a#ZO~OQ#^OR#[O%`#^O%a#`O~OV%iX_%iXa%iXh%iXk%iXl%iXm%iXn%iXo%iXp%iXs%iXz%iX!X%iX!f%iX%j%iX%k%iX%l%iX%m%iX%n%iX%o%iX%p%iX%q%iX%r%iX%s%iXg%iX!T%iX!U%iX~O&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O{%iX!x%iX#g%iX%[%iX%_%iX%z%iX%{%iX!W%iX![%iX!Q%iX#[%iXt%iX!m%iX~P,eOz#dO{%hX!x%hX#g%hX%[%hX%_%hX%z%hX~Oo0cOv0qO~P'vO#g#gO%[#iO%_#iO~O%uWO~O!T#nO#u!VO#z!WO#}hO~OopO~P'vOV#sOa#tO%uWO{wP~OV#xOo0cOv0qO!Q#yO~P'vO{#{O!x$QO%z#|O#g!yX%[!yX%_!yX~OV#xOo0cOv0qO#g#SX%[#SX%_#SX~P'vOo0cOv0qO#g#WX%[#WX%_#WX~P'vOh$WO%uWO~O!f$YO!r$YO%uWO~OV$eO~P'vO!U$gO#s$hO#u$iO~O{$jO~OV$qO~P'vOS$sO%[$rO%_$rO%c$tO~OV$}Oa$}Og%POo0cOv0qO~P'vOo0cOv0qO{%SO~P'vO&Y%UO~Oa!bOh!iO!X!kO!f!mOVba_bakbalbambanbaobapbasbazba{ba!xba#gba%[ba%_ba%jba%kba%lba%mba%nba%oba%pba%qba%rba%sba%zbagba!Tba!Uba%{ba!Wba![ba!Qba#[batba!mba~On%ZO~Oo%ZO~P'vOo0cO~P'vOk0eOl0fOm0dOn0dOo0mOp0nOs0rOg%wX!T%wX!U%wX%{%wX!W%wX![%wX!Q%wX#[%wX!m%wX~P)pO%{%]Og%vXz%vX!T%vX!U%vX!W%vX{%vX~Og%_Oz%`O!T%dO!U%cO~Og%_O~Oz%gO!T%dO!U%cO!W&SX~O!W%kO~Oz%lO{%nO!T%dO!U%cO![%}X~O![%rO~O![%sO~OQ#XO%`#XO%a%uO~OV%wOo0cOv0qO!PrO~P'vOQ#^OR#[O%`#^O%a%zO~OV!qa_!qaa!qah!qak!qal!qam!qan!qao!qap!qas!qaz!qa{!qa!X!qa!f!qa!x!qa#g!qa%[!qa%_!qa%j!qa%k!qa%l!qa%m!qa%n!qa%o!qa%p!qa%q!qa%r!qa%s!qa%z!qag!qa!T!qa!U!qa%{!qa!W!qa![!qa!Q!qa#[!qat!qa!m!qa~P#yOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P%SOV&OOopOvqO{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P'vOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#g$zX%[$zX%_$zX~P'vO#g#gO%[&TO%_&TO~O!f&UOh&sX%[&sXz&sX#[&sX#g&sX%_&sX#Z&sXg&sX~Oh!iO%[&WO~Okealeameaneaoeapeaseazea{ea!xea#gea%[ea%_ea%zeagea!Tea!Uea%{ea!Wea![ea!Qea#[eatea!mea~P%SOsqazqa{qa#gqa%[qa%_qa%zqa~Ok!pOl!qOm!oOn!oOo!rOp!sO!xqa~PEcO%z&YOz%yX{%yX~O%uWOz%yX{%yX~Oz&]O{wX~O{&_O~Oz%lO#g%}X%[%}X%_%}Xg%}X{%}X![%}X!m%}X%z%}X~OV0lOo0cOv0qO!PrO~P'vO%z#|O#gUa%[Ua%_Ua~Oz&hO#g&PX%[&PX%_&PXn&PX~P%SOz&kO!Q&jO#g#Wa%[#Wa%_#Wa~Oz&lO#[&nO#g&rX%[&rX%_&rXg&rX~O!f$YO!r$YO#Z&qO%uWO~O#Z&qO~Oz&sO#g&tX%[&tX%_&tX~Oz&uO#g&pX%[&pX%_&pX{&pX~O!X&wO%z&xO~Oz&|On&wX~P%SOn'PO~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO%['UO~P'vOt'YO#p'WO#q'XOP#naV#naf#nah#nao#nas#nav#na!P#na!Q#na!T#na!U#na!X#na!]#na!h#na!r#na!s#na!t#na!{#na!}#na#P#na#R#na#T#na#X#na#Z#na#^#na#_#na#a#na#c#na#l#na#o#na#s#na#u#na#z#na#}#na$P#na%X#na%o#na%p#na%t#na%u#na&Z#na&[#na&]#na&^#na&_#na&`#na&a#na&b#na&c#na&d#na&e#na&f#na&g#na&h#na&i#na&j#na%Z#na%_#na~Oz'ZO#[']O{&xX~Oh'_O!X&wO~Oh!iO{$jO!X&wO~O{'eO~P%SO%['hO%_'hO~OS'iO%['hO%_'hO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%k!]O~P!#uO%kWi~P!#uOV!aO_!aOa!bOh!iO!X!kO!f!mO%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%m!_O%n!_O~P!&pO%mWi%nWi~P!&pOa!bOh!iO!X!kO!f!mOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%mWi%nWi%oWi%pWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~OV!aO_!aO%q!aO%r!aO%s!aO~P!)nOVWi_Wi%qWi%rWi%sWi~P!)nO!T%dO!U%cOg&VXz&VX~O%z'kO%{'kO~P,eOz'mOg&UX~Og'oO~Oz'pO{'rO!W&XX~Oo0cOv0qOz'pO{'sO!W&XX~P'vO!W'uO~Om!oOn!oOo!rOp!sOkjisjizji{ji!xji#gji%[ji%_ji%zji~Ol!qO~P!.aOlji~P!.aOk0eOl0fOm0dOn0dOo0mOp0nO~Ot'wO~P!/jOV'|Og'}Oo0cOv0qO~P'vOg'}Oz(OO~Og(QO~O!U(SO~Og(TOz(OO!T%dO!U%cO~P%SOk0eOl0fOm0dOn0dOo0mOp0nOgqa!Tqa!Uqa%{qa!Wqa![qa!Qqa#[qatqa!mqa~PEcOV'|Oo0cOv0qO!W&Sa~P'vOz(WO!W&Sa~O!W(XO~Oz(WO!T%dO!U%cO!W&Sa~P%SOV(]Oo0cOv0qO![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~P'vOz(^O![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~O![(aO~Oz(^O!T%dO!U%cO![%}a~P%SOz(dO!T%dO!U%cO![&Ta~P%SOz(gO{&lX![&lX!m&lX%z&lX~O{(kO![(mO!m(nO%z(jO~OV&OOopOvqO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~P'vOz(pO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~O!f&UOh&sa%[&saz&sa#[&sa#g&sa%_&sa#Z&sag&sa~O%[(uO~OV#sOa#tO%uWO~Oz&]O{wa~OopOvqO~P'vOz(^O#g%}a%[%}a%_%}ag%}a{%}a![%}a!m%}a%z%}a~P%SOz(zO#g%hX%[%hX%_%hX%z%hX~O%z#|O#gUi%[Ui%_Ui~O#g&Pa%[&Pa%_&Pan&Pa~P'vOz(}O#g&Pa%[&Pa%_&Pan&Pa~O%uWO#g&ra%[&ra%_&rag&ra~Oz)SO#g&ra%[&ra%_&rag&ra~Og)VO~OV)WOh$WO%uWO~O#Z)XO~O%uWO#g&ta%[&ta%_&ta~Oz)ZO#g&ta%[&ta%_&ta~Oo0cOv0qO#g&pa%[&pa%_&pa{&pa~P'vOz)^O#g&pa%[&pa%_&pa{&pa~OV)`Oa)`O%uWO~O%z)eO~Ot)hO#j)gOP#hiV#hif#hih#hio#his#hiv#hi!P#hi!Q#hi!T#hi!U#hi!X#hi!]#hi!h#hi!r#hi!s#hi!t#hi!{#hi!}#hi#P#hi#R#hi#T#hi#X#hi#Z#hi#^#hi#_#hi#a#hi#c#hi#l#hi#o#hi#s#hi#u#hi#z#hi#}#hi$P#hi%X#hi%o#hi%p#hi%t#hi%u#hi&Z#hi&[#hi&]#hi&^#hi&_#hi&`#hi&a#hi&b#hi&c#hi&d#hi&e#hi&f#hi&g#hi&h#hi&i#hi&j#hi%Z#hi%_#hi~Ot)iOP#kiV#kif#kih#kio#kis#kiv#ki!P#ki!Q#ki!T#ki!U#ki!X#ki!]#ki!h#ki!r#ki!s#ki!t#ki!{#ki!}#ki#P#ki#R#ki#T#ki#X#ki#Z#ki#^#ki#_#ki#a#ki#c#ki#l#ki#o#ki#s#ki#u#ki#z#ki#}#ki$P#ki%X#ki%o#ki%p#ki%t#ki%u#ki&Z#ki&[#ki&]#ki&^#ki&_#ki&`#ki&a#ki&b#ki&c#ki&d#ki&e#ki&f#ki&g#ki&h#ki&i#ki&j#ki%Z#ki%_#ki~OV)kOn&wa~P'vOz)lOn&wa~Oz)lOn&wa~P%SOn)pO~O%Y)tO~Ot)wO#p'WO#q)vOP#niV#nif#nih#nio#nis#niv#ni!P#ni!Q#ni!T#ni!U#ni!X#ni!]#ni!h#ni!r#ni!s#ni!t#ni!{#ni!}#ni#P#ni#R#ni#T#ni#X#ni#Z#ni#^#ni#_#ni#a#ni#c#ni#l#ni#o#ni#s#ni#u#ni#z#ni#}#ni$P#ni%X#ni%o#ni%p#ni%t#ni%u#ni&Z#ni&[#ni&]#ni&^#ni&_#ni&`#ni&a#ni&b#ni&c#ni&d#ni&e#ni&f#ni&g#ni&h#ni&i#ni&j#ni%Z#ni%_#ni~OV)zOo0cOv0qO{$jO~P'vOo0cOv0qO{&xa~P'vOz*OO{&xa~OV*SOa*TOg*WO%q*UO%uWO~O{$jO&{*YO~Oh'_O~Oh!iO{$jO~O%[*_O~O%[*aO%_*aO~OV$}Oa$}Oo0cOv0qOg&Ua~P'vOz*dOg&Ua~Oo0cOv0qO{*gO!W&Xa~P'vOz*hO!W&Xa~Oo0cOv0qOz*hO{*kO!W&Xa~P'vOo0cOv0qOz*hO!W&Xa~P'vOz*hO{*kO!W&Xa~Om0dOn0dOo0mOp0nOgjikjisjizji!Tji!Uji%{ji!Wji{ji![ji#gji%[ji%_ji!Qji#[jitji!mji%zji~Ol0fO~P!NkOlji~P!NkOV'|Og*pOo0cOv0qO~P'vOn*rO~Og*pOz*tO~Og*uO~OV'|Oo0cOv0qO!W&Si~P'vOz*vO!W&Si~O!W*wO~OV(]Oo0cOv0qO![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~P'vOz*zO!T%dO!U%cO![&Ti~Oz*}O![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~O![+OO~Oa+QOo0cOv0qO![&Ti~P'vOz*zO![&Ti~O![+SO~OV+UOo0cOv0qO{&la![&la!m&la%z&la~P'vOz+VO{&la![&la!m&la%z&la~O!]+YO&n+[O![!nX~O![+^O~O{(kO![+_O~O{(kO![+_O!m+`O~OV&OOopOvqO{%hq!x%hq#g%hq%[%hq%_%hq%z%hq~P'vOz$ri{$ri!x$ri#g$ri%[$ri%_$ri%z$ri~P%SOV&OOopOvqO~P'vOV&OOo0cOv0qO#g%ha%[%ha%_%ha%z%ha~P'vOz+aO#g%ha%[%ha%_%ha%z%ha~Oz$ia#g$ia%[$ia%_$ian$ia~P%SO#g&Pi%[&Pi%_&Pin&Pi~P'vOz+dO#g#Wq%[#Wq%_#Wq~O#[+eOz$va#g$va%[$va%_$vag$va~O%uWO#g&ri%[&ri%_&rig&ri~Oz+gO#g&ri%[&ri%_&rig&ri~OV+iOh$WO%uWO~O%uWO#g&ti%[&ti%_&ti~Oo0cOv0qO#g&pi%[&pi%_&pi{&pi~P'vO{#{Oz#eX!W#eX~Oz+mO!W&uX~O!W+oO~Ot+rO#j)gOP#hqV#hqf#hqh#hqo#hqs#hqv#hq!P#hq!Q#hq!T#hq!U#hq!X#hq!]#hq!h#hq!r#hq!s#hq!t#hq!{#hq!}#hq#P#hq#R#hq#T#hq#X#hq#Z#hq#^#hq#_#hq#a#hq#c#hq#l#hq#o#hq#s#hq#u#hq#z#hq#}#hq$P#hq%X#hq%o#hq%p#hq%t#hq%u#hq&Z#hq&[#hq&]#hq&^#hq&_#hq&`#hq&a#hq&b#hq&c#hq&d#hq&e#hq&f#hq&g#hq&h#hq&i#hq&j#hq%Z#hq%_#hq~On$|az$|a~P%SOV)kOn&wi~P'vOz+yOn&wi~Oz,TO{$jO#[,TO~O#q,VOP#nqV#nqf#nqh#nqo#nqs#nqv#nq!P#nq!Q#nq!T#nq!U#nq!X#nq!]#nq!h#nq!r#nq!s#nq!t#nq!{#nq!}#nq#P#nq#R#nq#T#nq#X#nq#Z#nq#^#nq#_#nq#a#nq#c#nq#l#nq#o#nq#s#nq#u#nq#z#nq#}#nq$P#nq%X#nq%o#nq%p#nq%t#nq%u#nq&Z#nq&[#nq&]#nq&^#nq&_#nq&`#nq&a#nq&b#nq&c#nq&d#nq&e#nq&f#nq&g#nq&h#nq&i#nq&j#nq%Z#nq%_#nq~O#[,WOz%Oa{%Oa~Oo0cOv0qO{&xi~P'vOz,YO{&xi~O{#{O%z,[Og&zXz&zX~O%uWOg&zXz&zX~Oz,`Og&yX~Og,bO~O%Y,eO~O!T%dO!U%cOg&Viz&Vi~OV$}Oa$}Oo0cOv0qOg&Ui~P'vO{,hOz$la!W$la~Oo0cOv0qO{,iOz$la!W$la~P'vOo0cOv0qO{*gO!W&Xi~P'vOz,lO!W&Xi~Oo0cOv0qOz,lO!W&Xi~P'vOz,lO{,oO!W&Xi~Og$hiz$hi!W$hi~P%SOV'|Oo0cOv0qO~P'vOn,qO~OV'|Og,rOo0cOv0qO~P'vOV'|Oo0cOv0qO!W&Sq~P'vOz$gi![$gi#g$gi%[$gi%_$gig$gi{$gi!m$gi%z$gi~P%SOV(]Oo0cOv0qO~P'vOa+QOo0cOv0qO![&Tq~P'vOz,sO![&Tq~O![,tO~OV(]Oo0cOv0qO![%}q#g%}q%[%}q%_%}qg%}q{%}q!m%}q%z%}q~P'vO{,uO~OV+UOo0cOv0qO{&li![&li!m&li%z&li~P'vOz,zO{&li![&li!m&li%z&li~O!]+YO&n+[O![!na~O{(kO![,}O~OV&OOo0cOv0qO#g%hi%[%hi%_%hi%z%hi~P'vOz-OO#g%hi%[%hi%_%hi%z%hi~O%uWO#g&rq%[&rq%_&rqg&rq~Oz-RO#g&rq%[&rq%_&rqg&rq~OV)`Oa)`O%uWO!W&ua~Oz-TO!W&ua~On$|iz$|i~P%SOV)kO~P'vOV)kOn&wq~P'vOt-XOP#myV#myf#myh#myo#mys#myv#my!P#my!Q#my!T#my!U#my!X#my!]#my!h#my!r#my!s#my!t#my!{#my!}#my#P#my#R#my#T#my#X#my#Z#my#^#my#_#my#a#my#c#my#l#my#o#my#s#my#u#my#z#my#}#my$P#my%X#my%o#my%p#my%t#my%u#my&Z#my&[#my&]#my&^#my&_#my&`#my&a#my&b#my&c#my&d#my&e#my&f#my&g#my&h#my&i#my&j#my%Z#my%_#my~O%Z-]O%_-]O~P`O#q-^OP#nyV#nyf#nyh#nyo#nys#nyv#ny!P#ny!Q#ny!T#ny!U#ny!X#ny!]#ny!h#ny!r#ny!s#ny!t#ny!{#ny!}#ny#P#ny#R#ny#T#ny#X#ny#Z#ny#^#ny#_#ny#a#ny#c#ny#l#ny#o#ny#s#ny#u#ny#z#ny#}#ny$P#ny%X#ny%o#ny%p#ny%t#ny%u#ny&Z#ny&[#ny&]#ny&^#ny&_#ny&`#ny&a#ny&b#ny&c#ny&d#ny&e#ny&f#ny&g#ny&h#ny&i#ny&j#ny%Z#ny%_#ny~Oz-aO{$jO#[-aO~Oo0cOv0qO{&xq~P'vOz-dO{&xq~O%z,[Og&zaz&za~O{#{Og&zaz&za~OV*SOa*TO%q*UO%uWOg&ya~Oz-hOg&ya~O$S-lO~OV$}Oa$}Oo0cOv0qO~P'vOo0cOv0qO{-mOz$li!W$li~P'vOo0cOv0qOz$li!W$li~P'vO{-mOz$li!W$li~Oo0cOv0qO{*gO~P'vOo0cOv0qO{*gO!W&Xq~P'vOz-pO!W&Xq~Oo0cOv0qOz-pO!W&Xq~P'vOs-sO!T%dO!U%cOg&Oq!W&Oq![&Oqz&Oq~P!/jOa+QOo0cOv0qO![&Ty~P'vOz$ji![$ji~P%SOa+QOo0cOv0qO~P'vOV+UOo0cOv0qO~P'vOV+UOo0cOv0qO{&lq![&lq!m&lq%z&lq~P'vO{(kO![-xO!m-yO%z-wO~OV&OOo0cOv0qO#g%hq%[%hq%_%hq%z%hq~P'vO%uWO#g&ry%[&ry%_&ryg&ry~OV)`Oa)`O%uWO!W&ui~Ot-}OP#m!RV#m!Rf#m!Rh#m!Ro#m!Rs#m!Rv#m!R!P#m!R!Q#m!R!T#m!R!U#m!R!X#m!R!]#m!R!h#m!R!r#m!R!s#m!R!t#m!R!{#m!R!}#m!R#P#m!R#R#m!R#T#m!R#X#m!R#Z#m!R#^#m!R#_#m!R#a#m!R#c#m!R#l#m!R#o#m!R#s#m!R#u#m!R#z#m!R#}#m!R$P#m!R%X#m!R%o#m!R%p#m!R%t#m!R%u#m!R&Z#m!R&[#m!R&]#m!R&^#m!R&_#m!R&`#m!R&a#m!R&b#m!R&c#m!R&d#m!R&e#m!R&f#m!R&g#m!R&h#m!R&i#m!R&j#m!R%Z#m!R%_#m!R~Oo0cOv0qO{&xy~P'vOV*SOa*TO%q*UO%uWOg&yi~O$S-lO%Z.VO%_.VO~OV.aOh._O!X.^O!].`O!h.YO!s.[O!t.[O%p.XO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O~Oo0cOv0qOz$lq!W$lq~P'vO{.fOz$lq!W$lq~Oo0cOv0qO{*gO!W&Xy~P'vOz.gO!W&Xy~Oo0cOv.kO~P'vOs-sO!T%dO!U%cOg&Oy!W&Oy![&Oyz&Oy~P!/jO{(kO![.nO~O{(kO![.nO!m.oO~OV*SOa*TO%q*UO%uWO~Oh.tO!f.rOz$TX#[$TX%j$TXg$TX~Os$TX{$TX!W$TX![$TX~P$-bO%o.vO%p.vOs$UXz$UX{$UX#[$UX%j$UX!W$UXg$UX![$UX~O!h.xO~Oz.|O#[/OO%j.yOs&|X{&|X!W&|Xg&|X~Oa/RO~P$)zOh.tOs&}Xz&}X{&}X#[&}X%j&}X!W&}Xg&}X![&}X~Os/VO{$jO~Oo0cOv0qOz$ly!W$ly~P'vOo0cOv0qO{*gO!W&X!R~P'vOz/ZO!W&X!R~Og&RXs&RX!T&RX!U&RX!W&RX![&RXz&RX~P!/jOs-sO!T%dO!U%cOg&Qa!W&Qa![&Qaz&Qa~O{(kO![/^O~O!f.rOh$[as$[az$[a{$[a#[$[a%j$[a!W$[ag$[a![$[a~O!h/eO~O%o.vO%p.vOs$Uaz$Ua{$Ua#[$Ua%j$Ua!W$Uag$Ua![$Ua~O%j.yOs$Yaz$Ya{$Ya#[$Ya!W$Yag$Ya![$Ya~Os&|a{&|a!W&|ag&|a~P$)nOz/jOs&|a{&|a!W&|ag&|a~O!W/mO~Og/mO~O{/oO~O![/pO~Oo0cOv0qO{*gO!W&X!Z~P'vO{/sO~O%z/tO~P$-bOz/uO#[/OO%j.yOg'PX~Oz/uOg'PX~Og/wO~O!h/xO~O#[/OOs%Saz%Sa{%Sa%j%Sa!W%Sag%Sa![%Sa~O#[/OO%j.yOs%Waz%Wa{%Wa!W%Wag%Wa~Os&|i{&|i!W&|ig&|i~P$)nOz/zO#[/OO%j.yO!['Oa~Og'Pa~P$)nOz0SOg'Pa~Oa0UO!['Oi~P$)zOz0WO!['Oi~Oz0WO#[/OO%j.yO!['Oi~O#[/OO%j.yOg$biz$bi~O%z0ZO~P$-bO#[/OO%j.yOg%Vaz%Va~Og'Pi~P$)nO{0^O~Oa0UO!['Oq~P$)zOz0`O!['Oq~O#[/OO%j.yOz%Ui![%Ui~Oa0UO~P$)zOa0UO!['Oy~P$)zO#[/OO%j.yOg$ciz$ci~O#[/OO%j.yOz%Uq![%Uq~Oz+aO#g%ha%[%ha%_%ha%z%ha~P%SOV&OOo0cOv0qO~P'vOn0hO~Oo0hO~P'vO{0iO~Ot0jO~P!/jO&]&Z&j&h&i&g&f&d&e&c&b&`&a&_&^&[%u~",goto:"!=j'QPPPPPP'RP'Z*s+[+t,_,y-fP.SP'Z.r.r'ZPPP'Z2[PPPPPP2[5PPP5PP7b7k=sPP=v>h>kPP'Z'ZPP>zPP'Z'ZPP'Z'Z'Z'Z'Z?O?w'ZP?zP@QDXGuGyPG|HWH['ZPPPH_Hk'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RP'RPHqH}IVPI^IdPI^PI^I^PPPI^PKrPK{LVL]KrPI^LfPI^PLmLsPLwM]MzNeLwLwNkNxLwLwLwLw! ^! d! g! l! o! y!!P!!]!!o!!u!#P!#V!#s!#y!$P!$Z!$a!$g!$y!%T!%Z!%a!%k!%q!%w!%}!&T!&Z!&e!&k!&u!&{!'U!'[!'k!'s!'}!(UPPPPPPPPPPP!([!(_!(e!(n!(x!)TPPPPPPPPPPPP!-u!/Z!3^!6oPP!6w!7W!7a!8Y!8P!8c!8i!8l!8o!8r!8z!9jPPPPPPPPPPPPPPPPP!9m!9q!9wP!:]!:a!:m!:v!;S!;j!;m!;p!;v!;|!_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&n`&^ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To+PZS_&n`OY*xYZ%TZ]*x]^%T^#o*x#o#p+r#p#q*x#q#r+r#r;'S*x;'S;=`,^<%lO*x_+wTS_OY+rZ]+r^;'S+r;'S;=`,W<%lO+r_,ZP;=`<%l+ro,aP;=`<%l*xj,kV%rQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-XT!xY&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-oV%lQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.]V&n`&ZZOw%Twx.rx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.wV&n`Ow%Twx/^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/eT&n`&]ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/{ThZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc0cTgR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk0yXVZ&n`Oz%Tz{1f{!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk1mVaR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk2ZV%oZ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc2wTzR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To3_W%pZ&n`O!_%T!_!`-Q!`!a3w!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Td4OT&{S&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk4fX!fQ&n`O!O%T!O!P5R!P!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5WV&n`O!O%T!O!P5m!P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5tT!rZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti6[a!hX&n`O!Q%T!Q![6T![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S6T#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti7fZ&n`O{%T{|8X|}%T}!O8X!O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8^V&n`O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8z]!hX&n`O!Q%T!Q![8s![!l%T!l!m9s!m#R%T#R#S8s#S#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti9zT!hX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk:bX%qR&n`O!P%T!P!Q:}!Q!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj;UV%sQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti;ro!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!d%T!d!e?q!e!g%T!g!h7a!h!l%T!l!m9s!m!q%T!q!rA]!r!z%T!z!{Bq!{#R%T#R#S>_#S#U%T#U#V?q#V#X%T#X#Y7a#Y#^%T#^#_9s#_#c%T#c#dA]#d#l%T#l#mBq#m#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti=xV&n`O!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti>fc!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S>_#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti?vY&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti@mY!hX&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiAbX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBUX!hX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBv]&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiCv]!hX&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToDvV{_&n`O!_%T!_!`E]!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TcEdT%{R&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkEzT#gZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkFbXmR&n`O!^%T!^!_F}!_!`([!`!a([!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjGUV%mQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkGrV%zZ&n`O!_%T!_!`([!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkH`WmR&n`O!_%T!_!`([!`!aHx!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjIPV%nQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkIoV_Q#}P&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToJ_]&n`&YS%uZO!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoKZP;=`<%lJUoKge&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!tJU!t!uLx!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#gLx#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoMRa&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUkN_V&n`&`ZOr%TrsNts#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkNyV&n`Or%Trs! `s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! gT&n`&bZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! }V&n`&_ZOw%Twx!!dx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!!iV&n`Ow%Twx!#Ox#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!#VT&n`&aZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!#oe&n`&YS%uZOr%Trs!%Qsw%Twx!&px!Q%T!Q![JU![!c%T!c!tJU!t!u!(`!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#g!(`#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!%XV&n`&dZOr%Trs!%ns#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!%sV&n`Or%Trs!&Ys#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&aT&n`&fZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&wV&n`&cZOw%Twx!'^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!'cV&n`Ow%Twx!'xx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!(PT&n`&eZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!(ia&n`&YS%uZOr%Trs!)nsw%Twx!+^x!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!)uV&n`&hZOr%Trs!*[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[YRt,WRt,qRt,ZRt,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:e=>tIt[e]||-1}],tokenPrec:7668}),Cee=new MU,U_e=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function c2(e){return(t,n,i)=>{if(i)return!1;let r=t.node.getChild("VariableName");return r&&n(r,e),!0}}const iIt={FunctionDefinition:c2("function"),ClassDefinition:c2("class"),ForStatement(e,t,n){if(n){for(let i=e.node.firstChild;i;i=i.nextSibling)if(i.name=="VariableName")t(i,"variable");else if(i.name=="in")break}},ImportStatement(e,t){var n,i;let{node:r}=e,s=((n=r.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let a=r.getChild("import");a;a=a.nextSibling)a.name=="VariableName"&&((i=a.nextSibling)===null||i===void 0?void 0:i.name)!="as"&&t(a,s?"variable":"namespace")},AssignStatement(e,t){for(let n=e.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")t(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(e,t){for(let n=null,i=e.node.firstChild;i;i=i.nextSibling)i.name=="VariableName"&&(!n||!/\*|AssignOp/.test(n.name))&&t(i,"variable"),n=i},CapturePattern:c2("variable"),AsPattern:c2("variable"),__proto__:null};function Q_e(e,t){let n=Cee.get(t);if(n)return n;let i=[],r=!0;function s(a,l){let c=e.sliceString(a.from,a.to);i.push({label:c,type:l})}return t.cursor(tr.IncludeAnonymous).iterate(a=>{if(a.name){let l=iIt[a.name];if(l&&l(a,s,r)||!r&&U_e.has(a.name))return!1;r=!1}else if(a.to-a.from>8192){for(let l of Q_e(e,a.node))i.push(l);return!1}}),Cee.set(t,i),i}const Tee=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,z_e=["String","FormatString","Comment","PropertyName"];function rIt(e){let t=wr(e.state).resolveInner(e.pos,-1);if(z_e.indexOf(t.name)>-1)return null;let n=t.name=="VariableName"||t.to-t.from<20&&Tee.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let i=[];for(let r=t;r;r=r.parent)U_e.has(r.name)&&(i=i.concat(Q_e(e.state.doc,r)));return{options:i,from:n?t.from:e.pos,validFor:Tee}}const sIt=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(e=>({label:e,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(e=>({label:e,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(e=>({label:e,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(e=>({label:e,type:"function"}))),aIt=[bs("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),bs("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),bs("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),bs("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),bs(`if \${}: +`);i=r<0?n:n.slice(0,r)}return t+i.length>this.to?i.slice(0,this.to-t):i}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(t,n,i=0){this.block=BN.create(t,i,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(t,n,i=0){this.startContext(this.parser.getNodeType(t),n,i)}addNode(t,n,i){typeof t=="number"&&(t=new pi(this.parser.nodeSet.types[t],sx,sx,(i??this.prevLineEnd())-n)),this.block.addChild(t,n-this.block.from)}addElement(t){this.block.addChild(t.toTree(this.parser.nodeSet),t.from-this.block.from)}addLeafElement(t,n){this.addNode(this.buffer.writeElements(G$(n.children,t.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let t=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(t.toTree(this.parser.nodeSet),t.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(t){return this.ranges.length>1?KAe(this.ranges,0,t.topNode,this.ranges[0].from,this.reusePlaceholders):t}finishLeaf(t){for(let i of t.parsers)if(i.finish(this,t))return;let n=G$(this.parser.parseInline(t.content,t.start),t.marks);this.addNode(this.buffer.writeElements(n,-t.start).finish(Et.Paragraph,t.content.length),t.start)}elt(t,n,i,r){return typeof t=="string"?Bi(this.parser.getNodeType(t),n,i,r):new YAe(t,n)}get buffer(){return new XAe(this.parser.nodeSet)}}function KAe(e,t,n,i,r){let s=e[t].to,a=[],l=[],c=n.from+i;function u(d,f){for(;f?d>=s:d>s;){let h=e[t+1].from-s;i+=h,d+=h,t++,s=e[t].to}}for(let d=n.firstChild;d;d=d.nextSibling){u(d.from+i,!0);let f=d.from+i,h,p=r.get(d.tree);p?h=p:d.to+i>s?(h=KAe(e,t,d,i,r),u(d.to+i,!1)):h=d.toTree(),a.push(h),l.push(f-c)}return u(n.to+i,!1),new pi(n.type,a,l,n.to+i-c,n.tree?n.tree.propValues:void 0)}class wI extends cI{constructor(t,n,i,r,s,a,l,c,u){super(),this.nodeSet=t,this.blockParsers=n,this.leafBlockParsers=i,this.blockNames=r,this.endLeafBlock=s,this.skipContextMarkup=a,this.inlineParsers=l,this.inlineNames=c,this.wrappers=u,this.nodeTypes=Object.create(null);for(let d of t.types)this.nodeTypes[d.name]=d.id}createParse(t,n,i){let r=new $_t(this,t,n,i);for(let s of this.wrappers)r=s(r,t,n,i);return r}configure(t){let n=K$(t);if(!n)return this;let{nodeSet:i,skipContextMarkup:r}=this,s=this.blockParsers.slice(),a=this.leafBlockParsers.slice(),l=this.blockNames.slice(),c=this.inlineParsers.slice(),u=this.inlineNames.slice(),d=this.endLeafBlock.slice(),f=this.wrappers;if(J1(n.defineNodes)){r=Object.assign({},r);let h=i.types.slice(),p;for(let g of n.defineNodes){let{name:b,block:v,composite:y,style:x}=typeof g=="string"?{name:g}:g;if(h.some(k=>k.name==b))continue;y&&(r[h.length]=(k,S,E)=>y(S,E,k.value));let w=h.length,O=y?["Block","BlockContext"]:v?w>=Et.ATXHeading1&&w<=Et.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;h.push(na.define({id:w,name:b,props:O&&[[In.group,O]]})),x&&(p||(p={}),Array.isArray(x)||x instanceof vd?p[b]=x:Object.assign(p,x))}i=new Yx(h),p&&(i=i.extend(qh(p)))}if(J1(n.props)&&(i=i.extend(...n.props)),J1(n.remove))for(let h of n.remove){let p=this.blockNames.indexOf(h),g=this.inlineNames.indexOf(h);p>-1&&(s[p]=a[p]=void 0),g>-1&&(c[g]=void 0)}if(J1(n.parseBlock))for(let h of n.parseBlock){let p=l.indexOf(h.name);if(p>-1)s[p]=h.parse,a[p]=h.leaf;else{let g=h.before?s2(l,h.before):h.after?s2(l,h.after)+1:l.length-1;s.splice(g,0,h.parse),a.splice(g,0,h.leaf),l.splice(g,0,h.name)}h.endLeaf&&d.push(h.endLeaf)}if(J1(n.parseInline))for(let h of n.parseInline){let p=u.indexOf(h.name);if(p>-1)c[p]=h.parse;else{let g=h.before?s2(u,h.before):h.after?s2(u,h.after)+1:u.length-1;c.splice(g,0,h.parse),u.splice(g,0,h.name)}}return n.wrap&&(f=f.concat(n.wrap)),new wI(i,s,a,l,d,r,c,u,f)}getNodeType(t){let n=this.nodeTypes[t];if(n==null)throw new RangeError(`Unknown node type '${t}'`);return n}parseInline(t,n){let i=new xQ(this,t,n);e:for(let r=n;r=0){r=l;continue e}}r++}return i.resolveMarkers(0)}}function J1(e){return e!=null&&e.length>0}function K$(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=K$(e[0]);if(e.length==1)return t;let n=K$(e.slice(1));if(!n||!t)return t||n;let i=(a,l)=>(a||sx).concat(l||sx),r=t.wrap,s=n.wrap;return{props:i(t.props,n.props),defineNodes:i(t.defineNodes,n.defineNodes),parseBlock:i(t.parseBlock,n.parseBlock),parseInline:i(t.parseInline,n.parseInline),remove:i(t.remove,n.remove),wrap:r?s?(a,l,c,u)=>r(s(a,l,c,u),l,c,u):r:s}}function s2(e,t){let n=e.indexOf(t);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${t}`);return n}let GAe=[na.none];for(let e=1,t;t=Et[e];e++)GAe[e]=na.define({id:e,name:t,props:e>=Et.Escape?[]:[[In.group,e in $Ae?["Block","BlockContext"]:["Block","LeafBlock"]]],top:t=="Document"});const sx=[];class XAe{constructor(t){this.nodeSet=t,this.content=[],this.nodes=[]}write(t,n,i,r=0){return this.content.push(t,n,i,4+r*4),this}writeElements(t,n=0){for(let i of t)i.writeTo(this,n);return this}finish(t,n){return pi.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:t,length:n})}}let ok=class{constructor(t,n,i,r=sx){this.type=t,this.from=n,this.to=i,this.children=r}writeTo(t,n){let i=t.content.length;t.writeElements(this.children,n),t.content.push(this.type,this.from+n,this.to+n,t.content.length+4-i)}toTree(t){return new XAe(t).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class YAe{constructor(t,n){this.tree=t,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return sx}writeTo(t,n){t.nodes.push(this.tree),t.content.push(t.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function Bi(e,t,n,i){return new ok(e,t,n,i)}const ZAe={resolve:"Emphasis",mark:"EmphasisMark"},JAe={resolve:"Emphasis",mark:"EmphasisMark"},Tg={},UN={};class zl{constructor(t,n,i,r){this.type=t,this.from=n,this.to=i,this.side=r}}const HJ="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let lk=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{lk=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const S5={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let i=e.char(n+1);for(let r=0;r]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(i);if(r)return e.append(Bi(Et.Autolink,n,n+1+r[0].length,[Bi(Et.LinkMark,n,n+1),Bi(Et.URL,n+1,n+r[0].length),Bi(Et.LinkMark,n+r[0].length,n+1+r[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(i);if(s)return e.append(Bi(Et.Comment,n,n+1+s[0].length));let a=/^\?[^]*?\?>/.exec(i);if(a)return e.append(Bi(Et.ProcessingInstruction,n,n+1+a[0].length));let l=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return l?e.append(Bi(Et.HTMLTag,n,n+1+l[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let i=n+1;for(;e.char(i)==t;)i++;let r=e.slice(n-1,n),s=e.slice(i,i+1),a=lk.test(r),l=lk.test(s),c=/\s|^$/.test(r),u=/\s|^$/.test(s),d=!u&&(!l||c||a),f=!c&&(!a||u||l),h=d&&(t==42||!f||a),p=f&&(t==42||!d||l);return e.append(new zl(t==95?ZAe:JAe,n,i,(h?1:0)|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(Bi(Et.HardBreak,n,n+2));if(t==32){let i=n+1;for(;e.char(i)==32;)i++;if(e.char(i)==10&&i>=n+2)return e.append(Bi(Et.HardBreak,n,i+1))}return-1},Link(e,t,n){return t==91?e.append(new zl(Tg,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new zl(UN,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let i=e.parts.length-1;i>=0;i--){let r=e.parts[i];if(r instanceof zl&&(r.type==Tg||r.type==UN)){if(!r.side||e.skipSpace(r.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[i]=null,-1;let s=e.takeContent(i),a=e.parts[i]=F_t(e,s,r.type==Tg?Et.Link:Et.Image,r.from,n+1);if(r.type==Tg)for(let l=0;lt?Bi(Et.URL,t+n,s+n):s==e.length?null:!1}}function t_e(e,t,n){let i=e.charCodeAt(t);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let s=t+1,a=!1;s=this.end?-1:this.text.charCodeAt(t-this.offset)}get end(){return this.offset+this.text.length}slice(t,n){return this.text.slice(t-this.offset,n-this.offset)}append(t){return this.parts.push(t),t.to}addDelimiter(t,n,i,r,s){return this.append(new zl(t,n,i,(r?1:0)|(s?2:0)))}get hasOpenLink(){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof zl&&(n.type==Tg||n.type==UN))return!0}return!1}addElement(t){return this.append(t)}resolveMarkers(t){for(let i=t;i=t;c--){let b=this.parts[c];if(b instanceof zl&&b.side&1&&b.type==r.type&&!(s&&(r.side&1||b.side&2)&&(b.to-b.from+a)%3==0&&((b.to-b.from)%3||a%3))){l=b;break}}if(!l)continue;let u=r.type.resolve,d=[],f=l.from,h=r.to;if(s){let b=Math.min(2,l.to-l.from,a);f=l.to-b,h=r.from+b,u=b==1?"Emphasis":"StrongEmphasis"}l.type.mark&&d.push(this.elt(l.type.mark,f,l.to));for(let b=c+1;b=0;n--){let i=this.parts[n];if(i instanceof zl&&i.type==t&&i.side&1)return n}return null}takeContent(t){let n=this.resolveMarkers(t);return this.parts.length=t,n}getDelimiterAt(t){let n=this.parts[t];return n instanceof zl?n:null}skipSpace(t){return Fw(this.text,t-this.offset)+this.offset}elt(t,n,i,r){return typeof t=="string"?Bi(this.parser.getNodeType(t),n,i,r):new YAe(t,n)}}xQ.linkStart=Tg;xQ.imageStart=UN;function G$(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),i=0;for(let r of t){for(;i(t?t-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=` +`;)s--;this.fragmentEnd=s?s-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=t+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(t){let n=this.cursor.tree;return n&&n.prop(In.contextHash)==t}takeNodes(t){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),s=t.absoluteLineStart,a=s,l=t.block.children.length,c=a,u=l;for(;;){if(n.to-i>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let d=i_e(n.from-i,t.ranges);if(n.to-i<=t.ranges[t.rangeI].to)t.addNode(n.tree,d);else{let f=new pi(t.parser.nodeSet.types[Et.Paragraph],[],[],0,t.block.hashProp);t.reusePlaceholders.set(f,n.tree),t.addNode(f,d)}if(n.type.is("Block")&&(B_t.indexOf(n.type.id)<0?(a=n.to-i,l=t.block.children.length):(a=c,l=u),c=n.to-i,u=t.block.children.length),!n.nextSibling())break}for(;t.block.children.length>l;)t.block.children.pop(),t.block.positions.pop();return a-s}}function i_e(e,t){let n=e;for(let i=1;ir2[e]),Object.keys(r2).map(e=>WAe[e]),Object.keys(r2),M_t,$Ae,Object.keys(S5).map(e=>S5[e]),Object.keys(S5),[]);function V_t(e,t,n){let i=[];for(let r=e.firstChild,s=t;;r=r.nextSibling){let a=r?r.from:n;if(a>s&&i.push({from:s,to:a}),!r)break;s=r.to}return i}function H_t(e){let{codeParser:t,htmlParser:n}=e;return{wrap:yTe((r,s)=>{let a=r.type.id;if(t&&(a==Et.CodeBlock||a==Et.FencedCode)){let l="";if(a==Et.FencedCode){let u=r.node.getChild(Et.CodeInfo);u&&(l=s.read(u.from,u.to))}let c=t(l);if(c)return{parser:c,overlay:u=>u.type.id==Et.CodeText,bracketed:a==Et.FencedCode}}else if(n&&(a==Et.HTMLBlock||a==Et.HTMLTag||a==Et.CommentBlock))return{parser:n,overlay:V_t(r.node,r.from,r.to)};return null})}}const q_t={resolve:"Strikethrough",mark:"StrikethroughMark"},W_t={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":ne.strikethrough}},{name:"StrikethroughMark",style:ne.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let i=e.slice(n-1,n),r=e.slice(n+2,n+3),s=/\s|^$/.test(i),a=/\s|^$/.test(r),l=lk.test(i),c=lk.test(r);return e.addDelimiter(q_t,n,n+2,!a&&(!c||s||l),!s&&(!l||a||c))},after:"Emphasis"}]};function Bw(e,t,n=0,i,r=0){let s=0,a=!0,l=-1,c=-1,u=!1,d=()=>{i.push(e.elt("TableCell",r+l,r+c,e.parser.parseInline(t.slice(l,c),r+l)))};for(let f=n;f-1)&&s++,a=!1,i&&(l>-1&&d(),i.push(e.elt("TableDelimiter",f+r,f+r+1))),l=c=-1):(u||h!=32&&h!=9)&&(l<0&&(l=f),c=f+1),u=!u&&h==92}return l>-1&&(s++,i&&d()),s}function qJ(e,t){for(let n=t;n\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class WJ{constructor(){this.rows=null}nextLine(t,n,i){if(this.rows==null){this.rows=!1;let r;if((n.next==45||n.next==58||n.next==124)&&r_e.test(r=n.text.slice(n.pos))){let s=[];Bw(t,i.content,0,s,i.start)==Bw(t,r,0)&&(this.rows=[t.elt("TableHeader",i.start,i.start+i.content.length,s),t.elt("TableDelimiter",t.lineStart+n.pos,t.lineStart+n.text.length)])}}else if(this.rows){let r=[];Bw(t,n.text,n.pos,r,t.lineStart),this.rows.push(t.elt("TableRow",t.lineStart+n.pos,t.lineStart+n.text.length,r))}return!1}finish(t,n){return this.rows?(t.addLeafElement(n,t.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const K_t={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":ne.heading}},"TableRow",{name:"TableCell",style:ne.content},{name:"TableDelimiter",style:ne.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return qJ(t.content,0)?new WJ:null},endLeaf(e,t,n){if(n.parsers.some(r=>r instanceof WJ)||!qJ(t.text,t.basePos))return!1;let i=e.peekLine();return r_e.test(i)&&Bw(e,t.text,t.basePos)==Bw(e,i,t.basePos)},before:"SetextHeading"}]};class G_t{nextLine(){return!1}finish(t,n){return t.addLeafElement(n,t.elt("Task",n.start,n.start+n.content.length,[t.elt("TaskMarker",n.start,n.start+3),...t.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const X_t={defineNodes:[{name:"Task",block:!0,style:ne.list},{name:"TaskMarker",style:ne.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new G_t:null},after:"SetextHeading"}]},KJ=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,GJ=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,Y_t=/[\w-]+\.[\w-]+($|[/:])/,XJ=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,YJ=/\/[a-zA-Z\d@.]+/gy;function ZJ(e,t,n,i){let r=0;for(let s=t;s-1)return-1;let i=t+n[0].length;for(;;){let r=e[i-1],s;if(/[?!.,:*_~]/.test(r)||r==")"&&ZJ(e,t,i,")")>ZJ(e,t,i,"("))i--;else if(r==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,i))))i=t+s.index;else break}return i}function JJ(e,t){XJ.lastIndex=t;let n=XJ.exec(e);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:t+n[0].length-(i=="."?1:0)}const J_t={parseInline:[{name:"Autolink",parse(e,t,n){let i=n-e.offset;if(i&&/\w/.test(e.text[i-1]))return-1;KJ.lastIndex=i;let r=KJ.exec(e.text),s=-1;if(!r)return-1;if(r[1]||r[2]){if(s=Z_t(e.text,i+r[0].length),s>-1&&e.hasOpenLink){let a=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(i,s));s=i+a[0].length}}else r[3]?s=JJ(e.text,i):(s=JJ(e.text,i+r[0].length),s>-1&&r[0]=="xmpp:"&&(YJ.lastIndex=s,r=YJ.exec(e.text),r&&(s=r.index+r[0].length)));return s<0?-1:(e.addElement(e.elt("URL",n,s+e.offset)),s+e.offset)}}]},eNt=[K_t,X_t,W_t,J_t];function s_e(e,t,n){return(i,r,s)=>{if(r!=e||i.char(s+1)==e)return-1;let a=[i.elt(n,s,s+1)];for(let l=s+1;l=65&&e<=90||e==95||e>=97&&e<=122||e>=161}let iee=null,ree=null,see=0;function Y$(e,t){let n=e.pos+t;if(see==n&&ree==e)return iee;let i=e.peek(t),r="";for(;TNt(i);)r+=String.fromCharCode(i),i=e.peek(++t);return ree=e,see=n,iee=r?r.toLowerCase():i==ANt||i==_Nt?void 0:null}const h_e=60,QN=62,wQ=47,ANt=63,_Nt=33,NNt=45;function aee(e,t){this.name=e,this.parent=t}const jNt=[OQ,c_e,a_e,o_e,l_e],RNt=new xI({start:null,shift(e,t,n,i){return jNt.indexOf(t)>-1?new aee(Y$(i,1)||"",e):e},reduce(e,t){return t==u_e&&e?e.parent:e},reuse(e,t,n,i){let r=t.type.id;return r==OQ||r==ONt?new aee(Y$(i,1)||"",e):e},strict:!1}),INt=new Hs((e,t)=>{if(e.next!=h_e){e.next<0&&t.context&&e.acceptToken(k5);return}e.advance();let n=e.next==wQ;n&&e.advance();let i=Y$(e,0);if(i===void 0)return;if(!i)return e.acceptToken(n?mNt:pNt);let r=t.context?t.context.name:null;if(n){if(i==r)return e.acceptToken(dNt);if(r&&CNt[r])return e.acceptToken(k5,-2);if(t.dialectEnabled(SNt))return e.acceptToken(fNt);for(let s=t.context;s;s=s.parent)if(s.name==i)return;e.acceptToken(hNt)}else{if(i=="script")return e.acceptToken(a_e);if(i=="style")return e.acceptToken(o_e);if(i=="textarea")return e.acceptToken(l_e);if(ENt.hasOwnProperty(i))return e.acceptToken(c_e);r&&nee[r]&&nee[r][i]?e.acceptToken(k5,-1):e.acceptToken(OQ)}},{contextual:!0}),PNt=new Hs(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(tee);break}if(e.next==NNt)t++;else if(e.next==QN&&t>=2){n>=3&&e.acceptToken(tee,-2);break}else t=0;e.advance()}});function DNt(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const MNt=new Hs((e,t)=>{if(e.next==wQ&&e.peek(1)==QN){let n=t.dialectEnabled(kNt)||DNt(t.context);e.acceptToken(n?uNt:eee,2)}else e.next==QN&&e.acceptToken(eee,1)});function SQ(e,t,n){let i=2+e.length;return new Hs(r=>{for(let s=0,a=0,l=0;;l++){if(r.next<0){l&&r.acceptToken(t);break}if(s==0&&r.next==h_e||s==1&&r.next==wQ||s>=2&&sa?r.acceptToken(t,-a):r.acceptToken(n,-(a-2));break}else if((r.next==10||r.next==13)&&l){r.acceptToken(t,1);break}else s=a=0;r.advance()}})}const LNt=SQ("script",rNt,sNt),$Nt=SQ("style",aNt,oNt),FNt=SQ("textarea",lNt,cNt),BNt=qh({"Text RawText IncompleteTag IncompleteCloseTag":ne.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":ne.angleBracket,TagName:ne.tagName,"MismatchedCloseTag/TagName":[ne.tagName,ne.invalid],AttributeName:ne.attributeName,"AttributeValue UnquotedAttributeValue":ne.attributeValue,Is:ne.definitionOperator,"EntityReference CharacterReference":ne.character,Comment:ne.blockComment,ProcessingInst:ne.processingInstruction,DoctypeDecl:ne.documentMeta}),UNt=Ph.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:RNt,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[BNt],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let u=l.type.id;if(u==yNt)return E5(l,c,n);if(u==vNt)return E5(l,c,i);if(u==xNt)return E5(l,c,r);if(u==u_e&&s.length){let d=l.node,f=d.firstChild,h=f&&oee(f,c),p;if(h){for(let g of s)if(g.tag==h&&(!g.attrs||g.attrs(p||(p=p_e(f,c))))){let b=d.lastChild,v=b.type.id==wNt?b.from:d.to;if(v>f.to)return{parser:g.parser,overlay:[{from:f.to,to:v}]}}}}if(a&&u==d_e){let d=l.node,f;if(f=d.firstChild){let h=a[c.read(f.from,f.to)];if(h)for(let p of h){if(p.tagName&&p.tagName!=oee(d.parent,c))continue;let g=d.lastChild;if(g.type.id==X$){let b=g.from+1,v=g.lastChild,y=g.to-(v&&v.isError?0:1);if(y>b)return{parser:p.parser,overlay:[{from:b,to:y}],bracketed:!0}}else if(g.type.id==f_e)return{parser:p.parser,overlay:[{from:g.from,to:g.to}]}}}}return null})}const QNt=145,lee=1,zNt=146,VNt=147,g_e=2,HNt=148,qNt=3,WNt=4,b_e=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],KNt=58,GNt=40,y_e=95,XNt=91,TA=45,YNt=46,ZNt=35,JNt=37,ejt=38,tjt=92,njt=10,ijt=42;function ck(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function kQ(e){return e>=48&&e<=57}function cee(e){return kQ(e)||e>=97&&e<=102||e>=65&&e<=70}const v_e=(e,t,n)=>(i,r)=>{for(let s=!1,a=0,l=0;;l++){let{next:c}=i;if(ck(c)||c==TA||c==y_e||s&&kQ(c))!s&&(c!=TA||l>0)&&(s=!0),a===l&&c==TA&&a++,i.advance();else if(c==tjt&&i.peek(1)!=njt){if(i.advance(),cee(i.next)){do i.advance();while(cee(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();s=!0}else{s&&i.acceptToken(a==2&&r.canShift(g_e)?t:c==GNt?n:e);break}}},rjt=new Hs(v_e(zNt,g_e,VNt),{contextual:!0}),sjt=new Hs(v_e(HNt,qNt,WNt),{contextual:!0}),ajt=new Hs(e=>{if(b_e.includes(e.peek(-1))){let{next:t}=e;(ck(t)||t==y_e||t==ZNt||t==YNt||t==ijt||t==XNt||t==KNt&&ck(e.peek(1))||t==TA||t==ejt)&&e.acceptToken(QNt)}}),ojt=new Hs(e=>{if(!b_e.includes(e.peek(-1))){let{next:t}=e;if(t==JNt&&(e.advance(),e.acceptToken(lee)),ck(t)){do e.advance();while(ck(e.next)||kQ(e.next));e.acceptToken(lee)}}}),ljt=qh({"AtKeyword import charset namespace keyframes media supports font-feature-values":ne.definitionKeyword,"from to selector scope MatchFlag":ne.keyword,NamespaceName:ne.namespace,KeyframeName:ne.labelName,KeyframeRangeName:ne.operatorKeyword,TagName:ne.tagName,ClassName:ne.className,PseudoClassName:ne.constant(ne.className),IdName:ne.labelName,"FeatureName PropertyName":ne.propertyName,AttributeName:ne.attributeName,NumberLiteral:ne.number,KeywordQuery:ne.keyword,UnaryQueryOp:ne.operatorKeyword,"CallTag ValueName FontName":ne.atom,VariableName:ne.variableName,Callee:ne.operatorKeyword,Unit:ne.unit,"UniversalSelector NestingSelector":ne.definitionOperator,"MatchOp CompareOp":ne.compareOperator,"ChildOp SiblingOp, LogicOp":ne.logicOperator,BinOp:ne.arithmeticOperator,Important:ne.modifier,Comment:ne.blockComment,ColorLiteral:ne.color,"ParenthesizedContent StringLiteral":ne.string,":":ne.punctuation,"PseudoOp #":ne.derefOperator,"; , |":ne.separator,"( )":ne.paren,"[ ]":ne.squareBracket,"{ }":ne.brace}),cjt={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:152,"url-prefix":152,domain:152,regexp:152},ujt={__proto__:null,or:104,and:104,not:112,only:112,layer:206},djt={__proto__:null,selector:118,style:124,layer:202},fjt={__proto__:null,"@import":198,"@media":210,"@charset":214,"@namespace":218,"@keyframes":224,"@supports":236,"@scope":240,"@font-feature-values":246},hjt={__proto__:null,to:243},pjt=Ph.deserialize({version:14,states:"MlQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FnO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#EOO'dQdO'#EQO'oQdO'#EXO'oQdO'#E[OOQP'#Fn'#FnO)RQhO'#E}OOQS'#Fm'#FmOOQS'#FQ'#FQQYQdOOO)YQdO'#EbO*iQhO'#EhO)YQdO'#EjO*pQdO'#ElO*{QdO'#EoO)}QhO'#EuO+TQdO'#EwO+`QdO'#EzO+eQaO'#CfO+lQ`O'#E_O+qQ`O'#F{O+|QdO'#F{QOQ`OOP,WO&jO'#CaPOOO)CA])CA]OOQP'#Ci'#CiOOQP,59R,59RO%VQdO,59ROOQP'#Cm'#CmOOQP,59V,59VO&XQdO,59VO,cQdO,59YO'_QdO,5:jO'dQdO,5:lO'oQdO,5:sO'oQdO,5:uO'oQdO,5:vO'oQdO'#FXO,nQ`O,58}O,vQdO'#E^OOQS,58},58}OOQP'#Cq'#CqOOQO'#D|'#D|OOQP,59Y,59YO,}Q`O,59YO-SQ`O,59YOOQP'#EP'#EPOOQP,5:j,5:jO-XQpO'#ERO-dQdO'#ESO-iQ`O'#ESO-nQpO,5:lO.XQaO,5:sO.oQaO,5:vOOQW'#D^'#D^O/nQhO'#DgO0RQhO,5;iO)}QhO'#DeO0`Q`O'#DnO0eQhO'#DxOOQW'#Ft'#FtOOQS,5;i,5;iO0jQ`O'#DhO0oQ`O'#DkOOQS-E9O-E9OOOQ['#Cv'#CvO0tQdO'#CwO1[QdO'#C}O1rQdO'#DQO2YQ!pO'#DSO4fQ!jO,5:|OOQO'#DX'#DXO-SQ`O'#DWO4vQ!nO'#FqO6|Q`O'#DYO7RQ`O'#DyOOQ['#Fq'#FqO7WQhO'#GOO7fQ`O,5;SO7kQ!bO,5;UOOQS'#En'#EnO7sQ`O,5;WO7xQdO,5;WOOQO'#Eq'#EqO8QQ`O,5;ZO8VQhO,5;aO'oQdO'#DjOOQS,5;c,5;cO0jQ`O,5;cO8_QdO,5;cOOQS'#F`'#F`O8gQdO'#E|O7fQ`O,5;fO8oQdO,5:yO9PQdO'#FZO9^Q`O,5lQhO'#DoOOQW,5:Y,5:YOOQW,5:d,5:dOOQW,5:S,5:SO>vQhO,5:VO?bQ!fO'#FrOOQS'#Fr'#FrOOQS'#FS'#FSO@rQdO,59cOOQ[,59c,59cOAYQdO,59iOOQ[,59i,59iOApQdO,59lOOQ[,59l,59lOOQ[,59n,59nO)YQdO,59pOBWQhO'#EdOOQW'#Ed'#EdOBuQ`O1G0hO4oQhO1G0hOOQ[,59r,59rO)}QhO'#D[OOQ[,59t,59tOBzQ#tO,5:eOCVQhO'#F]OCdQ`O,5vQhO'#DmOI_QhO'#DqOIgQhO'#DsOIlQhO'#FwOOQO'#Fw'#FwOItQ!bO'#DwOOQO'#Fy'#FyOOQO'#Fv'#FvOIyQ`O1G/qOOQS-E9Q-E9QOOQ[1G.}1G.}OOQ[1G/T1G/TOOQ[1G/W1G/WOOQ[1G/[1G/[OJOQdO,5;OOOQS7+&S7+&SOJTQ`O7+&SOJYQhO'#D]OJbQ`O,59vO)}QhO,59vOOQ[1G0P1G0POJjQ`O1G0POJoQhO,5;wOOQO-E9Z-E9ZOOQS7+&^7+&^OJ}QbO'#DSOOQO'#Et'#EtOK]Q`O'#EsOOQO'#Es'#EsOKhQ`O'#F^OKpQdO,5;^OOQS,5;^,5;^OOQ[1G/p1G/pOOQS7+&i7+&iO7fQ`O7+&iOK{Q!fO'#FYO)YQdO'#FYOMSQdO7+&POOQO7+&P7+&POOQO,5:{,5:{OOQO1G1a1G1aOMgQ!bO<vQhO'#DrOOQO,5:],5:]O! hQhO,5:_OGUQhO,5:cOOQW7+%]7+%]OOQO'#Ef'#EfO! pQ`O1G0jOOQS<xAN>xO!#zQ`OAN>xO!$PQaO,5;rOOQO-E9U-E9UO!$ZQdO,5;qOOQO-E9T-E9TOOQW<vQhO'#DuOOQO1G/y1G/yO!%vQ!bO1G/}OJOQdO'#F[O!&OQ`O7+&UOOQW7+&U7+&UO!&WQ!bO1G/cOOQ[7+$|7+$|O!&cQhO7+$|P!&jQ`O'#FTOOQO,5;y,5;yOOQO-E9]-E9]OOQS1G1d1G1dOOQPG24dG24dO!&oQ`OAN>ZO)YQdO1G1[O!&tQ`O7+'jOOQO1G/x1G/xO!&|Q`O,5:aO!$eQhO7+%iOOQO,5;v,5;vOOQO-E9Y-E9YOOQW<Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ`#r#sJq#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`KY<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!o`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$[~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%j~'yh$[~!o`OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%jj)jS$qYOy%jz;'S%j;'S;=`%{<%lO%j~)yWOY)vZr)vrs*cs#O)v#O#P*h#P;'S)v;'S;=`+d<%lO)v~*hOw~~*kRO;'S)v;'S;=`*t;=`O)v~*wXOY)vZr)vrs*cs#O)v#O#P*h#P;'S)v;'S;=`+d;=`<%l)v<%lO)v~+gP;=`<%l)vj+oYmYOy%jz!Q%j!Q![,_![!c%j!c!i,_!i#T%j#T#Z,_#Z;'S%j;'S;=`%{<%lO%jj,dY!o`Oy%jz!Q%j!Q![-S![!c%j!c!i-S!i#T%j#T#Z-S#Z;'S%j;'S;=`%{<%lO%jj-XY!o`Oy%jz!Q%j!Q![-w![!c%j!c!i-w!i#T%j#T#Z-w#Z;'S%j;'S;=`%{<%lO%jj.OYuY!o`Oy%jz!Q%j!Q![.n![!c%j!c!i.n!i#T%j#T#Z.n#Z;'S%j;'S;=`%{<%lO%jj.uYuY!o`Oy%jz!Q%j!Q![/e![!c%j!c!i/e!i#T%j#T#Z/e#Z;'S%j;'S;=`%{<%lO%jj/jY!o`Oy%jz!Q%j!Q![0Y![!c%j!c!i0Y!i#T%j#T#Z0Y#Z;'S%j;'S;=`%{<%lO%jj0aYuY!o`Oy%jz!Q%j!Q![1P![!c%j!c!i1P!i#T%j#T#Z1P#Z;'S%j;'S;=`%{<%lO%jj1UY!o`Oy%jz!Q%j!Q![1t![!c%j!c!i1t!i#T%j#T#Z1t#Z;'S%j;'S;=`%{<%lO%jj1{SuY!o`Oy%jz;'S%j;'S;=`%{<%lO%jd2[UOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jd2uS!yS!o`Oy%jz;'S%j;'S;=`%{<%lO%jb3WS^QOy%jz;'S%j;'S;=`%{<%lO%j~3gWOY3dZw3dwx*cx#O3d#O#P4P#P;'S3d;'S;=`4{<%lO3d~4SRO;'S3d;'S;=`4];=`O3d~4`XOY3dZw3dwx*cx#O3d#O#P4P#P;'S3d;'S;=`4{;=`<%l3d<%lO3d~5OP;=`<%l3dj5WShYOy%jz;'S%j;'S;=`%{<%lO%j~5iOg~n5pUWQyWOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jj6ZWyW#PQOy%jz!O%j!O!P6s!P!Q%j!Q![9x![;'S%j;'S;=`%{<%lO%jj6xU!o`Oy%jz!Q%j!Q![7[![;'S%j;'S;=`%{<%lO%jj7cY!o`$gYOy%jz!Q%j!Q![7[![!g%j!g!h8R!h#X%j#X#Y8R#Y;'S%j;'S;=`%{<%lO%jj8WY!o`Oy%jz{%j{|8v|}%j}!O8v!O!Q%j!Q![9_![;'S%j;'S;=`%{<%lO%jj8{U!o`Oy%jz!Q%j!Q![9_![;'S%j;'S;=`%{<%lO%jj9fU!o`$gYOy%jz!Q%j!Q![9_![;'S%j;'S;=`%{<%lO%jj:P[!o`$gYOy%jz!O%j!O!P7[!P!Q%j!Q![9x![!g%j!g!h8R!h#X%j#X#Y8R#Y;'S%j;'S;=`%{<%lO%jj:zS!dYOy%jz;'S%j;'S;=`%{<%lO%jj;]WyWOy%jz!O%j!O!P6s!P!Q%j!Q![9x![;'S%j;'S;=`%{<%lO%jj;zU`YOy%jz!Q%j!Q![7[![;'S%j;'S;=`%{<%lO%j~VUcYOy%jz![%j![!]>i!];'S%j;'S;=`%{<%lO%jj>pSdY!o`Oy%jz;'S%j;'S;=`%{<%lO%jj?RSnYOy%jz;'S%j;'S;=`%{<%lO%jh?dU!WWOy%jz!_%j!_!`?v!`;'S%j;'S;=`%{<%lO%jh?}S!WW!o`Oy%jz;'S%j;'S;=`%{<%lO%jl@bS!WW!ySOy%jz;'S%j;'S;=`%{<%lO%jj@uV!|Q!WWOy%jz!_%j!_!`?v!`!aA[!a;'S%j;'S;=`%{<%lO%jbAcS!|Q!o`Oy%jz;'S%j;'S;=`%{<%lO%jjArYOy%jz}%j}!OBb!O!c%j!c!}CP!}#T%j#T#oCP#o;'S%j;'S;=`%{<%lO%jjBgW!o`Oy%jz!c%j!c!}CP!}#T%j#T#oCP#o;'S%j;'S;=`%{<%lO%jjCW[lY!o`Oy%jz}%j}!OCP!O!Q%j!Q![CP![!c%j!c!}CP!}#T%j#T#oCP#o;'S%j;'S;=`%{<%lO%jhDRS!zWOy%jz;'S%j;'S;=`%{<%lO%jjDdSpYOy%jz;'S%j;'S;=`%{<%lO%jnDuSo^Oy%jz;'S%j;'S;=`%{<%lO%jjEWU!zWOy%jz#a%j#a#bEj#b;'S%j;'S;=`%{<%lO%jbEoU!o`Oy%jz#d%j#d#eFR#e;'S%j;'S;=`%{<%lO%jbFWU!o`Oy%jz#c%j#c#dFj#d;'S%j;'S;=`%{<%lO%jbFoU!o`Oy%jz#f%j#f#gGR#g;'S%j;'S;=`%{<%lO%jbGWU!o`Oy%jz#h%j#h#iGj#i;'S%j;'S;=`%{<%lO%jbGoU!o`Oy%jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!o`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!o`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$pQ!o`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$cUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU#PQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[ajt,ojt,rjt,sjt,1,2,3,4,new LN("m~RRYZ[z{a~~g~aO$_~~dP!P!Qg~lO$`~~",28,152)],topRules:{StyleSheet:[0,6],Styles:[1,126]},dynamicPrecedences:{94:1},specialized:[{term:147,get:e=>cjt[e]||-1},{term:148,get:e=>ujt[e]||-1},{term:4,get:e=>djt[e]||-1},{term:28,get:e=>fjt[e]||-1},{term:146,get:e=>hjt[e]||-1}],tokenPrec:2405});let C5=null;function T5(){if(!C5&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let i in e)i!="cssText"&&i!="cssFloat"&&typeof e[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(t.push(i),n.add(i)));C5=t.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return C5||[]}const uee=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),dee=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),mjt=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),gjt=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),wf=/^(\w[\w-]*|-\w[\w-]*|)$/,bjt=/^-(-[\w-]*)?$/;function yjt(e,t){var n;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let i=(n=e.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:t.sliceString(i.from,i.to)=="var"}const fee=new DU,vjt=["Declaration"];function xjt(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function x_e(e,t,n){if(t.to-t.from>4096){let i=fee.get(t);if(i)return i;let r=[],s=new Set,a=t.cursor(er.IncludeAnonymous);if(a.firstChild())do for(let l of x_e(e,a.node,n))s.has(l.label)||(s.add(l.label),r.push(l));while(a.nextSibling());return fee.set(t,r),r}else{let i=[],r=new Set;return t.cursor().iterate(s=>{var a;if(n(s)&&s.matchContext(vjt)&&((a=s.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let l=e.sliceString(s.from,s.to);r.has(l)||(r.add(l),i.push({label:l,type:"variable"}))}}),i}}const Ojt=e=>t=>{let{state:n,pos:i}=t,r=Sr(n).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:T5(),validFor:wf};if(r.name=="ValueName")return{from:r.from,options:dee,validFor:wf};if(r.name=="PseudoClassName")return{from:r.from,options:uee,validFor:wf};if(e(r)||(t.explicit||s)&&yjt(r,n.doc))return{from:e(r)||s?r.from:i,options:x_e(n.doc,xjt(r),e),validFor:bjt};if(r.name=="TagName"){for(let{parent:c}=r;c;c=c.parent)if(c.name=="Block")return{from:r.from,options:T5(),validFor:wf};return{from:r.from,options:mjt,validFor:wf}}if(r.name=="AtKeyword")return{from:r.from,options:gjt,validFor:wf};if(!t.explicit)return null;let a=r.resolve(i),l=a.childBefore(i);return l&&l.name==":"&&a.name=="PseudoClassSelector"?{from:i,options:uee,validFor:wf}:l&&l.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:i,options:dee,validFor:wf}:a.name=="Block"||a.name=="Styles"?{from:i,options:T5(),validFor:wf}:null},wjt=Ojt(e=>e.name=="VariableName"),zN=Ih.define({name:"css",parser:pjt.configure({props:[Wh.add({Declaration:cv()}),Kh.add({"Block KeyframeList":RE})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Sjt(){return new Nm(zN,zN.data.of({autocomplete:wjt}))}const eO=["_blank","_self","_top","_parent"],A5=["ascii","utf-8","utf-16","latin1","latin1"],_5=["get","post","put","delete"],N5=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Pl=["true","false"],fn={},kjt={a:{attrs:{href:null,ping:null,type:null,media:null,target:eO,hreflang:null}},abbr:fn,address:fn,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:fn,aside:fn,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:fn,base:{attrs:{href:null,target:eO}},bdi:fn,bdo:fn,blockquote:{attrs:{cite:null}},body:fn,br:fn,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:N5,formmethod:_5,formnovalidate:["novalidate"],formtarget:eO,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:fn,center:fn,cite:fn,code:fn,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:fn,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:fn,div:fn,dl:fn,dt:fn,em:fn,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:fn,figure:fn,footer:fn,form:{attrs:{action:null,name:null,"accept-charset":A5,autocomplete:["on","off"],enctype:N5,method:_5,novalidate:["novalidate"],target:eO}},h1:fn,h2:fn,h3:fn,h4:fn,h5:fn,h6:fn,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:fn,hgroup:fn,hr:fn,html:{attrs:{manifest:null}},i:fn,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:N5,formmethod:_5,formnovalidate:["novalidate"],formtarget:eO,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:fn,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:fn,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:fn,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:A5,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:fn,noscript:fn,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:fn,param:{attrs:{name:null,value:null}},pre:fn,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:fn,rt:fn,ruby:fn,samp:fn,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:A5}},section:fn,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:fn,source:{attrs:{src:null,type:null,media:null}},span:fn,strong:fn,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:fn,summary:fn,sup:fn,table:fn,tbody:fn,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:fn,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:fn,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:fn,time:{attrs:{datetime:null}},title:fn,tr:fn,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:fn,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:fn},O_e={accesskey:null,class:null,contenteditable:Pl,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Pl,autocorrect:Pl,autocapitalize:Pl,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Pl,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Pl,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Pl,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Pl,"aria-hidden":Pl,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Pl,"aria-multiselectable":Pl,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Pl,"aria-relevant":null,"aria-required":Pl,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},w_e="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of w_e)O_e[e]=null;class uk{constructor(t,n){this.tags={...kjt,...t},this.globalAttrs={...O_e,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}uk.default=new uk;function ax(e,t,n=e.length){if(!t)return"";let i=t.firstChild,r=i&&i.getChild("TagName");return r?e.sliceString(r.from,Math.min(r.to,n)):""}function ox(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function S_e(e,t,n){let i=n.tags[ax(e,ox(t))];return(i==null?void 0:i.children)||n.allTags}function EQ(e,t){let n=[];for(let i=ox(t);i&&!i.type.isTop;i=ox(i.parent)){let r=ax(e,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(t.name=="EndTag"||t.from>=i.firstChild.to)&&n.push(r)}return n}const k_e=/^[:\-\.\w\u00b7-\uffff]*$/;function hee(e,t,n,i,r){let s=/\s*>/.test(e.sliceDoc(r,r+5))?"":">",a=ox(n,n.name=="StartTag"||n.name=="TagName");return{from:i,to:r,options:S_e(e.doc,a,t).map(l=>({label:l,type:"type"})).concat(EQ(e.doc,n).map((l,c)=>({label:"/"+l,apply:"/"+l+s,type:"type",boost:99-c}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function pee(e,t,n,i){let r=/\s*>/.test(e.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:EQ(e.doc,t).map((s,a)=>({label:s,apply:s+r,type:"type",boost:99-a})),validFor:k_e}}function Ejt(e,t,n,i){let r=[],s=0;for(let a of S_e(e.doc,n,t))r.push({label:"<"+a,type:"type"});for(let a of EQ(e.doc,n))r.push({label:"",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Cjt(e,t,n,i,r){let s=ox(n),a=s?t.tags[ax(e.doc,s)]:null,l=a&&a.attrs?Object.keys(a.attrs):[],c=a&&a.globalAttrs===!1?l:l.length?l.concat(t.globalAttrNames):t.globalAttrNames;return{from:i,to:r,options:c.map(u=>({label:u,type:"property"})),validFor:k_e}}function Tjt(e,t,n,i,r){var s;let a=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),l=[],c;if(a){let u=e.sliceDoc(a.from,a.to),d=t.globalAttrs[u];if(!d){let f=ox(n),h=f?t.tags[ax(e.doc,f)]:null;d=(h==null?void 0:h.attrs)&&h.attrs[u]}if(d){let f=e.sliceDoc(i,r).toLowerCase(),h='"',p='"';/^['"]/.test(f)?(c=f[0]=='"'?/^[^"]*$/:/^[^']*$/,h="",p=e.sliceDoc(r,r+1)==f[0]?"":f[0],f=f.slice(1),i++):c=/^[^\s<>='"]*$/;for(let g of d)l.push({label:g,apply:h+g+p,type:"constant"})}}return{from:i,to:r,options:l,validFor:c}}function E_e(e,t){let{state:n,pos:i}=t,r=Sr(n).resolveInner(i,-1),s=r.resolve(i);for(let a=i,l;s==r&&(l=r.childBefore(a));){let c=l.lastChild;if(!c||!c.type.isError||c.fromE_e(i,r)}const Njt=Ud.parser.configure({top:"SingleExpression"}),C_e=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:IAe.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:PAe.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:DAe.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:Njt},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Ud.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:zN.parser}],T_e=[{name:"style",parser:zN.parser.configure({top:"Styles"})}].concat(w_e.map(e=>({name:e,parser:Ud.parser}))),A_e=Ih.define({name:"html",parser:UNt.configure({props:[Wh.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].lengthe.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),AA=A_e.configure({wrap:m_e(C_e,T_e)});function jjt(e={}){let t="",n;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=m_e((e.nestedLanguages||[]).concat(C_e),(e.nestedAttributes||[]).concat(T_e)));let i=n?A_e.configure({wrap:n,dialect:t}):t?AA.configure({dialect:t}):AA;return new Nm(i,[AA.data.of({autocomplete:_jt(e)}),e.autoCloseTags!==!1?Rjt:[],H$().support,Sjt().support])}const mee=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),Rjt=Pt.inputHandler.of((e,t,n,i,r)=>{if(e.composing||e.state.readOnly||t!=n||i!=">"&&i!="/"||!AA.isActiveAt(e.state,t,-1))return!1;let s=r(),{state:a}=s,l=a.changeByRange(c=>{var u,d,f;let h=a.doc.sliceString(c.from-1,c.to)==i,{head:p}=c,g=Sr(a).resolveInner(p,-1),b;if(h&&i==">"&&g.name=="EndTag"){let v=g.parent;if(((d=(u=v.parent)===null||u===void 0?void 0:u.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(b=ax(a.doc,v.parent,p))&&!mee.has(b)){let y=p+(a.doc.sliceString(p,p+1)===">"?1:0),x=``;return{range:c,changes:{from:p,to:y,insert:x}}}}else if(h&&i=="/"&&g.name=="IncompleteCloseTag"){let v=g.parent;if(g.from==p-2&&((f=v.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(b=ax(a.doc,v,p))&&!mee.has(b)){let y=p+(a.doc.sliceString(p,p+1)===">"?1:0),x=`${b}>`;return{range:Ze.cursor(p+x.length,-1),changes:{from:p,to:y,insert:x}}}}return{range:c}});return l.changes.empty?!1:(e.dispatch([s,a.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),__e=bI({commentTokens:{block:{open:""}}}),N_e=new In,j_e=z_t.configure({props:[Kh.add(e=>!e.is("Block")||e.is("Document")||Z$(e)!=null||Ijt(e)?void 0:(t,n)=>({from:n.doc.lineAt(t.from).to,to:t.to})),N_e.add(Z$),Wh.add({Document:()=>null}),zp.add({Document:__e})]});function Z$(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Ijt(e){return e.name=="OrderedList"||e.name=="BulletList"}function Pjt(e,t){let n=e;for(;;){let i=n.nextSibling,r;if(!i||(r=Z$(i.type))!=null&&r<=t)break;n=i}return n.to}const Djt=X2e.of((e,t,n)=>{for(let i=Sr(e).resolveInner(n,-1);i&&!(i.fromn)return{from:n,to:s}}return null});function CQ(e){return new Yl(__e,e,[],"markdown")}const Mjt=CQ(j_e),Ljt=j_e.configure([eNt,nNt,tNt,iNt,{props:[Kh.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),VN=CQ(Ljt);function $jt(e,t){return n=>{if(n&&e){let i=null;if(n=/\S*/.exec(n)[0],typeof e=="function"?i=e(n):i=RN.matchLanguageName(e,n,!0),i instanceof RN)return i.support?i.support.language.parser:_b.getSkippingParser(i.load());if(i)return i.parser}return t?t.parser:null}}let j5=class{constructor(t,n,i,r,s,a,l){this.node=t,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=s,this.type=a,this.item=l}blank(t,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(t!=null){for(;i.length0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(t,n){let i=this.node.name=="OrderedList"?String(+I_e(this.item,t)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}};function R_e(e,t){let n=[],i=[];for(let r=e;r;r=r.parent){if(r.name=="FencedCode")return i;(r.name=="ListItem"||r.name=="Blockquote")&&n.push(r)}for(let r=n.length-1;r>=0;r--){let s=n[r],a,l=t.lineAt(s.from),c=s.from-l.from;if(s.name=="Blockquote"&&(a=/^ *>( ?)/.exec(l.text.slice(c))))i.push(new j5(s,c,c+a[0].length,"",a[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(a=/^( *)\d+([.)])( *)/.exec(l.text.slice(c)))){let u=a[3],d=a[0].length;u.length>=4&&(u=u.slice(0,u.length-4),d-=4),i.push(new j5(s.parent,c,c+d,a[1],u,a[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(c)))){let u=a[4],d=a[0].length;u.length>4&&(u=u.slice(0,u.length-4),d-=4);let f=a[2];a[3]&&(f+=a[3].replace(/[xX]/," ")),i.push(new j5(s.parent,c,c+d,a[1],u,f,s))}}return i}function I_e(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function R5(e,t,n,i=0){for(let r=-1,s=e;;){if(s.name=="ListItem"){let l=I_e(s,t),c=+l[2];if(r>=0){if(c!=r+1)return;n.push({from:s.from+l[1].length,to:s.from+l[0].length,insert:String(r+2+i)})}r=c}let a=s.nextSibling;if(!a)break;s=a}}function TQ(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(Jx)!=" ")return e;let i=Uu(e,4,n),r="";for(let s=i;s>0;)s>=4?(r+=" ",s-=4):(r+=" ",s--);return r+e.slice(n)}const Fjt=(e={})=>({state:t,dispatch:n})=>{let i=Sr(t),{doc:r}=t,s=null,a=t.changeByRange(l=>{if(!l.empty||!VN.isActiveAt(t,l.from,-1)&&!VN.isActiveAt(t,l.from,1))return s={range:l};let c=l.from,u=r.lineAt(c),d=R_e(i.resolveInner(c,-1),r);for(;d.length&&d[d.length-1].from>c-u.from;)d.pop();if(!d.length)return s={range:l};let f=d[d.length-1];if(f.to-f.spaceAfter.length>c-u.from)return s={range:l};let h=c>=f.to-f.spaceAfter.length&&!/\S/.test(u.text.slice(f.to));if(f.item&&h){let y=f.node.firstChild,x=f.node.getChild("ListItem","ListItem");if(y.to>=c||x&&x.to0&&!/[^\s>]/.test(r.lineAt(u.from-1).text)||e.nonTightLists===!1){let w=d.length>1?d[d.length-2]:null,O,k="";w&&w.item?(O=u.from+w.from,k=w.marker(r,1)):O=u.from+(w?w.to:0);let S=[{from:O,to:c,insert:k}];return f.node.name=="OrderedList"&&R5(f.item,r,S,-2),w&&w.node.name=="OrderedList"&&R5(w.item,r,S),{range:Ze.cursor(O+k.length),changes:S}}else{let w=bee(d,t,u);return{range:Ze.cursor(c+w.length+1),changes:{from:u.from,insert:w+t.lineBreak}}}}if(f.node.name=="Blockquote"&&h&&u.from){let y=r.lineAt(u.from-1),x=/>\s*$/.exec(y.text);if(x&&x.index==f.from){let w=t.changes([{from:y.from+x.index,to:y.to},{from:u.from+f.from,to:u.to}]);return{range:l.map(w),changes:w}}}let p=[];f.node.name=="OrderedList"&&R5(f.item,r,p);let g=f.item&&f.item.from]*/.exec(u.text)[0].length>=f.to)for(let y=0,x=d.length-1;y<=x;y++)b+=y==x&&!g?d[y].marker(r,1):d[y].blank(yu.from&&/\s/.test(u.text.charAt(v-u.from-1));)v--;return b=TQ(b,t),Ujt(f.node,t.doc)&&(b=bee(d,t,u)+t.lineBreak+b),p.push({from:v,to:c,insert:t.lineBreak+b}),{range:Ze.cursor(v+b.length+1),changes:p}});return s?!1:(n(t.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)},Bjt=Fjt();function gee(e){return e.name=="QuoteMark"||e.name=="ListMark"}function Ujt(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let n=e.firstChild,i=e.getChild("ListItem","ListItem");if(!i)return!1;let r=t.lineAt(n.to),s=t.lineAt(i.from),a=/^[\s>]*$/.test(r.text);return r.number+(a?0:1){let n=Sr(e),i=null,r=e.changeByRange(s=>{let a=s.from,{doc:l}=e;if(s.empty&&VN.isActiveAt(e,s.from)){let c=l.lineAt(a),u=R_e(Qjt(n,a),l);if(u.length){let d=u[u.length-1],f=d.to-d.spaceAfter.length+(d.spaceAfter?1:0);if(a-c.from>f&&!/\S/.test(c.text.slice(f,a-c.from)))return{range:Ze.cursor(c.from+f),changes:{from:c.from+f,to:a}};if(a-c.from==f&&(d.item&&c.from<=d.item.from||/^[\s>]*$/.test(c.text.slice(0,d.to)))){let h=c.from+d.from;if(d.item&&d.node.from{var n;let{main:i}=t.state.selection;if(i.empty)return!1;let r=(n=e.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r="https://"+r),!VN.isActiveAt(t.state,i.from,1)))return!1;let s=Sr(t.state),a=!1;return s.iterate({from:i.from,to:i.to,enter:l=>{(l.from>i.from||Kjt.test(l.name))&&(a=!0)},leave:l=>{l.to=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}const GRt=new Hs((e,t)=>{let n;if(e.next<0)e.acceptToken(Jjt);else if(t.context.flags&_A)P5(e.next)&&e.acceptToken(Zjt,1);else if(((n=e.peek(-1))<0||P5(n))&&t.canShift(yee)){let i=0;for(;e.next==AQ||e.next==SI;)e.advance(),i++;(e.next==Rb||e.next==dk||e.next==_Q)&&e.acceptToken(yee,-i)}else P5(e.next)&&e.acceptToken(Yjt,1)},{contextual:!0}),XRt=new Hs((e,t)=>{let n=t.context;if(n.flags)return;let i=e.peek(-1);if(i==Rb||i==dk){let r=0,s=0;for(;;){if(e.next==AQ)r++;else if(e.next==SI)r+=8-r%8;else break;e.advance(),s++}r!=n.indent&&e.next!=Rb&&e.next!=dk&&e.next!=_Q&&(r[e,t|U_e])),JRt=new xI({start:YRt,reduce(e,t,n,i){return e.flags&_A&&KRt.has(t)||(t==gRt||t==$_e)&&e.flags&U_e?e.parent:e},shift(e,t,n,i){return t==D_e?new NA(e,ZRt(i.read(i.pos,n.pos)),0):t==M_e?e.parent:t==nRt||t==aRt||t==cRt||t==L_e?new NA(e,0,_A):wee.has(t)?new NA(e,0,wee.get(t)|e.flags&_A):e},hash(e){return e.hash}}),eIt=new Hs(e=>{for(let t=0;t<5;t++){if(e.next!="print".charCodeAt(t))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let t=0;;t++){let n=e.peek(t);if(!(n==AQ||n==SI)){n!=URt&&n!=QRt&&n!=Rb&&n!=dk&&n!=_Q&&e.acceptToken(Xjt);return}}}),tIt=new Hs((e,t)=>{let{flags:n}=t.context,i=n&_f?B_e:F_e,r=(n&Nf)>0,s=!(n&jf),a=(n&Rf)>0,l=e.pos;for(;!(e.next<0);)if(a&&e.next==J$)if(e.peek(1)==J$)e.advance(2);else{if(e.pos==l){e.acceptToken(L_e,1);return}break}else if(s&&e.next==Oee){if(e.pos==l){e.advance();let c=e.next;c>=0&&(e.advance(),nIt(e,c)),e.acceptToken(tRt);return}break}else if(e.next==Oee&&!s&&e.peek(1)>-1)e.advance(2);else if(e.next==i&&(!r||e.peek(1)==i&&e.peek(2)==i)){if(e.pos==l){e.acceptToken(vee,r?3:1);return}break}else if(e.next==Rb){if(r)e.advance();else if(e.pos==l){e.acceptToken(vee);return}break}else e.advance();e.pos>l&&e.acceptToken(eRt)});function nIt(e,t){if(t==zRt)for(let n=0;n<2&&e.next>=48&&e.next<=55;n++)e.advance();else if(t==VRt)for(let n=0;n<2&&D5(e.next);n++)e.advance();else if(t==qRt)for(let n=0;n<4&&D5(e.next);n++)e.advance();else if(t==WRt)for(let n=0;n<8&&D5(e.next);n++)e.advance();else if(t==HRt&&e.next==J$){for(e.advance();e.next>=0&&e.next!=xee&&e.next!=F_e&&e.next!=B_e&&e.next!=Rb;)e.advance();e.next==xee&&e.advance()}}const iIt=qh({'async "*" "**" FormatConversion FormatSpec':ne.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":ne.controlKeyword,"in not and or is del":ne.operatorKeyword,"from def class global nonlocal lambda":ne.definitionKeyword,import:ne.moduleKeyword,"with as print":ne.keyword,Boolean:ne.bool,None:ne.null,VariableName:ne.variableName,"CallExpression/VariableName":ne.function(ne.variableName),"FunctionDefinition/VariableName":ne.function(ne.definition(ne.variableName)),"ClassDefinition/VariableName":ne.definition(ne.className),PropertyName:ne.propertyName,"CallExpression/MemberExpression/PropertyName":ne.function(ne.propertyName),Comment:ne.lineComment,Number:ne.number,String:ne.string,FormatString:ne.special(ne.string),Escape:ne.escape,UpdateOp:ne.updateOperator,"ArithOp!":ne.arithmeticOperator,BitOp:ne.bitwiseOperator,CompareOp:ne.compareOperator,AssignOp:ne.definitionOperator,Ellipsis:ne.punctuation,At:ne.meta,"( )":ne.paren,"[ ]":ne.squareBracket,"{ }":ne.brace,".":ne.derefOperator,", ;":ne.separator}),rIt={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},sIt=Ph.deserialize({version:14,states:"##jQ`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO5TQdO'#DoOOQS,5:Y,5:YO5hQdO'#HdOOQS,5:],5:]O5uQ!fO,5:]O5zQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8jQdO,59bO8oQdO,59bO8vQdO,59jO8}QdO'#HTO:TQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:lQdO,59aO'vQdO,59aO:zQdO,59aOOQS,59y,59yO;PQdO,5:RO'vQdO,5:ROOQS,5:Q,5:QO;_QdO,5:QO;dQdO,5:XO'vQdO,5:XO'vQdO,5:VOOQS,5:U,5:UO;uQdO,5:UO;zQdO,5:WOOOW'#Fy'#FyOOOOQS'#Ds'#DsOOQS1G/w1G/wOOQS1G.|1G.|O!/[QtO1G.|O!/cQtO1G.|O1lQdO1G.|O!0OQdO1G/UOOQS'#DZ'#DZO0rQdO,59tOOQS1G.{1G.{O!0VQdO1G/eO!0gQdO1G/eO!0oQdO1G/fO'vQdO'#H[O!0tQdO'#H[O!0yQtO1G.{O!1ZQdO,59iO!2aQdO,5=zO!2qQdO,5=zO!2yQdO1G/mO!3OQtO1G/mOOQS1G/l1G/lO!3`QdO,5=uO!4VQdO,5=uO0rQdO1G/qO!4tQdO1G/sO!4yQtO1G/sO!5ZQtO1G/qOOQS1G/p1G/pOOQS1G/r1G/rOOOW-E9w-E9wOOQS1G/{1G/{O!5kQdO'#HxO0rQdO'#HxO!5|QdO,5>cOOOW-E9x-E9xOOQS1G/|1G/|OOQS-E9{-E9{O!6[Q#xO1G2zO!6{QtO1G2zO'vQdO,5kOOQS1G1`1G1`O!8RQdO1G1`OOQS'#DV'#DVO0rQdO,5=qOOQS,5=q,5=qO!8WQdO'#FrO!8cQdO,59oO!8kQdO1G/XO!8uQtO,5=uOOQS1G3`1G3`OOQS,5:m,5:mO!9fQdO'#GtOOQS,5jO!;ZQdO,5>jO1XQdO,5>jO!;lQdO,5>iOOQS-E:R-E:RO!;qQdO1G0lO!;|QdO1G0lO!lO!lO!hO!=VQdO,5>hO!=hQdO'#EpO0rQdO1G0tO!=sQdO1G0tO!=xQgO1G0zO!AvQgO1G0}O!EqQdO,5>oO!E{QdO,5>oO!FTQtO,5>oO0rQdO1G1PO!F_QdO1G1PO4iQdO1G1UO!!vQdO1G1WOOQV,5;a,5;aO!FdQfO,5;aO!FiQgO1G1QO!JjQdO'#GZO4iQdO1G1QO4iQdO1G1QO!JzQdO,5>pO!KXQdO,5>pO1XQdO,5>pOOQV1G1U1G1UO!KaQdO'#FSO!KrQ!fO1G1WO!KzQdO1G1WOOQV1G1]1G1]O4iQdO1G1]O!LPQdO1G1]O!LXQdO'#F^OOQV1G1b1G1bO!#ZQtO1G1bPOOO1G2v1G2vP!L^OSO1G2vOOQS,5=},5=}OOQS'#Dp'#DpO0rQdO,5=}O!LfQdO,5=|O!LyQdO,5=|OOQS1G/u1G/uO!MRQdO,5>PO!McQdO,5>PO!MkQdO,5>PO!NOQdO,5>PO!N`QdO,5>POOQS1G3j1G3jOOQS7+$h7+$hO!8kQdO7+$pO#!RQdO1G.|O#!YQdO1G.|OOQS1G/`1G/`OOQS,5<`,5<`O'vQdO,5<`OOQS7+%P7+%PO#!aQdO7+%POOQS-E9r-E9rOOQS7+%Q7+%QO#!qQdO,5=vO'vQdO,5=vOOQS7+$g7+$gO#!vQdO7+%PO##OQdO7+%QO##TQdO1G3fOOQS7+%X7+%XO##eQdO1G3fO##mQdO7+%XOOQS,5<_,5<_O'vQdO,5<_O##rQdO1G3aOOQS-E9q-E9qO#$iQdO7+%]OOQS7+%_7+%_O#$wQdO1G3aO#%fQdO7+%_O#%kQdO1G3gO#%{QdO1G3gO#&TQdO7+%]O#&YQdO,5>dO#&sQdO,5>dO#&sQdO,5>dOOQS'#Dx'#DxO#'UO&jO'#DzO#'aO`O'#HyOOOW1G3}1G3}O#'fQdO1G3}O#'nQdO1G3}O#'yQ#xO7+(fO#(jQtO1G2UP#)TQdO'#GOOOQS,5nQdO,5sQdO1G4OOOQS-E9y-E9yO#?^QdO1G4OO<[QdO'#H{OOOO'#D{'#D{OOOO'#F|'#F|O#?oO&jO,5:fOOOW,5>e,5>eOOOW7+)i7+)iO#?zQdO7+)iO#@SQdO1G2zO#@mQdO1G2zP'vQdO'#FuO0rQdO<mO#BQQdO,5>mOOQS1G0v1G0vOOQS<rO#KgQdO,5>rO#KrQdO,5>rO#K}QdO,5>qO#L`QdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<VAN>VO$ oQdO<cAN>cO0rQdO1G1|O$!PQtO1G1|P$!ZQdO'#FvOOQS1G2R1G2RP$!hQdO'#F{O$!uQdO7+)jO$#`QdO,5>gOOOO-E9z-E9zOOOW<tO$4{QdO,5>tO1XQdO,5vO$)nQdO,5>vOOQS1G1p1G1pOOQS,5<[,5<[OOQU7+'P7+'PO$+zQdO1G/iO$)nQdO,5wO$8zQdO,5>wOOQS1G1s1G1sOOQS7+'S7+'SP$)nQdO'#GdO$9SQdO1G4bO$9^QdO1G4bO$9fQdO1G4bOOQS7+%T7+%TO$9tQdO1G1tO$:SQtO'#FaO$:ZQdO,5<}OOQS,5<},5<}O$:iQdO1G4cOOQS-E:a-E:aO$)nQdO,5<|O$:pQdO,5<|O$:uQdO7+)|OOQS-E:`-E:`O$;PQdO7+)|O$)nQdO,5S~O%cOS%^OSSOS%]PQ~OPdOVaOfoOhYOopOs!POvqO!PrO!Q{O!T!SO!U!RO!XZO!][O!h`O!r`O!s`O!t`O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#l!QO#o!TO#s!UO#u!VO#z!WO#}hO$P!XO%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~O%]!YO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%j![O%k!]O%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aO~Ok%xXl%xXm%xXn%xXo%xXp%xXs%xXz%xX{%xX!x%xX#g%xX%[%xX%_%xX%z%xXg%xX!T%xX!U%xX%{%xX!W%xX![%xX!Q%xX#[%xXt%xX!m%xX~P%SOfoOhYO!XZO!][O!h`O!r`O!s`O!t`O%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~Oz%wX{%wX#g%wX%[%wX%_%wX%z%wX~Ok!pOl!qOm!oOn!oOo!rOp!sOs!tO!x%wX~P)pOV!zOg!|Oo0cOv0qO!PrO~P'vOV#OOo0cOv0qO!W#PO~P'vOV#SOa#TOo0cOv0qO![#UO~P'vOQ#XO%`#XO%a#ZO~OQ#^OR#[O%`#^O%a#`O~OV%iX_%iXa%iXh%iXk%iXl%iXm%iXn%iXo%iXp%iXs%iXz%iX!X%iX!f%iX%j%iX%k%iX%l%iX%m%iX%n%iX%o%iX%p%iX%q%iX%r%iX%s%iXg%iX!T%iX!U%iX~O&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O{%iX!x%iX#g%iX%[%iX%_%iX%z%iX%{%iX!W%iX![%iX!Q%iX#[%iXt%iX!m%iX~P,eOz#dO{%hX!x%hX#g%hX%[%hX%_%hX%z%hX~Oo0cOv0qO~P'vO#g#gO%[#iO%_#iO~O%uWO~O!T#nO#u!VO#z!WO#}hO~OopO~P'vOV#sOa#tO%uWO{wP~OV#xOo0cOv0qO!Q#yO~P'vO{#{O!x$QO%z#|O#g!yX%[!yX%_!yX~OV#xOo0cOv0qO#g#SX%[#SX%_#SX~P'vOo0cOv0qO#g#WX%[#WX%_#WX~P'vOh$WO%uWO~O!f$YO!r$YO%uWO~OV$eO~P'vO!U$gO#s$hO#u$iO~O{$jO~OV$qO~P'vOS$sO%[$rO%_$rO%c$tO~OV$}Oa$}Og%POo0cOv0qO~P'vOo0cOv0qO{%SO~P'vO&Y%UO~Oa!bOh!iO!X!kO!f!mOVba_bakbalbambanbaobapbasbazba{ba!xba#gba%[ba%_ba%jba%kba%lba%mba%nba%oba%pba%qba%rba%sba%zbagba!Tba!Uba%{ba!Wba![ba!Qba#[batba!mba~On%ZO~Oo%ZO~P'vOo0cO~P'vOk0eOl0fOm0dOn0dOo0mOp0nOs0rOg%wX!T%wX!U%wX%{%wX!W%wX![%wX!Q%wX#[%wX!m%wX~P)pO%{%]Og%vXz%vX!T%vX!U%vX!W%vX{%vX~Og%_Oz%`O!T%dO!U%cO~Og%_O~Oz%gO!T%dO!U%cO!W&SX~O!W%kO~Oz%lO{%nO!T%dO!U%cO![%}X~O![%rO~O![%sO~OQ#XO%`#XO%a%uO~OV%wOo0cOv0qO!PrO~P'vOQ#^OR#[O%`#^O%a%zO~OV!qa_!qaa!qah!qak!qal!qam!qan!qao!qap!qas!qaz!qa{!qa!X!qa!f!qa!x!qa#g!qa%[!qa%_!qa%j!qa%k!qa%l!qa%m!qa%n!qa%o!qa%p!qa%q!qa%r!qa%s!qa%z!qag!qa!T!qa!U!qa%{!qa!W!qa![!qa!Q!qa#[!qat!qa!m!qa~P#yOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P%SOV&OOopOvqO{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P'vOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#g$zX%[$zX%_$zX~P'vO#g#gO%[&TO%_&TO~O!f&UOh&sX%[&sXz&sX#[&sX#g&sX%_&sX#Z&sXg&sX~Oh!iO%[&WO~Okealeameaneaoeapeaseazea{ea!xea#gea%[ea%_ea%zeagea!Tea!Uea%{ea!Wea![ea!Qea#[eatea!mea~P%SOsqazqa{qa#gqa%[qa%_qa%zqa~Ok!pOl!qOm!oOn!oOo!rOp!sO!xqa~PEcO%z&YOz%yX{%yX~O%uWOz%yX{%yX~Oz&]O{wX~O{&_O~Oz%lO#g%}X%[%}X%_%}Xg%}X{%}X![%}X!m%}X%z%}X~OV0lOo0cOv0qO!PrO~P'vO%z#|O#gUa%[Ua%_Ua~Oz&hO#g&PX%[&PX%_&PXn&PX~P%SOz&kO!Q&jO#g#Wa%[#Wa%_#Wa~Oz&lO#[&nO#g&rX%[&rX%_&rXg&rX~O!f$YO!r$YO#Z&qO%uWO~O#Z&qO~Oz&sO#g&tX%[&tX%_&tX~Oz&uO#g&pX%[&pX%_&pX{&pX~O!X&wO%z&xO~Oz&|On&wX~P%SOn'PO~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO%['UO~P'vOt'YO#p'WO#q'XOP#naV#naf#nah#nao#nas#nav#na!P#na!Q#na!T#na!U#na!X#na!]#na!h#na!r#na!s#na!t#na!{#na!}#na#P#na#R#na#T#na#X#na#Z#na#^#na#_#na#a#na#c#na#l#na#o#na#s#na#u#na#z#na#}#na$P#na%X#na%o#na%p#na%t#na%u#na&Z#na&[#na&]#na&^#na&_#na&`#na&a#na&b#na&c#na&d#na&e#na&f#na&g#na&h#na&i#na&j#na%Z#na%_#na~Oz'ZO#[']O{&xX~Oh'_O!X&wO~Oh!iO{$jO!X&wO~O{'eO~P%SO%['hO%_'hO~OS'iO%['hO%_'hO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%k!]O~P!#uO%kWi~P!#uOV!aO_!aOa!bOh!iO!X!kO!f!mO%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%m!_O%n!_O~P!&pO%mWi%nWi~P!&pOa!bOh!iO!X!kO!f!mOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%mWi%nWi%oWi%pWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~OV!aO_!aO%q!aO%r!aO%s!aO~P!)nOVWi_Wi%qWi%rWi%sWi~P!)nO!T%dO!U%cOg&VXz&VX~O%z'kO%{'kO~P,eOz'mOg&UX~Og'oO~Oz'pO{'rO!W&XX~Oo0cOv0qOz'pO{'sO!W&XX~P'vO!W'uO~Om!oOn!oOo!rOp!sOkjisjizji{ji!xji#gji%[ji%_ji%zji~Ol!qO~P!.aOlji~P!.aOk0eOl0fOm0dOn0dOo0mOp0nO~Ot'wO~P!/jOV'|Og'}Oo0cOv0qO~P'vOg'}Oz(OO~Og(QO~O!U(SO~Og(TOz(OO!T%dO!U%cO~P%SOk0eOl0fOm0dOn0dOo0mOp0nOgqa!Tqa!Uqa%{qa!Wqa![qa!Qqa#[qatqa!mqa~PEcOV'|Oo0cOv0qO!W&Sa~P'vOz(WO!W&Sa~O!W(XO~Oz(WO!T%dO!U%cO!W&Sa~P%SOV(]Oo0cOv0qO![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~P'vOz(^O![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~O![(aO~Oz(^O!T%dO!U%cO![%}a~P%SOz(dO!T%dO!U%cO![&Ta~P%SOz(gO{&lX![&lX!m&lX%z&lX~O{(kO![(mO!m(nO%z(jO~OV&OOopOvqO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~P'vOz(pO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~O!f&UOh&sa%[&saz&sa#[&sa#g&sa%_&sa#Z&sag&sa~O%[(uO~OV#sOa#tO%uWO~Oz&]O{wa~OopOvqO~P'vOz(^O#g%}a%[%}a%_%}ag%}a{%}a![%}a!m%}a%z%}a~P%SOz(zO#g%hX%[%hX%_%hX%z%hX~O%z#|O#gUi%[Ui%_Ui~O#g&Pa%[&Pa%_&Pan&Pa~P'vOz(}O#g&Pa%[&Pa%_&Pan&Pa~O%uWO#g&ra%[&ra%_&rag&ra~Oz)SO#g&ra%[&ra%_&rag&ra~Og)VO~OV)WOh$WO%uWO~O#Z)XO~O%uWO#g&ta%[&ta%_&ta~Oz)ZO#g&ta%[&ta%_&ta~Oo0cOv0qO#g&pa%[&pa%_&pa{&pa~P'vOz)^O#g&pa%[&pa%_&pa{&pa~OV)`Oa)`O%uWO~O%z)eO~Ot)hO#j)gOP#hiV#hif#hih#hio#his#hiv#hi!P#hi!Q#hi!T#hi!U#hi!X#hi!]#hi!h#hi!r#hi!s#hi!t#hi!{#hi!}#hi#P#hi#R#hi#T#hi#X#hi#Z#hi#^#hi#_#hi#a#hi#c#hi#l#hi#o#hi#s#hi#u#hi#z#hi#}#hi$P#hi%X#hi%o#hi%p#hi%t#hi%u#hi&Z#hi&[#hi&]#hi&^#hi&_#hi&`#hi&a#hi&b#hi&c#hi&d#hi&e#hi&f#hi&g#hi&h#hi&i#hi&j#hi%Z#hi%_#hi~Ot)iOP#kiV#kif#kih#kio#kis#kiv#ki!P#ki!Q#ki!T#ki!U#ki!X#ki!]#ki!h#ki!r#ki!s#ki!t#ki!{#ki!}#ki#P#ki#R#ki#T#ki#X#ki#Z#ki#^#ki#_#ki#a#ki#c#ki#l#ki#o#ki#s#ki#u#ki#z#ki#}#ki$P#ki%X#ki%o#ki%p#ki%t#ki%u#ki&Z#ki&[#ki&]#ki&^#ki&_#ki&`#ki&a#ki&b#ki&c#ki&d#ki&e#ki&f#ki&g#ki&h#ki&i#ki&j#ki%Z#ki%_#ki~OV)kOn&wa~P'vOz)lOn&wa~Oz)lOn&wa~P%SOn)pO~O%Y)tO~Ot)wO#p'WO#q)vOP#niV#nif#nih#nio#nis#niv#ni!P#ni!Q#ni!T#ni!U#ni!X#ni!]#ni!h#ni!r#ni!s#ni!t#ni!{#ni!}#ni#P#ni#R#ni#T#ni#X#ni#Z#ni#^#ni#_#ni#a#ni#c#ni#l#ni#o#ni#s#ni#u#ni#z#ni#}#ni$P#ni%X#ni%o#ni%p#ni%t#ni%u#ni&Z#ni&[#ni&]#ni&^#ni&_#ni&`#ni&a#ni&b#ni&c#ni&d#ni&e#ni&f#ni&g#ni&h#ni&i#ni&j#ni%Z#ni%_#ni~OV)zOo0cOv0qO{$jO~P'vOo0cOv0qO{&xa~P'vOz*OO{&xa~OV*SOa*TOg*WO%q*UO%uWO~O{$jO&{*YO~Oh'_O~Oh!iO{$jO~O%[*_O~O%[*aO%_*aO~OV$}Oa$}Oo0cOv0qOg&Ua~P'vOz*dOg&Ua~Oo0cOv0qO{*gO!W&Xa~P'vOz*hO!W&Xa~Oo0cOv0qOz*hO{*kO!W&Xa~P'vOo0cOv0qOz*hO!W&Xa~P'vOz*hO{*kO!W&Xa~Om0dOn0dOo0mOp0nOgjikjisjizji!Tji!Uji%{ji!Wji{ji![ji#gji%[ji%_ji!Qji#[jitji!mji%zji~Ol0fO~P!NkOlji~P!NkOV'|Og*pOo0cOv0qO~P'vOn*rO~Og*pOz*tO~Og*uO~OV'|Oo0cOv0qO!W&Si~P'vOz*vO!W&Si~O!W*wO~OV(]Oo0cOv0qO![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~P'vOz*zO!T%dO!U%cO![&Ti~Oz*}O![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~O![+OO~Oa+QOo0cOv0qO![&Ti~P'vOz*zO![&Ti~O![+SO~OV+UOo0cOv0qO{&la![&la!m&la%z&la~P'vOz+VO{&la![&la!m&la%z&la~O!]+YO&n+[O![!nX~O![+^O~O{(kO![+_O~O{(kO![+_O!m+`O~OV&OOopOvqO{%hq!x%hq#g%hq%[%hq%_%hq%z%hq~P'vOz$ri{$ri!x$ri#g$ri%[$ri%_$ri%z$ri~P%SOV&OOopOvqO~P'vOV&OOo0cOv0qO#g%ha%[%ha%_%ha%z%ha~P'vOz+aO#g%ha%[%ha%_%ha%z%ha~Oz$ia#g$ia%[$ia%_$ian$ia~P%SO#g&Pi%[&Pi%_&Pin&Pi~P'vOz+dO#g#Wq%[#Wq%_#Wq~O#[+eOz$va#g$va%[$va%_$vag$va~O%uWO#g&ri%[&ri%_&rig&ri~Oz+gO#g&ri%[&ri%_&rig&ri~OV+iOh$WO%uWO~O%uWO#g&ti%[&ti%_&ti~Oo0cOv0qO#g&pi%[&pi%_&pi{&pi~P'vO{#{Oz#eX!W#eX~Oz+mO!W&uX~O!W+oO~Ot+rO#j)gOP#hqV#hqf#hqh#hqo#hqs#hqv#hq!P#hq!Q#hq!T#hq!U#hq!X#hq!]#hq!h#hq!r#hq!s#hq!t#hq!{#hq!}#hq#P#hq#R#hq#T#hq#X#hq#Z#hq#^#hq#_#hq#a#hq#c#hq#l#hq#o#hq#s#hq#u#hq#z#hq#}#hq$P#hq%X#hq%o#hq%p#hq%t#hq%u#hq&Z#hq&[#hq&]#hq&^#hq&_#hq&`#hq&a#hq&b#hq&c#hq&d#hq&e#hq&f#hq&g#hq&h#hq&i#hq&j#hq%Z#hq%_#hq~On$|az$|a~P%SOV)kOn&wi~P'vOz+yOn&wi~Oz,TO{$jO#[,TO~O#q,VOP#nqV#nqf#nqh#nqo#nqs#nqv#nq!P#nq!Q#nq!T#nq!U#nq!X#nq!]#nq!h#nq!r#nq!s#nq!t#nq!{#nq!}#nq#P#nq#R#nq#T#nq#X#nq#Z#nq#^#nq#_#nq#a#nq#c#nq#l#nq#o#nq#s#nq#u#nq#z#nq#}#nq$P#nq%X#nq%o#nq%p#nq%t#nq%u#nq&Z#nq&[#nq&]#nq&^#nq&_#nq&`#nq&a#nq&b#nq&c#nq&d#nq&e#nq&f#nq&g#nq&h#nq&i#nq&j#nq%Z#nq%_#nq~O#[,WOz%Oa{%Oa~Oo0cOv0qO{&xi~P'vOz,YO{&xi~O{#{O%z,[Og&zXz&zX~O%uWOg&zXz&zX~Oz,`Og&yX~Og,bO~O%Y,eO~O!T%dO!U%cOg&Viz&Vi~OV$}Oa$}Oo0cOv0qOg&Ui~P'vO{,hOz$la!W$la~Oo0cOv0qO{,iOz$la!W$la~P'vOo0cOv0qO{*gO!W&Xi~P'vOz,lO!W&Xi~Oo0cOv0qOz,lO!W&Xi~P'vOz,lO{,oO!W&Xi~Og$hiz$hi!W$hi~P%SOV'|Oo0cOv0qO~P'vOn,qO~OV'|Og,rOo0cOv0qO~P'vOV'|Oo0cOv0qO!W&Sq~P'vOz$gi![$gi#g$gi%[$gi%_$gig$gi{$gi!m$gi%z$gi~P%SOV(]Oo0cOv0qO~P'vOa+QOo0cOv0qO![&Tq~P'vOz,sO![&Tq~O![,tO~OV(]Oo0cOv0qO![%}q#g%}q%[%}q%_%}qg%}q{%}q!m%}q%z%}q~P'vO{,uO~OV+UOo0cOv0qO{&li![&li!m&li%z&li~P'vOz,zO{&li![&li!m&li%z&li~O!]+YO&n+[O![!na~O{(kO![,}O~OV&OOo0cOv0qO#g%hi%[%hi%_%hi%z%hi~P'vOz-OO#g%hi%[%hi%_%hi%z%hi~O%uWO#g&rq%[&rq%_&rqg&rq~Oz-RO#g&rq%[&rq%_&rqg&rq~OV)`Oa)`O%uWO!W&ua~Oz-TO!W&ua~On$|iz$|i~P%SOV)kO~P'vOV)kOn&wq~P'vOt-XOP#myV#myf#myh#myo#mys#myv#my!P#my!Q#my!T#my!U#my!X#my!]#my!h#my!r#my!s#my!t#my!{#my!}#my#P#my#R#my#T#my#X#my#Z#my#^#my#_#my#a#my#c#my#l#my#o#my#s#my#u#my#z#my#}#my$P#my%X#my%o#my%p#my%t#my%u#my&Z#my&[#my&]#my&^#my&_#my&`#my&a#my&b#my&c#my&d#my&e#my&f#my&g#my&h#my&i#my&j#my%Z#my%_#my~O%Z-]O%_-]O~P`O#q-^OP#nyV#nyf#nyh#nyo#nys#nyv#ny!P#ny!Q#ny!T#ny!U#ny!X#ny!]#ny!h#ny!r#ny!s#ny!t#ny!{#ny!}#ny#P#ny#R#ny#T#ny#X#ny#Z#ny#^#ny#_#ny#a#ny#c#ny#l#ny#o#ny#s#ny#u#ny#z#ny#}#ny$P#ny%X#ny%o#ny%p#ny%t#ny%u#ny&Z#ny&[#ny&]#ny&^#ny&_#ny&`#ny&a#ny&b#ny&c#ny&d#ny&e#ny&f#ny&g#ny&h#ny&i#ny&j#ny%Z#ny%_#ny~Oz-aO{$jO#[-aO~Oo0cOv0qO{&xq~P'vOz-dO{&xq~O%z,[Og&zaz&za~O{#{Og&zaz&za~OV*SOa*TO%q*UO%uWOg&ya~Oz-hOg&ya~O$S-lO~OV$}Oa$}Oo0cOv0qO~P'vOo0cOv0qO{-mOz$li!W$li~P'vOo0cOv0qOz$li!W$li~P'vO{-mOz$li!W$li~Oo0cOv0qO{*gO~P'vOo0cOv0qO{*gO!W&Xq~P'vOz-pO!W&Xq~Oo0cOv0qOz-pO!W&Xq~P'vOs-sO!T%dO!U%cOg&Oq!W&Oq![&Oqz&Oq~P!/jOa+QOo0cOv0qO![&Ty~P'vOz$ji![$ji~P%SOa+QOo0cOv0qO~P'vOV+UOo0cOv0qO~P'vOV+UOo0cOv0qO{&lq![&lq!m&lq%z&lq~P'vO{(kO![-xO!m-yO%z-wO~OV&OOo0cOv0qO#g%hq%[%hq%_%hq%z%hq~P'vO%uWO#g&ry%[&ry%_&ryg&ry~OV)`Oa)`O%uWO!W&ui~Ot-}OP#m!RV#m!Rf#m!Rh#m!Ro#m!Rs#m!Rv#m!R!P#m!R!Q#m!R!T#m!R!U#m!R!X#m!R!]#m!R!h#m!R!r#m!R!s#m!R!t#m!R!{#m!R!}#m!R#P#m!R#R#m!R#T#m!R#X#m!R#Z#m!R#^#m!R#_#m!R#a#m!R#c#m!R#l#m!R#o#m!R#s#m!R#u#m!R#z#m!R#}#m!R$P#m!R%X#m!R%o#m!R%p#m!R%t#m!R%u#m!R&Z#m!R&[#m!R&]#m!R&^#m!R&_#m!R&`#m!R&a#m!R&b#m!R&c#m!R&d#m!R&e#m!R&f#m!R&g#m!R&h#m!R&i#m!R&j#m!R%Z#m!R%_#m!R~Oo0cOv0qO{&xy~P'vOV*SOa*TO%q*UO%uWOg&yi~O$S-lO%Z.VO%_.VO~OV.aOh._O!X.^O!].`O!h.YO!s.[O!t.[O%p.XO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O~Oo0cOv0qOz$lq!W$lq~P'vO{.fOz$lq!W$lq~Oo0cOv0qO{*gO!W&Xy~P'vOz.gO!W&Xy~Oo0cOv.kO~P'vOs-sO!T%dO!U%cOg&Oy!W&Oy![&Oyz&Oy~P!/jO{(kO![.nO~O{(kO![.nO!m.oO~OV*SOa*TO%q*UO%uWO~Oh.tO!f.rOz$TX#[$TX%j$TXg$TX~Os$TX{$TX!W$TX![$TX~P$-bO%o.vO%p.vOs$UXz$UX{$UX#[$UX%j$UX!W$UXg$UX![$UX~O!h.xO~Oz.|O#[/OO%j.yOs&|X{&|X!W&|Xg&|X~Oa/RO~P$)zOh.tOs&}Xz&}X{&}X#[&}X%j&}X!W&}Xg&}X![&}X~Os/VO{$jO~Oo0cOv0qOz$ly!W$ly~P'vOo0cOv0qO{*gO!W&X!R~P'vOz/ZO!W&X!R~Og&RXs&RX!T&RX!U&RX!W&RX![&RXz&RX~P!/jOs-sO!T%dO!U%cOg&Qa!W&Qa![&Qaz&Qa~O{(kO![/^O~O!f.rOh$[as$[az$[a{$[a#[$[a%j$[a!W$[ag$[a![$[a~O!h/eO~O%o.vO%p.vOs$Uaz$Ua{$Ua#[$Ua%j$Ua!W$Uag$Ua![$Ua~O%j.yOs$Yaz$Ya{$Ya#[$Ya!W$Yag$Ya![$Ya~Os&|a{&|a!W&|ag&|a~P$)nOz/jOs&|a{&|a!W&|ag&|a~O!W/mO~Og/mO~O{/oO~O![/pO~Oo0cOv0qO{*gO!W&X!Z~P'vO{/sO~O%z/tO~P$-bOz/uO#[/OO%j.yOg'PX~Oz/uOg'PX~Og/wO~O!h/xO~O#[/OOs%Saz%Sa{%Sa%j%Sa!W%Sag%Sa![%Sa~O#[/OO%j.yOs%Waz%Wa{%Wa!W%Wag%Wa~Os&|i{&|i!W&|ig&|i~P$)nOz/zO#[/OO%j.yO!['Oa~Og'Pa~P$)nOz0SOg'Pa~Oa0UO!['Oi~P$)zOz0WO!['Oi~Oz0WO#[/OO%j.yO!['Oi~O#[/OO%j.yOg$biz$bi~O%z0ZO~P$-bO#[/OO%j.yOg%Vaz%Va~Og'Pi~P$)nO{0^O~Oa0UO!['Oq~P$)zOz0`O!['Oq~O#[/OO%j.yOz%Ui![%Ui~Oa0UO~P$)zOa0UO!['Oy~P$)zO#[/OO%j.yOg$ciz$ci~O#[/OO%j.yOz%Uq![%Uq~Oz+aO#g%ha%[%ha%_%ha%z%ha~P%SOV&OOo0cOv0qO~P'vOn0hO~Oo0hO~P'vO{0iO~Ot0jO~P!/jO&]&Z&j&h&i&g&f&d&e&c&b&`&a&_&^&[%u~",goto:"!=j'QPPPPPP'RP'Z*s+[+t,_,y-fP.SP'Z.r.r'ZPPP'Z2[PPPPPP2[5PPP5PP7b7k=sPP=v>h>kPP'Z'ZPP>zPP'Z'ZPP'Z'Z'Z'Z'Z?O?w'ZP?zP@QDXGuGyPG|HWH['ZPPPH_Hk'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RP'RPHqH}IVPI^IdPI^PI^I^PPPI^PKrPK{LVL]KrPI^LfPI^PLmLsPLwM]MzNeLwLwNkNxLwLwLwLw! ^! d! g! l! o! y!!P!!]!!o!!u!#P!#V!#s!#y!$P!$Z!$a!$g!$y!%T!%Z!%a!%k!%q!%w!%}!&T!&Z!&e!&k!&u!&{!'U!'[!'k!'s!'}!(UPPPPPPPPPPP!([!(_!(e!(n!(x!)TPPPPPPPPPPPP!-u!/Z!3^!6oPP!6w!7W!7a!8Y!8P!8c!8i!8l!8o!8r!8z!9jPPPPPPPPPPPPPPPPP!9m!9q!9wP!:]!:a!:m!:v!;S!;j!;m!;p!;v!;|!_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&n`&^ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To+PZS_&n`OY*xYZ%TZ]*x]^%T^#o*x#o#p+r#p#q*x#q#r+r#r;'S*x;'S;=`,^<%lO*x_+wTS_OY+rZ]+r^;'S+r;'S;=`,W<%lO+r_,ZP;=`<%l+ro,aP;=`<%l*xj,kV%rQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-XT!xY&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-oV%lQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.]V&n`&ZZOw%Twx.rx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.wV&n`Ow%Twx/^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/eT&n`&]ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/{ThZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc0cTgR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk0yXVZ&n`Oz%Tz{1f{!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk1mVaR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk2ZV%oZ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc2wTzR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To3_W%pZ&n`O!_%T!_!`-Q!`!a3w!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Td4OT&{S&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk4fX!fQ&n`O!O%T!O!P5R!P!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5WV&n`O!O%T!O!P5m!P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5tT!rZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti6[a!hX&n`O!Q%T!Q![6T![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S6T#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti7fZ&n`O{%T{|8X|}%T}!O8X!O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8^V&n`O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8z]!hX&n`O!Q%T!Q![8s![!l%T!l!m9s!m#R%T#R#S8s#S#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti9zT!hX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk:bX%qR&n`O!P%T!P!Q:}!Q!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj;UV%sQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti;ro!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!d%T!d!e?q!e!g%T!g!h7a!h!l%T!l!m9s!m!q%T!q!rA]!r!z%T!z!{Bq!{#R%T#R#S>_#S#U%T#U#V?q#V#X%T#X#Y7a#Y#^%T#^#_9s#_#c%T#c#dA]#d#l%T#l#mBq#m#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti=xV&n`O!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti>fc!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S>_#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti?vY&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti@mY!hX&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiAbX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBUX!hX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBv]&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiCv]!hX&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToDvV{_&n`O!_%T!_!`E]!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TcEdT%{R&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkEzT#gZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkFbXmR&n`O!^%T!^!_F}!_!`([!`!a([!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjGUV%mQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkGrV%zZ&n`O!_%T!_!`([!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkH`WmR&n`O!_%T!_!`([!`!aHx!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjIPV%nQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkIoV_Q#}P&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToJ_]&n`&YS%uZO!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoKZP;=`<%lJUoKge&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!tJU!t!uLx!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#gLx#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoMRa&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUkN_V&n`&`ZOr%TrsNts#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkNyV&n`Or%Trs! `s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! gT&n`&bZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! }V&n`&_ZOw%Twx!!dx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!!iV&n`Ow%Twx!#Ox#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!#VT&n`&aZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!#oe&n`&YS%uZOr%Trs!%Qsw%Twx!&px!Q%T!Q![JU![!c%T!c!tJU!t!u!(`!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#g!(`#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!%XV&n`&dZOr%Trs!%ns#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!%sV&n`Or%Trs!&Ys#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&aT&n`&fZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&wV&n`&cZOw%Twx!'^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!'cV&n`Ow%Twx!'xx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!(PT&n`&eZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!(ia&n`&YS%uZOr%Trs!)nsw%Twx!+^x!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!)uV&n`&hZOr%Trs!*[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[eIt,XRt,GRt,tIt,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:e=>rIt[e]||-1}],tokenPrec:7668}),See=new DU,Q_e=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function a2(e){return(t,n,i)=>{if(i)return!1;let r=t.node.getChild("VariableName");return r&&n(r,e),!0}}const aIt={FunctionDefinition:a2("function"),ClassDefinition:a2("class"),ForStatement(e,t,n){if(n){for(let i=e.node.firstChild;i;i=i.nextSibling)if(i.name=="VariableName")t(i,"variable");else if(i.name=="in")break}},ImportStatement(e,t){var n,i;let{node:r}=e,s=((n=r.firstChild)===null||n===void 0?void 0:n.name)=="from";for(let a=r.getChild("import");a;a=a.nextSibling)a.name=="VariableName"&&((i=a.nextSibling)===null||i===void 0?void 0:i.name)!="as"&&t(a,s?"variable":"namespace")},AssignStatement(e,t){for(let n=e.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")t(n,"variable");else if(n.name==":"||n.name=="AssignOp")break},ParamList(e,t){for(let n=null,i=e.node.firstChild;i;i=i.nextSibling)i.name=="VariableName"&&(!n||!/\*|AssignOp/.test(n.name))&&t(i,"variable"),n=i},CapturePattern:a2("variable"),AsPattern:a2("variable"),__proto__:null};function z_e(e,t){let n=See.get(t);if(n)return n;let i=[],r=!0;function s(a,l){let c=e.sliceString(a.from,a.to);i.push({label:c,type:l})}return t.cursor(er.IncludeAnonymous).iterate(a=>{if(a.name){let l=aIt[a.name];if(l&&l(a,s,r)||!r&&Q_e.has(a.name))return!1;r=!1}else if(a.to-a.from>8192){for(let l of z_e(e,a.node))i.push(l);return!1}}),See.set(t,i),i}const kee=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,V_e=["String","FormatString","Comment","PropertyName"];function oIt(e){let t=Sr(e.state).resolveInner(e.pos,-1);if(V_e.indexOf(t.name)>-1)return null;let n=t.name=="VariableName"||t.to-t.from<20&&kee.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let i=[];for(let r=t;r;r=r.parent)Q_e.has(r.name)&&(i=i.concat(z_e(e.state.doc,r)));return{options:i,from:n?t.from:e.pos,validFor:kee}}const lIt=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(e=>({label:e,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(e=>({label:e,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(e=>({label:e,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(e=>({label:e,type:"function"}))),cIt=[bs("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),bs("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),bs("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),bs("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),bs(`if \${}: -`,{label:"if",detail:"block",type:"keyword"}),bs("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),bs("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),bs("import ${module}",{label:"import",detail:"statement",type:"keyword"}),bs("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],oIt=bAe(z_e,cQ(sIt.concat(aIt)));function $5(e){let{node:t,pos:n}=e,i=e.lineIndent(n,-1),r=null;for(;;){let s=t.childBefore(n);if(s)if(s.name=="Comment")n=s.from;else if(s.name=="Body"||s.name=="MatchBody")e.baseIndentFor(s)+e.unit<=i&&(r=s),t=s;else if(s.name=="MatchClause")t=s;else if(s.type.is("Statement"))t=s;else break;else break}return r}function F5(e,t){let n=e.baseIndentFor(t),i=e.lineAt(e.pos,-1),r=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&e.node.ton?null:n+e.unit}const B5=$h.define({name:"python",parser:nIt.configure({props:[Zh.add({Body:e=>{var t;let n=/^\s*(#|$)/.test(e.textAfter)&&$5(e)||e.node;return(t=F5(e,n))!==null&&t!==void 0?t:e.continue()},MatchBody:e=>{var t;let n=$5(e);return(t=F5(e,n||e.node))!==null&&t!==void 0?t:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),"ForStatement WhileStatement":e=>/^\s*else:/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except[ :]|finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),MatchStatement:e=>/^\s*case /.test(e.textAfter)?e.baseIndent+e.unit:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":fv({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":fv({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":fv({closing:"]"}),MemberExpression:e=>e.baseIndent+e.unit,"String FormatString":()=>null,Script:e=>{var t;let n=$5(e);return(t=n&&F5(e,n))!==null&&t!==void 0?t:e.continue()}}),Jh.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":DE,Body:(e,t)=>({from:e.from+1,to:e.to-(e.to==t.doc.length?0:1)}),"String FormatString":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function lIt(){return new Dm(B5,[B5.data.of({autocomplete:rIt}),B5.data.of({autocomplete:oIt})])}const sy=63,Aee=64,cIt=1,uIt=2,V_e=3,dIt=4,H_e=5,fIt=6,hIt=7,q_e=65,pIt=66,mIt=8,gIt=9,bIt=10,yIt=11,vIt=12,W_e=13,xIt=19,OIt=20,wIt=29,SIt=33,kIt=34,EIt=47,CIt=0,jQ=1,t8=2,mk=3,n8=4;class Rg{constructor(t,n,i){this.parent=t,this.depth=n,this.type=i,this.hash=(t?t.hash+t.hash<<8:0)+n+(n<<4)+i}}Rg.top=new Rg(null,-1,CIt);function qw(e,t){for(let n=0,i=t-e.pos-1;;i--,n++){let r=e.peek(i);if(Bh(r)||r==-1)return n}}function i8(e){return e==32||e==9}function Bh(e){return e==10||e==13}function K_e(e){return i8(e)||Bh(e)}function Vg(e){return e<0||K_e(e)}const TIt=new wI({start:Rg.top,reduce(e,t){return e.type==mk&&(t==OIt||t==kIt)?e.parent:e},shift(e,t,n,i){if(t==V_e)return new Rg(e,qw(i,i.pos),jQ);if(t==q_e||t==H_e)return new Rg(e,qw(i,i.pos),t8);if(t==sy)return e.parent;if(t==xIt||t==SIt)return new Rg(e,0,mk);if(t==W_e&&e.type==n8)return e.parent;if(t==EIt){let r=/[1-9]/.exec(i.read(i.pos,n.pos));if(r)return new Rg(e,e.depth+ +r[0],n8)}return e},hash(e){return e.hash}});function fx(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&Vg(e.peek(n+3))}const AIt=new qs((e,t)=>{if(e.next==-1&&t.canShift(Aee))return e.acceptToken(Aee);let n=e.peek(-1);if((Bh(n)||n<0)&&t.context.type!=mk){if(fx(e,45))if(t.canShift(sy))e.acceptToken(sy);else return e.acceptToken(cIt,3);if(fx(e,46))if(t.canShift(sy))e.acceptToken(sy);else return e.acceptToken(uIt,3);let i=0;for(;e.next==32;)i++,e.advance();(i{if(t.context.type==mk){e.next==63&&(e.advance(),Vg(e.next)&&e.acceptToken(hIt));return}if(e.next==45)e.advance(),Vg(e.next)&&e.acceptToken(t.context.type==jQ&&t.context.depth==qw(e,e.pos-1)?dIt:V_e);else if(e.next==63)e.advance(),Vg(e.next)&&e.acceptToken(t.context.type==t8&&t.context.depth==qw(e,e.pos-1)?fIt:H_e);else{let n=e.pos;for(;;)if(i8(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)G_e(e);else if(e.next==38)r8(e);else if(e.next==42){r8(e);break}else if(e.next==39||e.next==34){if(RQ(e,!0))break;return}else if(e.next==91||e.next==123){if(!jIt(e))return;break}else{X_e(e,!0,!1,0);break}for(;i8(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(wIt))return;let i=e.peek(1);Vg(i)&&e.acceptTokenTo(t.context.type==t8&&t.context.depth==qw(e,n)?pIt:q_e,n)}}},{contextual:!0});function NIt(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function _ee(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function Nee(e,t){return e.next==37?(e.advance(),_ee(e.next)&&e.advance(),_ee(e.next)&&e.advance(),!0):NIt(e.next)||t&&e.next==44?(e.advance(),!0):!1}function G_e(e){if(e.advance(),e.next==60){for(e.advance();;)if(!Nee(e,!0)){e.next==62&&e.advance();break}}else for(;Nee(e,!1););}function r8(e){for(e.advance();!Vg(e.next)&&KN(e.next)!="f";)e.advance()}function RQ(e,t){let n=e.next,i=!1,r=e.pos;for(e.advance();;){let s=e.next;if(s<0)break;if(e.advance(),s==n)if(s==39)if(e.next==39)e.advance();else break;else break;else if(s==92&&n==34)e.next>=0&&e.advance();else if(Bh(s)){if(t)return!1;i=!0}else if(t&&e.pos>=r+1024)return!1}return!i}function jIt(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!RQ(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else{if(e.next<0||e.pos>n||Bh(e.next))return!1;e.advance()}}const RIt="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function KN(e){return e<33?"u":e>125?"s":RIt[e-33]}function U5(e,t){let n=KN(e);return n!="u"&&!(t&&n=="f")}function X_e(e,t,n,i){if(KN(e.next)=="s"||(e.next==63||e.next==58||e.next==45)&&U5(e.peek(1),n))e.advance();else return!1;let r=e.pos;for(;;){let s=e.next,a=0,l=i+1;for(;K_e(s);){if(Bh(s)){if(t)return!1;l=0}else l++;s=e.peek(++a)}if(!(s>=0&&(s==58?U5(e.peek(a+1),n):s==35?e.peek(a-1)!=32:U5(s,n)))||!n&&l<=i||l==0&&!n&&(fx(e,45,a)||fx(e,46,a)))break;if(t&&KN(s)=="f")return!1;for(let u=a;u>=0;u--)e.advance();if(t&&e.pos>r+1024)return!1}return!0}const IIt=new qs((e,t)=>{if(e.next==33)G_e(e),e.acceptToken(vIt);else if(e.next==38||e.next==42){let n=e.next==38?bIt:yIt;r8(e),e.acceptToken(n)}else e.next==39||e.next==34?(RQ(e,!1),e.acceptToken(gIt)):X_e(e,!1,t.context.type==mk,t.context.depth)&&e.acceptToken(mIt)}),PIt=new qs((e,t)=>{let n=t.context.type==n8?t.context.depth:-1,i=e.pos;e:for(;;){let r=0,s=e.next;for(;s==32;)s=e.peek(++r);if(!r&&(fx(e,45,r)||fx(e,46,r))||!Bh(s)&&(n<0&&(n=Math.max(t.context.depth+1,r)),rYAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:TIt,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[DIt],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[AIt,_It,IIt,PIt,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),LIt=$h.define({name:"yaml",parser:MIt.configure({props:[Zh.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name=="BlockLiteralContent"&&t.frome.pos)return null}}return null},FlowMapping:fv({closing:"}"}),FlowSequence:fv({closing:"]"})}),Jh.add({"FlowMapping FlowSequence":DE,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function $It(){return new Dm(LIt)}function FIt(e){Y_e(e,"start");var t={},n=e.languageData||{},i=!1;for(var r in e)if(r!=n&&e.hasOwnProperty(r))for(var s=t[r]=[],a=e[r],l=0;l2&&a.token&&typeof a.token!="string"){n.pending=[];for(var u=2;u-1)return null;var r=n.indent.length-1,s=e[n.state];e:for(;;){for(var a=0;a{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),i=PQ(e.state,n.from);return i.line?tPt(e):i.block?iPt(e):!1};function IQ(e,t){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=e(t,n);return r?(i(n.update(r)),!0):!1}}const tPt=IQ(aPt,0),nPt=IQ(nNe,0),iPt=IQ((e,t)=>nNe(e,t,sPt(t)),0);function PQ(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}const aO=50;function rPt(e,{open:t,close:n},i,r){let s=e.sliceDoc(i-aO,i),a=e.sliceDoc(r,r+aO),l=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(a)[0].length,u=s.length-l;if(s.slice(u-t.length,u)==t&&a.slice(c,c+n.length)==n)return{open:{pos:i-l,margin:l&&1},close:{pos:r+c,margin:c&&1}};let d,f;r-i<=2*aO?d=f=e.sliceDoc(i,r):(d=e.sliceDoc(i,i+aO),f=e.sliceDoc(r-aO,r));let h=/^\s*/.exec(d)[0].length,p=/\s*$/.exec(f)[0].length,g=f.length-p-n.length;return d.slice(h,h+t.length)==t&&f.slice(g,g+n.length)==n?{open:{pos:i+h+t.length,margin:/\s/.test(d.charAt(h+t.length))?1:0},close:{pos:r-p-n.length,margin:/\s/.test(f.charAt(g-1))?1:0}}:null}function sPt(e){let t=[];for(let n of e.selection.ranges){let i=e.doc.lineAt(n.from),r=n.to<=i.to?i:e.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:e.doc.lineAt(n.to-1));let s=t.length-1;s>=0&&t[s].to>i.from?t[s].to=r.to:t.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return t}function nNe(e,t,n=t.selection.ranges){let i=n.map(s=>PQ(t,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,a)=>rPt(t,i[a],s.from,s.to));if(e!=2&&!r.every(s=>s))return{changes:t.changes(n.map((s,a)=>r[a]?[]:[{from:s.from,insert:i[a].open+" "},{from:s.to,insert:" "+i[a].close}]))};if(e!=1&&r.some(s=>s)){let s=[];for(let a=0,l;ar&&(s==a||a>f.from)){r=f.from;let h=/^\s*/.exec(f.text)[0].length,p=h==f.length,g=f.text.slice(h,h+u.length)==u?h:-1;hs.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:c,indent:u,empty:d,single:f}of i)(f||!d)&&s.push({from:l.from+u,insert:c+" "});let a=t.changes(s);return{changes:a,selection:t.selection.map(a,1)}}else if(e!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:a,comment:l,token:c}of i)if(l>=0){let u=a.from+l,d=u+c.length;a.text[d-a.from]==" "&&d++,s.push({from:u,to:d})}return{changes:s}}return null}const a8=rf.define(),oPt=rf.define(),lPt=Vt.define(),iNe=Vt.define({combine(e){return sf(e,{minDepth:100,newGroupDelay:500,joinToEvent:(t,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,n)=>(i,r)=>t(i,r)||n(i,r)})}}),rNe=io.define({create(){return Dd.empty},update(e,t){let n=t.state.facet(iNe),i=t.annotation(a8);if(i){let c=hl.fromTransaction(t,i.selection),u=i.side,d=u==0?e.undone:e.done;return c?d=GN(d,d.length,n.minDepth,c):d=oNe(d,t.startState.selection),new Dd(u==0?i.rest:d,u==0?d:i.rest)}let r=t.annotation(oPt);if((r=="full"||r=="before")&&(e=e.isolate()),t.annotation(ia.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let s=hl.fromTransaction(t),a=t.annotation(ia.time),l=t.annotation(ia.userEvent);return s?e=e.addChanges(s,a,l,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,l,n.newGroupDelay)),(r=="full"||r=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new Dd(e.done.map(hl.fromJSON),e.undone.map(hl.fromJSON))}});function cPt(e={}){return[rNe,iNe.of(e),Pt.domEventHandlers({beforeinput(t,n){let i=t.inputType=="historyUndo"?sNe:t.inputType=="historyRedo"?o8:null;return i?(t.preventDefault(),i(n)):!1}})]}function CI(e,t){return function({state:n,dispatch:i}){if(!t&&n.readOnly)return!1;let r=n.field(rNe,!1);if(!r)return!1;let s=r.pop(e,n,t);return s?(i(s),!0):!1}}const sNe=CI(0,!1),o8=CI(1,!1),uPt=CI(0,!0),dPt=CI(1,!0);class hl{constructor(t,n,i,r,s){this.changes=t,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(t){return new hl(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,n,i;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(t){return new hl(t.changes&&pa.fromJSON(t.changes),[],t.mapped&&Qd.fromJSON(t.mapped),t.startSelection&&Ze.fromJSON(t.startSelection),t.selectionsAfter.map(Ze.fromJSON))}static fromTransaction(t,n){let i=Xc;for(let r of t.startState.facet(lPt)){let s=r(t);s.length&&(i=i.concat(s))}return!i.length&&t.changes.empty?null:new hl(t.changes.invert(t.startState.doc),i,void 0,n||t.startState.selection,Xc)}static selection(t){return new hl(void 0,Xc,void 0,void 0,t)}}function GN(e,t,n,i){let r=t+1>n+20?t-n-1:0,s=e.slice(r,t);return s.push(i),s}function fPt(e,t){let n=[],i=!1;return e.iterChangedRanges((r,s)=>n.push(r,s)),t.iterChangedRanges((r,s,a,l)=>{for(let c=0;c=u&&a<=d&&(i=!0)}}),i}function hPt(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((n,i)=>n.empty!=t.ranges[i].empty).length===0}function aNe(e,t){return e.length?t.length?e.concat(t):e:t}const Xc=[],pPt=200;function oNe(e,t){if(e.length){let n=e[e.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-pPt));return i.length&&i[i.length-1].eq(t)?e:(i.push(t),GN(e,e.length-1,1e9,n.setSelAfter(i)))}else return[hl.selection([t])]}function mPt(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function Q5(e,t){if(!e.length)return e;let n=e.length,i=Xc;for(;n;){let r=gPt(e[n-1],t,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=e.slice(0,n);return s[n-1]=r,s}else t=r.mapped,n--,i=r.selectionsAfter}return i.length?[hl.selection(i)]:Xc}function gPt(e,t,n){let i=aNe(e.selectionsAfter.length?e.selectionsAfter.map(l=>l.map(t)):Xc,n);if(!e.changes)return hl.selection(i);let r=e.changes.map(t),s=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(s):s;return new hl(r,Fn.mapEffects(e.effects,t),a,e.startSelection.map(s),i)}const bPt=/^(input\.type|delete)($|\.)/;class Dd{constructor(t,n,i=0,r=void 0){this.done=t,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Dd(this.done,this.undone):this}addChanges(t,n,i,r,s){let a=this.done,l=a[a.length-1];return l&&l.changes&&!l.changes.empty&&t.changes&&(!i||bPt.test(i))&&(!l.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?e.moveByChar(n,t):TI(n,t))}function wo(e){return e.textDirectionAt(e.state.selection.main.head)==Tr.LTR}const cNe=e=>lNe(e,!wo(e)),uNe=e=>lNe(e,wo(e));function dNe(e,t){return ed(e,n=>n.empty?e.moveByGroup(n,t):TI(n,t))}const vPt=e=>dNe(e,!wo(e)),xPt=e=>dNe(e,wo(e));function OPt(e,t,n){if(t.type.prop(n))return!0;let i=t.to-t.from;return i&&(i>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function AI(e,t,n){let i=wr(e).resolveInner(t.head),r=n?Pn.closedBy:Pn.openedBy;for(let c=t.head;;){let u=n?i.childAfter(c):i.childBefore(c);if(!u)break;OPt(e,u,r)?i=u:c=n?u.to:u.from}let s=i.type.prop(r),a,l;return s&&(a=n?Pd(e,i.from,1):Pd(e,i.to,-1))&&a.matched?l=n?a.end.to:a.end.from:l=n?i.to:i.from,Ze.cursor(l,n?-1:1)}const wPt=e=>ed(e,t=>AI(e.state,t,!wo(e))),SPt=e=>ed(e,t=>AI(e.state,t,wo(e)));function fNe(e,t){return ed(e,n=>{if(!n.empty)return TI(n,t);let i=e.moveVertically(n,t);return i.head!=n.head?i:e.moveToLineBoundary(n,t)})}const hNe=e=>fNe(e,!1),pNe=e=>fNe(e,!0);function mNe(e){let t=e.scrollDOM.clientHeighta.empty?e.moveVertically(a,t,n.height):TI(a,t));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let a=e.coordsAtPos(i.selection.main.head),l=e.scrollDOM.getBoundingClientRect(),c=l.top+n.marginTop,u=l.bottom-n.marginBottom;a&&a.top>c&&a.bottomgNe(e,!1),l8=e=>gNe(e,!0);function Xm(e,t,n){let i=e.lineBlockAt(t.head),r=e.moveToLineBoundary(t,n);if(r.head==t.head&&r.head!=(n?i.to:i.from)&&(r=e.moveToLineBoundary(t,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(e.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&t.head!=i.from+s&&(r=Ze.cursor(i.from+s))}return r}const kPt=e=>ed(e,t=>Xm(e,t,!0)),EPt=e=>ed(e,t=>Xm(e,t,!1)),CPt=e=>ed(e,t=>Xm(e,t,!wo(e))),TPt=e=>ed(e,t=>Xm(e,t,wo(e))),APt=e=>ed(e,t=>Ze.cursor(e.lineBlockAt(t.head).from,1)),_Pt=e=>ed(e,t=>Ze.cursor(e.lineBlockAt(t.head).to,-1));function NPt(e,t,n){let i=!1,r=s1(e.selection,s=>{let a=Pd(e,s.head,-1)||Pd(e,s.head,1)||s.head>0&&Pd(e,s.head-1,1)||s.headNPt(e,t);function lu(e,t,n){let i=s1(e.state.selection,r=>{r.undirectional&&r.head>=r.anchor!=t&&(r=Ze.range(r.head,r.anchor));let s=n(r);return Ze.range(r.anchor,s.head,s.goalColumn,s.bidiLevel||void 0,s.assoc)});return i.eq(e.state.selection)?!1:(e.dispatch(Ju(e.state,i)),!0)}function bNe(e,t){return lu(e,t,n=>e.moveByChar(n,t))}const yNe=e=>bNe(e,!wo(e)),vNe=e=>bNe(e,wo(e));function xNe(e,t){return lu(e,t,n=>e.moveByGroup(n,t))}const RPt=e=>xNe(e,!wo(e)),IPt=e=>xNe(e,wo(e)),PPt=e=>{let t=!wo(e);return lu(e,t,n=>AI(e.state,n,t))},DPt=e=>{let t=wo(e);return lu(e,t,n=>AI(e.state,n,t))};function ONe(e,t){return lu(e,t,n=>e.moveVertically(n,t))}const wNe=e=>ONe(e,!1),SNe=e=>ONe(e,!0);function kNe(e,t){return lu(e,t,n=>e.moveVertically(n,t,mNe(e).height))}const Ree=e=>kNe(e,!1),Iee=e=>kNe(e,!0),MPt=e=>lu(e,!0,t=>Xm(e,t,!0)),LPt=e=>lu(e,!1,t=>Xm(e,t,!1)),$Pt=e=>{let t=!wo(e);return lu(e,t,n=>Xm(e,n,t))},FPt=e=>{let t=wo(e);return lu(e,t,n=>Xm(e,n,t))},BPt=e=>lu(e,!1,t=>Ze.cursor(e.lineBlockAt(t.head).from)),UPt=e=>lu(e,!0,t=>Ze.cursor(e.lineBlockAt(t.head).to)),Pee=({state:e,dispatch:t})=>(t(Ju(e,{anchor:0})),!0),Dee=({state:e,dispatch:t})=>(t(Ju(e,{anchor:e.doc.length})),!0),Mee=({state:e,dispatch:t})=>(t(Ju(e,{anchor:e.selection.main.anchor,head:0})),!0),Lee=({state:e,dispatch:t})=>(t(Ju(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),QPt=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),zPt=({state:e,dispatch:t})=>{let n=_I(e).map(({from:i,to:r})=>Ze.range(i,Math.min(r+1,e.doc.length)));return t(e.update({selection:Ze.create(n),userEvent:"select"})),!0},VPt=({state:e,dispatch:t})=>{let n=s1(e.selection,i=>{let r=wr(e),s=r.resolveStack(i.from,1);if(i.empty){let a=r.resolveStack(i.from,-1);a.node.from>=s.node.from&&a.node.to<=s.node.to&&(s=a)}for(let a=s;a;a=a.next){let{node:l}=a;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&a.next)return Ze.range(l.to,l.from)}return i});return n.eq(e.selection)?!1:(t(Ju(e,n)),!0)};function ENe(e,t){let{state:n}=e,i=n.selection,r=n.selection.ranges.slice();for(let s of n.selection.ranges){let a=n.doc.lineAt(s.head);if(t?a.to0)for(let l=s;;){let c=e.moveVertically(l,t);if(c.heada.to){r.some(u=>u.head==c.head)||r.push(c);break}else{if(c.head==l.head)break;l=c}}}return r.length==i.ranges.length?!1:(e.dispatch(Ju(n,Ze.create(r,r.length-1))),!0)}const HPt=e=>ENe(e,!1),qPt=e=>ENe(e,!0),WPt=({state:e,dispatch:t})=>{let n=e.selection,i=null;return n.ranges.length>1?i=Ze.create([n.main]):n.main.empty||(i=Ze.create([Ze.cursor(n.main.head)])),i?(t(Ju(e,i)),!0):!1};function FE(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:i}=e,r=i.changeByRange(s=>{let{from:a,to:l}=s;if(a==l){let c=t(s);ca&&(n="delete.forward",c=u2(e,c,!0)),a=Math.min(a,c),l=Math.max(l,c)}else a=u2(e,a,!1),l=u2(e,l,!0);return a==l?{range:s}:{changes:{from:a,to:l},range:Ze.cursor(a,ar(e)))i.between(t,t,(r,s)=>{rt&&(t=n?s:r)});return t}const CNe=(e,t,n)=>FE(e,i=>{let r=i.from,{state:s}=e,a=s.doc.lineAt(r),l,c;if(n&&!t&&r>a.from&&rCNe(e,!1,!0),TNe=e=>CNe(e,!0,!1),ANe=(e,t)=>FE(e,n=>{let i=n.head,{state:r}=e,s=r.doc.lineAt(i),a=r.charCategorizer(i);for(let l=null;;){if(i==(t?s.to:s.from)){i==n.head&&s.number!=(t?r.doc.lines:1)&&(i+=t?1:-1);break}let c=ja(s.text,i-s.from,t)+s.from,u=s.text.slice(Math.min(i,c)-s.from,Math.max(i,c)-s.from),d=a(u);if(l!=null&&d!=l)break;(u!=" "||i!=n.head)&&(l=d),i=c}return i}),_Ne=e=>ANe(e,!1),KPt=e=>ANe(e,!0),GPt=e=>FE(e,t=>{let n=e.lineBlockAt(t.head).to;return t.headFE(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),YPt=e=>FE(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head{if(e.readOnly)return!1;let n=e.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Zi.of(["",""])},range:Ze.cursor(i.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},JPt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(i=>{if(!i.empty||i.from==0||i.from==e.doc.length)return{range:i};let r=i.from,s=e.doc.lineAt(r),a=r==s.from?r-1:ja(s.text,r-s.from,!1)+s.from,l=r==s.to?r+1:ja(s.text,r-s.from,!0)+s.from;return{changes:{from:a,to:l,insert:e.doc.slice(r,l).append(e.doc.slice(a,r))},range:Ze.cursor(l)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function _I(e){let t=[],n=-1;for(let i of e.selection.ranges){let r=e.doc.lineAt(i.from),s=e.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=e.doc.lineAt(i.to-1)),n>=r.number){let a=t[t.length-1];a.to=s.to,a.ranges.push(i)}else t.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return t}function NNe(e,t,n){if(e.readOnly)return!1;let i=[],r=[];for(let s of _I(e)){if(n?s.to==e.doc.length:s.from==0)continue;let a=e.doc.lineAt(n?s.to+1:s.from-1),l=a.length+1;if(n){i.push({from:s.to,to:a.to},{from:s.from,insert:a.text+e.lineBreak});for(let c of s.ranges)r.push(Ze.range(Math.min(e.doc.length,c.anchor+l),Math.min(e.doc.length,c.head+l)))}else{i.push({from:a.from,to:s.from},{from:s.to,insert:e.lineBreak+a.text});for(let c of s.ranges)r.push(Ze.range(c.anchor-l,c.head-l))}}return i.length?(t(e.update({changes:i,scrollIntoView:!0,selection:Ze.create(r,e.selection.mainIndex),userEvent:"move.line"})),!0):!1}const eDt=({state:e,dispatch:t})=>NNe(e,t,!1),tDt=({state:e,dispatch:t})=>NNe(e,t,!0);function jNe(e,t,n){if(e.readOnly)return!1;let i=[];for(let s of _I(e))n?i.push({from:s.from,insert:e.doc.slice(s.from,s.to)+e.lineBreak}):i.push({from:s.to,insert:e.lineBreak+e.doc.slice(s.from,s.to)});let r=e.changes(i);return t(e.update({changes:r,selection:e.selection.map(r,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const nDt=({state:e,dispatch:t})=>jNe(e,t,!1),iDt=({state:e,dispatch:t})=>jNe(e,t,!0),rDt=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(_I(t).map(({from:r,to:s})=>(r>0?r--:s{let s;if(e.lineWrapping){let a=e.lineBlockAt(r.head),l=e.coordsAtPos(r.head,r.assoc||1);l&&(s=a.bottom+e.documentTop-l.bottom+e.defaultLineHeight/2)}return e.moveVertically(r,!0,s)}).map(n);return e.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function sDt(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=wr(e).resolveInner(t),i=n.childBefore(t),r=n.childAfter(t),s;return i&&r&&i.to<=t&&r.from>=t&&(s=i.type.prop(Pn.closedBy))&&s.indexOf(r.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(r.from).from&&!/\S/.test(e.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const $ee=RNe(!1),aDt=RNe(!0);function RNe(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=t.changeByRange(r=>{let{from:s,to:a}=r,l=t.doc.lineAt(s),c=!e&&s==a&&sDt(t,s);e&&(s=a=(a<=l.to?l:t.doc.lineAt(a)).to);let u=new xI(t,{simulateBreak:s,simulateDoubleBreak:!!c}),d=iQ(u,s);for(d==null&&(d=Qu(/^\s*/.exec(t.doc.lineAt(s).text)[0],t.tabSize));al.from&&s{let r=[];for(let a=i.from;a<=i.to;){let l=e.doc.lineAt(a);l.number>n&&(i.empty||i.to>l.from)&&(t(l,r,i),n=l.number),a=l.to+1}let s=e.changes(r);return{changes:r,range:Ze.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const oDt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),i=new xI(e,{overrideIndentation:s=>{let a=n[s];return a??-1}}),r=DQ(e,(s,a,l)=>{let c=iQ(i,s.from);if(c==null)return;/\S/.test(s.text)||(c=0);let u=/^\s*/.exec(s.text)[0],d=sk(e,c);(u!=d||l.frome.readOnly?!1:(t(e.update(DQ(e,(n,i)=>{i.push({from:n.from,insert:e.facet(i1)})}),{userEvent:"input.indent"})),!0),PNe=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(DQ(e,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=Qu(r,e.tabSize),a=0,l=sk(e,Math.max(0,s-Ib(e)));for(;a(e.setTabFocusMode(),!0),cDt=[{key:"Ctrl-b",run:cNe,shift:yNe,preventDefault:!0},{key:"Ctrl-f",run:uNe,shift:vNe},{key:"Ctrl-p",run:hNe,shift:wNe},{key:"Ctrl-n",run:pNe,shift:SNe},{key:"Ctrl-a",run:APt,shift:BPt},{key:"Ctrl-e",run:_Pt,shift:UPt},{key:"Ctrl-d",run:TNe},{key:"Ctrl-h",run:c8},{key:"Ctrl-k",run:GPt},{key:"Ctrl-Alt-h",run:_Ne},{key:"Ctrl-o",run:ZPt},{key:"Ctrl-t",run:JPt},{key:"Ctrl-v",run:l8}],uDt=[{key:"ArrowLeft",run:cNe,shift:yNe,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:vPt,shift:RPt,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:CPt,shift:$Pt,preventDefault:!0},{key:"ArrowRight",run:uNe,shift:vNe,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:xPt,shift:IPt,preventDefault:!0},{mac:"Cmd-ArrowRight",run:TPt,shift:FPt,preventDefault:!0},{key:"ArrowUp",run:hNe,shift:wNe,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Pee,shift:Mee},{mac:"Ctrl-ArrowUp",run:jee,shift:Ree},{key:"ArrowDown",run:pNe,shift:SNe,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Dee,shift:Lee},{mac:"Ctrl-ArrowDown",run:l8,shift:Iee},{key:"PageUp",run:jee,shift:Ree},{key:"PageDown",run:l8,shift:Iee},{key:"Home",run:EPt,shift:LPt,preventDefault:!0},{key:"Mod-Home",run:Pee,shift:Mee},{key:"End",run:kPt,shift:MPt,preventDefault:!0},{key:"Mod-End",run:Dee,shift:Lee},{key:"Enter",run:$ee,shift:$ee},{key:"Mod-a",run:QPt},{key:"Backspace",run:c8,shift:c8,preventDefault:!0},{key:"Delete",run:TNe,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:_Ne,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:KPt,preventDefault:!0},{mac:"Mod-Backspace",run:XPt,preventDefault:!0},{mac:"Mod-Delete",run:YPt,preventDefault:!0}].concat(cDt.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),dDt=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:wPt,shift:PPt},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:SPt,shift:DPt},{key:"Alt-ArrowUp",run:eDt},{key:"Shift-Alt-ArrowUp",run:nDt},{key:"Alt-ArrowDown",run:tDt},{key:"Shift-Alt-ArrowDown",run:iDt},{key:"Mod-Alt-ArrowUp",run:HPt},{key:"Mod-Alt-ArrowDown",run:qPt},{key:"Escape",run:WPt},{key:"Mod-Enter",run:aDt},{key:"Alt-l",mac:"Ctrl-l",run:zPt},{key:"Mod-i",run:VPt,preventDefault:!0},{key:"Mod-[",run:PNe},{key:"Mod-]",run:INe},{key:"Mod-Alt-\\",run:oDt},{key:"Shift-Mod-k",run:rDt},{key:"Shift-Mod-\\",run:jPt},{key:"Mod-/",run:ePt},{key:"Alt-A",run:nPt},{key:"Ctrl-m",mac:"Shift-Alt-m",run:lDt}].concat(uDt),fDt={key:"Tab",run:INe,shift:PNe},Fee=typeof String.prototype.normalize=="function"?e=>e.normalize("NFKD"):e=>e;class hx{constructor(t,n,i=0,r=t.length,s,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,r),this.bufferStart=i,this.normalize=s?l=>s(Fee(l)):Fee,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return al(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let n=LU(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=kd(t);let r=this.normalize(n);if(r.length)for(let s=0,a=i,l=!0;;s++){let c=r.charCodeAt(s),u=this.match(c,a,l,this.bufferPos+this.bufferStart,s==r.length-1);if(u)return this.value=u,this;if(s==r.length-1)break;l&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=XN(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,precise:!0,match:n},this;t=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let l=new gv(n,t.sliceString(n,i));return z5.set(t,l),l}if(r.from==n&&r.to==i)return r;let{text:s,from:a}=r;return a>n&&(s=t.sliceString(n,a)+s,a=n),r.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==t&&(this.re.lastIndex=t+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,precise:!0,match:n},this.matchPos=XN(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=gv.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(MNe.prototype[Symbol.iterator]=LNe.prototype[Symbol.iterator]=function(){return this});function hDt(e){try{return new RegExp(e,MQ),!0}catch{return!1}}function XN(e,t){if(t>=e.length)return t;let n=e.lineAt(t),i;for(;t=56320&&i<57344;)t++;return t}const pDt=e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:i,result:r}=ETt(e,{label:t.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:t.phrase("go")});return r.then(s=>{let a=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!a){e.dispatch({effects:i});return}let l=t.doc.lineAt(t.selection.main.head),[,c,u,d,f]=a,h=d?+d.slice(1):0,p=u?+u:l.number;if(u&&f){let v=p/100;c&&(v=v*(c=="-"?-1:1)+l.number/t.doc.lines),p=Math.round(t.doc.lines*v)}else u&&c&&(p=p*(c=="-"?-1:1)+l.number);let g=t.doc.line(Math.max(1,Math.min(t.doc.lines,p))),b=Ze.cursor(g.from+Math.max(0,Math.min(h,g.length)));e.dispatch({effects:[i,Pt.scrollIntoView(b.from,{y:"center"})],selection:b})}),!0},mDt={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},gDt=Vt.define({combine(e){return sf(e,mDt,{highlightWordAroundCursor:(t,n)=>t||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function bDt(e){return[wDt,ODt]}const yDt=mn.mark({class:"cm-selectionMatch"}),vDt=mn.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Bee(e,t,n,i){return(n==0||e(t.sliceDoc(n-1,n))!=ls.Word)&&(i==t.doc.length||e(t.sliceDoc(i,i+1))!=ls.Word)}function xDt(e,t,n,i){return e(t.sliceDoc(n,n+1))==ls.Word&&e(t.sliceDoc(i-1,i))==ls.Word}const ODt=Ns.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(gDt),{state:n}=e,i=n.selection;if(i.ranges.length>1)return mn.none;let r=i.main,s,a=null;if(r.empty){if(!t.highlightWordAroundCursor)return mn.none;let c=n.wordAt(r.head);if(!c)return mn.none;a=n.charCategorizer(r.head),s=n.sliceDoc(c.from,c.to)}else{let c=r.to-r.from;if(c200)return mn.none;if(t.wholeWords){if(s=n.sliceDoc(r.from,r.to),a=n.charCategorizer(r.head),!(Bee(a,n,r.from,r.to)&&xDt(a,n,r.from,r.to)))return mn.none}else if(s=n.sliceDoc(r.from,r.to),!s)return mn.none}let l=[];for(let c of e.visibleRanges){let u=new hx(n.doc,s,c.from,c.to);for(;!u.next().done;){let{from:d,to:f}=u.value;if((!a||Bee(a,n,d,f))&&(r.empty&&d<=r.from&&f>=r.to?l.push(vDt.range(d,f)):(d>=r.to||f<=r.from)&&l.push(yDt.range(d,f)),l.length>t.maxMatches))return mn.none}}return mn.set(l)}},{decorations:e=>e.decorations}),wDt=Pt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),SDt=({state:e,dispatch:t})=>{let{selection:n}=e,i=Ze.create(n.ranges.map(r=>e.wordAt(r.head)||Ze.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(t(e.update({selection:i})),!0)};function kDt(e,t){let{main:n,ranges:i}=e.selection,r=e.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let a=!1,l=new hx(e.doc,t,i[i.length-1].to);;)if(l.next(),l.done){if(a)return null;l=new hx(e.doc,t,0,Math.max(0,i[i.length-1].from-1)),a=!0}else{if(a&&i.some(c=>c.from==l.value.from))continue;if(s){let c=e.wordAt(l.value.from);if(!c||c.from!=l.value.from||c.to!=l.value.to)continue}return l.value}}const EDt=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(s=>s.from===s.to))return SDt({state:e,dispatch:t});let i=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(s=>e.sliceDoc(s.from,s.to)!=i))return!1;let r=kDt(e,i);return r?(t(e.update({selection:e.selection.addRange(Ze.range(r.from,r.to),!1),effects:Pt.scrollIntoView(r.to)})),!0):!1},a1=Vt.define({combine(e){return sf(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new FDt(t),scrollToMatch:t=>Pt.scrollIntoView(t)})}});class $Ne{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||hDt(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord,this.test=t.test}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` -`:i=="r"?"\r":i=="t"?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord&&this.test==t.test}create(){return this.regexp?new jDt(this):new ADt(this)}getCursor(t,n=0,i){let r=t.doc?t:ji.create({doc:t});return i==null&&(i=r.doc.length),this.regexp?oy(this,r,n,i):ay(this,r,n,i)}}class FNe{constructor(t){this.spec=t}}function CDt(e,t,n){return(i,r,s,a)=>{if(n&&!n(i,r,s,a))return!1;let l=i>=a&&r<=a+s.length?s.slice(i-a,r-a):t.doc.sliceString(i,r);return e(l,t,i,r)}}function ay(e,t,n,i){let r;return e.wholeWord&&(r=TDt(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(r=CDt(e.test,t,r)),new hx(t.doc,e.unquoted,n,i,e.caseSensitive?void 0:s=>s.toLowerCase(),r)}function TDt(e,t){return(n,i,r,s)=>((s>n||s+r.length=n)return null;r.push(i.value)}return r}highlight(t,n,i,r){let s=ay(this.spec,t,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function _Dt(e,t,n){return(i,r,s)=>(!n||n(i,r,s))&&e(s[0],t,i,r)}function oy(e,t,n,i){let r;return e.wholeWord&&(r=NDt(t.charCategorizer(t.selection.main.head))),e.test&&(r=_Dt(e.test,t,r)),new MNe(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:r},n,i)}function YN(e,t){return e.slice(ja(e,t,!1),t)}function ZN(e,t){return e.slice(t,ja(e,t))}function NDt(e){return(t,n,i)=>!i[0].length||(e(YN(i.input,i.index))!=ls.Word||e(ZN(i.input,i.index))!=ls.Word)&&(e(ZN(i.input,i.index+i[0].length))!=ls.Word||e(YN(i.input,i.index+i[0].length))!=ls.Word)}class jDt extends FNe{nextMatch(t,n,i){let r=oy(this.spec,t,i,t.doc.length).next();return r.done&&(r=oy(this.spec,t,0,n).next()),r.done?null:r.value}prevMatchInRange(t,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),a=oy(this.spec,t,s,i),l=null;for(;!a.next().done;)l=a.value;if(l&&(s==n||l.from>s+10))return l;if(s==n)return null}}prevMatch(t,n,i){return this.prevMatchInRange(t,0,n)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return t.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let s=+i.slice(0,r);if(s>0&&s=n)return null;r.push(i.value)}return r}highlight(t,n,i,r){let s=oy(this.spec,t,Math.max(0,n-250),Math.min(i+250,t.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const gk=Fn.define(),LQ=Fn.define(),um=io.define({create(e){return new V5(u8(e).create(),null)},update(e,t){for(let n of t.effects)n.is(gk)?e=new V5(n.value.create(),e.panel):n.is(LQ)&&(e=new V5(e.query,n.value?$Q:null));return e},provide:e=>ik.from(e,t=>t.panel)});class V5{constructor(t,n){this.query=t,this.panel=n}}const RDt=mn.mark({class:"cm-searchMatch"}),IDt=mn.mark({class:"cm-searchMatch cm-searchMatch-selected"}),PDt=Ns.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(um))}update(e){let t=e.state.field(um);(t!=e.startState.field(um)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return mn.none;let{view:n}=this,i=new Dh;for(let r=0,s=n.visibleRanges,a=s.length;rs[r+1].from-2*250;)c=s[++r].to;e.highlight(n.state,l,c,(u,d)=>{let f=n.state.selection.ranges.some(h=>h.from==u&&h.to==d);i.add(u,d,f?IDt:RDt)})}return i.finish()}},{decorations:e=>e.decorations});function BE(e){return t=>{let n=t.state.field(um,!1);return n&&n.query.spec.valid?e(t,n):QNe(t)}}const JN=BE((e,{query:t})=>{let{to:n}=e.state.selection.main,i=t.nextMatch(e.state,n,n);if(!i)return!1;let r=Ze.single(i.from,i.to),s=e.state.facet(a1);return e.dispatch({selection:r,effects:[FQ(e,i),s.scrollToMatch(r.main,e)],userEvent:"select.search"}),UNe(e),!0}),ej=BE((e,{query:t})=>{let{state:n}=e,{from:i}=n.selection.main,r=t.prevMatch(n,i,i);if(!r)return!1;let s=Ze.single(r.from,r.to),a=e.state.facet(a1);return e.dispatch({selection:s,effects:[FQ(e,r),a.scrollToMatch(s.main,e)],userEvent:"select.search"}),UNe(e),!0}),DDt=BE((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:Ze.create(n.map(i=>Ze.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),MDt=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],a=0;for(let l=new hx(e.doc,e.sliceDoc(i,r));!l.next().done;){if(s.length>1e3)return!1;l.value.from==i&&(a=s.length),s.push(Ze.range(l.value.from,l.value.to))}return t(e.update({selection:Ze.create(s,a),userEvent:"select.search.matches"})),!0},Uee=BE((e,{query:t})=>{let{state:n}=e,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=t.nextMatch(n,i,i);if(!s)return!1;let a=s,l=[],c,u,d=[];a.precise?a.from==i&&a.to==r&&(u=n.toText(t.getReplacement(a)),l.push({from:a.from,to:a.to,insert:u}),a=t.nextMatch(n,a.from,a.to),d.push(Pt.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))):a=t.nextMatch(n,a.from,a.to);let f=e.state.changes(l);return a&&(c=Ze.single(a.from,a.to).map(f),d.push(FQ(e,a)),d.push(n.facet(a1).scrollToMatch(c.main,e))),e.dispatch({changes:f,selection:c,effects:d,userEvent:"input.replace"}),!0}),LDt=BE((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:s,to:a,precise:l}=r;l&&n.push({from:s,to:a,insert:t.getReplacement(r)})}if(!n.length)return!1;let i=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:Pt.announce.of(i),userEvent:"input.replace.all"}),!0});function $Q(e){return e.state.facet(a1).createPanel(e)}function u8(e,t){var n,i,r,s,a;let l=e.selection.main,c=l.empty||l.to>l.from+100?"":e.sliceDoc(l.from,l.to);if(t&&!c)return t;let u=e.facet(a1);return new $Ne({search:((n=t==null?void 0:t.literal)!==null&&n!==void 0?n:u.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(i=t==null?void 0:t.caseSensitive)!==null&&i!==void 0?i:u.caseSensitive,literal:(r=t==null?void 0:t.literal)!==null&&r!==void 0?r:u.literal,regexp:(s=t==null?void 0:t.regexp)!==null&&s!==void 0?s:u.regexp,wholeWord:(a=t==null?void 0:t.wholeWord)!==null&&a!==void 0?a:u.wholeWord})}function BNe(e){let t=tQ(e,$Q);return t&&t.dom.querySelector("[main-field]")}function UNe(e){let t=BNe(e);t&&t==e.root.activeElement&&t.select()}const QNe=e=>{let t=e.state.field(um,!1);if(t&&t.panel){let n=BNe(e);if(n&&n!=e.root.activeElement){let i=u8(e.state,t.query.spec);i.valid&&e.dispatch({effects:gk.of(i)}),n.focus(),n.select()}}else e.dispatch({effects:[LQ.of(!0),t?gk.of(u8(e.state,t.query.spec)):Fn.appendConfig.of(UDt)]});return!0},zNe=e=>{let t=e.state.field(um,!1);if(!t||!t.panel)return!1;let n=tQ(e,$Q);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:LQ.of(!1)}),!0},$Dt=[{key:"Mod-f",run:QNe,scope:"editor search-panel"},{key:"F3",run:JN,shift:ej,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:JN,shift:ej,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:zNe,scope:"editor search-panel"},{key:"Mod-Shift-l",run:MDt},{key:"Mod-Alt-g",run:pDt},{key:"Mod-d",run:EDt,preventDefault:!0}];class FDt{constructor(t){this.view=t;let n=this.query=t.state.field(um).query.spec;this.commit=this.commit.bind(this),this.searchField=yr("input",{value:n.search,placeholder:Ml(t,"Find"),"aria-label":Ml(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=yr("input",{value:n.replace,placeholder:Ml(t,"Replace"),"aria-label":Ml(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=yr("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=yr("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=yr("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,a){return yr("button",{class:"cm-button",name:r,onclick:s,type:"button"},a)}this.dom=yr("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>JN(t),[Ml(t,"next")]),i("prev",()=>ej(t),[Ml(t,"previous")]),i("select",()=>DDt(t),[Ml(t,"all")]),yr("label",null,[this.caseField,Ml(t,"match case")]),yr("label",null,[this.reField,Ml(t,"regexp")]),yr("label",null,[this.wordField,Ml(t,"by word")]),...t.state.readOnly?[]:[yr("br"),this.replaceField,i("replace",()=>Uee(t),[Ml(t,"replace")]),i("replaceAll",()=>LDt(t),[Ml(t,"replace all")])],yr("button",{name:"close",onclick:()=>zNe(t),"aria-label":Ml(t,"close"),type:"button"},["×"])])}commit(){let t=new $Ne({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:gk.of(t)}))}keydown(t){PCt(this.view,t,"search-panel")?t.preventDefault():t.keyCode==13&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?ej:JN)(this.view)):t.keyCode==13&&t.target==this.replaceField&&(t.preventDefault(),Uee(this.view))}update(t){for(let n of t.transactions)for(let i of n.effects)i.is(gk)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(a1).top}}function Ml(e,t){return e.state.phrase(t)}const d2=30,f2=/[\s\.,:;?!]/;function FQ(e,{from:t,to:n}){let i=e.state.doc.lineAt(t),r=e.state.doc.lineAt(n).to,s=Math.max(i.from,t-d2),a=Math.min(r,n+d2),l=e.state.sliceDoc(s,a);if(s!=i.from){for(let c=0;cl.length-d2;c--)if(!f2.test(l[c-1])&&f2.test(l[c])){l=l.slice(0,c);break}}return Pt.announce.of(`${e.state.phrase("current match")}. ${l} ${e.state.phrase("on line")} ${i.number}.`)}const BDt=Pt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),UDt=[um,Xh.low(PDt),BDt];class Qee{constructor(t,n,i){this.from=t,this.to=n,this.diagnostic=i}}class Ig{constructor(t,n,i){this.diagnostics=t,this.panel=n,this.selected=i}static init(t,n,i){let r=i.facet(bk).markerFilter;r&&(t=r(t,i));let s=t.slice().sort((p,g)=>p.from-g.from||p.to-g.to),a=new Dh,l=[],c=0,u=i.doc.iter(),d=0,f=i.doc.length;for(let p=0;;){let g=p==s.length?null:s[p];if(!g&&!l.length)break;let b,v;if(l.length)b=c,v=l.reduce((w,O)=>Math.min(w,O.to),g&&g.from>b?g.from:1e8);else{if(b=g.from,b>f)break;v=g.to,l.push(g),p++}for(;pw.from||w.to==b))l.push(w),p++,v=Math.min(w.to,v);else{v=Math.min(w.from,v);break}}v=Math.min(v,f);let y=!1;if(l.some(w=>w.from==b&&(w.to==v||v==f))&&(y=b==v,!y&&v-b<10)){let w=b-(d+u.value.length);w>0&&(u.next(w),d=b);for(let O=b;;){if(O>=v){y=!0;break}if(!u.lineBreak&&d+u.value.length>O)break;O=d+u.value.length,d+=u.value.length,u.next()}}let x=eMt(l);if(y)a.add(b,b,mn.widget({widget:new XDt(x),diagnostics:l.slice()}));else{let w=l.reduce((O,k)=>k.markClass?O+" "+k.markClass:O,"");a.add(b,v,mn.mark({class:"cm-lintRange cm-lintRange-"+x+w,diagnostics:l.slice(),inclusiveEnd:l.some(O=>O.to>v)}))}if(c=v,c==f)break;for(let w=0;w{if(!(t&&a.diagnostics.indexOf(t)<0))if(!i)i=new Qee(r,s,t||a.diagnostics[0]);else{if(a.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new Qee(i.from,s,i.diagnostic)}}),i}function QDt(e,t){let n=t.pos,i=t.end||n,r=e.state.facet(bk).hideOn(e,n,i);if(r!=null)return r;let s=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(a=>a.is(VNe))||e.changes.touchesRange(s.from,Math.max(s.to,i)))}function zDt(e,t){return e.field(Jl,!1)?t:t.concat(Fn.appendConfig.of(tMt))}const VNe=Fn.define(),BQ=Fn.define(),HNe=Fn.define(),Jl=io.define({create(){return new Ig(mn.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),i=null,r=e.panel;if(e.selected){let s=t.changes.mapPos(e.selected.from,1);i=Mm(n,e.selected.diagnostic,s)||Mm(n,null,s)}!n.size&&r&&t.state.facet(bk).autoPanel&&(r=null),e=new Ig(n,r,i)}for(let n of t.effects)if(n.is(VNe)){let i=t.state.facet(bk).autoPanel?n.value.length?yk.open:null:e.panel;e=Ig.init(n.value,i,t.state)}else n.is(BQ)?e=new Ig(e.diagnostics,n.value?yk.open:null,e.selected):n.is(HNe)&&(e=new Ig(e.diagnostics,e.panel,n.value));return e},provide:e=>[ik.from(e,t=>t.panel),Pt.decorations.from(e,t=>t.diagnostics)]}),VDt=mn.mark({class:"cm-lintRange cm-lintRange-active"});function HDt(e,t,n){let{diagnostics:i}=e.state.field(Jl),r,s=-1,a=-1;i.between(t-(n<0?1:0),t+(n>0?1:0),(c,u,{spec:d})=>{if(t>=c&&t<=u&&(c==u||(t>c||n>0)&&(tWNe(e,n,!1)))}const WDt=e=>{let t=e.state.field(Jl,!1);(!t||!t.panel)&&e.dispatch({effects:zDt(e.state,[BQ.of(!0)])});let n=tQ(e,yk.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},zee=e=>{let t=e.state.field(Jl,!1);return!t||!t.panel?!1:(e.dispatch({effects:BQ.of(!1)}),!0)},KDt=e=>{let t=e.state.field(Jl,!1);if(!t)return!1;let n=e.state.selection.main,i=Mm(t.diagnostics,null,n.to+1);return!i&&(i=Mm(t.diagnostics,null,0),!i||i.from==n.from&&i.to==n.to)?!1:(e.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),STt(e,i.from,1,{tooltip:KNe,until:r=>r.docChanged||r.newSelection.main.headi.to}),!0)},GDt=[{key:"Mod-Shift-m",run:WDt,preventDefault:!0},{key:"F8",run:KDt}],bk=Vt.define({combine(e){return{sources:e.map(t=>t.source).filter(t=>t!=null),...sf(e.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:Vee,tooltipFilter:Vee,needsRefresh:(t,n)=>t?n?i=>t(i)||n(i):t:n,hideOn:(t,n)=>t?n?(i,r,s)=>t(i,r,s)||n(i,r,s):t:n,autoPanel:(t,n)=>t||n})}}});function Vee(e,t){return e?t?(n,i)=>t(e(n,i),i):e:t}function qNe(e){let t=[];if(e)e:for(let{name:n}of e){for(let i=0;is.toLowerCase()==r.toLowerCase())){t.push(r);continue e}}t.push("")}return t}function WNe(e,t,n){var i;let r=n?qNe(t.actions):[];return yr("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},yr("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),(i=t.actions)===null||i===void 0?void 0:i.map((s,a)=>{let l=!1,c=p=>{if(p.preventDefault(),l)return;l=!0;let g=Mm(e.state.field(Jl).diagnostics,t);g&&s.apply(e,g.from,g.to)},{name:u}=s,d=r[a]?u.indexOf(r[a]):-1,f=d<0?u:[u.slice(0,d),yr("u",u.slice(d,d+1)),u.slice(d+1)],h=s.markClass?" "+s.markClass:"";return yr("button",{type:"button",class:"cm-diagnosticAction"+h,onclick:c,onmousedown:c,"aria-label":` Action: ${u}${d<0?"":` (access key "${r[a]})"`}.`},f)}),t.source&&yr("div",{class:"cm-diagnosticSource"},t.source))}class XDt extends Zu{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return yr("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Hee{constructor(t,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=WNe(t,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class yk{constructor(t){this.view=t,this.items=[];let n=r=>{if(!(r.ctrlKey||r.altKey||r.metaKey)){if(r.keyCode==27)zee(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],a=qNe(s.actions);for(let l=0;l{for(let s=0;szee(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Jl).selected;if(!t)return-1;for(let n=0;n{for(let d of u.diagnostics){if(a.has(d))continue;a.add(d);let f=-1,h;for(let p=i;pi&&(this.items.splice(i,f-i),r=!0)),n&&h.diagnostic==n.diagnostic?h.dom.hasAttribute("aria-selected")||(h.dom.setAttribute("aria-selected","true"),s=h):h.dom.hasAttribute("aria-selected")&&h.dom.removeAttribute("aria-selected"),i++}});i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:c})=>{let u=c.height/this.list.offsetHeight;l.topc.bottom&&(this.list.scrollTop+=(l.bottom-c.bottom)/u)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let t=this.list.firstChild;function n(){let i=t;t=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;t!=i.dom;)n();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t);for(;t;)n()}moveSelection(t){if(this.selectedIndex<0)return;let n=this.view.state.field(Jl),i=Mm(n.diagnostics,this.items[t].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:HNe.of(i)})}static open(t){return new yk(t)}}function YDt(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function h2(e){return YDt(``,'width="6" height="3"')}const ZDt=Pt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:h2("#f11")},".cm-lintRange-warning":{backgroundImage:h2("orange")},".cm-lintRange-info":{backgroundImage:h2("#999")},".cm-lintRange-hint":{backgroundImage:h2("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function JDt(e){return e=="error"?4:e=="warning"?3:e=="info"?2:1}function eMt(e){let t="hint",n=1;for(let i of e){let r=JDt(i.severity);r>n&&(n=r,t=i.severity)}return t}const KNe=wTt(HDt,{hideOn:QDt}),tMt=[Jl,Pt.decorations.compute([Jl],e=>{let{selected:t,panel:n}=e.field(Jl);return!t||!n||t.from==t.to?mn.none:mn.set([VDt.range(t.from,t.to)])}),KNe,ZDt];var qee=function(t){t===void 0&&(t={});var n=t,i=n.crosshairCursor,r=i===void 0?!1:i,s=[];t.closeBracketsKeymap!==!1&&(s=s.concat(l_t)),t.defaultKeymap!==!1&&(s=s.concat(dDt)),t.searchKeymap!==!1&&(s=s.concat($Dt)),t.historyKeymap!==!1&&(s=s.concat(yPt)),t.foldKeymap!==!1&&(s=s.concat(f2t)),t.completionKeymap!==!1&&(s=s.concat(CAe)),t.lintKeymap!==!1&&(s=s.concat(GDt));var a=[];return t.lineNumbers!==!1&&a.push(z2e()),t.highlightActiveLineGutter!==!1&&a.push($Tt()),t.highlightSpecialChars!==!1&&a.push(YCt()),t.history!==!1&&a.push(cPt()),t.foldGutter!==!1&&a.push(g2t()),t.drawSelection!==!1&&a.push(BCt()),t.dropCursor!==!1&&a.push(HCt()),t.allowMultipleSelections!==!1&&a.push(ji.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&a.push(r2t()),t.syntaxHighlighting!==!1&&a.push(rAe(x2t,{fallback:!0})),t.bracketMatching!==!1&&a.push(T2t()),t.closeBrackets!==!1&&a.push(r_t()),t.autocompletion!==!1&&a.push(m_t()),t.rectangularSelection!==!1&&a.push(dTt()),r!==!1&&a.push(pTt()),t.highlightActiveLine!==!1&&a.push(iTt()),t.highlightSelectionMatches!==!1&&a.push(bDt()),t.tabSize&&typeof t.tabSize=="number"&&a.push(i1.of(" ".repeat(t.tabSize))),a.concat([n1.of(s.flat())]).filter(Boolean)};const nMt="#e5c07b",Wee="#e06c75",iMt="#56b6c2",rMt="#ffffff",PA="#abb2bf",d8="#7d8799",sMt="#61afef",aMt="#98c379",Kee="#d19a66",oMt="#c678dd",lMt="#21252b",Gee="#2c313a",Xee="#282c34",H5="#353a42",cMt="#3E4451",Yee="#528bff",uMt=Pt.theme({"&":{color:PA,backgroundColor:Xee},".cm-content":{caretColor:Yee},".cm-cursor, .cm-dropCursor":{borderLeftColor:Yee},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:cMt},".cm-panels":{backgroundColor:lMt,color:PA},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Xee,color:d8,border:"none"},".cm-activeLineGutter":{backgroundColor:Gee},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:H5},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:H5,borderBottomColor:H5},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Gee,color:PA}}},{dark:!0}),dMt=LE.define([{tag:ne.keyword,color:oMt},{tag:[ne.name,ne.deleted,ne.character,ne.propertyName,ne.macroName],color:Wee},{tag:[ne.function(ne.variableName),ne.labelName],color:sMt},{tag:[ne.color,ne.constant(ne.name),ne.standard(ne.name)],color:Kee},{tag:[ne.definition(ne.name),ne.separator],color:PA},{tag:[ne.typeName,ne.className,ne.number,ne.changed,ne.annotation,ne.modifier,ne.self,ne.namespace],color:nMt},{tag:[ne.operator,ne.operatorKeyword,ne.url,ne.escape,ne.regexp,ne.link,ne.special(ne.string)],color:iMt},{tag:[ne.meta,ne.comment],color:d8},{tag:ne.strong,fontWeight:"bold"},{tag:ne.emphasis,fontStyle:"italic"},{tag:ne.strikethrough,textDecoration:"line-through"},{tag:ne.link,color:d8,textDecoration:"underline"},{tag:ne.heading,fontWeight:"bold",color:Wee},{tag:[ne.atom,ne.bool,ne.special(ne.variableName)],color:Kee},{tag:[ne.processingInstruction,ne.string,ne.inserted],color:aMt},{tag:ne.invalid,color:rMt}]),fMt=[uMt,rAe(dMt)];var hMt=Pt.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),pMt=function(t){t===void 0&&(t={});var n=t,i=n.indentWithTab,r=i===void 0?!0:i,s=n.editable,a=s===void 0?!0:s,l=n.readOnly,c=l===void 0?!1:l,u=n.theme,d=u===void 0?"light":u,f=n.placeholder,h=f===void 0?"":f,p=n.basicSetup,g=p===void 0?!0:p,b=[];switch(r&&b.unshift(n1.of([fDt])),g&&(typeof g=="boolean"?b.unshift(qee()):b.unshift(qee(g))),h&&b.unshift(oTt(h)),d){case"light":b.push(hMt);break;case"dark":b.push(fMt);break;case"none":break;default:b.push(d);break}return a===!1&&b.push(Pt.editable.of(!1)),c&&b.push(ji.readOnly.of(!0)),[...b]},mMt=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(t=>!t.empty)});class gMt{constructor(t,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(n=>{try{n()}catch(i){console.error("TimeoutLatch callback error:",i)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class Zee{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var q5=null,bMt=()=>typeof window>"u"?new Zee:(q5||(q5=new Zee),q5),yMt=Pt.theme({"& .cm-scroller":{height:"100% !important"}}),Jee=null,W5=null;function vMt(e,t,n,i,r,s){if(!e&&!t&&!n&&!i&&!r&&!s)return null;var a=JSON.stringify({height:e,minHeight:t,maxHeight:n,width:i,minWidth:r,maxWidth:s});return a===Jee||(Jee=a,W5=Pt.theme({"&":{height:e,minHeight:t,maxHeight:n,width:i,minWidth:r,maxWidth:s}})),W5}var ete=rf.define(),xMt=200,OMt=[];function wMt(e){var t=e.value,n=e.selection,i=e.onChange,r=e.onStatistics,s=e.onCreateEditor,a=e.onUpdate,l=e.extensions,c=l===void 0?OMt:l,u=e.autoFocus,d=e.theme,f=d===void 0?"light":d,h=e.height,p=h===void 0?null:h,g=e.minHeight,b=g===void 0?null:g,v=e.maxHeight,y=v===void 0?null:v,x=e.width,w=x===void 0?null:x,O=e.minWidth,k=O===void 0?null:O,S=e.maxWidth,E=S===void 0?null:S,C=e.placeholder,N=C===void 0?"":C,_=e.editable,j=_===void 0?!0:_,T=e.readOnly,L=T===void 0?!1:T,A=e.indentWithTab,R=A===void 0?!0:A,P=e.basicSetup,$=P===void 0?!0:P,M=e.root,B=e.initialState,I=m.useState(),H=I[0],X=I[1],Q=m.useState(),q=Q[0],U=Q[1],te=m.useState(),le=te[0],oe=te[1],re=m.useState(()=>({current:null}))[0],he=m.useState(()=>({current:null}))[0],K=vMt(p,b,y,w,k,E),G=Pt.updateListener.of(ke=>{if(ke.docChanged&&typeof i=="function"&&!ke.transactions.some(Be=>Be.annotation(ete))){re.current?re.current.reset():(re.current=new gMt(()=>{if(he.current){var Be=he.current;he.current=null,Be()}re.current=null},xMt),bMt().add(re.current));var Te=ke.state.doc,rt=Te.toString();i(rt,ke)}r&&r(mMt(ke))}),se=pMt({theme:f,editable:j,readOnly:L,placeholder:N,indentWithTab:R,basicSetup:$}),de=[G,...K?[K]:[],yMt,...se];return a&&typeof a=="function"&&de.push(Pt.updateListener.of(a)),de=de.concat(c),m.useLayoutEffect(()=>{if(H&&!le){var ke={doc:t,selection:n,extensions:de},Te=B?ji.fromJSON(B.json,ke,B.fields):ji.create(ke);if(oe(Te),!q){var rt=new Pt({state:Te,parent:H,root:M});U(rt),s&&s(rt,Te)}}return()=>{q&&(oe(void 0),U(void 0))}},[H,le]),m.useEffect(()=>{e.container&&X(e.container)},[e.container]),m.useEffect(()=>()=>{q&&(q.destroy(),U(void 0)),re.current&&(re.current.cancel(),re.current=null)},[q]),m.useEffect(()=>{u&&q&&q.focus()},[u,q]),m.useEffect(()=>{q&&q.dispatch({effects:Fn.reconfigure.of(de)})},[f,c,p,b,y,w,k,E,N,j,L,R,$,i,a]),m.useEffect(()=>{if(t!==void 0){var ke=q?q.state.doc.toString():"";if(q&&t!==ke){var Te=re.current&&!re.current.isDone,rt=()=>{q&&t!==q.state.doc.toString()&&q.dispatch({changes:{from:0,to:q.state.doc.toString().length,insert:t||""},annotations:[ete.of(!0)]})};Te?he.current=rt:rt()}}},[t,q]),{state:le,setState:oe,view:q,setView:U,container:H,setContainer:X}}var SMt=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],GNe=m.forwardRef((e,t)=>{var n=e.className,i=e.value,r=i===void 0?"":i,s=e.selection,a=e.extensions,l=a===void 0?[]:a,c=e.onChange,u=e.onStatistics,d=e.onCreateEditor,f=e.onUpdate,h=e.autoFocus,p=e.theme,g=p===void 0?"light":p,b=e.height,v=e.minHeight,y=e.maxHeight,x=e.width,w=e.minWidth,O=e.maxWidth,k=e.basicSetup,S=e.placeholder,E=e.indentWithTab,C=e.editable,N=e.readOnly,_=e.root,j=e.initialState,T=JIt(e,SMt),L=m.useRef(null),A=wMt({root:_,value:r,autoFocus:h,theme:g,height:b,minHeight:v,maxHeight:y,width:x,minWidth:w,maxWidth:O,basicSetup:k,placeholder:S,indentWithTab:E,editable:C,readOnly:N,selection:s,onChange:c,onStatistics:u,onCreateEditor:d,onUpdate:f,extensions:l,initialState:j}),R=A.state,P=A.view,$=A.container,M=A.setContainer;m.useImperativeHandle(t,()=>({editor:L.current,state:R,view:P}),[L,$,R,P]);var B=m.useCallback(H=>{L.current=H,M(H)},[M]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var I=typeof g=="string"?"cm-theme-"+g:"cm-theme";return o.jsx("div",s8({ref:B,className:""+I+(n?" "+n:"")},T))});GNe.displayName="CodeMirror";function XNe(e){const t=e.toLowerCase(),n=t.split("/").pop()??t,i=n.includes(".")?n.split(".").pop():"";return n==="dockerfile"||n.startsWith("dockerfile.")||n.endsWith(".dockerfile")?[sQ.define(ZIt)]:i==="py"||i==="pyi"?[lIt()]:["ts","tsx","mts","cts"].includes(i??"")?[q$({typescript:!0,jsx:i==="tsx"})]:["js","jsx","mjs","cjs"].includes(i??"")?[q$({jsx:i==="jsx"})]:i==="json"||i==="jsonc"?[A_t()]:i==="yaml"||i==="yml"?[$It()]:["md","markdown"].includes(i??"")?[Qjt()]:[]}function UE({value:e,path:t,onChange:n,readOnly:i=!1,theme:r="light",lineNumberStart:s=1,height:a="100%",minHeight:l,maxHeight:c}){const u=m.useMemo(()=>[...XNe(t),...s===1?[]:[z2e({formatNumber:d=>String(d+s-1)})]],[s,t]);return o.jsx(GNe,{value:e,height:a,minHeight:l,maxHeight:c,theme:r,extensions:u,editable:!i,onChange:n,basicSetup:{lineNumbers:s===1,foldGutter:!0,highlightActiveLine:!0,highlightActiveLineGutter:!0,autocompletion:!1}})}const YNe=Object.freeze(Object.defineProperty({__proto__:null,default:UE,languageFor:XNe},Symbol.toStringTag,{value:"Module"}));function kMt(e){var s;const t=e.split(/\r?\n/);if(((s=t[0])==null?void 0:s.trim())!=="---")return{body:e,frontmatter:[]};const n=t.findIndex((a,l)=>l>0&&a.trim()==="---");if(n<0)return{body:e,frontmatter:[]};const i=fTe(t.slice(1,n).join(` +`,{label:"if",detail:"block",type:"keyword"}),bs("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),bs("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),bs("import ${module}",{label:"import",detail:"statement",type:"keyword"}),bs("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],uIt=yAe(V_e,lQ(lIt.concat(cIt)));function M5(e){let{node:t,pos:n}=e,i=e.lineIndent(n,-1),r=null;for(;;){let s=t.childBefore(n);if(s)if(s.name=="Comment")n=s.from;else if(s.name=="Body"||s.name=="MatchBody")e.baseIndentFor(s)+e.unit<=i&&(r=s),t=s;else if(s.name=="MatchClause")t=s;else if(s.type.is("Statement"))t=s;else break;else break}return r}function L5(e,t){let n=e.baseIndentFor(t),i=e.lineAt(e.pos,-1),r=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&e.node.ton?null:n+e.unit}const $5=Ih.define({name:"python",parser:sIt.configure({props:[Wh.add({Body:e=>{var t;let n=/^\s*(#|$)/.test(e.textAfter)&&M5(e)||e.node;return(t=L5(e,n))!==null&&t!==void 0?t:e.continue()},MatchBody:e=>{var t;let n=M5(e);return(t=L5(e,n||e.node))!==null&&t!==void 0?t:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),"ForStatement WhileStatement":e=>/^\s*else:/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except[ :]|finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),MatchStatement:e=>/^\s*case /.test(e.textAfter)?e.baseIndent+e.unit:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":lv({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":lv({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":lv({closing:"]"}),MemberExpression:e=>e.baseIndent+e.unit,"String FormatString":()=>null,Script:e=>{var t;let n=M5(e);return(t=n&&L5(e,n))!==null&&t!==void 0?t:e.continue()}}),Kh.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":RE,Body:(e,t)=>({from:e.from+1,to:e.to-(e.to==t.doc.length?0:1)}),"String FormatString":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function dIt(){return new Nm($5,[$5.data.of({autocomplete:oIt}),$5.data.of({autocomplete:uIt})])}const ty=63,Eee=64,fIt=1,hIt=2,H_e=3,pIt=4,q_e=5,mIt=6,gIt=7,W_e=65,bIt=66,yIt=8,vIt=9,xIt=10,OIt=11,wIt=12,K_e=13,SIt=19,kIt=20,EIt=29,CIt=33,TIt=34,AIt=47,_It=0,NQ=1,e8=2,fk=3,t8=4;class Ag{constructor(t,n,i){this.parent=t,this.depth=n,this.type=i,this.hash=(t?t.hash+t.hash<<8:0)+n+(n<<4)+i}}Ag.top=new Ag(null,-1,_It);function Uw(e,t){for(let n=0,i=t-e.pos-1;;i--,n++){let r=e.peek(i);if(Dh(r)||r==-1)return n}}function n8(e){return e==32||e==9}function Dh(e){return e==10||e==13}function G_e(e){return n8(e)||Dh(e)}function Ug(e){return e<0||G_e(e)}const NIt=new xI({start:Ag.top,reduce(e,t){return e.type==fk&&(t==kIt||t==TIt)?e.parent:e},shift(e,t,n,i){if(t==H_e)return new Ag(e,Uw(i,i.pos),NQ);if(t==W_e||t==q_e)return new Ag(e,Uw(i,i.pos),e8);if(t==ty)return e.parent;if(t==SIt||t==CIt)return new Ag(e,0,fk);if(t==K_e&&e.type==t8)return e.parent;if(t==AIt){let r=/[1-9]/.exec(i.read(i.pos,n.pos));if(r)return new Ag(e,e.depth+ +r[0],t8)}return e},hash(e){return e.hash}});function lx(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&Ug(e.peek(n+3))}const jIt=new Hs((e,t)=>{if(e.next==-1&&t.canShift(Eee))return e.acceptToken(Eee);let n=e.peek(-1);if((Dh(n)||n<0)&&t.context.type!=fk){if(lx(e,45))if(t.canShift(ty))e.acceptToken(ty);else return e.acceptToken(fIt,3);if(lx(e,46))if(t.canShift(ty))e.acceptToken(ty);else return e.acceptToken(hIt,3);let i=0;for(;e.next==32;)i++,e.advance();(i{if(t.context.type==fk){e.next==63&&(e.advance(),Ug(e.next)&&e.acceptToken(gIt));return}if(e.next==45)e.advance(),Ug(e.next)&&e.acceptToken(t.context.type==NQ&&t.context.depth==Uw(e,e.pos-1)?pIt:H_e);else if(e.next==63)e.advance(),Ug(e.next)&&e.acceptToken(t.context.type==e8&&t.context.depth==Uw(e,e.pos-1)?mIt:q_e);else{let n=e.pos;for(;;)if(n8(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)X_e(e);else if(e.next==38)i8(e);else if(e.next==42){i8(e);break}else if(e.next==39||e.next==34){if(jQ(e,!0))break;return}else if(e.next==91||e.next==123){if(!PIt(e))return;break}else{Y_e(e,!0,!1,0);break}for(;n8(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(EIt))return;let i=e.peek(1);Ug(i)&&e.acceptTokenTo(t.context.type==e8&&t.context.depth==Uw(e,n)?bIt:W_e,n)}}},{contextual:!0});function IIt(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function Cee(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function Tee(e,t){return e.next==37?(e.advance(),Cee(e.next)&&e.advance(),Cee(e.next)&&e.advance(),!0):IIt(e.next)||t&&e.next==44?(e.advance(),!0):!1}function X_e(e){if(e.advance(),e.next==60){for(e.advance();;)if(!Tee(e,!0)){e.next==62&&e.advance();break}}else for(;Tee(e,!1););}function i8(e){for(e.advance();!Ug(e.next)&&HN(e.next)!="f";)e.advance()}function jQ(e,t){let n=e.next,i=!1,r=e.pos;for(e.advance();;){let s=e.next;if(s<0)break;if(e.advance(),s==n)if(s==39)if(e.next==39)e.advance();else break;else break;else if(s==92&&n==34)e.next>=0&&e.advance();else if(Dh(s)){if(t)return!1;i=!0}else if(t&&e.pos>=r+1024)return!1}return!i}function PIt(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!jQ(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else{if(e.next<0||e.pos>n||Dh(e.next))return!1;e.advance()}}const DIt="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function HN(e){return e<33?"u":e>125?"s":DIt[e-33]}function F5(e,t){let n=HN(e);return n!="u"&&!(t&&n=="f")}function Y_e(e,t,n,i){if(HN(e.next)=="s"||(e.next==63||e.next==58||e.next==45)&&F5(e.peek(1),n))e.advance();else return!1;let r=e.pos;for(;;){let s=e.next,a=0,l=i+1;for(;G_e(s);){if(Dh(s)){if(t)return!1;l=0}else l++;s=e.peek(++a)}if(!(s>=0&&(s==58?F5(e.peek(a+1),n):s==35?e.peek(a-1)!=32:F5(s,n)))||!n&&l<=i||l==0&&!n&&(lx(e,45,a)||lx(e,46,a)))break;if(t&&HN(s)=="f")return!1;for(let u=a;u>=0;u--)e.advance();if(t&&e.pos>r+1024)return!1}return!0}const MIt=new Hs((e,t)=>{if(e.next==33)X_e(e),e.acceptToken(wIt);else if(e.next==38||e.next==42){let n=e.next==38?xIt:OIt;i8(e),e.acceptToken(n)}else e.next==39||e.next==34?(jQ(e,!1),e.acceptToken(vIt)):Y_e(e,!1,t.context.type==fk,t.context.depth)&&e.acceptToken(yIt)}),LIt=new Hs((e,t)=>{let n=t.context.type==t8?t.context.depth:-1,i=e.pos;e:for(;;){let r=0,s=e.next;for(;s==32;)s=e.peek(++r);if(!r&&(lx(e,45,r)||lx(e,46,r))||!Dh(s)&&(n<0&&(n=Math.max(t.context.depth+1,r)),rYAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:NIt,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[$It],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[jIt,RIt,MIt,LIt,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),BIt=Ih.define({name:"yaml",parser:FIt.configure({props:[Wh.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name=="BlockLiteralContent"&&t.frome.pos)return null}}return null},FlowMapping:lv({closing:"}"}),FlowSequence:lv({closing:"]"})}),Kh.add({"FlowMapping FlowSequence":RE,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function UIt(){return new Nm(BIt)}function QIt(e){Z_e(e,"start");var t={},n=e.languageData||{},i=!1;for(var r in e)if(r!=n&&e.hasOwnProperty(r))for(var s=t[r]=[],a=e[r],l=0;l2&&a.token&&typeof a.token!="string"){n.pending=[];for(var u=2;u-1)return null;var r=n.indent.length-1,s=e[n.state];e:for(;;){for(var a=0;a{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),i=IQ(e.state,n.from);return i.line?rPt(e):i.block?aPt(e):!1};function RQ(e,t){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=e(t,n);return r?(i(n.update(r)),!0):!1}}const rPt=RQ(cPt,0),sPt=RQ(iNe,0),aPt=RQ((e,t)=>iNe(e,t,lPt(t)),0);function IQ(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}const tO=50;function oPt(e,{open:t,close:n},i,r){let s=e.sliceDoc(i-tO,i),a=e.sliceDoc(r,r+tO),l=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(a)[0].length,u=s.length-l;if(s.slice(u-t.length,u)==t&&a.slice(c,c+n.length)==n)return{open:{pos:i-l,margin:l&&1},close:{pos:r+c,margin:c&&1}};let d,f;r-i<=2*tO?d=f=e.sliceDoc(i,r):(d=e.sliceDoc(i,i+tO),f=e.sliceDoc(r-tO,r));let h=/^\s*/.exec(d)[0].length,p=/\s*$/.exec(f)[0].length,g=f.length-p-n.length;return d.slice(h,h+t.length)==t&&f.slice(g,g+n.length)==n?{open:{pos:i+h+t.length,margin:/\s/.test(d.charAt(h+t.length))?1:0},close:{pos:r-p-n.length,margin:/\s/.test(f.charAt(g-1))?1:0}}:null}function lPt(e){let t=[];for(let n of e.selection.ranges){let i=e.doc.lineAt(n.from),r=n.to<=i.to?i:e.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:e.doc.lineAt(n.to-1));let s=t.length-1;s>=0&&t[s].to>i.from?t[s].to=r.to:t.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return t}function iNe(e,t,n=t.selection.ranges){let i=n.map(s=>IQ(t,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,a)=>oPt(t,i[a],s.from,s.to));if(e!=2&&!r.every(s=>s))return{changes:t.changes(n.map((s,a)=>r[a]?[]:[{from:s.from,insert:i[a].open+" "},{from:s.to,insert:" "+i[a].close}]))};if(e!=1&&r.some(s=>s)){let s=[];for(let a=0,l;ar&&(s==a||a>f.from)){r=f.from;let h=/^\s*/.exec(f.text)[0].length,p=h==f.length,g=f.text.slice(h,h+u.length)==u?h:-1;hs.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:c,indent:u,empty:d,single:f}of i)(f||!d)&&s.push({from:l.from+u,insert:c+" "});let a=t.changes(s);return{changes:a,selection:t.selection.map(a,1)}}else if(e!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:a,comment:l,token:c}of i)if(l>=0){let u=a.from+l,d=u+c.length;a.text[d-a.from]==" "&&d++,s.push({from:u,to:d})}return{changes:s}}return null}const s8=tf.define(),uPt=tf.define(),dPt=Vt.define(),rNe=Vt.define({combine(e){return nf(e,{minDepth:100,newGroupDelay:500,joinToEvent:(t,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,n)=>(i,r)=>t(i,r)||n(i,r)})}}),sNe=no.define({create(){return Id.empty},update(e,t){let n=t.state.facet(rNe),i=t.annotation(s8);if(i){let c=fl.fromTransaction(t,i.selection),u=i.side,d=u==0?e.undone:e.done;return c?d=qN(d,d.length,n.minDepth,c):d=lNe(d,t.startState.selection),new Id(u==0?i.rest:d,u==0?d:i.rest)}let r=t.annotation(uPt);if((r=="full"||r=="before")&&(e=e.isolate()),t.annotation(ta.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let s=fl.fromTransaction(t),a=t.annotation(ta.time),l=t.annotation(ta.userEvent);return s?e=e.addChanges(s,a,l,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,l,n.newGroupDelay)),(r=="full"||r=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new Id(e.done.map(fl.fromJSON),e.undone.map(fl.fromJSON))}});function fPt(e={}){return[sNe,rNe.of(e),Pt.domEventHandlers({beforeinput(t,n){let i=t.inputType=="historyUndo"?aNe:t.inputType=="historyRedo"?a8:null;return i?(t.preventDefault(),i(n)):!1}})]}function kI(e,t){return function({state:n,dispatch:i}){if(!t&&n.readOnly)return!1;let r=n.field(sNe,!1);if(!r)return!1;let s=r.pop(e,n,t);return s?(i(s),!0):!1}}const aNe=kI(0,!1),a8=kI(1,!1),hPt=kI(0,!0),pPt=kI(1,!0);class fl{constructor(t,n,i,r,s){this.changes=t,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(t){return new fl(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,n,i;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(t){return new fl(t.changes&&ha.fromJSON(t.changes),[],t.mapped&&Bd.fromJSON(t.mapped),t.startSelection&&Ze.fromJSON(t.startSelection),t.selectionsAfter.map(Ze.fromJSON))}static fromTransaction(t,n){let i=Gc;for(let r of t.startState.facet(dPt)){let s=r(t);s.length&&(i=i.concat(s))}return!i.length&&t.changes.empty?null:new fl(t.changes.invert(t.startState.doc),i,void 0,n||t.startState.selection,Gc)}static selection(t){return new fl(void 0,Gc,void 0,void 0,t)}}function qN(e,t,n,i){let r=t+1>n+20?t-n-1:0,s=e.slice(r,t);return s.push(i),s}function mPt(e,t){let n=[],i=!1;return e.iterChangedRanges((r,s)=>n.push(r,s)),t.iterChangedRanges((r,s,a,l)=>{for(let c=0;c=u&&a<=d&&(i=!0)}}),i}function gPt(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((n,i)=>n.empty!=t.ranges[i].empty).length===0}function oNe(e,t){return e.length?t.length?e.concat(t):e:t}const Gc=[],bPt=200;function lNe(e,t){if(e.length){let n=e[e.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-bPt));return i.length&&i[i.length-1].eq(t)?e:(i.push(t),qN(e,e.length-1,1e9,n.setSelAfter(i)))}else return[fl.selection([t])]}function yPt(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function B5(e,t){if(!e.length)return e;let n=e.length,i=Gc;for(;n;){let r=vPt(e[n-1],t,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=e.slice(0,n);return s[n-1]=r,s}else t=r.mapped,n--,i=r.selectionsAfter}return i.length?[fl.selection(i)]:Gc}function vPt(e,t,n){let i=oNe(e.selectionsAfter.length?e.selectionsAfter.map(l=>l.map(t)):Gc,n);if(!e.changes)return fl.selection(i);let r=e.changes.map(t),s=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(s):s;return new fl(r,$n.mapEffects(e.effects,t),a,e.startSelection.map(s),i)}const xPt=/^(input\.type|delete)($|\.)/;class Id{constructor(t,n,i=0,r=void 0){this.done=t,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Id(this.done,this.undone):this}addChanges(t,n,i,r,s){let a=this.done,l=a[a.length-1];return l&&l.changes&&!l.changes.empty&&t.changes&&(!i||xPt.test(i))&&(!l.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?e.moveByChar(n,t):EI(n,t))}function xo(e){return e.textDirectionAt(e.state.selection.main.head)==Ar.LTR}const uNe=e=>cNe(e,!xo(e)),dNe=e=>cNe(e,xo(e));function fNe(e,t){return Ju(e,n=>n.empty?e.moveByGroup(n,t):EI(n,t))}const wPt=e=>fNe(e,!xo(e)),SPt=e=>fNe(e,xo(e));function kPt(e,t,n){if(t.type.prop(n))return!0;let i=t.to-t.from;return i&&(i>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function CI(e,t,n){let i=Sr(e).resolveInner(t.head),r=n?In.closedBy:In.openedBy;for(let c=t.head;;){let u=n?i.childAfter(c):i.childBefore(c);if(!u)break;kPt(e,u,r)?i=u:c=n?u.to:u.from}let s=i.type.prop(r),a,l;return s&&(a=n?Rd(e,i.from,1):Rd(e,i.to,-1))&&a.matched?l=n?a.end.to:a.end.from:l=n?i.to:i.from,Ze.cursor(l,n?-1:1)}const EPt=e=>Ju(e,t=>CI(e.state,t,!xo(e))),CPt=e=>Ju(e,t=>CI(e.state,t,xo(e)));function hNe(e,t){return Ju(e,n=>{if(!n.empty)return EI(n,t);let i=e.moveVertically(n,t);return i.head!=n.head?i:e.moveToLineBoundary(n,t)})}const pNe=e=>hNe(e,!1),mNe=e=>hNe(e,!0);function gNe(e){let t=e.scrollDOM.clientHeighta.empty?e.moveVertically(a,t,n.height):EI(a,t));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let a=e.coordsAtPos(i.selection.main.head),l=e.scrollDOM.getBoundingClientRect(),c=l.top+n.marginTop,u=l.bottom-n.marginBottom;a&&a.top>c&&a.bottombNe(e,!1),o8=e=>bNe(e,!0);function Hm(e,t,n){let i=e.lineBlockAt(t.head),r=e.moveToLineBoundary(t,n);if(r.head==t.head&&r.head!=(n?i.to:i.from)&&(r=e.moveToLineBoundary(t,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(e.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&t.head!=i.from+s&&(r=Ze.cursor(i.from+s))}return r}const TPt=e=>Ju(e,t=>Hm(e,t,!0)),APt=e=>Ju(e,t=>Hm(e,t,!1)),_Pt=e=>Ju(e,t=>Hm(e,t,!xo(e))),NPt=e=>Ju(e,t=>Hm(e,t,xo(e))),jPt=e=>Ju(e,t=>Ze.cursor(e.lineBlockAt(t.head).from,1)),RPt=e=>Ju(e,t=>Ze.cursor(e.lineBlockAt(t.head).to,-1));function IPt(e,t,n){let i=!1,r=t1(e.selection,s=>{let a=Rd(e,s.head,-1)||Rd(e,s.head,1)||s.head>0&&Rd(e,s.head-1,1)||s.headIPt(e,t);function ou(e,t,n){let i=t1(e.state.selection,r=>{r.undirectional&&r.head>=r.anchor!=t&&(r=Ze.range(r.head,r.anchor));let s=n(r);return Ze.range(r.anchor,s.head,s.goalColumn,s.bidiLevel||void 0,s.assoc)});return i.eq(e.state.selection)?!1:(e.dispatch(Zu(e.state,i)),!0)}function yNe(e,t){return ou(e,t,n=>e.moveByChar(n,t))}const vNe=e=>yNe(e,!xo(e)),xNe=e=>yNe(e,xo(e));function ONe(e,t){return ou(e,t,n=>e.moveByGroup(n,t))}const DPt=e=>ONe(e,!xo(e)),MPt=e=>ONe(e,xo(e)),LPt=e=>{let t=!xo(e);return ou(e,t,n=>CI(e.state,n,t))},$Pt=e=>{let t=xo(e);return ou(e,t,n=>CI(e.state,n,t))};function wNe(e,t){return ou(e,t,n=>e.moveVertically(n,t))}const SNe=e=>wNe(e,!1),kNe=e=>wNe(e,!0);function ENe(e,t){return ou(e,t,n=>e.moveVertically(n,t,gNe(e).height))}const _ee=e=>ENe(e,!1),Nee=e=>ENe(e,!0),FPt=e=>ou(e,!0,t=>Hm(e,t,!0)),BPt=e=>ou(e,!1,t=>Hm(e,t,!1)),UPt=e=>{let t=!xo(e);return ou(e,t,n=>Hm(e,n,t))},QPt=e=>{let t=xo(e);return ou(e,t,n=>Hm(e,n,t))},zPt=e=>ou(e,!1,t=>Ze.cursor(e.lineBlockAt(t.head).from)),VPt=e=>ou(e,!0,t=>Ze.cursor(e.lineBlockAt(t.head).to)),jee=({state:e,dispatch:t})=>(t(Zu(e,{anchor:0})),!0),Ree=({state:e,dispatch:t})=>(t(Zu(e,{anchor:e.doc.length})),!0),Iee=({state:e,dispatch:t})=>(t(Zu(e,{anchor:e.selection.main.anchor,head:0})),!0),Pee=({state:e,dispatch:t})=>(t(Zu(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),HPt=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),qPt=({state:e,dispatch:t})=>{let n=TI(e).map(({from:i,to:r})=>Ze.range(i,Math.min(r+1,e.doc.length)));return t(e.update({selection:Ze.create(n),userEvent:"select"})),!0},WPt=({state:e,dispatch:t})=>{let n=t1(e.selection,i=>{let r=Sr(e),s=r.resolveStack(i.from,1);if(i.empty){let a=r.resolveStack(i.from,-1);a.node.from>=s.node.from&&a.node.to<=s.node.to&&(s=a)}for(let a=s;a;a=a.next){let{node:l}=a;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&a.next)return Ze.range(l.to,l.from)}return i});return n.eq(e.selection)?!1:(t(Zu(e,n)),!0)};function CNe(e,t){let{state:n}=e,i=n.selection,r=n.selection.ranges.slice();for(let s of n.selection.ranges){let a=n.doc.lineAt(s.head);if(t?a.to0)for(let l=s;;){let c=e.moveVertically(l,t);if(c.heada.to){r.some(u=>u.head==c.head)||r.push(c);break}else{if(c.head==l.head)break;l=c}}}return r.length==i.ranges.length?!1:(e.dispatch(Zu(n,Ze.create(r,r.length-1))),!0)}const KPt=e=>CNe(e,!1),GPt=e=>CNe(e,!0),XPt=({state:e,dispatch:t})=>{let n=e.selection,i=null;return n.ranges.length>1?i=Ze.create([n.main]):n.main.empty||(i=Ze.create([Ze.cursor(n.main.head)])),i?(t(Zu(e,i)),!0):!1};function ME(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:i}=e,r=i.changeByRange(s=>{let{from:a,to:l}=s;if(a==l){let c=t(s);ca&&(n="delete.forward",c=o2(e,c,!0)),a=Math.min(a,c),l=Math.max(l,c)}else a=o2(e,a,!1),l=o2(e,l,!0);return a==l?{range:s}:{changes:{from:a,to:l},range:Ze.cursor(a,ar(e)))i.between(t,t,(r,s)=>{rt&&(t=n?s:r)});return t}const TNe=(e,t,n)=>ME(e,i=>{let r=i.from,{state:s}=e,a=s.doc.lineAt(r),l,c;if(n&&!t&&r>a.from&&rTNe(e,!1,!0),ANe=e=>TNe(e,!0,!1),_Ne=(e,t)=>ME(e,n=>{let i=n.head,{state:r}=e,s=r.doc.lineAt(i),a=r.charCategorizer(i);for(let l=null;;){if(i==(t?s.to:s.from)){i==n.head&&s.number!=(t?r.doc.lines:1)&&(i+=t?1:-1);break}let c=Na(s.text,i-s.from,t)+s.from,u=s.text.slice(Math.min(i,c)-s.from,Math.max(i,c)-s.from),d=a(u);if(l!=null&&d!=l)break;(u!=" "||i!=n.head)&&(l=d),i=c}return i}),NNe=e=>_Ne(e,!1),YPt=e=>_Ne(e,!0),ZPt=e=>ME(e,t=>{let n=e.lineBlockAt(t.head).to;return t.headME(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),eDt=e=>ME(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head{if(e.readOnly)return!1;let n=e.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Yi.of(["",""])},range:Ze.cursor(i.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},nDt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(i=>{if(!i.empty||i.from==0||i.from==e.doc.length)return{range:i};let r=i.from,s=e.doc.lineAt(r),a=r==s.from?r-1:Na(s.text,r-s.from,!1)+s.from,l=r==s.to?r+1:Na(s.text,r-s.from,!0)+s.from;return{changes:{from:a,to:l,insert:e.doc.slice(r,l).append(e.doc.slice(a,r))},range:Ze.cursor(l)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function TI(e){let t=[],n=-1;for(let i of e.selection.ranges){let r=e.doc.lineAt(i.from),s=e.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=e.doc.lineAt(i.to-1)),n>=r.number){let a=t[t.length-1];a.to=s.to,a.ranges.push(i)}else t.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return t}function jNe(e,t,n){if(e.readOnly)return!1;let i=[],r=[];for(let s of TI(e)){if(n?s.to==e.doc.length:s.from==0)continue;let a=e.doc.lineAt(n?s.to+1:s.from-1),l=a.length+1;if(n){i.push({from:s.to,to:a.to},{from:s.from,insert:a.text+e.lineBreak});for(let c of s.ranges)r.push(Ze.range(Math.min(e.doc.length,c.anchor+l),Math.min(e.doc.length,c.head+l)))}else{i.push({from:a.from,to:s.from},{from:s.to,insert:e.lineBreak+a.text});for(let c of s.ranges)r.push(Ze.range(c.anchor-l,c.head-l))}}return i.length?(t(e.update({changes:i,scrollIntoView:!0,selection:Ze.create(r,e.selection.mainIndex),userEvent:"move.line"})),!0):!1}const iDt=({state:e,dispatch:t})=>jNe(e,t,!1),rDt=({state:e,dispatch:t})=>jNe(e,t,!0);function RNe(e,t,n){if(e.readOnly)return!1;let i=[];for(let s of TI(e))n?i.push({from:s.from,insert:e.doc.slice(s.from,s.to)+e.lineBreak}):i.push({from:s.to,insert:e.lineBreak+e.doc.slice(s.from,s.to)});let r=e.changes(i);return t(e.update({changes:r,selection:e.selection.map(r,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const sDt=({state:e,dispatch:t})=>RNe(e,t,!1),aDt=({state:e,dispatch:t})=>RNe(e,t,!0),oDt=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(TI(t).map(({from:r,to:s})=>(r>0?r--:s{let s;if(e.lineWrapping){let a=e.lineBlockAt(r.head),l=e.coordsAtPos(r.head,r.assoc||1);l&&(s=a.bottom+e.documentTop-l.bottom+e.defaultLineHeight/2)}return e.moveVertically(r,!0,s)}).map(n);return e.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function lDt(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=Sr(e).resolveInner(t),i=n.childBefore(t),r=n.childAfter(t),s;return i&&r&&i.to<=t&&r.from>=t&&(s=i.type.prop(In.closedBy))&&s.indexOf(r.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(r.from).from&&!/\S/.test(e.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const Dee=INe(!1),cDt=INe(!0);function INe(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=t.changeByRange(r=>{let{from:s,to:a}=r,l=t.doc.lineAt(s),c=!e&&s==a&&lDt(t,s);e&&(s=a=(a<=l.to?l:t.doc.lineAt(a)).to);let u=new yI(t,{simulateBreak:s,simulateDoubleBreak:!!c}),d=nQ(u,s);for(d==null&&(d=Uu(/^\s*/.exec(t.doc.lineAt(s).text)[0],t.tabSize));al.from&&s{let r=[];for(let a=i.from;a<=i.to;){let l=e.doc.lineAt(a);l.number>n&&(i.empty||i.to>l.from)&&(t(l,r,i),n=l.number),a=l.to+1}let s=e.changes(r);return{changes:r,range:Ze.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const uDt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),i=new yI(e,{overrideIndentation:s=>{let a=n[s];return a??-1}}),r=PQ(e,(s,a,l)=>{let c=nQ(i,s.from);if(c==null)return;/\S/.test(s.text)||(c=0);let u=/^\s*/.exec(s.text)[0],d=nk(e,c);(u!=d||l.frome.readOnly?!1:(t(e.update(PQ(e,(n,i)=>{i.push({from:n.from,insert:e.facet(Jx)})}),{userEvent:"input.indent"})),!0),DNe=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(PQ(e,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=Uu(r,e.tabSize),a=0,l=nk(e,Math.max(0,s-Nb(e)));for(;a(e.setTabFocusMode(),!0),fDt=[{key:"Ctrl-b",run:uNe,shift:vNe,preventDefault:!0},{key:"Ctrl-f",run:dNe,shift:xNe},{key:"Ctrl-p",run:pNe,shift:SNe},{key:"Ctrl-n",run:mNe,shift:kNe},{key:"Ctrl-a",run:jPt,shift:zPt},{key:"Ctrl-e",run:RPt,shift:VPt},{key:"Ctrl-d",run:ANe},{key:"Ctrl-h",run:l8},{key:"Ctrl-k",run:ZPt},{key:"Ctrl-Alt-h",run:NNe},{key:"Ctrl-o",run:tDt},{key:"Ctrl-t",run:nDt},{key:"Ctrl-v",run:o8}],hDt=[{key:"ArrowLeft",run:uNe,shift:vNe,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:wPt,shift:DPt,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:_Pt,shift:UPt,preventDefault:!0},{key:"ArrowRight",run:dNe,shift:xNe,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:SPt,shift:MPt,preventDefault:!0},{mac:"Cmd-ArrowRight",run:NPt,shift:QPt,preventDefault:!0},{key:"ArrowUp",run:pNe,shift:SNe,preventDefault:!0},{mac:"Cmd-ArrowUp",run:jee,shift:Iee},{mac:"Ctrl-ArrowUp",run:Aee,shift:_ee},{key:"ArrowDown",run:mNe,shift:kNe,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Ree,shift:Pee},{mac:"Ctrl-ArrowDown",run:o8,shift:Nee},{key:"PageUp",run:Aee,shift:_ee},{key:"PageDown",run:o8,shift:Nee},{key:"Home",run:APt,shift:BPt,preventDefault:!0},{key:"Mod-Home",run:jee,shift:Iee},{key:"End",run:TPt,shift:FPt,preventDefault:!0},{key:"Mod-End",run:Ree,shift:Pee},{key:"Enter",run:Dee,shift:Dee},{key:"Mod-a",run:HPt},{key:"Backspace",run:l8,shift:l8,preventDefault:!0},{key:"Delete",run:ANe,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:NNe,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:YPt,preventDefault:!0},{mac:"Mod-Backspace",run:JPt,preventDefault:!0},{mac:"Mod-Delete",run:eDt,preventDefault:!0}].concat(fDt.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),pDt=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:EPt,shift:LPt},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:CPt,shift:$Pt},{key:"Alt-ArrowUp",run:iDt},{key:"Shift-Alt-ArrowUp",run:sDt},{key:"Alt-ArrowDown",run:rDt},{key:"Shift-Alt-ArrowDown",run:aDt},{key:"Mod-Alt-ArrowUp",run:KPt},{key:"Mod-Alt-ArrowDown",run:GPt},{key:"Escape",run:XPt},{key:"Mod-Enter",run:cDt},{key:"Alt-l",mac:"Ctrl-l",run:qPt},{key:"Mod-i",run:WPt,preventDefault:!0},{key:"Mod-[",run:DNe},{key:"Mod-]",run:PNe},{key:"Mod-Alt-\\",run:uDt},{key:"Shift-Mod-k",run:oDt},{key:"Shift-Mod-\\",run:PPt},{key:"Mod-/",run:iPt},{key:"Alt-A",run:sPt},{key:"Ctrl-m",mac:"Shift-Alt-m",run:dDt}].concat(hDt),mDt={key:"Tab",run:PNe,shift:DNe},Mee=typeof String.prototype.normalize=="function"?e=>e.normalize("NFKD"):e=>e;class cx{constructor(t,n,i=0,r=t.length,s,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,r),this.bufferStart=i,this.normalize=s?l=>s(Mee(l)):Mee,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return sl(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let n=MU(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=wd(t);let r=this.normalize(n);if(r.length)for(let s=0,a=i,l=!0;;s++){let c=r.charCodeAt(s),u=this.match(c,a,l,this.bufferPos+this.bufferStart,s==r.length-1);if(u)return this.value=u,this;if(s==r.length-1)break;l&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=WN(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,precise:!0,match:n},this;t=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||r.to<=n){let l=new fv(n,t.sliceString(n,i));return U5.set(t,l),l}if(r.from==n&&r.to==i)return r;let{text:s,from:a}=r;return a>n&&(s=t.sliceString(n,a)+s,a=n),r.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==t&&(this.re.lastIndex=t+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,precise:!0,match:n},this.matchPos=WN(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=fv.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(LNe.prototype[Symbol.iterator]=$Ne.prototype[Symbol.iterator]=function(){return this});function gDt(e){try{return new RegExp(e,DQ),!0}catch{return!1}}function WN(e,t){if(t>=e.length)return t;let n=e.lineAt(t),i;for(;t=56320&&i<57344;)t++;return t}const bDt=e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:i,result:r}=ATt(e,{label:t.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:t.phrase("go")});return r.then(s=>{let a=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!a){e.dispatch({effects:i});return}let l=t.doc.lineAt(t.selection.main.head),[,c,u,d,f]=a,h=d?+d.slice(1):0,p=u?+u:l.number;if(u&&f){let v=p/100;c&&(v=v*(c=="-"?-1:1)+l.number/t.doc.lines),p=Math.round(t.doc.lines*v)}else u&&c&&(p=p*(c=="-"?-1:1)+l.number);let g=t.doc.line(Math.max(1,Math.min(t.doc.lines,p))),b=Ze.cursor(g.from+Math.max(0,Math.min(h,g.length)));e.dispatch({effects:[i,Pt.scrollIntoView(b.from,{y:"center"})],selection:b})}),!0},yDt={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},vDt=Vt.define({combine(e){return nf(e,yDt,{highlightWordAroundCursor:(t,n)=>t||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function xDt(e){return[EDt,kDt]}const ODt=pn.mark({class:"cm-selectionMatch"}),wDt=pn.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Lee(e,t,n,i){return(n==0||e(t.sliceDoc(n-1,n))!=os.Word)&&(i==t.doc.length||e(t.sliceDoc(i,i+1))!=os.Word)}function SDt(e,t,n,i){return e(t.sliceDoc(n,n+1))==os.Word&&e(t.sliceDoc(i-1,i))==os.Word}const kDt=As.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(vDt),{state:n}=e,i=n.selection;if(i.ranges.length>1)return pn.none;let r=i.main,s,a=null;if(r.empty){if(!t.highlightWordAroundCursor)return pn.none;let c=n.wordAt(r.head);if(!c)return pn.none;a=n.charCategorizer(r.head),s=n.sliceDoc(c.from,c.to)}else{let c=r.to-r.from;if(c200)return pn.none;if(t.wholeWords){if(s=n.sliceDoc(r.from,r.to),a=n.charCategorizer(r.head),!(Lee(a,n,r.from,r.to)&&SDt(a,n,r.from,r.to)))return pn.none}else if(s=n.sliceDoc(r.from,r.to),!s)return pn.none}let l=[];for(let c of e.visibleRanges){let u=new cx(n.doc,s,c.from,c.to);for(;!u.next().done;){let{from:d,to:f}=u.value;if((!a||Lee(a,n,d,f))&&(r.empty&&d<=r.from&&f>=r.to?l.push(wDt.range(d,f)):(d>=r.to||f<=r.from)&&l.push(ODt.range(d,f)),l.length>t.maxMatches))return pn.none}}return pn.set(l)}},{decorations:e=>e.decorations}),EDt=Pt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),CDt=({state:e,dispatch:t})=>{let{selection:n}=e,i=Ze.create(n.ranges.map(r=>e.wordAt(r.head)||Ze.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(t(e.update({selection:i})),!0)};function TDt(e,t){let{main:n,ranges:i}=e.selection,r=e.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let a=!1,l=new cx(e.doc,t,i[i.length-1].to);;)if(l.next(),l.done){if(a)return null;l=new cx(e.doc,t,0,Math.max(0,i[i.length-1].from-1)),a=!0}else{if(a&&i.some(c=>c.from==l.value.from))continue;if(s){let c=e.wordAt(l.value.from);if(!c||c.from!=l.value.from||c.to!=l.value.to)continue}return l.value}}const ADt=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(s=>s.from===s.to))return CDt({state:e,dispatch:t});let i=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(s=>e.sliceDoc(s.from,s.to)!=i))return!1;let r=TDt(e,i);return r?(t(e.update({selection:e.selection.addRange(Ze.range(r.from,r.to),!1),effects:Pt.scrollIntoView(r.to)})),!0):!1},n1=Vt.define({combine(e){return nf(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new QDt(t),scrollToMatch:t=>Pt.scrollIntoView(t)})}});class FNe{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||gDt(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord,this.test=t.test}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord&&this.test==t.test}create(){return this.regexp?new PDt(this):new jDt(this)}getCursor(t,n=0,i){let r=t.doc?t:_i.create({doc:t});return i==null&&(i=r.doc.length),this.regexp?iy(this,r,n,i):ny(this,r,n,i)}}class BNe{constructor(t){this.spec=t}}function _Dt(e,t,n){return(i,r,s,a)=>{if(n&&!n(i,r,s,a))return!1;let l=i>=a&&r<=a+s.length?s.slice(i-a,r-a):t.doc.sliceString(i,r);return e(l,t,i,r)}}function ny(e,t,n,i){let r;return e.wholeWord&&(r=NDt(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(r=_Dt(e.test,t,r)),new cx(t.doc,e.unquoted,n,i,e.caseSensitive?void 0:s=>s.toLowerCase(),r)}function NDt(e,t){return(n,i,r,s)=>((s>n||s+r.length=n)return null;r.push(i.value)}return r}highlight(t,n,i,r){let s=ny(this.spec,t,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function RDt(e,t,n){return(i,r,s)=>(!n||n(i,r,s))&&e(s[0],t,i,r)}function iy(e,t,n,i){let r;return e.wholeWord&&(r=IDt(t.charCategorizer(t.selection.main.head))),e.test&&(r=RDt(e.test,t,r)),new LNe(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:r},n,i)}function KN(e,t){return e.slice(Na(e,t,!1),t)}function GN(e,t){return e.slice(t,Na(e,t))}function IDt(e){return(t,n,i)=>!i[0].length||(e(KN(i.input,i.index))!=os.Word||e(GN(i.input,i.index))!=os.Word)&&(e(GN(i.input,i.index+i[0].length))!=os.Word||e(KN(i.input,i.index+i[0].length))!=os.Word)}class PDt extends BNe{nextMatch(t,n,i){let r=iy(this.spec,t,i,t.doc.length).next();return r.done&&(r=iy(this.spec,t,0,n).next()),r.done?null:r.value}prevMatchInRange(t,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),a=iy(this.spec,t,s,i),l=null;for(;!a.next().done;)l=a.value;if(l&&(s==n||l.from>s+10))return l;if(s==n)return null}}prevMatch(t,n,i){return this.prevMatchInRange(t,0,n)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return t.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let s=+i.slice(0,r);if(s>0&&s=n)return null;r.push(i.value)}return r}highlight(t,n,i,r){let s=iy(this.spec,t,Math.max(0,n-250),Math.min(i+250,t.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const hk=$n.define(),MQ=$n.define(),sm=no.define({create(e){return new Q5(c8(e).create(),null)},update(e,t){for(let n of t.effects)n.is(hk)?e=new Q5(n.value.create(),e.panel):n.is(MQ)&&(e=new Q5(e.query,n.value?LQ:null));return e},provide:e=>ek.from(e,t=>t.panel)});class Q5{constructor(t,n){this.query=t,this.panel=n}}const DDt=pn.mark({class:"cm-searchMatch"}),MDt=pn.mark({class:"cm-searchMatch cm-searchMatch-selected"}),LDt=As.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(sm))}update(e){let t=e.state.field(sm);(t!=e.startState.field(sm)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return pn.none;let{view:n}=this,i=new Nh;for(let r=0,s=n.visibleRanges,a=s.length;rs[r+1].from-2*250;)c=s[++r].to;e.highlight(n.state,l,c,(u,d)=>{let f=n.state.selection.ranges.some(h=>h.from==u&&h.to==d);i.add(u,d,f?MDt:DDt)})}return i.finish()}},{decorations:e=>e.decorations});function LE(e){return t=>{let n=t.state.field(sm,!1);return n&&n.query.spec.valid?e(t,n):zNe(t)}}const XN=LE((e,{query:t})=>{let{to:n}=e.state.selection.main,i=t.nextMatch(e.state,n,n);if(!i)return!1;let r=Ze.single(i.from,i.to),s=e.state.facet(n1);return e.dispatch({selection:r,effects:[$Q(e,i),s.scrollToMatch(r.main,e)],userEvent:"select.search"}),QNe(e),!0}),YN=LE((e,{query:t})=>{let{state:n}=e,{from:i}=n.selection.main,r=t.prevMatch(n,i,i);if(!r)return!1;let s=Ze.single(r.from,r.to),a=e.state.facet(n1);return e.dispatch({selection:s,effects:[$Q(e,r),a.scrollToMatch(s.main,e)],userEvent:"select.search"}),QNe(e),!0}),$Dt=LE((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:Ze.create(n.map(i=>Ze.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),FDt=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],a=0;for(let l=new cx(e.doc,e.sliceDoc(i,r));!l.next().done;){if(s.length>1e3)return!1;l.value.from==i&&(a=s.length),s.push(Ze.range(l.value.from,l.value.to))}return t(e.update({selection:Ze.create(s,a),userEvent:"select.search.matches"})),!0},$ee=LE((e,{query:t})=>{let{state:n}=e,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=t.nextMatch(n,i,i);if(!s)return!1;let a=s,l=[],c,u,d=[];a.precise?a.from==i&&a.to==r&&(u=n.toText(t.getReplacement(a)),l.push({from:a.from,to:a.to,insert:u}),a=t.nextMatch(n,a.from,a.to),d.push(Pt.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))):a=t.nextMatch(n,a.from,a.to);let f=e.state.changes(l);return a&&(c=Ze.single(a.from,a.to).map(f),d.push($Q(e,a)),d.push(n.facet(n1).scrollToMatch(c.main,e))),e.dispatch({changes:f,selection:c,effects:d,userEvent:"input.replace"}),!0}),BDt=LE((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:s,to:a,precise:l}=r;l&&n.push({from:s,to:a,insert:t.getReplacement(r)})}if(!n.length)return!1;let i=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:Pt.announce.of(i),userEvent:"input.replace.all"}),!0});function LQ(e){return e.state.facet(n1).createPanel(e)}function c8(e,t){var n,i,r,s,a;let l=e.selection.main,c=l.empty||l.to>l.from+100?"":e.sliceDoc(l.from,l.to);if(t&&!c)return t;let u=e.facet(n1);return new FNe({search:((n=t==null?void 0:t.literal)!==null&&n!==void 0?n:u.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(i=t==null?void 0:t.caseSensitive)!==null&&i!==void 0?i:u.caseSensitive,literal:(r=t==null?void 0:t.literal)!==null&&r!==void 0?r:u.literal,regexp:(s=t==null?void 0:t.regexp)!==null&&s!==void 0?s:u.regexp,wholeWord:(a=t==null?void 0:t.wholeWord)!==null&&a!==void 0?a:u.wholeWord})}function UNe(e){let t=eQ(e,LQ);return t&&t.dom.querySelector("[main-field]")}function QNe(e){let t=UNe(e);t&&t==e.root.activeElement&&t.select()}const zNe=e=>{let t=e.state.field(sm,!1);if(t&&t.panel){let n=UNe(e);if(n&&n!=e.root.activeElement){let i=c8(e.state,t.query.spec);i.valid&&e.dispatch({effects:hk.of(i)}),n.focus(),n.select()}}else e.dispatch({effects:[MQ.of(!0),t?hk.of(c8(e.state,t.query.spec)):$n.appendConfig.of(VDt)]});return!0},VNe=e=>{let t=e.state.field(sm,!1);if(!t||!t.panel)return!1;let n=eQ(e,LQ);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:MQ.of(!1)}),!0},UDt=[{key:"Mod-f",run:zNe,scope:"editor search-panel"},{key:"F3",run:XN,shift:YN,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:XN,shift:YN,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:VNe,scope:"editor search-panel"},{key:"Mod-Shift-l",run:FDt},{key:"Mod-Alt-g",run:bDt},{key:"Mod-d",run:ADt,preventDefault:!0}];class QDt{constructor(t){this.view=t;let n=this.query=t.state.field(sm).query.spec;this.commit=this.commit.bind(this),this.searchField=vr("input",{value:n.search,placeholder:Dl(t,"Find"),"aria-label":Dl(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=vr("input",{value:n.replace,placeholder:Dl(t,"Replace"),"aria-label":Dl(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=vr("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=vr("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=vr("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,a){return vr("button",{class:"cm-button",name:r,onclick:s,type:"button"},a)}this.dom=vr("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>XN(t),[Dl(t,"next")]),i("prev",()=>YN(t),[Dl(t,"previous")]),i("select",()=>$Dt(t),[Dl(t,"all")]),vr("label",null,[this.caseField,Dl(t,"match case")]),vr("label",null,[this.reField,Dl(t,"regexp")]),vr("label",null,[this.wordField,Dl(t,"by word")]),...t.state.readOnly?[]:[vr("br"),this.replaceField,i("replace",()=>$ee(t),[Dl(t,"replace")]),i("replaceAll",()=>BDt(t),[Dl(t,"replace all")])],vr("button",{name:"close",onclick:()=>VNe(t),"aria-label":Dl(t,"close"),type:"button"},["×"])])}commit(){let t=new FNe({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:hk.of(t)}))}keydown(t){LCt(this.view,t,"search-panel")?t.preventDefault():t.keyCode==13&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?YN:XN)(this.view)):t.keyCode==13&&t.target==this.replaceField&&(t.preventDefault(),$ee(this.view))}update(t){for(let n of t.transactions)for(let i of n.effects)i.is(hk)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(n1).top}}function Dl(e,t){return e.state.phrase(t)}const l2=30,c2=/[\s\.,:;?!]/;function $Q(e,{from:t,to:n}){let i=e.state.doc.lineAt(t),r=e.state.doc.lineAt(n).to,s=Math.max(i.from,t-l2),a=Math.min(r,n+l2),l=e.state.sliceDoc(s,a);if(s!=i.from){for(let c=0;cl.length-l2;c--)if(!c2.test(l[c-1])&&c2.test(l[c])){l=l.slice(0,c);break}}return Pt.announce.of(`${e.state.phrase("current match")}. ${l} ${e.state.phrase("on line")} ${i.number}.`)}const zDt=Pt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),VDt=[sm,Hh.low(LDt),zDt];class Fee{constructor(t,n,i){this.from=t,this.to=n,this.diagnostic=i}}class _g{constructor(t,n,i){this.diagnostics=t,this.panel=n,this.selected=i}static init(t,n,i){let r=i.facet(pk).markerFilter;r&&(t=r(t,i));let s=t.slice().sort((p,g)=>p.from-g.from||p.to-g.to),a=new Nh,l=[],c=0,u=i.doc.iter(),d=0,f=i.doc.length;for(let p=0;;){let g=p==s.length?null:s[p];if(!g&&!l.length)break;let b,v;if(l.length)b=c,v=l.reduce((w,O)=>Math.min(w,O.to),g&&g.from>b?g.from:1e8);else{if(b=g.from,b>f)break;v=g.to,l.push(g),p++}for(;pw.from||w.to==b))l.push(w),p++,v=Math.min(w.to,v);else{v=Math.min(w.from,v);break}}v=Math.min(v,f);let y=!1;if(l.some(w=>w.from==b&&(w.to==v||v==f))&&(y=b==v,!y&&v-b<10)){let w=b-(d+u.value.length);w>0&&(u.next(w),d=b);for(let O=b;;){if(O>=v){y=!0;break}if(!u.lineBreak&&d+u.value.length>O)break;O=d+u.value.length,d+=u.value.length,u.next()}}let x=iMt(l);if(y)a.add(b,b,pn.widget({widget:new JDt(x),diagnostics:l.slice()}));else{let w=l.reduce((O,k)=>k.markClass?O+" "+k.markClass:O,"");a.add(b,v,pn.mark({class:"cm-lintRange cm-lintRange-"+x+w,diagnostics:l.slice(),inclusiveEnd:l.some(O=>O.to>v)}))}if(c=v,c==f)break;for(let w=0;w{if(!(t&&a.diagnostics.indexOf(t)<0))if(!i)i=new Fee(r,s,t||a.diagnostics[0]);else{if(a.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new Fee(i.from,s,i.diagnostic)}}),i}function HDt(e,t){let n=t.pos,i=t.end||n,r=e.state.facet(pk).hideOn(e,n,i);if(r!=null)return r;let s=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(a=>a.is(HNe))||e.changes.touchesRange(s.from,Math.max(s.to,i)))}function qDt(e,t){return e.field(Zl,!1)?t:t.concat($n.appendConfig.of(rMt))}const HNe=$n.define(),FQ=$n.define(),qNe=$n.define(),Zl=no.define({create(){return new _g(pn.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),i=null,r=e.panel;if(e.selected){let s=t.changes.mapPos(e.selected.from,1);i=jm(n,e.selected.diagnostic,s)||jm(n,null,s)}!n.size&&r&&t.state.facet(pk).autoPanel&&(r=null),e=new _g(n,r,i)}for(let n of t.effects)if(n.is(HNe)){let i=t.state.facet(pk).autoPanel?n.value.length?mk.open:null:e.panel;e=_g.init(n.value,i,t.state)}else n.is(FQ)?e=new _g(e.diagnostics,n.value?mk.open:null,e.selected):n.is(qNe)&&(e=new _g(e.diagnostics,e.panel,n.value));return e},provide:e=>[ek.from(e,t=>t.panel),Pt.decorations.from(e,t=>t.diagnostics)]}),WDt=pn.mark({class:"cm-lintRange cm-lintRange-active"});function KDt(e,t,n){let{diagnostics:i}=e.state.field(Zl),r,s=-1,a=-1;i.between(t-(n<0?1:0),t+(n>0?1:0),(c,u,{spec:d})=>{if(t>=c&&t<=u&&(c==u||(t>c||n>0)&&(tKNe(e,n,!1)))}const XDt=e=>{let t=e.state.field(Zl,!1);(!t||!t.panel)&&e.dispatch({effects:qDt(e.state,[FQ.of(!0)])});let n=eQ(e,mk.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},Bee=e=>{let t=e.state.field(Zl,!1);return!t||!t.panel?!1:(e.dispatch({effects:FQ.of(!1)}),!0)},YDt=e=>{let t=e.state.field(Zl,!1);if(!t)return!1;let n=e.state.selection.main,i=jm(t.diagnostics,null,n.to+1);return!i&&(i=jm(t.diagnostics,null,0),!i||i.from==n.from&&i.to==n.to)?!1:(e.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),CTt(e,i.from,1,{tooltip:GNe,until:r=>r.docChanged||r.newSelection.main.headi.to}),!0)},ZDt=[{key:"Mod-Shift-m",run:XDt,preventDefault:!0},{key:"F8",run:YDt}],pk=Vt.define({combine(e){return{sources:e.map(t=>t.source).filter(t=>t!=null),...nf(e.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:Uee,tooltipFilter:Uee,needsRefresh:(t,n)=>t?n?i=>t(i)||n(i):t:n,hideOn:(t,n)=>t?n?(i,r,s)=>t(i,r,s)||n(i,r,s):t:n,autoPanel:(t,n)=>t||n})}}});function Uee(e,t){return e?t?(n,i)=>t(e(n,i),i):e:t}function WNe(e){let t=[];if(e)e:for(let{name:n}of e){for(let i=0;is.toLowerCase()==r.toLowerCase())){t.push(r);continue e}}t.push("")}return t}function KNe(e,t,n){var i;let r=n?WNe(t.actions):[];return vr("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},vr("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),(i=t.actions)===null||i===void 0?void 0:i.map((s,a)=>{let l=!1,c=p=>{if(p.preventDefault(),l)return;l=!0;let g=jm(e.state.field(Zl).diagnostics,t);g&&s.apply(e,g.from,g.to)},{name:u}=s,d=r[a]?u.indexOf(r[a]):-1,f=d<0?u:[u.slice(0,d),vr("u",u.slice(d,d+1)),u.slice(d+1)],h=s.markClass?" "+s.markClass:"";return vr("button",{type:"button",class:"cm-diagnosticAction"+h,onclick:c,onmousedown:c,"aria-label":` Action: ${u}${d<0?"":` (access key "${r[a]})"`}.`},f)}),t.source&&vr("div",{class:"cm-diagnosticSource"},t.source))}class JDt extends Yu{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return vr("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Qee{constructor(t,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=KNe(t,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class mk{constructor(t){this.view=t,this.items=[];let n=r=>{if(!(r.ctrlKey||r.altKey||r.metaKey)){if(r.keyCode==27)Bee(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],a=WNe(s.actions);for(let l=0;l{for(let s=0;sBee(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Zl).selected;if(!t)return-1;for(let n=0;n{for(let d of u.diagnostics){if(a.has(d))continue;a.add(d);let f=-1,h;for(let p=i;pi&&(this.items.splice(i,f-i),r=!0)),n&&h.diagnostic==n.diagnostic?h.dom.hasAttribute("aria-selected")||(h.dom.setAttribute("aria-selected","true"),s=h):h.dom.hasAttribute("aria-selected")&&h.dom.removeAttribute("aria-selected"),i++}});i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:c})=>{let u=c.height/this.list.offsetHeight;l.topc.bottom&&(this.list.scrollTop+=(l.bottom-c.bottom)/u)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let t=this.list.firstChild;function n(){let i=t;t=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;t!=i.dom;)n();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t);for(;t;)n()}moveSelection(t){if(this.selectedIndex<0)return;let n=this.view.state.field(Zl),i=jm(n.diagnostics,this.items[t].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:qNe.of(i)})}static open(t){return new mk(t)}}function eMt(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function u2(e){return eMt(``,'width="6" height="3"')}const tMt=Pt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:u2("#f11")},".cm-lintRange-warning":{backgroundImage:u2("orange")},".cm-lintRange-info":{backgroundImage:u2("#999")},".cm-lintRange-hint":{backgroundImage:u2("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function nMt(e){return e=="error"?4:e=="warning"?3:e=="info"?2:1}function iMt(e){let t="hint",n=1;for(let i of e){let r=nMt(i.severity);r>n&&(n=r,t=i.severity)}return t}const GNe=ETt(KDt,{hideOn:HDt}),rMt=[Zl,Pt.decorations.compute([Zl],e=>{let{selected:t,panel:n}=e.field(Zl);return!t||!n||t.from==t.to?pn.none:pn.set([WDt.range(t.from,t.to)])}),GNe,tMt];var zee=function(t){t===void 0&&(t={});var n=t,i=n.crosshairCursor,r=i===void 0?!1:i,s=[];t.closeBracketsKeymap!==!1&&(s=s.concat(d_t)),t.defaultKeymap!==!1&&(s=s.concat(pDt)),t.searchKeymap!==!1&&(s=s.concat(UDt)),t.historyKeymap!==!1&&(s=s.concat(OPt)),t.foldKeymap!==!1&&(s=s.concat(m2t)),t.completionKeymap!==!1&&(s=s.concat(TAe)),t.lintKeymap!==!1&&(s=s.concat(ZDt));var a=[];return t.lineNumbers!==!1&&a.push(V2e()),t.highlightActiveLineGutter!==!1&&a.push(UTt()),t.highlightSpecialChars!==!1&&a.push(eTt()),t.history!==!1&&a.push(fPt()),t.foldGutter!==!1&&a.push(v2t()),t.drawSelection!==!1&&a.push(zCt()),t.dropCursor!==!1&&a.push(KCt()),t.allowMultipleSelections!==!1&&a.push(_i.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&a.push(o2t()),t.syntaxHighlighting!==!1&&a.push(sAe(S2t,{fallback:!0})),t.bracketMatching!==!1&&a.push(N2t()),t.closeBrackets!==!1&&a.push(o_t()),t.autocompletion!==!1&&a.push(y_t()),t.rectangularSelection!==!1&&a.push(pTt()),r!==!1&&a.push(bTt()),t.highlightActiveLine!==!1&&a.push(aTt()),t.highlightSelectionMatches!==!1&&a.push(xDt()),t.tabSize&&typeof t.tabSize=="number"&&a.push(Jx.of(" ".repeat(t.tabSize))),a.concat([Zx.of(s.flat())]).filter(Boolean)};const sMt="#e5c07b",Vee="#e06c75",aMt="#56b6c2",oMt="#ffffff",jA="#abb2bf",u8="#7d8799",lMt="#61afef",cMt="#98c379",Hee="#d19a66",uMt="#c678dd",dMt="#21252b",qee="#2c313a",Wee="#282c34",z5="#353a42",fMt="#3E4451",Kee="#528bff",hMt=Pt.theme({"&":{color:jA,backgroundColor:Wee},".cm-content":{caretColor:Kee},".cm-cursor, .cm-dropCursor":{borderLeftColor:Kee},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:fMt},".cm-panels":{backgroundColor:dMt,color:jA},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Wee,color:u8,border:"none"},".cm-activeLineGutter":{backgroundColor:qee},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:z5},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:z5,borderBottomColor:z5},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:qee,color:jA}}},{dark:!0}),pMt=PE.define([{tag:ne.keyword,color:uMt},{tag:[ne.name,ne.deleted,ne.character,ne.propertyName,ne.macroName],color:Vee},{tag:[ne.function(ne.variableName),ne.labelName],color:lMt},{tag:[ne.color,ne.constant(ne.name),ne.standard(ne.name)],color:Hee},{tag:[ne.definition(ne.name),ne.separator],color:jA},{tag:[ne.typeName,ne.className,ne.number,ne.changed,ne.annotation,ne.modifier,ne.self,ne.namespace],color:sMt},{tag:[ne.operator,ne.operatorKeyword,ne.url,ne.escape,ne.regexp,ne.link,ne.special(ne.string)],color:aMt},{tag:[ne.meta,ne.comment],color:u8},{tag:ne.strong,fontWeight:"bold"},{tag:ne.emphasis,fontStyle:"italic"},{tag:ne.strikethrough,textDecoration:"line-through"},{tag:ne.link,color:u8,textDecoration:"underline"},{tag:ne.heading,fontWeight:"bold",color:Vee},{tag:[ne.atom,ne.bool,ne.special(ne.variableName)],color:Hee},{tag:[ne.processingInstruction,ne.string,ne.inserted],color:cMt},{tag:ne.invalid,color:oMt}]),mMt=[hMt,sAe(pMt)];var gMt=Pt.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),bMt=function(t){t===void 0&&(t={});var n=t,i=n.indentWithTab,r=i===void 0?!0:i,s=n.editable,a=s===void 0?!0:s,l=n.readOnly,c=l===void 0?!1:l,u=n.theme,d=u===void 0?"light":u,f=n.placeholder,h=f===void 0?"":f,p=n.basicSetup,g=p===void 0?!0:p,b=[];switch(r&&b.unshift(Zx.of([mDt])),g&&(typeof g=="boolean"?b.unshift(zee()):b.unshift(zee(g))),h&&b.unshift(uTt(h)),d){case"light":b.push(gMt);break;case"dark":b.push(mMt);break;case"none":break;default:b.push(d);break}return a===!1&&b.push(Pt.editable.of(!1)),c&&b.push(_i.readOnly.of(!0)),[...b]},yMt=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(t=>!t.empty)});class vMt{constructor(t,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(n=>{try{n()}catch(i){console.error("TimeoutLatch callback error:",i)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class Gee{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var V5=null,xMt=()=>typeof window>"u"?new Gee:(V5||(V5=new Gee),V5),OMt=Pt.theme({"& .cm-scroller":{height:"100% !important"}}),Xee=null,H5=null;function wMt(e,t,n,i,r,s){if(!e&&!t&&!n&&!i&&!r&&!s)return null;var a=JSON.stringify({height:e,minHeight:t,maxHeight:n,width:i,minWidth:r,maxWidth:s});return a===Xee||(Xee=a,H5=Pt.theme({"&":{height:e,minHeight:t,maxHeight:n,width:i,minWidth:r,maxWidth:s}})),H5}var Yee=tf.define(),SMt=200,kMt=[];function EMt(e){var t=e.value,n=e.selection,i=e.onChange,r=e.onStatistics,s=e.onCreateEditor,a=e.onUpdate,l=e.extensions,c=l===void 0?kMt:l,u=e.autoFocus,d=e.theme,f=d===void 0?"light":d,h=e.height,p=h===void 0?null:h,g=e.minHeight,b=g===void 0?null:g,v=e.maxHeight,y=v===void 0?null:v,x=e.width,w=x===void 0?null:x,O=e.minWidth,k=O===void 0?null:O,S=e.maxWidth,E=S===void 0?null:S,C=e.placeholder,N=C===void 0?"":C,_=e.editable,j=_===void 0?!0:_,T=e.readOnly,L=T===void 0?!1:T,A=e.indentWithTab,R=A===void 0?!0:A,P=e.basicSetup,$=P===void 0?!0:P,M=e.root,B=e.initialState,I=m.useState(),H=I[0],X=I[1],Q=m.useState(),q=Q[0],U=Q[1],te=m.useState(),le=te[0],oe=te[1],re=m.useState(()=>({current:null}))[0],pe=m.useState(()=>({current:null}))[0],K=wMt(p,b,y,w,k,E),G=Pt.updateListener.of(Se=>{if(Se.docChanged&&typeof i=="function"&&!Se.transactions.some(Be=>Be.annotation(Yee))){re.current?re.current.reset():(re.current=new vMt(()=>{if(pe.current){var Be=pe.current;pe.current=null,Be()}re.current=null},SMt),xMt().add(re.current));var Te=Se.state.doc,rt=Te.toString();i(rt,Se)}r&&r(yMt(Se))}),se=bMt({theme:f,editable:j,readOnly:L,placeholder:N,indentWithTab:R,basicSetup:$}),fe=[G,...K?[K]:[],OMt,...se];return a&&typeof a=="function"&&fe.push(Pt.updateListener.of(a)),fe=fe.concat(c),m.useLayoutEffect(()=>{if(H&&!le){var Se={doc:t,selection:n,extensions:fe},Te=B?_i.fromJSON(B.json,Se,B.fields):_i.create(Se);if(oe(Te),!q){var rt=new Pt({state:Te,parent:H,root:M});U(rt),s&&s(rt,Te)}}return()=>{q&&(oe(void 0),U(void 0))}},[H,le]),m.useEffect(()=>{e.container&&X(e.container)},[e.container]),m.useEffect(()=>()=>{q&&(q.destroy(),U(void 0)),re.current&&(re.current.cancel(),re.current=null)},[q]),m.useEffect(()=>{u&&q&&q.focus()},[u,q]),m.useEffect(()=>{q&&q.dispatch({effects:$n.reconfigure.of(fe)})},[f,c,p,b,y,w,k,E,N,j,L,R,$,i,a]),m.useEffect(()=>{if(t!==void 0){var Se=q?q.state.doc.toString():"";if(q&&t!==Se){var Te=re.current&&!re.current.isDone,rt=()=>{q&&t!==q.state.doc.toString()&&q.dispatch({changes:{from:0,to:q.state.doc.toString().length,insert:t||""},annotations:[Yee.of(!0)]})};Te?pe.current=rt:rt()}}},[t,q]),{state:le,setState:oe,view:q,setView:U,container:H,setContainer:X}}var CMt=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],XNe=m.forwardRef((e,t)=>{var n=e.className,i=e.value,r=i===void 0?"":i,s=e.selection,a=e.extensions,l=a===void 0?[]:a,c=e.onChange,u=e.onStatistics,d=e.onCreateEditor,f=e.onUpdate,h=e.autoFocus,p=e.theme,g=p===void 0?"light":p,b=e.height,v=e.minHeight,y=e.maxHeight,x=e.width,w=e.minWidth,O=e.maxWidth,k=e.basicSetup,S=e.placeholder,E=e.indentWithTab,C=e.editable,N=e.readOnly,_=e.root,j=e.initialState,T=nPt(e,CMt),L=m.useRef(null),A=EMt({root:_,value:r,autoFocus:h,theme:g,height:b,minHeight:v,maxHeight:y,width:x,minWidth:w,maxWidth:O,basicSetup:k,placeholder:S,indentWithTab:E,editable:C,readOnly:N,selection:s,onChange:c,onStatistics:u,onCreateEditor:d,onUpdate:f,extensions:l,initialState:j}),R=A.state,P=A.view,$=A.container,M=A.setContainer;m.useImperativeHandle(t,()=>({editor:L.current,state:R,view:P}),[L,$,R,P]);var B=m.useCallback(H=>{L.current=H,M(H)},[M]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var I=typeof g=="string"?"cm-theme-"+g:"cm-theme";return o.jsx("div",r8({ref:B,className:""+I+(n?" "+n:"")},T))});XNe.displayName="CodeMirror";function YNe(e){const t=e.toLowerCase(),n=t.split("/").pop()??t,i=n.includes(".")?n.split(".").pop():"";return n==="dockerfile"||n.startsWith("dockerfile.")||n.endsWith(".dockerfile")?[rQ.define(tPt)]:i==="py"||i==="pyi"?[dIt()]:["ts","tsx","mts","cts"].includes(i??"")?[H$({typescript:!0,jsx:i==="tsx"})]:["js","jsx","mjs","cjs"].includes(i??"")?[H$({jsx:i==="jsx"})]:i==="json"||i==="jsonc"?[j_t()]:i==="yaml"||i==="yml"?[UIt()]:["md","markdown"].includes(i??"")?[Hjt()]:[]}function $E({value:e,path:t,onChange:n,readOnly:i=!1,theme:r="light",lineNumberStart:s=1,height:a="100%",minHeight:l,maxHeight:c}){const u=m.useMemo(()=>[...YNe(t),...s===1?[]:[V2e({formatNumber:d=>String(d+s-1)})]],[s,t]);return o.jsx(XNe,{value:e,height:a,minHeight:l,maxHeight:c,theme:r,extensions:u,editable:!i,onChange:n,basicSetup:{lineNumbers:s===1,foldGutter:!0,highlightActiveLine:!0,highlightActiveLineGutter:!0,autocompletion:!1}})}const ZNe=Object.freeze(Object.defineProperty({__proto__:null,default:$E,languageFor:YNe},Symbol.toStringTag,{value:"Module"}));function TMt(e){var s;const t=e.split(/\r?\n/);if(((s=t[0])==null?void 0:s.trim())!=="---")return{body:e,frontmatter:[]};const n=t.findIndex((a,l)=>l>0&&a.trim()==="---");if(n<0)return{body:e,frontmatter:[]};const i=hTe(t.slice(1,n).join(` `));if(i.errors.length>0)return{body:e,frontmatter:[]};const r=i.toJS();return!r||typeof r!="object"||Array.isArray(r)?{body:e,frontmatter:[]}:{body:t.slice(n+1).join(` -`).replace(/^\s*\n/,""),frontmatter:Object.entries(r).map(([a,l])=>({key:a,value:typeof l=="string"?l:RU(l).trim()}))}}function EMt(){return o.jsx("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M2.75 5.5h5l1.5 1.75h8v7.25a1.75 1.75 0 0 1-1.75 1.75h-11a1.75 1.75 0 0 1-1.75-1.75v-9Z"})})}function CMt(){return o.jsxs("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[o.jsx("path",{d:"M5 2.75h6l4 4v10.5H5z"}),o.jsx("path",{d:"M11 2.75v4h4"})]})}function TMt(e){const t={children:[]};for(const i of e){let r=t;const s=i.path.split("/").filter(Boolean);s.forEach((a,l)=>{let c=r.children.find(u=>u.name===a);if(!c){const u=s.slice(0,l+1).join("/");c={name:a,path:u,children:[]},r.children.push(c)}l===s.length-1&&(c.file=i),r=c})}const n=i=>{i.sort((r,s)=>+!!r.file-+!!s.file||r.name.localeCompare(s.name)),i.forEach(r=>n(r.children))};return n(t.children),t.children}function ZNe({nodes:e,depth:t,activePath:n,onSelect:i}){return e.map(r=>o.jsxs("div",{children:[r.file?o.jsxs("button",{type:"button",className:`skill-file-tree__row${r.path===n?" is-active":""}`,style:{paddingLeft:`${12+t*16}px`},onClick:()=>i(r.file),title:r.path,children:[o.jsx(CMt,{}),o.jsx("span",{children:r.name}),o.jsxs("small",{children:[r.file.size.toLocaleString()," B"]})]}):o.jsxs("div",{className:"skill-file-tree__row is-folder",style:{paddingLeft:`${12+t*16}px`},title:r.path,children:[o.jsx(EMt,{}),o.jsx("span",{children:r.name})]}),r.children.length>0?o.jsx(ZNe,{nodes:r.children,depth:t+1,activePath:n,onSelect:i}):null]},r.path))}function AMt(e){if(e.content===void 0)return;if(e.content.startsWith("data:")){const i=document.createElement("a");i.href=e.content,i.download=e.path.split("/").pop()||"skill-file",i.click();return}const t=URL.createObjectURL(new Blob([e.content])),n=document.createElement("a");n.href=t,n.download=e.path.split("/").pop()||"skill-file",n.click(),URL.revokeObjectURL(t)}function JNe({files:e}){var p;const{t,i18n:n}=Oe("skills"),i=m.useMemo(()=>TMt(e),[e]),[r,s]=m.useState(((p=e[0])==null?void 0:p.path)||""),[a,l]=m.useState("preview"),c=e.find(g=>g.path===r)||e[0],u=(c==null?void 0:c.path.toLowerCase())||"",d=u.endsWith(".md")||u.endsWith(".markdown"),f=/\.(png|jpe?g|gif|webp|svg)$/.test(u),h=m.useMemo(()=>kMt(d&&(c==null?void 0:c.content)!==void 0?c.content:""),[c==null?void 0:c.content,d]);return o.jsxs("div",{className:"skill-file-browser",children:[o.jsx("aside",{className:"skill-file-tree","aria-label":t("fileTree.ariaLabel"),children:o.jsx(ZNe,{nodes:i,depth:0,activePath:(c==null?void 0:c.path)||"",onSelect:g=>s(g.path)})}),o.jsx("section",{className:"skill-file-preview",children:c?o.jsxs(o.Fragment,{children:[o.jsxs("header",{children:[o.jsx("span",{title:c.path,children:c.path}),o.jsxs("div",{children:[d?o.jsx("button",{type:"button",onClick:()=>l(g=>g==="preview"?"source":"preview"),children:t(a==="preview"?"fileTree.viewSource":"fileTree.viewPreview")}):null,o.jsx("button",{type:"button",disabled:c.content===void 0,onClick:()=>AMt(c),children:t("fileTree.download")})]})]}),o.jsx("div",{className:"skill-file-preview__body",children:c.kind==="binary"||c.content===void 0?o.jsxs("div",{className:"skill-file-preview__binary",children:[o.jsx("strong",{children:t("fileTree.binaryFile")}),o.jsx("span",{children:t("fileTree.bytes",{value:new Intl.NumberFormat(n.resolvedLanguage).format(c.size)})}),o.jsx("span",{children:t("fileTree.binaryDescription")})]}):f?o.jsx("img",{src:c.content.startsWith("data:")?c.content:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(c.content)}`,alt:c.path}):d&&a==="preview"?o.jsxs("div",{className:"skill-file-preview__markdown",children:[h.frontmatter.length>0?o.jsx("dl",{className:"skill-file-preview__frontmatter","aria-label":t("fileTree.metadata"),children:h.frontmatter.map(g=>o.jsxs("div",{children:[o.jsx("dt",{children:g.key}),o.jsx("dd",{children:g.value})]},g.key))}):null,o.jsx(Uu,{text:h.body,allowRawHtml:!1,className:"skill-file-preview__markdown-body"})]}):o.jsx(UE,{value:c.content,path:c.path,readOnly:!0,onChange:()=>{}})})]}):o.jsx("div",{className:"skill-file-preview__binary",children:t("fileTree.noFiles")})})]})}const _Mt=1200,NMt=3,eje=2,jMt=/SKILL\.md|frontmatter|Skill name|description|根目录|目录名|UTF-8|文本文件|文件数|符号链接|敏感凭证/i,tte={concise:"generation.styles.concise",strict:"generation.styles.strict",tutorial:"generation.styles.tutorial",automation:"generation.styles.automation"};function nte(e,t){var n;return{id:`group-${Date.now()}-${e}`,model:((n=t.models[e%Math.max(1,t.models.length)])==null?void 0:n.id)||"",style:"concise",customStyle:""}}function RMt(e){return e?e.state==="ready"?Mt("generation.stages.ready"):e.state==="failed"?Mt("generation.stages.failed"):e.state==="cancelled"?Mt("generation.stages.cancelled"):e.stage==="validating"?Mt("generation.stages.validating"):e.stage==="packaging"?Mt("generation.stages.packaging"):Mt("generation.stages.generating"):Mt("generation.stages.preparing")}function K5(e){var t;return e.state==="failed"&&((t=e.validation)==null?void 0:t.valid)===!1&&e.validation.errors.some(n=>jMt.test(n))}function ite(e){var n;const t=((n=e.validation)==null?void 0:n.errors.join(` -`))||e.error||Mt("generation.validation.fallback");return[Mt("generation.validation.repairInstruction"),Mt("generation.validation.recheckInstruction"),t.slice(0,2e3)].join(` +`).replace(/^\s*\n/,""),frontmatter:Object.entries(r).map(([a,l])=>({key:a,value:typeof l=="string"?l:jU(l).trim()}))}}function AMt(){return o.jsx("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M2.75 5.5h5l1.5 1.75h8v7.25a1.75 1.75 0 0 1-1.75 1.75h-11a1.75 1.75 0 0 1-1.75-1.75v-9Z"})})}function _Mt(){return o.jsxs("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[o.jsx("path",{d:"M5 2.75h6l4 4v10.5H5z"}),o.jsx("path",{d:"M11 2.75v4h4"})]})}function NMt(e){const t={children:[]};for(const i of e){let r=t;const s=i.path.split("/").filter(Boolean);s.forEach((a,l)=>{let c=r.children.find(u=>u.name===a);if(!c){const u=s.slice(0,l+1).join("/");c={name:a,path:u,children:[]},r.children.push(c)}l===s.length-1&&(c.file=i),r=c})}const n=i=>{i.sort((r,s)=>+!!r.file-+!!s.file||r.name.localeCompare(s.name)),i.forEach(r=>n(r.children))};return n(t.children),t.children}function JNe({nodes:e,depth:t,activePath:n,onSelect:i}){return e.map(r=>o.jsxs("div",{children:[r.file?o.jsxs("button",{type:"button",className:`skill-file-tree__row${r.path===n?" is-active":""}`,style:{paddingLeft:`${12+t*16}px`},onClick:()=>i(r.file),title:r.path,children:[o.jsx(_Mt,{}),o.jsx("span",{children:r.name}),o.jsxs("small",{children:[r.file.size.toLocaleString()," B"]})]}):o.jsxs("div",{className:"skill-file-tree__row is-folder",style:{paddingLeft:`${12+t*16}px`},title:r.path,children:[o.jsx(AMt,{}),o.jsx("span",{children:r.name})]}),r.children.length>0?o.jsx(JNe,{nodes:r.children,depth:t+1,activePath:n,onSelect:i}):null]},r.path))}function jMt(e){if(e.content===void 0)return;if(e.content.startsWith("data:")){const i=document.createElement("a");i.href=e.content,i.download=e.path.split("/").pop()||"skill-file",i.click();return}const t=URL.createObjectURL(new Blob([e.content])),n=document.createElement("a");n.href=t,n.download=e.path.split("/").pop()||"skill-file",n.click(),URL.revokeObjectURL(t)}function eje({files:e}){var p;const{t,i18n:n}=xe("skills"),i=m.useMemo(()=>NMt(e),[e]),[r,s]=m.useState(((p=e[0])==null?void 0:p.path)||""),[a,l]=m.useState("preview"),c=e.find(g=>g.path===r)||e[0],u=(c==null?void 0:c.path.toLowerCase())||"",d=u.endsWith(".md")||u.endsWith(".markdown"),f=/\.(png|jpe?g|gif|webp|svg)$/.test(u),h=m.useMemo(()=>TMt(d&&(c==null?void 0:c.content)!==void 0?c.content:""),[c==null?void 0:c.content,d]);return o.jsxs("div",{className:"skill-file-browser",children:[o.jsx("aside",{className:"skill-file-tree","aria-label":t("fileTree.ariaLabel"),children:o.jsx(JNe,{nodes:i,depth:0,activePath:(c==null?void 0:c.path)||"",onSelect:g=>s(g.path)})}),o.jsx("section",{className:"skill-file-preview",children:c?o.jsxs(o.Fragment,{children:[o.jsxs("header",{children:[o.jsx("span",{title:c.path,children:c.path}),o.jsxs("div",{children:[d?o.jsx("button",{type:"button",onClick:()=>l(g=>g==="preview"?"source":"preview"),children:t(a==="preview"?"fileTree.viewSource":"fileTree.viewPreview")}):null,o.jsx("button",{type:"button",disabled:c.content===void 0,onClick:()=>jMt(c),children:t("fileTree.download")})]})]}),o.jsx("div",{className:"skill-file-preview__body",children:c.kind==="binary"||c.content===void 0?o.jsxs("div",{className:"skill-file-preview__binary",children:[o.jsx("strong",{children:t("fileTree.binaryFile")}),o.jsx("span",{children:t("fileTree.bytes",{value:new Intl.NumberFormat(n.resolvedLanguage).format(c.size)})}),o.jsx("span",{children:t("fileTree.binaryDescription")})]}):f?o.jsx("img",{src:c.content.startsWith("data:")?c.content:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(c.content)}`,alt:c.path}):d&&a==="preview"?o.jsxs("div",{className:"skill-file-preview__markdown",children:[h.frontmatter.length>0?o.jsx("dl",{className:"skill-file-preview__frontmatter","aria-label":t("fileTree.metadata"),children:h.frontmatter.map(g=>o.jsxs("div",{children:[o.jsx("dt",{children:g.key}),o.jsx("dd",{children:g.value})]},g.key))}):null,o.jsx(Bu,{text:h.body,allowRawHtml:!1,className:"skill-file-preview__markdown-body"})]}):o.jsx($E,{value:c.content,path:c.path,readOnly:!0,onChange:()=>{}})})]}):o.jsx("div",{className:"skill-file-preview__binary",children:t("fileTree.noFiles")})})]})}const RMt=1200,IMt=3,tje=2,PMt=/SKILL\.md|frontmatter|Skill name|description|根目录|目录名|UTF-8|文本文件|文件数|符号链接|敏感凭证/i,Zee={concise:"generation.styles.concise",strict:"generation.styles.strict",tutorial:"generation.styles.tutorial",automation:"generation.styles.automation"};function Jee(e,t){var n;return{id:`group-${Date.now()}-${e}`,model:((n=t.models[e%Math.max(1,t.models.length)])==null?void 0:n.id)||"",style:"concise",customStyle:""}}function DMt(e){return e?e.state==="ready"?Dt("generation.stages.ready"):e.state==="failed"?Dt("generation.stages.failed"):e.state==="cancelled"?Dt("generation.stages.cancelled"):e.stage==="validating"?Dt("generation.stages.validating"):e.stage==="packaging"?Dt("generation.stages.packaging"):Dt("generation.stages.generating"):Dt("generation.stages.preparing")}function q5(e){var t;return e.state==="failed"&&((t=e.validation)==null?void 0:t.valid)===!1&&e.validation.errors.some(n=>PMt.test(n))}function ete(e){var n;const t=((n=e.validation)==null?void 0:n.errors.join(` +`))||e.error||Dt("generation.validation.fallback");return[Dt("generation.validation.repairInstruction"),Dt("generation.validation.recheckInstruction"),t.slice(0,2e3)].join(` -`)}function IMt(e){var t;if(e.repairing||((t=e.task)==null?void 0:t.state)==="running"&&e.repairMode){if(e.repairMode==="manual")return Mt("generation.stages.repairingAgain");const n=Math.max(1,e.repairAttempts||1);return Mt("generation.stages.autoRepairing",{attempt:n,max:eje})}return RMt(e.task)}function rte(){return o.jsxs("svg",{className:"skill-generation__spinner",viewBox:"0 0 20 20","aria-hidden":"true",children:[o.jsx("circle",{cx:"10",cy:"10",r:"7"}),o.jsx("path",{d:"M10 3a7 7 0 0 1 7 7"})]})}function PMt(e,t=Date.now()){if(!(e!=null&&e.expiresAt))return Mt("generation.sessionMax");const n=Math.max(0,new Date(e.expiresAt).getTime()-t),i=Math.floor(n/6e4),r=Math.floor(n%6e4/1e3);return Mt("generation.remaining",{minutes:i,seconds:String(r).padStart(2,"0")})}function DMt(e){return e?e.length>64?Mt("generation.validation.nameTooLong"):/^[a-z0-9-]+$/.test(e)?"":Mt("generation.validation.invalidName"):""}function ste(e){return e?e.length>128?Mt("generation.validation.modelTooLong"):/^[A-Za-z0-9][A-Za-z0-9._:/-]*$/.test(e)?"":Mt("generation.validation.invalidModel"):""}function G5(e){return`${e.region||""}:${e.id}`}function MMt(){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"m14.5 6-6 6 6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function LMt({operation:e,cloudProvider:t,space:n,availableSpaces:i=[],spacesLoading:r=!1,initialIntent:s="",source:a,onBack:l,onPublished:c}){var we,Ke,Je,Tt;const{t:u}=Oe("skills"),[d,f]=m.useState(null),[h,p]=m.useState(null),[g,b]=m.useState(s),[v,y]=m.useState(""),[x,w]=m.useState([]),[O,k]=m.useState([]),[S,E]=m.useState(""),[C,N]=m.useState(!1),[_,j]=m.useState(""),[T,L]=m.useState(""),[A,R]=m.useState(null),[P,$]=m.useState(""),[M,B]=m.useState(""),[I,H]=m.useState(n?G5(n):""),[X,Q]=m.useState(Date.now()),q=m.useRef([]);m.useEffect(()=>{const Ne=new AbortController;return ZR(Ne.signal).then(ve=>{f(ve),w([nte(0,ve)])}).catch(ve=>{Ne.signal.aborted||p(ka(ve,Mt("generation.errors.loadCapability")))}),()=>Ne.abort()},[]),m.useEffect(()=>{q.current=O},[O]),m.useEffect(()=>{const Ne=window.setInterval(()=>Q(Date.now()),1e3);return()=>window.clearInterval(Ne)},[]),m.useEffect(()=>{const Ne=ve=>{q.current.some(He=>{var it;return((it=He.task)==null?void 0:it.state)==="running"||He.repairing})&&ve.preventDefault()};return window.addEventListener("beforeunload",Ne),()=>{var ve;window.removeEventListener("beforeunload",Ne);for(const He of q.current)(ve=He.task)!=null&&ve.jobId&&v1t(He.task.jobId).catch(()=>{})}},[]),m.useEffect(()=>{if(!O.some(it=>{var Ae;return((Ae=it.task)==null?void 0:Ae.state)==="running"||it.repairing}))return;let Ne=!1,ve;const He=async()=>{const it=q.current,Ae=await Promise.all(it.map(async Kt=>{var gn;if(((gn=Kt.task)==null?void 0:gn.state)!=="running")return Kt;try{const Wt=await g1t(Kt.task.jobId);if(K5(Wt)&&(Kt.repairAttempts||0)at.map(bt=>bt.id===Kt.id?{...bt,task:Wt,repairing:!0,repairMode:"auto",repairAttempts:Nt,repairError:void 0}:bt));try{const at=await FM({jobId:Wt.jobId,intent:ite(Wt),expectedRevision:Wt.revision});return{...Kt,task:at,artifact:void 0,repairing:!1,repairMode:"auto",repairAttempts:Nt,repairError:void 0,error:void 0,pollError:void 0}}catch(at){return{...Kt,task:Wt,repairing:!1,repairMode:void 0,repairAttempts:Nt,repairError:ka(at,Mt("generation.errors.autoRepair")),pollError:void 0}}}let Ot=Kt.artifact;return Wt.state==="ready"&&(Ot=await $M(Wt.jobId,Wt.revision)),{...Kt,task:Wt,artifact:Ot,repairing:!1,repairMode:Wt.state==="running"?Kt.repairMode:void 0,repairError:void 0,error:void 0,pollError:void 0}}catch(Wt){return{...Kt,pollError:ka(Wt,Mt("generation.errors.pollCandidate"))}}}));Ne||(k(Ae),ve=window.setTimeout(()=>void He(),_Mt))};return He(),()=>{Ne=!0,ve!==void 0&&window.clearTimeout(ve)}},[O.some(Ne=>{var ve;return((ve=Ne.task)==null?void 0:ve.state)==="running"||Ne.repairing})]);const U=O.find(Ne=>Ne.id===S)||O[0],te=e==="create"&&!n,le=i.find(Ne=>G5(Ne)===I)??null,oe=n??le,re=i.map(Ne=>({value:G5(Ne),label:`${Ne.name.trim()||u("generation.unnamedSpace")} · ${Th(Ne.region||"cn-beijing",t)}`})),he=DMt(v),K=!!(d!=null&&d.enabled&&g.trim()&&!he&&x.length>0&&x.every(Ne=>Ne.model.trim()&&!ste(Ne.model.trim()))),G=(Ne,ve)=>{w(He=>He.map(it=>it.id===Ne?{...it,...ve}:it))},se=async Ne=>{const ve={...Ne,model:Ne.model.trim()},He=Ne.style==="custom"?Ne.customStyle.trim():Ne.style;try{const it=await m1t({operation:e,intent:g.trim(),model:ve.model,style:He,name:v.trim()||void 0,source:a});return{id:Ne.id,config:ve,task:it}}catch(it){return{id:Ne.id,config:ve,error:ka(it,Mt("generation.errors.createCandidate"))}}},de=async()=>{if(!K)return;N(!0),R(null);const Ne=x.map(He=>({id:He.id,config:He}));k(Ne),E(x[0].id);const ve=await Promise.all(x.map(se));k(ve)},ke=async Ne=>{k(He=>He.map(it=>it.id===Ne.id?{...it,error:void 0}:it));const ve=await se(Ne.config);k(He=>He.map(it=>it.id===Ne.id?ve:it))},Te=async()=>{if(!(!(U!=null&&U.task)||!_.trim()||U.task.state!=="ready")){L("refine"),R(null);try{const Ne=await FM({jobId:U.task.jobId,intent:_.trim(),expectedRevision:U.task.revision});k(ve=>ve.map(He=>He.id===U.id?{...He,task:Ne,artifact:void 0}:He)),j("")}catch(Ne){R(ka(Ne,Mt("generation.errors.refine")))}finally{L("")}}},rt=async()=>{if(!(!(U!=null&&U.task)||!K5(U.task))){L("refine"),R(null),k(Ne=>Ne.map(ve=>ve.id===U.id?{...ve,repairing:!0,repairMode:"manual",repairError:void 0}:ve));try{const Ne=await FM({jobId:U.task.jobId,intent:ite(U.task),expectedRevision:U.task.revision});k(ve=>ve.map(He=>He.id===U.id?{...He,task:Ne,artifact:void 0,repairing:!1,repairMode:"manual",repairError:void 0}:He))}catch(Ne){k(ve=>ve.map(He=>He.id===U.id?{...He,repairing:!1,repairMode:void 0,repairError:ka(Ne,Mt("generation.errors.repairAgain"))}:He))}finally{L("")}}},Be=async()=>{if(!(!(U!=null&&U.task)||U.task.state!=="ready"||M)){L("publish"),R(null);try{if(!oe)throw new Error(Mt("generation.errors.selectSpace"));const Ne=U.artifact||await $M(U.task.jobId,U.task.revision),ve=(a==null?void 0:a.region)||oe.region||"";if(!Gj(ve))throw new Error(Mt("generation.errors.unsupportedRegion"));await y1t({jobId:U.task.jobId,expectedRevision:U.task.revision,expectedArtifactSha256:Ne.sha256,disposition:e==="optimize"?"update-source":"create-new",skillSpaceIds:[oe.id],projectName:(a==null?void 0:a.projectName)||oe.projectName,region:ve,onProgress:He=>$(He.message)}),B(U.id),c()}catch(Ne){R(ka(Ne,Mt("generation.errors.upload")))}finally{L(""),$("")}}},Me=async()=>{if(!(!(U!=null&&U.task)||U.task.state!=="ready")){L("download");try{const Ne=U.artifact||await $M(U.task.jobId,U.task.revision);await x1t(U.task.jobId,U.task.revision,Ne.sha256)}catch(Ne){R(ka(Ne,Mt("generation.errors.download")))}finally{L("")}}},Ie=async()=>{O.some(Ne=>{var ve;return((ve=Ne.task)==null?void 0:ve.state)==="running"})&&!window.confirm(Mt("generation.leaveConfirmation"))||(await Promise.allSettled(O.flatMap(Ne=>{var ve;return((ve=Ne.task)==null?void 0:ve.state)==="running"?[b1t({jobId:Ne.task.jobId,expectedRevision:Ne.task.revision})]:[]})),l())},qe=e==="create"?u("generation.createTitle"):u("generation.optimizeTitle",{name:(a==null?void 0:a.name)||u("generation.skillFallback")}),Pe=Ne=>{var ve;return((ve=d==null?void 0:d.models.find(He=>He.id===Ne))==null?void 0:ve.label)||Ne},Ve=Ne=>Ne.config.style==="custom"?Ne.config.customStyle.trim()||u("generation.styles.customFallback"):u(tte[Ne.config.style]),Ee=[...Object.entries(tte).map(([Ne,ve])=>({value:Ne,label:u(ve)})),{value:"custom",label:u("generation.styles.custom")}],Le=Ne=>Ne.error||Ne.repairError?u("generation.stages.failed"):IMt(Ne),Y=Ne=>!Ne.error&&!Ne.repairError&&(Ne.repairing||!Ne.task||Ne.task.state==="running"),fe=O.some(Ne=>{var ve;return((ve=Ne.task)==null?void 0:ve.state)==="ready"});return o.jsxs("section",{className:"skill-generation",children:[o.jsxs("header",{className:"skill-generation__header",children:[o.jsx("button",{type:"button",className:"skillcenter-back",onClick:()=>void Ie(),"aria-label":u("generation.back"),children:o.jsx(MMt,{})}),o.jsxs("div",{children:[o.jsx("h1",{children:qe}),o.jsx("p",{children:(n==null?void 0:n.name)||u("generation.home")})]}),O.length>0?o.jsx("span",{className:"skill-generation__ttl",children:PMt(U==null?void 0:U.task,X)}):null]}),C?o.jsxs("div",{className:"skill-generation__workspace",children:[o.jsx("div",{className:"skill-generation__candidate-tabs",role:"tablist","aria-label":u("generation.candidates"),children:O.map(Ne=>o.jsxs("button",{type:"button",role:"tab","aria-selected":(U==null?void 0:U.id)===Ne.id,className:(U==null?void 0:U.id)===Ne.id?"is-active":"",onClick:()=>E(Ne.id),children:[o.jsxs("span",{className:"skill-generation__summary-row",children:[o.jsx("span",{children:u("generation.style")}),o.jsx("strong",{children:Ve(Ne)})]}),o.jsxs("span",{className:"skill-generation__summary-row",children:[o.jsx("span",{children:u("generation.model")}),o.jsx("strong",{children:Pe(Ne.config.model)})]}),o.jsxs("span",{className:"skill-generation__summary-row",children:[o.jsx("span",{children:u("generation.progress")}),o.jsxs("strong",{children:[Y(Ne)?o.jsx(rte,{}):null,Le(Ne)]})]})]},Ne.id))}),U?o.jsxs("div",{className:"skill-generation__candidate",children:[o.jsxs("section",{className:"skill-generation__activity",children:[o.jsx("header",{children:o.jsxs("div",{className:"skill-generation__candidate-summary",children:[o.jsxs("div",{className:"skill-generation__summary-row",children:[o.jsx("span",{children:u("generation.style")}),o.jsx("strong",{children:Ve(U)})]}),o.jsxs("div",{className:"skill-generation__summary-row",children:[o.jsx("span",{children:u("generation.model")}),o.jsx("strong",{children:Pe(U.config.model)})]}),o.jsxs("div",{className:"skill-generation__summary-row","aria-live":"polite",children:[o.jsx("span",{children:u("generation.progress")}),o.jsxs("strong",{children:[Y(U)?o.jsx(rte,{}):null,Y(U)?o.jsx(Tn,{children:Le(U)}):Le(U)]})]})]})}),U.task?o.jsx(rSt,{activities:U.task.activities}):null,U.pollError?o.jsx("div",{className:"skill-inline-notice",children:o.jsx(ll,{error:U.pollError})}):null,U.repairError?o.jsx("div",{className:"skill-inline-notice",children:o.jsx(ll,{error:U.repairError})}):null,U.error?o.jsxs("div",{className:"skill-inline-error",children:[o.jsx(ll,{error:U.error}),o.jsx("button",{type:"button",onClick:()=>void ke(U),children:u("generation.retryCandidate")})]}):null,(we=U.task)!=null&&we.validation&&!U.task.validation.valid&&!U.repairing&&U.task.state==="failed"?o.jsxs("div",{className:"skill-validation-errors",children:[o.jsx("strong",{children:u("generation.formatValidationFailed")}),U.task.validation.errors.map(Ne=>o.jsx("p",{children:Ne},Ne)),K5(U.task)?o.jsx("button",{type:"button",disabled:!!T,onClick:()=>void rt(),children:u("generation.repairAgain")}):null]}):null]}),o.jsxs("section",{className:"skill-generation__files",children:[o.jsxs("header",{children:[o.jsx("h2",{children:u("generation.files")}),((Ke=U.task)==null?void 0:Ke.state)==="ready"?o.jsx("button",{type:"button",onClick:()=>void Me(),disabled:!!T,children:u("generation.downloadZip")}):null]}),U.artifact?o.jsx(JNe,{files:U.artifact.files}):o.jsx("div",{className:"skill-generation__files-empty",children:((Je=U.task)==null?void 0:Je.state)==="ready"?u("generation.loadingFiles"):u("generation.filesPending")})]}),((Tt=U.task)==null?void 0:Tt.state)==="ready"?o.jsxs("div",{className:"skill-generation__ready-actions",children:[te?o.jsx("div",{className:"skill-generation__publish-target",children:o.jsx(bA,{label:u("generation.uploadToSpace"),value:I,options:re,onChange:H,disabled:r,placeholder:u(r?"generation.loadingSpaces":"generation.selectSpace")})}):null,o.jsxs("footer",{className:"skill-generation__followup",children:[o.jsx("textarea",{value:_,onChange:Ne=>j(Ne.target.value),placeholder:u("generation.continuePlaceholder")}),o.jsx("button",{type:"button",className:"skill-button",disabled:!_.trim()||!!T,onClick:()=>void Te(),children:u("generation.continue")}),o.jsx("button",{type:"button",className:"skill-button skill-button--primary",disabled:!!T||!!M||!oe,onClick:()=>void Be(),children:T==="publish"?P||u("generation.uploading"):u(e==="optimize"?"generation.overwrite":te?"generation.uploadToSelectedSpace":"generation.uploadToCurrentSpace")})]})]}):null,A?o.jsx("div",{className:"skill-inline-error skill-generation__action-error",children:o.jsx(ll,{error:A})}):null]}):null,!fe&&O.every(Ne=>Ne.error)?o.jsx("div",{className:"skill-inline-error",children:u("generation.allCandidatesFailed")}):null]}):o.jsxs("div",{className:"skill-generation__setup",children:[o.jsx("div",{className:"skill-generation__section-head is-basic",children:o.jsx("div",{children:o.jsx("strong",{children:u("generation.basicInfo")})})}),o.jsxs("label",{children:[o.jsxs("span",{children:[u("generation.goal"),o.jsx("span",{className:"skill-required-mark","aria-hidden":"true",children:"*"})]}),o.jsx("textarea",{required:!0,value:g,onChange:Ne=>b(Ne.target.value),placeholder:u(e==="create"?"generation.createIntentPlaceholder":"generation.optimizeIntentPlaceholder")})]}),o.jsxs("label",{children:[o.jsx("span",{children:u("generation.skillName")}),o.jsx("input",{value:v,onChange:Ne=>y(Ne.target.value),placeholder:u("generation.autoNamePlaceholder"),"aria-invalid":!!he,"aria-describedby":"skill-name-help"}),he?o.jsx("span",{id:"skill-name-help",className:"skill-generation__field-error",role:"alert",children:he}):o.jsx("span",{id:"skill-name-help",className:"skill-generation__field-help",children:u("generation.nameHelp")})]}),o.jsx("div",{className:"skill-generation__section-head",children:o.jsxs("div",{children:[o.jsx("strong",{children:u(e==="create"?"generation.createPlans":"generation.optimizePlans")}),o.jsx("span",{children:u(e==="create"?"generation.createPlansDescription":"generation.optimizePlansDescription")})]})}),o.jsxs("div",{className:"skill-generation__groups",children:[x.map((Ne,ve)=>o.jsxs("article",{className:"skill-generation__group",children:[o.jsxs("header",{children:[o.jsx("strong",{children:u("generation.plan",{count:ve+1})}),x.length>1?o.jsx("button",{type:"button",onClick:()=>w(He=>He.filter(it=>it.id!==Ne.id)),children:u("generation.remove")}):null]}),o.jsx(bA,{label:u("generation.model"),required:!0,value:Ne.model,options:(d==null?void 0:d.models.map(He=>({value:He.id,label:He.label})))||[],onChange:He=>G(Ne.id,{model:He}),allowCustom:!0,placeholder:u("generation.modelPlaceholder"),error:ste(Ne.model.trim())}),o.jsx(bA,{label:u("generation.style"),required:!0,value:Ne.style,options:Ee,onChange:He=>G(Ne.id,{style:He})}),Ne.style==="custom"?o.jsxs("label",{children:[o.jsx("span",{children:u("generation.customStyle")}),o.jsx("textarea",{value:Ne.customStyle,onChange:He=>G(Ne.id,{customStyle:He.target.value}),placeholder:u("generation.customStylePlaceholder")})]}):null]},Ne.id)),d&&x.lengthw(Ne=>[...Ne,nte(Ne.length,d)]),children:u("generation.addConfiguration")}):null]}),h?o.jsx("div",{className:"skill-inline-error",children:o.jsx(ll,{error:h})}):null,d&&!d.enabled?o.jsx("div",{className:"skill-inline-notice",children:u("generation.notConfigured")}):null,o.jsx("div",{className:"skill-generation__setup-actions",children:o.jsx("button",{type:"button",className:"skill-button skill-button--primary",disabled:!K,onClick:()=>void de(),children:u("generation.generate")})})]})]})}function UQ({title:e,children:t,onClose:n,className:i=""}){const{t:r}=Oe("skills"),s=m.useRef(null);return m.useEffect(()=>{var l;(l=s.current)==null||l.focus();const a=c=>c.key==="Escape"&&n();return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n]),o.jsx("div",{className:"skill-dialog-backdrop",onMouseDown:n,children:o.jsxs("section",{className:`skill-dialog${i?` ${i}`:""}`,role:"dialog","aria-modal":"true","aria-label":e,onMouseDown:a=>a.stopPropagation(),children:[o.jsxs("header",{children:[o.jsx("h2",{children:e}),o.jsx("button",{ref:s,type:"button",onClick:n,"aria-label":r("management.close"),children:r("management.close")})]}),t]})})}function $Mt({region:e,regionOptions:t,onClose:n,onCreated:i}){const{t:r}=Oe("skills"),[s,a]=m.useState(""),[l,c]=m.useState(""),[u,d]=m.useState(e),[f,h]=m.useState(!1),[p,g]=m.useState(null),b=async()=>{if(s.trim()){h(!0),g(null);try{const v=await Jxt({name:s.trim(),description:l.trim()||void 0,region:u});i({...v,region:v.region||u})}catch(v){g(ka(v,r("management.createSpaceFailed")))}finally{h(!1)}}};return o.jsxs(UQ,{title:r("management.createSpaceTitle"),onClose:n,children:[o.jsxs("div",{className:"skill-dialog__body",children:[o.jsxs("label",{children:[o.jsx("span",{children:r("management.name")}),o.jsx("input",{autoFocus:!0,value:s,maxLength:128,onChange:v=>a(v.target.value)})]}),o.jsx(bA,{label:r("management.region"),value:u,options:t,onChange:d,required:!0}),o.jsxs("label",{children:[o.jsx("span",{children:r("management.optionalDescription")}),o.jsx("textarea",{value:l,maxLength:1024,onChange:v=>c(v.target.value)})]}),p?o.jsx("div",{className:"skill-inline-error",children:o.jsx(ll,{error:p})}):null]}),o.jsxs("footer",{children:[o.jsx("button",{type:"button",className:"skill-button",onClick:n,children:r("management.cancel")}),o.jsx("button",{type:"button",className:"skill-button skill-button--primary",disabled:!s.trim()||f,onClick:()=>void b(),children:r(f?"management.creating":"management.create")})]})]})}function FMt({space:e,region:t,onClose:n,onUpdated:i}){const{t:r}=Oe("skills"),[s,a]=m.useState(e.name),[l,c]=m.useState(e.description||""),[u,d]=m.useState(!1),[f,h]=m.useState(null),p=async()=>{if(s.trim()){d(!0),h(null);try{const g=await e1t({spaceId:e.id,name:s.trim(),description:l.trim()||void 0,region:t});i({...e,...g,skillCount:e.skillCount})}catch(g){h(ka(g,r("management.updateSpaceFailed")))}finally{d(!1)}}};return o.jsxs(UQ,{title:r("management.editSpaceTitle"),onClose:n,children:[o.jsxs("div",{className:"skill-dialog__body",children:[o.jsxs("label",{children:[o.jsx("span",{children:r("management.name")}),o.jsx("input",{autoFocus:!0,value:s,maxLength:128,onChange:g=>a(g.target.value)})]}),o.jsxs("label",{children:[o.jsx("span",{children:r("management.optionalDescription")}),o.jsx("textarea",{value:l,maxLength:1024,onChange:g=>c(g.target.value)})]}),f?o.jsx("div",{className:"skill-inline-error",children:o.jsx(ll,{error:f})}):null]}),o.jsxs("footer",{children:[o.jsx("button",{type:"button",className:"skill-button",onClick:n,children:r("management.cancel")}),o.jsx("button",{type:"button",className:"skill-button skill-button--primary",disabled:!s.trim()||u,onClick:()=>void p(),children:r(u?"management.saving":"management.save")})]})]})}function BMt({space:e,region:t,onClose:n,onUploaded:i}){const{t:r,i18n:s}=Oe("skills"),[a,l]=m.useState(null),[c,u]=m.useState(null),[d,f]=m.useState(!1),[h,p]=m.useState(!1),[g,b]=m.useState(null),[v,y]=m.useState(!1),x=m.useRef(0),w=m.useRef(null),O=async S=>{const E=x.current+1;if(x.current=E,l(S),u(null),b(null),f(!!S),!!S)try{const C=await i1t(S);x.current===E&&u({name:C.name,fileCount:C.files.length})}catch(C){x.current===E&&b(ka(C,r("management.archiveValidationFailed")))}finally{x.current===E&&f(!1)}},k=async()=>{if(!(!a||!c)){p(!0),b(null);try{await n1t({spaceId:e.id,region:t,project:e.projectName,file:a}),i()}catch(S){b(ka(S,r("management.uploadFailed")))}finally{p(!1)}}};return o.jsxs(UQ,{title:r("management.uploadTitle",{name:e.name}),className:"skill-upload-dialog",onClose:n,children:[o.jsxs("div",{className:"skill-dialog__body",children:[o.jsx("input",{ref:w,className:"skill-upload-dialog__input",type:"file",accept:".zip,application/zip",onChange:S=>{var E;return void O(((E=S.target.files)==null?void 0:E[0])||null)}}),o.jsxs("button",{type:"button",className:`skill-upload-dropzone${v?" is-dragging":""}`,onClick:()=>{var S;return(S=w.current)==null?void 0:S.click()},onDragEnter:S=>{S.preventDefault(),y(!0)},onDragOver:S=>{S.preventDefault(),S.dataTransfer.dropEffect="copy",y(!0)},onDragLeave:S=>{S.currentTarget.contains(S.relatedTarget)||y(!1)},onDrop:S=>{var E;S.preventDefault(),y(!1),O(((E=S.dataTransfer.files)==null?void 0:E[0])||null)},children:[o.jsx("strong",{children:a?a.name:r("management.dropzone")}),o.jsx("span",{children:a?r("fileTree.bytes",{value:new Intl.NumberFormat(s.resolvedLanguage).format(a.size)}):r("management.chooseLocalFile")})]}),o.jsx("p",{children:r("management.archiveHelp")}),d?o.jsx("div",{className:"skill-inline-notice",children:r("management.validating")}):null,c?o.jsx("div",{className:"skill-inline-notice",children:r("management.validationPassed",{name:c.name,count:c.fileCount})}):null,g?o.jsx("div",{className:"skill-inline-error",children:o.jsx(ll,{error:g})}):null]}),o.jsxs("footer",{children:[o.jsx("button",{type:"button",className:"skill-button",onClick:n,children:r("management.cancel")}),o.jsx("button",{type:"button",className:"skill-button skill-button--primary",disabled:!a||!c||d||h,onClick:()=>void k(),children:r(h?"management.uploading":"management.upload")})]})]})}function UMt(e){if(typeof e=="number")return e<1e12?e*1e3:e;const t=e.trim(),n=Number(t);return/^\d+(?:\.\d+)?$/.test(t)?n<1e12?n*1e3:n:Date.parse(t)}function QQ(e,t=Date.now(),n="zh-CN"){if(e===void 0||e==="")return"—";const i=UMt(e);if(!Number.isFinite(i))return"—";const r=Math.floor(Math.max(0,t-i)/1e3),s=new Intl.RelativeTimeFormat(n,{numeric:"always"}),a=(f,h,p)=>n.toLowerCase().startsWith("zh")?`${f} ${p}前`:s.format(-f,h);if(r<60)return a(r,"second","秒");const l=Math.floor(r/60);if(l<60)return a(l,"minute","分钟");const c=Math.floor(l/60);if(c<24)return a(c,"hour","小时");const u=Math.floor(c/24);if(u<30)return a(u,"day","天");const d=Math.floor(u/30);return d<12?a(d,"month","个月"):a(Math.floor(d/12),"year","年")}const QMt=12,ate=12;function tj({disabled:e,placement:t="top",children:n}){const{t:i}=Oe("ui"),r=m.useId();return o.jsxs("span",{className:`skillcenter-disabled-action${e?" is-disabled":""} is-${t}`,tabIndex:e?0:void 0,"aria-describedby":e?r:void 0,children:[n,e?o.jsx("span",{id:r,className:"skillcenter-disabled-tooltip",role:"tooltip",children:i("skillCenter.sandboxNotConfigured")}):null]})}const zMt=new Set(["active","available","creating","disabled","enabled","failed","inactive","pending","published","ready","released","running","success","unavailable","unreleased","updating"]);function tje(e,t){const n=(e||"").trim().toLowerCase();return zMt.has(n)?t(`skillCenter.status.${n}`):t("skillCenter.status.unknown")}function VMt(e){const t=(e||"").toLowerCase();return["active","available","enabled","published","ready","released","success"].includes(t)||t==="running"?"is-positive":["creating","pending","updating"].includes(t)?"is-progress":["failed","unavailable"].includes(t)?"is-danger":"is-muted"}function HMt(e,t){if(!e)return"";const n=e.trim(),i=Number(n),r=/^\d+(?:\.\d+)?$/.test(n)?new Date(i<1e12?i*1e3:i):new Date(n);return Number.isNaN(r.getTime())?e:new Intl.DateTimeFormat(t,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(r)}function ote(e){if(!e)return 0;const t=e.trim(),n=Number(t),i=/^\d+(?:\.\d+)?$/.test(t)?new Date(n<1e12?n*1e3:n):new Date(t);return Number.isNaN(i.getTime())?0:i.getTime()}function Ul(e){return`${e.region||"default"}:${e.projectName||"default"}:${e.id}`}function qMt(e,t){const n=new Map(e.map(i=>[Ul(i),i]));for(const i of t)n.set(Ul(i),i);return[...n.values()].sort((i,r)=>ote(r.updatedAt)-ote(i.updatedAt))}function WMt(e){const t=e.replace(/\r\n/g,` +`)}function MMt(e){var t;if(e.repairing||((t=e.task)==null?void 0:t.state)==="running"&&e.repairMode){if(e.repairMode==="manual")return Dt("generation.stages.repairingAgain");const n=Math.max(1,e.repairAttempts||1);return Dt("generation.stages.autoRepairing",{attempt:n,max:tje})}return DMt(e.task)}function tte(){return o.jsxs("svg",{className:"skill-generation__spinner",viewBox:"0 0 20 20","aria-hidden":"true",children:[o.jsx("circle",{cx:"10",cy:"10",r:"7"}),o.jsx("path",{d:"M10 3a7 7 0 0 1 7 7"})]})}function LMt(e,t=Date.now()){if(!(e!=null&&e.expiresAt))return Dt("generation.sessionMax");const n=Math.max(0,new Date(e.expiresAt).getTime()-t),i=Math.floor(n/6e4),r=Math.floor(n%6e4/1e3);return Dt("generation.remaining",{minutes:i,seconds:String(r).padStart(2,"0")})}function $Mt(e){return e?e.length>64?Dt("generation.validation.nameTooLong"):/^[a-z0-9-]+$/.test(e)?"":Dt("generation.validation.invalidName"):""}function nte(e){return e?e.length>128?Dt("generation.validation.modelTooLong"):/^[A-Za-z0-9][A-Za-z0-9._:/-]*$/.test(e)?"":Dt("generation.validation.invalidModel"):""}function W5(e){return`${e.region||""}:${e.id}`}function FMt(){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"m14.5 6-6 6 6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}function BMt({operation:e,cloudProvider:t,space:n,availableSpaces:i=[],spacesLoading:r=!1,initialIntent:s="",source:a,onBack:l,onPublished:c}){var Oe,Ke,et,Ct;const{t:u}=xe("skills"),[d,f]=m.useState(null),[h,p]=m.useState(null),[g,b]=m.useState(s),[v,y]=m.useState(""),[x,w]=m.useState([]),[O,k]=m.useState([]),[S,E]=m.useState(""),[C,N]=m.useState(!1),[_,j]=m.useState(""),[T,L]=m.useState(""),[A,R]=m.useState(null),[P,$]=m.useState(""),[M,B]=m.useState(""),[I,H]=m.useState(n?W5(n):""),[X,Q]=m.useState(Date.now()),q=m.useRef([]);m.useEffect(()=>{const je=new AbortController;return XR(je.signal).then(ve=>{f(ve),w([Jee(0,ve)])}).catch(ve=>{je.signal.aborted||p(Sa(ve,Dt("generation.errors.loadCapability")))}),()=>je.abort()},[]),m.useEffect(()=>{q.current=O},[O]),m.useEffect(()=>{const je=window.setInterval(()=>Q(Date.now()),1e3);return()=>window.clearInterval(je)},[]),m.useEffect(()=>{const je=ve=>{q.current.some(He=>{var it;return((it=He.task)==null?void 0:it.state)==="running"||He.repairing})&&ve.preventDefault()};return window.addEventListener("beforeunload",je),()=>{var ve;window.removeEventListener("beforeunload",je);for(const He of q.current)(ve=He.task)!=null&&ve.jobId&&w1t(He.task.jobId).catch(()=>{})}},[]),m.useEffect(()=>{if(!O.some(it=>{var Ae;return((Ae=it.task)==null?void 0:Ae.state)==="running"||it.repairing}))return;let je=!1,ve;const He=async()=>{const it=q.current,Ae=await Promise.all(it.map(async Wt=>{var mn;if(((mn=Wt.task)==null?void 0:mn.state)!=="running")return Wt;try{const qt=await v1t(Wt.task.jobId);if(q5(qt)&&(Wt.repairAttempts||0)at.map(bt=>bt.id===Wt.id?{...bt,task:qt,repairing:!0,repairMode:"auto",repairAttempts:Nt,repairError:void 0}:bt));try{const at=await LM({jobId:qt.jobId,intent:ete(qt),expectedRevision:qt.revision});return{...Wt,task:at,artifact:void 0,repairing:!1,repairMode:"auto",repairAttempts:Nt,repairError:void 0,error:void 0,pollError:void 0}}catch(at){return{...Wt,task:qt,repairing:!1,repairMode:void 0,repairAttempts:Nt,repairError:Sa(at,Dt("generation.errors.autoRepair")),pollError:void 0}}}let xt=Wt.artifact;return qt.state==="ready"&&(xt=await MM(qt.jobId,qt.revision)),{...Wt,task:qt,artifact:xt,repairing:!1,repairMode:qt.state==="running"?Wt.repairMode:void 0,repairError:void 0,error:void 0,pollError:void 0}}catch(qt){return{...Wt,pollError:Sa(qt,Dt("generation.errors.pollCandidate"))}}}));je||(k(Ae),ve=window.setTimeout(()=>void He(),RMt))};return He(),()=>{je=!0,ve!==void 0&&window.clearTimeout(ve)}},[O.some(je=>{var ve;return((ve=je.task)==null?void 0:ve.state)==="running"||je.repairing})]);const U=O.find(je=>je.id===S)||O[0],te=e==="create"&&!n,le=i.find(je=>W5(je)===I)??null,oe=n??le,re=i.map(je=>({value:W5(je),label:`${je.name.trim()||u("generation.unnamedSpace")} · ${wh(je.region||"cn-beijing",t)}`})),pe=$Mt(v),K=!!(d!=null&&d.enabled&&g.trim()&&!pe&&x.length>0&&x.every(je=>je.model.trim()&&!nte(je.model.trim()))),G=(je,ve)=>{w(He=>He.map(it=>it.id===je?{...it,...ve}:it))},se=async je=>{const ve={...je,model:je.model.trim()},He=je.style==="custom"?je.customStyle.trim():je.style;try{const it=await y1t({operation:e,intent:g.trim(),model:ve.model,style:He,name:v.trim()||void 0,source:a});return{id:je.id,config:ve,task:it}}catch(it){return{id:je.id,config:ve,error:Sa(it,Dt("generation.errors.createCandidate"))}}},fe=async()=>{if(!K)return;N(!0),R(null);const je=x.map(He=>({id:He.id,config:He}));k(je),E(x[0].id);const ve=await Promise.all(x.map(se));k(ve)},Se=async je=>{k(He=>He.map(it=>it.id===je.id?{...it,error:void 0}:it));const ve=await se(je.config);k(He=>He.map(it=>it.id===je.id?ve:it))},Te=async()=>{if(!(!(U!=null&&U.task)||!_.trim()||U.task.state!=="ready")){L("refine"),R(null);try{const je=await LM({jobId:U.task.jobId,intent:_.trim(),expectedRevision:U.task.revision});k(ve=>ve.map(He=>He.id===U.id?{...He,task:je,artifact:void 0}:He)),j("")}catch(je){R(Sa(je,Dt("generation.errors.refine")))}finally{L("")}}},rt=async()=>{if(!(!(U!=null&&U.task)||!q5(U.task))){L("refine"),R(null),k(je=>je.map(ve=>ve.id===U.id?{...ve,repairing:!0,repairMode:"manual",repairError:void 0}:ve));try{const je=await LM({jobId:U.task.jobId,intent:ete(U.task),expectedRevision:U.task.revision});k(ve=>ve.map(He=>He.id===U.id?{...He,task:je,artifact:void 0,repairing:!1,repairMode:"manual",repairError:void 0}:He))}catch(je){k(ve=>ve.map(He=>He.id===U.id?{...He,repairing:!1,repairMode:void 0,repairError:Sa(je,Dt("generation.errors.repairAgain"))}:He))}finally{L("")}}},Be=async()=>{if(!(!(U!=null&&U.task)||U.task.state!=="ready"||M)){L("publish"),R(null);try{if(!oe)throw new Error(Dt("generation.errors.selectSpace"));const je=U.artifact||await MM(U.task.jobId,U.task.revision),ve=(a==null?void 0:a.region)||oe.region||"";if(!qj(ve))throw new Error(Dt("generation.errors.unsupportedRegion"));await O1t({jobId:U.task.jobId,expectedRevision:U.task.revision,expectedArtifactSha256:je.sha256,disposition:e==="optimize"?"update-source":"create-new",skillSpaceIds:[oe.id],projectName:(a==null?void 0:a.projectName)||oe.projectName,region:ve,onProgress:He=>$(He.message)}),B(U.id),c()}catch(je){R(Sa(je,Dt("generation.errors.upload")))}finally{L(""),$("")}}},Me=async()=>{if(!(!(U!=null&&U.task)||U.task.state!=="ready")){L("download");try{const je=U.artifact||await MM(U.task.jobId,U.task.revision);await S1t(U.task.jobId,U.task.revision,je.sha256)}catch(je){R(Sa(je,Dt("generation.errors.download")))}finally{L("")}}},Ie=async()=>{O.some(je=>{var ve;return((ve=je.task)==null?void 0:ve.state)==="running"})&&!window.confirm(Dt("generation.leaveConfirmation"))||(await Promise.allSettled(O.flatMap(je=>{var ve;return((ve=je.task)==null?void 0:ve.state)==="running"?[x1t({jobId:je.task.jobId,expectedRevision:je.task.revision})]:[]})),l())},qe=e==="create"?u("generation.createTitle"):u("generation.optimizeTitle",{name:(a==null?void 0:a.name)||u("generation.skillFallback")}),Pe=je=>{var ve;return((ve=d==null?void 0:d.models.find(He=>He.id===je))==null?void 0:ve.label)||je},Ve=je=>je.config.style==="custom"?je.config.customStyle.trim()||u("generation.styles.customFallback"):u(Zee[je.config.style]),ke=[...Object.entries(Zee).map(([je,ve])=>({value:je,label:u(ve)})),{value:"custom",label:u("generation.styles.custom")}],Le=je=>je.error||je.repairError?u("generation.stages.failed"):MMt(je),Y=je=>!je.error&&!je.repairError&&(je.repairing||!je.task||je.task.state==="running"),he=O.some(je=>{var ve;return((ve=je.task)==null?void 0:ve.state)==="ready"});return o.jsxs("section",{className:"skill-generation",children:[o.jsxs("header",{className:"skill-generation__header",children:[o.jsx("button",{type:"button",className:"skillcenter-back",onClick:()=>void Ie(),"aria-label":u("generation.back"),children:o.jsx(FMt,{})}),o.jsxs("div",{children:[o.jsx("h1",{children:qe}),o.jsx("p",{children:(n==null?void 0:n.name)||u("generation.home")})]}),O.length>0?o.jsx("span",{className:"skill-generation__ttl",children:LMt(U==null?void 0:U.task,X)}):null]}),C?o.jsxs("div",{className:"skill-generation__workspace",children:[o.jsx("div",{className:"skill-generation__candidate-tabs",role:"tablist","aria-label":u("generation.candidates"),children:O.map(je=>o.jsxs("button",{type:"button",role:"tab","aria-selected":(U==null?void 0:U.id)===je.id,className:(U==null?void 0:U.id)===je.id?"is-active":"",onClick:()=>E(je.id),children:[o.jsxs("span",{className:"skill-generation__summary-row",children:[o.jsx("span",{children:u("generation.style")}),o.jsx("strong",{children:Ve(je)})]}),o.jsxs("span",{className:"skill-generation__summary-row",children:[o.jsx("span",{children:u("generation.model")}),o.jsx("strong",{children:Pe(je.config.model)})]}),o.jsxs("span",{className:"skill-generation__summary-row",children:[o.jsx("span",{children:u("generation.progress")}),o.jsxs("strong",{children:[Y(je)?o.jsx(tte,{}):null,Le(je)]})]})]},je.id))}),U?o.jsxs("div",{className:"skill-generation__candidate",children:[o.jsxs("section",{className:"skill-generation__activity",children:[o.jsx("header",{children:o.jsxs("div",{className:"skill-generation__candidate-summary",children:[o.jsxs("div",{className:"skill-generation__summary-row",children:[o.jsx("span",{children:u("generation.style")}),o.jsx("strong",{children:Ve(U)})]}),o.jsxs("div",{className:"skill-generation__summary-row",children:[o.jsx("span",{children:u("generation.model")}),o.jsx("strong",{children:Pe(U.config.model)})]}),o.jsxs("div",{className:"skill-generation__summary-row","aria-live":"polite",children:[o.jsx("span",{children:u("generation.progress")}),o.jsxs("strong",{children:[Y(U)?o.jsx(tte,{}):null,Y(U)?o.jsx(En,{children:Le(U)}):Le(U)]})]})]})}),U.task?o.jsx(oSt,{activities:U.task.activities}):null,U.pollError?o.jsx("div",{className:"skill-inline-notice",children:o.jsx(ol,{error:U.pollError})}):null,U.repairError?o.jsx("div",{className:"skill-inline-notice",children:o.jsx(ol,{error:U.repairError})}):null,U.error?o.jsxs("div",{className:"skill-inline-error",children:[o.jsx(ol,{error:U.error}),o.jsx("button",{type:"button",onClick:()=>void Se(U),children:u("generation.retryCandidate")})]}):null,(Oe=U.task)!=null&&Oe.validation&&!U.task.validation.valid&&!U.repairing&&U.task.state==="failed"?o.jsxs("div",{className:"skill-validation-errors",children:[o.jsx("strong",{children:u("generation.formatValidationFailed")}),U.task.validation.errors.map(je=>o.jsx("p",{children:je},je)),q5(U.task)?o.jsx("button",{type:"button",disabled:!!T,onClick:()=>void rt(),children:u("generation.repairAgain")}):null]}):null]}),o.jsxs("section",{className:"skill-generation__files",children:[o.jsxs("header",{children:[o.jsx("h2",{children:u("generation.files")}),((Ke=U.task)==null?void 0:Ke.state)==="ready"?o.jsx("button",{type:"button",onClick:()=>void Me(),disabled:!!T,children:u("generation.downloadZip")}):null]}),U.artifact?o.jsx(eje,{files:U.artifact.files}):o.jsx("div",{className:"skill-generation__files-empty",children:((et=U.task)==null?void 0:et.state)==="ready"?u("generation.loadingFiles"):u("generation.filesPending")})]}),((Ct=U.task)==null?void 0:Ct.state)==="ready"?o.jsxs("div",{className:"skill-generation__ready-actions",children:[te?o.jsx("div",{className:"skill-generation__publish-target",children:o.jsx(pA,{label:u("generation.uploadToSpace"),value:I,options:re,onChange:H,disabled:r,placeholder:u(r?"generation.loadingSpaces":"generation.selectSpace")})}):null,o.jsxs("footer",{className:"skill-generation__followup",children:[o.jsx("textarea",{value:_,onChange:je=>j(je.target.value),placeholder:u("generation.continuePlaceholder")}),o.jsx("button",{type:"button",className:"skill-button",disabled:!_.trim()||!!T,onClick:()=>void Te(),children:u("generation.continue")}),o.jsx("button",{type:"button",className:"skill-button skill-button--primary",disabled:!!T||!!M||!oe,onClick:()=>void Be(),children:T==="publish"?P||u("generation.uploading"):u(e==="optimize"?"generation.overwrite":te?"generation.uploadToSelectedSpace":"generation.uploadToCurrentSpace")})]})]}):null,A?o.jsx("div",{className:"skill-inline-error skill-generation__action-error",children:o.jsx(ol,{error:A})}):null]}):null,!he&&O.every(je=>je.error)?o.jsx("div",{className:"skill-inline-error",children:u("generation.allCandidatesFailed")}):null]}):o.jsxs("div",{className:"skill-generation__setup",children:[o.jsx("div",{className:"skill-generation__section-head is-basic",children:o.jsx("div",{children:o.jsx("strong",{children:u("generation.basicInfo")})})}),o.jsxs("label",{children:[o.jsxs("span",{children:[u("generation.goal"),o.jsx("span",{className:"skill-required-mark","aria-hidden":"true",children:"*"})]}),o.jsx("textarea",{required:!0,value:g,onChange:je=>b(je.target.value),placeholder:u(e==="create"?"generation.createIntentPlaceholder":"generation.optimizeIntentPlaceholder")})]}),o.jsxs("label",{children:[o.jsx("span",{children:u("generation.skillName")}),o.jsx("input",{value:v,onChange:je=>y(je.target.value),placeholder:u("generation.autoNamePlaceholder"),"aria-invalid":!!pe,"aria-describedby":"skill-name-help"}),pe?o.jsx("span",{id:"skill-name-help",className:"skill-generation__field-error",role:"alert",children:pe}):o.jsx("span",{id:"skill-name-help",className:"skill-generation__field-help",children:u("generation.nameHelp")})]}),o.jsx("div",{className:"skill-generation__section-head",children:o.jsxs("div",{children:[o.jsx("strong",{children:u(e==="create"?"generation.createPlans":"generation.optimizePlans")}),o.jsx("span",{children:u(e==="create"?"generation.createPlansDescription":"generation.optimizePlansDescription")})]})}),o.jsxs("div",{className:"skill-generation__groups",children:[x.map((je,ve)=>o.jsxs("article",{className:"skill-generation__group",children:[o.jsxs("header",{children:[o.jsx("strong",{children:u("generation.plan",{count:ve+1})}),x.length>1?o.jsx("button",{type:"button",onClick:()=>w(He=>He.filter(it=>it.id!==je.id)),children:u("generation.remove")}):null]}),o.jsx(pA,{label:u("generation.model"),required:!0,value:je.model,options:(d==null?void 0:d.models.map(He=>({value:He.id,label:He.label})))||[],onChange:He=>G(je.id,{model:He}),allowCustom:!0,placeholder:u("generation.modelPlaceholder"),error:nte(je.model.trim())}),o.jsx(pA,{label:u("generation.style"),required:!0,value:je.style,options:ke,onChange:He=>G(je.id,{style:He})}),je.style==="custom"?o.jsxs("label",{children:[o.jsx("span",{children:u("generation.customStyle")}),o.jsx("textarea",{value:je.customStyle,onChange:He=>G(je.id,{customStyle:He.target.value}),placeholder:u("generation.customStylePlaceholder")})]}):null]},je.id)),d&&x.lengthw(je=>[...je,Jee(je.length,d)]),children:u("generation.addConfiguration")}):null]}),h?o.jsx("div",{className:"skill-inline-error",children:o.jsx(ol,{error:h})}):null,d&&!d.enabled?o.jsx("div",{className:"skill-inline-notice",children:u("generation.notConfigured")}):null,o.jsx("div",{className:"skill-generation__setup-actions",children:o.jsx("button",{type:"button",className:"skill-button skill-button--primary",disabled:!K,onClick:()=>void fe(),children:u("generation.generate")})})]})]})}function BQ({title:e,children:t,onClose:n,className:i=""}){const{t:r}=xe("skills"),s=m.useRef(null);return m.useEffect(()=>{var l;(l=s.current)==null||l.focus();const a=c=>c.key==="Escape"&&n();return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n]),o.jsx("div",{className:"skill-dialog-backdrop",onMouseDown:n,children:o.jsxs("section",{className:`skill-dialog${i?` ${i}`:""}`,role:"dialog","aria-modal":"true","aria-label":e,onMouseDown:a=>a.stopPropagation(),children:[o.jsxs("header",{children:[o.jsx("h2",{children:e}),o.jsx("button",{ref:s,type:"button",onClick:n,"aria-label":r("management.close"),children:r("management.close")})]}),t]})})}function UMt({region:e,regionOptions:t,onClose:n,onCreated:i}){const{t:r}=xe("skills"),[s,a]=m.useState(""),[l,c]=m.useState(""),[u,d]=m.useState(e),[f,h]=m.useState(!1),[p,g]=m.useState(null),b=async()=>{if(s.trim()){h(!0),g(null);try{const v=await n1t({name:s.trim(),description:l.trim()||void 0,region:u});i({...v,region:v.region||u})}catch(v){g(Sa(v,r("management.createSpaceFailed")))}finally{h(!1)}}};return o.jsxs(BQ,{title:r("management.createSpaceTitle"),onClose:n,children:[o.jsxs("div",{className:"skill-dialog__body",children:[o.jsxs("label",{children:[o.jsx("span",{children:r("management.name")}),o.jsx("input",{autoFocus:!0,value:s,maxLength:128,onChange:v=>a(v.target.value)})]}),o.jsx(pA,{label:r("management.region"),value:u,options:t,onChange:d,required:!0}),o.jsxs("label",{children:[o.jsx("span",{children:r("management.optionalDescription")}),o.jsx("textarea",{value:l,maxLength:1024,onChange:v=>c(v.target.value)})]}),p?o.jsx("div",{className:"skill-inline-error",children:o.jsx(ol,{error:p})}):null]}),o.jsxs("footer",{children:[o.jsx("button",{type:"button",className:"skill-button",onClick:n,children:r("management.cancel")}),o.jsx("button",{type:"button",className:"skill-button skill-button--primary",disabled:!s.trim()||f,onClick:()=>void b(),children:r(f?"management.creating":"management.create")})]})]})}function QMt({space:e,region:t,onClose:n,onUpdated:i}){const{t:r}=xe("skills"),[s,a]=m.useState(e.name),[l,c]=m.useState(e.description||""),[u,d]=m.useState(!1),[f,h]=m.useState(null),p=async()=>{if(s.trim()){d(!0),h(null);try{const g=await i1t({spaceId:e.id,name:s.trim(),description:l.trim()||void 0,region:t});i({...e,...g,skillCount:e.skillCount})}catch(g){h(Sa(g,r("management.updateSpaceFailed")))}finally{d(!1)}}};return o.jsxs(BQ,{title:r("management.editSpaceTitle"),onClose:n,children:[o.jsxs("div",{className:"skill-dialog__body",children:[o.jsxs("label",{children:[o.jsx("span",{children:r("management.name")}),o.jsx("input",{autoFocus:!0,value:s,maxLength:128,onChange:g=>a(g.target.value)})]}),o.jsxs("label",{children:[o.jsx("span",{children:r("management.optionalDescription")}),o.jsx("textarea",{value:l,maxLength:1024,onChange:g=>c(g.target.value)})]}),f?o.jsx("div",{className:"skill-inline-error",children:o.jsx(ol,{error:f})}):null]}),o.jsxs("footer",{children:[o.jsx("button",{type:"button",className:"skill-button",onClick:n,children:r("management.cancel")}),o.jsx("button",{type:"button",className:"skill-button skill-button--primary",disabled:!s.trim()||u,onClick:()=>void p(),children:r(u?"management.saving":"management.save")})]})]})}function zMt({space:e,region:t,onClose:n,onUploaded:i}){const{t:r,i18n:s}=xe("skills"),[a,l]=m.useState(null),[c,u]=m.useState(null),[d,f]=m.useState(!1),[h,p]=m.useState(!1),[g,b]=m.useState(null),[v,y]=m.useState(!1),x=m.useRef(0),w=m.useRef(null),O=async S=>{const E=x.current+1;if(x.current=E,l(S),u(null),b(null),f(!!S),!!S)try{const C=await a1t(S);x.current===E&&u({name:C.name,fileCount:C.files.length})}catch(C){x.current===E&&b(Sa(C,r("management.archiveValidationFailed")))}finally{x.current===E&&f(!1)}},k=async()=>{if(!(!a||!c)){p(!0),b(null);try{await s1t({spaceId:e.id,region:t,project:e.projectName,file:a}),i()}catch(S){b(Sa(S,r("management.uploadFailed")))}finally{p(!1)}}};return o.jsxs(BQ,{title:r("management.uploadTitle",{name:e.name}),className:"skill-upload-dialog",onClose:n,children:[o.jsxs("div",{className:"skill-dialog__body",children:[o.jsx("input",{ref:w,className:"skill-upload-dialog__input",type:"file",accept:".zip,application/zip",onChange:S=>{var E;return void O(((E=S.target.files)==null?void 0:E[0])||null)}}),o.jsxs("button",{type:"button",className:`skill-upload-dropzone${v?" is-dragging":""}`,onClick:()=>{var S;return(S=w.current)==null?void 0:S.click()},onDragEnter:S=>{S.preventDefault(),y(!0)},onDragOver:S=>{S.preventDefault(),S.dataTransfer.dropEffect="copy",y(!0)},onDragLeave:S=>{S.currentTarget.contains(S.relatedTarget)||y(!1)},onDrop:S=>{var E;S.preventDefault(),y(!1),O(((E=S.dataTransfer.files)==null?void 0:E[0])||null)},children:[o.jsx("strong",{children:a?a.name:r("management.dropzone")}),o.jsx("span",{children:a?r("fileTree.bytes",{value:new Intl.NumberFormat(s.resolvedLanguage).format(a.size)}):r("management.chooseLocalFile")})]}),o.jsx("p",{children:r("management.archiveHelp")}),d?o.jsx("div",{className:"skill-inline-notice",children:r("management.validating")}):null,c?o.jsx("div",{className:"skill-inline-notice",children:r("management.validationPassed",{name:c.name,count:c.fileCount})}):null,g?o.jsx("div",{className:"skill-inline-error",children:o.jsx(ol,{error:g})}):null]}),o.jsxs("footer",{children:[o.jsx("button",{type:"button",className:"skill-button",onClick:n,children:r("management.cancel")}),o.jsx("button",{type:"button",className:"skill-button skill-button--primary",disabled:!a||!c||d||h,onClick:()=>void k(),children:r(h?"management.uploading":"management.upload")})]})]})}function VMt(e){if(typeof e=="number")return e<1e12?e*1e3:e;const t=e.trim(),n=Number(t);return/^\d+(?:\.\d+)?$/.test(t)?n<1e12?n*1e3:n:Date.parse(t)}function UQ(e,t=Date.now(),n="zh-CN"){if(e===void 0||e==="")return"—";const i=VMt(e);if(!Number.isFinite(i))return"—";const r=Math.floor(Math.max(0,t-i)/1e3),s=new Intl.RelativeTimeFormat(n,{numeric:"always"}),a=(f,h,p)=>n.toLowerCase().startsWith("zh")?`${f} ${p}前`:s.format(-f,h);if(r<60)return a(r,"second","秒");const l=Math.floor(r/60);if(l<60)return a(l,"minute","分钟");const c=Math.floor(l/60);if(c<24)return a(c,"hour","小时");const u=Math.floor(c/24);if(u<30)return a(u,"day","天");const d=Math.floor(u/30);return d<12?a(d,"month","个月"):a(Math.floor(d/12),"year","年")}const HMt=12,ite=12;function ZN({disabled:e,placement:t="top",children:n}){const{t:i}=xe("ui"),r=m.useId();return o.jsxs("span",{className:`skillcenter-disabled-action${e?" is-disabled":""} is-${t}`,tabIndex:e?0:void 0,"aria-describedby":e?r:void 0,children:[n,e?o.jsx("span",{id:r,className:"skillcenter-disabled-tooltip",role:"tooltip",children:i("skillCenter.sandboxNotConfigured")}):null]})}const qMt=new Set(["active","available","creating","disabled","enabled","failed","inactive","pending","published","ready","released","running","success","unavailable","unreleased","updating"]);function nje(e,t){const n=(e||"").trim().toLowerCase();return qMt.has(n)?t(`skillCenter.status.${n}`):t("skillCenter.status.unknown")}function WMt(e){const t=(e||"").toLowerCase();return["active","available","enabled","published","ready","released","success"].includes(t)||t==="running"?"is-positive":["creating","pending","updating"].includes(t)?"is-progress":["failed","unavailable"].includes(t)?"is-danger":"is-muted"}function KMt(e,t){if(!e)return"";const n=e.trim(),i=Number(n),r=/^\d+(?:\.\d+)?$/.test(n)?new Date(i<1e12?i*1e3:i):new Date(n);return Number.isNaN(r.getTime())?e:new Intl.DateTimeFormat(t,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(r)}function rte(e){if(!e)return 0;const t=e.trim(),n=Number(t),i=/^\d+(?:\.\d+)?$/.test(t)?new Date(n<1e12?n*1e3:n):new Date(t);return Number.isNaN(i.getTime())?0:i.getTime()}function Bl(e){return`${e.region||"default"}:${e.projectName||"default"}:${e.id}`}function GMt(e,t){const n=new Map(e.map(i=>[Bl(i),i]));for(const i of t)n.set(Bl(i),i);return[...n.values()].sort((i,r)=>rte(r.updatedAt)-rte(i.updatedAt))}function XMt(e){const t=e.replace(/\r\n/g,` `);if(!t.startsWith(`--- `))return e;const n=t.indexOf(` --- -`,4);return n>=0?t.slice(n+5).trimStart():e}function nje(e,t){const n=(e||"").trim();return!n||[">",">-","|","|-"].includes(n)?t("common.noDescription"):n}function KMt(){return o.jsx("svg",{className:"icon",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:"m7.5 7.5 9 9m0-9-9 9",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function GMt(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M12 5.5v13M5.5 12h13",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}function lte({direction:e}){return o.jsx("svg",{className:"icon",viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:e==="left"?"m11.7 5.5-4.2 4.5 4.2 4.5":"m8.3 5.5 4.2 4.5-4.2 4.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function XMt(){return o.jsx("span",{className:"skillcenter-loading-mark","aria-hidden":!0})}function YMt({page:e,total:t,pageSize:n,onPage:i}){const{t:r}=Oe("ui"),s=Math.max(1,Math.ceil(t/n));return o.jsxs("footer",{className:"skillcenter-pager",children:[o.jsx("span",{children:r("skillCenter.totalItems",{count:t})}),o.jsxs("div",{className:"skillcenter-pager-actions",children:[o.jsx("button",{type:"button",onClick:()=>i(e-1),disabled:e<=1,"aria-label":r("common.previousPage"),children:o.jsx(lte,{direction:"left"})}),o.jsxs("span",{children:[e," / ",s]}),o.jsx("button",{type:"button",onClick:()=>i(e+1),disabled:e>=s,"aria-label":r("common.nextPage"),children:o.jsx(lte,{direction:"right"})})]})]})}function ZMt({children:e}){return o.jsx("div",{className:"skillcenter-empty",children:e})}function X5({kind:e,title:t,description:n,error:i,action:r}){return o.jsx("div",{className:`skillcenter-page-state is-${e}`,role:e==="error"?"alert":"status",children:o.jsxs(Sn,{fill:"none",children:[o.jsx(Sn.Title,{children:t}),n?o.jsx(Sn.Description,{children:n}):null,i?o.jsx(ll,{error:i}):null,r?o.jsx(Sn.ActionRow,{children:o.jsx(Ft,{color:"secondary",size:"lg",onClick:r.onClick,children:r.label})}):null]})})}function cte({errors:e,cloudProvider:t,fullPage:n=!1,onRetry:i}){const{t:r}=Oe("ui");return o.jsxs("div",{className:`skillcenter-space-errors${n?" is-full-page":""}`,role:"alert",children:[o.jsxs("div",{className:"skillcenter-space-errors__content",children:[o.jsx("strong",{children:r(n?"skillCenter.cannotLoadSpaces":"skillCenter.someSpacesFailed")}),e.map(({region:s,error:a})=>o.jsxs("section",{children:[o.jsx("span",{children:Th(s,t)}),o.jsx(ll,{error:a})]},s))]}),o.jsx("button",{type:"button",onClick:i,children:r("common.reload")})]})}function JMt({skill:e,space:t,region:n,cloudProvider:i,detail:r,files:s,loading:a,error:l,canOptimize:c,onOptimize:u,onDownload:d,onClose:f}){const{t:h}=Oe("ui");return m.useEffect(()=>{const p=g=>{g.key==="Escape"&&f()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[f]),o.jsx("div",{className:"skill-detail-backdrop",role:"presentation",onMouseDown:f,children:o.jsxs("section",{className:"skill-detail-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"skill-detail-title",onMouseDown:p=>p.stopPropagation(),children:[o.jsxs("header",{className:"skill-detail-head",children:[o.jsx("div",{className:"skill-detail-heading",children:o.jsxs("div",{children:[o.jsx("h2",{id:"skill-detail-title",children:(r==null?void 0:r.name)||e.skillName}),o.jsx("p",{children:nje((r==null?void 0:r.description)||e.skillDescription,h)})]})}),o.jsxs("div",{className:"skill-detail-actions",children:[o.jsx("button",{type:"button",onClick:d,disabled:s.length===0,children:h("skillCenter.downloadZip")}),o.jsx(tj,{disabled:!c,placement:"bottom",children:o.jsx("button",{type:"button",onClick:u,disabled:!c,children:h("skillCenter.optimize")})}),o.jsx("button",{type:"button",className:"skill-detail-close",onClick:f,"aria-label":h("skillCenter.closeSkillDetails"),children:o.jsx(KMt,{})})]})]}),o.jsxs("dl",{className:"skill-detail-meta",children:[o.jsxs("div",{children:[o.jsx("dt",{children:h("skillCenter.skillId")}),o.jsx("dd",{title:e.skillId,children:e.skillId})]}),o.jsxs("div",{children:[o.jsx("dt",{children:h("agentSelector.version")}),o.jsx("dd",{children:(r==null?void 0:r.version)||e.version||"—"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:h("agentSelector.status")}),o.jsx("dd",{children:tje(e.skillStatus,h)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:h("skillCenter.skillSpace")}),o.jsx("dd",{title:t.name,children:t.name})]}),o.jsxs("div",{children:[o.jsx("dt",{children:h("myAgents.region")}),o.jsx("dd",{children:Th(n,i)})]})]}),o.jsxs("div",{className:"skill-detail-content skill-detail-content--files",children:[o.jsx("div",{className:"skill-detail-content-title",children:h("skillCenter.allFiles")}),a?o.jsxs("div",{className:"skillcenter-loading",children:[o.jsx(XMt,{}),h("skillCenter.loadingSkillContent")]}):l?o.jsx("div",{className:"skillcenter-error",children:o.jsx(ll,{error:l})}):s.length>0?o.jsx(JNe,{files:s.map(p=>p.path.endsWith("SKILL.md")&&p.content?{...p,content:WMt(p.content)}:p)}):o.jsx(ZMt,{children:h("skillCenter.noSkillContent")})]})]})})}function e5t({space:e,canUseSandbox:t,onUpload:n,onSandbox:i,onClose:r}){const{t:s}=Oe("ui");return m.useEffect(()=>{const a=l=>{l.key==="Escape"&&r()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[r]),o.jsx("div",{className:"skill-dialog-backdrop",role:"presentation",onMouseDown:r,children:o.jsxs("section",{className:"skill-dialog skill-add-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"skill-add-dialog-title",onMouseDown:a=>a.stopPropagation(),children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h2",{id:"skill-add-dialog-title",children:s("skillCenter.addSkill")}),o.jsx("p",{title:e.name,children:e.name})]}),o.jsx("button",{type:"button",onClick:r,children:s("common.cancel")})]}),o.jsxs("div",{className:"skill-add-dialog__options",children:[o.jsxs("button",{type:"button",onClick:n,children:[o.jsx("strong",{children:s("skillCenter.localUpload")}),o.jsx("span",{children:s("skillCenter.localUploadDescription")})]}),o.jsx(tj,{disabled:!t,placement:"inside",children:o.jsxs("button",{type:"button",disabled:!t,onClick:i,children:[o.jsx("strong",{children:s("skillCenter.autoCreate")}),o.jsx("span",{children:s("skillCenter.autoCreateDescription")})]})})]})]})})}function t5t({cloudProvider:e="volcengine",region:t,active:n=!0,activationRevision:i=0,initialWorkspace:r=null,onInitialWorkspaceConsumed:s,onPageTitleChange:a,toolbarLeading:l,toolbarFilters:c}){var An;const{t:u,i18n:d}=Oe("ui"),f=m.useMemo(()=>[t],[t]),[h,p]=m.useState([]),[g,b]=m.useState({}),[v,y]=m.useState(!1),[x,w]=m.useState(""),[O,k]=m.useState((r==null?void 0:r.space)??null),[S,E]=m.useState([]),[C,N]=m.useState(1),[_,j]=m.useState(0),[T,L]=m.useState(!1),[A,R]=m.useState(null),[P,$]=m.useState(""),[M,B]=m.useState("overview"),[I,H]=m.useState(null),[X,Q]=m.useState(null),[q,U]=m.useState([]),[te,le]=m.useState(!1),[oe,re]=m.useState(null),[he,K]=m.useState(null),[G,se]=m.useState(!1),[de,ke]=m.useState(null),[Te,rt]=m.useState(null),[Be,Me]=m.useState(null),[Ie,qe]=m.useState(0),[Pe,Ve]=m.useState(0),[Ee,Le]=m.useState(""),[Y,fe]=m.useState(""),[we,Ke]=m.useState(null),[Je,Tt]=m.useState(r),Ne=m.useRef(0),ve=m.useRef(0),He=m.useRef(!1),it=m.useRef(null),Ae=m.useRef(null),Kt=m.useRef(null),gn=m.useDeferredValue(x),Wt=m.useDeferredValue(P),Nt=(Je&&(O||Je.selectPublishSpace)?Je.operation==="create"?u("skillCenter.createSkill"):u("skillCenter.optimizeNamed",{name:((An=Je.source)==null?void 0:An.name)||u("skillCenter.skill")}):"")||(O==null?void 0:O.name)||u("skillCenter.library");m.useEffect(()=>{n&&(a==null||a(Nt))},[n,a,Nt]),m.useEffect(()=>{r&&(s==null||s())},[r,s]);const at=m.useMemo(()=>{const De=gn.trim().toLocaleLowerCase();return De?h.filter(pt=>`${pt.name} ${pt.description||""} ${pt.projectName||""}`.toLocaleLowerCase().includes(De)):h},[gn,h]),bt=m.useMemo(()=>{const De=Wt.trim().toLocaleLowerCase();return De?S.filter(pt=>`${pt.skillName} ${pt.skillDescription||""}`.toLocaleLowerCase().includes(De)):S},[Wt,S]),_e=(O==null?void 0:O.region)||er(e),st=m.useMemo(()=>f.flatMap(De=>{var ot;const pt=(ot=g[De])==null?void 0:ot.error;return pt?[{region:De,error:pt}]:[]}),[g,f]),je=f.some(De=>{const pt=g[De];return!!(pt&&!pt.done&&!pt.error)}),gt=st.length===f.length;m.useEffect(()=>{const De=new AbortController;return ZR(De.signal).then(K).catch(()=>K({enabled:!1,reason:u("skillCenter.adminNotConfigured"),operations:["create","optimize"],models:[],styles:{}})),()=>De.abort()},[u]);const ut=m.useCallback(async(De,pt)=>{var $e;if(He.current||De.length===0)return;He.current=!0,y(!0),pt&&(($e=it.current)==null||$e.abort(),p([]),b(Object.fromEntries(De.map(({region:ht})=>[ht,{nextPage:1,loadedCount:0,done:!1,error:null}]))));const ot=new AbortController;it.current=ot;const qn=++ve.current,ai=await Promise.allSettled(De.map(async({region:ht,page:Yt})=>({region:ht,page:Yt,result:await Zxt({region:ht,page:Yt,pageSize:QMt,signal:ot.signal})})));if(ve.current!==qn)return;const ei=ai.map((ht,Yt)=>{const hn=De[Yt];return ht.status==="rejected"?{request:hn,error:ka(ht.reason,u("skillCenter.errors.loadSpaces")),items:[],totalCount:0}:{request:hn,error:null,items:(ht.value.result.items||[]).map(nn=>({...nn,region:nn.region||ht.value.region})),totalCount:ht.value.result.totalCount||0}}),Ki=ei.flatMap(ht=>ht.items);b(ht=>{const Yt={...ht};return ei.forEach(({request:hn,error:nn,items:Ti,totalCount:Bn})=>{const yi=Yt[hn.region]||{nextPage:hn.page,loadedCount:0,done:!1,error:null};if(nn){Yt[hn.region]={...yi,error:nn};return}const ci=yi.loadedCount+Ti.length;Yt[hn.region]={nextPage:hn.page+1,loadedCount:ci,done:Ti.length===0||ci>=Bn,error:null}}),Yt}),p(ht=>qMt(pt?[]:ht,Ki)),k(ht=>ht&&(Ki.find(Yt=>Ul(Yt)===Ul(ht))||ht)),He.current=!1,y(!1)},[]),ye=m.useCallback(()=>{if(He.current)return;const De=f.flatMap(pt=>{const ot=g[pt];return ot&&!ot.done&&!ot.error?[{region:pt,page:ot.nextPage}]:[]});ut(De,!1)},[ut,g,f]);m.useEffect(()=>{_t(),k(null),E([]),N(1)},[e]),m.useEffect(()=>{if(n)return ut(f.map(De=>({region:De,page:1})),!0),()=>{var De;ve.current+=1,(De=it.current)==null||De.abort(),He.current=!1}},[n,i,ut,f,Ie]),m.useEffect(()=>{const De=Kt.current,pt=Ae.current;if(!De||!pt||!je||v)return;const ot=new IntersectionObserver(([qn])=>{qn.isIntersecting&&ye()},{root:pt,rootMargin:"240px 0px",threshold:.01});return ot.observe(De),()=>ot.disconnect()},[je,ye,v]);const ze=()=>{const De=Ae.current;!De||!je||v||De.scrollHeight-De.scrollTop-De.clientHeight<=240&&ye()};m.useEffect(()=>{if(!O){E([]),j(0);return}let De=!0;return L(!0),R(null),o1t(O.id,{region:_e,page:C,pageSize:ate,project:O.projectName}).then(pt=>{De&&(E(pt.items||[]),j(pt.totalCount||0))}).catch(pt=>{De&&(E([]),j(0),R(ka(pt,u("skillCenter.errors.loadSkills"))))}).finally(()=>{De&&L(!1)}),()=>{De=!1}},[_e,O,C,Pe,u]);const et=De=>{_t(),k(De),B("overview"),N(1),$("")},Et=()=>{_t(),k(null),E([]),j(0),B("overview"),N(1),$(""),Ke(null)},_t=()=>{Ne.current+=1,H(null),Q(null),U([]),re(null),le(!1)},rn=async De=>{if(!O)return;const pt=Ne.current+1;Ne.current=pt,H(De),Q(null),re(null),le(!0);try{const[ot,qn]=await Promise.all([l1t(O.id,De.skillId,De.version,_e,O.projectName,De.skillName,O.name),s1t({spaceId:O.id,skillId:De.skillId,version:De.version,region:_e,skillSpaceName:O.name,skillName:De.skillName})]);Ne.current===pt&&(Q(ot),U(qn))}catch(ot){Ne.current===pt&&re(ka(ot,u("skillCenter.errors.loadSkillDetails")))}finally{Ne.current===pt&&le(!1)}},en=De=>{if(O)return{kind:"skill-center",skillId:De.skillId,version:De.version,region:_e,projectName:O.projectName,skillSpaceId:O.id,skillSpaceName:O.name,name:De.skillName,description:De.skillDescription}},on=De=>{const pt=en(De);!pt||!(he!=null&&he.enabled)||(_t(),Tt({operation:"optimize",source:pt}))},J=async De=>{if(!(!O||!window.confirm(u("skillCenter.deleteSkillConfirm",{name:De.skillName})))){Le(De.skillId),Ke(null);try{await r1t({spaceId:O.id,skillId:De.skillId,region:_e}),Ve(pt=>pt+1),qe(pt=>pt+1)}catch(pt){Ke(ka(pt,u("skillCenter.errors.deleteSkill")))}finally{Le("")}}},Lt=async De=>{if(!window.confirm(u("skillCenter.deleteSpaceConfirm",{name:De.name})))return;const pt=Ul(De);fe(pt),Ke(null);try{await t1t({spaceId:De.id,region:De.region||er(e)}),O&&Ul(O)===pt&&Et(),qe(ot=>ot+1)}catch(ot){Ke(ka(ot,u("skillCenter.errors.deleteSpace")))}finally{fe("")}};return Je&&(O||Je.selectPublishSpace)?o.jsx(LMt,{operation:Je.operation,cloudProvider:e,space:O??void 0,availableSpaces:h,spacesLoading:v,initialIntent:Je.initialIntent,source:Je.source,onBack:()=>Tt(null),onPublished:()=>{Ve(De=>De+1),qe(De=>De+1)}}):o.jsxs("section",{className:`skillcenter${O?" is-space":" resource-collection"}`,children:[O?o.jsx(lE,{className:"skillcenter-detail",title:O.name,description:O.description||u("skillCenter.manageSpaceDescription"),identitySeed:O.name,backLabel:u("skillCenter.backToSpaces"),onBack:Et,sections:[{key:"overview",label:u("skillCenter.overview"),content:o.jsxs(o.Fragment,{children:[we?o.jsx("div",{className:"skillcenter-inline-error",role:"alert",children:o.jsx(ll,{error:we})}):null,o.jsx("section",{className:"skillcenter-overview",children:o.jsxs(kB,{className:"skillcenter-detail-facts",children:[o.jsxs("div",{children:[o.jsx("dt",{children:u("skillCenter.skillCount")}),o.jsx("dd",{children:_})]}),o.jsxs("div",{children:[o.jsx("dt",{children:u("skillCenter.updatedAt")}),o.jsx("dd",{children:O.updatedAt?HMt(O.updatedAt,d.resolvedLanguage??d.language):"—"})]})]})})]})},{key:"skills",label:u("skillCenter.skills"),content:o.jsxs(o.Fragment,{children:[we?o.jsx("div",{className:"skillcenter-inline-error",role:"alert",children:o.jsx(ll,{error:we})}):null,o.jsxs("section",{className:"skillcenter-results","aria-label":u("skillCenter.skillsInSpace",{name:O.name}),children:[o.jsx(Iwe,{title:u("skillCenter.skills"),description:u("skillCenter.totalItems",{count:_}),actions:o.jsx(Cm,{"aria-label":u("skillCenter.searchSkills"),value:P,onChange:De=>$(De.target.value),placeholder:u("skillCenter.searchSkills")})}),T&&S.length===0?o.jsx(qd,{}):A&&S.length===0?o.jsx(X5,{kind:"error",title:u("skillCenter.cannotLoadSkills"),error:A,action:{label:u("common.reload"),onClick:()=>Ve(De=>De+1)}}):bt.length===0?o.jsx(X5,{kind:"empty",title:P.trim()?u("skillCenter.noMatchingSkills"):u("skillCenter.noSkills"),description:P.trim()?u("skillCenter.tryAnotherName"):u("skillCenter.emptySkillsDescription"),action:P.trim()?void 0:{label:u("skillCenter.localUpload"),onClick:()=>Me(O)}}):o.jsx("div",{className:"skillcenter-table-wrap",children:o.jsxs("table",{className:"skillcenter-table",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:u("skillCenter.skills")}),o.jsx("th",{scope:"col",children:u("agentSelector.status")}),o.jsx("th",{scope:"col",className:"skillcenter-table__actions-heading",children:u("skillCenter.actions")})]})}),o.jsx("tbody",{children:bt.map(De=>o.jsxs("tr",{children:[o.jsx("td",{className:"skillcenter-table__skill",children:o.jsxs("button",{type:"button",onClick:()=>void rn(De),children:[o.jsxs("span",{className:"skillcenter-table__title-row",children:[o.jsx("strong",{title:De.skillName,children:De.skillName}),De.version?o.jsx("span",{className:"skillcenter-table__version-badge",children:De.version}):null]}),o.jsx("span",{className:"skillcenter-table__description",children:nje(De.skillDescription,u)})]})}),o.jsx("td",{children:o.jsx("span",{className:`skillcenter-status ${VMt(De.skillStatus)}`,children:tje(De.skillStatus,u)})}),o.jsx("td",{children:o.jsxs("div",{className:"skillcenter-table__actions",children:[o.jsx("button",{type:"button",onClick:()=>void rn(De),children:u("common.view")}),o.jsx(tj,{disabled:!(he!=null&&he.enabled),children:o.jsx("button",{type:"button",disabled:!(he!=null&&he.enabled),onClick:()=>on(De),children:u("skillCenter.optimize")})}),o.jsx("button",{type:"button",className:"is-danger",disabled:Ee===De.skillId,onClick:()=>void J(De),children:Ee===De.skillId?u("common.deleting"):u("common.delete")})]})})]},`${De.skillId}:${De.version}`))})]})}),!P.trim()&&!T&&!A&&_>0?o.jsx(YMt,{page:C,total:_,pageSize:ate,onPage:N}):null]})]})}],activeSectionKey:M,navigationLabel:u("skillCenter.spaceDetails"),onSectionChange:De=>B(De),actionsClassName:"skillcenter-toolbar-actions",actions:o.jsxs(o.Fragment,{children:[o.jsx(Ft,{type:"button",color:"secondary",variant:"outline",size:"lg",pill:!1,onClick:()=>ke(O),children:u("skillCenter.editSpace")}),o.jsx(Ft,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,disabled:Y===Ul(O),onClick:()=>void Lt(O),children:Y===Ul(O)?u("common.deleting"):u("skillCenter.deleteSpace")}),o.jsx(Ft,{type:"button",color:"secondary",variant:"outline",size:"lg",pill:!1,onClick:()=>Me(O),children:u("skillCenter.localUpload")}),o.jsx(tj,{disabled:!(he!=null&&he.enabled),children:o.jsxs(Ft,{type:"button",color:"primary",size:"lg",pill:!1,disabled:!(he!=null&&he.enabled),onClick:()=>Tt({operation:"create"}),children:[o.jsx(mbe,{"aria-hidden":"true"}),o.jsx("span",{children:u("skillCenter.createSkill")})]})})]})}):o.jsxs(o.Fragment,{children:[o.jsxs(Yb,{className:"skillcenter-list-toolbar library-resource-toolbar",children:[l,o.jsxs("div",{className:"resource-toolbar__actions",children:[c,o.jsx(Cm,{"aria-label":u("skillCenter.searchSpaces"),value:x,onChange:De=>w(De.target.value),placeholder:u("skillCenter.searchSpaces")})]})]}),we?o.jsx("div",{className:"skillcenter-inline-error",role:"alert",children:o.jsx(ll,{error:we})}):null,o.jsxs(Zb,{className:"skillcenter-list-results",ref:Ae,"aria-label":u("skillCenter.spaceList"),onScroll:ze,children:[st.length>0&&!gt?o.jsx(cte,{errors:st,cloudProvider:e,onRetry:()=>qe(De=>De+1)}):null,v&&h.length===0?o.jsx(qd,{}):gt&&h.length===0?o.jsx(cte,{errors:st,cloudProvider:e,fullPage:!0,onRetry:()=>qe(De=>De+1)}):at.length===0&&x.trim()?o.jsx(X5,{kind:"empty",title:u("skillCenter.noMatchingSpaces"),description:u("skillCenter.tryAnotherName")}):o.jsxs(Vx,{children:[x.trim()?null:o.jsx(Eb,{"aria-label":u("skillCenter.createSpace"),icon:o.jsx(GMt,{}),onClick:()=>se(!0),children:u("skillCenter.newSpace")}),at.map(De=>{const pt=Ul(De);return o.jsx(fE,{className:"skillcenter-space-card",title:De.name,description:De.description||u("common.noDescription"),metadata:[{label:u("skillCenter.skillCount"),value:u("skillCenter.skillCountValue",{count:De.skillCount??0})},{label:u("skillCenter.updatedAt"),value:QQ(De.updatedAt,Date.now(),d.resolvedLanguage??d.language)}],action:{label:u("skillCenter.addSkill"),icon:"plus",onClick:()=>rt(De)},detailAction:{label:u("common.viewDetails"),onClick:()=>et(De)}},pt)})]}),!gt&&h.length>0?o.jsx("div",{className:"my-agent-load-more",ref:Kt,"aria-live":"polite",children:v?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),o.jsx("span",{children:u("skillCenter.loadingMoreSpaces")})]}):je?o.jsx("span",{children:u("skillCenter.scrollForMore")}):st.length>0?o.jsx("span",{children:u("skillCenter.someSpacesFailed")}):o.jsx("span",{children:u("skillCenter.allSpacesLoaded")})}):null]})]}),I&&O&&o.jsx(JMt,{skill:I,space:O,region:_e,cloudProvider:e,detail:X,files:q,loading:te,error:oe,canOptimize:(he==null?void 0:he.enabled)===!0,onOptimize:()=>on(I),onDownload:()=>void a1t({spaceId:O.id,skillId:I.skillId,version:I.version,region:_e,fallbackName:I.skillName,skillSpaceName:O.name,skillName:I.skillName}).catch(De=>re(ka(De,u("skillCenter.errors.downloadSkill")))),onClose:_t}),G?o.jsx($Mt,{region:t,regionOptions:Pu(e),onClose:()=>se(!1),onCreated:De=>{se(!1),qe(pt=>pt+1),k({...De,region:De.region||t})}}):null,de?o.jsx(FMt,{space:de,region:de.region||er(e),onClose:()=>ke(null),onUpdated:De=>{const pt={...De,region:De.region||de.region||er(e)};ke(null),k(ot=>ot&&Ul(ot)===Ul(pt)?pt:ot),p(ot=>ot.map(qn=>Ul(qn)===Ul(pt)?pt:qn)),qe(ot=>ot+1)}}):null,Te?o.jsx(e5t,{space:Te,canUseSandbox:(he==null?void 0:he.enabled)===!0,onClose:()=>rt(null),onUpload:()=>{Me(Te),rt(null)},onSandbox:()=>{const De=Te;rt(null),et(De),Tt({operation:"create"})}}):null,Be?o.jsx(BMt,{space:Be,region:Be.region||er(e),onClose:()=>Me(null),onUploaded:()=>{Me(null),Ve(De=>De+1),qe(De=>De+1)}}):null]})}function n5t(e){return[{id:"skills",label:e("library.tabs.skills"),panelId:"library-skills-panel"},{id:"knowledge",label:e("library.tabs.knowledge"),panelId:"library-knowledge-panel"},{id:"artifacts",label:e("library.tabs.artifacts"),panelId:"library-artifacts-panel"}]}function i5t({cloudProvider:e,studioRegion:t="",activeTab:n,onTabChange:i,onPageTitleChange:r,skillInitialWorkspace:s=null,onSkillInitialWorkspaceConsumed:a,artifactSources:l=[],artifactUserId:c="",onArtifactActivate:u,onArtifactSourceOpen:d}){const{t:f,i18n:h}=Oe("workspaceTools"),p=m.useMemo(()=>n5t(f),[f]),g=f("library.tabs.skills"),b=Gj(t)?t:er(e),[v,y]=m.useState(b),[x,w]=m.useState(g),O=m.useRef(g),[k,S]=m.useState(!1),[E,C]=m.useState(()=>new Set(["skills",n])),[N,_]=m.useState({skills:0,knowledge:0,artifacts:0}),j=m.useRef(u),[T,L]=m.useState([]),[A,R]=m.useState(!1),[P,$]=m.useState(""),M=m.useMemo(()=>{const le=kot(l,f("library.untitledSession"));return{key:JSON.stringify(le),candidates:le}},[l,f]),B=m.useRef(M);B.current.key!==M.key&&(B.current=M);const I=B.current.candidates,H=m.useMemo(()=>Pu(e),[e]);m.useEffect(()=>{y(b)},[b]),m.useEffect(()=>{const le=O.current;w(oe=>oe===le?g:oe),O.current=g},[g]),m.useEffect(()=>{j.current=u},[u]),m.useEffect(()=>{C(le=>{if(le.has(n))return le;const oe=new Set(le);return oe.add(n),oe})},[n]),m.useEffect(()=>{var oe;const le=n==="skills"?x:((oe=p.find(re=>re.id===n))==null?void 0:oe.label)||f("library.title");r==null||r(le)},[n,r,x,f,p]),m.useEffect(()=>{var le;n==="artifacts"&&((le=j.current)==null||le.call(j))},[n,N.artifacts]);const X=m.useCallback(async()=>{R(!0),$("");try{L(await Iot(I))}catch(le){$(le instanceof Error?le.message:String(le))}finally{R(!1)}},[I]);m.useEffect(()=>{n==="artifacts"&&X()},[n,N.artifacts,X]);const Q=le=>{C(oe=>{if(oe.has(le))return oe;const re=new Set(oe);return re.add(le),re}),_(oe=>({...oe,[le]:oe[le]+1})),i(le)},q=o.jsx(cE,{idPrefix:"library",ariaLabel:f("library.categoryAria"),value:n,items:p,onChange:Q}),U=le=>o.jsx(nN,{id:le,ariaLabel:f("library.regionAria"),value:v,options:H,onChange:y}),te=n==="skills"?x!==g:n==="knowledge"&&k;return o.jsxs(Ph,{className:`library-view${te?" is-detail":""}`,"aria-label":f("library.title"),children:[te?null:o.jsx(zx,{className:"library-view__header",title:f("library.title")}),o.jsxs("div",{className:"library-panels",children:[E.has("skills")?o.jsx("div",{id:"library-skills-panel",className:"library-panel",role:"tabpanel","aria-labelledby":"library-skills-tab",hidden:n!=="skills",children:o.jsx(t5t,{cloudProvider:e,region:v,active:n==="skills",activationRevision:N.skills,onPageTitleChange:w,initialWorkspace:s,onInitialWorkspaceConsumed:a,toolbarLeading:q,toolbarFilters:U("library-skills-region-filter")})}):null,E.has("knowledge")?o.jsx("div",{id:"library-knowledge-panel",className:"library-panel",role:"tabpanel","aria-labelledby":"library-knowledge-tab",hidden:n!=="knowledge",children:o.jsx(Bxt,{cloudProvider:e,region:v,active:n==="knowledge",activationRevision:N.knowledge,onDetailChange:S,toolbarLeading:q,toolbarFilters:U("library-knowledge-region-filter")})}):null,E.has("artifacts")?o.jsx("div",{id:"library-artifacts-panel",className:"library-panel",role:"tabpanel","aria-labelledby":"library-artifacts-tab",hidden:n!=="artifacts",children:o.jsx(Not,{items:T,region:v,userId:c,active:n==="artifacts",activationRevision:N.artifacts,loading:A,error:P?Md(P,h.resolvedLanguage||h.language)||f("artifactLibrary.loadDetailFallback"):"",onRetry:()=>void X(),onEdit:Pot,onDelete:Dot,onDownload:Mot,onOpenSource:d?le=>d(le.appName,le.sessionId):void 0,toolbarLeading:q,toolbarFilters:U("library-artifacts-region-filter")})}):null]})]})}const ije="veadk_agentkit_connections",r5t=3e3,ute=6e4;function Eu(){try{const e=localStorage.getItem(ije);return(e?JSON.parse(e):[]).filter(n=>!n.runtimeId||!!n.region)}catch{return[]}}function NI(e){try{localStorage.setItem(ije,JSON.stringify(e))}catch{}}function $u(e,t){return`agentkit:${e}:${t}`}function rje(e){try{return new URL(e).host}catch{return e}}function o1(e){jbe();for(const t of e)if(!(t.runtimeId&&!t.region))for(const n of t.apps)Nbe($u(t.id,n),t.runtimeId?{app:n,runtimeId:t.runtimeId,region:t.region}:{app:n,base:t.base,apiKey:t.apiKey})}function sje(e,t,n,i,r,s){const a={id:`rt_${e}`,name:t||e,runtimeId:e,region:n,apps:i,appLabels:r,currentVersion:s},l=Eu(),c=l.findIndex(u=>u.runtimeId===e);return c===-1?l.push(a):l[c]=a,NI(l),o1(l),a}async function s5t(e,t,n,i,r){let s=null,a=n||"cn-beijing",l=null;for(const f of Bk(n))try{const h=await Fv(e,f,{retryProbe:!0,preferCached:!0,currentVersion:i});if(h&&h.length>0){await K0e(e,f),s=h,a=f;break}}catch(h){if(h instanceof Cx)throw nj(e),h;if(h instanceof $s&&h.unsupported){l=h;continue}throw h}if(!s||s.length===0)throw nj(e),l||new $s(V("connections.runtimeUnsupported"),!0,!0);const c=(r==null?void 0:r.trim())||s[0],u=Object.fromEntries(s.map(f=>[f,f===s[0]?c:f])),d=sje(e,t,a,s,u,i);return $u(d.id,s[0])}function a5t(e){return new Promise(t=>window.setTimeout(t,e))}async function DA(e,t,n,i,r={}){const s=Date.now();for(;;)try{return await s5t(e,t,n,i,r.agentName)}catch(a){const l=Date.now()-s;if(!r.waitForReady||!(a instanceof $s)||!a.retryable||l>=ute)throw a;const c=Math.min(r5t,ute-l);await a5t(c)}}async function aje(e,t,n,i){const r=t.trim().replace(/\/+$/,""),s=await Uk(r,n.trim()),a={id:Date.now().toString(36),name:e.trim()||rje(r),base:r,apiKey:n.trim(),apps:s,appLabels:i&&s.length>0?{[s[0]]:i}:void 0},l=[...Eu().filter(c=>c.base!==r),a];return NI(l),o1(l),a}function o5t(e){const t=Eu().filter(n=>n.id!==e);return NI(t),o1(t),t}function nj(e){const t=Eu().filter(n=>n.runtimeId!==e);return NI(t),o1(t),t}function oje(e,t){const n=e.map(r=>({id:r,label:r,app:r,remote:!1})),i=t.flatMap(r=>r.apps.map(s=>{var l;const a=((l=r.appLabels)==null?void 0:l[s])??s;return{id:$u(r.id,s),label:a,app:s,remote:!0,host:r.runtimeId?r.name:rje(r.base??""),runtimeId:r.runtimeId,region:r.region,currentVersion:r.currentVersion}}));return[...n,...i]}const dte=Object.freeze(Object.defineProperty({__proto__:null,addConnection:aje,addRuntimeConnection:sje,buildAgentEntries:oje,connectRuntime:DA,loadConnections:Eu,registerConnections:o1,remoteAppId:$u,removeConnection:o5t,removeRuntimeConnection:nj},Symbol.toStringTag,{value:"Module"}));function l5t({onAdded:e,onCancel:t}){const{t:n}=Oe("conversation"),[i,r]=m.useState(""),[s,a]=m.useState(""),[l,c]=m.useState(""),[u,d]=m.useState(!1),[f,h]=m.useState(""),p=i.trim().length>0&&s.trim().length>0&&!u;async function g(){if(p){d(!0),h("");try{const b=await aje(l,i,s,l);if(b.apps.length===0){h(n("addAgentKit.noAgents")),d(!1);return}e($u(b.id,b.apps[0]))}catch(b){h(n("addAgentKit.connectionFailed",{error:String(b)})),d(!1)}}}return o.jsx("div",{className:"addagent",children:o.jsxs("div",{className:"addagent-card",children:[o.jsx("h2",{className:"addagent-title",children:n("addAgentKit.title")}),o.jsx("p",{className:"addagent-sub",children:n("addAgentKit.description")}),o.jsxs("label",{className:"addagent-field",children:[o.jsx("span",{className:"addagent-label",children:n("addAgentKit.url")}),o.jsx("input",{className:"addagent-input",value:i,onChange:b=>r(b.target.value),placeholder:"https://xxxxx.apigateway-cn-beijing.volceapi.com",autoFocus:!0})]}),o.jsxs("label",{className:"addagent-field",children:[o.jsx("span",{className:"addagent-label",children:"API Key"}),o.jsx("input",{className:"addagent-input",type:"password",value:s,onChange:b=>a(b.target.value),placeholder:n("addAgentKit.apiKeyHint")})]}),o.jsxs("label",{className:"addagent-field",children:[o.jsx("span",{className:"addagent-label",children:n("addAgentKit.displayName")}),o.jsx("input",{className:"addagent-input",value:l,onChange:b=>c(b.target.value),placeholder:n("addAgentKit.displayNameHint")})]}),f&&o.jsx("div",{className:"addagent-error",children:f}),o.jsxs("div",{className:"addagent-actions",children:[o.jsx("button",{className:"addagent-btn addagent-btn--ghost",onClick:t,disabled:u,children:n("addAgentKit.cancel")}),o.jsxs("button",{className:"addagent-btn addagent-btn--primary",onClick:g,disabled:!p,children:[u?o.jsx(mi,{className:"icon spin"}):null,n(u?"addAgentKit.connecting":"addAgentKit.connect")]})]})]})})}const c5t=/[\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff]/u,u5t={"deploy.build.logs_syncing":"client.deploymentProgress.buildLogsSyncing","deploy.build.logs_complete":"client.deploymentProgress.buildLogsComplete","deploy.build.failed_logs_synced":"client.deploymentProgress.buildFailedLogsSynced","deploy.build.logs_unavailable":"client.deploymentProgress.buildLogsUnavailable","deploy.build.final_logs_unavailable":"client.deploymentProgress.finalBuildLogsUnavailable"},d5t={prepare:"client.deploymentProgress.preparing",upload:"client.deploymentProgress.uploading",build:"client.deploymentProgress.building",deploy:"client.deploymentProgress.deploying",publish:"client.deploymentProgress.publishing",evaluation:"client.deploymentProgress.evaluating",update:"client.deploymentProgress.updating",complete:"client.deploymentProgress.completing",github:"client.deploymentProgress.github"};function jI(e){var r,s;const t=((r=e.message)==null?void 0:r.trim())??"",n=e.messageCode?u5t[e.messageCode]:void 0;if(n)return V(n);if(t&&(E7e().toLowerCase()==="zh-cn"||!c5t.test(t)))return t;if(e.phase==="build"&&((s=e.buildLog)!=null&&s.status)){const a={running:"client.deploymentProgress.buildLogsSyncing",complete:"client.deploymentProgress.buildLogsComplete",error:"client.deploymentProgress.buildLogsUnavailable"}[e.buildLog.status];if(a)return V(a)}const i=e.phase?d5t[e.phase]:void 0;return i?V(i):t||V("client.deploymentProgress.inProgress")}function f5t(e){return[{id:"case-1",itemKey:"case-1",kind:"good",input:e("agentWorkspace.defaultCases.weeklyFeedback.input"),output:e("agentWorkspace.defaultCases.weeklyFeedback.output"),referenceOutput:e("agentWorkspace.defaultCases.weeklyFeedback.output"),comment:"",agentName:e("agentWorkspace.defaultCases.agentName"),sessionId:"",messageId:"",runtimeId:"",invocationId:"",userId:"",createdAt:"2026-08-05T09:12:00+08:00",evaluationSetId:"",evaluationSetName:e("agentWorkspace.defaultCases.goodSetName"),workspaceId:"",tag:e("agentWorkspace.defaultCases.weeklyFeedback.tag"),source:"auto",score:.92,reason:e("agentWorkspace.defaultCases.weeklyFeedback.reason")},{id:"case-2",itemKey:"case-2",kind:"good",input:e("agentWorkspace.defaultCases.research.input"),output:e("agentWorkspace.defaultCases.research.output"),referenceOutput:e("agentWorkspace.defaultCases.research.output"),comment:"",agentName:e("agentWorkspace.defaultCases.agentName"),sessionId:"",messageId:"",runtimeId:"",invocationId:"",userId:"",createdAt:"2026-08-05T08:47:00+08:00",evaluationSetId:"",evaluationSetName:e("agentWorkspace.defaultCases.goodSetName"),workspaceId:"",tag:e("agentWorkspace.defaultCases.research.tag"),source:"user"},{id:"case-3",itemKey:"case-3",kind:"bad",input:e("agentWorkspace.defaultCases.uncertainConclusion.input"),output:e("agentWorkspace.defaultCases.uncertainConclusion.output"),referenceOutput:"",comment:"",agentName:e("agentWorkspace.defaultCases.agentName"),sessionId:"",messageId:"",runtimeId:"",invocationId:"",userId:"",createdAt:"2026-08-05T07:35:00+08:00",evaluationSetId:"",evaluationSetName:e("agentWorkspace.defaultCases.badSetName"),workspaceId:"",tag:e("agentWorkspace.defaultCases.uncertainConclusion.tag"),source:"auto",score:.28,reason:e("agentWorkspace.defaultCases.uncertainConclusion.reason")},{id:"case-4",itemKey:"case-4",kind:"bad",input:e("agentWorkspace.defaultCases.repeatedTool.input"),output:e("agentWorkspace.defaultCases.repeatedTool.output"),referenceOutput:"",comment:"",agentName:e("agentWorkspace.defaultCases.agentName"),sessionId:"",messageId:"",runtimeId:"",invocationId:"",userId:"",createdAt:"2026-08-05T06:58:00+08:00",evaluationSetId:"",evaluationSetName:e("agentWorkspace.defaultCases.badSetName"),workspaceId:"",tag:e("agentWorkspace.defaultCases.repeatedTool.tag"),source:"user"}]}const h5t=[{id:"eval-regression",name:"核心能力回归",agentIds:[],caseSet:"核心回归集",evaluator:"综合质量评估器",metrics:["回答质量","工具调用"],concurrency:"4",history:[{id:"run-1",createdAt:"今天 10:32",score:88,status:"completed"},{id:"run-2",createdAt:"昨天 16:08",score:84,status:"completed"}]},{id:"eval-safety",name:"安全与幻觉检查",agentIds:[],caseSet:"安全边界集",evaluator:"事实一致性评估器",metrics:["事实准确性","拒答合理性"],concurrency:"2",history:[{id:"run-3",createdAt:"7 月 25 日 14:20",score:91,status:"completed"}]}],p5t={核心能力回归:"agentWorkspace.evaluationDefaults.coreRegression",安全与幻觉检查:"agentWorkspace.evaluationDefaults.safetyCheck",核心回归集:"agentWorkspace.evaluationDefaults.coreSet",安全边界集:"agentWorkspace.evaluationDefaults.safetySet",工具调用集:"agentWorkspace.evaluationDefaults.toolSet",综合质量评估器:"agentWorkspace.evaluationDefaults.qualityEvaluator",事实一致性评估器:"agentWorkspace.evaluationDefaults.factualEvaluator",工具调用评估器:"agentWorkspace.evaluationDefaults.toolEvaluator",回答质量:"agentWorkspace.evaluationDefaults.responseQuality",事实准确性:"agentWorkspace.evaluationDefaults.factualAccuracy",工具调用:"agentWorkspace.evaluationDefaults.toolUse",响应效率:"agentWorkspace.evaluationDefaults.responseEfficiency","今天 10:32":"agentWorkspace.evaluationDefaults.todayTime","昨天 16:08":"agentWorkspace.evaluationDefaults.yesterdayTime","7 月 25 日 14:20":"agentWorkspace.evaluationDefaults.julyTime",刚刚:"agentWorkspace.evaluationDefaults.justNow"};function WO(e,t){const n=p5t[e];return n?t(n):e}const fte=["basic","usage","evaluations","optimizations","integrations","versions"],m5t=20;function g5t(e,t,n){const i=Date.parse(e);return Number.isNaN(i)?n("agentWorkspace.notProvided"):new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).format(i)}const oO=[{id:"api-server",label:"API Server"},{id:"a2a",label:"A2A"}];function Y5(e,t){return e?`${e.replace(/\/+$/,"")}${t}`:""}function b5t(e,t){const n=e.trim();if(!n||!t)return n;try{const i=new URL(n),r=i.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(!["localhost","127.0.0.1","::1"].includes(r))return n;const s=new URL(t);return i.protocol=s.protocol,i.hostname=s.hostname,i.port=s.port,i.toString()}catch{return n}}function hte(e,t){return e==="key_auth"?"API Key":e==="custom_jwt"?"OAuth / JWT":t(e==="none"?"agentWorkspace.noAuthentication":"agentWorkspace.notAvailable")}function pte(e,t){return t(e==="published"?"agentWorkspace.githubStatus.published":e==="publishing"?"agentWorkspace.githubStatus.publishing":e==="failed"?"agentWorkspace.githubStatus.failed":e==="pending"?"agentWorkspace.githubStatus.pending":"agentWorkspace.githubStatus.unknown")}function y5t(e,t){return e.changeType==="rollback"?t("agentWorkspace.rollbackEvent"):e.version}function f8(e){return JSON.stringify(e)}function lje(e){return e==="key_auth"?`API_KEY = "" +`,4);return n>=0?t.slice(n+5).trimStart():e}function ije(e,t){const n=(e||"").trim();return!n||[">",">-","|","|-"].includes(n)?t("common.noDescription"):n}function YMt(){return o.jsx("svg",{className:"icon",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:"m7.5 7.5 9 9m0-9-9 9",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})})}function ZMt(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M12 5.5v13M5.5 12h13",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}function ste({direction:e}){return o.jsx("svg",{className:"icon",viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:o.jsx("path",{d:e==="left"?"m11.7 5.5-4.2 4.5 4.2 4.5":"m8.3 5.5 4.2 4.5-4.2 4.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function JMt(){return o.jsx("span",{className:"skillcenter-loading-mark","aria-hidden":!0})}function e5t({page:e,total:t,pageSize:n,onPage:i}){const{t:r}=xe("ui"),s=Math.max(1,Math.ceil(t/n));return o.jsxs("footer",{className:"skillcenter-pager",children:[o.jsx("span",{children:r("skillCenter.totalItems",{count:t})}),o.jsxs("div",{className:"skillcenter-pager-actions",children:[o.jsx("button",{type:"button",onClick:()=>i(e-1),disabled:e<=1,"aria-label":r("common.previousPage"),children:o.jsx(ste,{direction:"left"})}),o.jsxs("span",{children:[e," / ",s]}),o.jsx("button",{type:"button",onClick:()=>i(e+1),disabled:e>=s,"aria-label":r("common.nextPage"),children:o.jsx(ste,{direction:"right"})})]})]})}function t5t({children:e}){return o.jsx("div",{className:"skillcenter-empty",children:e})}function K5({kind:e,title:t,description:n,error:i,action:r}){return o.jsx("div",{className:`skillcenter-page-state is-${e}`,role:e==="error"?"alert":"status",children:o.jsxs(On,{fill:"none",children:[o.jsx(On.Title,{children:t}),n?o.jsx(On.Description,{children:n}):null,i?o.jsx(ol,{error:i}):null,r?o.jsx(On.ActionRow,{children:o.jsx($t,{color:"secondary",size:"lg",onClick:r.onClick,children:r.label})}):null]})})}function ate({errors:e,cloudProvider:t,fullPage:n=!1,onRetry:i}){const{t:r}=xe("ui");return o.jsxs("div",{className:`skillcenter-space-errors${n?" is-full-page":""}`,role:"alert",children:[o.jsxs("div",{className:"skillcenter-space-errors__content",children:[o.jsx("strong",{children:r(n?"skillCenter.cannotLoadSpaces":"skillCenter.someSpacesFailed")}),e.map(({region:s,error:a})=>o.jsxs("section",{children:[o.jsx("span",{children:wh(s,t)}),o.jsx(ol,{error:a})]},s))]}),o.jsx("button",{type:"button",onClick:i,children:r("common.reload")})]})}function n5t({skill:e,space:t,region:n,cloudProvider:i,detail:r,files:s,loading:a,error:l,canOptimize:c,onOptimize:u,onDownload:d,onClose:f}){const{t:h}=xe("ui");return m.useEffect(()=>{const p=g=>{g.key==="Escape"&&f()};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[f]),o.jsx("div",{className:"skill-detail-backdrop",role:"presentation",onMouseDown:f,children:o.jsxs("section",{className:"skill-detail-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"skill-detail-title",onMouseDown:p=>p.stopPropagation(),children:[o.jsxs("header",{className:"skill-detail-head",children:[o.jsx("div",{className:"skill-detail-heading",children:o.jsxs("div",{children:[o.jsx("h2",{id:"skill-detail-title",children:(r==null?void 0:r.name)||e.skillName}),o.jsx("p",{children:ije((r==null?void 0:r.description)||e.skillDescription,h)})]})}),o.jsxs("div",{className:"skill-detail-actions",children:[o.jsx("button",{type:"button",onClick:d,disabled:s.length===0,children:h("skillCenter.downloadZip")}),o.jsx(ZN,{disabled:!c,placement:"bottom",children:o.jsx("button",{type:"button",onClick:u,disabled:!c,children:h("skillCenter.optimize")})}),o.jsx("button",{type:"button",className:"skill-detail-close",onClick:f,"aria-label":h("skillCenter.closeSkillDetails"),children:o.jsx(YMt,{})})]})]}),o.jsxs("dl",{className:"skill-detail-meta",children:[o.jsxs("div",{children:[o.jsx("dt",{children:h("skillCenter.skillId")}),o.jsx("dd",{title:e.skillId,children:e.skillId})]}),o.jsxs("div",{children:[o.jsx("dt",{children:h("agentSelector.version")}),o.jsx("dd",{children:(r==null?void 0:r.version)||e.version||"—"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:h("agentSelector.status")}),o.jsx("dd",{children:nje(e.skillStatus,h)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:h("skillCenter.skillSpace")}),o.jsx("dd",{title:t.name,children:t.name})]}),o.jsxs("div",{children:[o.jsx("dt",{children:h("myAgents.region")}),o.jsx("dd",{children:wh(n,i)})]})]}),o.jsxs("div",{className:"skill-detail-content skill-detail-content--files",children:[o.jsx("div",{className:"skill-detail-content-title",children:h("skillCenter.allFiles")}),a?o.jsxs("div",{className:"skillcenter-loading",children:[o.jsx(JMt,{}),h("skillCenter.loadingSkillContent")]}):l?o.jsx("div",{className:"skillcenter-error",children:o.jsx(ol,{error:l})}):s.length>0?o.jsx(eje,{files:s.map(p=>p.path.endsWith("SKILL.md")&&p.content?{...p,content:XMt(p.content)}:p)}):o.jsx(t5t,{children:h("skillCenter.noSkillContent")})]})]})})}function i5t({space:e,canUseSandbox:t,onUpload:n,onSandbox:i,onClose:r}){const{t:s}=xe("ui");return m.useEffect(()=>{const a=l=>{l.key==="Escape"&&r()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[r]),o.jsx("div",{className:"skill-dialog-backdrop",role:"presentation",onMouseDown:r,children:o.jsxs("section",{className:"skill-dialog skill-add-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"skill-add-dialog-title",onMouseDown:a=>a.stopPropagation(),children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h2",{id:"skill-add-dialog-title",children:s("skillCenter.addSkill")}),o.jsx("p",{title:e.name,children:e.name})]}),o.jsx("button",{type:"button",onClick:r,children:s("common.cancel")})]}),o.jsxs("div",{className:"skill-add-dialog__options",children:[o.jsxs("button",{type:"button",onClick:n,children:[o.jsx("strong",{children:s("skillCenter.localUpload")}),o.jsx("span",{children:s("skillCenter.localUploadDescription")})]}),o.jsx(ZN,{disabled:!t,placement:"inside",children:o.jsxs("button",{type:"button",disabled:!t,onClick:i,children:[o.jsx("strong",{children:s("skillCenter.autoCreate")}),o.jsx("span",{children:s("skillCenter.autoCreateDescription")})]})})]})]})})}function r5t({cloudProvider:e="volcengine",region:t,active:n=!0,activationRevision:i=0,initialWorkspace:r=null,onInitialWorkspaceConsumed:s,onPageTitleChange:a,toolbarLeading:l,toolbarFilters:c}){var Cn;const{t:u,i18n:d}=xe("ui"),f=m.useMemo(()=>[t],[t]),[h,p]=m.useState([]),[g,b]=m.useState({}),[v,y]=m.useState(!1),[x,w]=m.useState(""),[O,k]=m.useState((r==null?void 0:r.space)??null),[S,E]=m.useState([]),[C,N]=m.useState(1),[_,j]=m.useState(0),[T,L]=m.useState(!1),[A,R]=m.useState(null),[P,$]=m.useState(""),[M,B]=m.useState("overview"),[I,H]=m.useState(null),[X,Q]=m.useState(null),[q,U]=m.useState([]),[te,le]=m.useState(!1),[oe,re]=m.useState(null),[pe,K]=m.useState(null),[G,se]=m.useState(!1),[fe,Se]=m.useState(null),[Te,rt]=m.useState(null),[Be,Me]=m.useState(null),[Ie,qe]=m.useState(0),[Pe,Ve]=m.useState(0),[ke,Le]=m.useState(""),[Y,he]=m.useState(""),[Oe,Ke]=m.useState(null),[et,Ct]=m.useState(r),je=m.useRef(0),ve=m.useRef(0),He=m.useRef(!1),it=m.useRef(null),Ae=m.useRef(null),Wt=m.useRef(null),mn=m.useDeferredValue(x),qt=m.useDeferredValue(P),Nt=(et&&(O||et.selectPublishSpace)?et.operation==="create"?u("skillCenter.createSkill"):u("skillCenter.optimizeNamed",{name:((Cn=et.source)==null?void 0:Cn.name)||u("skillCenter.skill")}):"")||(O==null?void 0:O.name)||u("skillCenter.library");m.useEffect(()=>{n&&(a==null||a(Nt))},[n,a,Nt]),m.useEffect(()=>{r&&(s==null||s())},[r,s]);const at=m.useMemo(()=>{const De=mn.trim().toLocaleLowerCase();return De?h.filter(pt=>`${pt.name} ${pt.description||""} ${pt.projectName||""}`.toLocaleLowerCase().includes(De)):h},[mn,h]),bt=m.useMemo(()=>{const De=qt.trim().toLocaleLowerCase();return De?S.filter(pt=>`${pt.skillName} ${pt.skillDescription||""}`.toLocaleLowerCase().includes(De)):S},[qt,S]),_e=(O==null?void 0:O.region)||Ji(e),st=m.useMemo(()=>f.flatMap(De=>{var ot;const pt=(ot=g[De])==null?void 0:ot.error;return pt?[{region:De,error:pt}]:[]}),[g,f]),Re=f.some(De=>{const pt=g[De];return!!(pt&&!pt.done&&!pt.error)}),gt=st.length===f.length;m.useEffect(()=>{const De=new AbortController;return XR(De.signal).then(K).catch(()=>K({enabled:!1,reason:u("skillCenter.adminNotConfigured"),operations:["create","optimize"],models:[],styles:{}})),()=>De.abort()},[u]);const ut=m.useCallback(async(De,pt)=>{var $e;if(He.current||De.length===0)return;He.current=!0,y(!0),pt&&(($e=it.current)==null||$e.abort(),p([]),b(Object.fromEntries(De.map(({region:ht})=>[ht,{nextPage:1,loadedCount:0,done:!1,error:null}]))));const ot=new AbortController;it.current=ot;const Vn=++ve.current,si=await Promise.allSettled(De.map(async({region:ht,page:Yt})=>({region:ht,page:Yt,result:await t1t({region:ht,page:Yt,pageSize:HMt,signal:ot.signal})})));if(ve.current!==Vn)return;const Jn=si.map((ht,Yt)=>{const hn=De[Yt];return ht.status==="rejected"?{request:hn,error:Sa(ht.reason,u("skillCenter.errors.loadSpaces")),items:[],totalCount:0}:{request:hn,error:null,items:(ht.value.result.items||[]).map(tn=>({...tn,region:tn.region||ht.value.region})),totalCount:ht.value.result.totalCount||0}}),Wi=Jn.flatMap(ht=>ht.items);b(ht=>{const Yt={...ht};return Jn.forEach(({request:hn,error:tn,items:Ei,totalCount:Pn})=>{const gi=Yt[hn.region]||{nextPage:hn.page,loadedCount:0,done:!1,error:null};if(tn){Yt[hn.region]={...gi,error:tn};return}const oi=gi.loadedCount+Ei.length;Yt[hn.region]={nextPage:hn.page+1,loadedCount:oi,done:Ei.length===0||oi>=Pn,error:null}}),Yt}),p(ht=>GMt(pt?[]:ht,Wi)),k(ht=>ht&&(Wi.find(Yt=>Bl(Yt)===Bl(ht))||ht)),He.current=!1,y(!1)},[]),ye=m.useCallback(()=>{if(He.current)return;const De=f.flatMap(pt=>{const ot=g[pt];return ot&&!ot.done&&!ot.error?[{region:pt,page:ot.nextPage}]:[]});ut(De,!1)},[ut,g,f]);m.useEffect(()=>{_t(),k(null),E([]),N(1)},[e]),m.useEffect(()=>{if(n)return ut(f.map(De=>({region:De,page:1})),!0),()=>{var De;ve.current+=1,(De=it.current)==null||De.abort(),He.current=!1}},[n,i,ut,f,Ie]),m.useEffect(()=>{const De=Wt.current,pt=Ae.current;if(!De||!pt||!Re||v)return;const ot=new IntersectionObserver(([Vn])=>{Vn.isIntersecting&&ye()},{root:pt,rootMargin:"240px 0px",threshold:.01});return ot.observe(De),()=>ot.disconnect()},[Re,ye,v]);const ze=()=>{const De=Ae.current;!De||!Re||v||De.scrollHeight-De.scrollTop-De.clientHeight<=240&&ye()};m.useEffect(()=>{if(!O){E([]),j(0);return}let De=!0;return L(!0),R(null),u1t(O.id,{region:_e,page:C,pageSize:ite,project:O.projectName}).then(pt=>{De&&(E(pt.items||[]),j(pt.totalCount||0))}).catch(pt=>{De&&(E([]),j(0),R(Sa(pt,u("skillCenter.errors.loadSkills"))))}).finally(()=>{De&&L(!1)}),()=>{De=!1}},[_e,O,C,Pe,u]);const tt=De=>{_t(),k(De),B("overview"),N(1),$("")},kt=()=>{_t(),k(null),E([]),j(0),B("overview"),N(1),$(""),Ke(null)},_t=()=>{je.current+=1,H(null),Q(null),U([]),re(null),le(!1)},rn=async De=>{if(!O)return;const pt=je.current+1;je.current=pt,H(De),Q(null),re(null),le(!0);try{const[ot,Vn]=await Promise.all([d1t(O.id,De.skillId,De.version,_e,O.projectName,De.skillName,O.name),l1t({spaceId:O.id,skillId:De.skillId,version:De.version,region:_e,skillSpaceName:O.name,skillName:De.skillName})]);je.current===pt&&(Q(ot),U(Vn))}catch(ot){je.current===pt&&re(Sa(ot,u("skillCenter.errors.loadSkillDetails")))}finally{je.current===pt&&le(!1)}},en=De=>{if(O)return{kind:"skill-center",skillId:De.skillId,version:De.version,region:_e,projectName:O.projectName,skillSpaceId:O.id,skillSpaceName:O.name,name:De.skillName,description:De.skillDescription}},on=De=>{const pt=en(De);!pt||!(pe!=null&&pe.enabled)||(_t(),Ct({operation:"optimize",source:pt}))},J=async De=>{if(!(!O||!window.confirm(u("skillCenter.deleteSkillConfirm",{name:De.skillName})))){Le(De.skillId),Ke(null);try{await o1t({spaceId:O.id,skillId:De.skillId,region:_e}),Ve(pt=>pt+1),qe(pt=>pt+1)}catch(pt){Ke(Sa(pt,u("skillCenter.errors.deleteSkill")))}finally{Le("")}}},Mt=async De=>{if(!window.confirm(u("skillCenter.deleteSpaceConfirm",{name:De.name})))return;const pt=Bl(De);he(pt),Ke(null);try{await r1t({spaceId:De.id,region:De.region||Ji(e)}),O&&Bl(O)===pt&&kt(),qe(ot=>ot+1)}catch(ot){Ke(Sa(ot,u("skillCenter.errors.deleteSpace")))}finally{he("")}};return et&&(O||et.selectPublishSpace)?o.jsx(BMt,{operation:et.operation,cloudProvider:e,space:O??void 0,availableSpaces:h,spacesLoading:v,initialIntent:et.initialIntent,source:et.source,onBack:()=>Ct(null),onPublished:()=>{Ve(De=>De+1),qe(De=>De+1)}}):o.jsxs("section",{className:`skillcenter${O?" is-space":" resource-collection"}`,children:[O?o.jsx(sE,{className:"skillcenter-detail",title:O.name,description:O.description||u("skillCenter.manageSpaceDescription"),identitySeed:O.name,backLabel:u("skillCenter.backToSpaces"),onBack:kt,sections:[{key:"overview",label:u("skillCenter.overview"),content:o.jsxs(o.Fragment,{children:[Oe?o.jsx("div",{className:"skillcenter-inline-error",role:"alert",children:o.jsx(ol,{error:Oe})}):null,o.jsx("section",{className:"skillcenter-overview",children:o.jsxs(SB,{className:"skillcenter-detail-facts",children:[o.jsxs("div",{children:[o.jsx("dt",{children:u("skillCenter.skillCount")}),o.jsx("dd",{children:_})]}),o.jsxs("div",{children:[o.jsx("dt",{children:u("skillCenter.updatedAt")}),o.jsx("dd",{children:O.updatedAt?KMt(O.updatedAt,d.resolvedLanguage??d.language):"—"})]})]})})]})},{key:"skills",label:u("skillCenter.skills"),content:o.jsxs(o.Fragment,{children:[Oe?o.jsx("div",{className:"skillcenter-inline-error",role:"alert",children:o.jsx(ol,{error:Oe})}):null,o.jsxs("section",{className:"skillcenter-results","aria-label":u("skillCenter.skillsInSpace",{name:O.name}),children:[o.jsx(Pwe,{title:u("skillCenter.skills"),description:u("skillCenter.totalItems",{count:_}),actions:o.jsx(Om,{"aria-label":u("skillCenter.searchSkills"),value:P,onChange:De=>$(De.target.value),placeholder:u("skillCenter.searchSkills")})}),T&&S.length===0?o.jsx(Vd,{}):A&&S.length===0?o.jsx(K5,{kind:"error",title:u("skillCenter.cannotLoadSkills"),error:A,action:{label:u("common.reload"),onClick:()=>Ve(De=>De+1)}}):bt.length===0?o.jsx(K5,{kind:"empty",title:P.trim()?u("skillCenter.noMatchingSkills"):u("skillCenter.noSkills"),description:P.trim()?u("skillCenter.tryAnotherName"):u("skillCenter.emptySkillsDescription"),action:P.trim()?void 0:{label:u("skillCenter.localUpload"),onClick:()=>Me(O)}}):o.jsx("div",{className:"skillcenter-table-wrap",children:o.jsxs("table",{className:"skillcenter-table",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:u("skillCenter.skills")}),o.jsx("th",{scope:"col",children:u("agentSelector.status")}),o.jsx("th",{scope:"col",className:"skillcenter-table__actions-heading",children:u("skillCenter.actions")})]})}),o.jsx("tbody",{children:bt.map(De=>o.jsxs("tr",{children:[o.jsx("td",{className:"skillcenter-table__skill",children:o.jsxs("button",{type:"button",onClick:()=>void rn(De),children:[o.jsxs("span",{className:"skillcenter-table__title-row",children:[o.jsx("strong",{title:De.skillName,children:De.skillName}),De.version?o.jsx("span",{className:"skillcenter-table__version-badge",children:De.version}):null]}),o.jsx("span",{className:"skillcenter-table__description",children:ije(De.skillDescription,u)})]})}),o.jsx("td",{children:o.jsx("span",{className:`skillcenter-status ${WMt(De.skillStatus)}`,children:nje(De.skillStatus,u)})}),o.jsx("td",{children:o.jsxs("div",{className:"skillcenter-table__actions",children:[o.jsx("button",{type:"button",onClick:()=>void rn(De),children:u("common.view")}),o.jsx(ZN,{disabled:!(pe!=null&&pe.enabled),children:o.jsx("button",{type:"button",disabled:!(pe!=null&&pe.enabled),onClick:()=>on(De),children:u("skillCenter.optimize")})}),o.jsx("button",{type:"button",className:"is-danger",disabled:ke===De.skillId,onClick:()=>void J(De),children:ke===De.skillId?u("common.deleting"):u("common.delete")})]})})]},`${De.skillId}:${De.version}`))})]})}),!P.trim()&&!T&&!A&&_>0?o.jsx(e5t,{page:C,total:_,pageSize:ite,onPage:N}):null]})]})}],activeSectionKey:M,navigationLabel:u("skillCenter.spaceDetails"),onSectionChange:De=>B(De),actionsClassName:"skillcenter-toolbar-actions",actions:o.jsxs(o.Fragment,{children:[o.jsx($t,{type:"button",color:"secondary",variant:"outline",size:"lg",pill:!1,onClick:()=>Se(O),children:u("skillCenter.editSpace")}),o.jsx($t,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,disabled:Y===Bl(O),onClick:()=>void Mt(O),children:Y===Bl(O)?u("common.deleting"):u("skillCenter.deleteSpace")}),o.jsx($t,{type:"button",color:"secondary",variant:"outline",size:"lg",pill:!1,onClick:()=>Me(O),children:u("skillCenter.localUpload")}),o.jsx(ZN,{disabled:!(pe!=null&&pe.enabled),children:o.jsxs($t,{type:"button",color:"primary",size:"lg",pill:!1,disabled:!(pe!=null&&pe.enabled),onClick:()=>Ct({operation:"create"}),children:[o.jsx(pbe,{"aria-hidden":"true"}),o.jsx("span",{children:u("skillCenter.createSkill")})]})})]})}):o.jsxs(o.Fragment,{children:[o.jsxs(Kb,{className:"skillcenter-list-toolbar library-resource-toolbar",children:[l,o.jsxs("div",{className:"resource-toolbar__actions",children:[c,o.jsx(Om,{"aria-label":u("skillCenter.searchSpaces"),value:x,onChange:De=>w(De.target.value),placeholder:u("skillCenter.searchSpaces")})]})]}),Oe?o.jsx("div",{className:"skillcenter-inline-error",role:"alert",children:o.jsx(ol,{error:Oe})}):null,o.jsxs(Gb,{className:"skillcenter-list-results",ref:Ae,"aria-label":u("skillCenter.spaceList"),onScroll:ze,children:[st.length>0&&!gt?o.jsx(ate,{errors:st,cloudProvider:e,onRetry:()=>qe(De=>De+1)}):null,v&&h.length===0?o.jsx(Vd,{}):gt&&h.length===0?o.jsx(ate,{errors:st,cloudProvider:e,fullPage:!0,onRetry:()=>qe(De=>De+1)}):at.length===0&&x.trim()?o.jsx(K5,{kind:"empty",title:u("skillCenter.noMatchingSpaces"),description:u("skillCenter.tryAnotherName")}):o.jsxs(Bx,{children:[x.trim()?null:o.jsx(wb,{"aria-label":u("skillCenter.createSpace"),icon:o.jsx(ZMt,{}),onClick:()=>se(!0),children:u("skillCenter.newSpace")}),at.map(De=>{const pt=Bl(De);return o.jsx(cE,{className:"skillcenter-space-card",title:De.name,description:De.description||u("common.noDescription"),metadata:[{label:u("skillCenter.skillCount"),value:u("skillCenter.skillCountValue",{count:De.skillCount??0})},{label:u("skillCenter.updatedAt"),value:UQ(De.updatedAt,Date.now(),d.resolvedLanguage??d.language)}],action:{label:u("skillCenter.addSkill"),icon:"plus",onClick:()=>rt(De)},detailAction:{label:u("common.viewDetails"),onClick:()=>tt(De)}},pt)})]}),!gt&&h.length>0?o.jsx("div",{className:"my-agent-load-more",ref:Wt,"aria-live":"polite",children:v?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),o.jsx("span",{children:u("skillCenter.loadingMoreSpaces")})]}):Re?o.jsx("span",{children:u("skillCenter.scrollForMore")}):st.length>0?o.jsx("span",{children:u("skillCenter.someSpacesFailed")}):o.jsx("span",{children:u("skillCenter.allSpacesLoaded")})}):null]})]}),I&&O&&o.jsx(n5t,{skill:I,space:O,region:_e,cloudProvider:e,detail:X,files:q,loading:te,error:oe,canOptimize:(pe==null?void 0:pe.enabled)===!0,onOptimize:()=>on(I),onDownload:()=>void c1t({spaceId:O.id,skillId:I.skillId,version:I.version,region:_e,fallbackName:I.skillName,skillSpaceName:O.name,skillName:I.skillName}).catch(De=>re(Sa(De,u("skillCenter.errors.downloadSkill")))),onClose:_t}),G?o.jsx(UMt,{region:t,regionOptions:Iu(e),onClose:()=>se(!1),onCreated:De=>{se(!1),qe(pt=>pt+1),k({...De,region:De.region||t})}}):null,fe?o.jsx(QMt,{space:fe,region:fe.region||Ji(e),onClose:()=>Se(null),onUpdated:De=>{const pt={...De,region:De.region||fe.region||Ji(e)};Se(null),k(ot=>ot&&Bl(ot)===Bl(pt)?pt:ot),p(ot=>ot.map(Vn=>Bl(Vn)===Bl(pt)?pt:Vn)),qe(ot=>ot+1)}}):null,Te?o.jsx(i5t,{space:Te,canUseSandbox:(pe==null?void 0:pe.enabled)===!0,onClose:()=>rt(null),onUpload:()=>{Me(Te),rt(null)},onSandbox:()=>{const De=Te;rt(null),tt(De),Ct({operation:"create"})}}):null,Be?o.jsx(zMt,{space:Be,region:Be.region||Ji(e),onClose:()=>Me(null),onUploaded:()=>{Me(null),Ve(De=>De+1),qe(De=>De+1)}}):null]})}function s5t(e){return[{id:"skills",label:e("library.tabs.skills"),panelId:"library-skills-panel"},{id:"knowledge",label:e("library.tabs.knowledge"),panelId:"library-knowledge-panel"},{id:"artifacts",label:e("library.tabs.artifacts"),panelId:"library-artifacts-panel"}]}function a5t({cloudProvider:e,studioRegion:t="",activeTab:n,onTabChange:i,onPageTitleChange:r,skillInitialWorkspace:s=null,onSkillInitialWorkspaceConsumed:a,artifactSources:l=[],artifactUserId:c="",onArtifactActivate:u,onArtifactSourceOpen:d}){const{t:f,i18n:h}=xe("workspaceTools"),p=m.useMemo(()=>s5t(f),[f]),g=f("library.tabs.skills"),b=qj(t)?t:Ji(e),[v,y]=m.useState(b),[x,w]=m.useState(g),O=m.useRef(g),[k,S]=m.useState(!1),[E,C]=m.useState(()=>new Set(["skills",n])),[N,_]=m.useState({skills:0,knowledge:0,artifacts:0}),j=m.useRef(u),[T,L]=m.useState([]),[A,R]=m.useState(!1),[P,$]=m.useState(""),M=m.useMemo(()=>{const le=Tot(l,f("library.untitledSession"));return{key:JSON.stringify(le),candidates:le}},[l,f]),B=m.useRef(M);B.current.key!==M.key&&(B.current=M);const I=B.current.candidates,H=m.useMemo(()=>Iu(e),[e]);m.useEffect(()=>{y(b)},[b]),m.useEffect(()=>{const le=O.current;w(oe=>oe===le?g:oe),O.current=g},[g]),m.useEffect(()=>{j.current=u},[u]),m.useEffect(()=>{C(le=>{if(le.has(n))return le;const oe=new Set(le);return oe.add(n),oe})},[n]),m.useEffect(()=>{var oe;const le=n==="skills"?x:((oe=p.find(re=>re.id===n))==null?void 0:oe.label)||f("library.title");r==null||r(le)},[n,r,x,f,p]),m.useEffect(()=>{var le;n==="artifacts"&&((le=j.current)==null||le.call(j))},[n,N.artifacts]);const X=m.useCallback(async()=>{R(!0),$("");try{L(await Mot(I))}catch(le){$(le instanceof Error?le.message:String(le))}finally{R(!1)}},[I]);m.useEffect(()=>{n==="artifacts"&&X()},[n,N.artifacts,X]);const Q=le=>{C(oe=>{if(oe.has(le))return oe;const re=new Set(oe);return re.add(le),re}),_(oe=>({...oe,[le]:oe[le]+1})),i(le)},q=o.jsx(aE,{idPrefix:"library",ariaLabel:f("library.categoryAria"),value:n,items:p,onChange:Q}),U=le=>o.jsx(J_,{id:le,ariaLabel:f("library.regionAria"),value:v,options:H,onChange:y}),te=n==="skills"?x!==g:n==="knowledge"&&k;return o.jsxs(_h,{className:`library-view${te?" is-detail":""}`,"aria-label":f("library.title"),children:[te?null:o.jsx(Fx,{className:"library-view__header",title:f("library.title")}),o.jsxs("div",{className:"library-panels",children:[E.has("skills")?o.jsx("div",{id:"library-skills-panel",className:"library-panel",role:"tabpanel","aria-labelledby":"library-skills-tab",hidden:n!=="skills",children:o.jsx(r5t,{cloudProvider:e,region:v,active:n==="skills",activationRevision:N.skills,onPageTitleChange:w,initialWorkspace:s,onInitialWorkspaceConsumed:a,toolbarLeading:q,toolbarFilters:U("library-skills-region-filter")})}):null,E.has("knowledge")?o.jsx("div",{id:"library-knowledge-panel",className:"library-panel",role:"tabpanel","aria-labelledby":"library-knowledge-tab",hidden:n!=="knowledge",children:o.jsx(zxt,{cloudProvider:e,region:v,active:n==="knowledge",activationRevision:N.knowledge,onDetailChange:S,toolbarLeading:q,toolbarFilters:U("library-knowledge-region-filter")})}):null,E.has("artifacts")?o.jsx("div",{id:"library-artifacts-panel",className:"library-panel",role:"tabpanel","aria-labelledby":"library-artifacts-tab",hidden:n!=="artifacts",children:o.jsx(Iot,{items:T,region:v,userId:c,active:n==="artifacts",activationRevision:N.artifacts,loading:A,error:P?Pd(P,h.resolvedLanguage||h.language)||f("artifactLibrary.loadDetailFallback"):"",onRetry:()=>void X(),onEdit:Lot,onDelete:$ot,onDownload:Fot,onOpenSource:d?le=>d(le.appName,le.sessionId):void 0,toolbarLeading:q,toolbarFilters:U("library-artifacts-region-filter")})}):null]})]})}const rje="veadk_agentkit_connections",o5t=3e3,ote=6e4;function ku(){try{const e=localStorage.getItem(rje);return(e?JSON.parse(e):[]).filter(n=>!n.runtimeId||!!n.region)}catch{return[]}}function AI(e){try{localStorage.setItem(rje,JSON.stringify(e))}catch{}}function Lu(e,t){return`agentkit:${e}:${t}`}function sje(e){try{return new URL(e).host}catch{return e}}function i1(e){Nbe();for(const t of e)if(!(t.runtimeId&&!t.region))for(const n of t.apps)_be(Lu(t.id,n),t.runtimeId?{app:n,runtimeId:t.runtimeId,region:t.region}:{app:n,base:t.base,apiKey:t.apiKey})}function aje(e,t,n,i,r,s){const a={id:`rt_${e}`,name:t||e,runtimeId:e,region:n,apps:i,appLabels:r,currentVersion:s},l=ku(),c=l.findIndex(u=>u.runtimeId===e);return c===-1?l.push(a):l[c]=a,AI(l),i1(l),a}async function l5t(e,t,n,i,r){let s=null,a=n||"cn-beijing",l=null;for(const f of Lk(n))try{const h=await Dv(e,f,{retryProbe:!0,preferCached:!0,currentVersion:i});if(h&&h.length>0){await W0e(e,f),s=h,a=f;break}}catch(h){if(h instanceof wx)throw JN(e),h;if(h instanceof Ls&&h.unsupported){l=h;continue}throw h}if(!s||s.length===0)throw JN(e),l||new Ls(V("connections.runtimeUnsupported"),!0,!0);const c=(r==null?void 0:r.trim())||s[0],u=Object.fromEntries(s.map(f=>[f,f===s[0]?c:f])),d=aje(e,t,a,s,u,i);return Lu(d.id,s[0])}function c5t(e){return new Promise(t=>window.setTimeout(t,e))}async function RA(e,t,n,i,r={}){const s=Date.now();for(;;)try{return await l5t(e,t,n,i,r.agentName)}catch(a){const l=Date.now()-s;if(!r.waitForReady||!(a instanceof Ls)||!a.retryable||l>=ote)throw a;const c=Math.min(o5t,ote-l);await c5t(c)}}async function oje(e,t,n,i){const r=t.trim().replace(/\/+$/,""),s=await $k(r,n.trim()),a={id:Date.now().toString(36),name:e.trim()||sje(r),base:r,apiKey:n.trim(),apps:s,appLabels:i&&s.length>0?{[s[0]]:i}:void 0},l=[...ku().filter(c=>c.base!==r),a];return AI(l),i1(l),a}function u5t(e){const t=ku().filter(n=>n.id!==e);return AI(t),i1(t),t}function JN(e){const t=ku().filter(n=>n.runtimeId!==e);return AI(t),i1(t),t}function lje(e,t){const n=e.map(r=>({id:r,label:r,app:r,remote:!1})),i=t.flatMap(r=>r.apps.map(s=>{var l;const a=((l=r.appLabels)==null?void 0:l[s])??s;return{id:Lu(r.id,s),label:a,app:s,remote:!0,host:r.runtimeId?r.name:sje(r.base??""),runtimeId:r.runtimeId,region:r.region,currentVersion:r.currentVersion}}));return[...n,...i]}const lte=Object.freeze(Object.defineProperty({__proto__:null,addConnection:oje,addRuntimeConnection:aje,buildAgentEntries:lje,connectRuntime:RA,loadConnections:ku,registerConnections:i1,remoteAppId:Lu,removeConnection:u5t,removeRuntimeConnection:JN},Symbol.toStringTag,{value:"Module"}));function d5t({onAdded:e,onCancel:t}){const{t:n}=xe("conversation"),[i,r]=m.useState(""),[s,a]=m.useState(""),[l,c]=m.useState(""),[u,d]=m.useState(!1),[f,h]=m.useState(""),p=i.trim().length>0&&s.trim().length>0&&!u;async function g(){if(p){d(!0),h("");try{const b=await oje(l,i,s,l);if(b.apps.length===0){h(n("addAgentKit.noAgents")),d(!1);return}e(Lu(b.id,b.apps[0]))}catch(b){h(n("addAgentKit.connectionFailed",{error:String(b)})),d(!1)}}}return o.jsx("div",{className:"addagent",children:o.jsxs("div",{className:"addagent-card",children:[o.jsx("h2",{className:"addagent-title",children:n("addAgentKit.title")}),o.jsx("p",{className:"addagent-sub",children:n("addAgentKit.description")}),o.jsxs("label",{className:"addagent-field",children:[o.jsx("span",{className:"addagent-label",children:n("addAgentKit.url")}),o.jsx("input",{className:"addagent-input",value:i,onChange:b=>r(b.target.value),placeholder:"https://xxxxx.apigateway-cn-beijing.volceapi.com",autoFocus:!0})]}),o.jsxs("label",{className:"addagent-field",children:[o.jsx("span",{className:"addagent-label",children:"API Key"}),o.jsx("input",{className:"addagent-input",type:"password",value:s,onChange:b=>a(b.target.value),placeholder:n("addAgentKit.apiKeyHint")})]}),o.jsxs("label",{className:"addagent-field",children:[o.jsx("span",{className:"addagent-label",children:n("addAgentKit.displayName")}),o.jsx("input",{className:"addagent-input",value:l,onChange:b=>c(b.target.value),placeholder:n("addAgentKit.displayNameHint")})]}),f&&o.jsx("div",{className:"addagent-error",children:f}),o.jsxs("div",{className:"addagent-actions",children:[o.jsx("button",{className:"addagent-btn addagent-btn--ghost",onClick:t,disabled:u,children:n("addAgentKit.cancel")}),o.jsxs("button",{className:"addagent-btn addagent-btn--primary",onClick:g,disabled:!p,children:[u?o.jsx(hi,{className:"icon spin"}):null,n(u?"addAgentKit.connecting":"addAgentKit.connect")]})]})]})})}const f5t=/[\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff]/u,h5t={"deploy.build.logs_syncing":"client.deploymentProgress.buildLogsSyncing","deploy.build.logs_complete":"client.deploymentProgress.buildLogsComplete","deploy.build.failed_logs_synced":"client.deploymentProgress.buildFailedLogsSynced","deploy.build.logs_unavailable":"client.deploymentProgress.buildLogsUnavailable","deploy.build.final_logs_unavailable":"client.deploymentProgress.finalBuildLogsUnavailable"},p5t={prepare:"client.deploymentProgress.preparing",upload:"client.deploymentProgress.uploading",build:"client.deploymentProgress.building",deploy:"client.deploymentProgress.deploying",publish:"client.deploymentProgress.publishing",evaluation:"client.deploymentProgress.evaluating",update:"client.deploymentProgress.updating",complete:"client.deploymentProgress.completing",github:"client.deploymentProgress.github"};function _I(e){var r,s;const t=((r=e.message)==null?void 0:r.trim())??"",n=e.messageCode?h5t[e.messageCode]:void 0;if(n)return V(n);if(t&&(C7e().toLowerCase()==="zh-cn"||!f5t.test(t)))return t;if(e.phase==="build"&&((s=e.buildLog)!=null&&s.status)){const a={running:"client.deploymentProgress.buildLogsSyncing",complete:"client.deploymentProgress.buildLogsComplete",error:"client.deploymentProgress.buildLogsUnavailable"}[e.buildLog.status];if(a)return V(a)}const i=e.phase?p5t[e.phase]:void 0;return i?V(i):t||V("client.deploymentProgress.inProgress")}function m5t(e){return[{id:"case-1",itemKey:"case-1",kind:"good",input:e("agentWorkspace.defaultCases.weeklyFeedback.input"),output:e("agentWorkspace.defaultCases.weeklyFeedback.output"),referenceOutput:e("agentWorkspace.defaultCases.weeklyFeedback.output"),comment:"",agentName:e("agentWorkspace.defaultCases.agentName"),sessionId:"",messageId:"",runtimeId:"",invocationId:"",userId:"",createdAt:"2026-08-05T09:12:00+08:00",evaluationSetId:"",evaluationSetName:e("agentWorkspace.defaultCases.goodSetName"),workspaceId:"",tag:e("agentWorkspace.defaultCases.weeklyFeedback.tag"),source:"auto",score:.92,reason:e("agentWorkspace.defaultCases.weeklyFeedback.reason")},{id:"case-2",itemKey:"case-2",kind:"good",input:e("agentWorkspace.defaultCases.research.input"),output:e("agentWorkspace.defaultCases.research.output"),referenceOutput:e("agentWorkspace.defaultCases.research.output"),comment:"",agentName:e("agentWorkspace.defaultCases.agentName"),sessionId:"",messageId:"",runtimeId:"",invocationId:"",userId:"",createdAt:"2026-08-05T08:47:00+08:00",evaluationSetId:"",evaluationSetName:e("agentWorkspace.defaultCases.goodSetName"),workspaceId:"",tag:e("agentWorkspace.defaultCases.research.tag"),source:"user"},{id:"case-3",itemKey:"case-3",kind:"bad",input:e("agentWorkspace.defaultCases.uncertainConclusion.input"),output:e("agentWorkspace.defaultCases.uncertainConclusion.output"),referenceOutput:"",comment:"",agentName:e("agentWorkspace.defaultCases.agentName"),sessionId:"",messageId:"",runtimeId:"",invocationId:"",userId:"",createdAt:"2026-08-05T07:35:00+08:00",evaluationSetId:"",evaluationSetName:e("agentWorkspace.defaultCases.badSetName"),workspaceId:"",tag:e("agentWorkspace.defaultCases.uncertainConclusion.tag"),source:"auto",score:.28,reason:e("agentWorkspace.defaultCases.uncertainConclusion.reason")},{id:"case-4",itemKey:"case-4",kind:"bad",input:e("agentWorkspace.defaultCases.repeatedTool.input"),output:e("agentWorkspace.defaultCases.repeatedTool.output"),referenceOutput:"",comment:"",agentName:e("agentWorkspace.defaultCases.agentName"),sessionId:"",messageId:"",runtimeId:"",invocationId:"",userId:"",createdAt:"2026-08-05T06:58:00+08:00",evaluationSetId:"",evaluationSetName:e("agentWorkspace.defaultCases.badSetName"),workspaceId:"",tag:e("agentWorkspace.defaultCases.repeatedTool.tag"),source:"user"}]}const g5t=[{id:"eval-regression",name:"核心能力回归",agentIds:[],caseSet:"核心回归集",evaluator:"综合质量评估器",metrics:["回答质量","工具调用"],concurrency:"4",history:[{id:"run-1",createdAt:"今天 10:32",score:88,status:"completed"},{id:"run-2",createdAt:"昨天 16:08",score:84,status:"completed"}]},{id:"eval-safety",name:"安全与幻觉检查",agentIds:[],caseSet:"安全边界集",evaluator:"事实一致性评估器",metrics:["事实准确性","拒答合理性"],concurrency:"2",history:[{id:"run-3",createdAt:"7 月 25 日 14:20",score:91,status:"completed"}]}],b5t={核心能力回归:"agentWorkspace.evaluationDefaults.coreRegression",安全与幻觉检查:"agentWorkspace.evaluationDefaults.safetyCheck",核心回归集:"agentWorkspace.evaluationDefaults.coreSet",安全边界集:"agentWorkspace.evaluationDefaults.safetySet",工具调用集:"agentWorkspace.evaluationDefaults.toolSet",综合质量评估器:"agentWorkspace.evaluationDefaults.qualityEvaluator",事实一致性评估器:"agentWorkspace.evaluationDefaults.factualEvaluator",工具调用评估器:"agentWorkspace.evaluationDefaults.toolEvaluator",回答质量:"agentWorkspace.evaluationDefaults.responseQuality",事实准确性:"agentWorkspace.evaluationDefaults.factualAccuracy",工具调用:"agentWorkspace.evaluationDefaults.toolUse",响应效率:"agentWorkspace.evaluationDefaults.responseEfficiency","今天 10:32":"agentWorkspace.evaluationDefaults.todayTime","昨天 16:08":"agentWorkspace.evaluationDefaults.yesterdayTime","7 月 25 日 14:20":"agentWorkspace.evaluationDefaults.julyTime",刚刚:"agentWorkspace.evaluationDefaults.justNow"};function QO(e,t){const n=b5t[e];return n?t(n):e}const cte=["basic","usage","evaluations","optimizations","integrations","versions"],y5t=20;function v5t(e,t,n){const i=Date.parse(e);return Number.isNaN(i)?n("agentWorkspace.notProvided"):new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).format(i)}const nO=[{id:"api-server",label:"API Server"},{id:"a2a",label:"A2A"}];function G5(e,t){return e?`${e.replace(/\/+$/,"")}${t}`:""}function x5t(e,t){const n=e.trim();if(!n||!t)return n;try{const i=new URL(n),r=i.hostname.replace(/^\[|\]$/g,"").toLowerCase();if(!["localhost","127.0.0.1","::1"].includes(r))return n;const s=new URL(t);return i.protocol=s.protocol,i.hostname=s.hostname,i.port=s.port,i.toString()}catch{return n}}function ute(e,t){return e==="key_auth"?"API Key":e==="custom_jwt"?"OAuth / JWT":t(e==="none"?"agentWorkspace.noAuthentication":"agentWorkspace.notAvailable")}function dte(e,t){return t(e==="published"?"agentWorkspace.githubStatus.published":e==="publishing"?"agentWorkspace.githubStatus.publishing":e==="failed"?"agentWorkspace.githubStatus.failed":e==="pending"?"agentWorkspace.githubStatus.pending":"agentWorkspace.githubStatus.unknown")}function O5t(e,t){return e.changeType==="rollback"?t("agentWorkspace.rollbackEvent"):e.version}function d8(e){return JSON.stringify(e)}function cje(e){return e==="key_auth"?`API_KEY = "" HEADERS = {"Authorization": f"Bearer {API_KEY}"}`:e==="custom_jwt"?`ACCESS_TOKEN = "" HEADERS = {"Authorization": f"Bearer {ACCESS_TOKEN}"}`:e==="none"?"HEADERS = {}":`AUTH_TOKEN = "" -HEADERS = {"Authorization": f"Bearer {AUTH_TOKEN}"}`}function v5t(e,t,n){const i=e.replace(/\/+$/,"");return`\`\`\`python +HEADERS = {"Authorization": f"Bearer {AUTH_TOKEN}"}`}function w5t(e,t,n){const i=e.replace(/\/+$/,"");return`\`\`\`python import uuid import requests -BASE_URL = ${f8(i)} -APP_NAME = ${f8(t)} +BASE_URL = ${d8(i)} +APP_NAME = ${d8(t)} USER_ID = "demo-user" SESSION_ID = str(uuid.uuid4()) -${lje(n)} +${cje(n)} session_response = requests.post( f"{BASE_URL}/apps/{APP_NAME}/users/{USER_ID}/sessions/{SESSION_ID}", @@ -783,13 +783,13 @@ with requests.post( for line in response.iter_lines(): if line: print(line.decode("utf-8")) -\`\`\``}function x5t(e,t){return`\`\`\`python +\`\`\``}function S5t(e,t){return`\`\`\`python import uuid import requests -AGENT_URL = ${f8(e)} -${lje(t)} +AGENT_URL = ${d8(e)} +${cje(t)} response = requests.post( AGENT_URL, @@ -810,19 +810,19 @@ response = requests.post( ) response.raise_for_status() print(response.json()) -\`\`\``}function O5t({visible:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("path",{d:"M2.8 12s3.3-5.4 9.2-5.4 9.2 5.4 9.2 5.4-3.3 5.4-9.2 5.4S2.8 12 2.8 12Z"}),o.jsx("circle",{cx:"12",cy:"12",r:"2.4"}),!e&&o.jsx("path",{d:"m4.2 4.2 15.6 15.6"})]})}function mte({available:e,authType:t,value:n,visible:i,loading:r,error:s,onToggle:a}){const{t:l}=Oe("ui");return e?t==="none"?l("agentWorkspace.noApiKeyRequired"):t==="custom_jwt"?l("agentWorkspace.usesOauthJwt"):t!=="key_auth"?l("agentWorkspace.notAvailable"):o.jsxs("span",{className:"aw-integration-secret",children:[o.jsx("span",{className:"aw-integration-secret-value","aria-live":"polite",children:i&&n?n:"****"}),o.jsx("button",{type:"button",className:"aw-integration-secret-toggle","aria-label":l(i?"agentWorkspace.hideApiKey":"agentWorkspace.showApiKey"),title:l(i?"agentWorkspace.hideApiKey":"agentWorkspace.showApiKey"),disabled:r,onClick:a,children:r?o.jsx("span",{className:"loading-gap-spinner","aria-hidden":"true"}):o.jsx(O5t,{visible:i})}),s&&o.jsx("span",{className:"aw-integration-secret-error",role:"alert",children:s})]}):l("agentWorkspace.notAvailable")}function gte({protocol:e,title:t,available:n,fields:i,example:r}){const{t:s}=Oe("ui");return o.jsxs("section",{className:`aw-integration-panel${n&&r?" has-example":""}`,id:`integration-${e}-panel`,role:"tabpanel","aria-labelledby":`integration-${e}-tab`,children:[o.jsx("header",{children:o.jsx("h3",{children:t})}),o.jsx("dl",{children:i.map(a=>o.jsxs("div",{children:[o.jsx("dt",{children:a.label}),o.jsx("dd",{children:a.value||s("agentWorkspace.notAvailable")})]},a.label))}),n&&r&&o.jsxs("section",{className:"aw-integration-example",children:[o.jsx("h4",{children:s("agentWorkspace.pythonExample")}),o.jsx(Uu,{text:r,className:"aw-integration-example-code",allowRawHtml:!1})]})]})}function w5t(e,t,n){var i;return vB({appName:((i=e==null?void 0:e.appName)==null?void 0:i.trim())||t,name:e==null?void 0:e.name,description:e==null?void 0:e.description,type:e==null?void 0:e.type,model:e==null?void 0:e.model,tools:e==null?void 0:e.tools,skills:e==null?void 0:e.skills,graph:e==null?void 0:e.graph,draft:e==null?void 0:e.draft},n)}function cje(e){return e?1+e.children.reduce((t,n)=>t+cje(n),0):1}function uje(e){return 1+e.subAgents.reduce((t,n)=>t+uje(n),0)}function h8(e){if(!e)return 0;const t=Number(e);if(Number.isFinite(t))return t<1e12?t*1e3:t;const n=Date.parse(e);return Number.isFinite(n)?n:0}function S5t(e,t,n){const i=h8(e);return i?new Intl.DateTimeFormat(t,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(i)):n("agentWorkspace.unknownTime")}function k5t(e,t){return typeof e.score!="number"||!Number.isFinite(e.score)?"—":t("agentWorkspace.scoreValue",{score:Math.round(e.score*100)})}function E5t(e,t){return t(`agentWorkspace.priority.${e}`)}const C5t={agent_structure:"agentWorkspace.modules.agentStructure",prompt:"agentWorkspace.modules.prompt",tool:"agentWorkspace.modules.tool",knowledge:"agentWorkspace.modules.knowledge",memory:"agentWorkspace.modules.memory",workflow:"agentWorkspace.modules.workflow",other:"agentWorkspace.modules.other"};function T5t(e,t){var n;return e.module==="other"?((n=e.customModule)==null?void 0:n.trim())||t("agentWorkspace.modules.other"):t(C5t[e.module])}function A5t(e,t){return e.find(n=>n.kind===t)}function bte(e,t){return e.items.map(n=>({...n,tag:t(n.kind==="good"?"agentWorkspace.goodCase":"agentWorkspace.badCase")})).sort((n,i)=>h8(i.createdAt)-h8(n.createdAt))}function _5t(e){const t=n=>[n.name,n.description,n.agentType??"llm",n.modelName??"",n.tools??[],n.builtinTools??[],(n.customTools??[]).map(i=>i.name),(n.mcpTools??[]).map(i=>i.name),n.skills??[],(n.selectedSkills??[]).map(i=>i.name),(n.subAgents??[]).map(t)];return JSON.stringify(t(e))}function N5t(e){return[{phase:"prepare",label:e("agentWorkspace.deploymentSteps.prepare.label"),description:e("agentWorkspace.deploymentSteps.prepare.description")},{phase:"build",label:e("agentWorkspace.deploymentSteps.build.label"),description:e("agentWorkspace.deploymentSteps.build.description")},{phase:"deploy",label:e("agentWorkspace.deploymentSteps.deploy.label"),description:e("agentWorkspace.deploymentSteps.deploy.description")},{phase:"publish",label:e("agentWorkspace.deploymentSteps.publish.label"),description:e("agentWorkspace.deploymentSteps.publish.description")},{phase:"complete",label:e("agentWorkspace.deploymentSteps.complete.label"),description:e("agentWorkspace.deploymentSteps.complete.description")}]}function j5t(e,t){return{phase:"update",label:t("agentWorkspace.deploymentSteps.update.label"),description:t("agentWorkspace.deploymentSteps.update.description",e)}}function dje(e,t){const n=N5t(t),i=[...n.slice(0,-1)];return e.instanceRange&&i.push(j5t(e.instanceRange,t)),e.createEvaluationSets&&i.push({phase:"evaluation",label:t("agentWorkspace.deploymentSteps.evaluation.label"),description:t("agentWorkspace.deploymentSteps.evaluation.description")}),e.githubDelivery&&i.push({phase:"github",label:t("agentWorkspace.deploymentSteps.github.label"),description:t("agentWorkspace.deploymentSteps.github.description")}),i.push(n[n.length-1]),i}function fje(e,t){const n=dje(e,t);if(e.status==="success")return n.length-1;const i=e.phase??{准备部署:"prepare",构建镜像:"build",部署:"deploy",发布:"publish",创建评测集:"evaluation","挂载 GitHub 持续交付":"github",部署完成:"complete"}[e.label],r=n.findIndex(s=>s.phase===i);return r<0?0:r}function R5t(e,t){if(!e)return"";try{return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(new Date(e))}catch{return""}}function hje({log:e,autoExpand:t,title:n,ariaLabel:i,copyLabel:r,defaultPendingMessage:s}){const{t:a,i18n:l}=Oe("ui"),c=m.useRef(null),u=!!((e==null?void 0:e.status)!=="complete"&&t),[d,f]=m.useState(u),[h,p]=m.useState(!1),g=!!(e!=null&&e.text||e!=null&&e.error),b=(e==null?void 0:e.text)||(e==null?void 0:e.error)||"",v=b.split(` +\`\`\``}function k5t({visible:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("path",{d:"M2.8 12s3.3-5.4 9.2-5.4 9.2 5.4 9.2 5.4-3.3 5.4-9.2 5.4S2.8 12 2.8 12Z"}),o.jsx("circle",{cx:"12",cy:"12",r:"2.4"}),!e&&o.jsx("path",{d:"m4.2 4.2 15.6 15.6"})]})}function fte({available:e,authType:t,value:n,visible:i,loading:r,error:s,onToggle:a}){const{t:l}=xe("ui");return e?t==="none"?l("agentWorkspace.noApiKeyRequired"):t==="custom_jwt"?l("agentWorkspace.usesOauthJwt"):t!=="key_auth"?l("agentWorkspace.notAvailable"):o.jsxs("span",{className:"aw-integration-secret",children:[o.jsx("span",{className:"aw-integration-secret-value","aria-live":"polite",children:i&&n?n:"****"}),o.jsx("button",{type:"button",className:"aw-integration-secret-toggle","aria-label":l(i?"agentWorkspace.hideApiKey":"agentWorkspace.showApiKey"),title:l(i?"agentWorkspace.hideApiKey":"agentWorkspace.showApiKey"),disabled:r,onClick:a,children:r?o.jsx("span",{className:"loading-gap-spinner","aria-hidden":"true"}):o.jsx(k5t,{visible:i})}),s&&o.jsx("span",{className:"aw-integration-secret-error",role:"alert",children:s})]}):l("agentWorkspace.notAvailable")}function hte({protocol:e,title:t,available:n,fields:i,example:r}){const{t:s}=xe("ui");return o.jsxs("section",{className:`aw-integration-panel${n&&r?" has-example":""}`,id:`integration-${e}-panel`,role:"tabpanel","aria-labelledby":`integration-${e}-tab`,children:[o.jsx("header",{children:o.jsx("h3",{children:t})}),o.jsx("dl",{children:i.map(a=>o.jsxs("div",{children:[o.jsx("dt",{children:a.label}),o.jsx("dd",{children:a.value||s("agentWorkspace.notAvailable")})]},a.label))}),n&&r&&o.jsxs("section",{className:"aw-integration-example",children:[o.jsx("h4",{children:s("agentWorkspace.pythonExample")}),o.jsx(Bu,{text:r,className:"aw-integration-example-code",allowRawHtml:!1})]})]})}function E5t(e,t,n){var i;return yB({appName:((i=e==null?void 0:e.appName)==null?void 0:i.trim())||t,name:e==null?void 0:e.name,description:e==null?void 0:e.description,type:e==null?void 0:e.type,model:e==null?void 0:e.model,tools:e==null?void 0:e.tools,skills:e==null?void 0:e.skills,graph:e==null?void 0:e.graph,draft:e==null?void 0:e.draft},n)}function uje(e){return e?1+e.children.reduce((t,n)=>t+uje(n),0):1}function dje(e){return 1+e.subAgents.reduce((t,n)=>t+dje(n),0)}function f8(e){if(!e)return 0;const t=Number(e);if(Number.isFinite(t))return t<1e12?t*1e3:t;const n=Date.parse(e);return Number.isFinite(n)?n:0}function C5t(e,t,n){const i=f8(e);return i?new Intl.DateTimeFormat(t,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(i)):n("agentWorkspace.unknownTime")}function T5t(e,t){return typeof e.score!="number"||!Number.isFinite(e.score)?"—":t("agentWorkspace.scoreValue",{score:Math.round(e.score*100)})}function A5t(e,t){return t(`agentWorkspace.priority.${e}`)}const _5t={agent_structure:"agentWorkspace.modules.agentStructure",prompt:"agentWorkspace.modules.prompt",tool:"agentWorkspace.modules.tool",knowledge:"agentWorkspace.modules.knowledge",memory:"agentWorkspace.modules.memory",workflow:"agentWorkspace.modules.workflow",other:"agentWorkspace.modules.other"};function N5t(e,t){var n;return e.module==="other"?((n=e.customModule)==null?void 0:n.trim())||t("agentWorkspace.modules.other"):t(_5t[e.module])}function j5t(e,t){return e.find(n=>n.kind===t)}function pte(e,t){return e.items.map(n=>({...n,tag:t(n.kind==="good"?"agentWorkspace.goodCase":"agentWorkspace.badCase")})).sort((n,i)=>f8(i.createdAt)-f8(n.createdAt))}function R5t(e){const t=n=>[n.name,n.description,n.agentType??"llm",n.modelName??"",n.tools??[],n.builtinTools??[],(n.customTools??[]).map(i=>i.name),(n.mcpTools??[]).map(i=>i.name),n.skills??[],(n.selectedSkills??[]).map(i=>i.name),(n.subAgents??[]).map(t)];return JSON.stringify(t(e))}function I5t(e){return[{phase:"prepare",label:e("agentWorkspace.deploymentSteps.prepare.label"),description:e("agentWorkspace.deploymentSteps.prepare.description")},{phase:"build",label:e("agentWorkspace.deploymentSteps.build.label"),description:e("agentWorkspace.deploymentSteps.build.description")},{phase:"deploy",label:e("agentWorkspace.deploymentSteps.deploy.label"),description:e("agentWorkspace.deploymentSteps.deploy.description")},{phase:"publish",label:e("agentWorkspace.deploymentSteps.publish.label"),description:e("agentWorkspace.deploymentSteps.publish.description")},{phase:"complete",label:e("agentWorkspace.deploymentSteps.complete.label"),description:e("agentWorkspace.deploymentSteps.complete.description")}]}function P5t(e,t){return{phase:"update",label:t("agentWorkspace.deploymentSteps.update.label"),description:t("agentWorkspace.deploymentSteps.update.description",e)}}function fje(e,t){const n=I5t(t),i=[...n.slice(0,-1)];return e.instanceRange&&i.push(P5t(e.instanceRange,t)),e.createEvaluationSets&&i.push({phase:"evaluation",label:t("agentWorkspace.deploymentSteps.evaluation.label"),description:t("agentWorkspace.deploymentSteps.evaluation.description")}),e.githubDelivery&&i.push({phase:"github",label:t("agentWorkspace.deploymentSteps.github.label"),description:t("agentWorkspace.deploymentSteps.github.description")}),i.push(n[n.length-1]),i}function hje(e,t){const n=fje(e,t);if(e.status==="success")return n.length-1;const i=e.phase??{准备部署:"prepare",构建镜像:"build",部署:"deploy",发布:"publish",创建评测集:"evaluation","挂载 GitHub 持续交付":"github",部署完成:"complete"}[e.label],r=n.findIndex(s=>s.phase===i);return r<0?0:r}function D5t(e,t){if(!e)return"";try{return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(new Date(e))}catch{return""}}function pje({log:e,autoExpand:t,title:n,ariaLabel:i,copyLabel:r,defaultPendingMessage:s}){const{t:a,i18n:l}=xe("ui"),c=m.useRef(null),u=!!((e==null?void 0:e.status)!=="complete"&&t),[d,f]=m.useState(u),[h,p]=m.useState(!1),g=!!(e!=null&&e.text||e!=null&&e.error),b=(e==null?void 0:e.text)||(e==null?void 0:e.error)||"",v=b.split(` `),y=d?b:v.slice(-36).join(` -`),x=(e==null?void 0:e.pendingMessage)||s;if(m.useEffect(()=>{e&&f(u)},[e==null?void 0:e.status,u]),m.useEffect(()=>{if(!d||!g)return;const C=c.current;C&&(C.scrollTop=C.scrollHeight)},[d,g,y]),!e||!e.text&&e.status!=="error"&&!e.pendingMessage)return null;const w=R5t(e.updatedAt,l.resolvedLanguage??l.language),O=e.status==="complete"?a("agentWorkspace.logStatus.synced"):e.status==="error"?a("agentWorkspace.logStatus.failed"):a("agentWorkspace.logStatus.syncing"),k=e.omittedEarly?a("agentWorkspace.logStatus.earlyOmitted"):e.snapshotTruncated?a("agentWorkspace.logStatus.recentOnly"):e.truncated?a("agentWorkspace.logStatus.partiallyOmitted"):"",S=[O,e.lineCount?a("agentWorkspace.logLines",{count:e.lineCount}):"",k,w].filter(Boolean).join(" · ");async function E(){try{await navigator.clipboard.writeText(b),p(!0),window.setTimeout(()=>p(!1),1500)}catch{p(!1)}}return o.jsxs("section",{className:`aw-deploy-log is-${e.status}${d?"":" is-collapsed"}`,"aria-label":i,children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("strong",{children:n}),o.jsx("span",{children:S})]}),o.jsxs("div",{className:"aw-deploy-log-actions",children:[g&&o.jsx("button",{type:"button",onClick:()=>f(C=>!C),children:a(d?"common.collapse":"common.expand")}),g&&o.jsxs("button",{type:"button",onClick:()=>void E(),"aria-label":h?a("agentWorkspace.copiedLabel",{label:r}):a("agentWorkspace.copyLabel",{label:r}),title:h?a("agentWorkspace.copied"):a("agentWorkspace.copyLabel",{label:r}),children:[h?o.jsx(Hu,{"aria-hidden":!0}):o.jsx(Vj,{"aria-hidden":!0}),o.jsx("span",{children:a(h?"agentWorkspace.copied":"agentWorkspace.copy")})]})]})]}),d&&(g?o.jsx("pre",{ref:c,children:y}):o.jsx("div",{className:"aw-deploy-log-empty",children:x}))]})}function I5t({task:e}){var n;const{t}=Oe("ui");return o.jsx(hje,{log:e.buildLog,autoExpand:((n=e.buildLog)==null?void 0:n.status)!=="complete"&&(e.status==="running"||e.status==="error")&&fje(e,t)===1,title:t("agentWorkspace.buildLog"),ariaLabel:t("agentWorkspace.buildLog"),copyLabel:t("agentWorkspace.buildLog"),defaultPendingMessage:t("agentWorkspace.waitingBuildLog")})}function P5t({task:e}){var n;const{t}=Oe("ui");return o.jsx(hje,{log:e.githubLog,autoExpand:((n=e.githubLog)==null?void 0:n.status)!=="complete"&&(e.status==="running"||e.status==="error")&&e.phase==="github",title:t("agentWorkspace.githubMountLog"),ariaLabel:t("agentWorkspace.githubDeliveryMountLog"),copyLabel:t("agentWorkspace.githubMountLog"),defaultPendingMessage:t("agentWorkspace.waitingGithubMountLog")})}function D5t({task:e,onReturnToEdit:t}){const{t:n}=Oe("ui"),i=dje(e,n),r=fje(e,n),s=e.status==="success"?100:Math.max(6,Math.min(100,e.pct??6)),a=e.status==="running"?n("agentWorkspace.deployStatus.running"):e.status==="success"?n("agentWorkspace.deployStatus.success"):e.status==="error"?n("agentWorkspace.deployStatus.error"):n("agentWorkspace.deployStatus.cancelled");return o.jsxs("section",{className:`aw-deploy-progress-card is-${e.status}`,"aria-live":"polite",children:[o.jsxs("div",{className:"aw-deploy-progress-head",children:[o.jsxs("div",{children:[o.jsx("span",{className:"aw-deploy-progress-icon","aria-hidden":!0,children:e.status==="running"?o.jsx(mi,{className:"spin"}):e.status==="success"?o.jsx(XFe,{}):e.status==="error"?o.jsx(Obe,{}):o.jsx(o4,{})}),o.jsxs("div",{children:[o.jsx("h3",{children:a}),o.jsx("p",{children:e.runtimeName})]})]}),o.jsx("strong",{children:e.status==="running"?`${Math.round(s)}%`:e.label})]}),o.jsx("div",{className:"aw-deploy-progress-track",role:"progressbar","aria-label":n("agentWorkspace.deploymentProgress"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(s),children:o.jsx("span",{style:{width:`${s}%`}})}),o.jsx("ol",{className:"aw-deploy-steps",children:i.map((l,c)=>{const u=e.status==="success"||cnew Set),[ht,Yt]=m.useState(()=>new Set),[hn,nn]=m.useState(!1),[Ti,Bn]=m.useState(""),[yi,ci]=m.useState(null),[vi,En]=m.useState([]),[sr,di]=m.useState([]),[Hi,fs]=m.useState(!1),[Sr,Fr]=m.useState(""),[js,Br]=m.useState(""),[vs,Rs]=m.useState(0),[hs,ya]=m.useState([]),[Nr,Ws]=m.useState(!1),[Pa,es]=m.useState(""),[va,oa]=m.useState(0),[ps,ro]=m.useState(null),[fi,El]=m.useState(1),[Wn,Da]=m.useState(!1),[or,Is]=m.useState(""),[qo,Ma]=m.useState(0),[be,We]=m.useState(!1),[jt,ln]=m.useState(()=>new Set),[Dn,qi]=m.useState(!1),[ui,Ur]=m.useState(""),[La,$a]=m.useState(""),[xs,Qr]=m.useState(()=>new Set),ts=m.useRef(!1),ns=m.useRef(""),jr=m.useRef(null),mc=m.useRef(0),la=m.useRef(0),Cl=m.useRef(0),[Wo,td]=m.useState(h5t),[Tl,nd]=m.useState("");m.useEffect(()=>{e.length!==0&&td(ee=>ee.map((Ce,Ue)=>Ue===0&&Ce.agentIds.length===0?{...Ce,agentIds:e.slice(0,2).map(ft=>ft.id)}:Ce))},[e]);const So=m.useMemo(()=>{const ee=new Map;for(const Ce of e)Ce.runtimeId&&ee.set(Ce.runtimeId,Ce);return ee},[e]),uu=m.useMemo(()=>{var Ce;const ee=new Map;for(const Ue of t){const ft=(Ce=Ue.deploymentTarget)==null?void 0:Ce.runtimeId;if(!ft||!So.has(ft))continue;const sn=ee.get(ft);(!sn||Ue.updatedAt>sn.updatedAt)&&ee.set(ft,Ue)}return ee},[So,t]),Ko=m.useMemo(()=>{const ee=new Map;for(const Ce of f){if(!Ce.runtimeId)continue;const Ue=ee.get(Ce.runtimeId);(!Ue||Ce.startedAt>Ue.startedAt)&&ee.set(Ce.runtimeId,Ce)}return ee},[f]),du=m.useMemo(()=>{const ee=ze.trim().toLowerCase();return ee?e.filter(Ce=>{const Ue=Ce.runtimeId?uu.get(Ce.runtimeId):void 0,ft=Ce.runtimeId?Ko.get(Ce.runtimeId):void 0;return[Ce.label,Ce.app,Ce.host??"",(Ue==null?void 0:Ue.draft.name)??"",(Ue==null?void 0:Ue.draft.description)??"",(ft==null?void 0:ft.runtimeName)??""].join(" ").toLowerCase().includes(ee)}):e},[e,Ko,ze,uu]),so=m.useMemo(()=>{const ee=ze.trim().toLowerCase();return t.filter(Ce=>{var ft;const Ue=(ft=Ce.deploymentTarget)==null?void 0:ft.runtimeId;return Ue&&So.has(Ue)?!1:ee?`${Ce.draft.name} ${Ce.draft.description}`.toLowerCase().includes(ee):!0})},[So,t,ze]),id=m.useMemo(()=>t.filter(ee=>{var Ue;const Ce=(Ue=ee.deploymentTarget)==null?void 0:Ue.runtimeId;return!Ce||!So.has(Ce)}).length,[So,t]),lf=m.useMemo(()=>{const ee=ze.trim().toLowerCase();return ee?Wo.filter(Ce=>Ce.name.toLowerCase().includes(ee)):Wo},[Wo,ze]),ce=e.find(ee=>ee.id===I),Un=t.find(ee=>ee.id===X),Yn=h?f.find(ee=>ee.id===h):void 0,gc=ce!=null&&ce.runtimeId?uu.get(ce.runtimeId):void 0,ti=y?gn:I&&r===I?i:null,Pi=(ti==null?void 0:ti.appName)||(ce==null?void 0:ce.runtimeApp)||(ce==null?void 0:ce.app)||"",Al=(c&&(ce!=null&&ce.runtimeId)?fte:fte.filter(ee=>ee!=="usage")).map(ee=>({id:ee,label:A(`agentWorkspace.sections.${ee}`)})),bc=JSON.stringify([(ce==null?void 0:ce.runtimeId)??"",(ce==null?void 0:ce.region)??"cn-beijing",Pi,fi]),ms=(ps==null?void 0:ps.requestKey)===bc?ps.value:null,_l=`${(ce==null?void 0:ce.region)??"cn-beijing"}:${(ce==null?void 0:ce.runtimeId)??""}`,yc=(Te==null?void 0:Te.requestKey)===_l?Te.value:"",kr=(te==null?void 0:te.requestKey)===_l?te:null,Qn=!!((d0=kr==null?void 0:kr.apiApps)!=null&&d0.length),Fa=!!(kr!=null&&kr.a2a),me=((tC=kr==null?void 0:kr.apiApps)==null?void 0:tC[0])??Pi,nt=(q==null?void 0:q.endpoint)??"",At=b5t(((wc=kr==null?void 0:kr.a2a)==null?void 0:wc.endpoint)??"",nt),dn=(ce==null?void 0:ce.runtimeApp)||"",tn=JSON.stringify([(ce==null?void 0:ce.runtimeId)??"",(ce==null?void 0:ce.region)??"",(ce==null?void 0:ce.currentVersion)??null,dn]),cn=l&&(ce!=null&&ce.runtimeId)&&ce.region&&ut===0?O4({runtimeId:ce.runtimeId,region:ce.region,appName:dn,currentVersion:ce.currentVersion}):null,Bt=(Ne==null?void 0:Ne.requestKey)===tn?Ne.value:cn,Ut=Bt!=null&&Bt.reason?Md(Bt.reason,R.resolvedLanguage||R.language):"",Z=(Bt==null?void 0:Bt.warnings.filter(ee=>Md(ee,R.resolvedLanguage||R.language)))??[];m.useEffect(()=>{const ee=mc.current+1;mc.current=ee,ve(null),Kt("");const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"";if(!l||!Ce||!Ue){it(!1);return}const ft=ut===0?O4({runtimeId:Ce,region:Ue,appName:dn,currentVersion:ce==null?void 0:ce.currentVersion}):null;if(ft){ve({requestKey:tn,value:ft}),it(!1);return}const sn=new AbortController;let Ye,ni=0;const ua=60;it(!0);const Zn=Ps=>{tR({runtimeId:Ce,region:Ue,appName:dn,currentVersion:ce==null?void 0:ce.currentVersion,signal:sn.signal,force:Ps&&ut>0}).then(Eo=>{var rC,Zm;if(ee!==mc.current)return;const m1=Eo.recoveryStatus==="preparing";if(Eo.runtime.runtimeId!==Ce||Eo.runtime.region!==Ue||!m1&&dn&&((rC=Eo.agent)==null?void 0:rC.appName)!==dn||Eo.canUpdate&&!((Zm=Eo.agent)!=null&&Zm.appName)){Kt(A("agentWorkspace.errors.updateCapabilityMismatch"));return}if(ve({requestKey:tn,value:Eo}),it(!1),!!m1){if(ni+=1,ni>=ua){Kt(A("agentWorkspace.errors.updateConfigRestoring"));return}Ye=window.setTimeout(()=>Zn(!1),1e3)}}).catch(()=>{ee!==mc.current||sn.signal.aborted||Kt(A("agentWorkspace.errors.checkUpdateCapability"))}).finally(()=>{ee===mc.current&&!sn.signal.aborted&&it(!1)})};return Zn(!0),()=>{sn.abort(),Ye!=null&&window.clearTimeout(Ye)}},[l,dn,ut,ce==null?void 0:ce.currentVersion,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId,tn]);const Se=m.useMemo(()=>{const ee=new Map(e.map((Ue,ft)=>[Ue.id,ft])),Ce=new Map(n.map((Ue,ft)=>[Ue,ft]));return[...du].sort((Ue,ft)=>{const sn=Ue.runtimeId?Ko.get(Ue.runtimeId):void 0,Ye=ft.runtimeId?Ko.get(ft.runtimeId):void 0,ni=(sn==null?void 0:sn.status)==="running"?sn.startedAt:0,ua=(Ye==null?void 0:Ye.status)==="running"?Ye.startedAt:0;if(ni!==ua)return ua-ni;const Zn=Ce.get(Ue.id),Ps=Ce.get(ft.id);return Zn!=null&&Ps!=null?Zn-Ps:Zn!=null?-1:Ps!=null?1:(ee.get(Ue.id)??0)-(ee.get(ft.id)??0)})},[n,e,du,Ko]),Xe=(ce==null?void 0:ce.label)||(ti==null?void 0:ti.name)||(Un==null?void 0:Un.draft.name)||(Yn==null?void 0:Yn.agentName)||((nC=Yn==null?void 0:Yn.agentDraft)==null?void 0:nC.name)||A("agentWorkspace.noAgentSelected"),Ht=Wo.find(ee=>ee.id===Tl),un=Se.filter(ee=>ee.canDelete===!0),In=Se.filter(ee=>Ki.has(ee.id)&&ee.canDelete===!0),hi=so.filter(ee=>ht.has(ee.id)),Gi=un.length+so.length,Ai=In.length+hi.length,zn=m.useMemo(()=>{var Ce;if(Yn!=null&&Yn.agentDraft)return Yn.agentDraft;if(Un!=null&&Un.draft)return Un.draft;const ee=(Ce=ce==null?void 0:ce.region)!=null&&Ce.startsWith("ap-")?"byteplus":"volcengine";return Bt!=null&&Bt.agent&&(Bt.recoveryStatus==="complete"||Bt.recoveryStatus==="draft-only")?vB(Bt.agent,ee,Bt.runtime.configuredEnvKeys):w5t(ti,Pi||(ce==null?void 0:ce.label)||"agent",ee)},[ti,Pi,ce==null?void 0:ce.label,ce==null?void 0:ce.region,Un==null?void 0:Un.draft,Yn==null?void 0:Yn.agentDraft,Bt]),Xi=((np=ti==null?void 0:ti.draft)==null?void 0:np.harnessSidecar)??vst(q==null?void 0:q.envs),Ba=Xi?Ux.filter(ee=>Xi.componentOverrides[ee]):[],Mn=Un?a?"":A("agentWorkspace.errors.noCreatePermission"):l?ce!=null&&ce.runtimeId?ce.region?He?A("agentWorkspace.errors.checkingUpdateConfig"):Ae||(Bt?Bt.recoveryStatus!=="complete"&&Bt.recoveryStatus!=="draft-only"?Ut||A("agentWorkspace.errors.originalConfigUnavailable"):Bt.canUpdate?(iC=Bt.agent)!=null&&iC.appName?"":A("agentWorkspace.errors.agentInfoMissing"):Ut||A("agentWorkspace.errors.updateUnsupported"):A("agentWorkspace.errors.updateCapabilityPending")):A("agentWorkspace.errors.runtimeRegionMissing"):A("agentWorkspace.errors.cloudOnlyUpdate"):A("agentWorkspace.errors.noManagePermission"),xn="aw-update-disabled-reason",Qe=m.useMemo(()=>{if(ti)return ti.tools;const ee=(zn.builtinTools??[]).map(Ce=>{var Ue;return((Ue=Bx.find(ft=>ft.id===Ce))==null?void 0:Ue.label)??Ce});return Array.from(new Set([...zn.tools,...ee,...(zn.customTools??[]).map(Ce=>Ce.name),...(zn.mcpTools??[]).map(Ce=>Ce.name)].filter(Boolean)))},[zn,ti]),vn=m.useMemo(()=>ti?ti.skillsPreviewSupported?ti.skills.map(ee=>ee.name):null:Array.from(new Set([...(zn.selectedSkills??[]).map(ee=>ee.name),...zn.skills].filter(Boolean))),[zn,ti]),Cn=m.useMemo(()=>{if(Yn)return Yn;if(Un){const ee=f.filter(Ce=>Ce.draftId===Un.id).sort((Ce,Ue)=>Ue.startedAt-Ce.startedAt)[0];return ee||f.filter(Ce=>{var Ue,ft;return((Ue=Ce.agentDraft)==null?void 0:Ue.name)===Un.draft.name||Ce.agentName===Un.draft.name||!!((ft=Un.deploymentTarget)!=null&&ft.runtimeId)&&Ce.runtimeId===Un.deploymentTarget.runtimeId}).sort((Ce,Ue)=>Ue.startedAt-Ce.startedAt)[0]}if(ce)return f.filter(ee=>!!ce.runtimeId&&ee.runtimeId===ce.runtimeId||ee.agentName===ce.label).sort((ee,Ce)=>Ce.startedAt-ee.startedAt)[0]},[f,ce,Un,Yn]),lr=!!(h&&Cn&&Cn.id===h),Ks=!!(Cn&&(Cn.status!=="success"||lr)),fu=(Cn==null?void 0:Cn.status)==="running",ep=Cn!=null&&Cn.draftId?t.find(ee=>ee.id===Cn.draftId)??(Cn.agentDraft?{id:Cn.draftId,draft:Cn.agentDraft,updatedAt:Cn.startedAt}:void 0):void 0,vc=m.useMemo(()=>_5t(zn),[zn]),xc=(ce==null?void 0:ce.currentVersion)??(q==null?void 0:q.currentVersion)??null,ko=xc??(Yn==null?void 0:Yn.startedAt)??"unknown",sd=ti?`runtime:${(ce==null?void 0:ce.runtimeId)??ti.name}:v${ko}:${vc}`:`draft:${(Yn==null?void 0:Yn.id)??(Un==null?void 0:Un.id)??(ce==null?void 0:ce.id)??Xe}:${vc}`;m.useEffect(()=>{M==="usage"&&!c&&B("basic")},[c,M]),m.useEffect(()=>{if(!h)return;const ee=f.find(Ue=>Ue.id===h),Ce=ee!=null&&ee.runtimeId?So.get(ee.runtimeId):void 0;if(Ce){Q(""),H(Ce.id),B("basic");return}H(""),Q(""),B("basic")},[So,f,h]),m.useEffect(()=>{if(!p){ns.current="";return}const ee=`${p}:${g}:${b}:${c}`;ns.current!==ee&&e.some(Ce=>Ce.id===p)&&(ns.current=ee,Q(""),H(p),B(g==="usage"&&!c?"basic":g),g==="evaluations"&&(_t(b),en("")))},[e,c,p,g,b]),m.useEffect(()=>{for(const ee of Se.slice(0,8)){if(!ee.runtimeId)continue;const Ce=ee.region??"cn-beijing";J0e(ee.runtimeId,Ce),Zbe(ee.runtimeId,Ce,ee.runtimeApp??"")}},[Se]),m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing",ft=(ce==null?void 0:ce.runtimeApp)??"",sn=Ce?Ybe(Ce,Ue,ft):null;if(Wt(sn),bt(""),st(!1),Nt(!!sn||!y||!Ce),!(!y||!Ce))return VF(Ce,Ue,ft,{force:!0}).then(Ye=>{ee||Wt(Ye)}).catch(Ye=>{!ee&&!sn&&Wt(null),ee||(st(Ye instanceof $s&&Ye.unsupported),bt(A("agentWorkspace.errors.loadAgentInfo")))}).finally(()=>{ee||Nt(!0)}),()=>{ee=!0}},[y,ut,ce==null?void 0:ce.currentVersion,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeApp,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing";if(ya([]),es(""),M!=="optimizations"||!Ce){Ws(!1);return}if(y&&!Pi){Ws(!Ot);return}return Ws(!0),Ube({runtimeId:Ce,region:Ue,appName:Pi}).then(ft=>{ee||ya(ft.groups)}).catch(()=>{ee||es(A("agentWorkspace.errors.loadOptimizations"))}).finally(()=>{ee||Ws(!1)}),()=>{ee=!0}},[Ot,y,va,M,Pi,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{El(1)},[ce==null?void 0:ce.runtimeId,Pi]),m.useEffect(()=>{const ee=Cl.current+1;Cl.current=ee;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing",ft=Pi;if(Is(""),M!=="usage"||!Ce){Da(!1);return}if(!ft){Da(y&&!Ot);return}const sn=new AbortController;return Da(!0),B0e({runtimeId:Ce,region:Ue,appName:ft,page:fi,pageSize:m5t,signal:sn.signal}).then(Ye=>{if(ee===Cl.current){if(Ye.runtimeId!==Ce||Ye.appName!==ft||Ye.page!==fi){Is(A("agentWorkspace.errors.usageMismatch"));return}ro({requestKey:bc,value:Ye})}}).catch(()=>{ee!==Cl.current||sn.signal.aborted||Is(A("agentWorkspace.errors.loadUsage"))}).finally(()=>{ee===Cl.current&&Da(!1)}),()=>{sn.abort()}},[fi,qo,bc,Ot,y,M,Pi,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{la.current+=1,rt(null),Me(!1),qe(!1),Ve(""),ke("api-server")},[_l,M]);function cf(){la.current+=1,rt(null),Me(!1),qe(!1),Ve("")}function uf(ee){ee!==de&&(cf(),ke(ee))}async function df(){if(Be){cf();return}const ee=(ce==null?void 0:ce.runtimeId)??"",Ce=(ce==null?void 0:ce.region)??"cn-beijing";if(!ee)return;const Ue=la.current+1;la.current=Ue,qe(!0),Ve("");try{const ft=await X0e(ee,Ce);if(Ue!==la.current)return;rt({requestKey:_l,value:ft}),Me(!0)}catch(ft){if(Ue!==la.current)return;rt(null),Me(!1),Ve(ft instanceof Error?ft.message:A("agentWorkspace.errors.loadApiKey"))}finally{Ue===la.current&&qe(!1)}}m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing",ft=Ce?Z0e(Ce,Ue):null;if(U(ft),gt(""),!!Ce)return YF(Ce,Ue,{force:!0}).then(sn=>{ee||U(sn)}).catch(()=>{!ee&&!ft&&U(null),ee||gt(A("agentWorkspace.errors.loadRuntimeDetails"))}),()=>{ee=!0}},[ut,ce==null?void 0:ce.currentVersion,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"";if(Ke(""),M!=="versions"||!Ce){fe(!1),Ce||Le(null);return}return fe(!0),X2(Ce).then(Ue=>{ee||Le(Ue)}).catch(()=>{ee||(Le(null),Ke(A("agentWorkspace.errors.loadGithubVersions")))}).finally(()=>{ee||fe(!1)}),()=>{ee=!0}},[M,ce==null?void 0:ce.currentVersion,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing",ft=`${Ue}:${Ce}`;if(K(""),M!=="integrations"||!Ce){re(!1),Ce||le(null);return}re(!0);const sn=Fv(Ce,Ue,{retryProbe:!0}).catch(Ye=>{if(Ye instanceof $s&&Ye.unsupported)return null;throw Ye});return Promise.all([sn,G0e(Ce,Ue,{retryProbe:!0})]).then(([Ye,ni])=>{ee||le({requestKey:ft,apiApps:Ye,a2a:ni})}).catch(()=>{ee||(le(null),K(A("agentWorkspace.errors.probeIntegration")))}).finally(()=>{ee||re(!1)}),()=>{ee=!0}},[G,M,ce==null?void 0:ce.currentVersion,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing",ft=Ce&&Pi?Qbe({runtimeId:Ce,region:Ue,appName:Pi,pageSize:100}):null;if(En(ft?bte(ft,A):[]),di((ft==null?void 0:ft.sets)??[]),Fr(""),Br((ft==null?void 0:ft.unsupportedMessage)??""),M!=="evaluations"||!Ce){fs(!1);return}if(y&&!Pi){fs(!Ot);return}return fs(!ft),Zj({runtimeId:Ce,region:Ue,appName:Pi,pageSize:100},{force:!0}).then(sn=>{ee||(di(sn.sets),En(bte(sn,A)),Br(sn.unsupportedMessage??""))}).catch(()=>{ee||(Fr(A("agentWorkspace.errors.loadEvaluations")),Br(""))}).finally(()=>{ee||fs(!1)}),()=>{ee=!0}},[Ot,y,vs,M,Pi,ti==null?void 0:ti.appName,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId,A]);async function Oc(ee){const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=ee.commitSha??"";if(!(!Ce||!Ue||Je)){Tt(Ue),Ke("");try{await j0e({runtimeId:Ce,targetCommitSha:Ue});const ft=await X2(Ce);Le(ft)}catch(ft){Ke(ft instanceof Error?ft.message:A("agentWorkspace.errors.rollbackVersion"))}finally{Tt("")}}}m.useEffect(()=>{const ee=new Set(vi.map(Ce=>Ce.id));ln(Ce=>{const Ue=new Set([...Ce].filter(ft=>ee.has(ft)));return Ue.size===Ce.size?Ce:Ue}),Qr(Ce=>{const Ue=new Set([...Ce].filter(ft=>ee.has(ft)));return Ue.size===Ce.size?Ce:Ue}),La&&!ee.has(La)&&$a("")},[vi,La]),m.useEffect(()=>{We(!1),ln(new Set),Qr(new Set),Ur(""),$a("")},[ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{const ee=new Set(Se.filter(Ce=>Ce.canDelete===!0).map(Ce=>Ce.id));$e(Ce=>{const Ue=new Set([...Ce].filter(ft=>ee.has(ft)));return Ue.size===Ce.size?Ce:Ue})},[Se]),m.useEffect(()=>{const ee=new Set(so.map(Ce=>Ce.id));Yt(Ce=>{const Ue=new Set([...Ce].filter(ft=>ee.has(ft)));return Ue.size===Ce.size?Ce:Ue})},[so]);const ao=m.useMemo(()=>!v||!(ce!=null&&ce.runtimeId)||v.runtimeId!==ce.runtimeId||Pi&&v.agentName&&v.agentName!==Pi?null:{...v,tag:A(v.kind==="good"?"agentWorkspace.goodCase":"agentWorkspace.badCase")},[v,ce==null?void 0:ce.runtimeId,Pi,A]),Go=m.useMemo(()=>f5t(A),[A]),ca=m.useMemo(()=>ce!=null&&ce.runtimeId?ao?[ao,...vi.filter(ee=>ee.id!==ao.id&&(!ee.messageId||ee.messageId!==ao.messageId))]:vi:Go,[Go,vi,ao,ce==null?void 0:ce.runtimeId]),hu=ca.filter(ee=>{if(ee.kind!==Et||(ee.source==="auto"?"auto":"user")!==on)return!1;const Ue=rn.trim().toLowerCase();return Ue?[ee.input,ee.output,ee.referenceOutput,ee.comment,ee.tag??"",ee.sessionId,ee.messageId,ee.userId,ee.evaluationSetName].join(" ").toLowerCase().includes(Ue):!0}),ff=hu.filter(ee=>jt.has(ee.id)),ad=!!(ce!=null&&ce.runtimeId),zr=ee=>{_t(ee),en(""),Ur("");const Ce=ca.find(Ue=>Ue.kind===ee);$a((Ce==null?void 0:Ce.id)??""),window.setTimeout(()=>{var Ue;(Ue=jr.current)==null||Ue.scrollIntoView({behavior:"smooth",block:"start"})},0)},hf=ee=>{Ur(""),ln(Ce=>{const Ue=new Set(Ce);return Ue.has(ee.id)?Ue.delete(ee.id):Ue.add(ee.id),Ue})},WI=()=>{Ur(""),ln(new Set(hu.map(ee=>ee.id)))},KI=()=>{Ur(""),ln(new Set),We(!1)},Vr=ee=>{Qr(Ce=>{const Ue=new Set(Ce);return Ue.has(ee)?Ue.delete(ee):Ue.add(ee),Ue})},o0=ee=>{$a(ee.id),Ur(""),!(!ee.sessionId||!ee.messageId)&&(N==null||N(ee))},KE=async ee=>{if(!(ce!=null&&ce.runtimeId)||!Pi||Dn||ee.length===0)return;const Ce=ee.length===1?A("agentWorkspace.deleteOneCaseConfirm"):A("agentWorkspace.deleteCasesConfirm",{count:ee.length});if(!window.confirm(Ce))return;const Ue=ee.map(sn=>sn.id),ft=new Set(Ue);qi(!0),Ur("");try{await Hbe({runtimeId:ce.runtimeId,region:ce.region??"cn-beijing",appName:Pi,itemIds:Ue});const sn=new Map;for(const Ye of ee)sn.set(Ye.kind,(sn.get(Ye.kind)??0)+1);En(Ye=>Ye.filter(ni=>!ft.has(ni.id))),di(Ye=>Ye.map(ni=>({...ni,itemCount:Math.max(0,ni.itemCount-(sn.get(ni.kind)??0))}))),ln(Ye=>new Set([...Ye].filter(ni=>!ft.has(ni)))),Qr(Ye=>new Set([...Ye].filter(ni=>!ft.has(ni)))),La&&ft.has(La)&&$a(""),ee.length>1&&We(!1),_==null||_(ee)}catch(sn){Ur(sn instanceof Error?sn.message:String(sn))}finally{qi(!1)}},h1=ee=>{td(Ce=>Ce.map(Ue=>Ue.id===ee.id?ee:Ue))},GE=()=>{const ee=new Set(e.map(ft=>ft.id)),Ce=n.filter(ft=>ee.has(ft)),Ue=new Set(Ce);return[...Ce,...e.filter(ft=>!Ue.has(ft.id)).map(ft=>ft.id)]},XE=(ee,Ce,Ue)=>{if(!O||ee===Ce)return;const ft=GE().filter(ni=>ni!==ee),sn=ft.indexOf(Ce),Ye=sn<0?ft.length:Ue==="after"?sn+1:sn;ft.splice(Ye,0,ee),O(ft)},YE=(ee,Ce)=>{if(!Lt||Lt===Ce)return;const Ue=ee.currentTarget.getBoundingClientRect();pt(Ce),qn(ee.clientY>Ue.top+Ue.height/2?"after":"before")},Ym=(ee,Ce)=>{if(!O)return;const Ue=GE(),ft=Ue.indexOf(ee),sn=Math.max(0,Math.min(Ue.length-1,ft+Ce));ft<0||ft===sn||(Ue.splice(ft,1),Ue.splice(sn,0,ee),O(Ue))},l0=ee=>{ee.canDelete===!0&&(Bn(""),$e(Ce=>{const Ue=new Set(Ce);return Ue.has(ee.id)?Ue.delete(ee.id):Ue.add(ee.id),Ue}))},ZE=ee=>{Bn(""),Yt(Ce=>{const Ue=new Set(Ce);return Ue.has(ee.id)?Ue.delete(ee.id):Ue.add(ee.id),Ue})},JE=()=>{Bn(""),$e(new Set(un.map(ee=>ee.id))),Yt(new Set(so.map(ee=>ee.id)))},Rt=()=>{Bn(""),$e(new Set),Yt(new Set),ei(!1)},c0=()=>{if(Ai===0||hn)return;const ee=In.length,Ce=hi.length;Bn(""),ci({kind:"selection",title:A(ee===1&&Ce===0?"agentWorkspace.deleteAgentTitle":ee===0&&Ce===1?"myAgents.deleteDraftTitle":"agentWorkspace.deleteSelectedTitle"),description:ee===1&&Ce===0?A("agentWorkspace.deleteAgentDescription",{name:In[0].label}):ee===0&&Ce===1?A("agentWorkspace.deleteDraftDescription",{name:hi[0].draft.name||A("agentSelector.unnamedAgent")}):A("agentWorkspace.deleteSelectionDescription",{count:Ai,warning:ee>0?A("agentWorkspace.runtimeDeletionWarning",{count:ee}):A("agentWorkspace.draftDeletionWarning")}),confirmLabel:A(ee===0&&Ce===1?"myAgents.deleteDraft":"agentWorkspace.deleteSelected"),agents:In,drafts:hi})},p1=async()=>{if(!(!yi||hn)){nn(!0),Bn("");try{if(yi.kind==="selection"){const{agents:ee,drafts:Ce}=yi;if(ee.length>0){if(!k)throw new Error(A("agentWorkspace.errors.deleteDeployedUnsupported"));await k(ee)}Ce.length>0&&(S==null||S(Ce)),$e(new Set),Yt(new Set),ei(!1),ee.some(Ue=>Ue.id===I)&&H(""),Ce.some(Ue=>Ue.id===X)&&Q("")}else if(yi.kind==="agent"){if(!k)throw new Error(A("agentWorkspace.errors.deleteDeployedUnsupported"));await k([yi.agent]),I===yi.agent.id&&H("")}else{if(!S)throw new Error(A("agentWorkspace.errors.deleteDraftUnsupported"));S([yi.draft]),X===yi.draft.id&&Q("")}ci(null)}catch(ee){Bn(ee instanceof Error?ee.message:String(ee))}finally{nn(!1)}}},u0=ee=>{!k||ee.canDelete!==!0||hn||(Bn(""),ci({kind:"agent",title:A("agentWorkspace.deleteAgentTitle"),description:A("agentWorkspace.deleteAgentDescription",{name:ee.label}),confirmLabel:A("agentWorkspace.deleteAgent"),agent:ee}))},Yi=ee=>{if(!S||hn)return;const Ce=ee.draft.name||A("agentSelector.unnamedAgent");Bn(""),ci({kind:"draft",title:A("myAgents.deleteDraftTitle"),description:A("agentWorkspace.deleteDraftDescription",{name:Ce}),confirmLabel:A("myAgents.deleteDraft"),draft:ee})},tp=()=>{const ee=`eval-${Date.now()}`,Ce={id:ee,name:A("agentWorkspace.newEvaluationGroupName",{count:Wo.length+1}),agentIds:[],caseSet:"核心回归集",evaluator:"综合质量评估器",metrics:["回答质量"],concurrency:"4",history:[]};td(Ue=>[Ce,...Ue]),nd(ee)},eC=ee=>{h1({...ee,history:[{id:`run-${Date.now()}`,createdAt:A("agentWorkspace.evaluationDefaults.justNow"),score:86+ee.history.length%7,status:"completed"},...ee.history]})};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:`aw-root${y?" is-detail-only":""}`,children:[o.jsxs("nav",{className:"aw-view-tabs","aria-label":A("agentWorkspace.workspace"),children:[o.jsx("button",{type:"button",className:P==="library"?"is-active":"","aria-pressed":P==="library",onClick:()=>{$("library"),et("")},children:A("agentWorkspace.library")}),o.jsx("button",{type:"button",className:P==="evaluation"?"is-active":"","aria-pressed":P==="evaluation",onClick:()=>{$("evaluation"),et("")},children:A("agentWorkspace.evaluation")})]}),o.jsxs("div",{className:"aw-workspace-frame",children:[o.jsxs("div",{className:"aw-workspace","aria-hidden":P==="evaluation"||void 0,ref:ee=>{ee==null||ee.toggleAttribute("inert",P==="evaluation")},children:[o.jsxs("aside",{className:"aw-sidebar","aria-label":A(P==="library"?"agentWorkspace.agentList":"agentWorkspace.evaluationGroupList"),children:[o.jsxs("label",{className:"aw-search",children:[o.jsx(A_,{"aria-hidden":!0}),o.jsx("input",{value:ze,onChange:ee=>et(ee.currentTarget.value),placeholder:A(P==="library"?"myAgents.searchAgents":"agentWorkspace.searchEvaluationGroups"),"aria-label":A(P==="library"?"myAgents.searchAgents":"agentWorkspace.searchEvaluationGroups")})]}),o.jsxs("button",{type:"button",className:"aw-create-card",onClick:P==="library"?j:tp,disabled:P==="library"&&!a,children:[o.jsx(Mo,{"aria-hidden":!0}),o.jsx("span",{children:A(P==="library"?"agentWorkspace.newAgent":"agentWorkspace.newEvaluationGroup")})]}),P==="library"&&(k||S)&&o.jsx("div",{className:`aw-selection-toolbar${ai?" is-active":""}`,children:ai?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"aw-selection-count",children:A("agentWorkspace.selectedCount",{count:Ai})}),o.jsx("button",{type:"button",onClick:JE,disabled:Gi===0||hn,children:A("agentWorkspace.selectAll")}),o.jsx("button",{type:"button",className:"aw-selection-danger",onClick:()=>void c0(),disabled:Ai===0||hn,children:A(hn?"common.deleting":"agentWorkspace.deleteSelected")}),o.jsx("button",{type:"button",onClick:Rt,disabled:hn,children:A("common.cancel")})]}):o.jsx("button",{type:"button",onClick:()=>{Bn(""),ei(!0)},disabled:Gi===0,children:A("common.select")})}),P==="library"&&Ti&&o.jsx("div",{className:"aw-delete-error",role:"alert",children:Ti}),o.jsx("div",{className:"aw-agent-list",children:P==="evaluation"?lf.length===0?o.jsx("div",{className:"aw-list-empty",children:A("agentWorkspace.noMatchingEvaluationGroups")}):lf.map(ee=>o.jsxs("button",{type:"button",className:`aw-agent-item${ee.id===Tl?" is-active":""}`,onClick:()=>nd(ee.id),children:[o.jsxs("span",{className:"aw-agent-copy aw-eval-group-copy",children:[o.jsx("strong",{children:WO(ee.name,A)}),o.jsx("small",{children:A("agentWorkspace.groupStats",{agents:ee.agentIds.length,runs:ee.history.length})})]}),o.jsx(bw,{"aria-hidden":!0})]},ee.id)):u&&Se.length===0&&so.length===0?o.jsx("div",{className:"aw-list-empty",children:A("agentWorkspace.loadingCloudAgents")}):d&&Se.length===0&&so.length===0?o.jsxs("div",{className:"aw-list-empty aw-list-error",children:[o.jsx("span",{children:d}),w&&o.jsx("button",{type:"button",onClick:w,children:A("common.retry")})]}):Se.length===0&&so.length===0?o.jsx("div",{className:"aw-list-empty",children:A("myAgents.noMatchingAgents")}):o.jsxs(o.Fragment,{children:[so.map(ee=>{const Ue=f.filter(sn=>sn.draftId===ee.id).sort((sn,Ye)=>Ye.startedAt-sn.startedAt)[0]??f.filter(sn=>{var Ye,ni;return((Ye=sn.agentDraft)==null?void 0:Ye.name)===ee.draft.name||sn.agentName===ee.draft.name||!!((ni=ee.deploymentTarget)!=null&&ni.runtimeId)&&sn.runtimeId===ee.deploymentTarget.runtimeId}).sort((sn,Ye)=>Ye.startedAt-sn.startedAt)[0],ft=ht.has(ee.id);return o.jsxs("button",{type:"button",className:["aw-agent-item",ai?"is-selecting":"",ft?"is-selected-for-delete":"",ee.id===X?"is-active":""].filter(Boolean).join(" "),"aria-pressed":ai?ft:void 0,onClick:()=>{if(ai){ZE(ee);return}H(""),Q(ee.id),B("basic")},children:[ai&&o.jsx("span",{className:`aw-select-marker${ft?" is-checked":""}`,"aria-hidden":"true"}),o.jsxs("span",{className:"aw-agent-copy",children:[o.jsxs("span",{className:"aw-agent-name-row",children:[o.jsx("strong",{children:ee.draft.name||A("agentSelector.unnamedAgent")}),o.jsx("span",{className:`aw-draft-badge${(Ue==null?void 0:Ue.status)==="running"?" is-deploying":""}`,children:(Ue==null?void 0:Ue.status)==="running"?A("myAgents.deploying"):A("myAgents.draft")})]}),o.jsx("small",{children:ee.deploymentTarget?A("agentWorkspace.updatePending"):A("agentWorkspace.notPublished")})]}),o.jsx(bw,{"aria-hidden":!0})]},ee.id)}),Se.map(ee=>{const Ce=ee.runtimeId?Ko.get(ee.runtimeId):void 0,Ue=ee.runtimeId?uu.get(ee.runtimeId):void 0,ft=Ki.has(ee.id),sn=ee.canDelete===!0,Ye=(Ce==null?void 0:Ce.status)==="running"?{label:A("myAgents.deploying"),className:" is-deploying"}:(Ce==null?void 0:Ce.status)==="error"?{label:A("agentWorkspace.failed"),className:" is-error"}:(Ce==null?void 0:Ce.status)==="cancelled"?{label:A("agentWorkspace.cancelled"),className:" is-muted"}:Ue?{label:A("agentWorkspace.updatePending"),className:""}:null,ni=(Ce==null?void 0:Ce.status)==="running"?A("agentWorkspace.updatingDeployment"):Ue?A("agentWorkspace.updatePending"):ee.remote?ee.host||A("agentWorkspace.remoteAgent"):A("agentWorkspace.localAgent"),ua=["aw-agent-item","aw-agent-item--sortable",ee.id===I?"is-active":"",ai?"is-selecting":"",ft?"is-selected-for-delete":"",ai&&!sn?"is-selection-disabled":"",ee.id===Lt?"is-dragging":"",ee.id===De&&ee.id!==Lt?`is-drop-target is-drop-${ot}`:""].filter(Boolean).join(" ");return o.jsxs("button",{type:"button",draggable:!!O&&!ai,className:ua,"aria-pressed":ai?ft:void 0,"aria-keyshortcuts":O?"Alt+ArrowUp Alt+ArrowDown":void 0,onDragStart:Zn=>{O&&(ts.current=!0,An(ee.id),Zn.dataTransfer.effectAllowed="move",Zn.dataTransfer.setData("text/plain",ee.id))},onDragEnter:Zn=>{YE(Zn,ee.id)},onDragOver:Zn=>{!Lt||Lt===ee.id||(Zn.preventDefault(),Zn.dataTransfer.dropEffect="move",YE(Zn,ee.id))},onDragLeave:Zn=>{const Ps=Zn.relatedTarget;Ps instanceof Node&&Zn.currentTarget.contains(Ps)||De===ee.id&&pt("")},onDrop:Zn=>{Zn.preventDefault();const Ps=Zn.dataTransfer.getData("text/plain")||Lt;XE(Ps,ee.id,ot),An(""),pt(""),qn("before")},onDragEnd:()=>{An(""),pt(""),qn("before"),window.setTimeout(()=>{ts.current=!1},0)},onKeyDown:Zn=>{Zn.altKey&&(Zn.key==="ArrowUp"?(Zn.preventDefault(),Ym(ee.id,-1)):Zn.key==="ArrowDown"&&(Zn.preventDefault(),Ym(ee.id,1)))},onClick:Zn=>{if(ai){Zn.preventDefault(),l0(ee);return}if(ts.current){Zn.preventDefault(),ts.current=!1;return}Q(""),H(ee.id),B("basic"),E(ee.id)},children:[ai&&o.jsx("span",{className:`aw-select-marker${ft?" is-checked":""}`,"aria-hidden":"true"}),o.jsxs("span",{className:"aw-agent-copy",children:[o.jsxs("span",{className:"aw-agent-name-row",children:[o.jsx("strong",{children:ee.label}),ee.currentVersion!=null&&o.jsxs("span",{className:"aw-version-badge",children:["v",ee.currentVersion]}),Ye&&o.jsx("span",{className:`aw-draft-badge${Ye.className}`,children:Ye.label})]}),o.jsx("small",{children:ni})]}),o.jsx(bw,{"aria-hidden":!0})]},ee.id)})]})}),o.jsx("div",{className:"aw-list-count",children:A("agentWorkspace.totalCount",{count:P==="library"?e.length+id:Wo.length})})]}),P==="evaluation"&&Ht?o.jsx(B5t,{group:Ht,agents:e,cases:ca,onChange:h1,onRun:eC}):P==="evaluation"?o.jsx("main",{className:"aw-main aw-empty-selection",children:o.jsx("p",{children:A("agentWorkspace.noEvaluationGroupSelected")})}):!ce&&!Un&&!Yn?o.jsx("main",{className:"aw-main aw-empty-selection",children:o.jsx("p",{children:A("agentWorkspace.noAgentSelected")})}):o.jsxs("main",{className:`aw-main${fu?" is-deploying":""}${y?" resource-page":""}`,children:[ce&&!ti&&s&&o.jsx("div",{className:"aw-detail-loading",role:"status","aria-live":"polite",children:o.jsxs("div",{className:"aw-detail-loading-card",children:[o.jsx("span",{className:"loading-gap-spinner","aria-hidden":"true"}),o.jsxs("span",{children:[o.jsx("strong",{children:A("agentWorkspace.loadingAgent")}),o.jsx("small",{children:A("agentWorkspace.loadingAgentDescription")})]})]})}),M==="integrations"&&oe&&o.jsx("div",{className:"aw-detail-loading",role:"status","aria-live":"polite",children:o.jsxs("div",{className:"aw-detail-loading-card",children:[o.jsx("span",{className:"loading-gap-spinner","aria-hidden":"true"}),o.jsxs("span",{children:[o.jsx("strong",{children:A("agentWorkspace.probingIntegration")}),o.jsx("small",{children:A("agentWorkspace.probingIntegrationDescription")})]})]})}),o.jsx(lE,{className:"aw-agent-detail",title:Xe,description:zn.description||A(s||y&&!Ot?"agentWorkspace.loadingAgentInfo":"common.noDescription"),identitySeed:Xe,backLabel:A("agentWorkspace.backToAgentList"),onBack:y?x:void 0,meta:o.jsxs(o.Fragment,{children:[xc!=null&&o.jsxs("span",{className:"aw-agent-meta",children:["v",xc]}),Un&&o.jsx("span",{className:"aw-agent-meta",children:A("myAgents.draft")}),gc&&o.jsx("span",{className:"aw-agent-meta",children:A("agentWorkspace.updatePending")}),!ce&&!Un&&Yn&&o.jsx("span",{className:"aw-agent-meta",children:Yn.label})]}),actionsClassName:"aw-head-actions",bodyClassName:"aw-agent-detail__body",actions:Un||gc||ce!=null&&ce.canDelete?o.jsxs(o.Fragment,{children:[(Un||gc)&&o.jsxs(Ft,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,onClick:()=>{const ee=Un??gc;ee&&Yi(ee)},disabled:hn,"aria-label":A("myAgents.deleteDraft"),title:A("myAgents.deleteDraft"),children:[o.jsx(vm,{"aria-hidden":!0}),o.jsx("span",{children:A("myAgents.deleteDraft")})]}),(ce==null?void 0:ce.canDelete)&&o.jsxs(Ft,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,onClick:()=>void u0(ce),disabled:hn,"aria-label":A("agentWorkspace.deleteAgent"),title:A("agentWorkspace.deleteAgent"),children:[o.jsx(vm,{"aria-hidden":!0}),o.jsx("span",{children:A(hn?"common.deleting":"agentWorkspace.deleteAgent")})]})]}):void 0,sections:Al.map(ee=>{var Ce,Ue,ft,sn;return{key:ee.id,label:ee.label,disabled:fu,content:ee.id===M?o.jsxs(o.Fragment,{children:[Cn&&Ks&&o.jsx("div",{className:`aw-detail-deployment${fu?" is-running":""}`,children:o.jsx(D5t,{task:Cn,onReturnToEdit:ep&&L?()=>L(ep):void 0})}),o.jsxs("div",{className:"aw-content",children:[M==="basic"&&o.jsxs("div",{className:"aw-basic-stack",children:[_e&&o.jsx(kb,{className:"aw-detail-fetch-alert",color:"warning",variant:"soft",title:A("agentWorkspace.partialInfoUnavailable"),description:A("agentWorkspace.upgradeRuntimeForDetails")}),(at&&!_e||je)&&o.jsx(kb,{className:"aw-detail-fetch-alert",color:"danger",variant:"soft",title:A("agentWorkspace.detailLoadFailed"),description:A("agentWorkspace.detailLoadFailedDescription"),actions:o.jsx(Ft,{type:"button",color:"danger",variant:"soft",size:"sm",pill:!1,onClick:()=>ye(Ye=>Ye+1),children:A("common.retry")})}),ce&&Bt&&!Bt.canUpdate&&o.jsxs("div",{className:"aw-update-recovery-notice",role:Bt.recoveryStatus==="preparing"?"status":"alert",children:[o.jsx("strong",{children:Bt.recoveryStatus==="preparing"?A("agentWorkspace.restoringUpdateConfig"):A("agentWorkspace.updateConfigUnavailable")}),Ut&&o.jsx("span",{children:Ut}),Z.map(Ye=>o.jsx("span",{children:Ye},Ye))]}),o.jsxs("section",{className:"aw-deployment-panel aw-settings-card",children:[o.jsx("div",{className:"aw-section-head",children:o.jsxs("div",{children:[o.jsx("h3",{children:A("agentWorkspace.deploymentConfig")}),o.jsx("p",{children:A("agentWorkspace.deploymentConfigDescription")})]})}),o.jsxs("dl",{className:"aw-readonly-config",children:[o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.runtimeStatus")}),o.jsxs("dd",{className:(q==null?void 0:q.status.toLowerCase())==="ready"?"is-ready":void 0,children:[(q==null?void 0:q.status.toLowerCase())==="ready"&&o.jsx("span",{className:"aw-status-dot"}),(q==null?void 0:q.status)||A("agentWorkspace.loading")]})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.deploymentRegion")}),o.jsx("dd",{children:(q==null?void 0:q.region)||(ce==null?void 0:ce.region)||(Cn==null?void 0:Cn.region)||A("agentWorkspace.notAvailable")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.networkAccess")}),o.jsx("dd",{children:q!=null&&q.networkTypes.length?q.networkTypes.join(" / "):A("agentWorkspace.notAvailable")})]})]})]}),o.jsxs("section",{className:"aw-canvas-card",children:[o.jsx("div",{className:"aw-card-head",children:o.jsx("strong",{children:A("agentWorkspace.executionFlow")})}),o.jsx("div",{className:"aw-canvas",children:o.jsx(DS,{draft:zn,direction:"horizontal",selectedPath:[],onSelect:()=>{},onAdd:()=>{},onInsert:()=>{},onDelete:()=>{},readOnly:!0,interactivePreview:!0},sd)})]}),o.jsxs("section",{className:"aw-details-card",children:[o.jsx("div",{className:"aw-card-head",children:o.jsx("strong",{children:A("agentWorkspace.details")})}),o.jsxs("dl",{className:"aw-facts",children:[o.jsxs("div",{children:[o.jsx("dt",{children:A("agentSelector.model")}),o.jsx("dd",{children:yB(ti==null?void 0:ti.model)||zn.modelName||A("agentWorkspace.notAvailable")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.agentCountLabel")}),o.jsx("dd",{children:ti!=null&&ti.graph?cje(ti.graph):uje(zn)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentSelector.tools")}),o.jsx("dd",{className:"aw-fact-badges",children:Qe.length?Qe.map(Ye=>o.jsx("span",{children:Ye},Ye)):A("agentWorkspace.none")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentSelector.skills")}),o.jsx("dd",{className:"aw-fact-badges",children:vn===null?A("agentSelector.previewUnsupported"):vn.length?vn.map(Ye=>o.jsx("span",{children:Ye},Ye)):A("agentWorkspace.none")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("systemInfo.currentVersion")}),o.jsx("dd",{children:xc!=null?`v${xc}`:A("agentWorkspace.notAvailable")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentSelector.status")}),o.jsx("dd",{children:Un?A("myAgents.draft"):(Cn==null?void 0:Cn.status)==="error"?A("agentWorkspace.deploymentFailed"):(Cn==null?void 0:Cn.status)==="cancelled"?A("agentWorkspace.cancelled"):gc?A("agentWorkspace.updatePending"):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"aw-status-dot"}),A("skillCenter.status.available")]})})]})]})]}),o.jsxs("section",{className:"aw-sidecar-panel aw-settings-card","aria-label":A("agentWorkspace.selectedOptimizations"),children:[o.jsx("div",{className:"aw-section-head",children:o.jsxs("div",{children:[o.jsx("h3",{children:A("agentWorkspace.selectedOptimizations")}),o.jsx("p",{children:A("agentWorkspace.selectedOptimizationsDescription")})]})}),o.jsxs("dl",{className:"aw-readonly-config",children:[o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.configurationStatus")}),o.jsx("dd",{className:Xi!=null&&Xi.enabled?"is-ready":void 0,children:Xi?Xi.enabled?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"aw-status-dot"}),A("skillCenter.status.enabled")]}):A("skillCenter.status.inactive"):A("agentWorkspace.notRecorded")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.optimizationProfile")}),o.jsx("dd",{children:Xi?bst(Xi.profile):A("agentWorkspace.legacyConfigMissing")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.selectedOptimizations")}),o.jsx("dd",{className:"aw-fact-badges",children:Xi?Ba.length?Ba.map(Ye=>o.jsx("span",{children:cA(Ye)},Ye)):A("agentWorkspace.noneSelected"):A("agentWorkspace.legacyConfigMissing")})]})]})]})]}),M==="usage"&&(ce==null?void 0:ce.runtimeId)&&o.jsxs("section",{className:"aw-usage","aria-busy":Wn,children:[o.jsx("div",{className:"aw-usage-intro",children:o.jsx("h3",{children:A("agentWorkspace.usageOverview")})}),Wn&&!ms&&o.jsx("div",{className:"aw-usage-state",role:"status","aria-live":"polite",children:o.jsx(Tn,{as:"span",children:A("agentWorkspace.loadingUsage")})}),or&&o.jsxs("div",{className:"aw-usage-state is-error",role:"alert",children:[o.jsx("span",{children:or}),o.jsx("button",{type:"button",onClick:()=>Ma(Ye=>Ye+1),children:A("common.retry")})]}),!Wn&&!or&&!ms&&!Pi&&o.jsx("div",{className:"aw-usage-state",children:A("agentWorkspace.usageUnavailable")}),ms&&o.jsxs(o.Fragment,{children:[o.jsxs("dl",{className:"aw-usage-summary","aria-label":A("agentWorkspace.usageSummary"),children:[o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.totalCalls")}),o.jsx("dd",{children:ms.totalInvocations.toLocaleString(R.resolvedLanguage??R.language)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.userCount")}),o.jsx("dd",{children:ms.totalUsers.toLocaleString(R.resolvedLanguage??R.language)})]})]}),o.jsxs("div",{className:"aw-usage-users-head",children:[o.jsx("h3",{children:A("agentWorkspace.userDetails")}),Wn&&o.jsx(Tn,{as:"span",role:"status","aria-live":"polite",children:A("agentWorkspace.refreshing")})]}),ms.users.length===0?o.jsx("div",{className:"aw-usage-state",children:A("agentWorkspace.noUsage")}):o.jsx("div",{className:"aw-usage-table-wrap",children:o.jsxs("table",{className:"aw-usage-table",children:[o.jsx("caption",{children:A("agentWorkspace.usageUserList")}),o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:A("agentWorkspace.user")}),o.jsx("th",{scope:"col",children:A("agentWorkspace.callCount")}),o.jsx("th",{scope:"col",children:A("agentWorkspace.lastUsed")})]})}),o.jsx("tbody",{children:ms.users.map(Ye=>o.jsxs("tr",{children:[o.jsxs("td",{children:[o.jsx("strong",{children:Ye.displayName||Ye.userId||A("agentWorkspace.unknownUser")}),Ye.displayName&&Ye.userId&&o.jsx("small",{title:Ye.userId,children:Ye.userId})]}),o.jsx("td",{children:Ye.invocationCount.toLocaleString(R.resolvedLanguage??R.language)}),o.jsx("td",{children:o.jsx("time",{dateTime:Ye.lastUsedAt,children:g5t(Ye.lastUsedAt,R.resolvedLanguage??R.language,A)})})]},Ye.userId))})]})}),ms.totalPages>1&&o.jsxs("nav",{className:"aw-usage-pagination","aria-label":A("agentWorkspace.usagePagination"),children:[o.jsx("button",{type:"button",disabled:Wn||ms.page<=1,onClick:()=>El(Ye=>Math.max(1,Ye-1)),children:A("common.previousPage")}),o.jsx("span",{"aria-live":"polite",children:A("agentWorkspace.pageOf",{page:ms.page,total:ms.totalPages})}),o.jsx("button",{type:"button",disabled:Wn||ms.page>=ms.totalPages,onClick:()=>El(Ye=>Ye+1),children:A("common.nextPage")})]})]})]}),M==="versions"&&o.jsxs("section",{className:"aw-version-stack",children:[o.jsxs("div",{className:"aw-integration-intro",children:[o.jsx("h3",{children:A("agentWorkspace.githubVersions")}),o.jsx("p",{children:(Ce=Ee==null?void 0:Ee.cicd)!=null&&Ce.enabled?A("agentWorkspace.githubVersionsDescription"):A("agentWorkspace.currentVersionOnly")})]}),Y&&o.jsx("div",{className:"aw-case-empty",children:A("agentWorkspace.loadingVersions")}),we&&o.jsxs("div",{className:"aw-integration-error",role:"alert",children:[o.jsx("span",{children:we}),(ce==null?void 0:ce.runtimeId)&&o.jsx("button",{type:"button",onClick:()=>void X2(ce.runtimeId??"").then(Le),children:A("common.retry")})]}),!Y&&!we&&o.jsxs("div",{className:"aw-version-list",children:[(Ee==null?void 0:Ee.githubSyncError)&&o.jsx("div",{className:"aw-integration-error",role:"alert",children:o.jsx("span",{children:Ee.githubSyncError})}),(Ee==null?void 0:Ee.latestSourceRuntimeStatus)&&Ee.latestSourceRuntimeStatus!=="published"&&((Ue=Ee.versions[0])==null?void 0:Ue.commitSha)&&Ee.versions[0].commitSha!==Ee.currentCommitSha&&o.jsx("div",{className:"aw-integration-notice",role:"status",children:o.jsxs("span",{children:[A("agentWorkspace.sourceMergedRuntimeStill"),pte(Ee.latestSourceRuntimeStatus,A),A("agentWorkspace.currentProductionVersionHint")]})}),Ee!=null&&Ee.versions.length?Ee.versions.map(Ye=>{var Eo;const ni=Ye.commitSha??"",ua=Ye.runtimeStatus??Ye.status,Zn=Ye.changeType==="rollback",Ps=!!((Eo=Ee.cicd)!=null&&Eo.enabled)&&!!ni&&!Zn&&ni!==Ee.currentCommitSha;return o.jsxs("article",{className:"aw-version-row",children:[o.jsxs("div",{children:[o.jsx("strong",{children:y5t(Ye,A)}),o.jsx("small",{children:Ye.createdAt||A("agentWorkspace.noTime")})]}),o.jsxs("div",{children:[o.jsx("span",{children:A("agentWorkspace.prLink")}),Ye.pullRequestUrl?o.jsx("a",{href:Ye.pullRequestUrl,target:"_blank",rel:"noopener noreferrer",children:A("agentWorkspace.viewPr")}):o.jsx("em",{children:A("agentWorkspace.noPr")})]}),o.jsxs("div",{children:[o.jsx("span",{children:A("agentWorkspace.author")}),o.jsx("em",{children:Ye.author||"Studio"})]}),o.jsxs("div",{children:[o.jsx("span",{children:A("agentWorkspace.publishStatus")}),o.jsx("em",{children:pte(ua,A)})]}),o.jsxs("div",{className:"aw-version-actions",children:[o.jsx("button",{type:"button",disabled:!Ps||Je===ni,onClick:()=>void Oc(Ye),children:A(Je===ni?"agentWorkspace.rollingBack":"agentWorkspace.rollbackToVersion")}),Ye.workflowRunUrl&&o.jsx("a",{href:Ye.workflowRunUrl,target:"_blank",rel:"noopener noreferrer",children:A("agentWorkspace.viewRelease")})]})]},`${Ye.version}-${ni||Ye.createdAt}`)}):o.jsxs("article",{className:"aw-version-row",children:[o.jsxs("div",{children:[o.jsx("strong",{children:xc!=null?`v${xc}`:A("agentWorkspace.noVersion")}),o.jsx("small",{children:(q==null?void 0:q.updatedAt)||A("agentWorkspace.noTime")})]}),o.jsx("p",{children:A("agentWorkspace.currentVersionOnly")})]})]})]}),M==="integrations"&&o.jsxs("div",{className:"aw-integration-stack",children:[o.jsxs("div",{className:"aw-integration-intro",children:[o.jsx("h3",{children:A("agentWorkspace.integrationMethods")}),o.jsx("p",{children:A("agentWorkspace.integrationDescription")})]}),he&&o.jsxs("div",{className:"aw-integration-error",role:"alert",children:[o.jsx("span",{children:he}),o.jsx("button",{type:"button",onClick:()=>se(Ye=>Ye+1),children:A("common.retry")})]}),!he&&o.jsxs("div",{className:"aw-integration-body",children:[o.jsxs("div",{className:`aw-integration-protocol-tabs${de==="a2a"?" is-a2a":""}`,role:"tablist","aria-label":A("agentWorkspace.integrationProtocol"),children:[o.jsx("span",{className:"aw-integration-protocol-slider","aria-hidden":"true"}),oO.map((Ye,ni)=>o.jsx("button",{type:"button",id:`integration-${Ye.id}-tab`,role:"tab","aria-selected":de===Ye.id,"aria-controls":`integration-${Ye.id}-panel`,tabIndex:de===Ye.id?0:-1,onClick:()=>uf(Ye.id),onKeyDown:ua=>{var Eo;if(!["ArrowLeft","ArrowRight","Home","End"].includes(ua.key))return;ua.preventDefault();const Zn=ua.key==="Home"?0:ua.key==="End"?oO.length-1:(ni+(ua.key==="ArrowRight"?1:-1)+oO.length)%oO.length,Ps=oO[Zn];uf(Ps.id),(Eo=document.getElementById(`integration-${Ps.id}-tab`))==null||Eo.focus()},children:Ye.label},Ye.id))]}),de==="api-server"?o.jsx(gte,{protocol:"api-server",title:"API Server",available:Qn,fields:[{label:"Agent",value:Qn?((ft=kr==null?void 0:kr.apiApps)==null?void 0:ft.join("、"))??"":""},{label:A("agentWorkspace.discoveryEndpoint"),value:Qn?Y5(nt,"/list-apps"):""},{label:A("agentWorkspace.invocationEndpoint"),value:Qn?Y5(nt,"/run_sse"):""},{label:A("agentWorkspace.authentication"),value:Qn?hte(q==null?void 0:q.authType,A):""},{label:"API Key",value:o.jsx(mte,{available:Qn,authType:q==null?void 0:q.authType,value:yc,visible:Be&&!!yc,loading:Ie,error:Pe,onToggle:()=>void df()})}],example:Qn?v5t(nt,me,q==null?void 0:q.authType):""}):o.jsx(gte,{protocol:"a2a",title:"A2A",available:Fa,fields:[{label:"Agent",value:((sn=kr==null?void 0:kr.a2a)==null?void 0:sn.name)??""},{label:"Agent Card",value:Fa?Y5(nt,"/.well-known/agent-card.json"):""},{label:A("agentWorkspace.invocationUrl"),value:At},{label:A("agentWorkspace.authentication"),value:Fa?hte(q==null?void 0:q.authType,A):""},{label:"API Key",value:o.jsx(mte,{available:Fa,authType:q==null?void 0:q.authType,value:yc,visible:Be&&!!yc,loading:Ie,error:Pe,onToggle:()=>void df()})}],example:Fa?x5t(At,q==null?void 0:q.authType):""})]})]}),M==="evaluations"&&o.jsxs("section",{className:"aw-cases",children:[(ce==null?void 0:ce.runtimeId)&&o.jsx("div",{className:"aw-case-summary",children:["good","bad"].map(Ye=>{const ni=A5t(sr,Ye),ua=ca.filter(Ps=>Ps.kind===Ye).length,Zn=ao?ua:(ni==null?void 0:ni.itemCount)??ua;return o.jsxs("button",{type:"button",onClick:()=>zr(Ye),children:[o.jsx("strong",{children:Zn}),o.jsx("span",{children:A(Ye==="good"?"agentWorkspace.goodCases":"agentWorkspace.badCases")})]},Ye)})}),o.jsxs("div",{className:"aw-case-filter-bar",children:[o.jsxs("div",{className:"aw-case-filter-stack",children:[o.jsx("div",{className:"aw-case-filters","aria-label":A("agentWorkspace.caseResultFilter"),children:["good","bad"].map(Ye=>o.jsx("button",{type:"button",className:Et===Ye?"is-active":"","aria-pressed":Et===Ye,onClick:()=>_t(Ye),children:A(Ye==="good"?"agentWorkspace.goodCase":"agentWorkspace.badCase")},Ye))}),o.jsx("div",{className:"aw-case-source-filters","aria-label":A("agentWorkspace.feedbackSourceFilter"),children:["auto","user"].map(Ye=>o.jsx("button",{type:"button",className:on===Ye?"is-active":"","aria-pressed":on===Ye,onClick:()=>J(Ye),children:A(Ye==="auto"?"agentWorkspace.automaticFeedback":"agentWorkspace.manualFeedback")},Ye))})]}),o.jsxs("label",{className:"aw-case-search",children:[o.jsx(A_,{"aria-hidden":!0}),o.jsx("input",{type:"search",value:rn,onChange:Ye=>en(Ye.currentTarget.value),placeholder:A("agentWorkspace.searchCasesPlaceholder"),"aria-label":A("agentWorkspace.searchCases")})]})]}),ad&&o.jsx("div",{className:`aw-case-toolbar${be?" is-active":""}`,children:be?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"aw-selection-count",children:A("agentWorkspace.selectedCaseCount",{count:ff.length})}),o.jsx("button",{type:"button",onClick:WI,disabled:hu.length===0||Dn,children:A("agentWorkspace.selectAllVisible")}),o.jsx("button",{type:"button",className:"aw-selection-danger",onClick:()=>void KE(ff),disabled:ff.length===0||Dn,children:A(Dn?"common.deleting":"agentWorkspace.deleteSelected")}),o.jsx("button",{type:"button",onClick:KI,disabled:Dn,children:A("common.cancel")})]}):o.jsx("button",{type:"button",onClick:()=>{Ur(""),We(!0)},disabled:hu.length===0||Dn,children:A("agentWorkspace.selectCases")})}),ui&&o.jsx("div",{className:"aw-delete-error",role:"alert",children:ui}),o.jsx("div",{ref:jr,children:o.jsx(F5t,{cases:hu,loading:Hi&&hu.length===0,error:Sr,notice:js,runtimeBacked:!!(ce!=null&&ce.runtimeId),selectionMode:be,selectedCaseIds:jt,focusedCaseId:La,expandedCaseIds:xs,deleting:Dn,canDelete:ad,onOpenCase:o0,onToggleCase:hf,onToggleExpanded:Vr,onDeleteCase:Ye=>void KE([Ye]),onRetry:()=>Rs(Ye=>Ye+1)})})]}),M==="optimizations"&&o.jsxs("section",{className:"aw-optimizations",children:[o.jsxs("div",{className:"aw-optimization-intro",children:[o.jsx("h3",{children:A("agentWorkspace.optimizations")}),o.jsx("p",{children:A("agentWorkspace.optimizationsDescription")})]}),Nr?o.jsxs("div",{className:"aw-optimization-state",role:"status",children:[o.jsx("span",{className:"loading-gap-spinner","aria-hidden":"true"}),o.jsx("span",{children:A("agentWorkspace.loadingOptimizations")})]}):Pa?o.jsxs("div",{className:"aw-optimization-state is-error",role:"alert",children:[o.jsx("span",{children:Pa}),o.jsx("button",{type:"button",onClick:()=>oa(Ye=>Ye+1),children:A("common.retry")})]}):hs.length>0?o.jsx(L5t,{groups:hs}):o.jsx("div",{className:"aw-optimization-state",children:A("agentWorkspace.noOptimizations")})]})]}),M==="basic"&&(ce||Un)&&o.jsxs("div",{className:"aw-basic-actions",children:[ce&&o.jsxs("button",{type:"button",className:"aw-talk studio-update-action",onClick:()=>C==null?void 0:C(ce),children:[o.jsx(h7e,{"aria-hidden":!0}),o.jsx("span",{children:A("agentWorkspace.chat")})]}),o.jsxs("span",{className:`aw-update-wrap${Mn?" is-disabled":""}`,tabIndex:Mn?0:void 0,"aria-describedby":Mn?xn:void 0,children:[o.jsx("button",{type:"button",className:"aw-update studio-update-action",disabled:!!Mn,"aria-busy":He||void 0,"aria-describedby":Mn?xn:void 0,onClick:()=>Un?L==null?void 0:L(Un):Bt?T(Bt):void 0,children:He?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"loading-gap-spinner aw-update-spinner","aria-hidden":"true"}),o.jsx("span",{children:A("agentWorkspace.preparing")})]}):A(Un||gc?"agentWorkspace.continueEditing":"agentWorkspace.update")}),Mn&&o.jsx("span",{id:xn,className:"aw-update-disabled-reason",role:"tooltip",children:Mn})]})]})]}):null}}),activeSectionKey:M,navigationLabel:A("agentWorkspace.agentDetails"),onSectionChange:B})]})]}),P==="evaluation"&&o.jsx("div",{className:"aw-evaluation-glass",role:"status",children:o.jsx("span",{children:A("agentWorkspace.comingSoon")})})]})]}),yi&&o.jsx(fc,{variant:"danger",title:yi.title,description:yi.description,confirmLabel:hn?A("common.deleting"):yi.confirmLabel,closeLabel:A("agentWorkspace.closeDeleteConfirmation"),busy:hn,onCancel:()=>ci(null),onConfirm:()=>void p1()})]})}function L5t({groups:e}){const{t}=Oe("ui");return o.jsx("div",{className:"aw-optimization-table-wrap",children:o.jsxs("table",{className:"aw-optimization-table",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:t("agentWorkspace.fixPriority")}),o.jsx("th",{scope:"col",children:t("agentWorkspace.suggestedModule")}),o.jsx("th",{scope:"col",children:t("agentWorkspace.suggestionAndReason")})]})}),o.jsx("tbody",{children:e.map(n=>o.jsxs("tr",{children:[o.jsx("td",{children:o.jsx("span",{className:`aw-priority is-${n.priority}`,children:E5t(n.priority,t)})}),o.jsx("td",{children:o.jsx("span",{className:"aw-optimization-module",children:T5t(n,t)})}),o.jsx("td",{children:o.jsx("ul",{className:"aw-optimization-list",children:n.items.map(i=>o.jsxs("li",{children:[o.jsx("strong",{children:i.suggestion}),o.jsx("p",{children:i.reason})]},`${i.suggestion}:${i.reason}`))})})]},`${n.priority}:${n.module}:${n.customModule??""}`))})]})})}function $5t(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("path",{d:"M4.5 7h15"}),o.jsx("path",{d:"M9 7V4.8h6V7"}),o.jsx("path",{d:"m6.5 7 .8 12h9.4l.8-12"}),o.jsx("path",{d:"M10 10.5v5M14 10.5v5"})]})}function F5t({cases:e,loading:t=!1,error:n="",notice:i="",runtimeBacked:r=!1,selectionMode:s=!1,selectedCaseIds:a,focusedCaseId:l="",expandedCaseIds:c,deleting:u=!1,canDelete:d=!1,onOpenCase:f,onToggleCase:h,onToggleExpanded:p,onDeleteCase:g,onRetry:b}){const{t:v,i18n:y}=Oe("ui");return o.jsxs("div",{className:"aw-case-table",children:[o.jsxs("div",{className:"aw-case-row aw-case-row-head",children:[o.jsx("span",{children:v("agentWorkspace.userInput")}),o.jsx("span",{children:v("agentWorkspace.agentOutput")}),o.jsx("span",{children:v("agentWorkspace.score")}),o.jsx("span",{children:v("agentWorkspace.scoreReason")}),o.jsx("span",{className:"aw-case-action-head",children:v("skillCenter.actions")})]}),t?o.jsx("div",{className:"aw-case-empty",children:v("agentWorkspace.loadingEvaluationSet")}):n?o.jsxs("div",{className:"aw-case-empty aw-case-error",children:[o.jsx("span",{children:n}),b&&o.jsx("button",{type:"button",onClick:b,children:v("common.retry")})]}):i?o.jsx("div",{className:"aw-case-empty",children:i}):e.length===0?o.jsx("div",{className:"aw-case-empty",children:v(r?"agentWorkspace.noFeedbackCases":"agentWorkspace.noMatchingCases")}):e.map(x=>{var _,j;const w=x.id.startsWith("local:"),O=(a==null?void 0:a.has(x.id))??!1,k=(c==null?void 0:c.has(x.id))??!1,E=x.output.length+x.referenceOutput.length>220||(((_=x.reason)==null?void 0:_.length)??0)>120,C=d&&!w,N=!!(x.comment&&x.comment.trim()!==((j=x.reason)==null?void 0:j.trim()));return o.jsxs("div",{className:["aw-case-row",l===x.id?"is-focused":"",s?"is-selecting":"",O?"is-selected-for-delete":""].filter(Boolean).join(" "),role:"row",tabIndex:0,"aria-selected":s?O:void 0,onClick:()=>{if(s){C&&(h==null||h(x));return}f==null||f(x)},onKeyDown:T=>{T.target===T.currentTarget&&(T.key!=="Enter"&&T.key!==" "||(T.preventDefault(),s?C&&(h==null||h(x)):f==null||f(x)))},children:[o.jsxs("div",{className:"aw-case-text aw-case-cell","data-label":v("agentWorkspace.userInput"),children:[o.jsxs("span",{className:"aw-case-title-line",children:[s&&C&&o.jsx("span",{className:`aw-select-marker${O?" is-checked":""}`,"aria-hidden":"true"}),o.jsx("strong",{title:x.input,children:x.input||v("agentWorkspace.noUserInput")})]}),N&&o.jsxs("small",{title:x.comment,children:[v("agentWorkspace.note"),x.comment]}),o.jsx("small",{className:"aw-case-time",children:S5t(x.createdAt,y.resolvedLanguage??y.language,v)}),(x.userId||x.sessionId)&&o.jsx("small",{title:[x.userId,x.sessionId].filter(Boolean).join(" · "),children:[x.userId,x.sessionId].filter(Boolean).join(" · ")})]}),o.jsxs("div",{className:`aw-case-output aw-case-cell${k?" is-expanded":""}`,"data-label":v("agentWorkspace.agentOutput"),children:[o.jsx("p",{className:"aw-case-output-preview",title:x.output,children:x.output||v("agentWorkspace.noVisibleResponse")}),x.referenceOutput&&o.jsxs("small",{className:"aw-case-output-preview",title:x.referenceOutput,children:[v("agentWorkspace.reference"),": ",x.referenceOutput]}),E&&o.jsx("button",{type:"button",className:"aw-case-expand",onClick:T=>{T.stopPropagation(),p==null||p(x.id)},children:v(k?"common.collapse":"common.expand")})]}),o.jsx("div",{className:"aw-case-score aw-case-cell","data-label":v("agentWorkspace.score"),children:k5t(x,v)}),o.jsx("div",{className:`aw-case-reason aw-case-cell${k?" is-expanded":""}`,"data-label":v("agentWorkspace.scoreReason"),children:o.jsx("p",{title:x.reason||void 0,children:x.reason||"—"})}),o.jsx("div",{className:"aw-case-actions aw-case-cell","data-label":v("skillCenter.actions"),children:C&&o.jsx("button",{type:"button",className:"aw-case-delete",onClick:T=>{T.stopPropagation(),g==null||g(x)},disabled:u,title:v("agentWorkspace.deleteFeedbackCase"),"aria-label":v("agentWorkspace.deleteFeedbackCase"),children:o.jsx($5t,{})})})]},x.id)})]})}function B5t({group:e,agents:t,cases:n,onChange:i,onRun:r}){const{t:s}=Oe("ui"),[a,l]=m.useState("config"),c=e.agentIds.map(h=>t.find(p=>p.id===h)).filter(h=>!!h),u=["回答质量","事实准确性","工具调用","响应效率"];m.useEffect(()=>l("config"),[e.id]);const d=h=>{i({...e,agentIds:e.agentIds.includes(h)?e.agentIds.filter(p=>p!==h):[...e.agentIds,h]})},f=h=>{i({...e,metrics:e.metrics.includes(h)?e.metrics.filter(p=>p!==h):[...e.metrics,h]})};return o.jsxs("main",{className:"aw-main",children:[o.jsxs("div",{className:"aw-eval-head",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"aw-agent-title-row",children:[o.jsx("h2",{children:WO(e.name,s)}),o.jsx("span",{children:s("agentWorkspace.evaluationGroup")})]}),o.jsx("p",{children:s("agentWorkspace.evaluationGroupStats",{agents:c.length,caseSet:WO(e.caseSet,s),runs:e.history.length})})]}),o.jsxs("button",{type:"button",className:"aw-run",onClick:()=>r(e),disabled:!0,children:[o.jsx(a7e,{"aria-hidden":!0}),s("agentWorkspace.startEvaluation")]})]}),o.jsxs("nav",{className:"aw-agent-tabs","aria-label":s("agentWorkspace.evaluationGroupDetails"),children:[o.jsx("button",{type:"button",className:a==="config"?"is-active":"","aria-pressed":a==="config",onClick:()=>l("config"),disabled:!0,children:s("agentWorkspace.evaluationConfig")}),o.jsx("button",{type:"button",className:a==="history"?"is-active":"","aria-pressed":a==="history",onClick:()=>l("history"),disabled:!0,children:s("agentWorkspace.historyResults")})]}),o.jsx("div",{className:"aw-content",children:a==="config"?o.jsxs("div",{className:"aw-eval-setup",children:[o.jsxs("section",{className:"aw-eval-block",children:[o.jsxs("div",{className:"aw-card-head",children:[o.jsx("strong",{children:s("agentWorkspace.participatingAgents")}),o.jsx("span",{children:s("agentWorkspace.selectedCount",{count:c.length})})]}),o.jsx("div",{className:"aw-eval-agent-grid",children:t.map(h=>o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:e.agentIds.includes(h.id),onChange:()=>d(h.id)}),o.jsxs("span",{children:[o.jsx("strong",{children:h.label}),o.jsx("small",{children:h.remote?s("agentWorkspace.remote"):s("agentWorkspace.local")})]})]},h.id))})]}),o.jsxs("div",{className:"aw-eval-setting-grid",children:[o.jsxs("section",{className:"aw-eval-block",children:[o.jsx("div",{className:"aw-card-head",children:o.jsx("strong",{children:s("agentWorkspace.evaluationResources")})}),o.jsxs("div",{className:"aw-eval-fields",children:[o.jsxs("label",{children:[o.jsx("span",{children:s("agentWorkspace.evaluationSet")}),o.jsxs("select",{value:e.caseSet,onChange:h=>i({...e,caseSet:h.currentTarget.value}),children:[o.jsx("option",{value:"核心回归集",children:s("agentWorkspace.evaluationDefaults.coreSet")}),o.jsx("option",{value:"安全边界集",children:s("agentWorkspace.evaluationDefaults.safetySet")}),o.jsx("option",{value:"工具调用集",children:s("agentWorkspace.evaluationDefaults.toolSet")})]}),o.jsx("small",{children:s("agentWorkspace.caseCount",{count:n.length})})]}),o.jsxs("label",{children:[o.jsx("span",{children:s("agentWorkspace.evaluator")}),o.jsxs("select",{value:e.evaluator,onChange:h=>i({...e,evaluator:h.currentTarget.value}),children:[o.jsx("option",{value:"综合质量评估器",children:s("agentWorkspace.evaluationDefaults.qualityEvaluator")}),o.jsx("option",{value:"事实一致性评估器",children:s("agentWorkspace.evaluationDefaults.factualEvaluator")}),o.jsx("option",{value:"工具调用评估器",children:s("agentWorkspace.evaluationDefaults.toolEvaluator")})]})]}),o.jsxs("label",{children:[o.jsx("span",{children:s("agentWorkspace.concurrency")}),o.jsxs("select",{value:e.concurrency,onChange:h=>i({...e,concurrency:h.currentTarget.value}),children:[o.jsx("option",{value:"2",children:"2"}),o.jsx("option",{value:"4",children:"4"}),o.jsx("option",{value:"8",children:"8"})]})]})]})]}),o.jsxs("section",{className:"aw-eval-block",children:[o.jsxs("div",{className:"aw-card-head",children:[o.jsx("strong",{children:s("agentWorkspace.evaluationMetrics")}),o.jsx("span",{children:s("agentWorkspace.selectedMetricCount",{count:e.metrics.length})})]}),o.jsx("div",{className:"aw-metric-list",children:u.map(h=>o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:e.metrics.includes(h),onChange:()=>f(h)}),o.jsx("span",{children:WO(h,s)})]},h))})]})]})]}):o.jsxs("section",{className:"aw-eval-history",children:[o.jsx("div",{className:"aw-section-head",children:o.jsxs("div",{children:[o.jsx("h3",{children:s("agentWorkspace.historyResults")}),o.jsx("p",{children:s("agentWorkspace.historyDescription")})]})}),e.history.length===0?o.jsxs("div",{className:"aw-results-empty",children:[o.jsx("strong",{children:s("agentWorkspace.noHistory")}),o.jsx("span",{children:s("agentWorkspace.noHistoryDescription")})]}):o.jsx("div",{className:"aw-history-list",children:e.history.map((h,p)=>o.jsxs("button",{type:"button",children:[o.jsxs("span",{children:[o.jsx("strong",{children:s("agentWorkspace.evaluationRun",{index:e.history.length-p})}),o.jsx("small",{children:s("agentWorkspace.evaluationRunMeta",{time:WO(h.createdAt,s),agents:c.length})})]}),o.jsxs("span",{className:"aw-history-score",children:[o.jsx("strong",{children:h.score}),o.jsx("small",{children:s("agentWorkspace.overallScore")})]}),o.jsxs("span",{className:"aw-complete",children:[o.jsx(Hu,{}),s("agentWorkspace.completed")]}),o.jsx(bw,{"aria-hidden":!0})]},h.id))})]})})]})}const U5t=5e3,Q5t=4;let Z5=0;const yte=[];function vte(e){return e instanceof Error&&e.name==="AbortError"}function z5t(e){return e instanceof Error&&e.name==="TimeoutError"}function V5t(e){return z5t(e)||e instanceof XF&&[500,502,503,504].includes(e.status)}function H5t(e,t){return t!=null&&t.aborted?Promise.reject(t.reason??new DOMException("Request aborted","AbortError")):new Promise((n,i)=>{const r=()=>{globalThis.clearTimeout(s),i((t==null?void 0:t.reason)??new DOMException("Request aborted","AbortError"))},s=globalThis.setTimeout(()=>{t==null||t.removeEventListener("abort",r),n()},e);t==null||t.addEventListener("abort",r,{once:!0})})}async function q5t(e={},t={}){const n=t.request??_x,i=t.wait??H5t;try{return await n(e)}catch(r){if(!V5t(r))throw r;return await i(U5t,e.signal),n(e)}}async function pje(e){var t;Z5>=Q5t&&await new Promise(n=>yte.push(n)),Z5+=1;try{return await e()}finally{Z5-=1,(t=yte.shift())==null||t()}}async function W5t(e,t){await Promise.allSettled(e.map(n=>pje(()=>t(n))))}const K5t="/web/sandbox/sessions",xte="/web/sandbox/codex-project-handoff",Ote=3e4,J5=33e4,G5t=6e4,X5t=6e5,lO=15e3,Ff=6e4,Y5t=33e4,wte=3e4,Z5t=60*60,Ste=40;function zQ(e){switch(e.trim().toLowerCase()){case"ready":return V("sandbox.status.ready");case"wakeable":return V("sandbox.status.wakeable");case"creating":return V("sandbox.status.creating");case"starting":case"initializing":return V("sandbox.status.starting");case"pending":return V("sandbox.status.pending");case"running":return V("sandbox.status.running");case"failed":case"error":return V("sandbox.status.failed");case"stopped":return V("sandbox.status.stopped");case"expired":return V("sandbox.status.expired");case"deleting":return V("sandbox.status.deleting");case"deleted":return V("sandbox.status.deleted");default:return V("sandbox.status.unknown")}}function ss(e){const t=qu(e);return t.has("Accept")||t.set("Accept","application/json"),t}class RI extends Error{constructor(n,i={}){var r;super(n);Mi(this,"code");Mi(this,"retryable");Mi(this,"publicMessage");Mi(this,"httpStatus");this.name="SandboxServiceError",this.code=i.code??"",this.retryable=i.retryable===!0,this.publicMessage=((r=i.publicMessage)==null?void 0:r.trim())||n,this.httpStatus=i.httpStatus}}function kte(e){return e instanceof RI?e.publicMessage:e instanceof Error&&e.name==="TimeoutError"?V("sandbox.developmentTimeout"):e instanceof TypeError?V("sandbox.developmentDisconnected"):V("sandbox.developmentFailed")}async function as(e,t){const n=await e.text().catch(()=>"");let i={};try{i=JSON.parse(n)}catch{const d=V("common.fallbackWithHttpStatus",{fallback:t,status:e.status});return new Error(n?V("common.fallbackWithDetail",{fallback:d,detail:n}):d)}const r=i.detail,s=r&&typeof r=="object"?r:i,a=r&&typeof r=="object"&&"message"in r?r.message:r??i.error??i.message,l=typeof a=="string"?a:a==null?"":JSON.stringify(a),c=V("common.fallbackWithHttpStatus",{fallback:t,status:e.status}),u=l?V("common.fallbackWithDetail",{fallback:c,detail:l}):c;return new RI(u,{code:typeof s.code=="string"?s.code:"",retryable:s.retryable===!0,publicMessage:l||c,httpStatus:e.status})}async function Ete(e,t){const n=await e.text().catch(()=>"");try{return JSON.parse(n)}catch{throw new Error(V("sandbox.invalidStudioResponse",{fallback:t}))}}function ug(e,t="codex"){if(!e.sessionId||!e.status)throw new Error(V("sandbox.invalidSession"));return{resourceType:"session",id:e.sessionId,toolName:t,userSessionId:e.userSessionId??"",displayName:e.displayName??"",status:e.status,createdAt:e.createdAt??"",expireAt:e.expireAt??"",persistent:e.persistent!==!1,toolType:e.toolType??"",intelligentDevelopment:e.toolName==="intelligent-development",createdBy:e.createdBy??"",region:e.region??"",isMine:e.isMine===!0,threadId:e.threadId??"",cwd:e.cwd??"",workspaceLocked:e.workspaceLocked===!0,busy:e.busy===!0,...typeof e.model=="string"?{model:e.model}:{},permissions:II(e.permissions),...e.conversation===void 0?{}:{restoredConversation:Tg(e.conversation)}}}function Cte(e,t="codex"){if(!e.snapshotId||!e.status)throw new Error(V("sandbox.invalidSnapshot"));return{resourceType:"snapshot",id:e.snapshotId,snapshotId:e.snapshotId,sourceSessionId:e.sessionId??"",toolName:t,userSessionId:e.userSessionId??"",displayName:e.displayName??"",status:e.status,snapshotStatus:e.snapshotStatus??"Unknown",reason:e.reason??"",createdAt:e.createdAt??"",createdBy:e.createdBy??"",region:e.region??"",isMine:e.isMine===!0}}function Tte(e,t){if(!(t!=null&&t.autoResumeSnapshots))return e;const n=new URLSearchParams({autoResumeSnapshots:"true"});return`${e}?${n.toString()}`}const cO={approvalPolicy:"on-request",approvalsReviewer:"user",sandboxMode:"workspace-write",networkAccess:!1};function II(e){if(!e||typeof e!="object")return{...cO};const t=e,n=t.approvalPolicy,i=t.approvalsReviewer,r=t.sandboxMode;return{approvalPolicy:n==="untrusted"||n==="on-request"||n==="never"?n:cO.approvalPolicy,approvalsReviewer:i==="user"||i==="auto_review"?i:cO.approvalsReviewer,sandboxMode:r==="read-only"||r==="workspace-write"||r==="danger-full-access"?r:cO.sandboxMode,networkAccess:typeof t.networkAccess=="boolean"?t.networkAccess:cO.networkAccess}}function Ate(e){if(!e||typeof e!="object")throw new Error(V("sandbox.invalidSettings"));const t=e;return{threadId:typeof t.threadId=="string"?t.threadId:"",cwd:typeof t.cwd=="string"?t.cwd:"",...typeof t.model=="string"?{model:t.model}:{},workspaceLocked:t.workspaceLocked===!0,busy:t.busy===!0,permissions:II(t.permissions)}}function wa(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function J5t(e){const t=wa(e);if(!(!t||typeof t.id!="string"||!t.id))return{id:t.id,displayName:typeof t.displayName=="string"?t.displayName:t.id,description:typeof t.description=="string"?t.description:"",isDefault:t.isDefault===!0}}function eLt(e){const t=wa(e);if(!(!t||typeof t.id!="string"||!t.id||typeof t.name!="string"||!t.name))return{id:t.id,name:t.name,description:typeof t.description=="string"?t.description:""}}function mje(e){const t=wa(e);if(!(!t||typeof t.id!="string"||!t.id))return{id:t.id,...typeof t.name=="string"&&t.name?{name:t.name}:{},preview:typeof t.preview=="string"?t.preview:"",cwd:typeof t.cwd=="string"?t.cwd:"",modelProvider:typeof t.modelProvider=="string"?t.modelProvider:"",createdAt:typeof t.createdAt=="number"&&Number.isFinite(t.createdAt)?t.createdAt:0,updatedAt:typeof t.updatedAt=="number"&&Number.isFinite(t.updatedAt)?t.updatedAt:0,status:typeof t.status=="string"?t.status:"unknown"}}function Tg(e){const t=wa(e),n=mje(t==null?void 0:t.thread);if(!t||!n||typeof t.threadId!="string"||!Array.isArray(t.messages))throw new Error(V("sandbox.invalidThreadSnapshot"));const i=t.messages.flatMap(r=>{const s=wa(r);if(!s||typeof s.id!="string"||s.role!=="user"&&s.role!=="assistant"||typeof s.content!="string"||typeof s.timestamp!="number")return[];const a=Array.isArray(s.skillNames)?s.skillNames.filter(c=>typeof c=="string"&&!!c):[],l=Array.isArray(s.images)?s.images.flatMap(c=>{const u=wa(c);return!u||typeof u.mimeType!="string"||!u.mimeType.startsWith("image/")||typeof u.data!="string"||!u.data?[]:[{mimeType:u.mimeType,data:u.data,...typeof u.name=="string"&&u.name?{name:u.name}:{},...typeof u.alt=="string"&&u.alt?{alt:u.alt}:{}}]}):[];return[{id:s.id,role:s.role,content:s.content,timestamp:s.timestamp,...a.length?{skillNames:a}:{},...l.length?{images:l}:{}}]});return{thread:n,threadId:t.threadId,messages:i,...typeof t.model=="string"?{model:t.model}:{},...typeof t.cwd=="string"?{cwd:t.cwd}:{},workspaceLocked:t.workspaceLocked===!0,permissions:II(t.permissions)}}function p8(e){if(!e||typeof e!="object")return;const t=e;if(![t.totalTokens,t.inputTokens,t.cachedInputTokens,t.outputTokens,t.reasoningOutputTokens].some(i=>typeof i!="number"||!Number.isFinite(i)||i<0))return{totalTokens:Math.trunc(t.totalTokens),inputTokens:Math.trunc(t.inputTokens),cachedInputTokens:Math.trunc(t.cachedInputTokens),outputTokens:Math.trunc(t.outputTokens),reasoningOutputTokens:Math.trunc(t.reasoningOutputTokens)}}function tLt(e){const t=p8(e.usage);if(!t||typeof e.turnId!="string")return;const n=p8(e.threadTotal),i=e.modelContextWindow;return{turnId:e.turnId,usage:t,...n?{threadTotal:n}:{},...typeof i=="number"&&Number.isFinite(i)&&i>=0?{modelContextWindow:Math.trunc(i)}:{}}}function nLt(e){return typeof e.id!="string"||e.kind!=="command"&&e.kind!=="file"||typeof e.method!="string"?null:{id:e.id,kind:e.kind,method:e.method,...typeof e.reason=="string"?{reason:e.reason}:{},...typeof e.command=="string"?{command:e.command}:{},...typeof e.cwd=="string"?{cwd:e.cwd}:{},...typeof e.grantRoot=="string"?{grantRoot:e.grantRoot}:{},...e.changes!==void 0?{changes:e.changes}:{},...typeof e.threadId=="string"?{threadId:e.threadId}:{},...typeof e.turnId=="string"?{turnId:e.turnId}:{},...typeof e.itemId=="string"?{itemId:e.itemId}:{}}}async function iLt(e,t={}){if(!e.body)throw new Error(V("sandbox.emptyConversationResponse"));const n=e.body.getReader(),i=new TextDecoder;let r="",s="";const a=[],l=new Map;let c,u;function d(){var b;const g=c?[...a,c]:a;(b=t.onBlocks)==null||b.call(t,g.map(v=>({...v})))}function f(g){s+=g;const b=a[a.length-1],v=a.length-1,y=[...l.values()].includes(v);(b==null?void 0:b.kind)==="text"&&!y?b.text+=g:a.push({kind:"text",text:g}),d()}function h(g){if(typeof g.id!="string"||g.kind!=="thinking"&&g.kind!=="commentary"&&g.kind!=="tool"||g.status!=="running"&&g.status!=="done")return;const b=g.status==="done";let v;if(g.kind==="thinking"){if(typeof g.text!="string"||!g.text)return;v={kind:"thinking",text:g.text,done:b}}else if(g.kind==="commentary"){if(typeof g.text!="string"||!g.text)return;v={kind:"text",text:g.text}}else{if(typeof g.name!="string"||!g.name)return;v={kind:"tool",name:g.name,args:g.args,response:g.response,done:b}}const y=l.get(g.id);y===void 0?(l.set(g.id,a.length),a.push(v)):a[y]=v,d()}function p(g){var x,w,O;let b="message";const v=[];for(const k of g.split(/\r?\n/))k.startsWith("event:")&&(b=k.slice(6).trim()),k.startsWith("data:")&&v.push(k.slice(5).trimStart());if(v.length===0)return;let y;try{y=JSON.parse(v.join(` -`))}catch{throw new Error(V("sandbox.invalidConversationResponse"))}if(b==="error"){const k=typeof y.message=="string"&&y.message?y.message:V("sandbox.conversationFailed");throw new RI(k,{code:typeof y.code=="string"?y.code:"",retryable:y.retryable===!0,publicMessage:k})}if(b==="progress"&&typeof y.text=="string"&&y.text&&(c={kind:"progress",text:y.text},d()),b==="activity"&&h(y),b==="development.source_ready"||b==="development.succeeded"){const k=wa(y.payload),S=wa(k==null?void 0:k.delivery),E=b==="development.succeeded";if(S&&typeof S.sessionId=="string"&&typeof S.artifactSha256=="string"&&typeof S.validationReportSha256=="string"&&typeof S.agentName=="string"&&typeof S.entryPoint=="string"&&typeof S.fileCount=="number"&&typeof S.artifactSize=="number"&&typeof S.validatedAt=="string"&&S.deployable===!0&&S.verified===E&&typeof S.validationSummary=="string"&&Array.isArray(S.gateSummary)&&S.gateSummary.every(C=>typeof C=="string")){const C={kind:"delivery",value:{sessionId:S.sessionId,...typeof S.projectId=="string"&&typeof S.versionId=="string"?{projectId:S.projectId,versionId:S.versionId,...S.parentVersionId===null||typeof S.parentVersionId=="string"?{parentVersionId:S.parentVersionId}:{}}:{},artifactSha256:S.artifactSha256,validationReportSha256:S.validationReportSha256,agentName:S.agentName,entryPoint:S.entryPoint,fileCount:S.fileCount,artifactSize:S.artifactSize,validatedAt:S.validatedAt,gateSummary:S.gateSummary,deployable:S.deployable,verified:S.verified,validationSummary:S.validationSummary}},N=a.findIndex(_=>_.kind==="delivery"&&_.value.sessionId===S.sessionId&&_.value.artifactSha256===S.artifactSha256&&_.value.validationReportSha256===S.validationReportSha256);N===-1?a.push(C):a[N]=C,d()}}if(b==="approval"){const k=nLt(y);k&&((x=t.onApproval)==null||x.call(t,k))}if(b==="usage"){const k=tLt(y);k&&(u=k,(w=t.onUsage)==null||w.call(t,k))}b==="approval_resolved"&&typeof y.approvalId=="string"&&((O=t.onApprovalResolved)==null||O.call(t,y.approvalId)),b==="delta"&&typeof y.text=="string"&&f(y.text),b==="done"&&!s&&typeof y.text=="string"&&f(y.text),b==="done"&&c&&(c=void 0,d())}for(;;){const{done:g,value:b}=await n.read();r+=i.decode(b,{stream:!g});const v=r.split(/\r?\n\r?\n/);if(r=v.pop()??"",v.forEach(p),g)break}if(r.trim()&&p(r),c&&(c=void 0,d()),a.length===0)throw new Error(V("sandbox.emptyReply"));return{text:s,blocks:a,...u?{usage:u}:{}}}async function Ll(e,t,n,{method:i="GET",body:r,options:s={},fallback:a}){if(!t)throw new Error(V("sandbox.missingSession"));const l=await $n(`${e}/${encodeURIComponent(t)}/${n}`,{method:i,headers:ss(r===void 0?void 0:{"Content-Type":"application/json"}),...r===void 0?{}:{body:JSON.stringify(r)},signal:s.signal},Ff);if(!l.ok)throw await as(l,a);return l.json()}function gje(e,t={}){return{async listSessions(n={}){const i=await $n(Tte(e,n),{method:"GET",headers:ss(),signal:n.signal},Ote);if(!i.ok)throw await as(i,V("sandbox.listCodexFailed"));const r=await i.json();if(!Array.isArray(r.sessions))throw new Error(V("sandbox.invalidSessionList"));if(r.snapshots!==void 0&&!Array.isArray(r.snapshots))throw new Error(V("sandbox.invalidSnapshotList"));return[...r.sessions.map(s=>ug(s)),...(r.snapshots??[]).map(s=>Cte(s))]},async startSession(n={}){var r,s;const i=await $n(e,{method:"POST",headers:ss({"Content-Type":"application/json"}),body:JSON.stringify({displayName:((r=n.displayName)==null?void 0:r.trim())??"",...(s=n.modelId)!=null&&s.trim()?{modelId:n.modelId.trim()}:{},...t.textOnly&&n.projectId?{projectId:n.projectId,...n.baseVersionId?{baseVersionId:n.baseVersionId}:{}}:{},...t.textOnly?{}:{persistent:n.persistent??!0},...n.diskGb!==void 0?{diskGb:n.diskGb}:{}}),signal:n.signal},J5);if(!i.ok)throw await as(i,V("sandbox.startFailed"));return ug(await i.json())},async listAgentSessions(n,i={}){const r=await $n(Tte(`/web/${n}/sessions`,i),{method:"GET",headers:ss(),signal:i.signal},Ote);if(!r.ok)throw await as(r,V("sandbox.listAgentFailed",{kind:n}));const s=await r.json();if(!Array.isArray(s.sessions))throw new Error(V("sandbox.invalidKindSessionList",{kind:n}));if(s.snapshots!==void 0&&!Array.isArray(s.snapshots))throw new Error(V("sandbox.invalidKindSnapshotList",{kind:n}));return[...s.sessions.map(a=>ug(a,n)),...(s.snapshots??[]).map(a=>Cte(a,n))]},async startAgentSession(n,i={}){var s;const r=await $n(`/web/${n}/sessions`,{method:"POST",headers:ss({"Content-Type":"application/json"}),body:JSON.stringify({displayName:((s=i.displayName)==null?void 0:s.trim())??"",persistent:i.persistent??!0,...i.diskGb!==void 0?{diskGb:i.diskGb}:{}}),signal:i.signal},J5);if(!r.ok)throw await as(r,V("sandbox.createAgentFailed",{kind:n}));return ug(await r.json(),n)},async openAgentSession(n,i,r={}){if(!i)throw new Error(V("sandbox.missingSessionToOpen"));const s=await $n(`/web/${n}/sessions/${encodeURIComponent(i)}/open`,{method:"POST",headers:ss(),signal:r.signal},Ff);if(!s.ok)throw await as(s,V("sandbox.openAgentFailed",{kind:n}));const a=await s.json();if(typeof a.webuiUrl!="string"||!a.webuiUrl.startsWith("/"))throw new Error(V("sandbox.invalidAgentHomeUrl",{kind:n}));return{session:ug(a,n),kind:n,webuiUrl:$o(a.webuiUrl)}},async launchAgentTerminal(n,i,r={}){if(!i)throw new Error(V("sandbox.missingSessionForTerminal"));const s=await $n(`/web/${n}/sessions/${encodeURIComponent(i)}/terminal`,{method:"POST",headers:ss(),signal:r.signal},Ff);if(!s.ok)throw await as(s,V("sandbox.openTerminalFailed",{kind:n}));const a=await s.json();return{url:bje(a.url,`${n} Terminal`),...typeof a.shellSessionId=="string"?{shellSessionId:a.shellSessionId}:{}}},async deleteAgentSession(n,i,r={}){if(!i)return;const s=await $n(`/web/${n}/sessions/${encodeURIComponent(i)}`,{method:"DELETE",headers:ss(),signal:r.signal},lO);if(!s.ok&&s.status!==404)throw await as(s,V("sandbox.deleteAgentFailed",{kind:n}))},async resumeSnapshot(n,i,r={}){if(!i)throw new Error(V("sandbox.missingSnapshot"));const s=n==="codex"?"/web/sandbox":`/web/${n}`,a=await $n(`${s}/snapshots/${encodeURIComponent(i)}/resume`,{method:"POST",headers:ss(),signal:r.signal},J5);if(!a.ok)throw await as(a,V("sandbox.resumeSnapshotFailed"));return ug(await a.json(),n)},async deleteSnapshot(n,i,r={}){if(!i)return;const s=n==="codex"?"/web/sandbox":`/web/${n}`,a=await $n(`${s}/snapshots/${encodeURIComponent(i)}`,{method:"DELETE",headers:ss(),signal:r.signal},lO);if(!a.ok&&a.status!==404)throw await as(a,V("sandbox.deleteSnapshotFailed"))},async connectSession(n,i={}){if(!n)throw new Error(V("sandbox.missingSessionToConnect"));const r=await $n(`${e}/${encodeURIComponent(n)}/connect`,{method:"POST",headers:ss({"Content-Type":"application/json"}),signal:i.signal},G5t);if(!r.ok)throw await as(r,V("sandbox.connectCodexFailed"));const s=ug(await r.json());if(s.status.toLowerCase()!=="ready")throw new Error(V("sandbox.sessionNotReady",{status:s.status}));return s},async sendMessage(n,i={}){var s;if(!n.sessionId||!n.text.trim())throw new Error(V("sandbox.invalidMessage"));const r=await $n(`${e}/${encodeURIComponent(n.sessionId)}/messages`,{method:"POST",headers:ss({Accept:"text/event-stream","Content-Type":"application/json"}),body:JSON.stringify({message:n.text,...!t.textOnly&&((s=n.skillIds)!=null&&s.length)?{skillIds:n.skillIds}:{}}),signal:i.signal},t.messageTimeoutMs??X5t);if(!r.ok)throw await as(r,V("sandbox.conversationFailed"));return iLt(r,i)},async interruptSession(n,i={}){if(!n)return;const r=await $n(`${e}/${encodeURIComponent(n)}/interrupt`,{method:"POST",headers:ss(),signal:i.signal},t.interruptTimeoutMs??lO);if(!r.ok&&![404,409].includes(r.status))throw await as(r,V("sandbox.interruptFailed"))},async getStatus(n,i={}){const r=await Ll(e,n,"status",{options:i,fallback:V("sandbox.getStatusFailed")}),s=Ate(r),a=wa(r),l=p8(a==null?void 0:a.threadTotal),c=a==null?void 0:a.modelContextWindow;return{...s,...l?{threadTotal:l}:{},...typeof c=="number"&&Number.isFinite(c)&&c>=0?{modelContextWindow:Math.trunc(c)}:{}}},async getEndpoint(n,i={}){const r=wa(await Ll(e,n,"endpoint",{options:i,fallback:V("sandbox.getEndpointFailed")}));if(typeof(r==null?void 0:r.endpoint)!="string"||!r.endpoint.trim())throw new Error(V("sandbox.invalidEndpoint"));return{endpoint:r.endpoint,sessionId:typeof r.sessionId=="string"?r.sessionId:n,...typeof r.expireAt=="string"?{expireAt:r.expireAt}:{}}},async createCodexProjectHandoffPairing(n={}){const i=await $n(`${xte}/pairings`,{method:"POST",headers:ss({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify({ttlSeconds:Z5t}),signal:n.signal},wte);if(!i.ok)throw await as(i,V("sandbox.createHandoffPairingFailed"));const r=wa(await Ete(i,V("sandbox.createHandoffPairingFailed")));if(typeof(r==null?void 0:r.pairingCode)!="string"||!r.pairingCode.trim()||typeof r.expireAt!="string"||!r.expireAt.trim())throw new Error(V("sandbox.invalidHandoffPairing"));const s=typeof r.studioUrl=="string"&&r.studioUrl.trim()?r.studioUrl.trim():window.location.origin;return{pairingCode:r.pairingCode,expireAt:r.expireAt,studioUrl:s}},async getCodexProjectHandoffStatus(n,i={}){const r=await $n(`${xte}/pairings/${encodeURIComponent(n)}`,{headers:ss({Accept:"application/json"}),signal:i.signal},wte);if(!r.ok)throw await as(r,V("sandbox.getHandoffStatusFailed"));const s=wa(await Ete(r,V("sandbox.getHandoffStatusFailed"))),a=new Set(["issued","creating","session-created","continuing","running","completed","failed"]);if(typeof(s==null?void 0:s.state)!="string"||!a.has(s.state)||typeof s.expireAt!="string"||!s.expireAt.trim())throw new Error(V("sandbox.invalidHandoffStatus"));return{state:s.state,expireAt:s.expireAt,...typeof s.projectName=="string"?{projectName:s.projectName}:{},...typeof s.agentName=="string"?{agentName:s.agentName}:{},...typeof s.sessionId=="string"?{sessionId:s.sessionId}:{},...typeof s.error=="string"?{error:s.error}:{},...s.failedStage==="creating-session"||s.failedStage==="uploading-project"||s.failedStage==="restoring-project"||s.failedStage==="continuing-task"?{failedStage:s.failedStage}:{}}},async listModels(n,i={}){const r=wa(await Ll(e,n,"models",{options:i,fallback:V("sandbox.listModelsFailed")}));if(!Array.isArray(r==null?void 0:r.models))throw new Error(V("sandbox.invalidModelList"));return r.models.flatMap(s=>{const a=J5t(s);return a?[a]:[]})},async setModel(n,i,r={}){const s=wa(await Ll(e,n,"model",{method:"PUT",body:{model:i},options:r,fallback:V("sandbox.setModelFailed")}));if(typeof(s==null?void 0:s.model)!="string"||!s.model)throw new Error(V("sandbox.invalidModel"));return s.model},async listSkills(n,i=!1,r={}){const a=wa(await Ll(e,n,`skills${i?"?force_reload=true":""}`,{options:r,fallback:V("sandbox.listSkillsFailed")}));if(!Array.isArray(a==null?void 0:a.skills))throw new Error(V("sandbox.invalidSkillList"));return a.skills.flatMap(l=>{const c=eLt(l);return c?[c]:[]})},async listThreads(n,i={},r={}){const s=new URLSearchParams;i.cursor&&s.set("cursor",i.cursor),i.search&&s.set("search",i.search),i.archived&&s.set("archived","true");const a=s.size?`?${s}`:"",l=wa(await Ll(e,n,`threads${a}`,{options:r,fallback:V("sandbox.listThreadsFailed")}));if(!Array.isArray(l==null?void 0:l.threads))throw new Error(V("sandbox.invalidThreadList"));return{threads:l.threads.flatMap(c=>{const u=mje(c);return u?[u]:[]}),...typeof l.nextCursor=="string"?{nextCursor:l.nextCursor}:{}}},async newThread(n,i={}){return Tg(await Ll(e,n,"threads/new",{method:"POST",options:i,fallback:V("sandbox.createThreadFailed")}))},async readThread(n,i,r={}){if(!i)throw new Error(V("sandbox.missingThread"));return Tg(await Ll(e,n,`threads/${encodeURIComponent(i)}`,{options:r,fallback:V("sandbox.readThreadFailed")}))},async resumeThread(n,i,r={}){return Tg(await Ll(e,n,"threads/resume",{method:"POST",body:{threadId:i},options:r,fallback:V("sandbox.resumeThreadFailed")}))},async forkThread(n,i={}){return Tg(await Ll(e,n,"threads/fork",{method:"POST",options:i,fallback:V("sandbox.forkThreadFailed")}))},async archiveThread(n,i,r={}){const s=wa(await Ll(e,n,"threads/archive",{method:"POST",body:{threadId:i},options:r,fallback:V("sandbox.archiveThreadFailed")}));if((s==null?void 0:s.archived)!==!0)throw new Error(V("sandbox.invalidArchiveResult"));return{archived:!0,...s.thread?{snapshot:Tg(s)}:{}}},async deleteThread(n,i,r={}){const s=wa(await Ll(e,n,"threads/delete",{method:"POST",body:{threadId:i},options:r,fallback:V("sandbox.deleteThreadFailed")}));if((s==null?void 0:s.deleted)!==!0)throw new Error(V("sandbox.invalidDeleteResult"));return{deleted:!0,...s.thread?{snapshot:Tg(s)}:{}}},async compactThread(n,i={}){await Ll(e,n,"threads/compact",{method:"POST",options:i,fallback:V("sandbox.compactThreadFailed")})},async getSettings(n,i={}){const r=await $n(`${e}/${encodeURIComponent(n)}/settings`,{method:"GET",headers:ss(),signal:i.signal},Ff);if(!r.ok)throw await as(r,V("sandbox.getSettingsFailed"));return Ate(await r.json())},async updatePermissions(n,i,r={}){const s=await $n(`${e}/${encodeURIComponent(n)}/permissions`,{method:"PUT",headers:ss({"Content-Type":"application/json"}),body:JSON.stringify(i),signal:r.signal},Ff);if(!s.ok)throw await as(s,V("sandbox.updatePermissionsFailed"));const a=await s.json();return II(a.permissions)},async updateWorkspace(n,i,r={}){const s=await $n(`${e}/${encodeURIComponent(n)}/workspace`,{method:"PUT",headers:ss({"Content-Type":"application/json"}),body:JSON.stringify({cwd:i}),signal:r.signal},Ff);if(!s.ok)throw await as(s,V("sandbox.updateWorkspaceFailed"));const a=await s.json();if(typeof a.cwd!="string"||!a.cwd)throw new Error(V("sandbox.invalidWorkingDirectory"));return a.cwd},async listDirectories(n,i,r={}){const s=new URLSearchParams({path:i}),a=await $n(`${e}/${encodeURIComponent(n)}/directories?${s}`,{method:"GET",headers:ss(),signal:r.signal},Ff);if(!a.ok)throw await as(a,V("sandbox.listDirectoriesFailed"));const l=await a.json();if(typeof l.path!="string"||!Array.isArray(l.directories)||l.directories.some(c=>!c||typeof c.name!="string"||typeof c.path!="string"))throw new Error(V("sandbox.invalidDirectoryList"));return{path:l.path,...typeof l.parent=="string"?{parent:l.parent}:{},directories:l.directories}},async resolveApproval(n,i,r,s={}){const a=await $n(`${e}/${encodeURIComponent(n)}/approvals/${encodeURIComponent(i)}`,{method:"POST",headers:ss({"Content-Type":"application/json"}),body:JSON.stringify({decision:r}),signal:s.signal},Ff);if(!a.ok)throw await as(a,V("sandbox.resolveApprovalFailed"))},async launchTerminal(n,i={}){return _te(e,n,"terminal",i)},async launchBrowser(n,i={}){return _te(e,n,"browser",i)},async uploadFile(n,i,r={}){const s=new FormData;s.set("file",i,i.name);const a=await $n(`${e}/${encodeURIComponent(n)}/files`,{method:"POST",headers:ss(),body:s,signal:r.signal},Y5t);if(!a.ok)throw await as(a,V("sandbox.uploadFileFailed"));const l=await a.json();if(typeof l.id!="string"||typeof l.path!="string"||typeof l.name!="string"||typeof l.mimeType!="string"||typeof l.sizeBytes!="number")throw new Error(V("sandbox.invalidUploadResult"));return l},async closeSession(n,i={}){if(!n)return;const r=await $n(`${e}/${encodeURIComponent(n)}/disconnect`,{method:"POST",headers:ss(),signal:i.signal},lO);if(!r.ok&&r.status!==404)throw await as(r,V("sandbox.disconnectCodexFailed"))},async deleteSession(n,i={}){if(!n)return;const r=await $n(`${e}/${encodeURIComponent(n)}`,{method:"DELETE",headers:ss(),signal:i.signal},lO);if(!r.ok&&r.status!==404)throw await as(r,V("sandbox.deleteCodexFailed"))}}}const gr=gje(K5t),bp=gje("/web/intelligent-development/sessions",{textOnly:!0,messageTimeoutMs:36e5,interruptTimeoutMs:45e3});async function _te(e,t,n,i){const r=await $n(`${e}/${encodeURIComponent(t)}/${n}`,{method:"POST",headers:ss(),signal:i.signal},Ff);if(!r.ok)throw await as(r,V(n==="terminal"?"sandbox.openSandboxTerminalFailed":"sandbox.openSandboxBrowserFailed"));const s=await r.json();return{url:bje(s.url,V("sandbox.toolLabel")),...typeof s.shellSessionId=="string"?{shellSessionId:s.shellSessionId}:{}}}function bje(e,t){if(typeof e!="string")throw new Error(V("sandbox.invalidToolUrl",{label:t}));if(e.startsWith("/"))return $o(e);let n;try{n=new URL(e)}catch{throw new Error(V("sandbox.invalidToolUrl",{label:t}))}const i=n.protocol==="http:"&&window.location.protocol==="http:";if(n.protocol!=="https:"&&!i)throw new Error(V("sandbox.unsafeToolUrl",{label:t}));return n.toString()}function Pg(e,t,n){const i=e instanceof Error?`${e.name}: ${e.message}`:String(e||V("common.unknownError"));return[V("requestError.actionFailed",{action:t}),V("requestError.detail",{detail:i}),n?V("requestError.request",{request:n}):""].filter(Boolean).join(` -`)}function rh({className:e="icon"}){return o.jsxs("svg",{className:`${e} sidebar-agent-face`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("rect",{x:"4.25",y:"5.25",width:"15.5",height:"13.5",rx:"4.75"}),o.jsx("path",{className:"sidebar-agent-face__eye",d:"M8.5 10.7v2"}),o.jsx("path",{className:"sidebar-agent-face__eye",d:"M15.5 10.7v2"})]})}function rLt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M8.4 18.4H7.2a4.2 4.2 0 0 1-.65-8.35A5.7 5.7 0 0 1 17.3 8.2a4.6 4.6 0 0 1-.4 9.2h-3.2"}),o.jsx("path",{d:"m7.8 12.3 2 2-2 2M12.2 16.3h3.2"})]})}function sLt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M18.9 6.25A8.4 8.4 0 1 0 19.6 16"}),o.jsx("path",{d:"M19 6.2c.1 2.1-.65 3.75-2.25 4.95-1.2.9-2.75 1.25-4.2.9"}),o.jsx("circle",{cx:"10.6",cy:"12.8",r:"2.45"}),o.jsx("path",{d:"m5.25 18.6 3.65-3.9M14.8 17.9c1.9-.45 3.55-1.65 4.65-3.35"})]})}function aLt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M6.2 20c.55-2.15.75-4.1.75-6.7V9.8A5.35 5.35 0 0 1 12.35 4c3.35 0 5.65 2.35 5.65 5.65v4.6c0 2.35.35 4.25 1.15 5.75"}),o.jsx("path",{d:"M8.05 10.2c1.35-.6 2.2-1.65 2.55-3.15.45 1.55 1.35 2.55 2.7 3.05.1-1 .4-1.95.85-2.75.45 1.25 1.2 2.2 2.15 2.75"}),o.jsx("path",{d:"M9.3 12.65h.01M14.9 12.65h.01M10.8 15.55c.8.5 1.65.5 2.45 0"}),o.jsx("path",{d:"M8.45 19.85c.95-.85 1.45-1.95 1.5-3.25M15.1 16.65c.05 1.2.55 2.3 1.55 3.2"})]})}function oLt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M5.2 17.2V8.1a3 3 0 0 1 3-3h7.6a3 3 0 0 1 3 3v9.1"}),o.jsx("path",{d:"M7.4 17.2h9.2M9 19.9h6"}),o.jsx("path",{d:"M9.1 9.25h5.8M9.1 12h3.1"}),o.jsx("path",{d:"m14.1 12.4 2 2.1M16.2 12.4l-2.1 2.1"})]})}function vk({kind:e,...t}){return e==="codex"?o.jsx(rLt,{...t}):e==="deepseek-harness"?o.jsx(oLt,{...t}):e==="openclaw"?o.jsx(sLt,{...t}):o.jsx(aLt,{...t})}const lLt=["general","codex","deepseek-harness","openclaw","hermes"],cLt=24,uLt=3e4,dLt=7e3,fLt=2e4,hLt=6,pLt=2,mLt=250,Gp=new Map,bv=new Map,gLt=new Set;function dg(e){const t=e.runtime;return t?`${t.region}:${t.runtimeId}:${t.currentVersion??""}`:""}function Nte(e,t){const n=e instanceof Error&&e.message.trim()?e.message.trim():t("myAgents.compatibility.unknownError");return{status:e instanceof $s&&e.unsupported?"unsupported":"error",message:n}}function p2(e){if(!e){Gp.clear(),bv.clear(),S4();return}const t=new Set(e);if(t.size!==0){for(const[n,i]of bv)i.page.runtimes.some(r=>t.has(r.runtimeId))&&bv.delete(n);for(const n of t)S4(n);Gp.clear()}}function bLt(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M8 3.25v9.5M3.25 8h9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function yLt(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M8.313 3.646a.5.5 0 0 1 .707 0l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 1 1-.707-.708L11.46 8.5H3.333a.5.5 0 0 1 0-1h8.127L8.313 4.354a.5.5 0 0 1 0-.708Z",fill:"currentColor"})})}function vLt(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M2.75 5.25h8.75m0 0-2-2m2 2-2 2M13.25 10.75H4.5m0 0 2 2m-2-2 2-2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function xLt({type:e}){return e==="general"?o.jsx(rh,{}):o.jsx(vk,{kind:e})}function OLt(e,t=Date.now(),n){const i=Date.parse(e);if(!Number.isFinite(i)||i-t<6e4)return n("myAgents.expiringSoon");const r=Math.ceil((i-t)/6e4),s=Math.floor(r/60),a=r%60;return n("myAgents.sandboxRemaining",{hours:s,minutes:a})}function jte(e,t){var n;return{id:e.runtimeId,name:e.name,description:((n=e.description)==null?void 0:n.trim())||t("common.noDescription"),createdAt:e.createdAt??"",specificationLabel:t("myAgents.creator"),specification:CEe(e.author),isMine:e.isMine,runtime:{runtimeId:e.runtimeId,region:e.region,currentVersion:e.currentVersion,canDelete:e.canDelete}}}function wLt(e,t){const n=e.status.trim().toLowerCase();return{id:e.id,name:e.displayName||t("myAgents.namedAgent",{name:e.toolName}),description:t(`myAgents.sandboxStatus.${n}`,{defaultValue:t("myAgents.sandboxStatus.unknown")}),createdAt:e.createdAt,specificationLabel:t("myAgents.creator"),specification:CEe(e.createdBy),isMine:e.isMine,region:e.region,sandbox:e}}function SLt(e,t){var n,i;return{id:e.id,name:e.draft.name||t("agentSelector.unnamedAgent"),description:((n=e.draft.description)==null?void 0:n.trim())||t("common.noDescription"),createdAt:new Date(e.updatedAt).toISOString(),specificationLabel:t("myAgents.storageLocation"),specification:t("myAgents.currentBrowser"),isMine:!0,region:(i=e.deploymentTarget)==null?void 0:i.region,draft:e}}function kLt(e,t,n){if(!e.draft)return e;const i=e.draft.deploymentTarget;return i?t.find(r=>{var s;return((s=r.runtime)==null?void 0:s.runtimeId)===i.runtimeId&&r.runtime.region===i.region})??{id:i.runtimeId,appName:i.appName,name:i.name||e.name,description:e.description,createdAt:e.createdAt,specificationLabel:n("myAgents.region"),specification:i.region,isMine:!0,runtime:{runtimeId:i.runtimeId,region:i.region,currentVersion:i.currentVersion,canDelete:!1}}:null}function ELt(e,t){return e.trim()||er(t)}async function CLt(e,t,n,i,r,s){const a=`${e}:${t}:${n}`,l=bv.get(a);if(l&&l.expiresAt>Date.now())return i(l.page.runtimes.map(d=>jte(d,r))),l.page.nextToken;l&&bv.delete(a);let c=Gp.get(a);c||(c=q5t({scope:e,region:t,pageSize:cLt,nextToken:n,signal:s}),Gp.set(a,c),c.then(()=>Gp.delete(a),()=>Gp.delete(a)));const u=await c;return bv.set(a,{page:u,expiresAt:Date.now()+uLt}),i(u.runtimes.map(d=>jte(d,r))),u.nextToken}function TLt({agent:e,onUse:t,onViewDetails:n,onPrepareUpdate:i,compatibility:r,onRetryCompatibility:s,connecting:a,connected:l,deploymentTask:c,nowMs:u,onViewDeploymentTask:d,onEditDraft:f,onDeleteDraft:h}){var N,_,j,T;const{t:p,i18n:g}=Oe("ui"),b=(N=e.sandbox)==null?void 0:N.status.toLowerCase(),v=((_=e.sandbox)==null?void 0:_.resourceType)==="snapshot",y=!!(e.runtime||b==="ready"||b==="wakeable"),x=(r==null?void 0:r.status)==="checking",w=(r==null?void 0:r.status)==="unsupported",O=(r==null?void 0:r.status)==="error",k=((j=e.sandbox)==null?void 0:j.resourceType)==="snapshot"?e.sandbox.sourceSessionId||e.sandbox.snapshotId:(T=e.sandbox)==null?void 0:T.id,S=()=>{if(e.draft){c?d==null||d(c):n==null||n(e);return}y&&(c?d==null||d(c):n==null||n(e))},E=(e.draft||y)&&!!(c?d:n),C=e.draft?c?p("myAgents.viewDeploymentProgress",{name:e.name}):p("myAgents.viewRuntimeDetails",{name:e.name}):c?p("myAgents.viewDeploymentProgress",{name:e.name}):p("myAgents.viewDetails",{name:e.name});return o.jsxs(EB,{className:a?"my-agent-card is-connecting":"my-agent-card",activateLabel:E?C:void 0,onActivate:E?S:void 0,onPointerEnter:()=>i==null?void 0:i(e),onFocusCapture:()=>i==null?void 0:i(e),footer:o.jsx(Pwe,{className:"my-agent-meta",items:[{label:e.specificationLabel,value:e.specification,hideLabel:!0,className:"my-agent-region"},{label:p("myAgents.time"),value:QQ(e.createdAt,u,g.resolvedLanguage??g.language),hideLabel:!0,className:"my-agent-created-at"},...e.sandbox?[{label:p("myAgents.remainingTime"),value:e.sandbox.resourceType==="snapshot"?p("myAgents.wakeable"):e.sandbox.persistent?p("myAgents.neverExpires"):OLt(e.sandbox.expireAt,u,p),className:`my-agent-expiry${e.sandbox.resourceType==="session"&&e.sandbox.persistent?"":" is-expiring"}`}]:[]]}),actions:e.draft?o.jsxs(o.Fragment,{children:[o.jsx(v6,{"aria-label":c?p("myAgents.viewDeploymentProgress",{name:e.name}):p("myAgents.editDraftNamed",{name:e.name}),onClick:()=>c?d==null?void 0:d(c):f==null?void 0:f(e.draft),children:p(c?"myAgents.viewProgress":"common.edit")}),o.jsx(v6,{tone:"danger","aria-label":p("myAgents.deleteDraftNamed",{name:e.name}),onClick:()=>h==null?void 0:h(e.draft),children:p("common.delete")})]}):O||w?o.jsxs(Ft,{type:"button",color:"primary",size:"sm",pill:!1,"aria-label":p("myAgents.recheckCompatibility",{name:e.name}),onClick:()=>s==null?void 0:s(e),children:[o.jsx(zj,{}),p("common.retry")]}):o.jsx(x6,{className:l?"my-agent-use is-connected":"my-agent-use",disabled:!y||x||w||a||l,"aria-busy":a||void 0,label:l?p("myAgents.connectedNamed",{name:e.name}):v?p("myAgents.wakeAndChat",{name:e.name}):p("myAgents.chatWith",{name:e.name}),onClick:()=>void(t==null?void 0:t(e)),children:a?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"my-agent-use-spinner","aria-hidden":"true"}),o.jsx("span",{className:"sr-only",children:p(v?"myAgents.waking":"agentSelector.connecting")})]}):o.jsx(yLt,{})}),children:[o.jsx(CB,{leading:o.jsx(Xv,{seed:e.name}),title:e.name,subtitle:e.sandbox?o.jsx("span",{className:"my-agent-session-id",title:k,children:k}):void 0,status:e.draft?c?o.jsx("span",{className:"my-agent-deploying-badge",children:p("myAgents.deploying")}):o.jsx("span",{className:"my-agent-draft-badge",children:p("myAgents.draft")}):e.sandbox?o.jsx("span",{className:"my-agent-status-label","data-ready":e.sandbox.status.toLowerCase()==="ready"||void 0,"data-wakeable":v||void 0,children:e.description}):e.runtime&&c?o.jsx("span",{className:"my-agent-deploying-badge",children:p("myAgents.deploying")}):x?o.jsx(Fo,{content:r==null?void 0:r.message,contentClassName:"my-agent-compatibility-tooltip",maxWidth:360,align:"end",interactive:!0,preventUnintentionalClickToClose:!0,children:o.jsx("span",{className:"my-agent-compatibility-trigger",tabIndex:0,children:o.jsxs(ga,{className:"my-agent-compatibility-status",color:"secondary",variant:"soft",size:"sm",pill:!0,children:[o.jsx("span",{className:"my-agent-compatibility-spinner","aria-hidden":"true"}),o.jsx("span",{children:p("myAgents.checking")})]})})}):w?o.jsx(Fo,{content:r==null?void 0:r.message,contentClassName:"my-agent-compatibility-tooltip",maxWidth:360,align:"end",interactive:!0,preventUnintentionalClickToClose:!0,children:o.jsx("span",{className:"my-agent-compatibility-trigger",tabIndex:0,children:o.jsx(ga,{className:"my-agent-compatibility-status",color:"warning",variant:"soft",size:"sm",pill:!0,children:p("myAgents.chatUnsupported")})})}):O?o.jsx(Fo,{content:r==null?void 0:r.message,contentClassName:"my-agent-compatibility-tooltip",maxWidth:360,align:"end",interactive:!0,preventUnintentionalClickToClose:!0,children:o.jsx("span",{className:"my-agent-compatibility-trigger",tabIndex:0,children:o.jsx(ga,{className:"my-agent-compatibility-status",color:"danger",variant:"soft",size:"sm",pill:!0,children:p("myAgents.checkFailed")})})}):null}),e.sandbox?null:o.jsx(TB,{children:e.description})]})}function ALt({cloudProvider:e,studioRegion:t,canCreateRuntimeAgents:n,canCreatePersonalAgents:i,canUpdate:r,runtimeScope:s,onCreateAgent:a,onOpenCodexProjectUpload:l,onUseAgent:c,onViewAgentDetails:u,onCreateSandboxAgent:d,onUseSandboxAgent:f,onViewSandboxAgentDetails:h,activeType:p,onActiveTypeChange:g,sandboxRefreshKey:b=0,connectedRuntimeId:v="",hiddenRuntimeIds:y=gLt,drafts:x=[],deploymentTasks:w=[],draftDeploymentTaskIds:O={},onViewDeploymentTask:k,onEditDraft:S,onDeleteDraft:E}){const{t:C}=Oe("ui"),N=m.useRef(null),_=m.useRef(null),j=m.useRef(0),T=m.useRef(null),L=m.useRef(0),A=m.useRef(null),R=m.useRef(new Map),P=ELt(t,e),[$,M]=m.useState(""),[B,I]=m.useState(s==="mine"?"mine":"all"),[H,X]=m.useState(P),[Q,q]=m.useState([]),[U,te]=m.useState(""),[le,oe]=m.useState(!0),[re,he]=m.useState(""),[K,G]=m.useState([]),[se,de]=m.useState(!1),[ke,Te]=m.useState(""),[rt,Be]=m.useState(""),[Me,Ie]=m.useState({}),[qe,Pe]=m.useState(null),[Ve,Ee]=m.useState(()=>Date.now()),Le=m.useMemo(()=>lLt.map(je=>({value:je,label:C(`myAgents.agentTypes.${je}`)})),[C]),Y=m.useMemo(()=>{const je=Pu(e);return je.some(gt=>gt.value===P)?je:[{value:P,label:P},...je]},[e,P]);m.useEffect(()=>{s==="mine"&&I("mine")},[s]),m.useEffect(()=>{X(P)},[P]),m.useEffect(()=>{Ee(Date.now());const je=window.setInterval(()=>Ee(Date.now()),1e3);return()=>window.clearInterval(je)},[]);const fe=m.useMemo(()=>x.map(je=>SLt(je,C)),[x,C]),we=m.useMemo(()=>{const je=new Map,gt=new Map,ut=new Map;for(const ye of w){if(ye.status!=="running")continue;if(je.set(ye.id,ye),ye.draftId){const et=gt.get(ye.draftId);(!et||ye.startedAt>et.startedAt)&>.set(ye.draftId,ye)}if(!ye.runtimeId)continue;const ze=ut.get(ye.runtimeId);(!ze||ye.startedAt>ze.startedAt)&&ut.set(ye.runtimeId,ye)}return{byId:je,byDraftId:gt,byRuntimeId:ut}},[w]),Ke=m.useCallback(je=>{var ut;if(je.draft){const ye=O[je.draft.id];return we.byDraftId.get(je.draft.id)??(ye?we.byId.get(ye):void 0)}const gt=(ut=je.runtime)==null?void 0:ut.runtimeId;return gt?we.byRuntimeId.get(gt):void 0},[we,O]),Je=m.useCallback((je,gt)=>{var ze;(ze=T.current)==null||ze.abort(),Gp.clear();const ut=new AbortController;T.current=ut;const ye=++j.current;return oe(!0),he(""),CLt(B,H,je,et=>{j.current===ye&&q(Et=>gt?et:[...Et,...et])},C,ut.signal).then(et=>{j.current===ye&&te(et)}).catch(et=>{j.current===ye&&(vte(et)||he(Pg(et,C("myAgents.loadGeneralAgents"),"GET /web/runtimes")))}).finally(()=>{j.current===ye&&oe(!1),T.current===ut&&(T.current=null)})},[B,H,C]);m.useEffect(()=>{if(p==="general")return q([]),te(""),Je("",!0),()=>{var je;(je=T.current)==null||je.abort(),T.current=null,Gp.clear(),j.current+=1}},[p,Je]),m.useEffect(()=>{if(p!=="general"){for(const ut of R.current.values())ut.abort();R.current.clear();return}const je=new Set(Q.filter(ut=>{var ye,ze;return((ye=ut.runtime)==null?void 0:ye.runtimeId)!==v&&((ze=ut.runtime)==null?void 0:ze.region)===H}).map(dg).filter(Boolean));for(const[ut,ye]of R.current)je.has(ut)||(ye.abort(),R.current.delete(ut));const gt=Q.filter(ut=>{var Et,_t,rn;const ye=(Et=ut.runtime)==null?void 0:Et.runtimeId;if(!ye||ye===v||((_t=ut.runtime)==null?void 0:_t.region)!==H)return!1;const ze=dg(ut),et=(rn=Me[ze])==null?void 0:rn.status;return!R.current.has(ze)&&(!et||et==="checking")});for(const ut of gt)R.current.set(dg(ut),new AbortController);Ie(ut=>{var et,Et;let ye=!1;const ze={...ut};for(const _t of Q){const rn=dg(_t);if(!rn)continue;const en=((et=_t.runtime)==null?void 0:et.runtimeId)===v;en&&((Et=ze[rn])==null?void 0:Et.status)!=="compatible"?(ze[rn]={status:"compatible",message:C("myAgents.compatibility.supported")},ye=!0):!en&&!ze[rn]&&(ze[rn]={status:"checking",message:C("myAgents.compatibility.checking")},ye=!0)}return ye?ze:ut}),W5t(gt,async ut=>{const ye=ut.runtime;if(!ye)return;const ze=dg(ut),et=R.current.get(ze);if(et)try{const Et=await Fv(ye.runtimeId,ye.region,{signal:et.signal,preferCached:!0,timeoutMs:dLt,currentVersion:ye.currentVersion});if(et.signal.aborted)return;Ie(_t=>({..._t,[ze]:Et&&Et.length>0?{status:"compatible",message:C("myAgents.compatibility.supported")}:{status:"unsupported",message:C("myAgents.compatibility.empty")}}))}catch(Et){if(et.signal.aborted||(Et==null?void 0:Et.name)==="AbortError")return;Ie(_t=>({..._t,[ze]:Nte(Et,C)}))}finally{R.current.get(ze)===et&&R.current.delete(ze)}})},[p,v,H,Q,C]),m.useEffect(()=>()=>{var je;(je=T.current)==null||je.abort();for(const gt of R.current.values())gt.abort();R.current.clear()},[]);const Tt=m.useCallback(async je=>{var ye;(ye=A.current)==null||ye.abort();const gt=new AbortController;A.current=gt;const ut=++L.current;de(!0),Te(""),G([]);try{const ze=je==="codex"?await gr.listSessions({signal:gt.signal,autoResumeSnapshots:!0}):await gr.listAgentSessions(je,{signal:gt.signal,autoResumeSnapshots:!0});if(L.current!==ut)return;G(ze.map(et=>wLt(et,C)))}catch(ze){if((ze==null?void 0:ze.name)==="AbortError"||L.current!==ut)return;Te(Pg(ze,C("myAgents.loadAgentType",{type:C(`myAgents.agentTypes.${je}`)}),`GET /web/${je==="codex"?"sandbox":je}/sessions`))}finally{A.current===gt&&(A.current=null),L.current===ut&&de(!1)}},[C]);function Ne(je){var gt;je!==p&&(je==="general"?(j.current+=1,q([]),te(""),he(""),oe(!0)):((gt=A.current)==null||gt.abort(),A.current=null,L.current+=1,G([]),Te(""),de(!0)),g(je))}function ve(){p==="general"&&(j.current+=1,q([]),te(""),he(""),oe(!0))}function He(je){je!==B&&(ve(),I(je))}function it(je){je!==H&&(ve(),X(je))}m.useEffect(()=>{var je;if(p==="general"){(je=A.current)==null||je.abort(),A.current=null,L.current+=1;return}return Tt(p),()=>{var gt;(gt=A.current)==null||gt.abort(),A.current=null,L.current+=1}},[p,Tt,b]),m.useEffect(()=>{const je=_.current,gt=N.current;if(!je||!gt||p!=="general"||!U||le)return;const ut=new IntersectionObserver(([ye])=>{ye.isIntersecting&&Je(U,!1)},{root:gt,rootMargin:"240px 0px",threshold:.01});return ut.observe(je),()=>ut.disconnect()},[p,Je,le,U]);const Ae=m.useCallback(async je=>{if(!rt){Be(je.id);try{await new Promise(gt=>requestAnimationFrame(()=>gt())),je.sandbox?await f(je.sandbox):await c(je)}finally{Be("")}}},[rt,c,f]),Kt=m.useCallback(async je=>{var ze;const gt=je.runtime;if(!gt)return;const ut=dg(je);Ie(et=>({...et,[ut]:{status:"checking",message:C("myAgents.compatibility.checking")}})),(ze=R.current.get(ut))==null||ze.abort();const ye=new AbortController;R.current.set(ut,ye);try{const et=await pje(()=>Fv(gt.runtimeId,gt.region,{retryProbe:!0,signal:ye.signal,timeoutMs:fLt,currentVersion:gt.currentVersion}));if(ye.signal.aborted)return;Ie(Et=>({...Et,[ut]:et&&et.length>0?{status:"compatible",message:C("myAgents.compatibility.supported")}:{status:"unsupported",message:C("myAgents.compatibility.empty")}}))}catch(et){if(ye.signal.aborted||vte(et))return;Ie(Et=>({...Et,[ut]:Nte(et,C)}))}finally{R.current.get(ut)===ye&&R.current.delete(ut)}},[C]),gn=m.useCallback(je=>{const gt=je.runtime;!r||!gt||Ke(je)||w4({runtimeId:gt.runtimeId,region:gt.region,appName:je.appName,currentVersion:gt.currentVersion})},[r,Ke]),Wt=m.useMemo(()=>{const je=$.trim().toLocaleLowerCase(),gt=p==="general"?[...fe,...Q]:K,ye=(B==="mine"?gt.filter(_t=>_t.isMine):gt).filter(_t=>{var en;const rn=((en=_t.runtime)==null?void 0:en.region)??_t.region;return!rn||rn===H}),ze=je?ye.filter(_t=>_t.name.toLocaleLowerCase().includes(je)):ye;if(p!=="general")return ze;const et=y.size>0?ze.filter(_t=>!_t.runtime||!y.has(_t.runtime.runtimeId)):ze,Et=et.findIndex(_t=>{var rn;return((rn=_t.runtime)==null?void 0:rn.runtimeId)===v});return Et<=0?et:[et[Et],...et.slice(0,Et),...et.slice(Et+1)]},[p,v,fe,y,$,B,H,Q,K]);m.useEffect(()=>{if(!r||p!=="general")return;const je=Wt.filter(et=>!!et.runtime).filter(et=>!Ke(et)).slice(0,hLt);if(je.length===0)return;let gt=!1,ut=0;const ye=async()=>{for(;!gt;){const et=je[ut];if(ut+=1,!(et!=null&&et.runtime)||(await w4({runtimeId:et.runtime.runtimeId,region:et.runtime.region,appName:et.appName,currentVersion:et.runtime.currentVersion}),gt))return}},ze=window.setTimeout(()=>{for(let et=0;et{gt=!0,window.clearTimeout(ze)}},[p,r,Ke,Wt]);const Ot=C(`myAgents.agentTypes.${p}`,{defaultValue:C("myAgents.agent")}),Nt=p==="general"?le&&Q.length===0&&fe.length===0:se&&K.length===0,at=!Nt&&Wt.length===0,_e=(p==="general"?n:i)?p==="general"?()=>a(H):()=>d(p):void 0,st=p==="codex"&&i&&!!l;return o.jsxs(Ph,{className:"my-agents-page","aria-label":C("myAgents.agent"),children:[o.jsx(zx,{title:C("myAgents.agent"),className:"my-agents-header"}),o.jsxs(Yb,{className:"my-agent-toolbar",children:[o.jsx(cE,{idPrefix:"my-agent-ownership",ariaLabel:C("myAgents.creatorFilter"),value:B,items:[{id:"all",label:C("common.all"),disabled:s==="mine"},{id:"mine",label:C("agentSelector.createdByMe")}],onChange:He}),o.jsxs("div",{className:"resource-toolbar__actions",children:[o.jsx(nN,{id:"my-agent-type-filter",ariaLabel:C("myAgents.agentType"),value:p,options:Le,onChange:Ne}),o.jsx(nN,{id:"my-agent-region-filter",ariaLabel:C("myAgents.region"),value:H,options:Y,onChange:it}),o.jsx(Cm,{className:"my-agent-search","aria-label":C("myAgents.searchAgents"),value:$,onChange:je=>M(je.target.value),placeholder:C("common.search")}),st?o.jsxs("button",{type:"button",className:"my-agent-create-secondary",onClick:l,children:[o.jsx(vLt,{}),o.jsx("span",{children:C("myAgents.handoff")})]}):null]})]}),o.jsxs(Zb,{className:"my-agent-results",ref:N,"aria-label":C("myAgents.agentList",{type:Ot}),children:[Nt?o.jsx(qd,{}):(p==="general"?re:ke)&&Wt.length===0?o.jsxs("div",{className:"my-agent-empty",role:"alert",children:[o.jsx("p",{children:p==="general"?re:ke}),o.jsx("button",{type:"button",onClick:()=>{p==="general"?Je("",!0):Tt(p)},children:C("common.reload")})]}):at&&!_e?$.trim()||B==="mine"||H!==P?o.jsx("div",{className:"my-agent-empty-message",children:o.jsxs(Sn,{fill:"none",children:[o.jsx(Sn.Icon,{children:o.jsx(AFe,{})}),o.jsx(Sn.Title,{children:C("myAgents.noMatchingAgents")}),o.jsx(Sn.Description,{children:C("myAgents.adjustSearch")})]})}):p!=="general"?o.jsx("div",{className:"my-agent-empty-message",children:o.jsxs(Sn,{fill:"none",children:[o.jsx(Sn.Icon,{children:o.jsx(xLt,{type:p})}),o.jsx(Sn.Title,{className:"my-agent-sandbox-empty-title",children:C("myAgents.noAgentType",{type:Ot})})]})}):o.jsx("div",{className:"my-agent-empty-message",children:o.jsxs(Sn,{fill:"none",children:[o.jsx(Sn.Icon,{children:o.jsx(rh,{})}),o.jsx(Sn.Title,{children:C("myAgents.noGeneralAgents")}),o.jsx(Sn.Description,{children:C("myAgents.createGeneralAgentDescription")})]})}):o.jsxs(o.Fragment,{children:[p==="general"&&re?o.jsxs("div",{className:"my-agent-inline-error",role:"alert",children:[o.jsx("span",{children:re}),o.jsx("button",{type:"button",onClick:()=>void Je("",!0),children:C("common.reload")})]}):null,o.jsxs(Vx,{className:"my-agent-grid",children:[_e?o.jsx(Eb,{className:"my-agent-create-card","aria-label":C("myAgents.createAgentType",{type:Ot}),onClick:_e,icon:o.jsx(bLt,{}),children:C("myAgents.createAgent")}):null,Wt.map(je=>{var ut;const gt=kLt(je,Q,C);return o.jsx(TLt,{agent:je,deploymentTask:Ke(je),nowMs:Ve,onViewDeploymentTask:k,onUse:Ae,compatibility:je.runtime?Me[dg(je)]??{status:"checking",message:C("myAgents.compatibility.checking")}:void 0,onRetryCompatibility:Kt,onPrepareUpdate:gn,onViewDetails:gt?()=>{gt.sandbox?h(gt.sandbox):u(gt)}:void 0,connecting:je.id===rt,connected:((ut=je.runtime)==null?void 0:ut.runtimeId)===v,onEditDraft:S,onDeleteDraft:Pe},je.id)})]})]}),p==="general"&&!re&&!Nt&&(Wt.length>0||!!U)&&o.jsx("div",{className:"my-agent-load-more",ref:_,"aria-live":"polite",children:le?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),o.jsx("span",{children:C("myAgents.loadingMore")})]}):U?o.jsx("span",{children:C("myAgents.scrollForMore")}):o.jsx("span",{children:C("myAgents.allLoaded")})})]}),qe?o.jsx(fc,{title:C("myAgents.deleteDraftTitle"),description:C("myAgents.deleteDraftDescription",{name:qe.draft.name||C("agentSelector.unnamedAgent")}),confirmLabel:C("myAgents.deleteDraft"),variant:"danger",onCancel:()=>Pe(null),onConfirm:()=>{E==null||E(qe),Pe(null)}}):null]})}const _Lt="_Container_13560_1",NLt="_Textarea_13560_174",Rte={Container:_Lt,Textarea:NLt},Lm=e=>{const t=m.useRef(null),i=`search-ui-input-${m.useId()}`,{id:r,name:s,variant:a="outline",size:l="md",gutterSize:c,className:u,autoComplete:d,disabled:f=!1,readOnly:h=!1,invalid:p=!1,allowAutofillExtensions:g=!!s,onFocus:b,onBlur:v,onAnimationStart:y,onAutofill:x,autoSelect:w,rows:O=3,maxRows:k,autoResize:S,ref:E,onChange:C,...N}=e,[_,j]=m.useState(!1),T=S?Math.max(k??10,O):O;m.useEffect(()=>{var R;w&&((R=t.current)==null||R.select())},[w]);const L=R=>{y==null||y(R),R.animationName==="native-autofill-in"&&(x==null||x())},A=m.useCallback(()=>{if(!S||!t.current||T===void 0)return;t.current.style.height="0px";const R=t.current.scrollHeight;t.current.style.height=R+"px"},[S,T]);return m.useEffect(()=>{A()},[e.value,O,A]),o.jsx("div",{className:bi(Rte.Container,u),"data-variant":a,"data-size":l,"data-gutter-size":c,"data-focused":_,"data-disabled":f?"":void 0,"data-readonly":h?"":void 0,"data-invalid":p?"":void 0,style:qb({"textarea-min-rows":`${O}`,"textarea-max-rows":`${T}`}),children:o.jsx("textarea",{...N,onChange:R=>{C==null||C(R),A()},ref:Xk([t,E]),id:r||(g?void 0:i),className:Rte.Textarea,name:s,readOnly:h,disabled:f,rows:O,onFocus:R=>{j(!0),b==null||b(R)},onBlur:R=>{j(!1),v==null||v(R)},onAnimationStart:L,"data-lpignore":g?void 0:!0,"data-1p-ignore":g?void 0:!0})})},PI="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%3e%3cimage%20width='48'%20height='48'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAADbN2wMAAAH7UlEQVRoBdVZWWwbVRQ9492Onc1xTfaWLukq9oSqLKnYBZRSNgn6AagsAgmJRfzxg4SEEDtiER8IBKKAChK0FS1tKYWW0lZQKKV0gxCVJm3ikDiO17EdzrUzSdw4jj1OpeQqNzO237vvnHfvu/e9GWVwcBBDYue1mrqE2kI1UqeSJAnmIHUzNUCNUmGiKtQy6oPUR6geqnw/FSVOUH9R36KupfaDHnBQn6MGqEnqVJcEAfZTBbNL4b+lZPI1VbwwnaSfYO8z8N+TVMd0Qj6EVdbs3eIBP29cVFkL00kk+wSEwHAamgh9bDAJSQWTITZFnF+85J1tBPyOUC9OqqnsVdTIRkVBi70Msy125uriHJ8XAXFRfzKBTQM+rO0/hc54cSQE8iyzAx/XLcEltjIU44uCQijOaHvPfxIv97TjWCzEcMo7+sZ4TGa+2V6KT2rPQ73ZptsPBZE30fVrymvxTvUCtDoqYC0ijhMk/3MkgDd62xFheOqVggjIIAbOVaujEh/ULsaNzioUsxhVAv/A34GD0YBubxZMQJupWpMNr58zHytcHth1ekICsDcRx4u+fxBK6vOCbgKyEIXEK975WOmaoZuErKv1QR8ORQd0eUE3Ac0TNSYrXvI24fZSLxwGfebiDKW3e08gln9J0oYvKoMNG6kmiRdmzMOtTi8sOsJJJfANA93oiseGbeZ7k1EHZAKCEcApu4wCxUsSz3rm4HQiim3B/wpOsBJA2yP/4cZIJYIBFcGwCjWeSKEwm4wosZtR7rKizGXJQJZRB1TuttftAprnAbOrM9rl9UHqwg+s1o+eOow/GNN5CaPOklSgdKq4us+Ji7pt6Dw1AF9vBOGImjJht5lRVWFDY7UL58/3wOt2YPEcN2xWVpPRe6EQC+y9rwINPNKsuRaYX5cXhIxGkks+Y7V+6vQRdLBi5yx1bGwicFebivj+ARgOhZGMJMFyQyWpoV2GRIa2ZXOX2bDyqnPxzEPNKC+1Zj957eDBTbz34PXAwvoMfBN+kGV8Bxf00VgQz/vaEB6nSCnRQVj2h2DZG4TyZwQWlSils3m8RDDEhk2uaqlHaYklVb3Ha42dh4B3eMzZ//eEmMc0kGL3cEU9WksqU4XvzAYKZ9n6fQCOz3thORCGkhgCf2bDMz4bjQpW39yE65Y1QO5FxiUgP+76E3hzI7D1VyBcwP5NTFcZzXjaPRMNZmvGPkfA23YMwLHRD0Mf3ZwTgaBIi8GgYMGsSjx2z3kEP9Jp5E5rOeoqQH75C3htPfDpD4CskXxFvHC5vQKPVjSwPqQfcKTAfxuA/Ws/lBAXwEhUTGjWSAL3r1qYykSju+UkIFbZDx09wPvb0iH1W9uEYw03MHAV3ltew1CqgDkyCNtWgt/cnwY/3GriG5n9hbMrccNljRmzLz0nJCCNJBsEwsCH24E3NgDr96brhfyWS2Sm3EYLVsOL0i0DsG8h+LDkqcLExHhfc9siVDDrjJ59sZJRyHKZFRKybiSkTtIjR08CrXwEdtGcXL2A4+192LOuDeatfqg6wMvsL5lbhWuWysIdO995E9BgSkh19THX7wQOtANXLgKWLQSaarUWI9dNP7bjo68OY9uef6GqhcW8ZkViX2a/nBWYQ4+RggmIBfFGnHgOcD0c7wD2HgOW0xuXk0xN5SDaOwL4cnsb1m05joPHejKK0hgEOb4Q8Muba3H1pXUwZZl96aqLgHSU2RCbEe6/9hzh875OYPdhYF5NDLt/Oohd+46gNxBjm2zzJhZyi/RyV5TggdsvRJnTOm5j3QQ0i9ra6OHj1u9+B/YdNcLXVQdDmYNPy9oZ971IcIPHjUHadVrHHFfZNphtTtx508W4eJEHsg7Gk6IJaIZlDEn3EdUEl7sBg4la2MtqkYgNIOz/F9FgF6IhX6p5mozcjgbGasw/xWCCs7IeN7U24b4VddwZj26jjTZynTQCmknxSBqIETanh7ceWEpmpIiokT7E6JFosBvxaD/iJCeNDQYzTFYnzHY3SsobmfM9eOyucjTO0KyOf510AqOHkl2kiMlSQoAlsPLAk4hHSCaIJMMqmUgfYBQeggxGK4xmOxprXHh8lYK51em+E/0/qwQyBh8iY+Q52pjlOZD8XFcFPHELcGlT3stlbBaymtOROTReBoZJ+0DjZ9pv4SFq9fL0YWqcjJl1+AwP8OSGS+amq6y4P/fyyWqvoC9lDAG7ainPEJcBs7xMBGOLbU6bGQTMJHAnDUlG2biPFZevEM4GCZl9sSsnPgG+bAHfa+l8vZJxpNSo+oPp/c4XP6bPBN0kog2qtdFz1WzIkfXmZuAKVm6JewlbvZKVgGZMilMPwW9ngdr5B3CEG7iEbCY5ffl6RgPtYDGdybS4ogW4YDbgLefTD5s2kv5rTgKaWdlKi1fau4BDJ3jM5I70NDd0J7grzfZEUMg5CM5Tmg4TiW3ZtVYxTKpcgM2iWS7+mhcBbRiZ/TBTd4jPjtSEVF3AxxdUPgkxTrUUMTcBykKUmLZwhQlYPhWBeCBV5DRjk3QtiEC2McUDsjPVCEhWEQ8Umk2y2c7nOyEwrV/ySdbdQo3nw3aKtRHM3wiBtVQu02knISJ+SQh8Q32TyqTJJ6xTXyQzyzb2LeoBWQOy5pjwcDf1YSqzNIooLex99kTCppsq4N+l+oUArylhoku9sb+O18VU8c5UEiZu7KGyrKKTmgr7/wGxhy03aZIycwAAAABJRU5ErkJggg=='%20/%3e%3c/svg%3e",jLt="data:image/svg+xml,%3c?xml%20version='1.0'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20100%20100'%3e%3ctitle%3ePandoc%20Icon%3c/title%3e%3cdesc%20property='dc:creator'%3eAlbert%20Krewinkel%3c/desc%3e%3cmetadata%20id='license'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3ccc:license%20rdf:resource='http://creativecommons.org/licenses/by-sa/4.0/'%20/%3e%3c/cc:Work%3e%3ccc:License%20rdf:about='http://creativecommons.org/licenses/by-sa/4.0/'%3e%3ccc:permits%20rdf:resource='http://creativecommons.org/ns%23Reproduction'%20/%3e%3ccc:permits%20rdf:resource='http://creativecommons.org/ns%23Distribution'%20/%3e%3ccc:requires%20rdf:resource='http://creativecommons.org/ns%23Notice'%20/%3e%3ccc:requires%20rdf:resource='http://creativecommons.org/ns%23Attribution'%20/%3e%3ccc:permits%20rdf:resource='http://creativecommons.org/ns%23DerivativeWorks'%20/%3e%3ccc:requires%20rdf:resource='http://creativecommons.org/ns%23ShareAlike'%20/%3e%3c/cc:License%3e%3c/rdf:RDF%3e%3c/metadata%3e%3crect%20fill='%23fed'%20stroke='%23fed'%20width='100'%20height='100'/%3e%3cg%20fill='none'%20stroke='%234093da'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='8'%20transform='skewX(-6)%20translate(8%201)'%3e%3cpath%20d='M%2030,10%20l%200,80%20M%2045,10%20l%200,80%20M%2020,10%20l%2040,0%20l%2018,18%20l%200,25%20l%20-33,0'%20/%3e%3cpath%20fill='%234093da'%20stroke-width='6'%20d='M%2061,10%20l%2017,17%20l%20-17,0%20l%200,-17'%20/%3e%3c/g%3e%3c/svg%3e",RLt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%20100%20100'%20version='1.1'%20id='svg4'%20sodipodi:docname='favicon.svg'%20inkscape:version='1.4.4%20(dcaf3e7,%202026-05-05)'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:svg='http://www.w3.org/2000/svg'%3e%3csodipodi:namedview%20id='namedview4'%20pagecolor='%23ffffff'%20bordercolor='%23000000'%20borderopacity='0.25'%20inkscape:showpageshadow='2'%20inkscape:pageopacity='0.0'%20inkscape:pagecheckerboard='0'%20inkscape:deskcolor='%23d1d1d1'%20showgrid='true'%20inkscape:zoom='8.2236519'%20inkscape:cx='34.534536'%20inkscape:cy='45.174577'%20inkscape:window-width='1881'%20inkscape:window-height='1382'%20inkscape:window-x='1512'%20inkscape:window-y='30'%20inkscape:window-maximized='0'%20inkscape:current-layer='svg4'%3e%3cinkscape:grid%20type='axonomgrid'%20id='grid4'%20units='px'%20originx='0'%20originy='0'%20spacingx='3.7795276'%20spacingy='3.7795276'%20empcolor='%230099e5'%20empopacity='0.30196078'%20color='%230099e5'%20opacity='0.14901961'%20empspacing='0'%20dotted='false'%20gridanglex='40'%20gridanglez='40'%20enabled='true'%20visible='true'%20/%3e%3c/sodipodi:namedview%3e%3cdefs%20id='defs1'%3e%3cfilter%20id='shadow'%20x='0'%20y='0'%20width='1'%20height='1'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='3'%20flood-color='rgba(50,%2050,%2093,%200.18)'%20/%3e%3c/filter%3e%3c/defs%3e%3crect%20x='4'%20y='4'%20width='92'%20height='92'%20rx='22.08'%20fill='%23e8efff'%20filter='url(%23shadow)'%20id='rect1'%20transform='matrix(1.0869565,0,0,1.0869565,-4.347826,-4.347826)'%20style='stroke-width:0.92'%20ry='22.08'%20/%3e%3cpath%20style='fill:%230a2540;fill-opacity:1;stroke-width:1.88976'%20d='M%2049.999999,6.535431%204.9573423,44.330708%2049.999999,82.125984%2092.790523,46.220471%2095.042656,44.330708%20Z'%20id='path1'%20/%3e%3cpath%20style='fill:%23425466;fill-opacity:1;stroke-width:1.88976'%20d='M%204.9573423,44.330708%20V%2055.669291%20L%2049.999999,93.464567%20V%2082.125984%20Z'%20id='path2'%20/%3e%3cpath%20style='fill:%231a3550;fill-opacity:1;stroke-width:1.88976'%20d='M%2049.999999,82.125984%2095.042656,44.330708%20V%2055.669291%20L%2049.999999,93.464567%20Z'%20id='path3'%20/%3e%3cpath%20style='fill:%234ade80;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1'%20d='m%2045.042657,30.236221%209.008531,-7.559055%2022.521328,18.897638%20-9.008531,7.559056%20z'%20id='path5'%20/%3e%3cpath%20style='fill:none;fill-opacity:1;stroke:%234ade80;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1'%20d='M%2027.025594,49.133859%2047.29479,47.244096%2045.042657,64.25197'%20id='path6'%20/%3e%3c/svg%3e",ILt="data:image/svg+xml,%3csvg%20fill='%23261230'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAstral%3c/title%3e%3cpath%20d='M1.44%200C.6422%200%200%20.6422%200%201.44v21.12C0%2023.3578.6422%2024%201.44%2024h21.12c.7978%200%201.44-.6422%201.44-1.44V1.44C24%20.6422%2023.3578%200%2022.56%200Zm4.7998%204.8h11.5199c.7953%200%201.44.6447%201.44%201.44V19.2h-6.624v-4.32h-1.152v4.32H4.8V6.24c0-.7953.6446-1.44%201.4398-1.44m4.032%205.472v1.152h3.456v-1.152z'/%3e%3c/svg%3e",PLt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1.34em'%20height='1em'%20viewBox='0%200%20256%20192'%3e%3cpath%20fill='%232d4552'%20d='M84.38%20108.352c-9.556%202.712-15.826%207.467-19.956%2012.218c3.956-3.461%209.255-6.639%2016.402-8.665c7.311-2.072%2013.548-2.057%2018.702-1.062v-4.03c-4.397-.402-9.437-.082-15.148%201.539M63.987%2074.475l-35.49%209.35s.646.914%201.844%202.133l30.092-7.93s-.427%205.495-4.13%2010.41c7.005-5.299%207.684-13.963%207.684-13.963m29.709%2083.41c-49.946%2013.452-76.37-44.43-84.37-74.472c-3.696-13.868-5.31-24.37-5.74-31.148a11.5%2011.5%200%200%201%20.025-1.84C1.021%2050.58-.22%2051.927.032%2055.82c.43%206.773%202.044%2017.275%205.74%2031.147c7.997%2030.038%2034.424%2087.92%2084.37%2074.468c10.871-2.929%2019.038-8.263%2025.17-15.073c-5.652%205.104-12.724%209.123-21.616%2011.523M103.08%2039.05v3.555h19.59c-.401-1.259-.806-2.393-1.208-3.555z'/%3e%3cpath%20fill='%232d4552'%20d='M127.05%2068.325c8.81%202.503%2013.47%208.68%2015.933%2014.146l9.824%202.79s-1.34-19.132-18.645-24.047c-16.189-4.6-26.151%208.995-27.363%2010.754c4.71-3.355%2011.586-6.102%2020.251-3.643m78.197%2014.234c-16.204-4.62-26.162%209.003-27.356%2010.737c4.713-3.351%2011.586-6.099%2020.247-3.629c8.797%202.506%2013.452%208.676%2015.923%2014.146l9.837%202.8s-1.361-19.135-18.651-24.054m-9.76%2050.443l-81.718-22.845s.885%204.485%204.279%2010.293l68.803%2019.234c5.664-3.277%208.636-6.682%208.636-6.682m-56.655%2049.174C74.127%20164.828%2081.949%2082.386%2092.419%2043.32c4.311-16.1%208.743-28.066%2012.419-36.088c-2.193-.451-4.01.704-5.804%204.354C95.13%2019.5%2090.14%2032.387%2085.312%2050.427c-10.467%2039.066-18.29%20121.506%2046.412%20138.854c30.497%208.17%2054.256-4.247%2071.966-23.749c-16.81%2015.226-38.274%2023.763-64.858%2016.644'/%3e%3cpath%20fill='%23e2574c'%20d='M103.081%20138.565v-16.637l-46.223%2013.108s3.415-19.846%2027.522-26.684c7.311-2.072%2013.549-2.058%2018.701-1.063V39.05h23.145c-2.52-7.787-4.958-13.782-7.006-17.948c-3.387-6.895-6.859-2.324-14.741%204.269c-5.552%204.638-19.583%2014.533-40.698%2020.222c-21.114%205.694-38.185%204.184-45.307%202.95c-10.097-1.742-15.378-3.96-14.884%203.721c.43%206.774%202.043%2017.277%205.74%2031.148c7.996%2030.039%2034.424%2087.92%2084.37%2074.468c13.046-3.515%2022.254-10.464%2028.637-19.32h-19.256zm-74.588-54.74l35.494-9.35s-1.034%2013.654-14.34%2017.162c-13.31%203.504-21.154-7.812-21.154-7.812'/%3e%3cpath%20fill='%232ead33'%20d='M236.664%2039.84c-9.226%201.617-31.361%203.632-58.716-3.7c-27.363-7.328-45.517-20.144-52.71-26.168c-10.197-8.54-14.682-14.476-19.096-5.498c-3.902%207.918-8.893%2020.805-13.723%2038.846c-10.466%2039.066-18.289%20121.505%2046.413%20138.853c64.687%2017.333%2099.126-57.978%20109.593-97.047c4.83-18.037%206.948-31.695%207.53-40.502c.665-9.976-6.187-7.08-19.29-4.784M106.668%2072.161s10.196-15.859%2027.49-10.943c17.305%204.915%2018.645%2024.046%2018.645%2024.046zm42.215%2071.163c-30.419-8.91-35.11-33.167-35.11-33.167l81.714%2022.846c0-.004-16.494%2019.12-46.604%2010.32m28.89-49.85s10.183-15.847%2027.474-10.918c17.29%204.923%2018.651%2024.054%2018.651%2024.054z'/%3e%3cpath%20fill='%23d65348'%20d='m86.928%20126.51l-30.07%208.522s3.266-18.609%2025.418-25.983L65.25%2045.147l-1.471.447c-21.115%205.694-38.185%204.184-45.307%202.95c-10.097-1.741-15.379-3.96-14.885%203.722c.43%206.774%202.044%2017.276%205.74%2031.147c7.997%2030.039%2034.425%2087.92%2084.37%2074.468l1.471-.462zM28.493%2083.825l35.494-9.351s-1.034%2013.654-14.34%2017.162c-13.31%203.504-21.154-7.811-21.154-7.811'/%3e%3cpath%20fill='%231d8d22'%20d='m150.255%20143.658l-1.376-.335c-30.419-8.91-35.11-33.166-35.11-33.166l42.137%2011.778l22.308-85.724l-.27-.07c-27.362-7.329-45.516-20.145-52.71-26.17c-10.196-8.54-14.682-14.475-19.096-5.497c-3.898%207.918-8.889%2020.805-13.719%2038.846c-10.466%2039.066-18.289%20121.505%2046.413%20138.852l1.326.3zM106.668%2072.16s10.196-15.859%2027.49-10.943c17.305%204.915%2018.645%2024.046%2018.645%2024.046z'/%3e%3cpath%20fill='%23c04b41'%20d='m88.46%20126.072l-8.064%202.289c1.906%2010.74%205.264%2021.047%2010.534%2030.152c.918-.202%201.828-.376%202.762-.632c2.449-.66%204.72-1.479%206.906-2.371c-5.89-8.74-9.785-18.804-12.137-29.438m-3.148-75.644c-4.144%2015.467-7.852%2037.73-6.831%2060.06c1.826-.793%203.756-1.532%205.9-2.14l1.492-.334c-1.82-23.852%202.114-48.157%206.546-64.694a323%20323%200%200%201%203.373-11.704a105%20105%200%200%201-5.974%203.547a307%20307%200%200%200-4.506%2015.265'/%3e%3c/svg%3e",DLt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='512'%20height='512'%20version='1.1'%20viewBox='0%200%20135.47%20135.47'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m67.733%2067.733%2029.33%2016.933-29.33%2050.8c37.408%200%2067.733-30.325%2067.733-67.733%200-12.341-3.3168-23.901-9.0837-33.867h-58.65z'%20fill='%23afccf9'/%3e%3cpath%20d='m67.733-1e-6c-25.07%200-46.942%2013.63-58.654%2033.875l29.324%2050.792%2029.33-16.933v-33.867h58.65c-11.714-20.24-33.583-33.867-58.65-33.867z'%20fill='%231767d1'/%3e%3cpath%20d='m0%2067.733c0%2037.408%2030.324%2067.733%2067.733%2067.733l29.33-50.8-29.33-16.933-29.33%2016.933-29.324-50.792c-5.7637%209.9632-9.0794%2021.519-9.0794%2033.858'%20fill='%23679ef5'/%3e%3cpath%20d='m101.6%2067.733c0%2018.704-15.163%2033.867-33.867%2033.867-18.704%200-33.867-15.163-33.867-33.867s15.163-33.867%2033.867-33.867c18.704%200%2033.867%2015.163%2033.867%2033.867'%20fill='%23fff'/%3e%3cpath%20d='m95.25%2067.733c0%2015.197-12.32%2027.517-27.517%2027.517-15.197%200-27.517-12.32-27.517-27.517%200-15.197%2012.32-27.517%2027.517-27.517%2015.197%200%2027.517%2012.32%2027.517%2027.517'%20fill='%231a74e7'/%3e%3c/svg%3e",MLt="data:image/svg+xml,%3csvg%20fill='%23F03C2E'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGit%3c/title%3e%3cpath%20d='M13.09%2023.549a1.54%201.54%200%200%201-2.18%200L.451%2013.089a1.54%201.54%200%200%201%200-2.179l7.191-7.19%202.733%202.733a1.85%201.85%200%200%200%20.964%202.326v6.66a1.849%201.849%200%201%200%201.54%200V8.957l2.508%202.508a1.85%201.85%200%201%200%201.09-1.09l-2.634-2.634a1.85%201.85%200%200%200-2.378-2.377L8.73%202.63%2010.91.451a1.54%201.54%200%200%201%202.179%200l10.459%2010.46a1.54%201.54%200%200%201%200%202.179z'/%3e%3c/svg%3e",LLt="data:image/svg+xml,%3csvg%20fill='%23073551'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3ecurl%3c/title%3e%3cpath%20d='M.803%2014.8169c0-.5342.433-.9665.9665-.9665.5335%200%20.9665.4323.9665.9665%200%20.5335-.433.9657-.9665.9657-.5335%200-.9666-.4322-.9666-.9657m2.736%200c0-.1963-.0532-.376-.1119-.5525-.2344-.7024-.876-1.2169-1.6575-1.2169-.1249%200-.2344.0465-.3524.0708C.6149%2013.2865%200%2013.9646%200%2014.817c0%20.9764.7923%201.7694%201.7695%201.7694.9772%200%201.7694-.793%201.7694-1.7694m-1.7694-7.149c.5335%200%20.9665.433.9665.9665%200%20.5335-.433.9665-.9665.9665-.5343%200-.9666-.433-.9666-.9665%200-.5335.4323-.9665.9666-.9665m0%202.7359c.9772%200%201.7694-.7923%201.7694-1.7694%200-.1956-.0532-.376-.1119-.5525-.2344-.7024-.8767-1.2169-1.6575-1.2169-.1249%200-.2344.0465-.3524.0716C.6149%207.104%200%207.782%200%208.6344c0%20.9771.7923%201.7694%201.7695%201.7694m13.221-5.694c-.5342%200-.9665-.433-.9665-.9664a.966.966%200%2001.9666-.9665c.5335%200%20.9658.4322.9658.9665%200%20.5334-.4323.9664-.9658.9664m-9.6%2016.5133c-.5335%200-.9666-.433-.9666-.9665%200-.5342.433-.9665.9666-.9665a.966.966%200%2001.9665.9665c0%20.5335-.4323.9665-.9665.9665m9.6-19.2491c-.978%200-1.7695.7922-1.7695%201.7694%200%20.2085.0525.4025.1187.5882L5.039%2018.5581c-.803.1681-1.4179.8462-1.4179%201.6985%200%20.9772.7923%201.7694%201.7695%201.7694.9772%200%201.7694-.7922%201.7694-1.7694%200-.1963-.0525-.3759-.111-.5525l8.3427-14.2728c.7778-.1865%201.3683-.8531%201.3683-1.688%200-.977-.793-1.7693-1.7694-1.7693m7.24%202.7359c-.5343%200-.9666-.433-.9666-.9665a.966.966%200%2001.9665-.9665c.5335%200%20.9666.4322.9666.9665%200%20.5334-.433.9665-.9666.9665M12.6313%2021.223c-.5343%200-.9665-.433-.9665-.9665a.966.966%200%2001.9665-.9665c.5335%200%20.9658.4323.9658.9665%200%20.5335-.4323.9665-.9658.9665M22.2305%201.974c-.9772%200-1.7694.7922-1.7694%201.7694%200%20.2085.0525.4025.1187.5882l-8.3009%2014.2265c-.8021.1681-1.417.8462-1.417%201.6985%200%20.9772.7922%201.7694%201.7694%201.7694.9764%200%201.7687-.7922%201.7687-1.7694%200-.1963-.0525-.3759-.1111-.5525l8.3427-14.2728C23.4094%205.2448%2024%204.5782%2024%203.7433c0-.977-.7923-1.7693-1.7695-1.7693'/%3e%3c/svg%3e",$Lt="data:image/svg+xml,%3csvg%20fill='%23007808'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eFFmpeg%3c/title%3e%3cpath%20d='M21.72%2017.91V6.5l-.53-.49L9.05%2018.52l-1.29-.06L24%201.53l-.33-.95-11.93%201-5.75%206.6v-.23l4.7-5.39-1.38-.77-9.11.77v2.85l1.91.46v.01l.19-.01-.56.66v10.6c.609-.126%201.22-.241%201.83-.36L14.12%205.22l.83-.04L0%2021.44l9.67.82%201.35-.77%206.82-6.74v2.15l-5.72%205.57%2011.26.95.35-.94v-3.16l-3.29-.18c.434-.403.858-.816%201.28-1.23z'/%3e%3c/svg%3e",FLt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%201080%201080'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2030.3.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.3%20Build%20182)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23ff0;%20}%20.st1%20{%20fill:%20%23333;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M660.52,419.49l-195.15-52.98c-15.84-4.3-19.16-25.29-5.43-34.28l169.23-110.7-9.91-201.97c-.8-16.39,18.13-26.04,30.92-15.76l157.57,126.74,189.03-71.84c15.34-5.83,30.37,9.2,24.54,24.54l-71.84,189.03,126.74,157.57c10.29,12.79.64,31.73-15.76,30.92l-201.97-9.91-110.7,169.23c-8.98,13.73-29.98,10.41-34.28-5.43l-52.98-195.15h-.01Z'/%3e%3cpath%20class='st1'%20d='M603.34,476.66l32.94,121.68,4.45,16.23-429.11,429.11c-48.45,48.45-126.85,48.45-175.3,0C12.16,1019.51,0,987.89,0,956.15s12.02-63.48,36.31-87.77l429.11-429.11,16.35,4.33,121.56,33.06h0Z'/%3e%3c/svg%3e";function VQ(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:o.jsx("path",{d:"M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91 .58 .11 .79-.25.79-.56v-2.02c-3.2.7-3.88-1.36-3.88-1.36-.52-1.33-1.28-1.69-1.28-1.69-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.71 1.26 3.37.96.1-.75.4-1.26.73-1.55-2.56-.29-5.25-1.28-5.25-5.7 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.47.11-3.06 0 0 .97-.31 3.16 1.18A10.98 10.98 0 0 1 12 6.11c.98 0 1.96.13 2.87.39 2.19-1.49 3.16-1.18 3.16-1.18.63 1.59.23 2.77.11 3.06.74.81 1.19 1.84 1.19 3.1 0 4.43-2.7 5.4-5.27 5.69.42.36.78 1.06.78 2.14v3.04c0 .31.21.67.8.56A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5Z"})})}yo.registerLanguage("bash",qB);const BLt=48;function ULt(e,t=BLt){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function QLt(e){return yo.highlight(e,{language:"bash",ignoreIllegals:!0}).value}function zLt({status:e}){return e==="succeeded"?o.jsx(Hu,{"aria-hidden":!0}):e==="failed"?o.jsx(o4,{"aria-hidden":!0}):e==="running"?o.jsx(mi,{className:"studio-build-progress__spinner","aria-hidden":!0}):o.jsx(YFe,{"aria-hidden":!0})}function Ite(e,t){if(!e)return"";const n=Date.parse(e);return Number.isNaN(n)?"":new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(n)}function VLt({steps:e,log:t,logError:n="",logTruncated:i=!1,logUpdatedAt:r,loading:s=!1}){const{t:a,i18n:l}=Oe("ui"),c=m.useRef(null),u=m.useRef(!0),[d,f]=m.useState(!1),h=m.useMemo(()=>QLt(t),[t]);m.useEffect(()=>{const g=c.current;g&&t&&u.current&&(g.scrollTop=g.scrollHeight)},[t]);const p=async()=>{try{await navigator.clipboard.writeText(t),f(!0),window.setTimeout(()=>f(!1),1500)}catch{f(!1)}};return o.jsxs("div",{className:"studio-build-progress",children:[o.jsx("ol",{className:"studio-build-progress__steps","aria-label":a("studioBuildProgress.steps"),children:e.map(g=>o.jsxs("li",{className:`is-${g.status}`,children:[o.jsx("span",{className:"studio-build-progress__step-icon",children:o.jsx(zLt,{status:g.status})}),o.jsx("span",{children:g.label})]},g.key))}),o.jsxs("section",{className:"studio-build-progress__log","aria-label":a("studioBuildProgress.log"),children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("strong",{children:a("studioBuildProgress.log")}),o.jsxs("span",{children:[a(s?"studioBuildProgress.syncing":n?"studioBuildProgress.loadFailed":"studioBuildProgress.synced"),i?a("studioBuildProgress.recentOnly"):"",Ite(r,l.resolvedLanguage??l.language)?` · ${Ite(r,l.resolvedLanguage??l.language)}`:""]})]}),o.jsxs(Ft,{type:"button",color:"secondary",variant:"ghost",size:"sm",disabled:!t,onClick:()=>void p(),"aria-label":a(d?"studioBuildProgress.copiedLog":"studioBuildProgress.copyLog"),children:[d?o.jsx(Hu,{"aria-hidden":!0}):o.jsx(Vj,{"aria-hidden":!0}),a(d?"studioBuildProgress.copied":"studioBuildProgress.copy")]})]}),t?o.jsx("pre",{ref:c,tabIndex:0,"aria-label":a("studioBuildProgress.logContent"),onScroll:g=>{u.current=ULt(g.currentTarget)},children:o.jsx("code",{className:"hljs language-bash",dangerouslySetInnerHTML:{__html:h}})}):o.jsx("div",{className:`studio-build-progress__log-empty${n?" is-error":""}`,children:n||a(s?"studioBuildProgress.waiting":"studioBuildProgress.empty")})]})]})}function Pte({name:e,description:t,icon:n,selected:i,disabled:r=!1,onChange:s,className:a=""}){return o.jsxs("button",{type:"button",className:`studio-package-option${i?" is-selected":""}${a?` ${a}`:""}`,"aria-pressed":i,disabled:r,onClick:()=>s(!i),children:[o.jsx("span",{className:"studio-package-option__icon","aria-hidden":"true",children:n}),o.jsxs("span",{className:"studio-package-option__content",children:[o.jsx("strong",{children:e}),t?o.jsx("span",{children:t}):null]}),o.jsx("span",{className:"studio-package-option__action","aria-hidden":"true",children:i?o.jsx(jFe,{}):o.jsx(PFe,{})})]})}function fg(e,t){return e[t]|e[t+1]<<8}function U0(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}async function HLt(e){const t=new DecompressionStream("deflate-raw"),n=new Blob([new Uint8Array(e)]).stream().pipeThrough(t);return new Uint8Array(await new Response(n).arrayBuffer())}async function yje(e,t={}){let i=-1;for(let u=e.length-22;u>=0&&u>e.length-65557;u--)if(U0(e,u)===101010256){i=u;break}if(i<0)throw new Error(It("helpers.zip.invalid"));const r=fg(e,i+10);if(t.maxEntries!==void 0&&r>t.maxEntries)throw new Error(It("helpers.zip.tooManyFiles",{count:t.maxEntries}));let s=U0(e,i+16);const a=new TextDecoder("utf-8"),l=[];let c=0;for(let u=0;ut.maxUncompressedBytes)throw new Error(It("helpers.zip.tooLarge"));const x=fg(e,v+26),w=fg(e,v+28),O=v+30+x+w,k=e.subarray(O,O+f);let S;if(d===0)S=k;else if(d===8)S=await HLt(k);else{s+=46+p+g+b;continue}l.push({name:y,text:a.decode(S)}),s+=46+p+g+b}return l}const m8=/(^|\/)skill\.md$/i;function qLt(e){const t=(e??"").replace(/\r\n?/g,` +`),x=(e==null?void 0:e.pendingMessage)||s;if(m.useEffect(()=>{e&&f(u)},[e==null?void 0:e.status,u]),m.useEffect(()=>{if(!d||!g)return;const C=c.current;C&&(C.scrollTop=C.scrollHeight)},[d,g,y]),!e||!e.text&&e.status!=="error"&&!e.pendingMessage)return null;const w=D5t(e.updatedAt,l.resolvedLanguage??l.language),O=e.status==="complete"?a("agentWorkspace.logStatus.synced"):e.status==="error"?a("agentWorkspace.logStatus.failed"):a("agentWorkspace.logStatus.syncing"),k=e.omittedEarly?a("agentWorkspace.logStatus.earlyOmitted"):e.snapshotTruncated?a("agentWorkspace.logStatus.recentOnly"):e.truncated?a("agentWorkspace.logStatus.partiallyOmitted"):"",S=[O,e.lineCount?a("agentWorkspace.logLines",{count:e.lineCount}):"",k,w].filter(Boolean).join(" · ");async function E(){try{await navigator.clipboard.writeText(b),p(!0),window.setTimeout(()=>p(!1),1500)}catch{p(!1)}}return o.jsxs("section",{className:`aw-deploy-log is-${e.status}${d?"":" is-collapsed"}`,"aria-label":i,children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("strong",{children:n}),o.jsx("span",{children:S})]}),o.jsxs("div",{className:"aw-deploy-log-actions",children:[g&&o.jsx("button",{type:"button",onClick:()=>f(C=>!C),children:a(d?"common.collapse":"common.expand")}),g&&o.jsxs("button",{type:"button",onClick:()=>void E(),"aria-label":h?a("agentWorkspace.copiedLabel",{label:r}):a("agentWorkspace.copyLabel",{label:r}),title:h?a("agentWorkspace.copied"):a("agentWorkspace.copyLabel",{label:r}),children:[h?o.jsx(Vu,{"aria-hidden":!0}):o.jsx(Uj,{"aria-hidden":!0}),o.jsx("span",{children:a(h?"agentWorkspace.copied":"agentWorkspace.copy")})]})]})]}),d&&(g?o.jsx("pre",{ref:c,children:y}):o.jsx("div",{className:"aw-deploy-log-empty",children:x}))]})}function M5t({task:e}){var n;const{t}=xe("ui");return o.jsx(pje,{log:e.buildLog,autoExpand:((n=e.buildLog)==null?void 0:n.status)!=="complete"&&(e.status==="running"||e.status==="error")&&hje(e,t)===1,title:t("agentWorkspace.buildLog"),ariaLabel:t("agentWorkspace.buildLog"),copyLabel:t("agentWorkspace.buildLog"),defaultPendingMessage:t("agentWorkspace.waitingBuildLog")})}function L5t({task:e}){var n;const{t}=xe("ui");return o.jsx(pje,{log:e.githubLog,autoExpand:((n=e.githubLog)==null?void 0:n.status)!=="complete"&&(e.status==="running"||e.status==="error")&&e.phase==="github",title:t("agentWorkspace.githubMountLog"),ariaLabel:t("agentWorkspace.githubDeliveryMountLog"),copyLabel:t("agentWorkspace.githubMountLog"),defaultPendingMessage:t("agentWorkspace.waitingGithubMountLog")})}function $5t({task:e,onReturnToEdit:t}){const{t:n}=xe("ui"),i=fje(e,n),r=hje(e,n),s=e.status==="success"?100:Math.max(6,Math.min(100,e.pct??6)),a=e.status==="running"?n("agentWorkspace.deployStatus.running"):e.status==="success"?n("agentWorkspace.deployStatus.success"):e.status==="error"?n("agentWorkspace.deployStatus.error"):n("agentWorkspace.deployStatus.cancelled");return o.jsxs("section",{className:`aw-deploy-progress-card is-${e.status}`,"aria-live":"polite",children:[o.jsxs("div",{className:"aw-deploy-progress-head",children:[o.jsxs("div",{children:[o.jsx("span",{className:"aw-deploy-progress-icon","aria-hidden":!0,children:e.status==="running"?o.jsx(hi,{className:"spin"}):e.status==="success"?o.jsx(YFe,{}):e.status==="error"?o.jsx(xbe,{}):o.jsx(s4,{})}),o.jsxs("div",{children:[o.jsx("h3",{children:a}),o.jsx("p",{children:e.runtimeName})]})]}),o.jsx("strong",{children:e.status==="running"?`${Math.round(s)}%`:e.label})]}),o.jsx("div",{className:"aw-deploy-progress-track",role:"progressbar","aria-label":n("agentWorkspace.deploymentProgress"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(s),children:o.jsx("span",{style:{width:`${s}%`}})}),o.jsx("ol",{className:"aw-deploy-steps",children:i.map((l,c)=>{const u=e.status==="success"||cnew Set),[ht,Yt]=m.useState(()=>new Set),[hn,tn]=m.useState(!1),[Ei,Pn]=m.useState(""),[gi,oi]=m.useState(null),[bi,Sn]=m.useState([]),[rr,ci]=m.useState([]),[Vi,ds]=m.useState(!1),[kr,$r]=m.useState(""),[_s,Fr]=m.useState(""),[vs,Ns]=m.useState(0),[fs,ba]=m.useState([]),[jr,qs]=m.useState(!1),[Ia,Jr]=m.useState(""),[ya,sa]=m.useState(0),[hs,io]=m.useState(null),[ui,kl]=m.useState(1),[Hn,Pa]=m.useState(!1),[ar,js]=m.useState(""),[Ho,Da]=m.useState(0),[be,We]=m.useState(!1),[jt,ln]=m.useState(()=>new Set),[Dn,Hi]=m.useState(!1),[li,Br]=m.useState(""),[Ma,La]=m.useState(""),[xs,Ur]=m.useState(()=>new Set),es=m.useRef(!1),ts=m.useRef(""),Rr=m.useRef(null),pc=m.useRef(0),aa=m.useRef(0),El=m.useRef(0),[qo,ed]=m.useState(g5t),[Cl,td]=m.useState("");m.useEffect(()=>{e.length!==0&&ed(ee=>ee.map((Ce,Ue)=>Ue===0&&Ce.agentIds.length===0?{...Ce,agentIds:e.slice(0,2).map(ft=>ft.id)}:Ce))},[e]);const Oo=m.useMemo(()=>{const ee=new Map;for(const Ce of e)Ce.runtimeId&&ee.set(Ce.runtimeId,Ce);return ee},[e]),cu=m.useMemo(()=>{var Ce;const ee=new Map;for(const Ue of t){const ft=(Ce=Ue.deploymentTarget)==null?void 0:Ce.runtimeId;if(!ft||!Oo.has(ft))continue;const sn=ee.get(ft);(!sn||Ue.updatedAt>sn.updatedAt)&&ee.set(ft,Ue)}return ee},[Oo,t]),Wo=m.useMemo(()=>{const ee=new Map;for(const Ce of f){if(!Ce.runtimeId)continue;const Ue=ee.get(Ce.runtimeId);(!Ue||Ce.startedAt>Ue.startedAt)&&ee.set(Ce.runtimeId,Ce)}return ee},[f]),uu=m.useMemo(()=>{const ee=ze.trim().toLowerCase();return ee?e.filter(Ce=>{const Ue=Ce.runtimeId?cu.get(Ce.runtimeId):void 0,ft=Ce.runtimeId?Wo.get(Ce.runtimeId):void 0;return[Ce.label,Ce.app,Ce.host??"",(Ue==null?void 0:Ue.draft.name)??"",(Ue==null?void 0:Ue.draft.description)??"",(ft==null?void 0:ft.runtimeName)??""].join(" ").toLowerCase().includes(ee)}):e},[e,Wo,ze,cu]),ro=m.useMemo(()=>{const ee=ze.trim().toLowerCase();return t.filter(Ce=>{var ft;const Ue=(ft=Ce.deploymentTarget)==null?void 0:ft.runtimeId;return Ue&&Oo.has(Ue)?!1:ee?`${Ce.draft.name} ${Ce.draft.description}`.toLowerCase().includes(ee):!0})},[Oo,t,ze]),nd=m.useMemo(()=>t.filter(ee=>{var Ue;const Ce=(Ue=ee.deploymentTarget)==null?void 0:Ue.runtimeId;return!Ce||!Oo.has(Ce)}).length,[Oo,t]),af=m.useMemo(()=>{const ee=ze.trim().toLowerCase();return ee?qo.filter(Ce=>Ce.name.toLowerCase().includes(ee)):qo},[qo,ze]),ce=e.find(ee=>ee.id===I),Fn=t.find(ee=>ee.id===X),Gn=h?f.find(ee=>ee.id===h):void 0,mc=ce!=null&&ce.runtimeId?cu.get(ce.runtimeId):void 0,ei=y?mn:I&&r===I?i:null,Ri=(ei==null?void 0:ei.appName)||(ce==null?void 0:ce.runtimeApp)||(ce==null?void 0:ce.app)||"",Tl=(c&&(ce!=null&&ce.runtimeId)?cte:cte.filter(ee=>ee!=="usage")).map(ee=>({id:ee,label:A(`agentWorkspace.sections.${ee}`)})),gc=JSON.stringify([(ce==null?void 0:ce.runtimeId)??"",(ce==null?void 0:ce.region)??"cn-beijing",Ri,ui]),ps=(hs==null?void 0:hs.requestKey)===gc?hs.value:null,Al=`${(ce==null?void 0:ce.region)??"cn-beijing"}:${(ce==null?void 0:ce.runtimeId)??""}`,bc=(Te==null?void 0:Te.requestKey)===Al?Te.value:"",Er=(te==null?void 0:te.requestKey)===Al?te:null,Bn=!!((l0=Er==null?void 0:Er.apiApps)!=null&&l0.length),$a=!!(Er!=null&&Er.a2a),ge=((ZE=Er==null?void 0:Er.apiApps)==null?void 0:ZE[0])??Ri,nt=(q==null?void 0:q.endpoint)??"",Tt=x5t(((Oc=Er==null?void 0:Er.a2a)==null?void 0:Oc.endpoint)??"",nt),dn=(ce==null?void 0:ce.runtimeApp)||"",nn=JSON.stringify([(ce==null?void 0:ce.runtimeId)??"",(ce==null?void 0:ce.region)??"",(ce==null?void 0:ce.currentVersion)??null,dn]),cn=l&&(ce!=null&&ce.runtimeId)&&ce.region&&ut===0?v4({runtimeId:ce.runtimeId,region:ce.region,appName:dn,currentVersion:ce.currentVersion}):null,Bt=(je==null?void 0:je.requestKey)===nn?je.value:cn,Ut=Bt!=null&&Bt.reason?Pd(Bt.reason,R.resolvedLanguage||R.language):"",Z=(Bt==null?void 0:Bt.warnings.filter(ee=>Pd(ee,R.resolvedLanguage||R.language)))??[];m.useEffect(()=>{const ee=pc.current+1;pc.current=ee,ve(null),Wt("");const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"";if(!l||!Ce||!Ue){it(!1);return}const ft=ut===0?v4({runtimeId:Ce,region:Ue,appName:dn,currentVersion:ce==null?void 0:ce.currentVersion}):null;if(ft){ve({requestKey:nn,value:ft}),it(!1);return}const sn=new AbortController;let Ye,ti=0;const la=60;it(!0);const Xn=Rs=>{Zj({runtimeId:Ce,region:Ue,appName:dn,currentVersion:ce==null?void 0:ce.currentVersion,signal:sn.signal,force:Rs&&ut>0}).then(So=>{var tC,Wm;if(ee!==pc.current)return;const d1=So.recoveryStatus==="preparing";if(So.runtime.runtimeId!==Ce||So.runtime.region!==Ue||!d1&&dn&&((tC=So.agent)==null?void 0:tC.appName)!==dn||So.canUpdate&&!((Wm=So.agent)!=null&&Wm.appName)){Wt(A("agentWorkspace.errors.updateCapabilityMismatch"));return}if(ve({requestKey:nn,value:So}),it(!1),!!d1){if(ti+=1,ti>=la){Wt(A("agentWorkspace.errors.updateConfigRestoring"));return}Ye=window.setTimeout(()=>Xn(!1),1e3)}}).catch(()=>{ee!==pc.current||sn.signal.aborted||Wt(A("agentWorkspace.errors.checkUpdateCapability"))}).finally(()=>{ee===pc.current&&!sn.signal.aborted&&it(!1)})};return Xn(!0),()=>{sn.abort(),Ye!=null&&window.clearTimeout(Ye)}},[l,dn,ut,ce==null?void 0:ce.currentVersion,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId,nn]);const we=m.useMemo(()=>{const ee=new Map(e.map((Ue,ft)=>[Ue.id,ft])),Ce=new Map(n.map((Ue,ft)=>[Ue,ft]));return[...uu].sort((Ue,ft)=>{const sn=Ue.runtimeId?Wo.get(Ue.runtimeId):void 0,Ye=ft.runtimeId?Wo.get(ft.runtimeId):void 0,ti=(sn==null?void 0:sn.status)==="running"?sn.startedAt:0,la=(Ye==null?void 0:Ye.status)==="running"?Ye.startedAt:0;if(ti!==la)return la-ti;const Xn=Ce.get(Ue.id),Rs=Ce.get(ft.id);return Xn!=null&&Rs!=null?Xn-Rs:Xn!=null?-1:Rs!=null?1:(ee.get(Ue.id)??0)-(ee.get(ft.id)??0)})},[n,e,uu,Wo]),Xe=(ce==null?void 0:ce.label)||(ei==null?void 0:ei.name)||(Fn==null?void 0:Fn.draft.name)||(Gn==null?void 0:Gn.agentName)||((JE=Gn==null?void 0:Gn.agentDraft)==null?void 0:JE.name)||A("agentWorkspace.noAgentSelected"),Ht=qo.find(ee=>ee.id===Cl),un=we.filter(ee=>ee.canDelete===!0),jn=we.filter(ee=>Wi.has(ee.id)&&ee.canDelete===!0),di=ro.filter(ee=>ht.has(ee.id)),Ki=un.length+ro.length,Ci=jn.length+di.length,Un=m.useMemo(()=>{var Ce;if(Gn!=null&&Gn.agentDraft)return Gn.agentDraft;if(Fn!=null&&Fn.draft)return Fn.draft;const ee=(Ce=ce==null?void 0:ce.region)!=null&&Ce.startsWith("ap-")?"byteplus":"volcengine";return Bt!=null&&Bt.agent&&(Bt.recoveryStatus==="complete"||Bt.recoveryStatus==="draft-only")?yB(Bt.agent,ee,Bt.runtime.configuredEnvKeys):E5t(ei,Ri||(ce==null?void 0:ce.label)||"agent",ee)},[ei,Ri,ce==null?void 0:ce.label,ce==null?void 0:ce.region,Fn==null?void 0:Fn.draft,Gn==null?void 0:Gn.agentDraft,Bt]),Gi=((Yh=ei==null?void 0:ei.draft)==null?void 0:Yh.harnessSidecar)??wst(q==null?void 0:q.envs),Fa=Gi?Lx.filter(ee=>Gi.componentOverrides[ee]):[],Mn=Fn?a?"":A("agentWorkspace.errors.noCreatePermission"):l?ce!=null&&ce.runtimeId?ce.region?He?A("agentWorkspace.errors.checkingUpdateConfig"):Ae||(Bt?Bt.recoveryStatus!=="complete"&&Bt.recoveryStatus!=="draft-only"?Ut||A("agentWorkspace.errors.originalConfigUnavailable"):Bt.canUpdate?(eC=Bt.agent)!=null&&eC.appName?"":A("agentWorkspace.errors.agentInfoMissing"):Ut||A("agentWorkspace.errors.updateUnsupported"):A("agentWorkspace.errors.updateCapabilityPending")):A("agentWorkspace.errors.runtimeRegionMissing"):A("agentWorkspace.errors.cloudOnlyUpdate"):A("agentWorkspace.errors.noManagePermission"),yn="aw-update-disabled-reason",Qe=m.useMemo(()=>{if(ei)return ei.tools;const ee=(Un.builtinTools??[]).map(Ce=>{var Ue;return((Ue=Mx.find(ft=>ft.id===Ce))==null?void 0:Ue.label)??Ce});return Array.from(new Set([...Un.tools,...ee,...(Un.customTools??[]).map(Ce=>Ce.name),...(Un.mcpTools??[]).map(Ce=>Ce.name)].filter(Boolean)))},[Un,ei]),bn=m.useMemo(()=>ei?ei.skillsPreviewSupported?ei.skills.map(ee=>ee.name):null:Array.from(new Set([...(Un.selectedSkills??[]).map(ee=>ee.name),...Un.skills].filter(Boolean))),[Un,ei]),kn=m.useMemo(()=>{if(Gn)return Gn;if(Fn){const ee=f.filter(Ce=>Ce.draftId===Fn.id).sort((Ce,Ue)=>Ue.startedAt-Ce.startedAt)[0];return ee||f.filter(Ce=>{var Ue,ft;return((Ue=Ce.agentDraft)==null?void 0:Ue.name)===Fn.draft.name||Ce.agentName===Fn.draft.name||!!((ft=Fn.deploymentTarget)!=null&&ft.runtimeId)&&Ce.runtimeId===Fn.deploymentTarget.runtimeId}).sort((Ce,Ue)=>Ue.startedAt-Ce.startedAt)[0]}if(ce)return f.filter(ee=>!!ce.runtimeId&&ee.runtimeId===ce.runtimeId||ee.agentName===ce.label).sort((ee,Ce)=>Ce.startedAt-ee.startedAt)[0]},[f,ce,Fn,Gn]),or=!!(h&&kn&&kn.id===h),Ws=!!(kn&&(kn.status!=="success"||or)),du=(kn==null?void 0:kn.status)==="running",Gh=kn!=null&&kn.draftId?t.find(ee=>ee.id===kn.draftId)??(kn.agentDraft?{id:kn.draftId,draft:kn.agentDraft,updatedAt:kn.startedAt}:void 0):void 0,yc=m.useMemo(()=>R5t(Un),[Un]),vc=(ce==null?void 0:ce.currentVersion)??(q==null?void 0:q.currentVersion)??null,wo=vc??(Gn==null?void 0:Gn.startedAt)??"unknown",rd=ei?`runtime:${(ce==null?void 0:ce.runtimeId)??ei.name}:v${wo}:${yc}`:`draft:${(Gn==null?void 0:Gn.id)??(Fn==null?void 0:Fn.id)??(ce==null?void 0:ce.id)??Xe}:${yc}`;m.useEffect(()=>{M==="usage"&&!c&&B("basic")},[c,M]),m.useEffect(()=>{if(!h)return;const ee=f.find(Ue=>Ue.id===h),Ce=ee!=null&&ee.runtimeId?Oo.get(ee.runtimeId):void 0;if(Ce){Q(""),H(Ce.id),B("basic");return}H(""),Q(""),B("basic")},[Oo,f,h]),m.useEffect(()=>{if(!p){ts.current="";return}const ee=`${p}:${g}:${b}:${c}`;ts.current!==ee&&e.some(Ce=>Ce.id===p)&&(ts.current=ee,Q(""),H(p),B(g==="usage"&&!c?"basic":g),g==="evaluations"&&(_t(b),en("")))},[e,c,p,g,b]),m.useEffect(()=>{for(const ee of we.slice(0,8)){if(!ee.runtimeId)continue;const Ce=ee.region??"cn-beijing";Z0e(ee.runtimeId,Ce),Ybe(ee.runtimeId,Ce,ee.runtimeApp??"")}},[we]),m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing",ft=(ce==null?void 0:ce.runtimeApp)??"",sn=Ce?Xbe(Ce,Ue,ft):null;if(qt(sn),bt(""),st(!1),Nt(!!sn||!y||!Ce),!(!y||!Ce))return zF(Ce,Ue,ft,{force:!0}).then(Ye=>{ee||qt(Ye)}).catch(Ye=>{!ee&&!sn&&qt(null),ee||(st(Ye instanceof Ls&&Ye.unsupported),bt(A("agentWorkspace.errors.loadAgentInfo")))}).finally(()=>{ee||Nt(!0)}),()=>{ee=!0}},[y,ut,ce==null?void 0:ce.currentVersion,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeApp,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing";if(ba([]),Jr(""),M!=="optimizations"||!Ce){qs(!1);return}if(y&&!Ri){qs(!xt);return}return qs(!0),Bbe({runtimeId:Ce,region:Ue,appName:Ri}).then(ft=>{ee||ba(ft.groups)}).catch(()=>{ee||Jr(A("agentWorkspace.errors.loadOptimizations"))}).finally(()=>{ee||qs(!1)}),()=>{ee=!0}},[xt,y,ya,M,Ri,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{kl(1)},[ce==null?void 0:ce.runtimeId,Ri]),m.useEffect(()=>{const ee=El.current+1;El.current=ee;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing",ft=Ri;if(js(""),M!=="usage"||!Ce){Pa(!1);return}if(!ft){Pa(y&&!xt);return}const sn=new AbortController;return Pa(!0),F0e({runtimeId:Ce,region:Ue,appName:ft,page:ui,pageSize:y5t,signal:sn.signal}).then(Ye=>{if(ee===El.current){if(Ye.runtimeId!==Ce||Ye.appName!==ft||Ye.page!==ui){js(A("agentWorkspace.errors.usageMismatch"));return}io({requestKey:gc,value:Ye})}}).catch(()=>{ee!==El.current||sn.signal.aborted||js(A("agentWorkspace.errors.loadUsage"))}).finally(()=>{ee===El.current&&Pa(!1)}),()=>{sn.abort()}},[ui,Ho,gc,xt,y,M,Ri,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{aa.current+=1,rt(null),Me(!1),qe(!1),Ve(""),Se("api-server")},[Al,M]);function of(){aa.current+=1,rt(null),Me(!1),qe(!1),Ve("")}function lf(ee){ee!==fe&&(of(),Se(ee))}async function cf(){if(Be){of();return}const ee=(ce==null?void 0:ce.runtimeId)??"",Ce=(ce==null?void 0:ce.region)??"cn-beijing";if(!ee)return;const Ue=aa.current+1;aa.current=Ue,qe(!0),Ve("");try{const ft=await G0e(ee,Ce);if(Ue!==aa.current)return;rt({requestKey:Al,value:ft}),Me(!0)}catch(ft){if(Ue!==aa.current)return;rt(null),Me(!1),Ve(ft instanceof Error?ft.message:A("agentWorkspace.errors.loadApiKey"))}finally{Ue===aa.current&&qe(!1)}}m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing",ft=Ce?Y0e(Ce,Ue):null;if(U(ft),gt(""),!!Ce)return XF(Ce,Ue,{force:!0}).then(sn=>{ee||U(sn)}).catch(()=>{!ee&&!ft&&U(null),ee||gt(A("agentWorkspace.errors.loadRuntimeDetails"))}),()=>{ee=!0}},[ut,ce==null?void 0:ce.currentVersion,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"";if(Ke(""),M!=="versions"||!Ce){he(!1),Ce||Le(null);return}return he(!0),W2(Ce).then(Ue=>{ee||Le(Ue)}).catch(()=>{ee||(Le(null),Ke(A("agentWorkspace.errors.loadGithubVersions")))}).finally(()=>{ee||he(!1)}),()=>{ee=!0}},[M,ce==null?void 0:ce.currentVersion,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing",ft=`${Ue}:${Ce}`;if(K(""),M!=="integrations"||!Ce){re(!1),Ce||le(null);return}re(!0);const sn=Dv(Ce,Ue,{retryProbe:!0}).catch(Ye=>{if(Ye instanceof Ls&&Ye.unsupported)return null;throw Ye});return Promise.all([sn,K0e(Ce,Ue,{retryProbe:!0})]).then(([Ye,ti])=>{ee||le({requestKey:ft,apiApps:Ye,a2a:ti})}).catch(()=>{ee||(le(null),K(A("agentWorkspace.errors.probeIntegration")))}).finally(()=>{ee||re(!1)}),()=>{ee=!0}},[G,M,ce==null?void 0:ce.currentVersion,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{let ee=!1;const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=(ce==null?void 0:ce.region)??"cn-beijing",ft=Ce&&Ri?Ube({runtimeId:Ce,region:Ue,appName:Ri,pageSize:100}):null;if(Sn(ft?pte(ft,A):[]),ci((ft==null?void 0:ft.sets)??[]),$r(""),Fr((ft==null?void 0:ft.unsupportedMessage)??""),M!=="evaluations"||!Ce){ds(!1);return}if(y&&!Ri){ds(!xt);return}return ds(!ft),Gj({runtimeId:Ce,region:Ue,appName:Ri,pageSize:100},{force:!0}).then(sn=>{ee||(ci(sn.sets),Sn(pte(sn,A)),Fr(sn.unsupportedMessage??""))}).catch(()=>{ee||($r(A("agentWorkspace.errors.loadEvaluations")),Fr(""))}).finally(()=>{ee||ds(!1)}),()=>{ee=!0}},[xt,y,vs,M,Ri,ei==null?void 0:ei.appName,ce==null?void 0:ce.region,ce==null?void 0:ce.runtimeId,A]);async function xc(ee){const Ce=(ce==null?void 0:ce.runtimeId)??"",Ue=ee.commitSha??"";if(!(!Ce||!Ue||et)){Ct(Ue),Ke("");try{await N0e({runtimeId:Ce,targetCommitSha:Ue});const ft=await W2(Ce);Le(ft)}catch(ft){Ke(ft instanceof Error?ft.message:A("agentWorkspace.errors.rollbackVersion"))}finally{Ct("")}}}m.useEffect(()=>{const ee=new Set(bi.map(Ce=>Ce.id));ln(Ce=>{const Ue=new Set([...Ce].filter(ft=>ee.has(ft)));return Ue.size===Ce.size?Ce:Ue}),Ur(Ce=>{const Ue=new Set([...Ce].filter(ft=>ee.has(ft)));return Ue.size===Ce.size?Ce:Ue}),Ma&&!ee.has(Ma)&&La("")},[bi,Ma]),m.useEffect(()=>{We(!1),ln(new Set),Ur(new Set),Br(""),La("")},[ce==null?void 0:ce.runtimeId]),m.useEffect(()=>{const ee=new Set(we.filter(Ce=>Ce.canDelete===!0).map(Ce=>Ce.id));$e(Ce=>{const Ue=new Set([...Ce].filter(ft=>ee.has(ft)));return Ue.size===Ce.size?Ce:Ue})},[we]),m.useEffect(()=>{const ee=new Set(ro.map(Ce=>Ce.id));Yt(Ce=>{const Ue=new Set([...Ce].filter(ft=>ee.has(ft)));return Ue.size===Ce.size?Ce:Ue})},[ro]);const so=m.useMemo(()=>!v||!(ce!=null&&ce.runtimeId)||v.runtimeId!==ce.runtimeId||Ri&&v.agentName&&v.agentName!==Ri?null:{...v,tag:A(v.kind==="good"?"agentWorkspace.goodCase":"agentWorkspace.badCase")},[v,ce==null?void 0:ce.runtimeId,Ri,A]),Ko=m.useMemo(()=>m5t(A),[A]),oa=m.useMemo(()=>ce!=null&&ce.runtimeId?so?[so,...bi.filter(ee=>ee.id!==so.id&&(!ee.messageId||ee.messageId!==so.messageId))]:bi:Ko,[Ko,bi,so,ce==null?void 0:ce.runtimeId]),fu=oa.filter(ee=>{if(ee.kind!==kt||(ee.source==="auto"?"auto":"user")!==on)return!1;const Ue=rn.trim().toLowerCase();return Ue?[ee.input,ee.output,ee.referenceOutput,ee.comment,ee.tag??"",ee.sessionId,ee.messageId,ee.userId,ee.evaluationSetName].join(" ").toLowerCase().includes(Ue):!0}),uf=fu.filter(ee=>jt.has(ee.id)),sd=!!(ce!=null&&ce.runtimeId),Qr=ee=>{_t(ee),en(""),Br("");const Ce=oa.find(Ue=>Ue.kind===ee);La((Ce==null?void 0:Ce.id)??""),window.setTimeout(()=>{var Ue;(Ue=Rr.current)==null||Ue.scrollIntoView({behavior:"smooth",block:"start"})},0)},df=ee=>{Br(""),ln(Ce=>{const Ue=new Set(Ce);return Ue.has(ee.id)?Ue.delete(ee.id):Ue.add(ee.id),Ue})},HI=()=>{Br(""),ln(new Set(fu.map(ee=>ee.id)))},qI=()=>{Br(""),ln(new Set),We(!1)},zr=ee=>{Ur(Ce=>{const Ue=new Set(Ce);return Ue.has(ee)?Ue.delete(ee):Ue.add(ee),Ue})},r0=ee=>{La(ee.id),Br(""),!(!ee.sessionId||!ee.messageId)&&(N==null||N(ee))},HE=async ee=>{if(!(ce!=null&&ce.runtimeId)||!Ri||Dn||ee.length===0)return;const Ce=ee.length===1?A("agentWorkspace.deleteOneCaseConfirm"):A("agentWorkspace.deleteCasesConfirm",{count:ee.length});if(!window.confirm(Ce))return;const Ue=ee.map(sn=>sn.id),ft=new Set(Ue);Hi(!0),Br("");try{await Vbe({runtimeId:ce.runtimeId,region:ce.region??"cn-beijing",appName:Ri,itemIds:Ue});const sn=new Map;for(const Ye of ee)sn.set(Ye.kind,(sn.get(Ye.kind)??0)+1);Sn(Ye=>Ye.filter(ti=>!ft.has(ti.id))),ci(Ye=>Ye.map(ti=>({...ti,itemCount:Math.max(0,ti.itemCount-(sn.get(ti.kind)??0))}))),ln(Ye=>new Set([...Ye].filter(ti=>!ft.has(ti)))),Ur(Ye=>new Set([...Ye].filter(ti=>!ft.has(ti)))),Ma&&ft.has(Ma)&&La(""),ee.length>1&&We(!1),_==null||_(ee)}catch(sn){Br(sn instanceof Error?sn.message:String(sn))}finally{Hi(!1)}},c1=ee=>{ed(Ce=>Ce.map(Ue=>Ue.id===ee.id?ee:Ue))},qE=()=>{const ee=new Set(e.map(ft=>ft.id)),Ce=n.filter(ft=>ee.has(ft)),Ue=new Set(Ce);return[...Ce,...e.filter(ft=>!Ue.has(ft.id)).map(ft=>ft.id)]},WE=(ee,Ce,Ue)=>{if(!O||ee===Ce)return;const ft=qE().filter(ti=>ti!==ee),sn=ft.indexOf(Ce),Ye=sn<0?ft.length:Ue==="after"?sn+1:sn;ft.splice(Ye,0,ee),O(ft)},KE=(ee,Ce)=>{if(!Mt||Mt===Ce)return;const Ue=ee.currentTarget.getBoundingClientRect();pt(Ce),Vn(ee.clientY>Ue.top+Ue.height/2?"after":"before")},qm=(ee,Ce)=>{if(!O)return;const Ue=qE(),ft=Ue.indexOf(ee),sn=Math.max(0,Math.min(Ue.length-1,ft+Ce));ft<0||ft===sn||(Ue.splice(ft,1),Ue.splice(sn,0,ee),O(Ue))},s0=ee=>{ee.canDelete===!0&&(Pn(""),$e(Ce=>{const Ue=new Set(Ce);return Ue.has(ee.id)?Ue.delete(ee.id):Ue.add(ee.id),Ue}))},GE=ee=>{Pn(""),Yt(Ce=>{const Ue=new Set(Ce);return Ue.has(ee.id)?Ue.delete(ee.id):Ue.add(ee.id),Ue})},XE=()=>{Pn(""),$e(new Set(un.map(ee=>ee.id))),Yt(new Set(ro.map(ee=>ee.id)))},Rt=()=>{Pn(""),$e(new Set),Yt(new Set),Jn(!1)},a0=()=>{if(Ci===0||hn)return;const ee=jn.length,Ce=di.length;Pn(""),oi({kind:"selection",title:A(ee===1&&Ce===0?"agentWorkspace.deleteAgentTitle":ee===0&&Ce===1?"myAgents.deleteDraftTitle":"agentWorkspace.deleteSelectedTitle"),description:ee===1&&Ce===0?A("agentWorkspace.deleteAgentDescription",{name:jn[0].label}):ee===0&&Ce===1?A("agentWorkspace.deleteDraftDescription",{name:di[0].draft.name||A("agentSelector.unnamedAgent")}):A("agentWorkspace.deleteSelectionDescription",{count:Ci,warning:ee>0?A("agentWorkspace.runtimeDeletionWarning",{count:ee}):A("agentWorkspace.draftDeletionWarning")}),confirmLabel:A(ee===0&&Ce===1?"myAgents.deleteDraft":"agentWorkspace.deleteSelected"),agents:jn,drafts:di})},u1=async()=>{if(!(!gi||hn)){tn(!0),Pn("");try{if(gi.kind==="selection"){const{agents:ee,drafts:Ce}=gi;if(ee.length>0){if(!k)throw new Error(A("agentWorkspace.errors.deleteDeployedUnsupported"));await k(ee)}Ce.length>0&&(S==null||S(Ce)),$e(new Set),Yt(new Set),Jn(!1),ee.some(Ue=>Ue.id===I)&&H(""),Ce.some(Ue=>Ue.id===X)&&Q("")}else if(gi.kind==="agent"){if(!k)throw new Error(A("agentWorkspace.errors.deleteDeployedUnsupported"));await k([gi.agent]),I===gi.agent.id&&H("")}else{if(!S)throw new Error(A("agentWorkspace.errors.deleteDraftUnsupported"));S([gi.draft]),X===gi.draft.id&&Q("")}oi(null)}catch(ee){Pn(ee instanceof Error?ee.message:String(ee))}finally{tn(!1)}}},o0=ee=>{!k||ee.canDelete!==!0||hn||(Pn(""),oi({kind:"agent",title:A("agentWorkspace.deleteAgentTitle"),description:A("agentWorkspace.deleteAgentDescription",{name:ee.label}),confirmLabel:A("agentWorkspace.deleteAgent"),agent:ee}))},Xi=ee=>{if(!S||hn)return;const Ce=ee.draft.name||A("agentSelector.unnamedAgent");Pn(""),oi({kind:"draft",title:A("myAgents.deleteDraftTitle"),description:A("agentWorkspace.deleteDraftDescription",{name:Ce}),confirmLabel:A("myAgents.deleteDraft"),draft:ee})},Xh=()=>{const ee=`eval-${Date.now()}`,Ce={id:ee,name:A("agentWorkspace.newEvaluationGroupName",{count:qo.length+1}),agentIds:[],caseSet:"核心回归集",evaluator:"综合质量评估器",metrics:["回答质量"],concurrency:"4",history:[]};ed(Ue=>[Ce,...Ue]),td(ee)},YE=ee=>{c1({...ee,history:[{id:`run-${Date.now()}`,createdAt:A("agentWorkspace.evaluationDefaults.justNow"),score:86+ee.history.length%7,status:"completed"},...ee.history]})};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:`aw-root${y?" is-detail-only":""}`,children:[o.jsxs("nav",{className:"aw-view-tabs","aria-label":A("agentWorkspace.workspace"),children:[o.jsx("button",{type:"button",className:P==="library"?"is-active":"","aria-pressed":P==="library",onClick:()=>{$("library"),tt("")},children:A("agentWorkspace.library")}),o.jsx("button",{type:"button",className:P==="evaluation"?"is-active":"","aria-pressed":P==="evaluation",onClick:()=>{$("evaluation"),tt("")},children:A("agentWorkspace.evaluation")})]}),o.jsxs("div",{className:"aw-workspace-frame",children:[o.jsxs("div",{className:"aw-workspace","aria-hidden":P==="evaluation"||void 0,ref:ee=>{ee==null||ee.toggleAttribute("inert",P==="evaluation")},children:[o.jsxs("aside",{className:"aw-sidebar","aria-label":A(P==="library"?"agentWorkspace.agentList":"agentWorkspace.evaluationGroupList"),children:[o.jsxs("label",{className:"aw-search",children:[o.jsx(E_,{"aria-hidden":!0}),o.jsx("input",{value:ze,onChange:ee=>tt(ee.currentTarget.value),placeholder:A(P==="library"?"myAgents.searchAgents":"agentWorkspace.searchEvaluationGroups"),"aria-label":A(P==="library"?"myAgents.searchAgents":"agentWorkspace.searchEvaluationGroups")})]}),o.jsxs("button",{type:"button",className:"aw-create-card",onClick:P==="library"?j:Xh,disabled:P==="library"&&!a,children:[o.jsx(Do,{"aria-hidden":!0}),o.jsx("span",{children:A(P==="library"?"agentWorkspace.newAgent":"agentWorkspace.newEvaluationGroup")})]}),P==="library"&&(k||S)&&o.jsx("div",{className:`aw-selection-toolbar${si?" is-active":""}`,children:si?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"aw-selection-count",children:A("agentWorkspace.selectedCount",{count:Ci})}),o.jsx("button",{type:"button",onClick:XE,disabled:Ki===0||hn,children:A("agentWorkspace.selectAll")}),o.jsx("button",{type:"button",className:"aw-selection-danger",onClick:()=>void a0(),disabled:Ci===0||hn,children:A(hn?"common.deleting":"agentWorkspace.deleteSelected")}),o.jsx("button",{type:"button",onClick:Rt,disabled:hn,children:A("common.cancel")})]}):o.jsx("button",{type:"button",onClick:()=>{Pn(""),Jn(!0)},disabled:Ki===0,children:A("common.select")})}),P==="library"&&Ei&&o.jsx("div",{className:"aw-delete-error",role:"alert",children:Ei}),o.jsx("div",{className:"aw-agent-list",children:P==="evaluation"?af.length===0?o.jsx("div",{className:"aw-list-empty",children:A("agentWorkspace.noMatchingEvaluationGroups")}):af.map(ee=>o.jsxs("button",{type:"button",className:`aw-agent-item${ee.id===Cl?" is-active":""}`,onClick:()=>td(ee.id),children:[o.jsxs("span",{className:"aw-agent-copy aw-eval-group-copy",children:[o.jsx("strong",{children:QO(ee.name,A)}),o.jsx("small",{children:A("agentWorkspace.groupStats",{agents:ee.agentIds.length,runs:ee.history.length})})]}),o.jsx(fw,{"aria-hidden":!0})]},ee.id)):u&&we.length===0&&ro.length===0?o.jsx("div",{className:"aw-list-empty",children:A("agentWorkspace.loadingCloudAgents")}):d&&we.length===0&&ro.length===0?o.jsxs("div",{className:"aw-list-empty aw-list-error",children:[o.jsx("span",{children:d}),w&&o.jsx("button",{type:"button",onClick:w,children:A("common.retry")})]}):we.length===0&&ro.length===0?o.jsx("div",{className:"aw-list-empty",children:A("myAgents.noMatchingAgents")}):o.jsxs(o.Fragment,{children:[ro.map(ee=>{const Ue=f.filter(sn=>sn.draftId===ee.id).sort((sn,Ye)=>Ye.startedAt-sn.startedAt)[0]??f.filter(sn=>{var Ye,ti;return((Ye=sn.agentDraft)==null?void 0:Ye.name)===ee.draft.name||sn.agentName===ee.draft.name||!!((ti=ee.deploymentTarget)!=null&&ti.runtimeId)&&sn.runtimeId===ee.deploymentTarget.runtimeId}).sort((sn,Ye)=>Ye.startedAt-sn.startedAt)[0],ft=ht.has(ee.id);return o.jsxs("button",{type:"button",className:["aw-agent-item",si?"is-selecting":"",ft?"is-selected-for-delete":"",ee.id===X?"is-active":""].filter(Boolean).join(" "),"aria-pressed":si?ft:void 0,onClick:()=>{if(si){GE(ee);return}H(""),Q(ee.id),B("basic")},children:[si&&o.jsx("span",{className:`aw-select-marker${ft?" is-checked":""}`,"aria-hidden":"true"}),o.jsxs("span",{className:"aw-agent-copy",children:[o.jsxs("span",{className:"aw-agent-name-row",children:[o.jsx("strong",{children:ee.draft.name||A("agentSelector.unnamedAgent")}),o.jsx("span",{className:`aw-draft-badge${(Ue==null?void 0:Ue.status)==="running"?" is-deploying":""}`,children:(Ue==null?void 0:Ue.status)==="running"?A("myAgents.deploying"):A("myAgents.draft")})]}),o.jsx("small",{children:ee.deploymentTarget?A("agentWorkspace.updatePending"):A("agentWorkspace.notPublished")})]}),o.jsx(fw,{"aria-hidden":!0})]},ee.id)}),we.map(ee=>{const Ce=ee.runtimeId?Wo.get(ee.runtimeId):void 0,Ue=ee.runtimeId?cu.get(ee.runtimeId):void 0,ft=Wi.has(ee.id),sn=ee.canDelete===!0,Ye=(Ce==null?void 0:Ce.status)==="running"?{label:A("myAgents.deploying"),className:" is-deploying"}:(Ce==null?void 0:Ce.status)==="error"?{label:A("agentWorkspace.failed"),className:" is-error"}:(Ce==null?void 0:Ce.status)==="cancelled"?{label:A("agentWorkspace.cancelled"),className:" is-muted"}:Ue?{label:A("agentWorkspace.updatePending"),className:""}:null,ti=(Ce==null?void 0:Ce.status)==="running"?A("agentWorkspace.updatingDeployment"):Ue?A("agentWorkspace.updatePending"):ee.remote?ee.host||A("agentWorkspace.remoteAgent"):A("agentWorkspace.localAgent"),la=["aw-agent-item","aw-agent-item--sortable",ee.id===I?"is-active":"",si?"is-selecting":"",ft?"is-selected-for-delete":"",si&&!sn?"is-selection-disabled":"",ee.id===Mt?"is-dragging":"",ee.id===De&&ee.id!==Mt?`is-drop-target is-drop-${ot}`:""].filter(Boolean).join(" ");return o.jsxs("button",{type:"button",draggable:!!O&&!si,className:la,"aria-pressed":si?ft:void 0,"aria-keyshortcuts":O?"Alt+ArrowUp Alt+ArrowDown":void 0,onDragStart:Xn=>{O&&(es.current=!0,Cn(ee.id),Xn.dataTransfer.effectAllowed="move",Xn.dataTransfer.setData("text/plain",ee.id))},onDragEnter:Xn=>{KE(Xn,ee.id)},onDragOver:Xn=>{!Mt||Mt===ee.id||(Xn.preventDefault(),Xn.dataTransfer.dropEffect="move",KE(Xn,ee.id))},onDragLeave:Xn=>{const Rs=Xn.relatedTarget;Rs instanceof Node&&Xn.currentTarget.contains(Rs)||De===ee.id&&pt("")},onDrop:Xn=>{Xn.preventDefault();const Rs=Xn.dataTransfer.getData("text/plain")||Mt;WE(Rs,ee.id,ot),Cn(""),pt(""),Vn("before")},onDragEnd:()=>{Cn(""),pt(""),Vn("before"),window.setTimeout(()=>{es.current=!1},0)},onKeyDown:Xn=>{Xn.altKey&&(Xn.key==="ArrowUp"?(Xn.preventDefault(),qm(ee.id,-1)):Xn.key==="ArrowDown"&&(Xn.preventDefault(),qm(ee.id,1)))},onClick:Xn=>{if(si){Xn.preventDefault(),s0(ee);return}if(es.current){Xn.preventDefault(),es.current=!1;return}Q(""),H(ee.id),B("basic"),E(ee.id)},children:[si&&o.jsx("span",{className:`aw-select-marker${ft?" is-checked":""}`,"aria-hidden":"true"}),o.jsxs("span",{className:"aw-agent-copy",children:[o.jsxs("span",{className:"aw-agent-name-row",children:[o.jsx("strong",{children:ee.label}),ee.currentVersion!=null&&o.jsxs("span",{className:"aw-version-badge",children:["v",ee.currentVersion]}),Ye&&o.jsx("span",{className:`aw-draft-badge${Ye.className}`,children:Ye.label})]}),o.jsx("small",{children:ti})]}),o.jsx(fw,{"aria-hidden":!0})]},ee.id)})]})}),o.jsx("div",{className:"aw-list-count",children:A("agentWorkspace.totalCount",{count:P==="library"?e.length+nd:qo.length})})]}),P==="evaluation"&&Ht?o.jsx(z5t,{group:Ht,agents:e,cases:oa,onChange:c1,onRun:YE}):P==="evaluation"?o.jsx("main",{className:"aw-main aw-empty-selection",children:o.jsx("p",{children:A("agentWorkspace.noEvaluationGroupSelected")})}):!ce&&!Fn&&!Gn?o.jsx("main",{className:"aw-main aw-empty-selection",children:o.jsx("p",{children:A("agentWorkspace.noAgentSelected")})}):o.jsxs("main",{className:`aw-main${du?" is-deploying":""}${y?" resource-page":""}`,children:[ce&&!ei&&s&&o.jsx("div",{className:"aw-detail-loading",role:"status","aria-live":"polite",children:o.jsxs("div",{className:"aw-detail-loading-card",children:[o.jsx("span",{className:"loading-gap-spinner","aria-hidden":"true"}),o.jsxs("span",{children:[o.jsx("strong",{children:A("agentWorkspace.loadingAgent")}),o.jsx("small",{children:A("agentWorkspace.loadingAgentDescription")})]})]})}),M==="integrations"&&oe&&o.jsx("div",{className:"aw-detail-loading",role:"status","aria-live":"polite",children:o.jsxs("div",{className:"aw-detail-loading-card",children:[o.jsx("span",{className:"loading-gap-spinner","aria-hidden":"true"}),o.jsxs("span",{children:[o.jsx("strong",{children:A("agentWorkspace.probingIntegration")}),o.jsx("small",{children:A("agentWorkspace.probingIntegrationDescription")})]})]})}),o.jsx(sE,{className:"aw-agent-detail",title:Xe,description:Un.description||A(s||y&&!xt?"agentWorkspace.loadingAgentInfo":"common.noDescription"),identitySeed:Xe,backLabel:A("agentWorkspace.backToAgentList"),onBack:y?x:void 0,meta:o.jsxs(o.Fragment,{children:[vc!=null&&o.jsxs("span",{className:"aw-agent-meta",children:["v",vc]}),Fn&&o.jsx("span",{className:"aw-agent-meta",children:A("myAgents.draft")}),mc&&o.jsx("span",{className:"aw-agent-meta",children:A("agentWorkspace.updatePending")}),!ce&&!Fn&&Gn&&o.jsx("span",{className:"aw-agent-meta",children:Gn.label})]}),actionsClassName:"aw-head-actions",bodyClassName:"aw-agent-detail__body",actions:Fn||mc||ce!=null&&ce.canDelete?o.jsxs(o.Fragment,{children:[(Fn||mc)&&o.jsxs($t,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,onClick:()=>{const ee=Fn??mc;ee&&Xi(ee)},disabled:hn,"aria-label":A("myAgents.deleteDraft"),title:A("myAgents.deleteDraft"),children:[o.jsx(pm,{"aria-hidden":!0}),o.jsx("span",{children:A("myAgents.deleteDraft")})]}),(ce==null?void 0:ce.canDelete)&&o.jsxs($t,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,onClick:()=>void o0(ce),disabled:hn,"aria-label":A("agentWorkspace.deleteAgent"),title:A("agentWorkspace.deleteAgent"),children:[o.jsx(pm,{"aria-hidden":!0}),o.jsx("span",{children:A(hn?"common.deleting":"agentWorkspace.deleteAgent")})]})]}):void 0,sections:Tl.map(ee=>{var Ce,Ue,ft,sn;return{key:ee.id,label:ee.label,disabled:du,content:ee.id===M?o.jsxs(o.Fragment,{children:[kn&&Ws&&o.jsx("div",{className:`aw-detail-deployment${du?" is-running":""}`,children:o.jsx($5t,{task:kn,onReturnToEdit:Gh&&L?()=>L(Gh):void 0})}),o.jsxs("div",{className:"aw-content",children:[M==="basic"&&o.jsxs("div",{className:"aw-basic-stack",children:[_e&&o.jsx(Ob,{className:"aw-detail-fetch-alert",color:"warning",variant:"soft",title:A("agentWorkspace.partialInfoUnavailable"),description:A("agentWorkspace.upgradeRuntimeForDetails")}),(at&&!_e||Re)&&o.jsx(Ob,{className:"aw-detail-fetch-alert",color:"danger",variant:"soft",title:A("agentWorkspace.detailLoadFailed"),description:A("agentWorkspace.detailLoadFailedDescription"),actions:o.jsx($t,{type:"button",color:"danger",variant:"soft",size:"sm",pill:!1,onClick:()=>ye(Ye=>Ye+1),children:A("common.retry")})}),ce&&Bt&&!Bt.canUpdate&&o.jsxs("div",{className:"aw-update-recovery-notice",role:Bt.recoveryStatus==="preparing"?"status":"alert",children:[o.jsx("strong",{children:Bt.recoveryStatus==="preparing"?A("agentWorkspace.restoringUpdateConfig"):A("agentWorkspace.updateConfigUnavailable")}),Ut&&o.jsx("span",{children:Ut}),Z.map(Ye=>o.jsx("span",{children:Ye},Ye))]}),o.jsxs("section",{className:"aw-deployment-panel aw-settings-card",children:[o.jsx("div",{className:"aw-section-head",children:o.jsxs("div",{children:[o.jsx("h3",{children:A("agentWorkspace.deploymentConfig")}),o.jsx("p",{children:A("agentWorkspace.deploymentConfigDescription")})]})}),o.jsxs("dl",{className:"aw-readonly-config",children:[o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.runtimeStatus")}),o.jsxs("dd",{className:(q==null?void 0:q.status.toLowerCase())==="ready"?"is-ready":void 0,children:[(q==null?void 0:q.status.toLowerCase())==="ready"&&o.jsx("span",{className:"aw-status-dot"}),(q==null?void 0:q.status)||A("agentWorkspace.loading")]})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.deploymentRegion")}),o.jsx("dd",{children:(q==null?void 0:q.region)||(ce==null?void 0:ce.region)||(kn==null?void 0:kn.region)||A("agentWorkspace.notAvailable")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.networkAccess")}),o.jsx("dd",{children:q!=null&&q.networkTypes.length?q.networkTypes.join(" / "):A("agentWorkspace.notAvailable")})]})]})]}),o.jsxs("section",{className:"aw-canvas-card",children:[o.jsx("div",{className:"aw-card-head",children:o.jsx("strong",{children:A("agentWorkspace.executionFlow")})}),o.jsx("div",{className:"aw-canvas",children:o.jsx(RS,{draft:Un,direction:"horizontal",selectedPath:[],onSelect:()=>{},onAdd:()=>{},onInsert:()=>{},onDelete:()=>{},readOnly:!0,interactivePreview:!0},rd)})]}),o.jsxs("section",{className:"aw-details-card",children:[o.jsx("div",{className:"aw-card-head",children:o.jsx("strong",{children:A("agentWorkspace.details")})}),o.jsxs("dl",{className:"aw-facts",children:[o.jsxs("div",{children:[o.jsx("dt",{children:A("agentSelector.model")}),o.jsx("dd",{children:bB(ei==null?void 0:ei.model)||Un.modelName||A("agentWorkspace.notAvailable")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.agentCountLabel")}),o.jsx("dd",{children:ei!=null&&ei.graph?uje(ei.graph):dje(Un)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentSelector.tools")}),o.jsx("dd",{className:"aw-fact-badges",children:Qe.length?Qe.map(Ye=>o.jsx("span",{children:Ye},Ye)):A("agentWorkspace.none")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentSelector.skills")}),o.jsx("dd",{className:"aw-fact-badges",children:bn===null?A("agentSelector.previewUnsupported"):bn.length?bn.map(Ye=>o.jsx("span",{children:Ye},Ye)):A("agentWorkspace.none")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("systemInfo.currentVersion")}),o.jsx("dd",{children:vc!=null?`v${vc}`:A("agentWorkspace.notAvailable")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentSelector.status")}),o.jsx("dd",{children:Fn?A("myAgents.draft"):(kn==null?void 0:kn.status)==="error"?A("agentWorkspace.deploymentFailed"):(kn==null?void 0:kn.status)==="cancelled"?A("agentWorkspace.cancelled"):mc?A("agentWorkspace.updatePending"):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"aw-status-dot"}),A("skillCenter.status.available")]})})]})]})]}),o.jsxs("section",{className:"aw-sidecar-panel aw-settings-card","aria-label":A("agentWorkspace.selectedOptimizations"),children:[o.jsx("div",{className:"aw-section-head",children:o.jsxs("div",{children:[o.jsx("h3",{children:A("agentWorkspace.selectedOptimizations")}),o.jsx("p",{children:A("agentWorkspace.selectedOptimizationsDescription")})]})}),o.jsxs("dl",{className:"aw-readonly-config",children:[o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.configurationStatus")}),o.jsx("dd",{className:Gi!=null&&Gi.enabled?"is-ready":void 0,children:Gi?Gi.enabled?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"aw-status-dot"}),A("skillCenter.status.enabled")]}):A("skillCenter.status.inactive"):A("agentWorkspace.notRecorded")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.optimizationProfile")}),o.jsx("dd",{children:Gi?xst(Gi.profile):A("agentWorkspace.legacyConfigMissing")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.selectedOptimizations")}),o.jsx("dd",{className:"aw-fact-badges",children:Gi?Fa.length?Fa.map(Ye=>o.jsx("span",{children:aA(Ye)},Ye)):A("agentWorkspace.noneSelected"):A("agentWorkspace.legacyConfigMissing")})]})]})]})]}),M==="usage"&&(ce==null?void 0:ce.runtimeId)&&o.jsxs("section",{className:"aw-usage","aria-busy":Hn,children:[o.jsx("div",{className:"aw-usage-intro",children:o.jsx("h3",{children:A("agentWorkspace.usageOverview")})}),Hn&&!ps&&o.jsx("div",{className:"aw-usage-state",role:"status","aria-live":"polite",children:o.jsx(En,{as:"span",children:A("agentWorkspace.loadingUsage")})}),ar&&o.jsxs("div",{className:"aw-usage-state is-error",role:"alert",children:[o.jsx("span",{children:ar}),o.jsx("button",{type:"button",onClick:()=>Da(Ye=>Ye+1),children:A("common.retry")})]}),!Hn&&!ar&&!ps&&!Ri&&o.jsx("div",{className:"aw-usage-state",children:A("agentWorkspace.usageUnavailable")}),ps&&o.jsxs(o.Fragment,{children:[o.jsxs("dl",{className:"aw-usage-summary","aria-label":A("agentWorkspace.usageSummary"),children:[o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.totalCalls")}),o.jsx("dd",{children:ps.totalInvocations.toLocaleString(R.resolvedLanguage??R.language)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:A("agentWorkspace.userCount")}),o.jsx("dd",{children:ps.totalUsers.toLocaleString(R.resolvedLanguage??R.language)})]})]}),o.jsxs("div",{className:"aw-usage-users-head",children:[o.jsx("h3",{children:A("agentWorkspace.userDetails")}),Hn&&o.jsx(En,{as:"span",role:"status","aria-live":"polite",children:A("agentWorkspace.refreshing")})]}),ps.users.length===0?o.jsx("div",{className:"aw-usage-state",children:A("agentWorkspace.noUsage")}):o.jsx("div",{className:"aw-usage-table-wrap",children:o.jsxs("table",{className:"aw-usage-table",children:[o.jsx("caption",{children:A("agentWorkspace.usageUserList")}),o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:A("agentWorkspace.user")}),o.jsx("th",{scope:"col",children:A("agentWorkspace.callCount")}),o.jsx("th",{scope:"col",children:A("agentWorkspace.lastUsed")})]})}),o.jsx("tbody",{children:ps.users.map(Ye=>o.jsxs("tr",{children:[o.jsxs("td",{children:[o.jsx("strong",{children:Ye.displayName||Ye.userId||A("agentWorkspace.unknownUser")}),Ye.displayName&&Ye.userId&&o.jsx("small",{title:Ye.userId,children:Ye.userId})]}),o.jsx("td",{children:Ye.invocationCount.toLocaleString(R.resolvedLanguage??R.language)}),o.jsx("td",{children:o.jsx("time",{dateTime:Ye.lastUsedAt,children:v5t(Ye.lastUsedAt,R.resolvedLanguage??R.language,A)})})]},Ye.userId))})]})}),ps.totalPages>1&&o.jsxs("nav",{className:"aw-usage-pagination","aria-label":A("agentWorkspace.usagePagination"),children:[o.jsx("button",{type:"button",disabled:Hn||ps.page<=1,onClick:()=>kl(Ye=>Math.max(1,Ye-1)),children:A("common.previousPage")}),o.jsx("span",{"aria-live":"polite",children:A("agentWorkspace.pageOf",{page:ps.page,total:ps.totalPages})}),o.jsx("button",{type:"button",disabled:Hn||ps.page>=ps.totalPages,onClick:()=>kl(Ye=>Ye+1),children:A("common.nextPage")})]})]})]}),M==="versions"&&o.jsxs("section",{className:"aw-version-stack",children:[o.jsxs("div",{className:"aw-integration-intro",children:[o.jsx("h3",{children:A("agentWorkspace.githubVersions")}),o.jsx("p",{children:(Ce=ke==null?void 0:ke.cicd)!=null&&Ce.enabled?A("agentWorkspace.githubVersionsDescription"):A("agentWorkspace.currentVersionOnly")})]}),Y&&o.jsx("div",{className:"aw-case-empty",children:A("agentWorkspace.loadingVersions")}),Oe&&o.jsxs("div",{className:"aw-integration-error",role:"alert",children:[o.jsx("span",{children:Oe}),(ce==null?void 0:ce.runtimeId)&&o.jsx("button",{type:"button",onClick:()=>void W2(ce.runtimeId??"").then(Le),children:A("common.retry")})]}),!Y&&!Oe&&o.jsxs("div",{className:"aw-version-list",children:[(ke==null?void 0:ke.githubSyncError)&&o.jsx("div",{className:"aw-integration-error",role:"alert",children:o.jsx("span",{children:ke.githubSyncError})}),(ke==null?void 0:ke.latestSourceRuntimeStatus)&&ke.latestSourceRuntimeStatus!=="published"&&((Ue=ke.versions[0])==null?void 0:Ue.commitSha)&&ke.versions[0].commitSha!==ke.currentCommitSha&&o.jsx("div",{className:"aw-integration-notice",role:"status",children:o.jsxs("span",{children:[A("agentWorkspace.sourceMergedRuntimeStill"),dte(ke.latestSourceRuntimeStatus,A),A("agentWorkspace.currentProductionVersionHint")]})}),ke!=null&&ke.versions.length?ke.versions.map(Ye=>{var So;const ti=Ye.commitSha??"",la=Ye.runtimeStatus??Ye.status,Xn=Ye.changeType==="rollback",Rs=!!((So=ke.cicd)!=null&&So.enabled)&&!!ti&&!Xn&&ti!==ke.currentCommitSha;return o.jsxs("article",{className:"aw-version-row",children:[o.jsxs("div",{children:[o.jsx("strong",{children:O5t(Ye,A)}),o.jsx("small",{children:Ye.createdAt||A("agentWorkspace.noTime")})]}),o.jsxs("div",{children:[o.jsx("span",{children:A("agentWorkspace.prLink")}),Ye.pullRequestUrl?o.jsx("a",{href:Ye.pullRequestUrl,target:"_blank",rel:"noopener noreferrer",children:A("agentWorkspace.viewPr")}):o.jsx("em",{children:A("agentWorkspace.noPr")})]}),o.jsxs("div",{children:[o.jsx("span",{children:A("agentWorkspace.author")}),o.jsx("em",{children:Ye.author||"Studio"})]}),o.jsxs("div",{children:[o.jsx("span",{children:A("agentWorkspace.publishStatus")}),o.jsx("em",{children:dte(la,A)})]}),o.jsxs("div",{className:"aw-version-actions",children:[o.jsx("button",{type:"button",disabled:!Rs||et===ti,onClick:()=>void xc(Ye),children:A(et===ti?"agentWorkspace.rollingBack":"agentWorkspace.rollbackToVersion")}),Ye.workflowRunUrl&&o.jsx("a",{href:Ye.workflowRunUrl,target:"_blank",rel:"noopener noreferrer",children:A("agentWorkspace.viewRelease")})]})]},`${Ye.version}-${ti||Ye.createdAt}`)}):o.jsxs("article",{className:"aw-version-row",children:[o.jsxs("div",{children:[o.jsx("strong",{children:vc!=null?`v${vc}`:A("agentWorkspace.noVersion")}),o.jsx("small",{children:(q==null?void 0:q.updatedAt)||A("agentWorkspace.noTime")})]}),o.jsx("p",{children:A("agentWorkspace.currentVersionOnly")})]})]})]}),M==="integrations"&&o.jsxs("div",{className:"aw-integration-stack",children:[o.jsxs("div",{className:"aw-integration-intro",children:[o.jsx("h3",{children:A("agentWorkspace.integrationMethods")}),o.jsx("p",{children:A("agentWorkspace.integrationDescription")})]}),pe&&o.jsxs("div",{className:"aw-integration-error",role:"alert",children:[o.jsx("span",{children:pe}),o.jsx("button",{type:"button",onClick:()=>se(Ye=>Ye+1),children:A("common.retry")})]}),!pe&&o.jsxs("div",{className:"aw-integration-body",children:[o.jsxs("div",{className:`aw-integration-protocol-tabs${fe==="a2a"?" is-a2a":""}`,role:"tablist","aria-label":A("agentWorkspace.integrationProtocol"),children:[o.jsx("span",{className:"aw-integration-protocol-slider","aria-hidden":"true"}),nO.map((Ye,ti)=>o.jsx("button",{type:"button",id:`integration-${Ye.id}-tab`,role:"tab","aria-selected":fe===Ye.id,"aria-controls":`integration-${Ye.id}-panel`,tabIndex:fe===Ye.id?0:-1,onClick:()=>lf(Ye.id),onKeyDown:la=>{var So;if(!["ArrowLeft","ArrowRight","Home","End"].includes(la.key))return;la.preventDefault();const Xn=la.key==="Home"?0:la.key==="End"?nO.length-1:(ti+(la.key==="ArrowRight"?1:-1)+nO.length)%nO.length,Rs=nO[Xn];lf(Rs.id),(So=document.getElementById(`integration-${Rs.id}-tab`))==null||So.focus()},children:Ye.label},Ye.id))]}),fe==="api-server"?o.jsx(hte,{protocol:"api-server",title:"API Server",available:Bn,fields:[{label:"Agent",value:Bn?((ft=Er==null?void 0:Er.apiApps)==null?void 0:ft.join("、"))??"":""},{label:A("agentWorkspace.discoveryEndpoint"),value:Bn?G5(nt,"/list-apps"):""},{label:A("agentWorkspace.invocationEndpoint"),value:Bn?G5(nt,"/run_sse"):""},{label:A("agentWorkspace.authentication"),value:Bn?ute(q==null?void 0:q.authType,A):""},{label:"API Key",value:o.jsx(fte,{available:Bn,authType:q==null?void 0:q.authType,value:bc,visible:Be&&!!bc,loading:Ie,error:Pe,onToggle:()=>void cf()})}],example:Bn?w5t(nt,ge,q==null?void 0:q.authType):""}):o.jsx(hte,{protocol:"a2a",title:"A2A",available:$a,fields:[{label:"Agent",value:((sn=Er==null?void 0:Er.a2a)==null?void 0:sn.name)??""},{label:"Agent Card",value:$a?G5(nt,"/.well-known/agent-card.json"):""},{label:A("agentWorkspace.invocationUrl"),value:Tt},{label:A("agentWorkspace.authentication"),value:$a?ute(q==null?void 0:q.authType,A):""},{label:"API Key",value:o.jsx(fte,{available:$a,authType:q==null?void 0:q.authType,value:bc,visible:Be&&!!bc,loading:Ie,error:Pe,onToggle:()=>void cf()})}],example:$a?S5t(Tt,q==null?void 0:q.authType):""})]})]}),M==="evaluations"&&o.jsxs("section",{className:"aw-cases",children:[(ce==null?void 0:ce.runtimeId)&&o.jsx("div",{className:"aw-case-summary",children:["good","bad"].map(Ye=>{const ti=j5t(rr,Ye),la=oa.filter(Rs=>Rs.kind===Ye).length,Xn=so?la:(ti==null?void 0:ti.itemCount)??la;return o.jsxs("button",{type:"button",onClick:()=>Qr(Ye),children:[o.jsx("strong",{children:Xn}),o.jsx("span",{children:A(Ye==="good"?"agentWorkspace.goodCases":"agentWorkspace.badCases")})]},Ye)})}),o.jsxs("div",{className:"aw-case-filter-bar",children:[o.jsxs("div",{className:"aw-case-filter-stack",children:[o.jsx("div",{className:"aw-case-filters","aria-label":A("agentWorkspace.caseResultFilter"),children:["good","bad"].map(Ye=>o.jsx("button",{type:"button",className:kt===Ye?"is-active":"","aria-pressed":kt===Ye,onClick:()=>_t(Ye),children:A(Ye==="good"?"agentWorkspace.goodCase":"agentWorkspace.badCase")},Ye))}),o.jsx("div",{className:"aw-case-source-filters","aria-label":A("agentWorkspace.feedbackSourceFilter"),children:["auto","user"].map(Ye=>o.jsx("button",{type:"button",className:on===Ye?"is-active":"","aria-pressed":on===Ye,onClick:()=>J(Ye),children:A(Ye==="auto"?"agentWorkspace.automaticFeedback":"agentWorkspace.manualFeedback")},Ye))})]}),o.jsxs("label",{className:"aw-case-search",children:[o.jsx(E_,{"aria-hidden":!0}),o.jsx("input",{type:"search",value:rn,onChange:Ye=>en(Ye.currentTarget.value),placeholder:A("agentWorkspace.searchCasesPlaceholder"),"aria-label":A("agentWorkspace.searchCases")})]})]}),sd&&o.jsx("div",{className:`aw-case-toolbar${be?" is-active":""}`,children:be?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"aw-selection-count",children:A("agentWorkspace.selectedCaseCount",{count:uf.length})}),o.jsx("button",{type:"button",onClick:HI,disabled:fu.length===0||Dn,children:A("agentWorkspace.selectAllVisible")}),o.jsx("button",{type:"button",className:"aw-selection-danger",onClick:()=>void HE(uf),disabled:uf.length===0||Dn,children:A(Dn?"common.deleting":"agentWorkspace.deleteSelected")}),o.jsx("button",{type:"button",onClick:qI,disabled:Dn,children:A("common.cancel")})]}):o.jsx("button",{type:"button",onClick:()=>{Br(""),We(!0)},disabled:fu.length===0||Dn,children:A("agentWorkspace.selectCases")})}),li&&o.jsx("div",{className:"aw-delete-error",role:"alert",children:li}),o.jsx("div",{ref:Rr,children:o.jsx(Q5t,{cases:fu,loading:Vi&&fu.length===0,error:kr,notice:_s,runtimeBacked:!!(ce!=null&&ce.runtimeId),selectionMode:be,selectedCaseIds:jt,focusedCaseId:Ma,expandedCaseIds:xs,deleting:Dn,canDelete:sd,onOpenCase:r0,onToggleCase:df,onToggleExpanded:zr,onDeleteCase:Ye=>void HE([Ye]),onRetry:()=>Ns(Ye=>Ye+1)})})]}),M==="optimizations"&&o.jsxs("section",{className:"aw-optimizations",children:[o.jsxs("div",{className:"aw-optimization-intro",children:[o.jsx("h3",{children:A("agentWorkspace.optimizations")}),o.jsx("p",{children:A("agentWorkspace.optimizationsDescription")})]}),jr?o.jsxs("div",{className:"aw-optimization-state",role:"status",children:[o.jsx("span",{className:"loading-gap-spinner","aria-hidden":"true"}),o.jsx("span",{children:A("agentWorkspace.loadingOptimizations")})]}):Ia?o.jsxs("div",{className:"aw-optimization-state is-error",role:"alert",children:[o.jsx("span",{children:Ia}),o.jsx("button",{type:"button",onClick:()=>sa(Ye=>Ye+1),children:A("common.retry")})]}):fs.length>0?o.jsx(B5t,{groups:fs}):o.jsx("div",{className:"aw-optimization-state",children:A("agentWorkspace.noOptimizations")})]})]}),M==="basic"&&(ce||Fn)&&o.jsxs("div",{className:"aw-basic-actions",children:[ce&&o.jsxs("button",{type:"button",className:"aw-talk studio-update-action",onClick:()=>C==null?void 0:C(ce),children:[o.jsx(p7e,{"aria-hidden":!0}),o.jsx("span",{children:A("agentWorkspace.chat")})]}),o.jsxs("span",{className:`aw-update-wrap${Mn?" is-disabled":""}`,tabIndex:Mn?0:void 0,"aria-describedby":Mn?yn:void 0,children:[o.jsx("button",{type:"button",className:"aw-update studio-update-action",disabled:!!Mn,"aria-busy":He||void 0,"aria-describedby":Mn?yn:void 0,onClick:()=>Fn?L==null?void 0:L(Fn):Bt?T(Bt):void 0,children:He?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"loading-gap-spinner aw-update-spinner","aria-hidden":"true"}),o.jsx("span",{children:A("agentWorkspace.preparing")})]}):A(Fn||mc?"agentWorkspace.continueEditing":"agentWorkspace.update")}),Mn&&o.jsx("span",{id:yn,className:"aw-update-disabled-reason",role:"tooltip",children:Mn})]})]})]}):null}}),activeSectionKey:M,navigationLabel:A("agentWorkspace.agentDetails"),onSectionChange:B})]})]}),P==="evaluation"&&o.jsx("div",{className:"aw-evaluation-glass",role:"status",children:o.jsx("span",{children:A("agentWorkspace.comingSoon")})})]})]}),gi&&o.jsx(dc,{variant:"danger",title:gi.title,description:gi.description,confirmLabel:hn?A("common.deleting"):gi.confirmLabel,closeLabel:A("agentWorkspace.closeDeleteConfirmation"),busy:hn,onCancel:()=>oi(null),onConfirm:()=>void u1()})]})}function B5t({groups:e}){const{t}=xe("ui");return o.jsx("div",{className:"aw-optimization-table-wrap",children:o.jsxs("table",{className:"aw-optimization-table",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:t("agentWorkspace.fixPriority")}),o.jsx("th",{scope:"col",children:t("agentWorkspace.suggestedModule")}),o.jsx("th",{scope:"col",children:t("agentWorkspace.suggestionAndReason")})]})}),o.jsx("tbody",{children:e.map(n=>o.jsxs("tr",{children:[o.jsx("td",{children:o.jsx("span",{className:`aw-priority is-${n.priority}`,children:A5t(n.priority,t)})}),o.jsx("td",{children:o.jsx("span",{className:"aw-optimization-module",children:N5t(n,t)})}),o.jsx("td",{children:o.jsx("ul",{className:"aw-optimization-list",children:n.items.map(i=>o.jsxs("li",{children:[o.jsx("strong",{children:i.suggestion}),o.jsx("p",{children:i.reason})]},`${i.suggestion}:${i.reason}`))})})]},`${n.priority}:${n.module}:${n.customModule??""}`))})]})})}function U5t(){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("path",{d:"M4.5 7h15"}),o.jsx("path",{d:"M9 7V4.8h6V7"}),o.jsx("path",{d:"m6.5 7 .8 12h9.4l.8-12"}),o.jsx("path",{d:"M10 10.5v5M14 10.5v5"})]})}function Q5t({cases:e,loading:t=!1,error:n="",notice:i="",runtimeBacked:r=!1,selectionMode:s=!1,selectedCaseIds:a,focusedCaseId:l="",expandedCaseIds:c,deleting:u=!1,canDelete:d=!1,onOpenCase:f,onToggleCase:h,onToggleExpanded:p,onDeleteCase:g,onRetry:b}){const{t:v,i18n:y}=xe("ui");return o.jsxs("div",{className:"aw-case-table",children:[o.jsxs("div",{className:"aw-case-row aw-case-row-head",children:[o.jsx("span",{children:v("agentWorkspace.userInput")}),o.jsx("span",{children:v("agentWorkspace.agentOutput")}),o.jsx("span",{children:v("agentWorkspace.score")}),o.jsx("span",{children:v("agentWorkspace.scoreReason")}),o.jsx("span",{className:"aw-case-action-head",children:v("skillCenter.actions")})]}),t?o.jsx("div",{className:"aw-case-empty",children:v("agentWorkspace.loadingEvaluationSet")}):n?o.jsxs("div",{className:"aw-case-empty aw-case-error",children:[o.jsx("span",{children:n}),b&&o.jsx("button",{type:"button",onClick:b,children:v("common.retry")})]}):i?o.jsx("div",{className:"aw-case-empty",children:i}):e.length===0?o.jsx("div",{className:"aw-case-empty",children:v(r?"agentWorkspace.noFeedbackCases":"agentWorkspace.noMatchingCases")}):e.map(x=>{var _,j;const w=x.id.startsWith("local:"),O=(a==null?void 0:a.has(x.id))??!1,k=(c==null?void 0:c.has(x.id))??!1,E=x.output.length+x.referenceOutput.length>220||(((_=x.reason)==null?void 0:_.length)??0)>120,C=d&&!w,N=!!(x.comment&&x.comment.trim()!==((j=x.reason)==null?void 0:j.trim()));return o.jsxs("div",{className:["aw-case-row",l===x.id?"is-focused":"",s?"is-selecting":"",O?"is-selected-for-delete":""].filter(Boolean).join(" "),role:"row",tabIndex:0,"aria-selected":s?O:void 0,onClick:()=>{if(s){C&&(h==null||h(x));return}f==null||f(x)},onKeyDown:T=>{T.target===T.currentTarget&&(T.key!=="Enter"&&T.key!==" "||(T.preventDefault(),s?C&&(h==null||h(x)):f==null||f(x)))},children:[o.jsxs("div",{className:"aw-case-text aw-case-cell","data-label":v("agentWorkspace.userInput"),children:[o.jsxs("span",{className:"aw-case-title-line",children:[s&&C&&o.jsx("span",{className:`aw-select-marker${O?" is-checked":""}`,"aria-hidden":"true"}),o.jsx("strong",{title:x.input,children:x.input||v("agentWorkspace.noUserInput")})]}),N&&o.jsxs("small",{title:x.comment,children:[v("agentWorkspace.note"),x.comment]}),o.jsx("small",{className:"aw-case-time",children:C5t(x.createdAt,y.resolvedLanguage??y.language,v)}),(x.userId||x.sessionId)&&o.jsx("small",{title:[x.userId,x.sessionId].filter(Boolean).join(" · "),children:[x.userId,x.sessionId].filter(Boolean).join(" · ")})]}),o.jsxs("div",{className:`aw-case-output aw-case-cell${k?" is-expanded":""}`,"data-label":v("agentWorkspace.agentOutput"),children:[o.jsx("p",{className:"aw-case-output-preview",title:x.output,children:x.output||v("agentWorkspace.noVisibleResponse")}),x.referenceOutput&&o.jsxs("small",{className:"aw-case-output-preview",title:x.referenceOutput,children:[v("agentWorkspace.reference"),": ",x.referenceOutput]}),E&&o.jsx("button",{type:"button",className:"aw-case-expand",onClick:T=>{T.stopPropagation(),p==null||p(x.id)},children:v(k?"common.collapse":"common.expand")})]}),o.jsx("div",{className:"aw-case-score aw-case-cell","data-label":v("agentWorkspace.score"),children:T5t(x,v)}),o.jsx("div",{className:`aw-case-reason aw-case-cell${k?" is-expanded":""}`,"data-label":v("agentWorkspace.scoreReason"),children:o.jsx("p",{title:x.reason||void 0,children:x.reason||"—"})}),o.jsx("div",{className:"aw-case-actions aw-case-cell","data-label":v("skillCenter.actions"),children:C&&o.jsx("button",{type:"button",className:"aw-case-delete",onClick:T=>{T.stopPropagation(),g==null||g(x)},disabled:u,title:v("agentWorkspace.deleteFeedbackCase"),"aria-label":v("agentWorkspace.deleteFeedbackCase"),children:o.jsx(U5t,{})})})]},x.id)})]})}function z5t({group:e,agents:t,cases:n,onChange:i,onRun:r}){const{t:s}=xe("ui"),[a,l]=m.useState("config"),c=e.agentIds.map(h=>t.find(p=>p.id===h)).filter(h=>!!h),u=["回答质量","事实准确性","工具调用","响应效率"];m.useEffect(()=>l("config"),[e.id]);const d=h=>{i({...e,agentIds:e.agentIds.includes(h)?e.agentIds.filter(p=>p!==h):[...e.agentIds,h]})},f=h=>{i({...e,metrics:e.metrics.includes(h)?e.metrics.filter(p=>p!==h):[...e.metrics,h]})};return o.jsxs("main",{className:"aw-main",children:[o.jsxs("div",{className:"aw-eval-head",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"aw-agent-title-row",children:[o.jsx("h2",{children:QO(e.name,s)}),o.jsx("span",{children:s("agentWorkspace.evaluationGroup")})]}),o.jsx("p",{children:s("agentWorkspace.evaluationGroupStats",{agents:c.length,caseSet:QO(e.caseSet,s),runs:e.history.length})})]}),o.jsxs("button",{type:"button",className:"aw-run",onClick:()=>r(e),disabled:!0,children:[o.jsx(o7e,{"aria-hidden":!0}),s("agentWorkspace.startEvaluation")]})]}),o.jsxs("nav",{className:"aw-agent-tabs","aria-label":s("agentWorkspace.evaluationGroupDetails"),children:[o.jsx("button",{type:"button",className:a==="config"?"is-active":"","aria-pressed":a==="config",onClick:()=>l("config"),disabled:!0,children:s("agentWorkspace.evaluationConfig")}),o.jsx("button",{type:"button",className:a==="history"?"is-active":"","aria-pressed":a==="history",onClick:()=>l("history"),disabled:!0,children:s("agentWorkspace.historyResults")})]}),o.jsx("div",{className:"aw-content",children:a==="config"?o.jsxs("div",{className:"aw-eval-setup",children:[o.jsxs("section",{className:"aw-eval-block",children:[o.jsxs("div",{className:"aw-card-head",children:[o.jsx("strong",{children:s("agentWorkspace.participatingAgents")}),o.jsx("span",{children:s("agentWorkspace.selectedCount",{count:c.length})})]}),o.jsx("div",{className:"aw-eval-agent-grid",children:t.map(h=>o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:e.agentIds.includes(h.id),onChange:()=>d(h.id)}),o.jsxs("span",{children:[o.jsx("strong",{children:h.label}),o.jsx("small",{children:h.remote?s("agentWorkspace.remote"):s("agentWorkspace.local")})]})]},h.id))})]}),o.jsxs("div",{className:"aw-eval-setting-grid",children:[o.jsxs("section",{className:"aw-eval-block",children:[o.jsx("div",{className:"aw-card-head",children:o.jsx("strong",{children:s("agentWorkspace.evaluationResources")})}),o.jsxs("div",{className:"aw-eval-fields",children:[o.jsxs("label",{children:[o.jsx("span",{children:s("agentWorkspace.evaluationSet")}),o.jsxs("select",{value:e.caseSet,onChange:h=>i({...e,caseSet:h.currentTarget.value}),children:[o.jsx("option",{value:"核心回归集",children:s("agentWorkspace.evaluationDefaults.coreSet")}),o.jsx("option",{value:"安全边界集",children:s("agentWorkspace.evaluationDefaults.safetySet")}),o.jsx("option",{value:"工具调用集",children:s("agentWorkspace.evaluationDefaults.toolSet")})]}),o.jsx("small",{children:s("agentWorkspace.caseCount",{count:n.length})})]}),o.jsxs("label",{children:[o.jsx("span",{children:s("agentWorkspace.evaluator")}),o.jsxs("select",{value:e.evaluator,onChange:h=>i({...e,evaluator:h.currentTarget.value}),children:[o.jsx("option",{value:"综合质量评估器",children:s("agentWorkspace.evaluationDefaults.qualityEvaluator")}),o.jsx("option",{value:"事实一致性评估器",children:s("agentWorkspace.evaluationDefaults.factualEvaluator")}),o.jsx("option",{value:"工具调用评估器",children:s("agentWorkspace.evaluationDefaults.toolEvaluator")})]})]}),o.jsxs("label",{children:[o.jsx("span",{children:s("agentWorkspace.concurrency")}),o.jsxs("select",{value:e.concurrency,onChange:h=>i({...e,concurrency:h.currentTarget.value}),children:[o.jsx("option",{value:"2",children:"2"}),o.jsx("option",{value:"4",children:"4"}),o.jsx("option",{value:"8",children:"8"})]})]})]})]}),o.jsxs("section",{className:"aw-eval-block",children:[o.jsxs("div",{className:"aw-card-head",children:[o.jsx("strong",{children:s("agentWorkspace.evaluationMetrics")}),o.jsx("span",{children:s("agentWorkspace.selectedMetricCount",{count:e.metrics.length})})]}),o.jsx("div",{className:"aw-metric-list",children:u.map(h=>o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:e.metrics.includes(h),onChange:()=>f(h)}),o.jsx("span",{children:QO(h,s)})]},h))})]})]})]}):o.jsxs("section",{className:"aw-eval-history",children:[o.jsx("div",{className:"aw-section-head",children:o.jsxs("div",{children:[o.jsx("h3",{children:s("agentWorkspace.historyResults")}),o.jsx("p",{children:s("agentWorkspace.historyDescription")})]})}),e.history.length===0?o.jsxs("div",{className:"aw-results-empty",children:[o.jsx("strong",{children:s("agentWorkspace.noHistory")}),o.jsx("span",{children:s("agentWorkspace.noHistoryDescription")})]}):o.jsx("div",{className:"aw-history-list",children:e.history.map((h,p)=>o.jsxs("button",{type:"button",children:[o.jsxs("span",{children:[o.jsx("strong",{children:s("agentWorkspace.evaluationRun",{index:e.history.length-p})}),o.jsx("small",{children:s("agentWorkspace.evaluationRunMeta",{time:QO(h.createdAt,s),agents:c.length})})]}),o.jsxs("span",{className:"aw-history-score",children:[o.jsx("strong",{children:h.score}),o.jsx("small",{children:s("agentWorkspace.overallScore")})]}),o.jsxs("span",{className:"aw-complete",children:[o.jsx(Vu,{}),s("agentWorkspace.completed")]}),o.jsx(fw,{"aria-hidden":!0})]},h.id))})]})})]})}const V5t=5e3,H5t=4;let X5=0;const mte=[];function gte(e){return e instanceof Error&&e.name==="AbortError"}function q5t(e){return e instanceof Error&&e.name==="TimeoutError"}function W5t(e){return q5t(e)||e instanceof GF&&[500,502,503,504].includes(e.status)}function K5t(e,t){return t!=null&&t.aborted?Promise.reject(t.reason??new DOMException("Request aborted","AbortError")):new Promise((n,i)=>{const r=()=>{globalThis.clearTimeout(s),i((t==null?void 0:t.reason)??new DOMException("Request aborted","AbortError"))},s=globalThis.setTimeout(()=>{t==null||t.removeEventListener("abort",r),n()},e);t==null||t.addEventListener("abort",r,{once:!0})})}async function G5t(e={},t={}){const n=t.request??Ex,i=t.wait??K5t;try{return await n(e)}catch(r){if(!W5t(r))throw r;return await i(V5t,e.signal),n(e)}}async function mje(e){var t;X5>=H5t&&await new Promise(n=>mte.push(n)),X5+=1;try{return await e()}finally{X5-=1,(t=mte.shift())==null||t()}}async function X5t(e,t){await Promise.allSettled(e.map(n=>mje(()=>t(n))))}const Y5t="/web/sandbox/sessions",bte="/web/sandbox/codex-project-handoff",yte=3e4,Y5=33e4,Z5t=6e4,J5t=6e5,iO=15e3,Df=6e4,eLt=33e4,vte=3e4,tLt=60*60,xte=40;function QQ(e){switch(e.trim().toLowerCase()){case"ready":return V("sandbox.status.ready");case"wakeable":return V("sandbox.status.wakeable");case"creating":return V("sandbox.status.creating");case"starting":case"initializing":return V("sandbox.status.starting");case"pending":return V("sandbox.status.pending");case"running":return V("sandbox.status.running");case"failed":case"error":return V("sandbox.status.failed");case"stopped":return V("sandbox.status.stopped");case"expired":return V("sandbox.status.expired");case"deleting":return V("sandbox.status.deleting");case"deleted":return V("sandbox.status.deleted");default:return V("sandbox.status.unknown")}}function rs(e){const t=Hu(e);return t.has("Accept")||t.set("Accept","application/json"),t}class NI extends Error{constructor(n,i={}){var r;super(n);Di(this,"code");Di(this,"retryable");Di(this,"publicMessage");Di(this,"httpStatus");this.name="SandboxServiceError",this.code=i.code??"",this.retryable=i.retryable===!0,this.publicMessage=((r=i.publicMessage)==null?void 0:r.trim())||n,this.httpStatus=i.httpStatus}}function Ote(e){return e instanceof NI?e.publicMessage:e instanceof Error&&e.name==="TimeoutError"?V("sandbox.developmentTimeout"):e instanceof TypeError?V("sandbox.developmentDisconnected"):V("sandbox.developmentFailed")}async function ss(e,t){const n=await e.text().catch(()=>"");let i={};try{i=JSON.parse(n)}catch{const d=V("common.fallbackWithHttpStatus",{fallback:t,status:e.status});return new Error(n?V("common.fallbackWithDetail",{fallback:d,detail:n}):d)}const r=i.detail,s=r&&typeof r=="object"?r:i,a=r&&typeof r=="object"&&"message"in r?r.message:r??i.error??i.message,l=typeof a=="string"?a:a==null?"":JSON.stringify(a),c=V("common.fallbackWithHttpStatus",{fallback:t,status:e.status}),u=l?V("common.fallbackWithDetail",{fallback:c,detail:l}):c;return new NI(u,{code:typeof s.code=="string"?s.code:"",retryable:s.retryable===!0,publicMessage:l||c,httpStatus:e.status})}async function wte(e,t){const n=await e.text().catch(()=>"");try{return JSON.parse(n)}catch{throw new Error(V("sandbox.invalidStudioResponse",{fallback:t}))}}function ag(e,t="codex"){if(!e.sessionId||!e.status)throw new Error(V("sandbox.invalidSession"));return{resourceType:"session",id:e.sessionId,toolName:t,userSessionId:e.userSessionId??"",displayName:e.displayName??"",status:e.status,createdAt:e.createdAt??"",expireAt:e.expireAt??"",persistent:e.persistent!==!1,toolType:e.toolType??"",intelligentDevelopment:e.toolName==="intelligent-development",createdBy:e.createdBy??"",region:e.region??"",isMine:e.isMine===!0,threadId:e.threadId??"",cwd:e.cwd??"",workspaceLocked:e.workspaceLocked===!0,busy:e.busy===!0,...typeof e.model=="string"?{model:e.model}:{},permissions:jI(e.permissions),...e.conversation===void 0?{}:{restoredConversation:Sg(e.conversation)}}}function Ste(e,t="codex"){if(!e.snapshotId||!e.status)throw new Error(V("sandbox.invalidSnapshot"));return{resourceType:"snapshot",id:e.snapshotId,snapshotId:e.snapshotId,sourceSessionId:e.sessionId??"",toolName:t,userSessionId:e.userSessionId??"",displayName:e.displayName??"",status:e.status,snapshotStatus:e.snapshotStatus??"Unknown",reason:e.reason??"",createdAt:e.createdAt??"",createdBy:e.createdBy??"",region:e.region??"",isMine:e.isMine===!0}}function kte(e,t){if(!(t!=null&&t.autoResumeSnapshots))return e;const n=new URLSearchParams({autoResumeSnapshots:"true"});return`${e}?${n.toString()}`}const rO={approvalPolicy:"on-request",approvalsReviewer:"user",sandboxMode:"workspace-write",networkAccess:!1};function jI(e){if(!e||typeof e!="object")return{...rO};const t=e,n=t.approvalPolicy,i=t.approvalsReviewer,r=t.sandboxMode;return{approvalPolicy:n==="untrusted"||n==="on-request"||n==="never"?n:rO.approvalPolicy,approvalsReviewer:i==="user"||i==="auto_review"?i:rO.approvalsReviewer,sandboxMode:r==="read-only"||r==="workspace-write"||r==="danger-full-access"?r:rO.sandboxMode,networkAccess:typeof t.networkAccess=="boolean"?t.networkAccess:rO.networkAccess}}function Ete(e){if(!e||typeof e!="object")throw new Error(V("sandbox.invalidSettings"));const t=e;return{threadId:typeof t.threadId=="string"?t.threadId:"",cwd:typeof t.cwd=="string"?t.cwd:"",...typeof t.model=="string"?{model:t.model}:{},workspaceLocked:t.workspaceLocked===!0,busy:t.busy===!0,permissions:jI(t.permissions)}}function Oa(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function nLt(e){const t=Oa(e);if(!(!t||typeof t.id!="string"||!t.id))return{id:t.id,displayName:typeof t.displayName=="string"?t.displayName:t.id,description:typeof t.description=="string"?t.description:"",isDefault:t.isDefault===!0}}function iLt(e){const t=Oa(e);if(!(!t||typeof t.id!="string"||!t.id||typeof t.name!="string"||!t.name))return{id:t.id,name:t.name,description:typeof t.description=="string"?t.description:""}}function gje(e){const t=Oa(e);if(!(!t||typeof t.id!="string"||!t.id))return{id:t.id,...typeof t.name=="string"&&t.name?{name:t.name}:{},preview:typeof t.preview=="string"?t.preview:"",cwd:typeof t.cwd=="string"?t.cwd:"",modelProvider:typeof t.modelProvider=="string"?t.modelProvider:"",createdAt:typeof t.createdAt=="number"&&Number.isFinite(t.createdAt)?t.createdAt:0,updatedAt:typeof t.updatedAt=="number"&&Number.isFinite(t.updatedAt)?t.updatedAt:0,status:typeof t.status=="string"?t.status:"unknown"}}function Sg(e){const t=Oa(e),n=gje(t==null?void 0:t.thread);if(!t||!n||typeof t.threadId!="string"||!Array.isArray(t.messages))throw new Error(V("sandbox.invalidThreadSnapshot"));const i=t.messages.flatMap(r=>{const s=Oa(r);if(!s||typeof s.id!="string"||s.role!=="user"&&s.role!=="assistant"||typeof s.content!="string"||typeof s.timestamp!="number")return[];const a=Array.isArray(s.skillNames)?s.skillNames.filter(c=>typeof c=="string"&&!!c):[],l=Array.isArray(s.images)?s.images.flatMap(c=>{const u=Oa(c);return!u||typeof u.mimeType!="string"||!u.mimeType.startsWith("image/")||typeof u.data!="string"||!u.data?[]:[{mimeType:u.mimeType,data:u.data,...typeof u.name=="string"&&u.name?{name:u.name}:{},...typeof u.alt=="string"&&u.alt?{alt:u.alt}:{}}]}):[];return[{id:s.id,role:s.role,content:s.content,timestamp:s.timestamp,...a.length?{skillNames:a}:{},...l.length?{images:l}:{}}]});return{thread:n,threadId:t.threadId,messages:i,...typeof t.model=="string"?{model:t.model}:{},...typeof t.cwd=="string"?{cwd:t.cwd}:{},workspaceLocked:t.workspaceLocked===!0,permissions:jI(t.permissions)}}function h8(e){if(!e||typeof e!="object")return;const t=e;if(![t.totalTokens,t.inputTokens,t.cachedInputTokens,t.outputTokens,t.reasoningOutputTokens].some(i=>typeof i!="number"||!Number.isFinite(i)||i<0))return{totalTokens:Math.trunc(t.totalTokens),inputTokens:Math.trunc(t.inputTokens),cachedInputTokens:Math.trunc(t.cachedInputTokens),outputTokens:Math.trunc(t.outputTokens),reasoningOutputTokens:Math.trunc(t.reasoningOutputTokens)}}function rLt(e){const t=h8(e.usage);if(!t||typeof e.turnId!="string")return;const n=h8(e.threadTotal),i=e.modelContextWindow;return{turnId:e.turnId,usage:t,...n?{threadTotal:n}:{},...typeof i=="number"&&Number.isFinite(i)&&i>=0?{modelContextWindow:Math.trunc(i)}:{}}}function sLt(e){return typeof e.id!="string"||e.kind!=="command"&&e.kind!=="file"||typeof e.method!="string"?null:{id:e.id,kind:e.kind,method:e.method,...typeof e.reason=="string"?{reason:e.reason}:{},...typeof e.command=="string"?{command:e.command}:{},...typeof e.cwd=="string"?{cwd:e.cwd}:{},...typeof e.grantRoot=="string"?{grantRoot:e.grantRoot}:{},...e.changes!==void 0?{changes:e.changes}:{},...typeof e.threadId=="string"?{threadId:e.threadId}:{},...typeof e.turnId=="string"?{turnId:e.turnId}:{},...typeof e.itemId=="string"?{itemId:e.itemId}:{}}}async function aLt(e,t={}){if(!e.body)throw new Error(V("sandbox.emptyConversationResponse"));const n=e.body.getReader(),i=new TextDecoder;let r="",s="";const a=[],l=new Map;let c,u;function d(){var b;const g=c?[...a,c]:a;(b=t.onBlocks)==null||b.call(t,g.map(v=>({...v})))}function f(g){s+=g;const b=a[a.length-1],v=a.length-1,y=[...l.values()].includes(v);(b==null?void 0:b.kind)==="text"&&!y?b.text+=g:a.push({kind:"text",text:g}),d()}function h(g){if(typeof g.id!="string"||g.kind!=="thinking"&&g.kind!=="commentary"&&g.kind!=="tool"||g.status!=="running"&&g.status!=="done")return;const b=g.status==="done";let v;if(g.kind==="thinking"){if(typeof g.text!="string"||!g.text)return;v={kind:"thinking",text:g.text,done:b}}else if(g.kind==="commentary"){if(typeof g.text!="string"||!g.text)return;v={kind:"text",text:g.text}}else{if(typeof g.name!="string"||!g.name)return;v={kind:"tool",name:g.name,args:g.args,response:g.response,done:b}}const y=l.get(g.id);y===void 0?(l.set(g.id,a.length),a.push(v)):a[y]=v,d()}function p(g){var x,w,O;let b="message";const v=[];for(const k of g.split(/\r?\n/))k.startsWith("event:")&&(b=k.slice(6).trim()),k.startsWith("data:")&&v.push(k.slice(5).trimStart());if(v.length===0)return;let y;try{y=JSON.parse(v.join(` +`))}catch{throw new Error(V("sandbox.invalidConversationResponse"))}if(b==="error"){const k=typeof y.message=="string"&&y.message?y.message:V("sandbox.conversationFailed");throw new NI(k,{code:typeof y.code=="string"?y.code:"",retryable:y.retryable===!0,publicMessage:k})}if(b==="progress"&&typeof y.text=="string"&&y.text&&(c={kind:"progress",text:y.text},d()),b==="activity"&&h(y),b==="development.source_ready"||b==="development.succeeded"){const k=Oa(y.payload),S=Oa(k==null?void 0:k.delivery),E=b==="development.succeeded";if(S&&typeof S.sessionId=="string"&&typeof S.artifactSha256=="string"&&typeof S.validationReportSha256=="string"&&typeof S.agentName=="string"&&typeof S.entryPoint=="string"&&typeof S.fileCount=="number"&&typeof S.artifactSize=="number"&&typeof S.validatedAt=="string"&&S.deployable===!0&&S.verified===E&&typeof S.validationSummary=="string"&&Array.isArray(S.gateSummary)&&S.gateSummary.every(C=>typeof C=="string")){const C={kind:"delivery",value:{sessionId:S.sessionId,...typeof S.projectId=="string"&&typeof S.versionId=="string"?{projectId:S.projectId,versionId:S.versionId,...S.parentVersionId===null||typeof S.parentVersionId=="string"?{parentVersionId:S.parentVersionId}:{}}:{},artifactSha256:S.artifactSha256,validationReportSha256:S.validationReportSha256,agentName:S.agentName,entryPoint:S.entryPoint,fileCount:S.fileCount,artifactSize:S.artifactSize,validatedAt:S.validatedAt,gateSummary:S.gateSummary,deployable:S.deployable,verified:S.verified,validationSummary:S.validationSummary}},N=a.findIndex(_=>_.kind==="delivery"&&_.value.sessionId===S.sessionId&&_.value.artifactSha256===S.artifactSha256&&_.value.validationReportSha256===S.validationReportSha256);N===-1?a.push(C):a[N]=C,d()}}if(b==="approval"){const k=sLt(y);k&&((x=t.onApproval)==null||x.call(t,k))}if(b==="usage"){const k=rLt(y);k&&(u=k,(w=t.onUsage)==null||w.call(t,k))}b==="approval_resolved"&&typeof y.approvalId=="string"&&((O=t.onApprovalResolved)==null||O.call(t,y.approvalId)),b==="delta"&&typeof y.text=="string"&&f(y.text),b==="done"&&!s&&typeof y.text=="string"&&f(y.text),b==="done"&&c&&(c=void 0,d())}for(;;){const{done:g,value:b}=await n.read();r+=i.decode(b,{stream:!g});const v=r.split(/\r?\n\r?\n/);if(r=v.pop()??"",v.forEach(p),g)break}if(r.trim()&&p(r),c&&(c=void 0,d()),a.length===0)throw new Error(V("sandbox.emptyReply"));return{text:s,blocks:a,...u?{usage:u}:{}}}async function Ml(e,t,n,{method:i="GET",body:r,options:s={},fallback:a}){if(!t)throw new Error(V("sandbox.missingSession"));const l=await Ln(`${e}/${encodeURIComponent(t)}/${n}`,{method:i,headers:rs(r===void 0?void 0:{"Content-Type":"application/json"}),...r===void 0?{}:{body:JSON.stringify(r)},signal:s.signal},Df);if(!l.ok)throw await ss(l,a);return l.json()}function bje(e,t={}){return{async listSessions(n={}){const i=await Ln(kte(e,n),{method:"GET",headers:rs(),signal:n.signal},yte);if(!i.ok)throw await ss(i,V("sandbox.listCodexFailed"));const r=await i.json();if(!Array.isArray(r.sessions))throw new Error(V("sandbox.invalidSessionList"));if(r.snapshots!==void 0&&!Array.isArray(r.snapshots))throw new Error(V("sandbox.invalidSnapshotList"));return[...r.sessions.map(s=>ag(s)),...(r.snapshots??[]).map(s=>Ste(s))]},async startSession(n={}){var r,s;const i=await Ln(e,{method:"POST",headers:rs({"Content-Type":"application/json"}),body:JSON.stringify({displayName:((r=n.displayName)==null?void 0:r.trim())??"",...(s=n.modelId)!=null&&s.trim()?{modelId:n.modelId.trim()}:{},...t.textOnly&&n.projectId?{projectId:n.projectId,...n.baseVersionId?{baseVersionId:n.baseVersionId}:{}}:{},...t.textOnly?{}:{persistent:n.persistent??!0},...n.diskGb!==void 0?{diskGb:n.diskGb}:{}}),signal:n.signal},Y5);if(!i.ok)throw await ss(i,V("sandbox.startFailed"));return ag(await i.json())},async listAgentSessions(n,i={}){const r=await Ln(kte(`/web/${n}/sessions`,i),{method:"GET",headers:rs(),signal:i.signal},yte);if(!r.ok)throw await ss(r,V("sandbox.listAgentFailed",{kind:n}));const s=await r.json();if(!Array.isArray(s.sessions))throw new Error(V("sandbox.invalidKindSessionList",{kind:n}));if(s.snapshots!==void 0&&!Array.isArray(s.snapshots))throw new Error(V("sandbox.invalidKindSnapshotList",{kind:n}));return[...s.sessions.map(a=>ag(a,n)),...(s.snapshots??[]).map(a=>Ste(a,n))]},async startAgentSession(n,i={}){var s;const r=await Ln(`/web/${n}/sessions`,{method:"POST",headers:rs({"Content-Type":"application/json"}),body:JSON.stringify({displayName:((s=i.displayName)==null?void 0:s.trim())??"",persistent:i.persistent??!0,...i.diskGb!==void 0?{diskGb:i.diskGb}:{}}),signal:i.signal},Y5);if(!r.ok)throw await ss(r,V("sandbox.createAgentFailed",{kind:n}));return ag(await r.json(),n)},async openAgentSession(n,i,r={}){if(!i)throw new Error(V("sandbox.missingSessionToOpen"));const s=await Ln(`/web/${n}/sessions/${encodeURIComponent(i)}/open`,{method:"POST",headers:rs(),signal:r.signal},Df);if(!s.ok)throw await ss(s,V("sandbox.openAgentFailed",{kind:n}));const a=await s.json();if(typeof a.webuiUrl!="string"||!a.webuiUrl.startsWith("/"))throw new Error(V("sandbox.invalidAgentHomeUrl",{kind:n}));return{session:ag(a,n),kind:n,webuiUrl:Lo(a.webuiUrl)}},async launchAgentTerminal(n,i,r={}){if(!i)throw new Error(V("sandbox.missingSessionForTerminal"));const s=await Ln(`/web/${n}/sessions/${encodeURIComponent(i)}/terminal`,{method:"POST",headers:rs(),signal:r.signal},Df);if(!s.ok)throw await ss(s,V("sandbox.openTerminalFailed",{kind:n}));const a=await s.json();return{url:yje(a.url,`${n} Terminal`),...typeof a.shellSessionId=="string"?{shellSessionId:a.shellSessionId}:{}}},async deleteAgentSession(n,i,r={}){if(!i)return;const s=await Ln(`/web/${n}/sessions/${encodeURIComponent(i)}`,{method:"DELETE",headers:rs(),signal:r.signal},iO);if(!s.ok&&s.status!==404)throw await ss(s,V("sandbox.deleteAgentFailed",{kind:n}))},async resumeSnapshot(n,i,r={}){if(!i)throw new Error(V("sandbox.missingSnapshot"));const s=n==="codex"?"/web/sandbox":`/web/${n}`,a=await Ln(`${s}/snapshots/${encodeURIComponent(i)}/resume`,{method:"POST",headers:rs(),signal:r.signal},Y5);if(!a.ok)throw await ss(a,V("sandbox.resumeSnapshotFailed"));return ag(await a.json(),n)},async deleteSnapshot(n,i,r={}){if(!i)return;const s=n==="codex"?"/web/sandbox":`/web/${n}`,a=await Ln(`${s}/snapshots/${encodeURIComponent(i)}`,{method:"DELETE",headers:rs(),signal:r.signal},iO);if(!a.ok&&a.status!==404)throw await ss(a,V("sandbox.deleteSnapshotFailed"))},async connectSession(n,i={}){if(!n)throw new Error(V("sandbox.missingSessionToConnect"));const r=await Ln(`${e}/${encodeURIComponent(n)}/connect`,{method:"POST",headers:rs({"Content-Type":"application/json"}),signal:i.signal},Z5t);if(!r.ok)throw await ss(r,V("sandbox.connectCodexFailed"));const s=ag(await r.json());if(s.status.toLowerCase()!=="ready")throw new Error(V("sandbox.sessionNotReady",{status:s.status}));return s},async sendMessage(n,i={}){var s;if(!n.sessionId||!n.text.trim())throw new Error(V("sandbox.invalidMessage"));const r=await Ln(`${e}/${encodeURIComponent(n.sessionId)}/messages`,{method:"POST",headers:rs({Accept:"text/event-stream","Content-Type":"application/json"}),body:JSON.stringify({message:n.text,...!t.textOnly&&((s=n.skillIds)!=null&&s.length)?{skillIds:n.skillIds}:{}}),signal:i.signal},t.messageTimeoutMs??J5t);if(!r.ok)throw await ss(r,V("sandbox.conversationFailed"));return aLt(r,i)},async interruptSession(n,i={}){if(!n)return;const r=await Ln(`${e}/${encodeURIComponent(n)}/interrupt`,{method:"POST",headers:rs(),signal:i.signal},t.interruptTimeoutMs??iO);if(!r.ok&&![404,409].includes(r.status))throw await ss(r,V("sandbox.interruptFailed"))},async getStatus(n,i={}){const r=await Ml(e,n,"status",{options:i,fallback:V("sandbox.getStatusFailed")}),s=Ete(r),a=Oa(r),l=h8(a==null?void 0:a.threadTotal),c=a==null?void 0:a.modelContextWindow;return{...s,...l?{threadTotal:l}:{},...typeof c=="number"&&Number.isFinite(c)&&c>=0?{modelContextWindow:Math.trunc(c)}:{}}},async getEndpoint(n,i={}){const r=Oa(await Ml(e,n,"endpoint",{options:i,fallback:V("sandbox.getEndpointFailed")}));if(typeof(r==null?void 0:r.endpoint)!="string"||!r.endpoint.trim())throw new Error(V("sandbox.invalidEndpoint"));return{endpoint:r.endpoint,sessionId:typeof r.sessionId=="string"?r.sessionId:n,...typeof r.expireAt=="string"?{expireAt:r.expireAt}:{}}},async createCodexProjectHandoffPairing(n={}){const i=await Ln(`${bte}/pairings`,{method:"POST",headers:rs({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify({ttlSeconds:tLt}),signal:n.signal},vte);if(!i.ok)throw await ss(i,V("sandbox.createHandoffPairingFailed"));const r=Oa(await wte(i,V("sandbox.createHandoffPairingFailed")));if(typeof(r==null?void 0:r.pairingCode)!="string"||!r.pairingCode.trim()||typeof r.expireAt!="string"||!r.expireAt.trim())throw new Error(V("sandbox.invalidHandoffPairing"));const s=typeof r.studioUrl=="string"&&r.studioUrl.trim()?r.studioUrl.trim():window.location.origin;return{pairingCode:r.pairingCode,expireAt:r.expireAt,studioUrl:s}},async getCodexProjectHandoffStatus(n,i={}){const r=await Ln(`${bte}/pairings/${encodeURIComponent(n)}`,{headers:rs({Accept:"application/json"}),signal:i.signal},vte);if(!r.ok)throw await ss(r,V("sandbox.getHandoffStatusFailed"));const s=Oa(await wte(r,V("sandbox.getHandoffStatusFailed"))),a=new Set(["issued","creating","session-created","continuing","running","completed","failed"]);if(typeof(s==null?void 0:s.state)!="string"||!a.has(s.state)||typeof s.expireAt!="string"||!s.expireAt.trim())throw new Error(V("sandbox.invalidHandoffStatus"));return{state:s.state,expireAt:s.expireAt,...typeof s.projectName=="string"?{projectName:s.projectName}:{},...typeof s.agentName=="string"?{agentName:s.agentName}:{},...typeof s.sessionId=="string"?{sessionId:s.sessionId}:{},...typeof s.error=="string"?{error:s.error}:{},...s.failedStage==="creating-session"||s.failedStage==="uploading-project"||s.failedStage==="restoring-project"||s.failedStage==="continuing-task"?{failedStage:s.failedStage}:{}}},async listModels(n,i={}){const r=Oa(await Ml(e,n,"models",{options:i,fallback:V("sandbox.listModelsFailed")}));if(!Array.isArray(r==null?void 0:r.models))throw new Error(V("sandbox.invalidModelList"));return r.models.flatMap(s=>{const a=nLt(s);return a?[a]:[]})},async setModel(n,i,r={}){const s=Oa(await Ml(e,n,"model",{method:"PUT",body:{model:i},options:r,fallback:V("sandbox.setModelFailed")}));if(typeof(s==null?void 0:s.model)!="string"||!s.model)throw new Error(V("sandbox.invalidModel"));return s.model},async listSkills(n,i=!1,r={}){const a=Oa(await Ml(e,n,`skills${i?"?force_reload=true":""}`,{options:r,fallback:V("sandbox.listSkillsFailed")}));if(!Array.isArray(a==null?void 0:a.skills))throw new Error(V("sandbox.invalidSkillList"));return a.skills.flatMap(l=>{const c=iLt(l);return c?[c]:[]})},async listThreads(n,i={},r={}){const s=new URLSearchParams;i.cursor&&s.set("cursor",i.cursor),i.search&&s.set("search",i.search),i.archived&&s.set("archived","true");const a=s.size?`?${s}`:"",l=Oa(await Ml(e,n,`threads${a}`,{options:r,fallback:V("sandbox.listThreadsFailed")}));if(!Array.isArray(l==null?void 0:l.threads))throw new Error(V("sandbox.invalidThreadList"));return{threads:l.threads.flatMap(c=>{const u=gje(c);return u?[u]:[]}),...typeof l.nextCursor=="string"?{nextCursor:l.nextCursor}:{}}},async newThread(n,i={}){return Sg(await Ml(e,n,"threads/new",{method:"POST",options:i,fallback:V("sandbox.createThreadFailed")}))},async readThread(n,i,r={}){if(!i)throw new Error(V("sandbox.missingThread"));return Sg(await Ml(e,n,`threads/${encodeURIComponent(i)}`,{options:r,fallback:V("sandbox.readThreadFailed")}))},async resumeThread(n,i,r={}){return Sg(await Ml(e,n,"threads/resume",{method:"POST",body:{threadId:i},options:r,fallback:V("sandbox.resumeThreadFailed")}))},async forkThread(n,i={}){return Sg(await Ml(e,n,"threads/fork",{method:"POST",options:i,fallback:V("sandbox.forkThreadFailed")}))},async archiveThread(n,i,r={}){const s=Oa(await Ml(e,n,"threads/archive",{method:"POST",body:{threadId:i},options:r,fallback:V("sandbox.archiveThreadFailed")}));if((s==null?void 0:s.archived)!==!0)throw new Error(V("sandbox.invalidArchiveResult"));return{archived:!0,...s.thread?{snapshot:Sg(s)}:{}}},async deleteThread(n,i,r={}){const s=Oa(await Ml(e,n,"threads/delete",{method:"POST",body:{threadId:i},options:r,fallback:V("sandbox.deleteThreadFailed")}));if((s==null?void 0:s.deleted)!==!0)throw new Error(V("sandbox.invalidDeleteResult"));return{deleted:!0,...s.thread?{snapshot:Sg(s)}:{}}},async compactThread(n,i={}){await Ml(e,n,"threads/compact",{method:"POST",options:i,fallback:V("sandbox.compactThreadFailed")})},async getSettings(n,i={}){const r=await Ln(`${e}/${encodeURIComponent(n)}/settings`,{method:"GET",headers:rs(),signal:i.signal},Df);if(!r.ok)throw await ss(r,V("sandbox.getSettingsFailed"));return Ete(await r.json())},async updatePermissions(n,i,r={}){const s=await Ln(`${e}/${encodeURIComponent(n)}/permissions`,{method:"PUT",headers:rs({"Content-Type":"application/json"}),body:JSON.stringify(i),signal:r.signal},Df);if(!s.ok)throw await ss(s,V("sandbox.updatePermissionsFailed"));const a=await s.json();return jI(a.permissions)},async updateWorkspace(n,i,r={}){const s=await Ln(`${e}/${encodeURIComponent(n)}/workspace`,{method:"PUT",headers:rs({"Content-Type":"application/json"}),body:JSON.stringify({cwd:i}),signal:r.signal},Df);if(!s.ok)throw await ss(s,V("sandbox.updateWorkspaceFailed"));const a=await s.json();if(typeof a.cwd!="string"||!a.cwd)throw new Error(V("sandbox.invalidWorkingDirectory"));return a.cwd},async listDirectories(n,i,r={}){const s=new URLSearchParams({path:i}),a=await Ln(`${e}/${encodeURIComponent(n)}/directories?${s}`,{method:"GET",headers:rs(),signal:r.signal},Df);if(!a.ok)throw await ss(a,V("sandbox.listDirectoriesFailed"));const l=await a.json();if(typeof l.path!="string"||!Array.isArray(l.directories)||l.directories.some(c=>!c||typeof c.name!="string"||typeof c.path!="string"))throw new Error(V("sandbox.invalidDirectoryList"));return{path:l.path,...typeof l.parent=="string"?{parent:l.parent}:{},directories:l.directories}},async resolveApproval(n,i,r,s={}){const a=await Ln(`${e}/${encodeURIComponent(n)}/approvals/${encodeURIComponent(i)}`,{method:"POST",headers:rs({"Content-Type":"application/json"}),body:JSON.stringify({decision:r}),signal:s.signal},Df);if(!a.ok)throw await ss(a,V("sandbox.resolveApprovalFailed"))},async launchTerminal(n,i={}){return Cte(e,n,"terminal",i)},async launchBrowser(n,i={}){return Cte(e,n,"browser",i)},async uploadFile(n,i,r={}){const s=new FormData;s.set("file",i,i.name);const a=await Ln(`${e}/${encodeURIComponent(n)}/files`,{method:"POST",headers:rs(),body:s,signal:r.signal},eLt);if(!a.ok)throw await ss(a,V("sandbox.uploadFileFailed"));const l=await a.json();if(typeof l.id!="string"||typeof l.path!="string"||typeof l.name!="string"||typeof l.mimeType!="string"||typeof l.sizeBytes!="number")throw new Error(V("sandbox.invalidUploadResult"));return l},async closeSession(n,i={}){if(!n)return;const r=await Ln(`${e}/${encodeURIComponent(n)}/disconnect`,{method:"POST",headers:rs(),signal:i.signal},iO);if(!r.ok&&r.status!==404)throw await ss(r,V("sandbox.disconnectCodexFailed"))},async deleteSession(n,i={}){if(!n)return;const r=await Ln(`${e}/${encodeURIComponent(n)}`,{method:"DELETE",headers:rs(),signal:i.signal},iO);if(!r.ok&&r.status!==404)throw await ss(r,V("sandbox.deleteCodexFailed"))}}}const br=bje(Y5t),fp=bje("/web/intelligent-development/sessions",{textOnly:!0,messageTimeoutMs:36e5,interruptTimeoutMs:45e3});async function Cte(e,t,n,i){const r=await Ln(`${e}/${encodeURIComponent(t)}/${n}`,{method:"POST",headers:rs(),signal:i.signal},Df);if(!r.ok)throw await ss(r,V(n==="terminal"?"sandbox.openSandboxTerminalFailed":"sandbox.openSandboxBrowserFailed"));const s=await r.json();return{url:yje(s.url,V("sandbox.toolLabel")),...typeof s.shellSessionId=="string"?{shellSessionId:s.shellSessionId}:{}}}function yje(e,t){if(typeof e!="string")throw new Error(V("sandbox.invalidToolUrl",{label:t}));if(e.startsWith("/"))return Lo(e);let n;try{n=new URL(e)}catch{throw new Error(V("sandbox.invalidToolUrl",{label:t}))}const i=n.protocol==="http:"&&window.location.protocol==="http:";if(n.protocol!=="https:"&&!i)throw new Error(V("sandbox.unsafeToolUrl",{label:t}));return n.toString()}function Ng(e,t,n){const i=e instanceof Error?`${e.name}: ${e.message}`:String(e||V("common.unknownError"));return[V("requestError.actionFailed",{action:t}),V("requestError.detail",{detail:i}),n?V("requestError.request",{request:n}):""].filter(Boolean).join(` +`)}function Jf({className:e="icon"}){return o.jsxs("svg",{className:`${e} sidebar-agent-face`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("rect",{x:"4.25",y:"5.25",width:"15.5",height:"13.5",rx:"4.75"}),o.jsx("path",{className:"sidebar-agent-face__eye",d:"M8.5 10.7v2"}),o.jsx("path",{className:"sidebar-agent-face__eye",d:"M15.5 10.7v2"})]})}function oLt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M8.4 18.4H7.2a4.2 4.2 0 0 1-.65-8.35A5.7 5.7 0 0 1 17.3 8.2a4.6 4.6 0 0 1-.4 9.2h-3.2"}),o.jsx("path",{d:"m7.8 12.3 2 2-2 2M12.2 16.3h3.2"})]})}function lLt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M18.9 6.25A8.4 8.4 0 1 0 19.6 16"}),o.jsx("path",{d:"M19 6.2c.1 2.1-.65 3.75-2.25 4.95-1.2.9-2.75 1.25-4.2.9"}),o.jsx("circle",{cx:"10.6",cy:"12.8",r:"2.45"}),o.jsx("path",{d:"m5.25 18.6 3.65-3.9M14.8 17.9c1.9-.45 3.55-1.65 4.65-3.35"})]})}function cLt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M6.2 20c.55-2.15.75-4.1.75-6.7V9.8A5.35 5.35 0 0 1 12.35 4c3.35 0 5.65 2.35 5.65 5.65v4.6c0 2.35.35 4.25 1.15 5.75"}),o.jsx("path",{d:"M8.05 10.2c1.35-.6 2.2-1.65 2.55-3.15.45 1.55 1.35 2.55 2.7 3.05.1-1 .4-1.95.85-2.75.45 1.25 1.2 2.2 2.15 2.75"}),o.jsx("path",{d:"M9.3 12.65h.01M14.9 12.65h.01M10.8 15.55c.8.5 1.65.5 2.45 0"}),o.jsx("path",{d:"M8.45 19.85c.95-.85 1.45-1.95 1.5-3.25M15.1 16.65c.05 1.2.55 2.3 1.55 3.2"})]})}function uLt(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M5.2 17.2V8.1a3 3 0 0 1 3-3h7.6a3 3 0 0 1 3 3v9.1"}),o.jsx("path",{d:"M7.4 17.2h9.2M9 19.9h6"}),o.jsx("path",{d:"M9.1 9.25h5.8M9.1 12h3.1"}),o.jsx("path",{d:"m14.1 12.4 2 2.1M16.2 12.4l-2.1 2.1"})]})}function gk({kind:e,...t}){return e==="codex"?o.jsx(oLt,{...t}):e==="deepseek-harness"?o.jsx(uLt,{...t}):e==="openclaw"?o.jsx(lLt,{...t}):o.jsx(cLt,{...t})}const dLt=["general","codex","deepseek-harness","openclaw","hermes"],fLt=24,hLt=3e4,pLt=7e3,mLt=2e4,gLt=6,bLt=2,yLt=250,Vp=new Map,hv=new Map,vLt=new Set;function og(e){const t=e.runtime;return t?`${t.region}:${t.runtimeId}:${t.currentVersion??""}`:""}function Tte(e,t){const n=e instanceof Error&&e.message.trim()?e.message.trim():t("myAgents.compatibility.unknownError");return{status:e instanceof Ls&&e.unsupported?"unsupported":"error",message:n}}function d2(e){if(!e){Vp.clear(),hv.clear(),O4();return}const t=new Set(e);if(t.size!==0){for(const[n,i]of hv)i.page.runtimes.some(r=>t.has(r.runtimeId))&&hv.delete(n);for(const n of t)O4(n);Vp.clear()}}function xLt(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M8 3.25v9.5M3.25 8h9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function OLt(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M8.313 3.646a.5.5 0 0 1 .707 0l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 1 1-.707-.708L11.46 8.5H3.333a.5.5 0 0 1 0-1h8.127L8.313 4.354a.5.5 0 0 1 0-.708Z",fill:"currentColor"})})}function wLt(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M2.75 5.25h8.75m0 0-2-2m2 2-2 2M13.25 10.75H4.5m0 0 2 2m-2-2 2-2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function SLt({type:e}){return e==="general"?o.jsx(Jf,{}):o.jsx(gk,{kind:e})}function kLt(e,t=Date.now(),n){const i=Date.parse(e);if(!Number.isFinite(i)||i-t<6e4)return n("myAgents.expiringSoon");const r=Math.ceil((i-t)/6e4),s=Math.floor(r/60),a=r%60;return n("myAgents.sandboxRemaining",{hours:s,minutes:a})}function Ate(e,t){var n;return{id:e.runtimeId,name:e.name,description:((n=e.description)==null?void 0:n.trim())||t("common.noDescription"),createdAt:e.createdAt??"",specificationLabel:t("myAgents.creator"),specification:TEe(e.author),isMine:e.isMine,runtime:{runtimeId:e.runtimeId,region:e.region,currentVersion:e.currentVersion,canDelete:e.canDelete}}}function ELt(e,t){const n=e.status.trim().toLowerCase();return{id:e.id,name:e.displayName||t("myAgents.namedAgent",{name:e.toolName}),description:t(`myAgents.sandboxStatus.${n}`,{defaultValue:t("myAgents.sandboxStatus.unknown")}),createdAt:e.createdAt,specificationLabel:t("myAgents.creator"),specification:TEe(e.createdBy),isMine:e.isMine,region:e.region,sandbox:e}}function CLt(e,t){var n,i;return{id:e.id,name:e.draft.name||t("agentSelector.unnamedAgent"),description:((n=e.draft.description)==null?void 0:n.trim())||t("common.noDescription"),createdAt:new Date(e.updatedAt).toISOString(),specificationLabel:t("myAgents.storageLocation"),specification:t("myAgents.currentBrowser"),isMine:!0,region:(i=e.deploymentTarget)==null?void 0:i.region,draft:e}}function TLt(e,t,n){if(!e.draft)return e;const i=e.draft.deploymentTarget;return i?t.find(r=>{var s;return((s=r.runtime)==null?void 0:s.runtimeId)===i.runtimeId&&r.runtime.region===i.region})??{id:i.runtimeId,appName:i.appName,name:i.name||e.name,description:e.description,createdAt:e.createdAt,specificationLabel:n("myAgents.region"),specification:i.region,isMine:!0,runtime:{runtimeId:i.runtimeId,region:i.region,currentVersion:i.currentVersion,canDelete:!1}}:null}function ALt(e,t){return e.trim()||Ji(t)}async function _Lt(e,t,n,i,r,s){const a=`${e}:${t}:${n}`,l=hv.get(a);if(l&&l.expiresAt>Date.now())return i(l.page.runtimes.map(d=>Ate(d,r))),l.page.nextToken;l&&hv.delete(a);let c=Vp.get(a);c||(c=G5t({scope:e,region:t,pageSize:fLt,nextToken:n,signal:s}),Vp.set(a,c),c.then(()=>Vp.delete(a),()=>Vp.delete(a)));const u=await c;return hv.set(a,{page:u,expiresAt:Date.now()+hLt}),i(u.runtimes.map(d=>Ate(d,r))),u.nextToken}function NLt({agent:e,onUse:t,onViewDetails:n,onPrepareUpdate:i,compatibility:r,onRetryCompatibility:s,connecting:a,connected:l,deploymentTask:c,nowMs:u,onViewDeploymentTask:d,onEditDraft:f,onDeleteDraft:h}){var N,_,j,T;const{t:p,i18n:g}=xe("ui"),b=(N=e.sandbox)==null?void 0:N.status.toLowerCase(),v=((_=e.sandbox)==null?void 0:_.resourceType)==="snapshot",y=!!(e.runtime||b==="ready"||b==="wakeable"),x=(r==null?void 0:r.status)==="checking",w=(r==null?void 0:r.status)==="unsupported",O=(r==null?void 0:r.status)==="error",k=((j=e.sandbox)==null?void 0:j.resourceType)==="snapshot"?e.sandbox.sourceSessionId||e.sandbox.snapshotId:(T=e.sandbox)==null?void 0:T.id,S=()=>{if(e.draft){c?d==null||d(c):n==null||n(e);return}y&&(c?d==null||d(c):n==null||n(e))},E=(e.draft||y)&&!!(c?d:n),C=e.draft?c?p("myAgents.viewDeploymentProgress",{name:e.name}):p("myAgents.viewRuntimeDetails",{name:e.name}):c?p("myAgents.viewDeploymentProgress",{name:e.name}):p("myAgents.viewDetails",{name:e.name});return o.jsxs(kB,{className:a?"my-agent-card is-connecting":"my-agent-card",activateLabel:E?C:void 0,onActivate:E?S:void 0,onPointerEnter:()=>i==null?void 0:i(e),onFocusCapture:()=>i==null?void 0:i(e),footer:o.jsx(Dwe,{className:"my-agent-meta",items:[{label:e.specificationLabel,value:e.specification,hideLabel:!0,className:"my-agent-region"},{label:p("myAgents.time"),value:UQ(e.createdAt,u,g.resolvedLanguage??g.language),hideLabel:!0,className:"my-agent-created-at"},...e.sandbox?[{label:p("myAgents.remainingTime"),value:e.sandbox.resourceType==="snapshot"?p("myAgents.wakeable"):e.sandbox.persistent?p("myAgents.neverExpires"):kLt(e.sandbox.expireAt,u,p),className:`my-agent-expiry${e.sandbox.resourceType==="session"&&e.sandbox.persistent?"":" is-expiring"}`}]:[]]}),actions:e.draft?o.jsxs(o.Fragment,{children:[o.jsx(y6,{"aria-label":c?p("myAgents.viewDeploymentProgress",{name:e.name}):p("myAgents.editDraftNamed",{name:e.name}),onClick:()=>c?d==null?void 0:d(c):f==null?void 0:f(e.draft),children:p(c?"myAgents.viewProgress":"common.edit")}),o.jsx(y6,{tone:"danger","aria-label":p("myAgents.deleteDraftNamed",{name:e.name}),onClick:()=>h==null?void 0:h(e.draft),children:p("common.delete")})]}):O||w?o.jsxs($t,{type:"button",color:"primary",size:"sm",pill:!1,"aria-label":p("myAgents.recheckCompatibility",{name:e.name}),onClick:()=>s==null?void 0:s(e),children:[o.jsx(Bj,{}),p("common.retry")]}):o.jsx(v6,{className:l?"my-agent-use is-connected":"my-agent-use",disabled:!y||x||w||a||l,"aria-busy":a||void 0,label:l?p("myAgents.connectedNamed",{name:e.name}):v?p("myAgents.wakeAndChat",{name:e.name}):p("myAgents.chatWith",{name:e.name}),onClick:()=>void(t==null?void 0:t(e)),children:a?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"my-agent-use-spinner","aria-hidden":"true"}),o.jsx("span",{className:"sr-only",children:p(v?"myAgents.waking":"agentSelector.connecting")})]}):o.jsx(OLt,{})}),children:[o.jsx(EB,{leading:o.jsx(qv,{seed:e.name}),title:e.name,subtitle:e.sandbox?o.jsx("span",{className:"my-agent-session-id",title:k,children:k}):void 0,status:e.draft?c?o.jsx("span",{className:"my-agent-deploying-badge",children:p("myAgents.deploying")}):o.jsx("span",{className:"my-agent-draft-badge",children:p("myAgents.draft")}):e.sandbox?o.jsx("span",{className:"my-agent-status-label","data-ready":e.sandbox.status.toLowerCase()==="ready"||void 0,"data-wakeable":v||void 0,children:e.description}):e.runtime&&c?o.jsx("span",{className:"my-agent-deploying-badge",children:p("myAgents.deploying")}):x?o.jsx($o,{content:r==null?void 0:r.message,contentClassName:"my-agent-compatibility-tooltip",maxWidth:360,align:"end",interactive:!0,preventUnintentionalClickToClose:!0,children:o.jsx("span",{className:"my-agent-compatibility-trigger",tabIndex:0,children:o.jsxs(ma,{className:"my-agent-compatibility-status",color:"secondary",variant:"soft",size:"sm",pill:!0,children:[o.jsx("span",{className:"my-agent-compatibility-spinner","aria-hidden":"true"}),o.jsx("span",{children:p("myAgents.checking")})]})})}):w?o.jsx($o,{content:r==null?void 0:r.message,contentClassName:"my-agent-compatibility-tooltip",maxWidth:360,align:"end",interactive:!0,preventUnintentionalClickToClose:!0,children:o.jsx("span",{className:"my-agent-compatibility-trigger",tabIndex:0,children:o.jsx(ma,{className:"my-agent-compatibility-status",color:"warning",variant:"soft",size:"sm",pill:!0,children:p("myAgents.chatUnsupported")})})}):O?o.jsx($o,{content:r==null?void 0:r.message,contentClassName:"my-agent-compatibility-tooltip",maxWidth:360,align:"end",interactive:!0,preventUnintentionalClickToClose:!0,children:o.jsx("span",{className:"my-agent-compatibility-trigger",tabIndex:0,children:o.jsx(ma,{className:"my-agent-compatibility-status",color:"danger",variant:"soft",size:"sm",pill:!0,children:p("myAgents.checkFailed")})})}):null}),e.sandbox?null:o.jsx(CB,{children:e.description})]})}function jLt({cloudProvider:e,studioRegion:t,canCreateRuntimeAgents:n,canCreatePersonalAgents:i,canUpdate:r,runtimeScope:s,onCreateAgent:a,onOpenCodexProjectUpload:l,onUseAgent:c,onViewAgentDetails:u,onCreateSandboxAgent:d,onUseSandboxAgent:f,onViewSandboxAgentDetails:h,activeType:p,onActiveTypeChange:g,sandboxRefreshKey:b=0,connectedRuntimeId:v="",hiddenRuntimeIds:y=vLt,drafts:x=[],deploymentTasks:w=[],draftDeploymentTaskIds:O={},onViewDeploymentTask:k,onEditDraft:S,onDeleteDraft:E}){const{t:C}=xe("ui"),N=m.useRef(null),_=m.useRef(null),j=m.useRef(0),T=m.useRef(null),L=m.useRef(0),A=m.useRef(null),R=m.useRef(new Map),P=ALt(t,e),[$,M]=m.useState(""),[B,I]=m.useState(s==="mine"?"mine":"all"),[H,X]=m.useState(P),[Q,q]=m.useState([]),[U,te]=m.useState(""),[le,oe]=m.useState(!0),[re,pe]=m.useState(""),[K,G]=m.useState([]),[se,fe]=m.useState(!1),[Se,Te]=m.useState(""),[rt,Be]=m.useState(""),[Me,Ie]=m.useState({}),[qe,Pe]=m.useState(null),[Ve,ke]=m.useState(()=>Date.now()),Le=m.useMemo(()=>dLt.map(Re=>({value:Re,label:C(`myAgents.agentTypes.${Re}`)})),[C]),Y=m.useMemo(()=>{const Re=Iu(e);return Re.some(gt=>gt.value===P)?Re:[{value:P,label:P},...Re]},[e,P]);m.useEffect(()=>{s==="mine"&&I("mine")},[s]),m.useEffect(()=>{X(P)},[P]),m.useEffect(()=>{ke(Date.now());const Re=window.setInterval(()=>ke(Date.now()),1e3);return()=>window.clearInterval(Re)},[]);const he=m.useMemo(()=>x.map(Re=>CLt(Re,C)),[x,C]),Oe=m.useMemo(()=>{const Re=new Map,gt=new Map,ut=new Map;for(const ye of w){if(ye.status!=="running")continue;if(Re.set(ye.id,ye),ye.draftId){const tt=gt.get(ye.draftId);(!tt||ye.startedAt>tt.startedAt)&>.set(ye.draftId,ye)}if(!ye.runtimeId)continue;const ze=ut.get(ye.runtimeId);(!ze||ye.startedAt>ze.startedAt)&&ut.set(ye.runtimeId,ye)}return{byId:Re,byDraftId:gt,byRuntimeId:ut}},[w]),Ke=m.useCallback(Re=>{var ut;if(Re.draft){const ye=O[Re.draft.id];return Oe.byDraftId.get(Re.draft.id)??(ye?Oe.byId.get(ye):void 0)}const gt=(ut=Re.runtime)==null?void 0:ut.runtimeId;return gt?Oe.byRuntimeId.get(gt):void 0},[Oe,O]),et=m.useCallback((Re,gt)=>{var ze;(ze=T.current)==null||ze.abort(),Vp.clear();const ut=new AbortController;T.current=ut;const ye=++j.current;return oe(!0),pe(""),_Lt(B,H,Re,tt=>{j.current===ye&&q(kt=>gt?tt:[...kt,...tt])},C,ut.signal).then(tt=>{j.current===ye&&te(tt)}).catch(tt=>{j.current===ye&&(gte(tt)||pe(Ng(tt,C("myAgents.loadGeneralAgents"),"GET /web/runtimes")))}).finally(()=>{j.current===ye&&oe(!1),T.current===ut&&(T.current=null)})},[B,H,C]);m.useEffect(()=>{if(p==="general")return q([]),te(""),et("",!0),()=>{var Re;(Re=T.current)==null||Re.abort(),T.current=null,Vp.clear(),j.current+=1}},[p,et]),m.useEffect(()=>{if(p!=="general"){for(const ut of R.current.values())ut.abort();R.current.clear();return}const Re=new Set(Q.filter(ut=>{var ye,ze;return((ye=ut.runtime)==null?void 0:ye.runtimeId)!==v&&((ze=ut.runtime)==null?void 0:ze.region)===H}).map(og).filter(Boolean));for(const[ut,ye]of R.current)Re.has(ut)||(ye.abort(),R.current.delete(ut));const gt=Q.filter(ut=>{var kt,_t,rn;const ye=(kt=ut.runtime)==null?void 0:kt.runtimeId;if(!ye||ye===v||((_t=ut.runtime)==null?void 0:_t.region)!==H)return!1;const ze=og(ut),tt=(rn=Me[ze])==null?void 0:rn.status;return!R.current.has(ze)&&(!tt||tt==="checking")});for(const ut of gt)R.current.set(og(ut),new AbortController);Ie(ut=>{var tt,kt;let ye=!1;const ze={...ut};for(const _t of Q){const rn=og(_t);if(!rn)continue;const en=((tt=_t.runtime)==null?void 0:tt.runtimeId)===v;en&&((kt=ze[rn])==null?void 0:kt.status)!=="compatible"?(ze[rn]={status:"compatible",message:C("myAgents.compatibility.supported")},ye=!0):!en&&!ze[rn]&&(ze[rn]={status:"checking",message:C("myAgents.compatibility.checking")},ye=!0)}return ye?ze:ut}),X5t(gt,async ut=>{const ye=ut.runtime;if(!ye)return;const ze=og(ut),tt=R.current.get(ze);if(tt)try{const kt=await Dv(ye.runtimeId,ye.region,{signal:tt.signal,preferCached:!0,timeoutMs:pLt,currentVersion:ye.currentVersion});if(tt.signal.aborted)return;Ie(_t=>({..._t,[ze]:kt&&kt.length>0?{status:"compatible",message:C("myAgents.compatibility.supported")}:{status:"unsupported",message:C("myAgents.compatibility.empty")}}))}catch(kt){if(tt.signal.aborted||(kt==null?void 0:kt.name)==="AbortError")return;Ie(_t=>({..._t,[ze]:Tte(kt,C)}))}finally{R.current.get(ze)===tt&&R.current.delete(ze)}})},[p,v,H,Q,C]),m.useEffect(()=>()=>{var Re;(Re=T.current)==null||Re.abort();for(const gt of R.current.values())gt.abort();R.current.clear()},[]);const Ct=m.useCallback(async Re=>{var ye;(ye=A.current)==null||ye.abort();const gt=new AbortController;A.current=gt;const ut=++L.current;fe(!0),Te(""),G([]);try{const ze=Re==="codex"?await br.listSessions({signal:gt.signal,autoResumeSnapshots:!0}):await br.listAgentSessions(Re,{signal:gt.signal,autoResumeSnapshots:!0});if(L.current!==ut)return;G(ze.map(tt=>ELt(tt,C)))}catch(ze){if((ze==null?void 0:ze.name)==="AbortError"||L.current!==ut)return;Te(Ng(ze,C("myAgents.loadAgentType",{type:C(`myAgents.agentTypes.${Re}`)}),`GET /web/${Re==="codex"?"sandbox":Re}/sessions`))}finally{A.current===gt&&(A.current=null),L.current===ut&&fe(!1)}},[C]);function je(Re){var gt;Re!==p&&(Re==="general"?(j.current+=1,q([]),te(""),pe(""),oe(!0)):((gt=A.current)==null||gt.abort(),A.current=null,L.current+=1,G([]),Te(""),fe(!0)),g(Re))}function ve(){p==="general"&&(j.current+=1,q([]),te(""),pe(""),oe(!0))}function He(Re){Re!==B&&(ve(),I(Re))}function it(Re){Re!==H&&(ve(),X(Re))}m.useEffect(()=>{var Re;if(p==="general"){(Re=A.current)==null||Re.abort(),A.current=null,L.current+=1;return}return Ct(p),()=>{var gt;(gt=A.current)==null||gt.abort(),A.current=null,L.current+=1}},[p,Ct,b]),m.useEffect(()=>{const Re=_.current,gt=N.current;if(!Re||!gt||p!=="general"||!U||le)return;const ut=new IntersectionObserver(([ye])=>{ye.isIntersecting&&et(U,!1)},{root:gt,rootMargin:"240px 0px",threshold:.01});return ut.observe(Re),()=>ut.disconnect()},[p,et,le,U]);const Ae=m.useCallback(async Re=>{if(!rt){Be(Re.id);try{await new Promise(gt=>requestAnimationFrame(()=>gt())),Re.sandbox?await f(Re.sandbox):await c(Re)}finally{Be("")}}},[rt,c,f]),Wt=m.useCallback(async Re=>{var ze;const gt=Re.runtime;if(!gt)return;const ut=og(Re);Ie(tt=>({...tt,[ut]:{status:"checking",message:C("myAgents.compatibility.checking")}})),(ze=R.current.get(ut))==null||ze.abort();const ye=new AbortController;R.current.set(ut,ye);try{const tt=await mje(()=>Dv(gt.runtimeId,gt.region,{retryProbe:!0,signal:ye.signal,timeoutMs:mLt,currentVersion:gt.currentVersion}));if(ye.signal.aborted)return;Ie(kt=>({...kt,[ut]:tt&&tt.length>0?{status:"compatible",message:C("myAgents.compatibility.supported")}:{status:"unsupported",message:C("myAgents.compatibility.empty")}}))}catch(tt){if(ye.signal.aborted||gte(tt))return;Ie(kt=>({...kt,[ut]:Tte(tt,C)}))}finally{R.current.get(ut)===ye&&R.current.delete(ut)}},[C]),mn=m.useCallback(Re=>{const gt=Re.runtime;!r||!gt||Ke(Re)||x4({runtimeId:gt.runtimeId,region:gt.region,appName:Re.appName,currentVersion:gt.currentVersion})},[r,Ke]),qt=m.useMemo(()=>{const Re=$.trim().toLocaleLowerCase(),gt=p==="general"?[...he,...Q]:K,ye=(B==="mine"?gt.filter(_t=>_t.isMine):gt).filter(_t=>{var en;const rn=((en=_t.runtime)==null?void 0:en.region)??_t.region;return!rn||rn===H}),ze=Re?ye.filter(_t=>_t.name.toLocaleLowerCase().includes(Re)):ye;if(p!=="general")return ze;const tt=y.size>0?ze.filter(_t=>!_t.runtime||!y.has(_t.runtime.runtimeId)):ze,kt=tt.findIndex(_t=>{var rn;return((rn=_t.runtime)==null?void 0:rn.runtimeId)===v});return kt<=0?tt:[tt[kt],...tt.slice(0,kt),...tt.slice(kt+1)]},[p,v,he,y,$,B,H,Q,K]);m.useEffect(()=>{if(!r||p!=="general")return;const Re=qt.filter(tt=>!!tt.runtime).filter(tt=>!Ke(tt)).slice(0,gLt);if(Re.length===0)return;let gt=!1,ut=0;const ye=async()=>{for(;!gt;){const tt=Re[ut];if(ut+=1,!(tt!=null&&tt.runtime)||(await x4({runtimeId:tt.runtime.runtimeId,region:tt.runtime.region,appName:tt.appName,currentVersion:tt.runtime.currentVersion}),gt))return}},ze=window.setTimeout(()=>{for(let tt=0;tt{gt=!0,window.clearTimeout(ze)}},[p,r,Ke,qt]);const xt=C(`myAgents.agentTypes.${p}`,{defaultValue:C("myAgents.agent")}),Nt=p==="general"?le&&Q.length===0&&he.length===0:se&&K.length===0,at=!Nt&&qt.length===0,_e=(p==="general"?n:i)?p==="general"?()=>a(H):()=>d(p):void 0,st=p==="codex"&&i&&!!l;return o.jsxs(_h,{className:"my-agents-page","aria-label":C("myAgents.agent"),children:[o.jsx(Fx,{title:C("myAgents.agent"),className:"my-agents-header"}),o.jsxs(Kb,{className:"my-agent-toolbar",children:[o.jsx(aE,{idPrefix:"my-agent-ownership",ariaLabel:C("myAgents.creatorFilter"),value:B,items:[{id:"all",label:C("common.all"),disabled:s==="mine"},{id:"mine",label:C("agentSelector.createdByMe")}],onChange:He}),o.jsxs("div",{className:"resource-toolbar__actions",children:[o.jsx(J_,{id:"my-agent-type-filter",ariaLabel:C("myAgents.agentType"),value:p,options:Le,onChange:je}),o.jsx(J_,{id:"my-agent-region-filter",ariaLabel:C("myAgents.region"),value:H,options:Y,onChange:it}),o.jsx(Om,{className:"my-agent-search","aria-label":C("myAgents.searchAgents"),value:$,onChange:Re=>M(Re.target.value),placeholder:C("common.search")}),st?o.jsxs("button",{type:"button",className:"my-agent-create-secondary",onClick:l,children:[o.jsx(wLt,{}),o.jsx("span",{children:C("myAgents.handoff")})]}):null]})]}),o.jsxs(Gb,{className:"my-agent-results",ref:N,"aria-label":C("myAgents.agentList",{type:xt}),children:[Nt?o.jsx(Vd,{}):(p==="general"?re:Se)&&qt.length===0?o.jsxs("div",{className:"my-agent-empty",role:"alert",children:[o.jsx("p",{children:p==="general"?re:Se}),o.jsx("button",{type:"button",onClick:()=>{p==="general"?et("",!0):Ct(p)},children:C("common.reload")})]}):at&&!_e?$.trim()||B==="mine"||H!==P?o.jsx("div",{className:"my-agent-empty-message",children:o.jsxs(On,{fill:"none",children:[o.jsx(On.Icon,{children:o.jsx(_Fe,{})}),o.jsx(On.Title,{children:C("myAgents.noMatchingAgents")}),o.jsx(On.Description,{children:C("myAgents.adjustSearch")})]})}):p!=="general"?o.jsx("div",{className:"my-agent-empty-message",children:o.jsxs(On,{fill:"none",children:[o.jsx(On.Icon,{children:o.jsx(SLt,{type:p})}),o.jsx(On.Title,{className:"my-agent-sandbox-empty-title",children:C("myAgents.noAgentType",{type:xt})})]})}):o.jsx("div",{className:"my-agent-empty-message",children:o.jsxs(On,{fill:"none",children:[o.jsx(On.Icon,{children:o.jsx(Jf,{})}),o.jsx(On.Title,{children:C("myAgents.noGeneralAgents")}),o.jsx(On.Description,{children:C("myAgents.createGeneralAgentDescription")})]})}):o.jsxs(o.Fragment,{children:[p==="general"&&re?o.jsxs("div",{className:"my-agent-inline-error",role:"alert",children:[o.jsx("span",{children:re}),o.jsx("button",{type:"button",onClick:()=>void et("",!0),children:C("common.reload")})]}):null,o.jsxs(Bx,{className:"my-agent-grid",children:[_e?o.jsx(wb,{className:"my-agent-create-card","aria-label":C("myAgents.createAgentType",{type:xt}),onClick:_e,icon:o.jsx(xLt,{}),children:C("myAgents.createAgent")}):null,qt.map(Re=>{var ut;const gt=TLt(Re,Q,C);return o.jsx(NLt,{agent:Re,deploymentTask:Ke(Re),nowMs:Ve,onViewDeploymentTask:k,onUse:Ae,compatibility:Re.runtime?Me[og(Re)]??{status:"checking",message:C("myAgents.compatibility.checking")}:void 0,onRetryCompatibility:Wt,onPrepareUpdate:mn,onViewDetails:gt?()=>{gt.sandbox?h(gt.sandbox):u(gt)}:void 0,connecting:Re.id===rt,connected:((ut=Re.runtime)==null?void 0:ut.runtimeId)===v,onEditDraft:S,onDeleteDraft:Pe},Re.id)})]})]}),p==="general"&&!re&&!Nt&&(qt.length>0||!!U)&&o.jsx("div",{className:"my-agent-load-more",ref:_,"aria-live":"polite",children:le?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),o.jsx("span",{children:C("myAgents.loadingMore")})]}):U?o.jsx("span",{children:C("myAgents.scrollForMore")}):o.jsx("span",{children:C("myAgents.allLoaded")})})]}),qe?o.jsx(dc,{title:C("myAgents.deleteDraftTitle"),description:C("myAgents.deleteDraftDescription",{name:qe.draft.name||C("agentSelector.unnamedAgent")}),confirmLabel:C("myAgents.deleteDraft"),variant:"danger",onCancel:()=>Pe(null),onConfirm:()=>{E==null||E(qe),Pe(null)}}):null]})}const RLt="_Container_13560_1",ILt="_Textarea_13560_174",_te={Container:RLt,Textarea:ILt},Rm=e=>{const t=m.useRef(null),i=`search-ui-input-${m.useId()}`,{id:r,name:s,variant:a="outline",size:l="md",gutterSize:c,className:u,autoComplete:d,disabled:f=!1,readOnly:h=!1,invalid:p=!1,allowAutofillExtensions:g=!!s,onFocus:b,onBlur:v,onAnimationStart:y,onAutofill:x,autoSelect:w,rows:O=3,maxRows:k,autoResize:S,ref:E,onChange:C,...N}=e,[_,j]=m.useState(!1),T=S?Math.max(k??10,O):O;m.useEffect(()=>{var R;w&&((R=t.current)==null||R.select())},[w]);const L=R=>{y==null||y(R),R.animationName==="native-autofill-in"&&(x==null||x())},A=m.useCallback(()=>{if(!S||!t.current||T===void 0)return;t.current.style.height="0px";const R=t.current.scrollHeight;t.current.style.height=R+"px"},[S,T]);return m.useEffect(()=>{A()},[e.value,O,A]),o.jsx("div",{className:mi(_te.Container,u),"data-variant":a,"data-size":l,"data-gutter-size":c,"data-focused":_,"data-disabled":f?"":void 0,"data-readonly":h?"":void 0,"data-invalid":p?"":void 0,style:zb({"textarea-min-rows":`${O}`,"textarea-max-rows":`${T}`}),children:o.jsx("textarea",{...N,onChange:R=>{C==null||C(R),A()},ref:Wk([t,E]),id:r||(g?void 0:i),className:_te.Textarea,name:s,readOnly:h,disabled:f,rows:O,onFocus:R=>{j(!0),b==null||b(R)},onBlur:R=>{j(!1),v==null||v(R)},onAnimationStart:L,"data-lpignore":g?void 0:!0,"data-1p-ignore":g?void 0:!0})})},RI="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%3e%3cimage%20width='48'%20height='48'%20href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAADbN2wMAAAH7UlEQVRoBdVZWWwbVRQ9492Onc1xTfaWLukq9oSqLKnYBZRSNgn6AagsAgmJRfzxg4SEEDtiER8IBKKAChK0FS1tKYWW0lZQKKV0gxCVJm3ikDiO17EdzrUzSdw4jj1OpeQqNzO237vvnHfvu/e9GWVwcBBDYue1mrqE2kI1UqeSJAnmIHUzNUCNUmGiKtQy6oPUR6geqnw/FSVOUH9R36KupfaDHnBQn6MGqEnqVJcEAfZTBbNL4b+lZPI1VbwwnaSfYO8z8N+TVMd0Qj6EVdbs3eIBP29cVFkL00kk+wSEwHAamgh9bDAJSQWTITZFnF+85J1tBPyOUC9OqqnsVdTIRkVBi70Msy125uriHJ8XAXFRfzKBTQM+rO0/hc54cSQE8iyzAx/XLcEltjIU44uCQijOaHvPfxIv97TjWCzEcMo7+sZ4TGa+2V6KT2rPQ73ZptsPBZE30fVrymvxTvUCtDoqYC0ijhMk/3MkgDd62xFheOqVggjIIAbOVaujEh/ULsaNzioUsxhVAv/A34GD0YBubxZMQJupWpMNr58zHytcHth1ekICsDcRx4u+fxBK6vOCbgKyEIXEK975WOmaoZuErKv1QR8ORQd0eUE3Ac0TNSYrXvI24fZSLxwGfebiDKW3e08gln9J0oYvKoMNG6kmiRdmzMOtTi8sOsJJJfANA93oiseGbeZ7k1EHZAKCEcApu4wCxUsSz3rm4HQiim3B/wpOsBJA2yP/4cZIJYIBFcGwCjWeSKEwm4wosZtR7rKizGXJQJZRB1TuttftAprnAbOrM9rl9UHqwg+s1o+eOow/GNN5CaPOklSgdKq4us+Ji7pt6Dw1AF9vBOGImjJht5lRVWFDY7UL58/3wOt2YPEcN2xWVpPRe6EQC+y9rwINPNKsuRaYX5cXhIxGkks+Y7V+6vQRdLBi5yx1bGwicFebivj+ARgOhZGMJMFyQyWpoV2GRIa2ZXOX2bDyqnPxzEPNKC+1Zj957eDBTbz34PXAwvoMfBN+kGV8Bxf00VgQz/vaEB6nSCnRQVj2h2DZG4TyZwQWlSils3m8RDDEhk2uaqlHaYklVb3Ha42dh4B3eMzZ//eEmMc0kGL3cEU9WksqU4XvzAYKZ9n6fQCOz3thORCGkhgCf2bDMz4bjQpW39yE65Y1QO5FxiUgP+76E3hzI7D1VyBcwP5NTFcZzXjaPRMNZmvGPkfA23YMwLHRD0Mf3ZwTgaBIi8GgYMGsSjx2z3kEP9Jp5E5rOeoqQH75C3htPfDpD4CskXxFvHC5vQKPVjSwPqQfcKTAfxuA/Ws/lBAXwEhUTGjWSAL3r1qYykSju+UkIFbZDx09wPvb0iH1W9uEYw03MHAV3ltew1CqgDkyCNtWgt/cnwY/3GriG5n9hbMrccNljRmzLz0nJCCNJBsEwsCH24E3NgDr96brhfyWS2Sm3EYLVsOL0i0DsG8h+LDkqcLExHhfc9siVDDrjJ59sZJRyHKZFRKybiSkTtIjR08CrXwEdtGcXL2A4+192LOuDeatfqg6wMvsL5lbhWuWysIdO995E9BgSkh19THX7wQOtANXLgKWLQSaarUWI9dNP7bjo68OY9uef6GqhcW8ZkViX2a/nBWYQ4+RggmIBfFGnHgOcD0c7wD2HgOW0xuXk0xN5SDaOwL4cnsb1m05joPHejKK0hgEOb4Q8Muba3H1pXUwZZl96aqLgHSU2RCbEe6/9hzh875OYPdhYF5NDLt/Oohd+46gNxBjm2zzJhZyi/RyV5TggdsvRJnTOm5j3QQ0i9ra6OHj1u9+B/YdNcLXVQdDmYNPy9oZ971IcIPHjUHadVrHHFfZNphtTtx508W4eJEHsg7Gk6IJaIZlDEn3EdUEl7sBg4la2MtqkYgNIOz/F9FgF6IhX6p5mozcjgbGasw/xWCCs7IeN7U24b4VddwZj26jjTZynTQCmknxSBqIETanh7ceWEpmpIiokT7E6JFosBvxaD/iJCeNDQYzTFYnzHY3SsobmfM9eOyucjTO0KyOf510AqOHkl2kiMlSQoAlsPLAk4hHSCaIJMMqmUgfYBQeggxGK4xmOxprXHh8lYK51em+E/0/qwQyBh8iY+Q52pjlOZD8XFcFPHELcGlT3stlbBaymtOROTReBoZJ+0DjZ9pv4SFq9fL0YWqcjJl1+AwP8OSGS+amq6y4P/fyyWqvoC9lDAG7ainPEJcBs7xMBGOLbU6bGQTMJHAnDUlG2biPFZevEM4GCZl9sSsnPgG+bAHfa+l8vZJxpNSo+oPp/c4XP6bPBN0kog2qtdFz1WzIkfXmZuAKVm6JewlbvZKVgGZMilMPwW9ngdr5B3CEG7iEbCY5ffl6RgPtYDGdybS4ogW4YDbgLefTD5s2kv5rTgKaWdlKi1fau4BDJ3jM5I70NDd0J7grzfZEUMg5CM5Tmg4TiW3ZtVYxTKpcgM2iWS7+mhcBbRiZ/TBTd4jPjtSEVF3AxxdUPgkxTrUUMTcBykKUmLZwhQlYPhWBeCBV5DRjk3QtiEC2McUDsjPVCEhWEQ8Umk2y2c7nOyEwrV/ySdbdQo3nw3aKtRHM3wiBtVQu02knISJ+SQh8Q32TyqTJJ6xTXyQzyzb2LeoBWQOy5pjwcDf1YSqzNIooLex99kTCppsq4N+l+oUArylhoku9sb+O18VU8c5UEiZu7KGyrKKTmgr7/wGxhy03aZIycwAAAABJRU5ErkJggg=='%20/%3e%3c/svg%3e",PLt="data:image/svg+xml,%3c?xml%20version='1.0'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20100%20100'%3e%3ctitle%3ePandoc%20Icon%3c/title%3e%3cdesc%20property='dc:creator'%3eAlbert%20Krewinkel%3c/desc%3e%3cmetadata%20id='license'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3ccc:license%20rdf:resource='http://creativecommons.org/licenses/by-sa/4.0/'%20/%3e%3c/cc:Work%3e%3ccc:License%20rdf:about='http://creativecommons.org/licenses/by-sa/4.0/'%3e%3ccc:permits%20rdf:resource='http://creativecommons.org/ns%23Reproduction'%20/%3e%3ccc:permits%20rdf:resource='http://creativecommons.org/ns%23Distribution'%20/%3e%3ccc:requires%20rdf:resource='http://creativecommons.org/ns%23Notice'%20/%3e%3ccc:requires%20rdf:resource='http://creativecommons.org/ns%23Attribution'%20/%3e%3ccc:permits%20rdf:resource='http://creativecommons.org/ns%23DerivativeWorks'%20/%3e%3ccc:requires%20rdf:resource='http://creativecommons.org/ns%23ShareAlike'%20/%3e%3c/cc:License%3e%3c/rdf:RDF%3e%3c/metadata%3e%3crect%20fill='%23fed'%20stroke='%23fed'%20width='100'%20height='100'/%3e%3cg%20fill='none'%20stroke='%234093da'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='8'%20transform='skewX(-6)%20translate(8%201)'%3e%3cpath%20d='M%2030,10%20l%200,80%20M%2045,10%20l%200,80%20M%2020,10%20l%2040,0%20l%2018,18%20l%200,25%20l%20-33,0'%20/%3e%3cpath%20fill='%234093da'%20stroke-width='6'%20d='M%2061,10%20l%2017,17%20l%20-17,0%20l%200,-17'%20/%3e%3c/g%3e%3c/svg%3e",DLt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%20100%20100'%20version='1.1'%20id='svg4'%20sodipodi:docname='favicon.svg'%20inkscape:version='1.4.4%20(dcaf3e7,%202026-05-05)'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:svg='http://www.w3.org/2000/svg'%3e%3csodipodi:namedview%20id='namedview4'%20pagecolor='%23ffffff'%20bordercolor='%23000000'%20borderopacity='0.25'%20inkscape:showpageshadow='2'%20inkscape:pageopacity='0.0'%20inkscape:pagecheckerboard='0'%20inkscape:deskcolor='%23d1d1d1'%20showgrid='true'%20inkscape:zoom='8.2236519'%20inkscape:cx='34.534536'%20inkscape:cy='45.174577'%20inkscape:window-width='1881'%20inkscape:window-height='1382'%20inkscape:window-x='1512'%20inkscape:window-y='30'%20inkscape:window-maximized='0'%20inkscape:current-layer='svg4'%3e%3cinkscape:grid%20type='axonomgrid'%20id='grid4'%20units='px'%20originx='0'%20originy='0'%20spacingx='3.7795276'%20spacingy='3.7795276'%20empcolor='%230099e5'%20empopacity='0.30196078'%20color='%230099e5'%20opacity='0.14901961'%20empspacing='0'%20dotted='false'%20gridanglex='40'%20gridanglez='40'%20enabled='true'%20visible='true'%20/%3e%3c/sodipodi:namedview%3e%3cdefs%20id='defs1'%3e%3cfilter%20id='shadow'%20x='0'%20y='0'%20width='1'%20height='1'%3e%3cfeDropShadow%20dx='0'%20dy='2'%20stdDeviation='3'%20flood-color='rgba(50,%2050,%2093,%200.18)'%20/%3e%3c/filter%3e%3c/defs%3e%3crect%20x='4'%20y='4'%20width='92'%20height='92'%20rx='22.08'%20fill='%23e8efff'%20filter='url(%23shadow)'%20id='rect1'%20transform='matrix(1.0869565,0,0,1.0869565,-4.347826,-4.347826)'%20style='stroke-width:0.92'%20ry='22.08'%20/%3e%3cpath%20style='fill:%230a2540;fill-opacity:1;stroke-width:1.88976'%20d='M%2049.999999,6.535431%204.9573423,44.330708%2049.999999,82.125984%2092.790523,46.220471%2095.042656,44.330708%20Z'%20id='path1'%20/%3e%3cpath%20style='fill:%23425466;fill-opacity:1;stroke-width:1.88976'%20d='M%204.9573423,44.330708%20V%2055.669291%20L%2049.999999,93.464567%20V%2082.125984%20Z'%20id='path2'%20/%3e%3cpath%20style='fill:%231a3550;fill-opacity:1;stroke-width:1.88976'%20d='M%2049.999999,82.125984%2095.042656,44.330708%20V%2055.669291%20L%2049.999999,93.464567%20Z'%20id='path3'%20/%3e%3cpath%20style='fill:%234ade80;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1'%20d='m%2045.042657,30.236221%209.008531,-7.559055%2022.521328,18.897638%20-9.008531,7.559056%20z'%20id='path5'%20/%3e%3cpath%20style='fill:none;fill-opacity:1;stroke:%234ade80;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1'%20d='M%2027.025594,49.133859%2047.29479,47.244096%2045.042657,64.25197'%20id='path6'%20/%3e%3c/svg%3e",MLt="data:image/svg+xml,%3csvg%20fill='%23261230'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAstral%3c/title%3e%3cpath%20d='M1.44%200C.6422%200%200%20.6422%200%201.44v21.12C0%2023.3578.6422%2024%201.44%2024h21.12c.7978%200%201.44-.6422%201.44-1.44V1.44C24%20.6422%2023.3578%200%2022.56%200Zm4.7998%204.8h11.5199c.7953%200%201.44.6447%201.44%201.44V19.2h-6.624v-4.32h-1.152v4.32H4.8V6.24c0-.7953.6446-1.44%201.4398-1.44m4.032%205.472v1.152h3.456v-1.152z'/%3e%3c/svg%3e",LLt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='1.34em'%20height='1em'%20viewBox='0%200%20256%20192'%3e%3cpath%20fill='%232d4552'%20d='M84.38%20108.352c-9.556%202.712-15.826%207.467-19.956%2012.218c3.956-3.461%209.255-6.639%2016.402-8.665c7.311-2.072%2013.548-2.057%2018.702-1.062v-4.03c-4.397-.402-9.437-.082-15.148%201.539M63.987%2074.475l-35.49%209.35s.646.914%201.844%202.133l30.092-7.93s-.427%205.495-4.13%2010.41c7.005-5.299%207.684-13.963%207.684-13.963m29.709%2083.41c-49.946%2013.452-76.37-44.43-84.37-74.472c-3.696-13.868-5.31-24.37-5.74-31.148a11.5%2011.5%200%200%201%20.025-1.84C1.021%2050.58-.22%2051.927.032%2055.82c.43%206.773%202.044%2017.275%205.74%2031.147c7.997%2030.038%2034.424%2087.92%2084.37%2074.468c10.871-2.929%2019.038-8.263%2025.17-15.073c-5.652%205.104-12.724%209.123-21.616%2011.523M103.08%2039.05v3.555h19.59c-.401-1.259-.806-2.393-1.208-3.555z'/%3e%3cpath%20fill='%232d4552'%20d='M127.05%2068.325c8.81%202.503%2013.47%208.68%2015.933%2014.146l9.824%202.79s-1.34-19.132-18.645-24.047c-16.189-4.6-26.151%208.995-27.363%2010.754c4.71-3.355%2011.586-6.102%2020.251-3.643m78.197%2014.234c-16.204-4.62-26.162%209.003-27.356%2010.737c4.713-3.351%2011.586-6.099%2020.247-3.629c8.797%202.506%2013.452%208.676%2015.923%2014.146l9.837%202.8s-1.361-19.135-18.651-24.054m-9.76%2050.443l-81.718-22.845s.885%204.485%204.279%2010.293l68.803%2019.234c5.664-3.277%208.636-6.682%208.636-6.682m-56.655%2049.174C74.127%20164.828%2081.949%2082.386%2092.419%2043.32c4.311-16.1%208.743-28.066%2012.419-36.088c-2.193-.451-4.01.704-5.804%204.354C95.13%2019.5%2090.14%2032.387%2085.312%2050.427c-10.467%2039.066-18.29%20121.506%2046.412%20138.854c30.497%208.17%2054.256-4.247%2071.966-23.749c-16.81%2015.226-38.274%2023.763-64.858%2016.644'/%3e%3cpath%20fill='%23e2574c'%20d='M103.081%20138.565v-16.637l-46.223%2013.108s3.415-19.846%2027.522-26.684c7.311-2.072%2013.549-2.058%2018.701-1.063V39.05h23.145c-2.52-7.787-4.958-13.782-7.006-17.948c-3.387-6.895-6.859-2.324-14.741%204.269c-5.552%204.638-19.583%2014.533-40.698%2020.222c-21.114%205.694-38.185%204.184-45.307%202.95c-10.097-1.742-15.378-3.96-14.884%203.721c.43%206.774%202.043%2017.277%205.74%2031.148c7.996%2030.039%2034.424%2087.92%2084.37%2074.468c13.046-3.515%2022.254-10.464%2028.637-19.32h-19.256zm-74.588-54.74l35.494-9.35s-1.034%2013.654-14.34%2017.162c-13.31%203.504-21.154-7.812-21.154-7.812'/%3e%3cpath%20fill='%232ead33'%20d='M236.664%2039.84c-9.226%201.617-31.361%203.632-58.716-3.7c-27.363-7.328-45.517-20.144-52.71-26.168c-10.197-8.54-14.682-14.476-19.096-5.498c-3.902%207.918-8.893%2020.805-13.723%2038.846c-10.466%2039.066-18.289%20121.505%2046.413%20138.853c64.687%2017.333%2099.126-57.978%20109.593-97.047c4.83-18.037%206.948-31.695%207.53-40.502c.665-9.976-6.187-7.08-19.29-4.784M106.668%2072.161s10.196-15.859%2027.49-10.943c17.305%204.915%2018.645%2024.046%2018.645%2024.046zm42.215%2071.163c-30.419-8.91-35.11-33.167-35.11-33.167l81.714%2022.846c0-.004-16.494%2019.12-46.604%2010.32m28.89-49.85s10.183-15.847%2027.474-10.918c17.29%204.923%2018.651%2024.054%2018.651%2024.054z'/%3e%3cpath%20fill='%23d65348'%20d='m86.928%20126.51l-30.07%208.522s3.266-18.609%2025.418-25.983L65.25%2045.147l-1.471.447c-21.115%205.694-38.185%204.184-45.307%202.95c-10.097-1.741-15.379-3.96-14.885%203.722c.43%206.774%202.044%2017.276%205.74%2031.147c7.997%2030.039%2034.425%2087.92%2084.37%2074.468l1.471-.462zM28.493%2083.825l35.494-9.351s-1.034%2013.654-14.34%2017.162c-13.31%203.504-21.154-7.811-21.154-7.811'/%3e%3cpath%20fill='%231d8d22'%20d='m150.255%20143.658l-1.376-.335c-30.419-8.91-35.11-33.166-35.11-33.166l42.137%2011.778l22.308-85.724l-.27-.07c-27.362-7.329-45.516-20.145-52.71-26.17c-10.196-8.54-14.682-14.475-19.096-5.497c-3.898%207.918-8.889%2020.805-13.719%2038.846c-10.466%2039.066-18.289%20121.505%2046.413%20138.852l1.326.3zM106.668%2072.16s10.196-15.859%2027.49-10.943c17.305%204.915%2018.645%2024.046%2018.645%2024.046z'/%3e%3cpath%20fill='%23c04b41'%20d='m88.46%20126.072l-8.064%202.289c1.906%2010.74%205.264%2021.047%2010.534%2030.152c.918-.202%201.828-.376%202.762-.632c2.449-.66%204.72-1.479%206.906-2.371c-5.89-8.74-9.785-18.804-12.137-29.438m-3.148-75.644c-4.144%2015.467-7.852%2037.73-6.831%2060.06c1.826-.793%203.756-1.532%205.9-2.14l1.492-.334c-1.82-23.852%202.114-48.157%206.546-64.694a323%20323%200%200%201%203.373-11.704a105%20105%200%200%201-5.974%203.547a307%20307%200%200%200-4.506%2015.265'/%3e%3c/svg%3e",$Lt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='512'%20height='512'%20version='1.1'%20viewBox='0%200%20135.47%20135.47'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m67.733%2067.733%2029.33%2016.933-29.33%2050.8c37.408%200%2067.733-30.325%2067.733-67.733%200-12.341-3.3168-23.901-9.0837-33.867h-58.65z'%20fill='%23afccf9'/%3e%3cpath%20d='m67.733-1e-6c-25.07%200-46.942%2013.63-58.654%2033.875l29.324%2050.792%2029.33-16.933v-33.867h58.65c-11.714-20.24-33.583-33.867-58.65-33.867z'%20fill='%231767d1'/%3e%3cpath%20d='m0%2067.733c0%2037.408%2030.324%2067.733%2067.733%2067.733l29.33-50.8-29.33-16.933-29.33%2016.933-29.324-50.792c-5.7637%209.9632-9.0794%2021.519-9.0794%2033.858'%20fill='%23679ef5'/%3e%3cpath%20d='m101.6%2067.733c0%2018.704-15.163%2033.867-33.867%2033.867-18.704%200-33.867-15.163-33.867-33.867s15.163-33.867%2033.867-33.867c18.704%200%2033.867%2015.163%2033.867%2033.867'%20fill='%23fff'/%3e%3cpath%20d='m95.25%2067.733c0%2015.197-12.32%2027.517-27.517%2027.517-15.197%200-27.517-12.32-27.517-27.517%200-15.197%2012.32-27.517%2027.517-27.517%2015.197%200%2027.517%2012.32%2027.517%2027.517'%20fill='%231a74e7'/%3e%3c/svg%3e",FLt="data:image/svg+xml,%3csvg%20fill='%23F03C2E'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGit%3c/title%3e%3cpath%20d='M13.09%2023.549a1.54%201.54%200%200%201-2.18%200L.451%2013.089a1.54%201.54%200%200%201%200-2.179l7.191-7.19%202.733%202.733a1.85%201.85%200%200%200%20.964%202.326v6.66a1.849%201.849%200%201%200%201.54%200V8.957l2.508%202.508a1.85%201.85%200%201%200%201.09-1.09l-2.634-2.634a1.85%201.85%200%200%200-2.378-2.377L8.73%202.63%2010.91.451a1.54%201.54%200%200%201%202.179%200l10.459%2010.46a1.54%201.54%200%200%201%200%202.179z'/%3e%3c/svg%3e",BLt="data:image/svg+xml,%3csvg%20fill='%23073551'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3ecurl%3c/title%3e%3cpath%20d='M.803%2014.8169c0-.5342.433-.9665.9665-.9665.5335%200%20.9665.4323.9665.9665%200%20.5335-.433.9657-.9665.9657-.5335%200-.9666-.4322-.9666-.9657m2.736%200c0-.1963-.0532-.376-.1119-.5525-.2344-.7024-.876-1.2169-1.6575-1.2169-.1249%200-.2344.0465-.3524.0708C.6149%2013.2865%200%2013.9646%200%2014.817c0%20.9764.7923%201.7694%201.7695%201.7694.9772%200%201.7694-.793%201.7694-1.7694m-1.7694-7.149c.5335%200%20.9665.433.9665.9665%200%20.5335-.433.9665-.9665.9665-.5343%200-.9666-.433-.9666-.9665%200-.5335.4323-.9665.9666-.9665m0%202.7359c.9772%200%201.7694-.7923%201.7694-1.7694%200-.1956-.0532-.376-.1119-.5525-.2344-.7024-.8767-1.2169-1.6575-1.2169-.1249%200-.2344.0465-.3524.0716C.6149%207.104%200%207.782%200%208.6344c0%20.9771.7923%201.7694%201.7695%201.7694m13.221-5.694c-.5342%200-.9665-.433-.9665-.9664a.966.966%200%2001.9666-.9665c.5335%200%20.9658.4322.9658.9665%200%20.5334-.4323.9664-.9658.9664m-9.6%2016.5133c-.5335%200-.9666-.433-.9666-.9665%200-.5342.433-.9665.9666-.9665a.966.966%200%2001.9665.9665c0%20.5335-.4323.9665-.9665.9665m9.6-19.2491c-.978%200-1.7695.7922-1.7695%201.7694%200%20.2085.0525.4025.1187.5882L5.039%2018.5581c-.803.1681-1.4179.8462-1.4179%201.6985%200%20.9772.7923%201.7694%201.7695%201.7694.9772%200%201.7694-.7922%201.7694-1.7694%200-.1963-.0525-.3759-.111-.5525l8.3427-14.2728c.7778-.1865%201.3683-.8531%201.3683-1.688%200-.977-.793-1.7693-1.7694-1.7693m7.24%202.7359c-.5343%200-.9666-.433-.9666-.9665a.966.966%200%2001.9665-.9665c.5335%200%20.9666.4322.9666.9665%200%20.5334-.433.9665-.9666.9665M12.6313%2021.223c-.5343%200-.9665-.433-.9665-.9665a.966.966%200%2001.9665-.9665c.5335%200%20.9658.4323.9658.9665%200%20.5335-.4323.9665-.9658.9665M22.2305%201.974c-.9772%200-1.7694.7922-1.7694%201.7694%200%20.2085.0525.4025.1187.5882l-8.3009%2014.2265c-.8021.1681-1.417.8462-1.417%201.6985%200%20.9772.7922%201.7694%201.7694%201.7694.9764%200%201.7687-.7922%201.7687-1.7694%200-.1963-.0525-.3759-.1111-.5525l8.3427-14.2728C23.4094%205.2448%2024%204.5782%2024%203.7433c0-.977-.7923-1.7693-1.7695-1.7693'/%3e%3c/svg%3e",ULt="data:image/svg+xml,%3csvg%20fill='%23007808'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eFFmpeg%3c/title%3e%3cpath%20d='M21.72%2017.91V6.5l-.53-.49L9.05%2018.52l-1.29-.06L24%201.53l-.33-.95-11.93%201-5.75%206.6v-.23l4.7-5.39-1.38-.77-9.11.77v2.85l1.91.46v.01l.19-.01-.56.66v10.6c.609-.126%201.22-.241%201.83-.36L14.12%205.22l.83-.04L0%2021.44l9.67.82%201.35-.77%206.82-6.74v2.15l-5.72%205.57%2011.26.95.35-.94v-3.16l-3.29-.18c.434-.403.858-.816%201.28-1.23z'/%3e%3c/svg%3e",QLt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%201080%201080'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2030.3.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.3%20Build%20182)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%23ff0;%20}%20.st1%20{%20fill:%20%23333;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M660.52,419.49l-195.15-52.98c-15.84-4.3-19.16-25.29-5.43-34.28l169.23-110.7-9.91-201.97c-.8-16.39,18.13-26.04,30.92-15.76l157.57,126.74,189.03-71.84c15.34-5.83,30.37,9.2,24.54,24.54l-71.84,189.03,126.74,157.57c10.29,12.79.64,31.73-15.76,30.92l-201.97-9.91-110.7,169.23c-8.98,13.73-29.98,10.41-34.28-5.43l-52.98-195.15h-.01Z'/%3e%3cpath%20class='st1'%20d='M603.34,476.66l32.94,121.68,4.45,16.23-429.11,429.11c-48.45,48.45-126.85,48.45-175.3,0C12.16,1019.51,0,987.89,0,956.15s12.02-63.48,36.31-87.77l429.11-429.11,16.35,4.33,121.56,33.06h0Z'/%3e%3c/svg%3e";function zQ(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...e,children:o.jsx("path",{d:"M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91 .58 .11 .79-.25.79-.56v-2.02c-3.2.7-3.88-1.36-3.88-1.36-.52-1.33-1.28-1.69-1.28-1.69-1.05-.72.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.71 1.26 3.37.96.1-.75.4-1.26.73-1.55-2.56-.29-5.25-1.28-5.25-5.7 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.47.11-3.06 0 0 .97-.31 3.16 1.18A10.98 10.98 0 0 1 12 6.11c.98 0 1.96.13 2.87.39 2.19-1.49 3.16-1.18 3.16-1.18.63 1.59.23 2.77.11 3.06.74.81 1.19 1.84 1.19 3.1 0 4.43-2.7 5.4-5.27 5.69.42.36.78 1.06.78 2.14v3.04c0 .31.21.67.8.56A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5Z"})})}go.registerLanguage("bash",HB);const zLt=48;function VLt(e,t=zLt){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function HLt(e){return go.highlight(e,{language:"bash",ignoreIllegals:!0}).value}function qLt({status:e}){return e==="succeeded"?o.jsx(Vu,{"aria-hidden":!0}):e==="failed"?o.jsx(s4,{"aria-hidden":!0}):e==="running"?o.jsx(hi,{className:"studio-build-progress__spinner","aria-hidden":!0}):o.jsx(ZFe,{"aria-hidden":!0})}function Nte(e,t){if(!e)return"";const n=Date.parse(e);return Number.isNaN(n)?"":new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(n)}function WLt({steps:e,log:t,logError:n="",logTruncated:i=!1,logUpdatedAt:r,loading:s=!1}){const{t:a,i18n:l}=xe("ui"),c=m.useRef(null),u=m.useRef(!0),[d,f]=m.useState(!1),h=m.useMemo(()=>HLt(t),[t]);m.useEffect(()=>{const g=c.current;g&&t&&u.current&&(g.scrollTop=g.scrollHeight)},[t]);const p=async()=>{try{await navigator.clipboard.writeText(t),f(!0),window.setTimeout(()=>f(!1),1500)}catch{f(!1)}};return o.jsxs("div",{className:"studio-build-progress",children:[o.jsx("ol",{className:"studio-build-progress__steps","aria-label":a("studioBuildProgress.steps"),children:e.map(g=>o.jsxs("li",{className:`is-${g.status}`,children:[o.jsx("span",{className:"studio-build-progress__step-icon",children:o.jsx(qLt,{status:g.status})}),o.jsx("span",{children:g.label})]},g.key))}),o.jsxs("section",{className:"studio-build-progress__log","aria-label":a("studioBuildProgress.log"),children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("strong",{children:a("studioBuildProgress.log")}),o.jsxs("span",{children:[a(s?"studioBuildProgress.syncing":n?"studioBuildProgress.loadFailed":"studioBuildProgress.synced"),i?a("studioBuildProgress.recentOnly"):"",Nte(r,l.resolvedLanguage??l.language)?` · ${Nte(r,l.resolvedLanguage??l.language)}`:""]})]}),o.jsxs($t,{type:"button",color:"secondary",variant:"ghost",size:"sm",disabled:!t,onClick:()=>void p(),"aria-label":a(d?"studioBuildProgress.copiedLog":"studioBuildProgress.copyLog"),children:[d?o.jsx(Vu,{"aria-hidden":!0}):o.jsx(Uj,{"aria-hidden":!0}),a(d?"studioBuildProgress.copied":"studioBuildProgress.copy")]})]}),t?o.jsx("pre",{ref:c,tabIndex:0,"aria-label":a("studioBuildProgress.logContent"),onScroll:g=>{u.current=VLt(g.currentTarget)},children:o.jsx("code",{className:"hljs language-bash",dangerouslySetInnerHTML:{__html:h}})}):o.jsx("div",{className:`studio-build-progress__log-empty${n?" is-error":""}`,children:n||a(s?"studioBuildProgress.waiting":"studioBuildProgress.empty")})]})]})}function jte({name:e,description:t,icon:n,selected:i,disabled:r=!1,onChange:s,className:a=""}){return o.jsxs("button",{type:"button",className:`studio-package-option${i?" is-selected":""}${a?` ${a}`:""}`,"aria-pressed":i,disabled:r,onClick:()=>s(!i),children:[o.jsx("span",{className:"studio-package-option__icon","aria-hidden":"true",children:n}),o.jsxs("span",{className:"studio-package-option__content",children:[o.jsx("strong",{children:e}),t?o.jsx("span",{children:t}):null]}),o.jsx("span",{className:"studio-package-option__action","aria-hidden":"true",children:i?o.jsx(RFe,{}):o.jsx(DFe,{})})]})}function lg(e,t){return e[t]|e[t+1]<<8}function L0(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}async function KLt(e){const t=new DecompressionStream("deflate-raw"),n=new Blob([new Uint8Array(e)]).stream().pipeThrough(t);return new Uint8Array(await new Response(n).arrayBuffer())}async function vje(e,t={}){let i=-1;for(let u=e.length-22;u>=0&&u>e.length-65557;u--)if(L0(e,u)===101010256){i=u;break}if(i<0)throw new Error(It("helpers.zip.invalid"));const r=lg(e,i+10);if(t.maxEntries!==void 0&&r>t.maxEntries)throw new Error(It("helpers.zip.tooManyFiles",{count:t.maxEntries}));let s=L0(e,i+16);const a=new TextDecoder("utf-8"),l=[];let c=0;for(let u=0;ut.maxUncompressedBytes)throw new Error(It("helpers.zip.tooLarge"));const x=lg(e,v+26),w=lg(e,v+28),O=v+30+x+w,k=e.subarray(O,O+f);let S;if(d===0)S=k;else if(d===8)S=await KLt(k);else{s+=46+p+g+b;continue}l.push({name:y,text:a.decode(S)}),s+=46+p+g+b}return l}const p8=/(^|\/)skill\.md$/i;function GLt(e){const t=(e??"").replace(/\r\n?/g,` `).split(` -`);if(!t.length||t[0].trim()!=="---")return{name:"",description:""};let n=-1;for(let r=1;r=2&&(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))}function KLt(...e){var t;for(const n of e){const i=(t=n.trim().replace(/\\/g,"/").split("/").filter(Boolean).pop())==null?void 0:t.replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"");if(i)return i.slice(0,64)}return"local-skill"}function GLt(e,t){return t.trim()||e}function vje(e){const t=e.map(i=>({path:i.path.replace(/\\/g,"/").replace(/^\.\//,""),text:i.text})).filter(i=>i.path.length>0&&!i.path.endsWith("/")),n=new Set(t.map(i=>i.path.split("/")[0]));if(n.size===1&&t.every(i=>i.path.includes("/"))){const i=[...n][0]+"/";return t.map(r=>({path:r.path.slice(i.length),text:r.text}))}return t}function XLt(e){const t=new Map,n=new Set;for(const i of e)if(m8.test("/"+i.path)){const r=i.path.split("/");n.add(r.slice(0,-1).join("/"))}for(const i of e){const r=i.path.split("/");let s="";for(let u=r.length-1;u>=0;u--){const d=r.slice(0,u).join("/");if(n.has(d)){s=d;break}}const a=m8.test("/"+i.path);if(!s&&!a&&!n.has("")||!n.has(s)&&!a)continue;const l=s?i.path.slice(s.length+1):i.path,c=t.get(s)||[];c.push({path:l,text:i.text}),t.set(s,c)}return t}function YLt(e,t,n){const i=`${n}${e?"/"+e:""}`,r=t.find(c=>m8.test("/"+c.path));if(!r)return{hit:null,error:It("helpers.skills.missingManifest",{location:i})};const s=qLt(r.text),a=KLt(s.name,e,n.replace(/\.[^.]+$/,"")),l=[];for(const c of t){if(c.path.split("/").some(f=>f===".."))return{hit:null,error:It("helpers.skills.invalidParentPath",{location:i,path:c.path})};const d=`skills/${a}/${c.path}`;if(!d.startsWith(`skills/${a}/`))return{hit:null,error:It("helpers.skills.invalidPath",{location:i,path:c.path})};l.push({path:d,content:c.text})}return{hit:{source:"local",id:`local:${a}:${t.length}`,name:GLt(a,s.name),description:s.description||It("helpers.skills.localDescription"),folder:a,localFiles:l},error:null}}async function ZLt(e){const t=new Uint8Array(await e.arrayBuffer()),i=(await yje(t)).map(r=>({path:r.name,text:r.text}));return xje(vje(i),e.name)}async function JLt(e,t=new Map){const n=[];for(let i=0;ie.file(t,n))}async function t3t(e){const t=e.createReader(),n=[];for(;;){const i=await new Promise((r,s)=>t.readEntries(r,s));if(i.length===0)return n;n.push(...i)}}async function Oje(e,t=""){const n=t?`${t}/${e.name}`:e.name;if(e.isFile)return[{file:await e3t(e),path:n}];if(!e.isDirectory)return[];const i=await t3t(e);return(await Promise.all(i.map(r=>Oje(r,n)))).flat()}function n3t({selected:e,onChange:t}){const{t:n}=Oe("create"),[i,r]=m.useState([]),[s,a]=m.useState([]),[l,c]=m.useState(!1),[u,d]=m.useState(!1),f=m.useRef(0),h=O=>e.some(k=>k.source==="local"&&k.folder===O),p=O=>{O.localFiles&&(h(O.folder||O.name)?t(e.filter(k=>!(k.source==="local"&&k.folder===(O.folder||O.name)))):t([...e,{source:"local",folder:O.folder||O.name,name:O.name,description:O.description,localFiles:O.localFiles}]))},g=m.useRef([]),b=m.useRef(e);m.useEffect(()=>{g.current=s},[s]),m.useEffect(()=>{b.current=e},[e]);const v=O=>{const k=new Set([...g.current.map(N=>N.folder||N.name),...b.current.filter(N=>N.source==="local").map(N=>N.folder)]),S=[],E=[];for(const N of O.hits){const _=N.folder||N.name;if(k.has(_)){S.push(N.name);continue}k.add(_),E.push(N)}a(N=>[...N,...E]);const C=[...O.errors];if(S.length>0&&C.push(n("skills.local.duplicatesSkipped",{names:S.join(", ")})),r(C),E.length===1&&O.errors.length===0&&S.length===0){const N=E[0];N.localFiles&&t([...b.current,{source:"local",folder:N.folder||N.name,name:N.name,description:N.description,localFiles:N.localFiles}])}},y=O=>{O.preventDefault(),f.current+=1,d(!0)},x=O=>{O.preventDefault(),f.current=Math.max(0,f.current-1),f.current===0&&d(!1)},w=async O=>{if(O.preventDefault(),f.current=0,d(!1),l)return;const k=Array.from(O.dataTransfer.items).map(S=>{var E;return(E=S.webkitGetAsEntry)==null?void 0:E.call(S)}).filter(S=>S!==null);if(k.length===0){r([n("skills.local.invalidDrop")]);return}c(!0);try{const S=(await Promise.all(k.map(N=>Oje(N)))).flat(),E=k.some(N=>N.isDirectory);if(!E&&S.length===1&&S[0].file.name.toLowerCase().endsWith(".zip")){v(await ZLt(S[0].file));return}if(!E){r([n("skills.local.invalidDrop")]);return}const C=new Map(S.map(({file:N,path:_})=>[N,_]));v(await JLt(S.map(({file:N})=>N),C))}catch(S){r([n("skills.local.readError",{detail:S instanceof Error?S.message:String(S)})])}finally{c(!1)}};return o.jsxs("div",{className:"cw-local",children:[o.jsxs("div",{className:`cw-local-dropzone ${u?"is-dragging":""}`,role:"group","aria-label":n("skills.local.dropLabel"),onDragEnter:y,onDragOver:O=>O.preventDefault(),onDragLeave:x,onDrop:O=>void w(O),children:[o.jsx(NF,{className:"cw-local-drop-icon","aria-hidden":!0}),o.jsx("p",{className:"cw-local-drop-hint",children:n("skills.local.dropLabel")})]}),o.jsx("p",{className:"cw-local-hint",children:n("skills.local.hint")}),l&&o.jsx("p",{className:"cw-empty-line",children:n("skills.local.reading")}),i.length>0&&o.jsxs("div",{className:"cw-banner",children:[o.jsx(Yd,{className:"cw-i"}),o.jsx("span",{children:i.join(";")})]}),s.length>0&&o.jsx("div",{className:"cw-skill-results",children:s.map(O=>{var S;const k=h(O.folder||O.name);return o.jsxs("button",{type:"button",className:`cw-skill-result ${k?"is-on":""}`,onClick:()=>p(O),"aria-pressed":k,children:[o.jsx("span",{className:"cw-skill-result-icon","aria-hidden":!0,children:k?o.jsx(Hu,{className:"cw-i cw-i-sm"}):o.jsx(Mo,{className:"cw-i cw-i-sm"})}),o.jsxs("span",{className:"cw-skill-result-meta",children:[o.jsx("span",{className:"cw-skill-result-name",children:O.name}),O.description&&o.jsx("span",{className:"cw-skill-result-desc",children:xk(O.description)}),o.jsx("span",{className:"cw-skill-result-repo",children:n("skills.local.fileCount",{count:((S=O.localFiles)==null?void 0:S.length)??0})})]})]},O.id)})})]})}const i3t="/harness/skills/findskill";async function r3t(e,t="public"){const n=e.trim(),i=new URLSearchParams({query:n,page_number:"1",page_size:"20"}),r=`${i3t}?${i.toString()}`,s=await fetch(r,{headers:{accept:"application/json"},signal:Ol(void 0,Ho)});if(!s.ok)throw new Error(It("helpers.skills.searchFailed",{status:s.status}));return((await s.json()).items??[]).map(l=>({source:"skillhub",id:l.slug??l.name??"",slug:l.slug??"",name:l.name??l.slug??"",description:l.description??"",namespace:t,sourceRepo:l.sourceRepo,downloadCount:l.downloadCount,version:l.version}))}function s3t({selected:e,onChange:t}){const{t:n}=Oe("create"),[i,r]=m.useState(""),[s,a]=m.useState([]),[l,c]=m.useState(!1),[u,d]=m.useState(null),[f,h]=m.useState(!1),p=v=>e.some(y=>y.source==="skillhub"&&y.slug===v),g=v=>{v.slug&&(p(v.slug)?t(e.filter(y=>!(y.source==="skillhub"&&y.slug===v.slug))):t([...e,{source:"skillhub",slug:v.slug,name:v.name,folder:v.slug.split("/").pop()||v.name,namespace:v.namespace||"public",description:v.description}]))},b=async v=>{c(!0),d(null),h(!0);try{const y=await r3t(v);a(y)}catch(y){d(y instanceof Error?y.message:n("skills.hub.searchError")),a([])}finally{c(!1)}};return m.useEffect(()=>{const v=i.trim();if(!v){a([]),h(!1),d(null);return}const y=setTimeout(()=>b(v),300);return()=>clearTimeout(y)},[i,n]),o.jsxs("div",{className:"cw-skillhub",children:[o.jsxs("div",{className:"cw-skill-searchrow",children:[o.jsxs("div",{className:"cw-skill-searchbox",children:[o.jsx(A_,{className:"cw-i cw-skill-searchicon","aria-hidden":!0}),o.jsx("input",{className:"cw-input cw-skill-input",value:i,placeholder:n("skills.hub.searchPlaceholder"),onChange:v=>r(v.target.value),onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),i.trim()&&b(i))}})]}),o.jsxs("button",{type:"button",className:"cw-btn cw-btn-soft",onClick:()=>i.trim()&&b(i),disabled:!i.trim()||l,children:[l?o.jsx(mi,{className:"cw-i cw-spin"}):o.jsx(A_,{className:"cw-i"}),n("skills.hub.search")]})]}),u&&o.jsxs("div",{className:"cw-banner",children:[o.jsx(Yd,{className:"cw-i"}),o.jsx("span",{children:u})]}),l&&s.length===0?o.jsxs("p",{className:"cw-empty-line cw-skill-loading",role:"status",children:[o.jsx(mi,{className:"cw-i cw-spin"})," ",n("skills.hub.searching")]}):s.length>0?o.jsx("div",{className:"cw-skill-results",children:s.map(v=>{const y=p(v.slug||"");return o.jsxs("button",{type:"button",className:`cw-skill-result ${y?"is-on":""}`,onClick:()=>g(v),"aria-pressed":y,children:[o.jsx("span",{className:"cw-skill-result-icon","aria-hidden":!0,children:y?o.jsx(Hu,{className:"cw-i cw-i-sm"}):o.jsx(Mo,{className:"cw-i cw-i-sm"})}),o.jsxs("span",{className:"cw-skill-result-meta",children:[o.jsx("span",{className:"cw-skill-result-name",children:v.name}),v.description&&o.jsx("span",{className:"cw-skill-result-desc",children:xk(v.description)}),v.sourceRepo&&o.jsx("span",{className:"cw-skill-result-repo",children:v.sourceRepo})]})]},v.id||v.slug)})}):f&&!u?o.jsx("p",{className:"cw-empty-line",children:n("skills.hub.noResults")}):!f&&o.jsx("p",{className:"cw-empty-line",children:n("skills.hub.hint")})]})}function a3t({selected:e,onChange:t,cloudProvider:n="volcengine"}){const{t:i}=Oe("create"),[r,s]=m.useState([]),[a,l]=m.useState([]),[c,u]=m.useState(""),[d,f]=m.useState(!0),[h,p]=m.useState(!1),[g,b]=m.useState(null);m.useEffect(()=>{let O=!1;return(async()=>{f(!0),b(null);try{const k=await DEe();O||(s(k),k.length>0&&u(k[0].id))}catch(k){O||b(k instanceof Error?k.message:i("skills.space.loadError"))}finally{O||f(!1)}})(),()=>{O=!0}},[i]),m.useEffect(()=>{if(!c){l([]);return}const O=r.find(S=>S.id===c);let k=!1;return(async()=>{p(!0),b(null);try{const S=await MEe(c,O==null?void 0:O.region);k||l(S)}catch(S){k||b(S instanceof Error?S.message:i("skills.space.loadError"))}finally{k||p(!1)}})(),()=>{k=!0}},[c,r,i]);const v=r.find(O=>O.id===c),y=v?u1t(v.id,v.region,n):"",x=(O,k)=>e.some(S=>S.source==="skillspace"&&S.skillId===O&&(S.version||"")===k),w=O=>{if(v)if(x(O.skillId,O.version))t(e.filter(k=>!(k.source==="skillspace"&&k.skillId===O.skillId&&(k.version||"")===O.version)));else{const k=c1t(v,O);t([...e,{source:"skillspace",folder:k.folder||O.skillName,name:k.name,description:k.description,skillSpaceId:k.skillSpaceId,skillSpaceName:k.skillSpaceName,skillSpaceRegion:k.skillSpaceRegion,skillId:k.skillId,version:k.version}])}};return o.jsx("div",{className:"cw-skillspace",children:d?o.jsxs("p",{className:"cw-empty-line cw-skill-loading",role:"status",children:[o.jsx(mi,{className:"cw-i cw-spin"})," ",i("skills.space.loadingSpaces")]}):g?o.jsxs("div",{className:"cw-banner",children:[o.jsx(Yd,{className:"cw-i"}),o.jsx("span",{children:g})]}):r.length===0?o.jsx("p",{className:"cw-empty-line",children:i("skills.space.noSpaces")}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"cw-skillspace-header",children:[o.jsx("select",{className:"cw-input cw-skillspace-select",value:c,onChange:O=>u(O.target.value),"aria-label":i("skills.space.selectSpace"),children:r.map(O=>o.jsxs("option",{value:O.id,children:[O.name||O.id,O.description?` — ${xk(O.description)}`:""]},O.id))}),v&&o.jsxs(o.Fragment,{children:[v.region&&o.jsx("span",{className:"cw-skillspace-region-label",title:v.region,children:Th(v.region,n)}),y&&o.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"cw-button cw-button-secondary cw-skillspace-console-link",title:i("skills.space.openConsole"),"aria-label":i("skills.space.openConsole"),children:o.jsx(mb,{className:"cw-i cw-i-sm"})})]})]}),h?o.jsxs("p",{className:"cw-empty-line cw-skill-loading",role:"status",children:[o.jsx(mi,{className:"cw-i cw-spin"})," ",i("skills.space.loadingSkills")]}):a.length===0?o.jsx("p",{className:"cw-empty-line",children:i("skills.space.noSkills")}):o.jsx("div",{className:"cw-skill-results",children:a.map(O=>{const k=x(O.skillId,O.version);return o.jsxs("button",{type:"button",className:`cw-skill-result ${k?"is-on":""}`,onClick:()=>w(O),"aria-pressed":k,children:[o.jsx("span",{className:"cw-skill-result-icon","aria-hidden":!0,children:k?o.jsx(Hu,{className:"cw-i cw-i-sm"}):o.jsx(Mo,{className:"cw-i cw-i-sm"})}),o.jsxs("span",{className:"cw-skill-result-meta",children:[o.jsxs("span",{className:"cw-skill-result-name",children:[O.skillName,O.version&&o.jsxs("span",{className:"cw-skill-result-version",children:[" ","v",O.version]})]}),O.skillDescription&&o.jsx("span",{className:"cw-skill-result-desc",children:xk(O.skillDescription)}),o.jsxs("span",{className:"cw-skill-result-repo",children:[o.jsx(ZFe,{className:"cw-i cw-i-sm"})," ",(v==null?void 0:v.name)||c]})]})]},`${O.skillId}/${O.version}`)})})]})})}function wje({className:e}){return o.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("path",{d:"M5.5 7.5h10.75a2 2 0 0 1 2 2v7.75a2 2 0 0 1-2 2H5.5a2 2 0 0 1-2-2V9.5a2 2 0 0 1 2-2Z"}),o.jsx("path",{d:"M7 4.75h9.5a2 2 0 0 1 2 2",opacity:".58"}),o.jsx("path",{d:"m11 10.25.72 1.48 1.63.24-1.18 1.15.28 1.62-1.45-.77-1.45.77.28-1.62-1.18-1.15 1.63-.24.72-1.48Z"}),o.jsx("path",{d:"M19.25 11.25h1.5M20 10.5V12",opacity:".72"})]})}function eL(e){return e.source==="runtime"?`runtime:${e.folder}`:e.source==="skillhub"?`hub:${e.namespace}/${e.slug}`:e.source==="local"?`local:${e.folder}`:`ss:${e.skillSpaceId}/${e.skillId}/${e.version||""}`}function o3t(e){return e.source==="runtime"?"skillSourcePicker.sources.runtime":e.source==="local"?"skillSourcePicker.sources.local":e.source==="skillspace"?"skillSourcePicker.sources.skillspace":"skillSourcePicker.sources.skillhub"}function l3t({skill:e,onRemove:t,disabled:n}){const{t:i}=Oe("ui");let r=mS;e.source==="local"||e.source==="runtime"?r=NF:e.source==="skillspace"&&(r=wje);const s=`${i(o3t(e))}${e.description?` · ${xk(e.description)}`:""}`;return o.jsxs(pr.div,{className:"cw-selected-skill-row",layout:!0,initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.16},children:[o.jsx("span",{className:"cw-selected-skill-icon","aria-hidden":"true",children:o.jsx(r,{className:"cw-i cw-i-sm"})}),o.jsxs("span",{className:"cw-selected-skill-meta",children:[o.jsx("span",{className:"cw-selected-skill-name",children:e.name}),o.jsx("span",{className:"cw-selected-skill-detail",tabIndex:0,title:s,children:s})]}),o.jsx("button",{type:"button",className:"cw-selected-skill-remove",onClick:t,disabled:n,"aria-label":i("skillSourcePicker.remove",{name:e.name}),title:i("skillSourcePicker.remove",{name:e.name}),children:o.jsx(Ia,{className:"cw-i cw-i-sm"})})]})}const tL=[{id:"local",labelKey:"skillSourcePicker.tabs.local",shortLabelKey:"skillSourcePicker.tabs.localShort",icon:NF},{id:"skillspace",labelKey:"skillSourcePicker.tabs.skillspace",shortLabelKey:"skillSourcePicker.tabs.skillspaceShort",icon:wje},{id:"skillhub",labelKey:"skillSourcePicker.tabs.skillhub",shortLabelKey:"skillSourcePicker.tabs.skillhubShort",icon:qj}];function HQ({selected:e,onChange:t,cloudProvider:n,disabled:i=!1,addLabel:r,showSelectedCount:s=!0}){const{t:a}=Oe("ui"),[l,c]=m.useState("local"),[u,d]=m.useState(!1),f=m.useId(),h=m.useId(),p=m.useRef(null),g=tL.findIndex(x=>x.id===l),b=r??a("skillSourcePicker.addSkill");m.useEffect(()=>{var k;if(!u)return;const x=document.body.style.overflow,w=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(k=p.current)==null||k.focus();const O=S=>{S.key==="Escape"&&d(!1)};return window.addEventListener("keydown",O),()=>{document.body.style.overflow=x,window.removeEventListener("keydown",O),w!=null&&w.isConnected&&w.focus()}},[u]);const v=(x,w)=>{w.source==="runtime"&&!window.confirm(a("skillSourcePicker.confirmRemoveRuntime",{name:w.name}))||t(e.filter(O=>eL(O)!==x))},y=x=>{const w=new Set(x.filter(O=>O.source!=="runtime").map(O=>O.folder));t(x.filter(O=>O.source!=="runtime"||!w.has(O.folder)))};return o.jsxs("div",{className:"cw-skillspane",children:[o.jsxs("button",{type:"button",className:"cw-skill-add","aria-haspopup":"dialog",disabled:i,onClick:()=>d(!0),children:[o.jsx("span",{className:"cw-skill-add-icon","aria-hidden":"true",children:o.jsx(Mo,{className:"cw-i"})}),o.jsx("span",{children:b})]}),e.length>0&&o.jsxs("div",{className:"cw-skill-selected",children:[s?o.jsx("span",{className:"cw-skill-selected-label",children:a("skillSourcePicker.selectedCount",{count:e.length})}):null,o.jsx("div",{className:"cw-selected-skill-list",children:o.jsx(Iu,{initial:!1,children:e.map(x=>o.jsx(l3t,{skill:x,disabled:i,onRemove:()=>v(eL(x),x)},eL(x)))})})]}),Fi.createPortal(o.jsx(Iu,{children:u&&o.jsx(pr.div,{className:"cw-skill-dialog-backdrop",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.16},onMouseDown:x=>{x.target===x.currentTarget&&d(!1)},children:o.jsxs(pr.section,{className:"cw-skill-dialog",role:"dialog","aria-modal":"true","aria-labelledby":f,initial:{opacity:0,y:10,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:6,scale:.99},transition:{duration:.18,ease:"easeOut"},children:[o.jsxs("header",{className:"cw-skill-dialog-head",children:[o.jsx("h3",{id:f,children:b}),o.jsx("button",{ref:p,type:"button",className:"cw-skill-dialog-close","aria-label":a("skillSourcePicker.close",{label:b}),onClick:()=>d(!1),children:o.jsx(Ia,{className:"cw-i"})})]}),o.jsxs("div",{className:"cw-skill-dialog-body",children:[o.jsxs("div",{className:"cw-skill-sourcetabs",role:"tablist",style:{"--cw-skill-tab-slider-width":`calc((100% - 16px) / ${tL.length})`,"--cw-active-skill-tab-offset":`calc(${g*100}% + ${g*4}px)`},children:[o.jsx("span",{className:"cw-skill-tab-slider","aria-hidden":"true"}),tL.map(({id:x,labelKey:w,shortLabelKey:O,icon:k})=>o.jsxs("button",{type:"button",role:"tab",id:`${h}-${x}`,"aria-controls":h,"aria-selected":l===x,className:`cw-skill-pickertab ${l===x?"is-on":""}`,onClick:()=>c(x),children:[o.jsx(k,{className:"cw-i cw-i-sm"}),o.jsx("span",{className:"cw-skill-tab-label-full",children:a(w)}),o.jsx("span",{className:"cw-skill-tab-label-short",children:a(O)})]},x))]}),o.jsxs("div",{id:h,className:"cw-skill-tabbody",role:"tabpanel","aria-labelledby":`${h}-${l}`,children:[l==="skillhub"&&o.jsx(s3t,{selected:e,onChange:y}),l==="local"&&o.jsx(n3t,{selected:e,onChange:y}),l==="skillspace"&&o.jsx(a3t,{selected:e,onChange:y,cloudProvider:n})]})]})]})})}),document.body)]})}const Sje=128*1024,c3t={baseImageRequired:"请填写基础镜像。",duplicateFrom:"基础镜像已固定在第一行,请删除 Dockerfile 正文中的 FROM 指令。",tooLarge:"Dockerfile 不能超过 128 KiB。",empty:"Dockerfile 内容不能为空。",missingFrom:"Dockerfile 缺少 FROM 指令。"};function yv(e,t){return(t==null?void 0:t(`environmentCenter.dockerfileValidation.${e}`))??c3t[e]}function DI(e){return e.replace(/^\uFEFF/,"").replace(/\r\n?/g,` -`)}function kje(e){return new TextEncoder().encode(e).byteLength}function u3t(e,t="ubuntu:22.04"){const n=DI(e).match(/^\s*FROM(?:\s+--platform=\S+)?\s+(\S+)/im);return(n==null?void 0:n[1])??t}function d3t(e){const t=DI(e).split(` +`);if(!t.length||t[0].trim()!=="---")return{name:"",description:""};let n=-1;for(let r=1;r=2&&(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))}function YLt(...e){var t;for(const n of e){const i=(t=n.trim().replace(/\\/g,"/").split("/").filter(Boolean).pop())==null?void 0:t.replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"");if(i)return i.slice(0,64)}return"local-skill"}function ZLt(e,t){return t.trim()||e}function xje(e){const t=e.map(i=>({path:i.path.replace(/\\/g,"/").replace(/^\.\//,""),text:i.text})).filter(i=>i.path.length>0&&!i.path.endsWith("/")),n=new Set(t.map(i=>i.path.split("/")[0]));if(n.size===1&&t.every(i=>i.path.includes("/"))){const i=[...n][0]+"/";return t.map(r=>({path:r.path.slice(i.length),text:r.text}))}return t}function JLt(e){const t=new Map,n=new Set;for(const i of e)if(p8.test("/"+i.path)){const r=i.path.split("/");n.add(r.slice(0,-1).join("/"))}for(const i of e){const r=i.path.split("/");let s="";for(let u=r.length-1;u>=0;u--){const d=r.slice(0,u).join("/");if(n.has(d)){s=d;break}}const a=p8.test("/"+i.path);if(!s&&!a&&!n.has("")||!n.has(s)&&!a)continue;const l=s?i.path.slice(s.length+1):i.path,c=t.get(s)||[];c.push({path:l,text:i.text}),t.set(s,c)}return t}function e3t(e,t,n){const i=`${n}${e?"/"+e:""}`,r=t.find(c=>p8.test("/"+c.path));if(!r)return{hit:null,error:It("helpers.skills.missingManifest",{location:i})};const s=GLt(r.text),a=YLt(s.name,e,n.replace(/\.[^.]+$/,"")),l=[];for(const c of t){if(c.path.split("/").some(f=>f===".."))return{hit:null,error:It("helpers.skills.invalidParentPath",{location:i,path:c.path})};const d=`skills/${a}/${c.path}`;if(!d.startsWith(`skills/${a}/`))return{hit:null,error:It("helpers.skills.invalidPath",{location:i,path:c.path})};l.push({path:d,content:c.text})}return{hit:{source:"local",id:`local:${a}:${t.length}`,name:ZLt(a,s.name),description:s.description||It("helpers.skills.localDescription"),folder:a,localFiles:l},error:null}}async function t3t(e){const t=new Uint8Array(await e.arrayBuffer()),i=(await vje(t)).map(r=>({path:r.name,text:r.text}));return Oje(xje(i),e.name)}async function n3t(e,t=new Map){const n=[];for(let i=0;ie.file(t,n))}async function r3t(e){const t=e.createReader(),n=[];for(;;){const i=await new Promise((r,s)=>t.readEntries(r,s));if(i.length===0)return n;n.push(...i)}}async function wje(e,t=""){const n=t?`${t}/${e.name}`:e.name;if(e.isFile)return[{file:await i3t(e),path:n}];if(!e.isDirectory)return[];const i=await r3t(e);return(await Promise.all(i.map(r=>wje(r,n)))).flat()}function s3t({selected:e,onChange:t}){const{t:n}=xe("create"),[i,r]=m.useState([]),[s,a]=m.useState([]),[l,c]=m.useState(!1),[u,d]=m.useState(!1),f=m.useRef(0),h=O=>e.some(k=>k.source==="local"&&k.folder===O),p=O=>{O.localFiles&&(h(O.folder||O.name)?t(e.filter(k=>!(k.source==="local"&&k.folder===(O.folder||O.name)))):t([...e,{source:"local",folder:O.folder||O.name,name:O.name,description:O.description,localFiles:O.localFiles}]))},g=m.useRef([]),b=m.useRef(e);m.useEffect(()=>{g.current=s},[s]),m.useEffect(()=>{b.current=e},[e]);const v=O=>{const k=new Set([...g.current.map(N=>N.folder||N.name),...b.current.filter(N=>N.source==="local").map(N=>N.folder)]),S=[],E=[];for(const N of O.hits){const _=N.folder||N.name;if(k.has(_)){S.push(N.name);continue}k.add(_),E.push(N)}a(N=>[...N,...E]);const C=[...O.errors];if(S.length>0&&C.push(n("skills.local.duplicatesSkipped",{names:S.join(", ")})),r(C),E.length===1&&O.errors.length===0&&S.length===0){const N=E[0];N.localFiles&&t([...b.current,{source:"local",folder:N.folder||N.name,name:N.name,description:N.description,localFiles:N.localFiles}])}},y=O=>{O.preventDefault(),f.current+=1,d(!0)},x=O=>{O.preventDefault(),f.current=Math.max(0,f.current-1),f.current===0&&d(!1)},w=async O=>{if(O.preventDefault(),f.current=0,d(!1),l)return;const k=Array.from(O.dataTransfer.items).map(S=>{var E;return(E=S.webkitGetAsEntry)==null?void 0:E.call(S)}).filter(S=>S!==null);if(k.length===0){r([n("skills.local.invalidDrop")]);return}c(!0);try{const S=(await Promise.all(k.map(N=>wje(N)))).flat(),E=k.some(N=>N.isDirectory);if(!E&&S.length===1&&S[0].file.name.toLowerCase().endsWith(".zip")){v(await t3t(S[0].file));return}if(!E){r([n("skills.local.invalidDrop")]);return}const C=new Map(S.map(({file:N,path:_})=>[N,_]));v(await n3t(S.map(({file:N})=>N),C))}catch(S){r([n("skills.local.readError",{detail:S instanceof Error?S.message:String(S)})])}finally{c(!1)}};return o.jsxs("div",{className:"cw-local",children:[o.jsxs("div",{className:`cw-local-dropzone ${u?"is-dragging":""}`,role:"group","aria-label":n("skills.local.dropLabel"),onDragEnter:y,onDragOver:O=>O.preventDefault(),onDragLeave:x,onDrop:O=>void w(O),children:[o.jsx(_F,{className:"cw-local-drop-icon","aria-hidden":!0}),o.jsx("p",{className:"cw-local-drop-hint",children:n("skills.local.dropLabel")})]}),o.jsx("p",{className:"cw-local-hint",children:n("skills.local.hint")}),l&&o.jsx("p",{className:"cw-empty-line",children:n("skills.local.reading")}),i.length>0&&o.jsxs("div",{className:"cw-banner",children:[o.jsx(Gd,{className:"cw-i"}),o.jsx("span",{children:i.join(";")})]}),s.length>0&&o.jsx("div",{className:"cw-skill-results",children:s.map(O=>{var S;const k=h(O.folder||O.name);return o.jsxs("button",{type:"button",className:`cw-skill-result ${k?"is-on":""}`,onClick:()=>p(O),"aria-pressed":k,children:[o.jsx("span",{className:"cw-skill-result-icon","aria-hidden":!0,children:k?o.jsx(Vu,{className:"cw-i cw-i-sm"}):o.jsx(Do,{className:"cw-i cw-i-sm"})}),o.jsxs("span",{className:"cw-skill-result-meta",children:[o.jsx("span",{className:"cw-skill-result-name",children:O.name}),O.description&&o.jsx("span",{className:"cw-skill-result-desc",children:bk(O.description)}),o.jsx("span",{className:"cw-skill-result-repo",children:n("skills.local.fileCount",{count:((S=O.localFiles)==null?void 0:S.length)??0})})]})]},O.id)})})]})}const a3t="/harness/skills/findskill";async function o3t(e,t="public"){const n=e.trim(),i=new URLSearchParams({query:n,page_number:"1",page_size:"20"}),r=`${a3t}?${i.toString()}`,s=await fetch(r,{headers:{accept:"application/json"},signal:xl(void 0,Vo)});if(!s.ok)throw new Error(It("helpers.skills.searchFailed",{status:s.status}));return((await s.json()).items??[]).map(l=>({source:"skillhub",id:l.slug??l.name??"",slug:l.slug??"",name:l.name??l.slug??"",description:l.description??"",namespace:t,sourceRepo:l.sourceRepo,downloadCount:l.downloadCount,version:l.version}))}function l3t({selected:e,onChange:t}){const{t:n}=xe("create"),[i,r]=m.useState(""),[s,a]=m.useState([]),[l,c]=m.useState(!1),[u,d]=m.useState(null),[f,h]=m.useState(!1),p=v=>e.some(y=>y.source==="skillhub"&&y.slug===v),g=v=>{v.slug&&(p(v.slug)?t(e.filter(y=>!(y.source==="skillhub"&&y.slug===v.slug))):t([...e,{source:"skillhub",slug:v.slug,name:v.name,folder:v.slug.split("/").pop()||v.name,namespace:v.namespace||"public",description:v.description}]))},b=async v=>{c(!0),d(null),h(!0);try{const y=await o3t(v);a(y)}catch(y){d(y instanceof Error?y.message:n("skills.hub.searchError")),a([])}finally{c(!1)}};return m.useEffect(()=>{const v=i.trim();if(!v){a([]),h(!1),d(null);return}const y=setTimeout(()=>b(v),300);return()=>clearTimeout(y)},[i,n]),o.jsxs("div",{className:"cw-skillhub",children:[o.jsxs("div",{className:"cw-skill-searchrow",children:[o.jsxs("div",{className:"cw-skill-searchbox",children:[o.jsx(E_,{className:"cw-i cw-skill-searchicon","aria-hidden":!0}),o.jsx("input",{className:"cw-input cw-skill-input",value:i,placeholder:n("skills.hub.searchPlaceholder"),onChange:v=>r(v.target.value),onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),i.trim()&&b(i))}})]}),o.jsxs("button",{type:"button",className:"cw-btn cw-btn-soft",onClick:()=>i.trim()&&b(i),disabled:!i.trim()||l,children:[l?o.jsx(hi,{className:"cw-i cw-spin"}):o.jsx(E_,{className:"cw-i"}),n("skills.hub.search")]})]}),u&&o.jsxs("div",{className:"cw-banner",children:[o.jsx(Gd,{className:"cw-i"}),o.jsx("span",{children:u})]}),l&&s.length===0?o.jsxs("p",{className:"cw-empty-line cw-skill-loading",role:"status",children:[o.jsx(hi,{className:"cw-i cw-spin"})," ",n("skills.hub.searching")]}):s.length>0?o.jsx("div",{className:"cw-skill-results",children:s.map(v=>{const y=p(v.slug||"");return o.jsxs("button",{type:"button",className:`cw-skill-result ${y?"is-on":""}`,onClick:()=>g(v),"aria-pressed":y,children:[o.jsx("span",{className:"cw-skill-result-icon","aria-hidden":!0,children:y?o.jsx(Vu,{className:"cw-i cw-i-sm"}):o.jsx(Do,{className:"cw-i cw-i-sm"})}),o.jsxs("span",{className:"cw-skill-result-meta",children:[o.jsx("span",{className:"cw-skill-result-name",children:v.name}),v.description&&o.jsx("span",{className:"cw-skill-result-desc",children:bk(v.description)}),v.sourceRepo&&o.jsx("span",{className:"cw-skill-result-repo",children:v.sourceRepo})]})]},v.id||v.slug)})}):f&&!u?o.jsx("p",{className:"cw-empty-line",children:n("skills.hub.noResults")}):!f&&o.jsx("p",{className:"cw-empty-line",children:n("skills.hub.hint")})]})}function c3t({selected:e,onChange:t,cloudProvider:n="volcengine"}){const{t:i}=xe("create"),[r,s]=m.useState([]),[a,l]=m.useState([]),[c,u]=m.useState(""),[d,f]=m.useState(!0),[h,p]=m.useState(!1),[g,b]=m.useState(null);m.useEffect(()=>{let O=!1;return(async()=>{f(!0),b(null);try{const k=await MEe();O||(s(k),k.length>0&&u(k[0].id))}catch(k){O||b(k instanceof Error?k.message:i("skills.space.loadError"))}finally{O||f(!1)}})(),()=>{O=!0}},[i]),m.useEffect(()=>{if(!c){l([]);return}const O=r.find(S=>S.id===c);let k=!1;return(async()=>{p(!0),b(null);try{const S=await LEe(c,O==null?void 0:O.region);k||l(S)}catch(S){k||b(S instanceof Error?S.message:i("skills.space.loadError"))}finally{k||p(!1)}})(),()=>{k=!0}},[c,r,i]);const v=r.find(O=>O.id===c),y=v?h1t(v.id,v.region,n):"",x=(O,k)=>e.some(S=>S.source==="skillspace"&&S.skillId===O&&(S.version||"")===k),w=O=>{if(v)if(x(O.skillId,O.version))t(e.filter(k=>!(k.source==="skillspace"&&k.skillId===O.skillId&&(k.version||"")===O.version)));else{const k=f1t(v,O);t([...e,{source:"skillspace",folder:k.folder||O.skillName,name:k.name,description:k.description,skillSpaceId:k.skillSpaceId,skillSpaceName:k.skillSpaceName,skillSpaceRegion:k.skillSpaceRegion,skillId:k.skillId,version:k.version}])}};return o.jsx("div",{className:"cw-skillspace",children:d?o.jsxs("p",{className:"cw-empty-line cw-skill-loading",role:"status",children:[o.jsx(hi,{className:"cw-i cw-spin"})," ",i("skills.space.loadingSpaces")]}):g?o.jsxs("div",{className:"cw-banner",children:[o.jsx(Gd,{className:"cw-i"}),o.jsx("span",{children:g})]}):r.length===0?o.jsx("p",{className:"cw-empty-line",children:i("skills.space.noSpaces")}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"cw-skillspace-header",children:[o.jsx("select",{className:"cw-input cw-skillspace-select",value:c,onChange:O=>u(O.target.value),"aria-label":i("skills.space.selectSpace"),children:r.map(O=>o.jsxs("option",{value:O.id,children:[O.name||O.id,O.description?` — ${bk(O.description)}`:""]},O.id))}),v&&o.jsxs(o.Fragment,{children:[v.region&&o.jsx("span",{className:"cw-skillspace-region-label",title:v.region,children:wh(v.region,n)}),y&&o.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"cw-button cw-button-secondary cw-skillspace-console-link",title:i("skills.space.openConsole"),"aria-label":i("skills.space.openConsole"),children:o.jsx(fb,{className:"cw-i cw-i-sm"})})]})]}),h?o.jsxs("p",{className:"cw-empty-line cw-skill-loading",role:"status",children:[o.jsx(hi,{className:"cw-i cw-spin"})," ",i("skills.space.loadingSkills")]}):a.length===0?o.jsx("p",{className:"cw-empty-line",children:i("skills.space.noSkills")}):o.jsx("div",{className:"cw-skill-results",children:a.map(O=>{const k=x(O.skillId,O.version);return o.jsxs("button",{type:"button",className:`cw-skill-result ${k?"is-on":""}`,onClick:()=>w(O),"aria-pressed":k,children:[o.jsx("span",{className:"cw-skill-result-icon","aria-hidden":!0,children:k?o.jsx(Vu,{className:"cw-i cw-i-sm"}):o.jsx(Do,{className:"cw-i cw-i-sm"})}),o.jsxs("span",{className:"cw-skill-result-meta",children:[o.jsxs("span",{className:"cw-skill-result-name",children:[O.skillName,O.version&&o.jsxs("span",{className:"cw-skill-result-version",children:[" ","v",O.version]})]}),O.skillDescription&&o.jsx("span",{className:"cw-skill-result-desc",children:bk(O.skillDescription)}),o.jsxs("span",{className:"cw-skill-result-repo",children:[o.jsx(JFe,{className:"cw-i cw-i-sm"})," ",(v==null?void 0:v.name)||c]})]})]},`${O.skillId}/${O.version}`)})})]})})}function Sje({className:e}){return o.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsx("path",{d:"M5.5 7.5h10.75a2 2 0 0 1 2 2v7.75a2 2 0 0 1-2 2H5.5a2 2 0 0 1-2-2V9.5a2 2 0 0 1 2-2Z"}),o.jsx("path",{d:"M7 4.75h9.5a2 2 0 0 1 2 2",opacity:".58"}),o.jsx("path",{d:"m11 10.25.72 1.48 1.63.24-1.18 1.15.28 1.62-1.45-.77-1.45.77.28-1.62-1.18-1.15 1.63-.24.72-1.48Z"}),o.jsx("path",{d:"M19.25 11.25h1.5M20 10.5V12",opacity:".72"})]})}function Z5(e){return e.source==="runtime"?`runtime:${e.folder}`:e.source==="skillhub"?`hub:${e.namespace}/${e.slug}`:e.source==="local"?`local:${e.folder}`:`ss:${e.skillSpaceId}/${e.skillId}/${e.version||""}`}function u3t(e){return e.source==="runtime"?"skillSourcePicker.sources.runtime":e.source==="local"?"skillSourcePicker.sources.local":e.source==="skillspace"?"skillSourcePicker.sources.skillspace":"skillSourcePicker.sources.skillhub"}function d3t({skill:e,onRemove:t,disabled:n}){const{t:i}=xe("ui");let r=uS;e.source==="local"||e.source==="runtime"?r=_F:e.source==="skillspace"&&(r=Sje);const s=`${i(u3t(e))}${e.description?` · ${bk(e.description)}`:""}`;return o.jsxs(mr.div,{className:"cw-selected-skill-row",layout:!0,initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.16},children:[o.jsx("span",{className:"cw-selected-skill-icon","aria-hidden":"true",children:o.jsx(r,{className:"cw-i cw-i-sm"})}),o.jsxs("span",{className:"cw-selected-skill-meta",children:[o.jsx("span",{className:"cw-selected-skill-name",children:e.name}),o.jsx("span",{className:"cw-selected-skill-detail",tabIndex:0,title:s,children:s})]}),o.jsx("button",{type:"button",className:"cw-selected-skill-remove",onClick:t,disabled:n,"aria-label":i("skillSourcePicker.remove",{name:e.name}),title:i("skillSourcePicker.remove",{name:e.name}),children:o.jsx(Ra,{className:"cw-i cw-i-sm"})})]})}const J5=[{id:"local",labelKey:"skillSourcePicker.tabs.local",shortLabelKey:"skillSourcePicker.tabs.localShort",icon:_F},{id:"skillspace",labelKey:"skillSourcePicker.tabs.skillspace",shortLabelKey:"skillSourcePicker.tabs.skillspaceShort",icon:Sje},{id:"skillhub",labelKey:"skillSourcePicker.tabs.skillhub",shortLabelKey:"skillSourcePicker.tabs.skillhubShort",icon:zj}];function VQ({selected:e,onChange:t,cloudProvider:n,disabled:i=!1,addLabel:r,showSelectedCount:s=!0}){const{t:a}=xe("ui"),[l,c]=m.useState("local"),[u,d]=m.useState(!1),f=m.useId(),h=m.useId(),p=m.useRef(null),g=J5.findIndex(x=>x.id===l),b=r??a("skillSourcePicker.addSkill");m.useEffect(()=>{var k;if(!u)return;const x=document.body.style.overflow,w=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(k=p.current)==null||k.focus();const O=S=>{S.key==="Escape"&&d(!1)};return window.addEventListener("keydown",O),()=>{document.body.style.overflow=x,window.removeEventListener("keydown",O),w!=null&&w.isConnected&&w.focus()}},[u]);const v=(x,w)=>{w.source==="runtime"&&!window.confirm(a("skillSourcePicker.confirmRemoveRuntime",{name:w.name}))||t(e.filter(O=>Z5(O)!==x))},y=x=>{const w=new Set(x.filter(O=>O.source!=="runtime").map(O=>O.folder));t(x.filter(O=>O.source!=="runtime"||!w.has(O.folder)))};return o.jsxs("div",{className:"cw-skillspane",children:[o.jsxs("button",{type:"button",className:"cw-skill-add","aria-haspopup":"dialog",disabled:i,onClick:()=>d(!0),children:[o.jsx("span",{className:"cw-skill-add-icon","aria-hidden":"true",children:o.jsx(Do,{className:"cw-i"})}),o.jsx("span",{children:b})]}),e.length>0&&o.jsxs("div",{className:"cw-skill-selected",children:[s?o.jsx("span",{className:"cw-skill-selected-label",children:a("skillSourcePicker.selectedCount",{count:e.length})}):null,o.jsx("div",{className:"cw-selected-skill-list",children:o.jsx(Ru,{initial:!1,children:e.map(x=>o.jsx(d3t,{skill:x,disabled:i,onRemove:()=>v(Z5(x),x)},Z5(x)))})})]}),$i.createPortal(o.jsx(Ru,{children:u&&o.jsx(mr.div,{className:"cw-skill-dialog-backdrop",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.16},onMouseDown:x=>{x.target===x.currentTarget&&d(!1)},children:o.jsxs(mr.section,{className:"cw-skill-dialog",role:"dialog","aria-modal":"true","aria-labelledby":f,initial:{opacity:0,y:10,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:6,scale:.99},transition:{duration:.18,ease:"easeOut"},children:[o.jsxs("header",{className:"cw-skill-dialog-head",children:[o.jsx("h3",{id:f,children:b}),o.jsx("button",{ref:p,type:"button",className:"cw-skill-dialog-close","aria-label":a("skillSourcePicker.close",{label:b}),onClick:()=>d(!1),children:o.jsx(Ra,{className:"cw-i"})})]}),o.jsxs("div",{className:"cw-skill-dialog-body",children:[o.jsxs("div",{className:"cw-skill-sourcetabs",role:"tablist",style:{"--cw-skill-tab-slider-width":`calc((100% - 16px) / ${J5.length})`,"--cw-active-skill-tab-offset":`calc(${g*100}% + ${g*4}px)`},children:[o.jsx("span",{className:"cw-skill-tab-slider","aria-hidden":"true"}),J5.map(({id:x,labelKey:w,shortLabelKey:O,icon:k})=>o.jsxs("button",{type:"button",role:"tab",id:`${h}-${x}`,"aria-controls":h,"aria-selected":l===x,className:`cw-skill-pickertab ${l===x?"is-on":""}`,onClick:()=>c(x),children:[o.jsx(k,{className:"cw-i cw-i-sm"}),o.jsx("span",{className:"cw-skill-tab-label-full",children:a(w)}),o.jsx("span",{className:"cw-skill-tab-label-short",children:a(O)})]},x))]}),o.jsxs("div",{id:h,className:"cw-skill-tabbody",role:"tabpanel","aria-labelledby":`${h}-${l}`,children:[l==="skillhub"&&o.jsx(l3t,{selected:e,onChange:y}),l==="local"&&o.jsx(s3t,{selected:e,onChange:y}),l==="skillspace"&&o.jsx(c3t,{selected:e,onChange:y,cloudProvider:n})]})]})]})})}),document.body)]})}const kje=128*1024,f3t={baseImageRequired:"请填写基础镜像。",duplicateFrom:"基础镜像已固定在第一行,请删除 Dockerfile 正文中的 FROM 指令。",tooLarge:"Dockerfile 不能超过 128 KiB。",empty:"Dockerfile 内容不能为空。",missingFrom:"Dockerfile 缺少 FROM 指令。"};function pv(e,t){return(t==null?void 0:t(`environmentCenter.dockerfileValidation.${e}`))??f3t[e]}function II(e){return e.replace(/^\uFEFF/,"").replace(/\r\n?/g,` +`)}function Eje(e){return new TextEncoder().encode(e).byteLength}function h3t(e,t="ubuntu:22.04"){const n=II(e).match(/^\s*FROM(?:\s+--platform=\S+)?\s+(\S+)/im);return(n==null?void 0:n[1])??t}function p3t(e){const t=II(e).split(` `),n=t.findIndex(i=>/^\s*FROM(?:\s|$)/i.test(i));return(n>=0?t.slice(n+1):t).join(` -`).replace(/^\n+/,"")}function MA(e,t){const n=`FROM ${e.trim()}`,i=DI(t).replace(/^\n+/,"");return i?`${n} -${i}`:n}function f3t(e,t,n){return t.trim()?/^\s*FROM(?:\s|$)/im.test(e)?yv("duplicateFrom",n):qQ(MA(t,e),void 0,n):yv("baseImageRequired",n)}function qQ(e,t=kje(e),n){return t>Sje?yv("tooLarge",n):e.trim()?/^\s*FROM\s+\S+/im.test(e)?"":yv("missingFrom",n):yv("empty",n)}async function h3t(e,t){if(e.size>Sje)return{content:"",error:yv("tooLarge",t)};const n=DI(await e.text());return{content:n,error:qQ(n,e.size,t)}}function p3t(e){return RU(e,{lineWidth:0})}function m3t(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"m7 9.5 5 5 5-5"})})}function g3t(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"m6.5 12.5 3.5 3.5 7.5-8"})})}function QE({ariaLabel:e,value:t,valueLabel:n,placeholder:i,options:r,disabled:s=!1,searchValue:a,searchPlaceholder:l,loading:c=!1,hasMore:u=!1,emptyMessage:d,onSearchChange:f,onLoadMore:h,onChange:p}){const{t:g}=Oe("ui"),b=l??g("deploymentSelect.searchPlaceholder"),v=d??g("deploymentSelect.emptyMessage"),y=m.useId(),x=m.useRef(null),w=m.useRef(null),O=m.useRef(null),k=m.useRef(null),S=m.useRef([]),[E,C]=m.useState(!1),[N,_]=m.useState(0),j=r.find(M=>M.value===t),T=(j==null?void 0:j.label)??(t?n:void 0),L=a!==void 0&&!!f,A=()=>{C(!1),L&&a&&(f==null||f(""))};m.useEffect(()=>{if(!E)return;const M=B=>{B.target instanceof Node&&x.current&&!x.current.contains(B.target)&&A()};return window.addEventListener("pointerdown",M),()=>window.removeEventListener("pointerdown",M)},[E,f,a,L]),m.useEffect(()=>{var M,B;if(E){if(L){(M=O.current)==null||M.focus();return}(B=S.current[N])==null||B.focus()}},[E,L]),m.useEffect(()=>{var M;!E||L&&document.activeElement===O.current||(M=S.current[N])==null||M.focus()},[N,E,L]),m.useEffect(()=>{_(M=>Math.min(M,Math.max(0,r.length-1)))},[r.length]),m.useEffect(()=>{if(!E||!u||c||!h)return;const M=window.requestAnimationFrame(()=>{const B=k.current;B&&B.scrollHeight<=B.clientHeight+1&&h()});return()=>window.cancelAnimationFrame(M)},[u,c,h,E,r.length]);const R=(M=1)=>{const B=r.findIndex(H=>H.value===t),I=B>=0?B:M===1?0:Math.max(0,r.length-1);_(I),C(!0)},P=M=>{r.length!==0&&_((M+r.length)%r.length)},$=M=>{var B;p(M.value),A(),(B=w.current)==null||B.focus()};return o.jsxs("div",{className:"pp-deployment-select",ref:x,onKeyDown:M=>{var I,H;const B=M.target===O.current;if(M.key==="Escape"&&E){M.preventDefault(),A(),(I=w.current)==null||I.focus();return}if(M.key==="Tab"){A();return}if(B){M.key==="ArrowDown"&&r.length>0&&(M.preventDefault(),_(0),(H=S.current[0])==null||H.focus());return}M.key==="ArrowDown"?(M.preventDefault(),E?P(N+1):R(1)):M.key==="ArrowUp"?(M.preventDefault(),E?P(N-1):R(-1)):E&&M.key==="Home"?(M.preventDefault(),_(0)):E&&M.key==="End"&&(M.preventDefault(),_(Math.max(0,r.length-1)))},children:[o.jsxs("button",{ref:w,type:"button",className:"pp-deployment-select-trigger","aria-label":e,"aria-haspopup":"listbox","aria-expanded":E,"aria-controls":E?y:void 0,disabled:s,onClick:()=>{E?A():R()},children:[o.jsx("span",{className:T?void 0:"is-placeholder",children:T??i}),o.jsx(m3t,{className:`pp-deployment-select-chevron${E?" is-open":""}`})]}),E&&o.jsxs("div",{className:"pp-deployment-select-menu",children:[L&&o.jsx("div",{className:"pp-deployment-select-search",children:o.jsx("input",{ref:O,type:"search",value:a,"aria-label":g("deploymentSelect.searchAriaLabel",{label:e}),placeholder:b,autoComplete:"off",onChange:M=>f==null?void 0:f(M.currentTarget.value)})}),o.jsx("div",{id:y,ref:k,className:"pp-deployment-select-options",role:"listbox","aria-label":e,"aria-busy":c||void 0,onScroll:M=>{if(!u||c||!h)return;const B=M.currentTarget;B.scrollHeight-B.scrollTop-B.clientHeight<=24&&h()},children:r.map((M,B)=>{const I=M.value===t;return o.jsxs("button",{ref:H=>{S.current[B]=H},type:"button",role:"option","aria-selected":I,tabIndex:B===N?0:-1,className:`pp-deployment-select-option${I?" is-selected":""}`,title:M.description,onFocus:()=>_(B),onClick:()=>$(M),children:[o.jsxs("span",{className:"pp-deployment-select-copy",children:[o.jsxs("span",{className:"pp-deployment-select-name",children:[M.label,M.badge&&o.jsx("span",{className:"pp-deployment-select-badge",children:M.badge})]}),M.description&&o.jsx("small",{children:M.description})]}),I&&o.jsx(g3t,{})]},M.value)})}),c&&o.jsx("div",{className:"pp-deployment-select-state","aria-live":"polite",children:g("deploymentSelect.loadingMore")}),!c&&r.length===0&&o.jsx("div",{className:"pp-deployment-select-state",children:v})]})]})}function b3t(e){return[{value:"auto",label:e("deploymentResources.mode.auto"),description:e("deploymentResources.mode.autoDescription"),badge:e("deploymentResources.mode.recommended")},{value:"create",label:e("deploymentResources.mode.create"),description:e("deploymentResources.mode.createDescription")},{value:"existing",label:e("deploymentResources.mode.existing"),description:e("deploymentResources.mode.existingDescription")}]}const Eje={tos:{mode:"auto"},cr:{mode:"auto"},codePipeline:{mode:"auto"}};function Vf(e){const[t,n]=m.useState([]),[i,r]=m.useState(""),[s,a]=m.useState(1),[l,c]=m.useState(0),[u,d]=m.useState(!1),[f,h]=m.useState(!1),[p,g]=m.useState(null),[b,v]=m.useState(""),[y,x]=m.useState(""),[w,O]=m.useState(""),[k,S]=m.useState(0),E=m.useRef(!1),C=m.useRef(null),N=e?JSON.stringify(e):"",_=e?JSON.stringify({...e,search:y}):"";m.useEffect(()=>{const R=window.setTimeout(()=>{x(b.trim())},250);return()=>window.clearTimeout(R)},[b]),m.useEffect(()=>{v(""),x("")},[N]);const j=m.useCallback((R,P)=>{var B;if(!_)return;(B=C.current)==null||B.abort();const $=new AbortController;C.current=$;const M=JSON.parse(_);P&&n([]),E.current=!0,h(!0),g(null),i0e({...M,pageNumber:R,pageSize:100},$.signal).then(I=>{n(H=>{if(P)return I.items;const X=new Set(H.map(Q=>`${Q.id}\0${Q.name}`));return[...H,...I.items.filter(Q=>!X.has(`${Q.id}\0${Q.name}`))]}),r(I.serviceRegion),a(I.pageNumber),c(I.totalCount),d(I.hasMore),O(_)}).catch(I=>{I instanceof DOMException&&I.name==="AbortError"||(O(_),g(I instanceof Error?I.message:String(I)))}).finally(()=>{C.current===$&&(C.current=null,E.current=!1,h(!1))})},[_]);m.useEffect(()=>{var R;if(!_){(R=C.current)==null||R.abort(),C.current=null,E.current=!1,n([]),r(""),a(1),c(0),d(!1),O(""),h(!1),g(null);return}return j(1,!0),()=>{var P;return(P=C.current)==null?void 0:P.abort()}},[j,_,k]);const T=!!_&&w===_&&b.trim()===y,L=m.useCallback(()=>{O(""),S(R=>R+1)},[]),A=m.useCallback(()=>{!T||E.current||!u||j(s+1,!1)},[u,j,s,T]);return{items:t,serviceRegion:i,totalCount:l,hasMore:T?u:!1,loading:!!_&&(!T||f),error:p,search:b,setSearch:v,reload:L,loadMore:A}}function y3t(e,t){return e.map(n=>({value:n[t],label:n.name,description:[n.status,n.region,n.id].filter(Boolean).join(" · ")}))}function Hf({ariaLabel:e,value:t,valueLabel:n,state:i,disabled:r,disabledMessage:s,valueField:a="id",onChange:l}){const{t:c}=Oe("ui"),u=m.useMemo(()=>y3t(i.items,a),[i.items,a]);return o.jsxs("div",{className:"pp-resource-picker",children:[o.jsx(QE,{ariaLabel:e,value:t,valueLabel:n,placeholder:i.loading?c("common.loading"):c("deploymentResources.selectExisting"),options:u,disabled:r||!!i.error,searchValue:i.search,searchPlaceholder:c("deploymentResources.searchResource"),loading:i.loading,hasMore:i.hasMore,emptyMessage:i.search.trim()?c("deploymentResources.noMatch"):c("deploymentResources.noAvailable"),onSearchChange:i.setSearch,onLoadMore:i.loadMore,onChange:d=>{const f=i.items.find(h=>h[a]===d);f&&l(f)}}),s?o.jsx("span",{className:"pp-resource-status",children:s}):i.error?o.jsxs("div",{className:"pp-resource-error",role:"alert",children:[o.jsx("span",{children:i.error}),o.jsx("button",{type:"button",onClick:i.reload,children:c("common.retry")})]}):i.loading&&i.items.length===0?o.jsx("span",{className:"pp-resource-status","aria-live":"polite",children:i.search.trim()?c("deploymentResources.searching"):c("deploymentResources.loading")}):i.items.length===0?o.jsx("span",{className:"pp-resource-status",children:i.search.trim()?c("deploymentResources.noMatchSentence"):c("deploymentResources.noAvailableSentence")}):i.serviceRegion?o.jsx("span",{className:"pp-resource-status",children:c("deploymentResources.loadedSummary",{region:i.serviceRegion,loaded:i.items.length,total:i.totalCount>0?`/${i.totalCount}`:""})}):null]})}function Cje({region:e,value:t,disabled:n=!1,onChange:i}){const{t:r}=Oe("ui"),s=Vf(e?{kind:"cr-registry",region:e}:null),a=Vf(e&&(t!=null&&t.registry)?{kind:"cr-namespace",region:e,registry:t.registry}:null),l=Vf(e&&(t!=null&&t.registry)&&t.namespace?{kind:"cr-repository",region:e,registry:t.registry,namespace:t.namespace}:null),c=t??{region:e,registry:"",namespace:"",repository:""};return o.jsxs("div",{className:"pp-resource-fields pp-resource-fields-three environment-repository-fields",children:[o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:r("deploymentResources.registryInstance")}),o.jsx(Hf,{ariaLabel:r("deploymentResources.registryAriaLabel"),value:c.registry,valueLabel:c.registry,state:s,disabled:n||!e,valueField:"name",onChange:u=>i({region:e,registry:u.name,namespace:"",repository:""})})]}),o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:r("deploymentResources.namespace")}),o.jsx(Hf,{ariaLabel:r("deploymentResources.namespaceAriaLabel"),value:c.namespace,valueLabel:c.namespace,state:a,disabled:n||!c.registry,disabledMessage:c.registry?void 0:r("deploymentResources.selectRegistryFirst"),valueField:"name",onChange:u=>i({...c,region:e,namespace:u.name,repository:""})})]}),o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:r("deploymentResources.repository")}),o.jsx(Hf,{ariaLabel:r("deploymentResources.existingRepository"),value:c.repository,valueLabel:c.repository,state:l,disabled:n||!c.registry||!c.namespace,disabledMessage:c.registry?c.namespace?void 0:r("deploymentResources.selectNamespaceFirst"):r("deploymentResources.selectRegistryFirst"),valueField:"name",onChange:u=>i({...c,region:e,repository:u.name})})]})]})}function nL({resource:e,value:t,disabled:n,onChange:i}){const{t:r}=Oe("ui");return o.jsxs("label",{className:"pp-resource-field pp-resource-mode",children:[o.jsx("span",{children:r("deploymentResources.configurationMode")}),o.jsx(QE,{ariaLabel:r("deploymentResources.configurationModeAriaLabel",{resource:e}),value:t,placeholder:r("deploymentResources.selectConfigurationMode"),options:b3t(r),disabled:n,onChange:s=>i(s)})]})}function Q0({label:e,value:t,placeholder:n,disabled:i,onChange:r}){return o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:e}),o.jsx("input",{value:t,placeholder:n,disabled:i,autoComplete:"off",onChange:s=>r(s.currentTarget.value)})]})}function iL({items:e,note:t}){const{t:n}=Oe("ui");return o.jsxs("div",{className:"pp-resource-auto-names",children:[o.jsx("span",{children:n("deploymentResources.automaticNames")}),o.jsx("dl",{children:e.map(i=>o.jsxs("div",{children:[o.jsx("dt",{children:i.label}),o.jsx("dd",{title:i.name,children:i.name})]},i.label))}),t&&o.jsx("small",{children:t})]})}function Tje(e){var t,n,i,r,s,a,l,c;return e.tos.mode!=="auto"&&!((t=e.tos.bucket)!=null&&t.trim())?Zt.t("ui:deploymentResources.validation.tos"):e.cr.mode!=="auto"&&(!((n=e.cr.instance)!=null&&n.trim())||!((i=e.cr.namespace)!=null&&i.trim())||!((r=e.cr.repository)!=null&&r.trim()))?Zt.t("ui:deploymentResources.validation.cr"):e.codePipeline.mode!=="auto"&&(!((s=e.codePipeline.workspaceName)!=null&&s.trim())||!((a=e.codePipeline.pipelineName)!=null&&a.trim()))?Zt.t("ui:deploymentResources.validation.codePipeline"):e.codePipeline.mode==="existing"&&(!((l=e.codePipeline.workspaceId)!=null&&l.trim())||!((c=e.codePipeline.pipelineId)!=null&&c.trim()))?Zt.t("ui:deploymentResources.validation.existingCodePipeline"):null}function Aje({value:e,agentName:t,runtimeName:n,region:i,disabled:r,validationError:s,onChange:a}){const{t:l}=Oe("ui"),c=t.trim()||"agentkit-app",u=n.trim()||c,d=i&&i!=="cn-beijing"?l("deploymentResources.autoBucketWithRegion",{region:i.startsWith("cn-")?i.slice(3):i}):l("deploymentResources.autoBucket"),f=Vf(e.tos.mode==="existing"?{kind:"tos-bucket",region:i}:null),h=Vf(e.cr.mode==="existing"?{kind:"cr-registry",region:i}:null),p=Vf(e.cr.mode==="existing"&&e.cr.instance?{kind:"cr-namespace",region:i,registry:e.cr.instance}:null),g=Vf(e.cr.mode==="existing"&&e.cr.instance&&e.cr.namespace?{kind:"cr-repository",region:i,registry:e.cr.instance,namespace:e.cr.namespace}:null),b=Vf(e.codePipeline.mode==="existing"?{kind:"cp-workspace",region:i}:null),v=Vf(e.codePipeline.mode==="existing"&&e.codePipeline.workspaceId?{kind:"cp-pipeline",region:i,workspaceId:e.codePipeline.workspaceId}:null),y=x=>a({...e,...x});return o.jsxs("div",{className:"pp-resource-list",children:[o.jsxs("div",{className:"pp-resource-item",children:[o.jsx("div",{className:"pp-resource-name",children:l("deploymentResources.tosBucket")}),o.jsxs("div",{className:"pp-resource-grid",children:[o.jsx(nL,{resource:l("deploymentResources.tosBucket"),value:e.tos.mode,disabled:r,onChange:x=>y({tos:{mode:x}})}),e.tos.mode==="create"&&o.jsx(Q0,{label:l("deploymentResources.bucketName"),value:e.tos.bucket??"",placeholder:l("deploymentResources.bucketNamePlaceholder"),disabled:r,onChange:x=>y({tos:{...e.tos,bucket:x}})}),e.tos.mode==="existing"&&o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.existingBucket")}),o.jsx(Hf,{ariaLabel:l("deploymentResources.existingTosBucket"),value:e.tos.bucket??"",valueLabel:e.tos.bucket,state:f,disabled:r,onChange:x=>y({tos:{...e.tos,bucket:x.name}})})]}),e.tos.mode==="auto"&&o.jsx(iL,{items:[{label:l("deploymentResources.bucket"),name:d}],note:l("deploymentResources.accountIdResolved")})]})]}),o.jsxs("div",{className:"pp-resource-item",children:[o.jsx("div",{className:"pp-resource-name",children:l("deploymentResources.containerRegistry")}),o.jsxs("div",{className:"pp-resource-grid",children:[o.jsx(nL,{resource:"CR",value:e.cr.mode,disabled:r,onChange:x=>y({cr:{mode:x}})}),e.cr.mode==="create"&&o.jsxs("div",{className:"pp-resource-fields pp-resource-fields-three",children:[o.jsx(Q0,{label:l("deploymentResources.instanceName"),value:e.cr.instance??"",placeholder:l("deploymentResources.crInstance"),disabled:r,onChange:x=>y({cr:{...e.cr,instance:x}})}),o.jsx(Q0,{label:l("deploymentResources.namespace"),value:e.cr.namespace??"",placeholder:l("deploymentResources.namespace"),disabled:r,onChange:x=>y({cr:{...e.cr,namespace:x}})}),o.jsx(Q0,{label:l("deploymentResources.repository"),value:e.cr.repository??"",placeholder:l("deploymentResources.repository"),disabled:r,onChange:x=>y({cr:{...e.cr,repository:x}})})]}),e.cr.mode==="existing"&&o.jsxs("div",{className:"pp-resource-fields pp-resource-fields-three",children:[o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.crInstance")}),o.jsx(Hf,{ariaLabel:l("deploymentResources.existingCrInstance"),value:e.cr.instance??"",valueLabel:e.cr.instance,state:h,disabled:r,valueField:"name",onChange:x=>y({cr:{mode:"existing",instance:x.name}})})]}),o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.namespace")}),o.jsx(Hf,{ariaLabel:l("deploymentResources.existingCrNamespace"),value:e.cr.namespace??"",valueLabel:e.cr.namespace,state:p,disabled:r||!e.cr.instance,valueField:"name",onChange:x=>y({cr:{...e.cr,namespace:x.name,repository:void 0}})})]}),o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.repository")}),o.jsx(Hf,{ariaLabel:l("deploymentResources.existingCrRepository"),value:e.cr.repository??"",valueLabel:e.cr.repository,state:g,disabled:r||!e.cr.namespace,valueField:"name",onChange:x=>y({cr:{...e.cr,repository:x.name}})})]})]}),e.cr.mode==="auto"&&o.jsx(iL,{items:[{label:l("deploymentResources.crInstance"),name:l("deploymentResources.autoRegistry")},{label:l("deploymentResources.namespace"),name:"agentkit"},{label:l("deploymentResources.repository"),name:l("deploymentResources.autoRepositoryName",{name:c})}],note:l("deploymentResources.registryNameNote")})]})]}),o.jsxs("div",{className:"pp-resource-item",children:[o.jsx("div",{className:"pp-resource-name",children:"CodePipeline"}),o.jsxs("div",{className:"pp-resource-grid",children:[o.jsx(nL,{resource:"CodePipeline",value:e.codePipeline.mode,disabled:r,onChange:x=>y({codePipeline:{mode:x}})}),e.codePipeline.mode==="create"&&o.jsxs("div",{className:"pp-resource-fields",children:[o.jsx(Q0,{label:l("deploymentResources.workspaceName"),value:e.codePipeline.workspaceName??"",placeholder:l("deploymentResources.workspaceName"),disabled:r,onChange:x=>y({codePipeline:{...e.codePipeline,workspaceName:x}})}),o.jsx(Q0,{label:l("deploymentResources.pipelineName"),value:e.codePipeline.pipelineName??"",placeholder:l("deploymentResources.pipelineName"),disabled:r,onChange:x=>y({codePipeline:{...e.codePipeline,pipelineName:x}})})]}),e.codePipeline.mode==="existing"&&o.jsxs("div",{className:"pp-resource-fields",children:[o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.workspace")}),o.jsx(Hf,{ariaLabel:l("deploymentResources.existingWorkspace"),value:e.codePipeline.workspaceId??"",valueLabel:e.codePipeline.workspaceName,state:b,disabled:r,onChange:x=>y({codePipeline:{mode:"existing",workspaceId:x.id,workspaceName:x.name}})})]}),o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.compatiblePipeline")}),o.jsx(Hf,{ariaLabel:l("deploymentResources.existingPipeline"),value:e.codePipeline.pipelineId??"",valueLabel:e.codePipeline.pipelineName,state:v,disabled:r||!e.codePipeline.workspaceId,onChange:x=>y({codePipeline:{...e.codePipeline,pipelineId:x.id,pipelineName:x.name}})})]})]}),e.codePipeline.mode==="auto"&&o.jsx(iL,{items:[{label:l("deploymentResources.workspace"),name:"agentkit-cli-workspace"},{label:l("deploymentResources.pipeline"),name:u}],note:l("deploymentResources.pipelineNameNote")})]})]}),s&&o.jsx("p",{className:"pp-resource-validation",role:"alert",children:s})]})}function v3t(e){return[{value:"custom",label:e("environmentCenter.creation.custom.label"),description:e("environmentCenter.creation.custom.description")},{value:"dockerfile",label:e("environmentCenter.creation.dockerfile.label"),description:e("environmentCenter.creation.dockerfile.description")},{value:"git",label:e("environmentCenter.creation.git.label"),description:e("environmentCenter.creation.git.description")},{value:"image",label:e("environmentCenter.creation.image.label"),description:e("environmentCenter.creation.image.description")}]}const x3t=pwe.map(e=>({value:e.id,label:e.label,description:e.description}));function O3t(e){return[{value:"none",label:e("common.none"),description:e("environmentCenter.presets.none")},{value:"aio-sandbox",label:"AIO Sandbox",description:e("environmentCenter.presets.aio")},{value:"codex-sandbox",label:"Codex Sandbox",description:e("environmentCenter.presets.codex")}]}function w3t(e){const t=u3t(e,"");return t===xB?"aio-sandbox":t.includes("/codexenv:")?"codex-sandbox":"none"}const S3t=tN.map(e=>({value:e.id,label:e.label})),Dte=gwe.map(e=>({value:e.id,label:e.label}));function k3t(e){return[{value:"managed",label:e("environmentCenter.repository.managed")},{value:"existing",label:e("environmentCenter.repository.existing")}]}const g8=20,Mte=new Set;async function E3t(){var e;if(typeof navigator>"u"||!((e=navigator.permissions)!=null&&e.query))return!1;try{return(await navigator.permissions.query({name:"clipboard-read"})).state==="denied"}catch{return!1}}const C3t={opencli:RLt,uv:ILt,playwright:PLt,chromium:DLt,git:MLt,curl:LLt,ffmpeg:$Lt,imagemagick:FLt};function T3t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"M8 3.25v9.5M3.25 8h9.5"})})}function Cu(){return o.jsx("span",{className:"environment-required-mark","aria-hidden":"true",children:"*"})}function A3t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4"}),o.jsx("path",{d:"M5 16v2.5A2.5 2.5 0 0 0 7.5 21h9a2.5 2.5 0 0 0 2.5-2.5V16"})]})}function b8(e,t){const n=e.trim();if(!n)return t("environmentCenter.errors.repositoryRequired");try{const i=new URL(n);if(i.protocol!=="https:"||!i.hostname)return t("environmentCenter.errors.repositoryHttps")}catch{return t("environmentCenter.errors.repositoryInvalid")}return""}function Lte(e){return!!(e!=null&&e.region&&e.registry&&e.namespace&&e.repository)}function _je(e,t){const n=e.trim();return n?/\s/.test(n)?t("environmentCenter.errors.imageReferenceWhitespace"):n.startsWith("sha256:")?/^sha256:[0-9a-fA-F]{64}$/.test(n)?"":t("environmentCenter.errors.imageDigestInvalid"):/[@/]/.test(n)?t("environmentCenter.errors.imageTagOnly"):"":""}function _3t(e){return(e instanceof Error?e.message:String(e)).split(` -原始响应:`,1)[0].trim()}function N3t(e){return o.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M5.5 10.5 16 5l10.5 5.5L16 16 5.5 10.5Z"}),o.jsx("path",{d:"M5.5 16 16 21.5 26.5 16M5.5 21.5 16 27l10.5-5.5"})]})}function j3t({label:e}){return o.jsx("span",{className:"environment-package-fallback",children:e.slice(0,1).toUpperCase()})}function R3t({option:e}){if(e.id==="lark-cli")return o.jsx("img",{src:PI,alt:""});if(e.id==="pandoc")return o.jsx("img",{src:jLt,alt:""});if(e.id==="github-cli")return o.jsx(VQ,{});const t=C3t[e.id];return t?o.jsx("img",{src:t,alt:""}):o.jsx(j3t,{label:e.label})}function I3t(e,t){return e?{name:e.name,description:e.description,baseEnvironment:e.baseEnvironment,operatingSystem:e.operatingSystem,language:e.language,optionIds:[...e.optionIds],selectedSkills:[...e.selectedSkills],dockerfile:e.dockerfile===wB(e,t)?void 0:e.dockerfile,gitSource:e.gitSource,containerRepository:e.containerRepository,imageSource:e.imageSource}:{...uM,optionIds:[...uM.optionIds],selectedSkills:[...uM.selectedSkills]}}const Hg=new Set(["preparing","queued","building","scanning"]),$te=3e3,rL={preparing:"environmentCenter.buildStatus.preparing",queued:"environmentCenter.buildStatus.queued",building:"environmentCenter.buildStatus.building",scanning:"environmentCenter.buildStatus.scanning",available:"environmentCenter.buildStatus.available",failed:"environmentCenter.buildStatus.failed"};function Nje(e,t){var i;const n=(i=e.latestVersion)==null?void 0:i.status;return n?n==="available"?{label:t(rL[n]),color:"success"}:n==="failed"?{label:t(rL[n]),color:"danger"}:{label:t(rL[n]),color:"warning"}:{label:t("environmentCenter.buildStatus.notBuilt"),color:"secondary"}}function P3t(e,t){return QQ(e,Date.now(),t)}function D3t(e,t){const n=Date.parse(e);return Number.isNaN(n)?e:new Intl.DateTimeFormat(t,{dateStyle:"medium",timeStyle:"medium"}).format(n)}function M3t(e,t,n=Date.now()){const i=Date.parse(e.createdAt),s=Hg.has(e.status)?n:Date.parse(e.updatedAt);if(Number.isNaN(i)||Number.isNaN(s))return"";const a=Math.max(0,Math.floor((s-i)/1e3));if(a<60)return t("environmentCenter.duration.seconds",{count:a});const l=Math.floor(a/60),c=a%60;return l<60?t("environmentCenter.duration.minutesSeconds",{minutes:l,seconds:c}):t("environmentCenter.duration.hoursMinutes",{hours:Math.floor(l/60),minutes:l%60})}function L3t({environment:e,onClose:t}){var w;const{t:n}=Oe("ui"),i=((w=e.latestVersion)==null?void 0:w.versionId)??"",r=m.useId(),s=m.useRef(null),a=m.useRef(t),[l,c]=m.useState(null),[u,d]=m.useState(!0),[f,h]=m.useState(""),[p,g]=m.useState(0),[b,v]=m.useState("idle"),y=m.useMemo(()=>l?p3t(l):"",[l]);a.current=t,m.useEffect(()=>{var E;const O=document.body.style.overflow,k=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(E=s.current)==null||E.focus();const S=C=>{if(C.key==="Escape"){C.preventDefault(),a.current();return}if(C.key!=="Tab"||!s.current)return;const N=Array.from(s.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')).filter(T=>T.getClientRects().length>0);if(!N.length)return;const _=N[0],j=N[N.length-1];C.shiftKey&&document.activeElement===_?(C.preventDefault(),j.focus()):!C.shiftKey&&document.activeElement===j&&(C.preventDefault(),_.focus())};return window.addEventListener("keydown",S),()=>{document.body.style.overflow=O,window.removeEventListener("keydown",S),k!=null&&k.isConnected&&k.focus()}},[]),m.useEffect(()=>{const O=new AbortController;return d(!0),h(""),E0e(e.id,i,O.signal).then(c).catch(k=>{(k==null?void 0:k.name)!=="AbortError"&&h(k instanceof Error?k.message:String(k))}).finally(()=>{O.signal.aborted||d(!1)}),()=>O.abort()},[e.id,p,i]),m.useEffect(()=>{if(b!=="copied")return;const O=window.setTimeout(()=>v("idle"),1500);return()=>window.clearTimeout(O)},[b]);const x=async()=>{try{await navigator.clipboard.writeText(y),v("copied")}catch{v("error")}};return Fi.createPortal(o.jsx("div",{className:"environment-build-dialog__backdrop",onMouseDown:O=>{O.target===O.currentTarget&&t()},children:o.jsxs("section",{ref:s,className:"environment-build-dialog environment-manifest-dialog",role:"dialog","aria-modal":"true","aria-labelledby":r,"aria-busy":u||void 0,tabIndex:-1,children:[o.jsxs("header",{className:"environment-build-dialog__header",children:[o.jsxs("div",{children:[o.jsx("div",{className:"environment-build-dialog__title-row",children:o.jsx("h2",{id:r,children:n("environmentCenter.manifest.title")})}),o.jsxs("p",{children:[e.name," / ",i]})]}),o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"sm",uniform:!0,onClick:t,"aria-label":n("environmentCenter.manifest.closeLabel"),children:o.jsx(Ia,{"aria-hidden":!0})})]}),o.jsx("div",{className:"environment-manifest-dialog__body",children:u?o.jsx("div",{className:"environment-manifest-dialog__state",role:"status",children:o.jsx(Tn,{as:"span",children:n("environmentCenter.manifest.loading")})}):f?o.jsxs("div",{className:"environment-manifest-dialog__state is-error",role:"alert",children:[o.jsx("p",{children:f}),o.jsx(Ft,{type:"button",color:"secondary",variant:"soft",size:"sm",onClick:()=>g(O=>O+1),children:n("common.reload")})]}):o.jsx("div",{className:"environment-manifest-dialog__editor","aria-label":n("environmentCenter.manifest.editorLabel"),children:o.jsx(UE,{value:y,path:"environment.yaml",readOnly:!0,onChange:()=>{}})})}),o.jsxs("footer",{className:"environment-build-dialog__actions",children:[b==="error"?o.jsx("span",{className:"environment-manifest-dialog__copy-error",role:"alert",children:n("environmentCenter.manifest.copyFailed")}):null,o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"sm",onClick:t,children:n("common.close")}),o.jsx(Ft,{type:"button",color:"info",size:"sm",disabled:!y,onClick:()=>void x(),children:n(b==="copied"?"environmentCenter.manifest.copied":"environmentCenter.manifest.copy")})]})]})}),document.body)}function $3t({environment:e,onClose:t,onBuildUpdate:n,onRebuild:i}){var S,E;const{t:r}=Oe("ui"),s=e.latestVersion,[a,l]=m.useState(s),[c,u]=m.useState(!!s),[d,f]=m.useState(""),[h,p]=m.useState(Date.now()),[g,b]=m.useState(!1),v=m.useId(),y=m.useRef(null),x=m.useRef(t),w=m.useRef(n);m.useEffect(()=>{x.current=t,w.current=n},[n,t]),m.useEffect(()=>{var j;const C=document.body.style.overflow,N=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(j=y.current)==null||j.focus();const _=T=>{var P;if(T.key==="Escape"&&x.current(),T.key!=="Tab")return;const L=Array.from(((P=y.current)==null?void 0:P.querySelectorAll('button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])'))??[]).filter($=>$.getClientRects().length>0);if(!L.length)return;const A=L[0],R=L[L.length-1];T.shiftKey&&document.activeElement===A?(T.preventDefault(),R.focus()):!T.shiftKey&&document.activeElement===R&&(T.preventDefault(),A.focus())};return window.addEventListener("keydown",_),()=>{document.body.style.overflow=C,window.removeEventListener("keydown",_),N!=null&&N.isConnected&&N.focus()}},[]),m.useEffect(()=>{if(!s)return;let C=0;const N=new AbortController,_=async()=>{u(!0);try{const j=await k0e(e.id,s.versionId,{includeLogs:!0,signal:N.signal});l(j),f(""),w.current(j),Hg.has(j.status)&&(C=window.setTimeout(_,$te))}catch(j){if((j==null?void 0:j.name)==="AbortError")return;f(j instanceof Error?j.message:String(j)),C=window.setTimeout(_,$te)}finally{N.signal.aborted||u(!1)}};return _(),()=>{N.abort(),window.clearTimeout(C)}},[e.id,s==null?void 0:s.versionId]),m.useEffect(()=>{if(!a||!Hg.has(a.status))return;const C=window.setInterval(()=>p(Date.now()),1e3);return()=>window.clearInterval(C)},[a==null?void 0:a.status]);const O=a?Nje({...e,latestVersion:a},r):{label:r("environmentCenter.buildStatus.notBuilt"),color:"secondary"},k=e.imageSource||(E=(S=a==null?void 0:a.resources)==null?void 0:S.codePipeline)==null?void 0:E.consoleUrl;return Fi.createPortal(o.jsx("div",{className:"environment-build-dialog__backdrop",onMouseDown:C=>{C.target===C.currentTarget&&t()},children:o.jsxs("section",{ref:y,className:"environment-build-dialog",role:"dialog","aria-modal":"true","aria-labelledby":v,tabIndex:-1,children:[o.jsxs("header",{className:"environment-build-dialog__header",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"environment-build-dialog__title-row",children:[o.jsx("h2",{id:v,children:r("environmentCenter.buildDetails.title")}),o.jsx(ga,{color:O.color,size:"sm",children:O.label})]}),o.jsx("p",{children:e.name})]}),o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"sm",uniform:!0,onClick:t,"aria-label":r("environmentCenter.buildDetails.closeLabel"),children:o.jsx(Ia,{"aria-hidden":!0})})]}),o.jsxs("div",{className:"environment-build-dialog__summary",children:[o.jsxs("div",{children:[o.jsx("span",{children:r("environmentCenter.buildDetails.currentStep")}),o.jsx("strong",{children:(a==null?void 0:a.currentStep)||r("environmentCenter.buildDetails.waiting")})]}),o.jsxs("div",{children:[o.jsx("span",{children:r("environmentCenter.buildDetails.elapsed")}),o.jsx("strong",{children:a?M3t(a,r,h):"-"})]}),a!=null&&a.sourceCommitSha?o.jsxs("div",{children:[o.jsx("span",{children:r("environmentCenter.buildDetails.sourceCommit")}),o.jsx("strong",{title:a.sourceCommitSha,children:a.sourceCommitSha.slice(0,12)})]}):null,k?o.jsxs("a",{href:k,target:"_blank",rel:"noreferrer",children:[r("environmentCenter.buildDetails.openCodePipeline")," ",o.jsx(mb,{"aria-hidden":!0})]}):null]}),o.jsxs("div",{className:"environment-build-dialog__body",children:[d?o.jsx("p",{className:"environment-build-dialog__error",role:"alert",children:d}):null,a!=null&&a.progressError?o.jsx("p",{className:"environment-build-dialog__notice",children:a.progressError}):null,o.jsx(VLt,{steps:(a==null?void 0:a.steps)??[],log:(a==null?void 0:a.logTail)??"",logError:a==null?void 0:a.logError,logTruncated:a==null?void 0:a.logTruncated,logUpdatedAt:a==null?void 0:a.logUpdatedAt,loading:c&&!!(a&&Hg.has(a.status))}),(a==null?void 0:a.status)==="failed"&&a.error?o.jsx("p",{className:"environment-build-dialog__failure",role:"alert",children:a.error}):null]}),o.jsxs("footer",{className:"environment-build-dialog__actions",children:[o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"sm",onClick:t,children:r("common.close")}),a&&!e.imageSource&&!Hg.has(a.status)?o.jsx(Ft,{type:"button",color:"info",size:"sm",disabled:g,onClick:()=>{b(!0),i().then(t).finally(()=>b(!1))},children:r(g?"environmentCenter.buildDetails.starting":"environmentCenter.buildDetails.rebuild")}):null]})]})}),document.body)}function jje({cloudProvider:e,value:t,disabled:n,onChange:i}){const{t:r}=Oe("ui"),s=Pu(e).map(a=>({value:a.value,label:a.label}));return o.jsxs("label",{className:"environment-field environment-region-field",children:[o.jsxs("span",{children:[r("environmentCenter.region"),o.jsx(Cu,{})]}),o.jsx(Bs,{id:"environment-region",value:t,options:s,optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,disabled:n,triggerClassName:"environment-select-trigger",onChange:a=>i(a.value)})]})}function F3t({repositoryUrl:e,gitRef:t,dockerfilePath:n,inspection:i,inspectedKey:r,disabled:s,onRepositoryUrlChange:a,onGitRefChange:l,onDockerfilePathChange:c,onInspectionChange:u,onInspectedKeyChange:d}){const{t:f}=Oe("ui"),[h,p]=m.useState(!1),[g,b]=m.useState(""),v=m.useRef(null),y=m.useRef(""),x=`${e.trim()}\0${t.trim()}`,w=r===x;m.useEffect(()=>()=>{const E=v.current;v.current=null,E==null||E.abort()},[]);const O=()=>{var E;(E=v.current)==null||E.abort(),v.current=null,p(!1),b(""),u(null),d(""),c(""),y.current=""},k=m.useCallback(async()=>{var N;const E=b8(e,f);if(E){b(E);return}y.current=x,(N=v.current)==null||N.abort();const C=new AbortController;v.current=C,p(!0),b("");try{const _=await g0e({repositoryUrl:e.trim(),...t.trim()?{ref:t.trim()}:{}},C.signal);if(v.current!==C)return;u(_),d(x),c(_.dockerfiles.length===1?_.dockerfiles[0]:"")}catch(_){if((_==null?void 0:_.name)==="AbortError")return;b(_3t(_)),u(null),d(""),c("")}finally{v.current===C&&(v.current=null,p(!1))}},[x,t,c,d,u,e,f]);m.useEffect(()=>{if(s||w||y.current===x||b8(e,f))return;const E=window.setTimeout(()=>void k(),600);return()=>window.clearTimeout(E)},[x,s,k,w,e,f]);const S=w?(i==null?void 0:i.dockerfiles)??[]:[];return o.jsxs("section",{className:"environment-source-section","aria-label":f("environmentCenter.git.sectionLabel"),children:[o.jsxs("div",{className:"environment-form-grid environment-git-fields",children:[o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[f("environmentCenter.git.address"),o.jsx(Cu,{})]}),o.jsx(Gr,{size:"lg",type:"url",required:!0,value:e,placeholder:"https://github.com/owner/repository.git",autoComplete:"url",disabled:s,"aria-invalid":!!g,onChange:E=>{O(),a(E.currentTarget.value)}})]}),o.jsxs("label",{className:"environment-field",children:[o.jsx("span",{children:f("environmentCenter.git.ref")}),o.jsx(Gr,{size:"lg",value:t,placeholder:f("environmentCenter.git.defaultBranch"),autoComplete:"off",disabled:s,onChange:E=>{O(),l(E.currentTarget.value)}})]})]}),o.jsxs("div",{className:"environment-inspection-status environment-form-feedback","aria-live":"polite",children:[h?o.jsx(Tn,{as:"span",children:f("environmentCenter.git.inspecting")}):null,g?o.jsxs("div",{className:"environment-source-error",role:"alert",children:[o.jsx("span",{children:g}),o.jsxs(Ft,{type:"button",color:"primary",size:"sm",pill:!1,disabled:s,onClick:()=>void k(),children:[o.jsx(zj,{}),f("common.retry")]})]}):null,!h&&!g&&w&&i?S.length>0?o.jsx("span",{children:i.commitSha?f("environmentCenter.git.foundDockerfiles",{commit:i.commitSha.slice(0,12),count:S.length}):f("environmentCenter.git.savedDockerfileLoaded")}):o.jsxs("div",{className:"environment-source-error",role:"alert",children:[o.jsx("span",{children:f("environmentCenter.git.noDockerfile")}),o.jsx("button",{type:"button",disabled:s,onClick:()=>void k(),children:f("environmentCenter.git.inspectAgain")})]}):null]}),S.length>0?o.jsxs("label",{className:"environment-field environment-dockerfile-picker",children:[o.jsxs("span",{children:["Dockerfile",o.jsx(Cu,{})]}),o.jsx(QE,{ariaLabel:f("environmentCenter.git.selectDockerfile"),value:n,valueLabel:n,placeholder:f("environmentCenter.git.selectDockerfile"),options:S.map(E=>({value:E,label:E})),disabled:s||h,onChange:c})]}):null]})}function B3t({cloudProvider:e,mode:t,region:n,value:i,disabled:r,onModeChange:s,onRegionChange:a,onChange:l}){const{t:c}=Oe("ui");return o.jsx("section",{className:"environment-source-section","aria-label":c("environmentCenter.repository.outputSection"),children:o.jsxs("div",{className:"environment-form-grid",children:[o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[c("environmentCenter.repository.type"),o.jsx(Cu,{})]}),o.jsx(Bs,{id:"environment-repository-mode",value:t,options:k3t(c),optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,disabled:r,triggerClassName:"environment-select-trigger",onChange:u=>s(u.value)})]}),o.jsx(jje,{cloudProvider:e,value:n,disabled:r,onChange:a}),t==="existing"?o.jsx(Cje,{region:n,value:i,disabled:r,onChange:l}):o.jsx("p",{className:"environment-source-note environment-form-feedback",children:c("environmentCenter.repository.managedHint")})]})})}function U3t({cloudProvider:e,region:t,repository:n,reference:i,disabled:r,onRegionChange:s,onRepositoryChange:a,onReferenceChange:l}){const{t:c}=Oe("ui"),u=_je(i,c);return o.jsx("section",{className:"environment-source-section","aria-label":c("environmentCenter.existingImage.sectionLabel"),children:o.jsxs("div",{className:"environment-form-grid",children:[o.jsx(jje,{cloudProvider:e,value:t,disabled:r,onChange:s}),o.jsx(Cje,{region:t,value:n,disabled:r,onChange:a}),o.jsxs("label",{className:"environment-field environment-image-reference",children:[o.jsxs("span",{children:[c("environmentCenter.existingImage.reference"),o.jsx(Cu,{})]}),o.jsx(Gr,{size:"lg",value:i,required:!0,placeholder:c("environmentCenter.existingImage.placeholder"),autoComplete:"off",disabled:r,"aria-invalid":!!u,onChange:d=>l(d.currentTarget.value)}),u?o.jsx("small",{className:"environment-source-field__error",role:"alert",children:u}):o.jsx("small",{children:c("environmentCenter.existingImage.hint")})]})]})})}function Rje(e,t,n,i){const r=m.useRef(n),s=m.useRef(i);r.current=n,s.current=i,m.useEffect(()=>{const a=document.body.style.overflow,l=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden";const c=window.requestAnimationFrame(()=>{var d;return(d=t.current)==null?void 0:d.focus()}),u=d=>{var g;if(d.key==="Escape"&&!s.current){d.preventDefault(),r.current();return}if(d.key!=="Tab")return;const f=Array.from(((g=e.current)==null?void 0:g.querySelectorAll('button:not([disabled]), textarea:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])'))??[]).filter(b=>b.getClientRects().length>0);if(!f.length)return;const h=f[0],p=f[f.length-1];d.shiftKey&&document.activeElement===h?(d.preventDefault(),p.focus()):!d.shiftKey&&document.activeElement===p&&(d.preventDefault(),h.focus())};return window.addEventListener("keydown",u),()=>{window.cancelAnimationFrame(c),document.body.style.overflow=a,window.removeEventListener("keydown",u),l!=null&&l.isConnected&&l.focus()}},[e,t])}function Q3t({environment:e,onClose:t}){const{t:n}=Oe("ui"),i=m.useId(),r=m.useId(),s=m.useRef(null),a=m.useRef(null),[l,c]=m.useState(""),[u,d]=m.useState("loading"),[f,h]=m.useState(""),p=u==="loading";Rje(s,a,t,p);const g=async(b="",v)=>{d("loading"),h("");try{const y=b||(await b0e(e.id,v)).shareCode;c(y),await a0e(y),v!=null&&v.aborted||d("copied")}catch(y){if((y==null?void 0:y.name)==="AbortError")return;h(y instanceof Error?y.message:String(y)),d("error")}};return m.useEffect(()=>{const b=new AbortController;return g("",b.signal),()=>b.abort()},[e.id]),Fi.createPortal(o.jsx("div",{className:"environment-build-dialog__backdrop",onMouseDown:b=>{b.target===b.currentTarget&&!p&&t()},children:o.jsxs("section",{ref:s,className:"environment-share-dialog",role:"dialog","aria-modal":"true","aria-labelledby":i,"aria-describedby":r,"aria-busy":p||void 0,children:[o.jsxs("header",{className:"environment-build-dialog__header",children:[o.jsxs("div",{children:[o.jsx("h2",{id:i,children:n("environmentCenter.share.title")}),o.jsx("p",{id:r,children:e.name})]}),o.jsx(Ft,{ref:a,type:"button",color:"secondary",variant:"ghost",size:"sm",uniform:!0,disabled:p,onClick:t,"aria-label":n("environmentCenter.share.closeLabel"),children:o.jsx(Ia,{"aria-hidden":!0})})]}),o.jsx("div",{className:"environment-share-dialog__body",children:u==="loading"?o.jsx(Tn,{as:"p",children:n("environmentCenter.share.generating")}):o.jsxs("div",{className:"environment-share-dialog__result",children:[u==="copied"?o.jsx("p",{className:"environment-share-dialog__success",role:"status","aria-live":"polite",children:n("environmentCenter.share.copied")}):o.jsxs("div",{className:"environment-share-dialog__error",role:"alert",children:[o.jsx("strong",{children:n("environmentCenter.share.failed")}),o.jsx("span",{children:f})]}),l?o.jsxs("label",{className:"environment-share-dialog__field environment-share-dialog__manual-code",children:[o.jsx("span",{children:n("environmentCenter.share.code")}),o.jsx(Lm,{size:"lg",rows:4,value:l,readOnly:!0,"aria-label":n("environmentCenter.share.fullCode"),onFocus:b=>b.currentTarget.select(),onClick:b=>b.currentTarget.select()}),o.jsx("small",{children:n(u==="copied"?"environmentCenter.share.copiedHint":"environmentCenter.share.copyFailedHint")})]}):null,o.jsx("p",{className:"environment-share-dialog__safety",children:n("environmentCenter.share.safety")})]})}),o.jsxs("footer",{className:"environment-build-dialog__actions",children:[o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"sm",disabled:p,onClick:t,children:n("common.close")}),u==="error"?o.jsx(Ft,{type:"button",color:"info",size:"sm",onClick:()=>void g(l),children:n("common.retry")}):u==="copied"?o.jsx(Ft,{type:"button",color:"info",size:"sm",onClick:()=>void g(l),children:n("environmentCenter.share.copyAgain")}):null]})]})}),document.body)}function z3t({initialValue:e,autoInspect:t,onClose:n,onImported:i}){const{t:r}=Oe("ui"),s=m.useId(),a=m.useId(),l=m.useId(),c=m.useRef(null),u=m.useRef(null),d=m.useRef(!1),[f,h]=m.useState(e),[p,g]=m.useState("editing"),[b,v]=m.useState([]),[y,x]=m.useState(""),[w,O]=m.useState([]),k=m.useMemo(()=>HF(f),[f]),S=k.length>g8,E=p==="inspecting"||p==="importing",C=b.filter(A=>A.status==="valid"),N=b.filter(A=>A.status==="invalid"),_=p==="ready"&&C.length>0;Rje(c,u,n,E);const j=m.useCallback(async()=>{if(!(!k.length||S)){g("inspecting"),x(""),O([]);try{const A=await y0e(k);v([...A].sort((R,P)=>R.index-P.index)),g("ready")}catch(A){x(A instanceof Error?A.message:String(A)),g("editing")}}},[k,S]);m.useEffect(()=>{!t||d.current||(d.current=!0,j())},[t,j]);const T=async()=>{if(_){g("importing"),x(""),O([]);try{const A=C.map(Q=>({code:k[Q.index],name:Q.name})).filter(Q=>!!Q.code),R=await v0e(A.map(Q=>Q.code)),P=R.filter(Q=>Q.status==="created").length,$=R.filter(Q=>Q.status==="duplicate").length,M=new Map(R.map(Q=>[Q.index,Q])),B=A.flatMap(({code:Q,name:q},U)=>{const te=M.get(U);return!te||te.status==="failed"?[{code:Q,name:q,status:"valid",error:(te==null?void 0:te.error)||r("environmentCenter.import.noResult")}]:[]}),H=[...N.flatMap(Q=>{const q=k[Q.index];return q?[{code:q,name:"",status:"invalid",error:Q.error||r("environmentCenter.import.invalidCode")}]:[]}),...B],X=new Map;if(R.forEach(Q=>{Q.environment&&X.set(Q.environment.id,Q.environment)}),i([...X.values()],P,$,H.length),!H.length){n();return}h(H.map(Q=>Q.code).join(` -`)),O(B),v(H.map((Q,q)=>({index:q,status:Q.status,name:Q.name,error:Q.status==="invalid"?Q.error:""}))),x(r("environmentCenter.import.partial",{created:P,remaining:H.length})),g("ready")}catch(A){x(A instanceof Error?A.message:String(A)),g("ready")}}},L=p==="inspecting"?r("environmentCenter.import.inspecting"):p==="importing"?r("environmentCenter.import.importing"):_?w.length?r("environmentCenter.import.retryImport"):r("environmentCenter.import.confirm"):r("environmentCenter.import.inspectCodes");return Fi.createPortal(o.jsx("div",{className:"environment-build-dialog__backdrop",onMouseDown:A=>{A.target===A.currentTarget&&!E&&n()},children:o.jsxs("section",{ref:c,className:"environment-share-dialog environment-import-dialog",role:"dialog","aria-modal":"true","aria-labelledby":s,"aria-describedby":a,"aria-busy":E||void 0,children:[o.jsxs("header",{className:"environment-build-dialog__header",children:[o.jsxs("div",{children:[o.jsx("h2",{id:s,children:r("environmentCenter.import.title")}),o.jsx("p",{id:a,children:r("environmentCenter.import.description")})]}),o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"sm",uniform:!0,disabled:E,onClick:n,"aria-label":r("environmentCenter.import.closeLabel"),children:o.jsx(Ia,{"aria-hidden":!0})})]}),o.jsxs("div",{className:"environment-share-dialog__body",children:[o.jsxs("label",{className:"environment-share-dialog__field",children:[o.jsx("span",{children:r("environmentCenter.import.code")}),o.jsx(Lm,{ref:u,size:"lg",rows:6,value:f,disabled:E,"aria-invalid":S||N.length>0||void 0,"aria-describedby":l,placeholder:"akenv://v1/...",onChange:A=>{h(A.currentTarget.value),g("editing"),v([]),x(""),O([])}})]}),o.jsx("p",{id:l,className:`environment-share-dialog__help${S?" is-error":""}`,children:S?r("environmentCenter.import.tooMany",{max:g8,count:k.length}):r("environmentCenter.import.multipleHint")}),o.jsx("p",{className:"environment-share-dialog__safety",children:r("environmentCenter.import.safety")}),p==="inspecting"?o.jsx(Tn,{as:"p",children:r("environmentCenter.import.inspectingCodes")}):C.length?o.jsx("p",{className:"environment-share-dialog__summary",role:"status","aria-live":"polite",children:r("environmentCenter.import.found",{count:C.length,names:C.map(A=>A.name||r("environmentCenter.unnamed")).join(r("environmentCenter.listSeparator"))})}):null,N.length?o.jsx("ul",{className:"environment-share-dialog__failures",role:"alert",children:N.map(A=>o.jsx("li",{children:r("environmentCenter.import.itemError",{index:A.index+1,error:A.error||r("environmentCenter.import.invalidCode")})},A.index))}):null,w.length?o.jsx("ul",{className:"environment-share-dialog__failures",role:"alert",children:w.map((A,R)=>o.jsx("li",{children:r("environmentCenter.import.itemError",{index:R+1,error:A.error})},`${A.code}:${R}`))}):null,y?o.jsx("p",{className:"environment-share-dialog__error-text",role:"alert",children:y}):null]}),o.jsxs("footer",{className:"environment-build-dialog__actions",children:[o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"sm",disabled:E,onClick:n,children:r("common.cancel")}),o.jsx(Ft,{type:"button",color:"info",size:"sm",loading:E,disabled:E||!k.length||S||p==="ready"&&!_,onClick:()=>_?void T():void j(),children:L})]})]})}),document.body)}function V3t({environment:e,cloudProvider:t,onCancel:n,onDelete:i,onShare:r,onSave:s}){var it,Ae,Kt,gn,Wt,Ot,Nt;const{t:a,i18n:l}=Oe("ui"),c=v3t(a),u=I3t(e,t),d=u.dockerfile!==void 0,[f,h]=m.useState(()=>({...u,dockerfile:d?void 0:u.dockerfile})),[p,g]=m.useState(u.gitSource?"git":u.imageSource?"image":d?"dockerfile":"custom"),[b,v]=m.useState(d?(e==null?void 0:e.dockerfile)??"":""),[y,x]=m.useState(""),w=m.useRef(null),[O,k]=m.useState(()=>d?w3t((e==null?void 0:e.dockerfile)??""):u.baseEnvironment==="aio-sandbox"||u.baseEnvironment==="codex-sandbox"?u.baseEnvironment:"none"),[S,E]=m.useState(((it=u.gitSource)==null?void 0:it.repositoryUrl)??""),[C,N]=m.useState(((Ae=u.gitSource)==null?void 0:Ae.ref)??""),[_,j]=m.useState(((Kt=u.gitSource)==null?void 0:Kt.dockerfilePath)??""),[T,L]=m.useState(u.gitSource?{repositoryUrl:u.gitSource.repositoryUrl,ref:u.gitSource.ref??"",commitSha:"",dockerfiles:[u.gitSource.dockerfilePath]}:null),[A,R]=m.useState(u.gitSource?`${u.gitSource.repositoryUrl}\0${u.gitSource.ref??""}`:""),[P,$]=m.useState(u.containerRepository?"existing":"managed"),[M,B]=m.useState(((gn=u.containerRepository)==null?void 0:gn.region)??er(t)),[I,H]=m.useState(u.containerRepository??void 0),[X,Q]=m.useState(((Wt=u.imageSource)==null?void 0:Wt.region)??er(t)),[q,U]=m.useState(u.imageSource?{region:u.imageSource.region,registry:u.imageSource.registry,namespace:u.imageSource.namespace,repository:u.imageSource.repository}:void 0),[te,le]=m.useState(((Ot=u.imageSource)==null?void 0:Ot.reference)??""),[oe,re]=m.useState(!1),he=m.useMemo(()=>wB(f,t),[t,f.baseEnvironment,f.operatingSystem,f.language,f.optionIds]),K=f.dockerfile??he,G=O!=="none",se=O==="aio-sandbox"?xB:O==="codex-sandbox"?mwe[t]:"",de=G?d3t(b):b,ke=G?MA(se,""):"",Te=G?MA(se,de):b,rt=y||(G?f3t(de,se,a):qQ(b,void 0,a)),Be=!!e,Me="environment-editor-form",[Ie,qe]=m.useState(!1),[Pe,Ve]=m.useState(""),Ee=!!Te.trim()&&!rt,Le=`${S.trim()}\0${C.trim()}`,Y=!b8(S,a)&&A===Le&&!!_&&(P==="managed"||Lte(I)),fe=Lte(q)&&!!te.trim()&&!_je(te,a),we=!!f.name.trim()&&!Ie&&(p==="custom"||p==="dockerfile"&&Ee||p==="git"&&Y||p==="image"&&fe),Ke=(at,bt)=>{h(_e=>({..._e,optionIds:bt?[..._e.optionIds,at]:_e.optionIds.filter(st=>st!==at)}))},Je=at=>{x(""),v(G?MA(se,at):at)},Tt=async at=>{if(!at)return;const bt=await h3t(at,a);x(bt.error),bt.content&&v(bt.content)},Ne=()=>{x(""),v(ke)},ve=async at=>{if(at.preventDefault(),!!we){qe(!0),Ve("");try{const bt=Ust(Te);await s({...f,name:f.name.trim(),description:f.description.trim(),optionIds:p==="custom"?f.optionIds:[],selectedSkills:p==="custom"?f.selectedSkills:[],dockerfile:p==="dockerfile"?Te:p==="custom"?K:"",gitSource:p==="git"?{repositoryUrl:S.trim(),...C.trim()?{ref:C.trim()}:{},dockerfilePath:_}:null,containerRepository:p==="git"&&P==="existing"?I:null,imageSource:p==="image"&&q?{...q,reference:te.trim()}:null,...p==="dockerfile"?bt:{}})}catch(bt){Ve(bt instanceof Error?bt.message:String(bt)),qe(!1)}}},He=f.name.trim()||(Be?(e==null?void 0:e.name)||a("environmentCenter.configure"):a("environmentCenter.create"));return o.jsx(Ph,{className:"environment-editor","aria-label":a(Be?"environmentCenter.details":"environmentCenter.create"),children:o.jsx(lE,{title:He,description:a("environmentCenter.editorDescription"),identitySeed:He,backLabel:a("environmentCenter.backToList"),onBack:n,actions:o.jsxs(o.Fragment,{children:[i?o.jsx(Ft,{type:"button",color:"danger",variant:"ghost",size:"sm",onClick:i,disabled:Ie,children:a("common.delete")}):null,r?o.jsx(Ft,{color:"secondary",variant:"soft",size:"sm",onClick:r,disabled:Ie,children:a("environmentCenter.share.action")}):null,o.jsx(Ft,{color:"secondary",variant:"soft",size:"sm",onClick:n,disabled:Ie,children:a("common.cancel")}),o.jsx(Ft,{color:"info",size:"sm",type:"submit",form:Me,disabled:!we,children:a(Ie?"common.saving":p==="image"?Be?"environmentCenter.save":"environmentCenter.create":Be?"environmentCenter.saveAndBuild":"environmentCenter.createAndBuild")})]}),children:o.jsxs("form",{id:Me,className:"environment-form",onSubmit:ve,children:[o.jsxs("div",{className:"environment-fields",children:[o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[a("environmentCenter.name"),o.jsx(Cu,{})]}),o.jsx(Gr,{className:"environment-text-input",type:"text",size:"lg",required:!0,value:f.name,maxLength:60,placeholder:a("environmentCenter.namePlaceholder"),onChange:at=>h(bt=>({...bt,name:at.target.value}))})]}),o.jsxs("label",{className:"environment-field",children:[o.jsx("span",{children:a("common.description")}),o.jsx(Lm,{className:"environment-description-input",size:"lg",rows:3,value:f.description,maxLength:180,placeholder:a("environmentCenter.descriptionPlaceholder"),onChange:at=>h(bt=>({...bt,description:at.target.value}))})]})]}),o.jsxs("label",{className:"environment-field environment-creation-method",children:[o.jsxs("span",{children:[a("environmentCenter.creationMethod"),o.jsx(Cu,{})]}),o.jsx(Bs,{id:"environment-creation-method",value:p,options:c,optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,triggerClassName:"environment-select-trigger",onChange:at=>{const bt=at.value;g(bt),bt==="dockerfile"&&!b.trim()&&v(ke),Ve("")}}),o.jsx("small",{children:(Nt=c.find(at=>at.value===p))==null?void 0:Nt.description})]}),Pe?o.jsx("p",{className:"environment-form-error",role:"alert",children:Pe}):null,p==="custom"?o.jsxs("div",{className:"environment-configuration",children:[o.jsx("section",{className:"environment-section environment-form-section","aria-label":a("environmentCenter.baseConfiguration"),children:o.jsxs("div",{className:"environment-form-grid",children:[o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[a("environmentCenter.baseEnvironment"),o.jsx(Cu,{})]}),o.jsx(Bs,{id:"environment-base-environment",value:f.baseEnvironment,options:x3t.map(at=>({...at,description:a(`environmentCenter.baseDescriptions.${at.value}`)})),optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,triggerClassName:"environment-select-trigger",onChange:at=>{const bt=at.value,_e=bt==="aio-sandbox"||bt==="codex-sandbox";h(st=>({...st,baseEnvironment:bt,operatingSystem:_e?"ubuntu-22.04":st.operatingSystem,language:_e?"python-3.12":st.language}))}}),o.jsx("small",{children:a(`environmentCenter.baseDescriptions.${f.baseEnvironment}`)})]}),o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[a("environmentCenter.operatingSystem"),o.jsx(Cu,{})]}),o.jsx(Bs,{id:"environment-operating-system",value:f.operatingSystem,options:S3t,optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,disabled:f.baseEnvironment!=="ubuntu",triggerClassName:"environment-select-trigger",onChange:at=>h(bt=>({...bt,operatingSystem:at.value}))}),o.jsx("small",{children:f.baseEnvironment!=="ubuntu"?a("environmentCenter.fixedByBase",{base:g6(f.baseEnvironment),value:"Ubuntu 22.04"}):a("environmentCenter.selectUbuntuVersion")})]}),o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[a("environmentCenter.pythonVersion"),o.jsx(Cu,{})]}),o.jsx(Bs,{id:"environment-python-version",value:f.language,options:f.baseEnvironment!=="ubuntu"?Dte.filter(at=>at.value==="python-3.12"):Dte,optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,disabled:f.baseEnvironment!=="ubuntu",triggerClassName:"environment-select-trigger",onChange:at=>h(bt=>({...bt,language:at.value}))}),o.jsx("small",{children:f.baseEnvironment!=="ubuntu"?a("environmentCenter.fixedByBase",{base:g6(f.baseEnvironment),value:"Python 3.12"}):a("environmentCenter.selectPythonVersion")})]})]})}),o.jsxs("section",{className:"environment-section","aria-labelledby":"environment-skills-title",children:[o.jsx("h2",{id:"environment-skills-title",children:a("environmentCenter.skills")}),o.jsxs("div",{className:"environment-skill-grid",children:[o.jsx(Pte,{name:"VeADK",description:a("environmentCenter.veadkDescription"),selected:oe,disabled:Ie,onChange:re,icon:o.jsx("img",{src:yR,alt:""})}),o.jsx(HQ,{selected:f.selectedSkills,onChange:at=>h(bt=>({...bt,selectedSkills:at})),cloudProvider:t,disabled:Ie,addLabel:a("environmentCenter.addSkill"),showSelectedCount:!1})]})]}),OB.map(at=>o.jsxs("section",{className:"environment-section","aria-labelledby":`environment-${at.id}-title`,children:[o.jsx("h2",{id:`environment-${at.id}-title`,children:a(`environmentCenter.categories.${at.id}`)}),o.jsx("div",{className:"environment-option-grid",children:at.options.map(bt=>{const _e=f.optionIds.includes(bt.id);return o.jsx(Pte,{name:bt.label,description:a(`environmentCenter.options.${bt.id}`,{defaultValue:bt.description}),selected:_e,onChange:st=>Ke(bt.id,st),icon:o.jsx(R3t,{option:bt})},bt.id)})})]},at.id))]}):p==="dockerfile"?o.jsxs("section",{className:"environment-upload","aria-label":a("environmentCenter.customDockerfile"),children:[o.jsx("div",{className:"environment-dockerfile-settings environment-form-grid",children:o.jsxs("label",{className:"environment-field",children:[o.jsx("span",{children:a("environmentCenter.presetEnvironment")}),o.jsx(Bs,{id:"environment-dockerfile-base-environment",value:O,options:O3t(a),optionClassName:"environment-select-option",size:"lg",block:!0,pill:!1,triggerClassName:"environment-select-trigger",onChange:at=>{x(""),k(at.value)}}),o.jsx("small",{children:a("environmentCenter.presetHint")})]})}),o.jsxs("div",{className:"environment-upload__preview",children:[o.jsxs("div",{children:[o.jsxs("h3",{children:["Dockerfile",o.jsx(Cu,{})]}),o.jsxs("div",{className:"environment-upload__actions",children:[o.jsx("span",{className:"environment-upload__size",children:a("environmentCenter.dockerfileSize",{size:kje(Te).toLocaleString(l.resolvedLanguage??l.language),max:131072 .toLocaleString(l.resolvedLanguage??l.language)})}),o.jsx("input",{ref:w,className:"environment-upload__file-input",type:"file",accept:".dockerfile,text/plain",tabIndex:-1,hidden:!0,onChange:at=>{var _e;const bt=at.currentTarget;Tt((_e=bt.files)==null?void 0:_e[0]).finally(()=>{bt.value=""})}}),o.jsx(Ft,{className:"environment-upload__action",type:"button",color:"secondary",variant:"soft",size:"sm",pill:!1,disabled:Ie,onClick:()=>{var at;return(at=w.current)==null?void 0:at.click()},children:a("environmentCenter.upload")}),o.jsx(Ft,{className:"environment-upload__action",type:"button",color:"secondary",variant:"ghost",size:"sm",pill:!1,disabled:Ie||!de,onClick:Ne,children:a("environmentCenter.reset")})]})]}),o.jsxs("div",{className:`environment-dockerfile-editor${G?" has-fixed-base":""}${rt?" is-invalid":""}`,children:[G?o.jsxs("div",{className:"environment-dockerfile-from","aria-label":a("environmentCenter.dockerfileBaseImage"),children:[o.jsx("span",{className:"environment-dockerfile-from__line","aria-hidden":"true",children:"1"}),o.jsxs("code",{children:[o.jsx("span",{className:"environment-dockerfile-from__keyword",children:"FROM"}),o.jsx("span",{title:se,children:se})]})]}):null,o.jsx("div",{className:"environment-dockerfile__editor environment-upload__editor","aria-label":a("environmentCenter.dockerfileContent"),children:o.jsx(UE,{value:de,path:"Dockerfile",lineNumberStart:G?2:1,height:"auto",minHeight:"28px",maxHeight:"var(--environment-dockerfile-editor-max-height)",onChange:Je})})]})]}),rt?o.jsx("p",{className:"environment-upload__error environment-upload__error--below",role:"alert",children:rt}):null]}):p==="git"?o.jsxs("div",{className:"environment-source-workflow",children:[o.jsx(F3t,{repositoryUrl:S,gitRef:C,dockerfilePath:_,inspection:T,inspectedKey:A,disabled:Ie,onRepositoryUrlChange:E,onGitRefChange:N,onDockerfilePathChange:j,onInspectionChange:L,onInspectedKeyChange:R}),o.jsx(B3t,{cloudProvider:t,mode:P,region:M,value:I,disabled:Ie,onModeChange:at=>{$(at),Ve("")},onRegionChange:at=>{B(at),H(void 0),Ve("")},onChange:H})]}):o.jsx(U3t,{cloudProvider:t,region:X,repository:q,reference:te,disabled:Ie,onRegionChange:at=>{Q(at),U(void 0),Ve("")},onRepositoryChange:U,onReferenceChange:le})]})})})}function Ije({cloudProvider:e="volcengine",onWorkspace:t,clipboardImport:n=null,clipboardReadError:i=""}){const{t:r,i18n:s}=Oe("ui"),[a,l]=m.useState([]),[c,u]=m.useState({kind:"list"}),[d,f]=m.useState(""),[h,p]=m.useState(null),[g,b]=m.useState(null),[v,y]=m.useState(null),[x,w]=m.useState(null),[O,k]=m.useState(null),S=m.useRef(0),[E,C]=m.useState(""),[N,_]=m.useState(!1),[j,T]=m.useState(i),[L,A]=m.useState(!0),[R,P]=m.useState(""),[$,M]=m.useState(0),[B,I]=m.useState(()=>new Set),H=m.useDeferredValue(d),X=m.useMemo(()=>{const K=H.trim().toLocaleLowerCase();return K?a.filter(G=>`${G.name} ${G.description} ${m6(G.operatingSystem)} ${ph(G.language)} ${g6(G.baseEnvironment)}`.toLocaleLowerCase().includes(K)):a},[H,a]),Q=m.useCallback((K="",G=!1)=>{S.current+=1,k({key:S.current,initialValue:K,autoInspect:G})},[]),q=m.useCallback((K,G=!1)=>{const se=K.trim();if(!se.startsWith("akenv://")||!G&&Mte.has(se))return!1;const de=HF(se);return!de.length||de.length>g8?!1:(Mte.add(se),T(""),Q(se,!0),!0)},[Q]),U=m.useCallback(async()=>{var K;if(!(c.kind!=="list"||O)){if(typeof navigator>"u"||!((K=navigator.clipboard)!=null&&K.readText)){T(r("environmentCenter.clipboardUnsupported"));return}try{const G=await navigator.clipboard.readText();!q(G)&&!G.trim()&&await E3t()&&T(r("environmentCenter.clipboardReadError"))}catch{T(r("environmentCenter.clipboardReadError"))}}},[O,q,r,c.kind]);m.useEffect(()=>{const K=new AbortController;return a.length===0&&A(!0),P(""),Qk(K.signal).then(G=>{l(G)}).catch(G=>{(G==null?void 0:G.name)!=="AbortError"&&P(G instanceof Error?G.message:String(G))}).finally(()=>{K.signal.aborted||A(!1)}),()=>K.abort()},[$]),m.useEffect(()=>{if(!a.some(G=>G.latestVersion&&Hg.has(G.latestVersion.status)))return;const K=window.setTimeout(()=>M(G=>G+1),2500);return()=>window.clearTimeout(K)},[a]),m.useEffect(()=>{if(!E||N)return;const K=window.setTimeout(()=>C(""),2800);return()=>window.clearTimeout(K)},[N,E]),m.useEffect(()=>{i&&T(i)},[i]),m.useEffect(()=>{n&&q(n.text)},[n,q]),m.useEffect(()=>{if(c.kind!=="list")return;const K=()=>void U(),G=()=>{document.visibilityState==="visible"&&U()},se=de=>{var rt;const ke=de.target;if(ke instanceof HTMLInputElement||ke instanceof HTMLTextAreaElement||ke instanceof HTMLElement&&ke.isContentEditable)return;const Te=((rt=de.clipboardData)==null?void 0:rt.getData("text/plain"))??"";q(Te,!0)&&de.preventDefault()};return window.addEventListener("focus",K),document.addEventListener("visibilitychange",G),window.addEventListener("paste",se),()=>{window.removeEventListener("focus",K),document.removeEventListener("visibilitychange",G),window.removeEventListener("paste",se)}},[q,U,c.kind]);const te=c.kind==="editor"&&c.environmentId?a.find(K=>K.id===c.environmentId):void 0,le=async K=>{const G={...K,dockerfile:K.dockerfile??wB(K,e)},se=te?await w0e(te.id,G):await O0e(G);if(l(de=>[se,...de.filter(ke=>ke.id!==se.id)]),u({kind:"list"}),_(!1),G.imageSource){C(r("environmentCenter.status.boundImage",{name:se.name}));return}try{const de=await b4(se.id);l(ke=>ke.map(Te=>Te.id===se.id?{...Te,latestVersion:de}:Te)),C(r("environmentCenter.status.queued",{name:se.name}))}catch(de){_(!0),C(r("environmentCenter.status.savedBuildFailed",{error:de instanceof Error?de.message:String(de)}))}},oe=async K=>{if(!B.has(K.id)){I(G=>new Set(G).add(K.id)),_(!1);try{const G=await b4(K.id);l(se=>se.map(de=>de.id===K.id?{...de,latestVersion:G}:de)),C(r("environmentCenter.status.queued",{name:K.name}))}catch(G){_(!0),C(G instanceof Error?G.message:String(G))}finally{I(G=>{const se=new Set(G);return se.delete(K.id),se})}}},re=(K,G,se,de)=>{K.length&&l(ke=>{const Te=new Set(K.map(rt=>rt.id));return[...K,...ke.filter(rt=>!Te.has(rt.id))]}),_(de>0),C(de>0?r("environmentCenter.status.importedFailed",{created:G,failed:de}):se>0?r("environmentCenter.status.importedDuplicate",{created:G,duplicate:se}):r("environmentCenter.status.imported",{count:G}))},he=h?o.jsx(fc,{title:r("environmentCenter.deleteTitle"),description:r("environmentCenter.deleteDescription",{name:h.name}),confirmLabel:r("common.delete"),variant:"danger",onCancel:()=>p(null),onConfirm:()=>{const K=h;p(null),u({kind:"list"}),S0e(K.id).then(()=>{l(G=>G.filter(se=>se.id!==K.id)),_(!1),C(r("environmentCenter.status.deleted",{name:K.name}))}).catch(G=>{_(!0),C(G instanceof Error?G.message:String(G))})}}):null;return c.kind==="editor"?o.jsxs(o.Fragment,{children:[o.jsx(V3t,{environment:te,cloudProvider:e,onCancel:()=>u({kind:"list"}),onDelete:te?()=>p(te):void 0,onShare:te?()=>w(te):void 0,onSave:le},c.environmentId??"new"),x?o.jsx(Q3t,{environment:x,onClose:()=>w(null)}):null,he]}):o.jsxs(Ph,{className:"environment-center","aria-label":r("environmentCenter.title"),children:[o.jsx(zx,{title:r("environmentCenter.title")}),o.jsxs(Yb,{className:"environment-toolbar",children:[t?o.jsx(cE,{items:[{id:"workspaces",label:r("workspace.title")},{id:"environments",label:r("environmentCenter.title")}],value:"environments",onChange:K=>{K==="workspaces"&&t()},ariaLabel:r("workspace.resourceType"),idPrefix:"environment-center"}):null,o.jsxs("div",{className:"resource-toolbar__actions",children:[E?o.jsx("span",{className:`environment-status${N?" is-error":""}`,role:N?"alert":"status","aria-live":"polite",children:E}):null,o.jsx(Cm,{"aria-label":r("environmentCenter.search"),value:d,onChange:K=>f(K.target.value),placeholder:r("environmentCenter.search")})]})]}),j?o.jsxs("div",{className:"environment-clipboard-notice",role:"alert",children:[o.jsx("span",{children:j}),o.jsx(Ft,{type:"button",color:"secondary",variant:"soft",size:"sm",onClick:()=>{T(""),Q()},children:r("environmentCenter.manualImport")})]}):null,o.jsx(Zb,{"aria-live":"polite",children:L?o.jsx(qd,{}):R?o.jsxs("div",{className:"environment-load-error",role:"alert",children:[o.jsx("p",{children:Md(R,s.resolvedLanguage||s.language)||r("environmentCenter.loadFailed")}),o.jsx(Ft,{color:"secondary",variant:"soft",size:"sm",onClick:()=>M(K=>K+1),children:r("common.reload")})]}):X.length===0&&d.trim()?o.jsx("div",{className:"environment-empty",children:o.jsxs(Sn,{fill:"none",children:[o.jsx(Sn.Icon,{children:o.jsx(N3t,{})}),o.jsx(Sn.Title,{children:r("environmentCenter.noMatches")}),o.jsx(Sn.Description,{children:r("environmentCenter.tryAnotherName")})]})}):o.jsxs(Vx,{children:[d.trim()?null:o.jsxs(o.Fragment,{children:[o.jsx(Eb,{"aria-label":r("environmentCenter.create"),icon:o.jsx(T3t,{}),onClick:()=>u({kind:"editor",environmentId:null}),children:r("environmentCenter.create")}),o.jsx(Eb,{"aria-label":r("environmentCenter.import.title"),icon:o.jsx(A3t,{}),onClick:()=>Q(),children:r("environmentCenter.import.title")})]}),X.map(K=>{var ke,Te;const G=Nje(K,r),se=!!(K.latestVersion&&Hg.has(K.latestVersion.status)),de=B.has(K.id);return o.jsx(fE,{className:"environment-card",title:K.name,status:o.jsx(ga,{color:G.color,size:"sm",children:G.label}),description:((ke=K.latestVersion)==null?void 0:ke.error)||(se?(Te=K.latestVersion)==null?void 0:Te.currentStep:"")||K.description||r("common.noDescription"),metadata:[{label:r("workspace.updated"),value:P3t(K.updatedAt,s.resolvedLanguage??s.language),title:D3t(K.updatedAt,s.resolvedLanguage??s.language)}],action:{label:K.latestVersion?r("environmentCenter.buildDetails.title"):r(de?"environmentCenter.buildDetails.starting":"environmentCenter.startBuild"),icon:"play",title:r("environmentCenter.build"),disabled:de,onClick:()=>K.latestVersion?b(K.id):void oe(K)},auxiliaryAction:{label:r("environmentCenter.manifest.view"),icon:o.jsx(_Fe,{}),title:K.latestVersion?r("environmentCenter.manifest.viewShort"):r("environmentCenter.manifest.unavailable"),disabled:!K.latestVersion,onClick:()=>y(K)},detailAction:{label:r("environmentCenter.configure"),onClick:()=>u({kind:"editor",environmentId:K.id})}},K.id)})]})}),g?(()=>{const K=a.find(G=>G.id===g);return K?o.jsx($3t,{environment:K,onClose:()=>b(null),onBuildUpdate:G=>{l(se=>se.map(de=>de.id===K.id?{...de,latestVersion:G}:de))},onRebuild:()=>oe(K)}):null})():null,v!=null&&v.latestVersion?o.jsx(L3t,{environment:v,onClose:()=>y(null)}):null,he,O?o.jsx(z3t,{initialValue:O.initialValue,autoInspect:O.autoInspect,onClose:()=>k(null),onImported:re},O.key):null]})}function H3t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"M8 3.25v9.5M3.25 8h9.5"})})}function q3t(e){return o.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"4.5",y:"7",width:"23",height:"18",rx:"3"}),o.jsx("path",{d:"M10 7V5.5A1.5 1.5 0 0 1 11.5 4h4A1.5 1.5 0 0 1 17 5.5V7M9 13h5v5H9zM18 13h5M18 17h5M9 22h14"})]})}function y8(e,t){const n=Date.parse(e);return Number.isNaN(n)?e:new Intl.DateTimeFormat(t,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(n)}function W3t(e,t){return e.environmentIds.reduce((n,i)=>{var r,s;return((s=(r=t.get(i))==null?void 0:r.latestVersion)==null?void 0:s.status)==="available"?n+1:n},0)}function K3t({workspace:e,environments:t,onBack:n,onSave:i,onDelete:r}){const{t:s,i18n:a}=Oe("ui"),[l,c]=m.useState((e==null?void 0:e.name)??""),[u,d]=m.useState((e==null?void 0:e.description)??""),[f,h]=m.useState((e==null?void 0:e.environmentIds)??[]),[p,g]=m.useState(""),[b,v]=m.useState(!1),[y,x]=m.useState(""),w=p.trim().toLocaleLowerCase(),O=t.filter(S=>`${S.name} ${S.description} ${ph(S.language)}`.toLocaleLowerCase().includes(w)),k=async S=>{if(S.preventDefault(),!(!l.trim()||b)){v(!0),x("");try{await i({name:l.trim(),description:u.trim(),environmentIds:f})}catch(E){x(E instanceof Error?E.message:String(E)),v(!1)}}};return o.jsx(Ph,{className:"workspace-center","aria-label":s(e?"workspace.detail":"workspace.create"),children:o.jsxs(lE,{title:e?e.name:s("workspace.create"),description:s("workspace.editorDescription"),identitySeed:(e==null?void 0:e.name)||s("workspace.create"),backLabel:s("workspace.backToList"),onBack:n,actions:o.jsxs(o.Fragment,{children:[r?o.jsx("button",{type:"button",className:"is-danger",onClick:r,children:s("common.delete")}):null,o.jsx("button",{type:"submit",form:"workspace-form",disabled:b||!l.trim(),children:s(b?"common.saving":"common.save")})]}),children:[e?o.jsxs(kB,{children:[o.jsxs("div",{children:[o.jsx("dt",{children:s("common.environment")}),o.jsx("dd",{children:s("workspace.environmentCount",{count:f.length})})]}),o.jsxs("div",{children:[o.jsx("dt",{children:s("workspace.createdAt")}),o.jsx("dd",{children:y8(e.createdAt,a.resolvedLanguage??a.language)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:s("workspace.updatedAt")}),o.jsx("dd",{children:y8(e.updatedAt,a.resolvedLanguage??a.language)})]})]}):null,o.jsxs("form",{id:"workspace-form",className:"workspace-form",onSubmit:k,children:[o.jsxs("section",{className:"workspace-fields","aria-label":s("workspace.basicInfo"),children:[o.jsxs("label",{children:[o.jsx("span",{children:s("common.name")}),o.jsx(Gr,{value:l,maxLength:128,autoFocus:!0,onChange:S=>c(S.target.value),placeholder:s("workspace.namePlaceholder")})]}),o.jsxs("label",{children:[o.jsx("span",{children:s("common.description")}),o.jsx(Lm,{value:u,maxLength:2e3,onChange:S=>d(S.target.value),placeholder:s("workspace.descriptionPlaceholder")})]})]}),o.jsxs("section",{className:"workspace-environments",children:[o.jsx(Iwe,{title:s("common.environment"),description:s("workspace.selectedEnvironmentCount",{count:f.length}),actions:o.jsx(Cm,{"aria-label":s("workspace.searchAvailableEnvironments"),value:p,onChange:S=>g(S.target.value),placeholder:s("workspace.searchEnvironments")})}),t.length===0?o.jsxs("div",{className:"workspace-environment-empty",children:[o.jsx("p",{children:s("workspace.noAvailableEnvironments")}),o.jsx("span",{children:s("workspace.createEnvironmentFirst")})]}):O.length===0?o.jsxs("div",{className:"workspace-environment-empty",children:[o.jsx("p",{children:s("workspace.noMatchingEnvironments")}),o.jsx("span",{children:s("workspace.tryAnotherName")})]}):o.jsx("div",{className:"workspace-environment-list",children:O.map(S=>{var N;const E=f.includes(S.id),C=((N=S.latestVersion)==null?void 0:N.status)==="available"?s("workspace.environmentStatus.available"):S.latestVersion?s("workspace.environmentStatus.building"):s("workspace.environmentStatus.notBuilt");return o.jsxs("label",{className:`workspace-environment-option${E?" is-selected":""}`,children:[o.jsx("input",{type:"checkbox",checked:E,onChange:()=>h(_=>E?_.filter(j=>j!==S.id):[..._,S.id])}),o.jsxs("span",{className:"workspace-environment-option__copy",children:[o.jsx("strong",{title:S.name,children:S.name}),o.jsxs("span",{children:[ph(S.language)," · ",C]})]}),o.jsx("span",{className:"workspace-environment-option__action",children:s(E?"workspace.added":"common.add")})]},S.id)})})]}),y?o.jsx("p",{className:"workspace-form-error",role:"alert",children:y}):null]})]})})}function G3t({onEnvironment:e}){const{t,i18n:n}=Oe("ui"),[i,r]=m.useState([]),[s,a]=m.useState([]),[l,c]=m.useState({kind:"list"}),[u,d]=m.useState(""),[f,h]=m.useState(!0),[p,g]=m.useState(""),[b,v]=m.useState(""),[y,x]=m.useState(!1),[w,O]=m.useState(null),[k,S]=m.useState(0),E=m.useDeferredValue(u);m.useEffect(()=>{const j=new AbortController;return h(!0),g(""),Promise.all([KF(j.signal),Qk(j.signal)]).then(([T,L])=>{r(T),a(L)}).catch(T=>{(T==null?void 0:T.name)!=="AbortError"&&(console.warn("Unable to load Studio workspaces",T),g(t("workspace.loadFailed")))}).finally(()=>{j.signal.aborted||h(!1)}),()=>j.abort()},[k,t]),m.useEffect(()=>{if(!b||y)return;const j=window.setTimeout(()=>v(""),2800);return()=>window.clearTimeout(j)},[y,b]);const C=m.useMemo(()=>new Map(s.map(j=>[j.id,j])),[s]),N=m.useMemo(()=>{const j=E.trim().toLocaleLowerCase();return j?i.filter(T=>{const L=T.environmentIds.map(A=>{var R;return((R=C.get(A))==null?void 0:R.name)??""}).join(" ");return`${T.name} ${T.description} ${L}`.toLocaleLowerCase().includes(j)}):i},[E,C,i]),_=l.kind==="detail"&&l.workspaceId?i.find(j=>j.id===l.workspaceId):void 0;return l.kind==="detail"?o.jsx(K3t,{workspace:_,environments:s,onBack:()=>c({kind:"list"}),onDelete:_?()=>O(_):null,onSave:async j=>{const T=_?await p0e(_.id,j):await h0e(j);r(L=>[T,...L.filter(A=>A.id!==T.id)]),x(!1),v(t("workspace.saved",{name:T.name})),c({kind:"list"})}},l.workspaceId??"new"):o.jsxs(Ph,{className:"workspace-center","aria-label":t("workspace.title"),children:[o.jsx(zx,{title:t("workspace.title")}),o.jsxs(Yb,{children:[o.jsx(cE,{items:[{id:"workspaces",label:t("workspace.title")},{id:"environments",label:t("common.environment")}],value:"workspaces",onChange:j=>{j==="environments"&&e()},ariaLabel:t("workspace.resourceType"),idPrefix:"workspace-center"}),o.jsxs("div",{className:"resource-toolbar__actions",children:[b?o.jsx("span",{className:`workspace-status${y?" is-error":""}`,role:y?"alert":"status","aria-live":"polite",children:b}):null,o.jsx(Cm,{"aria-label":t("workspace.searchWorkspaces"),value:u,onChange:j=>d(j.target.value),placeholder:t("workspace.searchWorkspaces")})]})]}),o.jsx(Zb,{"aria-live":"polite",children:f?o.jsx(qd,{}):p?o.jsxs("div",{className:"workspace-load-error",role:"alert",children:[o.jsx("p",{children:p}),o.jsx(Ft,{color:"secondary",variant:"soft",size:"sm",onClick:()=>S(j=>j+1),children:t("common.reload")})]}):N.length===0&&u.trim()?o.jsx("div",{className:"workspace-empty",children:o.jsxs(Sn,{fill:"none",children:[o.jsx(Sn.Icon,{children:o.jsx(q3t,{})}),o.jsx(Sn.Title,{children:t("workspace.noMatchingWorkspaces")}),o.jsx(Sn.Description,{children:t("workspace.tryAnotherNameOrEnvironment")})]})}):o.jsxs(Vx,{children:[u.trim()?null:o.jsx(Eb,{"aria-label":t("workspace.create"),icon:o.jsx(H3t,{}),onClick:()=>c({kind:"detail",workspaceId:null}),children:t("workspace.create")}),N.map(j=>{const T=W3t(j,C),L=j.environmentIds.filter(A=>!C.has(A)).length;return o.jsx(fE,{className:"workspace-card",title:j.name,status:o.jsx(ga,{color:L?"danger":T===j.environmentIds.length&&T>0?"success":"secondary",size:"sm",children:j.environmentIds.length===0?t("workspace.noEnvironmentAdded"):L?t("workspace.environmentMissing"):t("workspace.availableFraction",{available:T,total:j.environmentIds.length})}),description:j.description||t("common.noDescription"),metadata:[{label:t("common.environment"),value:t("workspace.environmentCount",{count:j.environmentIds.length})},{label:t("workspace.available"),value:t("workspace.availableCount",{count:T})},{label:t("workspace.updated"),value:y8(j.updatedAt,n.resolvedLanguage??n.language)}],detailAction:{label:t("common.manage"),onClick:()=>c({kind:"detail",workspaceId:j.id})},action:{label:t("workspace.addEnvironment"),icon:"plus",onClick:()=>c({kind:"detail",workspaceId:j.id})}},j.id)})]})}),w?o.jsx(fc,{title:t("workspace.deleteTitle"),description:t("workspace.deleteDescription",{name:w.name}),confirmLabel:t("common.delete"),variant:"danger",onCancel:()=>O(null),onConfirm:()=>{const j=w;O(null),m0e(j.id).then(()=>{r(T=>T.filter(L=>L.id!==j.id)),x(!1),v(t("workspace.deleted",{name:j.name})),c({kind:"list"})}).catch(T=>{x(!0),v(T instanceof Error?T.message:String(T))})}}):null]})}function X3t({cloudProvider:e}){const{t}=Oe("ui"),[n,i]=m.useState("workspaces"),[r,s]=m.useState(null),[a,l]=m.useState(""),c=m.useRef(0),u=()=>{var h;c.current+=1;const d=c.current;l("");let f=null;if(typeof navigator<"u"&&((h=navigator.clipboard)!=null&&h.readText))try{f=navigator.clipboard.readText()}catch{l(t("workspace.clipboardPermissionError"))}else l(t("workspace.clipboardUnsupported"));i("environments"),f&&f.then(async p=>{var g;if(c.current===d){if(p.trim()){s({key:d,text:p});return}try{const b=await((g=navigator.permissions)==null?void 0:g.query({name:"clipboard-read"}));c.current===d&&(b==null?void 0:b.state)==="denied"&&l(t("workspace.clipboardPermissionError"))}catch{}}}).catch(()=>{c.current===d&&l(t("workspace.clipboardPermissionError"))})};return n==="environments"?o.jsx(Ije,{cloudProvider:e,onWorkspace:()=>i("workspaces"),clipboardImport:r,clipboardReadError:a}):o.jsx(G3t,{onEnvironment:u})}function Y3t(e){return e==="127.0.0.1"}const Z3t={id:"coding-agents",kind:"coding-agent",category:"development",icon:"coding-agents",name:"Configure coding agents",badge:"Local",badgeTone:"success",description:"Install built-in VeADK and AgentKit skills globally for Trae, Claude Code, or Codex."},J3t={id:"feishu",kind:"feishu",category:"channels",icon:"feishu",name:"Feishu bot",badge:"Beta",description:"Create a Feishu bot and connect its messages directly to AgentKit Runtime."},e4t="https://api.github.com",t4t=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/,Fte=/^[A-Za-z0-9][A-Za-z0-9._/-]{0,199}$/,n4t=/^[A-Za-z0-9._/-]+$/;function i4t(e,t,n){return e===401||e===403?V("github.invalidToken"):e===404?V("github.notFound"):e===422?V("github.rejectedCommit"):String((t==null?void 0:t.message)||"").split(n).join("***").trim().slice(0,240)||V("github.requestFailed",{status:e})}async function hg(e,t){const n={Accept:"application/vnd.github+json",Authorization:`Bearer ${t.token}`,"X-GitHub-Api-Version":"2022-11-28"};t.body&&(n["Content-Type"]="application/json");let i;try{i=await fetch(`${e4t}${e}`,{method:t.method||"GET",headers:n,body:t.body?JSON.stringify(t.body):void 0,signal:t.signal})}catch(s){throw t.signal.aborted?s:new Error(V("github.networkFailed"))}const r=await i.json().catch(()=>null);if(!t.expected.includes(i.status))throw new Error(i4t(i.status,r,t.token));return{status:i.status,payload:r}}function sL(e){return e.split("/").map(encodeURIComponent).join("/")}function r4t(e){const t=new TextEncoder().encode(e);let n="";const i=32768;for(let r=0;r({...h,path:WQ(h.path,"")})),s=AbortSignal.any([t,AbortSignal.timeout(6e4)]),a=`/repos/${n}`;await hg(`${a}`,{token:e.token,expected:[200],signal:s});const c=(f=(await hg(`${a}/git/ref/heads/${sL(i)}`,{token:e.token,expected:[200],signal:s})).payload.object)==null?void 0:f.sha;if(!c)throw new Error(V("github.missingBaseSha"));const u=s4t(e.branchPrefix);await hg(`${a}/git/refs`,{token:e.token,expected:[201],signal:s,method:"POST",body:{ref:`refs/heads/${u}`,sha:c}});let d=!0;try{for(const p of r){const g=sL(p.path),b=await hg(`${a}/contents/${g}?ref=${encodeURIComponent(i)}`,{token:e.token,expected:[200,404],signal:s});if(p.mustBeNew&&b.status===200)throw new Error(V("github.fileAlreadyExists",{path:p.path}));if(b.status===200&&!b.payload.sha)throw new Error(V("github.pathNotUpdatable",{path:p.path}));await hg(`${a}/contents/${g}`,{token:e.token,expected:[200,201],signal:s,method:"PUT",body:{message:p.commitMessage,content:r4t(p.content),branch:u,...b.payload.sha?{sha:b.payload.sha}:{}}})}const h=await hg(`${a}/pulls`,{token:e.token,expected:[201],signal:s,method:"POST",body:{title:e.title,head:u,base:i,body:e.description}});if(!h.payload.number||!h.payload.html_url)throw new Error(V("github.invalidPullRequest"));return d=!1,{number:h.payload.number,url:h.payload.html_url,branch:u}}finally{d&&await hg(`${a}/git/refs/heads/${sL(u)}`,{token:e.token,expected:[204],signal:AbortSignal.timeout(15e3),method:"DELETE"}).catch(()=>{})}}Zt.hasResourceBundle("en-US","automations")||Zt.addResourceBundle("en-US","automations",Lre,!0,!0);Zt.hasResourceBundle("zh-CN","automations")||Zt.addResourceBundle("zh-CN","automations",ece,!0,!0);function eo(e,t={}){return Zt.t(e,{...t,ns:"automations"})}const GQ={name:"repository",label:"GitHub Repo",placeholder:"owner/repository",help:"Enter owner/repository or a full github.com URL",required:!0},XQ={name:"baseBranch",label:"Target branch",placeholder:"main",help:"Defaults to main; the pull request will use this branch as its base",required:!1},Dje={name:"runtimeName",label:"Runtime name",placeholder:"support-agent",help:"Used by the AgentKit delivery configuration",required:!0},Mje={name:"runtimeId",label:"Runtime ID",placeholder:"rt-xxxxxxxx",help:"The AgentKit Runtime that will receive continuous updates",required:!0},a4t="https://ark.cn-beijing.volces.com/api/coding/v3";function o4t(e){return e==="byteplus"?vl(e):a4t}function MI(e){return e==="byteplus"?{accessKey:"BYTEPLUS_ACCESS_KEY",secretKey:"BYTEPLUS_SECRET_KEY",sessionToken:"BYTEPLUS_SESSION_TOKEN"}:{accessKey:"VOLCENGINE_ACCESS_KEY",secretKey:"VOLCENGINE_SECRET_KEY",sessionToken:"VOLCENGINE_SESSION_TOKEN"}}function YQ(e){const t=MI(e);return[eo("github.secretPair",{accessKey:t.accessKey,secretKey:t.secretKey}),eo("github.sessionToken",{sessionToken:t.sessionToken})]}function ZQ(e){return e==="byteplus"?"BytePlus":"Volcengine"}function JQ(e,t={}){return{repository:"",baseBranch:"main",projectPath:".",runtimeName:"",runtimeId:"",sandboxToolId:"",modelName:"",modelBaseUrl:o4t(e),region:er(e),token:"",...t}}function ez(e){return{repository:e.repository.trim(),baseBranch:e.baseBranch.trim()||"main",region:e.region,token:e.token.trim()}}const l4t=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/,c4t=/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/;function u4t(e){if(!l4t.test(e.sandboxToolId))throw new Error(eo("github.validation.sandboxToolId"));if(!c4t.test(e.modelName))throw new Error(eo("github.validation.modelName"));let t;try{t=new URL(e.modelBaseUrl)}catch{throw new Error(eo("github.validation.modelBaseUrlSafe"))}if(t.protocol!=="https:"||!t.hostname||t.username||t.password||t.search||t.hash)throw new Error(eo("github.validation.modelBaseUrlSafe"))}function d4t(e){u4t(e);const t=e.cloudProvider??"volcengine",n=MI(t),i=t==="byteplus"?` +`).replace(/^\n+/,"")}function IA(e,t){const n=`FROM ${e.trim()}`,i=II(t).replace(/^\n+/,"");return i?`${n} +${i}`:n}function m3t(e,t,n){return t.trim()?/^\s*FROM(?:\s|$)/im.test(e)?pv("duplicateFrom",n):HQ(IA(t,e),void 0,n):pv("baseImageRequired",n)}function HQ(e,t=Eje(e),n){return t>kje?pv("tooLarge",n):e.trim()?/^\s*FROM\s+\S+/im.test(e)?"":pv("missingFrom",n):pv("empty",n)}async function g3t(e,t){if(e.size>kje)return{content:"",error:pv("tooLarge",t)};const n=II(await e.text());return{content:n,error:HQ(n,e.size,t)}}function b3t(e){return jU(e,{lineWidth:0})}function y3t(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"m7 9.5 5 5 5-5"})})}function v3t(e){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"m6.5 12.5 3.5 3.5 7.5-8"})})}function FE({ariaLabel:e,value:t,valueLabel:n,placeholder:i,options:r,disabled:s=!1,searchValue:a,searchPlaceholder:l,loading:c=!1,hasMore:u=!1,emptyMessage:d,onSearchChange:f,onLoadMore:h,onChange:p}){const{t:g}=xe("ui"),b=l??g("deploymentSelect.searchPlaceholder"),v=d??g("deploymentSelect.emptyMessage"),y=m.useId(),x=m.useRef(null),w=m.useRef(null),O=m.useRef(null),k=m.useRef(null),S=m.useRef([]),[E,C]=m.useState(!1),[N,_]=m.useState(0),j=r.find(M=>M.value===t),T=(j==null?void 0:j.label)??(t?n:void 0),L=a!==void 0&&!!f,A=()=>{C(!1),L&&a&&(f==null||f(""))};m.useEffect(()=>{if(!E)return;const M=B=>{B.target instanceof Node&&x.current&&!x.current.contains(B.target)&&A()};return window.addEventListener("pointerdown",M),()=>window.removeEventListener("pointerdown",M)},[E,f,a,L]),m.useEffect(()=>{var M,B;if(E){if(L){(M=O.current)==null||M.focus();return}(B=S.current[N])==null||B.focus()}},[E,L]),m.useEffect(()=>{var M;!E||L&&document.activeElement===O.current||(M=S.current[N])==null||M.focus()},[N,E,L]),m.useEffect(()=>{_(M=>Math.min(M,Math.max(0,r.length-1)))},[r.length]),m.useEffect(()=>{if(!E||!u||c||!h)return;const M=window.requestAnimationFrame(()=>{const B=k.current;B&&B.scrollHeight<=B.clientHeight+1&&h()});return()=>window.cancelAnimationFrame(M)},[u,c,h,E,r.length]);const R=(M=1)=>{const B=r.findIndex(H=>H.value===t),I=B>=0?B:M===1?0:Math.max(0,r.length-1);_(I),C(!0)},P=M=>{r.length!==0&&_((M+r.length)%r.length)},$=M=>{var B;p(M.value),A(),(B=w.current)==null||B.focus()};return o.jsxs("div",{className:"pp-deployment-select",ref:x,onKeyDown:M=>{var I,H;const B=M.target===O.current;if(M.key==="Escape"&&E){M.preventDefault(),A(),(I=w.current)==null||I.focus();return}if(M.key==="Tab"){A();return}if(B){M.key==="ArrowDown"&&r.length>0&&(M.preventDefault(),_(0),(H=S.current[0])==null||H.focus());return}M.key==="ArrowDown"?(M.preventDefault(),E?P(N+1):R(1)):M.key==="ArrowUp"?(M.preventDefault(),E?P(N-1):R(-1)):E&&M.key==="Home"?(M.preventDefault(),_(0)):E&&M.key==="End"&&(M.preventDefault(),_(Math.max(0,r.length-1)))},children:[o.jsxs("button",{ref:w,type:"button",className:"pp-deployment-select-trigger","aria-label":e,"aria-haspopup":"listbox","aria-expanded":E,"aria-controls":E?y:void 0,disabled:s,onClick:()=>{E?A():R()},children:[o.jsx("span",{className:T?void 0:"is-placeholder",children:T??i}),o.jsx(y3t,{className:`pp-deployment-select-chevron${E?" is-open":""}`})]}),E&&o.jsxs("div",{className:"pp-deployment-select-menu",children:[L&&o.jsx("div",{className:"pp-deployment-select-search",children:o.jsx("input",{ref:O,type:"search",value:a,"aria-label":g("deploymentSelect.searchAriaLabel",{label:e}),placeholder:b,autoComplete:"off",onChange:M=>f==null?void 0:f(M.currentTarget.value)})}),o.jsx("div",{id:y,ref:k,className:"pp-deployment-select-options",role:"listbox","aria-label":e,"aria-busy":c||void 0,onScroll:M=>{if(!u||c||!h)return;const B=M.currentTarget;B.scrollHeight-B.scrollTop-B.clientHeight<=24&&h()},children:r.map((M,B)=>{const I=M.value===t;return o.jsxs("button",{ref:H=>{S.current[B]=H},type:"button",role:"option","aria-selected":I,tabIndex:B===N?0:-1,className:`pp-deployment-select-option${I?" is-selected":""}`,title:M.description,onFocus:()=>_(B),onClick:()=>$(M),children:[o.jsxs("span",{className:"pp-deployment-select-copy",children:[o.jsxs("span",{className:"pp-deployment-select-name",children:[M.label,M.badge&&o.jsx("span",{className:"pp-deployment-select-badge",children:M.badge})]}),M.description&&o.jsx("small",{children:M.description})]}),I&&o.jsx(v3t,{})]},M.value)})}),c&&o.jsx("div",{className:"pp-deployment-select-state","aria-live":"polite",children:g("deploymentSelect.loadingMore")}),!c&&r.length===0&&o.jsx("div",{className:"pp-deployment-select-state",children:v})]})]})}function x3t(e){return[{value:"auto",label:e("deploymentResources.mode.auto"),description:e("deploymentResources.mode.autoDescription"),badge:e("deploymentResources.mode.recommended")},{value:"create",label:e("deploymentResources.mode.create"),description:e("deploymentResources.mode.createDescription")},{value:"existing",label:e("deploymentResources.mode.existing"),description:e("deploymentResources.mode.existingDescription")}]}const Cje={tos:{mode:"auto"},cr:{mode:"auto"},codePipeline:{mode:"auto"}};function Bf(e){const[t,n]=m.useState([]),[i,r]=m.useState(""),[s,a]=m.useState(1),[l,c]=m.useState(0),[u,d]=m.useState(!1),[f,h]=m.useState(!1),[p,g]=m.useState(null),[b,v]=m.useState(""),[y,x]=m.useState(""),[w,O]=m.useState(""),[k,S]=m.useState(0),E=m.useRef(!1),C=m.useRef(null),N=e?JSON.stringify(e):"",_=e?JSON.stringify({...e,search:y}):"";m.useEffect(()=>{const R=window.setTimeout(()=>{x(b.trim())},250);return()=>window.clearTimeout(R)},[b]),m.useEffect(()=>{v(""),x("")},[N]);const j=m.useCallback((R,P)=>{var B;if(!_)return;(B=C.current)==null||B.abort();const $=new AbortController;C.current=$;const M=JSON.parse(_);P&&n([]),E.current=!0,h(!0),g(null),n0e({...M,pageNumber:R,pageSize:100},$.signal).then(I=>{n(H=>{if(P)return I.items;const X=new Set(H.map(Q=>`${Q.id}\0${Q.name}`));return[...H,...I.items.filter(Q=>!X.has(`${Q.id}\0${Q.name}`))]}),r(I.serviceRegion),a(I.pageNumber),c(I.totalCount),d(I.hasMore),O(_)}).catch(I=>{I instanceof DOMException&&I.name==="AbortError"||(O(_),g(I instanceof Error?I.message:String(I)))}).finally(()=>{C.current===$&&(C.current=null,E.current=!1,h(!1))})},[_]);m.useEffect(()=>{var R;if(!_){(R=C.current)==null||R.abort(),C.current=null,E.current=!1,n([]),r(""),a(1),c(0),d(!1),O(""),h(!1),g(null);return}return j(1,!0),()=>{var P;return(P=C.current)==null?void 0:P.abort()}},[j,_,k]);const T=!!_&&w===_&&b.trim()===y,L=m.useCallback(()=>{O(""),S(R=>R+1)},[]),A=m.useCallback(()=>{!T||E.current||!u||j(s+1,!1)},[u,j,s,T]);return{items:t,serviceRegion:i,totalCount:l,hasMore:T?u:!1,loading:!!_&&(!T||f),error:p,search:b,setSearch:v,reload:L,loadMore:A}}function O3t(e,t){return e.map(n=>({value:n[t],label:n.name,description:[n.status,n.region,n.id].filter(Boolean).join(" · ")}))}function Uf({ariaLabel:e,value:t,valueLabel:n,state:i,disabled:r,disabledMessage:s,valueField:a="id",onChange:l}){const{t:c}=xe("ui"),u=m.useMemo(()=>O3t(i.items,a),[i.items,a]);return o.jsxs("div",{className:"pp-resource-picker",children:[o.jsx(FE,{ariaLabel:e,value:t,valueLabel:n,placeholder:i.loading?c("common.loading"):c("deploymentResources.selectExisting"),options:u,disabled:r||!!i.error,searchValue:i.search,searchPlaceholder:c("deploymentResources.searchResource"),loading:i.loading,hasMore:i.hasMore,emptyMessage:i.search.trim()?c("deploymentResources.noMatch"):c("deploymentResources.noAvailable"),onSearchChange:i.setSearch,onLoadMore:i.loadMore,onChange:d=>{const f=i.items.find(h=>h[a]===d);f&&l(f)}}),s?o.jsx("span",{className:"pp-resource-status",children:s}):i.error?o.jsxs("div",{className:"pp-resource-error",role:"alert",children:[o.jsx("span",{children:i.error}),o.jsx("button",{type:"button",onClick:i.reload,children:c("common.retry")})]}):i.loading&&i.items.length===0?o.jsx("span",{className:"pp-resource-status","aria-live":"polite",children:i.search.trim()?c("deploymentResources.searching"):c("deploymentResources.loading")}):i.items.length===0?o.jsx("span",{className:"pp-resource-status",children:i.search.trim()?c("deploymentResources.noMatchSentence"):c("deploymentResources.noAvailableSentence")}):i.serviceRegion?o.jsx("span",{className:"pp-resource-status",children:c("deploymentResources.loadedSummary",{region:i.serviceRegion,loaded:i.items.length,total:i.totalCount>0?`/${i.totalCount}`:""})}):null]})}function Tje({region:e,value:t,disabled:n=!1,onChange:i}){const{t:r}=xe("ui"),s=Bf(e?{kind:"cr-registry",region:e}:null),a=Bf(e&&(t!=null&&t.registry)?{kind:"cr-namespace",region:e,registry:t.registry}:null),l=Bf(e&&(t!=null&&t.registry)&&t.namespace?{kind:"cr-repository",region:e,registry:t.registry,namespace:t.namespace}:null),c=t??{region:e,registry:"",namespace:"",repository:""};return o.jsxs("div",{className:"pp-resource-fields pp-resource-fields-three environment-repository-fields",children:[o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:r("deploymentResources.registryInstance")}),o.jsx(Uf,{ariaLabel:r("deploymentResources.registryAriaLabel"),value:c.registry,valueLabel:c.registry,state:s,disabled:n||!e,valueField:"name",onChange:u=>i({region:e,registry:u.name,namespace:"",repository:""})})]}),o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:r("deploymentResources.namespace")}),o.jsx(Uf,{ariaLabel:r("deploymentResources.namespaceAriaLabel"),value:c.namespace,valueLabel:c.namespace,state:a,disabled:n||!c.registry,disabledMessage:c.registry?void 0:r("deploymentResources.selectRegistryFirst"),valueField:"name",onChange:u=>i({...c,region:e,namespace:u.name,repository:""})})]}),o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:r("deploymentResources.repository")}),o.jsx(Uf,{ariaLabel:r("deploymentResources.existingRepository"),value:c.repository,valueLabel:c.repository,state:l,disabled:n||!c.registry||!c.namespace,disabledMessage:c.registry?c.namespace?void 0:r("deploymentResources.selectNamespaceFirst"):r("deploymentResources.selectRegistryFirst"),valueField:"name",onChange:u=>i({...c,region:e,repository:u.name})})]})]})}function eL({resource:e,value:t,disabled:n,onChange:i}){const{t:r}=xe("ui");return o.jsxs("label",{className:"pp-resource-field pp-resource-mode",children:[o.jsx("span",{children:r("deploymentResources.configurationMode")}),o.jsx(FE,{ariaLabel:r("deploymentResources.configurationModeAriaLabel",{resource:e}),value:t,placeholder:r("deploymentResources.selectConfigurationMode"),options:x3t(r),disabled:n,onChange:s=>i(s)})]})}function $0({label:e,value:t,placeholder:n,disabled:i,onChange:r}){return o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:e}),o.jsx("input",{value:t,placeholder:n,disabled:i,autoComplete:"off",onChange:s=>r(s.currentTarget.value)})]})}function tL({items:e,note:t}){const{t:n}=xe("ui");return o.jsxs("div",{className:"pp-resource-auto-names",children:[o.jsx("span",{children:n("deploymentResources.automaticNames")}),o.jsx("dl",{children:e.map(i=>o.jsxs("div",{children:[o.jsx("dt",{children:i.label}),o.jsx("dd",{title:i.name,children:i.name})]},i.label))}),t&&o.jsx("small",{children:t})]})}function Aje(e){var t,n,i,r,s,a,l,c;return e.tos.mode!=="auto"&&!((t=e.tos.bucket)!=null&&t.trim())?Zt.t("ui:deploymentResources.validation.tos"):e.cr.mode!=="auto"&&(!((n=e.cr.instance)!=null&&n.trim())||!((i=e.cr.namespace)!=null&&i.trim())||!((r=e.cr.repository)!=null&&r.trim()))?Zt.t("ui:deploymentResources.validation.cr"):e.codePipeline.mode!=="auto"&&(!((s=e.codePipeline.workspaceName)!=null&&s.trim())||!((a=e.codePipeline.pipelineName)!=null&&a.trim()))?Zt.t("ui:deploymentResources.validation.codePipeline"):e.codePipeline.mode==="existing"&&(!((l=e.codePipeline.workspaceId)!=null&&l.trim())||!((c=e.codePipeline.pipelineId)!=null&&c.trim()))?Zt.t("ui:deploymentResources.validation.existingCodePipeline"):null}function _je({value:e,agentName:t,runtimeName:n,region:i,disabled:r,validationError:s,onChange:a}){const{t:l}=xe("ui"),c=t.trim()||"agentkit-app",u=n.trim()||c,d=i&&i!=="cn-beijing"?l("deploymentResources.autoBucketWithRegion",{region:i.startsWith("cn-")?i.slice(3):i}):l("deploymentResources.autoBucket"),f=Bf(e.tos.mode==="existing"?{kind:"tos-bucket",region:i}:null),h=Bf(e.cr.mode==="existing"?{kind:"cr-registry",region:i}:null),p=Bf(e.cr.mode==="existing"&&e.cr.instance?{kind:"cr-namespace",region:i,registry:e.cr.instance}:null),g=Bf(e.cr.mode==="existing"&&e.cr.instance&&e.cr.namespace?{kind:"cr-repository",region:i,registry:e.cr.instance,namespace:e.cr.namespace}:null),b=Bf(e.codePipeline.mode==="existing"?{kind:"cp-workspace",region:i}:null),v=Bf(e.codePipeline.mode==="existing"&&e.codePipeline.workspaceId?{kind:"cp-pipeline",region:i,workspaceId:e.codePipeline.workspaceId}:null),y=x=>a({...e,...x});return o.jsxs("div",{className:"pp-resource-list",children:[o.jsxs("div",{className:"pp-resource-item",children:[o.jsx("div",{className:"pp-resource-name",children:l("deploymentResources.tosBucket")}),o.jsxs("div",{className:"pp-resource-grid",children:[o.jsx(eL,{resource:l("deploymentResources.tosBucket"),value:e.tos.mode,disabled:r,onChange:x=>y({tos:{mode:x}})}),e.tos.mode==="create"&&o.jsx($0,{label:l("deploymentResources.bucketName"),value:e.tos.bucket??"",placeholder:l("deploymentResources.bucketNamePlaceholder"),disabled:r,onChange:x=>y({tos:{...e.tos,bucket:x}})}),e.tos.mode==="existing"&&o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.existingBucket")}),o.jsx(Uf,{ariaLabel:l("deploymentResources.existingTosBucket"),value:e.tos.bucket??"",valueLabel:e.tos.bucket,state:f,disabled:r,onChange:x=>y({tos:{...e.tos,bucket:x.name}})})]}),e.tos.mode==="auto"&&o.jsx(tL,{items:[{label:l("deploymentResources.bucket"),name:d}],note:l("deploymentResources.accountIdResolved")})]})]}),o.jsxs("div",{className:"pp-resource-item",children:[o.jsx("div",{className:"pp-resource-name",children:l("deploymentResources.containerRegistry")}),o.jsxs("div",{className:"pp-resource-grid",children:[o.jsx(eL,{resource:"CR",value:e.cr.mode,disabled:r,onChange:x=>y({cr:{mode:x}})}),e.cr.mode==="create"&&o.jsxs("div",{className:"pp-resource-fields pp-resource-fields-three",children:[o.jsx($0,{label:l("deploymentResources.instanceName"),value:e.cr.instance??"",placeholder:l("deploymentResources.crInstance"),disabled:r,onChange:x=>y({cr:{...e.cr,instance:x}})}),o.jsx($0,{label:l("deploymentResources.namespace"),value:e.cr.namespace??"",placeholder:l("deploymentResources.namespace"),disabled:r,onChange:x=>y({cr:{...e.cr,namespace:x}})}),o.jsx($0,{label:l("deploymentResources.repository"),value:e.cr.repository??"",placeholder:l("deploymentResources.repository"),disabled:r,onChange:x=>y({cr:{...e.cr,repository:x}})})]}),e.cr.mode==="existing"&&o.jsxs("div",{className:"pp-resource-fields pp-resource-fields-three",children:[o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.crInstance")}),o.jsx(Uf,{ariaLabel:l("deploymentResources.existingCrInstance"),value:e.cr.instance??"",valueLabel:e.cr.instance,state:h,disabled:r,valueField:"name",onChange:x=>y({cr:{mode:"existing",instance:x.name}})})]}),o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.namespace")}),o.jsx(Uf,{ariaLabel:l("deploymentResources.existingCrNamespace"),value:e.cr.namespace??"",valueLabel:e.cr.namespace,state:p,disabled:r||!e.cr.instance,valueField:"name",onChange:x=>y({cr:{...e.cr,namespace:x.name,repository:void 0}})})]}),o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.repository")}),o.jsx(Uf,{ariaLabel:l("deploymentResources.existingCrRepository"),value:e.cr.repository??"",valueLabel:e.cr.repository,state:g,disabled:r||!e.cr.namespace,valueField:"name",onChange:x=>y({cr:{...e.cr,repository:x.name}})})]})]}),e.cr.mode==="auto"&&o.jsx(tL,{items:[{label:l("deploymentResources.crInstance"),name:l("deploymentResources.autoRegistry")},{label:l("deploymentResources.namespace"),name:"agentkit"},{label:l("deploymentResources.repository"),name:l("deploymentResources.autoRepositoryName",{name:c})}],note:l("deploymentResources.registryNameNote")})]})]}),o.jsxs("div",{className:"pp-resource-item",children:[o.jsx("div",{className:"pp-resource-name",children:"CodePipeline"}),o.jsxs("div",{className:"pp-resource-grid",children:[o.jsx(eL,{resource:"CodePipeline",value:e.codePipeline.mode,disabled:r,onChange:x=>y({codePipeline:{mode:x}})}),e.codePipeline.mode==="create"&&o.jsxs("div",{className:"pp-resource-fields",children:[o.jsx($0,{label:l("deploymentResources.workspaceName"),value:e.codePipeline.workspaceName??"",placeholder:l("deploymentResources.workspaceName"),disabled:r,onChange:x=>y({codePipeline:{...e.codePipeline,workspaceName:x}})}),o.jsx($0,{label:l("deploymentResources.pipelineName"),value:e.codePipeline.pipelineName??"",placeholder:l("deploymentResources.pipelineName"),disabled:r,onChange:x=>y({codePipeline:{...e.codePipeline,pipelineName:x}})})]}),e.codePipeline.mode==="existing"&&o.jsxs("div",{className:"pp-resource-fields",children:[o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.workspace")}),o.jsx(Uf,{ariaLabel:l("deploymentResources.existingWorkspace"),value:e.codePipeline.workspaceId??"",valueLabel:e.codePipeline.workspaceName,state:b,disabled:r,onChange:x=>y({codePipeline:{mode:"existing",workspaceId:x.id,workspaceName:x.name}})})]}),o.jsxs("label",{className:"pp-resource-field",children:[o.jsx("span",{children:l("deploymentResources.compatiblePipeline")}),o.jsx(Uf,{ariaLabel:l("deploymentResources.existingPipeline"),value:e.codePipeline.pipelineId??"",valueLabel:e.codePipeline.pipelineName,state:v,disabled:r||!e.codePipeline.workspaceId,onChange:x=>y({codePipeline:{...e.codePipeline,pipelineId:x.id,pipelineName:x.name}})})]})]}),e.codePipeline.mode==="auto"&&o.jsx(tL,{items:[{label:l("deploymentResources.workspace"),name:"agentkit-cli-workspace"},{label:l("deploymentResources.pipeline"),name:u}],note:l("deploymentResources.pipelineNameNote")})]})]}),s&&o.jsx("p",{className:"pp-resource-validation",role:"alert",children:s})]})}function w3t(e){return[{value:"custom",label:e("environmentCenter.creation.custom.label"),description:e("environmentCenter.creation.custom.description")},{value:"dockerfile",label:e("environmentCenter.creation.dockerfile.label"),description:e("environmentCenter.creation.dockerfile.description")},{value:"git",label:e("environmentCenter.creation.git.label"),description:e("environmentCenter.creation.git.description")},{value:"image",label:e("environmentCenter.creation.image.label"),description:e("environmentCenter.creation.image.description")}]}const S3t=mwe.map(e=>({value:e.id,label:e.label,description:e.description}));function k3t(e){return[{value:"none",label:e("common.none"),description:e("environmentCenter.presets.none")},{value:"aio-sandbox",label:"AIO Sandbox",description:e("environmentCenter.presets.aio")},{value:"codex-sandbox",label:"Codex Sandbox",description:e("environmentCenter.presets.codex")}]}function E3t(e){const t=h3t(e,"");return t===vB?"aio-sandbox":t.includes("/codexenv:")?"codex-sandbox":"none"}const C3t=Z_.map(e=>({value:e.id,label:e.label})),Rte=bwe.map(e=>({value:e.id,label:e.label}));function T3t(e){return[{value:"managed",label:e("environmentCenter.repository.managed")},{value:"existing",label:e("environmentCenter.repository.existing")}]}const m8=20,Ite=new Set;async function A3t(){var e;if(typeof navigator>"u"||!((e=navigator.permissions)!=null&&e.query))return!1;try{return(await navigator.permissions.query({name:"clipboard-read"})).state==="denied"}catch{return!1}}const _3t={opencli:DLt,uv:MLt,playwright:LLt,chromium:$Lt,git:FLt,curl:BLt,ffmpeg:ULt,imagemagick:QLt};function N3t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"M8 3.25v9.5M3.25 8h9.5"})})}function Eu(){return o.jsx("span",{className:"environment-required-mark","aria-hidden":"true",children:"*"})}function j3t(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4"}),o.jsx("path",{d:"M5 16v2.5A2.5 2.5 0 0 0 7.5 21h9a2.5 2.5 0 0 0 2.5-2.5V16"})]})}function g8(e,t){const n=e.trim();if(!n)return t("environmentCenter.errors.repositoryRequired");try{const i=new URL(n);if(i.protocol!=="https:"||!i.hostname)return t("environmentCenter.errors.repositoryHttps")}catch{return t("environmentCenter.errors.repositoryInvalid")}return""}function Pte(e){return!!(e!=null&&e.region&&e.registry&&e.namespace&&e.repository)}function Nje(e,t){const n=e.trim();return n?/\s/.test(n)?t("environmentCenter.errors.imageReferenceWhitespace"):n.startsWith("sha256:")?/^sha256:[0-9a-fA-F]{64}$/.test(n)?"":t("environmentCenter.errors.imageDigestInvalid"):/[@/]/.test(n)?t("environmentCenter.errors.imageTagOnly"):"":""}function R3t(e){return(e instanceof Error?e.message:String(e)).split(` +原始响应:`,1)[0].trim()}function I3t(e){return o.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M5.5 10.5 16 5l10.5 5.5L16 16 5.5 10.5Z"}),o.jsx("path",{d:"M5.5 16 16 21.5 26.5 16M5.5 21.5 16 27l10.5-5.5"})]})}function P3t({label:e}){return o.jsx("span",{className:"environment-package-fallback",children:e.slice(0,1).toUpperCase()})}function D3t({option:e}){if(e.id==="lark-cli")return o.jsx("img",{src:RI,alt:""});if(e.id==="pandoc")return o.jsx("img",{src:PLt,alt:""});if(e.id==="github-cli")return o.jsx(zQ,{});const t=_3t[e.id];return t?o.jsx("img",{src:t,alt:""}):o.jsx(P3t,{label:e.label})}function M3t(e,t){return e?{name:e.name,description:e.description,baseEnvironment:e.baseEnvironment,operatingSystem:e.operatingSystem,language:e.language,optionIds:[...e.optionIds],selectedSkills:[...e.selectedSkills],dockerfile:e.dockerfile===OB(e,t)?void 0:e.dockerfile,gitSource:e.gitSource,containerRepository:e.containerRepository,imageSource:e.imageSource}:{...lM,optionIds:[...lM.optionIds],selectedSkills:[...lM.selectedSkills]}}const Qg=new Set(["preparing","queued","building","scanning"]),Dte=3e3,nL={preparing:"environmentCenter.buildStatus.preparing",queued:"environmentCenter.buildStatus.queued",building:"environmentCenter.buildStatus.building",scanning:"environmentCenter.buildStatus.scanning",available:"environmentCenter.buildStatus.available",failed:"environmentCenter.buildStatus.failed"};function jje(e,t){var i;const n=(i=e.latestVersion)==null?void 0:i.status;return n?n==="available"?{label:t(nL[n]),color:"success"}:n==="failed"?{label:t(nL[n]),color:"danger"}:{label:t(nL[n]),color:"warning"}:{label:t("environmentCenter.buildStatus.notBuilt"),color:"secondary"}}function L3t(e,t){return UQ(e,Date.now(),t)}function $3t(e,t){const n=Date.parse(e);return Number.isNaN(n)?e:new Intl.DateTimeFormat(t,{dateStyle:"medium",timeStyle:"medium"}).format(n)}function F3t(e,t,n=Date.now()){const i=Date.parse(e.createdAt),s=Qg.has(e.status)?n:Date.parse(e.updatedAt);if(Number.isNaN(i)||Number.isNaN(s))return"";const a=Math.max(0,Math.floor((s-i)/1e3));if(a<60)return t("environmentCenter.duration.seconds",{count:a});const l=Math.floor(a/60),c=a%60;return l<60?t("environmentCenter.duration.minutesSeconds",{minutes:l,seconds:c}):t("environmentCenter.duration.hoursMinutes",{hours:Math.floor(l/60),minutes:l%60})}function B3t({environment:e,onClose:t}){var w;const{t:n}=xe("ui"),i=((w=e.latestVersion)==null?void 0:w.versionId)??"",r=m.useId(),s=m.useRef(null),a=m.useRef(t),[l,c]=m.useState(null),[u,d]=m.useState(!0),[f,h]=m.useState(""),[p,g]=m.useState(0),[b,v]=m.useState("idle"),y=m.useMemo(()=>l?b3t(l):"",[l]);a.current=t,m.useEffect(()=>{var E;const O=document.body.style.overflow,k=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(E=s.current)==null||E.focus();const S=C=>{if(C.key==="Escape"){C.preventDefault(),a.current();return}if(C.key!=="Tab"||!s.current)return;const N=Array.from(s.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')).filter(T=>T.getClientRects().length>0);if(!N.length)return;const _=N[0],j=N[N.length-1];C.shiftKey&&document.activeElement===_?(C.preventDefault(),j.focus()):!C.shiftKey&&document.activeElement===j&&(C.preventDefault(),_.focus())};return window.addEventListener("keydown",S),()=>{document.body.style.overflow=O,window.removeEventListener("keydown",S),k!=null&&k.isConnected&&k.focus()}},[]),m.useEffect(()=>{const O=new AbortController;return d(!0),h(""),k0e(e.id,i,O.signal).then(c).catch(k=>{(k==null?void 0:k.name)!=="AbortError"&&h(k instanceof Error?k.message:String(k))}).finally(()=>{O.signal.aborted||d(!1)}),()=>O.abort()},[e.id,p,i]),m.useEffect(()=>{if(b!=="copied")return;const O=window.setTimeout(()=>v("idle"),1500);return()=>window.clearTimeout(O)},[b]);const x=async()=>{try{await navigator.clipboard.writeText(y),v("copied")}catch{v("error")}};return $i.createPortal(o.jsx("div",{className:"environment-build-dialog__backdrop",onMouseDown:O=>{O.target===O.currentTarget&&t()},children:o.jsxs("section",{ref:s,className:"environment-build-dialog environment-manifest-dialog",role:"dialog","aria-modal":"true","aria-labelledby":r,"aria-busy":u||void 0,tabIndex:-1,children:[o.jsxs("header",{className:"environment-build-dialog__header",children:[o.jsxs("div",{children:[o.jsx("div",{className:"environment-build-dialog__title-row",children:o.jsx("h2",{id:r,children:n("environmentCenter.manifest.title")})}),o.jsxs("p",{children:[e.name," / ",i]})]}),o.jsx($t,{type:"button",color:"secondary",variant:"ghost",size:"sm",uniform:!0,onClick:t,"aria-label":n("environmentCenter.manifest.closeLabel"),children:o.jsx(Ra,{"aria-hidden":!0})})]}),o.jsx("div",{className:"environment-manifest-dialog__body",children:u?o.jsx("div",{className:"environment-manifest-dialog__state",role:"status",children:o.jsx(En,{as:"span",children:n("environmentCenter.manifest.loading")})}):f?o.jsxs("div",{className:"environment-manifest-dialog__state is-error",role:"alert",children:[o.jsx("p",{children:f}),o.jsx($t,{type:"button",color:"secondary",variant:"soft",size:"sm",onClick:()=>g(O=>O+1),children:n("common.reload")})]}):o.jsx("div",{className:"environment-manifest-dialog__editor","aria-label":n("environmentCenter.manifest.editorLabel"),children:o.jsx($E,{value:y,path:"environment.yaml",readOnly:!0,onChange:()=>{}})})}),o.jsxs("footer",{className:"environment-build-dialog__actions",children:[b==="error"?o.jsx("span",{className:"environment-manifest-dialog__copy-error",role:"alert",children:n("environmentCenter.manifest.copyFailed")}):null,o.jsx($t,{type:"button",color:"secondary",variant:"ghost",size:"sm",onClick:t,children:n("common.close")}),o.jsx($t,{type:"button",color:"info",size:"sm",disabled:!y,onClick:()=>void x(),children:n(b==="copied"?"environmentCenter.manifest.copied":"environmentCenter.manifest.copy")})]})]})}),document.body)}function U3t({environment:e,onClose:t,onBuildUpdate:n,onRebuild:i}){var S,E;const{t:r}=xe("ui"),s=e.latestVersion,[a,l]=m.useState(s),[c,u]=m.useState(!!s),[d,f]=m.useState(""),[h,p]=m.useState(Date.now()),[g,b]=m.useState(!1),v=m.useId(),y=m.useRef(null),x=m.useRef(t),w=m.useRef(n);m.useEffect(()=>{x.current=t,w.current=n},[n,t]),m.useEffect(()=>{var j;const C=document.body.style.overflow,N=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(j=y.current)==null||j.focus();const _=T=>{var P;if(T.key==="Escape"&&x.current(),T.key!=="Tab")return;const L=Array.from(((P=y.current)==null?void 0:P.querySelectorAll('button:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])'))??[]).filter($=>$.getClientRects().length>0);if(!L.length)return;const A=L[0],R=L[L.length-1];T.shiftKey&&document.activeElement===A?(T.preventDefault(),R.focus()):!T.shiftKey&&document.activeElement===R&&(T.preventDefault(),A.focus())};return window.addEventListener("keydown",_),()=>{document.body.style.overflow=C,window.removeEventListener("keydown",_),N!=null&&N.isConnected&&N.focus()}},[]),m.useEffect(()=>{if(!s)return;let C=0;const N=new AbortController,_=async()=>{u(!0);try{const j=await S0e(e.id,s.versionId,{includeLogs:!0,signal:N.signal});l(j),f(""),w.current(j),Qg.has(j.status)&&(C=window.setTimeout(_,Dte))}catch(j){if((j==null?void 0:j.name)==="AbortError")return;f(j instanceof Error?j.message:String(j)),C=window.setTimeout(_,Dte)}finally{N.signal.aborted||u(!1)}};return _(),()=>{N.abort(),window.clearTimeout(C)}},[e.id,s==null?void 0:s.versionId]),m.useEffect(()=>{if(!a||!Qg.has(a.status))return;const C=window.setInterval(()=>p(Date.now()),1e3);return()=>window.clearInterval(C)},[a==null?void 0:a.status]);const O=a?jje({...e,latestVersion:a},r):{label:r("environmentCenter.buildStatus.notBuilt"),color:"secondary"},k=e.imageSource||(E=(S=a==null?void 0:a.resources)==null?void 0:S.codePipeline)==null?void 0:E.consoleUrl;return $i.createPortal(o.jsx("div",{className:"environment-build-dialog__backdrop",onMouseDown:C=>{C.target===C.currentTarget&&t()},children:o.jsxs("section",{ref:y,className:"environment-build-dialog",role:"dialog","aria-modal":"true","aria-labelledby":v,tabIndex:-1,children:[o.jsxs("header",{className:"environment-build-dialog__header",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"environment-build-dialog__title-row",children:[o.jsx("h2",{id:v,children:r("environmentCenter.buildDetails.title")}),o.jsx(ma,{color:O.color,size:"sm",children:O.label})]}),o.jsx("p",{children:e.name})]}),o.jsx($t,{type:"button",color:"secondary",variant:"ghost",size:"sm",uniform:!0,onClick:t,"aria-label":r("environmentCenter.buildDetails.closeLabel"),children:o.jsx(Ra,{"aria-hidden":!0})})]}),o.jsxs("div",{className:"environment-build-dialog__summary",children:[o.jsxs("div",{children:[o.jsx("span",{children:r("environmentCenter.buildDetails.currentStep")}),o.jsx("strong",{children:(a==null?void 0:a.currentStep)||r("environmentCenter.buildDetails.waiting")})]}),o.jsxs("div",{children:[o.jsx("span",{children:r("environmentCenter.buildDetails.elapsed")}),o.jsx("strong",{children:a?F3t(a,r,h):"-"})]}),a!=null&&a.sourceCommitSha?o.jsxs("div",{children:[o.jsx("span",{children:r("environmentCenter.buildDetails.sourceCommit")}),o.jsx("strong",{title:a.sourceCommitSha,children:a.sourceCommitSha.slice(0,12)})]}):null,k?o.jsxs("a",{href:k,target:"_blank",rel:"noreferrer",children:[r("environmentCenter.buildDetails.openCodePipeline")," ",o.jsx(fb,{"aria-hidden":!0})]}):null]}),o.jsxs("div",{className:"environment-build-dialog__body",children:[d?o.jsx("p",{className:"environment-build-dialog__error",role:"alert",children:d}):null,a!=null&&a.progressError?o.jsx("p",{className:"environment-build-dialog__notice",children:a.progressError}):null,o.jsx(WLt,{steps:(a==null?void 0:a.steps)??[],log:(a==null?void 0:a.logTail)??"",logError:a==null?void 0:a.logError,logTruncated:a==null?void 0:a.logTruncated,logUpdatedAt:a==null?void 0:a.logUpdatedAt,loading:c&&!!(a&&Qg.has(a.status))}),(a==null?void 0:a.status)==="failed"&&a.error?o.jsx("p",{className:"environment-build-dialog__failure",role:"alert",children:a.error}):null]}),o.jsxs("footer",{className:"environment-build-dialog__actions",children:[o.jsx($t,{type:"button",color:"secondary",variant:"ghost",size:"sm",onClick:t,children:r("common.close")}),a&&!e.imageSource&&!Qg.has(a.status)?o.jsx($t,{type:"button",color:"info",size:"sm",disabled:g,onClick:()=>{b(!0),i().then(t).finally(()=>b(!1))},children:r(g?"environmentCenter.buildDetails.starting":"environmentCenter.buildDetails.rebuild")}):null]})]})}),document.body)}function Rje({cloudProvider:e,value:t,disabled:n,onChange:i}){const{t:r}=xe("ui"),s=Iu(e).map(a=>({value:a.value,label:a.label}));return o.jsxs("label",{className:"environment-field environment-region-field",children:[o.jsxs("span",{children:[r("environmentCenter.region"),o.jsx(Eu,{})]}),o.jsx(Fs,{id:"environment-region",value:t,options:s,optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,disabled:n,triggerClassName:"environment-select-trigger",onChange:a=>i(a.value)})]})}function Q3t({repositoryUrl:e,gitRef:t,dockerfilePath:n,inspection:i,inspectedKey:r,disabled:s,onRepositoryUrlChange:a,onGitRefChange:l,onDockerfilePathChange:c,onInspectionChange:u,onInspectedKeyChange:d}){const{t:f}=xe("ui"),[h,p]=m.useState(!1),[g,b]=m.useState(""),v=m.useRef(null),y=m.useRef(""),x=`${e.trim()}\0${t.trim()}`,w=r===x;m.useEffect(()=>()=>{const E=v.current;v.current=null,E==null||E.abort()},[]);const O=()=>{var E;(E=v.current)==null||E.abort(),v.current=null,p(!1),b(""),u(null),d(""),c(""),y.current=""},k=m.useCallback(async()=>{var N;const E=g8(e,f);if(E){b(E);return}y.current=x,(N=v.current)==null||N.abort();const C=new AbortController;v.current=C,p(!0),b("");try{const _=await m0e({repositoryUrl:e.trim(),...t.trim()?{ref:t.trim()}:{}},C.signal);if(v.current!==C)return;u(_),d(x),c(_.dockerfiles.length===1?_.dockerfiles[0]:"")}catch(_){if((_==null?void 0:_.name)==="AbortError")return;b(R3t(_)),u(null),d(""),c("")}finally{v.current===C&&(v.current=null,p(!1))}},[x,t,c,d,u,e,f]);m.useEffect(()=>{if(s||w||y.current===x||g8(e,f))return;const E=window.setTimeout(()=>void k(),600);return()=>window.clearTimeout(E)},[x,s,k,w,e,f]);const S=w?(i==null?void 0:i.dockerfiles)??[]:[];return o.jsxs("section",{className:"environment-source-section","aria-label":f("environmentCenter.git.sectionLabel"),children:[o.jsxs("div",{className:"environment-form-grid environment-git-fields",children:[o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[f("environmentCenter.git.address"),o.jsx(Eu,{})]}),o.jsx(Kr,{size:"lg",type:"url",required:!0,value:e,placeholder:"https://github.com/owner/repository.git",autoComplete:"url",disabled:s,"aria-invalid":!!g,onChange:E=>{O(),a(E.currentTarget.value)}})]}),o.jsxs("label",{className:"environment-field",children:[o.jsx("span",{children:f("environmentCenter.git.ref")}),o.jsx(Kr,{size:"lg",value:t,placeholder:f("environmentCenter.git.defaultBranch"),autoComplete:"off",disabled:s,onChange:E=>{O(),l(E.currentTarget.value)}})]})]}),o.jsxs("div",{className:"environment-inspection-status environment-form-feedback","aria-live":"polite",children:[h?o.jsx(En,{as:"span",children:f("environmentCenter.git.inspecting")}):null,g?o.jsxs("div",{className:"environment-source-error",role:"alert",children:[o.jsx("span",{children:g}),o.jsxs($t,{type:"button",color:"primary",size:"sm",pill:!1,disabled:s,onClick:()=>void k(),children:[o.jsx(Bj,{}),f("common.retry")]})]}):null,!h&&!g&&w&&i?S.length>0?o.jsx("span",{children:i.commitSha?f("environmentCenter.git.foundDockerfiles",{commit:i.commitSha.slice(0,12),count:S.length}):f("environmentCenter.git.savedDockerfileLoaded")}):o.jsxs("div",{className:"environment-source-error",role:"alert",children:[o.jsx("span",{children:f("environmentCenter.git.noDockerfile")}),o.jsx("button",{type:"button",disabled:s,onClick:()=>void k(),children:f("environmentCenter.git.inspectAgain")})]}):null]}),S.length>0?o.jsxs("label",{className:"environment-field environment-dockerfile-picker",children:[o.jsxs("span",{children:["Dockerfile",o.jsx(Eu,{})]}),o.jsx(FE,{ariaLabel:f("environmentCenter.git.selectDockerfile"),value:n,valueLabel:n,placeholder:f("environmentCenter.git.selectDockerfile"),options:S.map(E=>({value:E,label:E})),disabled:s||h,onChange:c})]}):null]})}function z3t({cloudProvider:e,mode:t,region:n,value:i,disabled:r,onModeChange:s,onRegionChange:a,onChange:l}){const{t:c}=xe("ui");return o.jsx("section",{className:"environment-source-section","aria-label":c("environmentCenter.repository.outputSection"),children:o.jsxs("div",{className:"environment-form-grid",children:[o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[c("environmentCenter.repository.type"),o.jsx(Eu,{})]}),o.jsx(Fs,{id:"environment-repository-mode",value:t,options:T3t(c),optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,disabled:r,triggerClassName:"environment-select-trigger",onChange:u=>s(u.value)})]}),o.jsx(Rje,{cloudProvider:e,value:n,disabled:r,onChange:a}),t==="existing"?o.jsx(Tje,{region:n,value:i,disabled:r,onChange:l}):o.jsx("p",{className:"environment-source-note environment-form-feedback",children:c("environmentCenter.repository.managedHint")})]})})}function V3t({cloudProvider:e,region:t,repository:n,reference:i,disabled:r,onRegionChange:s,onRepositoryChange:a,onReferenceChange:l}){const{t:c}=xe("ui"),u=Nje(i,c);return o.jsx("section",{className:"environment-source-section","aria-label":c("environmentCenter.existingImage.sectionLabel"),children:o.jsxs("div",{className:"environment-form-grid",children:[o.jsx(Rje,{cloudProvider:e,value:t,disabled:r,onChange:s}),o.jsx(Tje,{region:t,value:n,disabled:r,onChange:a}),o.jsxs("label",{className:"environment-field environment-image-reference",children:[o.jsxs("span",{children:[c("environmentCenter.existingImage.reference"),o.jsx(Eu,{})]}),o.jsx(Kr,{size:"lg",value:i,required:!0,placeholder:c("environmentCenter.existingImage.placeholder"),autoComplete:"off",disabled:r,"aria-invalid":!!u,onChange:d=>l(d.currentTarget.value)}),u?o.jsx("small",{className:"environment-source-field__error",role:"alert",children:u}):o.jsx("small",{children:c("environmentCenter.existingImage.hint")})]})]})})}function Ije(e,t,n,i){const r=m.useRef(n),s=m.useRef(i);r.current=n,s.current=i,m.useEffect(()=>{const a=document.body.style.overflow,l=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden";const c=window.requestAnimationFrame(()=>{var d;return(d=t.current)==null?void 0:d.focus()}),u=d=>{var g;if(d.key==="Escape"&&!s.current){d.preventDefault(),r.current();return}if(d.key!=="Tab")return;const f=Array.from(((g=e.current)==null?void 0:g.querySelectorAll('button:not([disabled]), textarea:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])'))??[]).filter(b=>b.getClientRects().length>0);if(!f.length)return;const h=f[0],p=f[f.length-1];d.shiftKey&&document.activeElement===h?(d.preventDefault(),p.focus()):!d.shiftKey&&document.activeElement===p&&(d.preventDefault(),h.focus())};return window.addEventListener("keydown",u),()=>{window.cancelAnimationFrame(c),document.body.style.overflow=a,window.removeEventListener("keydown",u),l!=null&&l.isConnected&&l.focus()}},[e,t])}function H3t({environment:e,onClose:t}){const{t:n}=xe("ui"),i=m.useId(),r=m.useId(),s=m.useRef(null),a=m.useRef(null),[l,c]=m.useState(""),[u,d]=m.useState("loading"),[f,h]=m.useState(""),p=u==="loading";Ije(s,a,t,p);const g=async(b="",v)=>{d("loading"),h("");try{const y=b||(await g0e(e.id,v)).shareCode;c(y),await s0e(y),v!=null&&v.aborted||d("copied")}catch(y){if((y==null?void 0:y.name)==="AbortError")return;h(y instanceof Error?y.message:String(y)),d("error")}};return m.useEffect(()=>{const b=new AbortController;return g("",b.signal),()=>b.abort()},[e.id]),$i.createPortal(o.jsx("div",{className:"environment-build-dialog__backdrop",onMouseDown:b=>{b.target===b.currentTarget&&!p&&t()},children:o.jsxs("section",{ref:s,className:"environment-share-dialog",role:"dialog","aria-modal":"true","aria-labelledby":i,"aria-describedby":r,"aria-busy":p||void 0,children:[o.jsxs("header",{className:"environment-build-dialog__header",children:[o.jsxs("div",{children:[o.jsx("h2",{id:i,children:n("environmentCenter.share.title")}),o.jsx("p",{id:r,children:e.name})]}),o.jsx($t,{ref:a,type:"button",color:"secondary",variant:"ghost",size:"sm",uniform:!0,disabled:p,onClick:t,"aria-label":n("environmentCenter.share.closeLabel"),children:o.jsx(Ra,{"aria-hidden":!0})})]}),o.jsx("div",{className:"environment-share-dialog__body",children:u==="loading"?o.jsx(En,{as:"p",children:n("environmentCenter.share.generating")}):o.jsxs("div",{className:"environment-share-dialog__result",children:[u==="copied"?o.jsx("p",{className:"environment-share-dialog__success",role:"status","aria-live":"polite",children:n("environmentCenter.share.copied")}):o.jsxs("div",{className:"environment-share-dialog__error",role:"alert",children:[o.jsx("strong",{children:n("environmentCenter.share.failed")}),o.jsx("span",{children:f})]}),l?o.jsxs("label",{className:"environment-share-dialog__field environment-share-dialog__manual-code",children:[o.jsx("span",{children:n("environmentCenter.share.code")}),o.jsx(Rm,{size:"lg",rows:4,value:l,readOnly:!0,"aria-label":n("environmentCenter.share.fullCode"),onFocus:b=>b.currentTarget.select(),onClick:b=>b.currentTarget.select()}),o.jsx("small",{children:n(u==="copied"?"environmentCenter.share.copiedHint":"environmentCenter.share.copyFailedHint")})]}):null,o.jsx("p",{className:"environment-share-dialog__safety",children:n("environmentCenter.share.safety")})]})}),o.jsxs("footer",{className:"environment-build-dialog__actions",children:[o.jsx($t,{type:"button",color:"secondary",variant:"ghost",size:"sm",disabled:p,onClick:t,children:n("common.close")}),u==="error"?o.jsx($t,{type:"button",color:"info",size:"sm",onClick:()=>void g(l),children:n("common.retry")}):u==="copied"?o.jsx($t,{type:"button",color:"info",size:"sm",onClick:()=>void g(l),children:n("environmentCenter.share.copyAgain")}):null]})]})}),document.body)}function q3t({initialValue:e,autoInspect:t,onClose:n,onImported:i}){const{t:r}=xe("ui"),s=m.useId(),a=m.useId(),l=m.useId(),c=m.useRef(null),u=m.useRef(null),d=m.useRef(!1),[f,h]=m.useState(e),[p,g]=m.useState("editing"),[b,v]=m.useState([]),[y,x]=m.useState(""),[w,O]=m.useState([]),k=m.useMemo(()=>VF(f),[f]),S=k.length>m8,E=p==="inspecting"||p==="importing",C=b.filter(A=>A.status==="valid"),N=b.filter(A=>A.status==="invalid"),_=p==="ready"&&C.length>0;Ije(c,u,n,E);const j=m.useCallback(async()=>{if(!(!k.length||S)){g("inspecting"),x(""),O([]);try{const A=await b0e(k);v([...A].sort((R,P)=>R.index-P.index)),g("ready")}catch(A){x(A instanceof Error?A.message:String(A)),g("editing")}}},[k,S]);m.useEffect(()=>{!t||d.current||(d.current=!0,j())},[t,j]);const T=async()=>{if(_){g("importing"),x(""),O([]);try{const A=C.map(Q=>({code:k[Q.index],name:Q.name})).filter(Q=>!!Q.code),R=await y0e(A.map(Q=>Q.code)),P=R.filter(Q=>Q.status==="created").length,$=R.filter(Q=>Q.status==="duplicate").length,M=new Map(R.map(Q=>[Q.index,Q])),B=A.flatMap(({code:Q,name:q},U)=>{const te=M.get(U);return!te||te.status==="failed"?[{code:Q,name:q,status:"valid",error:(te==null?void 0:te.error)||r("environmentCenter.import.noResult")}]:[]}),H=[...N.flatMap(Q=>{const q=k[Q.index];return q?[{code:q,name:"",status:"invalid",error:Q.error||r("environmentCenter.import.invalidCode")}]:[]}),...B],X=new Map;if(R.forEach(Q=>{Q.environment&&X.set(Q.environment.id,Q.environment)}),i([...X.values()],P,$,H.length),!H.length){n();return}h(H.map(Q=>Q.code).join(` +`)),O(B),v(H.map((Q,q)=>({index:q,status:Q.status,name:Q.name,error:Q.status==="invalid"?Q.error:""}))),x(r("environmentCenter.import.partial",{created:P,remaining:H.length})),g("ready")}catch(A){x(A instanceof Error?A.message:String(A)),g("ready")}}},L=p==="inspecting"?r("environmentCenter.import.inspecting"):p==="importing"?r("environmentCenter.import.importing"):_?w.length?r("environmentCenter.import.retryImport"):r("environmentCenter.import.confirm"):r("environmentCenter.import.inspectCodes");return $i.createPortal(o.jsx("div",{className:"environment-build-dialog__backdrop",onMouseDown:A=>{A.target===A.currentTarget&&!E&&n()},children:o.jsxs("section",{ref:c,className:"environment-share-dialog environment-import-dialog",role:"dialog","aria-modal":"true","aria-labelledby":s,"aria-describedby":a,"aria-busy":E||void 0,children:[o.jsxs("header",{className:"environment-build-dialog__header",children:[o.jsxs("div",{children:[o.jsx("h2",{id:s,children:r("environmentCenter.import.title")}),o.jsx("p",{id:a,children:r("environmentCenter.import.description")})]}),o.jsx($t,{type:"button",color:"secondary",variant:"ghost",size:"sm",uniform:!0,disabled:E,onClick:n,"aria-label":r("environmentCenter.import.closeLabel"),children:o.jsx(Ra,{"aria-hidden":!0})})]}),o.jsxs("div",{className:"environment-share-dialog__body",children:[o.jsxs("label",{className:"environment-share-dialog__field",children:[o.jsx("span",{children:r("environmentCenter.import.code")}),o.jsx(Rm,{ref:u,size:"lg",rows:6,value:f,disabled:E,"aria-invalid":S||N.length>0||void 0,"aria-describedby":l,placeholder:"akenv://v1/...",onChange:A=>{h(A.currentTarget.value),g("editing"),v([]),x(""),O([])}})]}),o.jsx("p",{id:l,className:`environment-share-dialog__help${S?" is-error":""}`,children:S?r("environmentCenter.import.tooMany",{max:m8,count:k.length}):r("environmentCenter.import.multipleHint")}),o.jsx("p",{className:"environment-share-dialog__safety",children:r("environmentCenter.import.safety")}),p==="inspecting"?o.jsx(En,{as:"p",children:r("environmentCenter.import.inspectingCodes")}):C.length?o.jsx("p",{className:"environment-share-dialog__summary",role:"status","aria-live":"polite",children:r("environmentCenter.import.found",{count:C.length,names:C.map(A=>A.name||r("environmentCenter.unnamed")).join(r("environmentCenter.listSeparator"))})}):null,N.length?o.jsx("ul",{className:"environment-share-dialog__failures",role:"alert",children:N.map(A=>o.jsx("li",{children:r("environmentCenter.import.itemError",{index:A.index+1,error:A.error||r("environmentCenter.import.invalidCode")})},A.index))}):null,w.length?o.jsx("ul",{className:"environment-share-dialog__failures",role:"alert",children:w.map((A,R)=>o.jsx("li",{children:r("environmentCenter.import.itemError",{index:R+1,error:A.error})},`${A.code}:${R}`))}):null,y?o.jsx("p",{className:"environment-share-dialog__error-text",role:"alert",children:y}):null]}),o.jsxs("footer",{className:"environment-build-dialog__actions",children:[o.jsx($t,{type:"button",color:"secondary",variant:"ghost",size:"sm",disabled:E,onClick:n,children:r("common.cancel")}),o.jsx($t,{type:"button",color:"info",size:"sm",loading:E,disabled:E||!k.length||S||p==="ready"&&!_,onClick:()=>_?void T():void j(),children:L})]})]})}),document.body)}function W3t({environment:e,cloudProvider:t,onCancel:n,onDelete:i,onShare:r,onSave:s}){var it,Ae,Wt,mn,qt,xt,Nt;const{t:a,i18n:l}=xe("ui"),c=w3t(a),u=M3t(e,t),d=u.dockerfile!==void 0,[f,h]=m.useState(()=>({...u,dockerfile:d?void 0:u.dockerfile})),[p,g]=m.useState(u.gitSource?"git":u.imageSource?"image":d?"dockerfile":"custom"),[b,v]=m.useState(d?(e==null?void 0:e.dockerfile)??"":""),[y,x]=m.useState(""),w=m.useRef(null),[O,k]=m.useState(()=>d?E3t((e==null?void 0:e.dockerfile)??""):u.baseEnvironment==="aio-sandbox"||u.baseEnvironment==="codex-sandbox"?u.baseEnvironment:"none"),[S,E]=m.useState(((it=u.gitSource)==null?void 0:it.repositoryUrl)??""),[C,N]=m.useState(((Ae=u.gitSource)==null?void 0:Ae.ref)??""),[_,j]=m.useState(((Wt=u.gitSource)==null?void 0:Wt.dockerfilePath)??""),[T,L]=m.useState(u.gitSource?{repositoryUrl:u.gitSource.repositoryUrl,ref:u.gitSource.ref??"",commitSha:"",dockerfiles:[u.gitSource.dockerfilePath]}:null),[A,R]=m.useState(u.gitSource?`${u.gitSource.repositoryUrl}\0${u.gitSource.ref??""}`:""),[P,$]=m.useState(u.containerRepository?"existing":"managed"),[M,B]=m.useState(((mn=u.containerRepository)==null?void 0:mn.region)??Ji(t)),[I,H]=m.useState(u.containerRepository??void 0),[X,Q]=m.useState(((qt=u.imageSource)==null?void 0:qt.region)??Ji(t)),[q,U]=m.useState(u.imageSource?{region:u.imageSource.region,registry:u.imageSource.registry,namespace:u.imageSource.namespace,repository:u.imageSource.repository}:void 0),[te,le]=m.useState(((xt=u.imageSource)==null?void 0:xt.reference)??""),[oe,re]=m.useState(!1),pe=m.useMemo(()=>OB(f,t),[t,f.baseEnvironment,f.operatingSystem,f.language,f.optionIds]),K=f.dockerfile??pe,G=O!=="none",se=O==="aio-sandbox"?vB:O==="codex-sandbox"?gwe[t]:"",fe=G?p3t(b):b,Se=G?IA(se,""):"",Te=G?IA(se,fe):b,rt=y||(G?m3t(fe,se,a):HQ(b,void 0,a)),Be=!!e,Me="environment-editor-form",[Ie,qe]=m.useState(!1),[Pe,Ve]=m.useState(""),ke=!!Te.trim()&&!rt,Le=`${S.trim()}\0${C.trim()}`,Y=!g8(S,a)&&A===Le&&!!_&&(P==="managed"||Pte(I)),he=Pte(q)&&!!te.trim()&&!Nje(te,a),Oe=!!f.name.trim()&&!Ie&&(p==="custom"||p==="dockerfile"&&ke||p==="git"&&Y||p==="image"&&he),Ke=(at,bt)=>{h(_e=>({..._e,optionIds:bt?[..._e.optionIds,at]:_e.optionIds.filter(st=>st!==at)}))},et=at=>{x(""),v(G?IA(se,at):at)},Ct=async at=>{if(!at)return;const bt=await g3t(at,a);x(bt.error),bt.content&&v(bt.content)},je=()=>{x(""),v(Se)},ve=async at=>{if(at.preventDefault(),!!Oe){qe(!0),Ve("");try{const bt=Vst(Te);await s({...f,name:f.name.trim(),description:f.description.trim(),optionIds:p==="custom"?f.optionIds:[],selectedSkills:p==="custom"?f.selectedSkills:[],dockerfile:p==="dockerfile"?Te:p==="custom"?K:"",gitSource:p==="git"?{repositoryUrl:S.trim(),...C.trim()?{ref:C.trim()}:{},dockerfilePath:_}:null,containerRepository:p==="git"&&P==="existing"?I:null,imageSource:p==="image"&&q?{...q,reference:te.trim()}:null,...p==="dockerfile"?bt:{}})}catch(bt){Ve(bt instanceof Error?bt.message:String(bt)),qe(!1)}}},He=f.name.trim()||(Be?(e==null?void 0:e.name)||a("environmentCenter.configure"):a("environmentCenter.create"));return o.jsx(_h,{className:"environment-editor","aria-label":a(Be?"environmentCenter.details":"environmentCenter.create"),children:o.jsx(sE,{title:He,description:a("environmentCenter.editorDescription"),identitySeed:He,backLabel:a("environmentCenter.backToList"),onBack:n,actions:o.jsxs(o.Fragment,{children:[i?o.jsx($t,{type:"button",color:"danger",variant:"ghost",size:"sm",onClick:i,disabled:Ie,children:a("common.delete")}):null,r?o.jsx($t,{color:"secondary",variant:"soft",size:"sm",onClick:r,disabled:Ie,children:a("environmentCenter.share.action")}):null,o.jsx($t,{color:"secondary",variant:"soft",size:"sm",onClick:n,disabled:Ie,children:a("common.cancel")}),o.jsx($t,{color:"info",size:"sm",type:"submit",form:Me,disabled:!Oe,children:a(Ie?"common.saving":p==="image"?Be?"environmentCenter.save":"environmentCenter.create":Be?"environmentCenter.saveAndBuild":"environmentCenter.createAndBuild")})]}),children:o.jsxs("form",{id:Me,className:"environment-form",onSubmit:ve,children:[o.jsxs("div",{className:"environment-fields",children:[o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[a("environmentCenter.name"),o.jsx(Eu,{})]}),o.jsx(Kr,{className:"environment-text-input",type:"text",size:"lg",required:!0,value:f.name,maxLength:60,placeholder:a("environmentCenter.namePlaceholder"),onChange:at=>h(bt=>({...bt,name:at.target.value}))})]}),o.jsxs("label",{className:"environment-field",children:[o.jsx("span",{children:a("common.description")}),o.jsx(Rm,{className:"environment-description-input",size:"lg",rows:3,value:f.description,maxLength:180,placeholder:a("environmentCenter.descriptionPlaceholder"),onChange:at=>h(bt=>({...bt,description:at.target.value}))})]})]}),o.jsxs("label",{className:"environment-field environment-creation-method",children:[o.jsxs("span",{children:[a("environmentCenter.creationMethod"),o.jsx(Eu,{})]}),o.jsx(Fs,{id:"environment-creation-method",value:p,options:c,optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,triggerClassName:"environment-select-trigger",onChange:at=>{const bt=at.value;g(bt),bt==="dockerfile"&&!b.trim()&&v(Se),Ve("")}}),o.jsx("small",{children:(Nt=c.find(at=>at.value===p))==null?void 0:Nt.description})]}),Pe?o.jsx("p",{className:"environment-form-error",role:"alert",children:Pe}):null,p==="custom"?o.jsxs("div",{className:"environment-configuration",children:[o.jsx("section",{className:"environment-section environment-form-section","aria-label":a("environmentCenter.baseConfiguration"),children:o.jsxs("div",{className:"environment-form-grid",children:[o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[a("environmentCenter.baseEnvironment"),o.jsx(Eu,{})]}),o.jsx(Fs,{id:"environment-base-environment",value:f.baseEnvironment,options:S3t.map(at=>({...at,description:a(`environmentCenter.baseDescriptions.${at.value}`)})),optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,triggerClassName:"environment-select-trigger",onChange:at=>{const bt=at.value,_e=bt==="aio-sandbox"||bt==="codex-sandbox";h(st=>({...st,baseEnvironment:bt,operatingSystem:_e?"ubuntu-22.04":st.operatingSystem,language:_e?"python-3.12":st.language}))}}),o.jsx("small",{children:a(`environmentCenter.baseDescriptions.${f.baseEnvironment}`)})]}),o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[a("environmentCenter.operatingSystem"),o.jsx(Eu,{})]}),o.jsx(Fs,{id:"environment-operating-system",value:f.operatingSystem,options:C3t,optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,disabled:f.baseEnvironment!=="ubuntu",triggerClassName:"environment-select-trigger",onChange:at=>h(bt=>({...bt,operatingSystem:at.value}))}),o.jsx("small",{children:f.baseEnvironment!=="ubuntu"?a("environmentCenter.fixedByBase",{base:m6(f.baseEnvironment),value:"Ubuntu 22.04"}):a("environmentCenter.selectUbuntuVersion")})]}),o.jsxs("label",{className:"environment-field",children:[o.jsxs("span",{children:[a("environmentCenter.pythonVersion"),o.jsx(Eu,{})]}),o.jsx(Fs,{id:"environment-python-version",value:f.language,options:f.baseEnvironment!=="ubuntu"?Rte.filter(at=>at.value==="python-3.12"):Rte,optionClassName:"environment-select-option",required:!0,size:"lg",block:!0,pill:!1,disabled:f.baseEnvironment!=="ubuntu",triggerClassName:"environment-select-trigger",onChange:at=>h(bt=>({...bt,language:at.value}))}),o.jsx("small",{children:f.baseEnvironment!=="ubuntu"?a("environmentCenter.fixedByBase",{base:m6(f.baseEnvironment),value:"Python 3.12"}):a("environmentCenter.selectPythonVersion")})]})]})}),o.jsxs("section",{className:"environment-section","aria-labelledby":"environment-skills-title",children:[o.jsx("h2",{id:"environment-skills-title",children:a("environmentCenter.skills")}),o.jsxs("div",{className:"environment-skill-grid",children:[o.jsx(jte,{name:"VeADK",description:a("environmentCenter.veadkDescription"),selected:oe,disabled:Ie,onChange:re,icon:o.jsx("img",{src:gR,alt:""})}),o.jsx(VQ,{selected:f.selectedSkills,onChange:at=>h(bt=>({...bt,selectedSkills:at})),cloudProvider:t,disabled:Ie,addLabel:a("environmentCenter.addSkill"),showSelectedCount:!1})]})]}),xB.map(at=>o.jsxs("section",{className:"environment-section","aria-labelledby":`environment-${at.id}-title`,children:[o.jsx("h2",{id:`environment-${at.id}-title`,children:a(`environmentCenter.categories.${at.id}`)}),o.jsx("div",{className:"environment-option-grid",children:at.options.map(bt=>{const _e=f.optionIds.includes(bt.id);return o.jsx(jte,{name:bt.label,description:a(`environmentCenter.options.${bt.id}`,{defaultValue:bt.description}),selected:_e,onChange:st=>Ke(bt.id,st),icon:o.jsx(D3t,{option:bt})},bt.id)})})]},at.id))]}):p==="dockerfile"?o.jsxs("section",{className:"environment-upload","aria-label":a("environmentCenter.customDockerfile"),children:[o.jsx("div",{className:"environment-dockerfile-settings environment-form-grid",children:o.jsxs("label",{className:"environment-field",children:[o.jsx("span",{children:a("environmentCenter.presetEnvironment")}),o.jsx(Fs,{id:"environment-dockerfile-base-environment",value:O,options:k3t(a),optionClassName:"environment-select-option",size:"lg",block:!0,pill:!1,triggerClassName:"environment-select-trigger",onChange:at=>{x(""),k(at.value)}}),o.jsx("small",{children:a("environmentCenter.presetHint")})]})}),o.jsxs("div",{className:"environment-upload__preview",children:[o.jsxs("div",{children:[o.jsxs("h3",{children:["Dockerfile",o.jsx(Eu,{})]}),o.jsxs("div",{className:"environment-upload__actions",children:[o.jsx("span",{className:"environment-upload__size",children:a("environmentCenter.dockerfileSize",{size:Eje(Te).toLocaleString(l.resolvedLanguage??l.language),max:131072 .toLocaleString(l.resolvedLanguage??l.language)})}),o.jsx("input",{ref:w,className:"environment-upload__file-input",type:"file",accept:".dockerfile,text/plain",tabIndex:-1,hidden:!0,onChange:at=>{var _e;const bt=at.currentTarget;Ct((_e=bt.files)==null?void 0:_e[0]).finally(()=>{bt.value=""})}}),o.jsx($t,{className:"environment-upload__action",type:"button",color:"secondary",variant:"soft",size:"sm",pill:!1,disabled:Ie,onClick:()=>{var at;return(at=w.current)==null?void 0:at.click()},children:a("environmentCenter.upload")}),o.jsx($t,{className:"environment-upload__action",type:"button",color:"secondary",variant:"ghost",size:"sm",pill:!1,disabled:Ie||!fe,onClick:je,children:a("environmentCenter.reset")})]})]}),o.jsxs("div",{className:`environment-dockerfile-editor${G?" has-fixed-base":""}${rt?" is-invalid":""}`,children:[G?o.jsxs("div",{className:"environment-dockerfile-from","aria-label":a("environmentCenter.dockerfileBaseImage"),children:[o.jsx("span",{className:"environment-dockerfile-from__line","aria-hidden":"true",children:"1"}),o.jsxs("code",{children:[o.jsx("span",{className:"environment-dockerfile-from__keyword",children:"FROM"}),o.jsx("span",{title:se,children:se})]})]}):null,o.jsx("div",{className:"environment-dockerfile__editor environment-upload__editor","aria-label":a("environmentCenter.dockerfileContent"),children:o.jsx($E,{value:fe,path:"Dockerfile",lineNumberStart:G?2:1,height:"auto",minHeight:"28px",maxHeight:"var(--environment-dockerfile-editor-max-height)",onChange:et})})]})]}),rt?o.jsx("p",{className:"environment-upload__error environment-upload__error--below",role:"alert",children:rt}):null]}):p==="git"?o.jsxs("div",{className:"environment-source-workflow",children:[o.jsx(Q3t,{repositoryUrl:S,gitRef:C,dockerfilePath:_,inspection:T,inspectedKey:A,disabled:Ie,onRepositoryUrlChange:E,onGitRefChange:N,onDockerfilePathChange:j,onInspectionChange:L,onInspectedKeyChange:R}),o.jsx(z3t,{cloudProvider:t,mode:P,region:M,value:I,disabled:Ie,onModeChange:at=>{$(at),Ve("")},onRegionChange:at=>{B(at),H(void 0),Ve("")},onChange:H})]}):o.jsx(V3t,{cloudProvider:t,region:X,repository:q,reference:te,disabled:Ie,onRegionChange:at=>{Q(at),U(void 0),Ve("")},onRepositoryChange:U,onReferenceChange:le})]})})})}function Pje({cloudProvider:e="volcengine",onWorkspace:t,clipboardImport:n=null,clipboardReadError:i=""}){const{t:r,i18n:s}=xe("ui"),[a,l]=m.useState([]),[c,u]=m.useState({kind:"list"}),[d,f]=m.useState(""),[h,p]=m.useState(null),[g,b]=m.useState(null),[v,y]=m.useState(null),[x,w]=m.useState(null),[O,k]=m.useState(null),S=m.useRef(0),[E,C]=m.useState(""),[N,_]=m.useState(!1),[j,T]=m.useState(i),[L,A]=m.useState(!0),[R,P]=m.useState(""),[$,M]=m.useState(0),[B,I]=m.useState(()=>new Set),H=m.useDeferredValue(d),X=m.useMemo(()=>{const K=H.trim().toLocaleLowerCase();return K?a.filter(G=>`${G.name} ${G.description} ${p6(G.operatingSystem)} ${ch(G.language)} ${m6(G.baseEnvironment)}`.toLocaleLowerCase().includes(K)):a},[H,a]),Q=m.useCallback((K="",G=!1)=>{S.current+=1,k({key:S.current,initialValue:K,autoInspect:G})},[]),q=m.useCallback((K,G=!1)=>{const se=K.trim();if(!se.startsWith("akenv://")||!G&&Ite.has(se))return!1;const fe=VF(se);return!fe.length||fe.length>m8?!1:(Ite.add(se),T(""),Q(se,!0),!0)},[Q]),U=m.useCallback(async()=>{var K;if(!(c.kind!=="list"||O)){if(typeof navigator>"u"||!((K=navigator.clipboard)!=null&&K.readText)){T(r("environmentCenter.clipboardUnsupported"));return}try{const G=await navigator.clipboard.readText();!q(G)&&!G.trim()&&await A3t()&&T(r("environmentCenter.clipboardReadError"))}catch{T(r("environmentCenter.clipboardReadError"))}}},[O,q,r,c.kind]);m.useEffect(()=>{const K=new AbortController;return a.length===0&&A(!0),P(""),Fk(K.signal).then(G=>{l(G)}).catch(G=>{(G==null?void 0:G.name)!=="AbortError"&&P(G instanceof Error?G.message:String(G))}).finally(()=>{K.signal.aborted||A(!1)}),()=>K.abort()},[$]),m.useEffect(()=>{if(!a.some(G=>G.latestVersion&&Qg.has(G.latestVersion.status)))return;const K=window.setTimeout(()=>M(G=>G+1),2500);return()=>window.clearTimeout(K)},[a]),m.useEffect(()=>{if(!E||N)return;const K=window.setTimeout(()=>C(""),2800);return()=>window.clearTimeout(K)},[N,E]),m.useEffect(()=>{i&&T(i)},[i]),m.useEffect(()=>{n&&q(n.text)},[n,q]),m.useEffect(()=>{if(c.kind!=="list")return;const K=()=>void U(),G=()=>{document.visibilityState==="visible"&&U()},se=fe=>{var rt;const Se=fe.target;if(Se instanceof HTMLInputElement||Se instanceof HTMLTextAreaElement||Se instanceof HTMLElement&&Se.isContentEditable)return;const Te=((rt=fe.clipboardData)==null?void 0:rt.getData("text/plain"))??"";q(Te,!0)&&fe.preventDefault()};return window.addEventListener("focus",K),document.addEventListener("visibilitychange",G),window.addEventListener("paste",se),()=>{window.removeEventListener("focus",K),document.removeEventListener("visibilitychange",G),window.removeEventListener("paste",se)}},[q,U,c.kind]);const te=c.kind==="editor"&&c.environmentId?a.find(K=>K.id===c.environmentId):void 0,le=async K=>{const G={...K,dockerfile:K.dockerfile??OB(K,e)},se=te?await O0e(te.id,G):await x0e(G);if(l(fe=>[se,...fe.filter(Se=>Se.id!==se.id)]),u({kind:"list"}),_(!1),G.imageSource){C(r("environmentCenter.status.boundImage",{name:se.name}));return}try{const fe=await m4(se.id);l(Se=>Se.map(Te=>Te.id===se.id?{...Te,latestVersion:fe}:Te)),C(r("environmentCenter.status.queued",{name:se.name}))}catch(fe){_(!0),C(r("environmentCenter.status.savedBuildFailed",{error:fe instanceof Error?fe.message:String(fe)}))}},oe=async K=>{if(!B.has(K.id)){I(G=>new Set(G).add(K.id)),_(!1);try{const G=await m4(K.id);l(se=>se.map(fe=>fe.id===K.id?{...fe,latestVersion:G}:fe)),C(r("environmentCenter.status.queued",{name:K.name}))}catch(G){_(!0),C(G instanceof Error?G.message:String(G))}finally{I(G=>{const se=new Set(G);return se.delete(K.id),se})}}},re=(K,G,se,fe)=>{K.length&&l(Se=>{const Te=new Set(K.map(rt=>rt.id));return[...K,...Se.filter(rt=>!Te.has(rt.id))]}),_(fe>0),C(fe>0?r("environmentCenter.status.importedFailed",{created:G,failed:fe}):se>0?r("environmentCenter.status.importedDuplicate",{created:G,duplicate:se}):r("environmentCenter.status.imported",{count:G}))},pe=h?o.jsx(dc,{title:r("environmentCenter.deleteTitle"),description:r("environmentCenter.deleteDescription",{name:h.name}),confirmLabel:r("common.delete"),variant:"danger",onCancel:()=>p(null),onConfirm:()=>{const K=h;p(null),u({kind:"list"}),w0e(K.id).then(()=>{l(G=>G.filter(se=>se.id!==K.id)),_(!1),C(r("environmentCenter.status.deleted",{name:K.name}))}).catch(G=>{_(!0),C(G instanceof Error?G.message:String(G))})}}):null;return c.kind==="editor"?o.jsxs(o.Fragment,{children:[o.jsx(W3t,{environment:te,cloudProvider:e,onCancel:()=>u({kind:"list"}),onDelete:te?()=>p(te):void 0,onShare:te?()=>w(te):void 0,onSave:le},c.environmentId??"new"),x?o.jsx(H3t,{environment:x,onClose:()=>w(null)}):null,pe]}):o.jsxs(_h,{className:"environment-center","aria-label":r("environmentCenter.title"),children:[o.jsx(Fx,{title:r("environmentCenter.title")}),o.jsxs(Kb,{className:"environment-toolbar",children:[t?o.jsx(aE,{items:[{id:"workspaces",label:r("workspace.title")},{id:"environments",label:r("environmentCenter.title")}],value:"environments",onChange:K=>{K==="workspaces"&&t()},ariaLabel:r("workspace.resourceType"),idPrefix:"environment-center"}):null,o.jsxs("div",{className:"resource-toolbar__actions",children:[E?o.jsx("span",{className:`environment-status${N?" is-error":""}`,role:N?"alert":"status","aria-live":"polite",children:E}):null,o.jsx(Om,{"aria-label":r("environmentCenter.search"),value:d,onChange:K=>f(K.target.value),placeholder:r("environmentCenter.search")})]})]}),j?o.jsxs("div",{className:"environment-clipboard-notice",role:"alert",children:[o.jsx("span",{children:j}),o.jsx($t,{type:"button",color:"secondary",variant:"soft",size:"sm",onClick:()=>{T(""),Q()},children:r("environmentCenter.manualImport")})]}):null,o.jsx(Gb,{"aria-live":"polite",children:L?o.jsx(Vd,{}):R?o.jsxs("div",{className:"environment-load-error",role:"alert",children:[o.jsx("p",{children:Pd(R,s.resolvedLanguage||s.language)||r("environmentCenter.loadFailed")}),o.jsx($t,{color:"secondary",variant:"soft",size:"sm",onClick:()=>M(K=>K+1),children:r("common.reload")})]}):X.length===0&&d.trim()?o.jsx("div",{className:"environment-empty",children:o.jsxs(On,{fill:"none",children:[o.jsx(On.Icon,{children:o.jsx(I3t,{})}),o.jsx(On.Title,{children:r("environmentCenter.noMatches")}),o.jsx(On.Description,{children:r("environmentCenter.tryAnotherName")})]})}):o.jsxs(Bx,{children:[d.trim()?null:o.jsxs(o.Fragment,{children:[o.jsx(wb,{"aria-label":r("environmentCenter.create"),icon:o.jsx(N3t,{}),onClick:()=>u({kind:"editor",environmentId:null}),children:r("environmentCenter.create")}),o.jsx(wb,{"aria-label":r("environmentCenter.import.title"),icon:o.jsx(j3t,{}),onClick:()=>Q(),children:r("environmentCenter.import.title")})]}),X.map(K=>{var Se,Te;const G=jje(K,r),se=!!(K.latestVersion&&Qg.has(K.latestVersion.status)),fe=B.has(K.id);return o.jsx(cE,{className:"environment-card",title:K.name,status:o.jsx(ma,{color:G.color,size:"sm",children:G.label}),description:((Se=K.latestVersion)==null?void 0:Se.error)||(se?(Te=K.latestVersion)==null?void 0:Te.currentStep:"")||K.description||r("common.noDescription"),metadata:[{label:r("workspace.updated"),value:L3t(K.updatedAt,s.resolvedLanguage??s.language),title:$3t(K.updatedAt,s.resolvedLanguage??s.language)}],action:{label:K.latestVersion?r("environmentCenter.buildDetails.title"):r(fe?"environmentCenter.buildDetails.starting":"environmentCenter.startBuild"),icon:"play",title:r("environmentCenter.build"),disabled:fe,onClick:()=>K.latestVersion?b(K.id):void oe(K)},auxiliaryAction:{label:r("environmentCenter.manifest.view"),icon:o.jsx(NFe,{}),title:K.latestVersion?r("environmentCenter.manifest.viewShort"):r("environmentCenter.manifest.unavailable"),disabled:!K.latestVersion,onClick:()=>y(K)},detailAction:{label:r("environmentCenter.configure"),onClick:()=>u({kind:"editor",environmentId:K.id})}},K.id)})]})}),g?(()=>{const K=a.find(G=>G.id===g);return K?o.jsx(U3t,{environment:K,onClose:()=>b(null),onBuildUpdate:G=>{l(se=>se.map(fe=>fe.id===K.id?{...fe,latestVersion:G}:fe))},onRebuild:()=>oe(K)}):null})():null,v!=null&&v.latestVersion?o.jsx(B3t,{environment:v,onClose:()=>y(null)}):null,pe,O?o.jsx(q3t,{initialValue:O.initialValue,autoInspect:O.autoInspect,onClose:()=>k(null),onImported:re},O.key):null]})}function K3t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round","aria-hidden":"true",...e,children:o.jsx("path",{d:"M8 3.25v9.5M3.25 8h9.5"})})}function G3t(e){return o.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"4.5",y:"7",width:"23",height:"18",rx:"3"}),o.jsx("path",{d:"M10 7V5.5A1.5 1.5 0 0 1 11.5 4h4A1.5 1.5 0 0 1 17 5.5V7M9 13h5v5H9zM18 13h5M18 17h5M9 22h14"})]})}function b8(e,t){const n=Date.parse(e);return Number.isNaN(n)?e:new Intl.DateTimeFormat(t,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(n)}function X3t(e,t){return e.environmentIds.reduce((n,i)=>{var r,s;return((s=(r=t.get(i))==null?void 0:r.latestVersion)==null?void 0:s.status)==="available"?n+1:n},0)}function Y3t({workspace:e,environments:t,onBack:n,onSave:i,onDelete:r}){const{t:s,i18n:a}=xe("ui"),[l,c]=m.useState((e==null?void 0:e.name)??""),[u,d]=m.useState((e==null?void 0:e.description)??""),[f,h]=m.useState((e==null?void 0:e.environmentIds)??[]),[p,g]=m.useState(""),[b,v]=m.useState(!1),[y,x]=m.useState(""),w=p.trim().toLocaleLowerCase(),O=t.filter(S=>`${S.name} ${S.description} ${ch(S.language)}`.toLocaleLowerCase().includes(w)),k=async S=>{if(S.preventDefault(),!(!l.trim()||b)){v(!0),x("");try{await i({name:l.trim(),description:u.trim(),environmentIds:f})}catch(E){x(E instanceof Error?E.message:String(E)),v(!1)}}};return o.jsx(_h,{className:"workspace-center","aria-label":s(e?"workspace.detail":"workspace.create"),children:o.jsxs(sE,{title:e?e.name:s("workspace.create"),description:s("workspace.editorDescription"),identitySeed:(e==null?void 0:e.name)||s("workspace.create"),backLabel:s("workspace.backToList"),onBack:n,actions:o.jsxs(o.Fragment,{children:[r?o.jsx("button",{type:"button",className:"is-danger",onClick:r,children:s("common.delete")}):null,o.jsx("button",{type:"submit",form:"workspace-form",disabled:b||!l.trim(),children:s(b?"common.saving":"common.save")})]}),children:[e?o.jsxs(SB,{children:[o.jsxs("div",{children:[o.jsx("dt",{children:s("common.environment")}),o.jsx("dd",{children:s("workspace.environmentCount",{count:f.length})})]}),o.jsxs("div",{children:[o.jsx("dt",{children:s("workspace.createdAt")}),o.jsx("dd",{children:b8(e.createdAt,a.resolvedLanguage??a.language)})]}),o.jsxs("div",{children:[o.jsx("dt",{children:s("workspace.updatedAt")}),o.jsx("dd",{children:b8(e.updatedAt,a.resolvedLanguage??a.language)})]})]}):null,o.jsxs("form",{id:"workspace-form",className:"workspace-form",onSubmit:k,children:[o.jsxs("section",{className:"workspace-fields","aria-label":s("workspace.basicInfo"),children:[o.jsxs("label",{children:[o.jsx("span",{children:s("common.name")}),o.jsx(Kr,{value:l,maxLength:128,autoFocus:!0,onChange:S=>c(S.target.value),placeholder:s("workspace.namePlaceholder")})]}),o.jsxs("label",{children:[o.jsx("span",{children:s("common.description")}),o.jsx(Rm,{value:u,maxLength:2e3,onChange:S=>d(S.target.value),placeholder:s("workspace.descriptionPlaceholder")})]})]}),o.jsxs("section",{className:"workspace-environments",children:[o.jsx(Pwe,{title:s("common.environment"),description:s("workspace.selectedEnvironmentCount",{count:f.length}),actions:o.jsx(Om,{"aria-label":s("workspace.searchAvailableEnvironments"),value:p,onChange:S=>g(S.target.value),placeholder:s("workspace.searchEnvironments")})}),t.length===0?o.jsxs("div",{className:"workspace-environment-empty",children:[o.jsx("p",{children:s("workspace.noAvailableEnvironments")}),o.jsx("span",{children:s("workspace.createEnvironmentFirst")})]}):O.length===0?o.jsxs("div",{className:"workspace-environment-empty",children:[o.jsx("p",{children:s("workspace.noMatchingEnvironments")}),o.jsx("span",{children:s("workspace.tryAnotherName")})]}):o.jsx("div",{className:"workspace-environment-list",children:O.map(S=>{var N;const E=f.includes(S.id),C=((N=S.latestVersion)==null?void 0:N.status)==="available"?s("workspace.environmentStatus.available"):S.latestVersion?s("workspace.environmentStatus.building"):s("workspace.environmentStatus.notBuilt");return o.jsxs("label",{className:`workspace-environment-option${E?" is-selected":""}`,children:[o.jsx("input",{type:"checkbox",checked:E,onChange:()=>h(_=>E?_.filter(j=>j!==S.id):[..._,S.id])}),o.jsxs("span",{className:"workspace-environment-option__copy",children:[o.jsx("strong",{title:S.name,children:S.name}),o.jsxs("span",{children:[ch(S.language)," · ",C]})]}),o.jsx("span",{className:"workspace-environment-option__action",children:s(E?"workspace.added":"common.add")})]},S.id)})})]}),y?o.jsx("p",{className:"workspace-form-error",role:"alert",children:y}):null]})]})})}function Z3t({onEnvironment:e}){const{t,i18n:n}=xe("ui"),[i,r]=m.useState([]),[s,a]=m.useState([]),[l,c]=m.useState({kind:"list"}),[u,d]=m.useState(""),[f,h]=m.useState(!0),[p,g]=m.useState(""),[b,v]=m.useState(""),[y,x]=m.useState(!1),[w,O]=m.useState(null),[k,S]=m.useState(0),E=m.useDeferredValue(u);m.useEffect(()=>{const j=new AbortController;return h(!0),g(""),Promise.all([WF(j.signal),Fk(j.signal)]).then(([T,L])=>{r(T),a(L)}).catch(T=>{(T==null?void 0:T.name)!=="AbortError"&&(console.warn("Unable to load Studio workspaces",T),g(t("workspace.loadFailed")))}).finally(()=>{j.signal.aborted||h(!1)}),()=>j.abort()},[k,t]),m.useEffect(()=>{if(!b||y)return;const j=window.setTimeout(()=>v(""),2800);return()=>window.clearTimeout(j)},[y,b]);const C=m.useMemo(()=>new Map(s.map(j=>[j.id,j])),[s]),N=m.useMemo(()=>{const j=E.trim().toLocaleLowerCase();return j?i.filter(T=>{const L=T.environmentIds.map(A=>{var R;return((R=C.get(A))==null?void 0:R.name)??""}).join(" ");return`${T.name} ${T.description} ${L}`.toLocaleLowerCase().includes(j)}):i},[E,C,i]),_=l.kind==="detail"&&l.workspaceId?i.find(j=>j.id===l.workspaceId):void 0;return l.kind==="detail"?o.jsx(Y3t,{workspace:_,environments:s,onBack:()=>c({kind:"list"}),onDelete:_?()=>O(_):null,onSave:async j=>{const T=_?await h0e(_.id,j):await f0e(j);r(L=>[T,...L.filter(A=>A.id!==T.id)]),x(!1),v(t("workspace.saved",{name:T.name})),c({kind:"list"})}},l.workspaceId??"new"):o.jsxs(_h,{className:"workspace-center","aria-label":t("workspace.title"),children:[o.jsx(Fx,{title:t("workspace.title")}),o.jsxs(Kb,{children:[o.jsx(aE,{items:[{id:"workspaces",label:t("workspace.title")},{id:"environments",label:t("common.environment")}],value:"workspaces",onChange:j=>{j==="environments"&&e()},ariaLabel:t("workspace.resourceType"),idPrefix:"workspace-center"}),o.jsxs("div",{className:"resource-toolbar__actions",children:[b?o.jsx("span",{className:`workspace-status${y?" is-error":""}`,role:y?"alert":"status","aria-live":"polite",children:b}):null,o.jsx(Om,{"aria-label":t("workspace.searchWorkspaces"),value:u,onChange:j=>d(j.target.value),placeholder:t("workspace.searchWorkspaces")})]})]}),o.jsx(Gb,{"aria-live":"polite",children:f?o.jsx(Vd,{}):p?o.jsxs("div",{className:"workspace-load-error",role:"alert",children:[o.jsx("p",{children:p}),o.jsx($t,{color:"secondary",variant:"soft",size:"sm",onClick:()=>S(j=>j+1),children:t("common.reload")})]}):N.length===0&&u.trim()?o.jsx("div",{className:"workspace-empty",children:o.jsxs(On,{fill:"none",children:[o.jsx(On.Icon,{children:o.jsx(G3t,{})}),o.jsx(On.Title,{children:t("workspace.noMatchingWorkspaces")}),o.jsx(On.Description,{children:t("workspace.tryAnotherNameOrEnvironment")})]})}):o.jsxs(Bx,{children:[u.trim()?null:o.jsx(wb,{"aria-label":t("workspace.create"),icon:o.jsx(K3t,{}),onClick:()=>c({kind:"detail",workspaceId:null}),children:t("workspace.create")}),N.map(j=>{const T=X3t(j,C),L=j.environmentIds.filter(A=>!C.has(A)).length;return o.jsx(cE,{className:"workspace-card",title:j.name,status:o.jsx(ma,{color:L?"danger":T===j.environmentIds.length&&T>0?"success":"secondary",size:"sm",children:j.environmentIds.length===0?t("workspace.noEnvironmentAdded"):L?t("workspace.environmentMissing"):t("workspace.availableFraction",{available:T,total:j.environmentIds.length})}),description:j.description||t("common.noDescription"),metadata:[{label:t("common.environment"),value:t("workspace.environmentCount",{count:j.environmentIds.length})},{label:t("workspace.available"),value:t("workspace.availableCount",{count:T})},{label:t("workspace.updated"),value:b8(j.updatedAt,n.resolvedLanguage??n.language)}],detailAction:{label:t("common.manage"),onClick:()=>c({kind:"detail",workspaceId:j.id})},action:{label:t("workspace.addEnvironment"),icon:"plus",onClick:()=>c({kind:"detail",workspaceId:j.id})}},j.id)})]})}),w?o.jsx(dc,{title:t("workspace.deleteTitle"),description:t("workspace.deleteDescription",{name:w.name}),confirmLabel:t("common.delete"),variant:"danger",onCancel:()=>O(null),onConfirm:()=>{const j=w;O(null),p0e(j.id).then(()=>{r(T=>T.filter(L=>L.id!==j.id)),x(!1),v(t("workspace.deleted",{name:j.name})),c({kind:"list"})}).catch(T=>{x(!0),v(T instanceof Error?T.message:String(T))})}}):null]})}function J3t({cloudProvider:e}){const{t}=xe("ui"),[n,i]=m.useState("workspaces"),[r,s]=m.useState(null),[a,l]=m.useState(""),c=m.useRef(0),u=()=>{var h;c.current+=1;const d=c.current;l("");let f=null;if(typeof navigator<"u"&&((h=navigator.clipboard)!=null&&h.readText))try{f=navigator.clipboard.readText()}catch{l(t("workspace.clipboardPermissionError"))}else l(t("workspace.clipboardUnsupported"));i("environments"),f&&f.then(async p=>{var g;if(c.current===d){if(p.trim()){s({key:d,text:p});return}try{const b=await((g=navigator.permissions)==null?void 0:g.query({name:"clipboard-read"}));c.current===d&&(b==null?void 0:b.state)==="denied"&&l(t("workspace.clipboardPermissionError"))}catch{}}}).catch(()=>{c.current===d&&l(t("workspace.clipboardPermissionError"))})};return n==="environments"?o.jsx(Pje,{cloudProvider:e,onWorkspace:()=>i("workspaces"),clipboardImport:r,clipboardReadError:a}):o.jsx(Z3t,{onEnvironment:u})}function e4t(e){return e==="127.0.0.1"}const t4t={id:"coding-agents",kind:"coding-agent",category:"development",icon:"coding-agents",name:"Configure coding agents",badge:"Local",badgeTone:"success",description:"Install built-in VeADK and AgentKit skills globally for Trae, Claude Code, or Codex."},n4t={id:"feishu",kind:"feishu",category:"channels",icon:"feishu",name:"Feishu bot",badge:"Beta",description:"Create a Feishu bot and connect its messages directly to AgentKit Runtime."},i4t="https://api.github.com",r4t=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/,Mte=/^[A-Za-z0-9][A-Za-z0-9._/-]{0,199}$/,s4t=/^[A-Za-z0-9._/-]+$/;function a4t(e,t,n){return e===401||e===403?V("github.invalidToken"):e===404?V("github.notFound"):e===422?V("github.rejectedCommit"):String((t==null?void 0:t.message)||"").split(n).join("***").trim().slice(0,240)||V("github.requestFailed",{status:e})}async function cg(e,t){const n={Accept:"application/vnd.github+json",Authorization:`Bearer ${t.token}`,"X-GitHub-Api-Version":"2022-11-28"};t.body&&(n["Content-Type"]="application/json");let i;try{i=await fetch(`${i4t}${e}`,{method:t.method||"GET",headers:n,body:t.body?JSON.stringify(t.body):void 0,signal:t.signal})}catch(s){throw t.signal.aborted?s:new Error(V("github.networkFailed"))}const r=await i.json().catch(()=>null);if(!t.expected.includes(i.status))throw new Error(a4t(i.status,r,t.token));return{status:i.status,payload:r}}function iL(e){return e.split("/").map(encodeURIComponent).join("/")}function o4t(e){const t=new TextEncoder().encode(e);let n="";const i=32768;for(let r=0;r({...h,path:qQ(h.path,"")})),s=AbortSignal.any([t,AbortSignal.timeout(6e4)]),a=`/repos/${n}`;await cg(`${a}`,{token:e.token,expected:[200],signal:s});const c=(f=(await cg(`${a}/git/ref/heads/${iL(i)}`,{token:e.token,expected:[200],signal:s})).payload.object)==null?void 0:f.sha;if(!c)throw new Error(V("github.missingBaseSha"));const u=l4t(e.branchPrefix);await cg(`${a}/git/refs`,{token:e.token,expected:[201],signal:s,method:"POST",body:{ref:`refs/heads/${u}`,sha:c}});let d=!0;try{for(const p of r){const g=iL(p.path),b=await cg(`${a}/contents/${g}?ref=${encodeURIComponent(i)}`,{token:e.token,expected:[200,404],signal:s});if(p.mustBeNew&&b.status===200)throw new Error(V("github.fileAlreadyExists",{path:p.path}));if(b.status===200&&!b.payload.sha)throw new Error(V("github.pathNotUpdatable",{path:p.path}));await cg(`${a}/contents/${g}`,{token:e.token,expected:[200,201],signal:s,method:"PUT",body:{message:p.commitMessage,content:o4t(p.content),branch:u,...b.payload.sha?{sha:b.payload.sha}:{}}})}const h=await cg(`${a}/pulls`,{token:e.token,expected:[201],signal:s,method:"POST",body:{title:e.title,head:u,base:i,body:e.description}});if(!h.payload.number||!h.payload.html_url)throw new Error(V("github.invalidPullRequest"));return d=!1,{number:h.payload.number,url:h.payload.html_url,branch:u}}finally{d&&await cg(`${a}/git/refs/heads/${iL(u)}`,{token:e.token,expected:[204],signal:AbortSignal.timeout(15e3),method:"DELETE"}).catch(()=>{})}}Zt.hasResourceBundle("en-US","automations")||Zt.addResourceBundle("en-US","automations",Mre,!0,!0);Zt.hasResourceBundle("zh-CN","automations")||Zt.addResourceBundle("zh-CN","automations",Jle,!0,!0);function Ja(e,t={}){return Zt.t(e,{...t,ns:"automations"})}const KQ={name:"repository",label:"GitHub Repo",placeholder:"owner/repository",help:"Enter owner/repository or a full github.com URL",required:!0},GQ={name:"baseBranch",label:"Target branch",placeholder:"main",help:"Defaults to main; the pull request will use this branch as its base",required:!1},Mje={name:"runtimeName",label:"Runtime name",placeholder:"support-agent",help:"Used by the AgentKit delivery configuration",required:!0},Lje={name:"runtimeId",label:"Runtime ID",placeholder:"rt-xxxxxxxx",help:"The AgentKit Runtime that will receive continuous updates",required:!0},c4t="https://ark.cn-beijing.volces.com/api/coding/v3";function u4t(e){return e==="byteplus"?yl(e):c4t}function PI(e){return e==="byteplus"?{accessKey:"BYTEPLUS_ACCESS_KEY",secretKey:"BYTEPLUS_SECRET_KEY",sessionToken:"BYTEPLUS_SESSION_TOKEN"}:{accessKey:"VOLCENGINE_ACCESS_KEY",secretKey:"VOLCENGINE_SECRET_KEY",sessionToken:"VOLCENGINE_SESSION_TOKEN"}}function XQ(e){const t=PI(e);return[Ja("github.secretPair",{accessKey:t.accessKey,secretKey:t.secretKey}),Ja("github.sessionToken",{sessionToken:t.sessionToken})]}function YQ(e){return e==="byteplus"?"BytePlus":"Volcengine"}function ZQ(e,t={}){return{repository:"",baseBranch:"main",projectPath:".",runtimeName:"",runtimeId:"",sandboxToolId:"",modelName:"",modelBaseUrl:u4t(e),region:Ji(e),token:"",...t}}function JQ(e){return{repository:e.repository.trim(),baseBranch:e.baseBranch.trim()||"main",region:e.region,token:e.token.trim()}}const d4t=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/,f4t=/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/;function h4t(e){if(!d4t.test(e.sandboxToolId))throw new Error(Ja("github.validation.sandboxToolId"));if(!f4t.test(e.modelName))throw new Error(Ja("github.validation.modelName"));let t;try{t=new URL(e.modelBaseUrl)}catch{throw new Error(Ja("github.validation.modelBaseUrlSafe"))}if(t.protocol!=="https:"||!t.hostname||t.username||t.password||t.search||t.hash)throw new Error(Ja("github.validation.modelBaseUrlSafe"))}function p4t(e){h4t(e);const t=e.cloudProvider??"volcengine",n=PI(t),i=t==="byteplus"?` VOLCENGINE_ACCESS_KEY: \${{ secrets.${n.accessKey} }} VOLCENGINE_SECRET_KEY: \${{ secrets.${n.secretKey} }} VOLCENGINE_SESSION_TOKEN: \${{ secrets.${n.sessionToken} }}`:"",r=t==="byteplus"?` BYTEPLUS_REGION: ${JSON.stringify(e.region)}`:` VOLCENGINE_REGION: ${JSON.stringify(e.region)}`,s=String.raw`name: PR Automated Review @@ -912,12 +912,12 @@ __PROVIDER_REGION_ENV__ gh pr review "__GH__ github.event.pull_request.number }}" \ --comment \ --body-file review-body.md -`,a={__GH__:"${{",__REGION__:JSON.stringify(e.region),__CLOUD_PROVIDER__:JSON.stringify(t),__ACCESS_KEY_SECRET__:n.accessKey,__SECRET_KEY_SECRET__:n.secretKey,__SESSION_TOKEN_SECRET__:n.sessionToken,__BYTEPLUS_COMPATIBILITY_ENV__:i,__PROVIDER_REGION_ENV__:r,__SANDBOX_TOOL_ID__:JSON.stringify(e.sandboxToolId),__MODEL_NAME__:JSON.stringify(e.modelName),__MODEL_BASE_URL__:JSON.stringify(e.modelBaseUrl)};return Object.entries(a).reduce((l,[c,u])=>l.split(c).join(u),s)}const f4t={id:"review",kind:"github",category:"development",icon:"github",name:"Automated PR review",description:"Review code changes in an isolated Sandbox and publish the result to the pull request.",title:"Automated PR review",subtitle:"Inspect code changes in an isolated Sandbox and publish the result to the pull request",panel:"The workflow reviews only non-draft pull requests from the same repository. Pull requests from forks cannot access repository secrets.",submitLabel:"Add review and create PR",fields:[GQ,XQ,{name:"sandboxToolId",label:"Sandbox Tool ID",placeholder:"tool-xxxxxxxx",help:"The AgentKit CodeEnv used for each review",required:!0},{name:"modelName",label:"Review model",placeholder:"review-model",help:"The code review model name injected into the Sandbox",required:!0},{name:"modelBaseUrl",label:"Model API URL",placeholder:"https://ark.example.com/api/v3",help:"Must be an OpenAI-compatible HTTPS endpoint",required:!0}],initialValues:({cloudProvider:e})=>JQ(e),regionHelp:"Must match the Sandbox Tool region",secrets:({cloudProvider:e})=>{const[t,n]=YQ(e);return[t,eo("github.requiredSecret",{name:"CODEX_MODEL_API_KEY"}),n]},submit(e,t,n){const i=ez(e);return KQ({...i,files:[{path:".github/workflows/codex-pr-review.yml",content:d4t({sandboxToolId:e.sandboxToolId.trim(),modelName:e.modelName.trim(),modelBaseUrl:e.modelBaseUrl.trim(),region:i.region,cloudProvider:t.cloudProvider}),commitMessage:"chore: configure PR automated review"}],branchPrefix:"chore/pr-automated-review",title:eo("cards.review.pullRequest.title"),description:eo("cards.review.pullRequest.description")},n)}},h4t=/^[A-Za-z0-9_-]+$/,Lje=4,ij=64,rj=6,Bte="agent-runtime";function $je(e){const t=e.trim();if(!t)return Bte;let n=t.replace(/[^A-Za-z0-9_-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,ij);return n?(n.lengthIt(`validation.runtimeName.${n}`)){return e?h4t.test(e)?e.lengthij?t("length"):null:t("characters"):t("required")}const g4t=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/,b4t="cn-hongkong";function y4t(e){const t=zE(e.runtimeName,n=>eo(`github.validation.runtimeName.${n}`));if(t)throw new Error(t);if(!g4t.test(e.runtimeId))throw new Error(eo("github.validation.runtimeId"))}function Bje(e){y4t(e);const t=e.cloudProvider??"volcengine",n=MI(t),i=t==="byteplus"?` +`,a={__GH__:"${{",__REGION__:JSON.stringify(e.region),__CLOUD_PROVIDER__:JSON.stringify(t),__ACCESS_KEY_SECRET__:n.accessKey,__SECRET_KEY_SECRET__:n.secretKey,__SESSION_TOKEN_SECRET__:n.sessionToken,__BYTEPLUS_COMPATIBILITY_ENV__:i,__PROVIDER_REGION_ENV__:r,__SANDBOX_TOOL_ID__:JSON.stringify(e.sandboxToolId),__MODEL_NAME__:JSON.stringify(e.modelName),__MODEL_BASE_URL__:JSON.stringify(e.modelBaseUrl)};return Object.entries(a).reduce((l,[c,u])=>l.split(c).join(u),s)}const m4t={id:"review",kind:"github",category:"development",icon:"github",name:"Automated PR review",description:"Review code changes in an isolated Sandbox and publish the result to the pull request.",title:"Automated PR review",subtitle:"Inspect code changes in an isolated Sandbox and publish the result to the pull request",panel:"The workflow reviews only non-draft pull requests from the same repository. Pull requests from forks cannot access repository secrets.",submitLabel:"Add review and create PR",fields:[KQ,GQ,{name:"sandboxToolId",label:"Sandbox Tool ID",placeholder:"tool-xxxxxxxx",help:"The AgentKit CodeEnv used for each review",required:!0},{name:"modelName",label:"Review model",placeholder:"review-model",help:"The code review model name injected into the Sandbox",required:!0},{name:"modelBaseUrl",label:"Model API URL",placeholder:"https://ark.example.com/api/v3",help:"Must be an OpenAI-compatible HTTPS endpoint",required:!0}],initialValues:({cloudProvider:e})=>ZQ(e),regionHelp:"Must match the Sandbox Tool region",secrets:({cloudProvider:e})=>{const[t,n]=XQ(e);return[t,Ja("github.requiredSecret",{name:"CODEX_MODEL_API_KEY"}),n]},submit(e,t,n){const i=JQ(e);return WQ({...i,files:[{path:".github/workflows/codex-pr-review.yml",content:p4t({sandboxToolId:e.sandboxToolId.trim(),modelName:e.modelName.trim(),modelBaseUrl:e.modelBaseUrl.trim(),region:i.region,cloudProvider:t.cloudProvider}),commitMessage:"chore: configure PR automated review"}],branchPrefix:"chore/pr-automated-review",title:Ja("cards.review.pullRequest.title"),description:Ja("cards.review.pullRequest.description")},n)}},g4t=/^[A-Za-z0-9_-]+$/,$je=4,ej=64,tj=6,Lte="agent-runtime";function Fje(e){const t=e.trim();if(!t)return Lte;let n=t.replace(/[^A-Za-z0-9_-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,ej);return n?(n.length<$je&&(n=`${n}-rt`.slice(0,ej)),n):Lte}function b4t(e,t){const n=t.toLowerCase().replace(/[^a-z0-9]+/g,"").slice(0,tj).padEnd(tj,"0"),i=ej-n.length-1;return`${Fje(e).slice(0,i).replace(/[-_]+$/g,"")||"agent"}-${n}`}function Bje(e,t=Math.random){const n=Math.min(Math.max(t(),0),1-Number.EPSILON),i=Math.floor(n*36**tj).toString(36).padStart(tj,"0");return b4t(e,i)}function y4t(e,t,n){return n??!!(t!=null&&t.trim())?t??"":Fje(e)}function BE(e,t=n=>It(`validation.runtimeName.${n}`)){return e?g4t.test(e)?e.length<$je||e.length>ej?t("length"):null:t("characters"):t("required")}const v4t=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/,x4t="cn-hongkong";function O4t(e){const t=BE(e.runtimeName,n=>Ja(`github.validation.runtimeName.${n}`));if(t)throw new Error(t);if(!v4t.test(e.runtimeId))throw new Error(Ja("github.validation.runtimeId"))}function Uje(e){O4t(e);const t=e.cloudProvider??"volcengine",n=PI(t),i=t==="byteplus"?` VOLCENGINE_ACCESS_KEY: \${{ secrets.${n.accessKey} }} VOLCENGINE_SECRET_KEY: \${{ secrets.${n.secretKey} }} VOLCENGINE_SESSION_TOKEN: \${{ secrets.${n.sessionToken} }} BYTEPLUS_REGION: ${JSON.stringify(e.region)}`:"",r=t==="byteplus"?` - "DATABASE_VIKING_REGION": ${JSON.stringify(b4t)},`:"",s=`name: Publish to AgentKit Runtime + "DATABASE_VIKING_REGION": ${JSON.stringify(x4t)},`:"",s=`name: Publish to AgentKit Runtime on: push: @@ -1024,25 +1024,25 @@ jobs: if not result.success: raise SystemExit(f"AgentKit publish failed: {result.error}") PY -`,a={__BASE_BRANCH__:JSON.stringify(e.baseBranch),__PROJECT_PATH__:JSON.stringify(e.projectPath),__RUNTIME_NAME__:JSON.stringify(e.runtimeName),__RUNTIME_ID__:JSON.stringify(e.runtimeId),__REGION__:JSON.stringify(e.region),__CLOUD_PROVIDER__:JSON.stringify(t),__ACCESS_KEY_SECRET__:n.accessKey,__SECRET_KEY_SECRET__:n.secretKey,__SESSION_TOKEN_SECRET__:n.sessionToken,__BYTEPLUS_ENV__:i,__BYTEPLUS_RUNTIME_ENV__:r,__CONCURRENCY_GROUP__:JSON.stringify(`agentkit-runtime-${e.runtimeId}`)};return Object.entries(a).reduce((l,[c,u])=>l.split(c).join(u),s)}const v4t={id:"delivery",kind:"github",category:"development",icon:"github",name:"AgentKit Runtime delivery",description:"Add a workflow that continuously delivers your repository to AgentKit Runtime.",title:"AgentKit Runtime delivery",subtitle:"Add continuous delivery to the repository through a pull request",panel:"This creates a release branch and opens a pull request containing the GitHub Actions workflow.",submitLabel:"Confirm and create PR",fields:[GQ,XQ,{name:"projectPath",label:"Agent project directory",placeholder:".",help:"Defaults to the repository root; the directory must contain an app.py that mounts the complete Studio App Server",required:!1},Dje,Mje],initialValues:({cloudProvider:e})=>JQ(e),regionHelp:"Must match the target Runtime region",secrets:({cloudProvider:e})=>YQ(e),submit(e,t,n){const i=ez(e),r=WQ(e.projectPath,"."),s=ZQ(t.cloudProvider);return KQ({...i,files:[{path:".github/workflows/publish-agentkit.yml",content:Bje({baseBranch:i.baseBranch,projectPath:r,runtimeName:e.runtimeName.trim(),runtimeId:e.runtimeId.trim(),region:i.region,cloudProvider:t.cloudProvider}),commitMessage:"feat: publish Agent to AgentKit Runtime"}],branchPrefix:"feat/agentkit-release",title:eo("cards.delivery.pullRequest.title"),description:eo("cards.delivery.pullRequest.description",{provider:s})},n)}};function x4t(e,t){return e==="."?t:`${e}/${t}`}function O4t(e){return`.github/workflows/publish-agentkit-${e.replace(/[^A-Za-z0-9]+/g,"-").replace(/^-|-$/g,"").toLowerCase()||"root"}.yml`}const w4t={volcengine:"agentkit-prod-public-cn-beijing.cr.volces.com/base/py-simple:python3.12-bookworm-slim-latest",byteplus:"agentkit-prod-public-ap-southeast-1.cr.bytepluses.com/base/py-simple:python3.12-bookworm-slim-latest"},S4t="1.1.9",k4t=["https://repo.huaweicloud.com/repository/pypi/simple","https://mirrors.aliyun.com/pypi/simple/","https://pypi.org/simple"];function E4t(e){return e!=="volcengine"?"RUN uv pip install -r requirements.txt":`RUN ${k4t.map(n=>`uv pip install --index-url ${n} -r requirements.txt`).join(` || \\ - `)}`}function C4t(e){const t=MI(e);return`# Local ${ZQ(e)} credentials. Never commit real values. +`,a={__BASE_BRANCH__:JSON.stringify(e.baseBranch),__PROJECT_PATH__:JSON.stringify(e.projectPath),__RUNTIME_NAME__:JSON.stringify(e.runtimeName),__RUNTIME_ID__:JSON.stringify(e.runtimeId),__REGION__:JSON.stringify(e.region),__CLOUD_PROVIDER__:JSON.stringify(t),__ACCESS_KEY_SECRET__:n.accessKey,__SECRET_KEY_SECRET__:n.secretKey,__SESSION_TOKEN_SECRET__:n.sessionToken,__BYTEPLUS_ENV__:i,__BYTEPLUS_RUNTIME_ENV__:r,__CONCURRENCY_GROUP__:JSON.stringify(`agentkit-runtime-${e.runtimeId}`)};return Object.entries(a).reduce((l,[c,u])=>l.split(c).join(u),s)}const w4t={id:"delivery",kind:"github",category:"development",icon:"github",name:"AgentKit Runtime delivery",description:"Add a workflow that continuously delivers your repository to AgentKit Runtime.",title:"AgentKit Runtime delivery",subtitle:"Add continuous delivery to the repository through a pull request",panel:"This creates a release branch and opens a pull request containing the GitHub Actions workflow.",submitLabel:"Confirm and create PR",fields:[KQ,GQ,{name:"projectPath",label:"Agent project directory",placeholder:".",help:"Defaults to the repository root; the directory must contain an app.py that mounts the complete Studio App Server",required:!1},Mje,Lje],initialValues:({cloudProvider:e})=>ZQ(e),regionHelp:"Must match the target Runtime region",secrets:({cloudProvider:e})=>XQ(e),submit(e,t,n){const i=JQ(e),r=qQ(e.projectPath,"."),s=YQ(t.cloudProvider);return WQ({...i,files:[{path:".github/workflows/publish-agentkit.yml",content:Uje({baseBranch:i.baseBranch,projectPath:r,runtimeName:e.runtimeName.trim(),runtimeId:e.runtimeId.trim(),region:i.region,cloudProvider:t.cloudProvider}),commitMessage:"feat: publish Agent to AgentKit Runtime"}],branchPrefix:"feat/agentkit-release",title:Ja("cards.delivery.pullRequest.title"),description:Ja("cards.delivery.pullRequest.description",{provider:s})},n)}};function S4t(e,t){return e==="."?t:`${e}/${t}`}function k4t(e){return`.github/workflows/publish-agentkit-${e.replace(/[^A-Za-z0-9]+/g,"-").replace(/^-|-$/g,"").toLowerCase()||"root"}.yml`}const E4t={volcengine:"agentkit-prod-public-cn-beijing.cr.volces.com/base/py-simple:python3.12-bookworm-slim-latest",byteplus:"agentkit-prod-public-ap-southeast-1.cr.bytepluses.com/base/py-simple:python3.12-bookworm-slim-latest"},C4t="1.1.9",T4t=["https://repo.huaweicloud.com/repository/pypi/simple","https://mirrors.aliyun.com/pypi/simple/","https://pypi.org/simple"];function A4t(e){return e!=="volcengine"?"RUN uv pip install -r requirements.txt":`RUN ${T4t.map(n=>`uv pip install --index-url ${n} -r requirements.txt`).join(` || \\ + `)}`}function _4t(e){const t=PI(e);return`# Local ${YQ(e)} credentials. Never commit real values. ${t.accessKey}= ${t.secretKey}= # ${t.sessionToken}= -${e==="byteplus"?"BYTEPLUS_REGION":"VOLCENGINE_REGION"}=${er(e)} +${e==="byteplus"?"BYTEPLUS_REGION":"VOLCENGINE_REGION"}=${Ji(e)} CLOUD_PROVIDER=${e} AGENTKIT_CLOUD_PROVIDER=${e} # Optional model overrides. # MODEL_AGENT_PROVIDER=openai -# MODEL_AGENT_NAME=${Ah(e)} -# MODEL_AGENT_API_BASE=${vl(e)} +# MODEL_AGENT_NAME=${Sh(e)} +# MODEL_AGENT_API_BASE=${yl(e)} # MODEL_AGENT_API_KEY= # Optional Feishu Channel credentials. Studio can create and bind these. FEISHU_APP_ID= FEISHU_APP_SECRET= -`}function T4t(e,t="volcengine"){const n={"app.py":`"""__PROJECT_NAME__ — a VeADK agent with the full Studio App Server.""" +`}function N4t(e,t="volcengine"){const n={"app.py":`"""__PROJECT_NAME__ — a VeADK agent with the full Studio App Server.""" from assistant import root_agent from veadk.integrations.agentkit import create_agentkit_app, run_agentkit_app @@ -1086,19 +1086,19 @@ root_agent = Agent( instruction="You are a helpful assistant. Use your tools when relevant.", tools=[get_city_weather], ) -`,"requirements.txt":`veadk-python==${S4t} +`,"requirements.txt":`veadk-python==${C4t} agentkit-sdk-python==0.8.4 google-adk==2.1.0 lark-channel-sdk==1.2.0 lark-oapi==1.7.3 starlette==0.52.1 -`,Dockerfile:`FROM ${w4t[t]} +`,Dockerfile:`FROM ${E4t[t]} ENV UV_SYSTEM_PYTHON=1 UV_COMPILE_BYTECODE=1 PYTHONUNBUFFERED=1 WORKDIR /app COPY requirements.txt ./ -${E4t(t)} +${A4t(t)} COPY . . @@ -1123,7 +1123,7 @@ and local short-term memory fallback. Pushes to the configured target branch are continuously published by the GitHub Actions workflow added with this project. -`,".env.example":C4t(t),".gitignore":`__pycache__/ +`,".env.example":_4t(t),".gitignore":`__pycache__/ *.pyc .venv/ .env @@ -1137,35 +1137,35 @@ __pycache__/ Dockerfile .dockerignore README.md -`};return Object.fromEntries(Object.entries(n).map(([i,r])=>[i,r.split("__PROJECT_NAME__").join(e)]))}const A4t={id:"template",kind:"github",category:"development",icon:"github",name:"Import starter project",description:"Create a minimal Agent project in your repository with continuous delivery to AgentKit Runtime.",title:"Import starter project",subtitle:"Add a ready-to-run basic Agent and continuous delivery configuration to your repository",panel:"This creates a pull request containing the basic project and AgentKit Runtime delivery workflow.",submitLabel:"Import template and create PR",fields:[GQ,XQ,{name:"projectPath",label:"Agent project directory",placeholder:"agentkit-basic-agent",help:"The basic project will be added here; app.py mounts the complete Studio App Server and serves as the entry point",required:!0},Dje,Mje],initialValues:({cloudProvider:e})=>JQ(e,{projectPath:"agentkit-basic-agent"}),regionHelp:"Must match the target Runtime region",secrets:({cloudProvider:e})=>YQ(e),submit(e,t,n){const i=ez(e),r=Pje(i.repository),s=WQ(e.projectPath,"agentkit-basic-agent"),a=s==="."?r.split("/").slice(-1)[0]||"agentkit-basic-agent":s.split("/").slice(-1)[0]||"agentkit-basic-agent",l=Object.entries(T4t(a,t.cloudProvider)).map(([c,u])=>({path:x4t(s,c),content:u,commitMessage:"feat: import AgentKit basic template",mustBeNew:!0}));return l.push({path:O4t(s),content:Bje({baseBranch:i.baseBranch,projectPath:s,runtimeName:e.runtimeName.trim(),runtimeId:e.runtimeId.trim(),region:i.region,cloudProvider:t.cloudProvider}),commitMessage:"feat: add AgentKit Runtime delivery",mustBeNew:!0}),KQ({...i,repository:r,files:l,branchPrefix:"feat/agentkit-basic-template",title:eo("cards.template.pullRequest.title"),description:eo("cards.template.pullRequest.description",{provider:ZQ(t.cloudProvider)})},n)}},_4t={id:"website-integration",kind:"website-integration",category:"channels",icon:"website-integration",name:"Website integration",description:"Embed an AgentKit Runtime on your website as a floating chat window."},Ute=[{id:"development",label:"Development"},{id:"channels",label:"Messaging channels"}],Uje=[Z3t,A4t,v4t,f4t,J3t,_4t],N4t=new Map(Uje.map(e=>[e.id,e]));function j4t(e){const t=N4t.get(e);if(!t)throw new Error(`Unknown automation: ${e}`);return t}function R4t(e){const t=j4t(e);if(t.kind!=="github")throw new Error(`Automation is not backed by GitHub: ${e}`);return t}function Qte(e){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",...e,children:[o.jsx("circle",{cx:"10.8",cy:"10.8",r:"6.2",stroke:"currentColor",strokeWidth:"1.7"}),o.jsx("path",{d:"m15.4 15.4 4 4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})]})}function I4t(e){return o.jsxs("svg",{viewBox:"0 0 36 36",fill:"none","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"3.5",y:"5",width:"18",height:"18",rx:"5",fill:"currentColor",opacity:"0.1"}),o.jsx("rect",{x:"3.5",y:"5",width:"18",height:"18",rx:"5",stroke:"currentColor",strokeWidth:"1.6"}),o.jsx("path",{d:"m9.2 11.2-2.8 2.7 2.8 2.7M12.1 17.4h4.3",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("circle",{cx:"26.5",cy:"12",r:"3",fill:"hsl(var(--background))",stroke:"currentColor",strokeWidth:"1.6"}),o.jsx("circle",{cx:"27",cy:"26.5",r:"3",fill:"hsl(var(--background))",stroke:"currentColor",strokeWidth:"1.6"}),o.jsx("path",{d:"M21.5 12h2M19.3 21l5.6 3.8M27 15v8.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}function P4t(e){return o.jsxs("svg",{viewBox:"0 0 36 36",fill:"none","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"3.5",y:"5",width:"22",height:"18",rx:"4",stroke:"currentColor",strokeWidth:"1.6"}),o.jsx("path",{d:"M4.5 10h20M9 7.5h.1M12 7.5h.1",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),o.jsx("path",{d:"M18 18.5c0-3 2.5-5.5 5.5-5.5h3c3 0 5.5 2.5 5.5 5.5v5c0 3-2.5 5.5-5.5 5.5H25l-4 3v-3.6a5.5 5.5 0 0 1-3-4.9v-5Z",fill:"hsl(var(--background))",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),o.jsx("path",{d:"M22 19.5h6M22 23h4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}function D4t({onOpen:e}){var d;const{t}=Oe("automations"),[n,i]=m.useState("development"),[r,s]=m.useState(""),a=m.useDeferredValue(r),l=m.useMemo(()=>{const f=a.trim().toLocaleLowerCase();return Uje.filter(h=>h.category===n).filter(h=>!f||`${t(`cards.${h.id}.name`)} ${t(`cards.${h.id}.description`)}`.toLocaleLowerCase().includes(f))},[n,a,t]),c=(d=Ute.find(f=>f.id===n))==null?void 0:d.id,u=Y3t(window.location.hostname);return o.jsxs("div",{className:"applications-page",children:[o.jsxs("header",{className:"applications-header",children:[o.jsxs("div",{children:[o.jsx("h1",{children:t("title")}),o.jsx("p",{children:t("description")})]}),o.jsxs("label",{className:"applications-search",children:[o.jsx(Qte,{}),o.jsx("input",{type:"search","aria-label":t("search"),value:r,onChange:f=>s(f.target.value),placeholder:t("search")})]})]}),o.jsx("nav",{className:"applications-categories","aria-label":t("categoriesLabel"),children:Ute.map(f=>o.jsx("button",{type:"button",className:n===f.id?"is-active":"","aria-pressed":n===f.id,onClick:()=>i(f.id),children:t(`categories.${f.id}`)},f.id))}),o.jsx("section",{className:"applications-results","aria-label":t("resultsLabel",{category:t(`categories.${c}`)}),children:l.length?o.jsx("div",{className:"applications-grid",children:l.map(f=>{const h=f.id==="coding-agents"&&!u,p=h?"coding-agents-local-only-tooltip":void 0;return o.jsxs("div",{className:`application-card-wrap${h?" is-disabled":""}`,tabIndex:h?0:void 0,"aria-describedby":p,children:[o.jsxs("button",{type:"button",className:"application-card",onClick:()=>e(f.id),"aria-label":t("open",{name:t(`cards.${f.id}.name`)}),disabled:h,children:[f.icon==="feishu"?o.jsx("img",{className:"application-card-icon application-card-brand-icon",src:PI,alt:"","aria-hidden":"true"}):f.icon==="coding-agents"?o.jsx(I4t,{className:"application-card-icon"}):f.icon==="website-integration"?o.jsx(P4t,{className:"application-card-icon"}):o.jsx(VQ,{className:"application-card-icon"}),o.jsxs("div",{className:"application-card-copy",children:[o.jsxs("div",{className:"application-card-title",children:[o.jsx("h2",{children:t(`cards.${f.id}.name`)}),f.badge?o.jsx("span",{className:`application-card-badge is-${f.badgeTone||"default"}`,children:t(`cards.${f.id}.badge`,{defaultValue:f.badge})}):null]}),o.jsx("p",{children:t(`cards.${f.id}.description`)})]})]}),h?o.jsx("span",{id:p,className:"application-card-tooltip",role:"tooltip",children:t("localOnly")}):null]},f.id)})}):o.jsxs("div",{className:"applications-empty",role:"status",children:[o.jsx(Qte,{}),o.jsx("h2",{children:t("emptyTitle")}),o.jsx("p",{children:t("emptyDescription")})]})})]})}const M4t="_Container_1bl61_1",L4t="_Track_1bl61_16",$4t="_Thumb_1bl61_56",F4t="_Label_1bl61_78",m2={Container:M4t,Track:L4t,Thumb:$4t,Label:F4t},v8=({className:e,label:t,id:n,disabled:i,labelPosition:r="end",...s})=>{const a=m.useId(),l=n??a;return o.jsxs("div",{className:bi(m2.Container,e),"data-disabled":i?"":void 0,"data-has-label":t?"":void 0,"data-label-position":r,children:[o.jsx(Yqe,{id:l,className:m2.Track,disabled:i,...s,children:o.jsx(Jqe,{className:m2.Thumb})}),t&&o.jsx("label",{htmlFor:l,className:m2.Label,children:t})]})};function Mb({message:e,className:t="",onRetry:n,retryLabel:i,defaultExpanded:r=!0}){const{t:s}=Oe("ui"),a=i??s("deploymentError.retryDeployment"),[l,c]=m.useState(r),[u,d]=m.useState(!1),f=async()=>{if(!(!n||u)){d(!0);try{await n()}finally{d(!1)}}};return o.jsxs("div",{className:`deploy-error-message${l?" is-expanded":""}${t?` ${t}`:""}`,role:"alert",children:[o.jsx("p",{className:"deploy-error-message-text",children:e}),o.jsxs("div",{className:"deploy-error-message-actions",children:[n&&o.jsxs(Ft,{type:"button",className:"deploy-error-retry",color:"danger",variant:"soft",size:"sm",pill:!1,loading:u,onClick:()=>void f(),children:[!u&&o.jsx(bFe,{}),u?s("deploymentError.retrying"):a]}),o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"sm",uniform:!0,pill:!1,title:s(l?"deploymentError.collapse":"deploymentError.expand"),"aria-label":s(l?"deploymentError.collapse":"deploymentError.expand"),onClick:()=>c(h=>!h),children:l?o.jsx(wFe,{}):o.jsx(TFe,{})}),o.jsx(z7,{copyValue:e,color:"secondary",variant:"ghost",size:"sm",uniform:!0,pill:!1,title:s("deploymentError.copy"),"aria-label":s("deploymentError.copy"),children:({copied:h})=>h?o.jsx(Lv,{}):o.jsx(TF,{})})]})]})}const B4t={queued:"status.queued",pending:"status.pending",running:"status.running",retrying:"status.retrying",success:"status.success",failed:"status.failed",cancelled:"status.cancelled",skipped:"status.skipped"},Qje=["weekdays.sunday","weekdays.monday","weekdays.tuesday","weekdays.wednesday","weekdays.thursday","weekdays.friday","weekdays.saturday"];function x8(e){if(!e)return"-";const t=new Date(e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(Zt.resolvedLanguage,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).format(t).replace(/\//g,"-")}function U4t(e){if(!e.startedAt)return"-";const t=Date.parse(e.startedAt),n=e.finishedAt?Date.parse(e.finishedAt):Date.now();if(!Number.isFinite(t)||!Number.isFinite(n)||n{const d=i.current;!d||r.current||c(d.scrollHeight>d.clientHeight+1)},[]);return m.useLayoutEffect(()=>{r.current=s,s||u()},[s,u,e]),m.useEffect(()=>{const d=i.current;if(!d||typeof ResizeObserver>"u")return;const f=new ResizeObserver(u);return f.observe(d),()=>f.disconnect()},[u]),o.jsxs("div",{className:`cronjobs-run-output-body${s?" is-expanded":""}`,children:[o.jsx("p",{id:n,ref:i,children:e}),l?o.jsx(Ft,{type:"button",className:"cronjobs-run-output-toggle",color:"secondary",variant:"ghost",size:"sm",pill:!1,"aria-expanded":s,"aria-controls":n,onClick:()=>a(d=>!d),children:t(s?"actions.collapse":"actions.expand")}):null]})}const w8="Asia/Shanghai",z4t=3e3,V4t=["Asia/Shanghai","Asia/Singapore","Asia/Tokyo","Europe/London","America/Los_Angeles","America/New_York","UTC"];function xt(e,t){return Zt.t(e,{ns:"cronjobs",...t})}function H4t(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||w8}catch{return w8}}function q4t(){const e=H4t(),t=new Date(Date.now()+24*60*60*1e3);return t.setSeconds(0,0),{name:"",runtimeId:"",prompt:"",scheduleType:"daily",onceAt:new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().slice(0,16),time:"09:00",weekday:1,cron:"0 9 * * *",timezone:e,enabled:!0}}function W4t(e){return{name:e.name,runtimeId:e.runtimeId,prompt:e.prompt,scheduleType:e.schedule.type,onceAt:e.schedule.onceAt??"",time:e.schedule.time??"09:00",weekday:e.schedule.weekday??1,cron:e.schedule.cron??"0 9 * * *",timezone:e.schedule.timezone||w8,enabled:e.enabled}}function K4t({run:e}){const t=e?e.status==="success"?"success":e.status==="failed"?"danger":["queued","pending","running","retrying"].includes(e.status)?"info":"secondary":"secondary";return o.jsx(ga,{className:"cronjobs-status",color:t,variant:"soft",size:"sm",pill:!0,children:xt(e?B4t[e.status]:"status.notRun")})}function zte({job:e,runtimes:t,cloudProvider:n,busy:i,onClose:r,onSubmit:s}){const[a,l]=m.useState(()=>e?W4t(e):q4t()),[c,u]=m.useState(""),[d,f]=m.useState(!1),h=m.useRef(null),p=m.useRef(null),g=m.useRef(null),b=i||d,v=m.useRef(b),y=m.useRef(r),x=m.useMemo(()=>Array.from(new Set([a.timezone,...V4t])),[a.timezone]),w=m.useMemo(()=>t.map(E=>({value:E.runtimeId,label:E.name,description:Th(E.region,n)})),[n,t]),O=m.useMemo(()=>Qje.map((E,C)=>({value:String(C),label:xt(E)})),[]),k=m.useMemo(()=>x.map(E=>({value:E,label:E})),[x]);m.useEffect(()=>{v.current=b,y.current=r},[b,r]),m.useEffect(()=>{var _;const E=document.body.style.overflow,C=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(_=p.current)==null||_.focus();const N=j=>{var P,$;if(j.key==="Escape"&&!v.current){y.current();return}if(j.key!=="Tab")return;const T=Array.from(((P=h.current)==null?void 0:P.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'))??[]).filter(M=>!M.hidden&&M.getClientRects().length>0);if(T.length===0){j.preventDefault();return}const L=T[0],A=T[T.length-1],R=document.activeElement;j.shiftKey&&(R===L||!(($=h.current)!=null&&$.contains(R)))?(j.preventDefault(),A.focus()):!j.shiftKey&&R===A&&(j.preventDefault(),L.focus())};return window.addEventListener("keydown",N),()=>{document.body.style.overflow=E,window.removeEventListener("keydown",N),C!=null&&C.isConnected&&C.focus()}},[]);const S=async E=>{E.preventDefault();const C=a.name.trim(),N=a.prompt.trim(),_=t.find(T=>T.runtimeId===a.runtimeId);if(!C)return u(xt("validation.nameRequired"));if(!_)return u(xt("validation.runtimeRequired"));if(!N)return u(xt("validation.promptRequired"));if(a.scheduleType==="once"&&!a.onceAt||(a.scheduleType==="daily"||a.scheduleType==="weekly")&&!a.time)return u(xt("validation.timeRequired"));const j=a.cron.trim().split(/\s+/);if(a.scheduleType==="cron"&&j.length!==5)return u(xt("validation.cronFields"));u(""),f(!0);try{let T=(e==null?void 0:e.runtimeId)===_.runtimeId?e.agentName.trim():"";if(!T){const[L]=await Uk("","",{runtimeId:_.runtimeId,region:_.region});T=(L==null?void 0:L.trim())??""}if(!T)throw new Error(xt("validation.runtimeAppMissing"));await s({name:C,runtimeId:_.runtimeId,runtimeName:_.name,agentName:T,region:_.region,prompt:N,enabled:a.enabled,schedule:{type:a.scheduleType,timezone:a.timezone,...a.scheduleType==="once"?{onceAt:a.onceAt}:{},...a.scheduleType==="daily"?{time:a.time}:{},...a.scheduleType==="weekly"?{time:a.time,weekday:a.weekday}:{},...a.scheduleType==="cron"?{cron:a.cron.trim()}:{}}})}catch(T){u(T instanceof Error?T.message:String(T)),window.requestAnimationFrame(()=>{var L;return(L=g.current)==null?void 0:L.focus()})}finally{f(!1)}};return o.jsx("div",{className:"cronjobs-drawer-backdrop",onMouseDown:E=>{E.target===E.currentTarget&&!b&&r()},children:o.jsxs("aside",{ref:h,className:"cronjobs-drawer",role:"dialog","aria-modal":"true","aria-labelledby":"cronjobs-drawer-title",children:[o.jsxs("header",{className:"cronjobs-drawer-head",children:[o.jsxs("div",{children:[o.jsx("h2",{id:"cronjobs-drawer-title",children:xt(e?"drawer.editTitle":"drawer.createTitle")}),o.jsx("p",{children:xt("drawer.description")})]}),o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"lg",uniform:!0,pill:!1,onClick:r,disabled:b,"aria-label":xt("actions.closeDrawer"),children:o.jsx(AF,{})})]}),o.jsxs("form",{className:"cronjobs-form",onSubmit:E=>void S(E),children:[o.jsxs("div",{className:"cronjobs-form-scroll",children:[o.jsxs("label",{className:"cronjobs-field",children:[o.jsx("span",{children:xt("fields.name")}),o.jsx(Gr,{ref:p,size:"lg",value:a.name,maxLength:80,invalid:!!c&&!a.name.trim(),onChange:E=>l({...a,name:E.target.value}),placeholder:xt("fields.namePlaceholder")})]}),o.jsxs("label",{className:"cronjobs-field",children:[o.jsx("span",{children:xt("fields.runtimeAgent")}),o.jsx(Bs,{value:a.runtimeId,options:w,size:"lg",disabled:t.length===0,placeholder:xt(t.length?"fields.runtimePlaceholder":"fields.noRuntime"),onChange:E=>l({...a,runtimeId:E.value})}),o.jsx("small",{children:xt("fields.runtimeHelp")})]}),o.jsxs("label",{className:"cronjobs-field",children:[o.jsx("span",{children:xt("fields.prompt")}),o.jsx(Lm,{value:a.prompt,rows:5,maxRows:10,autoResize:!0,maxLength:2e4,invalid:!!c&&!a.prompt.trim(),onChange:E=>l({...a,prompt:E.target.value}),placeholder:xt("fields.promptPlaceholder")}),o.jsxs("small",{className:"cronjobs-character-count",children:[a.prompt.length.toLocaleString()," / 20,000"]})]}),o.jsxs("fieldset",{className:"cronjobs-fieldset",children:[o.jsx("legend",{children:xt("fields.schedule")}),o.jsxs(zc,{className:"cronjobs-schedule-types",value:a.scheduleType,size:"lg",block:!0,"aria-label":xt("fields.scheduleType"),onChange:E=>l({...a,scheduleType:E}),children:[o.jsx(zc.Option,{value:"once",children:xt("scheduleTypes.once")}),o.jsx(zc.Option,{value:"daily",children:xt("scheduleTypes.daily")}),o.jsx(zc.Option,{value:"weekly",children:xt("scheduleTypes.weekly")}),o.jsx(zc.Option,{value:"cron",children:"Cron"})]}),a.scheduleType==="once"?o.jsxs("label",{className:"cronjobs-field",children:[o.jsx("span",{children:xt("fields.runAt")}),o.jsx(Gr,{size:"lg",type:"datetime-local",value:a.onceAt,onChange:E=>l({...a,onceAt:E.target.value})})]}):null,a.scheduleType==="daily"?o.jsxs("label",{className:"cronjobs-field",children:[o.jsx("span",{children:xt("fields.dailyTime")}),o.jsx(Gr,{size:"lg",type:"time",value:a.time,onChange:E=>l({...a,time:E.target.value})})]}):null,a.scheduleType==="weekly"?o.jsxs("div",{className:"cronjobs-inline-fields",children:[o.jsxs("label",{className:"cronjobs-field",children:[o.jsx("span",{children:xt("fields.weekday")}),o.jsx(Bs,{value:String(a.weekday),options:O,size:"lg",onChange:E=>l({...a,weekday:Number(E.value)})})]}),o.jsxs("label",{className:"cronjobs-field",children:[o.jsx("span",{children:xt("fields.runAt")}),o.jsx(Gr,{size:"lg",type:"time",value:a.time,onChange:E=>l({...a,time:E.target.value})})]})]}):null,a.scheduleType==="cron"?o.jsxs("label",{className:"cronjobs-field",children:[o.jsx("span",{children:xt("fields.cronExpression")}),o.jsx(Gr,{size:"lg",value:a.cron,onChange:E=>l({...a,cron:E.target.value}),placeholder:"0 9 * * *"}),o.jsx("small",{children:xt("fields.cronHelp")})]}):null,o.jsxs("label",{className:"cronjobs-field",children:[o.jsx("span",{children:xt("fields.timezone")}),o.jsx(Bs,{value:a.timezone,options:k,size:"lg",onChange:E=>l({...a,timezone:E.value})})]})]}),o.jsxs("div",{className:"cronjobs-switch-row",children:[o.jsxs("span",{children:[o.jsx("strong",{children:xt("fields.enableAfterCreate")}),o.jsx("small",{children:xt("fields.enableHelp")})]}),o.jsx(v8,{checked:a.enabled,onCheckedChange:E=>l({...a,enabled:E}),"aria-label":xt("fields.enableAfterCreate")})]}),c?o.jsx("div",{ref:g,className:"cronjobs-inline-error",tabIndex:-1,children:o.jsx(kb,{color:"danger",variant:"soft",description:c})}):null]}),o.jsxs("footer",{className:"cronjobs-drawer-actions",children:[o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"lg",pill:!1,onClick:r,disabled:b,children:xt("actions.cancel")}),o.jsx(Ft,{type:"submit",color:"primary",size:"lg",pill:!1,loading:b,disabled:t.length===0,"aria-busy":b||void 0,children:xt(d?"actions.connectingRuntime":i?"actions.saving":e?"actions.saveChanges":"actions.createTask")})]})]})]})})}function G4t({jobs:e,canCreate:t,onCreate:n,onSelect:i}){return o.jsxs(Vx,{children:[o.jsx(Eb,{icon:o.jsx(pbe,{}),onClick:n,disabled:!t,title:xt(t?"actions.createScheduledTask":"fields.noRuntime"),children:xt("actions.createScheduledTask")}),e.map(r=>{const s=zje(r.schedule);return o.jsx(fE,{className:"cronjobs-card",title:r.name,status:o.jsx(ga,{color:r.enabled?"success":"secondary",variant:"soft",size:"sm",pill:!0,children:xt(r.enabled?"status.enabled":"status.paused")}),description:r.prompt,metadata:[{label:xt("fields.schedule"),value:s,title:s}],detailAction:{label:xt("actions.viewDetails"),onClick:()=>i(r)}},r.jobId)})]})}function X4t({job:e,runs:t,runsLoading:n,runsError:i,busyAction:r,onBack:s,onEdit:a,onToggle:l,onRun:c,onDelete:u,onCancel:d,onRetryRun:f,onRetryRuns:h}){const p=t.find(b=>b.status==="queued"||b.status==="running"||b.status==="retrying"||b.status==="pending")??(O8(e)?e.latestRun:void 0),g=r.includes(e.jobId);return o.jsxs("div",{className:"cronjobs-detail",children:[o.jsxs("header",{className:"cronjobs-detail-head",children:[o.jsxs("div",{className:"cronjobs-detail-title",children:[o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"lg",uniform:!0,pill:!1,onClick:s,"aria-label":xt("actions.backToList"),children:o.jsx(mFe,{})}),o.jsxs("div",{children:[o.jsx("h1",{children:e.name}),o.jsxs("p",{children:[e.runtimeName||e.agentName," · ",zje(e.schedule)]})]})]}),o.jsxs("div",{className:"cronjobs-detail-actions",children:[o.jsxs(Ft,{type:"button",color:"secondary",variant:"outline",size:"lg",pill:!1,onClick:a,disabled:g,children:[o.jsx(CFe,{}),xt("actions.edit")]}),o.jsxs(Ft,{type:"button",color:"secondary",variant:"outline",size:"lg",pill:!1,onClick:l,disabled:g,children:[e.enabled?o.jsx(RFe,{}):o.jsx(gW,{}),xt(e.enabled?"actions.pause":"actions.enable")]}),p?o.jsxs(Ft,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,onClick:()=>d(p),disabled:g||!!p.cancellationRequestedAt,children:[o.jsx(LFe,{}),xt(p.cancellationRequestedAt?p.status==="queued"?"actions.cancelling":"actions.stopping":p.status==="queued"?"actions.cancelQueue":"actions.stopRun")]}):o.jsxs(Ft,{type:"button",color:"primary",size:"lg",pill:!1,onClick:c,disabled:g||!e.enabled,children:[o.jsx(gW,{}),xt("actions.runNow")]}),o.jsx(Fo,{compact:!0,content:xt(p?p.status==="queued"?"actions.cancelQueueFirst":"actions.stopRunFirst":"actions.deleteTask"),children:o.jsxs(Ft,{type:"button",color:"danger",variant:"ghost",size:"lg",pill:!1,onClick:u,disabled:g||!!p,"aria-label":xt("actions.deleteTask"),children:[o.jsx(SFe,{}),xt("actions.delete")]})})]})]}),o.jsxs("div",{className:"cronjobs-detail-scroll",children:[o.jsxs("section",{className:"cronjobs-summary-grid","aria-label":xt("detail.configuration"),children:[o.jsxs("dl",{children:[o.jsxs("div",{children:[o.jsx("dt",{children:xt("detail.status")}),o.jsx("dd",{children:xt(e.enabled?"status.enabled":"status.paused")})]}),o.jsxs("div",{children:[o.jsx("dt",{children:xt("detail.nextRun")}),o.jsx("dd",{children:e.enabled?x8(e.nextRunAt):"-"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:xt("detail.runtime")}),o.jsx("dd",{title:e.runtimeName,children:e.runtimeName})]}),o.jsxs("div",{children:[o.jsx("dt",{children:xt("detail.region")}),o.jsx("dd",{children:e.region})]})]}),o.jsxs("div",{className:"cronjobs-prompt",children:[o.jsx("span",{children:xt("fields.prompt")}),o.jsx("p",{children:e.prompt})]})]}),o.jsxs("section",{className:"cronjobs-history",children:[o.jsxs("header",{children:[o.jsxs("div",{children:[o.jsx("h2",{children:xt("history.title")}),o.jsx("p",{children:xt("history.description")})]}),o.jsx(Fo,{compact:!0,content:xt("actions.refresh"),children:o.jsx(Ft,{type:"button",color:"secondary",variant:"ghost",size:"lg",uniform:!0,pill:!1,onClick:h,disabled:n,"aria-label":xt("actions.refreshHistory"),children:o.jsx(zj,{})})})]}),n&&t.length===0?o.jsx(qd,{}):i?o.jsx(kb,{className:"cronjobs-history-alert",color:"danger",variant:"soft",title:xt("history.loadFailed"),description:i,actions:o.jsx(Ft,{type:"button",color:"danger",variant:"soft",size:"sm",pill:!1,onClick:h,children:xt("actions.retry")})}):t.length===0?o.jsxs(Sn,{className:"cronjobs-history-state",fill:"none",children:[o.jsx(Sn.Icon,{children:o.jsx(CF,{})}),o.jsx(Sn.Title,{children:xt("history.emptyTitle")}),o.jsx(Sn.Description,{children:xt("history.emptyDescription")})]}):o.jsx("div",{className:"cronjobs-runs",children:t.map(b=>o.jsxs("article",{className:"cronjobs-run",children:[o.jsxs("div",{className:"cronjobs-run-main",children:[o.jsx(K4t,{run:b}),o.jsxs("div",{children:[o.jsx("strong",{children:x8(b.startedAt||b.scheduledAt)}),o.jsxs("span",{children:[xt("history.duration",{duration:U4t(b)}),b.runtimeVersion?` · Runtime v${b.runtimeVersion}`:""]})]})]}),b.sessionId?o.jsxs("div",{className:"cronjobs-run-meta",children:[o.jsx("span",{children:xt("history.session")}),o.jsx("strong",{title:b.sessionId,children:b.sessionId})]}):null,b.output?o.jsxs("div",{className:"cronjobs-run-output",children:[o.jsx("span",{children:xt("history.finalAnswer")}),o.jsx(Q4t,{output:b.output})]}):null,b.error?o.jsxs("div",{className:"cronjobs-run-output is-error",children:[o.jsx("span",{children:xt("history.errorDetails")}),o.jsx(Mb,{message:b.error,className:"cronjobs-run-error-detail",defaultExpanded:!1,onRetry:b.status==="failed"?f:void 0,retryLabel:xt("actions.rerun")})]}):null,b.status==="queued"||b.status==="running"||b.status==="retrying"||b.status==="pending"?o.jsx(Ft,{type:"button",className:"cronjobs-run-cancel",color:"danger",variant:"soft",size:"sm",pill:!1,onClick:()=>d(b),disabled:g||!!b.cancellationRequestedAt,loading:!!b.cancellationRequestedAt,children:xt(b.cancellationRequestedAt?"actions.stopping":b.status==="queued"?"actions.cancelQueue":"actions.stop")}):null]},b.runId))})]})]})]})}function Y4t({cloudProvider:e}){Oe("cronjobs");const[t,n]=m.useState([]),[i,r]=m.useState([]),[s,a]=m.useState(!0),[l,c]=m.useState(""),[u,d]=m.useState(""),[f,h]=m.useState(void 0),[p,g]=m.useState([]),[b,v]=m.useState(!1),[y,x]=m.useState(""),[w,O]=m.useState(""),[k,S]=m.useState("all"),[E,C]=m.useState(""),[N,_]=m.useState(null),[j,T]=m.useState(""),L=t.find(U=>U.jobId===u),A=k==="all"?t:t.filter(U=>k==="enabled"?U.enabled:!U.enabled),R=m.useCallback(async U=>{a(!0),c("");try{const[te,le]=await Promise.all([v4(U),_x({scope:"all",region:"all",pageSize:100})]);if(U!=null&&U.aborted)return;n(te),r(le.runtimes.filter(oe=>oe.status.toLowerCase()==="ready"))}catch(te){if(U!=null&&U.aborted)return;console.warn("Unable to load scheduled tasks",te),c(xt("page.loadFailedDescription"))}finally{U!=null&&U.aborted||a(!1)}},[]);m.useEffect(()=>{const U=new AbortController;return R(U.signal),()=>U.abort()},[R]);const P=m.useCallback(async(U,te)=>{v(!0),x("");try{const le=await x4(U,te);te!=null&&te.aborted||g(le)}catch(le){te!=null&&te.aborted||(console.warn("Unable to load scheduled-task history",le),x(xt("history.loadFailedDescription")))}finally{te!=null&&te.aborted||v(!1)}},[]);m.useEffect(()=>{if(!u){g([]),x("");return}const U=new AbortController;return P(u,U.signal),()=>U.abort()},[P,u]);const $=t.some(O8);m.useEffect(()=>{!$&&E===xt("notices.queued")&&C("")},[$,E]),m.useEffect(()=>{if(!$)return;const U=new AbortController,te=async()=>{try{const[oe,re]=await Promise.all([v4(U.signal),u?x4(u,U.signal):Promise.resolve(null)]);if(U.signal.aborted)return;n(oe),re&&g(re),oe.some(O8)||C("")}catch(oe){U.signal.aborted||C(oe instanceof Error?oe.message:String(oe))}},le=window.setInterval(()=>void te(),z4t);return()=>{window.clearInterval(le),U.abort()}},[$,u]);const M=U=>n(te=>te.some(le=>le.jobId===U.jobId)?te.map(le=>le.jobId===U.jobId?U:le):[U,...te]),B=async(U,te,le,oe=!1)=>{O(U),C("");try{await te(),C(le)}catch(re){const he=re instanceof Error?re.message:String(re);if(oe)throw new Error(he);C(he)}finally{O("")}},I=async U=>{const te=f??null;await B(`${(te==null?void 0:te.jobId)??"new"}:save`,async()=>{const le=te?await Q0e(te.jobId,U):await U0e(U);M(le),h(void 0),te&&d(le.jobId)},xt(te?"notices.updated":"notices.created"),!0)},H=U=>void B(`${U.jobId}:toggle`,async()=>M(await z0e(U.jobId,!U.enabled)),xt(U.enabled?"notices.paused":"notices.enabled")),X=(U,te)=>B(`${U.jobId}:run`,async()=>{const le=await V0e(U.jobId);M({...U,latestRun:le}),u===U.jobId&&g(oe=>[le,...oe.filter(re=>re.runId!==le.runId)])},te),Q=U=>void X(U,xt("notices.queued")),q=()=>{if(!N)return;T("");const U=N;U.kind==="delete"?B(`${U.job.jobId}:delete`,async()=>{await q0e(U.job.jobId),n(te=>te.filter(le=>le.jobId!==U.job.jobId)),d(""),_(null)},xt("notices.deleted"),!0).catch(te=>{T(te instanceof Error?te.message:String(te))}):B(`${U.job.jobId}:cancel`,async()=>{var le;const te=await H0e(U.job.jobId,U.run.runId);g(oe=>oe.map(re=>re.runId===te.runId?te:re)),M({...U.job,latestRun:((le=U.job.latestRun)==null?void 0:le.runId)===te.runId?te:U.job.latestRun}),_(null)},xt("notices.cancelRequested"),!0).catch(te=>{T(te instanceof Error?te.message:String(te))})};return L?o.jsxs(Ph,{className:"cronjobs-page","aria-label":xt("detail.pageLabel"),children:[o.jsx(X4t,{job:L,runs:p,runsLoading:b,runsError:y,busyAction:w,onBack:()=>d(""),onEdit:()=>h(L),onToggle:()=>H(L),onRun:()=>Q(L),onDelete:()=>{T(""),_({kind:"delete",job:L})},onCancel:U=>{T(""),_({kind:"cancel",job:L,run:U})},onRetryRun:()=>X(L,xt("notices.requeued")),onRetryRuns:()=>void P(L.jobId)}),E?o.jsx("div",{className:"cronjobs-notice",role:"status",children:o.jsx(kb,{color:"info",variant:"soft",description:E})}):null,f!==void 0?o.jsx(zte,{job:f,runtimes:i,cloudProvider:e,busy:w.endsWith(":save"),onClose:()=>h(void 0),onSubmit:I}):null,N?o.jsx(fc,{title:xt(N.kind==="delete"?"confirm.deleteTitle":"confirm.cancelTitle"),description:N.kind==="delete"?xt("confirm.deleteDescription",{name:N.job.name}):xt("confirm.cancelDescription"),error:j,confirmLabel:xt(N.kind==="delete"?"actions.deleteTask":"actions.stop"),variant:"danger",busy:w.endsWith(N.kind),onCancel:()=>{T(""),_(null)},onConfirm:q}):null]}):o.jsxs(Ph,{className:"cronjobs-page","aria-label":xt("page.title"),children:[o.jsx(zx,{className:"cronjobs-page-head",title:xt("page.title")}),o.jsx(Yb,{children:o.jsx(cE,{idPrefix:"cronjobs-filter",ariaLabel:xt("page.filterLabel"),value:k,items:[{id:"all",label:xt("filters.all")},{id:"enabled",label:xt("status.enabled")},{id:"paused",label:xt("status.paused")}],onChange:S})}),E?o.jsx("div",{className:"cronjobs-banner",role:"status",children:o.jsx(kb,{color:"info",variant:"soft",description:E})}):null,o.jsx(Zb,{"aria-label":xt("page.listLabel"),children:s&&t.length===0?o.jsx(qd,{}):l?o.jsxs(Sn,{className:"cronjobs-state",fill:"none",children:[o.jsx(Sn.Icon,{color:"danger",children:o.jsx(CF,{})}),o.jsx(Sn.Title,{color:"danger",children:xt("page.loadFailed")}),o.jsx(Sn.Description,{children:l}),o.jsx(Sn.ActionRow,{children:o.jsxs(Ft,{type:"button",color:"secondary",variant:"outline",size:"lg",pill:!1,onClick:()=>void R(),children:[o.jsx(zj,{}),xt("actions.retry")]})})]}):o.jsx(G4t,{jobs:A,canCreate:!s&&i.length>0,onCreate:()=>h(null),onSelect:U=>d(U.jobId)})}),f!==void 0?o.jsx(zte,{job:f,runtimes:i,cloudProvider:e,busy:w.endsWith(":save"),onClose:()=>h(void 0),onSubmit:I}):null]})}function Vje({label:e,onClick:t}){return o.jsx("button",{type:"button",className:"page-back-button","aria-label":e,title:e,onClick:t,children:o.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"m14.5 6-6 6 6 6"})})})}const Z4t={volcengine:"https://console.volcengine.com",byteplus:"https://console.byteplus.com"};function Ok(e){return e.trim()}function tz(e){return Z4t[e]}function J4t(e){const t=Ok(e);if(!t)return null;let n=t;try{n=new URL(t.includes("://")?t:`https://${t}`).hostname}catch{return null}const i=n.match(/^(.+)\.tos-([a-z0-9-]+)\.(?:volces|bytepluses)\.com$/i);return i?{bucket:i[1],region:i[2]}:null}function e6t(e,t){const n=J4t(t);if(!n)return null;const i=new URLSearchParams({id:n.bucket,region:n.region,type:"objects"});return`${tz(e)}/tos/bucket/setting?${i.toString()}`}function t6t(e,t,n){const i=Ok(t),r=Ok(n);return!i||!r?null:`${tz(e)}/agentkit/region:agentkit+${encodeURIComponent(i)}/builtintools/${encodeURIComponent(r)}/detail`}function n6t(e,t,n){const i=Ok(t),r=Ok(n);return!i||!r?null:`${tz(e)}/identity/region:identity+${encodeURIComponent(i)}/user-pools/${encodeURIComponent(r)}/info`}function uO({href:e,label:t,children:n}){return e?o.jsxs("a",{className:"system-info-resource-link",href:e,target:"_blank",rel:"noreferrer","aria-label":t,title:t,children:[o.jsx("span",{children:n}),o.jsxs("svg",{viewBox:"0 0 20 20","aria-hidden":"true",children:[o.jsx("path",{d:"M7.75 5.25h-2.5a1.5 1.5 0 0 0-1.5 1.5v8a1.5 1.5 0 0 0 1.5 1.5h8a1.5 1.5 0 0 0 1.5-1.5v-2.5"}),o.jsx("path",{d:"M10.25 3.75h6v6M16 4 9 11"})]})]}):o.jsx("span",{children:n})}function i6t(e){return e instanceof Error&&e.message.includes("Volcengine credentials not found")}function r6t({spinning:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e?"is-spinning":"",children:o.jsx("path",{d:"M19.5 9A8 8 0 0 0 5 6L3 9m0-5v5h5M4.5 15A8 8 0 0 0 19 18l2-3m0 5v-5h-5"})})}function s6t(){return{busy:!1,error:"",message:""}}function a6t({version:e,localMode:t,role:n,provider:i,region:r,onBack:s}){const{t:a}=Oe("ui"),l=n==="admin",[c,u]=m.useState(""),[d,f]=m.useState([]),[h,p]=m.useState([]),[g,b]=m.useState(null),[v,y]=m.useState(!0),[x,w]=m.useState(""),[O,k]=m.useState(!0),[S,E]=m.useState(""),[C,N]=m.useState(!0),[_,j]=m.useState(""),[T,L]=m.useState(0),[A,R]=m.useState(0),[P,$]=m.useState(0),M=m.useRef(!1),[B,I]=m.useState({}),[H,X]=m.useState({}),[Q,q]=m.useState(""),[U,te]=m.useState(!0),le=m.useRef(new Set),oe=m.useRef(0),re=`${i}:${r}`,he=m.useRef(re);he.current=re,m.useEffect(()=>{X({}),I({})},[re]),m.useEffect(()=>(M.current=!0,()=>{M.current=!1}),[]);function K(se,de){I(ke=>({...ke,[se]:{...s6t(),...ke[se],...de}}))}async function G(se){if(!se.toolId||le.current.has(se.toolId))return;const de=re;le.current.add(se.toolId),oe.current+=1,K(se.toolId,{busy:!0,error:"",message:""});try{const ke=await oye(se.kind);if(!M.current||he.current!==de)return;oe.current+=1,X(Te=>({...Te,[se.toolId]:ke.state})),K(se.toolId,{busy:!1,error:"",message:ke.updated?a("systemInfo.modelEnvUpdated"):a("systemInfo.modelEnvAlreadyCurrent")})}catch{if(!M.current||he.current!==de)return;oe.current+=1,K(se.toolId,{busy:!1,error:a("systemInfo.sandboxUpdateError"),message:""})}finally{le.current.delete(se.toolId)}}return m.useEffect(()=>{if(!l)return;const se=new AbortController,de=++oe.current;return q(""),te(!0),aye(se.signal).then(ke=>{se.signal.aborted||de!==oe.current||X(Object.fromEntries(ke.map(Te=>[Te.toolId,Te])))}).catch(()=>{!se.signal.aborted&&de===oe.current&&q(a("systemInfo.versionCheckError"))}).finally(()=>{se.signal.aborted||te(!1)}),()=>se.abort()},[l,i,r,T]),m.useEffect(()=>{if(!Object.values(H).some(de=>de.status==="Updating"||de.status==="Creating"))return;const se=window.setTimeout(()=>L(de=>de+1),5e3);return()=>window.clearTimeout(se)},[H]),m.useEffect(()=>{if(!l){u(""),f([]),y(!1),w("");return}const se=new AbortController;return y(!0),w(""),o0e(se.signal).then(de=>{se.signal.aborted||(u(de.storage.tosAddress),f(de.sandboxTools))}).catch(de=>{(de==null?void 0:de.name)!=="AbortError"&&w(a("systemInfo.sandboxInfoError"))}).finally(()=>{se.signal.aborted||y(!1)}),()=>se.abort()},[l,i,r,T]),m.useEffect(()=>{if(!l){p([]),k(!1),E("");return}const se=new AbortController;return k(!0),E(""),eR(se.signal).then(de=>{p(de.filter(ke=>ke.isCurrent))}).catch(de=>{if((de==null?void 0:de.name)!=="AbortError"){if(t&&i6t(de)){p([]);return}E(a("systemInfo.userPoolError"))}}).finally(()=>{se.signal.aborted||k(!1)}),()=>se.abort()},[l,t,A]),m.useEffect(()=>{if(!l){b(null),N(!1),j("");return}const se=new AbortController;return N(!0),j(""),C0e(se.signal).then(b).catch(de=>{(de==null?void 0:de.name)!=="AbortError"&&j(a("systemInfo.environmentResourcesError"))}).finally(()=>{se.signal.aborted||N(!1)}),()=>se.abort()},[l,P]),o.jsxs("div",{className:"system-info-page",children:[o.jsxs("header",{className:"system-info-page-header",children:[o.jsx(Vje,{label:a("common.back"),onClick:s}),o.jsxs("div",{children:[o.jsx("h1",{children:a("systemInfo.title")}),o.jsx("p",{children:a("systemInfo.description")})]})]}),o.jsxs("div",{className:"system-info-scroll",children:[o.jsxs("section",{className:"system-info-section","aria-labelledby":"studio-info-title",children:[o.jsx("h2",{id:"studio-info-title",children:a("systemInfo.general")}),o.jsx("dl",{className:"system-info-summary",children:o.jsxs("div",{children:[o.jsx("dt",{children:a("systemInfo.currentVersion")}),o.jsx("dd",{children:e||"—"})]})})]}),l?o.jsxs(o.Fragment,{children:[o.jsxs("section",{className:"system-info-section","aria-labelledby":"storage-info-title",children:[o.jsx("h2",{id:"storage-info-title",children:a("systemInfo.storage")}),v?o.jsx("div",{className:"system-info-loading",role:"status","aria-live":"polite",children:o.jsx(Tn,{as:"span",children:a("systemInfo.loadingStorage")})}):x?o.jsxs("div",{className:"system-info-error",role:"alert",children:[o.jsx("p",{children:x}),o.jsx("button",{type:"button",onClick:()=>L(se=>se+1),children:a("common.reload")})]}):o.jsx("dl",{className:"system-info-summary",children:o.jsxs("div",{className:"system-info-resource-row",children:[o.jsx("dt",{children:a("systemInfo.tosAddress")}),o.jsx("dd",{className:`system-info-resource-value${c?"":" is-empty"}`,children:o.jsx(uO,{href:e6t(i,c),label:a("systemInfo.openTosConsole"),children:c||a("common.notConfigured")})})]})})]}),o.jsxs("section",{className:"system-info-section","aria-labelledby":"environment-build-info-title",children:[o.jsx("h2",{id:"environment-build-info-title",children:a("systemInfo.environmentBuild")}),C?o.jsx("div",{className:"system-info-loading",role:"status","aria-live":"polite",children:o.jsx(Tn,{as:"span",children:a("systemInfo.loadingEnvironmentResources")})}):_?o.jsxs("div",{className:"system-info-error",role:"alert",children:[o.jsx("p",{children:_}),o.jsx("button",{type:"button",onClick:()=>$(se=>se+1),children:a("common.reload")})]}):g?o.jsxs("dl",{className:"system-info-summary",children:[o.jsxs("div",{className:"system-info-resource-row",children:[o.jsx("dt",{children:a("systemInfo.codePipelineWorkspace")}),o.jsx("dd",{className:"system-info-resource-value",children:o.jsx(uO,{href:g.codePipeline.consoleUrl||null,label:a("systemInfo.openCodePipelineWorkspace"),children:g.codePipeline.workspaceName||g.codePipeline.workspaceId||a("systemInfo.createdOnFirstBuild")})})]}),o.jsxs("div",{className:"system-info-resource-row",children:[o.jsx("dt",{children:a("systemInfo.codePipelinePipeline")}),o.jsx("dd",{className:"system-info-resource-value",children:g.codePipeline.pipelineName||g.codePipeline.pipelineId||a("systemInfo.createdOnFirstBuild")})]}),o.jsxs("div",{className:"system-info-resource-row",children:[o.jsx("dt",{children:a("systemInfo.containerRegistryRepository")}),o.jsx("dd",{className:"system-info-resource-value",children:o.jsx(uO,{href:g.containerRegistry.consoleUrl||null,label:a("systemInfo.openContainerRegistryRepository"),children:g.containerRegistry.imageRepository||[g.containerRegistry.registry,g.containerRegistry.namespace,g.containerRegistry.repository].filter(Boolean).join("/")||a("systemInfo.createdOnFirstBuild")})})]})]}):null]}),o.jsxs("section",{className:"system-info-section","aria-labelledby":"sandbox-tool-title",children:[o.jsx("h2",{id:"sandbox-tool-title",children:a("systemInfo.sandboxInfo")}),o.jsx("button",{type:"button",className:"system-info-refresh",disabled:U,onClick:()=>L(se=>se+1),children:a(U?"systemInfo.checkingVersions":"systemInfo.checkUpdates")}),v?o.jsx("div",{className:"system-info-loading",role:"status","aria-live":"polite",children:o.jsx(Tn,{as:"span",children:a("systemInfo.loadingSandboxInfo")})}):x?o.jsxs("div",{className:"system-info-error",role:"alert",children:[o.jsx("p",{children:x}),o.jsx("button",{type:"button",onClick:()=>L(se=>se+1),children:a("common.reload")})]}):o.jsxs("div",{className:"system-info-tool-list",children:[Q?o.jsx("span",{className:"system-info-inline-error",role:"alert",children:Q}):null,d.map(se=>{var Be;const de=H[se.toolId],ke=B[se.toolId],Te=!!se.toolId&&!!(de!=null&&de.canUpdate),rt=(ke==null?void 0:ke.error)||(de!=null&&de.error?a("systemInfo.versionCheckError"):de!=null&&de.modelEnvError?a("systemInfo.modelEnvRepairUnavailable"):"");return o.jsx("dl",{className:"system-info-tool",children:o.jsxs("div",{className:"system-info-resource-row",children:[o.jsxs("dt",{className:"system-info-tool-label",children:[o.jsx("span",{children:se.label}),se.snapshot?o.jsx("span",{className:"system-info-tool-badge",children:a("systemInfo.snapshot")}):null]}),o.jsxs("dd",{className:`system-info-resource-value${se.toolId?"":" is-empty"}`,children:[o.jsx(uO,{href:t6t(i,(de==null?void 0:de.region)||r,se.toolId),label:a("systemInfo.openToolConsole",{name:se.label}),children:se.toolId||a("common.notConfigured")}),Te?o.jsx("button",{type:"button",className:"system-info-resource-update",disabled:ke==null?void 0:ke.busy,"aria-busy":(ke==null?void 0:ke.busy)||void 0,"aria-label":a("systemInfo.updateSandbox",{name:se.label,variant:se.snapshot?a("systemInfo.snapshotWithSpace"):""}),title:a("systemInfo.updateSandbox",{name:se.label,variant:se.snapshot?a("systemInfo.snapshotWithSpace"):""}),onClick:()=>void G(se),children:o.jsx(r6t,{spinning:(ke==null?void 0:ke.busy)||!1})}):null,de!=null&&de.currentImage?o.jsxs("span",{className:"system-info-inline-status",title:`${de.currentImage} → ${de.latestImage}`,children:[de.currentImage.split(":").pop(),de.needsImageUpdate?` → ${(Be=de.latestImage)==null?void 0:Be.split(":").pop()}`:"",de.status==="Updating"?` · ${a("systemInfo.updatingSandbox")}`:""]}):null,ke!=null&&ke.message?o.jsx("span",{className:"system-info-inline-status",role:"status",children:ke.message}):null,rt?o.jsx("span",{className:"system-info-inline-error",role:"alert",children:rt}):null]})]})},se.kind)})]})]}),o.jsxs("section",{className:"system-info-section","aria-labelledby":"user-pool-title",children:[o.jsx("h2",{id:"user-pool-title",children:a("systemInfo.userPool")}),O?o.jsx("div",{className:"system-info-loading",role:"status","aria-live":"polite",children:o.jsx(Tn,{as:"span",children:a("systemInfo.loadingUserPool")})}):S?o.jsxs("div",{className:"system-info-error",role:"alert",children:[o.jsx("p",{children:S}),o.jsx("button",{type:"button",onClick:()=>R(se=>se+1),children:a("common.reload")})]}):h.length>0?o.jsx("div",{className:"system-info-pool-list",children:h.map(se=>o.jsxs("dl",{className:"system-info-pool",children:[o.jsxs("div",{children:[o.jsx("dt",{children:a("common.name")}),o.jsx("dd",{className:"system-info-resource-value",children:o.jsx(uO,{href:n6t(i,se.region||r,se.uid),label:a("systemInfo.openUserPoolConsole",{name:se.name||""}),children:se.name||a("systemInfo.unnamedUserPool")})})]}),o.jsxs("div",{children:[o.jsx("dt",{children:a("systemInfo.id")}),o.jsx("dd",{children:se.uid||"—"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:a("systemInfo.domain")}),o.jsx("dd",{children:se.domain||"—"})]}),o.jsxs("div",{children:[o.jsx("dt",{children:a("systemInfo.region")}),o.jsx("dd",{children:se.region||"—"})]})]},se.uid))}):o.jsx("p",{className:"system-info-empty",children:a(t?"systemInfo.noLocalUserPool":"systemInfo.noUserPool")})]})]}):null]})]})}const o6t="_TextLink_16uec_1",l6t={TextLink:o6t},g2=e=>{const{children:t,primary:n=!1,underline:i=!n,className:r,target:s,forceExternal:a,as:l,href:c,to:u,...d}=e,f=a??/^https?:\/\//.test(c??u??""),h=Ixe(),p=l||(f?"a":h),g={...d,className:bi(l6t.TextLink,r),"data-primary":n?"":void 0,"data-underline":i?"":void 0};if(!c&&!u)return o.jsx("span",{...g,role:"button",children:t});const b={...f?{target:"_blank",rel:"noopener noreferrer",href:c??u}:{href:c,to:u},...g};return o.jsx(p,{...b,children:t})},c6t="/assets/media/article-agent-workflow-GXPkXUjV.webp",u6t="/assets/media/article-tool-debugging-BxiMDz_8.webp",d6t="/assets/media/showcase-a2ui-BgBnE9RT.webp",f6t="/assets/media/showcase-customer-service-DNw0mUH1.webp",h6t="/assets/media/showcase-multimodal-BRTl8NLI.webp",p6t="/assets/media/showcase-research-assistant-CbfMFfhS.webp",m6t="/assets/media/showcase-web-search-D2kl1imN.webp",g6t={volcengine:{console:"https://console.volcengine.com/agentkit",docs:"https://www.volcengine.com/docs/86681/1844823"},byteplus:{console:"https://console.byteplus.com/agentkit",docs:"https://docs.byteplus.com/en/docs/AgentKit"}};function b6t(e){return g6t[e]}const y6t=[{id:"documentation",titleKey:"developerResources.sections.documentation.title",descriptionKey:"developerResources.sections.documentation.description"},{id:"best-practices",titleKey:"developerResources.sections.bestPractices.title",descriptionKey:"developerResources.sections.bestPractices.description"},{id:"showcases",titleKey:"developerResources.sections.showcases.title",descriptionKey:"developerResources.sections.showcases.description"}],v6t="https://volcengine.github.io/veadk-python/",x6t="https://volcengine.github.io/agentkit-sdk-python/content/2.agentkit-cli/1.overview.html",O6t=[{id:"veadk-development",titleKey:"developerResources.articles.veadkDevelopment.title",descriptionKey:"developerResources.articles.veadkDevelopment.description",meta:"AgentKit · VeADK",image:c6t,href:"https://docs.volcengine.com/docs/86681/2155817?lang=zh"},{id:"agentkit-cli-development",titleKey:"developerResources.articles.cliDevelopment.title",descriptionKey:"developerResources.articles.cliDevelopment.description",meta:"AgentKit · CLI",image:u6t,href:"https://docs.volcengine.com/docs/86681/1844871?lang=zh"}],w6t=[{id:"research-assistant",titleKey:"developerResources.showcases.researchAssistant.title",descriptionKey:"developerResources.showcases.researchAssistant.description",image:p6t,href:"https://github.com/volcengine/veadk-python/tree/main/examples/06_multi_agent"},{id:"multimodal-analysis",titleKey:"developerResources.showcases.multimodalAnalysis.title",descriptionKey:"developerResources.showcases.multimodalAnalysis.description",image:h6t,href:"https://github.com/volcengine/veadk-python/tree/main/examples/multimodal_agent"},{id:"customer-service",titleKey:"developerResources.showcases.customerService.title",descriptionKey:"developerResources.showcases.customerService.description",image:f6t,href:"https://github.com/volcengine/veadk-python/tree/main/examples/basic-app"},{id:"web-search",titleKey:"developerResources.showcases.webSearch.title",descriptionKey:"developerResources.showcases.webSearch.description",image:m6t,href:"https://github.com/volcengine/veadk-python/tree/main/examples/04_web_search"},{id:"a2ui-app",titleKey:"developerResources.showcases.a2uiApp.title",descriptionKey:"developerResources.showcases.a2uiApp.description",image:d6t,href:"https://github.com/volcengine/veadk-python/tree/main/examples/a2ui_agent"}];function S6t({cloudProvider:e}){const{t}=Oe("workspaceTools"),n=b6t(e);return o.jsxs(Ph,{className:"developer-resources","aria-label":t("developerResources.title"),children:[o.jsx(zx,{title:t("developerResources.title")}),o.jsx("div",{className:"developer-resources__content",children:y6t.map(i=>o.jsxs("section",{className:"developer-resources__section","aria-labelledby":`developer-resources-${i.id}`,children:[o.jsxs("header",{className:"developer-resources__section-header",children:[o.jsx("h2",{id:`developer-resources-${i.id}`,children:t(i.titleKey)}),o.jsx("p",{children:t(i.descriptionKey)})]}),i.id==="documentation"?o.jsxs("ul",{className:"developer-resources__links",children:[o.jsx("li",{children:o.jsxs(g2,{className:"developer-resources__link",primary:!0,underline:!0,href:v6t,target:"_blank",rel:"noreferrer",children:[t("developerResources.links.veadkDocs"),o.jsx(KC,{"aria-hidden":"true"})]})}),o.jsx("li",{children:o.jsxs(g2,{className:"developer-resources__link",primary:!0,underline:!0,href:x6t,target:"_blank",rel:"noreferrer",children:[t("developerResources.links.cliDocs"),o.jsx(KC,{"aria-hidden":"true"})]})}),o.jsx("li",{children:o.jsxs(g2,{className:"developer-resources__link",primary:!0,underline:!0,href:n.docs,target:"_blank",rel:"noreferrer",children:[t("developerResources.links.platformDocs"),o.jsx(KC,{"aria-hidden":"true"})]})}),o.jsx("li",{children:o.jsxs(g2,{className:"developer-resources__link",primary:!0,underline:!0,href:n.console,target:"_blank",rel:"noreferrer",children:[t("developerResources.links.console"),o.jsx(KC,{"aria-hidden":"true"})]})})]}):i.id==="best-practices"?o.jsx("div",{className:"developer-resources__articles",children:O6t.map(r=>o.jsxs("a",{className:"developer-resources__article",href:r.href,target:"_blank",rel:"noreferrer",children:[o.jsx("img",{src:r.image,alt:t("developerResources.articles.coverAlt",{title:t(r.titleKey)}),loading:"lazy"}),o.jsxs("span",{className:"developer-resources__article-copy",children:[o.jsx("strong",{children:t(r.titleKey)}),o.jsx("span",{children:t(r.descriptionKey)}),o.jsx("small",{children:r.meta})]})]},r.id))}):i.id==="showcases"?o.jsx("div",{className:"developer-resources__showcases",children:w6t.map(r=>o.jsxs("a",{className:"developer-resources__showcase",href:r.href,target:"_blank",rel:"noreferrer",children:[o.jsx("span",{className:"developer-resources__showcase-media",children:o.jsx("img",{src:r.image,alt:t("developerResources.showcases.previewAlt",{title:t(r.titleKey)}),loading:"lazy"})}),o.jsx("strong",{children:t(r.titleKey)}),o.jsx("span",{children:t(r.descriptionKey)})]},r.id))}):null]},i.id))})]})}function k6t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"m9.8 3.5-4.5 4.5 4.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function E6t({hidden:e,...t}){return o.jsxs("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:[o.jsx("path",{d:"M2.5 10s2.6-4 7.5-4 7.5 4 7.5 4-2.6 4-7.5 4-7.5-4-7.5-4Z"}),o.jsx("circle",{cx:"10",cy:"10",r:"1.8"}),e?o.jsx("path",{d:"m4 4 12 12"}):null]})}function Vte(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M6.5 4H4.8A1.8 1.8 0 0 0 3 5.8v5.4A1.8 1.8 0 0 0 4.8 13h5.4a1.8 1.8 0 0 0 1.8-1.8V9.5M9 3h4v4M12.5 3.5 7.2 8.8",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function C6t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"m4 6 4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function T6t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"m3.5 8.2 2.8 2.8 6.2-6.2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function aL(e,t,n){const i=t.trim();if(!i)return n?"github.validation.required":"";if(e==="repository"&&!/^(?:https:\/\/github\.com\/)?[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+(?:\.git)?$/.test(i))return"github.validation.repository";if(e==="baseBranch"&&(!/^[A-Za-z0-9][A-Za-z0-9._/-]*$/.test(i)||i.includes("..")))return"github.validation.baseBranch";if(e==="projectPath"&&(i.startsWith("/")||i.split("/").includes("..")))return"github.validation.projectPath";if(e==="runtimeName")return zE(i,r=>`github.validation.runtimeName.${r}`)??"";if(e==="runtimeId"&&!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(i))return"github.validation.runtimeId";if(e==="sandboxToolId"&&!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(i))return"github.validation.sandboxToolId";if(e==="modelName"&&!/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$/.test(i))return"github.validation.modelName";if(e==="modelBaseUrl")try{const r=new URL(i);if(r.protocol!=="https:"||r.username||r.password||r.search||r.hash)return"github.validation.modelBaseUrlSafe"}catch{return"github.validation.modelBaseUrl"}return""}function A6t({automation:e,cloudProvider:t,onBack:n}){const{t:i}=Oe("automations"),r=R4t(e),s=Pu(t),a=r.secrets({cloudProvider:t}),[l,c]=m.useState(()=>({...r.initialValues({cloudProvider:t})})),u=s.find(T=>T.value===l.region),[d,f]=m.useState({}),[h,p]=m.useState(""),[g,b]=m.useState(!1),[v,y]=m.useState(!1),[x,w]=m.useState(!1),[O,k]=m.useState(null),S=m.useRef(null);m.useEffect(()=>()=>{var T;return(T=S.current)==null?void 0:T.abort()},[]),m.useEffect(()=>{var T;c({...r.initialValues({cloudProvider:t})}),f({}),p(""),k(null),w(!1),(T=S.current)==null||T.abort()},[e,t,r]);const E=(T,L)=>{c(A=>({...A,[T]:L})),d[T]&&f(A=>({...A,[T]:""}))},C=T=>{var R;const L=T==="token"||((R=r.fields.find(P=>P.name===T))==null?void 0:R.required)===!0,A=aL(T,l[T],L);f(P=>({...P,[T]:A}))},N=async T=>{var P;T.preventDefault();const L={};for(const $ of r.fields){const M=aL($.name,l[$.name],$.required);M&&(L[$.name]=M)}const A=aL("token",l.token,!0);if(A&&(L.token=A),f(L),Object.keys(L).length)return;(P=S.current)==null||P.abort();const R=new AbortController;S.current=R,b(!0),p(""),k(null);try{const $=await r.submit(l,{cloudProvider:t},R.signal);if(S.current!==R)return;k($),c(M=>({...M,token:""}))}catch($){if(R.signal.aborted||S.current!==R)return;p($ instanceof Error?$.message:String($))}finally{S.current===R&&(S.current=null,b(!1))}},_=T=>{T.key==="Enter"&&(T.nativeEvent.isComposing||T.nativeEvent.keyCode===229)&&T.preventDefault()},j=T=>{const{name:L,placeholder:A,required:R}=T,P=`cards.${e}.fields.${L}`;return o.jsxs("div",{className:"github-field",children:[o.jsxs("label",{htmlFor:`github-${L}`,children:[o.jsx("span",{children:i(`${P}.label`)}),o.jsx("span",{className:`github-field-requirement${R?" is-required":""}`,children:i(R?"github.required":"github.optional")})]}),o.jsx("input",{id:`github-${L}`,value:l[L],onChange:$=>E(L,$.target.value),onBlur:()=>C(L),placeholder:i(`${P}.placeholder`,{defaultValue:A}),required:R,"aria-invalid":!!d[L],"aria-describedby":`github-${L}-help${d[L]?` github-${L}-error`:""}`}),o.jsx("span",{id:`github-${L}-help`,className:"github-field-help",children:i(`${P}.help`)}),d[L]?o.jsx("span",{id:`github-${L}-error`,className:"github-field-error",role:"alert",children:i(d[L])}):null]},L)};return o.jsxs("div",{className:"github-integration-page",children:[o.jsxs("header",{className:"github-integration-header",children:[o.jsx("button",{type:"button",className:"github-back",onClick:n,"aria-label":i("backToAutomations"),children:o.jsx(k6t,{})}),o.jsx(VQ,{className:"github-integration-logo"}),o.jsxs("div",{children:[o.jsx("h1",{children:i(`cards.${e}.title`)}),o.jsx("p",{children:i(`cards.${e}.subtitle`)})]})]}),o.jsx("div",{className:"github-integration-layout",children:o.jsxs("section",{id:`github-panel-${e}`,className:"github-section-panel",children:[o.jsx("div",{className:"github-panel-heading",children:o.jsx("p",{children:i(`cards.${e}.panel`)})}),o.jsxs("form",{className:"github-release-form",onSubmit:N,onKeyDown:_,noValidate:!0,children:[o.jsxs("div",{className:"github-field-grid",children:[r.fields.map(j),o.jsxs("div",{className:"github-field",children:[o.jsxs("label",{id:"github-region-label",children:[o.jsx("span",{children:i("github.region")}),o.jsx("span",{className:"github-field-requirement is-required",children:i("github.required")})]}),o.jsxs("div",{className:"pp-network-region github-region-picker",onKeyDown:T=>{T.key==="Escape"&&w(!1)},children:[o.jsxs("button",{type:"button",className:"pp-region-trigger","aria-labelledby":"github-region-label","aria-haspopup":"listbox","aria-expanded":x,onClick:()=>w(T=>!T),children:[o.jsx("span",{children:(u==null?void 0:u.label)??l.region}),o.jsx(C6t,{className:`pp-region-chevron${x?" is-open":""}`})]}),x?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"menu-scrim",onClick:()=>w(!1)}),o.jsx("div",{className:"pp-region-menu",role:"listbox","aria-label":i("github.region"),children:s.map(T=>{const L=T.value===l.region;return o.jsxs("button",{type:"button",role:"option","aria-selected":L,className:`pp-region-option${L?" is-selected":""}`,onClick:()=>{E("region",T.value),w(!1)},children:[o.jsx("span",{children:T.label}),L?o.jsx(T6t,{}):null]},T.value)})})]}):null]}),o.jsx("span",{className:"github-field-help",children:i(`cards.${e}.regionHelp`)})]})]}),o.jsxs("div",{className:"github-field github-token-field",children:[o.jsxs("div",{className:"github-token-label-row",children:[o.jsxs("label",{htmlFor:"github-token",children:[o.jsx("span",{children:i("github.tokenLabel")}),o.jsx("span",{className:"github-field-requirement is-required",children:i("github.required")})]}),o.jsxs("a",{href:"https://github.com/settings/personal-access-tokens/new?name=VeADK%20Studio&description=Create%20a%20GitHub%20automation%20pull%20request&contents=write&pull_requests=write",target:"_blank",rel:"noreferrer",children:[i("github.getToken"),o.jsx(Vte,{})]})]}),o.jsxs("div",{className:"github-token-input",children:[o.jsx("input",{id:"github-token",type:v?"text":"password",value:l.token,onChange:T=>E("token",T.target.value),onBlur:()=>C("token"),autoComplete:"off",required:!0,placeholder:i("github.tokenPlaceholder"),"aria-invalid":!!d.token,"aria-describedby":`github-token-help${d.token?" github-token-error":""}`}),o.jsx("button",{type:"button",onClick:()=>y(T=>!T),"aria-label":i(v?"github.hideToken":"github.showToken"),title:i(v?"github.hideToken":"github.showToken"),children:o.jsx(E6t,{hidden:v})})]}),o.jsx("span",{id:"github-token-help",className:"github-field-help",children:i("github.tokenHelp")}),d.token?o.jsx("span",{id:"github-token-error",className:"github-field-error",role:"alert",children:i(d.token)}):null]}),h?o.jsx("div",{className:"github-submit-message is-error",role:"alert",children:h}):null,O?o.jsxs("div",{className:"github-submit-message is-success",role:"status",children:[o.jsx("span",{children:i("github.prCreated",{number:O.number})}),o.jsxs("a",{href:O.url,target:"_blank",rel:"noreferrer",children:[i("github.viewOnGitHub"),o.jsx(Vte,{})]})]}):null,o.jsxs("div",{className:"github-form-actions",children:[o.jsxs("div",{className:"github-secrets-note",children:[o.jsx("strong",{children:i("github.secretsHeading")}),a.map(T=>o.jsx("span",{children:T},T))]}),o.jsx("button",{type:"submit",disabled:g,children:i(g?"github.submitting":`cards.${e}.submitLabel`)})]})]})]})})]})}const _6t=1050062,Hte="1.0",N6t="https://lf-static.applogcdn.com/obj/applog-sdk-static/log-sdk/collect/5/collect.js";class j6t{constructor(){Mi(this,"enabled",!1);Mi(this,"initialized",!1);Mi(this,"pending",[]);Mi(this,"userUniqueId","");Mi(this,"initPromise")}init(t){return this.enabled=t.enabled,this.enabled?this.initPromise?this.initPromise:(this.initPromise=Promise.resolve().then(()=>{const n=this.bootstrapCollector();n("init",{app_id:_6t,channel:"cn",disable_auto_pv:1}),this.userUniqueId&&n("config",{user_unique_id:this.userUniqueId}),n("config",{_staging_flag:t.environment==="prod"?0:1}),n("start"),this.initialized=!0;const i=this.pending;this.pending=[];for(const[r,s]of i)this.collect(r,s)}),this.initPromise):(this.pending=[],Promise.resolve())}identify(t){this.userUniqueId=t,this.initialized&&this.collect("config",{user_unique_id:t})}emit(t,n){if(this.enabled){if(this.initialized){this.collect(t,n);return}this.pending=[...this.pending.slice(-49),[t,n]]}}bootstrapCollector(){if(window.collectEvent)return window.collectEvent;window.LogAnalyticsObject="collectEvent";const t=function(){var r;(r=t.q)==null||r.push(arguments)};t.q=[],t.l=Date.now(),window.collectEvent=t;const n=document.createElement("script");return n.async=!0,n.src=N6t,n.onerror=()=>{this.enabled=!1,t.q=[],console.warn("[telemetry] TEA SDK script failed to load")},document.head.appendChild(n),t}collect(t,n){var i;(i=window.collectEvent)==null||i.call(window,t,n)}}const R6t=256,Hje=1024,oL="[REDACTED]";function I6t(e){if(typeof e!="string"&&typeof e!="number")return;const t=String(e).trim();return/^[A-Za-z0-9_.:-]{1,64}$/.test(t)?t:void 0}function Tf(e,t){return t===void 0?{errorKind:e}:{errorKind:e,errorCode:t}}function qje(e,t,n={}){if(e.length<=t)return e;if(n.preserveEnd){const r="[truncated] ...";return`${r}${e.slice(-Math.max(0,t-r.length))}`}const i="... [truncated]";return`${e.slice(0,Math.max(0,t-i.length))}${i}`}function P6t(e){return e.replace(/\b(Authorization\s*[:=]\s*)(Bearer\s+)?[^\s"',;&]+/gi,(t,n,i)=>`${n}${i??""}${oL}`).replace(/\bBearer\s+[A-Za-z0-9._~+/=-]+/gi,`Bearer ${oL}`).replace(/\b([\w.-]*(?:token|password|passwd|secret|api[_-]?key|access[_-]?key|secret[_-]?key|cookie)[\w.-]*\s*[:=]\s*)(["']?)[^\s"',;&]+/gi,(t,n,i)=>`${n}${i}${oL}`)}function vv(e,t={}){const n=e!==null&&typeof e=="object"?e:{},r=(typeof n.message=="string"?n.message:typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):"").replace(/\s+/g," ").trim();if(r)return qje(P6t(r),Hje,t)}function No(e,t={}){const n=e!==null&&typeof e=="object"?e:{},i=I6t(n.code),r=typeof n.name=="string"?n.name:"";if(r==="RuntimeProbeError")return Tf("runtime_probe_error",i);if(r==="AbortError")return Tf("abort",i);if(r==="RuntimeAccessDeniedError"||r==="AuthError")return Tf("auth",i);if(t.phase==="build")return Tf("build_failed",i);if(r==="TimeoutError")return Tf("timeout",i);if(r==="NetworkError"||r==="TypeError")return Tf("network",i);if(r==="ValidationError")return Tf("validation",i);if(r==="ServerError")return Tf("server",i);const s=typeof n.status=="number"&&Number.isInteger(n.status)?n.status:void 0;if(s===void 0||s<400||s>599)return Tf("unknown",i);const a=String(s);return s===401||s===403?{errorKind:"auth",errorCode:a}:s===400||s===409||s===422?{errorKind:"validation",errorCode:a}:s>=500?{errorKind:"server",errorCode:a}:{errorKind:"unknown",errorCode:a}}const D6t=["schema_version","event_id","operation_id","user_pool_id","studio_deploy_id","vefaas_application_id","vefaas_function_id","studio_region","studio_project","studio_version","environment","cloud_provider","account_id","account_id_resolution_error","user_role","user_source","page_instance_id"],M6t={studio_entry_viewed:["auth_state"],studio_session_started:["agents_source"],studio_agent_deploy:["status","agent_id","deploy_action","deploy_source","create_mode","ai_assisted","deploy_region","runtime_network_type","feishu_enabled","runtime_id","duration_ms","failed_phase","error_kind","error_code","error_message"],studio_sandbox_create:["status","sandbox_kind","sandbox_source","sandbox_id","duration_ms","error_kind","error_code"],studio_agent_debug:["status","agent_id","variant_type","debug_run_id","duration_ms","failed_phase","error_kind","error_code"],studio_agent_connect:["status","target_id","agent_kind","connect_source","runtime_region","runtime_is_mine","sandbox_status","duration_ms","error_kind","error_code"],studio_agent_message:["status","agent_id","agent_kind","message_source","session_state","session_id","duration_ms","failed_phase","error_kind","error_code"],studio_agent_source_download:["status","agent_id","deploy_action","deploy_source","create_mode","ai_assisted","duration_ms","file_count","zip_size_bytes","error_kind","error_code"]};function L6t(e){return typeof e=="string"||typeof e=="number"&&Number.isFinite(e)}function qte(e,t){const n=new Set([...D6t,...M6t[e]]),i={};for(const[r,s]of Object.entries(t))!n.has(r)||!L6t(s)||(typeof s=="string"?i[r]=qje(s,r==="error_message"?Hje:R6t):i[r]=s);return i}function $6t(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function F6t(){return typeof performance<"u"?performance.now():Date.now()}function z0(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}class B6t{constructor(t){Mi(this,"sink");Mi(this,"createId");Mi(this,"now");Mi(this,"pageInstanceId");Mi(this,"context");Mi(this,"identity");Mi(this,"entryViewed",!1);Mi(this,"sessionStarted",!1);this.sink=t.sink,this.createId=t.createId??$6t,this.now=t.now??F6t,this.pageInstanceId=this.createId()}setContext(t){var n,i;this.context={...t,accountId:((n=t.accountId)==null?void 0:n.trim())??"",accountIdResolutionError:((i=t.accountIdResolutionError)==null?void 0:i.trim())??""}}identify(t){var i,r,s;const n=t.userUniqueId.trim();n&&(this.identity&&this.identity.userUniqueId!==n&&(this.pageInstanceId=this.createId(),this.sessionStarted=!1),this.identity={...t,userUniqueId:n,accountId:((i=t.accountId)==null?void 0:i.trim())??""},(s=(r=this.sink).identify)==null||s.call(r,n))}trackStudioSessionStarted(t){this.sessionStarted||!this.context||!this.identity||(this.sessionStarted=!0,this.emit("studio_session_started",{agents_source:t.agentsSource}))}trackStudioEntryViewed(t){if(this.entryViewed||!this.context)return;this.entryViewed=!0;const n=qte("studio_entry_viewed",z0({schema_version:Hte,event_id:this.createId(),user_pool_id:this.context.userPoolId,studio_deploy_id:this.context.studioDeployId,vefaas_application_id:this.context.applicationId,vefaas_function_id:this.context.functionId,studio_region:this.context.studioRegion,studio_project:this.context.studioProject,studio_version:this.context.studioVersion,environment:this.context.environment,cloud_provider:this.context.cloudProvider,account_id:this.context.accountId,account_id_resolution_error:this.context.accountIdResolutionError||void 0,page_instance_id:this.pageInstanceId,auth_state:t.authState}));this.sink.emit("studio_entry_viewed",n)}beginAgentDeploy(t){return this.beginOperation("studio_agent_deploy",{agent_id:t.agentId,deploy_action:t.deployAction,deploy_source:t.deploySource,create_mode:t.createMode,ai_assisted:t.aiAssisted,deploy_region:t.deployRegion,runtime_network_type:t.runtimeNetworkType,feishu_enabled:t.feishuEnabled},n=>({runtime_id:n.runtimeId}),n=>({failed_phase:n.failedPhase,error_kind:n.errorKind,error_code:n.errorCode,error_message:n.errorMessage}))}beginSandboxCreate(t){return this.beginOperation("studio_sandbox_create",{sandbox_kind:t.sandboxKind,sandbox_source:t.sandboxSource},n=>({sandbox_id:n.sandboxId}),n=>({error_kind:n.errorKind,error_code:n.errorCode}))}beginAgentDebug(t){return this.beginOperation("studio_agent_debug",{agent_id:t.agentId,variant_type:t.variantType},n=>({debug_run_id:n.debugRunId}),n=>({failed_phase:n.failedPhase,error_kind:n.errorKind,error_code:n.errorCode}))}beginAgentConnect(t){return this.beginOperation("studio_agent_connect",{target_id:t.targetId,agent_kind:t.agentKind,connect_source:t.connectSource},n=>z0({runtime_region:n.runtimeRegion,runtime_is_mine:n.runtimeIsMine,sandbox_status:n.sandboxStatus}),n=>z0({error_kind:n.errorKind,error_code:n.errorCode}))}beginAgentMessage(t){return this.beginOperation("studio_agent_message",z0({agent_id:t.agentId,agent_kind:t.agentKind,message_source:t.messageSource,session_state:t.sessionState,session_id:t.sessionId}),n=>({session_id:n.sessionId}),n=>z0({session_id:n.sessionId,failed_phase:n.failedPhase,error_kind:n.errorKind,error_code:n.errorCode}))}beginAgentSourceDownload(t){return this.beginOperation("studio_agent_source_download",{agent_id:t.agentId,deploy_action:t.deployAction,deploy_source:t.deploySource,create_mode:t.createMode,ai_assisted:t.aiAssisted},n=>({file_count:n.fileCount,zip_size_bytes:n.zipSizeBytes}),n=>({file_count:n.fileCount,error_kind:n.errorKind,error_code:n.errorCode}))}beginOperation(t,n,i,r){const s=this.createId(),a=this.now(),l=!!(this.context&&this.identity);let c=!1;l&&this.emit(t,{...n,status:"started"},s);const u=(d,f)=>{c||(c=!0,l&&this.emit(t,{...n,...f,status:d,duration_ms:Math.max(0,this.now()-a)},s))};return{operationId:s,succeed:d=>u("succeeded",i(d)),fail:d=>u("failed",r(d))}}emit(t,n,i){if(!this.context||!this.identity)return;const r=qte(t,z0({schema_version:Hte,event_id:this.createId(),operation_id:i,user_pool_id:this.context.userPoolId,studio_deploy_id:this.context.studioDeployId,vefaas_application_id:this.context.applicationId,vefaas_function_id:this.context.functionId,studio_region:this.context.studioRegion,studio_project:this.context.studioProject,studio_version:this.context.studioVersion,environment:this.context.environment,cloud_provider:this.context.cloudProvider,account_id:this.identity.accountId,account_id_resolution_error:this.context.accountIdResolutionError||void 0,user_role:this.identity.userRole,user_source:this.identity.userSource,page_instance_id:this.pageInstanceId,...n}));this.sink.emit(t,r)}}const Wje=new j6t,af=new B6t({sink:Wje});function U6t(e){return Wje.init(e)}function Q6t(e){af.setContext(e)}function z6t(e){af.identify(e)}function V6t(e){af.trackStudioEntryViewed(e)}function H6t(e){af.trackStudioSessionStarted(e)}function Kje(e){return af.beginAgentDeploy(e)}function q6t(e){return af.beginSandboxCreate(e)}function W6t(e){return af.beginAgentDebug(e)}function lL(e){return af.beginAgentConnect(e)}function Wte(e){return af.beginAgentMessage(e)}function Gje(e){return af.beginAgentSourceDownload(e)}const K6t=/^[A-Za-z_][A-Za-z0-9_]*$/;function VE(e,t=n=>It(`validation.agentName.${n}`)){return e.trim().length===0?t("required"):e==="user"?t("reserved"):K6t.test(e)?null:t("characters")}function G6t(e){const t=new Set,n=new Set,i=r=>{VE(r.name)===null&&(t.has(r.name)?n.add(r.name):t.add(r.name)),r.subAgents.forEach(i)};return i(e),n}function X6t(e){return{...sc(),name:e,description:eo("feishu.generatedAgent.description"),instruction:eo("feishu.generatedAgent.instruction"),deployment:{feishuEnabled:!0}}}async function Y6t(e){const t=X6t(e.agentName),n=await Ow(t);return Ax(n.name,n.files,{region:e.region,projectName:"default"},{taskId:e.taskId,sessionStorage:"in-memory",minInstance:1,maxInstance:1,description:t.description,im:{feishu:{enabled:!0}},envs:[{key:"FEISHU_APP_ID",value:e.appId},{key:"FEISHU_APP_SECRET",value:e.appSecret}],onStage:e.onStage})}const md=["cn-beijing","cn-shanghai"],Xje=["prepare","build","deploy","publish"];function Z6t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"m9.8 3.5-4.5 4.5 4.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function J6t(e){return o.jsx("svg",{viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"m5 7 4 4 4-4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Kte(e){return o.jsx("svg",{viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"m4 9.2 3.1 3.1L14 5.8",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function e$t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"M6.5 4H4.8A1.8 1.8 0 0 0 3 5.8v5.4A1.8 1.8 0 0 0 4.8 13h5.4a1.8 1.8 0 0 0 1.8-1.8V9.5M9 3h4v4M12.5 3.5 7.2 8.8",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function t$t(e){if(!e||e==="upload")return 0;const t=Xje.findIndex(n=>n===e);return t<0?0:t}function cL(e){switch(e){case"prepare":case"upload":case"build":case"deploy":case"publish":case"update":case"evaluation":return e;default:return"unknown"}}function Gte(e){const t=VE(e,n=>n);return t?`feishu.validation.agentName.${t}`:""}function n$t({onBack:e}){const{t}=Oe("automations"),[n,i]=m.useState("feishu_assistant"),[r,s]=m.useState(""),[a,l]=m.useState(""),[c,u]=m.useState(!1),[d,f]=m.useState("cn-beijing"),[h,p]=m.useState(!1),[g,b]=m.useState(""),[v,y]=m.useState(""),[x,w]=m.useState(""),[O,k]=m.useState("idle"),[S,E]=m.useState(null),[C,N]=m.useState(""),[_,j]=m.useState(null),T=m.useRef(null),L=m.useRef(null),A=m.useRef([]),R=m.useRef(0),P=m.useRef(null),$=m.useRef(null),M=m.useRef("prepare"),B=m.useRef(!1),I=m.useRef(!0),H=["preparing","running","cancelling"].includes(O);m.useEffect(()=>(I.current=!0,()=>{I.current=!1}),[]),m.useEffect(()=>{var K;if(!h)return;(K=A.current[R.current])==null||K.focus();const re=G=>{G.target instanceof Node&&T.current&&!T.current.contains(G.target)&&p(!1)},he=G=>{var se;G.key==="Escape"&&(p(!1),(se=L.current)==null||se.focus())};return window.addEventListener("pointerdown",re),window.addEventListener("keydown",he),()=>{window.removeEventListener("pointerdown",re),window.removeEventListener("keydown",he)}},[h]);const X=re=>{re.key==="Enter"&&(re.nativeEvent.isComposing||re.nativeEvent.keyCode===229)&&re.preventDefault()},Q=()=>{const re=Gte(n.trim()),he=r.trim()?"":"feishu.validation.appId",K=a.trim()?"":"feishu.validation.appSecret";return b(re),y(he),w(K),!re&&!he&&!K},q=async re=>{if(re.preventDefault(),!Q()||H)return;const he=crypto.randomUUID();P.current=he,M.current="prepare",B.current=!1,k("preparing"),E(null),N(""),j(null);const K=Kje({agentId:String(n.trim()),deployAction:"create",deploySource:"feishu_automation",createMode:"feishu_template",aiAssisted:0,deployRegion:String(d),runtimeNetworkType:"public",feishuEnabled:1});$.current=K;try{const G=await Y6t({agentName:n.trim(),appId:r.trim(),appSecret:a.trim(),region:d,taskId:he,onStage:se=>{M.current=se.phase||"deploy",!(!I.current||B.current)&&(k("running"),E(se))}});if(B.current){K.fail({failedPhase:cL(M.current),errorKind:"abort",errorMessage:vv("User cancelled deployment")});return}if(K.succeed({runtimeId:String(G.runtimeId||"")}),!I.current)return;j(G),l(""),u(!1),k("succeeded")}catch(G){if(K.fail({failedPhase:cL(M.current),...B.current?{errorKind:"abort"}:No(G,{phase:M.current}),errorMessage:vv(G)}),!I.current||B.current)return;k("failed"),N(G instanceof Error?G.message:String(G))}finally{P.current===he&&(P.current=null),$.current===K&&($.current=null)}},U=async()=>{var he;const re=P.current;if(!(!re||O!=="running")&&window.confirm(t("feishu.confirmCancel"))){B.current=!0,k("cancelling"),N("");try{await I0e(re),(he=$.current)==null||he.fail({failedPhase:cL(M.current),errorKind:"abort",errorMessage:vv("User cancelled deployment")}),I.current&&k("cancelled")}catch(K){if(B.current=!1,!I.current)return;k("failed"),N(K instanceof Error?K.message:String(K))}}},te=t$t((S==null?void 0:S.phase)??null),le=!!(n.trim()&&r.trim()&&a.trim()&&!H),oe=t(`feishu.regions.${d}`);return o.jsxs("div",{className:"feishu-integration-page",children:[o.jsxs("header",{className:"feishu-integration-header",children:[o.jsx("button",{type:"button",className:"feishu-back",onClick:e,"aria-label":t("backToAutomations"),disabled:H,children:o.jsx(Z6t,{})}),o.jsx("img",{className:"feishu-integration-logo",src:PI,alt:"","aria-hidden":"true"}),o.jsxs("div",{children:[o.jsx("h1",{children:t("feishu.title")}),o.jsx("p",{children:t("feishu.description")})]})]}),o.jsx("div",{className:"feishu-integration-layout",children:o.jsxs("section",{className:"feishu-section-panel",children:[o.jsx("p",{className:"feishu-panel-description",children:t("feishu.panel")}),o.jsxs("form",{className:"feishu-form",onSubmit:q,onKeyDown:X,noValidate:!0,children:[o.jsxs("div",{className:"feishu-field-grid",children:[o.jsxs("div",{className:"feishu-field",children:[o.jsx("label",{htmlFor:"feishu-agent-name",children:t("feishu.agentName")}),o.jsx("input",{id:"feishu-agent-name",value:n,maxLength:64,disabled:H,onChange:re=>{i(re.target.value),g&&b("")},onBlur:()=>b(Gte(n.trim())),"aria-invalid":!!g,"aria-describedby":`feishu-agent-name-help${g?" feishu-agent-name-error":""}`}),o.jsx("span",{id:"feishu-agent-name-help",className:"feishu-field-help",children:t("feishu.agentNameHelp")}),g?o.jsx("span",{id:"feishu-agent-name-error",className:"feishu-field-error",role:"alert",children:t(g)}):null]}),o.jsxs("div",{className:"feishu-field",children:[o.jsx("label",{id:"feishu-region-label",children:t("feishu.region")}),o.jsxs("div",{className:"feishu-region-picker",ref:T,children:[o.jsxs("button",{ref:L,type:"button",className:"feishu-region-trigger",disabled:H,"aria-haspopup":"listbox","aria-expanded":h,"aria-labelledby":"feishu-region-label feishu-region-value",onClick:()=>{R.current=md.findIndex(re=>re===d),p(re=>!re)},onKeyDown:re=>{re.key!=="ArrowDown"&&re.key!=="ArrowUp"||(re.preventDefault(),R.current=re.key==="ArrowUp"?md.length-1:md.findIndex(he=>he===d),p(!0))},children:[o.jsx("span",{id:"feishu-region-value",children:oe}),o.jsx(J6t,{})]}),h?o.jsx("div",{className:"feishu-region-menu",role:"listbox","aria-label":t("feishu.region"),onKeyDown:re=>{var G;const he=A.current.findIndex(se=>se===document.activeElement);let K=null;re.key==="ArrowDown"?K=(he+1)%md.length:re.key==="ArrowUp"?K=(he-1+md.length)%md.length:re.key==="Home"?K=0:re.key==="End"?K=md.length-1:re.key==="Tab"&&p(!1),K!==null&&(re.preventDefault(),(G=A.current[K])==null||G.focus())},children:md.map(re=>o.jsx("button",{ref:he=>{const K=md.findIndex(G=>G===re);A.current[K]=he},type:"button",role:"option","aria-selected":d===re,className:`feishu-region-option${d===re?" is-selected":""}`,onClick:()=>{var he;f(re),p(!1),(he=L.current)==null||he.focus()},children:t(`feishu.regions.${re}`)},re))}):null]}),o.jsx("span",{className:"feishu-field-help",children:t("feishu.regionHelp")})]}),o.jsxs("div",{className:"feishu-field",children:[o.jsx("label",{htmlFor:"feishu-app-id",children:t("feishu.appId")}),o.jsx("input",{id:"feishu-app-id",value:r,maxLength:128,autoComplete:"off",disabled:H,placeholder:"cli_xxxxxxxxxxxxxxxx",onChange:re=>{s(re.target.value),v&&y("")},onBlur:()=>y(r.trim()?"":"feishu.validation.appId"),"aria-invalid":!!v,"aria-describedby":`feishu-app-id-help${v?" feishu-app-id-error":""}`}),o.jsx("span",{id:"feishu-app-id-help",className:"feishu-field-help",children:t("feishu.appIdHelp")}),v?o.jsx("span",{id:"feishu-app-id-error",className:"feishu-field-error",role:"alert",children:t(v)}):null]}),o.jsxs("div",{className:"feishu-field",children:[o.jsx("label",{htmlFor:"feishu-app-secret",children:t("feishu.appSecret")}),o.jsxs("div",{className:"feishu-secret-input",children:[o.jsx("input",{id:"feishu-app-secret",type:c?"text":"password",value:a,maxLength:256,autoComplete:"off",disabled:H,placeholder:t("feishu.appSecretPlaceholder"),onChange:re=>{l(re.target.value),x&&w("")},onBlur:()=>w(a.trim()?"":"feishu.validation.appSecret"),"aria-invalid":!!x,"aria-describedby":`feishu-app-secret-help${x?" feishu-app-secret-error":""}`}),o.jsx("button",{type:"button",disabled:H,onClick:()=>u(re=>!re),"aria-label":t(c?"feishu.hideSecret":"feishu.showSecret"),children:t(c?"feishu.hide":"feishu.show")})]}),o.jsx("span",{id:"feishu-app-secret-help",className:"feishu-field-help",children:t("feishu.appSecretHelp")}),x?o.jsx("span",{id:"feishu-app-secret-error",className:"feishu-field-error",role:"alert",children:t(x)}):null]})]}),O!=="idle"?o.jsxs("div",{className:`feishu-deployment-status is-${O}`,role:O==="failed"?"alert":"status",children:[o.jsxs("div",{className:"feishu-deployment-heading",children:[O==="preparing"?o.jsx(Tn,{as:"strong",children:t("feishu.status.preparing")}):null,O==="running"?o.jsx(Tn,{as:"strong",children:S?jI(S):t("feishu.status.running")}):null,O==="cancelling"?o.jsx(Tn,{as:"strong",children:t("feishu.status.cancelling")}):null,O==="succeeded"?o.jsxs("strong",{children:[o.jsx(Kte,{}),t("feishu.status.succeeded")]}):null,O==="cancelled"?o.jsx("strong",{children:t("feishu.status.cancelled")}):null,O==="failed"?o.jsx("strong",{children:t("feishu.status.failed")}):null]}),O==="preparing"||O==="running"||O==="cancelling"?o.jsx("ol",{className:"feishu-deployment-steps",children:Xje.map((re,he)=>{const K=O==="running"&&hevoid U(),children:t("feishu.cancelDeployment")}):null,o.jsx("button",{type:"submit",className:"feishu-submit",disabled:!le,children:t(H?"feishu.creating":"feishu.create")})]})]})]})]})})]})}async function nz(e,t,n,i=Ho){var s;const r=await $n(e,{...t,headers:{accept:"application/json",...t.headers},signal:n},i);if(!r.ok){let a="";try{a=((s=(await r.json()).detail)==null?void 0:s.trim())||""}catch{}throw new Error(a||V("common.requestFailed",{status:r.status}))}return r.json()}function i$t(e){return nz("/web/coding-agents/capabilities",{method:"GET"},e,RF)}function r$t(e,t){return nz(`/web/coding-agents/skills/${encodeURIComponent(e)}/preview`,{method:"GET"},t)}function s$t(e,t){return nz("/web/coding-agents/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},t)}const a$t="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='16'%20height='16'%20rx='3.692'%20fill='%231A1B1D'/%3e%3cpath%20d='M13.235%205.829V4.332H2.758v5.987h1.496v1.496h8.981V5.828Zm-1.497%204.49H4.254V5.83h7.484v4.49Z'%20fill='%2332F08C'/%3e%3cpath%20d='M6.937%206.993%205.88%208.051%206.937%209.11%207.995%208.05%206.937%206.993ZM9.931%206.992%208.873%208.05%209.931%209.11%2010.99%208.05%209.93%206.992Z'%20fill='%2332F08C'/%3e%3c/svg%3e";function o$t(){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"m4 4 8 8m0-8-8 8",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function Xte(){return o.jsxs("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[o.jsx("path",{d:"M4 1.8h5l3 3V14H4z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),o.jsx("path",{d:"M9 1.8V5h3M6 8h4M6 10.5h4",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Yte(){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M1.8 4.5h4l1.2-1.3h2.2l1.2 1.3h3.8v8H1.8z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})})}function l$t(e){return e instanceof DOMException&&e.name==="AbortError"}function c$t(e){return e instanceof Error&&e.message?e.message:""}function u$t(e){return e<1024?`${e} B`:`${(e/1024).toFixed(e<10*1024?1:0)} KB`}function d$t(e){const t=e.split("/");return t[t.length-1]??e}function f$t(e){const t=new Map;for(const n of e){const i=n.path.split("/"),r=i.length>1?i.slice(0,-1).join("/"):"";t.set(r,[...t.get(r)??[],n])}return Array.from(t,([n,i])=>({directory:n,files:i})).sort((n,i)=>n.directory?i.directory?n.directory.localeCompare(i.directory):1:-1)}function h$t({skill:e,onClose:t}){const{t:n}=Oe("automations"),i=m.useRef(null),r=m.useRef(null),s=m.useId(),a=m.useId(),[l,c]=m.useState(null),[u,d]=m.useState(""),[f,h]=m.useState(!0),[p,g]=m.useState(""),[b,v]=m.useState(0);m.useEffect(()=>{r.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const O=i.current;return O&&!O.open&&O.showModal(),()=>{var k;O!=null&&O.open&&O.close(),(k=r.current)==null||k.focus()}},[]),m.useEffect(()=>{const O=new AbortController;return h(!0),g(""),c(null),d(""),r$t(e.id,O.signal).then(k=>{if(O.signal.aborted)return;c(k);const S=k.files.find(E=>E.path==="SKILL.md")??k.files[0];d((S==null?void 0:S.path)??"")}).catch(k=>{!O.signal.aborted&&!l$t(k)&&g(c$t(k))}).finally(()=>{O.signal.aborted||h(!1)}),()=>O.abort()},[b,e.id]);const y=m.useMemo(()=>f$t((l==null?void 0:l.files)??[]),[l]),x=(l==null?void 0:l.files.find(O=>O.path===u))??null,w=n(`codingAgents.skills.items.${e.id}.name`,{defaultValue:e.name});return o.jsxs("dialog",{ref:i,className:"coding-agents-preview-dialog","aria-labelledby":s,"aria-describedby":a,onCancel:O=>{O.preventDefault(),t()},onMouseDown:O=>{const k=O.currentTarget.getBoundingClientRect();(O.clientXk.right||O.clientYk.bottom)&&t()},children:[o.jsxs("header",{className:"coding-agents-preview-header",children:[o.jsx("span",{className:"coding-agents-preview-mark",children:o.jsx(Yte,{})}),o.jsxs("div",{children:[o.jsx("h2",{id:s,children:w}),o.jsx("p",{id:a,children:n("codingAgents.preview.description")})]}),o.jsx("button",{type:"button",autoFocus:!0,"aria-label":n("codingAgents.preview.close"),onClick:t,children:o.jsx(o$t,{})})]}),f?o.jsxs("div",{className:"coding-agents-preview-state",children:[o.jsx("i",{}),n("codingAgents.preview.loading")]}):p?o.jsxs("div",{className:"coding-agents-preview-state is-error",role:"alert",children:[o.jsx("span",{children:p||n("codingAgents.preview.error")}),o.jsx("button",{type:"button",onClick:()=>v(O=>O+1),children:n("codingAgents.retry")})]}):o.jsxs("div",{className:"coding-agents-preview-layout",children:[o.jsxs("nav",{className:"coding-agents-preview-tree","aria-label":n("codingAgents.preview.skillFiles",{name:w}),children:[o.jsxs("div",{className:"coding-agents-preview-tree-title",children:[o.jsx("span",{children:n("codingAgents.preview.files")}),o.jsx("small",{children:(l==null?void 0:l.files.length)??0})]}),o.jsx("div",{className:"coding-agents-preview-tree-scroll",children:y.map(O=>O.directory?o.jsxs("details",{open:!0,children:[o.jsxs("summary",{children:[o.jsx(Yte,{}),o.jsx("span",{children:O.directory})]}),o.jsx("div",{children:O.files.map(k=>o.jsxs("button",{type:"button",className:u===k.path?"is-selected":"","aria-current":u===k.path?"true":void 0,onClick:()=>d(k.path),children:[o.jsx(Xte,{}),o.jsx("span",{children:d$t(k.path)})]},k.path))})]},O.directory):O.files.map(k=>o.jsxs("button",{type:"button",className:u===k.path?"is-selected":"","aria-current":u===k.path?"true":void 0,onClick:()=>d(k.path),children:[o.jsx(Xte,{}),o.jsx("span",{children:k.path})]},k.path)))})]}),o.jsx("section",{className:"coding-agents-preview-file","aria-label":n("codingAgents.preview.fileContent"),children:x?o.jsxs(o.Fragment,{children:[o.jsxs("header",{children:[o.jsx("strong",{children:x.path}),o.jsx("span",{children:u$t(x.size)})]}),x.previewable&&x.content!==null?o.jsx("pre",{tabIndex:0,children:o.jsx("code",{children:x.content})}):o.jsx("div",{className:"coding-agents-preview-unavailable",children:n("codingAgents.preview.notPreviewable")})]}):o.jsx("div",{className:"coding-agents-preview-unavailable",children:n("codingAgents.preview.noFiles")})})]})]})}function p$t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"m9.8 3.5-4.5 4.5 4.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function m$t(e){return o.jsxs("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"3.5",y:"5",width:"16",height:"16",rx:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("path",{d:"m8.5 11-2.4 2.4 2.4 2.4M11 16.5h3.8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("circle",{cx:"24.5",cy:"10.5",r:"2.5",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("circle",{cx:"24.5",cy:"24.5",r:"2.5",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("path",{d:"M19.5 10.5H22M18.2 19l4.3 3.7M24.5 13v9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function g$t(e){return o.jsx("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",...e,children:o.jsxs("g",{stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",children:[o.jsx("path",{d:"M16 4.5v7M16 20.5v7"}),o.jsx("path",{d:"m9.3 6.3 3.5 6.1M19.2 19.6l3.5 6.1"}),o.jsx("path",{d:"m5.9 11.1 6.2 3.5M19.9 17.4l6.2 3.5"}),o.jsx("path",{d:"M4.7 16h7M20.3 16h7"}),o.jsx("path",{d:"m5.9 20.9 6.2-3.5M19.9 14.6l6.2-3.5"}),o.jsx("path",{d:"m9.3 25.7 3.5-6.1M19.2 12.4l3.5-6.1"})]})})}function b$t(e){return o.jsxs("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M15.8 4.2c2.4 0 4.5 1.2 5.7 3.1 2.2-.3 4.5.8 5.6 2.9 1.1 2 .8 4.4-.5 6.1 1.2 1.8 1.3 4.3.1 6.2-1.2 2-3.4 3-5.6 2.6-1.3 1.8-3.5 2.9-5.8 2.7-2.2-.2-4.1-1.5-5.1-3.4-2.2.1-4.4-1-5.4-3.1-1-2-.6-4.4.8-6.1-1.1-1.9-1.1-4.3.2-6.1 1.3-1.9 3.6-2.7 5.7-2.2 1.1-1.7 2.6-2.7 4.3-2.7Z",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),o.jsx("path",{d:"m10.7 12.2 3.1 3.8-3.1 3.8M17.1 20h4.3",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Zte(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"m3.4 8.2 3 3L12.8 5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function y$t(e){return o.jsxs("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",...e,children:[o.jsx("path",{d:"M2.8 6.3h14.4v8.3a1.6 1.6 0 0 1-1.6 1.6H4.4a1.6 1.6 0 0 1-1.6-1.6V6.3Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"}),o.jsx("path",{d:"M2.8 6.3V5.1a1.4 1.4 0 0 1 1.4-1.4h3.4l1.5 1.6h6.5a1.6 1.6 0 0 1 1.6 1.6",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})]})}function v$t({agentId:e}){return e==="trae"?o.jsx("img",{src:a$t,alt:"","aria-hidden":"true"}):e==="claude-code"?o.jsx(g$t,{}):o.jsx(b$t,{})}function Jte(e){return e instanceof DOMException&&e.name==="AbortError"}function ene(e,t){return e instanceof Error&&e.message?e.message:t}function x$t({onBack:e}){var j;const{t}=Oe("automations"),[n,i]=m.useState(null),[r,s]=m.useState(!0),[a,l]=m.useState(null),[c,u]=m.useState(0),[d,f]=m.useState(new Set),[h,p]=m.useState(new Set),[g,b]=m.useState(null),[v,y]=m.useState(!1),[x,w]=m.useState(null),O=m.useRef(null);m.useEffect(()=>{const T=new AbortController;return s(!0),l(null),i$t(T.signal).then(L=>{if(T.signal.aborted)return;i(L);const A=L.agents.filter(R=>R.available);f(R=>{const P=A.filter($=>R.has($.id));return new Set((P.length?P:A.slice(0,1)).map($=>$.id))}),p(R=>{const P=L.skills.filter($=>R.has($.id));return new Set((P.length?P:L.skills).map($=>$.id))})}).catch(L=>{!Jte(L)&&!T.signal.aborted&&(i(null),l(ene(L,"")))}).finally(()=>{T.signal.aborted||s(!1)}),()=>T.abort()},[c]),m.useEffect(()=>()=>{var T;return(T=O.current)==null?void 0:T.abort()},[]);const k=m.useMemo(()=>(n==null?void 0:n.agents.filter(T=>T.available&&d.has(T.id)))||[],[n,d]),S=m.useMemo(()=>(n==null?void 0:n.skills.filter(T=>h.has(T.id)))||[],[n,h]),E=!!(!v&&k.length&&S.length),C=(T,L)=>{!L||v||(w(null),f(A=>{const R=new Set(A);return R.has(T)?R.delete(T):R.add(T),R}))},N=T=>{v||(w(null),p(L=>{const A=new Set(L);return A.has(T)?A.delete(T):A.add(T),A}))},_=async()=>{var L;if(!E)return;(L=O.current)==null||L.abort();const T=new AbortController;O.current=T,y(!0),w(null);try{const A=await s$t({agents:k.map(P=>P.id),skills:S.map(P=>P.id)},T.signal);if(T.signal.aborted)return;const R=A.installations;w({tone:"success",agentCount:k.length,skillCount:S.length,installations:R})}catch(A){!Jte(A)&&!T.signal.aborted&&w({tone:"error",message:ene(A,"")})}finally{O.current===T&&(O.current=null),T.signal.aborted||y(!1)}};return o.jsxs("section",{className:"coding-agents-page",children:[o.jsxs("header",{className:"coding-agents-header",children:[o.jsx("button",{type:"button",className:"coding-agents-back",onClick:e,disabled:v,"aria-label":t("backToAutomations"),children:o.jsx(p$t,{})}),o.jsx(m$t,{className:"coding-agents-logo"}),o.jsxs("div",{children:[o.jsx("h1",{children:t("codingAgents.title")}),o.jsx("p",{children:t("codingAgents.description")})]})]}),o.jsx("div",{className:"coding-agents-scroll",children:o.jsxs("div",{className:"coding-agents-content",children:[o.jsxs("section",{className:"coding-agents-section","aria-label":t("codingAgents.clients.ariaLabel"),children:[o.jsxs("div",{className:"coding-agents-section-heading",children:[o.jsxs("div",{children:[o.jsx("span",{children:"1"}),o.jsx("h2",{children:t("codingAgents.clients.title")})]}),o.jsx("button",{type:"button",onClick:()=>u(T=>T+1),disabled:r||v,children:t("codingAgents.clients.detectAgain")})]}),r?o.jsxs("div",{className:"coding-agents-inline-state",children:[o.jsx("i",{}),t("codingAgents.clients.detecting")]}):a!==null?o.jsxs("div",{className:"coding-agents-error-row",role:"alert",children:[o.jsx("span",{children:a||t("codingAgents.errors.detect")}),o.jsx("button",{type:"button",onClick:()=>u(T=>T+1),children:t("codingAgents.retry")})]}):o.jsx("div",{className:"coding-agents-agent-grid",children:n==null?void 0:n.agents.map(T=>o.jsxs("button",{type:"button",className:`coding-agents-agent ${d.has(T.id)?"is-selected":""}`,"aria-pressed":d.has(T.id),disabled:!T.available||v,onClick:()=>C(T.id,T.available),title:T.available?T.name:T.reason,children:[o.jsx("span",{className:`coding-agents-agent-mark is-${T.id}`,children:o.jsx(v$t,{agentId:T.id})}),o.jsxs("span",{className:"coding-agents-agent-copy",children:[o.jsx("strong",{children:T.name}),o.jsx("small",{children:T.available?T.version||t("codingAgents.clients.detected"):T.reason})]}),o.jsx("span",{className:`coding-agents-status ${T.available?"is-ready":""}`,children:T.available?t("codingAgents.clients.available"):t("codingAgents.clients.unavailable")}),o.jsx("span",{className:"coding-agents-check",children:o.jsx(Zte,{})})]},T.id))})]}),o.jsxs("section",{className:"coding-agents-section","aria-label":t("codingAgents.skills.ariaLabel"),children:[o.jsx("div",{className:"coding-agents-section-heading",children:o.jsxs("div",{children:[o.jsx("span",{children:"2"}),o.jsx("h2",{children:t("codingAgents.skills.title")})]})}),o.jsx("div",{className:"coding-agents-skill-list",children:n==null?void 0:n.skills.map(T=>o.jsxs("div",{className:`coding-agents-skill ${h.has(T.id)?"is-selected":""}`,children:[o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:h.has(T.id),onChange:()=>N(T.id),disabled:v}),o.jsx("span",{className:"coding-agents-skill-check","aria-hidden":"true",children:o.jsx(Zte,{})}),o.jsxs("span",{children:[o.jsx("strong",{children:t(`codingAgents.skills.items.${T.id}.name`,{defaultValue:T.name})}),o.jsx("small",{children:t(`codingAgents.skills.items.${T.id}.description`,{defaultValue:T.description})})]})]}),o.jsx("button",{type:"button",onClick:()=>b(T),children:t("codingAgents.skills.viewFiles")})]},T.id))}),o.jsxs("div",{className:"coding-agents-global","aria-label":t("codingAgents.global.ariaLabel"),children:[o.jsxs("div",{className:"coding-agents-global-heading",children:[o.jsx(y$t,{}),o.jsxs("div",{children:[o.jsx("strong",{children:t("codingAgents.global.title")}),o.jsx("span",{children:t("codingAgents.global.description")})]})]}),k.length?o.jsx("dl",{children:k.map(T=>o.jsxs("div",{children:[o.jsx("dt",{children:T.name}),o.jsx("dd",{children:T.globalSkillsPath})]},T.id))}):o.jsx("p",{children:t("codingAgents.global.empty")})]})]}),x?o.jsxs("div",{className:`coding-agents-result is-${x.tone}`,role:x.tone==="error"?"alert":"status",children:[o.jsx("strong",{children:x.tone==="success"?t("codingAgents.success",{agentCount:x.agentCount,skillCount:x.skillCount}):x.message||t("codingAgents.errors.configure")}),(j=x.installations)!=null&&j.length?o.jsx("ul",{children:x.installations.map(T=>o.jsxs("li",{children:[T.agentName," · ",t(`codingAgents.skills.items.${T.skillId}.name`,{defaultValue:T.skill})," → ",T.displayPath]},`${T.agent}:${T.skillId}`))}):null]}):null,o.jsxs("div",{className:"coding-agents-actions",children:[o.jsx("span",{children:k.length?t("codingAgents.selection",{agentCount:k.length,skillCount:S.length}):t("codingAgents.selectClient")}),o.jsx("button",{type:"button",onClick:()=>void _(),disabled:!E,children:t(v?"codingAgents.configuring":"codingAgents.configure")})]})]})}),g?o.jsx(h$t,{skill:g,onClose:()=>b(null)}):null]})}async function iz(e,t){const n=await e.json().catch(()=>null),i=typeof(n==null?void 0:n.detail)=="string"?n.detail:"";return new Error(i||V("common.fallbackWithHttpStatus",{fallback:t,status:e.status}))}async function O$t(e){const t=await $n("/web/website-integrations",{cache:"no-store",signal:e});if(!t.ok)throw await iz(t,V("websiteIntegration.listFailed"));return(await t.json()).integrations??[]}async function w$t(e){const t=await $n("/web/website-integrations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw await iz(t,V("websiteIntegration.createFailed"));return t.json()}async function S$t(e){const t=await $n(`/web/website-integrations/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok)throw await iz(t,V("websiteIntegration.deleteFailed"))}function k$t(e){return o.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:o.jsx("path",{d:"m9.8 3.5-4.5 4.5 4.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function tne(e){return o.jsxs("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",...e,children:[o.jsx("rect",{x:"3.5",y:"5",width:"20",height:"17",rx:"3.5",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("path",{d:"M4.5 10h18M8.5 7.5h.1M11.5 7.5h.1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),o.jsx("path",{d:"M17 18.5a5 5 0 0 1 5-5h1.5a5 5 0 0 1 5 5V23a5 5 0 0 1-5 5H22l-3.5 2.5v-3.3A5 5 0 0 1 17 23v-4.5Z",fill:"hsl(var(--background))",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),o.jsx("path",{d:"M21 19h4M21 22.5h3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function E$t(e,t){const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleString(t,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}async function C$t(e){const t=[];let n="";for(let i=0;i<10;i+=1){const r=await _x({nextToken:n||void 0,pageSize:100,region:"all",scope:"all"});if(e.aborted)return[];if(t.push(...r.runtimes),n=r.nextToken,!n)break}return t}function T$t({onBack:e}){const{t,i18n:n}=Oe("websiteIntegration"),[i,r]=m.useState([]),[s,a]=m.useState([]),[l,c]=m.useState(""),[u,d]=m.useState(""),[f,h]=m.useState(""),[p,g]=m.useState(!0),[b,v]=m.useState(!1),[y,x]=m.useState(""),[w,O]=m.useState("");m.useEffect(()=>{const j=new AbortController;return g(!0),O(""),Promise.all([O$t(j.signal),C$t(j.signal)]).then(([T,L])=>{var R;if(j.signal.aborted)return;r(T),a(L),d(((R=T[0])==null?void 0:R.id)??"");const A=L[0];A&&c(`${A.region}::${A.runtimeId}`)}).catch(T=>{j.signal.aborted||O(T instanceof Error?T.message:t("errors.load"))}).finally(()=>{j.signal.aborted||g(!1)}),()=>j.abort()},[t]);const k=m.useMemo(()=>s.map(j=>({value:`${j.region}::${j.runtimeId}`,label:j.name||j.runtimeId,description:`${j.region} · ${j.status}`,runtime:j})),[s]),S=m.useMemo(()=>new Map(k.map(j=>[j.value,j.runtime])),[k]),E=i.find(j=>j.id===u)??i[0],C=E?` - + +
diff --git a/veadk/webui/website-integration.js b/veadk/webui/website-integration.js index 655b93d6a..f94346139 100644 --- a/veadk/webui/website-integration.js +++ b/veadk/webui/website-integration.js @@ -99,7 +99,7 @@ Studio:{{studioUrl}} Outdated base version: https://github.com/primer/github-syntax-light Current colors taken from GitHub's CSS -*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}`,Rnr=".builtin-tool-head{--builtin-tool-accent: 215 18% 42%;display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:3px 7px 3px 3px;border:0;border-radius:9px;background:transparent;color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;transition:color .12s ease}.builtin-tool-head[data-tool-tone=search]{--builtin-tool-accent: 211 62% 42%}.builtin-tool-head[data-tool-tone=image]{--builtin-tool-accent: 28 67% 42%}.builtin-tool-head[data-tool-tone=video]{--builtin-tool-accent: 260 38% 48%}.builtin-tool-head[data-tool-tone=presentation]{--builtin-tool-accent: 252 38% 52%}.builtin-tool-head[data-tool-tone=memory]{--builtin-tool-accent: 174 52% 34%}.builtin-tool-head[data-tool-tone=knowledge]{--builtin-tool-accent: 225 48% 45%}.builtin-tool-head[data-tool-tone=skill]{--builtin-tool-accent: 154 50% 34%}.builtin-tool-head[data-tool-tone=sandbox]{--builtin-tool-accent: 32 67% 42%}.builtin-tool-head[data-tool-tone=resources]{--builtin-tool-accent: 199 58% 38%}.builtin-tool-head[data-tool-tone=agent]{--builtin-tool-accent: 267 38% 47%}.builtin-tool-head:hover{color:hsl(var(--foreground))}.builtin-tool-icon{position:relative;width:20px;height:26px;flex:0 0 20px;display:grid;place-items:center;color:hsl(var(--builtin-tool-accent))}.builtin-tool-icon>svg{width:18px;height:18px}.builtin-tool-label{font-size:14.5px;font-weight:400;line-height:1.35}.builtin-tool-head.is-done .builtin-tool-label{color:hsl(var(--muted-foreground))}.builtin-tool-chevron{width:13px;height:13px;flex:0 0 13px;opacity:.58;transition:transform .18s ease}.builtin-tool-chevron.is-open{transform:rotate(90deg)}",Dnr=".code-browser-trigger{min-height:26px;display:inline-flex;align-items:center;gap:5px;padding:0 7px;border:0;border-radius:6px;background:transparent;color:hsl(var(--muted-foreground));font:inherit;font-size:11px;font-weight:600;cursor:pointer;transition:color .12s ease,background-color .12s ease}.code-browser-trigger svg{width:13px;height:13px}.code-browser-trigger:hover{background:hsl(var(--foreground) / .04);color:hsl(var(--foreground))}.code-browser-trigger:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:1px}.code-browser-backdrop{position:fixed;z-index:1200;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;padding:32px;background:hsl(var(--foreground) / .22);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:code-browser-fade-in .14s ease-out}.code-browser-dialog{--code-surface: hsl(var(--background));--code-panel: hsl(var(--secondary) / .26);--code-editor: hsl(var(--background));--code-text: hsl(var(--foreground));--code-muted: hsl(var(--muted-foreground));--code-border: hsl(var(--border));--code-hover: hsl(var(--foreground) / .05);--code-active: hsl(var(--foreground) / .085);width:min(1220px,94vw);height:min(800px,88vh);min-height:460px;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--code-border);border-radius:12px;background:var(--code-surface);color:var(--code-text);box-shadow:0 24px 64px hsl(var(--foreground) / .16);color-scheme:light;animation:code-browser-rise-in .18s cubic-bezier(.2,.8,.2,1)}.code-browser-dialog.is-dark{--code-surface: hsl(220 13% 13%);--code-panel: hsl(220 13% 16%);--code-editor: hsl(220 13% 18%);--code-text: hsl(210 15% 90%);--code-muted: hsl(215 11% 65%);--code-border: hsl(215 12% 27%);--code-hover: hsl(210 14% 92% / .07);--code-active: hsl(210 14% 92% / .12);color-scheme:dark}.code-browser-head{flex:0 0 54px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 12px 0 16px;border-bottom:1px solid var(--code-border);background:var(--code-surface)}.code-browser-title-wrap,.code-browser-head-actions,.code-browser-tab,.code-browser-path,.code-browser-diff-labels,.code-browser-statusbar{display:flex;align-items:center}.code-browser-title-wrap{min-width:0;gap:10px}.code-browser-title-wrap>div{min-width:0}.code-browser-title-icon{width:30px;height:30px;flex:0 0 auto;display:grid;place-items:center;border-radius:7px;background:var(--code-panel);color:var(--code-text)}.code-browser-title-icon svg,.code-browser-icon-button svg{width:16px;height:16px}.code-browser-title-wrap h2,.code-browser-title-wrap p{margin:0}.code-browser-title-wrap h2{color:var(--code-text);font-size:14px;font-weight:650;line-height:1.35}.code-browser-title-wrap p{overflow:hidden;color:var(--code-muted);font-size:11px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.code-browser-head-actions{flex:0 0 auto;gap:4px}.code-browser-icon-button{width:30px;height:30px;flex:0 0 auto;display:inline-grid;place-items:center;padding:0;border:0;border-radius:8px;background:transparent;color:var(--code-muted);cursor:pointer;transition:color .12s ease,background-color .12s ease}.code-browser-icon-button:hover{background:var(--code-hover);color:var(--code-text)}.code-browser-icon-button:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:1px}.code-browser-workspace{flex:1;min-height:0;display:flex}.code-browser-sidebar{flex:0 0 236px;min-width:0;display:flex;flex-direction:column;border-right:1px solid var(--code-border);background:var(--code-panel)}.code-browser-sidebar-head,.code-browser-tabs,.code-browser-path{flex:0 0 34px;min-height:34px;border-bottom:1px solid var(--code-border)}.code-browser-sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:0 12px;color:var(--code-muted);font-size:11px;font-weight:650;letter-spacing:.02em}.code-browser-sidebar-head>span:last-child{font-variant-numeric:tabular-nums;font-weight:500}.code-browser-tree{flex:1;min-height:0;overflow:auto;padding:6px 0 12px}.code-browser-file,.code-browser-folder{width:100%;min-height:30px;display:flex;align-items:center;gap:6px;padding-top:4px;padding-right:8px;padding-bottom:4px;border:0;background:transparent;color:var(--code-muted);font:inherit;font-size:12px;text-align:left;cursor:pointer}.code-browser-file:hover,.code-browser-folder:hover{background:var(--code-hover);color:var(--code-text)}.code-browser-file.is-active{background:var(--code-active);color:var(--code-text)}.code-browser-file:focus-visible,.code-browser-folder:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:-2px}.code-browser-file svg,.code-browser-folder svg{width:14px;height:14px;flex:0 0 auto}.code-browser-folder>svg:first-child{width:12px;height:12px;transition:transform .12s ease}.code-browser-folder>svg:first-child.is-open{transform:rotate(90deg)}.code-browser-file>span:not(.code-browser-change),.code-browser-folder span,.code-browser-path span,.code-browser-tab>span:not(.code-browser-change){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.code-browser-file>span:not(.code-browser-change){flex:1}.code-browser-change{flex:0 0 auto;min-width:29px;padding:2px 4px;border-radius:4px;font-size:9.5px;font-weight:650;line-height:1.2;text-align:center}.code-browser-change.is-added{background:#ddf3e5;color:#1d6d3a}.code-browser-change.is-modified{background:#f9edd2;color:#845915}.code-browser-change.is-deleted{background:#f9e1e1;color:#9f2d2d}.is-dark .code-browser-change.is-added{background:#224f32;color:#98e1b3}.is-dark .code-browser-change.is-modified{background:#554320;color:#eecf87}.is-dark .code-browser-change.is-deleted{background:#572323;color:#eea0a0}.code-browser-main{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--code-editor)}.code-browser-tabs{display:flex;align-items:stretch;overflow:hidden;background:var(--code-panel)}.code-browser-tab{min-width:0;max-width:min(320px,65%);gap:6px;padding:0 11px;border-right:1px solid var(--code-border);border-top:2px solid hsl(var(--primary));background:var(--code-editor);color:var(--code-text);font-size:11.5px}.code-browser-tab>svg,.code-browser-path svg{width:13px;height:13px;flex:0 0 auto}.code-browser-path{gap:7px;padding:0 13px;color:var(--code-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:11.5px}.code-browser-diff-labels{flex:0 0 30px;justify-content:space-around;border-bottom:1px solid var(--code-border);background:var(--code-panel);color:var(--code-muted);font-size:11px}.code-browser-diff-labels span{width:50%;text-align:center}.code-browser-editor{flex:1;min-height:0;overflow:hidden;background:var(--code-editor)}.code-browser-editor>div,.code-browser-editor .cm-theme,.code-browser-editor .cm-editor,.code-browser-merge,.code-browser-merge>.cm-mergeView{height:100%}.code-browser-editor .cm-scroller{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12.5px}.code-browser-merge>.cm-mergeView{overflow:auto}.code-browser-merge .cm-mergeViewEditors{min-height:100%}.code-browser-merge .cm-mergeViewEditor:first-child{border-right:1px solid var(--code-border)}.code-browser-merge .cm-editor{min-height:100%}.code-browser-statusbar{flex:0 0 26px;justify-content:space-between;gap:12px;padding:0 10px;border-top:1px solid var(--code-border);background:var(--code-panel);color:var(--code-muted);font-size:10.5px}.code-browser-empty{height:100%;display:grid;place-items:center;padding:20px;color:var(--code-muted);font-size:12px;text-align:center}@keyframes code-browser-fade-in{0%{opacity:0}to{opacity:1}}@keyframes code-browser-rise-in{0%{opacity:0;transform:translateY(8px) scale(.992)}to{opacity:1;transform:translateY(0) scale(1)}}@media (max-width: 760px){.code-browser-backdrop{padding:12px}.code-browser-dialog{width:100%;height:min(820px,94vh);min-height:0}.code-browser-workspace{flex-direction:column}.code-browser-sidebar{flex:0 0 168px;border-right:0;border-bottom:1px solid var(--code-border)}.code-browser-diff-labels span:first-child{display:none}.code-browser-diff-labels span:last-child{width:100%}}@media (prefers-reduced-motion: reduce){.code-browser-backdrop,.code-browser-dialog{animation:none}.code-browser-folder>svg:first-child{transition:none}}",Lnr=".text-shimmer.text-shimmer{color:transparent;background-size:200% auto;background-position:200% center;background-clip:text;-webkit-background-clip:text;animation:text-shimmer 4s linear infinite}@keyframes text-shimmer{to{background-position:-200% center}}@media (prefers-reduced-motion: reduce){.text-shimmer.text-shimmer{animation:none;background-position:50% center}}",Mnr='/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, -apple-system, system-ui, "Segoe UI", "Noto Sans", "Helvetica", "Arial", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;--font-mono:ui-monospace, "SFMono-Regular", "SF Mono", "Menlo", "Monaco", "Consolas", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;--spacing:.25rem;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:1024px;--breakpoint-xl:1280px;--breakpoint-2xl:1536px;--container-sm:24rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--breakpoint-xs:380px;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-2xs:.125rem;--radius-xs:.25rem;--radius-sm:.375rem;--radius-md:.5rem;--radius-lg:.625rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.25rem;--radius-4xl:1.5rem;--radius-full:9999px;--text-sm:var(--font-text-sm-size);--text-sm--line-height:var(--font-text-sm-line-height);--text-sm--font-weight:var(--font-text-sm-weight);--text-sm--letter-spacing:var(--font-text-sm-tracking);--tracking-wide:var(--font-tracking-wide);--tracking-normal:var(--font-tracking-normal);--tracking-tight:var(--font-tracking-tight);--shadow-hairline:var(--shadow-hairline)}:root,:where([data-theme]){--gray-500:#5d5d5d;--alpha-0:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-0:color-mix(in oklab, var(--alpha-base) 0%, transparent)}}:root,:where([data-theme]){--alpha-02:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-02:color-mix(in oklab, var(--alpha-base) 2%, transparent)}}:root,:where([data-theme]){--alpha-04:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-04:color-mix(in oklab, var(--alpha-base) 4%, transparent)}}:root,:where([data-theme]){--alpha-05:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-05:color-mix(in oklab, var(--alpha-base) 5%, transparent)}}:root,:where([data-theme]){--alpha-06:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-06:color-mix(in oklab, var(--alpha-base) 6%, transparent)}}:root,:where([data-theme]){--alpha-08:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-08:color-mix(in oklab, var(--alpha-base) 8%, transparent)}}:root,:where([data-theme]){--alpha-10:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-10:color-mix(in oklab, var(--alpha-base) 10%, transparent)}}:root,:where([data-theme]){--alpha-12:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-12:color-mix(in oklab, var(--alpha-base) 12%, transparent)}}:root,:where([data-theme]){--alpha-15:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-15:color-mix(in oklab, var(--alpha-base) 15%, transparent)}}:root,:where([data-theme]){--alpha-16:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-16:color-mix(in oklab, var(--alpha-base) 16%, transparent)}}:root,:where([data-theme]){--alpha-20:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-20:color-mix(in oklab, var(--alpha-base) 20%, transparent)}}:root,:where([data-theme]){--alpha-25:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-25:color-mix(in oklab, var(--alpha-base) 25%, transparent)}}:root,:where([data-theme]){--alpha-30:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-30:color-mix(in oklab, var(--alpha-base) 30%, transparent)}}:root,:where([data-theme]){--alpha-35:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-35:color-mix(in oklab, var(--alpha-base) 35%, transparent)}}:root,:where([data-theme]){--alpha-40:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-40:color-mix(in oklab, var(--alpha-base) 40%, transparent)}}:root,:where([data-theme]){--alpha-50:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-50:color-mix(in oklab, var(--alpha-base) 50%, transparent)}}:root,:where([data-theme]){--alpha-60:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-60:color-mix(in oklab, var(--alpha-base) 60%, transparent)}}:root,:where([data-theme]){--alpha-70:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-70:color-mix(in oklab, var(--alpha-base) 70%, transparent)}}:root,:where([data-theme]){--white:#fff;--black:#000;--green-25:#edfaf2;--green-50:#d9f4e4;--green-75:#b8ebcc;--green-100:#8cdfad;--green-200:#66d492;--green-300:#40c977;--green-400:#04b84c;--green-500:#00a240;--green-600:#008635;--green-700:#00692a;--green-800:#004f1f;--green-900:#003716;--green-950:#011c0b;--green-1000:#001207;--green-a25:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a25:color-mix(in oklab, var(--green-400) 8%, transparent)}}:root,:where([data-theme]){--green-a50:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a50:color-mix(in oklab, var(--green-400) 15%, transparent)}}:root,:where([data-theme]){--green-a75:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a75:color-mix(in oklab, var(--green-400) 29%, transparent)}}:root,:where([data-theme]){--green-a100:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a100:color-mix(in oklab, var(--green-400) 45%, transparent)}}:root,:where([data-theme]){--green-a200:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a200:color-mix(in oklab, var(--green-400) 60%, transparent)}}:root,:where([data-theme]){--green-a300:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a300:color-mix(in oklab, var(--green-400) 75%, transparent)}}:root,:where([data-theme]){--red-25:#fff0f0;--red-50:#ffd9d9;--red-75:#ffc6c5;--red-100:#ffa4a2;--red-200:#ff8583;--red-300:#ff6764;--red-400:#fa423e;--red-500:#e02e2a;--red-600:#ba2623;--red-700:#911e1b;--red-800:#6e1615;--red-900:#4d100e;--red-950:#280b0a;--red-1000:#1f0909;--red-a25:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a25:color-mix(in oklab, var(--red-400) 8%, transparent)}}:root,:where([data-theme]){--red-a50:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a50:color-mix(in oklab, var(--red-400) 16%, transparent)}}:root,:where([data-theme]){--red-a75:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a75:color-mix(in oklab, var(--red-400) 30%, transparent)}}:root,:where([data-theme]){--red-a100:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a100:color-mix(in oklab, var(--red-400) 48%, transparent)}}:root,:where([data-theme]){--red-a200:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a200:color-mix(in oklab, var(--red-400) 64%, transparent)}}:root,:where([data-theme]){--red-a300:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a300:color-mix(in oklab, var(--red-400) 79%, transparent)}}:root,:where([data-theme]){--pink-25:#fff4f9;--pink-50:#ffe8f3;--pink-75:#ffd4e8;--pink-100:#ffbada;--pink-200:#ffa3ce;--pink-300:#ff8cc1;--pink-400:#ff66ad;--pink-500:#e04c91;--pink-600:#ba437a;--pink-700:#963c67;--pink-800:#6e2c4a;--pink-900:#4d1f34;--pink-950:#29101c;--pink-1000:#1a0a11;--pink-a25:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a25:color-mix(in oklab, var(--pink-400) 8%, transparent)}}:root,:where([data-theme]){--pink-a50:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a50:color-mix(in oklab, var(--pink-400) 16%, transparent)}}:root,:where([data-theme]){--pink-a75:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a75:color-mix(in oklab, var(--pink-400) 28%, transparent)}}:root,:where([data-theme]){--pink-a100:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a100:color-mix(in oklab, var(--pink-400) 45%, transparent)}}:root,:where([data-theme]){--pink-a200:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a200:color-mix(in oklab, var(--pink-400) 60%, transparent)}}:root,:where([data-theme]){--pink-a300:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a300:color-mix(in oklab, var(--pink-400) 76%, transparent)}}:root,:where([data-theme]){--orange-25:#fff5f0;--orange-50:#ffe7d9;--orange-75:#ffcfb4;--orange-100:#ffb790;--orange-200:#ff9e6c;--orange-300:#ff8549;--orange-400:#fb6a22;--orange-500:#e25507;--orange-600:#b9480d;--orange-700:#923b0f;--orange-800:#6d2e0f;--orange-900:#4a2206;--orange-950:#281105;--orange-1000:#211107;--orange-a25:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a25:color-mix(in oklab, var(--orange-400) 7%, transparent)}}:root,:where([data-theme]){--orange-a50:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a50:color-mix(in oklab, var(--orange-400) 16%, transparent)}}:root,:where([data-theme]){--orange-a75:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a75:color-mix(in oklab, var(--orange-400) 33%, transparent)}}:root,:where([data-theme]){--orange-a100:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a100:color-mix(in oklab, var(--orange-400) 48%, transparent)}}:root,:where([data-theme]){--orange-a200:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a200:color-mix(in oklab, var(--orange-400) 65%, transparent)}}:root,:where([data-theme]){--orange-a300:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a300:color-mix(in oklab, var(--orange-400) 81%, transparent)}}:root,:where([data-theme]){--yellow-25:#fffbed;--yellow-50:#fff6d9;--yellow-75:#ffeeb8;--yellow-100:#ffe48c;--yellow-200:#ffdb66;--yellow-300:#ffd240;--yellow-400:#ffc300;--yellow-500:#e0ac00;--yellow-600:#ba8e00;--yellow-700:#916f00;--yellow-800:#6e5400;--yellow-900:#4d3b00;--yellow-950:#261d00;--yellow-1000:#1a1400;--yellow-a25:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a25:color-mix(in oklab, var(--yellow-400) 8%, transparent)}}:root,:where([data-theme]){--yellow-a50:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a50:color-mix(in oklab, var(--yellow-400) 15%, transparent)}}:root,:where([data-theme]){--yellow-a75:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a75:color-mix(in oklab, var(--yellow-400) 27%, transparent)}}:root,:where([data-theme]){--yellow-a100:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a100:color-mix(in oklab, var(--yellow-400) 45%, transparent)}}:root,:where([data-theme]){--yellow-a200:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a200:color-mix(in oklab, var(--yellow-400) 59%, transparent)}}:root,:where([data-theme]){--yellow-a300:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a300:color-mix(in oklab, var(--yellow-400) 74%, transparent)}}:root,:where([data-theme]){--purple-25:#f9f5fe;--purple-50:#efe5fe;--purple-75:#e0cefd;--purple-100:#ceb0fb;--purple-200:#be95fa;--purple-300:#ad7bf9;--purple-400:#924ff7;--purple-500:#8046d9;--purple-600:#6b3ab4;--purple-700:#532d8d;--purple-800:#3f226a;--purple-900:#2c184a;--purple-950:#160c25;--purple-1000:#100a19;--purple-a25:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a25:color-mix(in oklab, var(--purple-400) 6%, transparent)}}:root,:where([data-theme]){--purple-a50:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a50:color-mix(in oklab, var(--purple-400) 15%, transparent)}}:root,:where([data-theme]){--purple-a75:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a75:color-mix(in oklab, var(--purple-400) 28%, transparent)}}:root,:where([data-theme]){--purple-a100:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a100:color-mix(in oklab, var(--purple-400) 45%, transparent)}}:root,:where([data-theme]){--purple-a200:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a200:color-mix(in oklab, var(--purple-400) 60%, transparent)}}:root,:where([data-theme]){--purple-a300:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a300:color-mix(in oklab, var(--purple-400) 75%, transparent)}}:root,:where([data-theme]){--blue-25:#f5faff;--blue-50:#e5f3ff;--blue-75:#cce6ff;--blue-100:#99ceff;--blue-200:#66b5ff;--blue-300:#339cff;--blue-400:#0285ff;--blue-500:#0169cc;--blue-600:#004f99;--blue-700:#003f7a;--blue-800:#013566;--blue-900:#00284d;--blue-950:#000e1a;--blue-1000:#000d19;--blue-a25:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a25:color-mix(in oklab, var(--blue-400) 4%, transparent)}}:root,:where([data-theme]){--blue-a50:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a50:color-mix(in oklab, var(--blue-400) 13%, transparent)}}:root,:where([data-theme]){--blue-a75:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a75:color-mix(in oklab, var(--blue-400) 25%, transparent)}}:root,:where([data-theme]){--blue-a100:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a100:color-mix(in oklab, var(--blue-400) 40%, transparent)}}:root,:where([data-theme]){--blue-a200:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a200:color-mix(in oklab, var(--blue-400) 60%, transparent)}}:root,:where([data-theme]){--blue-a300:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a300:color-mix(in oklab, var(--blue-400) 80%, transparent)}}:root,:where([data-theme]){--hairline:1px}:where(:root),:where([data-theme=light]){--gray-0:#fff;--gray-25:#fcfcfc;--gray-50:#f9f9f9;--gray-75:#f3f3f3;--gray-100:#ededed;--gray-150:#dfdfdf;--gray-200:#cdcdcd;--gray-250:#b9b9b9;--gray-300:#afafaf;--gray-350:#9f9f9f;--gray-400:#8f8f8f;--gray-450:#767676;--gray-550:#4f4f4f;--gray-600:#414141;--gray-650:#393939;--gray-700:#303030;--gray-750:#282828;--gray-800:#212121;--gray-850:#1c1c1c;--gray-900:#181818;--gray-925:#161616;--gray-950:#131313;--gray-975:#101010;--gray-1000:#0d0d0d;--alpha-base:#0d0d0d}:where([data-theme=dark]){--gray-0:#0d0d0d;--gray-25:#101010;--gray-50:#131313;--gray-75:#161616;--gray-100:#181818;--gray-150:#1c1c1c;--gray-200:#212121;--gray-250:#282828;--gray-300:#303030;--gray-350:#393939;--gray-400:#414141;--gray-450:#4f4f4f;--gray-550:#767676;--gray-600:#8f8f8f;--gray-650:#9f9f9f;--gray-700:#afafaf;--gray-750:#b9b9b9;--gray-800:#cdcdcd;--gray-850:#dcdcdc;--gray-900:#ededed;--gray-925:#f3f3f3;--gray-950:#f3f3f3;--gray-975:#f9f9f9;--gray-1000:#fff;--alpha-base:#fff}@media (min-resolution:150dpi),(min-resolution:1.5x){:root,:where([data-theme]){--hairline:.5px}}:root,:where([data-theme]){--shadow-color:0 0 0;--elevation-100-geo:0 1px 2px -1px;--elevation-200-geo:0 2px 4px -1px;--elevation-300-geo:0 4px 8px -2px;--elevation-400-geo:0 8px 16px -4px}:where(:root),:where([data-theme=light]){--shadow-alpha-100:.08;--shadow-alpha-200:.08;--shadow-alpha-300:.1;--shadow-alpha-400:.12;--shadow-hairline-width:1px;--shadow-hairline-color:#00000014}@media (min-resolution:150dpi),(min-resolution:1.5x){:where(:root),:where([data-theme=light]){--shadow-hairline-width:.5px;--shadow-hairline-color:#0000001a}}:where([data-theme=dark]){--shadow-alpha-100:.2;--shadow-alpha-200:.2;--shadow-alpha-300:.36;--shadow-alpha-400:.3;--shadow-hairline-width:1px;--shadow-hairline-color:#ffffff1a}@media (min-resolution:150dpi),(min-resolution:1.5x){:where([data-theme=dark]){--shadow-hairline-width:.5px;--shadow-hairline-color:#ffffff1f}}:where([data-theme=dark]) [data-surface=elevated]{--shadow-hairline:0 0 #0000}:root,:where([data-theme]){--color-text:var(--gray-1000);--color-text-inverse:var(--gray-0);--color-text-primary:var(--color-text);--color-text-primary-soft:var(--color-text);--color-background-primary-soft-alt:var(--alpha-02);--color-border-primary-soft-alt:var(--alpha-06);--color-text-primary-soft-alt:var(--color-text);--color-text-primary-surface:var(--color-text);--color-text-primary-solid:var(--color-text-inverse);--color-text-primary-outline:var(--color-text);--color-text-primary-outline-hover:var(--color-text);--color-text-primary-ghost:var(--color-text);--color-text-primary-ghost-hover:var(--color-text);--color-ring-primary:var(--color-ring);--color-ring-primary-soft:var(--color-ring-primary);--color-ring-primary-solid:var(--color-ring-primary);--color-ring-primary-outline:var(--color-ring-primary);--color-ring-primary-ghost:var(--color-ring-primary);--color-text-secondary-soft:var(--color-text);--color-background-secondary-soft-alt:var(--alpha-02);--color-border-secondary-soft-alt:var(--alpha-06);--color-text-secondary-soft-alt:var(--color-text);--color-text-secondary-solid:var(--white);--color-text-secondary-outline:var(--color-text-secondary);--color-text-secondary-outline-hover:var(--color-text);--color-text-secondary-ghost:var(--color-text-secondary);--color-text-secondary-ghost-hover:var(--color-text);--color-ring-secondary:var(--color-ring);--color-ring-secondary-soft:var(--color-ring-secondary);--color-ring-secondary-solid:var(--color-ring-secondary);--color-ring-secondary-outline:var(--color-ring-secondary);--color-ring-secondary-ghost:var(--color-ring-secondary);--color-background-info-soft:var(--blue-50);--color-background-info-soft-hover:var(--blue-75);--color-background-info-soft-active:var(--blue-75);--color-background-info-soft-alpha:var(--blue-a50);--color-background-info-soft-alpha-hover:var(--blue-a75);--color-background-info-soft-alpha-active:var(--blue-a75);--color-background-info-solid:var(--blue-400);--color-background-info-solid-hover:var(--blue-500);--color-background-info-solid-active:var(--blue-500);--color-text-info-solid:var(--white);--color-background-info-outline-hover:var(--blue-a25);--color-background-info-outline-active:var(--blue-a25);--color-border-info-outline:var(--blue-500);--color-border-info-outline-hover:var(--blue-500);--color-text-info-outline:var(--blue-500);--color-text-info-outline-hover:var(--blue-500);--color-background-info-ghost-hover:var(--blue-a50);--color-background-info-ghost-active:var(--blue-a50);--color-ring-info:var(--color-ring);--color-ring-info-soft:var(--color-ring-info);--color-ring-info-solid:var(--color-ring-info);--color-ring-info-outline:var(--color-ring-info);--color-ring-info-ghost:var(--color-ring-info);--color-background-warning-soft:var(--orange-50);--color-background-warning-soft-hover:var(--orange-75);--color-background-warning-soft-active:var(--orange-75);--color-background-warning-soft-alpha:var(--orange-a50);--color-background-warning-soft-alpha-hover:var(--orange-a75);--color-background-warning-soft-alpha-active:var(--orange-a75);--color-background-warning-solid:var(--orange-500);--color-background-warning-solid-hover:var(--orange-600);--color-background-warning-solid-active:var(--orange-600);--color-text-warning-solid:var(--white);--color-background-warning-outline-hover:var(--orange-a25);--color-background-warning-outline-active:var(--orange-a25);--color-border-warning-outline:var(--orange-500);--color-border-warning-outline-hover:var(--orange-500);--color-text-warning-outline:var(--orange-500);--color-text-warning-outline-hover:var(--orange-500);--color-background-warning-ghost-hover:var(--orange-a50);--color-background-warning-ghost-active:var(--orange-a50);--color-text-warning-ghost:var(--orange-500);--color-text-warning-ghost-hover:var(--orange-500);--color-ring-warning:var(--color-ring);--color-ring-warning-soft:var(--color-ring-warning);--color-ring-warning-solid:var(--color-ring-warning);--color-ring-warning-outline:var(--color-ring-warning);--color-ring-warning-ghost:var(--color-ring-warning);--color-text-caution-hover:var(--yellow-800);--color-background-caution-soft:var(--yellow-50);--color-background-caution-soft-hover:var(--yellow-75);--color-background-caution-soft-active:var(--yellow-75);--color-background-caution-soft-alpha:var(--yellow-a50);--color-background-caution-soft-alpha-hover:var(--yellow-a75);--color-background-caution-soft-alpha-active:var(--yellow-a75);--color-background-caution-solid:var(--yellow-600);--color-background-caution-solid-hover:var(--yellow-700);--color-background-caution-solid-active:var(--yellow-700);--color-text-caution-solid:var(--white);--color-background-caution-outline-hover:var(--yellow-a25);--color-background-caution-outline-active:var(--yellow-a25);--color-border-caution-outline:var(--yellow-700);--color-border-caution-outline-hover:var(--yellow-700);--color-text-caution-outline:var(--yellow-700);--color-text-caution-outline-hover:var(--yellow-700);--color-background-caution-ghost-hover:var(--yellow-a50);--color-background-caution-ghost-active:var(--yellow-a50);--color-text-caution-ghost:var(--yellow-700);--color-text-caution-ghost-hover:var(--yellow-700);--color-ring-caution:var(--color-ring);--color-ring-caution-soft:var(--color-ring-caution);--color-ring-caution-solid:var(--color-ring-caution);--color-ring-caution-outline:var(--color-ring-caution);--color-ring-caution-ghost:var(--color-ring-caution);--color-background-danger-soft:var(--red-50);--color-background-danger-soft-hover:var(--red-75);--color-background-danger-soft-active:var(--red-75);--color-background-danger-soft-alpha:var(--red-a50);--color-background-danger-soft-alpha-hover:var(--red-a75);--color-background-danger-soft-alpha-active:var(--red-a75);--color-background-danger-solid:var(--red-500);--color-background-danger-solid-hover:var(--red-600);--color-background-danger-solid-active:var(--red-600);--color-text-danger-solid:var(--white);--color-background-danger-outline-hover:var(--red-a25);--color-background-danger-outline-active:var(--red-a25);--color-border-danger-outline:var(--red-500);--color-border-danger-outline-hover:var(--red-500);--color-text-danger-outline:var(--red-500);--color-text-danger-outline-hover:var(--red-500);--color-background-danger-ghost-hover:var(--red-a50);--color-background-danger-ghost-active:var(--red-a50);--color-text-danger-ghost:var(--red-500);--color-text-danger-ghost-hover:var(--red-500);--color-ring-danger:var(--red-200);--color-ring-danger-soft:var(--color-ring-danger);--color-ring-danger-solid:var(--color-ring-danger);--color-ring-danger-outline:var(--color-ring-danger);--color-ring-danger-ghost:var(--color-ring-danger);--color-background-success-soft:var(--green-50);--color-background-success-soft-hover:var(--green-75);--color-background-success-soft-active:var(--green-75);--color-background-success-soft-alpha:var(--green-a50);--color-background-success-soft-alpha-hover:var(--green-a75);--color-background-success-soft-alpha-active:var(--green-a75);--color-text-success-solid:var(--white);--color-background-success-outline-hover:var(--green-a25);--color-background-success-outline-active:var(--green-a25);--color-text-success-outline:var(--green-500);--color-text-success-outline-hover:var(--green-500);--color-background-success-ghost-hover:var(--green-a50);--color-background-success-ghost-active:var(--green-a50);--color-text-success-ghost:var(--green-500);--color-text-success-ghost-hover:var(--green-500);--color-ring-success:var(--color-ring);--color-ring-success-soft:var(--color-ring-info);--color-ring-success-solid:var(--color-ring-info);--color-ring-success-outline:var(--color-ring-info);--color-ring-success-ghost:var(--color-ring-info);--color-background-discovery-soft:var(--purple-50);--color-background-discovery-soft-hover:var(--purple-75);--color-background-discovery-soft-active:var(--purple-75);--color-background-discovery-soft-alpha:var(--purple-a50);--color-background-discovery-soft-alpha-hover:var(--purple-a75);--color-background-discovery-soft-alpha-active:var(--purple-a75);--color-background-discovery-solid:var(--purple-400);--color-background-discovery-solid-hover:var(--purple-500);--color-background-discovery-solid-active:var(--purple-500);--color-text-discovery-solid:var(--white);--color-background-discovery-outline-hover:var(--purple-a25);--color-background-discovery-outline-active:var(--purple-a25);--color-border-discovery-outline:var(--purple-500);--color-border-discovery-outline-hover:var(--purple-500);--color-background-discovery-ghost-hover:var(--purple-a50);--color-background-discovery-ghost-active:var(--purple-a50);--color-text-discovery-ghost:var(--purple-500);--color-text-discovery-ghost-hover:var(--purple-500);--color-ring-discovery:var(--color-ring);--color-ring-discovery-soft:var(--color-ring);--color-ring-discovery-solid:var(--color-ring);--color-ring-discovery-outline:var(--color-ring);--color-ring-discovery-ghost:var(--color-ring);--color-background-disabled:var(--alpha-05);--color-border-disabled:var(--alpha-06);--font-tracking-wide:0em;--font-tracking-normal:0em;--font-tracking-tight:0em;--font-heading-5xl-size:4.5rem;--font-heading-5xl-line-height:4.5rem;--font-heading-5xl-weight:var(--font-weight-semibold);--font-heading-5xl-tracking:var(--tracking-tight);--font-heading-4xl-size:3.75rem;--font-heading-4xl-line-height:3.75rem;--font-heading-4xl-weight:var(--font-weight-semibold);--font-heading-4xl-tracking:var(--tracking-tight);--font-heading-3xl-size:3rem;--font-heading-3xl-line-height:3rem;--font-heading-3xl-weight:var(--font-weight-semibold);--font-heading-3xl-tracking:var(--tracking-tight);--font-heading-2xl-size:2.25rem;--font-heading-2xl-line-height:2.625rem;--font-heading-2xl-weight:var(--font-weight-semibold);--font-heading-2xl-tracking:var(--tracking-tight);--font-heading-xl-size:2rem;--font-heading-xl-line-height:2.375rem;--font-heading-xl-weight:var(--font-weight-semibold);--font-heading-xl-tracking:var(--tracking-tight);--font-heading-lg-size:1.5rem;--font-heading-lg-line-height:1.75rem;--font-heading-lg-weight:var(--font-weight-semibold);--font-heading-lg-tracking:var(--tracking-normal);--font-heading-md-size:1.25rem;--font-heading-md-line-height:1.625rem;--font-heading-md-weight:var(--font-weight-semibold);--font-heading-md-tracking:var(--tracking-normal);--font-heading-sm-size:1.125rem;--font-heading-sm-line-height:1.625rem;--font-heading-sm-weight:var(--font-weight-semibold);--font-heading-sm-tracking:var(--tracking-normal);--font-heading-xs-size:1rem;--font-heading-xs-line-height:1.5rem;--font-heading-xs-weight:var(--font-weight-semibold);--font-heading-xs-tracking:var(--tracking-normal);--font-text-lg-size:1.125rem;--font-text-lg-line-height:1.8125rem;--font-text-lg-weight:var(--font-weight-normal);--font-text-lg-tracking:var(--tracking-normal);--font-text-md-size:1rem;--font-text-md-line-height:1.5rem;--font-text-md-weight:var(--font-weight-normal);--font-text-md-tracking:var(--tracking-normal);--font-text-sm-size:.875rem;--font-text-sm-line-height:1.25rem;--font-text-sm-weight:var(--font-weight-normal);--font-text-sm-tracking:var(--tracking-normal);--font-text-xs-size:.75rem;--font-text-xs-line-height:1.125rem;--font-text-xs-weight:var(--font-weight-normal);--font-text-xs-tracking:var(--tracking-wide);--font-text-2xs-size:.625rem;--font-text-2xs-line-height:.875rem;--font-text-2xs-weight:var(--font-weight-normal);--font-text-2xs-tracking:var(--tracking-wide);--font-text-3xs-size:.5rem;--font-text-3xs-line-height:.75rem;--font-text-3xs-weight:var(--font-weight-normal);--font-text-3xs-tracking:var(--tracking-wide);--control-size-3xs:1.375rem;--control-size-2xs:1.5rem;--control-size-xs:1.625rem;--control-size-sm:1.75rem;--control-size-md:2rem;--control-size-lg:2.25rem;--control-size-xl:2.5rem;--control-size-2xl:2.75rem;--control-size-3xl:3rem;--control-gutter-2xs:.375rem;--control-gutter-xs:.5rem;--control-gutter-sm:.625rem;--control-gutter-md:.75rem;--control-gutter-lg:.875rem;--control-gutter-xl:1rem;--control-gutter-pill-scaling:1.33;--control-radius-sm:var(--radius-sm);--control-radius-md:var(--radius-md);--control-radius-lg:var(--radius-lg);--control-radius-xl:var(--radius-xl);--control-font-size-sm:var(--font-text-xs-size);--control-font-size-md:var(--font-text-sm-size);--control-font-size-lg:var(--font-text-md-size);--control-icon-size-xs:.875rem;--control-icon-size-sm:1rem;--control-icon-size-md:1.125rem;--control-icon-size-lg:1.25rem;--control-icon-size-xl:1.375rem;--control-icon-size-2xl:1.5rem;--cubic-enter:cubic-bezier(.19, 1, .22, 1);--cubic-exit:cubic-bezier(.8, 0, .4, 1);--cubic-exit-snappy:cubic-bezier(.65, 0, .4, 1);--cubic-move:cubic-bezier(.65, 0, .35, 1);--transition-duration-basic:.15s;--transition-ease-basic:ease;--scrollbar-color:var(--alpha-30);--shadow-hairline:0 0 0 var(--shadow-hairline-width) var(--shadow-hairline-color);--shadow-100:var(--elevation-100-geo) rgb(var(--shadow-color) / var(--shadow-alpha-100));--shadow-100-strong:var(--elevation-100-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-100) * 1.25));--shadow-100-stronger:var(--elevation-100-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-100) * 1.6));--shadow-200:var(--elevation-200-geo) rgb(var(--shadow-color) / var(--shadow-alpha-200));--shadow-200-strong:var(--elevation-200-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-200) * 1.25));--shadow-200-stronger:var(--elevation-200-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-200) * 1.6));--shadow-300:var(--elevation-300-geo) rgb(var(--shadow-color) / var(--shadow-alpha-300));--shadow-300-strong:var(--elevation-300-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-300) * 1.25));--shadow-300-stronger:var(--elevation-300-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-300) * 1.6));--shadow-400:var(--elevation-400-geo) rgb(var(--shadow-color) / var(--shadow-alpha-400));--shadow-400-strong:var(--elevation-400-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-400) * 1.25));--shadow-400-stronger:var(--elevation-400-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-400) * 1.6))}:where(:root),:where([data-theme=light]){--color-text-secondary:var(--gray-500);--color-text-tertiary:var(--gray-400);--color-ring:var(--blue-500);--color-background-primary-soft:var(--gray-100);--color-background-primary-soft-hover:var(--gray-150);--color-background-primary-soft-active:var(--gray-200);--color-background-primary-soft-alpha:var(--alpha-08);--color-background-primary-soft-alpha-hover:var(--alpha-12);--color-background-primary-soft-alpha-active:var(--alpha-16);--color-background-primary-surface:var(--alpha-05);--color-border-primary-surface:var(--alpha-05);--color-background-primary-solid:var(--gray-900);--color-background-primary-solid-hover:var(--gray-700);--color-background-primary-solid-active:var(--gray-600);--color-background-primary-outline-hover:var(--alpha-02);--color-background-primary-outline-active:var(--alpha-04);--color-border-primary-outline:var(--alpha-16);--color-border-primary-outline-hover:var(--alpha-20);--color-background-primary-ghost-hover:var(--alpha-08);--color-background-primary-ghost-active:var(--alpha-12);--color-background-secondary-soft:var(--gray-100);--color-background-secondary-soft-hover:var(--gray-150);--color-background-secondary-soft-active:var(--gray-200);--color-background-secondary-soft-alpha:var(--alpha-08);--color-background-secondary-soft-alpha-hover:var(--alpha-12);--color-background-secondary-soft-alpha-active:var(--alpha-16);--color-background-secondary-solid:var(--gray-500);--color-background-secondary-solid-hover:var(--gray-600);--color-background-secondary-solid-active:var(--gray-700);--color-background-secondary-outline-hover:var(--alpha-02);--color-background-secondary-outline-active:var(--alpha-04);--color-border-secondary-outline:var(--alpha-16);--color-border-secondary-outline-hover:var(--alpha-20);--color-background-secondary-ghost-hover:var(--alpha-08);--color-background-secondary-ghost-active:var(--alpha-12);--color-text-info:var(--blue-500);--color-text-info-soft:var(--blue-600);--color-background-info-surface:var(--blue-a25);--color-border-info-surface:var(--blue-a25);--color-text-info-surface:var(--blue-600);--color-text-info-ghost:var(--blue-500);--color-text-info-ghost-hover:var(--blue-500);--color-text-warning:var(--orange-700);--color-text-warning-soft:var(--orange-700);--color-background-warning-surface:var(--orange-a25);--color-border-warning-surface:var(--orange-a25);--color-text-warning-surface:var(--orange-700);--color-text-caution:var(--yellow-700);--color-text-caution-soft:var(--yellow-800);--color-background-caution-surface:var(--yellow-a25);--color-border-caution-surface:var(--yellow-a25);--color-text-caution-surface:var(--yellow-800);--color-text-danger:var(--red-700);--color-text-danger-soft:var(--red-600);--color-background-danger-surface:var(--red-a25);--color-border-danger-surface:var(--red-a25);--color-text-danger-surface:var(--red-600);--color-text-success:var(--green-700);--color-text-success-soft:var(--green-600);--color-background-success-surface:var(--green-a25);--color-border-success-surface:var(--green-a25);--color-text-success-surface:var(--green-600);--color-background-success-solid:var(--green-500);--color-background-success-solid-hover:var(--green-500);--color-background-success-solid-active:var(--green-500);--color-border-success-outline:var(--green-500);--color-border-success-outline-hover:var(--green-500);--color-text-discovery:var(--purple-700);--color-text-discovery-soft:var(--purple-600);--color-background-discovery-surface:var(--purple-a25);--color-border-discovery-surface:var(--purple-a25);--color-text-discovery-surface:var(--purple-600);--color-text-discovery-outline:var(--purple-500);--color-text-discovery-outline-hover:var(--purple-500);--color-text-disabled:var(--gray-400);--color-border-subtle:var(--alpha-05);--color-border:var(--alpha-10);--color-border-strong:var(--alpha-15);--shadow:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--color-surface:var(--gray-0);--color-surface-secondary:var(--gray-50);--color-surface-tertiary:var(--gray-75);--color-surface-elevated:var(--gray-0);--color-surface-elevated-secondary:var(--gray-50)}:where([data-theme=dark]){--color-text-secondary:var(--gray-700);--color-text-tertiary:var(--gray-600);--color-ring:var(--blue-400);--color-background-primary-soft:var(--gray-300);--color-background-primary-soft-hover:var(--gray-350);--color-background-primary-soft-active:var(--gray-400);--color-background-primary-soft-alpha:var(--alpha-12);--color-background-primary-soft-alpha-hover:var(--alpha-16);--color-background-primary-soft-alpha-active:var(--alpha-20);--color-background-primary-surface:var(--alpha-08);--color-border-primary-surface:var(--alpha-08);--color-background-primary-solid:var(--gray-950);--color-background-primary-solid-hover:var(--gray-900);--color-background-primary-solid-active:var(--gray-850);--color-background-primary-outline-hover:var(--alpha-04);--color-background-primary-outline-active:var(--alpha-06);--color-border-primary-outline:var(--alpha-25);--color-border-primary-outline-hover:var(--alpha-30);--color-background-primary-ghost-hover:var(--alpha-12);--color-background-primary-ghost-active:var(--alpha-16);--color-background-secondary-soft:var(--gray-300);--color-background-secondary-soft-hover:var(--gray-350);--color-background-secondary-soft-active:var(--gray-400);--color-background-secondary-soft-alpha:var(--alpha-12);--color-background-secondary-soft-alpha-hover:var(--alpha-16);--color-background-secondary-soft-alpha-active:var(--alpha-20);--color-background-secondary-solid:var(--gray-400);--color-background-secondary-solid-hover:var(--gray-450);--color-background-secondary-solid-active:var(--gray-500);--color-background-secondary-outline-hover:var(--alpha-04);--color-background-secondary-outline-active:var(--alpha-06);--color-border-secondary-outline:var(--alpha-25);--color-border-secondary-outline-hover:var(--alpha-30);--color-background-secondary-ghost-hover:var(--alpha-12);--color-background-secondary-ghost-active:var(--alpha-16);--color-text-info:var(--blue-200);--color-text-info-soft:var(--blue-300);--color-background-info-surface:var(--blue-a50);--color-border-info-surface:var(--blue-a50);--color-text-info-surface:var(--blue-300);--color-text-info-ghost:var(--blue-200);--color-text-info-ghost-hover:var(--blue-200);--color-text-warning:var(--orange-500);--color-text-warning-soft:var(--orange-400);--color-background-warning-surface:var(--orange-a50);--color-border-warning-surface:var(--orange-a50);--color-text-warning-surface:var(--orange-400);--color-text-caution:var(--yellow-500);--color-text-caution-soft:var(--yellow-400);--color-background-caution-surface:var(--yellow-a50);--color-border-caution-surface:var(--yellow-a50);--color-text-caution-surface:var(--yellow-400);--color-text-danger:var(--red-500);--color-text-danger-soft:var(--red-400);--color-background-danger-surface:var(--red-a50);--color-border-danger-surface:var(--red-a50);--color-text-danger-surface:var(--red-400);--color-text-success:var(--green-400);--color-text-success-soft:var(--green-400);--color-background-success-surface:var(--green-a50);--color-border-success-surface:var(--green-a50);--color-text-success-surface:var(--green-400);--color-background-success-solid:var(--green-600);--color-background-success-solid-hover:var(--green-600);--color-background-success-solid-active:var(--green-600);--color-border-success-outline:var(--green-600);--color-border-success-outline-hover:var(--green-600);--color-text-discovery:var(--purple-500);--color-text-discovery-soft:var(--purple-200);--color-background-discovery-surface:var(--purple-a50);--color-border-discovery-surface:var(--purple-a50);--color-text-discovery-surface:var(--purple-200);--color-text-discovery-outline:var(--purple-400);--color-text-discovery-outline-hover:var(--purple-400);--color-text-disabled:var(--gray-500);--color-border-subtle:var(--alpha-06);--color-border:var(--alpha-12);--color-border-strong:var(--alpha-20);--shadow:0 10px 15px -3px #0003, 0 4px 6px -4px #0003;--color-surface:var(--gray-200);--color-surface-secondary:var(--gray-100);--color-surface-tertiary:var(--gray-50);--color-surface-elevated:var(--gray-300);--color-surface-elevated-secondary:var(--gray-400)}:root,:where([data-theme]){--alert-border-radius:var(--radius-xl);--alert-gap:calc(var(--spacing) * 3);--alert-gutter:calc(var(--spacing) * 4);--alert-font-size:var(--font-text-sm-size);--alert-line-height:var(--font-text-sm-line-height);--alert-title-font-weight:var(--font-weight-semibold);--avatar-radius:var(--radius-full);--avatar-size:28px;--avatar-font-size-scaling:.5;--avatar-overflow-font-size-scaling-one:.45;--avatar-overflow-font-size-scaling-two:.37;--avatar-overflow-font-size-scaling-three:.3;--avatar-group-cutout-width:3px;--avatar-group-cutout-color:var(--color-surface);--avatar-group-spacing:-8px;--badge-gutter-sm:calc(var(--control-gutter-2xs) - 1px);--badge-gutter-md:var(--control-gutter-2xs);--badge-gutter-lg:var(--control-gutter-xs);--badge-size-sm:calc(var(--control-size-3xs) - 2px);--badge-size-md:var(--control-size-3xs);--badge-size-lg:var(--control-size-2xs);--badge-radius-sm:var(--radius-xs);--badge-radius-md:var(--radius-xs);--badge-radius-lg:var(--radius-sm);--badge-font-size-sm:var(--font-text-xs-size);--badge-font-size-md:var(--font-text-sm-size);--badge-font-size-lg:var(--font-text-sm-size);--badge-tracking-sm:var(--tracking-wide);--badge-tracking-md:var(--tracking-normal);--badge-tracking-lg:var(--tracking-normal);--badge-font-weight-sm:var(--font-weight-semibold);--badge-font-weight-md:var(--font-weight-semibold);--badge-font-weight-lg:var(--font-weight-semibold);--badge-icon-font-size-sm:var(--font-text-xs-size);--badge-icon-font-size-md:var(--font-text-md-size);--badge-icon-font-size-lg:var(--font-text-md-size);--badge-indicator-size-sm:var(--font-text-xs-size);--badge-indicator-size-md:var(--font-text-xs-size);--badge-indicator-size-lg:var(--font-text-sm-size);--button-gap-sm:3px;--button-gap-md:4px;--button-gap-lg:6px;--button-font-weight:var(--font-weight-medium);--input-gap-xs:4px;--input-gap-sm:6px;--input-gap-md:8px;--input-gap-lg:10px;--input-text-color:var(--color-text);--input-placeholder-text-color:var(--color-text-tertiary);--input-outline-border-color:var(--color-border-primary-outline);--input-outline-border-color-focus:var(--alpha-50);--input-soft-background-color:var(--color-background-primary-soft-alpha);--input-soft-border-color-focus:var(--alpha-20);--link-font-weight:inherit;--link-gap:calc(var(--spacing) * .5);--link-radius:var(--radius-sm);--link-underline-decoration-offset:.1em;--chat-max-width:800px;--chat-gutter:calc(var(--spacing) * 5);--chat-background-color:var(--color-surface);--thread-gutter:calc(var(--spacing) * 4);--composer-gutter:calc(var(--spacing) * 3);--composer-compact-gutter:calc(var(--spacing) * 2);--composer-radius:var(--radius-4xl);--composer-background-color:var(--color-surface-elevated);--smoothing-background-color:var(--color-surface);--user-message-text-color:var(--color-text);--source-list-gutter:var(--thread-gutter);--codeblock-background-color:var(--gray-25);--codeblock-syntax-4:var(--pink-500);--dialog-min-width:250px;--dialog-max-width:450px;--dialog-container-inner-padding:calc(var(--spacing) * 5);--dialog-backdrop-fade-background:var(--color-surface-elevated)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--dialog-backdrop-fade-background:color-mix(in oklab, var(--color-surface-elevated) 60%, transparent)}}:root,:where([data-theme]){--menu-gutter:calc(var(--spacing) * 1.5);--menu-radius:var(--radius-xl);--menu-font-size:var(--font-text-sm-size);--menu-line-height:var(--font-text-sm-line-height);--menu-item-padding:calc(var(--spacing) * 1.5) calc(var(--spacing) * 2);--menu-item-gap:calc(var(--spacing) * 1.5);--menu-separator-gutter:var(--menu-gutter) calc(-1 * var(--menu-gutter));--menu-separator-background-color:var(--color-border);--menu-radio-indicator-size:var(--font-text-lg-size);--menu-radio-indicator-hole-size:var(--font-text-3xs-size);--menu-checkbox-indicator-size:var(--font-text-lg-size);--modal-container-inner-padding:calc(var(--spacing) * 5);--popover-radius:var(--radius-xl);--radio-group-col-gap:calc(var(--spacing) * 2.5);--radio-group-row-gap:calc(var(--spacing) * 5);--radio-group-item-gap:calc(var(--spacing) * 1.5);--radio-group-item-font-size:var(--font-text-sm-size);--radio-group-item-line-height:var(--font-text-sm-line-height);--radio-group-indicator-size:var(--font-text-md-size);--radio-group-indicator-border-color:var(--color-border-primary-outline);--radio-group-indicator-border-color-hover:var(--alpha-25);--radio-group-indicator-background-color:var(--color-background-primary-solid);--radio-group-indicator-hole-size:.375rem;--radio-group-indicator-hole-background-color:var(--color-text-primary-solid);--segmented-control-gap:2px;--segmented-control-gutter:2px;--segmented-control-font-weight:var(--font-weight-semibold);--segmented-control-thumb-shadow:0 1px 4px -1px #0003;--segmented-control-option-highlight-gutter:1px;--select-control-font-weight:var(--font-weight-medium);--switch-track-width:32px;--switch-track-height:19px;--switch-thumb-offset:3px;--switch-thumb-size:calc(var(--switch-track-height) - 2 * var(--switch-thumb-offset));--switch-thumb-shadow:0 1px 2px #0003;--switch-label-gap:calc(var(--spacing) * 2)}:where(:root),:where([data-theme=light]){--avatar-image-border-color:var(--alpha-04);--input-outline-border-color-hover:var(--alpha-25);--input-border-color-invalid:var(--red-500);--link-primary-text-color:var(--blue-500);--link-primary-text-color-hover:var(--blue-800);--user-message-background-color:var(--alpha-05);--codeblock-syntax-1:#c0660d;--codeblock-syntax-2:var(--blue-500);--codeblock-syntax-3:var(--green-600);--codeblock-syntax-5:var(--purple-500);--dialog-backdrop-dim-background:#0000004d;--menu-item-background-color:var(--alpha-08);--modal-backdrop-background:#0000004d;--segmented-control-background:var(--gray-100);--segmented-control-thumb-background:var(--gray-0);--segmented-control-option-highlight-background-color:var(--gray-200);--slider-track-color:var(--gray-150);--slider-range-color:var(--gray-450);--switch-track-color:var(--gray-150);--switch-track-color-hover:var(--gray-200);--switch-track-color-checked:var(--gray-900);--switch-track-color-checked-disabled:var(--gray-300);--switch-track-color-disabled:var(--gray-100);--switch-thumb-color:var(--gray-0);--switch-thumb-color-disabled:var(--gray-0)}:where([data-theme=dark]){--avatar-image-border-color:var(--alpha-15);--input-outline-border-color-hover:var(--alpha-30);--input-border-color-invalid:var(--red-600);--link-primary-text-color:var(--blue-300);--link-primary-text-color-hover:var(--blue-400);--user-message-background-color:var(--alpha-08);--codeblock-syntax-1:var(--yellow-100);--codeblock-syntax-2:var(--blue-200);--codeblock-syntax-3:var(--green-300);--codeblock-syntax-5:var(--purple-300);--dialog-backdrop-dim-background:#00000080;--menu-item-background-color:var(--alpha-10);--modal-backdrop-background:#00000080;--segmented-control-background:var(--gray-0);--segmented-control-thumb-background:var(--gray-300);--segmented-control-option-highlight-background-color:var(--gray-300);--slider-track-color:var(--gray-400);--slider-range-color:var(--gray-600);--switch-track-color:var(--gray-400);--switch-track-color-hover:var(--gray-450);--switch-track-color-checked:var(--blue-400);--switch-track-color-checked-disabled:var(--blue-700);--switch-track-color-disabled:var(--gray-300);--switch-thumb-color:var(--gray-1000);--switch-thumb-color-disabled:var(--gray-800)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html,:host{font-synthesis-weight:none}textarea{resize:none}img,svg{flex-grow:0;flex-shrink:0}input,textarea,select,optgroup{-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;filter:none;outline-offset:0;outline-width:2px}a,button,input,label,select,textarea,:where([aria-role=button]){touch-action:manipulation}button{text-transform:none;vertical-align:middle}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}pre{white-space:pre-wrap}table{border-spacing:0}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}html,:host{color:var(--color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:var(--tracking-normal)}[data-theme=light]{color-scheme:light}[data-theme=dark]{color-scheme:dark}*{scrollbar-color:var(--scrollbar-color) transparent;scrollbar-width:thin}[data-exiting]{pointer-events:none}::placeholder{color:var(--color-text-tertiary)}b,strong{font-weight:var(--font-weight-semibold)}@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_AMS-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Caligraphic-Bold.woff2)format("woff2")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Caligraphic-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Fraktur-Bold.woff2)format("woff2")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Fraktur-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Main-Bold.woff2)format("woff2")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Main-BoldItalic.woff2)format("woff2")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Main-Italic.woff2)format("woff2")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Main-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Math-BoldItalic.woff2)format("woff2")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Math-Italic.woff2)format("woff2")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_SansSerif-Bold.woff2)format("woff2")}@font-face{font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_SansSerif-Italic.woff2)format("woff2")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_SansSerif-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Script-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Size1-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Size2-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Size3-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Size4-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Typewriter-Regular.woff2)format("woff2")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.0"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{width:100%;height:inherit;fill:currentColor;fill-opacity:1;fill-rule:nonzero;stroke:currentColor;stroke-dasharray:none;stroke-dashoffset:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-width:1px;display:block;position:absolute}.katex svg path{stroke:none}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.bottom-0{bottom:0}.left-0{left:0}.isolate{isolation:isolate}.container{width:100%}@media (min-width:380px){.container{max-width:380px}}@media (min-width:576px){.container{max-width:576px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.mx-px{margin-inline:1px}.mt-1{margin-top:var(--spacing)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mb-1{margin-bottom:var(--spacing)}.\\!hidden{display:none!important}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.table{display:table}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-0{height:0}.h-\\[var\\(--button-icon-size\\)\\]{height:var(--button-icon-size)}.w-\\[var\\(--button-icon-size\\)\\]{width:var(--button-icon-size)}.w-full{width:100%}.max-w-sm{max-width:var(--container-sm)}.min-w-\\[120px\\]{min-width:120px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.grid-cols-\\[auto_1fr\\]{grid-template-columns:auto 1fr}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-default{border-color:var(--color-border)}.border-subtle{border-color:var(--color-border-subtle)}.bg-surface{background-color:var(--color-surface)}.fill-secondary{fill:var(--color-text-secondary)}.p-4{padding:calc(var(--spacing) * 4)}.pt-4{padding-top:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-right{text-align:right}.heading-lg{font-size:var(--font-heading-lg-size);font-weight:var(--font-heading-lg-weight);letter-spacing:var(--font-heading-lg-tracking);line-height:var(--font-heading-lg-line-height)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));letter-spacing:var(--tw-tracking,var(--text-sm--letter-spacing));font-weight:var(--tw-font-weight,var(--text-sm--font-weight))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-wrap{text-wrap:wrap}.text-ellipsis{text-overflow:ellipsis}.text-secondary{color:var(--color-text-secondary)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.shadow-lg{--tw-shadow:var(--shadow-300);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (min-width:576px){.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}}@font-face{font-family:Byte Sans;src:url(data:font/ttf;base64,AAEAAAASAQAABAAgRFNJRwAAAAEAAGYYAAAACEdERUYArgCgAAABLAAAACJHUE9TC0cL/AAAAVAAAAdGR1NVQlhYLa0AAAiYAAAA4E9TLzJolGcCAAAJeAAAAGBjbWFwX62n7AAACdgAAAHAY3Z0IAvjAvoAAFckAAAANGZwZ22eNhHKAABXWAAADhVnYXNwAAAAEAAAVxwAAAAIZ2x5ZvX2ACkAAAuYAABCnGhlYWQcLIvhAABONAAAADZoaGVhCI8EtwAATmwAAAAkaG10eDyNHJYAAE6QAAACLGxvY2FvbIFoAABQvAAAARhtYXhwAoYPDQAAUdQAAAAgbmFtZT5DSWYAAFH0AAADf3Bvc3R/ZzrDAABVdAAAAaVwcmVwaEbInAAAZXAAAACnAAEAAAAMAAAAAAAAAAIAAwAvAC8ABAA0ADQABAA2ADYAAgAAAAEAAAAKAB4ALgABREZMVAAIAAQAAAAA//8AAQAAAAFrZXJuAAgAAAACAAAAAQACAAYADgACAAgAAQAUAAIACAADAEYGHAY8AAEGYAAEAAAABQAUABoAJAAqADQAAQB5/+wAAgAV/+wAef/iAAEAef/xAAIAFf/xAHn/4gABAHkAAAABBjAABAAAACcAWABiAGgAqgDkAVoBpAHmAhgCcgKYAr4C5AL+AygDLgNEA2oDdAOKA7QDugPcBAIELARWBGgEngS8BMoE3AUKBTQFegWoBbYFxAXKBdAAAgA0/+IANv/iAAEAEwAAABAAHP/EAB7/xAAf/8QAIP/EACH/zgAi/8QAJf+wACr/xAAs/8QALv/YAC//zgAw/9gAMf/EADMAAAA0/8QANv/EAA4AFf+mABz/2AAe/9gAH//YACD/2AAi/9gAJf+6ACr/2AAs/9gAL//YADD/2AAx/9gANP/YADb/2AAdABQAAAAc/7UAHQAAAB7/tQAf/7UAIP+1ACEAAAAi/7UAIwAAACQAAAAl/7UAKP/sACn/7AAq/7UAKwAAACz/tQAt/+wALv/YADD/2AAx/+wAM//YADT/2AA1/+wANv/YADv/7AA9/+wAQv/sAEP/7ABZ/+wAEgAC/6EABP/sAAj/7AAL/9gAEP/iABL/4gAU/+wAHP+6AB7/vwAf/78AIP+/ACL/vwAl/8QAKv+3ACsAAAAs/8QALv/sADD/7AAQAAL/xAAE/+wACP/YAAv/xAAQ/9gAEv/YABT/2AAc/9gAHQAAAB7/2AAf/9gAIP/YACL/2AAl/84AKv/YACz/2AAMABz/zgAe/84AH//OACD/zgAi/84AJf/OACr/zgAs/84ALv/YADD/7AA0/+wANv/sABYAHP+mAB3/4gAe/6YAH/+mACD/pgAi/6YAI//iACX/sAAm/+wAKP/iACn/4gAq/6YAK//iACz/pgAt/+wALv/EAC//4gAw/8QAM//iADT/7AA1/+IANv/OAAkADAAAABUAAAAXAAAAGAAAABkAAAAa/+IAJf+wADMAAAA0AAAACQAV/7oAF/+/ABj/2AAZ/84AGv+mACX/sAAx/+IAM//YADT/2AAJABX/ugAX/78AGP/YABn/zgAa/6YAJf+wADH/9gAz/+wANP/YAAYAFQAAABgAAAAa/+IAIgAAACX/vwAzAAAACgAV/7oAF/+/ABj/2AAZ/84AGv+mACX/sAAm/+wAMf/2ADP/2AA0/9gAAQAl/7oABQAVAAAAGQAAABr/4gAl/9gAMwAAAAkAFf/EABf/7AAY//YAGf/YABr/zgAl/7AAMf/2ADP/7AA0/+IAAgAVAAAAJf+mAAUAGAAAABr/7AAl/+IALQAAADMAAAAKABr/zgAc/9gAHv/YAB//2AAg/9gAIv/YACX/ugAq/9gALP/YAC7/7AABACX/sAAIABX/ugAX/+wAGf/sABr/xAAl/7AAMf/2ADP/4gA0/+IACQAV/84AF//sABn/7AAa/8QAIgAAACX/sAAx//YAM//nADT/4gAKABX/vwAX/78AGP/YABn/zgAa/6YAJf+wACb/7AAx/+IAM//OADT/7AAKABX/ugAX/7oAGP/YABn/zgAa/6YAJf+wACb/7AAx/+IAM//YADT/7AAEABUAAAAa/+IAJf/iADMAAAANABn/7AAa/+wAHP/YAB7/2AAf/9gAIP/YACL/2AAl/7oAKv/YACz/2AAu//EAMQAAADMAAAAHABX/2AAX/+wAGf/YABr/xAAl/7oAMwAAADT/4gADABr/4gAl/84AMwAAAAQAFf/YABcAAAAa/8QAJf+6AAsAFf/sABr/4gAc/+IAHv/iAB//4gAg/+IAIv/iACMAAAAl/7oAKv/iACz/4gAKABX/7AAa/+IAHP/iAB7/4gAf/+IAIP/iACL/2AAl/8QAKv/iACz/4gARABX/2AAa/+IAHP/YAB0AAAAe/9gAH//YACD/2AAi/9gAIwAAACX/xAAoAAAAKv/OACsAAAAs/9gALgAAAC8AAAAw/+IACwAV/9gAGv/OABz/2AAe/9gAH//YACD/3QAi/9gAJf/EACr/2AAs/9gAMP/2AAMAFf/sABr/4gAl/7oAAwAV/9gAGv/OACX/ugABABX/7AABABX/7AABABX/7AACAI4ABAAAAK4AxAAEAAIAAP/EAAD/2AAA/+wAAP/iAAIAegAEAAAArACkAAgAAgAA/+IAAP/iAAD/4gAA/+wAAP/sAAD/7AAA/+IAAP/iAAIAAQA6AD4AAAACAAgAAwADAAAACAAIAAEADAANAAIAFQAVAAQAFwAaAAUAHAA2AAkAQgBDACQAWQBZACYAAQAEAAwADQAVABoAAQAIAB0AHgAgACMAKAApACoAKwACAAMADQANAAEAFQAVAAIAGgAaAAMAAQAyAAEAAQABAB4ADgABAAAAAgAAAAAAAwAAAAAAAAAAAAQABQAGAAcAAAABAAAACgAmAGQAAURGTFQACAAEAAAAAP//AAUAAAABAAIAAwAEAAVhYWx0ACBkbGlnACZmd2lkACxzYWx0ADJzczAxADgAAAABAAAAAAABAAEAAAABAAIAAAABAAMAAAABAAQABQAMABQAHAAkACwAAQAAAAEATAAEAAgAAQAgAAEAAAABACoAAQAAAAEAKAABAAAAAQAmAAEALgABAAgAAQAEADYAAgAvAAEAIgAKAAEAIgAOAAEAHAAOAAIAHAACAFIAUQABAAEANAABAAEARwABAAEARAABAAIARABHAAMCRwH0AAUACAKKAlgAAABLAooCWAAAAV4AMgE+AAAAAAYAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFVLV04AQAAg/wEC+P8QAMgDwADwAAAAAQAAAAACEgK8AAAAIAACAAAAAgAAAAMAAAAUAAMAAQAAABQABAGsAAAATgBAAAUADgAhACYALwA5AEAAWgBfAHoAewB+AKMApQCnAKkArgCxALcAvwDXAPcgFCAaIB4gIiAmIDAgOiBEIKwhIiGUIZkiEiIeIkgiYCJl/wH//wAAACAAIwAoADAAOgBBAFsAYQB7AH0AoQClAKcAqQCuALAAtwC/ANcA9yATIBggHCAiICYgMCA5IEQgrCEiIZAhliISIh4iSCJgImT/Af//AAAAAAAAAAcAAP/BAAD/u//aAAAAAP/E/9//3v/aAAD/lP+L/5X/duBHAAAAAOAq4CDgSuAq3/3fu99nAAAAAN5Z3lreLd4PAAABUAABAE4AUABWAAAAYgAAAGwAAAAAAHAAcgAAAAAAAAAAAG4AAAAAAAAAAAAAAGYAagAAAAAAAAAAAAAAAAAAAGAAaAAAAAAAAAAAAGYAAAAAAAEARwBOAGYAeQCFAFMAVABNAGoAQwBZAEIATwBEAEUAcQBuAHAASQCEAFcAUABYAHcAXABWAHYASABlAGgAigB0AGEAYgBdAF8AYABeAIEAewB9AH8AgwCCAHwAfgCAAHMAcgAKAF3/EAGaAvgAAwAPABUAGQAjACkANQA5AD0ASAD6QPdBASEBSwAWGBUVFnIAASQBBwIBB2cGAQIFAQMEAgNnAAQlAQoMBApnAAwLAQkIDAlnAAgmARENCBFnJwEUDg0UVxABDQAODw0OZwAPABITDxJnABMoGgIYFhMYZwAVABcZFRdoABkpARweGRxnAB4AHRseHWcAGyoBIx8bI2ciAR8AISAfIWcAIAAAIFcAICAAXwAAIABPPj42NioqJCQaGhAQBAQ+SD5IR0ZFRENCQD89PDs6Njk2OTg3KjUqNTQzMjEwLy4tLCskKSQpKCcmJRojGiMiISAfHh0cGxkYFxYQFRAVFBMSEQQPBA8REREREhEQKwYdKwUhESEHFTMVIxUzNSM1MzUHFTM1IzUHIzUzBxUzFSMVMzUzNQcVIxUzNQcVMzUzFSM1IxUzNQcVMzUHIzUzBxUzBxUzNSM3MzUBmv7DAT3yQUKmQkKmpkIiISFCQkJkQiGFpmQiIWQhpqamIWRkhUZGpmZGIPAD6EMhJSEhJSGBaCJGRiRhISUhRiE8QiJkejgXL1Bxca1xcVAvZyEvISEvIQACAB4AAAKwArwABwAKACxAKQoBBAIBTAAEAAABBABoAAICDk0FAwIBAQ8BTgAACQgABwAHERERBgcZKyEnIQcjATMBATMDAj9C/tRBcgEXYQEa/kbhcaysArz9RAENASUAAAAAAwBBAAACcQK8AA4AFwAgAERAQQYBBAMBTAcBAwAEBQMEZwACAgBfBgEAAA5NCAEFBQFfAAEBDwFOGBgPDwEAGCAYHx4cDxcPFhUTDQsADgEOCQcWKwEyFhUUBgcWFhUUBiMhEQA2NTQmIyMVMxI2NTQmIyMVMwGCY3MyKzo8dmj+rgFvPj0009FFQkU03+ECvGNUM1MWFls8VmYCvP7UNS0wOMr+0zgxLzfPAAEALf/xArUCygAdAC5AKxoZCwoEAgEBTAABAQBhAAAAFE0AAgIDYQQBAwMVA04AAAAdABwmJSYFBxkrBCYmNTQ2NjMyFhcHJiYjIgYGFRQWFjMyNjcXBgYjASafWlqfZGGcLVMcb0pCb0JCb0JFayVULp1gD2GoZ2SlYFtPNDRHQXZOUHpDQjc0TlsAAgBBAAACmQK8AAoAEwAtQCoAAgIAXwQBAAAOTQUBAwMBXwABAQ8BTgsLAQALEwsSEQ8JBwAKAQoGBxYrATIWFhUUBgYjIxEANjU0JiMjETMBLmylWlqlbO0BYoqKgnd3ArxXn2hon1cCvP2mh3V3hv4HAAABAEEAAAIuArwACwApQCYAAQACAwECZwAAAAVfAAUFDk0AAwMEXwAEBA8EThEREREREAYHHCsBIRUhFSEVIRUhESECLv58AW7+kgGE/hMB7QJbxGHUYgK8AAAAAAEAQQAAAi4CvAAJACNAIAABAAIDAQJnAAAABF8ABAQOTQADAw8DThEREREQBQcbKwEhFSEVIREjESECLv58AW7+kmkB7QJbzmH+1AK8AAAAAQAt//IC2ALKACEAMEAtEA8CBQIBTAAFAAQDBQRnAAICAWEAAQEUTQADAwBhAAAAFQBOERImJSYjBgccKwEUBgYjIiYmNTQ2NjMyFhcHJiYjIgYGFRQWFjMyNjcjNSEC2FSXYWOhW1uhY12RME8haEVDcEFDcEFachHhAU8BTWidVmKnY2OnYk5HOzE7RHlLSnlFaVNhAAABAEEAAAKSArwACwAhQB4AAQAEAwEEZwIBAAAOTQUBAwMPA04RERERERAGBxwrEzMRIREzESMRIREjQWkBf2lp/oFpArz+3AEk/UQBN/7JAAEAQQAAAKoCvAADABNAEAAAAA5NAAEBDwFOERACBxgrEzMRI0FpaQK8/UQAAQAe//MB7AK8AA8AJkAjAwICAAEBTAABAQ5NAAAAAmEDAQICFQJOAAAADwAOEyQEBxgrFiYnNxYzMjY1ETMRFAYGI7B1HVkiY0BHaUBtQw1BPjNMPToB7P4UR2QyAAAAAQBBAAACkAK8AAsAJkAjCgcCAQQAAQFMAgEBAQ5NBAMCAAAPAE4AAAALAAsSERMFBxkrIQMHFSMRMxEBMwEBAhbxe2lpAVh6/u8BJQFEh70CvP6TAW3+1P5wAAABAEEAAAH+ArwABQAZQBYAAAAOTQABAQJgAAICDwJOEREQAwcZKxMzESEVIUFpAVT+QwK8/aZiAAEAQQAAAx4CvAAMAChAJQoHAgMDAAFMAAMAAgADAoABAQAADk0EAQICDwJOEhIREhAFBxsrEzMTEzMRIxEDIwMRI0F77/l6ZtdszWcCvP4LAfX9RAIU/kYBuv3sAAAAAAEAQQAAApACvAAJAB5AGwcCAgIAAUwBAQAADk0DAQICDwJOEhESEAQHGisTMwERMxEjAREjQXMBc2lz/o1pArz96QIX/UQCFv3qAAACAC3/8QLjAsoADwAfACxAKQACAgBhAAAAFE0FAQMDAWEEAQEBFQFOEBAAABAfEB4YFgAPAA4mBgcXKwQmJjU0NjYzMhYWFRQGBiM+AjU0JiYjIgYGFRQWFjMBJZ5aWZ9kZJ5YWZ5jSmw5OGxLSm05OmxKD2GpZmelXV2kaGapYWRJekpMdkNDd0tJe0kAAAACAEEAAAJaArwACgATADJALwYBBAABAgQBZwADAwBfBQEAAA5NAAICDwJOCwsBAAsTCxIRDwkIBwUACgEKBwcWKwEyFhUUBiMjESMRADY1NCYjIxUzAWB2hIV1tmkBZEtKPb+/Arx0Z2Z3/vwCvP6pQTs9PvcAAAACAC3/8QLsAsoAEwAmAIpLsBBQWEAMGBUSAwUDAQEABQJMG0AMGBUSAwUDAQECBQJMWUuwEFBYQCAAAwQFBAMFgAAEBAFhAAEBFE0HAQUFAGIGAgIAABUAThtAJAADBAUEAwWAAAQEAWEAAQEUTQYBAgIPTQcBBQUAYgAAABUATllAFRQUAAAUJhQlHx0XFgATABMmIggHGCshJwYjIiYmNTQ2NjMyFhYVFAYHFyQ3JzMXNjU0JiYjIgYGFRQWFjMCcihTbmWfWFieZmSeWCwqX/7kNpB6VzE4bEtKbDo6bUkrOmKoZmikXV2kaEiAMWhVIp5fSGRLd0NEdktJe0kAAgBBAAACYgK8AA4AFwArQCgCAQEEAUwABAABAAQBZwAFBQNfAAMDDk0CAQAADwBOJCMhESETBgccKwAGBxMjAyMjESMRITIWFQUzMjY1NCYjIwJiRkF8em0IvmkBJneE/kjGPUpKPcYBmGMX/uIBDf7zArx1ZnM7OD0+AAEAL//1Al4CyAAnAC5AKxcWAwIEAAIBTAACAgFhAAEBFE0AAAADYQQBAwMVA04AAAAnACYlKyUFBxkrFiYnNxYWMzI2NTQmJyYmNTQ2NjMyFhcHJiYjIgYVFBYXFhYVFAYGI/WVMVApXEhEY19YfYBLfEhViyxQIlo+RmJWY2yRTX5IC0hCQzA1Ni4tMw8UV1lBYDM/QD4rLjowLCsQEmVXPl8zAAAAAAEAHgAAAl0CvAAHACFAHgIBAAADXwQBAwMOTQABAQ8BTgAAAAcABxEREQUHGSsBFSMRIxEjNQJd62nrArxh/aUCW2EAAQBB//ECjQK8ABUAIUAeAgEAAA5NAAEBA2EEAQMDFQNOAAAAFQAUFCQUBQcZKwQmJjURMxEUFhYzMjY2NREzERQGBiMBBoNCaSpTPD1YLGlEh18PToFMAbD+VzBWNjVWMQGp/lBLgU8AAAAAAQAeAAACsQK8AAYAG0AYAgECAAFMAQEAAA5NAAICDwJOERIQAwcZKxMzExMzASMecNrZcP7mXwK8/dECL/1EAAEAHgAAA9oCvAAMACFAHgoFAgMDAAFMAgECAAAOTQQBAwMPA04SERISEAUHGysTMxMTMxMTMwMjAwMjHm+YnHKgmG/Pb6KebwK8/csCNf3LAjX9RAIY/egAAAAAAQAeAAACvAK8AAsAH0AcCQYDAwIAAUwBAQAADk0DAQICDwJOEhISEQQHGisBATMTEzMBASMDAyMBK/79gsPEgf79AQ2Bzs2CAWUBV/7/AQH+qf6bAQ/+8QAAAAABAB4AAAKpArwACAAdQBoGAwADAgABTAEBAAAOTQACAg8CThISEQMHGSsBATMTEzMBESMBL/7vcdXVcP7vaQE5AYP+zwEx/n3+xwAAAQAoAAACPAK8AAkAKUAmBQEAAQABAwICTAAAAAFfAAEBDk0AAgIDXwADAw8DThESEREEBxorNwEhNSEVASEVISgBfv6OAgj+ggF8/e5aAfxmWv4FZwAAAAIAIP/yAlECIAAQACAAe0uwElBYQAoPAQQCAwEFBAJMG0AKDwEEAwMBBQQCTFlLsBJQWEAZAAQEAmEGAwICAhdNBwEFBQBhAQEAAA8AThtAIQYBAwMRTQAEBAJhAAICF00AAAAPTQcBBQUBYQABARUBTllAFBERAAARIBEfGRcAEAAQJiIRCAcZKwERIzUGIyImJjU0NjYzMhc1AjY2NTQmJiMiBgYVFBYWMwJRZ0p3SnlGRnlKeEl7US4uUDM2Uy4uUzYCEv3uU2FLgk9LfkleUP4/M1YzL1MyMlIuNFczAAAAAAIARP/0AnQCygASACIAkrYPCgIFBAFMS7AUUFhAHQACAhBNAAQEA2EGAQMDF00HAQUFAGEBAQAAFQBOG0uwL1BYQCEAAgIQTQAEBANhBgEDAxdNAAEBD00HAQUFAGEAAAAVAE4bQCEABAQDYQYBAwMXTQACAgFfAAEBD00HAQUFAGEAAAAVAE5ZWUAUExMAABMiEyEbGQASABEREyYIBxkrABYWFRQGBiMiJicVIxEzETY2MxI2NjU0JiYjIgYGFRQWFjMBtXlGR3tKPl8iZWUiYEAiUy4uUzYyUS4uUTICIUp+TE6BSjUsVQLK/vYsNf4wNFcyL1Q0NFYwMVU0AAABACD/8QIMAiAAHAAuQCsZGAsKBAIBAUwAAQEAYQAAABdNAAICA2EEAQMDFQNOAAAAHAAbJiQmBQcZKxYmJjU0NjYzMhYXByYjIgYGFRQWFjMyNjcXBgYj3nlFRXlLS3QiTzFgK0suMEwoMkMdUCN1Sw9Kgk9Nfkk+Oi9HLFE2OFUuJSIuOz8AAgAg//QCUALKABIAIgCSthEDAgUEAUxLsBRQWEAdBgEDAxBNAAQEAmEAAgIXTQcBBQUAYQEBAAAPAE4bS7AvUFhAIQYBAwMQTQAEBAJhAAICF00AAAAPTQcBBQUBYQABARUBThtAIQAEBAJhAAICF00GAQMDAF8AAAAPTQcBBQUBYQABARUBTllZQBQTEwAAEyITIRsZABIAEiYjEQgHGSsBESM1BgYjIiYmNTQ2NjMyFhcRAjY2NTQmJiMiBgYVFBYWMwJQZSJfPkp7R0Z5SkBgInxRLi5RMjZTLi5TNgLK/TZVLDVKgU5Mfko1LAEK/Yc0VTEwVjQ0VC8yVzQAAAIAIP/xAjQCIAAZACEAOEA1FhUCAgEBTAAFAAECBQFnAAQEAGEAAAAXTQACAgNhBgEDAxUDTgAAISAdGwAZABgjFSYHBxkrFiYmNTQ2NjMyFhYVFAcFHgIzMjY3FwYGIxImIyIGBgch4ntHSHxLU3U9BP5XCjVGIjRTGk8jfVGZVz8oSTMFAUoPS4FPTX5JRXpPEiYBKj0gJyAzOzoBf1AjQSoAAQAhAAABfgLaABIAWkAKEQEABhIBAQACTEuwL1BYQBwAAAAGYQAGBhZNBAECAgFfBQEBARFNAAMDDwNOG0AaAAYAAAEGAGkEAQICAV8FAQEBEU0AAwMPA05ZQAoiEREREREgBwcdKwAjIgczFSMRIxEjNTM2NjMyFxUBXhhTAYyMZG1tBExbJh8CgG5f/k0Bs19pXwVfAAACACD/AgJQAiAAIAAwAHlADBkLAgYFAwICAAECTEuwElBYQCIABQUCYQMBAgIXTQgBBgYBYQABARVNAAAABGEHAQQEGQROG0AmAAMDEU0ABQUCYQACAhdNCAEGBgFhAAEBFU0AAAAEYQcBBAQZBE5ZQBUhIQAAITAhLyknACAAHxMmJiUJBxorFiYnNxYWMzI2NjU1BgYjIiYmNTQ2NjMyFhc1MxEUBgYjEjY2NTQmJiMiBgYVFBYWM/OENkQgZDs2TyoiYT9KeUZGeUpAYSFlTX5GMFEuLlEyNlMuLlQ1/jVDTio6NFErQCw2S39MTYFKNS1U/flOeUIBTTVWMDFVNDRXMi9VNAABAEQAAAIeAsoAFQBQtQEBAgABTEuwL1BYQBcFAQQEEE0AAgIAYQAAABdNAwEBAQ8BThtAFwACAgBhAAAAF00FAQQEAV8DAQEBDwFOWUANAAAAFQAVFCMUIwYHGisTETY2MzIWFhURIxE0JiMiBgYVESMRphpbPDZbNmdGPCc/JWYCyv77KzA1XTj+qgEyO1AqRyr+3gLKAAIARAAAAK0C1wADAAcAPEuwJlBYQBUAAQEAXwAAABBNAAICEU0AAwMPA04bQBMAAAABAgABZwACAhFNAAMDDwNOWbYREREQBAcaKxMzFSMXMxEjRGlpAmVlAtdfZv3uAAIAPP8BASEC1wADAAwAT0uwJlBYQBsAAQEAXwAAABBNAAICEU0FAQQEA2IAAwMZA04bQBkAAAABAgABZwACAhFNBQEEBANiAAMDGQNOWUANBAQEDAQMEhQREAYHGisTMxUjAjY1ETMRFCM1umdnNDRm5ALXX/zqVlYCBP3j9GEAAQBEAAACNQK8AAsAKkAnCgcCAQQAAgFMAAEBDk0AAgIRTQQDAgAADwBOAAAACwALEhETBQcZKyEDBxUjETMRNzMHEwHCp3JlZf1/xtYBAHaKArz+Wf7N/roAAAABAEQAAACpAskAAwAoS7AvUFhACwAAABBNAAEBDwFOG0ALAAAAAV8AAQEPAU5ZtBEQAgcYKxMzESNEZWUCyf03AAAAAAEARAAAA2kCIQAiAGVLsBBQWLYGAQIDAAFMG7YGAQIDBwFMWUuwEFBYQBYFAQMDAGEIBwEDAAAXTQYEAgICDwJOG0AaCAEHBxFNBQEDAwBhAQEAABdNBgQCAgIPAk5ZQBAAAAAiACITIxMjFCQiCQcdKxMVNjMyFhc2NjMyFhYVESMRNCYjIgYVESMRNCYjIgYVESMRpjduMlQcGWY7NlkzZj49NklmPzs6RWYCEk1cNSspNzVdOf6qATI9TlVG/t4BMj1OWUL+3gISAAEARAAAAh4CIAAVAFpLsBJQWLUBAQIAAUwbtQEBAgQBTFlLsBJQWEATAAICAGEFBAIAABdNAwEBAQ8BThtAFwUBBAQRTQACAgBhAAAAF00DAQEBDwFOWUANAAAAFQAVFCMUIwYHGisTFTY2MzIWFhURIxE0JiMiBgYVESMRphpbPDZbNmdGPCc/JWYCEk0rMDVdOP6qATI7UCpHKv7eAhIAAAAAAgAg//ACQgIiAA8AHwAsQCkAAgIAYQAAABdNBQEDAwFhBAEBARUBThAQAAAQHxAeGBYADwAOJgYHFysWJiY1NDY2MzIWFhUUBgYjPgI1NCYmIyIGBhUUFhYz5X1ISH1MTH1ISH1MNU0oKE01NE4pKU40EEyDT0t/Skp+TE+DTF81WDMuUzMzUy4zWDUAAAAAAgBE/xACdAIfABIAIgBotg8KAgUEAUxLsBRQWEAdAAQEAmEGAwICAhFNBwEFBQBhAAAAFU0AAQETAU4bQCEAAgIRTQAEBANhBgEDAxdNBwEFBQBhAAAAFU0AAQETAU5ZQBQTEwAAEyITIRsZABIAERETJggHGSsAFhYVFAYGIyImJxEjETMVNjYzEjY2NTQmJiMiBgYVFBYWMwG1eUZGeUpAYCJlZSJgQCJTLi5TNjJRLi5RMgIfSYBOTIBKNSz+vQMCVCw1/jAzVTAzVjM0VDExVjQAAAAAAgAg/xACUAIgABIAIgBothEDAgUEAUxLsBJQWEAdAAQEAmEGAwICAhdNBwEFBQFhAAEBFU0AAAATAE4bQCEGAQMDEU0ABAQCYQACAhdNBwEFBQFhAAEBFU0AAAATAE5ZQBQTEwAAEyITIRsZABIAEiYjEQgHGSsBESMRBgYjIiYmNTQ2NjMyFhc1AjY2NTQmJiMiBgYVFBYWMwJQZSJgQEp5RkZ5SkBgInxRLi5RMjZTLi5TNgIS/P4BRSw1Sn5MTYFKNSxT/j80VTAxVTQ0VzIvVDMAAAAAAQBEAAABcQIhAAwAV0uwEFBYtQEBAQABTBu1AQEBAwFMWUuwEFBYQBIAAQEAYQQDAgAAF00AAgIPAk4bQBYEAQMDEU0AAQEAYQAAABdNAAICDwJOWUAMAAAADAAMFBETBQcZKxMVNjYzFSIGBhURIxGoGWpGPFoyZQISQSomXyE7Jv7AAhIAAAEAK//yAeMCHgAoAC5AKxcWAwIEAAIBTAACAgFhAAEBF00AAAADYQQBAwMVA04AAAAoACclLCQFBxkrFiYnNxYzMjY3NCYmJyYmNTQ2NjMyFhcHJiYjIgYVFBYWFxYWFRQGBiPPeylCSVkzQgEjOUNSXDlhOT1yI0AWSjA0RxxAQU9lPmQ3DjQxOUMjIxkcDgwORD82TicsMTYcICcmFhkRCw1JQTNLKAAAAAABAB7/9AGAApoAFAAyQC8TAQUBFAEABQJMCgkCAkoEAQEBAl8DAQICEU0ABQUAYQAAABUATiIRExETIAYHHCsEIyImNREjNTM1NxUzFSMRFDMyNxUBXyJeUHFxYo+PbAkaDFRaARRcah6IXP7sUwJZAAAAAAEARP/yAh4CEgAVAEy1EgEDAQFMS7ASUFhAEwIBAAARTQABAQNhBQQCAwMPA04bQBcCAQAAEU0AAwMPTQABAQRhBQEEBBUETllADQAAABUAFBEUIxQGBxorFiYmNREzERQWMzI2NjURMxEjNQYGI9VbNmVHPSZAJGdjGVs8DjVeOgFT/tE9UitJKwEf/e5NKjEAAAABABIAAAIbAhMABgAbQBgCAQIAAUwBAQAAEU0AAgIPAk4REhADBxkrEzMTEzMDIxJnnKBm2lgCE/5bAaX97QAAAQASAAADPwISAAwAIUAeCgUCAwMAAUwCAQIAABFNBAEDAw8DThIREhIQBQcbKxMzExMzExMzAyMDAyMSYIJ6dXuCX6d1ent1AhL+aAGY/mgBmP3uAZb+agAAAAABABIAAAIwAhIACwAfQBwJBgMDAgABTAEBAAARTQMBAgIPAk4SEhIRBAcaKxMnMxc3MwcTIycHI+rLb5OTbcnYb6ChbgET/7m5//7tzc0AAAEAEv8QAksCEgAHABtAGAMBAgABTAEBAAARTQACAhMCThESEQMHGSslAzMTEzMBIwEF82bAr2T+rWgcAfb+cgGO/P4AAQAoAAABuwISAAkAKUAmBQEAAQABAwICTAAAAAFfAAEBEU0AAgIDXwADAw8DThESEREEBxorNwEhNSEVASEVISgBFf70AYr+7AES/m9FAXZXRP6KWAAAAAEAEv8QA3UCmgAbADxAORACAgQDGxECBQQCTAYFAgBKBgEDAwBfAgECAAARTQAEBAVhAAUFFU0ABwcTB04REyMjERMSEAgHHisTMxMTMzU3FTMVIxEUFjMyNxUGIyImNREjASMTEmbAr5xjj48xOgoaISJfUGD+1Wh1AhL+cgGOah6IXP7sJywCWQRUWgEU/VoBDAACAB7/8gJOAsoADwAbACxAKQACAgBhAAAAFE0FAQMDAWEEAQEBFQFOEBAAABAbEBoWFAAPAA4mBgcXKxYmJjU0NjYzMhYWFRQGBiM2NjU0JiMiBhUUFjPff0JCf1dYfkJCflhRYGBRUV9fUQ5bpWxspVtbpWxspVtminx9iop9fIoAAAABABQAAAE5ArwABgAbQBgCAQADAQABTAAAAA5NAAEBDwFOERMCBxgrEwc1NzMRI9C8vGlpAlNJY0/9RAABABcAAAHvAsoAGgAqQCcLCgICABoBAwICTAAAAAFhAAEBFE0AAgIDXwADAw8DThEXJSYEBxorATY2NTQmJiMiBgcnNjYzMhYWFRQGBwchFSE1ARkwNB05KDBOE1che0o9akA9OqwBLv4sAUoxSigfNyM7KTNJTDNiQz5nOqxnSwAAAAABABT/8QIAArwAHQA+QDsUAQIDFQ8CAQIDAgIAAQNMAAECAAIBAIAAAgIDXwADAw5NAAAABGEFAQQEFQROAAAAHQAcERIlJQYHGisWJic3FhYzMjY1NCYmIyMnNyE1IRUHHgIVFAYGI7RwMEwaVjQ+VSVCKSMtqf7JAbidNVYxQ3NGDz9JQyo7TTwdOCQ9xWFUugc7WTNJbDoAAAABABQAAAI1ArwADgAsQCkCAQIBSwQBAgUBAAYCAGgAAQEOTQADAwZfAAYGDwZOERERERESEAcHHSslITUTMwMzNTMVMxUjFSMBdf6f7m3r8WlXV2mJYQHS/i64uGGJAAABABn/8gICArwAGwA2QDMDAgIAAQFMAAQAAQAEAWcAAwMCXwACAg5NAAAABWEGAQUFFQVOAAAAGwAaIRERJSUHBxsrFiYnNxYWMzI2NjU0JiMjEyEVIQczMhYVFAYGI7x3LFAZVjUtQCBNUcAbAYr+2gtebIhDcEIORkg/LDsrQiIvQgFkYZ9taEdvPwAAAAACABz/8gIKArwAFgAjADZAMwwBAwEBTAABAAMEAQNqAAAADk0GAQQEAmEFAQICFQJOFxcAABcjFyIeHAAWABUiGgcHGCsWJiY1NDY2NzY2NzMHNjMyFhYVFAYGIz4CNTQmIyIGFRQWM8lwPRYzQRBFH3miFRVJbTk/cUknQyhRQURKUjwOPGxELUZXYRlqMPcDQms9RGw8YiI/KTtNSz0+TAAAAAEACgAAAc4CvAAGAB9AHAQBAAEBTAAAAAFfAAEBDk0AAgIPAk4SERADBxkrASE1IRUDIwFY/rIBxO1sAlljVP2YAAAAAwAh//ICEgLKABkAJQAxAERAQRMFAgQDAUwHAQMABAUDBGkAAgIAYQAAABRNCAEFBQFhBgEBARUBTiYmGhoAACYxJjAsKholGiQgHgAZABgrCQcXKxYmNTQ2NyYmNTQ2NjMyFhYVFAYHFhYVFAYjEjY1NCYjIgYVFBYzEjY1NCYjIgYVFBYzpoU2LyQqPGY/P2Y8KiQvN4ZzM0ZENTRFRjM+U1M+PlNTPg5wYTRZHBpJLkFdLy9dQS5JGhxZNGFwAZ85MTQ7OzQxOf7DPjc3PT03Nz4AAAAAAgAaAAACCQLKABQAIQAvQCwUAQAEAUwFAQQAAAIEAGkAAwMBYQABARRNAAICDwJOFRUVIRUgJhgmIAYHGiskIyImJjU0NjYzMhYWFRQGBgcHIzc2NjU0JiMiBgYVFBYzAR4VSW05P3FJSXA9FzVEb3iiI0pSPCdCKFFA9UJsPERrPDxrRC1IWGiq+F5MPT5LIj4pO04AAAABADz/xAJ1AvgAAwARQA4AAAEAhQABAXYREAIHGCsBMwEjAgxp/jBpAvj8zAAAAAABADwAAACmAGUAAwATQBAAAAABXwABAQ8BThEQAgcYKzczFSM8amplZQAAAAEAPP+DAOEAgAADABhAFQAAAQEAVwAAAAFfAAEAAU8REAIHGCs3MwcjbnNSU4D9AAIAPAAAAKYBmgADAAcAHUAaAAAAAQIAAWcAAgIDXwADAw8DThERERAEBxorEzMVIxUzFSM8ampqagGaZdBlAAACADz/gwDhAZoAAwAHACJAHwAAAAECAAFnAAIDAwJXAAICA18AAwIDTxERERAEBxorEzMVIwczByNwamoCc1JTAZpltf0AAAABADwAAACmAGUAAwATQBAAAAABXwABAQ8BThEQAgcYKzczFSM8amplZQAAAAIAPAAAAL8CvAADAAcAH0AcAAEBAF8AAAAOTQACAgNfAAMDDwNOEREREAQHGisTMwMjBzMVIzyDFFoIamoCvP37UmUAAgA8AAAAvwK8AAMABwA+S7AqUFhAFQABAQBfAAAADk0AAgIRTQADAw8DThtAFQABAQBfAAAADk0AAgIDXwADAw8DTlm2EREREAQHGisTMxUjFzMTI0lqaghaFIMCvGVR/foAAAIAPAAAAfYCygAbAB8AL0AsDQwCAgABTAACAAMAAgOAAAAAAWEAAQEUTQADAwRfAAQEDwROEREaJCgFBxsrPgI3NjY1NCYjIgYHJzYzMhYWFRQGBgcGBhUjBzMVI9MdKCMqKjs6MksWS1GSOmI7HSkjKihoAWpq6z0uIig6ITA8OSc8hzBcPiQ/MSMqOB9jZQAAAAACADz/8gH2ArwAAwAfADVAMh0cAgMCAUwAAgEDAQIDgAABAQBfAAAADk0AAwMEYgUBBAQVBE4EBAQfBB4pGxEQBgcaKxMzFSMCJiY1NDY2NzY2NTMUBgYHBgYVFBYzMjY3FwYj9mpqHWI7HSkjKihoHSgjKio8OTJLFktRkgK8Zf2bMFw+JD8xIyo4HyM9LiIoOiEwPDknPIcAAAABADwA/QCmAWIAAwAYQBUAAAEBAFcAAAABXwABAAFPERACBxgrEzMVIzxqagFiZQABADwA3gDCAWAAAwAYQBUAAAEBAFcAAAABXwABAAFPERACBxgrEzMVIzyGhgFgggABAEIBWwG1ArwADgAcQBkODQoJCAcGBQQDAgEMAEkAAAAOAE4bAQcXKwEHFwcnByc3JzcXJzMHNwG1gFJBSktBUoAYfgVQBH0CGCVpL25uL2klTC2FhS0AAgA8AAACtwK8ABsAHwBJQEYQDwcDAQYEAgIDAQJnDAEKCg5NDggCAAAJXw0LAgkJEU0FAQMDDwNOHBwcHxwfHh0bGhkYFxYVFBMSEREREREREREQEQcfKwEjBzMHIwcjNyMHIzcjNzM3IzczNzMHMzczBzMBNyMHAqJ6JnsVeyZhJn4mYSZxFXEmchVyJmEmfiZhJnr+6iZ+JgG1rF2srKysXaxdqqqqqv73rKwAAAABADz/xAFdAvgAAwARQA4AAAEAhQABAXYREAIHGCsTMwMj9Gm4aQL4/MwAAAEAPP/EAV0C+AADABFADgAAAQCFAAEBdhEQAgcYKxMzEyM8abhpAvj8zAAAAgA8AAAAvwK8AAMABwAfQBwAAQEAXwAAAA5NAAICA18AAwMPA04REREQBAcaKxMzAyMHMxUjPIMUWghqagK8/ftSZQACADwAeACmAhIAAwAHABxAGQACAAMCA2MAAQEAXwAAABEBThERERAEBxorEzMVIxUzFSM8ampqagISZdBlAAAAAQA8/8UBAgL4AAkAGEAVAAABAQBXAAAAAV8AAQABTxQTAgcYKzY1NDczBhUUFyM8ZGJkZGKN0dLIxdXRyAAAAAEAPP/FAQIC+AAJABhAFQAAAQEAVwAAAAFfAAEAAU8UEwIHGCs2NTQnMxYVFAcjoGRiZGRijdHUxsjS0cgAAAABADz/xAEpAvwAIgA+QDsJAQIEGQEBAiEBBQEiAQAFBEwAAwAEAgMEaQACAAEFAgFpAAUAAAVZAAUFAGEAAAUAURoxFBIVIAYHHCsEIyImNTU0Jgc1FzI1NTQ2FxUmIyIGFRUUBxYVFRQWMzI3FQEhD1A/JCMNOkpcBwwbGjIyGBgGEjxOVI4mHAJWAT+JWVIGWgEaIJFXHR5Wmh4ZAlYAAQA8/78BKQL3ACIAOkA3EAEBAhkHAgMBIgEAAwNMAAMBAAEDAIAAAgABAwIBaQAABAQAWQAAAARhAAQABFEVFyMqIAUHGys2MzI2NTU0NyY1NTQmIyIHNTYzMhYVFRQWNxUmBhUVFAYnNUwGGhgzMxkbDQcIEE5AJCMjJEldFxofmlUfHVeRHxkBXAFSVIklHANWAhwmjllOBlQAAQA8/8MBAgL4AAcAIkAfAAAAAQIAAWcAAgMDAlcAAgIDXwADAgNPEREREAQHGisTMxUjETMVIzzGXV3GAvhd/X9XAAABADz/wwECAvgABwAiQB8AAgABAAIBZwAAAwMAVwAAAANfAAMAA08REREQBAcaKzczESM1MxEjPF5exsYaAoFd/MsAAAEAPAD4AbMBWQADABhAFQAAAQEAVwAAAAFfAAEAAU8REAIHGCsTIRUhPAF3/okBWWEAAAABAEEBFgJTAXgAAwAYQBUAAAEBAFcAAAABXwABAAFPERACBxgrEyEVIUECEv3uAXhiAAAAAQA8APgC2gFaAAMAGEAVAAABAQBXAAAAAV8AAQABTxEQAgcYKxMhFSE8Ap79YgFaYgAAAAEAQQAAAlMAZAADACCxBmREQBUAAAEBAFcAAAABXwABAAFPERACBxgrsQYARDchFSFBAhL97mRkAAAA//8APP+DAOEAgAACAEMAAAABADz/gwDhAIAAAwAYQBUAAAEBAFcAAAABXwABAAFPERACBxgrNzMHI25zUlOA/QACADwBtAGRAsoAAwAHADRLsC9QWEANAwEBAQBfAgEAABABThtAEwIBAAEBAFcCAQAAAV8DAQEAAU9ZthERERAEBxorEzMDIwEzAyOPUDJxAQVQMnACyv7qARb+6gAAAAACADwBtAGRAsoAAwAHADRLsC9QWEANAwEBAQBfAgEAABABThtAEwIBAAEBAFcCAQAAAV8DAQEAAU9ZthERERAEBxorEzMDIxMzAyNucVNQ5XBSUALK/uoBFv7qAAEARgG0AOkCygADAC1LsC9QWEALAAEBAF8AAAAQAU4bQBAAAAEBAFcAAAABXwABAAFPWbQREAIHGCsTMwMjmVAycQLK/uoAAAEARgG0AOkCygADAC1LsC9QWEALAAEBAF8AAAAQAU4bQBAAAAEBAFcAAAABXwABAAFPWbQREAIHGCsTMwMjeHFTUALK/uoAAAEAPACCARMCEgAFABlAFgMBAQABTAABAQBfAAAAEQFOEhECBxgrEzczBxcjPG5pbm5pAUfLy8UAAQA8AIIBEwISAAUAGUAWAwEBAAFMAAEBAF8AAAARAU4SEQIHGCsTJzMXByOqbmlubmkBR8vLxQABADz/uQIoAl0AIgA1QDIQDQICASIhFBMEAwIFAgIAAwNMAAEAAgMBAmkAAwAAA1kAAwMAXwAAAwBPJiYaEwQHGiskBgcVIzUuAjU0NjY3NTMVFhYXByYjIgYGFRQWFjMyNjcXAgtePVdAZTg4ZUBXPF4cTzFgK0suMEwoMkQcUDk+Bzs8Ck54R0V0TQpBQAg7Mi9HLFE2OFUuJSIuAAAAAwAy/8MCYgL4ACAAJwAuAC5AKy4tJCMdHBoZFxQODQoJBgMQAAEBTAABAAABVwABAQBfAAABAE8WFRQCBxcrJAYGBxUjNSYmJzcWFhc1JiY1NDY3NTMVFhcHJicVFhYVABYXNQYGFQA2NTQmJxUCYj5pP1xJeypRIUg0ZHl9YFyVTVE5WGWB/ko4PDRAAQVFOz+NVzYINTUJRTlDJzIJ1RFYVlZuDTMyD24+SgzSFWNSAREpDb8JNib+bzImJC4QwwAAAAEAPP/yAroCygAyAElARhgXAgQGMgELAQJMBwEECAEDAgQDZwkBAgoBAQsCAWcABgYFYQAFBRRNAAsLAGEAAAAVAE4wLiopKCcRFCUjERMRIyEMBx8rJQYjIiYnJjUjNTMmNTcjNTM3NjYzMhYXByYmIyIGBwYHIRUhBhUUFyEVIRYXFhYzMjY3ArpNo3ehHQJXTQIBTFYDHaF3RYUkTxtPNUljFwYCAST+zwECATD+3gQDGmlAOFEVa3l2bwoESyAQIksNdnpHNzIlLEU+EglLDBgfD0sSCT07LB4AAAAAAQA8AAACNwLJABgAP0A8CgEDAgsBAQMCTAQBAQUBAAYBAGcAAwMCYQACAhRNCQgCBgYHXwAHBw8HTgAAABgAGBERERIjIxERCgceKzc1IzUzNTQ2MzIXFSYjIhUVMxUjFSEVITWWWlp4bWY0T0t89vYBOP4FYdZUJYqPGmYevR9U1mFhAAAAAAEAKAAAAmoCvQAXAD5AOwcBAQIAAVgGAQIFAQMEAgNnDAsCCQkOTQoIAgAABGAABAQPBE4AAAAXABcWFRQTERERERERERERDQcfKwEDMxUjFTMVIxUjNSM1MzUjNTMDMxMzEwJqs3KsrKxpra2tdLNpswqzAr3+w0tTS5eXS1NLAT3+wwE9AAABADwAMgJiAlgACwAsQCkABAMBBFcGBQIDAgEAAQMAZwAEBAFfAAEEAU8AAAALAAsREREREQcHGysBFSMVIzUjNTM1MxUCYuFk4eFkAXdh5ORh4eEAAAAAAQA8ARYCYgF3AAMAGEAVAAABAQBXAAAAAV8AAQABTxEQAgYYKxMhFSE8Aib92gF3YQAAAAEAPABfAgkCKwALAAazCQMBMis3Nyc3FzcXBxcHJwc8n59Hn59In55Hnp+mn59Hn59Hn59Hn58AAwBGAC8CbAJcAAMABwALACxAKQAAAAECAAFnAAIAAwQCA2cABAUFBFcABAQFXwAFBAVPEREREREQBgccKwEzFSMHIRUhFzMVIwEnZGThAib92uFkZAJcX4ZhiF8AAAAAAgA8AKACTgHlAAMABwAiQB8AAAABAgABZwACAwMCVwACAgNfAAMCA08REREQBAcaKxMhFSEVIRUhPAIS/e4CEv3uAeVkfWQAAQA8AFACTgIuABMAnUuwEFBYQCkACAcHCHAAAwICA3EJAQcGAQABBwBoBQEBAgIBVwUBAQECXwQBAgECTxtLsBJQWEAoAAgHBwhwAAMCA4YJAQcGAQABBwBoBQEBAgIBVwUBAQECXwQBAgECTxtAJwAIBwiFAAMCA4YJAQcGAQABBwBoBQEBAgIBVwUBAQECXwQBAgECT1lZQA4TEhEREREREREREAoGHysBIwczFSEHIzcjNTM3ITUhNzMHMwJOr0z7/sgxZDF2s0z/AQE8LWQtcgGBfWRQUGR9ZElJAAABADwAUAHnAkgABgAGswYDATIrNyUlNQUVBTwBS/61Aav+VbWXmGTJZcoAAAEAPABQAecCSAAGAAazBgIBMisTNSUVBQUVPAGr/rYBSgEaZclkmJdlAAAAAgA8AAACEAJFAAYACgAiQB8GBQQDAgEABwBKAAABAQBXAAAAAV8AAQABTxEXAgYYKxMlJTUFFQUHIRUhPQF3/okB0/4tAQHU/iwBIGVrVYN5hGZfAAAAAAIAPAAAAhACRQAGAAoAIkAfBgUEAwIBAAcASgAAAQEAVwAAAAFfAAEAAU8RFwIGGCsTNSUVBQUVBSEVIT0B0/6IAXj+LAHU/iwBSXmDVWtlW2ZfAAIAPAAAAg8CSwALAA8AMUAuBAEAAwEBAgABZwAFAAIGBQJnAAYGB18IAQcHDwdODAwMDwwPEhEREREREAkHHSsBMxUjFSM1IzUzNTMBNSEVAVe4uGK5uWL+5QHTAa1an59anv21WloAAgA8AHMCQgHuABUAKwBSQE8VCgIDARQBAgMfAQQCKyACBwUqAQYHBUwJAQBKAAAAAwIAA2kAAQACBAECaQAFBwYFWQAEAAcGBAdpAAUFBmEABgUGUSQjJCMkIyQgCAYeKxIzMhYXFhYzMjcXBiMiJicmJiMiBycWMzIWFxYWMzI3FwYjIiYnJiYjIgcneFwiNSMgIhUxODRBYiM3IRslFS0xNTxcIjUjICIVMTg0QWIjNyEbJRUtMTUB6A4ODAo4Qk8PDQsKMEKiDg4MCjhCTw8NCwowQgAAAQA8AP0CQgGOABUAObEGZERALhUKAgMBFAECAwJMCQEASgABAwIBWQAAAAMCAANpAAEBAmEAAgECUSQjJCAEBxorsQYARBIzMhYXFhYzMjcXBiMiJicmJiMiByd4XCI1IyAiFTE4NEFiIzchGyUVLTE1AYgODgwKOEJPDw0LCjBCAAAAAQBBAZoB6gLJAAYAIbEGZERAFgQBAQABTAAAAQCFAgEBAXYSERADBxkrsQYARBMzEyMnByPiap5gdHRhAsn+0d7eAAADAEAAbQN5AgwAHwAtADsASkBHNyMbCwQFBAFMAQEABgEEBQAEaQoHCQMFAgIFWQoHCQMFBQJhCAMCAgUCUS4uICAAAC47Ljo0MiAtICwoJgAfAB4mJiYLBhkrNiYmNTQ2NjMyFhYXPgIzMhYWFRQGBiMiJiYnDgIjPgI3LgIjIgYVFBYzIDY1NCYjIgYGBxcWFjPTXDc3XDYoQzYzMTdDKDZcNzdcNihDOS8xN0MpFikpMS4rKhcuPD0tAdY+PS4XKSkxETY1Hm00Xzw9XzQjMzc1NSM0Xz08XzQiNjU2NSJYGCo1MywYQTY2QUI1NkEYKTYSOyoAAAUAPf/yA0kCygAPABMAHwAvADsAkkuwElBYQCsLAQUKAQEGBQFpAAYACAkGCGoABAQAYQIBAAAUTQ0BCQkDYQwHAgMDDwNOG0AzCwEFCgEBBgUBaQAGAAgJBghqAAICDk0ABAQAYQAAABRNAAMDD00NAQkJB2EMAQcHFQdOWUAmMDAgIBQUAAAwOzA6NjQgLyAuKCYUHxQeGhgTEhEQAA8ADiYOBxcrEiYmNTQ2NjMyFhYVFAYGIwEzASMSNjU0JiMiBhUUFjMAJiY1NDY2MzIWFhUUBgYjNjY1NCYjIgYVFBYzu1AuLlAxMU8uLk8xAZlp/hlpeTExKywyMiwBflAuLlAxMU8uLk8xKzExKywyMiwBZC9TMzBRMC9SMDNTLwFY/UQBsz4qJTw8JSo+/j8vUzMwUTAvUjAzUy9PPiolPDwlKj4AAAAHADz/8gTNAsoADwATAB8ALwA/AEsAVwCuS7ASUFhAMQ8BBQ4BAQYFAWkIAQYMAQoLBgpqAAQEAGECAQAAFE0TDRIDCwsDYREJEAcEAwMPA04bQDkPAQUOAQEGBQFpCAEGDAEKCwYKagACAg5NAAQEAGEAAAAUTQADAw9NEw0SAwsLB2ERCRADBwcVB05ZQDZMTEBAMDAgIBQUAABMV0xWUlBAS0BKRkQwPzA+ODYgLyAuKCYUHxQeGhgTEhEQAA8ADiYUBxcrEiYmNTQ2NjMyFhYVFAYGIwEzASMSNjU0JiMiBhUUFjMAJiY1NDY2MzIWFhUUBgYjICYmNTQ2NjMyFhYVFAYGIyQ2NTQmIyIGFRQWMyA2NTQmIyIGFRQWM7pQLi5QMTFQLS1QMQGaaf4ZaXkxMSsrMzIsAX5QLi5QMTFPLi5PMQFTUC4uUDExTy4uTzH+pzExKywyMiwBsDAwKywzMi0BZC9TMzBRMC9RMTNTLwFY/UQBsz4pJT09JSk+/j8vUzMwUTAvUjAzUy8vUzMwUTAvUjAzUy9PPiolPDwlKj4+KiY7PCUqPgAAAAABADwAAALGAyEACAAVQBIGBQQDAgEABwBKAAAAdhcBBhcrAQcnAQEHJxEjAVDPRQFFAUVFz2ICZs9FAUX+vEXQ/ZgAAAEAPABTApYCrAAIAClAJgIBAAEBTAQDAgBJAAABAIYAAgEBAlcAAgIBXwABAgFPERQQAwYZKyUjEwEnASE1IQKWYgH+TEUBsv7cAcvhASb+TEUBsmIAAAABADwAOwNdAsUACAAiQB8IBwIBSgIBAgBJAAEAAAFXAAEBAF8AAAEATxETAgYYKwEBJzchNSEnNwNd/rxF0P2YAmbPRQGA/rtFz2LPRQAAAAEAPABjApUCvgAIAClAJggBAgABTAcGAgBKAAACAIUAAgEBAlcAAgIBXwABAgFPEREQAwYZKwEzEQU1BQE3AQIzYv41ASb+TEUBsgIw/jQBYwEBtEX+TQABADz/5ALGAwYACAAUQBEIBQQDAgEGAEkAAAB2FgEGFysBFwEBNxcRMxECgkT+u/67Rs9iAW5F/rsBRUbQAmf9mQAAAAEAPABgApcCuAAIAChAJQcBAAIBTAgBAkoAAgAChQAAAQEAVwAAAAFfAAEAAU8REREDBhkrAQEhFSEDMwMBApf+TAEm/jQBYwEBtAJz/k5hAcv+2QG0AAABADwAQQNdAssACAAvQCwFAQABAUwHBgIBSgQDAgBJAgEBAAABVwIBAQEAXwAAAQBPAAAACAAIEQMGFysBFSEXBwEBFwcDXf2az0X+uwFERtABt2LPRQFFAUVFzwAAAAABADwATgKVAqgACAApQCYAAQACAUwIBwIASQAAAgCGAAECAgFXAAEBAl8AAgECTxEREQMGGSsTESMRJRUlAQeeYgHL/toBtEUCAP7cAcsBYgH+TEUAAAAAAQA8AEEEmwLLAA0ALEApBwEBAAFMBgUCAQQASg0MCQgEAUkAAAEBAFcAAAABXwABAAFPFhMCBhgrEwEXByEnNwEBJzchFwc8AURG0QLt0EUBRP67Rc/9F89FAYYBRUXPz0X+u/67Rc/PRQAAAgA+/2oDagKPADgARQD5S7AUUFhAEh4BCQMRAQUJNQEHATYBCAcETBtAEh4BCQQRAQUJNQEHATYBCAcETFlLsBRQWEAtAAAABgMABmkEAQMACQUDCWkMCgIFAgEBBwUBaQAHCAgHWQAHBwhiCwEIBwhSG0uwLVBYQDQABAMJAwQJgAAAAAYDAAZpAAMACQUDCWkMCgIFAgEBBwUBaQAHCAgHWQAHBwhiCwEIBwhSG0A5AAQDCQMECYAAAAAGAwAGaQADAAkFAwlpAAUKAQVZDAEKAgEBBwoBaQAHCAgHWQAHBwhiCwEIBwhSWVlAGTk5AAA5RTlEQD4AOAA3JiUjEiYkJSYNBx4rBCYmNTQ2NjMyFhYVFAYjIiYnBgYjIiYmNTQ2NjMyFzUzFRQWMzI2NTQmJiMiBgYVFBYWMzI3FwYjEjY2NTQmIyIGBxQWMwFeuGhnuXd1uWdbUCw7DRdHMDRXMjJXNFQyShkdJClRj1tbj1FQjlpsWzFsjBw3H0Q0N0cBRziWaLh0c7ZoY69tYngvISQrNls3NlkzQDTlKyJGR1iITFGQXV6TUTxBTQEUIzsiM0lIMjZMAAAAAwA8//ICxgLIAB0AKQAzAGZADy0sKRoXFhUUEwUKBAMBTEuwElBYQBgAAwMAYQAAABRNBgEEBAFhBQICAQEPAU4bQBwAAwMAYQAAABRNAAEBD00GAQQEAmEFAQICFQJOWUATKioAACozKjIkIgAdABwbKwcHGCsWJjU0NjcmJjU0NjYzMhYWFRQGBxc3FwcXIycGBiMSNjU0JiMiBhUUFhcSNjcnBgYVFBYzrXFGPDMsMFg4N1cwSEKKZ0twp4hdLWRBNjIwKCkwHy4tPSKdLTA+Mw5iVDxeLTNOMC9NLCpLLzVUMIt5MoahWTA3Adk3HyMqLSUbLS3+pCYnnCNAJSs2AAACADz/vwIEAvMAMQA+AEVAQiEgFwMFAzEJCAMBBAJMAAUDBAMFBIAABAEDBAF+AAIAAwUCA2kAAQAAAVkAAQEAYgAAAQBSPDo1NCUjHhwkJAYHGCskFRQGBiMiJic3FjMyNjc0JiYnJiY1NDcmNTQ2NjMyFhcHJiYjIgYVFBYWFxYWFRQGByQWFxY2NTQmJxUiBhUCBEFnOD5/K0ZKWzRGASM7R1ZdQUE7ZDw/dSRCF0wxNkkeOzljZyYh/uszPTpQNkU2SbdMNU4pNTM8RiUjGhwPDRBGQVMxJ0o4UCgtMzkdISgmFhoQChNKQyhAGFgcCwMnKB8aDgEoJgADADz/8wMcAscADwAfADsAXrEGZERAUzg3KyoEBgUBTAAAAAIEAAJpAAQABQYEBWkABgoBBwMGB2kJAQMBAQNZCQEDAwFhCAEBAwFRICAQEAAAIDsgOjUzLiwoJhAfEB4YFgAPAA4mCwcXK7EGAEQEJiY1NDY2MzIWFhUUBgYjPgI1NCYmIyIGBhUUFhYzLgI1NDY2MzIWFwcmIyIGFRQWFjMyNjcXBgYjAUipY2OpZGSpY2OpZE6DTEyDTk2DTEyDTS9RLy9RMzJNFzcgPy0/HzIbISoVNxdOMg1ip2JipWJipWJip2JRS4FOToFKS4FNToFLXjJXNTNVMSomIi4/NiY4HRcXICcqAAAABAA8AVgBzALiAA8AHwAtADYAY7EGZERAWCEBBQgBTAYBBAUDBQQDgAoBAQACBwECaQAHAAkIBwlpAAgABQQIBWcLAQMAAANZCwEDAwBhAAADAFEQEAAANjQwLispKCcmJCMiEB8QHhgWAA8ADiYMBxcrsQYARAAWFhUUBgYjIiYmNTQ2NjMSNjY1NCYmIyIGBhUUFhYzNgcXIycjIxUjNTMyFhUHMzI2NTQmIyMBOlw2Nlw3Nls2NVw2KUYpKUYpKEQpKUQoUB4dJBkDKSRNHiNqKg4QEQ0qAuI1WjY1WzU1WzU2WjX+pilEKClEKChEKShEKY8NQjs7rR4cGAwMDQ0AAAACADwBowJqArwABwAUAEZAQxQPDAMGAAFMAAYAAQAGAYAHBQIBAYQIBAkDAwAAA1cIBAkDAwMAXwIBAAMATwAAExIREA4NCwoJCAAHAAcREREKBhkrARUjFSM1IzUhMxEjNQcjJxUjETMXASJYNFoB8jw1STFFNDxWArwx6Ogx/ufAn5/AARm9AAAAAAIAPAFYAcwC4gAPAB0AOLEGZERALQAAAAIDAAJpBQEDAQEDWQUBAwMBYQQBAQMBURAQAAAQHRAcFxUADwAOJgYHFyuxBgBEEiYmNTQ2NjMyFhYVFAYGIz4CNTQmIyIGFRQWFjPNWzY1XDY3XDY2XDchNyFHMjBGIDcfAVg1WzU2WjU1WjY1WzVOITYgMUZGMR83IQABAAAAAQAAXf9euF8PPPUABwPoAAAAANv3jIAAAAAA3EK8WwAK/wEEzQMhAAAABwACAAAAAAAAAAEAAAPA/xAAAAUJAAAAEgTNAAEAAAAAAAAAAAAAAAAAAACLAfQAXQEYAAACzgAeApQAQQLdAC0CxgBBAlYAQQJWAEEDBQAtAtMAQQDrAEECLQAeArMAQQISAEEDXwBBAtEAQQMQAC0ChwBBAxwALQKUAEECkQAvAnsAHgLOAEECzwAeA/gAHgLaAB4CxwAeAmQAKAKUACAClABEAi0AIAKUACACVQAgAZ4AIQKUACACVwBEAPEARAFlADwCRwBEAO0ARAOjAEQCVwBEAmEAIAKUAEQClAAgAY0ARAINACsBngAeAmEARAItABIDUQASAkIAEgJdABIB4wAoA5MAEgJsAB4BiQAUAg0AFwIeABQCUwAUAiAAGQItABwB4gAKAjIAIQItABoCsQA8AOIAPAE7ADwA4gA8AR0APADiADwA+wA8APsAPAIyADwCMgA8AOIAPAD+ADwB9ABCAvMAPAGZADwBmQA8APsAPADiADwBPgA8AT4APAFlADwBZQA8AT4APAE+ADwB7wA8ApQAQQMWADwClABBATsAPAE7ADwBzQA8Ac0APAEvAEYBLwBGAU8APAFPADwCZAA8AncAMgLxADwCewA8ApIAKAKeADwCngA8AkQAPAKyAEYCigA8AooAPAIjADwCIwA8AkwAPAJMADwCSwA8An4APAJ+ADwCKwBBA7gAQAOFAD0FCQA8AwIAPALSADwDmQA8AtEAPAMCADwC0wA8A5kAPALRADwE9QA8A6gAPgMGADwCQAA8A1gAPAIIADwCpgA8AggAPAAAAN4A3gEQAWYBrAHmAhQCPAKIArACxgL2AyQDQANwA5YD3gQaBJoE2AUsBU4FhAWkBdIGAAYmBlIGxAdEB4gICAhaCKYJKgl2CaYJ5goUCjYKnAruCzYLogwODFIMqAziDSwNTA16DaINxA3wDjoOfA6aDtwPKg9aD6IP9BAWEIIQzhDmEPwRFBE0EVgRbhGQEcISDBJaEnISihK2Ew4TJBM6E1wTfBOcE7wUDBRaFHwUnhS4FNIU7BUKFRIVKhVaFYgVrBXQFewWCBZYFroXKhduF7IX3hf4GBQYRBhoGNgY7hkEGTAZWhmOGfoaPBpeGtobfhxWHHgcpBzMHPgdGh1GHXYdoh3YHrYfOB+2IDwgviEEIU4AAQAAAIsAWAAKAAQAAQACAFYAmQCNAAABCw4VAAEAAQAAABYBDgABAAAAAAAAADgAAAABAAAAAAABAAkAOAABAAAAAAACAAYAQQABAAAAAAADABoARwABAAAAAAAEABAAYQABAAAAAAAFAA0AcQABAAAAAAAGAA8AfgABAAAAAAAIABEAjQABAAAAAAAJAAoAngABAAAAAAALABkAqAADAAEECQAAAHAAwQADAAEECQABACABMQADAAEECQACAA4BUQADAAEECQADADQBXwADAAEECQAEACABkwADAAEECQAFABoBswADAAEECQAGAB4BzQADAAEECQAIACIB6wADAAEECQAJABQCDQADAAEECQALADICIQADAAEECQAQABICUwADAAEECQARAAwCZUNvcHlyaWdodCCpIDIwMjAgQnl0ZURhbmNlIEdJUCBVRUQuIEFsbCByaWdodHMgcmVzZXJ2ZWQuQnl0ZSBTYW5zTWVkaXVtMS4wMDA7VUtXTjtCeXRlU2Fucy1NZWRpdW1CeXRlIFNhbnMgTWVkaXVtVmVyc2lvbiAxLjAwMEJ5dGVTYW5zLU1lZGl1bUJ5dGVEYW5jZSBHSVAgVUVEU29uZ3lpIExpdWh0dHBzOi8vd3d3LmJ5dGVkYW5jZS5jb20AQwBvAHAAeQByAGkAZwBoAHQAIACpACAAMgAwADIAMAAgAEIAeQB0AGUARABhAG4AYwBlACAARwBJAFAAIABVAEUARAAuACAAQQBsAGwAIAByAGkAZwBoAHQAcwAgAHIAZQBzAGUAcgB2AGUAZAAuAEIAeQB0AGUAIABTAGEAbgBzACAATQBlAGQAaQB1AG0AUgBlAGcAdQBsAGEAcgAxAC4AMAAwADAAOwBVAEsAVwBOADsAQgB5AHQAZQBTAGEAbgBzAC0ATQBlAGQAaQB1AG0AQgB5AHQAZQAgAFMAYQBuAHMAIABNAGUAZABpAHUAbQBWAGUAcgBzAGkAbwBuACAAMQAuADAAMAAwAEIAeQB0AGUAUwBhAG4AcwAtAE0AZQBkAGkAdQBtAEIAeQB0AGUARABhAG4AYwBlACAARwBJAFAAIABVAEUARABTAG8AbgBnAHkAaQAgAEwAaQB1AGgAdAB0AHAAcwA6AC8ALwB3AHcAdwAuAGIAeQB0AGUAZABhAG4AYwBlAC4AYwBvAG0AQgB5AHQAZQAgAFMAYQBuAHMATQBlAGQAaQB1AG0AAAIAAAAAAAD/tQAyAAAAAAAAAAAAAAAAAAAAAAAAAAAAiwAAAAMAJAAlACYAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwA0ADUANgA3ADgAOQA6ADsAPAA9AEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBbAFwAXQECABMAFAAVABYAFwAYABkAGgAbABwAvAARAA8AHQAeAKsABACjACIAogDDAIcADQAGABIAPwEDAQQACwAMAF4AYAA+AEAAEACyALMAQgDEAMUAtAC1ALYAtwC+AL8AhAAHAQUAhQCWAA4A7wDwALgAIACPACEAHwCVAJQAkwCnAGEAQQCSAAgAxgEGAQcBCAEJAQoBCwEMAQ0BDgAjAAkAhgCLAIoAjACDA3lfdAd1bmlGRjAxCmNvbG9uLnNzMDEERXVybwdhcnJvd3VwB3VuaTIxOTcKYXJyb3dyaWdodAd1bmkyMTk4CWFycm93ZG93bgd1bmkyMTk5CWFycm93bGVmdAd1bmkyMTk2CWFycm93Ym90aAAAAAABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAZgBmAF8AXwK8AAACygISAAD/EALK//EC2gIg//H/ArAALCCwAFVYRVkgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbkIAAgAY2MjYhshIbAAWbAAQyNEsgABAENgQi2wASywIGBmLbACLCMhIyEtsAMsIGSzAxQVAEJDsBNDIGBgQrECFENCsSUDQ7ACQ1R4ILAMI7ACQ0NhZLAEUHiyAgICQ2BCsCFlHCGwAkNDsg4VAUIcILACQyNCshMBE0NgQiOwAFBYZVmyFgECQ2BCLbAELLADK7AVQ1gjISMhsBZDQyOwAFBYZVkbIGQgsMBQsAQmWrIoAQ1DRWNFsAZFWCGwAyVZUltYISMhG4pYILBQUFghsEBZGyCwOFBYIbA4WVkgsQENQ0VjRWFksChQWCGxAQ1DRWNFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwAiWwDENjsABSWLAAS7AKUFghsAxDG0uwHlBYIbAeS2G4EABjsAxDY7gFAGJZWWRhWbABK1lZI7AAUFhlWVkgZLAWQyNCWS2wBSwgRSCwBCVhZCCwB0NQWLAHI0KwCCNCGyEhWbABYC2wBiwjISMhsAMrIGSxB2JCILAII0KwBkVYG7EBDUNFY7EBDUOwAWBFY7AFKiEgsAhDIIogirABK7EwBSWwBCZRWGBQG2FSWVgjWSFZILBAU1iwASsbIbBAWSOwAFBYZVktsAcssAlDK7IAAgBDYEItsAgssAkjQiMgsAAjQmGwAmJmsAFjsAFgsAcqLbAJLCAgRSCwDkNjuAQAYiCwAFBYsEBgWWawAWNgRLABYC2wCiyyCQ4AQ0VCKiGyAAEAQ2BCLbALLLAAQyNEsgABAENgQi2wDCwgIEUgsAErI7AAQ7AEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERLABYC2wDSwgIEUgsAErI7AAQ7AEJWAgRYojYSBksCRQWLAAG7BAWSOwAFBYZVmwAyUjYUREsAFgLbAOLCCwACNCsw0MAANFUFghGyMhWSohLbAPLLECAkWwZGFELbAQLLABYCAgsA9DSrAAUFggsA8jQlmwEENKsABSWCCwECNCWS2wESwgsBBiZrABYyC4BABjiiNhsBFDYCCKYCCwESNCIy2wEixLVFixBGREWSSwDWUjeC2wEyxLUVhLU1ixBGREWRshWSSwE2UjeC2wFCyxABJDVVixEhJDsAFhQrARK1mwAEOwAiVCsQ8CJUKxEAIlQrABFiMgsAMlUFixAQBDYLAEJUKKiiCKI2GwECohI7ABYSCKI2GwECohG7EBAENgsAIlQrACJWGwECohWbAPQ0ewEENHYLACYiCwAFBYsEBgWWawAWMgsA5DY7gEAGIgsABQWLBAYFlmsAFjYLEAABMjRLABQ7AAPrIBAQFDYEItsBUsALEAAkVUWLASI0IgRbAOI0KwDSOwAWBCILAUI0IgYLABYbcYGAEAEQATAEJCQopgILAUQ2CwFCNCsRQIK7CLKxsiWS2wFiyxABUrLbAXLLEBFSstsBgssQIVKy2wGSyxAxUrLbAaLLEEFSstsBsssQUVKy2wHCyxBhUrLbAdLLEHFSstsB4ssQgVKy2wHyyxCRUrLbArLCMgsBBiZrABY7AGYEtUWCMgLrABXRshIVktsCwsIyCwEGJmsAFjsBZgS1RYIyAusAFxGyEhWS2wLSwjILAQYmawAWOwJmBLVFgjIC6wAXIbISFZLbAgLACwDyuxAAJFVFiwEiNCIEWwDiNCsA0jsAFgQiBgsAFhtRgYAQARAEJCimCxFAgrsIsrGyJZLbAhLLEAICstsCIssQEgKy2wIyyxAiArLbAkLLEDICstsCUssQQgKy2wJiyxBSArLbAnLLEGICstsCgssQcgKy2wKSyxCCArLbAqLLEJICstsC4sIDywAWAtsC8sIGCwGGAgQyOwAWBDsAIlYbABYLAuKiEtsDAssC8rsC8qLbAxLCAgRyAgsA5DY7gEAGIgsABQWLBAYFlmsAFjYCNhOCMgilVYIEcgILAOQ2O4BABiILAAUFiwQGBZZrABY2AjYTgbIVktsDIsALEAAkVUWLEOBkVCsAEWsDEqsQUBFUVYMFkbIlktsDMsALAPK7EAAkVUWLEOBkVCsAEWsDEqsQUBFUVYMFkbIlktsDQsIDWwAWAtsDUsALEOBkVCsAFFY7gEAGIgsABQWLBAYFlmsAFjsAErsA5DY7gEAGIgsABQWLBAYFlmsAFjsAErsAAWtAAAAAAARD4jOLE0ARUqIS2wNiwgPCBHILAOQ2O4BABiILAAUFiwQGBZZrABY2CwAENhOC2wNywuFzwtsDgsIDwgRyCwDkNjuAQAYiCwAFBYsEBgWWawAWNgsABDYbABQ2M4LbA5LLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyOAEBFRQqLbA6LLAAFrAXI0KwBCWwBCVHI0cjYbEMAEKwC0MrZYouIyAgPIo4LbA7LLAAFrAXI0KwBCWwBCUgLkcjRyNhILAGI0KxDABCsAtDKyCwYFBYILBAUVizBCAFIBuzBCYFGllCQiMgsApDIIojRyNHI2EjRmCwBkOwAmIgsABQWLBAYFlmsAFjYCCwASsgiophILAEQ2BkI7AFQ2FkUFiwBENhG7AFQ2BZsAMlsAJiILAAUFiwQGBZZrABY2EjICCwBCYjRmE4GyOwCkNGsAIlsApDRyNHI2FgILAGQ7ACYiCwAFBYsEBgWWawAWNgIyCwASsjsAZDYLABK7AFJWGwBSWwAmIgsABQWLBAYFlmsAFjsAQmYSCwBCVgZCOwAyVgZFBYIRsjIVkjICCwBCYjRmE4WS2wPCywABawFyNCICAgsAUmIC5HI0cjYSM8OC2wPSywABawFyNCILAKI0IgICBGI0ewASsjYTgtsD4ssAAWsBcjQrADJbACJUcjRyNhsABUWC4gPCMhG7ACJbACJUcjRyNhILAFJbAEJUcjRyNhsAYlsAUlSbACJWG5CAAIAGNjIyBYYhshWWO4BABiILAAUFiwQGBZZrABY2AjLiMgIDyKOCMhWS2wPyywABawFyNCILAKQyAuRyNHI2EgYLAgYGawAmIgsABQWLBAYFlmsAFjIyAgPIo4LbBALCMgLkawAiVGsBdDWFAbUllYIDxZLrEwARQrLbBBLCMgLkawAiVGsBdDWFIbUFlYIDxZLrEwARQrLbBCLCMgLkawAiVGsBdDWFAbUllYIDxZIyAuRrACJUawF0NYUhtQWVggPFkusTABFCstsEMssDorIyAuRrACJUawF0NYUBtSWVggPFkusTABFCstsEQssDsriiAgPLAGI0KKOCMgLkawAiVGsBdDWFAbUllYIDxZLrEwARQrsAZDLrAwKy2wRSywABawBCWwBCYgICBGI0dhsAwjQi5HI0cjYbALQysjIDwgLiM4sTABFCstsEYssQoEJUKwABawBCWwBCUgLkcjRyNhILAGI0KxDABCsAtDKyCwYFBYILBAUVizBCAFIBuzBCYFGllCQiMgR7AGQ7ACYiCwAFBYsEBgWWawAWNgILABKyCKimEgsARDYGQjsAVDYWRQWLAEQ2EbsAVDYFmwAyWwAmIgsABQWLBAYFlmsAFjYbACJUZhOCMgPCM4GyEgIEYjR7ABKyNhOCFZsTABFCstsEcssQA6Ky6xMAEUKy2wSCyxADsrISMgIDywBiNCIzixMAEUK7AGQy6wMCstsEkssAAVIEewACNCsgABARUUEy6wNiotsEossAAVIEewACNCsgABARUUEy6wNiotsEsssQABFBOwNyotsEwssDkqLbBNLLAAFkUjIC4gRoojYTixMAEUKy2wTiywCiNCsE0rLbBPLLIAAEYrLbBQLLIAAUYrLbBRLLIBAEYrLbBSLLIBAUYrLbBTLLIAAEcrLbBULLIAAUcrLbBVLLIBAEcrLbBWLLIBAUcrLbBXLLMAAABDKy2wWCyzAAEAQystsFksswEAAEMrLbBaLLMBAQBDKy2wWyyzAAABQystsFwsswABAUMrLbBdLLMBAAFDKy2wXiyzAQEBQystsF8ssgAARSstsGAssgABRSstsGEssgEARSstsGIssgEBRSstsGMssgAASCstsGQssgABSCstsGUssgEASCstsGYssgEBSCstsGcsswAAAEQrLbBoLLMAAQBEKy2waSyzAQAARCstsGosswEBAEQrLbBrLLMAAAFEKy2wbCyzAAEBRCstsG0sswEAAUQrLbBuLLMBAQFEKy2wbyyxADwrLrEwARQrLbBwLLEAPCuwQCstsHEssQA8K7BBKy2wciywABaxADwrsEIrLbBzLLEBPCuwQCstsHQssQE8K7BBKy2wdSywABaxATwrsEIrLbB2LLEAPSsusTABFCstsHcssQA9K7BAKy2weCyxAD0rsEErLbB5LLEAPSuwQistsHossQE9K7BAKy2weyyxAT0rsEErLbB8LLEBPSuwQistsH0ssQA+Ky6xMAEUKy2wfiyxAD4rsEArLbB/LLEAPiuwQSstsIAssQA+K7BCKy2wgSyxAT4rsEArLbCCLLEBPiuwQSstsIMssQE+K7BCKy2whCyxAD8rLrEwARQrLbCFLLEAPyuwQCstsIYssQA/K7BBKy2whyyxAD8rsEIrLbCILLEBPyuwQCstsIkssQE/K7BBKy2wiiyxAT8rsEIrLbCLLLILAANFUFiwBhuyBAIDRVgjIRshWVlCK7AIZbADJFB4sQUBFUVYMFktAAAAAEu4AMhSWLEBAY5ZsAG5CAAIAGNwsQAHQrIXAQAqsQAHQrMMCAEKKrEAB0KzFAYBCiqxAAhCugNAAAEACyqxAAlCugBAAAEACyq5AAMAAESxJAGIUViwQIhYuQADAGREsSgBiFFYuAgAiFi5AAMAAERZG7EnAYhRWLoIgAABBECIY1RYuQADAABEWVlZWVmzDgYBDiq4Af+FsASNsQIARLMFZAYAREQAAAAAAQAAAAA=)format("truetype");font-style:normal;font-weight:500;font-display:swap}:root{--background:0 0% 100%;--foreground:240 10% 3.9%;--card:0 0% 100%;--primary:240 5.9% 10%;--primary-foreground:0 0% 98%;--secondary:240 4.8% 95.9%;--secondary-foreground:240 5.9% 10%;--muted:240 4.8% 95.9%;--muted-foreground:240 3.8% 46.1%;--accent:240 4.8% 95.9%;--destructive:0 72% 51%;--border:240 5.9% 90%;--ring:240 5.9% 10%;--radius:.5rem;--canvas:0 0% 100%;--panel:0 0% 100%;--sidebar:0 0% 98%;--sidebar-item-hover:0 0% 0% / .043;--sidebar-foreground:240 5.9% 10%;--sidebar-item-foreground:240 5.3% 26.1%;--sidebar-section-title:240 5.3% 26.1%;--sidebar-border:0 0% 0% / .075;--feature-link:208 100% 47.45%;color-scheme:light;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif}html[lang=en-US]{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html,body,#root{overscroll-behavior:none;height:100%;margin:0;overflow:hidden}#root{position:fixed;top:0;right:0;bottom:0;left:0}body{background:hsl(var(--canvas));color:hsl(var(--foreground));-webkit-font-smoothing:antialiased}.icon{flex-shrink:0;width:16px;height:16px}.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}*{scrollbar-width:thin;scrollbar-color:hsl(var(--foreground) / .18) transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--foreground) / .18);background-clip:content-box;border:2px solid #0000;border-radius:999px}::-webkit-scrollbar-thumb:hover{background:hsl(var(--foreground) / .32);background-clip:content-box}::-webkit-scrollbar-corner{background:0 0}.layout{height:100dvh;min-height:0;display:flex;overflow:hidden}.main-shell{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.sidebar{background:hsl(var(--sidebar));width:240px;height:100%;min-height:0;color:hsl(var(--sidebar-foreground));box-shadow:inset -1px 0 hsl(var(--sidebar-border));flex-direction:column;flex-shrink:0;transition:width .22s cubic-bezier(.22,1,.36,1);display:flex;position:relative}.sidebar.is-collapsed{width:56px}.sidebar-top{flex-direction:column;padding:0 8px;display:flex}.sidebar-brand-row{align-items:center;gap:6px;height:64px;min-height:64px;padding:0 0 0 10px;display:flex}.sidebar:not(.is-collapsed) .sidebar-top{padding-inline:8px}.sidebar:not(.is-collapsed) .sidebar-brand-row{padding-right:0}.brand{min-width:0;color:inherit;cursor:pointer;letter-spacing:0;text-align:left;background:0 0;border:0;flex:1;align-items:center;gap:6px;padding:0;font-family:inherit;font-size:15px;font-weight:500;line-height:1.4;display:flex}.brand-title{text-overflow:ellipsis;white-space:nowrap;font-family:Byte Sans,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;overflow:hidden}.brand-logo,.brand-title,.brand{cursor:pointer}.login-brand-logo,.login-brand,.login-title{cursor:text}.sidebar-collapse-toggle{--sidebar-collapse-frame-stroke:#0c0d0e;--sidebar-collapse-divider-fill:#80838a;width:32px;height:32px;color:hsl(var(--sidebar-section-title));cursor:pointer;background:0 0;border:0;border-radius:999px;flex:0 0 32px;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.sidebar-collapse-toggle:hover{background:hsl(var(--sidebar-item-hover));color:hsl(var(--sidebar-foreground))}.sidebar-collapse-toggle .icon{width:18px;height:18px}.sidebar-panel-glyph__divider{fill:var(--sidebar-collapse-divider-fill);stroke:var(--sidebar-collapse-frame-stroke)}.sidebar-panel-glyph__frame{stroke:var(--sidebar-collapse-frame-stroke)}.sidebar.is-collapsed .sidebar-brand-row{justify-content:center;padding-inline:0}.sidebar.is-collapsed .brand{display:none}.brand-logo,.login-brand-logo{object-fit:contain;display:block}.brand-logo{flex:0 0 18px;width:18px;min-width:18px;max-width:18px;height:18px;min-height:18px;max-height:18px}.login-brand-logo{flex:0 0 20px;width:20px;min-width:20px;max-width:20px;height:20px;min-height:20px;max-height:20px}.sidebar-nav{flex-direction:column;gap:4px;width:100%;display:flex}.new-chat{width:100%;height:36px;min-height:36px;color:hsl(var(--sidebar-item-foreground));font:inherit;letter-spacing:0;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:8px;padding:7px 10px;font-size:14px;font-weight:400;line-height:22px;transition:background .12s;display:flex}.new-chat .icon{flex:0 0 16px;width:16px;height:16px}.new-chat:hover,.new-chat.is-active{background:hsl(var(--sidebar-item-hover))}.new-chat.is-active{color:hsl(var(--sidebar-foreground));font-weight:500}.sidebar-agent-face{overflow:visible}.sidebar-agent-face__eye{transform-box:fill-box;transform-origin:50%;animation:1s ease-in-out infinite sidebar-agent-blink}@keyframes sidebar-agent-blink{0%,42%,58%,to{transform:scaleY(1)}50%{transform:scaleY(.08)}}@media (prefers-reduced-motion:reduce){.sidebar-agent-face__eye{animation:none}}.studio-update-action{color:#fff;min-width:104px;min-height:40px;box-shadow:none;-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);cursor:pointer;font:inherit;background:#111;border:0;border-radius:999px;justify-content:center;align-items:center;gap:7px;padding:0 17px;font-size:12.5px;font-weight:650;transition:background-color .24s cubic-bezier(.22,1,.36,1),color .18s,box-shadow .24s,-webkit-backdrop-filter .24s,backdrop-filter .24s;display:inline-flex}.studio-update-action:not(:disabled):hover{color:#fff;background:#29292b;border:0;box-shadow:0 7px 18px #00000029}.studio-update-action:focus-visible{outline:2px solid hsl(var(--ring) / .55);outline-offset:2px}.studio-update-action:disabled{cursor:default;opacity:.42}.sidebar.is-collapsed .new-chat{white-space:nowrap;align-self:center;gap:0;width:36px;height:36px;min-height:36px;padding:9px;overflow:hidden}.sidebar.is-collapsed .sidebar-nav-label,.sidebar.is-collapsed .sidebar-history{display:none}.agentsel{--agentsel-available-width: calc(100vw - 254px) ;z-index:32;width:min(320px,var(--agentsel-available-width));background:0 0;border:0;flex-flow:wrap;align-content:stretch;align-items:stretch;gap:8px;margin-left:6px;animation:.16s ease-out agentsel-in;display:flex;position:absolute;top:8px;left:100%;overflow:visible;container-type:inline-size}.agentsel.has-detail{width:min(688px,var(--agentsel-available-width))}.agentsel--navbar{z-index:44;width:min(clamp(264px,26vw,288px),100vw - 48px);height:min(640px,100dvh - 74px);margin-left:0;position:absolute;top:calc(100% + 7px);left:0}.agentsel--navbar .agentsel-main{flex-basis:auto;width:100%}.sidebar.is-collapsed .agentsel{--agentsel-available-width: calc(100vw - 70px) }.agentsel-main{border:1px solid hsl(var(--border));background:hsl(var(--background));width:320px;min-width:min(240px,100%);height:100%;min-height:0;max-height:100%;box-shadow:0 12px 40px hsl(var(--foreground) / .14);border-radius:12px;flex-direction:column;flex:320px;display:flex;overflow:hidden}.agentsel-detail{border:1px solid hsl(var(--border));background:hsl(var(--background));width:360px;min-width:min(280px,100%);height:100%;min-height:0;max-height:100%;box-shadow:0 12px 40px hsl(var(--foreground) / .14);border-radius:12px;flex-direction:column;flex:360px;display:flex;overflow:hidden}.agentsel-preview{animation:.16s cubic-bezier(.22,1,.36,1) agentsel-preview-in}@container (max-width:527px){.agentsel.has-detail>.agentsel-main,.agentsel.has-detail>.agentsel-detail{height:calc(50% - 4px);max-height:calc(50% - 4px)}}.agentsel-preview-head{padding:7px 14px}.agentsel-detail-tabs{border:1px solid hsl(var(--border) / .58);background:hsl(var(--secondary) / .58);border-radius:9px;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;height:36px;padding:3px;display:grid;position:relative;overflow:hidden}.agentsel-detail-tabs-slider{z-index:0;border:1px solid hsl(var(--border) / .72);background:hsl(var(--background));border-radius:6px;width:calc(50% - 3px);transition:transform .24s cubic-bezier(.22,1,.36,1);position:absolute;top:3px;bottom:3px;left:3px;transform:translate(0)}.agentsel-detail-tabs.is-runtime .agentsel-detail-tabs-slider{transform:translate(100%)}.agentsel-detail-tabs button{z-index:1;min-width:0;color:hsl(var(--muted-foreground));font:inherit;text-align:center;cursor:pointer;background:0 0;border:0;border-radius:6px;font-size:12px;font-weight:550;transition:color .16s;position:relative}.agentsel-detail-tabs button:hover,.agentsel-detail-tabs button[aria-selected=true]{color:hsl(var(--foreground))}.agentsel-detail-tabs button:focus-visible{outline:2px solid hsl(var(--ring) / .24);outline-offset:-2px}.agentsel-tab-panel{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.agentsel-tab-panel[hidden]{display:none}.agentsel-detail-body{overscroll-behavior-y:contain;scrollbar-gutter:stable;flex:1;min-width:0;min-height:0;padding:12px 14px;overflow:hidden auto}.agentsel-panel-state{min-height:120px;color:hsl(var(--muted-foreground));justify-content:center;align-items:center;gap:7px;font-size:12.5px;display:flex}.agentsel-panel-state .icon{width:15px;height:15px}.agentsel-panel-empty{text-align:center;color:hsl(var(--muted-foreground));overflow-wrap:anywhere;flex-direction:column;gap:6px;padding:24px 8px;font-size:12.5px;display:flex}.agentsel-panel-empty small{color:hsl(var(--muted-foreground) / .75);-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:11px;line-height:1.45;display:-webkit-box;overflow:hidden}.agentsel-identity,.agentsel-runtime-identity{align-items:flex-start;gap:10px;min-width:0;display:flex}.agentsel-identity{padding-bottom:12px}.agentsel-identity-icon,.agentsel-runtime-identity>.icon{width:18px;height:18px;color:hsl(var(--muted-foreground));flex-shrink:0;margin-top:1px}.agentsel-identity-copy,.agentsel-runtime-identity>div{flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.agentsel-identity-copy strong,.agentsel-runtime-identity strong{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;font-weight:650;overflow:hidden}.agentsel-identity-copy span,.agentsel-runtime-identity span{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}.agentsel-runtime-identity{border-bottom:1px solid hsl(var(--border));margin-bottom:14px;padding-bottom:12px}.agentsel-info-section{border-top:1px solid hsl(var(--border));min-width:0;padding:11px 0}.agentsel-info-section h3{color:hsl(var(--muted-foreground));align-items:center;gap:6px;margin:0 0 8px;font-size:11.5px;font-weight:600;display:flex}.agentsel-info-section h3 .icon{width:13px;height:13px}.agentsel-description{white-space:pre-wrap;overflow-wrap:anywhere;max-height:104px;color:hsl(var(--foreground));margin:0;font-size:12.5px;line-height:1.65;overflow-y:auto}.agentsel-chips{flex-wrap:wrap;gap:5px;min-width:0;display:flex}.agentsel-chip{border:1px solid hsl(var(--border));background:hsl(var(--canvas) / .7);max-width:100%;color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;border-radius:5px;padding:3px 7px;font-size:11.5px;line-height:1.35;display:block;overflow:hidden}.agentsel-info-list{flex-direction:column;gap:6px;min-width:0;display:flex}.agentsel-info-list-item{background:hsl(var(--canvas) / .72);border-radius:6px;flex-direction:column;gap:2px;min-width:0;padding:7px 8px;display:flex}.agentsel-info-list-item>strong,.agentsel-component-head>strong{text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;overflow:hidden}.agentsel-info-list-item>span{color:hsl(var(--muted-foreground));overflow-wrap:anywhere;-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:11px;line-height:1.45;display:-webkit-box;overflow:hidden}.agentsel-component-head{align-items:center;gap:8px;min-width:0;display:flex}.agentsel-component-head>strong{flex:1;min-width:0}.agentsel-component-head>span{background:hsl(var(--foreground) / .06);color:hsl(var(--muted-foreground));border-radius:4px;flex-shrink:0;padding:1px 5px;font-size:10px}.agentsel-kv{flex-direction:column;gap:8px;margin:0;display:flex}.agentsel-kv-row{grid-template-columns:52px 1fr;gap:8px;font-size:12.5px;display:grid}.agentsel-kv-row dt{color:hsl(var(--muted-foreground))}.agentsel-kv-row dd{min-width:0;color:hsl(var(--foreground));overflow-wrap:anywhere;margin:0}.agentsel-envs{margin-top:14px}.agentsel-envs-head{color:hsl(var(--muted-foreground));margin-bottom:6px;font-size:12px;font-weight:600}.agentsel-env{flex-direction:column;gap:1px;margin-bottom:6px;display:flex}.agentsel-env-k{overflow-wrap:anywhere;color:hsl(var(--muted-foreground));font-family:inherit;font-size:11px}.agentsel-env-v{overflow-wrap:anywhere;color:hsl(var(--foreground));font-family:inherit;font-size:11.5px}.agentsel-head-actions{align-items:center;gap:2px;display:flex}.agentsel-pager{flex:0 0 36px;justify-content:center;align-items:center;gap:14px;padding:6px 10px 0;display:flex}.agentsel-pager button{cursor:pointer;color:hsl(var(--muted-foreground));background:0 0;border:none;padding:2px;display:flex}.agentsel-pager button:hover:not(:disabled){color:hsl(var(--foreground))}.agentsel-pager button:disabled{opacity:.3;cursor:default}.agentsel-pager button .icon{width:18px;height:18px}.agentsel-pager-label{color:hsl(var(--muted-foreground));text-align:center;min-width:40px;font-size:13px}@keyframes agentsel-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes agentsel-preview-in{0%{opacity:0;transform:translate(-6px)}to{opacity:1;transform:translate(0)}}.agentsel-head{box-sizing:border-box;border-bottom:1px solid hsl(var(--border));flex-shrink:0;justify-content:space-between;align-items:center;height:52px;padding:0 14px;display:flex}.agentsel-title{text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:8px;min-width:0;font-size:14px;font-weight:600;display:flex;overflow:hidden}.agentsel-title .icon{width:17px;height:17px}.agentsel-refresh{cursor:pointer;color:hsl(var(--muted-foreground));background:0 0;border:none;border-radius:6px;padding:4px;display:flex}.agentsel-refresh:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.agentsel-refresh .icon{width:16px;height:16px}.agentsel-body{overscroll-behavior-y:contain;scrollbar-gutter:stable;flex:1;min-height:0;padding:10px;overflow-y:auto}.agentsel-body--cloud{scrollbar-gutter:auto;flex-direction:column;display:flex;overflow:hidden}.agentsel-tools{flex-direction:column;gap:8px;margin-bottom:10px;display:flex}.agentsel-search{border:1px solid hsl(var(--border));border-radius:8px;align-items:center;gap:8px;padding:7px 10px;display:flex}.agentsel-search .icon{width:15px;height:15px;color:hsl(var(--muted-foreground))}.agentsel-search input{font:inherit;color:hsl(var(--foreground));background:0 0;border:none;outline:none;flex:1;font-size:13px}.agentsel-mine{color:hsl(var(--muted-foreground));cursor:pointer;align-items:center;gap:7px;font-size:12.5px;display:flex}.agentsel-list{flex-direction:column;gap:4px;margin:0;padding:0;list-style:none;display:flex}.agentsel-listwrap{min-height:220px;position:relative}.agentsel-body--cloud .agentsel-listwrap{overscroll-behavior-y:contain;scrollbar-gutter:auto;flex:1;min-height:0;overflow-y:auto}.agentsel-loading{color:hsl(var(--muted-foreground));background:hsl(var(--background) / .72);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);border-radius:8px;justify-content:center;align-items:center;gap:8px;font-size:13px;display:flex;position:absolute;top:0;right:0;bottom:0;left:0}.agentsel-loading .icon{width:16px;height:16px}.agentsel-item{width:100%;min-height:46px;color:hsl(var(--foreground));font:inherit;text-align:left;background:0 0;border:none;border-radius:8px;align-items:center;gap:9px;padding:4px 0;font-size:13.5px;display:flex}.agentsel-main button.agentsel-item{cursor:pointer;min-height:0;padding:9px 10px}.agentsel-item:hover{background:hsl(var(--foreground) / .05);box-shadow:none;transform:none}.agentsel-runtime-item:hover{background:0 0}.agentsel-item.active{background:hsl(var(--foreground) / .08);font-weight:600}.agentsel-item.is-previewed{background:hsl(var(--foreground) / .055)}.agentsel-runtime-item.active,.agentsel-runtime-item.is-previewed{background:0 0}.agentsel-item .icon{width:16px;height:16px;color:hsl(var(--muted-foreground));flex-shrink:0}.agentsel-item-main{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.agentsel-item-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13px;font-weight:550;overflow:hidden}.agentsel-item-meta{align-items:center;gap:4px;min-width:0;display:flex}.agentsel-item-actions{flex-shrink:0;align-items:center;gap:1px;display:flex}.agentsel-connect,.agentsel-info{color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;background:0 0;border:0;border-radius:6px}.agentsel-connect{min-width:38px;height:28px;padding:0 5px;font-size:11.5px;font-weight:550}.agentsel-info{place-items:center;width:28px;height:28px;padding:0;display:grid}.agentsel-connect:hover:not(:disabled),.agentsel-info:hover{background:hsl(var(--foreground) / .07);color:hsl(var(--foreground));box-shadow:none}.agentsel-info.active{color:hsl(var(--foreground));box-shadow:none;background:0 0}.agentsel-connect:disabled{opacity:.55;cursor:default}.agentsel-info .icon{width:15px;height:15px}.agentsel-rt{flex-direction:column;display:flex}.agentsel-rt-row{width:100%;color:hsl(var(--foreground));font:inherit;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:8px;align-items:center;gap:7px;padding:9px 8px;font-size:13.5px;display:flex}.agentsel-rt-row:hover{background:hsl(var(--foreground) / .05)}.agentsel-rt-row .icon{width:15px;height:15px;color:hsl(var(--muted-foreground));flex-shrink:0}.agentsel-rt-name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.runtime-owner-badge{color:#0b68cb;background:#007bff1f;border-radius:999px;flex-shrink:0;padding:1px 6px;font-size:10px;font-weight:600}.agentsel-status{border-radius:999px;flex-shrink:0;padding:1px 6px;font-size:10px}.agentsel-status.is-ok{color:#238b49;background:#21c45d24}.agentsel-status.is-warn{color:#b86614;background:#f59f0a29}.agentsel-status.is-bad{color:#ca2b2b;background:#dc282824}.agentsel-status.is-muted{background:hsl(var(--muted));color:hsl(var(--muted-foreground))}.agentsel-apps{flex-direction:column;gap:2px;padding:2px 0 6px 20px;display:flex}.agentsel-app{width:100%;color:hsl(var(--foreground));font:inherit;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:7px;align-items:center;gap:8px;padding:7px 10px;font-size:13px;display:flex}.agentsel-app:hover{background:hsl(var(--foreground) / .05)}.agentsel-app.active{background:hsl(var(--foreground) / .08);font-weight:600}.agentsel-app .icon{width:14px;height:14px;color:hsl(var(--muted-foreground));flex-shrink:0}.agentsel-apps-note{color:hsl(var(--muted-foreground));align-items:center;gap:7px;padding:7px 10px;font-size:12.5px;display:flex}.agentsel-apps-note .icon{width:14px;height:14px}.agentsel-apps-note--muted{font-style:italic}.agentsel-empty{text-align:center;color:hsl(var(--muted-foreground));padding:24px 10px;font-size:13px}.agentsel-error{overflow-wrap:anywhere;color:#bd2828;white-space:pre-wrap;background:#dc282814;border-radius:8px;min-width:0;max-width:100%;margin:4px 0 10px;padding:8px 10px;font-size:12.5px;overflow:hidden}.agentsel-more{border:1px dashed hsl(var(--border));width:100%;color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;background:0 0;border-radius:8px;margin-top:8px;padding:9px;font-size:13px}.agentsel-more:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.sidebar-history{flex-direction:column;flex:1;min-height:0;margin-top:20px;display:flex}.history-head{letter-spacing:0;height:32px;min-height:32px;color:hsl(var(--sidebar-section-title));justify-content:space-between;align-items:center;padding:0 18px;font-size:13px;font-weight:400;line-height:22px;display:flex}.history-refresh{cursor:pointer;color:hsl(var(--sidebar-section-title));background:0 0;border:none;padding:2px;display:flex}.history-refresh:hover{color:hsl(var(--sidebar-foreground))}.history-new-chat{width:24px;height:24px;color:hsl(var(--sidebar-section-title));cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;margin:-4px 0;padding:0;transition:color .12s;display:inline-flex}.history-new-chat .icon{width:15px;height:15px}.history-new-chat:hover{color:hsl(var(--sidebar-foreground));background:0 0}.history-list{flex-direction:column;flex:1;gap:4px;padding:0 8px 12px;display:flex;overflow-y:auto}.history-empty{color:hsl(var(--sidebar-section-title));text-align:center;padding:16px 8px;font-size:13px}.history-error{background:hsl(var(--destructive) / .08);color:hsl(var(--destructive));border-radius:8px;margin:4px 0 8px;padding:8px 10px;font-size:12px;line-height:1.5}.history-item{border-radius:8px;align-items:center;transition:background .12s;display:flex;position:relative}.history-item:hover,.history-item.active{background:hsl(var(--sidebar-item-hover))}.history-item-btn{text-align:left;min-width:0;min-height:36px;color:hsl(var(--sidebar-item-foreground));font:inherit;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;gap:8px;padding:7px 10px;font-size:14px;font-weight:400;line-height:22px;display:flex}.history-item.active .history-item-btn{color:hsl(var(--sidebar-foreground))}.history-title{white-space:nowrap;text-overflow:clip;--history-title-left-fade:0px;--history-title-right-fade:0px;--history-title-translate:0px;--history-title-duration:4.8s;min-width:0;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--history-title-left-fade),#000 calc(100% - var(--history-title-right-fade)),transparent 100%);mask-image:linear-gradient(to right,transparent 0,#000 var(--history-title-left-fade),#000 calc(100% - var(--history-title-right-fade)),transparent 100%);flex:1;overflow:hidden}.history-title.is-overflowing{--history-title-right-fade:20px}.history-title-text{min-width:max-content;display:inline-block;transform:translate(0)}.history-item:hover .history-title.is-overflowing,.history-item:focus-within .history-title.is-overflowing{--history-title-left-fade:16px}.history-item:hover .history-title.is-overflowing .history-title-text,.history-item:focus-within .history-title.is-overflowing .history-title-text{animation:history-title-marquee var(--history-title-duration) cubic-bezier(.45,0,.25,1) .24s infinite;will-change:transform}@keyframes history-title-marquee{0%,12%{transform:translate(0)}68%,82%{transform:translate3d(var(--history-title-translate),0,0)}to{transform:translate(0)}}.history-current-badge{background:hsl(var(--sidebar-item-hover));color:hsl(var(--sidebar-section-title));border-radius:999px;flex:none;padding:2px 5px;font-size:10px;font-weight:600;line-height:1.2}.history-item-btn:focus-visible,.history-more:focus-visible,.history-load-more:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:1px}.history-item-btn:disabled,.history-more:disabled{cursor:wait;opacity:.58}.history-evaluating-status{color:#956718;flex-shrink:0;align-items:center;gap:5px;font-size:10.5px;font-weight:600;line-height:1;display:inline-flex}.history-evaluating{background:#f59f0a;border-radius:50%;flex-shrink:0;width:7px;height:7px;animation:1.4s ease-in-out infinite history-evaluation-pulse;box-shadow:0 0 #f59f0a6b}@keyframes history-evaluation-pulse{0%,to{box-shadow:0 0 #f59f0a6b}50%{box-shadow:0 0 0 4px #f59f0a00}}@media (prefers-reduced-motion:reduce){.history-title-text{animation:none!important;transform:none!important}.history-evaluating{box-shadow:none;animation:none}}.history-action-slot{flex:0 0 32px;grid-template-columns:28px 4px;align-items:center;width:32px;height:36px;display:grid}.history-action-slot>.history-more,.history-streaming-indicator{grid-area:1/1}.history-streaming-indicator{color:hsl(var(--muted-foreground));pointer-events:none;opacity:1;justify-self:center;transition:opacity .12s ease-out}.history-more{width:28px;height:28px;color:hsl(var(--sidebar-section-title));cursor:pointer;opacity:0;background:0 0;border:none;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;margin-right:4px;transition:opacity .12s,background .12s;display:flex}.history-action-slot>.history-more{margin-right:0}.history-item:hover .history-more,.history-action-slot:focus-within .history-more{opacity:1}.history-item:hover .history-streaming-indicator,.history-action-slot:focus-within .history-streaming-indicator{opacity:0}.history-more:hover{background:hsl(var(--sidebar-item-hover));color:hsl(var(--sidebar-foreground))}.history-load-more{min-height:32px;color:hsl(var(--sidebar-section-title));font:inherit;cursor:pointer;background:0 0;border:0;border-radius:7px;margin-top:6px;font-size:12px;font-weight:550}.history-load-more:hover:not(:disabled){background:hsl(var(--sidebar-item-hover));color:hsl(var(--sidebar-foreground))}.history-load-more:disabled{cursor:wait;opacity:.6}.menu-scrim{z-index:30;position:fixed;top:0;right:0;bottom:0;left:0}.history-menu{z-index:31;background:hsl(var(--background));border:1px solid hsl(var(--border));min-width:120px;box-shadow:0 6px 20px hsl(var(--foreground) / .12);border-radius:8px;margin-top:2px;padding:4px;position:absolute;top:100%;right:4px}.menu-item{width:100%;font:inherit;cursor:pointer;color:hsl(var(--foreground));background:0 0;border:none;border-radius:6px;align-items:center;gap:8px;padding:7px 10px;font-size:13px;display:flex}.menu-item:hover{background:hsl(var(--accent))}.menu-item--danger{color:hsl(var(--destructive))}.menu-item .icon{width:15px;height:15px}.main{background:hsl(var(--panel));border:0;border-radius:0;flex-direction:column;flex:1;min-width:0;min-height:0;margin:0;display:flex;position:relative;overflow:hidden}.error{z-index:3;border-radius:var(--radius);background:hsl(var(--destructive) / .1);width:calc(100% - 32px);max-width:768px;color:hsl(var(--destructive));overflow-wrap:anywhere;white-space:pre-wrap;margin:10px auto 0;padding:10px 12px;font-size:13px;position:relative}.case-return-bar{flex:none;justify-content:center;padding:12px 16px 0;display:flex}.case-return-bar button{border:1px solid hsl(var(--border));background:hsl(var(--background));min-height:32px;color:hsl(var(--foreground));cursor:pointer;font:inherit;box-shadow:0 1px 2px hsl(var(--foreground) / .05);border-radius:999px;align-items:center;gap:7px;padding:0 11px;font-size:12px;font-weight:620;display:inline-flex}.case-return-bar button:hover{background:hsl(var(--secondary) / .55)}.case-return-bar svg{width:14px;height:14px}.transcript{flex:1;padding:28px 16px 8px;overflow-y:auto}.transcript.is-streaming{overflow-anchor:none}.welcome{flex-direction:column;flex:1;justify-content:center;align-items:center;gap:32px;padding:0 16px clamp(88px,16vh,136px);display:flex;position:relative}.welcome-primary{flex-direction:column;align-items:center;gap:32px;width:100%;display:flex;position:relative}.welcome-heading{z-index:10;flex-direction:column;align-items:center;gap:72px;display:flex;position:relative}.welcome-feature-pill{background:hsl(var(--muted));height:36px;color:hsl(var(--muted-foreground));white-space:nowrap;border-radius:999px;align-items:center;gap:12px;padding:0 16px;font-size:13px;font-weight:500;line-height:1;display:inline-flex;position:relative}.welcome-feature-divider{background:hsl(var(--border));width:1px;height:16px}.welcome-feature-link{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:hsl(var(--feature-link));font:inherit;line-height:inherit;cursor:pointer;background:0 0;border:0;padding:0}.welcome-feature-link:focus-visible{outline:2px solid hsl(var(--feature-link) / .35);outline-offset:3px;border-radius:3px}.welcome-feature-pill:has(.studio-update-trigger--feature)>.welcome-feature-link:not(.studio-update-trigger--feature),.welcome-feature-pill:has(.studio-update-trigger--feature)>.welcome-feature-popover{display:none}.welcome-feature-popover{z-index:40;border:1px solid hsl(var(--border));background:hsl(var(--background));width:min(340px,100vw - 32px);box-shadow:0 14px 36px hsl(var(--foreground) / .12);color:hsl(var(--foreground));text-align:left;white-space:normal;opacity:0;pointer-events:none;border-radius:14px;padding:16px;transition:opacity .16s,transform .16s;position:absolute;top:50%;left:calc(100% + 12px);transform:translate(-4px,-50%)}.welcome-feature-pill:hover .welcome-feature-popover,.welcome-feature-pill:focus-within .welcome-feature-popover{opacity:1;pointer-events:auto;transform:translateY(-50%)}.welcome-feature-popover>strong{margin-bottom:12px;font-size:13px;font-weight:600;display:block}.welcome-feature-popover ul{overscroll-behavior:contain;scrollbar-gutter:stable;max-height:min(220px,32vh);margin:0;padding:0 4px 0 18px;list-style:outside;display:block;overflow-y:auto}.welcome-feature-popover li{color:hsl(var(--muted-foreground));font-size:12px;line-height:1.55;display:list-item}.welcome-feature-popover li+li{margin-top:8px}@media (max-width:900px){.welcome-feature-popover{top:calc(100% + 10px);left:50%;transform:translate(-50%,-4px)}.welcome-feature-pill:hover .welcome-feature-popover,.welcome-feature-pill:focus-within .welcome-feature-popover{transform:translate(-50%)}}.welcome-title,.composer-placeholder-reveal{animation:.9s cubic-bezier(.22,1,.36,1) both welcome-text-reveal}@keyframes welcome-text-reveal{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0)}}@media (prefers-reduced-motion:reduce){.welcome-title,.composer-placeholder-reveal{opacity:1;clip-path:none;animation:none}.welcome-feature-popover{transition:none}}.welcome-title{letter-spacing:-.02em;margin:0;font-size:26px;font-weight:600}.welcome .composer{padding:0}.turn{flex-direction:column;gap:8px;max-width:768px;margin:0 auto 22px;display:flex}.turn:last-child{margin-bottom:0}.turn--user{align-items:flex-end}.turn--assistant{align-items:flex-start}.turn--assistant.is-feedback-target{border-radius:12px;animation:2.4s ease-out feedback-target-pulse}@keyframes feedback-target-pulse{0%{background:hsl(var(--foreground) / .07);box-shadow:0 0 0 8px hsl(var(--foreground) / .05)}to{box-shadow:0 0 hsl(var(--foreground) / 0);background:0 0}}.transcript.is-streaming>.turn--assistant:last-child{min-height:max(0px,100% - 180px)}.turn--subagent{isolation:isolate;width:100%;max-width:768px;box-shadow:none;background:0 0;border:0;border-radius:14px;gap:10px;margin-top:40px;margin-bottom:16px;padding:30px 16px 14px;position:relative}.turn--subagent:before{z-index:-1;border-radius:inherit;-webkit-backdrop-filter:blur(18px)saturate(115%);content:"";pointer-events:none;background:radial-gradient(circle at 12% 8%,#e3ebf28c,#0000 38%),radial-gradient(circle at 88% 78%,#e3e6ed6b,#0000 42%),linear-gradient(120deg,#ffffff8f,#f2f4f742);border:1px solid #dadfe7d1;position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}.turn--subagent:has(>.turn-meta){padding-bottom:0}.turn--subagent:has(>.turn-meta):before{bottom:44px}.transcript.is-streaming>.turn--subagent:last-child{min-height:0}.turn--assistant:has(.create-agent-tool-card.is-agent-results):has(+.turn--subagent)>.turn-meta{display:none}.subagent-run-label{background:hsl(var(--background));max-width:calc(100% - 28px);min-height:36px;box-shadow:none;border:1px solid #d5dae2;border-radius:10px;align-items:center;gap:8px;padding:4px 9px 4px 4px;display:inline-flex;position:absolute;top:0;left:14px;transform:translateY(-50%)}.subagent-run-handoff{color:#606b7b;white-space:nowrap;background:#eff2f5;border-radius:7px;flex:none;align-items:center;gap:5px;height:26px;padding:0 8px 0 6px;font-size:12px;font-weight:400;display:inline-flex}.subagent-run-handoff svg{flex:0 0 15px;width:15px;height:15px}.subagent-run-title{min-width:0;color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:14.5px;font-weight:400;overflow:hidden}.subagent-run-description{color:#636c79;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;padding:0 2px 4px;font-size:13.5px;line-height:1.6;display:-webkit-box;overflow:hidden}.turn--subagent .turn-meta{margin:20px -16px 0;position:static}.codex-sandbox-run{isolation:isolate;background:radial-gradient(circle at 12% 8%,#e3ebf280,transparent 38%),radial-gradient(circle at 88% 78%,#e3e6ed61,transparent 42%),hsl(var(--background) / .56);border:1px solid #dadfe7d1;border-radius:14px;width:100%;min-width:0;margin:20px 0 8px;padding:28px 14px 12px;position:relative}.codex-sandbox-run__label{background:hsl(var(--background));border:1px solid #d5dae2;border-radius:10px;align-items:center;gap:8px;max-width:calc(100% - 24px);min-height:34px;padding:3px 9px 3px 4px;display:inline-flex;position:absolute;top:0;left:12px;transform:translateY(-50%)}.codex-sandbox-run__badge{color:#606b7b;white-space:nowrap;background:#eff2f5;border-radius:7px;flex:none;align-items:center;gap:5px;height:26px;padding:0 8px 0 6px;font-size:12px;font-weight:400;display:inline-flex}.codex-sandbox-run__badge svg{flex:0 0 15px;width:15px;height:15px}.codex-sandbox-run__title{min-width:0;color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:400;overflow:hidden}.codex-sandbox-run__identity{border-bottom:1px solid hsl(var(--border));grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px;margin:0 0 10px;padding:0 2px 10px;display:grid}.codex-sandbox-run__identity>div{min-width:0}.codex-sandbox-run__identity dt,.codex-sandbox-run__identity dd{margin:0}.codex-sandbox-run__identity dt{color:hsl(var(--muted-foreground));font-size:11px;line-height:1.45}.codex-sandbox-run__identity dd{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.5;overflow:hidden}.codex-sandbox-run__stream{flex-direction:column;gap:6px;min-width:0;max-height:min(520px,55vh);padding-right:2px;display:flex;overflow:hidden auto}.codex-sandbox-run__stream .tool-detail,.codex-sandbox-run__stream .tool-section,.codex-sandbox-run__stream .tool-args{min-width:0;max-width:100%}.codex-sandbox-run__stream .tool-args{overflow:auto}.codex-sandbox-run__empty{min-height:32px;color:hsl(var(--muted-foreground));font-size:13.5px;line-height:32px}@media (max-width:700px){.turn--subagent{width:100%;padding:30px 10px 12px}.turn--subagent:has(>.turn-meta){padding-bottom:0}.turn--subagent .turn-meta{margin-left:-10px;margin-right:-10px}.subagent-run-label{max-width:calc(100% - 20px);left:10px}.codex-sandbox-run{padding-left:10px;padding-right:10px}.codex-sandbox-run__label{max-width:calc(100% - 20px);left:10px}.codex-sandbox-run__identity{grid-template-columns:minmax(0,1fr)}}.bubble{font-size:14.5px;line-height:1.65}.turn--user .bubble{background:hsl(var(--secondary));border-radius:18px;max-width:85%;padding:10px 16px}.turn--assistant .bubble{max-width:100%}.turn--assistant .bubble:has(.visualization-card){width:100%;min-width:0}.md{font-size:14.5px;line-height:1.65}.md>:first-child{margin-top:0}.md>:last-child{margin-bottom:0}.md p{margin:0 0 .7em}.md h1,.md h2,.md h3,.md h4,.md h5,.md h6{letter-spacing:-.01em;margin:1.1em 0 .5em;font-weight:650;line-height:1.3}.md h1{font-size:1.4em}.md h2{font-size:1.25em}.md h3{font-size:1.1em}.md h4,.md h5,.md h6{font-size:1em}.md ul{list-style:outside}.md ol{list-style:decimal}.md ul ul{list-style-type:circle}.md ul ul ul{list-style-type:square}.md ol ol{list-style-type:lower-alpha}.md ol ol ol{list-style-type:lower-roman}.md li,.md li>ul,.md li>ol{margin:.15em 0}.md a{color:hsl(var(--primary));text-underline-offset:2px;text-decoration:underline}.md a:hover{opacity:.8}.md blockquote{border-left:3px solid hsl(var(--border));color:hsl(var(--muted-foreground));margin:0 0 .7em;padding:.1em .9em}.md strong{font-weight:650}.md code{background:hsl(var(--muted));border-radius:5px;padding:.12em .35em;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.875em}.md pre{background:hsl(var(--muted));border-radius:8px;margin:0 0 .7em;padding:12px 14px;line-height:1.55;overflow-x:auto}.md pre code{background:0 0;border-radius:0;padding:0;font-size:12.5px}.visualization-card{border:1px solid hsl(var(--border));background:hsl(var(--muted) / .55);border-radius:8px;width:100%;min-width:0;margin:0 0 .7em;overflow:hidden}.visualization-card__toolbar{border-bottom:1px solid hsl(var(--border));align-items:center;min-height:40px;padding:8px 10px;display:flex}.visualization-card__tabs{font-size:inherit;font-weight:inherit;flex:none}.visualization-card__body{background:hsl(var(--panel));min-width:0}.md .visualization-card__code{background:hsl(var(--muted) / .35);border-radius:0;min-height:96px;max-height:360px;margin:0;padding:14px 16px;overflow:auto}.mermaid-diagram{justify-content:center;align-items:center;width:100%;min-height:120px;padding:16px;display:flex;overflow-x:auto}.mermaid-diagram svg{max-width:100%;height:auto;display:block}.mermaid-diagram--loading{color:hsl(var(--muted-foreground));font-size:12.5px}.mermaid-diagram--error{justify-content:flex-start;min-height:0}.mermaid-diagram__error{color:hsl(var(--destructive));margin:0;font-size:12.5px}.echarts-diagram{width:100%;height:320px;min-height:240px;position:relative}.echarts-diagram__canvas{width:100%;height:100%}.echarts-diagram__state{color:hsl(var(--muted-foreground));justify-content:center;align-items:center;font-size:12.5px;display:flex;position:absolute;top:0;right:0;bottom:0;left:0}.echarts-diagram--error{height:auto;min-height:0;padding:16px}.echarts-diagram__error{color:hsl(var(--destructive));margin:0;font-size:12.5px}@media (max-width:640px){.echarts-diagram{height:280px}}.md table{border-collapse:collapse;width:100%;box-shadow:0 2px 8px hsl(var(--foreground) / .1),0 0 0 1px hsl(var(--border));border-radius:12px;margin:0 0 .7em;font-size:.95em;overflow:hidden}.md table thead th,.md table th{background:hsl(var(--muted));border:1px solid hsl(var(--border));text-align:left;padding:12px 16px;font-size:.98em;font-weight:650}.md table tbody td,.md table td{border:1px solid hsl(var(--border));text-align:left;vertical-align:top;padding:12px 16px;line-height:1.65}.md table tbody tr:nth-child(2n){background:hsl(var(--muted) / .25)}.md table tbody tr:hover{background:hsl(var(--accent))}.md table caption{caption-side:top;text-align:left;color:hsl(var(--muted-foreground));padding:0 0 8px;font-size:.9em;font-weight:600}.md table colgroup,.md table col{display:table-column}.md table thead,.md table tbody,.md table tfoot{display:table-row-group}.md table tr{display:table-row}.md strong,.md b{font-weight:650}.md em,.md i{font-style:italic}.md del,.md s{text-decoration:line-through}.md ins,.md u{text-decoration:underline}.md mark{background:#fff3c2b3;border-radius:4px;padding:.1em .3em}.md sub{vertical-align:sub;font-size:.8em}.md sup{vertical-align:super;font-size:.8em}.md code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.md pre{overflow-x:auto}@media (max-width:640px){.md table{font-size:.85em}.md table thead th,.md table th,.md table tbody td,.md table td{padding:8px 10px}}.md p{line-height:1.7}.md br{content:"";margin:.4em 0;display:block}.md hr{border:none;border-top:1px solid hsl(var(--border));margin:1.5em 0}.md blockquote{border-left:3px solid hsl(var(--primary) / .4);background:hsl(var(--muted) / .3);border-radius:0 8px 8px 0;margin:.8em 0;padding:.6em 1em}.md ul,.md ol{margin:.6em 0;padding-left:1.6em}.md li{margin:.3em 0;line-height:1.6}.md h1,.md h2,.md h3,.md h4,.md h5,.md h6{margin-top:1.2em;margin-bottom:.5em;line-height:1.3}.md h1{font-size:1.6em;font-weight:700}.md h2{font-size:1.4em;font-weight:650}.md h3{font-size:1.2em;font-weight:600}.md h4{font-size:1.1em;font-weight:600}.md h5,.md h6{font-size:1em;font-weight:600}.md .image-preview-trigger{background:hsl(var(--muted));width:fit-content;max-width:40%;box-shadow:0 0 0 1px hsl(var(--border));cursor:zoom-in;border:0;border-radius:10px;margin:0 0 .7em;padding:0;line-height:0;display:block;position:relative;overflow:hidden}.md .image-preview-trigger:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:3px}.md .image-preview-trigger img{border-radius:inherit;width:auto;max-width:100%;height:auto;transition:filter .18s,transform .18s;display:block}.md .image-preview-trigger:hover img{filter:brightness(.92);transform:scale(1.01)}.image-preview-hint{color:#fff;opacity:0;background:#131316ad;border:1px solid #fff3;border-radius:8px;place-items:center;width:28px;height:28px;transition:opacity .16s,transform .16s;display:grid;position:absolute;bottom:8px;right:8px;transform:translateY(3px)}.image-preview-hint svg{width:14px;height:14px}.image-preview-trigger:hover .image-preview-hint,.image-preview-trigger:focus-visible .image-preview-hint{opacity:1;transform:translateY(0)}.md .video-container{gap:6px;margin:0 0 .7em;display:grid}.md .video-caption{color:hsl(var(--muted-foreground));font-size:.9em}.md .video-link-text{color:inherit;text-decoration:none;transition:color .15s}.md .video-link-text:hover{color:hsl(var(--foreground));text-decoration:underline}.md .video-preview-trigger{background:hsl(var(--muted));width:fit-content;max-width:80%;box-shadow:0 2px 8px hsl(var(--foreground) / .1),0 0 0 1px hsl(var(--border));cursor:pointer;border:0;border-radius:12px;padding:0;line-height:0;transition:box-shadow .18s,transform .18s;display:block;position:relative;overflow:hidden}.md .video-preview-trigger:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:3px}.md .video-preview-trigger:hover{box-shadow:0 4px 16px hsl(var(--foreground) / .15),0 0 0 1px hsl(var(--border));transform:translateY(-1px)}.md .video-preview-trigger .video-thumbnail{border-radius:inherit;width:auto;max-width:100%;height:auto;transition:filter .18s,transform .18s;display:block}.md .video-preview-trigger:hover .video-thumbnail{filter:brightness(.9);transform:scale(1.01)}.video-preview-hint{color:#fff;opacity:0;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#131316b3;border:1px solid #fff3;border-radius:10px;place-items:center;width:32px;height:32px;transition:opacity .16s,transform .16s;display:grid;position:absolute;bottom:10px;right:10px;transform:translateY(4px)}.video-preview-hint svg{width:16px;height:16px}.video-preview-trigger:hover .video-preview-hint,.video-preview-trigger:focus-visible .video-preview-hint{opacity:1;transform:translateY(0)}.md .video-inline{max-width:100%;box-shadow:0 2px 8px hsl(var(--foreground) / .1),0 0 0 1px hsl(var(--border));border-radius:12px;margin:0 0 .7em}.video-viewer-backdrop{z-index:90;-webkit-backdrop-filter:blur(16px)saturate(.85);backdrop-filter:blur(16px)saturate(.85);background:#131316c7;place-items:center;padding:28px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.video-viewer{border:1px solid hsl(var(--foreground) / .15);background:hsl(var(--background));border-radius:18px;flex-direction:column;width:min(1080px,94vw);max-height:min(880px,90vh);display:flex;overflow:hidden;box-shadow:0 32px 100px #07070885}.video-viewer-header{background:hsl(var(--muted) / .3);border-bottom:1px solid hsl(var(--border));justify-content:space-between;align-items:center;min-height:56px;padding:10px 16px;display:flex}.video-viewer-title{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;max-width:70%;font-weight:500;overflow:hidden}.video-viewer-nav{gap:6px;display:flex}.video-viewer-download,.video-viewer-close{width:36px;height:36px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;border-radius:9px;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.video-viewer-download:hover,.video-viewer-close:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.video-viewer-download svg,.video-viewer-close svg{width:17px;height:17px}.video-viewer-body{background:#161618;flex:1;place-items:center;min-height:0;padding:20px;display:grid;overflow:hidden}.video-viewer-body .video-fullscreen{background:#000;border-radius:12px;max-width:100%;max-height:calc(90vh - 96px);box-shadow:0 4px 20px #0006}@media (max-width:640px){.md .video-preview-trigger{max-width:100%}.video-viewer-backdrop{padding:0}.video-viewer{border:none;border-radius:0;width:100vw;max-height:100vh}.video-viewer-body .video-fullscreen{border-radius:0;max-height:calc(100vh - 96px)}}.turn--user .md code,.turn--user .md pre{background:hsl(var(--background) / .55)}.block-thinking,.block-progress,.block-tool,.block-plan{align-self:stretch;width:100%;min-width:0}.think-head,.tool-head{color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;background:0 0;border:none;align-items:center;display:inline-flex}.think-head{gap:8px;min-height:32px;padding:3px 7px 3px 3px}.progress-head{cursor:default}.think-icon{flex:0 0 20px;place-items:center;width:20px;height:26px;display:grid}.think-icon>svg{width:14px;height:15px}.thinking-logo{color:hsl(var(--foreground));opacity:.56;transform-origin:50%}.thinking-logo.is-active{animation:1.6s ease-in-out infinite thinking-logo-breathe}@keyframes thinking-logo-breathe{0%,to{opacity:.42;transform:scale(.97)}50%{opacity:.72;transform:scale(1.02)}}@media (prefers-reduced-motion:reduce){.thinking-logo.is-active{opacity:.56;animation:none;transform:none}}.chev{opacity:.58;flex:0 0 13px;width:13px;height:13px;transition:transform .18s}.chev.open{transform:rotate(90deg)}.think-label{font-size:14.5px;font-weight:400;line-height:1.35}.think-label--done{color:hsl(var(--muted-foreground))}.tool-head{color:hsl(var(--muted-foreground));transition:color .12s}.tool-head:hover{color:hsl(var(--foreground))}.tool-head--generic{gap:8px;min-height:32px;padding:3px 7px 3px 3px}.tool-name{color:inherit;font-size:14.5px;font-weight:400;line-height:1.35}.tool-icon{flex:0 0 20px;place-items:center;width:20px;height:26px;display:grid}.tool-icon>svg{width:18px;height:18px}.tool-icon--generic{color:hsl(var(--muted-foreground))}.block-tool[data-status=failed] .tool-head--generic{color:hsl(var(--destructive))}.tool-chevron{opacity:.58;flex:0 0 13px;width:13px;height:13px;transition:transform .18s}.tool-chevron.is-open{transform:rotate(90deg)}.tool-detail{flex-direction:column;gap:8px;margin:6px 0 4px;padding-left:3px;display:flex}.tool-section-label{text-transform:uppercase;letter-spacing:.04em;color:hsl(var(--muted-foreground));margin-bottom:4px;font-size:11px}.tool-result{max-height:240px;overflow:auto}.studio-tool-artifacts{flex-wrap:wrap;gap:6px;display:flex}.studio-tool-artifacts a{border:1px solid hsl(var(--border));min-height:28px;color:hsl(var(--foreground));border-radius:7px;align-items:center;padding:4px 9px;font-size:12px;text-decoration:none;display:inline-flex}.studio-tool-artifacts a:hover{border-color:hsl(var(--primary) / .45);background:hsl(var(--primary) / .05);color:hsl(var(--primary))}.plan-head{min-width:0;min-height:32px;color:hsl(var(--muted-foreground));font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:8px;padding:3px 7px 3px 3px;display:flex}.plan-head:not(:disabled):hover{color:hsl(var(--foreground))}.plan-head:disabled{cursor:default}.plan-icon{flex:0 0 20px;place-items:center;width:20px;height:26px;display:grid}.plan-icon>svg{width:18px;height:18px}.plan-title{overflow-wrap:anywhere;min-width:0;font-size:14.5px;font-weight:400;line-height:1.35}.plan-summary{color:hsl(var(--muted-foreground));flex:none;font-size:11.5px;line-height:1.4}.plan-chevron{opacity:.58;flex:0 0 13px;width:13px;height:13px;transition:transform .18s}.plan-chevron.is-open{transform:rotate(90deg)}.plan-items{gap:6px;margin:5px 0 6px 31px;padding:0;list-style:none;display:grid}.plan-items li{min-width:0;color:hsl(var(--muted-foreground));grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:8px;display:grid}.plan-item-marker{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:50%;width:7px;height:7px}.plan-items li[data-status=in_progress] .plan-item-marker{border-color:hsl(var(--ring));box-shadow:0 0 0 3px hsl(var(--ring) / .1)}.plan-items li[data-status=completed] .plan-item-marker{border-color:hsl(var(--foreground) / .45);background:hsl(var(--foreground) / .45)}.plan-items li[data-status=failed] .plan-item-marker{border-color:hsl(var(--destructive));background:hsl(var(--destructive))}.plan-item-text{overflow-wrap:anywhere;min-width:0;font-size:13px;line-height:1.5}.plan-items small{color:inherit;font-size:11px;line-height:1.4}.plan-items li[data-status=failed]{color:hsl(var(--destructive))}.think-collapse{grid-template-rows:0fr;transition:grid-template-rows .28s;display:grid}.think-collapse.open{grid-template-rows:1fr}.think-collapse-inner{width:100%;min-width:0;overflow:hidden}.think-body{width:100%;min-width:0;color:hsl(var(--muted-foreground));white-space:pre-wrap;border-left:0;max-height:220px;margin:0;padding:0;font-size:14px;line-height:1.7;overflow-y:auto}.tool-args{background:hsl(var(--muted));white-space:pre-wrap;border-radius:6px;margin:0;padding:8px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;overflow-x:auto}.turn-meta{color:hsl(var(--muted-foreground));opacity:0;align-items:center;gap:10px;margin-top:2px;font-size:12px;transition:opacity .15s;display:flex}.turn-empty{color:hsl(var(--muted-foreground));margin-top:2px;font-size:13px;font-style:italic}.auth-card{border:1px solid hsl(var(--border));background:hsl(var(--card));border-radius:12px;width:100%;max-width:640px;margin:2px 0;padding:18px 20px}.auth-card-head{align-items:center;gap:8px;margin-bottom:6px;display:flex}.auth-card-icon{color:#f59f0a;width:18px;height:18px}.auth-card-icon--done{color:#1eae53}.auth-card-collapsed{border:1px solid hsl(var(--border));background:hsl(var(--card));color:hsl(var(--muted-foreground));border-radius:9px;align-items:center;gap:7px;margin:2px 0;padding:6px 12px;font-size:13px;font-weight:500;display:inline-flex}.auth-card-code{background:hsl(var(--muted));color:hsl(var(--foreground));word-break:break-all;border-radius:5px;padding:1px 6px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.auth-card-title{font-size:14px;font-weight:600}.auth-card-desc{color:hsl(var(--muted-foreground));margin:0 0 14px;font-size:13px;line-height:1.6}.auth-card-btn{background:hsl(var(--primary));color:hsl(var(--primary-foreground));font:inherit;cursor:pointer;border:none;border-radius:9px;align-items:center;gap:7px;padding:8px 16px;font-size:13px;font-weight:600;transition:opacity .12s;display:inline-flex}.auth-card-btn:hover:not(:disabled){opacity:.88}.auth-card-btn:disabled{opacity:.55;cursor:default}.auth-card-btn .cw-i{width:15px;height:15px}.auth-card-done{color:#1eae53;align-items:center;gap:6px;font-size:13px;font-weight:500;display:inline-flex}.auth-card-done .cw-i{width:16px;height:16px}.auth-card-err{color:hsl(var(--destructive));margin-top:8px;font-size:12px}.artifact-list{gap:8px;width:min(100%,440px);margin:6px 0;display:grid}.artifact-card{width:100%;color:hsl(var(--foreground));text-align:left;background:#f5f9ff;border:1px solid #d1e1fa;border-radius:12px;align-items:center;gap:12px;padding:12px 14px;display:flex}.artifact-card__icon{color:#2371e7;background:#d8e7fd;border-radius:10px;flex:none;justify-content:center;align-items:center;width:36px;height:36px;display:inline-flex}.artifact-card__icon svg{width:18px;height:18px}.artifact-card__copy{flex:auto;gap:3px;min-width:0;display:grid}.artifact-card__name{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600;overflow:hidden}.artifact-card__hint{color:hsl(var(--muted-foreground));font-size:12px}.artifact-card__actions{flex:none;gap:6px;margin-left:auto;display:flex}.artifact-card__action{background:hsl(var(--background));color:#315b9b;white-space:nowrap;cursor:pointer;border:1px solid #becde4;border-radius:8px;flex:none;align-items:center;gap:5px;min-height:30px;padding:0 10px;font-size:12px;font-weight:600;display:inline-flex}.artifact-card__action:hover:not(:disabled){background:#ebf3ff}.artifact-card__action:disabled{cursor:default;opacity:.55}.artifact-card__action svg{width:14px;height:14px}.artifact-card__action--primary{color:#fff;background:#2c77e8;border-color:#3e81e5}.artifact-card__action--primary:hover:not(:disabled){background:#1867dc}.artifact-card__error{color:hsl(var(--destructive));font-size:12px}.delivery-card{border:1px solid hsl(var(--border));background:hsl(var(--panel));width:min(100%,560px);color:hsl(var(--foreground));border-radius:12px;gap:12px;margin:8px 0;padding:16px;display:grid}.delivery-card-header{align-items:center;gap:10px;display:flex}.delivery-card-header>div{gap:2px;display:grid}.delivery-card-header strong{font-size:14px}.delivery-card-header span{color:hsl(var(--muted-foreground));font-size:12px}.delivery-card-icon{background:hsl(var(--secondary));width:36px;height:36px;color:hsl(var(--primary));border-radius:10px;place-items:center;display:inline-grid}.delivery-card-icon svg{width:18px;height:18px}.delivery-card.is-unverified .delivery-card-icon{color:hsl(var(--muted-foreground))}.delivery-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin:0;display:grid}.delivery-card-grid div{min-width:0}.delivery-card-grid dt{color:hsl(var(--muted-foreground));font-size:11px}.delivery-card-grid dd{text-overflow:ellipsis;white-space:nowrap;margin:2px 0 0;font-size:12px;overflow:hidden}.delivery-card-gates{color:hsl(var(--muted-foreground));margin:0;font-size:12px}.delivery-card-guidance{color:hsl(var(--muted-foreground));margin:0;font-size:12px;line-height:1.55}.delivery-card-actions{flex-wrap:wrap;gap:8px;display:flex}.delivery-card-actions button{border:1px solid hsl(var(--primary));background:hsl(var(--primary));min-height:34px;color:hsl(var(--primary-foreground));font:inherit;cursor:pointer;border-radius:8px;justify-content:center;align-items:center;gap:6px;padding:0 14px;font-size:12px;font-weight:600;display:inline-flex}.delivery-card-actions button svg{width:14px;height:14px}.delivery-card-actions .delivery-card-secondary{border-color:hsl(var(--border));background:hsl(var(--background));color:hsl(var(--foreground))}.delivery-card-actions button:disabled{cursor:not-allowed;opacity:.5}.delivery-card-actions button:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.delivery-card-error{color:hsl(var(--destructive));margin:0;font-size:12px}.delivery-card-status{color:#277c46;margin:0;font-size:12px}.trusted-source-pane{color:hsl(var(--foreground));gap:14px;padding:22px;display:grid}.trusted-source-pane h2,.trusted-source-pane p,.trusted-source-pane dl{margin:0}.trusted-source-pane__badge{background:hsl(var(--secondary));color:hsl(var(--primary));border-radius:999px;justify-self:start;padding:4px 8px;font-size:11px;font-weight:600}.trusted-source-pane__runtime-name{gap:6px;display:grid}.trusted-source-pane__runtime-name span{color:hsl(var(--muted-foreground));font-size:12px}.trusted-source-pane__runtime-name input{border:1px solid hsl(var(--border));background:hsl(var(--background));min-height:36px;color:hsl(var(--foreground));font:inherit;border-radius:8px;outline:none;padding:0 10px;font-size:13px}.trusted-source-pane__runtime-name input:focus{border-color:hsl(var(--ring));box-shadow:0 0 0 2px hsl(var(--ring) / .12)}.trusted-source-pane dl{gap:9px;display:grid}.trusted-source-pane dl div{justify-content:space-between;gap:12px;display:flex}.trusted-source-pane dt{color:hsl(var(--muted-foreground));font-size:12px}.trusted-source-pane dd{text-overflow:ellipsis;margin:0;font-size:12px;overflow:hidden}.trusted-source-pane p{color:hsl(var(--muted-foreground));font-size:12px;line-height:1.6}@media (max-width:640px){.delivery-card-grid{grid-template-columns:minmax(0,1fr)}.delivery-card-actions{grid-template-columns:minmax(0,1fr);display:grid}.delivery-card-actions button{width:100%}}.artifact-preview{z-index:1200;place-items:center;padding:28px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.artifact-preview__backdrop{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);cursor:default;background:#0b182b94;border:0;position:absolute;top:0;right:0;bottom:0;left:0}.artifact-preview__panel{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:16px;grid-template-rows:auto minmax(0,1fr);width:min(1120px,92vw);max-height:90vh;display:grid;position:relative;overflow:hidden;box-shadow:0 26px 80px #0b182b4d}.artifact-preview__header{border-bottom:1px solid hsl(var(--border));justify-content:space-between;align-items:center;gap:16px;min-height:52px;padding:0 16px 0 20px;font-size:14px;font-weight:600;display:flex}.artifact-preview__header button{width:32px;height:32px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:8px;justify-content:center;align-items:center;display:inline-flex}.artifact-preview__header button:hover{background:hsl(var(--muted))}.artifact-preview__header svg{width:17px;height:17px}.artifact-preview__canvas{background:#eceff3;min-height:0;padding:18px;overflow:auto}.artifact-preview__canvas img{border-radius:8px;width:100%;height:auto;display:block;box-shadow:0 6px 24px #0b182b29}.turn-actions{align-items:center;gap:2px;display:inline-flex}.turn-actions--right{opacity:0;align-self:flex-end;margin-top:2px;transition:opacity .15s}.turn--assistant:hover .turn-meta,.turn--user:hover .turn-actions--right{opacity:1}.icon-btn{width:28px;height:28px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;transition:background .12s,color .12s;display:inline-flex}.icon-btn:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.icon-btn:disabled{opacity:.35;cursor:default}.icon-btn:disabled:hover{color:hsl(var(--muted-foreground));background:0 0}.icon-btn .icon{width:15px;height:15px}.feedback-btn:hover,.feedback-btn--good,.feedback-btn--bad,.feedback-btn--good:hover,.feedback-btn--bad:hover{color:hsl(var(--foreground));background:0 0}.feedback-btn[aria-busy=true]{opacity:1}.feedback-btn--good[aria-busy=true]:hover,.feedback-btn--bad[aria-busy=true]:hover{color:hsl(var(--foreground))}.feedback-btn .icon{width:18px;height:18px}.meta-text{white-space:nowrap;color:hsl(var(--muted-foreground));font-size:12px}.turn-actions--right{gap:6px}.drawer-scrim{background:hsl(var(--foreground) / .2);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:40;animation:.2s fade;position:fixed;top:0;right:0;bottom:0;left:0}@keyframes fade{0%{opacity:0}to{opacity:1}}.drawer{background:hsl(var(--background));border-left:1px solid hsl(var(--border));width:min(560px,92vw);box-shadow:-12px 0 40px hsl(var(--foreground) / .14);z-index:41;flex-direction:column;animation:.24s cubic-bezier(.22,1,.36,1) slidein;display:flex;position:fixed;top:0;bottom:0;right:0}@keyframes slidein{0%{transform:translate(100%)}to{transform:translate(0)}}.drawer-head{border-bottom:1px solid hsl(var(--border));background:hsl(var(--canvas));justify-content:space-between;align-items:center;padding:15px 18px;display:flex}.drawer-title{letter-spacing:-.01em;font-size:15px;font-weight:650}.drawer-sub{color:hsl(var(--muted-foreground));font-variant-numeric:tabular-nums;margin-top:3px;font-size:12px}.drawer-close{cursor:pointer;color:hsl(var(--muted-foreground));background:0 0;border:none;border-radius:6px;padding:6px;display:flex}.drawer-close:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.drawer-body{flex:1;padding:16px 18px;overflow:auto}.drawer-loading,.drawer-empty{color:hsl(var(--muted-foreground));align-items:center;gap:8px;font-size:14px;display:flex}.drawer-loading{flex:1;justify-content:center;padding:24px}.drawer-empty{padding:20px 0}.trace-state{text-align:center;flex-wrap:wrap;flex:1;justify-content:center;padding:24px 18px}.drawer--trace{width:min(1080px,96vw)}.trace-split{flex:1;min-height:0;display:flex}.trace-tree{border-right:1px solid hsl(var(--border));flex:1.25;min-width:0;padding:8px 6px;overflow:auto}.trace-row{cursor:pointer;width:100%;font:inherit;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:10px;padding:5px 8px;transition:background .1s;display:flex}.trace-row:hover{background:hsl(var(--foreground) / .04)}.trace-row.active{background:hsl(var(--primary) / .07);box-shadow:inset 2px 0 hsl(var(--primary) / .55)}.trace-label{flex:1;align-items:center;gap:6px;min-width:0;display:flex}.trace-caret{width:16px;height:16px;color:hsl(var(--muted-foreground));flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.trace-caret.hidden{visibility:hidden}.trace-caret .chev{width:13px;height:13px;transition:transform .18s}.trace-caret.open .chev{transform:rotate(90deg)}.trace-dot{border-radius:50%;flex-shrink:0;width:8px;height:8px}.trace-name{white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.trace-dur{text-align:right;width:66px;color:hsl(var(--muted-foreground));font-variant-numeric:tabular-nums;flex-shrink:0;font-size:11px}.trace-track{background:hsl(var(--foreground) / .05);border-radius:5px;flex:0 0 34%;height:16px;position:relative}.trace-bar{opacity:.9;border-radius:4px;min-width:3px;height:8px;position:absolute;top:4px}.trace-detail{flex:1;min-width:0;padding:18px 20px;overflow:auto}.td-title{letter-spacing:-.01em;word-break:break-all;font-size:15px;font-weight:600}.td-dur{color:hsl(var(--muted-foreground));font-variant-numeric:tabular-nums;align-items:center;gap:7px;margin-top:4px;font-size:12px;display:flex}.td-dot{border-radius:50%;width:8px;height:8px}.td-section{letter-spacing:.01em;color:hsl(var(--foreground));margin:22px 0 9px;font-size:12px;font-weight:650}.td-props{flex-direction:column;display:flex}.td-prop{border-bottom:1px solid hsl(var(--border));gap:16px;padding:7px 0;font-size:13px;display:flex}.td-key{color:hsl(var(--muted-foreground));flex-shrink:0;min-width:140px}.td-val{text-align:right;word-break:break-word;font-variant-numeric:tabular-nums;flex:1;min-width:0}.td-pre{background:hsl(var(--canvas));border:1px solid hsl(var(--border));white-space:pre-wrap;word-break:break-word;border-radius:8px;max-height:320px;margin:0;padding:11px 13px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.55;overflow:auto}.composer{width:100%;max-width:768px;margin:0 auto;padding:6px 16px 18px}.conversation-composer-slot{padding:6px 16px 18px}.conversation-composer-slot>.composer-slot>.composer{padding:0}.composer--new-chat{position:relative}.composer-box{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:26px;align-items:flex-end;gap:6px;padding:6px 6px 6px 8px;display:flex;position:relative}.composer--new-chat .composer-box{z-index:2;border-color:hsl(var(--border) / .55);border-radius:16px;min-height:136px;padding:10px;display:block;box-shadow:0 8px 32px #00000007,0 24px 72px 8px #00000005}.composer-input-stack{flex-direction:column;flex:1;min-width:0;display:flex;position:relative}.composer-input-stack .comp-input{width:100%}.composer--new-chat .composer-input-stack{min-height:114px}.composer--new-chat .comp-input{min-height:76px;padding:4px 10px}.composer--new-chat .comp-input::placeholder{color:#0000}.composer-placeholder-reveal{z-index:1;width:max-content;max-width:calc(100% - 20px);color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;pointer-events:none;font-size:15px;line-height:1.5;position:absolute;top:4px;left:10px;overflow:hidden}.composer--new-chat .composer-menu-wrap{z-index:5;height:36px;position:absolute;bottom:10px;left:10px}.composer--new-chat .new-chat-mode{align-items:center;min-height:36px;display:flex;position:absolute;bottom:10px;left:52px}.composer--new-chat.composer--has-task .new-chat-mode{left:138px}.composer--new-chat.composer--task-image .new-chat-mode,.composer--new-chat.composer--task-video .new-chat-mode{left:176px}.new-chat-task-chip{z-index:2;color:#7a5bae;width:78px;height:36px;font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:999px;justify-content:center;align-items:center;gap:7px;padding:0 10px;font-size:15px;line-height:1;transition:background .15s,transform .15s;display:inline-flex;position:absolute;bottom:10px;left:52px}.new-chat-task-chip--image,.new-chat-task-chip--video{width:116px}.new-chat-task-chip>span:last-child{white-space:nowrap;flex:none}.new-chat-task-chip:hover,.new-chat-task-chip:focus-visible{background:#f4f1f8;outline:none}.new-chat-task-chip:active{transform:scale(.97)}.new-chat-task-chip:disabled{cursor:default;opacity:.5}.new-chat-task-chip__icon{border-radius:50%;flex:0 0 20px;place-items:center;width:20px;height:20px;display:grid;position:relative}.new-chat-task-chip__task-icon,.new-chat-task-chip__remove-icon{width:18px;height:18px;transition:opacity .12s,transform .15s;position:absolute}.new-chat-task-chip__remove-icon{color:#fff;opacity:0;box-sizing:content-box;background:#896bbd;border-radius:50%;width:12px;height:12px;padding:3px;transform:scale(.72)}.new-chat-task-chip:hover .new-chat-task-chip__task-icon,.new-chat-task-chip:focus-visible .new-chat-task-chip__task-icon{opacity:0;transform:scale(.72)}.new-chat-task-chip:hover .new-chat-task-chip__remove-icon,.new-chat-task-chip:focus-visible .new-chat-task-chip__remove-icon{opacity:1;transform:scale(1)}.composer--new-chat .comp-send{position:absolute;bottom:10px;right:10px}.composer--new-chat .comp-send .icon{width:20px;height:20px}.task-shortcuts{z-index:1;flex-wrap:wrap;justify-content:center;gap:10px;width:100%;display:flex;position:absolute;top:calc(100% + 18px);left:0}.task-shortcut{border:1px solid hsl(var(--border) / .72);background:hsl(var(--background));min-width:92px;height:40px;color:hsl(var(--muted-foreground));font:inherit;white-space:nowrap;cursor:pointer;opacity:0;border-radius:999px;flex:none;justify-content:center;align-items:center;gap:8px;padding:0 18px;font-size:13px;line-height:1;transition:border-color .14s,background .14s,color .14s,transform .14s;animation:.32s cubic-bezier(.22,1,.36,1) forwards task-shortcut-enter;display:inline-flex;transform:translateY(6px)}.task-shortcut>span{white-space:nowrap}.task-shortcut:nth-child(2){animation-delay:45ms}.task-shortcut:nth-child(3){animation-delay:90ms}.task-shortcut:nth-child(4){animation-delay:.135s}.task-shortcut:hover{color:#7454ab;background:#f6f5fa;border-color:#8970b257;transform:translateY(-1px)}.task-shortcut:focus-visible{outline-offset:2px;outline:2px solid #8970b257}.task-shortcut:disabled{cursor:not-allowed;opacity:.5}.task-shortcut>svg{stroke:currentColor;flex:none;width:18px;height:18px}.prompt-suggestions{z-index:1;gap:3px;width:100%;display:grid;position:absolute;top:calc(100% + 18px);left:0}.prompt-suggestion{width:100%;min-height:46px;color:hsl(var(--muted-foreground));font:inherit;text-align:left;cursor:pointer;opacity:0;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:8px 14px;font-size:15px;line-height:1.5;transition:background .14s,color .14s,transform .14s;animation:.44s cubic-bezier(.22,1,.36,1) forwards prompt-suggestion-enter;display:flex;transform:translateY(10px)}.prompt-suggestion:nth-child(2){animation-delay:65ms}.prompt-suggestion:nth-child(3){animation-delay:.13s}.prompt-suggestion:nth-child(4){animation-delay:.195s}.prompt-suggestion:hover{background:hsl(var(--foreground) / .025);color:hsl(var(--foreground))}.prompt-suggestion:focus-visible{outline:2px solid hsl(var(--primary) / .42);outline-offset:-2px}.prompt-suggestion:disabled{cursor:not-allowed;opacity:.5}.prompt-suggestion>svg{stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.35px;transform-origin:50%;flex:none;width:18px;height:18px;transition:transform .22s cubic-bezier(.22,1,.36,1)}.prompt-suggestion>span{white-space:nowrap;text-overflow:ellipsis;min-width:0;max-height:1.5em;transition:max-height .22s cubic-bezier(.22,1,.36,1);display:block;overflow:hidden}.prompt-suggestion:hover>span,.prompt-suggestion:focus-visible>span{white-space:normal;text-overflow:clip;max-height:4.5em}.prompt-suggestion:first-child:hover>svg{transform:rotate(-8deg)scale(1.06)}.prompt-suggestion:nth-child(2):hover>svg{transform:rotate(6deg)scale(1.07)}.prompt-suggestion:nth-child(3):hover>svg{transform:rotate(-5deg)scale(1.06)}.prompt-suggestion:nth-child(4):hover>svg{transform:rotate(5deg)scale(1.06)}@keyframes prompt-suggestion-enter{to{opacity:1;transform:translateY(0)}}@keyframes task-shortcut-enter{to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.task-shortcut,.prompt-suggestion,.new-chat-task-chip,.new-chat-task-chip__task-icon,.new-chat-task-chip__remove-icon{opacity:1;transition:none;animation:none;transform:none}.prompt-suggestion>svg,.prompt-suggestion>span{transition:none}.prompt-suggestion:hover>svg{transform:none}}.composer-meta{min-width:0;color:hsl(var(--muted-foreground));justify-content:center;align-items:center;gap:8px;padding:7px 12px 0;font-size:11px;line-height:1.4;display:flex}.composer-session-line{white-space:nowrap;align-items:center;gap:4px;min-width:0;display:flex}.composer-session-id{text-overflow:ellipsis;max-width:300px;font-family:inherit;overflow:hidden}.composer-session-copy{width:18px;height:18px;color:inherit;cursor:pointer;opacity:.72;background:0 0;border:0;border-radius:4px;flex:0 0 18px;place-items:center;padding:0;transition:background .12s,color .12s,opacity .12s;display:inline-grid}.composer-session-copy:hover{background:hsl(var(--foreground) / .06);color:hsl(var(--foreground));opacity:1}.composer-session-copy svg{width:11px;height:11px}.composer-meta-separator{opacity:.55}.composer-runtime-logs{min-height:22px;color:inherit;font:inherit;cursor:pointer;background:0 0;border:0;border-radius:4px;align-items:center;gap:5px;padding:0 3px;transition:background .12s,color .12s;display:inline-flex}.composer-runtime-logs:hover{background:hsl(var(--foreground) / .05);color:hsl(var(--foreground))}.composer-runtime-logs:active{background:hsl(var(--foreground) / .09)}.composer-runtime-logs:focus-visible{outline:2px solid hsl(var(--primary) / .45);outline-offset:1px}.composer-runtime-logs svg{flex:none;width:13px;height:13px}@media (max-width:640px){.composer-meta{flex-wrap:wrap;gap:4px 8px}.composer-session-line{max-width:100%}.composer-session-id{max-width:min(220px,52vw)}}.comp-input{resize:none;color:hsl(var(--foreground));font:inherit;background:0 0;border:none;outline:none;flex:1;max-height:200px;padding:8px 4px;font-size:15px;line-height:1.5;overflow-y:auto}.comp-input::placeholder{color:hsl(var(--muted-foreground))}.comp-icon{width:36px;height:36px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;transition:background .12s,color .12s;display:flex}.comp-icon:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.composer-submit-actions{flex-shrink:0;align-items:center;gap:6px;height:36px;display:flex}.composer--new-chat .composer-submit-actions{display:contents}.comp-send{background:hsl(var(--primary));width:36px;height:36px;color:hsl(var(--primary-foreground));cursor:pointer;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;transition:opacity .15s,transform .1s;display:flex}.comp-send .icon{width:20px;height:20px}.comp-send:hover:not(:disabled){opacity:.85}.comp-send:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.comp-send:active:not(:disabled){transform:scale(.94)}.comp-send:disabled{opacity:.3;cursor:default}.token-usage-indicator{z-index:3;width:28px;height:28px;color:hsl(var(--muted-foreground));cursor:default;border-radius:999px;outline:none;flex:0 0 28px;place-items:center;transition:background-color .14s,color .14s;display:grid;position:relative}.token-usage-indicator:hover{background:hsl(var(--muted) / .72);color:hsl(var(--foreground) / .68)}.token-usage-indicator:focus-visible{color:hsl(var(--foreground) / .68);outline:2px solid hsl(var(--ring) / .45);outline-offset:1px}.token-usage-ring{width:16px;height:16px;overflow:visible}.token-usage-ring__track,.token-usage-ring__value{fill:none;transform-origin:50%;transform:rotate(-90deg)}.token-usage-ring__track{stroke:hsl(var(--muted-foreground) / .3);stroke-width:2.25px}.token-usage-ring__value{stroke:currentColor;stroke-width:2.75px;stroke-linecap:butt;transition:stroke-dasharray .18s ease-out}.token-usage-tooltip{--token-context-system:#4e545f;--token-context-input:#5685b3;--token-context-output:#c48945;--token-context-remaining:hsl(var(--muted));z-index:30;border:1px solid hsl(var(--border));background:hsl(var(--panel));width:360px;box-shadow:0 10px 30px hsl(var(--foreground) / .12);color:hsl(var(--foreground));text-align:left;visibility:hidden;opacity:0;pointer-events:none;border-radius:12px;padding:12px 14px;font-size:12px;font-weight:400;line-height:1.5;transition:visibility 0s linear .14s,opacity .14s,transform .14s;position:absolute;bottom:calc(100% + 10px);right:-42px;transform:translateY(4px)}.token-usage-indicator:hover .token-usage-tooltip,.token-usage-indicator:focus-visible .token-usage-tooltip{visibility:visible;opacity:1;transition-delay:0s;transform:translateY(0)}.token-usage-tooltip__header{justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:10px;display:flex}.token-usage-tooltip__header strong{font-size:13px;font-weight:600}.token-usage-tooltip__header span{color:hsl(var(--muted-foreground));font-size:11.5px;font-weight:500}.token-usage-tooltip__title{color:hsl(var(--muted-foreground));margin-bottom:4px;font-size:11.5px;font-weight:500}.token-usage-tooltip__unknown{font-size:13px;font-weight:550}.token-context-grid{background:hsl(var(--muted) / .34);border-radius:9px;grid-template-columns:repeat(10,10px);align-self:start;gap:4px;padding:10px;display:grid}.token-context-breakdown{grid-template-columns:max-content minmax(0,1fr);align-items:start;gap:16px;display:grid}.token-context-cell{background:var(--token-context-remaining);width:10px;height:10px;box-shadow:inset 0 0 0 1px hsl(var(--border) / .72);border-radius:2px;display:flex;overflow:hidden}.token-context-cell__slice{min-width:0;height:100%}.token-context-cell__slice.is-system,.token-context-swatch.is-system{background:var(--token-context-system)}.token-context-cell__slice.is-input,.token-context-swatch.is-input{background:var(--token-context-input)}.token-context-cell__slice.is-output,.token-context-swatch.is-output{background:var(--token-context-output)}.token-context-cell__slice.is-remaining,.token-context-swatch.is-remaining{background:var(--token-context-remaining)}.token-context-legend{gap:9px;margin:0;padding:6px 0;display:grid}.token-context-legend>div{justify-content:space-between;align-items:center;gap:6px;min-width:0;display:flex}.token-context-legend dt{min-width:0;color:hsl(var(--muted-foreground));white-space:nowrap;align-items:center;gap:5px;display:flex}.token-context-legend dd{white-space:nowrap;margin:0;font-weight:550}.token-context-legend em{background:hsl(var(--muted));border-radius:999px;padding:1px 4px;font-size:9.5px;font-style:normal;font-weight:500;line-height:1.35}.token-context-summary{border-top:1px solid hsl(var(--border));color:hsl(var(--muted-foreground));gap:2px;margin-top:12px;padding-top:10px;font-size:11.5px;display:grid}.token-context-summary strong{color:hsl(var(--foreground));font-weight:600}.token-context-swatch{width:8px;height:8px;box-shadow:inset 0 0 0 1px hsl(var(--border) / .72);border-radius:2px;flex:0 0 8px}.token-usage-tooltip__overflow{color:hsl(var(--destructive));margin-top:9px;font-size:11px;font-weight:500}.token-usage-tooltip__model{border-top:1px solid hsl(var(--border));color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;margin-top:10px;padding-top:8px;font-size:11px;overflow:hidden}@media (prefers-reduced-motion:reduce){.token-usage-indicator,.token-usage-ring__value,.token-usage-tooltip{transition:none}}.invocation-chips{flex-wrap:wrap;gap:6px;min-width:0;display:flex}.composer>.invocation-chips{padding:0 8px 8px}.turn--user>.invocation-chips{justify-content:flex-end;margin-bottom:6px}.invocation-chip{border:1px solid hsl(var(--border));background:hsl(var(--background));max-width:260px;min-height:28px;color:hsl(var(--foreground));box-shadow:0 1px 2px hsl(var(--foreground) / .025);border-radius:8px;align-items:center;gap:5px;padding:4px 8px;font-size:12px;font-weight:560;line-height:1.2;display:inline-flex}.invocation-chip--skill{color:#267848}.invocation-chip--agent{color:#2762b0}.invocation-chip>svg{flex:none;width:13px;height:13px}.invocation-chip>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.invocation-chip button{color:currentColor;cursor:pointer;opacity:.55;background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;width:17px;height:17px;margin:-1px -3px -1px 1px;padding:0;display:inline-flex}.invocation-chip button:hover{background:hsl(var(--accent));opacity:1}.invocation-chip button svg{width:11px;height:11px}.composer-command-menu{z-index:34;border:1px solid hsl(var(--border));background:hsl(var(--background));width:min(500px,100vw - 48px);box-shadow:0 2px 7px hsl(var(--foreground) / .08),0 22px 60px -24px hsl(var(--foreground) / .28);transform-origin:0 100%;border-radius:14px;animation:.13s ease-out command-menu-in;position:absolute;bottom:calc(100% + 10px);left:0;overflow:hidden}@keyframes command-menu-in{0%{opacity:0;transform:translateY(5px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}.composer-command-head{border-bottom:1px solid hsl(var(--border));height:38px;color:hsl(var(--muted-foreground));letter-spacing:.02em;align-items:center;gap:7px;padding:0 10px 0 12px;font-size:11px;font-weight:650;display:flex}.composer-command-head>svg{width:13px;height:13px}.composer-command-head>span{flex:1}.composer-command-menu kbd{border:1px solid hsl(var(--border));background:hsl(var(--canvas));min-width:22px;color:hsl(var(--muted-foreground));text-align:center;border-radius:5px;padding:2px 5px;font:10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.composer-command-list{max-height:min(330px,42vh);padding:5px;display:grid;overflow-y:auto}.composer-command-item{width:100%;min-height:52px;color:hsl(var(--foreground));font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;border-radius:9px;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:9px;padding:6px 8px;display:grid}.composer-command-item.is-active{background:hsl(var(--accent))}.composer-command-icon{border-radius:9px;justify-content:center;align-items:center;width:34px;height:34px;display:inline-flex}.composer-command-icon--skill{color:#218349;background:#e7f8ee}.composer-command-icon--agent{color:#2664b5;background:#e9f1fc}.composer-command-icon svg{width:16px;height:16px}.composer-command-copy{gap:3px;min-width:0;display:grid}.composer-command-copy strong{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:620;line-height:1.2;overflow:hidden}.composer-command-copy>span{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.3;overflow:hidden}.composer-command-empty{min-height:68px;color:hsl(var(--muted-foreground));justify-content:center;align-items:center;gap:7px;padding:14px;font-size:12px;display:flex}.composer-command-empty svg{width:14px;height:14px}.composer-menu-wrap{flex-shrink:0;position:relative}.composer-menu{z-index:31;background:hsl(var(--background));border:1px solid hsl(var(--border));min-width:168px;box-shadow:0 6px 20px hsl(var(--foreground) / .12);border-radius:12px;margin-bottom:6px;padding:4px;position:absolute;bottom:100%;left:0}.media-grid{flex-wrap:wrap;gap:8px;max-width:min(620px,100%);display:flex}.turn--user .media-grid{justify-content:flex-end}.composer>.media-grid{justify-content:flex-start;padding:0 8px 9px}.media-card{border:1px solid hsl(var(--border));background:hsl(var(--background));width:272px;min-width:0;box-shadow:0 1px 2px hsl(var(--foreground) / .025);border-radius:14px;transition:border-color .16s,box-shadow .16s,transform .16s;position:relative;overflow:visible}.media-card:hover{border-color:hsl(var(--foreground) / .2);box-shadow:0 8px 28px -20px hsl(var(--foreground) / .28);transform:translateY(-1px)}.media-card--image{width:176px}.media-grid--compact .media-card{width:224px}.media-grid--compact .media-card--image{width:92px}.media-card-main{border-radius:inherit;width:100%;min-width:0;height:68px;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:11px;padding:10px 12px;display:flex}.media-card-main:disabled{cursor:default}.media-card--image .media-card-main{height:132px;padding:4px;display:block}.media-grid--compact .media-card-main{height:58px;padding:8px 10px}.media-grid--compact .media-card--image .media-card-main{height:72px;padding:3px}.media-card-image{object-fit:cover;background:hsl(var(--muted));border-radius:10px;width:100%;height:100%;display:block}.media-card--image .media-card-copy,.media-card--image .media-card-open{display:none}.media-card-icon{width:40px;height:44px;color:hsl(var(--muted-foreground));background:hsl(var(--muted));border-radius:9px;flex:none;justify-content:center;align-items:center;display:inline-flex}.media-card--pdf .media-card-icon{color:#db2a24;background:#fdeded}.media-card--video .media-card-icon{color:#226cd3;background:#edf3fd}.media-card--markdown .media-card-icon{color:#259353;background:#ebfaf1}.media-card-icon svg{width:21px;height:21px}.media-card-video-container{background:#131316;place-items:center;width:100%;height:100%;display:grid;position:relative;overflow:hidden}.media-card-video{object-fit:cover;opacity:.85;width:100%;height:100%}.media-card-video-play{color:#fff;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#0000008c;border-radius:50%;place-items:center;width:48px;height:48px;transition:transform .18s,background .18s;display:grid;position:absolute;transform:scale(1)}.media-card-video-play svg{width:20px;height:20px;margin-left:3px}.media-card-main:hover .media-card-video-play{background:#000000b3;transform:scale(1.08)}.media-card-copy{flex:1;gap:5px;min-width:0;display:grid}.media-card-name{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:560;line-height:1.2;overflow:hidden}.media-card-meta{min-width:0;color:hsl(var(--muted-foreground));align-items:center;gap:5px;font-size:11px;line-height:1.2;display:flex}.media-card-type{letter-spacing:.06em;font-size:9px;font-weight:700}.media-card-open{width:14px;height:14px;color:hsl(var(--muted-foreground));opacity:0;flex:none;transition:opacity .15s}.media-card:hover .media-card-open{opacity:1}.media-card-spinner{width:12px;height:12px;animation:.85s linear infinite spin}.media-card--error{border-color:hsl(var(--destructive) / .42)}.media-card--error .media-card-meta{color:hsl(var(--destructive))}.media-card-remove{z-index:2;border:1px solid hsl(var(--border));background:hsl(var(--background));width:21px;height:21px;color:hsl(var(--muted-foreground));box-shadow:0 2px 8px hsl(var(--foreground) / .12);cursor:pointer;border-radius:999px;justify-content:center;align-items:center;padding:0;display:inline-flex;position:absolute;top:-7px;right:-7px}.media-card-remove:hover{color:hsl(var(--foreground))}.media-card-remove svg{width:12px;height:12px}.media-viewer-backdrop{z-index:90;-webkit-backdrop-filter:blur(12px)saturate(.8);backdrop-filter:blur(12px)saturate(.8);background:#131316b8;place-items:center;padding:28px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.media-viewer{border:1px solid hsl(var(--foreground) / .13);background:hsl(var(--background));border-radius:18px;flex-direction:column;width:min(1080px,94vw);height:min(820px,90vh);display:flex;overflow:hidden;box-shadow:0 32px 100px #07070875}.media-viewer-header{border-bottom:1px solid hsl(var(--border));background:hsl(var(--background) / .94);justify-content:space-between;align-items:center;gap:18px;min-height:58px;padding:9px 12px 9px 18px;display:flex}.media-viewer-header>div{gap:2px;min-width:0;display:grid}.media-viewer-header strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:620;overflow:hidden}.media-viewer-header span{color:hsl(var(--muted-foreground));font-size:11px}.media-viewer-header nav{gap:4px;display:flex}.media-viewer-header a,.media-viewer-header button{width:36px;height:36px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;border-radius:9px;justify-content:center;align-items:center;padding:0;display:inline-flex}.media-viewer-header a:hover,.media-viewer-header button:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.media-viewer-header svg{width:17px;height:17px}.media-viewer-body{background:hsl(var(--canvas));flex:1;min-height:0;overflow:auto}.media-viewer-body--image,.media-viewer-body--video{background:#161618;place-items:center;padding:24px;display:grid}.media-viewer-body--image img,.media-viewer-body--video video{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%}.media-viewer-video-wrapper{place-items:center;width:100%;display:grid}.media-viewer-video{background:#000;border-radius:12px;max-width:100%;max-height:calc(90vh - 140px);box-shadow:0 4px 20px #0006}.media-viewer-body--pdf iframe{background:#fff;border:none;width:100%;height:100%;display:block}.media-document{border:1px solid hsl(var(--border));background:hsl(var(--background));width:min(820px,100% - 48px);box-shadow:0 12px 38px -30px hsl(var(--foreground) / .3);border-radius:12px;margin:24px auto;padding:34px 40px}.media-document--plain{white-space:pre-wrap;word-break:break-word;min-height:calc(100% - 48px);font:13px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace}.media-viewer-loading{height:100%;color:hsl(var(--muted-foreground));justify-content:center;align-items:center;gap:8px;font-size:13px;display:flex}.media-viewer-loading svg{width:17px;height:17px;animation:.85s linear infinite spin}@media (max-width:640px){.composer-command-menu{width:auto;right:0}.media-card{width:min(272px,82vw)}.media-viewer-backdrop{padding:0}.media-viewer{border:none;border-radius:0;width:100vw;height:100vh}.media-document{width:calc(100% - 24px);margin:12px auto;padding:22px 18px}.md .image-preview-trigger{max-width:100%}}.a2ui-surface{width:100%;max-width:360px;font-size:14px}.a2ui-card{background:hsl(var(--card));border:1px solid hsl(var(--border));box-shadow:0 1px 2px hsl(var(--foreground) / .04),0 8px 24px -16px hsl(var(--foreground) / .18);border-radius:8px;padding:18px}.a2ui-column,.a2ui-row{gap:10px}.a2ui-text{color:hsl(var(--foreground));margin:0;line-height:1.5}.a2ui-text--h1{letter-spacing:0;font-size:19px;font-weight:650}.a2ui-text--h2{letter-spacing:0;font-size:16px;font-weight:650}.a2ui-text--h3{font-size:14px;font-weight:600}.a2ui-text--h4{color:hsl(var(--muted-foreground));text-transform:uppercase;letter-spacing:0;font-size:12px;font-weight:600}.a2ui-text--caption{color:hsl(var(--muted-foreground));font-size:12px}.a2ui-text--body{font-size:14px}.a2ui-icon{color:hsl(var(--muted-foreground));justify-content:center;align-items:center;font-size:15px;line-height:1;display:inline-flex}.a2ui-divider--h{background:hsl(var(--border));width:100%;height:1px;margin:4px 0}.a2ui-divider--v{background:hsl(var(--border));align-self:stretch;width:1px}.a2ui-button{background:hsl(var(--secondary));color:hsl(var(--secondary-foreground));cursor:pointer;font:inherit;border:1px solid #0000;border-radius:10px;padding:8px 14px;font-size:13px;font-weight:500;transition:background .15s,opacity .15s}.a2ui-button:hover{background:hsl(var(--accent))}.a2ui-button--primary{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.a2ui-button--primary:hover{background:hsl(var(--primary));opacity:.88}.a2ui-button--borderless{color:hsl(var(--foreground));background:0 0}.a2ui-button--borderless:hover{background:hsl(var(--accent))}.a2ui-surface[data-a2ui-surface^=flight-]{max-width:520px}.a2ui-surface[data-a2ui-surface^=flight-] .a2ui-card{background:linear-gradient(180deg,#f6fbfe,hsl(var(--card)) 42%),hsl(var(--card));box-shadow:0 1px 2px hsl(var(--foreground) / .05),0 18px 48px -28px #283d5359;border-color:#d7e0ea;padding:0;overflow:hidden}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-content]{gap:16px;padding:18px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-top]{gap:12px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-brand]{min-width:0}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-brand-icon]{color:#004fa3;background:#006fe61a;border-radius:999px;width:28px;height:28px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-title]{color:#41454e;white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-status-chip]{background:#e3f8ed;border:1px solid #bbe7d2;border-radius:999px;flex-shrink:0;gap:6px;padding:5px 9px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-status-chip] .a2ui-icon,.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-status-text]{color:#126e41}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-hero]{background:hsl(var(--background) / .88);border:1px solid #dde6ee;border-radius:8px;gap:16px;padding:18px;position:relative}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-origin],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-destination]{flex:1 1 0;gap:2px;min-width:0}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-origin-code],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-destination-code]{color:#191d24;font-size:34px;font-weight:760;line-height:1}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-origin-label],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-destination-label]{color:#717784;font-size:11px;font-weight:700}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-origin-city],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-destination-city]{color:#545964;font-size:13px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-route-mark]{flex:none;gap:3px;padding:0 4px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-route-icon]{color:#0054ad;background:#006fe61f;border-radius:999px;width:34px;height:34px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-duration],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-aircraft]{white-space:nowrap;font-size:11px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-times],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-details]{gap:10px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-departure-time],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-arrival-time],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-terminal],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-gate],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-boarding]{background:#f3f4f6;border:1px solid #e5e7eb;border-radius:8px;flex:1 1 0;gap:2px;min-width:0;padding:11px 12px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-departure-value],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-arrival-value]{font-size:14px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-departure-airport],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-arrival-airport]{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-terminal-value],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-gate-value],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-boarding-value]{font-size:20px;line-height:1.15}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-footer]{gap:10px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-divider]{background:#d9e0e8;margin:0}@media (max-width:520px){.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-content]{padding:14px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-hero],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-times],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-details]{flex-wrap:wrap}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-route-mark]{order:3;width:100%}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-terminal],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-gate],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-boarding]{min-width:120px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-origin-code],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-destination-code]{font-size:34px}}.a2ui-fallback{background:hsl(var(--muted));border:1px solid hsl(var(--border));color:hsl(var(--muted-foreground));border-radius:10px;padding:8px 10px;font-size:12px}.a2ui-fallback pre{margin:6px 0 0;overflow-x:auto}.boot{background:hsl(var(--background));height:100vh}.boot-error{color:hsl(var(--foreground));flex-direction:column;justify-content:center;align-items:center;gap:12px;font-size:14px;display:flex}.boot-error p{margin:0}.boot-error button,.login-provider-error button{border:1px solid hsl(var(--border));background:hsl(var(--card));color:hsl(var(--foreground));font:inherit;cursor:pointer;border-radius:8px;padding:7px 18px;font-size:13px}.boot-error button:hover,.login-provider-error button:hover{background:hsl(var(--accent))}.navbar{background:0 0;flex:0 0 54px;justify-content:space-between;align-items:center;gap:16px;min-height:54px;padding:0 10px;display:flex}.navbar-left,.navbar-right,.navbar-default,.navbar-portal-slot,.navbar-portal-actions{align-items:center;display:flex}.navbar-left{flex:1;min-width:0;container-type:inline-size}.navbar-default{min-width:0}.navbar-title-group{align-items:center;gap:6px;min-width:0;display:flex}.loading-gap-spinner{box-sizing:border-box;border:1.5px solid #111;border-right-color:#0000;border-radius:50%;flex:0 0 16px;width:16px;height:16px;animation:.7s linear infinite loading-gap-spin;display:inline-block}@keyframes loading-gap-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.loading-gap-spinner{animation-duration:1.4s}}.agent-info-trigger{width:30px;height:30px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:7px;flex:0 0 30px;justify-content:center;align-items:center;padding:0;transition:background .15s,color .15s;display:inline-flex}.agent-info-trigger:hover,.agent-info-trigger[aria-expanded=true]{background:hsl(var(--foreground) / .06);color:hsl(var(--foreground))}.agent-info-trigger:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:1px}.agent-info-trigger svg{width:17px;height:17px}.navbar-right{flex:none;gap:10px;min-width:0}.navbar-portal-slot,.navbar-portal-actions{min-width:0}.navbar-portal-slot:empty,.navbar-portal-actions:empty,.navbar-left:has(.navbar-portal-slot:not(:empty))>.navbar-default{display:none}.global-deploy-center{z-index:38;position:relative}.global-deploy-task{border:1px solid hsl(var(--border));background:hsl(var(--background) / .82);max-width:300px;min-height:32px;color:hsl(var(--muted-foreground));font:inherit;white-space:nowrap;cursor:pointer;border-radius:7px;outline:none;align-items:center;gap:7px;padding:0 10px;font-size:12px;transition:border-color .12s,background-color .12s;display:flex}.global-deploy-task:hover{background:hsl(var(--background))}.global-deploy-task:focus-visible{border-color:hsl(var(--ring) / .32);box-shadow:0 0 0 2px hsl(var(--ring) / .07)}.global-deploy-task.is-idle{color:hsl(var(--muted-foreground))}.global-deploy-task.is-running{color:#1863b4;border-color:#0c77e93d}.global-deploy-task.is-success{color:#277c46;border-color:#279b5138}.global-deploy-task.is-error{border-color:hsl(var(--destructive) / .24);color:hsl(var(--destructive))}.global-deploy-task.is-cancelled{color:hsl(var(--muted-foreground))}.global-deploy-task-icon{flex:none;width:14px;height:14px}.global-deploy-task-detail{text-overflow:ellipsis;overflow:hidden}.global-deploy-task-chevron{flex:none;width:13px;height:13px;transition:transform .14s}.global-deploy-task-chevron.is-open{transform:rotate(180deg)}.global-deploy-task-scrim{z-index:1;background:0 0;border:0;padding:0;position:fixed;top:0;right:0;bottom:0;left:0}.global-deploy-popover{z-index:2;border:1px solid hsl(var(--border));background:hsl(var(--background));width:390px;max-width:calc(100vw - 32px);box-shadow:0 14px 36px hsl(var(--foreground) / .14);border-radius:10px;position:absolute;top:40px;right:0;overflow:hidden}.global-deploy-popover-head{border-bottom:1px solid hsl(var(--border));height:44px;color:hsl(var(--foreground));justify-content:space-between;align-items:center;padding:0 14px;font-size:13px;font-weight:650;display:flex}.global-deploy-popover-head span:last-child{background:hsl(var(--secondary));min-width:20px;color:hsl(var(--muted-foreground));text-align:center;border-radius:999px;padding:1px 6px;font-size:11px}.global-deploy-list{max-height:min(520px,100vh - 82px);padding:8px;overflow-y:auto}.global-deploy-empty{color:hsl(var(--muted-foreground));text-align:center;padding:34px 16px;font-size:12.5px}.global-deploy-item{border:1px solid hsl(var(--border) / .8);background:hsl(var(--canvas) / .42);border-radius:8px;padding:12px}.global-deploy-item+.global-deploy-item{margin-top:7px}.global-deploy-item-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.global-deploy-runtime-name{min-width:0;color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:650;overflow:hidden}.global-deploy-status{color:hsl(var(--muted-foreground));flex:none;font-size:11.5px}.global-deploy-item.is-running .global-deploy-status{color:#1863b4}.global-deploy-item.is-success .global-deploy-status{color:#277c46}.global-deploy-item.is-error .global-deploy-status{color:hsl(var(--destructive))}.global-deploy-item.is-cancelled .global-deploy-status{color:hsl(var(--muted-foreground))}.global-deploy-meta{grid-template-columns:1fr 1fr;gap:9px 14px;margin:11px 0 0;display:grid}.global-deploy-meta>div{min-width:0}.global-deploy-meta dt{color:hsl(var(--muted-foreground));margin-bottom:3px;font-size:10.5px}.global-deploy-meta dd{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:11.5px;overflow:hidden}.global-deploy-message{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;margin:10px 0 0;font-size:11.5px;line-height:1.45;overflow:hidden}.global-deploy-error{color:hsl(var(--muted-foreground));margin-top:10px;font-size:11.5px}.deploy-error-message-text{-webkit-line-clamp:3;overflow-wrap:anywhere;white-space:pre-wrap;-webkit-box-orient:vertical;margin:0;line-height:1.5;display:-webkit-box;overflow:hidden}.deploy-error-message.is-expanded .deploy-error-message-text{-webkit-line-clamp:unset;max-height:280px;display:block;overflow:auto}.deploy-error-message-actions{justify-content:flex-end;gap:2px;margin-top:6px;display:flex}.deploy-error-message-actions .deploy-error-retry{margin-right:auto}.global-deploy-progress{background:hsl(var(--foreground) / .08);border-radius:999px;height:3px;margin-top:10px;overflow:hidden}.global-deploy-progress span{border-radius:inherit;background:#2581e4;height:100%;transition:width .18s;display:block}.global-deploy-item-actions{justify-content:flex-end;margin-top:9px;display:flex}.global-deploy-item-actions button{border:1px solid hsl(var(--border));background:hsl(var(--background));min-height:27px;color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;border-radius:5px;padding:0 9px;font-size:11.5px}.global-deploy-item-actions button:hover:not(:disabled){border-color:hsl(var(--destructive) / .3);background:hsl(var(--destructive) / .05);color:hsl(var(--destructive))}.global-deploy-item-actions button:disabled{opacity:.55;cursor:default}.navbar-title{letter-spacing:-.01em;color:hsl(var(--foreground));padding:5px 8px;font-size:16px;font-weight:650}.agent-dd{min-width:0;max-width:33.333cqw;position:relative}.agent-dd-trigger{color:hsl(var(--foreground));font:inherit;letter-spacing:-.01em;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:5px;max-width:100%;padding:5px 8px;font-size:16px;font-weight:650;transition:background .12s;display:inline-flex}.agent-dd-trigger:hover{background:hsl(var(--foreground) / .05)}.agent-dd-current{white-space:nowrap;text-overflow:ellipsis;min-width:0;max-width:100%;overflow:hidden}.agent-dd-chev{opacity:.6;width:16px;height:16px;transition:transform .2s}.agent-dd-chev.open{transform:rotate(180deg)}.agent-switch{letter-spacing:-.01em;align-items:center;gap:6px;min-width:0;max-width:33.333cqw;padding:5px 8px;font-size:16px;font-weight:650;display:inline-flex}.agent-switch-action{width:28px;height:28px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:7px;flex:0 0 28px;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.agent-switch-action:hover{background:hsl(var(--foreground) / .06);color:hsl(var(--foreground))}.agent-switch-action:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:1px}.agent-switch-action svg{width:16px;height:16px}@keyframes ddpop{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.account{position:relative}.account-avatar{isolation:isolate;background:radial-gradient(circle at var(--avatar-x,32%) var(--avatar-y,30%),hsl(var(--avatar-hue-a,202) 100% 92%) 0 12%,hsl(var(--avatar-hue-a,202) 95% 75% / .76) 34%,transparent 62%),radial-gradient(ellipse at 82% 78%,hsl(var(--avatar-hue-c,185) 86% 49% / .88) 0 18%,transparent 58%),linear-gradient(142deg,hsl(var(--avatar-hue-b,222) 94% 83%),hsl(var(--avatar-hue-b,222) 95% 54%) 52%,hsl(var(--avatar-hue-c,185) 74% 62%));cursor:pointer;width:18px;height:18px;box-shadow:none;background-position:20% 12%,80% 80%,50%;background-size:180% 180%,160% 160%,100% 100%;border:none;border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;transition:filter .16s,transform .16s;animation:9s ease-in-out infinite alternate avatar-smoke-drift;display:flex;position:relative;overflow:hidden}.account-avatar:hover{filter:saturate(1.12)brightness(1.03);transform:scale(1.035)}.account-avatar.has-image{animation:none}.account-avatar-image{z-index:1;border-radius:inherit;object-fit:cover;width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0}@keyframes avatar-smoke-drift{0%{background-position:18% 12%,82% 84%,50%}50%{background-position:58% 42%,54% 62%,50%}to{background-position:82% 70%,26% 24%,50%}}.account-avatar--lg{cursor:default;border-radius:999px;width:40px;height:40px}.account-pop{z-index:31;background:hsl(var(--panel));border:1px solid hsl(var(--border));min-width:220px;box-shadow:0 8px 28px hsl(var(--foreground) / .14);border-radius:14px;padding:12px;animation:.12s ddpop;position:absolute;top:calc(100% + 8px);right:0}.account-head{align-items:center;gap:10px;display:flex}.account-id{flex:1;min-width:0}.account-name-row{align-items:center;gap:8px;min-width:0;display:flex}.account-name{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:14px;font-weight:600;overflow:hidden}.account-sub{color:hsl(var(--muted-foreground));white-space:nowrap;text-overflow:ellipsis;margin-top:2px;font-size:12px;line-height:1.35;overflow:hidden}.account-action{width:100%;color:hsl(var(--foreground));font:inherit;cursor:pointer;background:0 0;border:none;border-radius:10px;align-items:center;gap:8px;margin-top:10px;padding:9px 10px;font-size:13px;transition:background .12s;display:flex}.account-action+.account-action{margin-top:2px}.account-action:hover{background:hsl(var(--foreground) / .05)}.account-action .icon{width:16px;height:16px;color:hsl(var(--muted-foreground))}.sidebar-footer{flex-shrink:0;margin-top:auto}.sidebar-user{flex-shrink:0;padding:8px 10px 12px;position:relative}.sidebar-user-row{align-items:center;gap:4px;display:flex}.sidebar-user-btn{min-width:0;color:hsl(var(--foreground));font:inherit;cursor:pointer;background:0 0;border:none;border-radius:10px;flex:1;align-items:center;gap:9px;padding:7px 8px;transition:background .12s;display:flex}.sidebar-user-btn:hover{background:hsl(var(--foreground) / .05)}.sidebar-user-identity{flex:1;align-items:center;min-width:0;display:flex}.sidebar-user-name{text-align:left;white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:13px;font-weight:500;overflow:hidden}.sidebar-user-shortcuts{flex-shrink:0;align-items:center;gap:2px;display:flex}.sidebar-user-shortcut{width:28px;height:28px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;border-radius:7px;flex-shrink:0;place-items:center;padding:0;transition:background .12s,color .12s;display:inline-grid}.sidebar-user-shortcut:hover,.sidebar-user-shortcut.is-active{background:hsl(var(--foreground) / .06);color:hsl(var(--foreground))}.sidebar-user-shortcut:focus-visible{outline:2px solid hsl(var(--ring) / .28);outline-offset:1px}.sidebar-user-shortcut .icon{width:16px;height:16px}.sidebar.is-collapsed .sidebar-user-btn{flex:0 0 36px;justify-content:center;gap:0;width:36px;height:36px;padding:2px;overflow:hidden}.sidebar.is-collapsed .sidebar-user-identity,.sidebar.is-collapsed .sidebar-user-shortcuts{display:none}.sidebar.is-collapsed .sidebar-user-pop{width:220px;left:8px;right:auto}@media (prefers-reduced-motion:reduce){.sidebar{transition:none}}.sidebar-user-pop{position:absolute;inset:auto 10px calc(100% - 4px)}.skillcenter-pager button:focus-visible,.skill-detail-close:focus-visible{outline:2px solid hsl(var(--ring) / .28);outline-offset:1px}.skillcenter-status{background:hsl(var(--muted));color:hsl(var(--muted-foreground));border-radius:999px;flex-shrink:0;padding:2px 6px;font-size:10.5px;line-height:16px}.skillcenter-status.is-positive{color:#1d7742;background:#e7f8ee}.skillcenter-status.is-progress{color:#8d5911;background:#fdf5e3}.skillcenter-status.is-danger{color:hsl(var(--destructive));background:hsl(var(--destructive) / .09)}.skillcenter-pager{border-top:1px solid hsl(var(--border));height:44px;color:hsl(var(--muted-foreground));flex:0 0 44px;justify-content:space-between;align-items:center;gap:12px;padding:0 12px;font-size:11.5px;display:flex}.skillcenter-pager-actions{align-items:center;gap:7px;display:flex}.skillcenter-pager-actions>span{text-align:center;min-width:38px}.skillcenter-pager button,.skill-detail-close{color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:6px;place-items:center;display:grid}.skillcenter-pager button{width:26px;height:26px;padding:0}.skillcenter-pager button:hover:not(:disabled),.skill-detail-close:hover{color:hsl(var(--foreground));background:hsl(var(--accent))}.skillcenter-pager button:disabled{opacity:.35;cursor:default}.skillcenter-pager button .icon{width:17px;height:17px}.skillcenter-empty,.skillcenter-loading,.skillcenter-error{min-height:130px;color:hsl(var(--muted-foreground));text-align:center;overflow-wrap:anywhere;justify-content:center;align-items:center;gap:8px;padding:24px;font-size:12.5px;line-height:1.55;display:flex}.skillcenter-error{color:hsl(var(--destructive))}.skillcenter-loading--overlay{z-index:2;background:hsl(var(--background) / .82);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);min-height:0;position:absolute;top:0;right:0;bottom:0;left:0}.skillcenter-loading-mark{border:1.5px solid hsl(var(--foreground) / .16);border-top-color:hsl(var(--foreground) / .62);border-radius:50%;flex-shrink:0;width:14px;height:14px;animation:.8s linear infinite spin}.skill-detail-backdrop{z-index:80;background:hsl(var(--foreground) / .25);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);place-items:center;padding:16px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.skill-detail-dialog{border:1px solid hsl(var(--border));background:hsl(var(--background));width:min(760px,100%);height:min(760px,100%);min-height:0;box-shadow:0 18px 48px hsl(var(--foreground) / .16);border-radius:12px;flex-direction:column;display:flex;overflow:hidden}.skill-detail-head{border-bottom:1px solid hsl(var(--border));flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:16px;padding:16px 18px 14px;display:flex}.skill-detail-heading{align-items:flex-start;gap:11px;min-width:0;display:flex}.skill-detail-heading>div{min-width:0}.skill-detail-heading h2{text-overflow:ellipsis;white-space:nowrap;margin:1px 0 4px;font-size:16px;font-weight:650;line-height:22px;overflow:hidden}.skill-detail-heading p{color:hsl(var(--muted-foreground));overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:12px;line-height:17px;display:-webkit-box;overflow:hidden}.skill-detail-close{flex:0 0 30px;width:30px;height:30px;padding:0}.skill-detail-meta{border-bottom:1px solid hsl(var(--border));background:hsl(var(--canvas) / .45);flex-shrink:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 18px;margin:0;padding:14px 18px;display:grid}.skill-detail-meta>div{min-width:0}.skill-detail-meta dt{color:hsl(var(--muted-foreground));margin-bottom:3px;font-size:10.5px}.skill-detail-meta dd{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:12px;line-height:17px;overflow:hidden}.skill-detail-content{flex-direction:column;flex:1;min-height:0;display:flex}.skill-detail-content-title{border-bottom:1px solid hsl(var(--border));flex:0 0 40px;align-items:center;height:40px;padding:0 18px;font-size:12px;font-weight:600;display:flex}.skill-detail-content>.skillcenter-loading,.skill-detail-content>.skillcenter-error,.skill-detail-content>.skillcenter-empty{flex:1;min-height:0}.skill-detail-markdown{overflow-wrap:anywhere;flex:1;min-height:0;padding:18px 22px 28px;overflow-y:auto}@media (max-width:760px){.skill-detail-meta{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:560px){.skill-detail-backdrop{padding:8px}.skill-detail-dialog{border-radius:10px}.skill-detail-meta{grid-template-columns:minmax(0,1fr);gap:8px;max-height:180px;overflow-y:auto}}.addagent{flex:1;justify-content:center;align-items:flex-start;min-height:0;padding:8vh 16px 16px;display:flex;overflow-y:auto}.addagent-card{width:100%;max-width:480px}.addagent-title{letter-spacing:-.01em;margin:0 0 6px;font-size:20px;font-weight:650}.addagent-sub{color:hsl(var(--muted-foreground));margin:0 0 22px;font-size:13px;line-height:1.6}.addagent-field{margin-bottom:14px;display:block}.addagent-label{color:hsl(var(--muted-foreground));margin-bottom:6px;font-size:12.5px;font-weight:500;display:block}.addagent-input{border:1px solid hsl(var(--border));width:100%;font:inherit;background:hsl(var(--background));color:hsl(var(--foreground));border-radius:10px;padding:10px 12px;font-size:14px}.addagent-input:focus{border-color:hsl(var(--ring) / .4);outline:none}.addagent-error{background:hsl(var(--destructive) / .1);color:hsl(var(--destructive));border-radius:10px;margin:4px 0 14px;padding:9px 12px;font-size:12.5px;line-height:1.5}.addagent-actions{justify-content:flex-end;gap:8px;margin-top:4px;display:flex}.addagent-btn{font:inherit;cursor:pointer;border:1px solid #0000;border-radius:10px;align-items:center;gap:7px;padding:9px 16px;font-size:14px;font-weight:500;transition:background .12s,opacity .12s;display:inline-flex}.addagent-btn--ghost{border-color:hsl(var(--border));color:hsl(var(--foreground));background:0 0}.addagent-btn--ghost:hover{background:hsl(var(--foreground) / .05)}.addagent-btn--primary{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.addagent-btn--primary:hover:not(:disabled){opacity:.88}.addagent-btn:disabled{opacity:.4;cursor:default}.addagent-btn .icon{width:15px;height:15px}.search{flex-direction:column;flex:1;width:100%;max-width:720px;min-height:0;margin:0 auto;padding:28px 16px 16px;display:flex}.search-box{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:12px;align-items:center;gap:0;padding:5px 6px;transition:border-color .16s,box-shadow .16s;display:flex;position:relative}.search-box:focus-within{border-color:hsl(var(--foreground) / .3);box-shadow:0 0 0 3px hsl(var(--foreground) / .035)}.search-source-picker-wrap{flex:none;position:relative}.search-source-picker{max-width:176px;height:34px;color:hsl(var(--foreground));font:inherit;cursor:pointer;background:0 0;border:0;border-radius:7px;align-items:center;gap:5px;padding:0 8px;display:inline-flex}.search-source-picker:hover,.search-source-picker[aria-expanded=true]{background:hsl(var(--foreground) / .045)}.search-source-picker>span{flex:none;font-size:13px;font-weight:550}.search-source-picker>small{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:400;overflow:hidden}.search-source-chevron{width:12px;height:12px;color:hsl(var(--muted-foreground));flex:none;transition:transform .15s}.search-source-chevron.open{transform:rotate(180deg)}.search-source-menu{z-index:30;border:1px solid hsl(var(--border));background:hsl(var(--panel));width:224px;box-shadow:0 12px 28px hsl(var(--foreground) / .1);border-radius:9px;flex-direction:column;padding:5px;display:flex;position:absolute;top:calc(100% + 9px);left:-6px}.search-source-menu>button{min-width:0;color:hsl(var(--foreground));font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:6px;flex-direction:column;gap:2px;padding:8px 9px;display:flex}.search-source-menu>button:hover:not(:disabled),.search-source-menu>button[aria-selected=true]{background:hsl(var(--foreground) / .055)}.search-source-menu>button:disabled{color:hsl(var(--muted-foreground));cursor:default}.search-source-menu>button>span{font-size:12.5px;font-weight:550}.search-source-menu>button>small{max-width:100%;color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;overflow:hidden}.search-box-divider{background:hsl(var(--border));width:1px;height:18px;margin:0 11px 0 5px}.search-input{color:hsl(var(--foreground));font:inherit;background:0 0;border:none;outline:none;flex:1;font-size:15px}.search-input::placeholder{color:hsl(var(--muted-foreground))}.search-input:disabled{cursor:default}.search-go{background:hsl(var(--primary));width:34px;height:34px;color:hsl(var(--primary-foreground));cursor:pointer;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;transition:opacity .15s,transform .1s;display:flex}.search-go:hover:not(:disabled){opacity:.85}.search-go:active:not(:disabled){transform:scale(.94)}.search-go:disabled{opacity:.3;cursor:default}.search-go .icon{width:17px;height:17px}.search-results{flex-direction:column;flex:1;gap:4px;min-height:0;margin-top:12px;display:flex;overflow-y:auto}.search-empty{text-align:center;color:hsl(var(--muted-foreground));padding:40px 8px;font-size:13px}.search-result{text-align:left;width:100%;color:hsl(var(--foreground));font:inherit;cursor:pointer;background:0 0;border:none;border-radius:12px;align-items:flex-start;gap:12px;padding:12px 14px;transition:background .12s;display:flex}.search-result:hover{background:hsl(var(--foreground) / .05)}.search-result-static{cursor:default;border:1px solid #0000}.search-result-static:hover{border-color:hsl(var(--border));background:hsl(var(--foreground) / .025)}a.search-result{color:inherit;text-decoration:none}.search-result-ext{vertical-align:-1px;opacity:.6;width:12px;height:12px;margin-left:4px}.search-result-icon{width:16px;height:16px;color:hsl(var(--muted-foreground));stroke:currentColor;stroke-width:1.65px;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;margin-top:2px}.search-result-body{flex:1;min-width:0}.search-result-head{justify-content:space-between;align-items:baseline;gap:10px;display:flex}.search-result-title{white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:600;overflow:hidden}.search-result-meta{color:hsl(var(--muted-foreground));flex-shrink:0;font-size:11.5px}.search-result-snippet{color:hsl(var(--muted-foreground));-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:3px;font-size:12.5px;line-height:1.5;display:-webkit-box;overflow:hidden}.search-result-snippet-expanded{-webkit-line-clamp:4;white-space:pre-wrap;overflow-wrap:anywhere}.login{border:1px solid hsl(var(--border));background:hsl(var(--panel));color:hsl(var(--foreground));border-radius:14px;flex-direction:column;display:flex;position:fixed;top:10px;right:10px;bottom:10px;left:10px;overflow:hidden}.login-top{padding:18px 24px}.login-brand{letter-spacing:-.01em;align-items:center;gap:9px;font-family:Byte Sans,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:15px;font-weight:600;display:inline-flex}.login-main{flex:1;justify-content:center;align-items:center;padding:0 24px;display:flex}.login-card{width:100%;max-width:420px}.login-title{letter-spacing:-.02em;margin:0 0 14px;font-family:Byte Sans,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:28px;font-weight:700;line-height:1.2}.login-sub{color:hsl(var(--muted-foreground));margin:0 0 28px;font-size:15px}.login-btn{border:1px solid hsl(var(--border));background:hsl(var(--background));width:100%;color:hsl(var(--foreground));font:inherit;cursor:pointer;border-radius:14px;justify-content:center;align-items:center;gap:8px;padding:14px 18px;font-size:15px;font-weight:500;transition:background .15s,border-color .15s,transform .1s;display:flex}.login-btn:hover{background:hsl(var(--accent));border-color:hsl(var(--ring) / .3)}.login-btn:active{transform:scale(.99)}.login-btn .icon{width:18px;height:18px}.login-powered{color:hsl(var(--muted-foreground));margin:18px 0 0;font-size:12px}.login-legal{color:hsl(var(--muted-foreground));margin:6px 0 0;font-size:12px}.login-legal a{color:inherit;text-decoration:underline;-webkit-text-decoration-color:hsl(var(--muted-foreground) / .45);text-decoration-color:hsl(var(--muted-foreground) / .45);text-underline-offset:2px;font-weight:600}.login-legal a:hover{color:hsl(var(--foreground))}.login-footer{text-align:center;color:hsl(var(--muted-foreground));padding:18px 24px;font-size:12px}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}.login-providers{flex-direction:column;gap:10px;display:flex}.login-provider-error{color:hsl(var(--destructive));flex-direction:column;align-items:flex-start;gap:12px;font-size:13px;display:flex}.login-provider-error p{margin:0}.login-name{align-items:center;gap:8px;display:flex}.login-name-input{border:1px solid hsl(var(--border));font:inherit;background:hsl(var(--background));color:hsl(var(--foreground));border-radius:14px;flex:1;padding:13px 16px;font-size:15px}.login-name-input:focus{border-color:hsl(var(--ring) / .4);outline:none}.login-name-go{background:hsl(var(--primary));width:36px;height:36px;color:hsl(var(--primary-foreground));cursor:pointer;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;transition:opacity .15s;display:flex}.login-name-go .icon{width:18px;height:18px}.login-name-go:disabled{opacity:.35;cursor:default}.login-hint{min-height:16px;color:hsl(var(--destructive));margin:8px 0 0;font-size:12px;line-height:16px}.session-loading{z-index:5;color:hsl(var(--muted-foreground));background:hsl(var(--background) / .6);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);justify-content:center;align-items:center;gap:8px;font-size:14px;display:flex;position:absolute;top:0;right:0;bottom:0;left:0}.main{position:relative}.topo{background:hsl(var(--background));border:1px solid hsl(var(--border));width:288px;min-height:0;box-shadow:0 8px 24px hsl(var(--foreground) / .035);z-index:2;border-radius:18px;flex-direction:column;padding:16px;display:flex;position:absolute;top:28px;bottom:18px;right:18px;overflow:hidden}.topo.is-loading{place-items:center;min-height:88px;display:grid;bottom:auto}.topo.is-drawer{width:auto;min-height:0;max-height:none;box-shadow:none;background:0 0;border:0;border-radius:0;padding:22px;position:static;overflow:visible}.topo.is-loading.is-drawer{min-height:112px}.topo-loading-label{font-size:12px;line-height:1.5}.topo-agent-card{border:0;border-bottom:1px solid hsl(var(--border) / .72);background:0 0;border-radius:0;flex:none;min-width:0;padding:0 0 16px}.topo-agent-heading{flex-direction:column;gap:4px;min-width:0;display:flex}.topo-agent-heading h2{color:hsl(var(--foreground));letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:15px;font-weight:650;line-height:1.4;overflow:hidden}.topo-agent-heading>span{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;line-height:1.4;overflow:hidden}.topo-description{color:hsl(var(--muted-foreground));overflow-wrap:anywhere;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:12px 0 0;font-size:12px;line-height:1.6;display:-webkit-box;overflow:hidden}.topo-module-stack{flex:1;grid-template-rows:minmax(124px,.95fr) minmax(142px,1.15fr) minmax(160px,.9fr);gap:0;min-width:0;min-height:0;display:grid}.topo-module-stack:has(.topo-environment-card){grid-template-rows:minmax(124px,.95fr) minmax(142px,1.15fr) minmax(106px,.72fr) minmax(160px,.9fr)}.topo-module-card{background:0 0;border:0;border-radius:0;flex-direction:column;min-width:0;min-height:0;padding:14px 0;display:flex}.topo-module-card+.topo-module-card{border-top:1px solid hsl(var(--border) / .72)}.topo-module-title{min-height:20px;color:hsl(var(--muted-foreground));align-items:center;gap:6px;width:100%;margin-bottom:0;font-size:13px;font-weight:600;line-height:1;display:inline-flex;position:static}.topo-module-label{text-overflow:ellipsis;white-space:nowrap;align-items:center;height:20px;display:inline-flex;overflow:hidden}.topo-section-count{background:hsl(var(--muted) / .72);min-width:18px;height:18px;color:hsl(var(--muted-foreground));font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:999px;justify-content:center;align-items:center;padding:0 5px;font-size:11px;font-weight:650;line-height:1;display:inline-flex}.topo-remove-capability:disabled,.topo-capability-add-slot:disabled{cursor:not-allowed;opacity:.45}.topo-module-scroll{box-sizing:border-box;overscroll-behavior:contain;scrollbar-color:hsl(var(--border)) transparent;scrollbar-width:thin;flex:1;min-height:24px;padding-top:9px;overflow-y:auto}.topo-module-scroll::-webkit-scrollbar{width:4px}.topo-module-scroll::-webkit-scrollbar-track{background:0 0}.topo-module-scroll::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:999px}.topo-module-scroll:focus-visible{outline:2px solid hsl(var(--ring) / .45);outline-offset:3px;border-radius:5px}.topo-tools-scroll{max-height:104px}.topo-skills-scroll{max-height:152px}.session-environment-select{flex-direction:column;gap:6px;min-width:0;padding-top:9px;display:flex}.session-environment-list{flex-direction:column;flex:1;gap:0;min-width:0;min-height:0;display:flex;overflow-y:auto}.topo-environment-card .session-environment-select{flex:1;min-height:0}.session-environment-item{align-items:center;gap:8px;min-width:0;min-height:40px;padding:7px 2px;display:flex}.session-environment-item+.session-environment-item{border-top:1px solid hsl(var(--border) / .72)}.session-environment-item__icon{border:1px solid hsl(var(--border));width:26px;height:26px;color:hsl(var(--muted-foreground));border-radius:7px;flex:0 0 26px;place-items:center;display:inline-grid}.session-environment-item__icon svg{width:15px;height:15px}.session-environment-item__copy{flex-direction:column;flex:1;gap:1px;min-width:0;display:flex}.session-environment-item__copy strong{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:500;line-height:1.35;overflow:hidden}.session-environment-item__copy small{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;line-height:1.35;overflow:hidden}.session-environment-select p{color:hsl(var(--muted-foreground));margin:0;font-size:11px;line-height:1.45}.session-environment-select p.is-error{color:hsl(var(--destructive))}.session-environment-dialog{max-height:min(620px,100vh - 48px)}.session-environment-picker{flex-direction:column;grid-template-columns:minmax(0,1fr);max-height:340px;display:flex;overflow-y:auto}.session-environment-picker__group{flex-direction:column;gap:8px;display:flex}.session-environment-picker__group+.session-environment-picker__group{border-top:1px solid hsl(var(--border));padding-top:12px}.session-environment-picker__group>h3{color:hsl(var(--muted-foreground));margin:0;font-size:11px;font-weight:600;line-height:1.4}.session-environment-option{cursor:pointer}.session-environment-option.is-selected{border-color:hsl(var(--primary) / .45);background:hsl(var(--primary) / .055)}.session-environment-option.is-covered{border-color:hsl(var(--primary) / .24);background:hsl(var(--primary) / .03);cursor:default}.session-environment-option.is-disabled{cursor:not-allowed;opacity:.5}.session-environment-option .studio-tool-option-copy small{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;line-height:1.35;overflow:hidden}.session-environment-option>input{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.session-environment-check{border:1px solid hsl(var(--border));background:hsl(var(--panel));color:#0000;border-radius:4px;flex:0 0 16px;place-items:center;width:16px;height:16px;margin:0 2px 0 8px;transition:border-color .15s,background .15s,color .15s;display:inline-grid}.session-environment-check svg{width:12px;height:12px}.session-environment-option>input:checked+.session-environment-check{border-color:hsl(var(--primary));background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.session-environment-option>input:focus-visible+.session-environment-check{outline:2px solid hsl(var(--ring) / .38);outline-offset:2px}.session-environment-dialog__footer{border-top:1px solid hsl(var(--border));justify-content:space-between;align-items:center;gap:12px;min-height:60px;padding:12px 20px;display:flex}.session-environment-dialog__footer>span{color:hsl(var(--muted-foreground));font-size:12px}.session-environment-dialog__footer>span.is-error{color:hsl(var(--destructive))}.session-environment-dialog__footer>div{align-items:center;gap:8px;display:flex}.session-environment-dialog__footer button{border:1px solid hsl(var(--border));background:hsl(var(--panel));min-width:72px;height:34px;color:hsl(var(--foreground));font:inherit;white-space:nowrap;cursor:pointer;border-radius:7px;padding:0 14px;font-size:12px}.session-environment-dialog__footer button:hover:not(:disabled){background:hsl(var(--muted) / .5)}.session-environment-dialog__footer button.is-primary{border-color:hsl(var(--primary));background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.session-environment-dialog__footer button:disabled{cursor:not-allowed;opacity:.45}.topo-tool-list{flex-direction:column;min-width:0;display:flex}.topo-tool{min-width:0;color:hsl(var(--foreground));align-items:center;gap:6px;padding:7px 2px 7px 14px;font-size:12.5px;line-height:1.4;display:flex;position:relative}.topo-tool:before{content:"";border:1px solid hsl(var(--muted-foreground) / .7);border-radius:2px;width:5px;height:5px;position:absolute;top:13px;left:2px}.topo-tool:first-child{padding-top:0}.topo-tool:first-child:before{top:6px}.topo-tool:last-child{padding-bottom:1px}.topo-tool+.topo-tool{border-top:1px solid hsl(var(--border) / .72)}.topo-capability-title,.topo-skill-title{align-items:center;gap:6px;min-width:0;display:flex}.topo-capability-title{flex:1}.topo-capability-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13px;overflow:hidden}.topo-capability-copy{flex-direction:column;gap:1px;min-width:0;display:flex}.topo-capability-copy code{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:9.5px;font-weight:450;line-height:1.25;overflow:hidden}.topo-capability-add-slot{border:1px dashed hsl(var(--border));background:hsl(var(--muted) / .18);width:100%;min-height:34px;color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;border-radius:9px;justify-content:center;align-items:center;gap:6px;margin:0;padding:5px 10px;font-size:11.5px;transition:border-color .15s,background .15s,color .15s;display:flex}.topo-capability-add-dock{background:hsl(var(--background));flex:none;padding-top:6px}.topo-capability-add-slot>svg{flex-shrink:0;width:15px;height:15px}.topo-capability-add-slot:hover:not(:disabled){border-color:hsl(var(--primary) / .55);background:hsl(var(--primary) / .055);color:hsl(var(--primary))}.topo-capability-add-slot:focus-visible{outline:2px solid hsl(var(--ring) / .38);outline-offset:2px}.topo-custom-badge{background:hsl(var(--primary) / .1);height:17px;color:hsl(var(--primary));border-radius:5px;flex-shrink:0;align-items:center;padding:0 5px;font-size:9.5px;font-weight:650;line-height:1;display:inline-flex}.topo-remove-capability{width:20px;height:20px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;margin-left:auto;padding:0;font-size:15px;line-height:1;display:inline-flex}.topo-remove-capability svg{width:14px;height:14px}.topo-remove-capability:hover:not(:disabled){background:hsl(var(--destructive) / .1);color:hsl(var(--destructive))}.topo-skill-list{flex-direction:column;min-width:0;display:flex}.topo-skill{flex-direction:column;gap:2px;min-width:0;padding:8px 0;display:flex}.topo-skill:first-child{padding-top:0}.topo-skill:last-child{padding-bottom:1px}.topo-skill+.topo-skill{border-top:1px solid hsl(var(--border) / .72)}.topo-skill-name{min-width:0;color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:13px;font-weight:500;line-height:1.45;overflow:hidden}.topo-skill-title{width:100%}.topo-skill-description{color:hsl(var(--muted-foreground));overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.45;display:-webkit-box;overflow:hidden}.topo-empty{color:hsl(var(--muted-foreground));font-size:11.5px;line-height:1.5}.topo-topology{min-height:0}.topo-canvas-heading{justify-content:space-between;align-items:center;gap:12px;margin-bottom:9px;display:flex}.topo-canvas-expand,.topo-canvas-dialog-header button{width:30px;height:30px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:8px;justify-content:center;align-items:center;padding:0;display:inline-flex}.topo-canvas-expand:hover,.topo-canvas-dialog-header button:hover{background:hsl(var(--muted));color:hsl(var(--foreground))}.topo-canvas-expand:focus-visible,.topo-canvas-dialog-header button:focus-visible{outline:2px solid hsl(var(--ring) / .5);outline-offset:2px}.topo-canvas-expand svg,.topo-canvas-dialog-header button svg{width:16px;height:16px}.topo-canvas-preview{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:12px;flex:1;min-height:120px;position:relative;overflow:hidden}.topo-canvas-preview .abc-root,.topo-canvas-dialog-body .abc-root{border:0;flex:auto;width:100%;min-width:0;height:100%}.topo-canvas-preview .abc-minimap{display:none}.topo-canvas-dialog{z-index:1200;background:hsl(var(--background));flex-direction:column;min-width:0;min-height:0;display:flex;position:fixed;top:0;right:0;bottom:0;left:0}.topo-canvas-dialog-header{border-bottom:1px solid hsl(var(--border));justify-content:space-between;align-items:center;gap:24px;min-height:64px;padding:0 24px;display:flex}.topo-canvas-dialog-header>div{align-items:baseline;gap:10px;min-width:0;display:flex}.topo-canvas-dialog-header strong{font-size:15px;font-weight:600}.topo-canvas-dialog-header span{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.topo-canvas-dialog-body{flex:1;min-width:0;min-height:0;padding:16px;display:flex}.topo-canvas-dialog-body .abc-canvas{border:1px solid hsl(var(--border));border-radius:16px;overflow:hidden}@media (max-width:640px){.topo-canvas-dialog-header{padding:0 16px}.topo-canvas-dialog-body{padding:8px}}.topo-canvas-heading .topo-section-count{flex-shrink:0}@media (min-width:1280px){.agent-info-trigger{display:none}.topo:not(.is-drawer) .topo-module-scroll{max-height:none}.main:has(>.topo)>.error{align-self:flex-start;width:calc(100% - 354px);margin-left:max(16px,50% - 545px);margin-right:0}.main:has(>.topo)>.transcript{padding-right:322px}.main:has(>.topo)>.conversation-composer-slot{padding-left:16px;padding-right:322px}.conversation-composer-slot>.composer-slot>.composer{margin-left:auto;margin-right:auto}}@media (max-width:1279px){.topo{display:none}.topo.is-drawer{display:block}.topo.is-drawer .topo-module-stack{flex-direction:column;display:flex}}@media (prefers-reduced-motion:reduce){.topo-node{transition:none}.topo-node.is-active,.topo-remote{animation:none}}.studio-tool-dialog-layer{z-index:110;place-items:center;padding:24px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.studio-tool-dialog-scrim{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#1013187a;border:0;width:100%;height:100%;padding:0;position:absolute;top:0;right:0;bottom:0;left:0}.studio-tool-dialog{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:16px;flex-direction:column;width:min(560px,100vw - 32px);max-height:min(720px,100vh - 48px);animation:.18s cubic-bezier(.22,1,.36,1) studio-tool-dialog-in;display:flex;position:relative;overflow:hidden;box-shadow:0 24px 80px #0d121c40,0 2px 8px #0d121c1f}.studio-tool-dialog.is-wide{width:min(980px,100vw - 48px);height:min(720px,100dvh - 48px)}@keyframes studio-tool-dialog-in{0%{opacity:0;transform:translateY(8px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}.studio-tool-dialog-head{border-bottom:1px solid hsl(var(--border));grid-template-columns:38px minmax(0,1fr) 32px;align-items:center;gap:12px;min-height:76px;padding:16px 18px;display:grid}.studio-tool-dialog-head.is-iconless{grid-template-columns:minmax(0,1fr) 32px}.studio-tool-dialog-mark{background:hsl(var(--primary) / .09);width:38px;height:38px;color:hsl(var(--primary));border-radius:11px;place-items:center;display:grid}.studio-tool-dialog-mark svg{width:20px;height:20px}.studio-tool-dialog-head h2{color:hsl(var(--foreground));letter-spacing:-.01em;margin:0;font-size:15px;font-weight:680}.studio-tool-dialog-head p{color:hsl(var(--muted-foreground));margin:4px 0 0;font-size:11.5px;line-height:1.45}.studio-tool-dialog-close{width:32px;height:32px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:8px;place-items:center;padding:0;display:grid}.studio-tool-dialog-close:hover{background:hsl(var(--muted) / .7);color:hsl(var(--foreground))}.studio-tool-dialog-close svg{width:18px;height:18px}.studio-tool-search{border:1px solid hsl(var(--border));background:hsl(var(--background));min-width:0;height:40px;color:hsl(var(--muted-foreground));border-radius:6px;flex:0 0 40px;align-items:center;gap:8px;padding:0 12px;display:flex}.studio-tool-search:focus-within{border-color:hsl(var(--ring) / .65);box-shadow:0 0 0 3px hsl(var(--ring) / .1)}.studio-tool-search svg{flex:none;width:16px;height:16px}.studio-tool-search input{width:100%;min-width:0;height:100%;color:hsl(var(--foreground));font:inherit;background:0 0;border:0;outline:0;padding:0;font-size:12px}.studio-tool-search input::placeholder{color:hsl(var(--muted-foreground) / .8)}.studio-tool-dialog-body{flex-direction:column;gap:12px;min-height:0;padding:16px;display:flex}.studio-tool-picker{overscroll-behavior:contain;flex-direction:column;gap:7px;min-height:120px;display:flex;overflow-y:auto}.studio-tool-option{border:1px solid hsl(var(--border) / .85);background:hsl(var(--background));border-radius:10px;align-items:center;gap:10px;min-width:0;min-height:72px;padding:10px 11px;display:flex}.studio-tool-option:hover{border-color:hsl(var(--foreground) / .2);background:hsl(var(--muted) / .22)}.studio-tool-option-icon{background:hsl(var(--muted) / .75);width:32px;height:32px;color:hsl(var(--foreground) / .78);border-radius:9px;flex:0 0 32px;place-items:center;display:grid}.studio-tool-option-icon svg{width:17px;height:17px}.studio-tool-option-copy{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.studio-tool-option-copy strong{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:620;overflow:hidden}.studio-tool-option-copy code{color:hsl(var(--muted-foreground));font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:10px}.studio-tool-option-copy>span{color:hsl(var(--muted-foreground));-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:11px;line-height:1.35;display:-webkit-box;overflow:hidden}.studio-tool-option>button{background:hsl(var(--foreground));min-width:58px;height:30px;color:hsl(var(--background));font:inherit;cursor:pointer;border:0;border-radius:8px;flex:none;justify-content:center;align-items:center;gap:4px;padding:0 10px;font-size:11px;font-weight:600;display:inline-flex}.studio-tool-option>button:disabled{opacity:.42;cursor:default}.studio-tool-empty{min-height:120px;color:hsl(var(--muted-foreground));text-align:center;justify-content:center;align-items:center;font-size:12px;display:flex}@media (max-width:720px){.studio-tool-dialog-layer{padding:12px}.studio-tool-dialog.is-wide{width:calc(100vw - 24px);height:calc(100dvh - 24px)}.session-environment-dialog__footer{flex-direction:column;align-items:stretch;gap:8px}.session-environment-dialog__footer>div{justify-content:flex-end}}@media (prefers-reduced-motion:reduce){.studio-tool-dialog{animation:none}}.drawer--agent-info{border-right:1px solid hsl(var(--border));width:min(400px,92vw);box-shadow:12px 0 40px hsl(var(--foreground) / .14);border-left:0;animation:.22s cubic-bezier(.22,1,.36,1) agent-info-slide-in;left:0;right:auto}.agent-info-drawer-body{overscroll-behavior:contain;flex:1;min-height:0;overflow-y:auto}@keyframes agent-info-slide-in{0%{transform:translate(-100%)}to{transform:translate(0)}}@media (prefers-reduced-motion:reduce){.drawer--agent-info,.agent-info-scrim{animation:none}}.quick-create{flex-direction:column;flex:1;justify-content:center;align-items:center;padding:0 24px 6vh;display:flex}.qc-head{text-align:center;margin-bottom:28px}.qc-title{letter-spacing:-.02em;margin:0;font-size:26px;font-weight:650}.qc-sub{color:hsl(var(--muted-foreground));margin:8px 0 0;font-size:14px}.qc-cards{grid-template-columns:repeat(4,220px);justify-content:center;gap:16px;display:grid}@media (max-width:1240px){.qc-cards{grid-template-columns:repeat(2,220px)}}@media (max-width:560px){.qc-cards{grid-template-columns:minmax(0,320px)}}.qc-card{text-align:left;border:1px solid hsl(var(--border));background:hsl(var(--card));cursor:pointer;font:inherit;border-radius:16px;flex-direction:column;align-items:flex-start;gap:6px;padding:20px;transition:border-color .15s,box-shadow .15s;display:flex;position:relative}.qc-card:hover{border-color:hsl(var(--ring) / .35);box-shadow:0 8px 24px -16px hsl(var(--foreground) / .25)}.qc-card-arrow{width:18px;height:18px;color:hsl(var(--muted-foreground));opacity:0;transition:opacity .15s,transform .15s;position:absolute;top:18px;right:18px;transform:translate(-4px)}.qc-card:hover .qc-card-arrow{opacity:1;transform:translate(0)}.qc-icon{background:hsl(var(--secondary));width:40px;height:40px;color:hsl(var(--foreground));border-radius:12px;justify-content:center;align-items:center;margin-bottom:6px;display:inline-flex}.qc-icon svg{width:20px;height:20px}.qc-card-title{font-size:15px;font-weight:600}.qc-card-desc{color:hsl(var(--muted-foreground));font-size:12px;line-height:1.5}.navbar-title{letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:min(60vw,640px);padding:0;font-size:15px;font-weight:600;overflow:hidden}.create-stub{color:hsl(var(--muted-foreground));flex-direction:column;flex:1;justify-content:center;align-items:center;gap:16px;display:flex}.create-back{font:inherit;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;align-self:flex-start;margin:12px;font-size:13px}.create-back:hover{color:hsl(var(--foreground))}.navbar-crumbs{align-items:center;gap:4px;min-width:0;display:flex}.navbar-crumbs>.crumb:first-child{padding-left:0}.crumb{letter-spacing:-.01em;white-space:nowrap;border-radius:6px;padding:2px 4px;font-size:15px;font-weight:600}.crumb-link{font:inherit;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;font-weight:500;transition:background .12s,color .12s}.crumb-link:hover{color:hsl(var(--foreground));background:hsl(var(--foreground) / .05)}.crumb-current{color:hsl(var(--foreground))}.crumb-sep{width:15px;height:15px;color:hsl(var(--muted-foreground));flex-shrink:0}.confirm-scrim{z-index:60;background:hsl(var(--foreground) / .25);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);justify-content:center;align-items:center;display:flex;position:fixed;top:0;right:0;bottom:0;left:0}.confirm-box{background:hsl(var(--background));border:1px solid hsl(var(--border));width:340px;max-width:calc(100vw - 32px);box-shadow:0 16px 48px -16px hsl(var(--foreground) / .3);border-radius:14px;padding:20px}.confirm-title{margin-bottom:6px;font-size:15px;font-weight:600}.confirm-text{color:hsl(var(--muted-foreground));margin-bottom:18px;font-size:13px;line-height:1.6}.confirm-actions{justify-content:flex-end;gap:8px;display:flex}.confirm-btn{border:1px solid hsl(var(--border));background:hsl(var(--background));color:hsl(var(--foreground));font:inherit;cursor:pointer;border-radius:8px;padding:7px 14px;font-size:13px;transition:background .12s}.confirm-btn:hover{background:hsl(var(--foreground) / .05)}.confirm-btn--danger{background:hsl(var(--destructive));color:#fff;border-color:#0000}.confirm-btn--danger:hover{background:hsl(var(--destructive) / .9)}.studio-confirm-backdrop{z-index:1300;background:hsl(var(--foreground) / .22);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);place-items:center;padding:32px;animation:.14s ease-out studio-confirm-fade-in;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.studio-confirm-dialog{border:1px solid hsl(var(--border));background:hsl(var(--background));width:min(420px,100vw - 40px);height:auto;min-height:0;box-shadow:0 24px 64px hsl(var(--foreground) / .16);border-radius:12px;flex-direction:column;animation:.18s cubic-bezier(.2,.8,.2,1) studio-confirm-rise-in;display:flex;overflow:hidden}.studio-confirm-head{border-bottom:1px solid hsl(var(--border));flex:0 0 58px;justify-content:space-between;align-items:center;gap:20px;padding:0 16px 0 18px;display:flex}.studio-confirm-title-wrap{align-items:center;gap:10px;min-width:0;display:flex}.studio-confirm-title-icon{flex:none;place-items:center;display:grid}.studio-confirm-title-icon svg{width:16px;height:16px}.studio-confirm-title-wrap h2{min-width:0;color:hsl(var(--foreground));margin:0;font-size:14px;font-weight:650;line-height:1.35}.studio-confirm-body{padding:24px 20px}.studio-confirm-body p{color:hsl(var(--foreground));margin:0;font-size:14px;line-height:1.65}.studio-confirm-body .studio-confirm-error{margin-top:10px}.studio-confirm-actions{border-top:1px solid hsl(var(--border));justify-content:flex-end;gap:8px;padding:12px 16px;display:flex}.studio-confirm-actions>*{min-width:76px}.studio-confirm-dialog--warning .studio-confirm-title-icon{color:#ba6708}.studio-confirm-dialog--danger .studio-confirm-title-icon{color:hsl(var(--destructive))}@keyframes studio-confirm-fade-in{0%{opacity:0}to{opacity:1}}@keyframes studio-confirm-rise-in{0%{opacity:0;transform:translateY(6px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}@media (prefers-reduced-motion:reduce){.studio-confirm-backdrop,.studio-confirm-dialog{animation:none}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}',Inr=".website-widget{--background: 0 0% 100%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--destructive: 0 72% 51%;--border: 240 5.9% 90%;--ring: 240 5.9% 10%;--canvas: 240 5% 97.3%;--panel: 0 0% 100%;color:hsl(var(--foreground));color-scheme:light;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif;font-size:16px;line-height:normal;text-align:left;-webkit-font-smoothing:antialiased}.website-widget *,.website-widget *:before,.website-widget *:after{box-sizing:border-box}.website-widget img,.website-widget svg{display:block}.website-widget__transcript .builtin-tool-icon>svg{width:18px;height:18px}.website-widget__transcript .builtin-tool-chevron{width:13px;height:13px;flex:0 0 13px}.website-widget__launcher{position:fixed;right:24px;bottom:24px;z-index:2147483000;display:grid;width:56px;height:56px;padding:0;place-items:center;border:1px solid hsl(var(--foreground));border-radius:50%;background:hsl(var(--primary));box-shadow:0 12px 32px hsl(var(--foreground) / .24);cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;transition:box-shadow .16s ease,transform .16s ease}.website-widget__launcher:hover{box-shadow:0 16px 38px hsl(var(--foreground) / .3);transform:translateY(-1px)}.website-widget__launcher:active{transform:scale(.96)}.website-widget__launcher.is-dragging{cursor:grabbing;transform:none;transition:box-shadow .12s ease}.website-widget__launcher:focus-visible,.website-widget__close:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:3px}.website-widget__launcher-logo{width:30px;height:30px;filter:brightness(0) invert(1);object-fit:contain;pointer-events:none}.website-widget__panel{position:fixed;right:24px;bottom:96px;z-index:2147482999;display:grid;width:min(420px,calc(100vw - 32px));height:min(640px,calc(100dvh - 128px));grid-template-rows:58px minmax(0,1fr) auto;overflow:hidden;border:1px solid hsl(var(--border));border-radius:16px;background:hsl(var(--panel));box-shadow:0 24px 70px hsl(var(--foreground) / .18);opacity:0;pointer-events:none;transform:translateY(10px) scale(.985);transform-origin:right bottom;transition:opacity .18s ease-out,transform .18s ease-out}.website-widget__panel.is-open{opacity:1;pointer-events:auto;transform:translateY(0) scale(1)}.website-widget__header{display:flex;min-width:0;padding:0 12px 0 14px;align-items:center;justify-content:space-between;border-bottom:1px solid hsl(var(--border));background:hsl(var(--background))}.website-widget__identity{display:flex;min-width:0;align-items:center;gap:10px}.website-widget__identity-logo{display:grid;width:30px;height:30px;flex:0 0 30px;place-items:center;border:1px solid hsl(var(--border));border-radius:9px;background:hsl(var(--background))}.website-widget__identity-logo img{width:20px;height:20px;object-fit:contain}.website-widget__identity-copy{display:flex;min-width:0;flex-direction:column;gap:1px}.website-widget__identity-copy strong{overflow:hidden;font-size:13px;font-weight:620;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.website-widget__identity-copy>span{color:hsl(var(--muted-foreground));font-size:11px;line-height:1.35}.website-widget__close{display:grid;width:32px;height:32px;padding:0;place-items:center;border:0;border-radius:8px;background:transparent;color:hsl(var(--muted-foreground));cursor:pointer}.website-widget__close:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.website-widget__close svg{width:17px;height:17px}.website-widget__transcript.transcript{min-height:0;padding:20px 18px 10px;overscroll-behavior:contain;background:hsl(var(--background))}.website-widget__transcript .turn{width:100%;margin-bottom:18px}.website-widget__transcript .turn--user .bubble{max-width:88%}.website-widget__error{width:100%;margin:8px auto 12px;padding:10px 12px;border-radius:8px;background:hsl(var(--destructive) / .08);color:hsl(var(--destructive));font-size:12.5px;line-height:1.5}.website-widget__composer-slot{padding:10px 14px 14px;border-top:1px solid hsl(var(--border));background:hsl(var(--background))}.website-widget .compact-composer.composer{padding:0}.website-widget .compact-composer .composer-box{align-items:flex-end}.website-widget .compact-composer .comp-input{min-height:36px;padding:7px 6px;font-size:14px}@media (max-width: 480px){.website-widget__launcher{right:14px;bottom:14px}.website-widget__panel{right:12px;bottom:82px;width:calc(100vw - 24px);height:min(620px,calc(100dvh - 96px));border-radius:14px}.website-widget__transcript.transcript{padding:18px 14px 8px}.website-widget__composer-slot{padding:9px 10px 11px}}@media (prefers-reduced-motion: reduce){.website-widget__launcher,.website-widget__panel{transition:none}}",Pnr="data:image/svg+xml,%3csvg%20width='111'%20height='117'%20viewBox='0%200%20111%20117'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%205.60152C0%200.621083%206.02156%20-1.87313%209.54327%201.64857L62.1326%2054.2379C64.3157%2056.421%2064.3157%2059.9606%2062.1326%2062.1438L9.54327%20114.733C6.02157%20118.255%201.56595e-06%20115.761%201.56595e-06%20110.78L0%205.60152Z'%20fill='%2300DBFE'/%3e%3cpath%20d='M104.775%202.20435C109.574%202.20456%20111.977%208.00715%20108.583%2011.4006L64.9133%2055.0686C63.3788%2057.0544%2063.3976%2059.8376%2064.9954%2061.7727L108.59%20105.368C111.983%20108.762%20109.58%20114.564%20104.781%20114.564H94.4495C94.3647%20114.567%2094.279%20114.57%2094.1926%20114.57H72.388C70.9594%20114.57%2069.5886%20114.002%2068.5784%20112.991L17.8352%2062.2493C16.7699%2061.184%2016.2455%2059.7831%2016.259%2058.387C16.2458%2056.9914%2016.7705%2055.5915%2017.8352%2054.5266L68.5725%203.78931C69.5827%202.77917%2070.9535%202.21118%2072.3821%202.21118H82.7014C82.7903%202.20677%2082.8796%202.20435%2082.969%202.20435H104.775Z'%20fill='%230069FF'/%3e%3cpath%20d='M62.2703%2054.38C63.1975%2055.3073%2063.7151%2056.489%2063.825%2057.7003C63.7755%2058.0898%2063.7666%2058.4831%2063.8025%2058.8732C63.6571%2060.0159%2063.1478%2061.1216%2062.2703%2061.9992L45.2146%2079.0529L28.405%2062.2433C27.3399%2061.1782%2026.8144%2059.7779%2026.8279%2058.382C26.8148%2056.9865%2027.3403%2055.5873%2028.405%2054.5226L45.408%2037.5187L62.2703%2054.38Z'%20fill='%230003F5'/%3e%3cpath%20d='M58.6438%2050.7557L54.3909%2055.0087C52.7621%2057.053%2052.809%2059.9769%2054.5598%2061.9364L58.4524%2065.829L39.9309%2084.3495L17.8313%2062.2489C16.7664%2061.1839%2016.2409%2059.7842%2016.2542%2058.3885C16.2409%2056.9928%2016.7663%2055.5931%2017.8313%2054.5282L40.1233%2032.2352L58.6438%2050.7557Z'%20fill='%230003F5'/%3e%3c/svg%3e";function ioe(t,e={}){return qg.t(t,{...e,ns:"adk"})}async function*Nnr(t){if(!t.body)throw new Error("Response has no body");const e=t.body.getReader(),r=new TextDecoder;let n="";const i=s=>s.length>500?ioe("sse.truncatedData",{data:s.slice(0,500),count:s.length}):s,a=(s,o=!1)=>{const l=s.split(/\r?\n/).filter(u=>u.startsWith("data:")).map(u=>u.slice(5).trimStart()).join(` +*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}`,Rnr=".builtin-tool-head{--builtin-tool-accent: 215 18% 42%;display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:3px 7px 3px 3px;border:0;border-radius:9px;background:transparent;color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;transition:color .12s ease}.builtin-tool-head[data-tool-tone=search]{--builtin-tool-accent: 211 62% 42%}.builtin-tool-head[data-tool-tone=image]{--builtin-tool-accent: 28 67% 42%}.builtin-tool-head[data-tool-tone=video]{--builtin-tool-accent: 260 38% 48%}.builtin-tool-head[data-tool-tone=presentation]{--builtin-tool-accent: 252 38% 52%}.builtin-tool-head[data-tool-tone=memory]{--builtin-tool-accent: 174 52% 34%}.builtin-tool-head[data-tool-tone=knowledge]{--builtin-tool-accent: 225 48% 45%}.builtin-tool-head[data-tool-tone=skill]{--builtin-tool-accent: 154 50% 34%}.builtin-tool-head[data-tool-tone=sandbox]{--builtin-tool-accent: 32 67% 42%}.builtin-tool-head[data-tool-tone=resources]{--builtin-tool-accent: 199 58% 38%}.builtin-tool-head[data-tool-tone=agent]{--builtin-tool-accent: 267 38% 47%}.builtin-tool-head:hover{color:hsl(var(--foreground))}.builtin-tool-icon{position:relative;width:20px;height:26px;flex:0 0 20px;display:grid;place-items:center;color:hsl(var(--builtin-tool-accent))}.builtin-tool-icon>svg{width:18px;height:18px}.builtin-tool-label{font-size:14.5px;font-weight:400;line-height:1.35}.builtin-tool-head.is-done .builtin-tool-label{color:hsl(var(--muted-foreground))}.builtin-tool-chevron{width:13px;height:13px;flex:0 0 13px;opacity:.58;transition:transform .18s ease}.builtin-tool-chevron.is-open{transform:rotate(90deg)}",Dnr=".code-browser-trigger{min-height:26px;display:inline-flex;align-items:center;gap:5px;padding:0 7px;border:0;border-radius:6px;background:transparent;color:hsl(var(--muted-foreground));font:inherit;font-size:11px;font-weight:600;cursor:pointer;transition:color .12s ease,background-color .12s ease}.code-browser-trigger svg{width:13px;height:13px}.code-browser-trigger:hover{background:hsl(var(--foreground) / .04);color:hsl(var(--foreground))}.code-browser-trigger:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:1px}.code-browser-backdrop{position:fixed;z-index:1200;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;padding:32px;background:hsl(var(--foreground) / .22);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:code-browser-fade-in .14s ease-out}.code-browser-dialog{--code-surface: hsl(var(--background));--code-panel: hsl(var(--secondary) / .26);--code-editor: hsl(var(--background));--code-text: hsl(var(--foreground));--code-muted: hsl(var(--muted-foreground));--code-border: hsl(var(--border));--code-hover: hsl(var(--foreground) / .05);--code-active: hsl(var(--foreground) / .085);width:min(1220px,94vw);height:min(800px,88vh);min-height:460px;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--code-border);border-radius:12px;background:var(--code-surface);color:var(--code-text);box-shadow:0 24px 64px hsl(var(--foreground) / .16);color-scheme:light;animation:code-browser-rise-in .18s cubic-bezier(.2,.8,.2,1)}.code-browser-dialog.is-dark{--code-surface: hsl(220 13% 13%);--code-panel: hsl(220 13% 16%);--code-editor: hsl(220 13% 18%);--code-text: hsl(210 15% 90%);--code-muted: hsl(215 11% 65%);--code-border: hsl(215 12% 27%);--code-hover: hsl(210 14% 92% / .07);--code-active: hsl(210 14% 92% / .12);color-scheme:dark}.code-browser-head{flex:0 0 54px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 12px 0 16px;border-bottom:1px solid var(--code-border);background:var(--code-surface)}.code-browser-title-wrap,.code-browser-head-actions,.code-browser-tab,.code-browser-path,.code-browser-diff-labels,.code-browser-statusbar{display:flex;align-items:center}.code-browser-title-wrap{min-width:0;gap:10px}.code-browser-title-wrap>div{min-width:0}.code-browser-title-icon{width:30px;height:30px;flex:0 0 auto;display:grid;place-items:center;border-radius:7px;background:var(--code-panel);color:var(--code-text)}.code-browser-title-icon svg,.code-browser-icon-button svg{width:16px;height:16px}.code-browser-title-wrap h2,.code-browser-title-wrap p{margin:0}.code-browser-title-wrap h2{color:var(--code-text);font-size:14px;font-weight:650;line-height:1.35}.code-browser-title-wrap p{overflow:hidden;color:var(--code-muted);font-size:11px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.code-browser-head-actions{flex:0 0 auto;gap:4px}.code-browser-icon-button{width:30px;height:30px;flex:0 0 auto;display:inline-grid;place-items:center;padding:0;border:0;border-radius:8px;background:transparent;color:var(--code-muted);cursor:pointer;transition:color .12s ease,background-color .12s ease}.code-browser-icon-button:hover{background:var(--code-hover);color:var(--code-text)}.code-browser-icon-button:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:1px}.code-browser-workspace{flex:1;min-height:0;display:flex}.code-browser-sidebar{flex:0 0 236px;min-width:0;display:flex;flex-direction:column;border-right:1px solid var(--code-border);background:var(--code-panel)}.code-browser-sidebar-head,.code-browser-tabs,.code-browser-path{flex:0 0 34px;min-height:34px;border-bottom:1px solid var(--code-border)}.code-browser-sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:0 12px;color:var(--code-muted);font-size:11px;font-weight:650;letter-spacing:.02em}.code-browser-sidebar-head>span:last-child{font-variant-numeric:tabular-nums;font-weight:500}.code-browser-tree{flex:1;min-height:0;overflow:auto;padding:6px 0 12px}.code-browser-file,.code-browser-folder{width:100%;min-height:30px;display:flex;align-items:center;gap:6px;padding-top:4px;padding-right:8px;padding-bottom:4px;border:0;background:transparent;color:var(--code-muted);font:inherit;font-size:12px;text-align:left;cursor:pointer}.code-browser-file:hover,.code-browser-folder:hover{background:var(--code-hover);color:var(--code-text)}.code-browser-file.is-active{background:var(--code-active);color:var(--code-text)}.code-browser-file:focus-visible,.code-browser-folder:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:-2px}.code-browser-file svg,.code-browser-folder svg{width:14px;height:14px;flex:0 0 auto}.code-browser-folder>svg:first-child{width:12px;height:12px;transition:transform .12s ease}.code-browser-folder>svg:first-child.is-open{transform:rotate(90deg)}.code-browser-file>span:not(.code-browser-change),.code-browser-folder span,.code-browser-path span,.code-browser-tab>span:not(.code-browser-change){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.code-browser-file>span:not(.code-browser-change){flex:1}.code-browser-change{flex:0 0 auto;min-width:29px;padding:2px 4px;border-radius:4px;font-size:9.5px;font-weight:650;line-height:1.2;text-align:center}.code-browser-change.is-added{background:#ddf3e5;color:#1d6d3a}.code-browser-change.is-modified{background:#f9edd2;color:#845915}.code-browser-change.is-deleted{background:#f9e1e1;color:#9f2d2d}.is-dark .code-browser-change.is-added{background:#224f32;color:#98e1b3}.is-dark .code-browser-change.is-modified{background:#554320;color:#eecf87}.is-dark .code-browser-change.is-deleted{background:#572323;color:#eea0a0}.code-browser-main{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--code-editor)}.code-browser-tabs{display:flex;align-items:stretch;overflow:hidden;background:var(--code-panel)}.code-browser-tab{min-width:0;max-width:min(320px,65%);gap:6px;padding:0 11px;border-right:1px solid var(--code-border);border-top:2px solid hsl(var(--primary));background:var(--code-editor);color:var(--code-text);font-size:11.5px}.code-browser-tab>svg,.code-browser-path svg{width:13px;height:13px;flex:0 0 auto}.code-browser-path{gap:7px;padding:0 13px;color:var(--code-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:11.5px}.code-browser-diff-labels{flex:0 0 30px;justify-content:space-around;border-bottom:1px solid var(--code-border);background:var(--code-panel);color:var(--code-muted);font-size:11px}.code-browser-diff-labels span{width:50%;text-align:center}.code-browser-editor{flex:1;min-height:0;overflow:hidden;background:var(--code-editor)}.code-browser-editor>div,.code-browser-editor .cm-theme,.code-browser-editor .cm-editor,.code-browser-merge,.code-browser-merge>.cm-mergeView{height:100%}.code-browser-editor .cm-scroller{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:12.5px}.code-browser-merge>.cm-mergeView{overflow:auto}.code-browser-merge .cm-mergeViewEditors{min-height:100%}.code-browser-merge .cm-mergeViewEditor:first-child{border-right:1px solid var(--code-border)}.code-browser-merge .cm-editor{min-height:100%}.code-browser-statusbar{flex:0 0 26px;justify-content:space-between;gap:12px;padding:0 10px;border-top:1px solid var(--code-border);background:var(--code-panel);color:var(--code-muted);font-size:10.5px}.code-browser-empty{height:100%;display:grid;place-items:center;padding:20px;color:var(--code-muted);font-size:12px;text-align:center}@keyframes code-browser-fade-in{0%{opacity:0}to{opacity:1}}@keyframes code-browser-rise-in{0%{opacity:0;transform:translateY(8px) scale(.992)}to{opacity:1;transform:translateY(0) scale(1)}}@media (max-width: 760px){.code-browser-backdrop{padding:12px}.code-browser-dialog{width:100%;height:min(820px,94vh);min-height:0}.code-browser-workspace{flex-direction:column}.code-browser-sidebar{flex:0 0 168px;border-right:0;border-bottom:1px solid var(--code-border)}.code-browser-diff-labels span:first-child{display:none}.code-browser-diff-labels span:last-child{width:100%}}@media (prefers-reduced-motion: reduce){.code-browser-backdrop,.code-browser-dialog{animation:none}.code-browser-folder>svg:first-child{transition:none}}",Lnr=".text-shimmer.text-shimmer{color:transparent;background-size:200% auto;background-position:200% center;background-clip:text;-webkit-background-clip:text;animation:text-shimmer 4s linear infinite}@keyframes text-shimmer{to{background-position:-200% center}}@media (prefers-reduced-motion: reduce){.text-shimmer.text-shimmer{animation:none;background-position:50% center}}",Mnr='/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, -apple-system, system-ui, "Segoe UI", "Noto Sans", "Helvetica", "Arial", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;--font-mono:ui-monospace, "SFMono-Regular", "SF Mono", "Menlo", "Monaco", "Consolas", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;--spacing:.25rem;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:1024px;--breakpoint-xl:1280px;--breakpoint-2xl:1536px;--container-sm:24rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--breakpoint-xs:380px;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-2xs:.125rem;--radius-xs:.25rem;--radius-sm:.375rem;--radius-md:.5rem;--radius-lg:.625rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.25rem;--radius-4xl:1.5rem;--radius-full:9999px;--text-sm:var(--font-text-sm-size);--text-sm--line-height:var(--font-text-sm-line-height);--text-sm--font-weight:var(--font-text-sm-weight);--text-sm--letter-spacing:var(--font-text-sm-tracking);--tracking-wide:var(--font-tracking-wide);--tracking-normal:var(--font-tracking-normal);--tracking-tight:var(--font-tracking-tight);--shadow-hairline:var(--shadow-hairline)}:root,:where([data-theme]){--gray-500:#5d5d5d;--alpha-0:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-0:color-mix(in oklab, var(--alpha-base) 0%, transparent)}}:root,:where([data-theme]){--alpha-02:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-02:color-mix(in oklab, var(--alpha-base) 2%, transparent)}}:root,:where([data-theme]){--alpha-04:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-04:color-mix(in oklab, var(--alpha-base) 4%, transparent)}}:root,:where([data-theme]){--alpha-05:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-05:color-mix(in oklab, var(--alpha-base) 5%, transparent)}}:root,:where([data-theme]){--alpha-06:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-06:color-mix(in oklab, var(--alpha-base) 6%, transparent)}}:root,:where([data-theme]){--alpha-08:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-08:color-mix(in oklab, var(--alpha-base) 8%, transparent)}}:root,:where([data-theme]){--alpha-10:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-10:color-mix(in oklab, var(--alpha-base) 10%, transparent)}}:root,:where([data-theme]){--alpha-12:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-12:color-mix(in oklab, var(--alpha-base) 12%, transparent)}}:root,:where([data-theme]){--alpha-15:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-15:color-mix(in oklab, var(--alpha-base) 15%, transparent)}}:root,:where([data-theme]){--alpha-16:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-16:color-mix(in oklab, var(--alpha-base) 16%, transparent)}}:root,:where([data-theme]){--alpha-20:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-20:color-mix(in oklab, var(--alpha-base) 20%, transparent)}}:root,:where([data-theme]){--alpha-25:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-25:color-mix(in oklab, var(--alpha-base) 25%, transparent)}}:root,:where([data-theme]){--alpha-30:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-30:color-mix(in oklab, var(--alpha-base) 30%, transparent)}}:root,:where([data-theme]){--alpha-35:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-35:color-mix(in oklab, var(--alpha-base) 35%, transparent)}}:root,:where([data-theme]){--alpha-40:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-40:color-mix(in oklab, var(--alpha-base) 40%, transparent)}}:root,:where([data-theme]){--alpha-50:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-50:color-mix(in oklab, var(--alpha-base) 50%, transparent)}}:root,:where([data-theme]){--alpha-60:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-60:color-mix(in oklab, var(--alpha-base) 60%, transparent)}}:root,:where([data-theme]){--alpha-70:var(--alpha-base)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--alpha-70:color-mix(in oklab, var(--alpha-base) 70%, transparent)}}:root,:where([data-theme]){--white:#fff;--black:#000;--green-25:#edfaf2;--green-50:#d9f4e4;--green-75:#b8ebcc;--green-100:#8cdfad;--green-200:#66d492;--green-300:#40c977;--green-400:#04b84c;--green-500:#00a240;--green-600:#008635;--green-700:#00692a;--green-800:#004f1f;--green-900:#003716;--green-950:#011c0b;--green-1000:#001207;--green-a25:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a25:color-mix(in oklab, var(--green-400) 8%, transparent)}}:root,:where([data-theme]){--green-a50:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a50:color-mix(in oklab, var(--green-400) 15%, transparent)}}:root,:where([data-theme]){--green-a75:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a75:color-mix(in oklab, var(--green-400) 29%, transparent)}}:root,:where([data-theme]){--green-a100:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a100:color-mix(in oklab, var(--green-400) 45%, transparent)}}:root,:where([data-theme]){--green-a200:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a200:color-mix(in oklab, var(--green-400) 60%, transparent)}}:root,:where([data-theme]){--green-a300:var(--green-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--green-a300:color-mix(in oklab, var(--green-400) 75%, transparent)}}:root,:where([data-theme]){--red-25:#fff0f0;--red-50:#ffd9d9;--red-75:#ffc6c5;--red-100:#ffa4a2;--red-200:#ff8583;--red-300:#ff6764;--red-400:#fa423e;--red-500:#e02e2a;--red-600:#ba2623;--red-700:#911e1b;--red-800:#6e1615;--red-900:#4d100e;--red-950:#280b0a;--red-1000:#1f0909;--red-a25:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a25:color-mix(in oklab, var(--red-400) 8%, transparent)}}:root,:where([data-theme]){--red-a50:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a50:color-mix(in oklab, var(--red-400) 16%, transparent)}}:root,:where([data-theme]){--red-a75:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a75:color-mix(in oklab, var(--red-400) 30%, transparent)}}:root,:where([data-theme]){--red-a100:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a100:color-mix(in oklab, var(--red-400) 48%, transparent)}}:root,:where([data-theme]){--red-a200:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a200:color-mix(in oklab, var(--red-400) 64%, transparent)}}:root,:where([data-theme]){--red-a300:var(--red-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--red-a300:color-mix(in oklab, var(--red-400) 79%, transparent)}}:root,:where([data-theme]){--pink-25:#fff4f9;--pink-50:#ffe8f3;--pink-75:#ffd4e8;--pink-100:#ffbada;--pink-200:#ffa3ce;--pink-300:#ff8cc1;--pink-400:#ff66ad;--pink-500:#e04c91;--pink-600:#ba437a;--pink-700:#963c67;--pink-800:#6e2c4a;--pink-900:#4d1f34;--pink-950:#29101c;--pink-1000:#1a0a11;--pink-a25:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a25:color-mix(in oklab, var(--pink-400) 8%, transparent)}}:root,:where([data-theme]){--pink-a50:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a50:color-mix(in oklab, var(--pink-400) 16%, transparent)}}:root,:where([data-theme]){--pink-a75:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a75:color-mix(in oklab, var(--pink-400) 28%, transparent)}}:root,:where([data-theme]){--pink-a100:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a100:color-mix(in oklab, var(--pink-400) 45%, transparent)}}:root,:where([data-theme]){--pink-a200:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a200:color-mix(in oklab, var(--pink-400) 60%, transparent)}}:root,:where([data-theme]){--pink-a300:var(--pink-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--pink-a300:color-mix(in oklab, var(--pink-400) 76%, transparent)}}:root,:where([data-theme]){--orange-25:#fff5f0;--orange-50:#ffe7d9;--orange-75:#ffcfb4;--orange-100:#ffb790;--orange-200:#ff9e6c;--orange-300:#ff8549;--orange-400:#fb6a22;--orange-500:#e25507;--orange-600:#b9480d;--orange-700:#923b0f;--orange-800:#6d2e0f;--orange-900:#4a2206;--orange-950:#281105;--orange-1000:#211107;--orange-a25:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a25:color-mix(in oklab, var(--orange-400) 7%, transparent)}}:root,:where([data-theme]){--orange-a50:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a50:color-mix(in oklab, var(--orange-400) 16%, transparent)}}:root,:where([data-theme]){--orange-a75:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a75:color-mix(in oklab, var(--orange-400) 33%, transparent)}}:root,:where([data-theme]){--orange-a100:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a100:color-mix(in oklab, var(--orange-400) 48%, transparent)}}:root,:where([data-theme]){--orange-a200:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a200:color-mix(in oklab, var(--orange-400) 65%, transparent)}}:root,:where([data-theme]){--orange-a300:var(--orange-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--orange-a300:color-mix(in oklab, var(--orange-400) 81%, transparent)}}:root,:where([data-theme]){--yellow-25:#fffbed;--yellow-50:#fff6d9;--yellow-75:#ffeeb8;--yellow-100:#ffe48c;--yellow-200:#ffdb66;--yellow-300:#ffd240;--yellow-400:#ffc300;--yellow-500:#e0ac00;--yellow-600:#ba8e00;--yellow-700:#916f00;--yellow-800:#6e5400;--yellow-900:#4d3b00;--yellow-950:#261d00;--yellow-1000:#1a1400;--yellow-a25:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a25:color-mix(in oklab, var(--yellow-400) 8%, transparent)}}:root,:where([data-theme]){--yellow-a50:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a50:color-mix(in oklab, var(--yellow-400) 15%, transparent)}}:root,:where([data-theme]){--yellow-a75:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a75:color-mix(in oklab, var(--yellow-400) 27%, transparent)}}:root,:where([data-theme]){--yellow-a100:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a100:color-mix(in oklab, var(--yellow-400) 45%, transparent)}}:root,:where([data-theme]){--yellow-a200:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a200:color-mix(in oklab, var(--yellow-400) 59%, transparent)}}:root,:where([data-theme]){--yellow-a300:var(--yellow-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--yellow-a300:color-mix(in oklab, var(--yellow-400) 74%, transparent)}}:root,:where([data-theme]){--purple-25:#f9f5fe;--purple-50:#efe5fe;--purple-75:#e0cefd;--purple-100:#ceb0fb;--purple-200:#be95fa;--purple-300:#ad7bf9;--purple-400:#924ff7;--purple-500:#8046d9;--purple-600:#6b3ab4;--purple-700:#532d8d;--purple-800:#3f226a;--purple-900:#2c184a;--purple-950:#160c25;--purple-1000:#100a19;--purple-a25:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a25:color-mix(in oklab, var(--purple-400) 6%, transparent)}}:root,:where([data-theme]){--purple-a50:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a50:color-mix(in oklab, var(--purple-400) 15%, transparent)}}:root,:where([data-theme]){--purple-a75:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a75:color-mix(in oklab, var(--purple-400) 28%, transparent)}}:root,:where([data-theme]){--purple-a100:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a100:color-mix(in oklab, var(--purple-400) 45%, transparent)}}:root,:where([data-theme]){--purple-a200:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a200:color-mix(in oklab, var(--purple-400) 60%, transparent)}}:root,:where([data-theme]){--purple-a300:var(--purple-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--purple-a300:color-mix(in oklab, var(--purple-400) 75%, transparent)}}:root,:where([data-theme]){--blue-25:#f5faff;--blue-50:#e5f3ff;--blue-75:#cce6ff;--blue-100:#99ceff;--blue-200:#66b5ff;--blue-300:#339cff;--blue-400:#0285ff;--blue-500:#0169cc;--blue-600:#004f99;--blue-700:#003f7a;--blue-800:#013566;--blue-900:#00284d;--blue-950:#000e1a;--blue-1000:#000d19;--blue-a25:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a25:color-mix(in oklab, var(--blue-400) 4%, transparent)}}:root,:where([data-theme]){--blue-a50:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a50:color-mix(in oklab, var(--blue-400) 13%, transparent)}}:root,:where([data-theme]){--blue-a75:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a75:color-mix(in oklab, var(--blue-400) 25%, transparent)}}:root,:where([data-theme]){--blue-a100:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a100:color-mix(in oklab, var(--blue-400) 40%, transparent)}}:root,:where([data-theme]){--blue-a200:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a200:color-mix(in oklab, var(--blue-400) 60%, transparent)}}:root,:where([data-theme]){--blue-a300:var(--blue-400)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--blue-a300:color-mix(in oklab, var(--blue-400) 80%, transparent)}}:root,:where([data-theme]){--hairline:1px}:where(:root),:where([data-theme=light]){--gray-0:#fff;--gray-25:#fcfcfc;--gray-50:#f9f9f9;--gray-75:#f3f3f3;--gray-100:#ededed;--gray-150:#dfdfdf;--gray-200:#cdcdcd;--gray-250:#b9b9b9;--gray-300:#afafaf;--gray-350:#9f9f9f;--gray-400:#8f8f8f;--gray-450:#767676;--gray-550:#4f4f4f;--gray-600:#414141;--gray-650:#393939;--gray-700:#303030;--gray-750:#282828;--gray-800:#212121;--gray-850:#1c1c1c;--gray-900:#181818;--gray-925:#161616;--gray-950:#131313;--gray-975:#101010;--gray-1000:#0d0d0d;--alpha-base:#0d0d0d}:where([data-theme=dark]){--gray-0:#0d0d0d;--gray-25:#101010;--gray-50:#131313;--gray-75:#161616;--gray-100:#181818;--gray-150:#1c1c1c;--gray-200:#212121;--gray-250:#282828;--gray-300:#303030;--gray-350:#393939;--gray-400:#414141;--gray-450:#4f4f4f;--gray-550:#767676;--gray-600:#8f8f8f;--gray-650:#9f9f9f;--gray-700:#afafaf;--gray-750:#b9b9b9;--gray-800:#cdcdcd;--gray-850:#dcdcdc;--gray-900:#ededed;--gray-925:#f3f3f3;--gray-950:#f3f3f3;--gray-975:#f9f9f9;--gray-1000:#fff;--alpha-base:#fff}@media (min-resolution:150dpi),(min-resolution:1.5x){:root,:where([data-theme]){--hairline:.5px}}:root,:where([data-theme]){--shadow-color:0 0 0;--elevation-100-geo:0 1px 2px -1px;--elevation-200-geo:0 2px 4px -1px;--elevation-300-geo:0 4px 8px -2px;--elevation-400-geo:0 8px 16px -4px}:where(:root),:where([data-theme=light]){--shadow-alpha-100:.08;--shadow-alpha-200:.08;--shadow-alpha-300:.1;--shadow-alpha-400:.12;--shadow-hairline-width:1px;--shadow-hairline-color:#00000014}@media (min-resolution:150dpi),(min-resolution:1.5x){:where(:root),:where([data-theme=light]){--shadow-hairline-width:.5px;--shadow-hairline-color:#0000001a}}:where([data-theme=dark]){--shadow-alpha-100:.2;--shadow-alpha-200:.2;--shadow-alpha-300:.36;--shadow-alpha-400:.3;--shadow-hairline-width:1px;--shadow-hairline-color:#ffffff1a}@media (min-resolution:150dpi),(min-resolution:1.5x){:where([data-theme=dark]){--shadow-hairline-width:.5px;--shadow-hairline-color:#ffffff1f}}:where([data-theme=dark]) [data-surface=elevated]{--shadow-hairline:0 0 #0000}:root,:where([data-theme]){--color-text:var(--gray-1000);--color-text-inverse:var(--gray-0);--color-text-primary:var(--color-text);--color-text-primary-soft:var(--color-text);--color-background-primary-soft-alt:var(--alpha-02);--color-border-primary-soft-alt:var(--alpha-06);--color-text-primary-soft-alt:var(--color-text);--color-text-primary-surface:var(--color-text);--color-text-primary-solid:var(--color-text-inverse);--color-text-primary-outline:var(--color-text);--color-text-primary-outline-hover:var(--color-text);--color-text-primary-ghost:var(--color-text);--color-text-primary-ghost-hover:var(--color-text);--color-ring-primary:var(--color-ring);--color-ring-primary-soft:var(--color-ring-primary);--color-ring-primary-solid:var(--color-ring-primary);--color-ring-primary-outline:var(--color-ring-primary);--color-ring-primary-ghost:var(--color-ring-primary);--color-text-secondary-soft:var(--color-text);--color-background-secondary-soft-alt:var(--alpha-02);--color-border-secondary-soft-alt:var(--alpha-06);--color-text-secondary-soft-alt:var(--color-text);--color-text-secondary-solid:var(--white);--color-text-secondary-outline:var(--color-text-secondary);--color-text-secondary-outline-hover:var(--color-text);--color-text-secondary-ghost:var(--color-text-secondary);--color-text-secondary-ghost-hover:var(--color-text);--color-ring-secondary:var(--color-ring);--color-ring-secondary-soft:var(--color-ring-secondary);--color-ring-secondary-solid:var(--color-ring-secondary);--color-ring-secondary-outline:var(--color-ring-secondary);--color-ring-secondary-ghost:var(--color-ring-secondary);--color-background-info-soft:var(--blue-50);--color-background-info-soft-hover:var(--blue-75);--color-background-info-soft-active:var(--blue-75);--color-background-info-soft-alpha:var(--blue-a50);--color-background-info-soft-alpha-hover:var(--blue-a75);--color-background-info-soft-alpha-active:var(--blue-a75);--color-background-info-solid:var(--blue-400);--color-background-info-solid-hover:var(--blue-500);--color-background-info-solid-active:var(--blue-500);--color-text-info-solid:var(--white);--color-background-info-outline-hover:var(--blue-a25);--color-background-info-outline-active:var(--blue-a25);--color-border-info-outline:var(--blue-500);--color-border-info-outline-hover:var(--blue-500);--color-text-info-outline:var(--blue-500);--color-text-info-outline-hover:var(--blue-500);--color-background-info-ghost-hover:var(--blue-a50);--color-background-info-ghost-active:var(--blue-a50);--color-ring-info:var(--color-ring);--color-ring-info-soft:var(--color-ring-info);--color-ring-info-solid:var(--color-ring-info);--color-ring-info-outline:var(--color-ring-info);--color-ring-info-ghost:var(--color-ring-info);--color-background-warning-soft:var(--orange-50);--color-background-warning-soft-hover:var(--orange-75);--color-background-warning-soft-active:var(--orange-75);--color-background-warning-soft-alpha:var(--orange-a50);--color-background-warning-soft-alpha-hover:var(--orange-a75);--color-background-warning-soft-alpha-active:var(--orange-a75);--color-background-warning-solid:var(--orange-500);--color-background-warning-solid-hover:var(--orange-600);--color-background-warning-solid-active:var(--orange-600);--color-text-warning-solid:var(--white);--color-background-warning-outline-hover:var(--orange-a25);--color-background-warning-outline-active:var(--orange-a25);--color-border-warning-outline:var(--orange-500);--color-border-warning-outline-hover:var(--orange-500);--color-text-warning-outline:var(--orange-500);--color-text-warning-outline-hover:var(--orange-500);--color-background-warning-ghost-hover:var(--orange-a50);--color-background-warning-ghost-active:var(--orange-a50);--color-text-warning-ghost:var(--orange-500);--color-text-warning-ghost-hover:var(--orange-500);--color-ring-warning:var(--color-ring);--color-ring-warning-soft:var(--color-ring-warning);--color-ring-warning-solid:var(--color-ring-warning);--color-ring-warning-outline:var(--color-ring-warning);--color-ring-warning-ghost:var(--color-ring-warning);--color-text-caution-hover:var(--yellow-800);--color-background-caution-soft:var(--yellow-50);--color-background-caution-soft-hover:var(--yellow-75);--color-background-caution-soft-active:var(--yellow-75);--color-background-caution-soft-alpha:var(--yellow-a50);--color-background-caution-soft-alpha-hover:var(--yellow-a75);--color-background-caution-soft-alpha-active:var(--yellow-a75);--color-background-caution-solid:var(--yellow-600);--color-background-caution-solid-hover:var(--yellow-700);--color-background-caution-solid-active:var(--yellow-700);--color-text-caution-solid:var(--white);--color-background-caution-outline-hover:var(--yellow-a25);--color-background-caution-outline-active:var(--yellow-a25);--color-border-caution-outline:var(--yellow-700);--color-border-caution-outline-hover:var(--yellow-700);--color-text-caution-outline:var(--yellow-700);--color-text-caution-outline-hover:var(--yellow-700);--color-background-caution-ghost-hover:var(--yellow-a50);--color-background-caution-ghost-active:var(--yellow-a50);--color-text-caution-ghost:var(--yellow-700);--color-text-caution-ghost-hover:var(--yellow-700);--color-ring-caution:var(--color-ring);--color-ring-caution-soft:var(--color-ring-caution);--color-ring-caution-solid:var(--color-ring-caution);--color-ring-caution-outline:var(--color-ring-caution);--color-ring-caution-ghost:var(--color-ring-caution);--color-background-danger-soft:var(--red-50);--color-background-danger-soft-hover:var(--red-75);--color-background-danger-soft-active:var(--red-75);--color-background-danger-soft-alpha:var(--red-a50);--color-background-danger-soft-alpha-hover:var(--red-a75);--color-background-danger-soft-alpha-active:var(--red-a75);--color-background-danger-solid:var(--red-500);--color-background-danger-solid-hover:var(--red-600);--color-background-danger-solid-active:var(--red-600);--color-text-danger-solid:var(--white);--color-background-danger-outline-hover:var(--red-a25);--color-background-danger-outline-active:var(--red-a25);--color-border-danger-outline:var(--red-500);--color-border-danger-outline-hover:var(--red-500);--color-text-danger-outline:var(--red-500);--color-text-danger-outline-hover:var(--red-500);--color-background-danger-ghost-hover:var(--red-a50);--color-background-danger-ghost-active:var(--red-a50);--color-text-danger-ghost:var(--red-500);--color-text-danger-ghost-hover:var(--red-500);--color-ring-danger:var(--red-200);--color-ring-danger-soft:var(--color-ring-danger);--color-ring-danger-solid:var(--color-ring-danger);--color-ring-danger-outline:var(--color-ring-danger);--color-ring-danger-ghost:var(--color-ring-danger);--color-background-success-soft:var(--green-50);--color-background-success-soft-hover:var(--green-75);--color-background-success-soft-active:var(--green-75);--color-background-success-soft-alpha:var(--green-a50);--color-background-success-soft-alpha-hover:var(--green-a75);--color-background-success-soft-alpha-active:var(--green-a75);--color-text-success-solid:var(--white);--color-background-success-outline-hover:var(--green-a25);--color-background-success-outline-active:var(--green-a25);--color-text-success-outline:var(--green-500);--color-text-success-outline-hover:var(--green-500);--color-background-success-ghost-hover:var(--green-a50);--color-background-success-ghost-active:var(--green-a50);--color-text-success-ghost:var(--green-500);--color-text-success-ghost-hover:var(--green-500);--color-ring-success:var(--color-ring);--color-ring-success-soft:var(--color-ring-info);--color-ring-success-solid:var(--color-ring-info);--color-ring-success-outline:var(--color-ring-info);--color-ring-success-ghost:var(--color-ring-info);--color-background-discovery-soft:var(--purple-50);--color-background-discovery-soft-hover:var(--purple-75);--color-background-discovery-soft-active:var(--purple-75);--color-background-discovery-soft-alpha:var(--purple-a50);--color-background-discovery-soft-alpha-hover:var(--purple-a75);--color-background-discovery-soft-alpha-active:var(--purple-a75);--color-background-discovery-solid:var(--purple-400);--color-background-discovery-solid-hover:var(--purple-500);--color-background-discovery-solid-active:var(--purple-500);--color-text-discovery-solid:var(--white);--color-background-discovery-outline-hover:var(--purple-a25);--color-background-discovery-outline-active:var(--purple-a25);--color-border-discovery-outline:var(--purple-500);--color-border-discovery-outline-hover:var(--purple-500);--color-background-discovery-ghost-hover:var(--purple-a50);--color-background-discovery-ghost-active:var(--purple-a50);--color-text-discovery-ghost:var(--purple-500);--color-text-discovery-ghost-hover:var(--purple-500);--color-ring-discovery:var(--color-ring);--color-ring-discovery-soft:var(--color-ring);--color-ring-discovery-solid:var(--color-ring);--color-ring-discovery-outline:var(--color-ring);--color-ring-discovery-ghost:var(--color-ring);--color-background-disabled:var(--alpha-05);--color-border-disabled:var(--alpha-06);--font-tracking-wide:0em;--font-tracking-normal:0em;--font-tracking-tight:0em;--font-heading-5xl-size:4.5rem;--font-heading-5xl-line-height:4.5rem;--font-heading-5xl-weight:var(--font-weight-semibold);--font-heading-5xl-tracking:var(--tracking-tight);--font-heading-4xl-size:3.75rem;--font-heading-4xl-line-height:3.75rem;--font-heading-4xl-weight:var(--font-weight-semibold);--font-heading-4xl-tracking:var(--tracking-tight);--font-heading-3xl-size:3rem;--font-heading-3xl-line-height:3rem;--font-heading-3xl-weight:var(--font-weight-semibold);--font-heading-3xl-tracking:var(--tracking-tight);--font-heading-2xl-size:2.25rem;--font-heading-2xl-line-height:2.625rem;--font-heading-2xl-weight:var(--font-weight-semibold);--font-heading-2xl-tracking:var(--tracking-tight);--font-heading-xl-size:2rem;--font-heading-xl-line-height:2.375rem;--font-heading-xl-weight:var(--font-weight-semibold);--font-heading-xl-tracking:var(--tracking-tight);--font-heading-lg-size:1.5rem;--font-heading-lg-line-height:1.75rem;--font-heading-lg-weight:var(--font-weight-semibold);--font-heading-lg-tracking:var(--tracking-normal);--font-heading-md-size:1.25rem;--font-heading-md-line-height:1.625rem;--font-heading-md-weight:var(--font-weight-semibold);--font-heading-md-tracking:var(--tracking-normal);--font-heading-sm-size:1.125rem;--font-heading-sm-line-height:1.625rem;--font-heading-sm-weight:var(--font-weight-semibold);--font-heading-sm-tracking:var(--tracking-normal);--font-heading-xs-size:1rem;--font-heading-xs-line-height:1.5rem;--font-heading-xs-weight:var(--font-weight-semibold);--font-heading-xs-tracking:var(--tracking-normal);--font-text-lg-size:1.125rem;--font-text-lg-line-height:1.8125rem;--font-text-lg-weight:var(--font-weight-normal);--font-text-lg-tracking:var(--tracking-normal);--font-text-md-size:1rem;--font-text-md-line-height:1.5rem;--font-text-md-weight:var(--font-weight-normal);--font-text-md-tracking:var(--tracking-normal);--font-text-sm-size:.875rem;--font-text-sm-line-height:1.25rem;--font-text-sm-weight:var(--font-weight-normal);--font-text-sm-tracking:var(--tracking-normal);--font-text-xs-size:.75rem;--font-text-xs-line-height:1.125rem;--font-text-xs-weight:var(--font-weight-normal);--font-text-xs-tracking:var(--tracking-wide);--font-text-2xs-size:.625rem;--font-text-2xs-line-height:.875rem;--font-text-2xs-weight:var(--font-weight-normal);--font-text-2xs-tracking:var(--tracking-wide);--font-text-3xs-size:.5rem;--font-text-3xs-line-height:.75rem;--font-text-3xs-weight:var(--font-weight-normal);--font-text-3xs-tracking:var(--tracking-wide);--control-size-3xs:1.375rem;--control-size-2xs:1.5rem;--control-size-xs:1.625rem;--control-size-sm:1.75rem;--control-size-md:2rem;--control-size-lg:2.25rem;--control-size-xl:2.5rem;--control-size-2xl:2.75rem;--control-size-3xl:3rem;--control-gutter-2xs:.375rem;--control-gutter-xs:.5rem;--control-gutter-sm:.625rem;--control-gutter-md:.75rem;--control-gutter-lg:.875rem;--control-gutter-xl:1rem;--control-gutter-pill-scaling:1.33;--control-radius-sm:var(--radius-sm);--control-radius-md:var(--radius-md);--control-radius-lg:var(--radius-lg);--control-radius-xl:var(--radius-xl);--control-font-size-sm:var(--font-text-xs-size);--control-font-size-md:var(--font-text-sm-size);--control-font-size-lg:var(--font-text-md-size);--control-icon-size-xs:.875rem;--control-icon-size-sm:1rem;--control-icon-size-md:1.125rem;--control-icon-size-lg:1.25rem;--control-icon-size-xl:1.375rem;--control-icon-size-2xl:1.5rem;--cubic-enter:cubic-bezier(.19, 1, .22, 1);--cubic-exit:cubic-bezier(.8, 0, .4, 1);--cubic-exit-snappy:cubic-bezier(.65, 0, .4, 1);--cubic-move:cubic-bezier(.65, 0, .35, 1);--transition-duration-basic:.15s;--transition-ease-basic:ease;--scrollbar-color:var(--alpha-30);--shadow-hairline:0 0 0 var(--shadow-hairline-width) var(--shadow-hairline-color);--shadow-100:var(--elevation-100-geo) rgb(var(--shadow-color) / var(--shadow-alpha-100));--shadow-100-strong:var(--elevation-100-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-100) * 1.25));--shadow-100-stronger:var(--elevation-100-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-100) * 1.6));--shadow-200:var(--elevation-200-geo) rgb(var(--shadow-color) / var(--shadow-alpha-200));--shadow-200-strong:var(--elevation-200-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-200) * 1.25));--shadow-200-stronger:var(--elevation-200-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-200) * 1.6));--shadow-300:var(--elevation-300-geo) rgb(var(--shadow-color) / var(--shadow-alpha-300));--shadow-300-strong:var(--elevation-300-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-300) * 1.25));--shadow-300-stronger:var(--elevation-300-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-300) * 1.6));--shadow-400:var(--elevation-400-geo) rgb(var(--shadow-color) / var(--shadow-alpha-400));--shadow-400-strong:var(--elevation-400-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-400) * 1.25));--shadow-400-stronger:var(--elevation-400-geo) rgb(var(--shadow-color) / calc(var(--shadow-alpha-400) * 1.6))}:where(:root),:where([data-theme=light]){--color-text-secondary:var(--gray-500);--color-text-tertiary:var(--gray-400);--color-ring:var(--blue-500);--color-background-primary-soft:var(--gray-100);--color-background-primary-soft-hover:var(--gray-150);--color-background-primary-soft-active:var(--gray-200);--color-background-primary-soft-alpha:var(--alpha-08);--color-background-primary-soft-alpha-hover:var(--alpha-12);--color-background-primary-soft-alpha-active:var(--alpha-16);--color-background-primary-surface:var(--alpha-05);--color-border-primary-surface:var(--alpha-05);--color-background-primary-solid:var(--gray-900);--color-background-primary-solid-hover:var(--gray-700);--color-background-primary-solid-active:var(--gray-600);--color-background-primary-outline-hover:var(--alpha-02);--color-background-primary-outline-active:var(--alpha-04);--color-border-primary-outline:var(--alpha-16);--color-border-primary-outline-hover:var(--alpha-20);--color-background-primary-ghost-hover:var(--alpha-08);--color-background-primary-ghost-active:var(--alpha-12);--color-background-secondary-soft:var(--gray-100);--color-background-secondary-soft-hover:var(--gray-150);--color-background-secondary-soft-active:var(--gray-200);--color-background-secondary-soft-alpha:var(--alpha-08);--color-background-secondary-soft-alpha-hover:var(--alpha-12);--color-background-secondary-soft-alpha-active:var(--alpha-16);--color-background-secondary-solid:var(--gray-500);--color-background-secondary-solid-hover:var(--gray-600);--color-background-secondary-solid-active:var(--gray-700);--color-background-secondary-outline-hover:var(--alpha-02);--color-background-secondary-outline-active:var(--alpha-04);--color-border-secondary-outline:var(--alpha-16);--color-border-secondary-outline-hover:var(--alpha-20);--color-background-secondary-ghost-hover:var(--alpha-08);--color-background-secondary-ghost-active:var(--alpha-12);--color-text-info:var(--blue-500);--color-text-info-soft:var(--blue-600);--color-background-info-surface:var(--blue-a25);--color-border-info-surface:var(--blue-a25);--color-text-info-surface:var(--blue-600);--color-text-info-ghost:var(--blue-500);--color-text-info-ghost-hover:var(--blue-500);--color-text-warning:var(--orange-700);--color-text-warning-soft:var(--orange-700);--color-background-warning-surface:var(--orange-a25);--color-border-warning-surface:var(--orange-a25);--color-text-warning-surface:var(--orange-700);--color-text-caution:var(--yellow-700);--color-text-caution-soft:var(--yellow-800);--color-background-caution-surface:var(--yellow-a25);--color-border-caution-surface:var(--yellow-a25);--color-text-caution-surface:var(--yellow-800);--color-text-danger:var(--red-700);--color-text-danger-soft:var(--red-600);--color-background-danger-surface:var(--red-a25);--color-border-danger-surface:var(--red-a25);--color-text-danger-surface:var(--red-600);--color-text-success:var(--green-700);--color-text-success-soft:var(--green-600);--color-background-success-surface:var(--green-a25);--color-border-success-surface:var(--green-a25);--color-text-success-surface:var(--green-600);--color-background-success-solid:var(--green-500);--color-background-success-solid-hover:var(--green-500);--color-background-success-solid-active:var(--green-500);--color-border-success-outline:var(--green-500);--color-border-success-outline-hover:var(--green-500);--color-text-discovery:var(--purple-700);--color-text-discovery-soft:var(--purple-600);--color-background-discovery-surface:var(--purple-a25);--color-border-discovery-surface:var(--purple-a25);--color-text-discovery-surface:var(--purple-600);--color-text-discovery-outline:var(--purple-500);--color-text-discovery-outline-hover:var(--purple-500);--color-text-disabled:var(--gray-400);--color-border-subtle:var(--alpha-05);--color-border:var(--alpha-10);--color-border-strong:var(--alpha-15);--shadow:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--color-surface:var(--gray-0);--color-surface-secondary:var(--gray-50);--color-surface-tertiary:var(--gray-75);--color-surface-elevated:var(--gray-0);--color-surface-elevated-secondary:var(--gray-50)}:where([data-theme=dark]){--color-text-secondary:var(--gray-700);--color-text-tertiary:var(--gray-600);--color-ring:var(--blue-400);--color-background-primary-soft:var(--gray-300);--color-background-primary-soft-hover:var(--gray-350);--color-background-primary-soft-active:var(--gray-400);--color-background-primary-soft-alpha:var(--alpha-12);--color-background-primary-soft-alpha-hover:var(--alpha-16);--color-background-primary-soft-alpha-active:var(--alpha-20);--color-background-primary-surface:var(--alpha-08);--color-border-primary-surface:var(--alpha-08);--color-background-primary-solid:var(--gray-950);--color-background-primary-solid-hover:var(--gray-900);--color-background-primary-solid-active:var(--gray-850);--color-background-primary-outline-hover:var(--alpha-04);--color-background-primary-outline-active:var(--alpha-06);--color-border-primary-outline:var(--alpha-25);--color-border-primary-outline-hover:var(--alpha-30);--color-background-primary-ghost-hover:var(--alpha-12);--color-background-primary-ghost-active:var(--alpha-16);--color-background-secondary-soft:var(--gray-300);--color-background-secondary-soft-hover:var(--gray-350);--color-background-secondary-soft-active:var(--gray-400);--color-background-secondary-soft-alpha:var(--alpha-12);--color-background-secondary-soft-alpha-hover:var(--alpha-16);--color-background-secondary-soft-alpha-active:var(--alpha-20);--color-background-secondary-solid:var(--gray-400);--color-background-secondary-solid-hover:var(--gray-450);--color-background-secondary-solid-active:var(--gray-500);--color-background-secondary-outline-hover:var(--alpha-04);--color-background-secondary-outline-active:var(--alpha-06);--color-border-secondary-outline:var(--alpha-25);--color-border-secondary-outline-hover:var(--alpha-30);--color-background-secondary-ghost-hover:var(--alpha-12);--color-background-secondary-ghost-active:var(--alpha-16);--color-text-info:var(--blue-200);--color-text-info-soft:var(--blue-300);--color-background-info-surface:var(--blue-a50);--color-border-info-surface:var(--blue-a50);--color-text-info-surface:var(--blue-300);--color-text-info-ghost:var(--blue-200);--color-text-info-ghost-hover:var(--blue-200);--color-text-warning:var(--orange-500);--color-text-warning-soft:var(--orange-400);--color-background-warning-surface:var(--orange-a50);--color-border-warning-surface:var(--orange-a50);--color-text-warning-surface:var(--orange-400);--color-text-caution:var(--yellow-500);--color-text-caution-soft:var(--yellow-400);--color-background-caution-surface:var(--yellow-a50);--color-border-caution-surface:var(--yellow-a50);--color-text-caution-surface:var(--yellow-400);--color-text-danger:var(--red-500);--color-text-danger-soft:var(--red-400);--color-background-danger-surface:var(--red-a50);--color-border-danger-surface:var(--red-a50);--color-text-danger-surface:var(--red-400);--color-text-success:var(--green-400);--color-text-success-soft:var(--green-400);--color-background-success-surface:var(--green-a50);--color-border-success-surface:var(--green-a50);--color-text-success-surface:var(--green-400);--color-background-success-solid:var(--green-600);--color-background-success-solid-hover:var(--green-600);--color-background-success-solid-active:var(--green-600);--color-border-success-outline:var(--green-600);--color-border-success-outline-hover:var(--green-600);--color-text-discovery:var(--purple-500);--color-text-discovery-soft:var(--purple-200);--color-background-discovery-surface:var(--purple-a50);--color-border-discovery-surface:var(--purple-a50);--color-text-discovery-surface:var(--purple-200);--color-text-discovery-outline:var(--purple-400);--color-text-discovery-outline-hover:var(--purple-400);--color-text-disabled:var(--gray-500);--color-border-subtle:var(--alpha-06);--color-border:var(--alpha-12);--color-border-strong:var(--alpha-20);--shadow:0 10px 15px -3px #0003, 0 4px 6px -4px #0003;--color-surface:var(--gray-200);--color-surface-secondary:var(--gray-100);--color-surface-tertiary:var(--gray-50);--color-surface-elevated:var(--gray-300);--color-surface-elevated-secondary:var(--gray-400)}:root,:where([data-theme]){--alert-border-radius:var(--radius-xl);--alert-gap:calc(var(--spacing) * 3);--alert-gutter:calc(var(--spacing) * 4);--alert-font-size:var(--font-text-sm-size);--alert-line-height:var(--font-text-sm-line-height);--alert-title-font-weight:var(--font-weight-semibold);--avatar-radius:var(--radius-full);--avatar-size:28px;--avatar-font-size-scaling:.5;--avatar-overflow-font-size-scaling-one:.45;--avatar-overflow-font-size-scaling-two:.37;--avatar-overflow-font-size-scaling-three:.3;--avatar-group-cutout-width:3px;--avatar-group-cutout-color:var(--color-surface);--avatar-group-spacing:-8px;--badge-gutter-sm:calc(var(--control-gutter-2xs) - 1px);--badge-gutter-md:var(--control-gutter-2xs);--badge-gutter-lg:var(--control-gutter-xs);--badge-size-sm:calc(var(--control-size-3xs) - 2px);--badge-size-md:var(--control-size-3xs);--badge-size-lg:var(--control-size-2xs);--badge-radius-sm:var(--radius-xs);--badge-radius-md:var(--radius-xs);--badge-radius-lg:var(--radius-sm);--badge-font-size-sm:var(--font-text-xs-size);--badge-font-size-md:var(--font-text-sm-size);--badge-font-size-lg:var(--font-text-sm-size);--badge-tracking-sm:var(--tracking-wide);--badge-tracking-md:var(--tracking-normal);--badge-tracking-lg:var(--tracking-normal);--badge-font-weight-sm:var(--font-weight-semibold);--badge-font-weight-md:var(--font-weight-semibold);--badge-font-weight-lg:var(--font-weight-semibold);--badge-icon-font-size-sm:var(--font-text-xs-size);--badge-icon-font-size-md:var(--font-text-md-size);--badge-icon-font-size-lg:var(--font-text-md-size);--badge-indicator-size-sm:var(--font-text-xs-size);--badge-indicator-size-md:var(--font-text-xs-size);--badge-indicator-size-lg:var(--font-text-sm-size);--button-gap-sm:3px;--button-gap-md:4px;--button-gap-lg:6px;--button-font-weight:var(--font-weight-medium);--input-gap-xs:4px;--input-gap-sm:6px;--input-gap-md:8px;--input-gap-lg:10px;--input-text-color:var(--color-text);--input-placeholder-text-color:var(--color-text-tertiary);--input-outline-border-color:var(--color-border-primary-outline);--input-outline-border-color-focus:var(--alpha-50);--input-soft-background-color:var(--color-background-primary-soft-alpha);--input-soft-border-color-focus:var(--alpha-20);--link-font-weight:inherit;--link-gap:calc(var(--spacing) * .5);--link-radius:var(--radius-sm);--link-underline-decoration-offset:.1em;--chat-max-width:800px;--chat-gutter:calc(var(--spacing) * 5);--chat-background-color:var(--color-surface);--thread-gutter:calc(var(--spacing) * 4);--composer-gutter:calc(var(--spacing) * 3);--composer-compact-gutter:calc(var(--spacing) * 2);--composer-radius:var(--radius-4xl);--composer-background-color:var(--color-surface-elevated);--smoothing-background-color:var(--color-surface);--user-message-text-color:var(--color-text);--source-list-gutter:var(--thread-gutter);--codeblock-background-color:var(--gray-25);--codeblock-syntax-4:var(--pink-500);--dialog-min-width:250px;--dialog-max-width:450px;--dialog-container-inner-padding:calc(var(--spacing) * 5);--dialog-backdrop-fade-background:var(--color-surface-elevated)}@supports (color:color-mix(in lab,red,red)){:root,:where([data-theme]){--dialog-backdrop-fade-background:color-mix(in oklab, var(--color-surface-elevated) 60%, transparent)}}:root,:where([data-theme]){--menu-gutter:calc(var(--spacing) * 1.5);--menu-radius:var(--radius-xl);--menu-font-size:var(--font-text-sm-size);--menu-line-height:var(--font-text-sm-line-height);--menu-item-padding:calc(var(--spacing) * 1.5) calc(var(--spacing) * 2);--menu-item-gap:calc(var(--spacing) * 1.5);--menu-separator-gutter:var(--menu-gutter) calc(-1 * var(--menu-gutter));--menu-separator-background-color:var(--color-border);--menu-radio-indicator-size:var(--font-text-lg-size);--menu-radio-indicator-hole-size:var(--font-text-3xs-size);--menu-checkbox-indicator-size:var(--font-text-lg-size);--modal-container-inner-padding:calc(var(--spacing) * 5);--popover-radius:var(--radius-xl);--radio-group-col-gap:calc(var(--spacing) * 2.5);--radio-group-row-gap:calc(var(--spacing) * 5);--radio-group-item-gap:calc(var(--spacing) * 1.5);--radio-group-item-font-size:var(--font-text-sm-size);--radio-group-item-line-height:var(--font-text-sm-line-height);--radio-group-indicator-size:var(--font-text-md-size);--radio-group-indicator-border-color:var(--color-border-primary-outline);--radio-group-indicator-border-color-hover:var(--alpha-25);--radio-group-indicator-background-color:var(--color-background-primary-solid);--radio-group-indicator-hole-size:.375rem;--radio-group-indicator-hole-background-color:var(--color-text-primary-solid);--segmented-control-gap:2px;--segmented-control-gutter:2px;--segmented-control-font-weight:var(--font-weight-semibold);--segmented-control-thumb-shadow:0 1px 4px -1px #0003;--segmented-control-option-highlight-gutter:1px;--select-control-font-weight:var(--font-weight-medium);--switch-track-width:32px;--switch-track-height:19px;--switch-thumb-offset:3px;--switch-thumb-size:calc(var(--switch-track-height) - 2 * var(--switch-thumb-offset));--switch-thumb-shadow:0 1px 2px #0003;--switch-label-gap:calc(var(--spacing) * 2)}:where(:root),:where([data-theme=light]){--avatar-image-border-color:var(--alpha-04);--input-outline-border-color-hover:var(--alpha-25);--input-border-color-invalid:var(--red-500);--link-primary-text-color:var(--blue-500);--link-primary-text-color-hover:var(--blue-800);--user-message-background-color:var(--alpha-05);--codeblock-syntax-1:#c0660d;--codeblock-syntax-2:var(--blue-500);--codeblock-syntax-3:var(--green-600);--codeblock-syntax-5:var(--purple-500);--dialog-backdrop-dim-background:#0000004d;--menu-item-background-color:var(--alpha-08);--modal-backdrop-background:#0000004d;--segmented-control-background:var(--gray-100);--segmented-control-thumb-background:var(--gray-0);--segmented-control-option-highlight-background-color:var(--gray-200);--slider-track-color:var(--gray-150);--slider-range-color:var(--gray-450);--switch-track-color:var(--gray-150);--switch-track-color-hover:var(--gray-200);--switch-track-color-checked:var(--gray-900);--switch-track-color-checked-disabled:var(--gray-300);--switch-track-color-disabled:var(--gray-100);--switch-thumb-color:var(--gray-0);--switch-thumb-color-disabled:var(--gray-0)}:where([data-theme=dark]){--avatar-image-border-color:var(--alpha-15);--input-outline-border-color-hover:var(--alpha-30);--input-border-color-invalid:var(--red-600);--link-primary-text-color:var(--blue-300);--link-primary-text-color-hover:var(--blue-400);--user-message-background-color:var(--alpha-08);--codeblock-syntax-1:var(--yellow-100);--codeblock-syntax-2:var(--blue-200);--codeblock-syntax-3:var(--green-300);--codeblock-syntax-5:var(--purple-300);--dialog-backdrop-dim-background:#00000080;--menu-item-background-color:var(--alpha-10);--modal-backdrop-background:#00000080;--segmented-control-background:var(--gray-0);--segmented-control-thumb-background:var(--gray-300);--segmented-control-option-highlight-background-color:var(--gray-300);--slider-track-color:var(--gray-400);--slider-range-color:var(--gray-600);--switch-track-color:var(--gray-400);--switch-track-color-hover:var(--gray-450);--switch-track-color-checked:var(--blue-400);--switch-track-color-checked-disabled:var(--blue-700);--switch-track-color-disabled:var(--gray-300);--switch-thumb-color:var(--gray-1000);--switch-thumb-color-disabled:var(--gray-800)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html,:host{font-synthesis-weight:none}textarea{resize:none}img,svg{flex-grow:0;flex-shrink:0}input,textarea,select,optgroup{-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;filter:none;outline-offset:0;outline-width:2px}a,button,input,label,select,textarea,:where([aria-role=button]){touch-action:manipulation}button{text-transform:none;vertical-align:middle}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}pre{white-space:pre-wrap}table{border-spacing:0}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}html,:host{color:var(--color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:var(--tracking-normal)}[data-theme=light]{color-scheme:light}[data-theme=dark]{color-scheme:dark}*{scrollbar-color:var(--scrollbar-color) transparent;scrollbar-width:thin}[data-exiting]{pointer-events:none}::placeholder{color:var(--color-text-tertiary)}b,strong{font-weight:var(--font-weight-semibold)}@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_AMS-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Caligraphic-Bold.woff2)format("woff2")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Caligraphic-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Fraktur-Bold.woff2)format("woff2")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Fraktur-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Main-Bold.woff2)format("woff2")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Main-BoldItalic.woff2)format("woff2")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Main-Italic.woff2)format("woff2")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Main-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Math-BoldItalic.woff2)format("woff2")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Math-Italic.woff2)format("woff2")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_SansSerif-Bold.woff2)format("woff2")}@font-face{font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_SansSerif-Italic.woff2)format("woff2")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_SansSerif-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Script-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Size1-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Size2-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Size3-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Size4-Regular.woff2)format("woff2")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(https://cdn.openai.com/common/fonts/katex/KaTeX_Typewriter-Regular.woff2)format("woff2")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.0"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{width:100%;height:inherit;fill:currentColor;fill-opacity:1;fill-rule:nonzero;stroke:currentColor;stroke-dasharray:none;stroke-dashoffset:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-width:1px;display:block;position:absolute}.katex svg path{stroke:none}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.bottom-0{bottom:0}.left-0{left:0}.isolate{isolation:isolate}.container{width:100%}@media (min-width:380px){.container{max-width:380px}}@media (min-width:576px){.container{max-width:576px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.mx-px{margin-inline:1px}.mt-1{margin-top:var(--spacing)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mb-1{margin-bottom:var(--spacing)}.\\!hidden{display:none!important}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.table{display:table}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-0{height:0}.h-\\[var\\(--button-icon-size\\)\\]{height:var(--button-icon-size)}.w-\\[var\\(--button-icon-size\\)\\]{width:var(--button-icon-size)}.w-full{width:100%}.max-w-sm{max-width:var(--container-sm)}.min-w-\\[120px\\]{min-width:120px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.resize{resize:both}.grid-cols-\\[auto_1fr\\]{grid-template-columns:auto 1fr}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-default{border-color:var(--color-border)}.border-subtle{border-color:var(--color-border-subtle)}.bg-surface{background-color:var(--color-surface)}.fill-secondary{fill:var(--color-text-secondary)}.p-4{padding:calc(var(--spacing) * 4)}.pt-4{padding-top:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-right{text-align:right}.heading-lg{font-size:var(--font-heading-lg-size);font-weight:var(--font-heading-lg-weight);letter-spacing:var(--font-heading-lg-tracking);line-height:var(--font-heading-lg-line-height)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));letter-spacing:var(--tw-tracking,var(--text-sm--letter-spacing));font-weight:var(--tw-font-weight,var(--text-sm--font-weight))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-wrap{text-wrap:wrap}.text-ellipsis{text-overflow:ellipsis}.text-secondary{color:var(--color-text-secondary)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.shadow-lg{--tw-shadow:var(--shadow-300);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (min-width:576px){.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}}@font-face{font-family:Byte Sans;src:url(data:font/ttf;base64,AAEAAAASAQAABAAgRFNJRwAAAAEAAGYYAAAACEdERUYArgCgAAABLAAAACJHUE9TC0cL/AAAAVAAAAdGR1NVQlhYLa0AAAiYAAAA4E9TLzJolGcCAAAJeAAAAGBjbWFwX62n7AAACdgAAAHAY3Z0IAvjAvoAAFckAAAANGZwZ22eNhHKAABXWAAADhVnYXNwAAAAEAAAVxwAAAAIZ2x5ZvX2ACkAAAuYAABCnGhlYWQcLIvhAABONAAAADZoaGVhCI8EtwAATmwAAAAkaG10eDyNHJYAAE6QAAACLGxvY2FvbIFoAABQvAAAARhtYXhwAoYPDQAAUdQAAAAgbmFtZT5DSWYAAFH0AAADf3Bvc3R/ZzrDAABVdAAAAaVwcmVwaEbInAAAZXAAAACnAAEAAAAMAAAAAAAAAAIAAwAvAC8ABAA0ADQABAA2ADYAAgAAAAEAAAAKAB4ALgABREZMVAAIAAQAAAAA//8AAQAAAAFrZXJuAAgAAAACAAAAAQACAAYADgACAAgAAQAUAAIACAADAEYGHAY8AAEGYAAEAAAABQAUABoAJAAqADQAAQB5/+wAAgAV/+wAef/iAAEAef/xAAIAFf/xAHn/4gABAHkAAAABBjAABAAAACcAWABiAGgAqgDkAVoBpAHmAhgCcgKYAr4C5AL+AygDLgNEA2oDdAOKA7QDugPcBAIELARWBGgEngS8BMoE3AUKBTQFegWoBbYFxAXKBdAAAgA0/+IANv/iAAEAEwAAABAAHP/EAB7/xAAf/8QAIP/EACH/zgAi/8QAJf+wACr/xAAs/8QALv/YAC//zgAw/9gAMf/EADMAAAA0/8QANv/EAA4AFf+mABz/2AAe/9gAH//YACD/2AAi/9gAJf+6ACr/2AAs/9gAL//YADD/2AAx/9gANP/YADb/2AAdABQAAAAc/7UAHQAAAB7/tQAf/7UAIP+1ACEAAAAi/7UAIwAAACQAAAAl/7UAKP/sACn/7AAq/7UAKwAAACz/tQAt/+wALv/YADD/2AAx/+wAM//YADT/2AA1/+wANv/YADv/7AA9/+wAQv/sAEP/7ABZ/+wAEgAC/6EABP/sAAj/7AAL/9gAEP/iABL/4gAU/+wAHP+6AB7/vwAf/78AIP+/ACL/vwAl/8QAKv+3ACsAAAAs/8QALv/sADD/7AAQAAL/xAAE/+wACP/YAAv/xAAQ/9gAEv/YABT/2AAc/9gAHQAAAB7/2AAf/9gAIP/YACL/2AAl/84AKv/YACz/2AAMABz/zgAe/84AH//OACD/zgAi/84AJf/OACr/zgAs/84ALv/YADD/7AA0/+wANv/sABYAHP+mAB3/4gAe/6YAH/+mACD/pgAi/6YAI//iACX/sAAm/+wAKP/iACn/4gAq/6YAK//iACz/pgAt/+wALv/EAC//4gAw/8QAM//iADT/7AA1/+IANv/OAAkADAAAABUAAAAXAAAAGAAAABkAAAAa/+IAJf+wADMAAAA0AAAACQAV/7oAF/+/ABj/2AAZ/84AGv+mACX/sAAx/+IAM//YADT/2AAJABX/ugAX/78AGP/YABn/zgAa/6YAJf+wADH/9gAz/+wANP/YAAYAFQAAABgAAAAa/+IAIgAAACX/vwAzAAAACgAV/7oAF/+/ABj/2AAZ/84AGv+mACX/sAAm/+wAMf/2ADP/2AA0/9gAAQAl/7oABQAVAAAAGQAAABr/4gAl/9gAMwAAAAkAFf/EABf/7AAY//YAGf/YABr/zgAl/7AAMf/2ADP/7AA0/+IAAgAVAAAAJf+mAAUAGAAAABr/7AAl/+IALQAAADMAAAAKABr/zgAc/9gAHv/YAB//2AAg/9gAIv/YACX/ugAq/9gALP/YAC7/7AABACX/sAAIABX/ugAX/+wAGf/sABr/xAAl/7AAMf/2ADP/4gA0/+IACQAV/84AF//sABn/7AAa/8QAIgAAACX/sAAx//YAM//nADT/4gAKABX/vwAX/78AGP/YABn/zgAa/6YAJf+wACb/7AAx/+IAM//OADT/7AAKABX/ugAX/7oAGP/YABn/zgAa/6YAJf+wACb/7AAx/+IAM//YADT/7AAEABUAAAAa/+IAJf/iADMAAAANABn/7AAa/+wAHP/YAB7/2AAf/9gAIP/YACL/2AAl/7oAKv/YACz/2AAu//EAMQAAADMAAAAHABX/2AAX/+wAGf/YABr/xAAl/7oAMwAAADT/4gADABr/4gAl/84AMwAAAAQAFf/YABcAAAAa/8QAJf+6AAsAFf/sABr/4gAc/+IAHv/iAB//4gAg/+IAIv/iACMAAAAl/7oAKv/iACz/4gAKABX/7AAa/+IAHP/iAB7/4gAf/+IAIP/iACL/2AAl/8QAKv/iACz/4gARABX/2AAa/+IAHP/YAB0AAAAe/9gAH//YACD/2AAi/9gAIwAAACX/xAAoAAAAKv/OACsAAAAs/9gALgAAAC8AAAAw/+IACwAV/9gAGv/OABz/2AAe/9gAH//YACD/3QAi/9gAJf/EACr/2AAs/9gAMP/2AAMAFf/sABr/4gAl/7oAAwAV/9gAGv/OACX/ugABABX/7AABABX/7AABABX/7AACAI4ABAAAAK4AxAAEAAIAAP/EAAD/2AAA/+wAAP/iAAIAegAEAAAArACkAAgAAgAA/+IAAP/iAAD/4gAA/+wAAP/sAAD/7AAA/+IAAP/iAAIAAQA6AD4AAAACAAgAAwADAAAACAAIAAEADAANAAIAFQAVAAQAFwAaAAUAHAA2AAkAQgBDACQAWQBZACYAAQAEAAwADQAVABoAAQAIAB0AHgAgACMAKAApACoAKwACAAMADQANAAEAFQAVAAIAGgAaAAMAAQAyAAEAAQABAB4ADgABAAAAAgAAAAAAAwAAAAAAAAAAAAQABQAGAAcAAAABAAAACgAmAGQAAURGTFQACAAEAAAAAP//AAUAAAABAAIAAwAEAAVhYWx0ACBkbGlnACZmd2lkACxzYWx0ADJzczAxADgAAAABAAAAAAABAAEAAAABAAIAAAABAAMAAAABAAQABQAMABQAHAAkACwAAQAAAAEATAAEAAgAAQAgAAEAAAABACoAAQAAAAEAKAABAAAAAQAmAAEALgABAAgAAQAEADYAAgAvAAEAIgAKAAEAIgAOAAEAHAAOAAIAHAACAFIAUQABAAEANAABAAEARwABAAEARAABAAIARABHAAMCRwH0AAUACAKKAlgAAABLAooCWAAAAV4AMgE+AAAAAAYAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFVLV04AQAAg/wEC+P8QAMgDwADwAAAAAQAAAAACEgK8AAAAIAACAAAAAgAAAAMAAAAUAAMAAQAAABQABAGsAAAATgBAAAUADgAhACYALwA5AEAAWgBfAHoAewB+AKMApQCnAKkArgCxALcAvwDXAPcgFCAaIB4gIiAmIDAgOiBEIKwhIiGUIZkiEiIeIkgiYCJl/wH//wAAACAAIwAoADAAOgBBAFsAYQB7AH0AoQClAKcAqQCuALAAtwC/ANcA9yATIBggHCAiICYgMCA5IEQgrCEiIZAhliISIh4iSCJgImT/Af//AAAAAAAAAAcAAP/BAAD/u//aAAAAAP/E/9//3v/aAAD/lP+L/5X/duBHAAAAAOAq4CDgSuAq3/3fu99nAAAAAN5Z3lreLd4PAAABUAABAE4AUABWAAAAYgAAAGwAAAAAAHAAcgAAAAAAAAAAAG4AAAAAAAAAAAAAAGYAagAAAAAAAAAAAAAAAAAAAGAAaAAAAAAAAAAAAGYAAAAAAAEARwBOAGYAeQCFAFMAVABNAGoAQwBZAEIATwBEAEUAcQBuAHAASQCEAFcAUABYAHcAXABWAHYASABlAGgAigB0AGEAYgBdAF8AYABeAIEAewB9AH8AgwCCAHwAfgCAAHMAcgAKAF3/EAGaAvgAAwAPABUAGQAjACkANQA5AD0ASAD6QPdBASEBSwAWGBUVFnIAASQBBwIBB2cGAQIFAQMEAgNnAAQlAQoMBApnAAwLAQkIDAlnAAgmARENCBFnJwEUDg0UVxABDQAODw0OZwAPABITDxJnABMoGgIYFhMYZwAVABcZFRdoABkpARweGRxnAB4AHRseHWcAGyoBIx8bI2ciAR8AISAfIWcAIAAAIFcAICAAXwAAIABPPj42NioqJCQaGhAQBAQ+SD5IR0ZFRENCQD89PDs6Njk2OTg3KjUqNTQzMjEwLy4tLCskKSQpKCcmJRojGiMiISAfHh0cGxkYFxYQFRAVFBMSEQQPBA8REREREhEQKwYdKwUhESEHFTMVIxUzNSM1MzUHFTM1IzUHIzUzBxUzFSMVMzUzNQcVIxUzNQcVMzUzFSM1IxUzNQcVMzUHIzUzBxUzBxUzNSM3MzUBmv7DAT3yQUKmQkKmpkIiISFCQkJkQiGFpmQiIWQhpqamIWRkhUZGpmZGIPAD6EMhJSEhJSGBaCJGRiRhISUhRiE8QiJkejgXL1Bxca1xcVAvZyEvISEvIQACAB4AAAKwArwABwAKACxAKQoBBAIBTAAEAAABBABoAAICDk0FAwIBAQ8BTgAACQgABwAHERERBgcZKyEnIQcjATMBATMDAj9C/tRBcgEXYQEa/kbhcaysArz9RAENASUAAAAAAwBBAAACcQK8AA4AFwAgAERAQQYBBAMBTAcBAwAEBQMEZwACAgBfBgEAAA5NCAEFBQFfAAEBDwFOGBgPDwEAGCAYHx4cDxcPFhUTDQsADgEOCQcWKwEyFhUUBgcWFhUUBiMhEQA2NTQmIyMVMxI2NTQmIyMVMwGCY3MyKzo8dmj+rgFvPj0009FFQkU03+ECvGNUM1MWFls8VmYCvP7UNS0wOMr+0zgxLzfPAAEALf/xArUCygAdAC5AKxoZCwoEAgEBTAABAQBhAAAAFE0AAgIDYQQBAwMVA04AAAAdABwmJSYFBxkrBCYmNTQ2NjMyFhcHJiYjIgYGFRQWFjMyNjcXBgYjASafWlqfZGGcLVMcb0pCb0JCb0JFayVULp1gD2GoZ2SlYFtPNDRHQXZOUHpDQjc0TlsAAgBBAAACmQK8AAoAEwAtQCoAAgIAXwQBAAAOTQUBAwMBXwABAQ8BTgsLAQALEwsSEQ8JBwAKAQoGBxYrATIWFhUUBgYjIxEANjU0JiMjETMBLmylWlqlbO0BYoqKgnd3ArxXn2hon1cCvP2mh3V3hv4HAAABAEEAAAIuArwACwApQCYAAQACAwECZwAAAAVfAAUFDk0AAwMEXwAEBA8EThEREREREAYHHCsBIRUhFSEVIRUhESECLv58AW7+kgGE/hMB7QJbxGHUYgK8AAAAAAEAQQAAAi4CvAAJACNAIAABAAIDAQJnAAAABF8ABAQOTQADAw8DThEREREQBQcbKwEhFSEVIREjESECLv58AW7+kmkB7QJbzmH+1AK8AAAAAQAt//IC2ALKACEAMEAtEA8CBQIBTAAFAAQDBQRnAAICAWEAAQEUTQADAwBhAAAAFQBOERImJSYjBgccKwEUBgYjIiYmNTQ2NjMyFhcHJiYjIgYGFRQWFjMyNjcjNSEC2FSXYWOhW1uhY12RME8haEVDcEFDcEFachHhAU8BTWidVmKnY2OnYk5HOzE7RHlLSnlFaVNhAAABAEEAAAKSArwACwAhQB4AAQAEAwEEZwIBAAAOTQUBAwMPA04RERERERAGBxwrEzMRIREzESMRIREjQWkBf2lp/oFpArz+3AEk/UQBN/7JAAEAQQAAAKoCvAADABNAEAAAAA5NAAEBDwFOERACBxgrEzMRI0FpaQK8/UQAAQAe//MB7AK8AA8AJkAjAwICAAEBTAABAQ5NAAAAAmEDAQICFQJOAAAADwAOEyQEBxgrFiYnNxYzMjY1ETMRFAYGI7B1HVkiY0BHaUBtQw1BPjNMPToB7P4UR2QyAAAAAQBBAAACkAK8AAsAJkAjCgcCAQQAAQFMAgEBAQ5NBAMCAAAPAE4AAAALAAsSERMFBxkrIQMHFSMRMxEBMwEBAhbxe2lpAVh6/u8BJQFEh70CvP6TAW3+1P5wAAABAEEAAAH+ArwABQAZQBYAAAAOTQABAQJgAAICDwJOEREQAwcZKxMzESEVIUFpAVT+QwK8/aZiAAEAQQAAAx4CvAAMAChAJQoHAgMDAAFMAAMAAgADAoABAQAADk0EAQICDwJOEhIREhAFBxsrEzMTEzMRIxEDIwMRI0F77/l6ZtdszWcCvP4LAfX9RAIU/kYBuv3sAAAAAAEAQQAAApACvAAJAB5AGwcCAgIAAUwBAQAADk0DAQICDwJOEhESEAQHGisTMwERMxEjAREjQXMBc2lz/o1pArz96QIX/UQCFv3qAAACAC3/8QLjAsoADwAfACxAKQACAgBhAAAAFE0FAQMDAWEEAQEBFQFOEBAAABAfEB4YFgAPAA4mBgcXKwQmJjU0NjYzMhYWFRQGBiM+AjU0JiYjIgYGFRQWFjMBJZ5aWZ9kZJ5YWZ5jSmw5OGxLSm05OmxKD2GpZmelXV2kaGapYWRJekpMdkNDd0tJe0kAAAACAEEAAAJaArwACgATADJALwYBBAABAgQBZwADAwBfBQEAAA5NAAICDwJOCwsBAAsTCxIRDwkIBwUACgEKBwcWKwEyFhUUBiMjESMRADY1NCYjIxUzAWB2hIV1tmkBZEtKPb+/Arx0Z2Z3/vwCvP6pQTs9PvcAAAACAC3/8QLsAsoAEwAmAIpLsBBQWEAMGBUSAwUDAQEABQJMG0AMGBUSAwUDAQECBQJMWUuwEFBYQCAAAwQFBAMFgAAEBAFhAAEBFE0HAQUFAGIGAgIAABUAThtAJAADBAUEAwWAAAQEAWEAAQEUTQYBAgIPTQcBBQUAYgAAABUATllAFRQUAAAUJhQlHx0XFgATABMmIggHGCshJwYjIiYmNTQ2NjMyFhYVFAYHFyQ3JzMXNjU0JiYjIgYGFRQWFjMCcihTbmWfWFieZmSeWCwqX/7kNpB6VzE4bEtKbDo6bUkrOmKoZmikXV2kaEiAMWhVIp5fSGRLd0NEdktJe0kAAgBBAAACYgK8AA4AFwArQCgCAQEEAUwABAABAAQBZwAFBQNfAAMDDk0CAQAADwBOJCMhESETBgccKwAGBxMjAyMjESMRITIWFQUzMjY1NCYjIwJiRkF8em0IvmkBJneE/kjGPUpKPcYBmGMX/uIBDf7zArx1ZnM7OD0+AAEAL//1Al4CyAAnAC5AKxcWAwIEAAIBTAACAgFhAAEBFE0AAAADYQQBAwMVA04AAAAnACYlKyUFBxkrFiYnNxYWMzI2NTQmJyYmNTQ2NjMyFhcHJiYjIgYVFBYXFhYVFAYGI/WVMVApXEhEY19YfYBLfEhViyxQIlo+RmJWY2yRTX5IC0hCQzA1Ni4tMw8UV1lBYDM/QD4rLjowLCsQEmVXPl8zAAAAAAEAHgAAAl0CvAAHACFAHgIBAAADXwQBAwMOTQABAQ8BTgAAAAcABxEREQUHGSsBFSMRIxEjNQJd62nrArxh/aUCW2EAAQBB//ECjQK8ABUAIUAeAgEAAA5NAAEBA2EEAQMDFQNOAAAAFQAUFCQUBQcZKwQmJjURMxEUFhYzMjY2NREzERQGBiMBBoNCaSpTPD1YLGlEh18PToFMAbD+VzBWNjVWMQGp/lBLgU8AAAAAAQAeAAACsQK8AAYAG0AYAgECAAFMAQEAAA5NAAICDwJOERIQAwcZKxMzExMzASMecNrZcP7mXwK8/dECL/1EAAEAHgAAA9oCvAAMACFAHgoFAgMDAAFMAgECAAAOTQQBAwMPA04SERISEAUHGysTMxMTMxMTMwMjAwMjHm+YnHKgmG/Pb6KebwK8/csCNf3LAjX9RAIY/egAAAAAAQAeAAACvAK8AAsAH0AcCQYDAwIAAUwBAQAADk0DAQICDwJOEhISEQQHGisBATMTEzMBASMDAyMBK/79gsPEgf79AQ2Bzs2CAWUBV/7/AQH+qf6bAQ/+8QAAAAABAB4AAAKpArwACAAdQBoGAwADAgABTAEBAAAOTQACAg8CThISEQMHGSsBATMTEzMBESMBL/7vcdXVcP7vaQE5AYP+zwEx/n3+xwAAAQAoAAACPAK8AAkAKUAmBQEAAQABAwICTAAAAAFfAAEBDk0AAgIDXwADAw8DThESEREEBxorNwEhNSEVASEVISgBfv6OAgj+ggF8/e5aAfxmWv4FZwAAAAIAIP/yAlECIAAQACAAe0uwElBYQAoPAQQCAwEFBAJMG0AKDwEEAwMBBQQCTFlLsBJQWEAZAAQEAmEGAwICAhdNBwEFBQBhAQEAAA8AThtAIQYBAwMRTQAEBAJhAAICF00AAAAPTQcBBQUBYQABARUBTllAFBERAAARIBEfGRcAEAAQJiIRCAcZKwERIzUGIyImJjU0NjYzMhc1AjY2NTQmJiMiBgYVFBYWMwJRZ0p3SnlGRnlKeEl7US4uUDM2Uy4uUzYCEv3uU2FLgk9LfkleUP4/M1YzL1MyMlIuNFczAAAAAAIARP/0AnQCygASACIAkrYPCgIFBAFMS7AUUFhAHQACAhBNAAQEA2EGAQMDF00HAQUFAGEBAQAAFQBOG0uwL1BYQCEAAgIQTQAEBANhBgEDAxdNAAEBD00HAQUFAGEAAAAVAE4bQCEABAQDYQYBAwMXTQACAgFfAAEBD00HAQUFAGEAAAAVAE5ZWUAUExMAABMiEyEbGQASABEREyYIBxkrABYWFRQGBiMiJicVIxEzETY2MxI2NjU0JiYjIgYGFRQWFjMBtXlGR3tKPl8iZWUiYEAiUy4uUzYyUS4uUTICIUp+TE6BSjUsVQLK/vYsNf4wNFcyL1Q0NFYwMVU0AAABACD/8QIMAiAAHAAuQCsZGAsKBAIBAUwAAQEAYQAAABdNAAICA2EEAQMDFQNOAAAAHAAbJiQmBQcZKxYmJjU0NjYzMhYXByYjIgYGFRQWFjMyNjcXBgYj3nlFRXlLS3QiTzFgK0suMEwoMkMdUCN1Sw9Kgk9Nfkk+Oi9HLFE2OFUuJSIuOz8AAgAg//QCUALKABIAIgCSthEDAgUEAUxLsBRQWEAdBgEDAxBNAAQEAmEAAgIXTQcBBQUAYQEBAAAPAE4bS7AvUFhAIQYBAwMQTQAEBAJhAAICF00AAAAPTQcBBQUBYQABARUBThtAIQAEBAJhAAICF00GAQMDAF8AAAAPTQcBBQUBYQABARUBTllZQBQTEwAAEyITIRsZABIAEiYjEQgHGSsBESM1BgYjIiYmNTQ2NjMyFhcRAjY2NTQmJiMiBgYVFBYWMwJQZSJfPkp7R0Z5SkBgInxRLi5RMjZTLi5TNgLK/TZVLDVKgU5Mfko1LAEK/Yc0VTEwVjQ0VC8yVzQAAAIAIP/xAjQCIAAZACEAOEA1FhUCAgEBTAAFAAECBQFnAAQEAGEAAAAXTQACAgNhBgEDAxUDTgAAISAdGwAZABgjFSYHBxkrFiYmNTQ2NjMyFhYVFAcFHgIzMjY3FwYGIxImIyIGBgch4ntHSHxLU3U9BP5XCjVGIjRTGk8jfVGZVz8oSTMFAUoPS4FPTX5JRXpPEiYBKj0gJyAzOzoBf1AjQSoAAQAhAAABfgLaABIAWkAKEQEABhIBAQACTEuwL1BYQBwAAAAGYQAGBhZNBAECAgFfBQEBARFNAAMDDwNOG0AaAAYAAAEGAGkEAQICAV8FAQEBEU0AAwMPA05ZQAoiEREREREgBwcdKwAjIgczFSMRIxEjNTM2NjMyFxUBXhhTAYyMZG1tBExbJh8CgG5f/k0Bs19pXwVfAAACACD/AgJQAiAAIAAwAHlADBkLAgYFAwICAAECTEuwElBYQCIABQUCYQMBAgIXTQgBBgYBYQABARVNAAAABGEHAQQEGQROG0AmAAMDEU0ABQUCYQACAhdNCAEGBgFhAAEBFU0AAAAEYQcBBAQZBE5ZQBUhIQAAITAhLyknACAAHxMmJiUJBxorFiYnNxYWMzI2NjU1BgYjIiYmNTQ2NjMyFhc1MxEUBgYjEjY2NTQmJiMiBgYVFBYWM/OENkQgZDs2TyoiYT9KeUZGeUpAYSFlTX5GMFEuLlEyNlMuLlQ1/jVDTio6NFErQCw2S39MTYFKNS1U/flOeUIBTTVWMDFVNDRXMi9VNAABAEQAAAIeAsoAFQBQtQEBAgABTEuwL1BYQBcFAQQEEE0AAgIAYQAAABdNAwEBAQ8BThtAFwACAgBhAAAAF00FAQQEAV8DAQEBDwFOWUANAAAAFQAVFCMUIwYHGisTETY2MzIWFhURIxE0JiMiBgYVESMRphpbPDZbNmdGPCc/JWYCyv77KzA1XTj+qgEyO1AqRyr+3gLKAAIARAAAAK0C1wADAAcAPEuwJlBYQBUAAQEAXwAAABBNAAICEU0AAwMPA04bQBMAAAABAgABZwACAhFNAAMDDwNOWbYREREQBAcaKxMzFSMXMxEjRGlpAmVlAtdfZv3uAAIAPP8BASEC1wADAAwAT0uwJlBYQBsAAQEAXwAAABBNAAICEU0FAQQEA2IAAwMZA04bQBkAAAABAgABZwACAhFNBQEEBANiAAMDGQNOWUANBAQEDAQMEhQREAYHGisTMxUjAjY1ETMRFCM1umdnNDRm5ALXX/zqVlYCBP3j9GEAAQBEAAACNQK8AAsAKkAnCgcCAQQAAgFMAAEBDk0AAgIRTQQDAgAADwBOAAAACwALEhETBQcZKyEDBxUjETMRNzMHEwHCp3JlZf1/xtYBAHaKArz+Wf7N/roAAAABAEQAAACpAskAAwAoS7AvUFhACwAAABBNAAEBDwFOG0ALAAAAAV8AAQEPAU5ZtBEQAgcYKxMzESNEZWUCyf03AAAAAAEARAAAA2kCIQAiAGVLsBBQWLYGAQIDAAFMG7YGAQIDBwFMWUuwEFBYQBYFAQMDAGEIBwEDAAAXTQYEAgICDwJOG0AaCAEHBxFNBQEDAwBhAQEAABdNBgQCAgIPAk5ZQBAAAAAiACITIxMjFCQiCQcdKxMVNjMyFhc2NjMyFhYVESMRNCYjIgYVESMRNCYjIgYVESMRpjduMlQcGWY7NlkzZj49NklmPzs6RWYCEk1cNSspNzVdOf6qATI9TlVG/t4BMj1OWUL+3gISAAEARAAAAh4CIAAVAFpLsBJQWLUBAQIAAUwbtQEBAgQBTFlLsBJQWEATAAICAGEFBAIAABdNAwEBAQ8BThtAFwUBBAQRTQACAgBhAAAAF00DAQEBDwFOWUANAAAAFQAVFCMUIwYHGisTFTY2MzIWFhURIxE0JiMiBgYVESMRphpbPDZbNmdGPCc/JWYCEk0rMDVdOP6qATI7UCpHKv7eAhIAAAAAAgAg//ACQgIiAA8AHwAsQCkAAgIAYQAAABdNBQEDAwFhBAEBARUBThAQAAAQHxAeGBYADwAOJgYHFysWJiY1NDY2MzIWFhUUBgYjPgI1NCYmIyIGBhUUFhYz5X1ISH1MTH1ISH1MNU0oKE01NE4pKU40EEyDT0t/Skp+TE+DTF81WDMuUzMzUy4zWDUAAAAAAgBE/xACdAIfABIAIgBotg8KAgUEAUxLsBRQWEAdAAQEAmEGAwICAhFNBwEFBQBhAAAAFU0AAQETAU4bQCEAAgIRTQAEBANhBgEDAxdNBwEFBQBhAAAAFU0AAQETAU5ZQBQTEwAAEyITIRsZABIAERETJggHGSsAFhYVFAYGIyImJxEjETMVNjYzEjY2NTQmJiMiBgYVFBYWMwG1eUZGeUpAYCJlZSJgQCJTLi5TNjJRLi5RMgIfSYBOTIBKNSz+vQMCVCw1/jAzVTAzVjM0VDExVjQAAAAAAgAg/xACUAIgABIAIgBothEDAgUEAUxLsBJQWEAdAAQEAmEGAwICAhdNBwEFBQFhAAEBFU0AAAATAE4bQCEGAQMDEU0ABAQCYQACAhdNBwEFBQFhAAEBFU0AAAATAE5ZQBQTEwAAEyITIRsZABIAEiYjEQgHGSsBESMRBgYjIiYmNTQ2NjMyFhc1AjY2NTQmJiMiBgYVFBYWMwJQZSJgQEp5RkZ5SkBgInxRLi5RMjZTLi5TNgIS/P4BRSw1Sn5MTYFKNSxT/j80VTAxVTQ0VzIvVDMAAAAAAQBEAAABcQIhAAwAV0uwEFBYtQEBAQABTBu1AQEBAwFMWUuwEFBYQBIAAQEAYQQDAgAAF00AAgIPAk4bQBYEAQMDEU0AAQEAYQAAABdNAAICDwJOWUAMAAAADAAMFBETBQcZKxMVNjYzFSIGBhURIxGoGWpGPFoyZQISQSomXyE7Jv7AAhIAAAEAK//yAeMCHgAoAC5AKxcWAwIEAAIBTAACAgFhAAEBF00AAAADYQQBAwMVA04AAAAoACclLCQFBxkrFiYnNxYzMjY3NCYmJyYmNTQ2NjMyFhcHJiYjIgYVFBYWFxYWFRQGBiPPeylCSVkzQgEjOUNSXDlhOT1yI0AWSjA0RxxAQU9lPmQ3DjQxOUMjIxkcDgwORD82TicsMTYcICcmFhkRCw1JQTNLKAAAAAABAB7/9AGAApoAFAAyQC8TAQUBFAEABQJMCgkCAkoEAQEBAl8DAQICEU0ABQUAYQAAABUATiIRExETIAYHHCsEIyImNREjNTM1NxUzFSMRFDMyNxUBXyJeUHFxYo+PbAkaDFRaARRcah6IXP7sUwJZAAAAAAEARP/yAh4CEgAVAEy1EgEDAQFMS7ASUFhAEwIBAAARTQABAQNhBQQCAwMPA04bQBcCAQAAEU0AAwMPTQABAQRhBQEEBBUETllADQAAABUAFBEUIxQGBxorFiYmNREzERQWMzI2NjURMxEjNQYGI9VbNmVHPSZAJGdjGVs8DjVeOgFT/tE9UitJKwEf/e5NKjEAAAABABIAAAIbAhMABgAbQBgCAQIAAUwBAQAAEU0AAgIPAk4REhADBxkrEzMTEzMDIxJnnKBm2lgCE/5bAaX97QAAAQASAAADPwISAAwAIUAeCgUCAwMAAUwCAQIAABFNBAEDAw8DThIREhIQBQcbKxMzExMzExMzAyMDAyMSYIJ6dXuCX6d1ent1AhL+aAGY/mgBmP3uAZb+agAAAAABABIAAAIwAhIACwAfQBwJBgMDAgABTAEBAAARTQMBAgIPAk4SEhIRBAcaKxMnMxc3MwcTIycHI+rLb5OTbcnYb6ChbgET/7m5//7tzc0AAAEAEv8QAksCEgAHABtAGAMBAgABTAEBAAARTQACAhMCThESEQMHGSslAzMTEzMBIwEF82bAr2T+rWgcAfb+cgGO/P4AAQAoAAABuwISAAkAKUAmBQEAAQABAwICTAAAAAFfAAEBEU0AAgIDXwADAw8DThESEREEBxorNwEhNSEVASEVISgBFf70AYr+7AES/m9FAXZXRP6KWAAAAAEAEv8QA3UCmgAbADxAORACAgQDGxECBQQCTAYFAgBKBgEDAwBfAgECAAARTQAEBAVhAAUFFU0ABwcTB04REyMjERMSEAgHHisTMxMTMzU3FTMVIxEUFjMyNxUGIyImNREjASMTEmbAr5xjj48xOgoaISJfUGD+1Wh1AhL+cgGOah6IXP7sJywCWQRUWgEU/VoBDAACAB7/8gJOAsoADwAbACxAKQACAgBhAAAAFE0FAQMDAWEEAQEBFQFOEBAAABAbEBoWFAAPAA4mBgcXKxYmJjU0NjYzMhYWFRQGBiM2NjU0JiMiBhUUFjPff0JCf1dYfkJCflhRYGBRUV9fUQ5bpWxspVtbpWxspVtminx9iop9fIoAAAABABQAAAE5ArwABgAbQBgCAQADAQABTAAAAA5NAAEBDwFOERMCBxgrEwc1NzMRI9C8vGlpAlNJY0/9RAABABcAAAHvAsoAGgAqQCcLCgICABoBAwICTAAAAAFhAAEBFE0AAgIDXwADAw8DThEXJSYEBxorATY2NTQmJiMiBgcnNjYzMhYWFRQGBwchFSE1ARkwNB05KDBOE1che0o9akA9OqwBLv4sAUoxSigfNyM7KTNJTDNiQz5nOqxnSwAAAAABABT/8QIAArwAHQA+QDsUAQIDFQ8CAQIDAgIAAQNMAAECAAIBAIAAAgIDXwADAw5NAAAABGEFAQQEFQROAAAAHQAcERIlJQYHGisWJic3FhYzMjY1NCYmIyMnNyE1IRUHHgIVFAYGI7RwMEwaVjQ+VSVCKSMtqf7JAbidNVYxQ3NGDz9JQyo7TTwdOCQ9xWFUugc7WTNJbDoAAAABABQAAAI1ArwADgAsQCkCAQIBSwQBAgUBAAYCAGgAAQEOTQADAwZfAAYGDwZOERERERESEAcHHSslITUTMwMzNTMVMxUjFSMBdf6f7m3r8WlXV2mJYQHS/i64uGGJAAABABn/8gICArwAGwA2QDMDAgIAAQFMAAQAAQAEAWcAAwMCXwACAg5NAAAABWEGAQUFFQVOAAAAGwAaIRERJSUHBxsrFiYnNxYWMzI2NjU0JiMjEyEVIQczMhYVFAYGI7x3LFAZVjUtQCBNUcAbAYr+2gtebIhDcEIORkg/LDsrQiIvQgFkYZ9taEdvPwAAAAACABz/8gIKArwAFgAjADZAMwwBAwEBTAABAAMEAQNqAAAADk0GAQQEAmEFAQICFQJOFxcAABcjFyIeHAAWABUiGgcHGCsWJiY1NDY2NzY2NzMHNjMyFhYVFAYGIz4CNTQmIyIGFRQWM8lwPRYzQRBFH3miFRVJbTk/cUknQyhRQURKUjwOPGxELUZXYRlqMPcDQms9RGw8YiI/KTtNSz0+TAAAAAEACgAAAc4CvAAGAB9AHAQBAAEBTAAAAAFfAAEBDk0AAgIPAk4SERADBxkrASE1IRUDIwFY/rIBxO1sAlljVP2YAAAAAwAh//ICEgLKABkAJQAxAERAQRMFAgQDAUwHAQMABAUDBGkAAgIAYQAAABRNCAEFBQFhBgEBARUBTiYmGhoAACYxJjAsKholGiQgHgAZABgrCQcXKxYmNTQ2NyYmNTQ2NjMyFhYVFAYHFhYVFAYjEjY1NCYjIgYVFBYzEjY1NCYjIgYVFBYzpoU2LyQqPGY/P2Y8KiQvN4ZzM0ZENTRFRjM+U1M+PlNTPg5wYTRZHBpJLkFdLy9dQS5JGhxZNGFwAZ85MTQ7OzQxOf7DPjc3PT03Nz4AAAAAAgAaAAACCQLKABQAIQAvQCwUAQAEAUwFAQQAAAIEAGkAAwMBYQABARRNAAICDwJOFRUVIRUgJhgmIAYHGiskIyImJjU0NjYzMhYWFRQGBgcHIzc2NjU0JiMiBgYVFBYzAR4VSW05P3FJSXA9FzVEb3iiI0pSPCdCKFFA9UJsPERrPDxrRC1IWGiq+F5MPT5LIj4pO04AAAABADz/xAJ1AvgAAwARQA4AAAEAhQABAXYREAIHGCsBMwEjAgxp/jBpAvj8zAAAAAABADwAAACmAGUAAwATQBAAAAABXwABAQ8BThEQAgcYKzczFSM8amplZQAAAAEAPP+DAOEAgAADABhAFQAAAQEAVwAAAAFfAAEAAU8REAIHGCs3MwcjbnNSU4D9AAIAPAAAAKYBmgADAAcAHUAaAAAAAQIAAWcAAgIDXwADAw8DThERERAEBxorEzMVIxUzFSM8ampqagGaZdBlAAACADz/gwDhAZoAAwAHACJAHwAAAAECAAFnAAIDAwJXAAICA18AAwIDTxERERAEBxorEzMVIwczByNwamoCc1JTAZpltf0AAAABADwAAACmAGUAAwATQBAAAAABXwABAQ8BThEQAgcYKzczFSM8amplZQAAAAIAPAAAAL8CvAADAAcAH0AcAAEBAF8AAAAOTQACAgNfAAMDDwNOEREREAQHGisTMwMjBzMVIzyDFFoIamoCvP37UmUAAgA8AAAAvwK8AAMABwA+S7AqUFhAFQABAQBfAAAADk0AAgIRTQADAw8DThtAFQABAQBfAAAADk0AAgIDXwADAw8DTlm2EREREAQHGisTMxUjFzMTI0lqaghaFIMCvGVR/foAAAIAPAAAAfYCygAbAB8AL0AsDQwCAgABTAACAAMAAgOAAAAAAWEAAQEUTQADAwRfAAQEDwROEREaJCgFBxsrPgI3NjY1NCYjIgYHJzYzMhYWFRQGBgcGBhUjBzMVI9MdKCMqKjs6MksWS1GSOmI7HSkjKihoAWpq6z0uIig6ITA8OSc8hzBcPiQ/MSMqOB9jZQAAAAACADz/8gH2ArwAAwAfADVAMh0cAgMCAUwAAgEDAQIDgAABAQBfAAAADk0AAwMEYgUBBAQVBE4EBAQfBB4pGxEQBgcaKxMzFSMCJiY1NDY2NzY2NTMUBgYHBgYVFBYzMjY3FwYj9mpqHWI7HSkjKihoHSgjKio8OTJLFktRkgK8Zf2bMFw+JD8xIyo4HyM9LiIoOiEwPDknPIcAAAABADwA/QCmAWIAAwAYQBUAAAEBAFcAAAABXwABAAFPERACBxgrEzMVIzxqagFiZQABADwA3gDCAWAAAwAYQBUAAAEBAFcAAAABXwABAAFPERACBxgrEzMVIzyGhgFgggABAEIBWwG1ArwADgAcQBkODQoJCAcGBQQDAgEMAEkAAAAOAE4bAQcXKwEHFwcnByc3JzcXJzMHNwG1gFJBSktBUoAYfgVQBH0CGCVpL25uL2klTC2FhS0AAgA8AAACtwK8ABsAHwBJQEYQDwcDAQYEAgIDAQJnDAEKCg5NDggCAAAJXw0LAgkJEU0FAQMDDwNOHBwcHxwfHh0bGhkYFxYVFBMSEREREREREREQEQcfKwEjBzMHIwcjNyMHIzcjNzM3IzczNzMHMzczBzMBNyMHAqJ6JnsVeyZhJn4mYSZxFXEmchVyJmEmfiZhJnr+6iZ+JgG1rF2srKysXaxdqqqqqv73rKwAAAABADz/xAFdAvgAAwARQA4AAAEAhQABAXYREAIHGCsTMwMj9Gm4aQL4/MwAAAEAPP/EAV0C+AADABFADgAAAQCFAAEBdhEQAgcYKxMzEyM8abhpAvj8zAAAAgA8AAAAvwK8AAMABwAfQBwAAQEAXwAAAA5NAAICA18AAwMPA04REREQBAcaKxMzAyMHMxUjPIMUWghqagK8/ftSZQACADwAeACmAhIAAwAHABxAGQACAAMCA2MAAQEAXwAAABEBThERERAEBxorEzMVIxUzFSM8ampqagISZdBlAAAAAQA8/8UBAgL4AAkAGEAVAAABAQBXAAAAAV8AAQABTxQTAgcYKzY1NDczBhUUFyM8ZGJkZGKN0dLIxdXRyAAAAAEAPP/FAQIC+AAJABhAFQAAAQEAVwAAAAFfAAEAAU8UEwIHGCs2NTQnMxYVFAcjoGRiZGRijdHUxsjS0cgAAAABADz/xAEpAvwAIgA+QDsJAQIEGQEBAiEBBQEiAQAFBEwAAwAEAgMEaQACAAEFAgFpAAUAAAVZAAUFAGEAAAUAURoxFBIVIAYHHCsEIyImNTU0Jgc1FzI1NTQ2FxUmIyIGFRUUBxYVFRQWMzI3FQEhD1A/JCMNOkpcBwwbGjIyGBgGEjxOVI4mHAJWAT+JWVIGWgEaIJFXHR5Wmh4ZAlYAAQA8/78BKQL3ACIAOkA3EAEBAhkHAgMBIgEAAwNMAAMBAAEDAIAAAgABAwIBaQAABAQAWQAAAARhAAQABFEVFyMqIAUHGys2MzI2NTU0NyY1NTQmIyIHNTYzMhYVFRQWNxUmBhUVFAYnNUwGGhgzMxkbDQcIEE5AJCMjJEldFxofmlUfHVeRHxkBXAFSVIklHANWAhwmjllOBlQAAQA8/8MBAgL4AAcAIkAfAAAAAQIAAWcAAgMDAlcAAgIDXwADAgNPEREREAQHGisTMxUjETMVIzzGXV3GAvhd/X9XAAABADz/wwECAvgABwAiQB8AAgABAAIBZwAAAwMAVwAAAANfAAMAA08REREQBAcaKzczESM1MxEjPF5exsYaAoFd/MsAAAEAPAD4AbMBWQADABhAFQAAAQEAVwAAAAFfAAEAAU8REAIHGCsTIRUhPAF3/okBWWEAAAABAEEBFgJTAXgAAwAYQBUAAAEBAFcAAAABXwABAAFPERACBxgrEyEVIUECEv3uAXhiAAAAAQA8APgC2gFaAAMAGEAVAAABAQBXAAAAAV8AAQABTxEQAgcYKxMhFSE8Ap79YgFaYgAAAAEAQQAAAlMAZAADACCxBmREQBUAAAEBAFcAAAABXwABAAFPERACBxgrsQYARDchFSFBAhL97mRkAAAA//8APP+DAOEAgAACAEMAAAABADz/gwDhAIAAAwAYQBUAAAEBAFcAAAABXwABAAFPERACBxgrNzMHI25zUlOA/QACADwBtAGRAsoAAwAHADRLsC9QWEANAwEBAQBfAgEAABABThtAEwIBAAEBAFcCAQAAAV8DAQEAAU9ZthERERAEBxorEzMDIwEzAyOPUDJxAQVQMnACyv7qARb+6gAAAAACADwBtAGRAsoAAwAHADRLsC9QWEANAwEBAQBfAgEAABABThtAEwIBAAEBAFcCAQAAAV8DAQEAAU9ZthERERAEBxorEzMDIxMzAyNucVNQ5XBSUALK/uoBFv7qAAEARgG0AOkCygADAC1LsC9QWEALAAEBAF8AAAAQAU4bQBAAAAEBAFcAAAABXwABAAFPWbQREAIHGCsTMwMjmVAycQLK/uoAAAEARgG0AOkCygADAC1LsC9QWEALAAEBAF8AAAAQAU4bQBAAAAEBAFcAAAABXwABAAFPWbQREAIHGCsTMwMjeHFTUALK/uoAAAEAPACCARMCEgAFABlAFgMBAQABTAABAQBfAAAAEQFOEhECBxgrEzczBxcjPG5pbm5pAUfLy8UAAQA8AIIBEwISAAUAGUAWAwEBAAFMAAEBAF8AAAARAU4SEQIHGCsTJzMXByOqbmlubmkBR8vLxQABADz/uQIoAl0AIgA1QDIQDQICASIhFBMEAwIFAgIAAwNMAAEAAgMBAmkAAwAAA1kAAwMAXwAAAwBPJiYaEwQHGiskBgcVIzUuAjU0NjY3NTMVFhYXByYjIgYGFRQWFjMyNjcXAgtePVdAZTg4ZUBXPF4cTzFgK0suMEwoMkQcUDk+Bzs8Ck54R0V0TQpBQAg7Mi9HLFE2OFUuJSIuAAAAAwAy/8MCYgL4ACAAJwAuAC5AKy4tJCMdHBoZFxQODQoJBgMQAAEBTAABAAABVwABAQBfAAABAE8WFRQCBxcrJAYGBxUjNSYmJzcWFhc1JiY1NDY3NTMVFhcHJicVFhYVABYXNQYGFQA2NTQmJxUCYj5pP1xJeypRIUg0ZHl9YFyVTVE5WGWB/ko4PDRAAQVFOz+NVzYINTUJRTlDJzIJ1RFYVlZuDTMyD24+SgzSFWNSAREpDb8JNib+bzImJC4QwwAAAAEAPP/yAroCygAyAElARhgXAgQGMgELAQJMBwEECAEDAgQDZwkBAgoBAQsCAWcABgYFYQAFBRRNAAsLAGEAAAAVAE4wLiopKCcRFCUjERMRIyEMBx8rJQYjIiYnJjUjNTMmNTcjNTM3NjYzMhYXByYmIyIGBwYHIRUhBhUUFyEVIRYXFhYzMjY3ArpNo3ehHQJXTQIBTFYDHaF3RYUkTxtPNUljFwYCAST+zwECATD+3gQDGmlAOFEVa3l2bwoESyAQIksNdnpHNzIlLEU+EglLDBgfD0sSCT07LB4AAAAAAQA8AAACNwLJABgAP0A8CgEDAgsBAQMCTAQBAQUBAAYBAGcAAwMCYQACAhRNCQgCBgYHXwAHBw8HTgAAABgAGBERERIjIxERCgceKzc1IzUzNTQ2MzIXFSYjIhUVMxUjFSEVITWWWlp4bWY0T0t89vYBOP4FYdZUJYqPGmYevR9U1mFhAAAAAAEAKAAAAmoCvQAXAD5AOwcBAQIAAVgGAQIFAQMEAgNnDAsCCQkOTQoIAgAABGAABAQPBE4AAAAXABcWFRQTERERERERERERDQcfKwEDMxUjFTMVIxUjNSM1MzUjNTMDMxMzEwJqs3KsrKxpra2tdLNpswqzAr3+w0tTS5eXS1NLAT3+wwE9AAABADwAMgJiAlgACwAsQCkABAMBBFcGBQIDAgEAAQMAZwAEBAFfAAEEAU8AAAALAAsREREREQcHGysBFSMVIzUjNTM1MxUCYuFk4eFkAXdh5ORh4eEAAAAAAQA8ARYCYgF3AAMAGEAVAAABAQBXAAAAAV8AAQABTxEQAgYYKxMhFSE8Aib92gF3YQAAAAEAPABfAgkCKwALAAazCQMBMis3Nyc3FzcXBxcHJwc8n59Hn59In55Hnp+mn59Hn59Hn59Hn58AAwBGAC8CbAJcAAMABwALACxAKQAAAAECAAFnAAIAAwQCA2cABAUFBFcABAQFXwAFBAVPEREREREQBgccKwEzFSMHIRUhFzMVIwEnZGThAib92uFkZAJcX4ZhiF8AAAAAAgA8AKACTgHlAAMABwAiQB8AAAABAgABZwACAwMCVwACAgNfAAMCA08REREQBAcaKxMhFSEVIRUhPAIS/e4CEv3uAeVkfWQAAQA8AFACTgIuABMAnUuwEFBYQCkACAcHCHAAAwICA3EJAQcGAQABBwBoBQEBAgIBVwUBAQECXwQBAgECTxtLsBJQWEAoAAgHBwhwAAMCA4YJAQcGAQABBwBoBQEBAgIBVwUBAQECXwQBAgECTxtAJwAIBwiFAAMCA4YJAQcGAQABBwBoBQEBAgIBVwUBAQECXwQBAgECT1lZQA4TEhEREREREREREAoGHysBIwczFSEHIzcjNTM3ITUhNzMHMwJOr0z7/sgxZDF2s0z/AQE8LWQtcgGBfWRQUGR9ZElJAAABADwAUAHnAkgABgAGswYDATIrNyUlNQUVBTwBS/61Aav+VbWXmGTJZcoAAAEAPABQAecCSAAGAAazBgIBMisTNSUVBQUVPAGr/rYBSgEaZclkmJdlAAAAAgA8AAACEAJFAAYACgAiQB8GBQQDAgEABwBKAAABAQBXAAAAAV8AAQABTxEXAgYYKxMlJTUFFQUHIRUhPQF3/okB0/4tAQHU/iwBIGVrVYN5hGZfAAAAAAIAPAAAAhACRQAGAAoAIkAfBgUEAwIBAAcASgAAAQEAVwAAAAFfAAEAAU8RFwIGGCsTNSUVBQUVBSEVIT0B0/6IAXj+LAHU/iwBSXmDVWtlW2ZfAAIAPAAAAg8CSwALAA8AMUAuBAEAAwEBAgABZwAFAAIGBQJnAAYGB18IAQcHDwdODAwMDwwPEhEREREREAkHHSsBMxUjFSM1IzUzNTMBNSEVAVe4uGK5uWL+5QHTAa1an59anv21WloAAgA8AHMCQgHuABUAKwBSQE8VCgIDARQBAgMfAQQCKyACBwUqAQYHBUwJAQBKAAAAAwIAA2kAAQACBAECaQAFBwYFWQAEAAcGBAdpAAUFBmEABgUGUSQjJCMkIyQgCAYeKxIzMhYXFhYzMjcXBiMiJicmJiMiBycWMzIWFxYWMzI3FwYjIiYnJiYjIgcneFwiNSMgIhUxODRBYiM3IRslFS0xNTxcIjUjICIVMTg0QWIjNyEbJRUtMTUB6A4ODAo4Qk8PDQsKMEKiDg4MCjhCTw8NCwowQgAAAQA8AP0CQgGOABUAObEGZERALhUKAgMBFAECAwJMCQEASgABAwIBWQAAAAMCAANpAAEBAmEAAgECUSQjJCAEBxorsQYARBIzMhYXFhYzMjcXBiMiJicmJiMiByd4XCI1IyAiFTE4NEFiIzchGyUVLTE1AYgODgwKOEJPDw0LCjBCAAAAAQBBAZoB6gLJAAYAIbEGZERAFgQBAQABTAAAAQCFAgEBAXYSERADBxkrsQYARBMzEyMnByPiap5gdHRhAsn+0d7eAAADAEAAbQN5AgwAHwAtADsASkBHNyMbCwQFBAFMAQEABgEEBQAEaQoHCQMFAgIFWQoHCQMFBQJhCAMCAgUCUS4uICAAAC47Ljo0MiAtICwoJgAfAB4mJiYLBhkrNiYmNTQ2NjMyFhYXPgIzMhYWFRQGBiMiJiYnDgIjPgI3LgIjIgYVFBYzIDY1NCYjIgYGBxcWFjPTXDc3XDYoQzYzMTdDKDZcNzdcNihDOS8xN0MpFikpMS4rKhcuPD0tAdY+PS4XKSkxETY1Hm00Xzw9XzQjMzc1NSM0Xz08XzQiNjU2NSJYGCo1MywYQTY2QUI1NkEYKTYSOyoAAAUAPf/yA0kCygAPABMAHwAvADsAkkuwElBYQCsLAQUKAQEGBQFpAAYACAkGCGoABAQAYQIBAAAUTQ0BCQkDYQwHAgMDDwNOG0AzCwEFCgEBBgUBaQAGAAgJBghqAAICDk0ABAQAYQAAABRNAAMDD00NAQkJB2EMAQcHFQdOWUAmMDAgIBQUAAAwOzA6NjQgLyAuKCYUHxQeGhgTEhEQAA8ADiYOBxcrEiYmNTQ2NjMyFhYVFAYGIwEzASMSNjU0JiMiBhUUFjMAJiY1NDY2MzIWFhUUBgYjNjY1NCYjIgYVFBYzu1AuLlAxMU8uLk8xAZlp/hlpeTExKywyMiwBflAuLlAxMU8uLk8xKzExKywyMiwBZC9TMzBRMC9SMDNTLwFY/UQBsz4qJTw8JSo+/j8vUzMwUTAvUjAzUy9PPiolPDwlKj4AAAAHADz/8gTNAsoADwATAB8ALwA/AEsAVwCuS7ASUFhAMQ8BBQ4BAQYFAWkIAQYMAQoLBgpqAAQEAGECAQAAFE0TDRIDCwsDYREJEAcEAwMPA04bQDkPAQUOAQEGBQFpCAEGDAEKCwYKagACAg5NAAQEAGEAAAAUTQADAw9NEw0SAwsLB2ERCRADBwcVB05ZQDZMTEBAMDAgIBQUAABMV0xWUlBAS0BKRkQwPzA+ODYgLyAuKCYUHxQeGhgTEhEQAA8ADiYUBxcrEiYmNTQ2NjMyFhYVFAYGIwEzASMSNjU0JiMiBhUUFjMAJiY1NDY2MzIWFhUUBgYjICYmNTQ2NjMyFhYVFAYGIyQ2NTQmIyIGFRQWMyA2NTQmIyIGFRQWM7pQLi5QMTFQLS1QMQGaaf4ZaXkxMSsrMzIsAX5QLi5QMTFPLi5PMQFTUC4uUDExTy4uTzH+pzExKywyMiwBsDAwKywzMi0BZC9TMzBRMC9RMTNTLwFY/UQBsz4pJT09JSk+/j8vUzMwUTAvUjAzUy8vUzMwUTAvUjAzUy9PPiolPDwlKj4+KiY7PCUqPgAAAAABADwAAALGAyEACAAVQBIGBQQDAgEABwBKAAAAdhcBBhcrAQcnAQEHJxEjAVDPRQFFAUVFz2ICZs9FAUX+vEXQ/ZgAAAEAPABTApYCrAAIAClAJgIBAAEBTAQDAgBJAAABAIYAAgEBAlcAAgIBXwABAgFPERQQAwYZKyUjEwEnASE1IQKWYgH+TEUBsv7cAcvhASb+TEUBsmIAAAABADwAOwNdAsUACAAiQB8IBwIBSgIBAgBJAAEAAAFXAAEBAF8AAAEATxETAgYYKwEBJzchNSEnNwNd/rxF0P2YAmbPRQGA/rtFz2LPRQAAAAEAPABjApUCvgAIAClAJggBAgABTAcGAgBKAAACAIUAAgEBAlcAAgIBXwABAgFPEREQAwYZKwEzEQU1BQE3AQIzYv41ASb+TEUBsgIw/jQBYwEBtEX+TQABADz/5ALGAwYACAAUQBEIBQQDAgEGAEkAAAB2FgEGFysBFwEBNxcRMxECgkT+u/67Rs9iAW5F/rsBRUbQAmf9mQAAAAEAPABgApcCuAAIAChAJQcBAAIBTAgBAkoAAgAChQAAAQEAVwAAAAFfAAEAAU8REREDBhkrAQEhFSEDMwMBApf+TAEm/jQBYwEBtAJz/k5hAcv+2QG0AAABADwAQQNdAssACAAvQCwFAQABAUwHBgIBSgQDAgBJAgEBAAABVwIBAQEAXwAAAQBPAAAACAAIEQMGFysBFSEXBwEBFwcDXf2az0X+uwFERtABt2LPRQFFAUVFzwAAAAABADwATgKVAqgACAApQCYAAQACAUwIBwIASQAAAgCGAAECAgFXAAEBAl8AAgECTxEREQMGGSsTESMRJRUlAQeeYgHL/toBtEUCAP7cAcsBYgH+TEUAAAAAAQA8AEEEmwLLAA0ALEApBwEBAAFMBgUCAQQASg0MCQgEAUkAAAEBAFcAAAABXwABAAFPFhMCBhgrEwEXByEnNwEBJzchFwc8AURG0QLt0EUBRP67Rc/9F89FAYYBRUXPz0X+u/67Rc/PRQAAAgA+/2oDagKPADgARQD5S7AUUFhAEh4BCQMRAQUJNQEHATYBCAcETBtAEh4BCQQRAQUJNQEHATYBCAcETFlLsBRQWEAtAAAABgMABmkEAQMACQUDCWkMCgIFAgEBBwUBaQAHCAgHWQAHBwhiCwEIBwhSG0uwLVBYQDQABAMJAwQJgAAAAAYDAAZpAAMACQUDCWkMCgIFAgEBBwUBaQAHCAgHWQAHBwhiCwEIBwhSG0A5AAQDCQMECYAAAAAGAwAGaQADAAkFAwlpAAUKAQVZDAEKAgEBBwoBaQAHCAgHWQAHBwhiCwEIBwhSWVlAGTk5AAA5RTlEQD4AOAA3JiUjEiYkJSYNBx4rBCYmNTQ2NjMyFhYVFAYjIiYnBgYjIiYmNTQ2NjMyFzUzFRQWMzI2NTQmJiMiBgYVFBYWMzI3FwYjEjY2NTQmIyIGBxQWMwFeuGhnuXd1uWdbUCw7DRdHMDRXMjJXNFQyShkdJClRj1tbj1FQjlpsWzFsjBw3H0Q0N0cBRziWaLh0c7ZoY69tYngvISQrNls3NlkzQDTlKyJGR1iITFGQXV6TUTxBTQEUIzsiM0lIMjZMAAAAAwA8//ICxgLIAB0AKQAzAGZADy0sKRoXFhUUEwUKBAMBTEuwElBYQBgAAwMAYQAAABRNBgEEBAFhBQICAQEPAU4bQBwAAwMAYQAAABRNAAEBD00GAQQEAmEFAQICFQJOWUATKioAACozKjIkIgAdABwbKwcHGCsWJjU0NjcmJjU0NjYzMhYWFRQGBxc3FwcXIycGBiMSNjU0JiMiBhUUFhcSNjcnBgYVFBYzrXFGPDMsMFg4N1cwSEKKZ0twp4hdLWRBNjIwKCkwHy4tPSKdLTA+Mw5iVDxeLTNOMC9NLCpLLzVUMIt5MoahWTA3Adk3HyMqLSUbLS3+pCYnnCNAJSs2AAACADz/vwIEAvMAMQA+AEVAQiEgFwMFAzEJCAMBBAJMAAUDBAMFBIAABAEDBAF+AAIAAwUCA2kAAQAAAVkAAQEAYgAAAQBSPDo1NCUjHhwkJAYHGCskFRQGBiMiJic3FjMyNjc0JiYnJiY1NDcmNTQ2NjMyFhcHJiYjIgYVFBYWFxYWFRQGByQWFxY2NTQmJxUiBhUCBEFnOD5/K0ZKWzRGASM7R1ZdQUE7ZDw/dSRCF0wxNkkeOzljZyYh/uszPTpQNkU2SbdMNU4pNTM8RiUjGhwPDRBGQVMxJ0o4UCgtMzkdISgmFhoQChNKQyhAGFgcCwMnKB8aDgEoJgADADz/8wMcAscADwAfADsAXrEGZERAUzg3KyoEBgUBTAAAAAIEAAJpAAQABQYEBWkABgoBBwMGB2kJAQMBAQNZCQEDAwFhCAEBAwFRICAQEAAAIDsgOjUzLiwoJhAfEB4YFgAPAA4mCwcXK7EGAEQEJiY1NDY2MzIWFhUUBgYjPgI1NCYmIyIGBhUUFhYzLgI1NDY2MzIWFwcmIyIGFRQWFjMyNjcXBgYjAUipY2OpZGSpY2OpZE6DTEyDTk2DTEyDTS9RLy9RMzJNFzcgPy0/HzIbISoVNxdOMg1ip2JipWJipWJip2JRS4FOToFKS4FNToFLXjJXNTNVMSomIi4/NiY4HRcXICcqAAAABAA8AVgBzALiAA8AHwAtADYAY7EGZERAWCEBBQgBTAYBBAUDBQQDgAoBAQACBwECaQAHAAkIBwlpAAgABQQIBWcLAQMAAANZCwEDAwBhAAADAFEQEAAANjQwLispKCcmJCMiEB8QHhgWAA8ADiYMBxcrsQYARAAWFhUUBgYjIiYmNTQ2NjMSNjY1NCYmIyIGBhUUFhYzNgcXIycjIxUjNTMyFhUHMzI2NTQmIyMBOlw2Nlw3Nls2NVw2KUYpKUYpKEQpKUQoUB4dJBkDKSRNHiNqKg4QEQ0qAuI1WjY1WzU1WzU2WjX+pilEKClEKChEKShEKY8NQjs7rR4cGAwMDQ0AAAACADwBowJqArwABwAUAEZAQxQPDAMGAAFMAAYAAQAGAYAHBQIBAYQIBAkDAwAAA1cIBAkDAwMAXwIBAAMATwAAExIREA4NCwoJCAAHAAcREREKBhkrARUjFSM1IzUhMxEjNQcjJxUjETMXASJYNFoB8jw1STFFNDxWArwx6Ogx/ufAn5/AARm9AAAAAAIAPAFYAcwC4gAPAB0AOLEGZERALQAAAAIDAAJpBQEDAQEDWQUBAwMBYQQBAQMBURAQAAAQHRAcFxUADwAOJgYHFyuxBgBEEiYmNTQ2NjMyFhYVFAYGIz4CNTQmIyIGFRQWFjPNWzY1XDY3XDY2XDchNyFHMjBGIDcfAVg1WzU2WjU1WjY1WzVOITYgMUZGMR83IQABAAAAAQAAXf9euF8PPPUABwPoAAAAANv3jIAAAAAA3EK8WwAK/wEEzQMhAAAABwACAAAAAAAAAAEAAAPA/xAAAAUJAAAAEgTNAAEAAAAAAAAAAAAAAAAAAACLAfQAXQEYAAACzgAeApQAQQLdAC0CxgBBAlYAQQJWAEEDBQAtAtMAQQDrAEECLQAeArMAQQISAEEDXwBBAtEAQQMQAC0ChwBBAxwALQKUAEECkQAvAnsAHgLOAEECzwAeA/gAHgLaAB4CxwAeAmQAKAKUACAClABEAi0AIAKUACACVQAgAZ4AIQKUACACVwBEAPEARAFlADwCRwBEAO0ARAOjAEQCVwBEAmEAIAKUAEQClAAgAY0ARAINACsBngAeAmEARAItABIDUQASAkIAEgJdABIB4wAoA5MAEgJsAB4BiQAUAg0AFwIeABQCUwAUAiAAGQItABwB4gAKAjIAIQItABoCsQA8AOIAPAE7ADwA4gA8AR0APADiADwA+wA8APsAPAIyADwCMgA8AOIAPAD+ADwB9ABCAvMAPAGZADwBmQA8APsAPADiADwBPgA8AT4APAFlADwBZQA8AT4APAE+ADwB7wA8ApQAQQMWADwClABBATsAPAE7ADwBzQA8Ac0APAEvAEYBLwBGAU8APAFPADwCZAA8AncAMgLxADwCewA8ApIAKAKeADwCngA8AkQAPAKyAEYCigA8AooAPAIjADwCIwA8AkwAPAJMADwCSwA8An4APAJ+ADwCKwBBA7gAQAOFAD0FCQA8AwIAPALSADwDmQA8AtEAPAMCADwC0wA8A5kAPALRADwE9QA8A6gAPgMGADwCQAA8A1gAPAIIADwCpgA8AggAPAAAAN4A3gEQAWYBrAHmAhQCPAKIArACxgL2AyQDQANwA5YD3gQaBJoE2AUsBU4FhAWkBdIGAAYmBlIGxAdEB4gICAhaCKYJKgl2CaYJ5goUCjYKnAruCzYLogwODFIMqAziDSwNTA16DaINxA3wDjoOfA6aDtwPKg9aD6IP9BAWEIIQzhDmEPwRFBE0EVgRbhGQEcISDBJaEnISihK2Ew4TJBM6E1wTfBOcE7wUDBRaFHwUnhS4FNIU7BUKFRIVKhVaFYgVrBXQFewWCBZYFroXKhduF7IX3hf4GBQYRBhoGNgY7hkEGTAZWhmOGfoaPBpeGtobfhxWHHgcpBzMHPgdGh1GHXYdoh3YHrYfOB+2IDwgviEEIU4AAQAAAIsAWAAKAAQAAQACAFYAmQCNAAABCw4VAAEAAQAAABYBDgABAAAAAAAAADgAAAABAAAAAAABAAkAOAABAAAAAAACAAYAQQABAAAAAAADABoARwABAAAAAAAEABAAYQABAAAAAAAFAA0AcQABAAAAAAAGAA8AfgABAAAAAAAIABEAjQABAAAAAAAJAAoAngABAAAAAAALABkAqAADAAEECQAAAHAAwQADAAEECQABACABMQADAAEECQACAA4BUQADAAEECQADADQBXwADAAEECQAEACABkwADAAEECQAFABoBswADAAEECQAGAB4BzQADAAEECQAIACIB6wADAAEECQAJABQCDQADAAEECQALADICIQADAAEECQAQABICUwADAAEECQARAAwCZUNvcHlyaWdodCCpIDIwMjAgQnl0ZURhbmNlIEdJUCBVRUQuIEFsbCByaWdodHMgcmVzZXJ2ZWQuQnl0ZSBTYW5zTWVkaXVtMS4wMDA7VUtXTjtCeXRlU2Fucy1NZWRpdW1CeXRlIFNhbnMgTWVkaXVtVmVyc2lvbiAxLjAwMEJ5dGVTYW5zLU1lZGl1bUJ5dGVEYW5jZSBHSVAgVUVEU29uZ3lpIExpdWh0dHBzOi8vd3d3LmJ5dGVkYW5jZS5jb20AQwBvAHAAeQByAGkAZwBoAHQAIACpACAAMgAwADIAMAAgAEIAeQB0AGUARABhAG4AYwBlACAARwBJAFAAIABVAEUARAAuACAAQQBsAGwAIAByAGkAZwBoAHQAcwAgAHIAZQBzAGUAcgB2AGUAZAAuAEIAeQB0AGUAIABTAGEAbgBzACAATQBlAGQAaQB1AG0AUgBlAGcAdQBsAGEAcgAxAC4AMAAwADAAOwBVAEsAVwBOADsAQgB5AHQAZQBTAGEAbgBzAC0ATQBlAGQAaQB1AG0AQgB5AHQAZQAgAFMAYQBuAHMAIABNAGUAZABpAHUAbQBWAGUAcgBzAGkAbwBuACAAMQAuADAAMAAwAEIAeQB0AGUAUwBhAG4AcwAtAE0AZQBkAGkAdQBtAEIAeQB0AGUARABhAG4AYwBlACAARwBJAFAAIABVAEUARABTAG8AbgBnAHkAaQAgAEwAaQB1AGgAdAB0AHAAcwA6AC8ALwB3AHcAdwAuAGIAeQB0AGUAZABhAG4AYwBlAC4AYwBvAG0AQgB5AHQAZQAgAFMAYQBuAHMATQBlAGQAaQB1AG0AAAIAAAAAAAD/tQAyAAAAAAAAAAAAAAAAAAAAAAAAAAAAiwAAAAMAJAAlACYAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwA0ADUANgA3ADgAOQA6ADsAPAA9AEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBbAFwAXQECABMAFAAVABYAFwAYABkAGgAbABwAvAARAA8AHQAeAKsABACjACIAogDDAIcADQAGABIAPwEDAQQACwAMAF4AYAA+AEAAEACyALMAQgDEAMUAtAC1ALYAtwC+AL8AhAAHAQUAhQCWAA4A7wDwALgAIACPACEAHwCVAJQAkwCnAGEAQQCSAAgAxgEGAQcBCAEJAQoBCwEMAQ0BDgAjAAkAhgCLAIoAjACDA3lfdAd1bmlGRjAxCmNvbG9uLnNzMDEERXVybwdhcnJvd3VwB3VuaTIxOTcKYXJyb3dyaWdodAd1bmkyMTk4CWFycm93ZG93bgd1bmkyMTk5CWFycm93bGVmdAd1bmkyMTk2CWFycm93Ym90aAAAAAABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAZgBmAF8AXwK8AAACygISAAD/EALK//EC2gIg//H/ArAALCCwAFVYRVkgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbkIAAgAY2MjYhshIbAAWbAAQyNEsgABAENgQi2wASywIGBmLbACLCMhIyEtsAMsIGSzAxQVAEJDsBNDIGBgQrECFENCsSUDQ7ACQ1R4ILAMI7ACQ0NhZLAEUHiyAgICQ2BCsCFlHCGwAkNDsg4VAUIcILACQyNCshMBE0NgQiOwAFBYZVmyFgECQ2BCLbAELLADK7AVQ1gjISMhsBZDQyOwAFBYZVkbIGQgsMBQsAQmWrIoAQ1DRWNFsAZFWCGwAyVZUltYISMhG4pYILBQUFghsEBZGyCwOFBYIbA4WVkgsQENQ0VjRWFksChQWCGxAQ1DRWNFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwAiWwDENjsABSWLAAS7AKUFghsAxDG0uwHlBYIbAeS2G4EABjsAxDY7gFAGJZWWRhWbABK1lZI7AAUFhlWVkgZLAWQyNCWS2wBSwgRSCwBCVhZCCwB0NQWLAHI0KwCCNCGyEhWbABYC2wBiwjISMhsAMrIGSxB2JCILAII0KwBkVYG7EBDUNFY7EBDUOwAWBFY7AFKiEgsAhDIIogirABK7EwBSWwBCZRWGBQG2FSWVgjWSFZILBAU1iwASsbIbBAWSOwAFBYZVktsAcssAlDK7IAAgBDYEItsAgssAkjQiMgsAAjQmGwAmJmsAFjsAFgsAcqLbAJLCAgRSCwDkNjuAQAYiCwAFBYsEBgWWawAWNgRLABYC2wCiyyCQ4AQ0VCKiGyAAEAQ2BCLbALLLAAQyNEsgABAENgQi2wDCwgIEUgsAErI7AAQ7AEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERLABYC2wDSwgIEUgsAErI7AAQ7AEJWAgRYojYSBksCRQWLAAG7BAWSOwAFBYZVmwAyUjYUREsAFgLbAOLCCwACNCsw0MAANFUFghGyMhWSohLbAPLLECAkWwZGFELbAQLLABYCAgsA9DSrAAUFggsA8jQlmwEENKsABSWCCwECNCWS2wESwgsBBiZrABYyC4BABjiiNhsBFDYCCKYCCwESNCIy2wEixLVFixBGREWSSwDWUjeC2wEyxLUVhLU1ixBGREWRshWSSwE2UjeC2wFCyxABJDVVixEhJDsAFhQrARK1mwAEOwAiVCsQ8CJUKxEAIlQrABFiMgsAMlUFixAQBDYLAEJUKKiiCKI2GwECohI7ABYSCKI2GwECohG7EBAENgsAIlQrACJWGwECohWbAPQ0ewEENHYLACYiCwAFBYsEBgWWawAWMgsA5DY7gEAGIgsABQWLBAYFlmsAFjYLEAABMjRLABQ7AAPrIBAQFDYEItsBUsALEAAkVUWLASI0IgRbAOI0KwDSOwAWBCILAUI0IgYLABYbcYGAEAEQATAEJCQopgILAUQ2CwFCNCsRQIK7CLKxsiWS2wFiyxABUrLbAXLLEBFSstsBgssQIVKy2wGSyxAxUrLbAaLLEEFSstsBsssQUVKy2wHCyxBhUrLbAdLLEHFSstsB4ssQgVKy2wHyyxCRUrLbArLCMgsBBiZrABY7AGYEtUWCMgLrABXRshIVktsCwsIyCwEGJmsAFjsBZgS1RYIyAusAFxGyEhWS2wLSwjILAQYmawAWOwJmBLVFgjIC6wAXIbISFZLbAgLACwDyuxAAJFVFiwEiNCIEWwDiNCsA0jsAFgQiBgsAFhtRgYAQARAEJCimCxFAgrsIsrGyJZLbAhLLEAICstsCIssQEgKy2wIyyxAiArLbAkLLEDICstsCUssQQgKy2wJiyxBSArLbAnLLEGICstsCgssQcgKy2wKSyxCCArLbAqLLEJICstsC4sIDywAWAtsC8sIGCwGGAgQyOwAWBDsAIlYbABYLAuKiEtsDAssC8rsC8qLbAxLCAgRyAgsA5DY7gEAGIgsABQWLBAYFlmsAFjYCNhOCMgilVYIEcgILAOQ2O4BABiILAAUFiwQGBZZrABY2AjYTgbIVktsDIsALEAAkVUWLEOBkVCsAEWsDEqsQUBFUVYMFkbIlktsDMsALAPK7EAAkVUWLEOBkVCsAEWsDEqsQUBFUVYMFkbIlktsDQsIDWwAWAtsDUsALEOBkVCsAFFY7gEAGIgsABQWLBAYFlmsAFjsAErsA5DY7gEAGIgsABQWLBAYFlmsAFjsAErsAAWtAAAAAAARD4jOLE0ARUqIS2wNiwgPCBHILAOQ2O4BABiILAAUFiwQGBZZrABY2CwAENhOC2wNywuFzwtsDgsIDwgRyCwDkNjuAQAYiCwAFBYsEBgWWawAWNgsABDYbABQ2M4LbA5LLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyOAEBFRQqLbA6LLAAFrAXI0KwBCWwBCVHI0cjYbEMAEKwC0MrZYouIyAgPIo4LbA7LLAAFrAXI0KwBCWwBCUgLkcjRyNhILAGI0KxDABCsAtDKyCwYFBYILBAUVizBCAFIBuzBCYFGllCQiMgsApDIIojRyNHI2EjRmCwBkOwAmIgsABQWLBAYFlmsAFjYCCwASsgiophILAEQ2BkI7AFQ2FkUFiwBENhG7AFQ2BZsAMlsAJiILAAUFiwQGBZZrABY2EjICCwBCYjRmE4GyOwCkNGsAIlsApDRyNHI2FgILAGQ7ACYiCwAFBYsEBgWWawAWNgIyCwASsjsAZDYLABK7AFJWGwBSWwAmIgsABQWLBAYFlmsAFjsAQmYSCwBCVgZCOwAyVgZFBYIRsjIVkjICCwBCYjRmE4WS2wPCywABawFyNCICAgsAUmIC5HI0cjYSM8OC2wPSywABawFyNCILAKI0IgICBGI0ewASsjYTgtsD4ssAAWsBcjQrADJbACJUcjRyNhsABUWC4gPCMhG7ACJbACJUcjRyNhILAFJbAEJUcjRyNhsAYlsAUlSbACJWG5CAAIAGNjIyBYYhshWWO4BABiILAAUFiwQGBZZrABY2AjLiMgIDyKOCMhWS2wPyywABawFyNCILAKQyAuRyNHI2EgYLAgYGawAmIgsABQWLBAYFlmsAFjIyAgPIo4LbBALCMgLkawAiVGsBdDWFAbUllYIDxZLrEwARQrLbBBLCMgLkawAiVGsBdDWFIbUFlYIDxZLrEwARQrLbBCLCMgLkawAiVGsBdDWFAbUllYIDxZIyAuRrACJUawF0NYUhtQWVggPFkusTABFCstsEMssDorIyAuRrACJUawF0NYUBtSWVggPFkusTABFCstsEQssDsriiAgPLAGI0KKOCMgLkawAiVGsBdDWFAbUllYIDxZLrEwARQrsAZDLrAwKy2wRSywABawBCWwBCYgICBGI0dhsAwjQi5HI0cjYbALQysjIDwgLiM4sTABFCstsEYssQoEJUKwABawBCWwBCUgLkcjRyNhILAGI0KxDABCsAtDKyCwYFBYILBAUVizBCAFIBuzBCYFGllCQiMgR7AGQ7ACYiCwAFBYsEBgWWawAWNgILABKyCKimEgsARDYGQjsAVDYWRQWLAEQ2EbsAVDYFmwAyWwAmIgsABQWLBAYFlmsAFjYbACJUZhOCMgPCM4GyEgIEYjR7ABKyNhOCFZsTABFCstsEcssQA6Ky6xMAEUKy2wSCyxADsrISMgIDywBiNCIzixMAEUK7AGQy6wMCstsEkssAAVIEewACNCsgABARUUEy6wNiotsEossAAVIEewACNCsgABARUUEy6wNiotsEsssQABFBOwNyotsEwssDkqLbBNLLAAFkUjIC4gRoojYTixMAEUKy2wTiywCiNCsE0rLbBPLLIAAEYrLbBQLLIAAUYrLbBRLLIBAEYrLbBSLLIBAUYrLbBTLLIAAEcrLbBULLIAAUcrLbBVLLIBAEcrLbBWLLIBAUcrLbBXLLMAAABDKy2wWCyzAAEAQystsFksswEAAEMrLbBaLLMBAQBDKy2wWyyzAAABQystsFwsswABAUMrLbBdLLMBAAFDKy2wXiyzAQEBQystsF8ssgAARSstsGAssgABRSstsGEssgEARSstsGIssgEBRSstsGMssgAASCstsGQssgABSCstsGUssgEASCstsGYssgEBSCstsGcsswAAAEQrLbBoLLMAAQBEKy2waSyzAQAARCstsGosswEBAEQrLbBrLLMAAAFEKy2wbCyzAAEBRCstsG0sswEAAUQrLbBuLLMBAQFEKy2wbyyxADwrLrEwARQrLbBwLLEAPCuwQCstsHEssQA8K7BBKy2wciywABaxADwrsEIrLbBzLLEBPCuwQCstsHQssQE8K7BBKy2wdSywABaxATwrsEIrLbB2LLEAPSsusTABFCstsHcssQA9K7BAKy2weCyxAD0rsEErLbB5LLEAPSuwQistsHossQE9K7BAKy2weyyxAT0rsEErLbB8LLEBPSuwQistsH0ssQA+Ky6xMAEUKy2wfiyxAD4rsEArLbB/LLEAPiuwQSstsIAssQA+K7BCKy2wgSyxAT4rsEArLbCCLLEBPiuwQSstsIMssQE+K7BCKy2whCyxAD8rLrEwARQrLbCFLLEAPyuwQCstsIYssQA/K7BBKy2whyyxAD8rsEIrLbCILLEBPyuwQCstsIkssQE/K7BBKy2wiiyxAT8rsEIrLbCLLLILAANFUFiwBhuyBAIDRVgjIRshWVlCK7AIZbADJFB4sQUBFUVYMFktAAAAAEu4AMhSWLEBAY5ZsAG5CAAIAGNwsQAHQrIXAQAqsQAHQrMMCAEKKrEAB0KzFAYBCiqxAAhCugNAAAEACyqxAAlCugBAAAEACyq5AAMAAESxJAGIUViwQIhYuQADAGREsSgBiFFYuAgAiFi5AAMAAERZG7EnAYhRWLoIgAABBECIY1RYuQADAABEWVlZWVmzDgYBDiq4Af+FsASNsQIARLMFZAYAREQAAAAAAQAAAAA=)format("truetype");font-style:normal;font-weight:500;font-display:swap}:root{--background:0 0% 100%;--foreground:240 10% 3.9%;--card:0 0% 100%;--primary:240 5.9% 10%;--primary-foreground:0 0% 98%;--secondary:240 4.8% 95.9%;--secondary-foreground:240 5.9% 10%;--muted:240 4.8% 95.9%;--muted-foreground:240 3.8% 46.1%;--accent:240 4.8% 95.9%;--destructive:0 72% 51%;--border:240 5.9% 90%;--ring:240 5.9% 10%;--radius:.5rem;--canvas:0 0% 100%;--panel:0 0% 100%;--sidebar:0 0% 98%;--sidebar-item-hover:0 0% 0% / .043;--sidebar-foreground:240 5.9% 10%;--sidebar-item-foreground:240 5.3% 26.1%;--sidebar-section-title:240 5.3% 26.1%;--sidebar-border:0 0% 0% / .075;--feature-link:208 100% 47.45%;color-scheme:light;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif}html[lang=en-US]{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html,body,#root{overscroll-behavior:none;height:100%;margin:0;overflow:hidden}#root{position:fixed;top:0;right:0;bottom:0;left:0}body{background:hsl(var(--canvas));color:hsl(var(--foreground));-webkit-font-smoothing:antialiased}.icon{flex-shrink:0;width:16px;height:16px}.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}*{scrollbar-width:thin;scrollbar-color:hsl(var(--foreground) / .18) transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:hsl(var(--foreground) / .18);background-clip:content-box;border:2px solid #0000;border-radius:999px}::-webkit-scrollbar-thumb:hover{background:hsl(var(--foreground) / .32);background-clip:content-box}::-webkit-scrollbar-corner{background:0 0}.layout{height:100dvh;min-height:0;display:flex;overflow:hidden}.main-shell{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.sidebar{background:hsl(var(--sidebar));width:240px;height:100%;min-height:0;color:hsl(var(--sidebar-foreground));box-shadow:inset -1px 0 hsl(var(--sidebar-border));flex-direction:column;flex-shrink:0;transition:width .22s cubic-bezier(.22,1,.36,1);display:flex;position:relative}.sidebar.is-collapsed{width:56px}.sidebar-top{flex-direction:column;padding:0 8px;display:flex}.sidebar-brand-row{align-items:center;gap:6px;height:64px;min-height:64px;padding:0 0 0 10px;display:flex}.sidebar:not(.is-collapsed) .sidebar-top{padding-inline:8px}.sidebar:not(.is-collapsed) .sidebar-brand-row{padding-right:0}.brand{min-width:0;color:inherit;cursor:pointer;letter-spacing:0;text-align:left;background:0 0;border:0;flex:1;align-items:center;gap:6px;padding:0;font-family:inherit;font-size:15px;font-weight:500;line-height:1.4;display:flex}.brand-title{text-overflow:ellipsis;white-space:nowrap;font-family:Byte Sans,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;overflow:hidden}.brand-logo,.brand-title,.brand{cursor:pointer}.login-brand-logo,.login-brand,.login-title{cursor:text}.sidebar-collapse-toggle{--sidebar-collapse-frame-stroke:#0c0d0e;--sidebar-collapse-divider-fill:#80838a;width:32px;height:32px;color:hsl(var(--sidebar-section-title));cursor:pointer;background:0 0;border:0;border-radius:999px;flex:0 0 32px;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.sidebar-collapse-toggle:hover{background:hsl(var(--sidebar-item-hover));color:hsl(var(--sidebar-foreground))}.sidebar-collapse-toggle .icon{width:18px;height:18px}.sidebar-panel-glyph__divider{fill:var(--sidebar-collapse-divider-fill);stroke:var(--sidebar-collapse-frame-stroke)}.sidebar-panel-glyph__frame{stroke:var(--sidebar-collapse-frame-stroke)}.sidebar.is-collapsed .sidebar-brand-row{justify-content:center;padding-inline:0}.sidebar.is-collapsed .brand{display:none}.brand-logo,.login-brand-logo{object-fit:contain;display:block}.brand-logo{flex:0 0 18px;width:18px;min-width:18px;max-width:18px;height:18px;min-height:18px;max-height:18px}.login-brand-logo{flex:0 0 20px;width:20px;min-width:20px;max-width:20px;height:20px;min-height:20px;max-height:20px}.sidebar-nav{flex-direction:column;gap:4px;width:100%;display:flex}.new-chat{width:100%;height:36px;min-height:36px;color:hsl(var(--sidebar-item-foreground));font:inherit;letter-spacing:0;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:8px;padding:7px 10px;font-size:14px;font-weight:400;line-height:22px;transition:background .12s;display:flex}.new-chat .icon{flex:0 0 16px;width:16px;height:16px}.new-chat:hover,.new-chat.is-active{background:hsl(var(--sidebar-item-hover))}.new-chat.is-active{color:hsl(var(--sidebar-foreground));font-weight:500}.sidebar-agent-face{overflow:visible}.sidebar-agent-face__eye{transform-box:fill-box;transform-origin:50%;animation:1s ease-in-out infinite sidebar-agent-blink}@keyframes sidebar-agent-blink{0%,42%,58%,to{transform:scaleY(1)}50%{transform:scaleY(.08)}}@media (prefers-reduced-motion:reduce){.sidebar-agent-face__eye{animation:none}}.studio-update-action{color:#fff;min-width:104px;min-height:40px;box-shadow:none;-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);cursor:pointer;font:inherit;background:#111;border:0;border-radius:999px;justify-content:center;align-items:center;gap:7px;padding:0 17px;font-size:12.5px;font-weight:650;transition:background-color .24s cubic-bezier(.22,1,.36,1),color .18s,box-shadow .24s,-webkit-backdrop-filter .24s,backdrop-filter .24s;display:inline-flex}.studio-update-action:not(:disabled):hover{color:#fff;background:#29292b;border:0;box-shadow:0 7px 18px #00000029}.studio-update-action:focus-visible{outline:2px solid hsl(var(--ring) / .55);outline-offset:2px}.studio-update-action:disabled{cursor:default;opacity:.42}.sidebar.is-collapsed .new-chat{white-space:nowrap;align-self:center;gap:0;width:36px;height:36px;min-height:36px;padding:9px;overflow:hidden}.sidebar.is-collapsed .sidebar-nav-label,.sidebar.is-collapsed .sidebar-history{display:none}.agentsel{--agentsel-available-width: calc(100vw - 254px) ;z-index:32;width:min(320px,var(--agentsel-available-width));background:0 0;border:0;flex-flow:wrap;align-content:stretch;align-items:stretch;gap:8px;margin-left:6px;animation:.16s ease-out agentsel-in;display:flex;position:absolute;top:8px;left:100%;overflow:visible;container-type:inline-size}.agentsel.has-detail{width:min(688px,var(--agentsel-available-width))}.agentsel--navbar{z-index:44;width:min(clamp(264px,26vw,288px),100vw - 48px);height:min(640px,100dvh - 74px);margin-left:0;position:absolute;top:calc(100% + 7px);left:0}.agentsel--navbar .agentsel-main{flex-basis:auto;width:100%}.sidebar.is-collapsed .agentsel{--agentsel-available-width: calc(100vw - 70px) }.agentsel-main{border:1px solid hsl(var(--border));background:hsl(var(--background));width:320px;min-width:min(240px,100%);height:100%;min-height:0;max-height:100%;box-shadow:0 12px 40px hsl(var(--foreground) / .14);border-radius:12px;flex-direction:column;flex:320px;display:flex;overflow:hidden}.agentsel-detail{border:1px solid hsl(var(--border));background:hsl(var(--background));width:360px;min-width:min(280px,100%);height:100%;min-height:0;max-height:100%;box-shadow:0 12px 40px hsl(var(--foreground) / .14);border-radius:12px;flex-direction:column;flex:360px;display:flex;overflow:hidden}.agentsel-preview{animation:.16s cubic-bezier(.22,1,.36,1) agentsel-preview-in}@container (max-width:527px){.agentsel.has-detail>.agentsel-main,.agentsel.has-detail>.agentsel-detail{height:calc(50% - 4px);max-height:calc(50% - 4px)}}.agentsel-preview-head{padding:7px 14px}.agentsel-detail-tabs{border:1px solid hsl(var(--border) / .58);background:hsl(var(--secondary) / .58);border-radius:9px;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;height:36px;padding:3px;display:grid;position:relative;overflow:hidden}.agentsel-detail-tabs-slider{z-index:0;border:1px solid hsl(var(--border) / .72);background:hsl(var(--background));border-radius:6px;width:calc(50% - 3px);transition:transform .24s cubic-bezier(.22,1,.36,1);position:absolute;top:3px;bottom:3px;left:3px;transform:translate(0)}.agentsel-detail-tabs.is-runtime .agentsel-detail-tabs-slider{transform:translate(100%)}.agentsel-detail-tabs button{z-index:1;min-width:0;color:hsl(var(--muted-foreground));font:inherit;text-align:center;cursor:pointer;background:0 0;border:0;border-radius:6px;font-size:12px;font-weight:550;transition:color .16s;position:relative}.agentsel-detail-tabs button:hover,.agentsel-detail-tabs button[aria-selected=true]{color:hsl(var(--foreground))}.agentsel-detail-tabs button:focus-visible{outline:2px solid hsl(var(--ring) / .24);outline-offset:-2px}.agentsel-tab-panel{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.agentsel-tab-panel[hidden]{display:none}.agentsel-detail-body{overscroll-behavior-y:contain;scrollbar-gutter:stable;flex:1;min-width:0;min-height:0;padding:12px 14px;overflow:hidden auto}.agentsel-panel-state{min-height:120px;color:hsl(var(--muted-foreground));justify-content:center;align-items:center;gap:7px;font-size:12.5px;display:flex}.agentsel-panel-state .icon{width:15px;height:15px}.agentsel-panel-empty{text-align:center;color:hsl(var(--muted-foreground));overflow-wrap:anywhere;flex-direction:column;gap:6px;padding:24px 8px;font-size:12.5px;display:flex}.agentsel-panel-empty small{color:hsl(var(--muted-foreground) / .75);-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:11px;line-height:1.45;display:-webkit-box;overflow:hidden}.agentsel-identity,.agentsel-runtime-identity{align-items:flex-start;gap:10px;min-width:0;display:flex}.agentsel-identity{padding-bottom:12px}.agentsel-identity-icon,.agentsel-runtime-identity>.icon{width:18px;height:18px;color:hsl(var(--muted-foreground));flex-shrink:0;margin-top:1px}.agentsel-identity-copy,.agentsel-runtime-identity>div{flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.agentsel-identity-copy strong,.agentsel-runtime-identity strong{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;font-weight:650;overflow:hidden}.agentsel-identity-copy span,.agentsel-runtime-identity span{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}.agentsel-runtime-identity{border-bottom:1px solid hsl(var(--border));margin-bottom:14px;padding-bottom:12px}.agentsel-info-section{border-top:1px solid hsl(var(--border));min-width:0;padding:11px 0}.agentsel-info-section h3{color:hsl(var(--muted-foreground));align-items:center;gap:6px;margin:0 0 8px;font-size:11.5px;font-weight:600;display:flex}.agentsel-info-section h3 .icon{width:13px;height:13px}.agentsel-description{white-space:pre-wrap;overflow-wrap:anywhere;max-height:104px;color:hsl(var(--foreground));margin:0;font-size:12.5px;line-height:1.65;overflow-y:auto}.agentsel-chips{flex-wrap:wrap;gap:5px;min-width:0;display:flex}.agentsel-chip{border:1px solid hsl(var(--border));background:hsl(var(--canvas) / .7);max-width:100%;color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;border-radius:5px;padding:3px 7px;font-size:11.5px;line-height:1.35;display:block;overflow:hidden}.agentsel-info-list{flex-direction:column;gap:6px;min-width:0;display:flex}.agentsel-info-list-item{background:hsl(var(--canvas) / .72);border-radius:6px;flex-direction:column;gap:2px;min-width:0;padding:7px 8px;display:flex}.agentsel-info-list-item>strong,.agentsel-component-head>strong{text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;overflow:hidden}.agentsel-info-list-item>span{color:hsl(var(--muted-foreground));overflow-wrap:anywhere;-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:11px;line-height:1.45;display:-webkit-box;overflow:hidden}.agentsel-component-head{align-items:center;gap:8px;min-width:0;display:flex}.agentsel-component-head>strong{flex:1;min-width:0}.agentsel-component-head>span{background:hsl(var(--foreground) / .06);color:hsl(var(--muted-foreground));border-radius:4px;flex-shrink:0;padding:1px 5px;font-size:10px}.agentsel-kv{flex-direction:column;gap:8px;margin:0;display:flex}.agentsel-kv-row{grid-template-columns:52px 1fr;gap:8px;font-size:12.5px;display:grid}.agentsel-kv-row dt{color:hsl(var(--muted-foreground))}.agentsel-kv-row dd{min-width:0;color:hsl(var(--foreground));overflow-wrap:anywhere;margin:0}.agentsel-envs{margin-top:14px}.agentsel-envs-head{color:hsl(var(--muted-foreground));margin-bottom:6px;font-size:12px;font-weight:600}.agentsel-env{flex-direction:column;gap:1px;margin-bottom:6px;display:flex}.agentsel-env-k{overflow-wrap:anywhere;color:hsl(var(--muted-foreground));font-family:inherit;font-size:11px}.agentsel-env-v{overflow-wrap:anywhere;color:hsl(var(--foreground));font-family:inherit;font-size:11.5px}.agentsel-head-actions{align-items:center;gap:2px;display:flex}.agentsel-pager{flex:0 0 36px;justify-content:center;align-items:center;gap:14px;padding:6px 10px 0;display:flex}.agentsel-pager button{cursor:pointer;color:hsl(var(--muted-foreground));background:0 0;border:none;padding:2px;display:flex}.agentsel-pager button:hover:not(:disabled){color:hsl(var(--foreground))}.agentsel-pager button:disabled{opacity:.3;cursor:default}.agentsel-pager button .icon{width:18px;height:18px}.agentsel-pager-label{color:hsl(var(--muted-foreground));text-align:center;min-width:40px;font-size:13px}@keyframes agentsel-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes agentsel-preview-in{0%{opacity:0;transform:translate(-6px)}to{opacity:1;transform:translate(0)}}.agentsel-head{box-sizing:border-box;border-bottom:1px solid hsl(var(--border));flex-shrink:0;justify-content:space-between;align-items:center;height:52px;padding:0 14px;display:flex}.agentsel-title{text-overflow:ellipsis;white-space:nowrap;align-items:center;gap:8px;min-width:0;font-size:14px;font-weight:600;display:flex;overflow:hidden}.agentsel-title .icon{width:17px;height:17px}.agentsel-refresh{cursor:pointer;color:hsl(var(--muted-foreground));background:0 0;border:none;border-radius:6px;padding:4px;display:flex}.agentsel-refresh:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.agentsel-refresh .icon{width:16px;height:16px}.agentsel-body{overscroll-behavior-y:contain;scrollbar-gutter:stable;flex:1;min-height:0;padding:10px;overflow-y:auto}.agentsel-body--cloud{scrollbar-gutter:auto;flex-direction:column;display:flex;overflow:hidden}.agentsel-tools{flex-direction:column;gap:8px;margin-bottom:10px;display:flex}.agentsel-search{border:1px solid hsl(var(--border));border-radius:8px;align-items:center;gap:8px;padding:7px 10px;display:flex}.agentsel-search .icon{width:15px;height:15px;color:hsl(var(--muted-foreground))}.agentsel-search input{font:inherit;color:hsl(var(--foreground));background:0 0;border:none;outline:none;flex:1;font-size:13px}.agentsel-mine{color:hsl(var(--muted-foreground));cursor:pointer;align-items:center;gap:7px;font-size:12.5px;display:flex}.agentsel-list{flex-direction:column;gap:4px;margin:0;padding:0;list-style:none;display:flex}.agentsel-listwrap{min-height:220px;position:relative}.agentsel-body--cloud .agentsel-listwrap{overscroll-behavior-y:contain;scrollbar-gutter:auto;flex:1;min-height:0;overflow-y:auto}.agentsel-loading{color:hsl(var(--muted-foreground));background:hsl(var(--background) / .72);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);border-radius:8px;justify-content:center;align-items:center;gap:8px;font-size:13px;display:flex;position:absolute;top:0;right:0;bottom:0;left:0}.agentsel-loading .icon{width:16px;height:16px}.agentsel-item{width:100%;min-height:46px;color:hsl(var(--foreground));font:inherit;text-align:left;background:0 0;border:none;border-radius:8px;align-items:center;gap:9px;padding:4px 0;font-size:13.5px;display:flex}.agentsel-main button.agentsel-item{cursor:pointer;min-height:0;padding:9px 10px}.agentsel-item:hover{background:hsl(var(--foreground) / .05);box-shadow:none;transform:none}.agentsel-runtime-item:hover{background:0 0}.agentsel-item.active{background:hsl(var(--foreground) / .08);font-weight:600}.agentsel-item.is-previewed{background:hsl(var(--foreground) / .055)}.agentsel-runtime-item.active,.agentsel-runtime-item.is-previewed{background:0 0}.agentsel-item .icon{width:16px;height:16px;color:hsl(var(--muted-foreground));flex-shrink:0}.agentsel-item-main{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.agentsel-item-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13px;font-weight:550;overflow:hidden}.agentsel-item-meta{align-items:center;gap:4px;min-width:0;display:flex}.agentsel-item-actions{flex-shrink:0;align-items:center;gap:1px;display:flex}.agentsel-connect,.agentsel-info{color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;background:0 0;border:0;border-radius:6px}.agentsel-connect{min-width:38px;height:28px;padding:0 5px;font-size:11.5px;font-weight:550}.agentsel-info{place-items:center;width:28px;height:28px;padding:0;display:grid}.agentsel-connect:hover:not(:disabled),.agentsel-info:hover{background:hsl(var(--foreground) / .07);color:hsl(var(--foreground));box-shadow:none}.agentsel-info.active{color:hsl(var(--foreground));box-shadow:none;background:0 0}.agentsel-connect:disabled{opacity:.55;cursor:default}.agentsel-info .icon{width:15px;height:15px}.agentsel-rt{flex-direction:column;display:flex}.agentsel-rt-row{width:100%;color:hsl(var(--foreground));font:inherit;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:8px;align-items:center;gap:7px;padding:9px 8px;font-size:13.5px;display:flex}.agentsel-rt-row:hover{background:hsl(var(--foreground) / .05)}.agentsel-rt-row .icon{width:15px;height:15px;color:hsl(var(--muted-foreground));flex-shrink:0}.agentsel-rt-name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.runtime-owner-badge{color:#0b68cb;background:#007bff1f;border-radius:999px;flex-shrink:0;padding:1px 6px;font-size:10px;font-weight:600}.agentsel-status{border-radius:999px;flex-shrink:0;padding:1px 6px;font-size:10px}.agentsel-status.is-ok{color:#238b49;background:#21c45d24}.agentsel-status.is-warn{color:#b86614;background:#f59f0a29}.agentsel-status.is-bad{color:#ca2b2b;background:#dc282824}.agentsel-status.is-muted{background:hsl(var(--muted));color:hsl(var(--muted-foreground))}.agentsel-apps{flex-direction:column;gap:2px;padding:2px 0 6px 20px;display:flex}.agentsel-app{width:100%;color:hsl(var(--foreground));font:inherit;cursor:pointer;text-align:left;background:0 0;border:none;border-radius:7px;align-items:center;gap:8px;padding:7px 10px;font-size:13px;display:flex}.agentsel-app:hover{background:hsl(var(--foreground) / .05)}.agentsel-app.active{background:hsl(var(--foreground) / .08);font-weight:600}.agentsel-app .icon{width:14px;height:14px;color:hsl(var(--muted-foreground));flex-shrink:0}.agentsel-apps-note{color:hsl(var(--muted-foreground));align-items:center;gap:7px;padding:7px 10px;font-size:12.5px;display:flex}.agentsel-apps-note .icon{width:14px;height:14px}.agentsel-apps-note--muted{font-style:italic}.agentsel-empty{text-align:center;color:hsl(var(--muted-foreground));padding:24px 10px;font-size:13px}.agentsel-error{overflow-wrap:anywhere;color:#bd2828;white-space:pre-wrap;background:#dc282814;border-radius:8px;min-width:0;max-width:100%;margin:4px 0 10px;padding:8px 10px;font-size:12.5px;overflow:hidden}.agentsel-more{border:1px dashed hsl(var(--border));width:100%;color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;background:0 0;border-radius:8px;margin-top:8px;padding:9px;font-size:13px}.agentsel-more:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.sidebar-history{flex-direction:column;flex:1;min-height:0;margin-top:20px;display:flex}.history-head{letter-spacing:0;height:32px;min-height:32px;color:hsl(var(--sidebar-section-title));justify-content:space-between;align-items:center;padding:0 18px;font-size:13px;font-weight:400;line-height:22px;display:flex}.history-refresh{cursor:pointer;color:hsl(var(--sidebar-section-title));background:0 0;border:none;padding:2px;display:flex}.history-refresh:hover{color:hsl(var(--sidebar-foreground))}.history-new-chat{width:24px;height:24px;color:hsl(var(--sidebar-section-title));cursor:pointer;background:0 0;border:0;border-radius:6px;justify-content:center;align-items:center;margin:-4px 0;padding:0;transition:color .12s;display:inline-flex}.history-new-chat .icon{width:15px;height:15px}.history-new-chat:hover{color:hsl(var(--sidebar-foreground));background:0 0}.history-list{flex-direction:column;flex:1;gap:4px;padding:0 8px 12px;display:flex;overflow-y:auto}.history-empty{color:hsl(var(--sidebar-section-title));text-align:center;padding:16px 8px;font-size:13px}.history-error{background:hsl(var(--destructive) / .08);color:hsl(var(--destructive));border-radius:8px;margin:4px 0 8px;padding:8px 10px;font-size:12px;line-height:1.5}.history-item{border-radius:8px;align-items:center;transition:background .12s;display:flex;position:relative}.history-item:hover,.history-item.active{background:hsl(var(--sidebar-item-hover))}.history-item-btn{text-align:left;min-width:0;min-height:36px;color:hsl(var(--sidebar-item-foreground));font:inherit;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;gap:8px;padding:7px 10px;font-size:14px;font-weight:400;line-height:22px;display:flex}.history-item.active .history-item-btn{color:hsl(var(--sidebar-foreground))}.history-title{white-space:nowrap;text-overflow:clip;--history-title-left-fade:0px;--history-title-right-fade:0px;--history-title-translate:0px;--history-title-duration:4.8s;min-width:0;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--history-title-left-fade),#000 calc(100% - var(--history-title-right-fade)),transparent 100%);mask-image:linear-gradient(to right,transparent 0,#000 var(--history-title-left-fade),#000 calc(100% - var(--history-title-right-fade)),transparent 100%);flex:1;overflow:hidden}.history-title.is-overflowing{--history-title-right-fade:20px}.history-title-text{min-width:max-content;display:inline-block;transform:translate(0)}.history-item:hover .history-title.is-overflowing,.history-item:focus-within .history-title.is-overflowing{--history-title-left-fade:16px}.history-item:hover .history-title.is-overflowing .history-title-text,.history-item:focus-within .history-title.is-overflowing .history-title-text{animation:history-title-marquee var(--history-title-duration) cubic-bezier(.45,0,.25,1) .24s infinite;will-change:transform}@keyframes history-title-marquee{0%,12%{transform:translate(0)}68%,82%{transform:translate3d(var(--history-title-translate),0,0)}to{transform:translate(0)}}.history-current-badge{background:hsl(var(--sidebar-item-hover));color:hsl(var(--sidebar-section-title));border-radius:999px;flex:none;padding:2px 5px;font-size:10px;font-weight:600;line-height:1.2}.history-item-btn:focus-visible,.history-more:focus-visible,.history-load-more:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:1px}.history-item-btn:disabled,.history-more:disabled{cursor:wait;opacity:.58}.history-evaluating-status{color:#956718;flex-shrink:0;align-items:center;gap:5px;font-size:10.5px;font-weight:600;line-height:1;display:inline-flex}.history-evaluating{background:#f59f0a;border-radius:50%;flex-shrink:0;width:7px;height:7px;animation:1.4s ease-in-out infinite history-evaluation-pulse;box-shadow:0 0 #f59f0a6b}@keyframes history-evaluation-pulse{0%,to{box-shadow:0 0 #f59f0a6b}50%{box-shadow:0 0 0 4px #f59f0a00}}@media (prefers-reduced-motion:reduce){.history-title-text{animation:none!important;transform:none!important}.history-evaluating{box-shadow:none;animation:none}}.history-action-slot{flex:0 0 32px;grid-template-columns:28px 4px;align-items:center;width:32px;height:36px;display:grid}.history-action-slot>.history-more,.history-streaming-indicator{grid-area:1/1}.history-streaming-indicator{color:hsl(var(--muted-foreground));pointer-events:none;opacity:1;justify-self:center;transition:opacity .12s ease-out}.history-more{width:28px;height:28px;color:hsl(var(--sidebar-section-title));cursor:pointer;opacity:0;background:0 0;border:none;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;margin-right:4px;transition:opacity .12s,background .12s;display:flex}.history-action-slot>.history-more{margin-right:0}.history-item:hover .history-more,.history-action-slot:focus-within .history-more{opacity:1}.history-item:hover .history-streaming-indicator,.history-action-slot:focus-within .history-streaming-indicator{opacity:0}.history-more:hover{background:hsl(var(--sidebar-item-hover));color:hsl(var(--sidebar-foreground))}.history-load-more{min-height:32px;color:hsl(var(--sidebar-section-title));font:inherit;cursor:pointer;background:0 0;border:0;border-radius:7px;margin-top:6px;font-size:12px;font-weight:550}.history-load-more:hover:not(:disabled){background:hsl(var(--sidebar-item-hover));color:hsl(var(--sidebar-foreground))}.history-load-more:disabled{cursor:wait;opacity:.6}.menu-scrim{z-index:30;position:fixed;top:0;right:0;bottom:0;left:0}.history-menu{z-index:31;background:hsl(var(--background));border:1px solid hsl(var(--border));min-width:120px;box-shadow:0 6px 20px hsl(var(--foreground) / .12);border-radius:8px;margin-top:2px;padding:4px;position:absolute;top:100%;right:4px}.menu-item{width:100%;font:inherit;cursor:pointer;color:hsl(var(--foreground));background:0 0;border:none;border-radius:6px;align-items:center;gap:8px;padding:7px 10px;font-size:13px;display:flex}.menu-item:hover{background:hsl(var(--accent))}.menu-item--danger{color:hsl(var(--destructive))}.menu-item .icon{width:15px;height:15px}.main{background:hsl(var(--panel));border:0;border-radius:0;flex-direction:column;flex:1;min-width:0;min-height:0;margin:0;display:flex;position:relative;overflow:hidden}.error{z-index:3;border-radius:var(--radius);background:hsl(var(--destructive) / .1);width:calc(100% - 32px);max-width:768px;color:hsl(var(--destructive));overflow-wrap:anywhere;white-space:pre-wrap;margin:10px auto 0;padding:10px 12px;font-size:13px;position:relative}.case-return-bar{flex:none;justify-content:center;padding:12px 16px 0;display:flex}.case-return-bar button{border:1px solid hsl(var(--border));background:hsl(var(--background));min-height:32px;color:hsl(var(--foreground));cursor:pointer;font:inherit;box-shadow:0 1px 2px hsl(var(--foreground) / .05);border-radius:999px;align-items:center;gap:7px;padding:0 11px;font-size:12px;font-weight:620;display:inline-flex}.case-return-bar button:hover{background:hsl(var(--secondary) / .55)}.case-return-bar svg{width:14px;height:14px}.transcript{flex:1;padding:28px 16px 8px;overflow-y:auto}.transcript.is-streaming{overflow-anchor:none}.welcome{flex-direction:column;flex:1;justify-content:center;align-items:center;gap:32px;padding:0 16px clamp(88px,16vh,136px);display:flex;position:relative}.welcome-primary{flex-direction:column;align-items:center;gap:32px;width:100%;display:flex;position:relative}.welcome-heading{z-index:10;flex-direction:column;align-items:center;gap:72px;display:flex;position:relative}.welcome-feature-pill{background:hsl(var(--muted));height:36px;color:hsl(var(--muted-foreground));white-space:nowrap;border-radius:999px;align-items:center;gap:12px;padding:0 16px;font-size:13px;font-weight:500;line-height:1;display:inline-flex;position:relative}.welcome-feature-divider{background:hsl(var(--border));width:1px;height:16px}.welcome-feature-link{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:hsl(var(--feature-link));font:inherit;line-height:inherit;cursor:pointer;background:0 0;border:0;padding:0}.welcome-feature-link:focus-visible{outline:2px solid hsl(var(--feature-link) / .35);outline-offset:3px;border-radius:3px}.welcome-feature-pill:has(.studio-update-trigger--feature)>.welcome-feature-link:not(.studio-update-trigger--feature),.welcome-feature-pill:has(.studio-update-trigger--feature)>.welcome-feature-popover{display:none}.welcome-feature-popover{z-index:40;border:1px solid hsl(var(--border));background:hsl(var(--background));width:min(340px,100vw - 32px);box-shadow:0 14px 36px hsl(var(--foreground) / .12);color:hsl(var(--foreground));text-align:left;white-space:normal;opacity:0;pointer-events:none;border-radius:14px;padding:16px;transition:opacity .16s,transform .16s;position:absolute;top:50%;left:calc(100% + 12px);transform:translate(-4px,-50%)}.welcome-feature-pill:hover .welcome-feature-popover,.welcome-feature-pill:focus-within .welcome-feature-popover{opacity:1;pointer-events:auto;transform:translateY(-50%)}.welcome-feature-popover>strong{margin-bottom:12px;font-size:13px;font-weight:600;display:block}.welcome-feature-popover ul{overscroll-behavior:contain;scrollbar-gutter:stable;max-height:min(220px,32vh);margin:0;padding:0 4px 0 18px;list-style:outside;display:block;overflow-y:auto}.welcome-feature-popover li{color:hsl(var(--muted-foreground));font-size:12px;line-height:1.55;display:list-item}.welcome-feature-popover li+li{margin-top:8px}@media (max-width:900px){.welcome-feature-popover{top:calc(100% + 10px);left:50%;transform:translate(-50%,-4px)}.welcome-feature-pill:hover .welcome-feature-popover,.welcome-feature-pill:focus-within .welcome-feature-popover{transform:translate(-50%)}}.welcome-title,.composer-placeholder-reveal{animation:.9s cubic-bezier(.22,1,.36,1) both welcome-text-reveal}@keyframes welcome-text-reveal{0%{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0)}}@media (prefers-reduced-motion:reduce){.welcome-title,.composer-placeholder-reveal{opacity:1;clip-path:none;animation:none}.welcome-feature-popover{transition:none}}.welcome-title{letter-spacing:-.02em;margin:0;font-size:26px;font-weight:600}.welcome .composer{padding:0}.turn{flex-direction:column;gap:8px;max-width:768px;margin:0 auto 22px;display:flex}.turn:last-child{margin-bottom:0}.turn--user{align-items:flex-end}.turn--assistant{align-items:flex-start}.turn--assistant.is-feedback-target{border-radius:12px;animation:2.4s ease-out feedback-target-pulse}@keyframes feedback-target-pulse{0%{background:hsl(var(--foreground) / .07);box-shadow:0 0 0 8px hsl(var(--foreground) / .05)}to{box-shadow:0 0 hsl(var(--foreground) / 0);background:0 0}}.transcript.is-streaming>.turn--assistant:last-child{min-height:max(0px,100% - 180px)}.turn--subagent{isolation:isolate;width:100%;max-width:768px;box-shadow:none;background:0 0;border:0;border-radius:14px;gap:10px;margin-top:40px;margin-bottom:16px;padding:30px 16px 14px;position:relative}.turn--subagent:before{z-index:-1;border-radius:inherit;-webkit-backdrop-filter:blur(18px)saturate(115%);content:"";pointer-events:none;background:radial-gradient(circle at 12% 8%,#e3ebf28c,#0000 38%),radial-gradient(circle at 88% 78%,#e3e6ed6b,#0000 42%),linear-gradient(120deg,#ffffff8f,#f2f4f742);border:1px solid #dadfe7d1;position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}.turn--subagent:has(>.turn-meta){padding-bottom:0}.turn--subagent:has(>.turn-meta):before{bottom:44px}.transcript.is-streaming>.turn--subagent:last-child{min-height:0}.parallel-turn-group{display:contents}@media (min-width:1100px){.parallel-turn-group{overscroll-behavior-inline:contain;scroll-snap-type:inline proximity;scrollbar-width:thin;grid-auto-columns:calc(33.3333% - 10.6667px);grid-auto-flow:column;gap:16px;width:min(1180px,100% - 16px);max-width:1180px;margin:0 auto 22px;padding:22px 2px 6px;display:grid;overflow:auto hidden}.parallel-turn-group>.turn--subagent{scroll-snap-align:start;width:100%;min-width:0;max-width:none;margin:0}.parallel-turn-group[data-parallel-agent-count="1"]{grid-auto-columns:min(768px,100%);justify-content:center}.parallel-turn-group[data-parallel-agent-count="2"]{grid-auto-columns:calc(50% - 8px)}.parallel-turn-group:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}}.turn--assistant:has(.create-agent-tool-card.is-agent-results):has(+.turn--subagent)>.turn-meta,.turn--assistant:has(.create-agent-tool-card.is-agent-results):has(+.parallel-turn-group)>.turn-meta{display:none}.subagent-run-label{background:hsl(var(--background));max-width:calc(100% - 28px);min-height:36px;box-shadow:none;border:1px solid #d5dae2;border-radius:10px;align-items:center;gap:8px;padding:4px 9px 4px 4px;display:inline-flex;position:absolute;top:0;left:14px;transform:translateY(-50%)}.subagent-run-handoff{color:#606b7b;white-space:nowrap;background:#eff2f5;border-radius:7px;flex:none;align-items:center;gap:5px;height:26px;padding:0 8px 0 6px;font-size:12px;font-weight:400;display:inline-flex}.subagent-run-handoff svg{flex:0 0 15px;width:15px;height:15px}.subagent-run-title{min-width:0;color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:14.5px;font-weight:400;overflow:hidden}.subagent-run-description{color:#636c79;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;padding:0 2px 4px;font-size:13.5px;line-height:1.6;display:-webkit-box;overflow:hidden}.turn--subagent .turn-meta{margin:20px -16px 0;position:static}.codex-sandbox-run{isolation:isolate;background:radial-gradient(circle at 12% 8%,#e3ebf280,transparent 38%),radial-gradient(circle at 88% 78%,#e3e6ed61,transparent 42%),hsl(var(--background) / .56);border:1px solid #dadfe7d1;border-radius:14px;width:100%;min-width:0;margin:20px 0 8px;padding:28px 14px 12px;position:relative}.codex-sandbox-run__label{background:hsl(var(--background));border:1px solid #d5dae2;border-radius:10px;align-items:center;gap:8px;max-width:calc(100% - 24px);min-height:34px;padding:3px 9px 3px 4px;display:inline-flex;position:absolute;top:0;left:12px;transform:translateY(-50%)}.codex-sandbox-run__badge{color:#606b7b;white-space:nowrap;background:#eff2f5;border-radius:7px;flex:none;align-items:center;gap:5px;height:26px;padding:0 8px 0 6px;font-size:12px;font-weight:400;display:inline-flex}.codex-sandbox-run__badge svg{flex:0 0 15px;width:15px;height:15px}.codex-sandbox-run__title{min-width:0;color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:400;overflow:hidden}.codex-sandbox-run__identity{border-bottom:1px solid hsl(var(--border));grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px;margin:0 0 10px;padding:0 2px 10px;display:grid}.codex-sandbox-run__identity>div{min-width:0}.codex-sandbox-run__identity dt,.codex-sandbox-run__identity dd{margin:0}.codex-sandbox-run__identity dt{color:hsl(var(--muted-foreground));font-size:11px;line-height:1.45}.codex-sandbox-run__identity dd{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.5;overflow:hidden}.codex-sandbox-run__stream{flex-direction:column;gap:6px;min-width:0;max-height:min(520px,55vh);padding-right:2px;display:flex;overflow:hidden auto}.codex-sandbox-run__stream .tool-detail,.codex-sandbox-run__stream .tool-section,.codex-sandbox-run__stream .tool-args{min-width:0;max-width:100%}.codex-sandbox-run__stream .tool-args{overflow:auto}.codex-sandbox-run__empty{min-height:32px;color:hsl(var(--muted-foreground));font-size:13.5px;line-height:32px}@media (max-width:700px){.turn--subagent{width:100%;padding:30px 10px 12px}.turn--subagent:has(>.turn-meta){padding-bottom:0}.turn--subagent .turn-meta{margin-left:-10px;margin-right:-10px}.subagent-run-label{max-width:calc(100% - 20px);left:10px}.codex-sandbox-run{padding-left:10px;padding-right:10px}.codex-sandbox-run__label{max-width:calc(100% - 20px);left:10px}.codex-sandbox-run__identity{grid-template-columns:minmax(0,1fr)}}.bubble{font-size:14.5px;line-height:1.65}.turn--user .bubble{background:hsl(var(--secondary));border-radius:18px;max-width:85%;padding:10px 16px}.turn--assistant .bubble{max-width:100%}.turn--assistant .bubble:has(.visualization-card){width:100%;min-width:0}.md{font-size:14.5px;line-height:1.65}.md>:first-child{margin-top:0}.md>:last-child{margin-bottom:0}.md p{margin:0 0 .7em}.md h1,.md h2,.md h3,.md h4,.md h5,.md h6{letter-spacing:-.01em;margin:1.1em 0 .5em;font-weight:650;line-height:1.3}.md h1{font-size:1.4em}.md h2{font-size:1.25em}.md h3{font-size:1.1em}.md h4,.md h5,.md h6{font-size:1em}.md ul{list-style:outside}.md ol{list-style:decimal}.md ul ul{list-style-type:circle}.md ul ul ul{list-style-type:square}.md ol ol{list-style-type:lower-alpha}.md ol ol ol{list-style-type:lower-roman}.md li,.md li>ul,.md li>ol{margin:.15em 0}.md a{color:hsl(var(--primary));text-underline-offset:2px;text-decoration:underline}.md a:hover{opacity:.8}.md blockquote{border-left:3px solid hsl(var(--border));color:hsl(var(--muted-foreground));margin:0 0 .7em;padding:.1em .9em}.md strong{font-weight:650}.md code{background:hsl(var(--muted));border-radius:5px;padding:.12em .35em;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.875em}.md pre{background:hsl(var(--muted));border-radius:8px;margin:0 0 .7em;padding:12px 14px;line-height:1.55;overflow-x:auto}.md pre code{background:0 0;border-radius:0;padding:0;font-size:12.5px}.visualization-card{border:1px solid hsl(var(--border));background:hsl(var(--muted) / .55);border-radius:8px;width:100%;min-width:0;margin:0 0 .7em;overflow:hidden}.visualization-card__toolbar{border-bottom:1px solid hsl(var(--border));align-items:center;min-height:40px;padding:8px 10px;display:flex}.visualization-card__tabs{font-size:inherit;font-weight:inherit;flex:none}.visualization-card__body{background:hsl(var(--panel));min-width:0}.md .visualization-card__code{background:hsl(var(--muted) / .35);border-radius:0;min-height:96px;max-height:360px;margin:0;padding:14px 16px;overflow:auto}.mermaid-diagram{justify-content:center;align-items:center;width:100%;min-height:120px;padding:16px;display:flex;overflow-x:auto}.mermaid-diagram svg{max-width:100%;height:auto;display:block}.mermaid-diagram--loading{color:hsl(var(--muted-foreground));font-size:12.5px}.mermaid-diagram--error{justify-content:flex-start;min-height:0}.mermaid-diagram__error{color:hsl(var(--destructive));margin:0;font-size:12.5px}.echarts-diagram{width:100%;height:320px;min-height:240px;position:relative}.echarts-diagram__canvas{width:100%;height:100%}.echarts-diagram__state{color:hsl(var(--muted-foreground));justify-content:center;align-items:center;font-size:12.5px;display:flex;position:absolute;top:0;right:0;bottom:0;left:0}.echarts-diagram--error{height:auto;min-height:0;padding:16px}.echarts-diagram__error{color:hsl(var(--destructive));margin:0;font-size:12.5px}@media (max-width:640px){.echarts-diagram{height:280px}}.md table{border-collapse:collapse;width:100%;box-shadow:0 2px 8px hsl(var(--foreground) / .1),0 0 0 1px hsl(var(--border));border-radius:12px;margin:0 0 .7em;font-size:.95em;overflow:hidden}.md table thead th,.md table th{background:hsl(var(--muted));border:1px solid hsl(var(--border));text-align:left;padding:12px 16px;font-size:.98em;font-weight:650}.md table tbody td,.md table td{border:1px solid hsl(var(--border));text-align:left;vertical-align:top;padding:12px 16px;line-height:1.65}.md table tbody tr:nth-child(2n){background:hsl(var(--muted) / .25)}.md table tbody tr:hover{background:hsl(var(--accent))}.md table caption{caption-side:top;text-align:left;color:hsl(var(--muted-foreground));padding:0 0 8px;font-size:.9em;font-weight:600}.md table colgroup,.md table col{display:table-column}.md table thead,.md table tbody,.md table tfoot{display:table-row-group}.md table tr{display:table-row}.md strong,.md b{font-weight:650}.md em,.md i{font-style:italic}.md del,.md s{text-decoration:line-through}.md ins,.md u{text-decoration:underline}.md mark{background:#fff3c2b3;border-radius:4px;padding:.1em .3em}.md sub{vertical-align:sub;font-size:.8em}.md sup{vertical-align:super;font-size:.8em}.md code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.md pre{overflow-x:auto}@media (max-width:640px){.md table{font-size:.85em}.md table thead th,.md table th,.md table tbody td,.md table td{padding:8px 10px}}.md p{line-height:1.7}.md br{content:"";margin:.4em 0;display:block}.md hr{border:none;border-top:1px solid hsl(var(--border));margin:1.5em 0}.md blockquote{border-left:3px solid hsl(var(--primary) / .4);background:hsl(var(--muted) / .3);border-radius:0 8px 8px 0;margin:.8em 0;padding:.6em 1em}.md ul,.md ol{margin:.6em 0;padding-left:1.6em}.md li{margin:.3em 0;line-height:1.6}.md h1,.md h2,.md h3,.md h4,.md h5,.md h6{margin-top:1.2em;margin-bottom:.5em;line-height:1.3}.md h1{font-size:1.6em;font-weight:700}.md h2{font-size:1.4em;font-weight:650}.md h3{font-size:1.2em;font-weight:600}.md h4{font-size:1.1em;font-weight:600}.md h5,.md h6{font-size:1em;font-weight:600}.md .image-preview-trigger{background:hsl(var(--muted));width:fit-content;max-width:40%;box-shadow:0 0 0 1px hsl(var(--border));cursor:zoom-in;border:0;border-radius:10px;margin:0 0 .7em;padding:0;line-height:0;display:block;position:relative;overflow:hidden}.md .image-preview-trigger:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:3px}.md .image-preview-trigger img{border-radius:inherit;width:auto;max-width:100%;height:auto;transition:filter .18s,transform .18s;display:block}.md .image-preview-trigger:hover img{filter:brightness(.92);transform:scale(1.01)}.image-preview-hint{color:#fff;opacity:0;background:#131316ad;border:1px solid #fff3;border-radius:8px;place-items:center;width:28px;height:28px;transition:opacity .16s,transform .16s;display:grid;position:absolute;bottom:8px;right:8px;transform:translateY(3px)}.image-preview-hint svg{width:14px;height:14px}.image-preview-trigger:hover .image-preview-hint,.image-preview-trigger:focus-visible .image-preview-hint{opacity:1;transform:translateY(0)}.md .video-container{gap:6px;margin:0 0 .7em;display:grid}.md .video-caption{color:hsl(var(--muted-foreground));font-size:.9em}.md .video-link-text{color:inherit;text-decoration:none;transition:color .15s}.md .video-link-text:hover{color:hsl(var(--foreground));text-decoration:underline}.md .video-preview-trigger{background:hsl(var(--muted));width:fit-content;max-width:80%;box-shadow:0 2px 8px hsl(var(--foreground) / .1),0 0 0 1px hsl(var(--border));cursor:pointer;border:0;border-radius:12px;padding:0;line-height:0;transition:box-shadow .18s,transform .18s;display:block;position:relative;overflow:hidden}.md .video-preview-trigger:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:3px}.md .video-preview-trigger:hover{box-shadow:0 4px 16px hsl(var(--foreground) / .15),0 0 0 1px hsl(var(--border));transform:translateY(-1px)}.md .video-preview-trigger .video-thumbnail{border-radius:inherit;width:auto;max-width:100%;height:auto;transition:filter .18s,transform .18s;display:block}.md .video-preview-trigger:hover .video-thumbnail{filter:brightness(.9);transform:scale(1.01)}.video-preview-hint{color:#fff;opacity:0;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#131316b3;border:1px solid #fff3;border-radius:10px;place-items:center;width:32px;height:32px;transition:opacity .16s,transform .16s;display:grid;position:absolute;bottom:10px;right:10px;transform:translateY(4px)}.video-preview-hint svg{width:16px;height:16px}.video-preview-trigger:hover .video-preview-hint,.video-preview-trigger:focus-visible .video-preview-hint{opacity:1;transform:translateY(0)}.md .video-inline{max-width:100%;box-shadow:0 2px 8px hsl(var(--foreground) / .1),0 0 0 1px hsl(var(--border));border-radius:12px;margin:0 0 .7em}.video-viewer-backdrop{z-index:90;-webkit-backdrop-filter:blur(16px)saturate(.85);backdrop-filter:blur(16px)saturate(.85);background:#131316c7;place-items:center;padding:28px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.video-viewer{border:1px solid hsl(var(--foreground) / .15);background:hsl(var(--background));border-radius:18px;flex-direction:column;width:min(1080px,94vw);max-height:min(880px,90vh);display:flex;overflow:hidden;box-shadow:0 32px 100px #07070885}.video-viewer-header{background:hsl(var(--muted) / .3);border-bottom:1px solid hsl(var(--border));justify-content:space-between;align-items:center;min-height:56px;padding:10px 16px;display:flex}.video-viewer-title{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;max-width:70%;font-weight:500;overflow:hidden}.video-viewer-nav{gap:6px;display:flex}.video-viewer-download,.video-viewer-close{width:36px;height:36px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;border-radius:9px;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.video-viewer-download:hover,.video-viewer-close:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.video-viewer-download svg,.video-viewer-close svg{width:17px;height:17px}.video-viewer-body{background:#161618;flex:1;place-items:center;min-height:0;padding:20px;display:grid;overflow:hidden}.video-viewer-body .video-fullscreen{background:#000;border-radius:12px;max-width:100%;max-height:calc(90vh - 96px);box-shadow:0 4px 20px #0006}@media (max-width:640px){.md .video-preview-trigger{max-width:100%}.video-viewer-backdrop{padding:0}.video-viewer{border:none;border-radius:0;width:100vw;max-height:100vh}.video-viewer-body .video-fullscreen{border-radius:0;max-height:calc(100vh - 96px)}}.turn--user .md code,.turn--user .md pre{background:hsl(var(--background) / .55)}.block-thinking,.block-progress,.block-tool,.block-plan{align-self:stretch;width:100%;min-width:0}.think-head,.tool-head{color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;background:0 0;border:none;align-items:center;display:inline-flex}.think-head{gap:8px;min-height:32px;padding:3px 7px 3px 3px}.progress-head{cursor:default}.think-icon{flex:0 0 20px;place-items:center;width:20px;height:26px;display:grid}.think-icon>svg{width:14px;height:15px}.thinking-logo{color:hsl(var(--foreground));opacity:.56;transform-origin:50%}.thinking-logo.is-active{animation:1.6s ease-in-out infinite thinking-logo-breathe}@keyframes thinking-logo-breathe{0%,to{opacity:.42;transform:scale(.97)}50%{opacity:.72;transform:scale(1.02)}}@media (prefers-reduced-motion:reduce){.thinking-logo.is-active{opacity:.56;animation:none;transform:none}}.chev{opacity:.58;flex:0 0 13px;width:13px;height:13px;transition:transform .18s}.chev.open{transform:rotate(90deg)}.think-label{font-size:14.5px;font-weight:400;line-height:1.35}.think-label--done{color:hsl(var(--muted-foreground))}.tool-head{color:hsl(var(--muted-foreground));transition:color .12s}.tool-head:hover{color:hsl(var(--foreground))}.tool-head--generic{gap:8px;min-height:32px;padding:3px 7px 3px 3px}.tool-name{color:inherit;font-size:14.5px;font-weight:400;line-height:1.35}.tool-icon{flex:0 0 20px;place-items:center;width:20px;height:26px;display:grid}.tool-icon>svg{width:18px;height:18px}.tool-icon--generic{color:hsl(var(--muted-foreground))}.block-tool[data-status=failed] .tool-head--generic{color:hsl(var(--destructive))}.tool-chevron{opacity:.58;flex:0 0 13px;width:13px;height:13px;transition:transform .18s}.tool-chevron.is-open{transform:rotate(90deg)}.tool-detail{flex-direction:column;gap:8px;margin:6px 0 4px;padding-left:3px;display:flex}.tool-section-label{text-transform:uppercase;letter-spacing:.04em;color:hsl(var(--muted-foreground));margin-bottom:4px;font-size:11px}.tool-result{max-height:240px;overflow:auto}.studio-tool-artifacts{flex-wrap:wrap;gap:6px;display:flex}.studio-tool-artifacts a{border:1px solid hsl(var(--border));min-height:28px;color:hsl(var(--foreground));border-radius:7px;align-items:center;padding:4px 9px;font-size:12px;text-decoration:none;display:inline-flex}.studio-tool-artifacts a:hover{border-color:hsl(var(--primary) / .45);background:hsl(var(--primary) / .05);color:hsl(var(--primary))}.plan-head{min-width:0;min-height:32px;color:hsl(var(--muted-foreground));font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:8px;padding:3px 7px 3px 3px;display:flex}.plan-head:not(:disabled):hover{color:hsl(var(--foreground))}.plan-head:disabled{cursor:default}.plan-icon{flex:0 0 20px;place-items:center;width:20px;height:26px;display:grid}.plan-icon>svg{width:18px;height:18px}.plan-title{overflow-wrap:anywhere;min-width:0;font-size:14.5px;font-weight:400;line-height:1.35}.plan-summary{color:hsl(var(--muted-foreground));flex:none;font-size:11.5px;line-height:1.4}.plan-chevron{opacity:.58;flex:0 0 13px;width:13px;height:13px;transition:transform .18s}.plan-chevron.is-open{transform:rotate(90deg)}.plan-items{gap:6px;margin:5px 0 6px 31px;padding:0;list-style:none;display:grid}.plan-items li{min-width:0;color:hsl(var(--muted-foreground));grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:8px;display:grid}.plan-item-marker{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:50%;width:7px;height:7px}.plan-items li[data-status=in_progress] .plan-item-marker{border-color:hsl(var(--ring));box-shadow:0 0 0 3px hsl(var(--ring) / .1)}.plan-items li[data-status=completed] .plan-item-marker{border-color:hsl(var(--foreground) / .45);background:hsl(var(--foreground) / .45)}.plan-items li[data-status=failed] .plan-item-marker{border-color:hsl(var(--destructive));background:hsl(var(--destructive))}.plan-item-text{overflow-wrap:anywhere;min-width:0;font-size:13px;line-height:1.5}.plan-items small{color:inherit;font-size:11px;line-height:1.4}.plan-items li[data-status=failed]{color:hsl(var(--destructive))}.think-collapse{grid-template-rows:0fr;transition:grid-template-rows .28s;display:grid}.think-collapse.open{grid-template-rows:1fr}.think-collapse-inner{width:100%;min-width:0;overflow:hidden}.think-body{width:100%;min-width:0;color:hsl(var(--muted-foreground));white-space:pre-wrap;border-left:0;max-height:220px;margin:0;padding:0;font-size:14px;line-height:1.7;overflow-y:auto}.tool-args{background:hsl(var(--muted));white-space:pre-wrap;border-radius:6px;margin:0;padding:8px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;overflow-x:auto}.turn-meta{color:hsl(var(--muted-foreground));opacity:0;align-items:center;gap:10px;margin-top:2px;font-size:12px;transition:opacity .15s;display:flex}.turn-empty{color:hsl(var(--muted-foreground));margin-top:2px;font-size:13px;font-style:italic}.auth-card{border:1px solid hsl(var(--border));background:hsl(var(--card));border-radius:12px;width:100%;max-width:640px;margin:2px 0;padding:18px 20px}.auth-card-head{align-items:center;gap:8px;margin-bottom:6px;display:flex}.auth-card-icon{color:#f59f0a;width:18px;height:18px}.auth-card-icon--done{color:#1eae53}.auth-card-collapsed{border:1px solid hsl(var(--border));background:hsl(var(--card));color:hsl(var(--muted-foreground));border-radius:9px;align-items:center;gap:7px;margin:2px 0;padding:6px 12px;font-size:13px;font-weight:500;display:inline-flex}.auth-card-code{background:hsl(var(--muted));color:hsl(var(--foreground));word-break:break-all;border-radius:5px;padding:1px 6px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.auth-card-title{font-size:14px;font-weight:600}.auth-card-desc{color:hsl(var(--muted-foreground));margin:0 0 14px;font-size:13px;line-height:1.6}.auth-card-btn{background:hsl(var(--primary));color:hsl(var(--primary-foreground));font:inherit;cursor:pointer;border:none;border-radius:9px;align-items:center;gap:7px;padding:8px 16px;font-size:13px;font-weight:600;transition:opacity .12s;display:inline-flex}.auth-card-btn:hover:not(:disabled){opacity:.88}.auth-card-btn:disabled{opacity:.55;cursor:default}.auth-card-btn .cw-i{width:15px;height:15px}.auth-card-done{color:#1eae53;align-items:center;gap:6px;font-size:13px;font-weight:500;display:inline-flex}.auth-card-done .cw-i{width:16px;height:16px}.auth-card-err{color:hsl(var(--destructive));margin-top:8px;font-size:12px}.artifact-list{gap:8px;width:min(100%,440px);margin:6px 0;display:grid}.artifact-card{width:100%;color:hsl(var(--foreground));text-align:left;background:#f5f9ff;border:1px solid #d1e1fa;border-radius:12px;align-items:center;gap:12px;padding:12px 14px;display:flex}.artifact-card__icon{color:#2371e7;background:#d8e7fd;border-radius:10px;flex:none;justify-content:center;align-items:center;width:36px;height:36px;display:inline-flex}.artifact-card__icon svg{width:18px;height:18px}.artifact-card__copy{flex:auto;gap:3px;min-width:0;display:grid}.artifact-card__name{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600;overflow:hidden}.artifact-card__hint{color:hsl(var(--muted-foreground));font-size:12px}.artifact-card__actions{flex:none;gap:6px;margin-left:auto;display:flex}.artifact-card__action{background:hsl(var(--background));color:#315b9b;white-space:nowrap;cursor:pointer;border:1px solid #becde4;border-radius:8px;flex:none;align-items:center;gap:5px;min-height:30px;padding:0 10px;font-size:12px;font-weight:600;display:inline-flex}.artifact-card__action:hover:not(:disabled){background:#ebf3ff}.artifact-card__action:disabled{cursor:default;opacity:.55}.artifact-card__action svg{width:14px;height:14px}.artifact-card__action--primary{color:#fff;background:#2c77e8;border-color:#3e81e5}.artifact-card__action--primary:hover:not(:disabled){background:#1867dc}.artifact-card__error{color:hsl(var(--destructive));font-size:12px}.delivery-card{border:1px solid hsl(var(--border));background:hsl(var(--panel));width:min(100%,560px);color:hsl(var(--foreground));border-radius:12px;gap:12px;margin:8px 0;padding:16px;display:grid}.delivery-card-header{align-items:center;gap:10px;display:flex}.delivery-card-header>div{gap:2px;display:grid}.delivery-card-header strong{font-size:14px}.delivery-card-header span{color:hsl(var(--muted-foreground));font-size:12px}.delivery-card-icon{background:hsl(var(--secondary));width:36px;height:36px;color:hsl(var(--primary));border-radius:10px;place-items:center;display:inline-grid}.delivery-card-icon svg{width:18px;height:18px}.delivery-card.is-unverified .delivery-card-icon{color:hsl(var(--muted-foreground))}.delivery-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin:0;display:grid}.delivery-card-grid div{min-width:0}.delivery-card-grid dt{color:hsl(var(--muted-foreground));font-size:11px}.delivery-card-grid dd{text-overflow:ellipsis;white-space:nowrap;margin:2px 0 0;font-size:12px;overflow:hidden}.delivery-card-gates{color:hsl(var(--muted-foreground));margin:0;font-size:12px}.delivery-card-guidance{color:hsl(var(--muted-foreground));margin:0;font-size:12px;line-height:1.55}.delivery-card-actions{flex-wrap:wrap;gap:8px;display:flex}.delivery-card-actions button{border:1px solid hsl(var(--primary));background:hsl(var(--primary));min-height:34px;color:hsl(var(--primary-foreground));font:inherit;cursor:pointer;border-radius:8px;justify-content:center;align-items:center;gap:6px;padding:0 14px;font-size:12px;font-weight:600;display:inline-flex}.delivery-card-actions button svg{width:14px;height:14px}.delivery-card-actions .delivery-card-secondary{border-color:hsl(var(--border));background:hsl(var(--background));color:hsl(var(--foreground))}.delivery-card-actions button:disabled{cursor:not-allowed;opacity:.5}.delivery-card-actions button:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.delivery-card-error{color:hsl(var(--destructive));margin:0;font-size:12px}.delivery-card-status{color:#277c46;margin:0;font-size:12px}.trusted-source-pane{color:hsl(var(--foreground));gap:14px;padding:22px;display:grid}.trusted-source-pane h2,.trusted-source-pane p,.trusted-source-pane dl{margin:0}.trusted-source-pane__badge{background:hsl(var(--secondary));color:hsl(var(--primary));border-radius:999px;justify-self:start;padding:4px 8px;font-size:11px;font-weight:600}.trusted-source-pane__runtime-name{gap:6px;display:grid}.trusted-source-pane__runtime-name span{color:hsl(var(--muted-foreground));font-size:12px}.trusted-source-pane__runtime-name input{border:1px solid hsl(var(--border));background:hsl(var(--background));min-height:36px;color:hsl(var(--foreground));font:inherit;border-radius:8px;outline:none;padding:0 10px;font-size:13px}.trusted-source-pane__runtime-name input:focus{border-color:hsl(var(--ring));box-shadow:0 0 0 2px hsl(var(--ring) / .12)}.trusted-source-pane dl{gap:9px;display:grid}.trusted-source-pane dl div{justify-content:space-between;gap:12px;display:flex}.trusted-source-pane dt{color:hsl(var(--muted-foreground));font-size:12px}.trusted-source-pane dd{text-overflow:ellipsis;margin:0;font-size:12px;overflow:hidden}.trusted-source-pane p{color:hsl(var(--muted-foreground));font-size:12px;line-height:1.6}@media (max-width:640px){.delivery-card-grid{grid-template-columns:minmax(0,1fr)}.delivery-card-actions{grid-template-columns:minmax(0,1fr);display:grid}.delivery-card-actions button{width:100%}}.artifact-preview{z-index:1200;place-items:center;padding:28px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.artifact-preview__backdrop{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);cursor:default;background:#0b182b94;border:0;position:absolute;top:0;right:0;bottom:0;left:0}.artifact-preview__panel{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:16px;grid-template-rows:auto minmax(0,1fr);width:min(1120px,92vw);max-height:90vh;display:grid;position:relative;overflow:hidden;box-shadow:0 26px 80px #0b182b4d}.artifact-preview__header{border-bottom:1px solid hsl(var(--border));justify-content:space-between;align-items:center;gap:16px;min-height:52px;padding:0 16px 0 20px;font-size:14px;font-weight:600;display:flex}.artifact-preview__header button{width:32px;height:32px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:8px;justify-content:center;align-items:center;display:inline-flex}.artifact-preview__header button:hover{background:hsl(var(--muted))}.artifact-preview__header svg{width:17px;height:17px}.artifact-preview__canvas{background:#eceff3;min-height:0;padding:18px;overflow:auto}.artifact-preview__canvas img{border-radius:8px;width:100%;height:auto;display:block;box-shadow:0 6px 24px #0b182b29}.turn-actions{align-items:center;gap:2px;display:inline-flex}.turn-actions--right{opacity:0;align-self:flex-end;margin-top:2px;transition:opacity .15s}.turn--assistant:hover .turn-meta,.turn--user:hover .turn-actions--right{opacity:1}.icon-btn{width:28px;height:28px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;transition:background .12s,color .12s;display:inline-flex}.icon-btn:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.icon-btn:disabled{opacity:.35;cursor:default}.icon-btn:disabled:hover{color:hsl(var(--muted-foreground));background:0 0}.icon-btn .icon{width:15px;height:15px}.feedback-btn:hover,.feedback-btn--good,.feedback-btn--bad,.feedback-btn--good:hover,.feedback-btn--bad:hover{color:hsl(var(--foreground));background:0 0}.feedback-btn[aria-busy=true]{opacity:1}.feedback-btn--good[aria-busy=true]:hover,.feedback-btn--bad[aria-busy=true]:hover{color:hsl(var(--foreground))}.feedback-btn .icon{width:18px;height:18px}.meta-text{white-space:nowrap;color:hsl(var(--muted-foreground));font-size:12px}.turn-actions--right{gap:6px}.drawer-scrim{background:hsl(var(--foreground) / .2);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:40;animation:.2s fade;position:fixed;top:0;right:0;bottom:0;left:0}@keyframes fade{0%{opacity:0}to{opacity:1}}.drawer{background:hsl(var(--background));border-left:1px solid hsl(var(--border));width:min(560px,92vw);box-shadow:-12px 0 40px hsl(var(--foreground) / .14);z-index:41;flex-direction:column;animation:.24s cubic-bezier(.22,1,.36,1) slidein;display:flex;position:fixed;top:0;bottom:0;right:0}@keyframes slidein{0%{transform:translate(100%)}to{transform:translate(0)}}.drawer-head{border-bottom:1px solid hsl(var(--border));background:hsl(var(--canvas));justify-content:space-between;align-items:center;padding:15px 18px;display:flex}.drawer-title{letter-spacing:-.01em;font-size:15px;font-weight:650}.drawer-sub{color:hsl(var(--muted-foreground));font-variant-numeric:tabular-nums;margin-top:3px;font-size:12px}.drawer-close{cursor:pointer;color:hsl(var(--muted-foreground));background:0 0;border:none;border-radius:6px;padding:6px;display:flex}.drawer-close:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.drawer-body{flex:1;padding:16px 18px;overflow:auto}.drawer-loading,.drawer-empty{color:hsl(var(--muted-foreground));align-items:center;gap:8px;font-size:14px;display:flex}.drawer-loading{flex:1;justify-content:center;padding:24px}.drawer-empty{padding:20px 0}.trace-state{text-align:center;flex-wrap:wrap;flex:1;justify-content:center;padding:24px 18px}.drawer--trace{width:min(1080px,96vw)}.trace-split{flex:1;min-height:0;display:flex}.trace-tree{border-right:1px solid hsl(var(--border));flex:1.25;min-width:0;padding:8px 6px;overflow:auto}.trace-row{cursor:pointer;width:100%;font:inherit;text-align:left;background:0 0;border:none;border-radius:6px;align-items:center;gap:10px;padding:5px 8px;transition:background .1s;display:flex}.trace-row:hover{background:hsl(var(--foreground) / .04)}.trace-row.active{background:hsl(var(--primary) / .07);box-shadow:inset 2px 0 hsl(var(--primary) / .55)}.trace-label{flex:1;align-items:center;gap:6px;min-width:0;display:flex}.trace-caret{width:16px;height:16px;color:hsl(var(--muted-foreground));flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.trace-caret.hidden{visibility:hidden}.trace-caret .chev{width:13px;height:13px;transition:transform .18s}.trace-caret.open .chev{transform:rotate(90deg)}.trace-dot{border-radius:50%;flex-shrink:0;width:8px;height:8px}.trace-name{white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.trace-dur{text-align:right;width:66px;color:hsl(var(--muted-foreground));font-variant-numeric:tabular-nums;flex-shrink:0;font-size:11px}.trace-track{background:hsl(var(--foreground) / .05);border-radius:5px;flex:0 0 34%;height:16px;position:relative}.trace-bar{opacity:.9;border-radius:4px;min-width:3px;height:8px;position:absolute;top:4px}.trace-detail{flex:1;min-width:0;padding:18px 20px;overflow:auto}.td-title{letter-spacing:-.01em;word-break:break-all;font-size:15px;font-weight:600}.td-dur{color:hsl(var(--muted-foreground));font-variant-numeric:tabular-nums;align-items:center;gap:7px;margin-top:4px;font-size:12px;display:flex}.td-dot{border-radius:50%;width:8px;height:8px}.td-section{letter-spacing:.01em;color:hsl(var(--foreground));margin:22px 0 9px;font-size:12px;font-weight:650}.td-props{flex-direction:column;display:flex}.td-prop{border-bottom:1px solid hsl(var(--border));gap:16px;padding:7px 0;font-size:13px;display:flex}.td-key{color:hsl(var(--muted-foreground));flex-shrink:0;min-width:140px}.td-val{text-align:right;word-break:break-word;font-variant-numeric:tabular-nums;flex:1;min-width:0}.td-pre{background:hsl(var(--canvas));border:1px solid hsl(var(--border));white-space:pre-wrap;word-break:break-word;border-radius:8px;max-height:320px;margin:0;padding:11px 13px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.55;overflow:auto}.composer{width:100%;max-width:768px;margin:0 auto;padding:6px 16px 18px}.conversation-composer-slot{padding:6px 16px 18px}.conversation-composer-slot>.composer-slot>.composer{padding:0}.composer--new-chat{position:relative}.composer-box{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:26px;align-items:flex-end;gap:6px;padding:6px 6px 6px 8px;display:flex;position:relative}.composer--new-chat .composer-box{z-index:2;border-color:hsl(var(--border) / .55);border-radius:16px;min-height:136px;padding:10px;display:block;box-shadow:0 8px 32px #00000007,0 24px 72px 8px #00000005}.composer-input-stack{flex-direction:column;flex:1;min-width:0;display:flex;position:relative}.composer-input-stack .comp-input{width:100%}.composer--new-chat .composer-input-stack{min-height:114px}.composer--new-chat .comp-input{min-height:76px;padding:4px 10px}.composer--new-chat .comp-input::placeholder{color:#0000}.composer-placeholder-reveal{z-index:1;width:max-content;max-width:calc(100% - 20px);color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;pointer-events:none;font-size:15px;line-height:1.5;position:absolute;top:4px;left:10px;overflow:hidden}.composer--new-chat .composer-menu-wrap{z-index:5;height:36px;position:absolute;bottom:10px;left:10px}.composer--new-chat .new-chat-mode{align-items:center;min-height:36px;display:flex;position:absolute;bottom:10px;left:52px}.composer--new-chat.composer--has-task .new-chat-mode{left:138px}.composer--new-chat.composer--task-image .new-chat-mode,.composer--new-chat.composer--task-video .new-chat-mode{left:176px}.new-chat-task-chip{z-index:2;color:#7a5bae;width:78px;height:36px;font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:999px;justify-content:center;align-items:center;gap:7px;padding:0 10px;font-size:15px;line-height:1;transition:background .15s,transform .15s;display:inline-flex;position:absolute;bottom:10px;left:52px}.new-chat-task-chip--image,.new-chat-task-chip--video{width:116px}.new-chat-task-chip>span:last-child{white-space:nowrap;flex:none}.new-chat-task-chip:hover,.new-chat-task-chip:focus-visible{background:#f4f1f8;outline:none}.new-chat-task-chip:active{transform:scale(.97)}.new-chat-task-chip:disabled{cursor:default;opacity:.5}.new-chat-task-chip__icon{border-radius:50%;flex:0 0 20px;place-items:center;width:20px;height:20px;display:grid;position:relative}.new-chat-task-chip__task-icon,.new-chat-task-chip__remove-icon{width:18px;height:18px;transition:opacity .12s,transform .15s;position:absolute}.new-chat-task-chip__remove-icon{color:#fff;opacity:0;box-sizing:content-box;background:#896bbd;border-radius:50%;width:12px;height:12px;padding:3px;transform:scale(.72)}.new-chat-task-chip:hover .new-chat-task-chip__task-icon,.new-chat-task-chip:focus-visible .new-chat-task-chip__task-icon{opacity:0;transform:scale(.72)}.new-chat-task-chip:hover .new-chat-task-chip__remove-icon,.new-chat-task-chip:focus-visible .new-chat-task-chip__remove-icon{opacity:1;transform:scale(1)}.composer--new-chat .comp-send{position:absolute;bottom:10px;right:10px}.composer--new-chat .comp-send .icon{width:20px;height:20px}.task-shortcuts{z-index:1;flex-wrap:wrap;justify-content:center;gap:10px;width:100%;display:flex;position:absolute;top:calc(100% + 18px);left:0}.task-shortcut{border:1px solid hsl(var(--border) / .72);background:hsl(var(--background));min-width:92px;height:40px;color:hsl(var(--muted-foreground));font:inherit;white-space:nowrap;cursor:pointer;opacity:0;border-radius:999px;flex:none;justify-content:center;align-items:center;gap:8px;padding:0 18px;font-size:13px;line-height:1;transition:border-color .14s,background .14s,color .14s,transform .14s;animation:.32s cubic-bezier(.22,1,.36,1) forwards task-shortcut-enter;display:inline-flex;transform:translateY(6px)}.task-shortcut>span{white-space:nowrap}.task-shortcut:nth-child(2){animation-delay:45ms}.task-shortcut:nth-child(3){animation-delay:90ms}.task-shortcut:nth-child(4){animation-delay:.135s}.task-shortcut:hover{color:#7454ab;background:#f6f5fa;border-color:#8970b257;transform:translateY(-1px)}.task-shortcut:focus-visible{outline-offset:2px;outline:2px solid #8970b257}.task-shortcut:disabled{cursor:not-allowed;opacity:.5}.task-shortcut>svg{stroke:currentColor;flex:none;width:18px;height:18px}.prompt-suggestions{z-index:1;gap:3px;width:100%;display:grid;position:absolute;top:calc(100% + 18px);left:0}.prompt-suggestion{width:100%;min-height:46px;color:hsl(var(--muted-foreground));font:inherit;text-align:left;cursor:pointer;opacity:0;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:8px 14px;font-size:15px;line-height:1.5;transition:background .14s,color .14s,transform .14s;animation:.44s cubic-bezier(.22,1,.36,1) forwards prompt-suggestion-enter;display:flex;transform:translateY(10px)}.prompt-suggestion:nth-child(2){animation-delay:65ms}.prompt-suggestion:nth-child(3){animation-delay:.13s}.prompt-suggestion:nth-child(4){animation-delay:.195s}.prompt-suggestion:hover{background:hsl(var(--foreground) / .025);color:hsl(var(--foreground))}.prompt-suggestion:focus-visible{outline:2px solid hsl(var(--primary) / .42);outline-offset:-2px}.prompt-suggestion:disabled{cursor:not-allowed;opacity:.5}.prompt-suggestion>svg{stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.35px;transform-origin:50%;flex:none;width:18px;height:18px;transition:transform .22s cubic-bezier(.22,1,.36,1)}.prompt-suggestion>span{white-space:nowrap;text-overflow:ellipsis;min-width:0;max-height:1.5em;transition:max-height .22s cubic-bezier(.22,1,.36,1);display:block;overflow:hidden}.prompt-suggestion:hover>span,.prompt-suggestion:focus-visible>span{white-space:normal;text-overflow:clip;max-height:4.5em}.prompt-suggestion:first-child:hover>svg{transform:rotate(-8deg)scale(1.06)}.prompt-suggestion:nth-child(2):hover>svg{transform:rotate(6deg)scale(1.07)}.prompt-suggestion:nth-child(3):hover>svg{transform:rotate(-5deg)scale(1.06)}.prompt-suggestion:nth-child(4):hover>svg{transform:rotate(5deg)scale(1.06)}@keyframes prompt-suggestion-enter{to{opacity:1;transform:translateY(0)}}@keyframes task-shortcut-enter{to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.task-shortcut,.prompt-suggestion,.new-chat-task-chip,.new-chat-task-chip__task-icon,.new-chat-task-chip__remove-icon{opacity:1;transition:none;animation:none;transform:none}.prompt-suggestion>svg,.prompt-suggestion>span{transition:none}.prompt-suggestion:hover>svg{transform:none}}.composer-meta{min-width:0;color:hsl(var(--muted-foreground));justify-content:center;align-items:center;gap:8px;padding:7px 12px 0;font-size:11px;line-height:1.4;display:flex}.composer-session-line{white-space:nowrap;align-items:center;gap:4px;min-width:0;display:flex}.composer-session-id{text-overflow:ellipsis;max-width:300px;font-family:inherit;overflow:hidden}.composer-session-copy{width:18px;height:18px;color:inherit;cursor:pointer;opacity:.72;background:0 0;border:0;border-radius:4px;flex:0 0 18px;place-items:center;padding:0;transition:background .12s,color .12s,opacity .12s;display:inline-grid}.composer-session-copy:hover{background:hsl(var(--foreground) / .06);color:hsl(var(--foreground));opacity:1}.composer-session-copy svg{width:11px;height:11px}.composer-meta-separator{opacity:.55}.composer-runtime-logs{min-height:22px;color:inherit;font:inherit;cursor:pointer;background:0 0;border:0;border-radius:4px;align-items:center;gap:5px;padding:0 3px;transition:background .12s,color .12s;display:inline-flex}.composer-runtime-logs:hover{background:hsl(var(--foreground) / .05);color:hsl(var(--foreground))}.composer-runtime-logs:active{background:hsl(var(--foreground) / .09)}.composer-runtime-logs:focus-visible{outline:2px solid hsl(var(--primary) / .45);outline-offset:1px}.composer-runtime-logs svg{flex:none;width:13px;height:13px}@media (max-width:640px){.composer-meta{flex-wrap:wrap;gap:4px 8px}.composer-session-line{max-width:100%}.composer-session-id{max-width:min(220px,52vw)}}.comp-input{resize:none;color:hsl(var(--foreground));font:inherit;background:0 0;border:none;outline:none;flex:1;max-height:200px;padding:8px 4px;font-size:15px;line-height:1.5;overflow-y:auto}.comp-input::placeholder{color:hsl(var(--muted-foreground))}.comp-icon{width:36px;height:36px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;transition:background .12s,color .12s;display:flex}.comp-icon:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.composer-submit-actions{flex-shrink:0;align-items:center;gap:6px;height:36px;display:flex}.composer--new-chat .composer-submit-actions{display:contents}.comp-send{background:hsl(var(--primary));width:36px;height:36px;color:hsl(var(--primary-foreground));cursor:pointer;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;transition:opacity .15s,transform .1s;display:flex}.comp-send .icon{width:20px;height:20px}.comp-send:hover:not(:disabled){opacity:.85}.comp-send:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:2px}.comp-send:active:not(:disabled){transform:scale(.94)}.comp-send:disabled{opacity:.3;cursor:default}.token-usage-indicator{z-index:3;width:28px;height:28px;color:hsl(var(--muted-foreground));cursor:default;border-radius:999px;outline:none;flex:0 0 28px;place-items:center;transition:background-color .14s,color .14s;display:grid;position:relative}.token-usage-indicator:hover{background:hsl(var(--muted) / .72);color:hsl(var(--foreground) / .68)}.token-usage-indicator:focus-visible{color:hsl(var(--foreground) / .68);outline:2px solid hsl(var(--ring) / .45);outline-offset:1px}.token-usage-ring{width:16px;height:16px;overflow:visible}.token-usage-ring__track,.token-usage-ring__value{fill:none;transform-origin:50%;transform:rotate(-90deg)}.token-usage-ring__track{stroke:hsl(var(--muted-foreground) / .3);stroke-width:2.25px}.token-usage-ring__value{stroke:currentColor;stroke-width:2.75px;stroke-linecap:butt;transition:stroke-dasharray .18s ease-out}.token-usage-tooltip{--token-context-system:#4e545f;--token-context-input:#5685b3;--token-context-output:#c48945;--token-context-remaining:hsl(var(--muted));z-index:30;border:1px solid hsl(var(--border));background:hsl(var(--panel));width:360px;box-shadow:0 10px 30px hsl(var(--foreground) / .12);color:hsl(var(--foreground));text-align:left;visibility:hidden;opacity:0;pointer-events:none;border-radius:12px;padding:12px 14px;font-size:12px;font-weight:400;line-height:1.5;transition:visibility 0s linear .14s,opacity .14s,transform .14s;position:absolute;bottom:calc(100% + 10px);right:-42px;transform:translateY(4px)}.token-usage-indicator:hover .token-usage-tooltip,.token-usage-indicator:focus-visible .token-usage-tooltip{visibility:visible;opacity:1;transition-delay:0s;transform:translateY(0)}.token-usage-tooltip__header{justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:10px;display:flex}.token-usage-tooltip__header strong{font-size:13px;font-weight:600}.token-usage-tooltip__header span{color:hsl(var(--muted-foreground));font-size:11.5px;font-weight:500}.token-usage-tooltip__title{color:hsl(var(--muted-foreground));margin-bottom:4px;font-size:11.5px;font-weight:500}.token-usage-tooltip__unknown{font-size:13px;font-weight:550}.token-context-grid{background:hsl(var(--muted) / .34);border-radius:9px;grid-template-columns:repeat(10,10px);align-self:start;gap:4px;padding:10px;display:grid}.token-context-breakdown{grid-template-columns:max-content minmax(0,1fr);align-items:start;gap:16px;display:grid}.token-context-cell{background:var(--token-context-remaining);width:10px;height:10px;box-shadow:inset 0 0 0 1px hsl(var(--border) / .72);border-radius:2px;display:flex;overflow:hidden}.token-context-cell__slice{min-width:0;height:100%}.token-context-cell__slice.is-system,.token-context-swatch.is-system{background:var(--token-context-system)}.token-context-cell__slice.is-input,.token-context-swatch.is-input{background:var(--token-context-input)}.token-context-cell__slice.is-output,.token-context-swatch.is-output{background:var(--token-context-output)}.token-context-cell__slice.is-remaining,.token-context-swatch.is-remaining{background:var(--token-context-remaining)}.token-context-legend{gap:9px;margin:0;padding:6px 0;display:grid}.token-context-legend>div{justify-content:space-between;align-items:center;gap:6px;min-width:0;display:flex}.token-context-legend dt{min-width:0;color:hsl(var(--muted-foreground));white-space:nowrap;align-items:center;gap:5px;display:flex}.token-context-legend dd{white-space:nowrap;margin:0;font-weight:550}.token-context-legend em{background:hsl(var(--muted));border-radius:999px;padding:1px 4px;font-size:9.5px;font-style:normal;font-weight:500;line-height:1.35}.token-context-summary{border-top:1px solid hsl(var(--border));color:hsl(var(--muted-foreground));gap:2px;margin-top:12px;padding-top:10px;font-size:11.5px;display:grid}.token-context-summary strong{color:hsl(var(--foreground));font-weight:600}.token-context-swatch{width:8px;height:8px;box-shadow:inset 0 0 0 1px hsl(var(--border) / .72);border-radius:2px;flex:0 0 8px}.token-usage-tooltip__overflow{color:hsl(var(--destructive));margin-top:9px;font-size:11px;font-weight:500}.token-usage-tooltip__model{border-top:1px solid hsl(var(--border));color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;margin-top:10px;padding-top:8px;font-size:11px;overflow:hidden}@media (prefers-reduced-motion:reduce){.token-usage-indicator,.token-usage-ring__value,.token-usage-tooltip{transition:none}}.invocation-chips{flex-wrap:wrap;gap:6px;min-width:0;display:flex}.composer>.invocation-chips{padding:0 8px 8px}.turn--user>.invocation-chips{justify-content:flex-end;margin-bottom:6px}.invocation-chip{border:1px solid hsl(var(--border));background:hsl(var(--background));max-width:260px;min-height:28px;color:hsl(var(--foreground));box-shadow:0 1px 2px hsl(var(--foreground) / .025);border-radius:8px;align-items:center;gap:5px;padding:4px 8px;font-size:12px;font-weight:560;line-height:1.2;display:inline-flex}.invocation-chip--skill{color:#267848}.invocation-chip--agent{color:#2762b0}.invocation-chip>svg{flex:none;width:13px;height:13px}.invocation-chip>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.invocation-chip button{color:currentColor;cursor:pointer;opacity:.55;background:0 0;border:none;border-radius:5px;justify-content:center;align-items:center;width:17px;height:17px;margin:-1px -3px -1px 1px;padding:0;display:inline-flex}.invocation-chip button:hover{background:hsl(var(--accent));opacity:1}.invocation-chip button svg{width:11px;height:11px}.composer-command-menu{z-index:34;border:1px solid hsl(var(--border));background:hsl(var(--background));width:min(500px,100vw - 48px);box-shadow:0 2px 7px hsl(var(--foreground) / .08),0 22px 60px -24px hsl(var(--foreground) / .28);transform-origin:0 100%;border-radius:14px;animation:.13s ease-out command-menu-in;position:absolute;bottom:calc(100% + 10px);left:0;overflow:hidden}@keyframes command-menu-in{0%{opacity:0;transform:translateY(5px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}.composer-command-head{border-bottom:1px solid hsl(var(--border));height:38px;color:hsl(var(--muted-foreground));letter-spacing:.02em;align-items:center;gap:7px;padding:0 10px 0 12px;font-size:11px;font-weight:650;display:flex}.composer-command-head>svg{width:13px;height:13px}.composer-command-head>span{flex:1}.composer-command-menu kbd{border:1px solid hsl(var(--border));background:hsl(var(--canvas));min-width:22px;color:hsl(var(--muted-foreground));text-align:center;border-radius:5px;padding:2px 5px;font:10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}.composer-command-list{max-height:min(330px,42vh);padding:5px;display:grid;overflow-y:auto}.composer-command-item{width:100%;min-height:52px;color:hsl(var(--foreground));font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;border-radius:9px;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:9px;padding:6px 8px;display:grid}.composer-command-item.is-active{background:hsl(var(--accent))}.composer-command-icon{border-radius:9px;justify-content:center;align-items:center;width:34px;height:34px;display:inline-flex}.composer-command-icon--skill{color:#218349;background:#e7f8ee}.composer-command-icon--agent{color:#2664b5;background:#e9f1fc}.composer-command-icon svg{width:16px;height:16px}.composer-command-copy{gap:3px;min-width:0;display:grid}.composer-command-copy strong{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:620;line-height:1.2;overflow:hidden}.composer-command-copy>span{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.3;overflow:hidden}.composer-command-empty{min-height:68px;color:hsl(var(--muted-foreground));justify-content:center;align-items:center;gap:7px;padding:14px;font-size:12px;display:flex}.composer-command-empty svg{width:14px;height:14px}.composer-menu-wrap{flex-shrink:0;position:relative}.composer-menu{z-index:31;background:hsl(var(--background));border:1px solid hsl(var(--border));min-width:168px;box-shadow:0 6px 20px hsl(var(--foreground) / .12);border-radius:12px;margin-bottom:6px;padding:4px;position:absolute;bottom:100%;left:0}.media-grid{flex-wrap:wrap;gap:8px;max-width:min(620px,100%);display:flex}.turn--user .media-grid{justify-content:flex-end}.composer>.media-grid{justify-content:flex-start;padding:0 8px 9px}.media-card{border:1px solid hsl(var(--border));background:hsl(var(--background));width:272px;min-width:0;box-shadow:0 1px 2px hsl(var(--foreground) / .025);border-radius:14px;transition:border-color .16s,box-shadow .16s,transform .16s;position:relative;overflow:visible}.media-card:hover{border-color:hsl(var(--foreground) / .2);box-shadow:0 8px 28px -20px hsl(var(--foreground) / .28);transform:translateY(-1px)}.media-card--image{width:176px}.media-grid--compact .media-card{width:224px}.media-grid--compact .media-card--image{width:92px}.media-card-main{border-radius:inherit;width:100%;min-width:0;height:68px;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:11px;padding:10px 12px;display:flex}.media-card-main:disabled{cursor:default}.media-card--image .media-card-main{height:132px;padding:4px;display:block}.media-grid--compact .media-card-main{height:58px;padding:8px 10px}.media-grid--compact .media-card--image .media-card-main{height:72px;padding:3px}.media-card-image{object-fit:cover;background:hsl(var(--muted));border-radius:10px;width:100%;height:100%;display:block}.media-card--image .media-card-copy,.media-card--image .media-card-open{display:none}.media-card-icon{width:40px;height:44px;color:hsl(var(--muted-foreground));background:hsl(var(--muted));border-radius:9px;flex:none;justify-content:center;align-items:center;display:inline-flex}.media-card--pdf .media-card-icon{color:#db2a24;background:#fdeded}.media-card--video .media-card-icon{color:#226cd3;background:#edf3fd}.media-card--markdown .media-card-icon{color:#259353;background:#ebfaf1}.media-card-icon svg{width:21px;height:21px}.media-card-video-container{background:#131316;place-items:center;width:100%;height:100%;display:grid;position:relative;overflow:hidden}.media-card-video{object-fit:cover;opacity:.85;width:100%;height:100%}.media-card-video-play{color:#fff;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#0000008c;border-radius:50%;place-items:center;width:48px;height:48px;transition:transform .18s,background .18s;display:grid;position:absolute;transform:scale(1)}.media-card-video-play svg{width:20px;height:20px;margin-left:3px}.media-card-main:hover .media-card-video-play{background:#000000b3;transform:scale(1.08)}.media-card-copy{flex:1;gap:5px;min-width:0;display:grid}.media-card-name{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:560;line-height:1.2;overflow:hidden}.media-card-meta{min-width:0;color:hsl(var(--muted-foreground));align-items:center;gap:5px;font-size:11px;line-height:1.2;display:flex}.media-card-type{letter-spacing:.06em;font-size:9px;font-weight:700}.media-card-open{width:14px;height:14px;color:hsl(var(--muted-foreground));opacity:0;flex:none;transition:opacity .15s}.media-card:hover .media-card-open{opacity:1}.media-card-spinner{width:12px;height:12px;animation:.85s linear infinite spin}.media-card--error{border-color:hsl(var(--destructive) / .42)}.media-card--error .media-card-meta{color:hsl(var(--destructive))}.media-card-remove{z-index:2;border:1px solid hsl(var(--border));background:hsl(var(--background));width:21px;height:21px;color:hsl(var(--muted-foreground));box-shadow:0 2px 8px hsl(var(--foreground) / .12);cursor:pointer;border-radius:999px;justify-content:center;align-items:center;padding:0;display:inline-flex;position:absolute;top:-7px;right:-7px}.media-card-remove:hover{color:hsl(var(--foreground))}.media-card-remove svg{width:12px;height:12px}.media-viewer-backdrop{z-index:90;-webkit-backdrop-filter:blur(12px)saturate(.8);backdrop-filter:blur(12px)saturate(.8);background:#131316b8;place-items:center;padding:28px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.media-viewer{border:1px solid hsl(var(--foreground) / .13);background:hsl(var(--background));border-radius:18px;flex-direction:column;width:min(1080px,94vw);height:min(820px,90vh);display:flex;overflow:hidden;box-shadow:0 32px 100px #07070875}.media-viewer-header{border-bottom:1px solid hsl(var(--border));background:hsl(var(--background) / .94);justify-content:space-between;align-items:center;gap:18px;min-height:58px;padding:9px 12px 9px 18px;display:flex}.media-viewer-header>div{gap:2px;min-width:0;display:grid}.media-viewer-header strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:620;overflow:hidden}.media-viewer-header span{color:hsl(var(--muted-foreground));font-size:11px}.media-viewer-header nav{gap:4px;display:flex}.media-viewer-header a,.media-viewer-header button{width:36px;height:36px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;border-radius:9px;justify-content:center;align-items:center;padding:0;display:inline-flex}.media-viewer-header a:hover,.media-viewer-header button:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.media-viewer-header svg{width:17px;height:17px}.media-viewer-body{background:hsl(var(--canvas));flex:1;min-height:0;overflow:auto}.media-viewer-body--image,.media-viewer-body--video{background:#161618;place-items:center;padding:24px;display:grid}.media-viewer-body--image img,.media-viewer-body--video video{object-fit:contain;border-radius:8px;max-width:100%;max-height:100%}.media-viewer-video-wrapper{place-items:center;width:100%;display:grid}.media-viewer-video{background:#000;border-radius:12px;max-width:100%;max-height:calc(90vh - 140px);box-shadow:0 4px 20px #0006}.media-viewer-body--pdf iframe{background:#fff;border:none;width:100%;height:100%;display:block}.media-document{border:1px solid hsl(var(--border));background:hsl(var(--background));width:min(820px,100% - 48px);box-shadow:0 12px 38px -30px hsl(var(--foreground) / .3);border-radius:12px;margin:24px auto;padding:34px 40px}.media-document--plain{white-space:pre-wrap;word-break:break-word;min-height:calc(100% - 48px);font:13px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace}.media-viewer-loading{height:100%;color:hsl(var(--muted-foreground));justify-content:center;align-items:center;gap:8px;font-size:13px;display:flex}.media-viewer-loading svg{width:17px;height:17px;animation:.85s linear infinite spin}@media (max-width:640px){.composer-command-menu{width:auto;right:0}.media-card{width:min(272px,82vw)}.media-viewer-backdrop{padding:0}.media-viewer{border:none;border-radius:0;width:100vw;height:100vh}.media-document{width:calc(100% - 24px);margin:12px auto;padding:22px 18px}.md .image-preview-trigger{max-width:100%}}.a2ui-surface{width:100%;max-width:360px;font-size:14px}.a2ui-card{background:hsl(var(--card));border:1px solid hsl(var(--border));box-shadow:0 1px 2px hsl(var(--foreground) / .04),0 8px 24px -16px hsl(var(--foreground) / .18);border-radius:8px;padding:18px}.a2ui-column,.a2ui-row{gap:10px}.a2ui-text{color:hsl(var(--foreground));margin:0;line-height:1.5}.a2ui-text--h1{letter-spacing:0;font-size:19px;font-weight:650}.a2ui-text--h2{letter-spacing:0;font-size:16px;font-weight:650}.a2ui-text--h3{font-size:14px;font-weight:600}.a2ui-text--h4{color:hsl(var(--muted-foreground));text-transform:uppercase;letter-spacing:0;font-size:12px;font-weight:600}.a2ui-text--caption{color:hsl(var(--muted-foreground));font-size:12px}.a2ui-text--body{font-size:14px}.a2ui-icon{color:hsl(var(--muted-foreground));justify-content:center;align-items:center;font-size:15px;line-height:1;display:inline-flex}.a2ui-divider--h{background:hsl(var(--border));width:100%;height:1px;margin:4px 0}.a2ui-divider--v{background:hsl(var(--border));align-self:stretch;width:1px}.a2ui-button{background:hsl(var(--secondary));color:hsl(var(--secondary-foreground));cursor:pointer;font:inherit;border:1px solid #0000;border-radius:10px;padding:8px 14px;font-size:13px;font-weight:500;transition:background .15s,opacity .15s}.a2ui-button:hover{background:hsl(var(--accent))}.a2ui-button--primary{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.a2ui-button--primary:hover{background:hsl(var(--primary));opacity:.88}.a2ui-button--borderless{color:hsl(var(--foreground));background:0 0}.a2ui-button--borderless:hover{background:hsl(var(--accent))}.a2ui-surface[data-a2ui-surface^=flight-]{max-width:520px}.a2ui-surface[data-a2ui-surface^=flight-] .a2ui-card{background:linear-gradient(180deg,#f6fbfe,hsl(var(--card)) 42%),hsl(var(--card));box-shadow:0 1px 2px hsl(var(--foreground) / .05),0 18px 48px -28px #283d5359;border-color:#d7e0ea;padding:0;overflow:hidden}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-content]{gap:16px;padding:18px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-top]{gap:12px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-brand]{min-width:0}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-brand-icon]{color:#004fa3;background:#006fe61a;border-radius:999px;width:28px;height:28px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-title]{color:#41454e;white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-status-chip]{background:#e3f8ed;border:1px solid #bbe7d2;border-radius:999px;flex-shrink:0;gap:6px;padding:5px 9px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-status-chip] .a2ui-icon,.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-status-text]{color:#126e41}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-hero]{background:hsl(var(--background) / .88);border:1px solid #dde6ee;border-radius:8px;gap:16px;padding:18px;position:relative}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-origin],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-destination]{flex:1 1 0;gap:2px;min-width:0}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-origin-code],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-destination-code]{color:#191d24;font-size:34px;font-weight:760;line-height:1}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-origin-label],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-destination-label]{color:#717784;font-size:11px;font-weight:700}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-origin-city],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-destination-city]{color:#545964;font-size:13px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-route-mark]{flex:none;gap:3px;padding:0 4px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-route-icon]{color:#0054ad;background:#006fe61f;border-radius:999px;width:34px;height:34px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-duration],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-aircraft]{white-space:nowrap;font-size:11px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-times],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-details]{gap:10px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-departure-time],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-arrival-time],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-terminal],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-gate],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-boarding]{background:#f3f4f6;border:1px solid #e5e7eb;border-radius:8px;flex:1 1 0;gap:2px;min-width:0;padding:11px 12px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-departure-value],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-arrival-value]{font-size:14px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-departure-airport],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-arrival-airport]{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-terminal-value],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-gate-value],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-boarding-value]{font-size:20px;line-height:1.15}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-footer]{gap:10px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-divider]{background:#d9e0e8;margin:0}@media (max-width:520px){.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-content]{padding:14px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-hero],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-times],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-details]{flex-wrap:wrap}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-route-mark]{order:3;width:100%}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-terminal],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-gate],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-boarding]{min-width:120px}.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-origin-code],.a2ui-surface[data-a2ui-surface^=flight-] [data-a2ui-id=flight-destination-code]{font-size:34px}}.a2ui-fallback{background:hsl(var(--muted));border:1px solid hsl(var(--border));color:hsl(var(--muted-foreground));border-radius:10px;padding:8px 10px;font-size:12px}.a2ui-fallback pre{margin:6px 0 0;overflow-x:auto}.boot{background:hsl(var(--background));height:100vh}.boot-error{color:hsl(var(--foreground));flex-direction:column;justify-content:center;align-items:center;gap:12px;font-size:14px;display:flex}.boot-error p{margin:0}.boot-error button,.login-provider-error button{border:1px solid hsl(var(--border));background:hsl(var(--card));color:hsl(var(--foreground));font:inherit;cursor:pointer;border-radius:8px;padding:7px 18px;font-size:13px}.boot-error button:hover,.login-provider-error button:hover{background:hsl(var(--accent))}.navbar{background:0 0;flex:0 0 54px;justify-content:space-between;align-items:center;gap:16px;min-height:54px;padding:0 10px;display:flex}.navbar-left,.navbar-right,.navbar-default,.navbar-portal-slot,.navbar-portal-actions{align-items:center;display:flex}.navbar-left{flex:1;min-width:0;container-type:inline-size}.navbar-default{min-width:0}.navbar-title-group{align-items:center;gap:6px;min-width:0;display:flex}.loading-gap-spinner{box-sizing:border-box;border:1.5px solid #111;border-right-color:#0000;border-radius:50%;flex:0 0 16px;width:16px;height:16px;animation:.7s linear infinite loading-gap-spin;display:inline-block}@keyframes loading-gap-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.loading-gap-spinner{animation-duration:1.4s}}.agent-info-trigger{width:30px;height:30px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:7px;flex:0 0 30px;justify-content:center;align-items:center;padding:0;transition:background .15s,color .15s;display:inline-flex}.agent-info-trigger:hover,.agent-info-trigger[aria-expanded=true]{background:hsl(var(--foreground) / .06);color:hsl(var(--foreground))}.agent-info-trigger:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:1px}.agent-info-trigger svg{width:17px;height:17px}.navbar-right{flex:none;gap:10px;min-width:0}.navbar-portal-slot,.navbar-portal-actions{min-width:0}.navbar-portal-slot:empty,.navbar-portal-actions:empty,.navbar-left:has(.navbar-portal-slot:not(:empty))>.navbar-default{display:none}.global-deploy-center{z-index:38;position:relative}.global-deploy-task{border:1px solid hsl(var(--border));background:hsl(var(--background) / .82);max-width:300px;min-height:32px;color:hsl(var(--muted-foreground));font:inherit;white-space:nowrap;cursor:pointer;border-radius:7px;outline:none;align-items:center;gap:7px;padding:0 10px;font-size:12px;transition:border-color .12s,background-color .12s;display:flex}.global-deploy-task:hover{background:hsl(var(--background))}.global-deploy-task:focus-visible{border-color:hsl(var(--ring) / .32);box-shadow:0 0 0 2px hsl(var(--ring) / .07)}.global-deploy-task.is-idle{color:hsl(var(--muted-foreground))}.global-deploy-task.is-running{color:#1863b4;border-color:#0c77e93d}.global-deploy-task.is-success{color:#277c46;border-color:#279b5138}.global-deploy-task.is-error{border-color:hsl(var(--destructive) / .24);color:hsl(var(--destructive))}.global-deploy-task.is-cancelled{color:hsl(var(--muted-foreground))}.global-deploy-task-icon{flex:none;width:14px;height:14px}.global-deploy-task-detail{text-overflow:ellipsis;overflow:hidden}.global-deploy-task-chevron{flex:none;width:13px;height:13px;transition:transform .14s}.global-deploy-task-chevron.is-open{transform:rotate(180deg)}.global-deploy-task-scrim{z-index:1;background:0 0;border:0;padding:0;position:fixed;top:0;right:0;bottom:0;left:0}.global-deploy-popover{z-index:2;border:1px solid hsl(var(--border));background:hsl(var(--background));width:390px;max-width:calc(100vw - 32px);box-shadow:0 14px 36px hsl(var(--foreground) / .14);border-radius:10px;position:absolute;top:40px;right:0;overflow:hidden}.global-deploy-popover-head{border-bottom:1px solid hsl(var(--border));height:44px;color:hsl(var(--foreground));justify-content:space-between;align-items:center;padding:0 14px;font-size:13px;font-weight:650;display:flex}.global-deploy-popover-head span:last-child{background:hsl(var(--secondary));min-width:20px;color:hsl(var(--muted-foreground));text-align:center;border-radius:999px;padding:1px 6px;font-size:11px}.global-deploy-list{max-height:min(520px,100vh - 82px);padding:8px;overflow-y:auto}.global-deploy-empty{color:hsl(var(--muted-foreground));text-align:center;padding:34px 16px;font-size:12.5px}.global-deploy-item{border:1px solid hsl(var(--border) / .8);background:hsl(var(--canvas) / .42);border-radius:8px;padding:12px}.global-deploy-item+.global-deploy-item{margin-top:7px}.global-deploy-item-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.global-deploy-runtime-name{min-width:0;color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:650;overflow:hidden}.global-deploy-status{color:hsl(var(--muted-foreground));flex:none;font-size:11.5px}.global-deploy-item.is-running .global-deploy-status{color:#1863b4}.global-deploy-item.is-success .global-deploy-status{color:#277c46}.global-deploy-item.is-error .global-deploy-status{color:hsl(var(--destructive))}.global-deploy-item.is-cancelled .global-deploy-status{color:hsl(var(--muted-foreground))}.global-deploy-meta{grid-template-columns:1fr 1fr;gap:9px 14px;margin:11px 0 0;display:grid}.global-deploy-meta>div{min-width:0}.global-deploy-meta dt{color:hsl(var(--muted-foreground));margin-bottom:3px;font-size:10.5px}.global-deploy-meta dd{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:11.5px;overflow:hidden}.global-deploy-message{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;margin:10px 0 0;font-size:11.5px;line-height:1.45;overflow:hidden}.global-deploy-error{color:hsl(var(--muted-foreground));margin-top:10px;font-size:11.5px}.deploy-error-message-text{-webkit-line-clamp:3;overflow-wrap:anywhere;white-space:pre-wrap;-webkit-box-orient:vertical;margin:0;line-height:1.5;display:-webkit-box;overflow:hidden}.deploy-error-message.is-expanded .deploy-error-message-text{-webkit-line-clamp:unset;max-height:280px;display:block;overflow:auto}.deploy-error-message-actions{justify-content:flex-end;gap:2px;margin-top:6px;display:flex}.deploy-error-message-actions .deploy-error-retry{margin-right:auto}.global-deploy-progress{background:hsl(var(--foreground) / .08);border-radius:999px;height:3px;margin-top:10px;overflow:hidden}.global-deploy-progress span{border-radius:inherit;background:#2581e4;height:100%;transition:width .18s;display:block}.global-deploy-item-actions{justify-content:flex-end;margin-top:9px;display:flex}.global-deploy-item-actions button{border:1px solid hsl(var(--border));background:hsl(var(--background));min-height:27px;color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;border-radius:5px;padding:0 9px;font-size:11.5px}.global-deploy-item-actions button:hover:not(:disabled){border-color:hsl(var(--destructive) / .3);background:hsl(var(--destructive) / .05);color:hsl(var(--destructive))}.global-deploy-item-actions button:disabled{opacity:.55;cursor:default}.navbar-title{letter-spacing:-.01em;color:hsl(var(--foreground));padding:5px 8px;font-size:16px;font-weight:650}.agent-dd{min-width:0;max-width:33.333cqw;position:relative}.agent-dd-trigger{color:hsl(var(--foreground));font:inherit;letter-spacing:-.01em;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:5px;max-width:100%;padding:5px 8px;font-size:16px;font-weight:650;transition:background .12s;display:inline-flex}.agent-dd-trigger:hover{background:hsl(var(--foreground) / .05)}.agent-dd-current{white-space:nowrap;text-overflow:ellipsis;min-width:0;max-width:100%;overflow:hidden}.agent-dd-chev{opacity:.6;width:16px;height:16px;transition:transform .2s}.agent-dd-chev.open{transform:rotate(180deg)}.agent-switch{letter-spacing:-.01em;align-items:center;gap:6px;min-width:0;max-width:33.333cqw;padding:5px 8px;font-size:16px;font-weight:650;display:inline-flex}.agent-switch-action{width:28px;height:28px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:7px;flex:0 0 28px;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex}.agent-switch-action:hover{background:hsl(var(--foreground) / .06);color:hsl(var(--foreground))}.agent-switch-action:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:1px}.agent-switch-action svg{width:16px;height:16px}@keyframes ddpop{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.account{position:relative}.account-avatar{isolation:isolate;background:radial-gradient(circle at var(--avatar-x,32%) var(--avatar-y,30%),hsl(var(--avatar-hue-a,202) 100% 92%) 0 12%,hsl(var(--avatar-hue-a,202) 95% 75% / .76) 34%,transparent 62%),radial-gradient(ellipse at 82% 78%,hsl(var(--avatar-hue-c,185) 86% 49% / .88) 0 18%,transparent 58%),linear-gradient(142deg,hsl(var(--avatar-hue-b,222) 94% 83%),hsl(var(--avatar-hue-b,222) 95% 54%) 52%,hsl(var(--avatar-hue-c,185) 74% 62%));cursor:pointer;width:18px;height:18px;box-shadow:none;background-position:20% 12%,80% 80%,50%;background-size:180% 180%,160% 160%,100% 100%;border:none;border-radius:999px;flex-shrink:0;justify-content:center;align-items:center;transition:filter .16s,transform .16s;animation:9s ease-in-out infinite alternate avatar-smoke-drift;display:flex;position:relative;overflow:hidden}.account-avatar:hover{filter:saturate(1.12)brightness(1.03);transform:scale(1.035)}.account-avatar.has-image{animation:none}.account-avatar-image{z-index:1;border-radius:inherit;object-fit:cover;width:100%;height:100%;position:absolute;top:0;right:0;bottom:0;left:0}@keyframes avatar-smoke-drift{0%{background-position:18% 12%,82% 84%,50%}50%{background-position:58% 42%,54% 62%,50%}to{background-position:82% 70%,26% 24%,50%}}.account-avatar--lg{cursor:default;border-radius:999px;width:40px;height:40px}.account-pop{z-index:31;background:hsl(var(--panel));border:1px solid hsl(var(--border));min-width:220px;box-shadow:0 8px 28px hsl(var(--foreground) / .14);border-radius:14px;padding:12px;animation:.12s ddpop;position:absolute;top:calc(100% + 8px);right:0}.account-head{align-items:center;gap:10px;display:flex}.account-id{flex:1;min-width:0}.account-name-row{align-items:center;gap:8px;min-width:0;display:flex}.account-name{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:14px;font-weight:600;overflow:hidden}.account-sub{color:hsl(var(--muted-foreground));white-space:nowrap;text-overflow:ellipsis;margin-top:2px;font-size:12px;line-height:1.35;overflow:hidden}.account-action{width:100%;color:hsl(var(--foreground));font:inherit;cursor:pointer;background:0 0;border:none;border-radius:10px;align-items:center;gap:8px;margin-top:10px;padding:9px 10px;font-size:13px;transition:background .12s;display:flex}.account-action+.account-action{margin-top:2px}.account-action:hover{background:hsl(var(--foreground) / .05)}.account-action .icon{width:16px;height:16px;color:hsl(var(--muted-foreground))}.sidebar-footer{flex-shrink:0;margin-top:auto}.sidebar-user{flex-shrink:0;padding:8px 10px 12px;position:relative}.sidebar-user-row{align-items:center;gap:4px;display:flex}.sidebar-user-btn{min-width:0;color:hsl(var(--foreground));font:inherit;cursor:pointer;background:0 0;border:none;border-radius:10px;flex:1;align-items:center;gap:9px;padding:7px 8px;transition:background .12s;display:flex}.sidebar-user-btn:hover{background:hsl(var(--foreground) / .05)}.sidebar-user-identity{flex:1;align-items:center;min-width:0;display:flex}.sidebar-user-name{text-align:left;white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:13px;font-weight:500;overflow:hidden}.sidebar-user-shortcuts{flex-shrink:0;align-items:center;gap:2px;display:flex}.sidebar-user-shortcut{width:28px;height:28px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;border-radius:7px;flex-shrink:0;place-items:center;padding:0;transition:background .12s,color .12s;display:inline-grid}.sidebar-user-shortcut:hover,.sidebar-user-shortcut.is-active{background:hsl(var(--foreground) / .06);color:hsl(var(--foreground))}.sidebar-user-shortcut:focus-visible{outline:2px solid hsl(var(--ring) / .28);outline-offset:1px}.sidebar-user-shortcut .icon{width:16px;height:16px}.sidebar.is-collapsed .sidebar-user-btn{flex:0 0 36px;justify-content:center;gap:0;width:36px;height:36px;padding:2px;overflow:hidden}.sidebar.is-collapsed .sidebar-user-identity,.sidebar.is-collapsed .sidebar-user-shortcuts{display:none}.sidebar.is-collapsed .sidebar-user-pop{width:220px;left:8px;right:auto}@media (prefers-reduced-motion:reduce){.sidebar{transition:none}}.sidebar-user-pop{position:absolute;inset:auto 10px calc(100% - 4px)}.skillcenter-pager button:focus-visible,.skill-detail-close:focus-visible{outline:2px solid hsl(var(--ring) / .28);outline-offset:1px}.skillcenter-status{background:hsl(var(--muted));color:hsl(var(--muted-foreground));border-radius:999px;flex-shrink:0;padding:2px 6px;font-size:10.5px;line-height:16px}.skillcenter-status.is-positive{color:#1d7742;background:#e7f8ee}.skillcenter-status.is-progress{color:#8d5911;background:#fdf5e3}.skillcenter-status.is-danger{color:hsl(var(--destructive));background:hsl(var(--destructive) / .09)}.skillcenter-pager{border-top:1px solid hsl(var(--border));height:44px;color:hsl(var(--muted-foreground));flex:0 0 44px;justify-content:space-between;align-items:center;gap:12px;padding:0 12px;font-size:11.5px;display:flex}.skillcenter-pager-actions{align-items:center;gap:7px;display:flex}.skillcenter-pager-actions>span{text-align:center;min-width:38px}.skillcenter-pager button,.skill-detail-close{color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:6px;place-items:center;display:grid}.skillcenter-pager button{width:26px;height:26px;padding:0}.skillcenter-pager button:hover:not(:disabled),.skill-detail-close:hover{color:hsl(var(--foreground));background:hsl(var(--accent))}.skillcenter-pager button:disabled{opacity:.35;cursor:default}.skillcenter-pager button .icon{width:17px;height:17px}.skillcenter-empty,.skillcenter-loading,.skillcenter-error{min-height:130px;color:hsl(var(--muted-foreground));text-align:center;overflow-wrap:anywhere;justify-content:center;align-items:center;gap:8px;padding:24px;font-size:12.5px;line-height:1.55;display:flex}.skillcenter-error{color:hsl(var(--destructive))}.skillcenter-loading--overlay{z-index:2;background:hsl(var(--background) / .82);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);min-height:0;position:absolute;top:0;right:0;bottom:0;left:0}.skillcenter-loading-mark{border:1.5px solid hsl(var(--foreground) / .16);border-top-color:hsl(var(--foreground) / .62);border-radius:50%;flex-shrink:0;width:14px;height:14px;animation:.8s linear infinite spin}.skill-detail-backdrop{z-index:80;background:hsl(var(--foreground) / .25);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);place-items:center;padding:16px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.skill-detail-dialog{border:1px solid hsl(var(--border));background:hsl(var(--background));width:min(760px,100%);height:min(760px,100%);min-height:0;box-shadow:0 18px 48px hsl(var(--foreground) / .16);border-radius:12px;flex-direction:column;display:flex;overflow:hidden}.skill-detail-head{border-bottom:1px solid hsl(var(--border));flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:16px;padding:16px 18px 14px;display:flex}.skill-detail-heading{align-items:flex-start;gap:11px;min-width:0;display:flex}.skill-detail-heading>div{min-width:0}.skill-detail-heading h2{text-overflow:ellipsis;white-space:nowrap;margin:1px 0 4px;font-size:16px;font-weight:650;line-height:22px;overflow:hidden}.skill-detail-heading p{color:hsl(var(--muted-foreground));overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:12px;line-height:17px;display:-webkit-box;overflow:hidden}.skill-detail-close{flex:0 0 30px;width:30px;height:30px;padding:0}.skill-detail-meta{border-bottom:1px solid hsl(var(--border));background:hsl(var(--canvas) / .45);flex-shrink:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 18px;margin:0;padding:14px 18px;display:grid}.skill-detail-meta>div{min-width:0}.skill-detail-meta dt{color:hsl(var(--muted-foreground));margin-bottom:3px;font-size:10.5px}.skill-detail-meta dd{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:12px;line-height:17px;overflow:hidden}.skill-detail-content{flex-direction:column;flex:1;min-height:0;display:flex}.skill-detail-content-title{border-bottom:1px solid hsl(var(--border));flex:0 0 40px;align-items:center;height:40px;padding:0 18px;font-size:12px;font-weight:600;display:flex}.skill-detail-content>.skillcenter-loading,.skill-detail-content>.skillcenter-error,.skill-detail-content>.skillcenter-empty{flex:1;min-height:0}.skill-detail-markdown{overflow-wrap:anywhere;flex:1;min-height:0;padding:18px 22px 28px;overflow-y:auto}@media (max-width:760px){.skill-detail-meta{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:560px){.skill-detail-backdrop{padding:8px}.skill-detail-dialog{border-radius:10px}.skill-detail-meta{grid-template-columns:minmax(0,1fr);gap:8px;max-height:180px;overflow-y:auto}}.addagent{flex:1;justify-content:center;align-items:flex-start;min-height:0;padding:8vh 16px 16px;display:flex;overflow-y:auto}.addagent-card{width:100%;max-width:480px}.addagent-title{letter-spacing:-.01em;margin:0 0 6px;font-size:20px;font-weight:650}.addagent-sub{color:hsl(var(--muted-foreground));margin:0 0 22px;font-size:13px;line-height:1.6}.addagent-field{margin-bottom:14px;display:block}.addagent-label{color:hsl(var(--muted-foreground));margin-bottom:6px;font-size:12.5px;font-weight:500;display:block}.addagent-input{border:1px solid hsl(var(--border));width:100%;font:inherit;background:hsl(var(--background));color:hsl(var(--foreground));border-radius:10px;padding:10px 12px;font-size:14px}.addagent-input:focus{border-color:hsl(var(--ring) / .4);outline:none}.addagent-error{background:hsl(var(--destructive) / .1);color:hsl(var(--destructive));border-radius:10px;margin:4px 0 14px;padding:9px 12px;font-size:12.5px;line-height:1.5}.addagent-actions{justify-content:flex-end;gap:8px;margin-top:4px;display:flex}.addagent-btn{font:inherit;cursor:pointer;border:1px solid #0000;border-radius:10px;align-items:center;gap:7px;padding:9px 16px;font-size:14px;font-weight:500;transition:background .12s,opacity .12s;display:inline-flex}.addagent-btn--ghost{border-color:hsl(var(--border));color:hsl(var(--foreground));background:0 0}.addagent-btn--ghost:hover{background:hsl(var(--foreground) / .05)}.addagent-btn--primary{background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.addagent-btn--primary:hover:not(:disabled){opacity:.88}.addagent-btn:disabled{opacity:.4;cursor:default}.addagent-btn .icon{width:15px;height:15px}.search{flex-direction:column;flex:1;width:100%;max-width:720px;min-height:0;margin:0 auto;padding:28px 16px 16px;display:flex}.search-box{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:12px;align-items:center;gap:0;padding:5px 6px;transition:border-color .16s,box-shadow .16s;display:flex;position:relative}.search-box:focus-within{border-color:hsl(var(--foreground) / .3);box-shadow:0 0 0 3px hsl(var(--foreground) / .035)}.search-source-picker-wrap{flex:none;position:relative}.search-source-picker{max-width:176px;height:34px;color:hsl(var(--foreground));font:inherit;cursor:pointer;background:0 0;border:0;border-radius:7px;align-items:center;gap:5px;padding:0 8px;display:inline-flex}.search-source-picker:hover,.search-source-picker[aria-expanded=true]{background:hsl(var(--foreground) / .045)}.search-source-picker>span{flex:none;font-size:13px;font-weight:550}.search-source-picker>small{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:400;overflow:hidden}.search-source-chevron{width:12px;height:12px;color:hsl(var(--muted-foreground));flex:none;transition:transform .15s}.search-source-chevron.open{transform:rotate(180deg)}.search-source-menu{z-index:30;border:1px solid hsl(var(--border));background:hsl(var(--panel));width:224px;box-shadow:0 12px 28px hsl(var(--foreground) / .1);border-radius:9px;flex-direction:column;padding:5px;display:flex;position:absolute;top:calc(100% + 9px);left:-6px}.search-source-menu>button{min-width:0;color:hsl(var(--foreground));font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:6px;flex-direction:column;gap:2px;padding:8px 9px;display:flex}.search-source-menu>button:hover:not(:disabled),.search-source-menu>button[aria-selected=true]{background:hsl(var(--foreground) / .055)}.search-source-menu>button:disabled{color:hsl(var(--muted-foreground));cursor:default}.search-source-menu>button>span{font-size:12.5px;font-weight:550}.search-source-menu>button>small{max-width:100%;color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;overflow:hidden}.search-box-divider{background:hsl(var(--border));width:1px;height:18px;margin:0 11px 0 5px}.search-input{color:hsl(var(--foreground));font:inherit;background:0 0;border:none;outline:none;flex:1;font-size:15px}.search-input::placeholder{color:hsl(var(--muted-foreground))}.search-input:disabled{cursor:default}.search-go{background:hsl(var(--primary));width:34px;height:34px;color:hsl(var(--primary-foreground));cursor:pointer;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;transition:opacity .15s,transform .1s;display:flex}.search-go:hover:not(:disabled){opacity:.85}.search-go:active:not(:disabled){transform:scale(.94)}.search-go:disabled{opacity:.3;cursor:default}.search-go .icon{width:17px;height:17px}.search-results{flex-direction:column;flex:1;gap:4px;min-height:0;margin-top:12px;display:flex;overflow-y:auto}.search-empty{text-align:center;color:hsl(var(--muted-foreground));padding:40px 8px;font-size:13px}.search-result{text-align:left;width:100%;color:hsl(var(--foreground));font:inherit;cursor:pointer;background:0 0;border:none;border-radius:12px;align-items:flex-start;gap:12px;padding:12px 14px;transition:background .12s;display:flex}.search-result:hover{background:hsl(var(--foreground) / .05)}.search-result-static{cursor:default;border:1px solid #0000}.search-result-static:hover{border-color:hsl(var(--border));background:hsl(var(--foreground) / .025)}a.search-result{color:inherit;text-decoration:none}.search-result-ext{vertical-align:-1px;opacity:.6;width:12px;height:12px;margin-left:4px}.search-result-icon{width:16px;height:16px;color:hsl(var(--muted-foreground));stroke:currentColor;stroke-width:1.65px;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;margin-top:2px}.search-result-body{flex:1;min-width:0}.search-result-head{justify-content:space-between;align-items:baseline;gap:10px;display:flex}.search-result-title{white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:600;overflow:hidden}.search-result-meta{color:hsl(var(--muted-foreground));flex-shrink:0;font-size:11.5px}.search-result-snippet{color:hsl(var(--muted-foreground));-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:3px;font-size:12.5px;line-height:1.5;display:-webkit-box;overflow:hidden}.search-result-snippet-expanded{-webkit-line-clamp:4;white-space:pre-wrap;overflow-wrap:anywhere}.login{border:1px solid hsl(var(--border));background:hsl(var(--panel));color:hsl(var(--foreground));border-radius:14px;flex-direction:column;display:flex;position:fixed;top:10px;right:10px;bottom:10px;left:10px;overflow:hidden}.login-top{padding:18px 24px}.login-brand{letter-spacing:-.01em;align-items:center;gap:9px;font-family:Byte Sans,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:15px;font-weight:600;display:inline-flex}.login-main{flex:1;justify-content:center;align-items:center;padding:0 24px;display:flex}.login-card{width:100%;max-width:420px}.login-title{letter-spacing:-.02em;margin:0 0 14px;font-family:Byte Sans,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:28px;font-weight:700;line-height:1.2}.login-sub{color:hsl(var(--muted-foreground));margin:0 0 28px;font-size:15px}.login-btn{border:1px solid hsl(var(--border));background:hsl(var(--background));width:100%;color:hsl(var(--foreground));font:inherit;cursor:pointer;border-radius:14px;justify-content:center;align-items:center;gap:8px;padding:14px 18px;font-size:15px;font-weight:500;transition:background .15s,border-color .15s,transform .1s;display:flex}.login-btn:hover{background:hsl(var(--accent));border-color:hsl(var(--ring) / .3)}.login-btn:active{transform:scale(.99)}.login-btn .icon{width:18px;height:18px}.login-powered{color:hsl(var(--muted-foreground));margin:18px 0 0;font-size:12px}.login-legal{color:hsl(var(--muted-foreground));margin:6px 0 0;font-size:12px}.login-legal a{color:inherit;text-decoration:underline;-webkit-text-decoration-color:hsl(var(--muted-foreground) / .45);text-decoration-color:hsl(var(--muted-foreground) / .45);text-underline-offset:2px;font-weight:600}.login-legal a:hover{color:hsl(var(--foreground))}.login-footer{text-align:center;color:hsl(var(--muted-foreground));padding:18px 24px;font-size:12px}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}.login-providers{flex-direction:column;gap:10px;display:flex}.login-provider-error{color:hsl(var(--destructive));flex-direction:column;align-items:flex-start;gap:12px;font-size:13px;display:flex}.login-provider-error p{margin:0}.login-name{align-items:center;gap:8px;display:flex}.login-name-input{border:1px solid hsl(var(--border));font:inherit;background:hsl(var(--background));color:hsl(var(--foreground));border-radius:14px;flex:1;padding:13px 16px;font-size:15px}.login-name-input:focus{border-color:hsl(var(--ring) / .4);outline:none}.login-name-go{background:hsl(var(--primary));width:36px;height:36px;color:hsl(var(--primary-foreground));cursor:pointer;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;transition:opacity .15s;display:flex}.login-name-go .icon{width:18px;height:18px}.login-name-go:disabled{opacity:.35;cursor:default}.login-hint{min-height:16px;color:hsl(var(--destructive));margin:8px 0 0;font-size:12px;line-height:16px}.session-loading{z-index:5;color:hsl(var(--muted-foreground));background:hsl(var(--background) / .6);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);justify-content:center;align-items:center;gap:8px;font-size:14px;display:flex;position:absolute;top:0;right:0;bottom:0;left:0}.main{position:relative}.topo{background:hsl(var(--background));border:1px solid hsl(var(--border));width:288px;min-height:0;box-shadow:0 8px 24px hsl(var(--foreground) / .035);z-index:2;border-radius:18px;flex-direction:column;padding:16px;display:flex;position:absolute;top:28px;bottom:18px;right:18px;overflow:hidden}.topo.is-loading{place-items:center;min-height:88px;display:grid;bottom:auto}.topo.is-drawer{width:auto;min-height:0;max-height:none;box-shadow:none;background:0 0;border:0;border-radius:0;padding:22px;position:static;overflow:visible}.topo.is-loading.is-drawer{min-height:112px}.topo-loading-label{font-size:12px;line-height:1.5}.topo-agent-card{border:0;border-bottom:1px solid hsl(var(--border) / .72);background:0 0;border-radius:0;flex:none;min-width:0;padding:0 0 16px}.topo-agent-heading{flex-direction:column;gap:4px;min-width:0;display:flex}.topo-agent-heading h2{color:hsl(var(--foreground));letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:15px;font-weight:650;line-height:1.4;overflow:hidden}.topo-agent-heading>span{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;line-height:1.4;overflow:hidden}.topo-description{color:hsl(var(--muted-foreground));overflow-wrap:anywhere;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:12px 0 0;font-size:12px;line-height:1.6;display:-webkit-box;overflow:hidden}.topo-module-stack{flex:1;grid-template-rows:minmax(124px,.95fr) minmax(142px,1.15fr) minmax(160px,.9fr);gap:0;min-width:0;min-height:0;display:grid}.topo-module-stack:has(.topo-environment-card){grid-template-rows:minmax(124px,.95fr) minmax(142px,1.15fr) minmax(106px,.72fr) minmax(160px,.9fr)}.topo-module-card{background:0 0;border:0;border-radius:0;flex-direction:column;min-width:0;min-height:0;padding:14px 0;display:flex}.topo-module-card+.topo-module-card{border-top:1px solid hsl(var(--border) / .72)}.topo-module-title{min-height:20px;color:hsl(var(--muted-foreground));align-items:center;gap:6px;width:100%;margin-bottom:0;font-size:13px;font-weight:600;line-height:1;display:inline-flex;position:static}.topo-module-label{text-overflow:ellipsis;white-space:nowrap;align-items:center;height:20px;display:inline-flex;overflow:hidden}.topo-section-count{background:hsl(var(--muted) / .72);min-width:18px;height:18px;color:hsl(var(--muted-foreground));font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:999px;justify-content:center;align-items:center;padding:0 5px;font-size:11px;font-weight:650;line-height:1;display:inline-flex}.topo-remove-capability:disabled,.topo-capability-add-slot:disabled{cursor:not-allowed;opacity:.45}.topo-module-scroll{box-sizing:border-box;overscroll-behavior:contain;scrollbar-color:hsl(var(--border)) transparent;scrollbar-width:thin;flex:1;min-height:24px;padding-top:9px;overflow-y:auto}.topo-module-scroll::-webkit-scrollbar{width:4px}.topo-module-scroll::-webkit-scrollbar-track{background:0 0}.topo-module-scroll::-webkit-scrollbar-thumb{background:hsl(var(--border));border-radius:999px}.topo-module-scroll:focus-visible{outline:2px solid hsl(var(--ring) / .45);outline-offset:3px;border-radius:5px}.topo-tools-scroll{max-height:104px}.topo-skills-scroll{max-height:152px}.session-environment-select{flex-direction:column;gap:6px;min-width:0;padding-top:9px;display:flex}.session-environment-list{flex-direction:column;flex:1;gap:0;min-width:0;min-height:0;display:flex;overflow-y:auto}.topo-environment-card .session-environment-select{flex:1;min-height:0}.session-environment-item{align-items:center;gap:8px;min-width:0;min-height:40px;padding:7px 2px;display:flex}.session-environment-item+.session-environment-item{border-top:1px solid hsl(var(--border) / .72)}.session-environment-item__icon{border:1px solid hsl(var(--border));width:26px;height:26px;color:hsl(var(--muted-foreground));border-radius:7px;flex:0 0 26px;place-items:center;display:inline-grid}.session-environment-item__icon svg{width:15px;height:15px}.session-environment-item__copy{flex-direction:column;flex:1;gap:1px;min-width:0;display:flex}.session-environment-item__copy strong{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:500;line-height:1.35;overflow:hidden}.session-environment-item__copy small{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;line-height:1.35;overflow:hidden}.session-environment-select p{color:hsl(var(--muted-foreground));margin:0;font-size:11px;line-height:1.45}.session-environment-select p.is-error{color:hsl(var(--destructive))}.session-environment-dialog{max-height:min(620px,100vh - 48px)}.session-environment-picker{flex-direction:column;grid-template-columns:minmax(0,1fr);max-height:340px;display:flex;overflow-y:auto}.session-environment-picker__group{flex-direction:column;gap:8px;display:flex}.session-environment-picker__group+.session-environment-picker__group{border-top:1px solid hsl(var(--border));padding-top:12px}.session-environment-picker__group>h3{color:hsl(var(--muted-foreground));margin:0;font-size:11px;font-weight:600;line-height:1.4}.session-environment-option{cursor:pointer}.session-environment-option.is-selected{border-color:hsl(var(--primary) / .45);background:hsl(var(--primary) / .055)}.session-environment-option.is-covered{border-color:hsl(var(--primary) / .24);background:hsl(var(--primary) / .03);cursor:default}.session-environment-option.is-disabled{cursor:not-allowed;opacity:.5}.session-environment-option .studio-tool-option-copy small{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;line-height:1.35;overflow:hidden}.session-environment-option>input{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.session-environment-check{border:1px solid hsl(var(--border));background:hsl(var(--panel));color:#0000;border-radius:4px;flex:0 0 16px;place-items:center;width:16px;height:16px;margin:0 2px 0 8px;transition:border-color .15s,background .15s,color .15s;display:inline-grid}.session-environment-check svg{width:12px;height:12px}.session-environment-option>input:checked+.session-environment-check{border-color:hsl(var(--primary));background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.session-environment-option>input:focus-visible+.session-environment-check{outline:2px solid hsl(var(--ring) / .38);outline-offset:2px}.session-environment-dialog__footer{border-top:1px solid hsl(var(--border));justify-content:space-between;align-items:center;gap:12px;min-height:60px;padding:12px 20px;display:flex}.session-environment-dialog__footer>span{color:hsl(var(--muted-foreground));font-size:12px}.session-environment-dialog__footer>span.is-error{color:hsl(var(--destructive))}.session-environment-dialog__footer>div{align-items:center;gap:8px;display:flex}.session-environment-dialog__footer button{border:1px solid hsl(var(--border));background:hsl(var(--panel));min-width:72px;height:34px;color:hsl(var(--foreground));font:inherit;white-space:nowrap;cursor:pointer;border-radius:7px;padding:0 14px;font-size:12px}.session-environment-dialog__footer button:hover:not(:disabled){background:hsl(var(--muted) / .5)}.session-environment-dialog__footer button.is-primary{border-color:hsl(var(--primary));background:hsl(var(--primary));color:hsl(var(--primary-foreground))}.session-environment-dialog__footer button:disabled{cursor:not-allowed;opacity:.45}.topo-tool-list{flex-direction:column;min-width:0;display:flex}.topo-tool{min-width:0;color:hsl(var(--foreground));align-items:center;gap:6px;padding:7px 2px 7px 14px;font-size:12.5px;line-height:1.4;display:flex;position:relative}.topo-tool:before{content:"";border:1px solid hsl(var(--muted-foreground) / .7);border-radius:2px;width:5px;height:5px;position:absolute;top:13px;left:2px}.topo-tool:first-child{padding-top:0}.topo-tool:first-child:before{top:6px}.topo-tool:last-child{padding-bottom:1px}.topo-tool+.topo-tool{border-top:1px solid hsl(var(--border) / .72)}.topo-capability-title,.topo-skill-title{align-items:center;gap:6px;min-width:0;display:flex}.topo-capability-title{flex:1}.topo-capability-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13px;overflow:hidden}.topo-capability-copy{flex-direction:column;gap:1px;min-width:0;display:flex}.topo-capability-copy code{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:9.5px;font-weight:450;line-height:1.25;overflow:hidden}.topo-capability-add-slot{border:1px dashed hsl(var(--border));background:hsl(var(--muted) / .18);width:100%;min-height:34px;color:hsl(var(--muted-foreground));font:inherit;cursor:pointer;border-radius:9px;justify-content:center;align-items:center;gap:6px;margin:0;padding:5px 10px;font-size:11.5px;transition:border-color .15s,background .15s,color .15s;display:flex}.topo-capability-add-dock{background:hsl(var(--background));flex:none;padding-top:6px}.topo-capability-add-slot>svg{flex-shrink:0;width:15px;height:15px}.topo-capability-add-slot:hover:not(:disabled){border-color:hsl(var(--primary) / .55);background:hsl(var(--primary) / .055);color:hsl(var(--primary))}.topo-capability-add-slot:focus-visible{outline:2px solid hsl(var(--ring) / .38);outline-offset:2px}.topo-custom-badge{background:hsl(var(--primary) / .1);height:17px;color:hsl(var(--primary));border-radius:5px;flex-shrink:0;align-items:center;padding:0 5px;font-size:9.5px;font-weight:650;line-height:1;display:inline-flex}.topo-remove-capability{width:20px;height:20px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;margin-left:auto;padding:0;font-size:15px;line-height:1;display:inline-flex}.topo-remove-capability svg{width:14px;height:14px}.topo-remove-capability:hover:not(:disabled){background:hsl(var(--destructive) / .1);color:hsl(var(--destructive))}.topo-skill-list{flex-direction:column;min-width:0;display:flex}.topo-skill{flex-direction:column;gap:2px;min-width:0;padding:8px 0;display:flex}.topo-skill:first-child{padding-top:0}.topo-skill:last-child{padding-bottom:1px}.topo-skill+.topo-skill{border-top:1px solid hsl(var(--border) / .72)}.topo-skill-name{min-width:0;color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:13px;font-weight:500;line-height:1.45;overflow:hidden}.topo-skill-title{width:100%}.topo-skill-description{color:hsl(var(--muted-foreground));overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.45;display:-webkit-box;overflow:hidden}.topo-empty{color:hsl(var(--muted-foreground));font-size:11.5px;line-height:1.5}.topo-topology{min-height:0}.topo-canvas-heading{justify-content:space-between;align-items:center;gap:12px;margin-bottom:9px;display:flex}.topo-canvas-expand,.topo-canvas-dialog-header button{width:30px;height:30px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:8px;justify-content:center;align-items:center;padding:0;display:inline-flex}.topo-canvas-expand:hover,.topo-canvas-dialog-header button:hover{background:hsl(var(--muted));color:hsl(var(--foreground))}.topo-canvas-expand:focus-visible,.topo-canvas-dialog-header button:focus-visible{outline:2px solid hsl(var(--ring) / .5);outline-offset:2px}.topo-canvas-expand svg,.topo-canvas-dialog-header button svg{width:16px;height:16px}.topo-canvas-preview{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:12px;flex:1;min-height:120px;position:relative;overflow:hidden}.topo-canvas-preview .abc-root,.topo-canvas-dialog-body .abc-root{border:0;flex:auto;width:100%;min-width:0;height:100%}.topo-canvas-preview .abc-minimap{display:none}.topo-canvas-dialog{z-index:1200;background:hsl(var(--background));flex-direction:column;min-width:0;min-height:0;display:flex;position:fixed;top:0;right:0;bottom:0;left:0}.topo-canvas-dialog-header{border-bottom:1px solid hsl(var(--border));justify-content:space-between;align-items:center;gap:24px;min-height:64px;padding:0 24px;display:flex}.topo-canvas-dialog-header>div{align-items:baseline;gap:10px;min-width:0;display:flex}.topo-canvas-dialog-header strong{font-size:15px;font-weight:600}.topo-canvas-dialog-header span{color:hsl(var(--muted-foreground));text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.topo-canvas-dialog-body{flex:1;min-width:0;min-height:0;padding:16px;display:flex}.topo-canvas-dialog-body .abc-canvas{border:1px solid hsl(var(--border));border-radius:16px;overflow:hidden}@media (max-width:640px){.topo-canvas-dialog-header{padding:0 16px}.topo-canvas-dialog-body{padding:8px}}.topo-canvas-heading .topo-section-count{flex-shrink:0}@media (min-width:1280px){.agent-info-trigger{display:none}.topo:not(.is-drawer) .topo-module-scroll{max-height:none}.main:has(>.topo)>.error{align-self:flex-start;width:calc(100% - 354px);margin-left:max(16px,50% - 545px);margin-right:0}.main:has(>.topo)>.transcript{padding-right:322px}.main:has(>.topo)>.conversation-composer-slot{padding-left:16px;padding-right:322px}.conversation-composer-slot>.composer-slot>.composer{margin-left:auto;margin-right:auto}}@media (max-width:1279px){.topo{display:none}.topo.is-drawer{display:block}.topo.is-drawer .topo-module-stack{flex-direction:column;display:flex}}@media (prefers-reduced-motion:reduce){.topo-node{transition:none}.topo-node.is-active,.topo-remote{animation:none}}.studio-tool-dialog-layer{z-index:110;place-items:center;padding:24px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.studio-tool-dialog-scrim{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#1013187a;border:0;width:100%;height:100%;padding:0;position:absolute;top:0;right:0;bottom:0;left:0}.studio-tool-dialog{border:1px solid hsl(var(--border));background:hsl(var(--background));border-radius:16px;flex-direction:column;width:min(560px,100vw - 32px);max-height:min(720px,100vh - 48px);animation:.18s cubic-bezier(.22,1,.36,1) studio-tool-dialog-in;display:flex;position:relative;overflow:hidden;box-shadow:0 24px 80px #0d121c40,0 2px 8px #0d121c1f}.studio-tool-dialog.is-wide{width:min(980px,100vw - 48px);height:min(720px,100dvh - 48px)}@keyframes studio-tool-dialog-in{0%{opacity:0;transform:translateY(8px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}.studio-tool-dialog-head{border-bottom:1px solid hsl(var(--border));grid-template-columns:38px minmax(0,1fr) 32px;align-items:center;gap:12px;min-height:76px;padding:16px 18px;display:grid}.studio-tool-dialog-head.is-iconless{grid-template-columns:minmax(0,1fr) 32px}.studio-tool-dialog-mark{background:hsl(var(--primary) / .09);width:38px;height:38px;color:hsl(var(--primary));border-radius:11px;place-items:center;display:grid}.studio-tool-dialog-mark svg{width:20px;height:20px}.studio-tool-dialog-head h2{color:hsl(var(--foreground));letter-spacing:-.01em;margin:0;font-size:15px;font-weight:680}.studio-tool-dialog-head p{color:hsl(var(--muted-foreground));margin:4px 0 0;font-size:11.5px;line-height:1.45}.studio-tool-dialog-close{width:32px;height:32px;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:0;border-radius:8px;place-items:center;padding:0;display:grid}.studio-tool-dialog-close:hover{background:hsl(var(--muted) / .7);color:hsl(var(--foreground))}.studio-tool-dialog-close svg{width:18px;height:18px}.studio-tool-search{border:1px solid hsl(var(--border));background:hsl(var(--background));min-width:0;height:40px;color:hsl(var(--muted-foreground));border-radius:6px;flex:0 0 40px;align-items:center;gap:8px;padding:0 12px;display:flex}.studio-tool-search:focus-within{border-color:hsl(var(--ring) / .65);box-shadow:0 0 0 3px hsl(var(--ring) / .1)}.studio-tool-search svg{flex:none;width:16px;height:16px}.studio-tool-search input{width:100%;min-width:0;height:100%;color:hsl(var(--foreground));font:inherit;background:0 0;border:0;outline:0;padding:0;font-size:12px}.studio-tool-search input::placeholder{color:hsl(var(--muted-foreground) / .8)}.studio-tool-dialog-body{flex-direction:column;gap:12px;min-height:0;padding:16px;display:flex}.studio-tool-picker{overscroll-behavior:contain;flex-direction:column;gap:7px;min-height:120px;display:flex;overflow-y:auto}.studio-tool-option{border:1px solid hsl(var(--border) / .85);background:hsl(var(--background));border-radius:10px;align-items:center;gap:10px;min-width:0;min-height:72px;padding:10px 11px;display:flex}.studio-tool-option:hover{border-color:hsl(var(--foreground) / .2);background:hsl(var(--muted) / .22)}.studio-tool-option-icon{background:hsl(var(--muted) / .75);width:32px;height:32px;color:hsl(var(--foreground) / .78);border-radius:9px;flex:0 0 32px;place-items:center;display:grid}.studio-tool-option-icon svg{width:17px;height:17px}.studio-tool-option-copy{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.studio-tool-option-copy strong{color:hsl(var(--foreground));text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:620;overflow:hidden}.studio-tool-option-copy code{color:hsl(var(--muted-foreground));font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:10px}.studio-tool-option-copy>span{color:hsl(var(--muted-foreground));-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:11px;line-height:1.35;display:-webkit-box;overflow:hidden}.studio-tool-option>button{background:hsl(var(--foreground));min-width:58px;height:30px;color:hsl(var(--background));font:inherit;cursor:pointer;border:0;border-radius:8px;flex:none;justify-content:center;align-items:center;gap:4px;padding:0 10px;font-size:11px;font-weight:600;display:inline-flex}.studio-tool-option>button:disabled{opacity:.42;cursor:default}.studio-tool-empty{min-height:120px;color:hsl(var(--muted-foreground));text-align:center;justify-content:center;align-items:center;font-size:12px;display:flex}@media (max-width:720px){.studio-tool-dialog-layer{padding:12px}.studio-tool-dialog.is-wide{width:calc(100vw - 24px);height:calc(100dvh - 24px)}.session-environment-dialog__footer{flex-direction:column;align-items:stretch;gap:8px}.session-environment-dialog__footer>div{justify-content:flex-end}}@media (prefers-reduced-motion:reduce){.studio-tool-dialog{animation:none}}.drawer--agent-info{border-right:1px solid hsl(var(--border));width:min(400px,92vw);box-shadow:12px 0 40px hsl(var(--foreground) / .14);border-left:0;animation:.22s cubic-bezier(.22,1,.36,1) agent-info-slide-in;left:0;right:auto}.agent-info-drawer-body{overscroll-behavior:contain;flex:1;min-height:0;overflow-y:auto}@keyframes agent-info-slide-in{0%{transform:translate(-100%)}to{transform:translate(0)}}@media (prefers-reduced-motion:reduce){.drawer--agent-info,.agent-info-scrim{animation:none}}.quick-create{flex-direction:column;flex:1;justify-content:center;align-items:center;padding:0 24px 6vh;display:flex}.qc-head{text-align:center;margin-bottom:28px}.qc-title{letter-spacing:-.02em;margin:0;font-size:26px;font-weight:650}.qc-sub{color:hsl(var(--muted-foreground));margin:8px 0 0;font-size:14px}.qc-cards{grid-template-columns:repeat(4,220px);justify-content:center;gap:16px;display:grid}@media (max-width:1240px){.qc-cards{grid-template-columns:repeat(2,220px)}}@media (max-width:560px){.qc-cards{grid-template-columns:minmax(0,320px)}}.qc-card{text-align:left;border:1px solid hsl(var(--border));background:hsl(var(--card));cursor:pointer;font:inherit;border-radius:16px;flex-direction:column;align-items:flex-start;gap:6px;padding:20px;transition:border-color .15s,box-shadow .15s;display:flex;position:relative}.qc-card:hover{border-color:hsl(var(--ring) / .35);box-shadow:0 8px 24px -16px hsl(var(--foreground) / .25)}.qc-card-arrow{width:18px;height:18px;color:hsl(var(--muted-foreground));opacity:0;transition:opacity .15s,transform .15s;position:absolute;top:18px;right:18px;transform:translate(-4px)}.qc-card:hover .qc-card-arrow{opacity:1;transform:translate(0)}.qc-icon{background:hsl(var(--secondary));width:40px;height:40px;color:hsl(var(--foreground));border-radius:12px;justify-content:center;align-items:center;margin-bottom:6px;display:inline-flex}.qc-icon svg{width:20px;height:20px}.qc-card-title{font-size:15px;font-weight:600}.qc-card-desc{color:hsl(var(--muted-foreground));font-size:12px;line-height:1.5}.navbar-title{letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:min(60vw,640px);padding:0;font-size:15px;font-weight:600;overflow:hidden}.create-stub{color:hsl(var(--muted-foreground));flex-direction:column;flex:1;justify-content:center;align-items:center;gap:16px;display:flex}.create-back{font:inherit;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;align-self:flex-start;margin:12px;font-size:13px}.create-back:hover{color:hsl(var(--foreground))}.navbar-crumbs{align-items:center;gap:4px;min-width:0;display:flex}.navbar-crumbs>.crumb:first-child{padding-left:0}.crumb{letter-spacing:-.01em;white-space:nowrap;border-radius:6px;padding:2px 4px;font-size:15px;font-weight:600}.crumb-link{font:inherit;color:hsl(var(--muted-foreground));cursor:pointer;background:0 0;border:none;font-weight:500;transition:background .12s,color .12s}.crumb-link:hover{color:hsl(var(--foreground));background:hsl(var(--foreground) / .05)}.crumb-current{color:hsl(var(--foreground))}.crumb-sep{width:15px;height:15px;color:hsl(var(--muted-foreground));flex-shrink:0}.confirm-scrim{z-index:60;background:hsl(var(--foreground) / .25);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);justify-content:center;align-items:center;display:flex;position:fixed;top:0;right:0;bottom:0;left:0}.confirm-box{background:hsl(var(--background));border:1px solid hsl(var(--border));width:340px;max-width:calc(100vw - 32px);box-shadow:0 16px 48px -16px hsl(var(--foreground) / .3);border-radius:14px;padding:20px}.confirm-title{margin-bottom:6px;font-size:15px;font-weight:600}.confirm-text{color:hsl(var(--muted-foreground));margin-bottom:18px;font-size:13px;line-height:1.6}.confirm-actions{justify-content:flex-end;gap:8px;display:flex}.confirm-btn{border:1px solid hsl(var(--border));background:hsl(var(--background));color:hsl(var(--foreground));font:inherit;cursor:pointer;border-radius:8px;padding:7px 14px;font-size:13px;transition:background .12s}.confirm-btn:hover{background:hsl(var(--foreground) / .05)}.confirm-btn--danger{background:hsl(var(--destructive));color:#fff;border-color:#0000}.confirm-btn--danger:hover{background:hsl(var(--destructive) / .9)}.studio-confirm-backdrop{z-index:1300;background:hsl(var(--foreground) / .22);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);place-items:center;padding:32px;animation:.14s ease-out studio-confirm-fade-in;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.studio-confirm-dialog{border:1px solid hsl(var(--border));background:hsl(var(--background));width:min(420px,100vw - 40px);height:auto;min-height:0;box-shadow:0 24px 64px hsl(var(--foreground) / .16);border-radius:12px;flex-direction:column;animation:.18s cubic-bezier(.2,.8,.2,1) studio-confirm-rise-in;display:flex;overflow:hidden}.studio-confirm-head{border-bottom:1px solid hsl(var(--border));flex:0 0 58px;justify-content:space-between;align-items:center;gap:20px;padding:0 16px 0 18px;display:flex}.studio-confirm-title-wrap{align-items:center;gap:10px;min-width:0;display:flex}.studio-confirm-title-icon{flex:none;place-items:center;display:grid}.studio-confirm-title-icon svg{width:16px;height:16px}.studio-confirm-title-wrap h2{min-width:0;color:hsl(var(--foreground));margin:0;font-size:14px;font-weight:650;line-height:1.35}.studio-confirm-body{padding:24px 20px}.studio-confirm-body p{color:hsl(var(--foreground));margin:0;font-size:14px;line-height:1.65}.studio-confirm-body .studio-confirm-error{margin-top:10px}.studio-confirm-actions{border-top:1px solid hsl(var(--border));justify-content:flex-end;gap:8px;padding:12px 16px;display:flex}.studio-confirm-actions>*{min-width:76px}.studio-confirm-dialog--warning .studio-confirm-title-icon{color:#ba6708}.studio-confirm-dialog--danger .studio-confirm-title-icon{color:hsl(var(--destructive))}@keyframes studio-confirm-fade-in{0%{opacity:0}to{opacity:1}}@keyframes studio-confirm-rise-in{0%{opacity:0;transform:translateY(6px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}@media (prefers-reduced-motion:reduce){.studio-confirm-backdrop,.studio-confirm-dialog{animation:none}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}',Inr=".website-widget{--background: 0 0% 100%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--destructive: 0 72% 51%;--border: 240 5.9% 90%;--ring: 240 5.9% 10%;--canvas: 240 5% 97.3%;--panel: 0 0% 100%;color:hsl(var(--foreground));color-scheme:light;font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif;font-size:16px;line-height:normal;text-align:left;-webkit-font-smoothing:antialiased}.website-widget *,.website-widget *:before,.website-widget *:after{box-sizing:border-box}.website-widget img,.website-widget svg{display:block}.website-widget__transcript .builtin-tool-icon>svg{width:18px;height:18px}.website-widget__transcript .builtin-tool-chevron{width:13px;height:13px;flex:0 0 13px}.website-widget__launcher{position:fixed;right:24px;bottom:24px;z-index:2147483000;display:grid;width:56px;height:56px;padding:0;place-items:center;border:1px solid hsl(var(--foreground));border-radius:50%;background:hsl(var(--primary));box-shadow:0 12px 32px hsl(var(--foreground) / .24);cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;transition:box-shadow .16s ease,transform .16s ease}.website-widget__launcher:hover{box-shadow:0 16px 38px hsl(var(--foreground) / .3);transform:translateY(-1px)}.website-widget__launcher:active{transform:scale(.96)}.website-widget__launcher.is-dragging{cursor:grabbing;transform:none;transition:box-shadow .12s ease}.website-widget__launcher:focus-visible,.website-widget__close:focus-visible{outline:2px solid hsl(var(--ring));outline-offset:3px}.website-widget__launcher-logo{width:30px;height:30px;filter:brightness(0) invert(1);object-fit:contain;pointer-events:none}.website-widget__panel{position:fixed;right:24px;bottom:96px;z-index:2147482999;display:grid;width:min(420px,calc(100vw - 32px));height:min(640px,calc(100dvh - 128px));grid-template-rows:58px minmax(0,1fr) auto;overflow:hidden;border:1px solid hsl(var(--border));border-radius:16px;background:hsl(var(--panel));box-shadow:0 24px 70px hsl(var(--foreground) / .18);opacity:0;pointer-events:none;transform:translateY(10px) scale(.985);transform-origin:right bottom;transition:opacity .18s ease-out,transform .18s ease-out}.website-widget__panel.is-open{opacity:1;pointer-events:auto;transform:translateY(0) scale(1)}.website-widget__header{display:flex;min-width:0;padding:0 12px 0 14px;align-items:center;justify-content:space-between;border-bottom:1px solid hsl(var(--border));background:hsl(var(--background))}.website-widget__identity{display:flex;min-width:0;align-items:center;gap:10px}.website-widget__identity-logo{display:grid;width:30px;height:30px;flex:0 0 30px;place-items:center;border:1px solid hsl(var(--border));border-radius:9px;background:hsl(var(--background))}.website-widget__identity-logo img{width:20px;height:20px;object-fit:contain}.website-widget__identity-copy{display:flex;min-width:0;flex-direction:column;gap:1px}.website-widget__identity-copy strong{overflow:hidden;font-size:13px;font-weight:620;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.website-widget__identity-copy>span{color:hsl(var(--muted-foreground));font-size:11px;line-height:1.35}.website-widget__close{display:grid;width:32px;height:32px;padding:0;place-items:center;border:0;border-radius:8px;background:transparent;color:hsl(var(--muted-foreground));cursor:pointer}.website-widget__close:hover{background:hsl(var(--accent));color:hsl(var(--foreground))}.website-widget__close svg{width:17px;height:17px}.website-widget__transcript.transcript{min-height:0;padding:20px 18px 10px;overscroll-behavior:contain;background:hsl(var(--background))}.website-widget__transcript .turn{width:100%;margin-bottom:18px}.website-widget__transcript .turn--user .bubble{max-width:88%}.website-widget__error{width:100%;margin:8px auto 12px;padding:10px 12px;border-radius:8px;background:hsl(var(--destructive) / .08);color:hsl(var(--destructive));font-size:12.5px;line-height:1.5}.website-widget__composer-slot{padding:10px 14px 14px;border-top:1px solid hsl(var(--border));background:hsl(var(--background))}.website-widget .compact-composer.composer{padding:0}.website-widget .compact-composer .composer-box{align-items:flex-end}.website-widget .compact-composer .comp-input{min-height:36px;padding:7px 6px;font-size:14px}@media (max-width: 480px){.website-widget__launcher{right:14px;bottom:14px}.website-widget__panel{right:12px;bottom:82px;width:calc(100vw - 24px);height:min(620px,calc(100dvh - 96px));border-radius:14px}.website-widget__transcript.transcript{padding:18px 14px 8px}.website-widget__composer-slot{padding:9px 10px 11px}}@media (prefers-reduced-motion: reduce){.website-widget__launcher,.website-widget__panel{transition:none}}",Pnr="data:image/svg+xml,%3csvg%20width='111'%20height='117'%20viewBox='0%200%20111%20117'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%205.60152C0%200.621083%206.02156%20-1.87313%209.54327%201.64857L62.1326%2054.2379C64.3157%2056.421%2064.3157%2059.9606%2062.1326%2062.1438L9.54327%20114.733C6.02157%20118.255%201.56595e-06%20115.761%201.56595e-06%20110.78L0%205.60152Z'%20fill='%2300DBFE'/%3e%3cpath%20d='M104.775%202.20435C109.574%202.20456%20111.977%208.00715%20108.583%2011.4006L64.9133%2055.0686C63.3788%2057.0544%2063.3976%2059.8376%2064.9954%2061.7727L108.59%20105.368C111.983%20108.762%20109.58%20114.564%20104.781%20114.564H94.4495C94.3647%20114.567%2094.279%20114.57%2094.1926%20114.57H72.388C70.9594%20114.57%2069.5886%20114.002%2068.5784%20112.991L17.8352%2062.2493C16.7699%2061.184%2016.2455%2059.7831%2016.259%2058.387C16.2458%2056.9914%2016.7705%2055.5915%2017.8352%2054.5266L68.5725%203.78931C69.5827%202.77917%2070.9535%202.21118%2072.3821%202.21118H82.7014C82.7903%202.20677%2082.8796%202.20435%2082.969%202.20435H104.775Z'%20fill='%230069FF'/%3e%3cpath%20d='M62.2703%2054.38C63.1975%2055.3073%2063.7151%2056.489%2063.825%2057.7003C63.7755%2058.0898%2063.7666%2058.4831%2063.8025%2058.8732C63.6571%2060.0159%2063.1478%2061.1216%2062.2703%2061.9992L45.2146%2079.0529L28.405%2062.2433C27.3399%2061.1782%2026.8144%2059.7779%2026.8279%2058.382C26.8148%2056.9865%2027.3403%2055.5873%2028.405%2054.5226L45.408%2037.5187L62.2703%2054.38Z'%20fill='%230003F5'/%3e%3cpath%20d='M58.6438%2050.7557L54.3909%2055.0087C52.7621%2057.053%2052.809%2059.9769%2054.5598%2061.9364L58.4524%2065.829L39.9309%2084.3495L17.8313%2062.2489C16.7664%2061.1839%2016.2409%2059.7842%2016.2542%2058.3885C16.2409%2056.9928%2016.7663%2055.5931%2017.8313%2054.5282L40.1233%2032.2352L58.6438%2050.7557Z'%20fill='%230003F5'/%3e%3c/svg%3e";function ioe(t,e={}){return qg.t(t,{...e,ns:"adk"})}async function*Nnr(t){if(!t.body)throw new Error("Response has no body");const e=t.body.getReader(),r=new TextDecoder;let n="";const i=s=>s.length>500?ioe("sse.truncatedData",{data:s.slice(0,500),count:s.length}):s,a=(s,o=!1)=>{const l=s.split(/\r?\n/).filter(u=>u.startsWith("data:")).map(u=>u.slice(5).trimStart()).join(` `);if(!(!l||l==="[DONE]"||l==="ping"))try{return JSON.parse(l)}catch{const u=i(l);throw o?new Error(ioe("sse.incompleteEvent",{data:u})):new Error(ioe("sse.invalidEventJson",{data:u}))}};try{for(;;){const{done:s,value:o}=await e.read();if(s)break;n+=r.decode(o,{stream:!0});let l=n.match(/\r?\n\r?\n/);for(;(l==null?void 0:l.index)!==void 0;){const u=n.slice(0,l.index);n=n.slice(l.index+l[0].length);const h=a(u);h!==void 0&&(yield h),l=n.match(/\r?\n\r?\n/)}}if(n+=r.decode(),n.trim()){const s=a(n,!0);s!==void 0&&(yield s)}}finally{try{await e.cancel()}catch{}finally{e.releaseLock()}}}function Ww(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)?t:void 0}function Ib(t){return typeof t=="string"?t:""}function lVe(t,e){return t==="pending"||t==="running"||t==="completed"||t==="failed"?t:e}function Bnr(t){let e=t;if(typeof e=="string")try{e=JSON.parse(e)}catch{return{}}const r=Ww(e)??{};return Ww(r.result)??r}function $nr(t){var r;const e=(r=Ww(t))==null?void 0:r.branches;return Array.isArray(e)?e.map(n=>{var i;return Ib((i=Ww(n))==null?void 0:i.label)}):[]}function cVe(t,e,r){const n=$nr(t),i=Bnr(e),a=Array.isArray(i.branches)?i.branches:[],s=r==="running"?"running":"pending";return{branches:[0,1].map(l=>{const u=Ww(a[l])??{};return{label:Ib(u.label)||n[l]||`方向 ${l+1}`,content:Ib(u.content),status:lVe(u.status,s),error:Ib(u.error)}})}}function Fnr(t){const e=Ww(t),r=Ww(e==null?void 0:e.veadkStudioToolProgress);return!r||r.toolName!=="branch_compare"||typeof r.branchIndex!="number"||r.branchIndex<0||r.branchIndex>1?null:{toolName:"branch_compare",requestId:Ib(r.requestId),branchIndex:r.branchIndex,label:Ib(r.label),delta:Ib(r.delta),status:lVe(r.status,"running"),error:Ib(r.error)||void 0}}function znr(t,e,r){return{branches:cVe(t,e,"running").branches.map((a,s)=>s===r.branchIndex?{...a,label:r.label||a.label,content:a.content+r.delta,status:r.status,error:r.error??a.error}:a)}}function jl(t,e){return qg.t(`blocks.codexProgress.${t}`,{ns:"conversation",...e})}const uVe=28e4;function hVe(t){try{return JSON.stringify(t).length}catch{return uVe}}function Unr(t){const e=t.slice(-200);let r=e.reduce((n,i)=>n+hVe(i),0);for(;e.length>1&&r>uVe;)r-=hVe(e.shift());return e}function md(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)?t:void 0}function gi(t){return typeof t=="string"?t:""}function aoe(t,e=""){const r=gi(t).toLowerCase();return e.endsWith(".failed")||["failed","error","declined","cancelled"].includes(r)?"failed":e.endsWith(".completed")||["completed","done","success"].includes(r)?"completed":"running"}function dVe(t){if(t.response!==void 0)return t.response;if(t.result!==void 0)return t.result;const e=t.aggregatedOutput??t.aggregated_output??t.output,r=t.exitCode??t.exit_code;if(!(e===void 0&&r===void 0))return{...e!==void 0?{output:e}:{},...r!==void 0?{exitCode:r}:{}}}function fVe(t){if(t.args!==void 0)return t.args;if(t.arguments!==void 0)return t.arguments;if(t.input!==void 0)return t.input;const e=gi(t.command),r=gi(t.cwd);if(e||r)return{...e?{command:e}:{},...r?{cwd:r}:{}};if(t.changes!==void 0)return{changes:t.changes};if(t.approval!==void 0)return t.approval}function Yw(t,e,r,n,i){return{kind:"tool",name:t,callId:e,args:n,response:i,done:r!=="running",status:r,...r==="failed"?{defaultOpen:!0}:{}}}function pVe(t){const e=gi(t.id||t.itemId||t.item_id),r=gi(t.kind);if(!e||!r)return null;const n=aoe(t.status),i=gi(t.text||t.detail||t.delta),a=!gi(t.text||t.detail)&&typeof t.delta=="string";if(r==="thinking"||r==="reasoning")return i?{id:e,block:{kind:"thinking",text:i,done:n!=="running"},appendText:a}:null;if(r==="commentary")return i?{id:e,block:{kind:"text",text:i},appendText:a}:null;if(["message","text","assistant_final","final"].includes(r))return i?{id:e,block:{kind:"text",text:i},appendText:a,finalAnswer:!0}:null;if(r==="plan"){const s=Array.isArray(t.plan)?t.plan:[];return{id:e,block:{kind:"plan",title:gi(t.title)||jl("planTitle"),summary:i||void 0,items:s.flatMap(o=>{const l=md(o),u=gi(l==null?void 0:l.text);if(!u)return[];const h=gi(l==null?void 0:l.status);return[{text:u,status:["pending","in_progress","completed","failed"].includes(h)?h:"pending"}]}),done:n!=="running"}}}if(["tool","command","command_execution","commandExecution","file_change","fileChange","mcp_tool_call","mcpToolCall","collab_tool_call","web_search","approval","status"].includes(r)){const s=jl(r==="file_change"||r==="fileChange"?"fallback.fileChange":r==="approval"?"fallback.approval":r==="status"?"fallback.status":"fallback.command"),o=fVe(t),l=dVe(t)??(r==="status"&&i||void 0);return{id:e,block:Yw(gi(t.name||t.title)||s,e,n,o,l)}}return null}function gVe(t){const e=gi(t.type),r=md(t.item),n=gi(r==null?void 0:r.type),i=gi((r==null?void 0:r.id)||t.id)||(e==="turn.failed"?"turn":"");if(!i)return null;const a=aoe(r==null?void 0:r.status,e);if(n==="reasoning"||n==="agent_message"){const s=gi(r==null?void 0:r.text);return s?{id:i,block:n==="reasoning"?{kind:"thinking",text:s,done:a!=="running"}:{kind:"text",text:s},...n==="agent_message"&&(r==null?void 0:r.phase)!=="commentary"?{finalAnswer:!0}:{}}:null}if(n==="todo_list"){const o=(Array.isArray(r==null?void 0:r.items)?r.items:[]).flatMap(l=>{const u=md(l),h=gi(u==null?void 0:u.text);if(!h)return[];const d=gi(u==null?void 0:u.status).toLowerCase(),f=(u==null?void 0:u.completed)===!0||["completed","done"].includes(d)?"completed":["failed","error"].includes(d)?"failed":["in_progress","running"].includes(d)?"in_progress":"pending";return[{text:h,status:f}]});return o.length?{id:i,block:{kind:"plan",title:jl("planTitle"),summary:jl("planSummary",{completed:o.filter(l=>l.status==="completed").length,total:o.length}),items:o,done:a!=="running"}}:null}if(n==="command_execution"){const s=jl(`command.${a}`);return{id:i,block:Yw(s,i,a,fVe(r??{}),dVe(r??{}))}}if(n==="file_change"){const s=Array.isArray(r==null?void 0:r.changes)?r.changes:[],o=s.length?jl("projectFiles",{count:s.length}):jl("projectFile"),l=jl(`fileChange.${a}`,{subject:o});return{id:i,block:Yw(l,i,a,s.length?{changes:s}:void 0)}}if(n==="mcp_tool_call"){const s=[gi(r==null?void 0:r.server),gi(r==null?void 0:r.tool)].filter(Boolean).join("/")||jl("externalTool"),o=jl(`mcp.${a}`,{tool:s}),l=md(r==null?void 0:r.error),u=(r==null?void 0:r.result)!==void 0?r.result:gi(l==null?void 0:l.message)||void 0;return{id:i,block:Yw(o,i,a,r==null?void 0:r.arguments,u)}}if(n==="collab_tool_call"){const s=gi(r==null?void 0:r.tool),o=["spawn_agent","send_input","wait","close_agent"].includes(s)?s:"default",l=jl(`collaboration.${o}.${a}`),u=Object.fromEntries(["tool","receiver_thread_ids","prompt"].filter(h=>(r==null?void 0:r[h])!==void 0).map(h=>[h,r==null?void 0:r[h]]));return{id:i,block:Yw(l,i,a,Object.keys(u).length?u:void 0,r==null?void 0:r.agents_states)}}if(n==="web_search"){const s=jl(`webSearch.${a}`),o=Object.fromEntries(["query","action"].filter(l=>(r==null?void 0:r[l])!==void 0).map(l=>[l,r==null?void 0:r[l]]));return{id:i,block:Yw(s,i,a,Object.keys(o).length?o:void 0)}}if(n==="error"||e==="error"||e==="turn.failed"){const s=md(t.error),o=gi((r==null?void 0:r.message)||t.message||(s==null?void 0:s.message))||jl("errorDetail");return{id:i,block:Yw(jl("errorTitle"),i,"failed",void 0,o)}}return null}function Vnr(t){const e=md(t),r=md(e==null?void 0:e.veadkStudioToolProgress);if(!r||r.kind!=="codex")return null;const n=gi(r.toolName),i=gi(r.requestId);if(!n||!i)return null;const a=md(r.event??r.activity);if(!a)return null;const s=md(a.item)||gi(a.type)?gVe(a):pVe(a);if(!s)return null;const o=gi(r.title||r.label),l=gi(a.agentSessionId??a.agent_session_id),u=gi(a.sandboxSessionId??a.sandbox_session_id),h=gi(a.threadId??a.thread_id),d=aoe(a.status,gi(a.type)),p=gi(a.kind)==="status"&&d!=="running"?d:void 0;return{toolName:n,requestId:i,...o?{title:o}:{},...l?{agentSessionId:l}:{},...u?{sandboxSessionId:u}:{},...h?{threadId:h}:{},...p?{terminalStatus:p}:{},event:s}}function Qnr(t,e){const r=md(e),n=md((r==null?void 0:r.codexActivity)??(r==null?void 0:r.codex_activity));if(!n)return t;const i=gi(n.title)||(t==null?void 0:t.title)||"Codex Sandbox",a=gi(n.agentSessionId??n.agent_session_id)||(t==null?void 0:t.agentSessionId),s=gi(n.sandboxSessionId??n.sandbox_session_id)||(t==null?void 0:t.sandboxSessionId),o=gi(n.threadId??n.thread_id)||(t==null?void 0:t.threadId);let l={title:i,...a?{agentSessionId:a}:{},...s?{sandboxSessionId:s}:{},...o?{threadId:o}:{},items:(t==null?void 0:t.items.slice())??[]};const u=Array.isArray(n.events)?n.events:[];for(const h of u){const d=md(h);if(!d)continue;const f=md(d.item)||gi(d.type)?gVe(d):pVe(d);f&&(f.finalAnswer||(l=soe(l,{title:i,...a?{agentSessionId:a}:{},...s?{sandboxSessionId:s}:{},...o?{threadId:o}:{},event:f})))}return l}function soe(t,e){const r=(t==null?void 0:t.items.slice())??[],n=r.findIndex(i=>i.id===e.event.id);if(n>=0){const i=r[n].block,a=e.event.block;e.event.appendText&&i.kind==="text"&&a.kind==="text"?r[n]={id:e.event.id,block:{...a,text:i.text+a.text}}:e.event.appendText&&i.kind==="thinking"&&a.kind==="thinking"?r[n]={id:e.event.id,block:{...a,text:i.text+a.text}}:r[n]={id:e.event.id,block:a}}else r.push({id:e.event.id,block:e.event.block});return{title:e.title||(t==null?void 0:t.title)||"Codex Sandbox",...e.agentSessionId||t!=null&&t.agentSessionId?{agentSessionId:e.agentSessionId||(t==null?void 0:t.agentSessionId)}:{},...e.sandboxSessionId||t!=null&&t.sandboxSessionId?{sandboxSessionId:e.sandboxSessionId||(t==null?void 0:t.sandboxSessionId)}:{},...e.threadId||t!=null&&t.threadId?{threadId:e.threadId||(t==null?void 0:t.threadId)}:{},items:Unr(r)}}const Gnr="send_a2ui_json_to_client",Hnr="validated_a2ui_json",mVe="adk_request_credential",vVe="transfer_to_agent";function Wnr(t){var n,i,a,s;const e=t,r=((n=e==null?void 0:e.exchangedAuthCredential)==null?void 0:n.oauth2)??((i=e==null?void 0:e.exchanged_auth_credential)==null?void 0:i.oauth2)??((a=e==null?void 0:e.rawAuthCredential)==null?void 0:a.oauth2)??((s=e==null?void 0:e.raw_auth_credential)==null?void 0:s.oauth2);return(r==null?void 0:r.authUri)??(r==null?void 0:r.auth_uri)}function Ynr(){return{blocks:[],liveStart:0,pendingCodexProgress:[]}}function yVe(t,e){if(e.event.finalAnswer)return"applied";let r=-1;for(let n=t.length-1;n>=0;n-=1){const i=t[n];if(!(i.kind!=="tool"||i.name!==e.toolName)){if(i.callId===e.requestId)return i.done?"completed":(i.codexActivity=soe(i.codexActivity,e),i.status=e.terminalStatus??"running",e.terminalStatus&&(i.done=!0),"applied");if(!i.done){if(r>=0)return"unmatched";r=n}}}if(r>=0){const n=t[r];return n.kind!=="tool"?"unmatched":(n.codexActivity=soe(n.codexActivity,e),n.status=e.terminalStatus??"running",e.terminalStatus&&(n.done=!0),"applied")}return"unmatched"}function qnr(t){if(!t||typeof t!="object"||Array.isArray(t))return"completed";const e=t,r=typeof e.status=="string"?e.status.toLowerCase():"";return e.ok===!1||["error","failed","denied","declined","cancelled","timeout"].includes(r)?"failed":"completed"}function bVe(t){if(!t||typeof t!="object"||Array.isArray(t))return"";const e=t;return e.ok!==!0||typeof e.message!="string"?"":e.message.trim()}const xVe=t=>t.functionCall??t.function_call,wVe=t=>t.functionResponse??t.function_response;function jnr(t){if(!t||typeof t!="object")return"";const e=t,r=e.agentName??e.agent_name;return typeof r=="string"?r:""}function Xnr(t){return t.replace(/-/g,"+").replace(/_/g,"/")}function Knr(t){const e=[];for(const[r,n]of t.entries()){const i=n.partMetadata??n.part_metadata,a=i==null?void 0:i.veadkTransport;if((a==null?void 0:a.hidden)===!0)continue;const s=i==null?void 0:i.veadkMedia;if(typeof(s==null?void 0:s.uri)=="string"){e.push({id:String(s.id??s.uri),mimeType:typeof s.mimeType=="string"?s.mimeType:void 0,uri:s.uri,name:typeof s.name=="string"?s.name:void 0,sizeBytes:typeof s.sizeBytes=="number"?s.sizeBytes:void 0});continue}const o=n.inlineData??n.inline_data;if(o&&o.data){e.push({id:`inline-${r}-${o.displayName??o.display_name??"media"}`,mimeType:o.mimeType??o.mime_type,data:Xnr(o.data),name:o.displayName??o.display_name});continue}const l=n.fileData??n.file_data,u=(l==null?void 0:l.fileUri)??(l==null?void 0:l.file_uri);l&&u&&e.push({id:u,mimeType:l.mimeType??l.mime_type,uri:u,name:l.displayName??l.display_name})}return e}function AVe(t){const e=t.partMetadata??t.part_metadata,r=e==null?void 0:e.veadkTransport;return(r==null?void 0:r.hideText)===!0?void 0:t.text}function Znr(t,e){if(!e.length)return;const r=t[t.length-1];(r==null?void 0:r.kind)==="attachment"?r.files.push(...e):t.push({kind:"attachment",files:e})}function Jnr(t,e){if(!e.length)return;const r=t[t.length-1];if((r==null?void 0:r.kind)==="artifact"){for(const n of e)r.files.some(i=>i.filename===n.filename&&i.version===n.version)||r.files.push(n);return}t.push({kind:"artifact",files:e})}function ooe(t,e,r){const n=t[t.length-1];n&&n.kind===e?n.text+=r:t.push(e==="thinking"?{kind:e,text:r,done:!1}:{kind:e,text:r})}function xV(t){for(const e of t)e.kind==="thinking"&&(e.done=!0)}function eir(t,e){var h,d,f,p,g,m;const r=t.blocks.map(v=>({...v}));let n=t.liveStart,i=t.pendingCodexProgress.slice();const a=((h=e.content)==null?void 0:h.parts)??[],s=a.flatMap(v=>{const y=Fnr(v.partMetadata??v.part_metadata);return y?[y]:[]}),o=a.flatMap(v=>{const y=Vnr(v.partMetadata??v.part_metadata);return y?[y]:[]});if(s.length>0||o.length>0){for(const v of s)for(let y=r.length-1;y>=0;y-=1){const b=r[y];if(!(b.kind!=="tool"||b.done||b.name!==v.toolName||v.requestId&&b.callId&&b.callId!==v.requestId)){b.response=znr(b.args,b.response,v),b.status="running";break}}for(const v of o)yVe(r,v)==="unmatched"&&(i=[...i,v].slice(-64));return{blocks:r,liveStart:n,pendingCodexProgress:i}}const l=a.some(v=>xVe(v)||wVe(v));if(e.partial&&!l){for(const v of a){const y=AVe(v);typeof y=="string"&&y&&ooe(r,v.thought?"thinking":"text",y)}return{blocks:r,liveStart:n,pendingCodexProgress:i}}r.length=n;for(const v of a){const y=xVe(v),b=wVe(v),x=Knr([v]),w=AVe(v);if(typeof w=="string"&&w)ooe(r,v.thought?"thinking":"text",w);else if(x.length)xV(r),Znr(r,x);else if(y)if(xV(r),y.name===vVe){const A=jnr(y.args)||((d=e.actions)==null?void 0:d.transferToAgent)||((f=e.actions)==null?void 0:f.transfer_to_agent)||qg.t("app:common.unknownAgent");r.push({kind:"agent-transfer",agentName:A,done:!1})}else if(y.name===mVe){const A=y.args??{},S=A.authConfig??A.auth_config??A,O=String(A.functionCallId??A.function_call_id??"").replace(/^_adk_toolset_auth_/,"")||void 0;r.push({kind:"auth",callId:y.id??"",label:O,authUri:Wnr(S),authConfig:S,done:!1})}else{const A={kind:"tool",name:y.name??"",callId:y.id,args:y.args,done:!1};if(r.push(A),A.callId){const S=[];for(const T of i)T.toolName===A.name&&T.requestId===A.callId?yVe(r,T):S.push(T);i=S}}else if(b){if(xV(r),b.name===vVe)for(let A=r.length-1;A>=0;A--){const S=r[A];if(S.kind==="agent-transfer"&&!S.done){S.done=!0;break}}if(b.name===mVe)for(let A=r.length-1;A>=0;A--){const S=r[A];if(S.kind==="auth"&&!S.done){S.done=!0;break}}for(let A=r.length-1;A>=0;A--){const S=r[A],T=S.kind==="tool"&&S.name==="delegate_to_codex_sandbox";if(S.kind==="tool"&&(!S.done||T)&&S.name===b.name&&(!b.id||!S.callId||S.callId===b.id)){const O=T?bVe(S.response):"";if(S.done=!0,S.response=b.response,T){S.codexActivity=Qnr(S.codexActivity,b.response),S.status=qnr(b.response);const k=bVe(b.response);k&&k!==O&&ooe(r,"text",k)}break}}if(b.name===Gnr){const A=((p=b.response)==null?void 0:p[Hnr])??[];if(A.length){const S=r[r.length-1];S&&S.kind==="a2ui"?S.messages.push(...A):r.push({kind:"a2ui",messages:A})}}}}const u=((g=e.actions)==null?void 0:g.artifactDelta)??((m=e.actions)==null?void 0:m.artifact_delta);return u&&Jnr(r,Object.entries(u).map(([v,y])=>({filename:v,version:y}))),xV(r),n=r.length,{blocks:r,liveStart:n,pendingCodexProgress:i}}/** * @license lucide-react v0.460.0 - ISC *