sshler 1.0.1__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sshler-1.0.1/sshler.egg-info → sshler-1.0.2}/PKG-INFO +1 -1
- {sshler-1.0.1 → sshler-1.0.2}/pyproject.toml +1 -1
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/sessions.py +49 -0
- sshler-1.0.1/sshler/static/dist/assets/Add-OksXDpKN.js → sshler-1.0.2/sshler/static/dist/assets/Add-DAOjsezW.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/Alert-CJnbz0fT.js → sshler-1.0.2/sshler/static/dist/assets/Alert-CSag0xgj.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/BoxesView-BqetuKds.js → sshler-1.0.2/sshler/static/dist/assets/BoxesView-DRK-moOl.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/ClaudeSessionsView-BxTORyE0.js → sshler-1.0.2/sshler/static/dist/assets/ClaudeSessionsView-CGbHeAaj.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/CommanderView-Y81iioLk.js → sshler-1.0.2/sshler/static/dist/assets/CommanderView-CeqW512i.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/DiffView-ondq4ZNa.js → sshler-1.0.2/sshler/static/dist/assets/DiffView-DKQldLz_.js +3 -3
- sshler-1.0.1/sshler/static/dist/assets/DiffViewer-DucGXTZr.js → sshler-1.0.2/sshler/static/dist/assets/DiffViewer-BKOI30kQ.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/DirectoryPickerModal-LzHIzxMK.css → sshler-1.0.2/sshler/static/dist/assets/DirectoryPickerModal-BJGCZjfT.css +1 -1
- sshler-1.0.1/sshler/static/dist/assets/DirectoryPickerModal-DA_cjnnm.js → sshler-1.0.2/sshler/static/dist/assets/DirectoryPickerModal-g2DqKz-v.js +15 -15
- sshler-1.0.1/sshler/static/dist/assets/FileEditorModal-BLPKHDSU.js → sshler-1.0.2/sshler/static/dist/assets/FileEditorModal-mQQlSzLp.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/FilesView-DU5Zba52.js → sshler-1.0.2/sshler/static/dist/assets/FilesView-BhxBCK3C.js +4 -4
- sshler-1.0.1/sshler/static/dist/assets/GitBadge-BABzbbVI.js → sshler-1.0.2/sshler/static/dist/assets/GitBadge-B_4M8JOq.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/Grid-Lp6jHK4T.js → sshler-1.0.2/sshler/static/dist/assets/Grid-86dNpU6i.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/InputNumber-Bd9OcDJg.js → sshler-1.0.2/sshler/static/dist/assets/InputNumber-9ldqAl1a.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/LoginView-Bar48ahz.js → sshler-1.0.2/sshler/static/dist/assets/LoginView-DezvuYtZ.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/MultiTerminalView-BE8EMLkG.js → sshler-1.0.2/sshler/static/dist/assets/MultiTerminalView-hud2MPaZ.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/NotFoundView-CQ5I7aM4.js → sshler-1.0.2/sshler/static/dist/assets/NotFoundView-NdvchLjg.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/OverviewView-Byu2LR9X.js → sshler-1.0.2/sshler/static/dist/assets/OverviewView-D8TLlPQz.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhArrowsClockwise.vue-DD3R2Xr7.js → sshler-1.0.2/sshler/static/dist/assets/PhArrowsClockwise.vue-BLHYPaFF.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhArrowsLeftRight.vue-mbfSKQF5.js → sshler-1.0.2/sshler/static/dist/assets/PhArrowsLeftRight.vue-BBZDx8HD.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhArrowsOut.vue-CIhp608a.js → sshler-1.0.2/sshler/static/dist/assets/PhArrowsOut.vue-B8B678OT.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhCheck.vue-0P_0qFl7.js → sshler-1.0.2/sshler/static/dist/assets/PhCheck.vue-C9DFYQgy.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhCircle.vue-Brga0la6.js → sshler-1.0.2/sshler/static/dist/assets/PhCircle.vue-BfooAyte.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhClockCounterClockwise.vue-CvQG9HoX.js → sshler-1.0.2/sshler/static/dist/assets/PhClockCounterClockwise.vue-BLcbzc-B.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhCopy.vue-DXIbRgIt.js → sshler-1.0.2/sshler/static/dist/assets/PhCopy.vue-D3RzWNcP.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhFloppyDisk.vue-B19Xi5oU.js → sshler-1.0.2/sshler/static/dist/assets/PhFloppyDisk.vue-B2uZ8xL_.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhFolderOpen.vue-D7otORJd.js → sshler-1.0.2/sshler/static/dist/assets/PhFolderOpen.vue-DcCWZAYu.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhGitBranch.vue-DbsG-wMQ.js → sshler-1.0.2/sshler/static/dist/assets/PhGitBranch.vue-BK8iMGps.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhList.vue-D-KZuuPX.js → sshler-1.0.2/sshler/static/dist/assets/PhList.vue-CuXqS-Yu.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhPlay.vue-B2cXsa_Y.js → sshler-1.0.2/sshler/static/dist/assets/PhPlay.vue-CE6G-I1m.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhPushPinSimple.vue-CdA0STGR.js → sshler-1.0.2/sshler/static/dist/assets/PhPushPinSimple.vue-CCYplIkb.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhQuestion.vue-BW7PmMco.js → sshler-1.0.2/sshler/static/dist/assets/PhQuestion.vue-DOMPqSq0.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/PhTrash.vue--MsjBWDV.js → sshler-1.0.2/sshler/static/dist/assets/PhTrash.vue-EX4P1cIo.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/Popconfirm-DDKfNKHB.js → sshler-1.0.2/sshler/static/dist/assets/Popconfirm-CgFPK9F0.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/ProgressView-DLRFmwZq.js → sshler-1.0.2/sshler/static/dist/assets/ProgressView-tCTPu2yW.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/RadioGroup-D2DKtu3M.js → sshler-1.0.2/sshler/static/dist/assets/RadioGroup-DxCCyzGg.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/SettingsView-BzcSQycg.js → sshler-1.0.2/sshler/static/dist/assets/SettingsView-B1itMzkZ.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/Spin-DW_PTWRP.js → sshler-1.0.2/sshler/static/dist/assets/Spin-DyIxCRqg.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/Switch-CZGN42Oi.js → sshler-1.0.2/sshler/static/dist/assets/Switch-CXzkKkdP.js +1 -1
- sshler-1.0.2/sshler/static/dist/assets/TerminalView-COCfd2uh.css +1 -0
- sshler-1.0.2/sshler/static/dist/assets/TerminalView-DWSrSgDS.js +2 -0
- sshler-1.0.1/sshler/static/dist/assets/arc-PKFDIykw.js → sshler-1.0.2/sshler/static/dist/assets/arc-_G7dsxWN.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/architectureDiagram-3BPJPVTR-OGmYJwLW.js → sshler-1.0.2/sshler/static/dist/assets/architectureDiagram-3BPJPVTR-BuMa823z.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/blockDiagram-GPEHLZMM-D9ejvUqC.js → sshler-1.0.2/sshler/static/dist/assets/blockDiagram-GPEHLZMM-BF8dyh4B.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/c4Diagram-AAUBKEIU-9d6_DGDY.js → sshler-1.0.2/sshler/static/dist/assets/c4Diagram-AAUBKEIU-C3shTvrC.js +1 -1
- sshler-1.0.2/sshler/static/dist/assets/channel-OQURwrS_.js +1 -0
- sshler-1.0.1/sshler/static/dist/assets/chunk-2J33WTMH-BMyVHaD0.js → sshler-1.0.2/sshler/static/dist/assets/chunk-2J33WTMH-BlmNHocv.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/chunk-4BX2VUAB-CkkxqntS.js → sshler-1.0.2/sshler/static/dist/assets/chunk-4BX2VUAB-FVsp0Dvs.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/chunk-55IACEB6-B5HotXAr.js → sshler-1.0.2/sshler/static/dist/assets/chunk-55IACEB6-BeaVCTsK.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/chunk-727SXJPM-BuvoAnLk.js → sshler-1.0.2/sshler/static/dist/assets/chunk-727SXJPM-DOvH0YaL.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/chunk-AQP2D5EJ-CodKZITx.js → sshler-1.0.2/sshler/static/dist/assets/chunk-AQP2D5EJ-DwFGzbIM.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/chunk-FMBD7UC4-DybGd0xH.js → sshler-1.0.2/sshler/static/dist/assets/chunk-FMBD7UC4-DrOyMPnh.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/chunk-ND2GUHAM-DkhCCdGp.js → sshler-1.0.2/sshler/static/dist/assets/chunk-ND2GUHAM-bdPxSOzK.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/chunk-QZHKN3VN-Ca_cvpmF.js → sshler-1.0.2/sshler/static/dist/assets/chunk-QZHKN3VN-DF1WR5Ws.js +1 -1
- sshler-1.0.2/sshler/static/dist/assets/classDiagram-4FO5ZUOK-BcXsVGrF.js +1 -0
- sshler-1.0.2/sshler/static/dist/assets/classDiagram-v2-Q7XG4LA2-BcXsVGrF.js +1 -0
- sshler-1.0.1/sshler/static/dist/assets/cose-bilkent-S5V4N54A-CzQ4yXIu.js → sshler-1.0.2/sshler/static/dist/assets/cose-bilkent-S5V4N54A-C-3AhSiq.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/dagre-BM42HDAG-Ckfvu0pR.js → sshler-1.0.2/sshler/static/dist/assets/dagre-BM42HDAG-BGYV-hKU.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/diagram-2AECGRRQ-CvNwatft.js → sshler-1.0.2/sshler/static/dist/assets/diagram-2AECGRRQ-HqKo4hRm.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/diagram-5GNKFQAL-Dm8aU1UG.js → sshler-1.0.2/sshler/static/dist/assets/diagram-5GNKFQAL-DxQKZDCI.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/diagram-KO2AKTUF-BJuU5XQg.js → sshler-1.0.2/sshler/static/dist/assets/diagram-KO2AKTUF-BaqYu-qh.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/diagram-LMA3HP47-CCNVmgZy.js → sshler-1.0.2/sshler/static/dist/assets/diagram-LMA3HP47-BSXDrPx5.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/diagram-OG6HWLK6-BJFioi-J.js → sshler-1.0.2/sshler/static/dist/assets/diagram-OG6HWLK6-fbUkjsCH.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/erDiagram-TEJ5UH35-DAgHgXdB.js → sshler-1.0.2/sshler/static/dist/assets/erDiagram-TEJ5UH35-3hJqUA_3.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/favorites-CoF8n59V.js → sshler-1.0.2/sshler/static/dist/assets/favorites-DhWkZ_Ge.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/flowDiagram-I6XJVG4X-_mDHpD4F.js → sshler-1.0.2/sshler/static/dist/assets/flowDiagram-I6XJVG4X-DjLO6b70.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/ganttDiagram-6RSMTGT7-BLRYr8bo.js → sshler-1.0.2/sshler/static/dist/assets/ganttDiagram-6RSMTGT7-DDZ9gMyj.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/gitGraphDiagram-PVQCEYII-BFRV0aWH.js → sshler-1.0.2/sshler/static/dist/assets/gitGraphDiagram-PVQCEYII-Z1pBUCOv.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/graph-I0jeeAZy.js → sshler-1.0.2/sshler/static/dist/assets/graph-1mebsZ_B.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/index-CkbQBrQC.js → sshler-1.0.2/sshler/static/dist/assets/index-CeAHJWSQ.js +35 -35
- sshler-1.0.2/sshler/static/dist/assets/infoDiagram-5YYISTIA-SEqseSvm.js +2 -0
- sshler-1.0.1/sshler/static/dist/assets/ishikawaDiagram-YF4QCWOH-BFtYMN5l.js → sshler-1.0.2/sshler/static/dist/assets/ishikawaDiagram-YF4QCWOH-CgGECNI3.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/journeyDiagram-JHISSGLW-B25w-Lgo.js → sshler-1.0.2/sshler/static/dist/assets/journeyDiagram-JHISSGLW-CnV6MMWs.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/kanban-definition-UN3LZRKU-CUTWPg2p.js → sshler-1.0.2/sshler/static/dist/assets/kanban-definition-UN3LZRKU-CNYDNKQ8.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/layout-ChDTRz-q.js → sshler-1.0.2/sshler/static/dist/assets/layout-CDPPC1l5.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/linear-CSIvK_Mc.js → sshler-1.0.2/sshler/static/dist/assets/linear-wLmeA8y8.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/mermaid.core-CxDXFqFp.js → sshler-1.0.2/sshler/static/dist/assets/mermaid.core-a_pRy7_d.js +4 -4
- sshler-1.0.1/sshler/static/dist/assets/mindmap-definition-RKZ34NQL-kKk5WdGS.js → sshler-1.0.2/sshler/static/dist/assets/mindmap-definition-RKZ34NQL-CdCNJ1c3.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/pieDiagram-4H26LBE5-BCNn7lus.js → sshler-1.0.2/sshler/static/dist/assets/pieDiagram-4H26LBE5-CGk3s4aU.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/quadrantDiagram-W4KKPZXB-uPAH_hPD.js → sshler-1.0.2/sshler/static/dist/assets/quadrantDiagram-W4KKPZXB-DP62iaWi.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/requirementDiagram-4Y6WPE33-Ym3fEtVU.js → sshler-1.0.2/sshler/static/dist/assets/requirementDiagram-4Y6WPE33-D80_Wixp.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/sankeyDiagram-5OEKKPKP-B3Q_kjKy.js → sshler-1.0.2/sshler/static/dist/assets/sankeyDiagram-5OEKKPKP-G9LZKWmT.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/sequenceDiagram-3UESZ5HK-CzOFU3SA.js → sshler-1.0.2/sshler/static/dist/assets/sequenceDiagram-3UESZ5HK-B82dIY8s.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/sessionName-CphzJJdf.js → sshler-1.0.2/sshler/static/dist/assets/sessionName-DbO6vfWs.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/stateDiagram-AJRCARHV-nwdUewVR.js → sshler-1.0.2/sshler/static/dist/assets/stateDiagram-AJRCARHV-Bdc9qNnY.js +1 -1
- sshler-1.0.2/sshler/static/dist/assets/stateDiagram-v2-BHNVJYJU-BdScRmDh.js +1 -0
- sshler-1.0.1/sshler/static/dist/assets/timeline-definition-PNZ67QCA-F3raaPNr.js → sshler-1.0.2/sshler/static/dist/assets/timeline-definition-PNZ67QCA-BLrTakYZ.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/vennDiagram-CIIHVFJN-ixTGUKUD.js → sshler-1.0.2/sshler/static/dist/assets/vennDiagram-CIIHVFJN-B5Ccpd4s.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/wardley-L42UT6IY-B1R2WmKy.js → sshler-1.0.2/sshler/static/dist/assets/wardley-L42UT6IY-CXaSjfFd.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/wardleyDiagram-YWT4CUSO-D4YruqXG.js → sshler-1.0.2/sshler/static/dist/assets/wardleyDiagram-YWT4CUSO-Dyh7zrS3.js +1 -1
- sshler-1.0.1/sshler/static/dist/assets/xychartDiagram-2RQKCTM6-Ddsn3v86.js → sshler-1.0.2/sshler/static/dist/assets/xychartDiagram-2RQKCTM6-C7ZRiqX6.js +1 -1
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/index.html +1 -1
- {sshler-1.0.1 → sshler-1.0.2}/sshler/tmux.py +5 -1
- {sshler-1.0.1 → sshler-1.0.2}/sshler/webapp.py +21 -1
- {sshler-1.0.1 → sshler-1.0.2}/sshler/win_terminal_registry.py +86 -7
- {sshler-1.0.1 → sshler-1.0.2/sshler.egg-info}/PKG-INFO +1 -1
- sshler-1.0.2/sshler.egg-info/SOURCES.txt +212 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_win_terminal_registry.py +132 -1
- sshler-1.0.1/sshler/static/dist/assets/TerminalView-Cs7XFzrE.js +0 -2
- sshler-1.0.1/sshler/static/dist/assets/TerminalView-DxuPZsIk.css +0 -1
- sshler-1.0.1/sshler/static/dist/assets/channel-CEovAwe2.js +0 -1
- sshler-1.0.1/sshler/static/dist/assets/classDiagram-4FO5ZUOK-aSKLCDXz.js +0 -1
- sshler-1.0.1/sshler/static/dist/assets/classDiagram-v2-Q7XG4LA2-aSKLCDXz.js +0 -1
- sshler-1.0.1/sshler/static/dist/assets/infoDiagram-5YYISTIA-DaXfiFfz.js +0 -2
- sshler-1.0.1/sshler/static/dist/assets/stateDiagram-v2-BHNVJYJU-CpzvH64B.js +0 -1
- sshler-1.0.1/sshler.egg-info/SOURCES.txt +0 -212
- {sshler-1.0.1 → sshler-1.0.2}/LICENSE +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/MANIFEST.in +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/README.md +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/scripts/check_frontend_dist.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/setup.cfg +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/__init__.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/__init__.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/archive.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/auth.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/batch.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/boxes.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/claude_sessions.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/config.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/dependencies.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/diff.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/excel.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/files.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/git.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/grep.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/helpers.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/models.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/pdf.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/ping.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/progress.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/rate_limiting.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/recovery.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/search.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/snippets.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/stats_stream.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/terminal.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/transfer.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/api/tunnels.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/auth.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/claude_sessions.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/cli.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/config.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/config_cache.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/pdf.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/rate_limit.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/scripts/install-sshler-task.ps1 +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/scripts/remove-sshler-task.ps1 +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/scripts/run-sshler.ps1 +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/session.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/settings.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/snapshot.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/spa.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/ssh.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/ssh_config.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/ssh_pool.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/state.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/BoxesView-Cw5NiFP6.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/ClaudeSessionsView-DN9qPL2F.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/CommanderView-DWT0Nvkn.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/DiffView-D1B9VV_z.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/DiffViewer-Ds8qyy47.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/FileEditorModal-CgM0I0XI.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/FilesView-Be4yclnr.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/GitBadge-sLcMA5A6.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/LoginView-BLrnakeI.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/MultiTerminalView-DDARrSaQ.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/NotFoundView-DYaoqkDb.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/OverviewView-CL0qAbxt.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/ProgressView-DdmDJk_g.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/SettingsView-yHE_fgSm.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/cytoscape.esm-ChuFH5G7.js +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/defaultLocale-DX6XiGOO.js +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/index-Dewesw9U.css +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/init-Gi6I4Gst.js +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/katex-BbnesVCl.js +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/assets/ordinal-Cboi1Yqb.js +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/favicon.png +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/fonts/MonaspaceNeon-Bold.woff2 +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/fonts/MonaspaceNeon-Regular.woff2 +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/fonts/MonaspaceNeon-Variable.woff2 +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/icon-192.png +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/icon-512-maskable.png +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/icon-512.png +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/logo.png +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/static/dist/manifest.webmanifest +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/validation.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler/winpty_proc.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler.egg-info/dependency_links.txt +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler.egg-info/entry_points.txt +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler.egg-info/requires.txt +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/sshler.egg-info/top_level.txt +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_api_diff.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_api_progress.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_api_v1.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_archive.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_basic.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_batch_ops.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_claude_sessions.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_cli_progress.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_command_injection.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_config.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_database_indexes.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_dev_workflow.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_grep.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_handshake_status.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_httpx_ws.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_path_validation.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_progress_websocket.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_rate_limit.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_recovery.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_search.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_serve_token_cache.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_session_auth.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_snippets.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_ssh.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_stats_stream.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_tunnels.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_websocket.py +0 -0
- {sshler-1.0.1 → sshler-1.0.2}/tests/test_windows_terminal.py +0 -0
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "sshler"
|
|
8
|
-
version = "1.0.
|
|
8
|
+
version = "1.0.2"
|
|
9
9
|
description = "A local FastAPI-powered SSH multiplexer for tmux-in-browser — from your laptop only."
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
requires-python = ">=3.12"
|
|
@@ -11,6 +11,7 @@ from fastapi import APIRouter, Depends, HTTPException, Query, Request
|
|
|
11
11
|
from .. import state
|
|
12
12
|
from ..config import AppConfig
|
|
13
13
|
from ..tmux import discover_local_sessions, local_tmux_command
|
|
14
|
+
from ..validation import PathValidator, ValidationError
|
|
14
15
|
from .dependencies import APIDependencies
|
|
15
16
|
from .models import (
|
|
16
17
|
APILayout,
|
|
@@ -262,6 +263,54 @@ def get_router(deps: APIDependencies) -> APIRouter:
|
|
|
262
263
|
raise HTTPException(status_code=500, detail="Failed to delete session")
|
|
263
264
|
return APISimpleMessage(status="ok", message="deleted", path=session_id)
|
|
264
265
|
|
|
266
|
+
@router.delete(
|
|
267
|
+
"/boxes/{name}/terminal-sessions/{session_name}",
|
|
268
|
+
response_model=APISimpleMessage,
|
|
269
|
+
)
|
|
270
|
+
async def api_kill_terminal_session(
|
|
271
|
+
request: Request,
|
|
272
|
+
name: str,
|
|
273
|
+
session_name: str,
|
|
274
|
+
application_config: AppConfig = Depends(deps.get_application_config),
|
|
275
|
+
) -> APISimpleMessage:
|
|
276
|
+
"""Forcibly kill a native shell by session NAME (the "kill terminal" action).
|
|
277
|
+
|
|
278
|
+
Closing a browser tab only *detaches* — the native ConPTY persists in the
|
|
279
|
+
registry so the tab can re-attach (that's the session-persistence feature).
|
|
280
|
+
This endpoint terminates that live shell, keyed by ``(box, session_name)``
|
|
281
|
+
exactly as the registry stores it, so a tab reopened with the same name
|
|
282
|
+
spawns a FRESH shell instead of re-attaching to the old (e.g. laggy) one.
|
|
283
|
+
It also drops any tracking row so the session doesn't linger as stale.
|
|
284
|
+
|
|
285
|
+
Keying by name — not the DB id like ``api_delete_session`` — lets a tab kill
|
|
286
|
+
its OWN shell without first resolving an id, and still works if the DB row
|
|
287
|
+
is missing or out of sync with the registry.
|
|
288
|
+
"""
|
|
289
|
+
box = deps.get_box_or_404(application_config, name)
|
|
290
|
+
try:
|
|
291
|
+
safe_name = PathValidator.sanitize_session_name(session_name)
|
|
292
|
+
except ValidationError as exc:
|
|
293
|
+
raise HTTPException(status_code=400, detail=str(exc))
|
|
294
|
+
|
|
295
|
+
# Terminate the live ConPTY (no-op returning False if it's already gone).
|
|
296
|
+
killed = False
|
|
297
|
+
registry = getattr(request.app.state, "win_terminal_registry", None)
|
|
298
|
+
if registry is not None:
|
|
299
|
+
with contextlib.suppress(Exception):
|
|
300
|
+
killed = await registry.kill((box.name, safe_name))
|
|
301
|
+
|
|
302
|
+
# Best-effort: drop the tracking row so the session list stays clean.
|
|
303
|
+
record = await state.get_session_by_name_async(box.name, safe_name)
|
|
304
|
+
if record is not None:
|
|
305
|
+
with contextlib.suppress(Exception):
|
|
306
|
+
await state.delete_session_async(record.id)
|
|
307
|
+
|
|
308
|
+
return APISimpleMessage(
|
|
309
|
+
status="ok",
|
|
310
|
+
message="killed" if killed else "not_found",
|
|
311
|
+
path=safe_name,
|
|
312
|
+
)
|
|
313
|
+
|
|
265
314
|
@router.post("/boxes/{name}/sessions/sync", response_model=list[APISession])
|
|
266
315
|
async def api_sync_sessions(
|
|
267
316
|
name: str,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,l as o}from"./index-
|
|
1
|
+
import{d as e,l as o}from"./index-CeAHJWSQ.js";const r=e({name:"Add",render(){return o("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}});export{r as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as d,C as t,s as u,P as j,n as H,d as M,l as r,m as F,Q as N,R as O,G as V,S as W,u as D,v as C,U as G,c as p,V as K,x as i,y as Q,h as U,W as X,X as Y,Y as Z,Z as q,_ as J,$ as ee}from"./index-
|
|
1
|
+
import{p as d,C as t,s as u,P as j,n as H,d as M,l as r,m as F,Q as N,R as O,G as V,S as W,u as D,v as C,U as G,c as p,V as K,x as i,y as Q,h as U,W as X,X as Y,Y as Z,Z as q,_ as J,$ as ee}from"./index-CeAHJWSQ.js";const oe=d("alert",`
|
|
2
2
|
line-height: var(--n-line-height);
|
|
3
3
|
border-radius: var(--n-border-radius);
|
|
4
4
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as N,a0 as V,a1 as G,a2 as I,a3 as P,c as j,a4 as A,a as w,e as c,a5 as a,a6 as k,b as E,a7 as r,a8 as e,a9 as s,aa as M,ab as q,ac as D,ad as y,ae as B,af as H,ag as C,ah as f,ai as d,aj as L,ak as T,al as J,o as h,am as K}from"./index-
|
|
1
|
+
import{d as N,a0 as V,a1 as G,a2 as I,a3 as P,c as j,a4 as A,a as w,e as c,a5 as a,a6 as k,b as E,a7 as r,a8 as e,a9 as s,aa as M,ab as q,ac as D,ad as y,ae as B,af as H,ag as C,ah as f,ai as d,aj as L,ak as T,al as J,o as h,am as K}from"./index-CeAHJWSQ.js";import{G as O}from"./PhPushPinSimple.vue-CCYplIkb.js";import{u as Q}from"./favorites-DhWkZ_Ge.js";import{N as x}from"./Alert-CSag0xgj.js";import{N as R,a as U}from"./Grid-86dNpU6i.js";const W={class:"page"},X={class:"page-header"},Y={class:"eyebrow"},Z={class:"text-muted"},ee={class:"card-title"},te={class:"text-muted small"},ae=N({__name:"BoxesView",setup(se){const m=V(),u=G(),i=Q(),p=I(),{t:n}=P(),_=j(()=>m.token||m.payload?.token||null);async function z(){!m.payload&&!m.loading&&await m.bootstrap(),!u.items.length&&!u.loading&&await u.load(_.value),u.items.length&&i.hydrateFromBoxes(u.items)}function g(o,l){u.setBoxes(u.items.map(t=>t.name===o?{...t,...l}:t))}async function F(o){const l=await i.setPinned(o,_.value);if(i.error){p.error(i.error);return}g(o,{pinned:l}),p.success(n(l?"boxes.pinned":"boxes.unpinned"))}async function S(o,l){const t=!i.isFavorite(o,l),$=await i.setFavorite(o,l,t,_.value);if(i.error){p.error(i.error);return}const v=await i.loadBox(o,_.value);v?g(o,{favorites:v.favorites,pinned:v.pinned}):g(o,{favorites:Array.from(i.favoritesForBox(o).values())}),p.success(n($?"boxes.favorited":"boxes.unfavorited"))}async function b(o){const l=await J(o,_.value);p.info(n("boxes.status_info",{status:l.status,latency:String(l.latency_ms||0)}))}return A(async()=>{await z()}),(o,l)=>(h(),w("div",W,[c("header",X,[c("div",null,[c("p",Y,r(e(n)("boxes.title")),1),c("h1",null,r(e(n)("boxes.subtitle")),1),c("p",Z,r(e(n)("boxes.description")),1)])]),a(e(R),{"x-gap":12,"y-gap":12,cols:3},{default:s(()=>[(h(!0),w(M,null,q(e(u).items,t=>(h(),k(e(U),{key:t.name},{default:s(()=>[a(e(D),{class:"surface-card",size:"small"},{default:s(()=>[c("div",ee,[a(e(y),{size:"16"},{default:s(()=>[a(e(B),{weight:"duotone"})]),_:1}),c("span",null,r(e(H)(t.name))+" "+r(t.name),1)]),c("p",te,r(t.host)+" • "+r(t.transport),1),a(e(C),{size:"small",style:{"margin-bottom":"8px"}},{default:s(()=>[a(e(f),{size:"tiny",type:"primary",onClick:()=>o.$router.push(`/files?box=${t.name}`)},{default:s(()=>[a(e(y),{size:"14"},{default:s(()=>[a(e(B),{weight:"duotone"})]),_:1}),d(" "+r(e(n)("boxes.files")),1)]),_:1},8,["onClick"]),a(e(f),{size:"tiny",type:"primary",onClick:()=>o.$router.push(`/terminal?box=${t.name}`)},{default:s(()=>[a(e(y),{size:"14"},{default:s(()=>[a(e(L),{weight:"duotone"})]),_:1}),d(" "+r(e(n)("boxes.terminal")),1)]),_:1},8,["onClick"]),a(e(f),{size:"tiny",onClick:()=>o.$router.push(`/multi-terminal?box=${t.name}`)},{default:s(()=>[d(r(e(n)("boxes.multi")),1)]),_:1},8,["onClick"])]),_:2},1024),a(e(C),{size:"small"},{default:s(()=>[a(e(f),{size:"tiny",secondary:"",onClick:()=>F(t.name)},{default:s(()=>[a(e(y),{size:"14"},{default:s(()=>[a(e(O),{weight:"duotone"})]),_:1}),d(" "+r(e(i).isPinned(t.name)?e(n)("boxes.unpin"):e(n)("boxes.pin")),1)]),_:2},1032,["onClick"]),a(e(f),{size:"tiny",secondary:"",onClick:()=>S(t.name,t.default_dir||"/")},{default:s(()=>[a(e(y),{size:"14"},{default:s(()=>[a(e(T),{weight:"duotone"})]),_:1}),d(" "+r(e(i).isFavorite(t.name,t.default_dir||"/")?e(n)("boxes.unfavorite"):e(n)("boxes.favorite")),1)]),_:2},1032,["onClick"]),a(e(f),{size:"tiny",quaternary:"",onClick:()=>b(t.name)},{default:s(()=>[d(r(e(n)("common.status")),1)]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1}),e(u).error?(h(),k(e(x),{key:0,type:"error",closable:""},{default:s(()=>[d(r(e(u).error),1)]),_:1})):e(i).error?(h(),k(e(x),{key:1,type:"error",closable:""},{default:s(()=>[d(r(e(i).error),1)]),_:1})):E("",!0)]))}}),ue=K(ae,[["__scopeId","data-v-60b8424c"]]);export{ue as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bq as Te,d as R,l as z,p as S,s as T,n as j,C as H,D as Pe,P as Ie,u as ie,h as E,c as y,L as Re,v as ne,U as be,y as He,bB as Be,aN as Se,aU as Ae,O as le,S as Fe,bC as De,bD as Oe,K as ze,bn as je,bE as pe,X as Ue,bF as qe,bx as Ge,aW as We,bG as Ze,i as Z,bH as he,bI as Ke,G as ve,R as ge,x as Q,bv as Je,a as u,o,r as te,b as D,e as i,m as ae,g as Ye,bJ as Xe,a3 as Qe,a2 as et,a0 as tt,b6 as at,aB as lt,a4 as it,b2 as nt,a5 as v,a8 as t,bK as ot,ad as N,a7 as A,a9 as f,aD as rt,ah as I,aJ as de,ar as fe,aE as st,ai as F,bL as ct,aa as _e,ab as ye,a6 as K,at as ee,bM as dt,as as ut,bN as mt,b5 as pt,am as ht}from"./index-
|
|
1
|
+
import{bq as Te,d as R,l as z,p as S,s as T,n as j,C as H,D as Pe,P as Ie,u as ie,h as E,c as y,L as Re,v as ne,U as be,y as He,bB as Be,aN as Se,aU as Ae,O as le,S as Fe,bC as De,bD as Oe,K as ze,bn as je,bE as pe,X as Ue,bF as qe,bx as Ge,aW as We,bG as Ze,i as Z,bH as he,bI as Ke,G as ve,R as ge,x as Q,bv as Je,a as u,o,r as te,b as D,e as i,m as ae,g as Ye,bJ as Xe,a3 as Qe,a2 as et,a0 as tt,b6 as at,aB as lt,a4 as it,b2 as nt,a5 as v,a8 as t,bK as ot,ad as N,a7 as A,a9 as f,aD as rt,ah as I,aJ as de,ar as fe,aE as st,ai as F,bL as ct,aa as _e,ab as ye,a6 as K,at as ee,bM as dt,as as ut,bN as mt,b5 as pt,am as ht}from"./index-CeAHJWSQ.js";import{G as vt}from"./PhArrowsClockwise.vue-BLHYPaFF.js";import{C as gt,F as ft}from"./PhArrowsOut.vue-B8B678OT.js";import{I as _t}from"./PhCopy.vue-D3RzWNcP.js";import{I as yt}from"./PhGitBranch.vue-BK8iMGps.js";import{H as wt}from"./PhPlay.vue-CE6G-I1m.js";import{a as $t}from"./sessionName-DbO6vfWs.js";import{N as xt}from"./Spin-DyIxCRqg.js";let we=!1;function bt(){if(Te&&window.CSS&&!we&&(we=!0,"registerProperty"in window?.CSS))try{CSS.registerProperty({name:"--n-color-start",syntax:"<color>",inherits:!1,initialValue:"#0000"}),CSS.registerProperty({name:"--n-color-end",syntax:"<color>",inherits:!1,initialValue:"#0000"})}catch{}}const Ht=R({name:"ChevronLeft",render(){return z("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},z("path",{d:"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z",fill:"currentColor"}))}}),St=S("collapse","width: 100%;",[S("collapse-item",`
|
|
2
2
|
font-size: var(--n-font-size);
|
|
3
3
|
color: var(--n-text-color);
|
|
4
4
|
transition:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as te,i as X,c as $,a as r,o as s,r as je,b as H,e as o,m as We,a3 as ye,h as v,aB as ee,b2 as Ze,a7 as h,a8 as b,a5 as R,aa as ce,ab as ge,as as Oe,cD as $t,am as be,bZ as Je,aH as Be,a9 as $e,a6 as U,aq as ie,cE as xt,cF as Ct,af as Mt,cG as Pt,aI as Ft,bC as Ue,aK as et,b$ as Lt,aZ as tt,c0 as Bt,ad as Zt,ai as qe,ae as At,cH as St,cc as Dt,aE as Vt,cI as Ht,au as at,ah as nt,a0 as Et,a1 as zt,ao as It,a2 as Nt,aA as Rt,a4 as Tt,aC as Gt,bn as ot,cJ as Ot,cK as Ut,cL as qt,cM as Kt}from"./index-CkbQBrQC.js";import{N as ze}from"./Spin-DW_PTWRP.js";import{D as jt,I as Wt}from"./DiffViewer-DucGXTZr.js";import{G as Ke}from"./PhCheck.vue-0P_0qFl7.js";import{I as Xt}from"./PhGitBranch.vue-DbsG-wMQ.js";import{N as Qt,a as st,F as Yt,b as Jt}from"./FileEditorModal-BLPKHDSU.js";import{G as ea}from"./GitBadge-BABzbbVI.js";import{u as ta}from"./favorites-CoF8n59V.js";import"./Add-OksXDpKN.js";import"./Switch-CZGN42Oi.js";const aa=["width","height","fill","transform"],na={key:0},oa=o("path",{d:"M204,75.64V40a20,20,0,0,0-20-20H72A20,20,0,0,0,52,40V76a20.1,20.1,0,0,0,8,16l48,36L60,164a20.1,20.1,0,0,0-8,16v36a20,20,0,0,0,20,20H184a20,20,0,0,0,20-20V180.36a20.13,20.13,0,0,0-7.94-16L147.9,128l48.16-36.4A20.13,20.13,0,0,0,204,75.64ZM180,212H76V182l52-39,52,39.33Zm0-138.35L128,113,76,74V44H180Z"},null,-1),sa=[oa],la={key:1},ra=o("path",{d:"M188.82,82,128,128,67.2,82.4A8,8,0,0,1,64,76V40a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8V75.64A8,8,0,0,1,188.82,82ZM64,180v36a8,8,0,0,0,8,8H184a8,8,0,0,0,8-8V180.36a8,8,0,0,0-3.18-6.38L128,128,67.2,173.6A8,8,0,0,0,64,180Z",opacity:"0.2"},null,-1),ia=o("path",{d:"M200,75.64V40a16,16,0,0,0-16-16H72A16,16,0,0,0,56,40V76a16.07,16.07,0,0,0,6.4,12.8L114.67,128,62.4,167.2A16.07,16.07,0,0,0,56,180v36a16,16,0,0,0,16,16H184a16,16,0,0,0,16-16V180.36a16.09,16.09,0,0,0-6.35-12.77L141.27,128l52.38-39.59A16.09,16.09,0,0,0,200,75.64ZM184,216H72V180l56-42,56,42.35Zm0-140.36L128,118,72,76V40H184Z"},null,-1),ca=[ra,ia],ua={key:2},da=o("path",{d:"M200,75.64V40a16,16,0,0,0-16-16H72A16,16,0,0,0,56,40V76a16.08,16.08,0,0,0,6.41,12.8L114.67,128,62.4,167.2A16.07,16.07,0,0,0,56,180v36a16,16,0,0,0,16,16H184a16,16,0,0,0,16-16V180.36a16,16,0,0,0-6.36-12.77L141.26,128l52.38-39.59A16.05,16.05,0,0,0,200,75.64Z"},null,-1),fa=[da],va={key:3},ma=o("path",{d:"M198,75.64V40a14,14,0,0,0-14-14H72A14,14,0,0,0,58,40V76a14.06,14.06,0,0,0,5.6,11.2L118,128,63.6,168.8A14.06,14.06,0,0,0,58,180v36a14,14,0,0,0,14,14H184a14,14,0,0,0,14-14V180.36a14.08,14.08,0,0,0-5.56-11.17L138,128l54.49-41.19A14.08,14.08,0,0,0,198,75.64ZM186,180.36V216a2,2,0,0,1-2,2H72a2,2,0,0,1-2-2V180a2,2,0,0,1,.8-1.6L128,135.51l57.22,43.25A2,2,0,0,1,186,180.36Zm0-104.72a2,2,0,0,1-.79,1.6L128,120.49,70.8,77.6A2,2,0,0,1,70,76V40a2,2,0,0,1,2-2H184a2,2,0,0,1,2,2Z"},null,-1),ha=[ma],pa={key:4},ga=o("path",{d:"M200,75.64V40a16,16,0,0,0-16-16H72A16,16,0,0,0,56,40V76a16.07,16.07,0,0,0,6.4,12.8L114.67,128,62.4,167.2A16.07,16.07,0,0,0,56,180v36a16,16,0,0,0,16,16H184a16,16,0,0,0,16-16V180.36a16.09,16.09,0,0,0-6.35-12.77L141.27,128l52.38-39.6A16.05,16.05,0,0,0,200,75.64ZM184,216H72V180l56-42,56,42.35Zm0-140.36L128,118,72,76V40H184Z"},null,-1),ya=[ga],ba={key:5},ka=o("path",{d:"M196,75.64V40a12,12,0,0,0-12-12H72A12,12,0,0,0,60,40V76a12,12,0,0,0,4.8,9.6L121.33,128,64.8,170.4A12,12,0,0,0,60,180v36a12,12,0,0,0,12,12H184a12,12,0,0,0,12-12V180.36a12.05,12.05,0,0,0-4.76-9.57L134.63,128l56.61-42.79A12.05,12.05,0,0,0,196,75.64Zm-8,104.72V216a4,4,0,0,1-4,4H72a4,4,0,0,1-4-4V180a4,4,0,0,1,1.6-3.2L128,133l58.42,44.16A4,4,0,0,1,188,180.36Zm0-104.72a4,4,0,0,1-1.59,3.19L128,123,69.6,79.2A4,4,0,0,1,68,76V40a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4Z"},null,-1),_a=[ka],wa={name:"PhHourglass"},$a=te({...wa,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(k){const F=k,n=X("weight","regular"),f=X("size","1em"),_=X("color","currentColor"),L=X("mirrored",!1),m=$(()=>F.weight??n),y=$(()=>F.size??f),p=$(()=>F.color??_),g=$(()=>F.mirrored!==void 0?F.mirrored?"scale(-1, 1)":void 0:L?"scale(-1, 1)":void 0);return(d,M)=>(s(),r("svg",We({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:y.value,height:y.value,fill:p.value,transform:g.value},d.$attrs),[je(d.$slots,"default"),m.value==="bold"?(s(),r("g",na,sa)):m.value==="duotone"?(s(),r("g",la,ca)):m.value==="fill"?(s(),r("g",ua,fa)):m.value==="light"?(s(),r("g",va,ha)):m.value==="regular"?(s(),r("g",pa,ya)):m.value==="thin"?(s(),r("g",ba,_a)):H("",!0)],16,aa))}}),xa=["width","height","fill","transform"],Ca={key:0},Ma=o("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"},null,-1),Pa=[Ma],Fa={key:1},La=o("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"},null,-1),Ba=o("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"},null,-1),Za=[La,Ba],Aa={key:2},Sa=o("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"},null,-1),Da=[Sa],Va={key:3},Ha=o("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"},null,-1),Ea=[Ha],za={key:4},Ia=o("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"},null,-1),Na=[Ia],Ra={key:5},Ta=o("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"},null,-1),Ga=[Ta],Oa={name:"PhSpinner"},lt=te({...Oa,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(k){const F=k,n=X("weight","regular"),f=X("size","1em"),_=X("color","currentColor"),L=X("mirrored",!1),m=$(()=>F.weight??n),y=$(()=>F.size??f),p=$(()=>F.color??_),g=$(()=>F.mirrored!==void 0?F.mirrored?"scale(-1, 1)":void 0:L?"scale(-1, 1)":void 0);return(d,M)=>(s(),r("svg",We({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:y.value,height:y.value,fill:p.value,transform:g.value},d.$attrs),[je(d.$slots,"default"),m.value==="bold"?(s(),r("g",Ca,Pa)):m.value==="duotone"?(s(),r("g",Fa,Za)):m.value==="fill"?(s(),r("g",Aa,Da)):m.value==="light"?(s(),r("g",Va,Ea)):m.value==="regular"?(s(),r("g",za,Na)):m.value==="thin"?(s(),r("g",Ra,Ga)):H("",!0)],16,xa))}}),Ua=["width","height","fill","transform"],qa={key:0},Ka=o("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"},null,-1),ja=[Ka],Wa={key:1},Xa=o("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"},null,-1),Qa=o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"},null,-1),Ya=[Xa,Qa],Ja={key:2},en=o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"},null,-1),tn=[en],an={key:3},nn=o("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"},null,-1),on=[nn],sn={key:4},ln=o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"},null,-1),rn=[ln],cn={key:5},un=o("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"},null,-1),dn=[un],fn={name:"PhWarning"},rt=te({...fn,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(k){const F=k,n=X("weight","regular"),f=X("size","1em"),_=X("color","currentColor"),L=X("mirrored",!1),m=$(()=>F.weight??n),y=$(()=>F.size??f),p=$(()=>F.color??_),g=$(()=>F.mirrored!==void 0?F.mirrored?"scale(-1, 1)":void 0:L?"scale(-1, 1)":void 0);return(d,M)=>(s(),r("svg",We({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:y.value,height:y.value,fill:p.value,transform:g.value},d.$attrs),[je(d.$slots,"default"),m.value==="bold"?(s(),r("g",qa,ja)):m.value==="duotone"?(s(),r("g",Wa,Ya)):m.value==="fill"?(s(),r("g",Ja,tn)):m.value==="light"?(s(),r("g",an,on)):m.value==="regular"?(s(),r("g",sn,rn)):m.value==="thin"?(s(),r("g",cn,dn)):H("",!0)],16,Ua))}}),vn={key:0,class:"blame-overlay"},mn={class:"blame-header"},hn={class:"blame-filename"},pn=["title"],gn={key:0,class:"blame-truncated"},yn=["title","aria-label"],bn={key:0,class:"blame-loading"},kn={key:1,class:"blame-error"},_n={key:2,class:"blame-content"},wn={class:"blame-gutter"},$n=["title"],xn=["title"],Cn=["title"],Mn={class:"blame-line-no"},Pn={class:"blame-code"},Fn=te({__name:"CommanderBlame",props:{show:{type:Boolean},box:{},directory:{},path:{},token:{}},emits:["update:show"],setup(k,{emit:F}){const n=k,f=F,{t:_}=ye(),L=["rgba(167, 139, 250, 0.08)","rgba(56, 189, 248, 0.08)","rgba(52, 211, 153, 0.08)","rgba(251, 191, 36, 0.08)","rgba(248, 113, 113, 0.08)","rgba(244, 114, 182, 0.08)","rgba(45, 212, 191, 0.08)","rgba(163, 163, 163, 0.08)"],m=v([]),y=v(!1),p=v(null),g=v(!1),d=v(new Map);let M=0;const D=$(()=>{const c=n.path.split("/");return c[c.length-1]||n.path}),Z=$(()=>n.path||D.value),I=$(()=>m.value.map((c,P)=>{const w=P>0?m.value[P-1]:null,C=!w||w.commit!==c.commit;return{...c,isBlockStart:C,color:N(c.commit)}}));function N(c){return d.value.has(c)||d.value.set(c,L[d.value.size%L.length]),d.value.get(c)}function G(c){return c.length>12?`${c.slice(0,11)}…`:c}function V(){f("update:show",!1)}function E(c){n.show&&c.key==="Escape"&&(c.preventDefault(),V())}async function x(){const c=++M;if(!n.show||!n.path){m.value=[],y.value=!1,p.value=null,g.value=!1,d.value=new Map;return}y.value=!0,p.value=null,m.value=[],g.value=!1,d.value=new Map;try{const P=await $t(n.box,n.directory,n.path,n.token);if(c!==M)return;if(P.error){p.value=P.error;return}m.value=P.lines??[],g.value=P.truncated??!1}catch(P){if(c!==M)return;p.value=P instanceof Error?P.message:String(P)}finally{c===M&&(y.value=!1)}}return ee(()=>n.show,c=>{if(c){document.addEventListener("keydown",E);return}document.removeEventListener("keydown",E)},{immediate:!0}),ee(()=>[n.show,n.box,n.directory,n.path,n.token],async([c])=>{if(!c){M+=1,y.value=!1;return}await x()},{immediate:!0}),Ze(()=>{document.removeEventListener("keydown",E)}),(c,P)=>k.show?(s(),r("div",vn,[o("div",mn,[o("div",hn,[o("span",{class:"blame-path",title:Z.value},h(Z.value),9,pn),g.value?(s(),r("span",gn,h(b(_)("grep.truncated")),1)):H("",!0)]),o("button",{type:"button",class:"blame-close",title:b(_)("common.close"),"aria-label":b(_)("common.close"),onClick:V}," X ",8,yn)]),y.value?(s(),r("div",bn,[R(b(ze),{size:"large"})])):p.value?(s(),r("div",kn,h(p.value),1)):(s(),r("div",_n,[(s(!0),r(ce,null,ge(I.value,w=>(s(),r("div",{key:w.line_number,class:"blame-line",style:Oe({background:w.color})},[o("div",wn,[w.isBlockStart?(s(),r(ce,{key:0},[o("span",{class:"gutter-hash",title:w.commit},h(w.commit),9,$n),o("span",{class:"gutter-author",title:w.author},h(G(w.author)),9,xn),o("span",{class:"gutter-date",title:w.date},h(w.date),9,Cn)],64)):H("",!0)]),o("div",Mn,h(w.line_number),1),o("pre",Pn,h(w.content),1)],4))),128))]))])):H("",!0)}}),Ln=be(Fn,[["__scopeId","data-v-f5f21c62"]]),Bn={key:0,class:"diff-overlay"},Zn={class:"diff-header"},An={class:"diff-paths"},Sn=["title"],Dn={class:"diff-box-badge"},Vn={class:"diff-file-name"},Hn=["title"],En={class:"diff-box-badge"},zn={class:"diff-file-name"},In={key:0,class:"diff-nav"},Nn=["disabled"],Rn={class:"diff-counter"},Tn=["disabled"],Gn=["title"],On={class:"diff-body"},Un={key:0,class:"diff-loading"},qn={key:1,class:"diff-empty diff-error"},Kn={key:2,class:"diff-content"},jn={key:0,class:"diff-identical"},Wn={class:"diff-viewer-wrap"},Xn=te({__name:"CommanderDiffOverlay",props:{show:{type:Boolean},leftBox:{},rightBox:{},leftPath:{},rightPath:{},token:{},matchedPairs:{default:()=>[]},currentPairIndex:{default:0}},emits:["update:show","navigate-pair"],setup(k,{emit:F}){const n=k,f=F,{t:_}=ye(),L=v(""),m=v(""),y=v("text"),p=v(!1),g=v(null);let d=0;const M=$(()=>n.matchedPairs.length),D=$(()=>M.value>0),Z=$(()=>n.currentPairIndex??0),I=$(()=>!p.value&&!g.value&&L.value===m.value),N=$(()=>V(n.leftPath)),G=$(()=>V(n.rightPath));function V(C){const S=C.split("/").filter(Boolean);return S[S.length-1]||C}function E(C){const S=C.split(".").pop()?.toLowerCase();return{js:"javascript",jsx:"javascript",ts:"javascript",tsx:"javascript",py:"python",html:"html",htm:"html",css:"css",scss:"css",sass:"css",json:"json",md:"markdown",xml:"xml",svg:"xml"}[S||""]||"text"}function x(){f("update:show",!1)}function c(C){!D.value||C<0||C>=M.value||f("navigate-pair",C)}function P(C){if(n.show)switch(C.key){case"Escape":C.preventDefault(),x();break;case"ArrowLeft":if(!D.value)return;C.preventDefault(),c(Z.value-1);break;case"ArrowRight":if(!D.value)return;C.preventDefault(),c(Z.value+1);break}}async function w(){const C=++d;if(!n.show||!n.leftPath||!n.rightPath){L.value="",m.value="",y.value="text",g.value=null,p.value=!1;return}p.value=!0,g.value=null,L.value="",m.value="";try{const[S,T]=await Promise.all([Je(n.leftBox,n.leftPath,n.token),Je(n.rightBox,n.rightPath,n.token)]);if(C!==d)return;L.value=S.content??"",m.value=T.content??"";const q=E(n.leftPath),O=E(n.rightPath);y.value=q===O?q:"text"}catch(S){if(C!==d)return;g.value=S instanceof Error?S.message:String(S)}finally{C===d&&(p.value=!1)}}return ee(()=>n.show,C=>{if(C){document.addEventListener("keydown",P);return}document.removeEventListener("keydown",P)},{immediate:!0}),ee(()=>[n.show,n.leftBox,n.rightBox,n.leftPath,n.rightPath,n.token],async([C])=>{C||(d+=1),await w()},{immediate:!0}),Ze(()=>{document.removeEventListener("keydown",P)}),(C,S)=>k.show?(s(),r("div",Bn,[o("div",Zn,[o("div",An,[o("div",{class:"diff-file",title:k.leftPath},[o("span",Dn,h(k.leftBox),1),o("span",Vn,h(N.value),1)],8,Sn),o("div",{class:"diff-file",title:k.rightPath},[o("span",En,h(k.rightBox),1),o("span",zn,h(G.value),1)],8,Hn)]),D.value?(s(),r("div",In,[o("button",{type:"button",disabled:Z.value<=0,onClick:S[0]||(S[0]=T=>c(Z.value-1))},"Prev",8,Nn),o("span",Rn,h(Z.value+1)+" of "+h(M.value),1),o("button",{type:"button",disabled:Z.value>=M.value-1,onClick:S[1]||(S[1]=T=>c(Z.value+1))},"Next",8,Tn)])):H("",!0),o("button",{type:"button",class:"diff-close",title:b(_)("common.close"),onClick:x},"X",8,Gn)]),o("div",On,[p.value?(s(),r("div",Un,[R(b(ze),{size:"large"})])):g.value?(s(),r("div",qn,h(g.value),1)):(s(),r("div",Kn,[I.value?(s(),r("div",jn,h(b(_)("commander.files_identical")),1)):H("",!0),o("div",Wn,[R(jt,{original:L.value,modified:m.value,language:y.value,style:{height:"100%"}},null,8,["original","modified","language"])])]))])])):H("",!0)}}),Qn=be(Xn,[["__scopeId","data-v-35a730bb"]]),Yn={class:"git-log-panel",role:"dialog","aria-modal":"true"},Jn={class:"git-log-header"},eo={class:"git-log-title"},to={key:0,class:"git-log-loading"},ao={key:1,class:"git-log-list"},no=["onClick"],oo={class:"commit-hash"},so={class:"commit-msg"},lo={class:"commit-author"},ro={class:"commit-date"},io={key:0,class:"git-log-empty"},co={key:0,class:"git-log-loading"},uo={key:1,class:"git-log-list"},fo=["onClick"],vo={key:2,class:"branch-commit"},mo={key:0,class:"git-log-empty"},ho=te({__name:"CommanderGitLog",props:{show:{type:Boolean},box:{},directory:{},token:{}},emits:["update:show","select-commit","select-branch"],setup(k,{emit:F}){const n=k,f=F,{t:_}=ye(),L=v("commits"),m=v([]),y=v([]),p=v(!1),g=v(!1);let d=0;function M(c,P){return c.length<=P?c:P<=3?c.slice(0,P):`${c.slice(0,P-3)}...`}function D(c,P){const w=_(c);return w===c?P:w}function Z(c){const P=new Date(c),C=new Date().getTime()-P.getTime(),S=Math.floor(C/6e4);if(S<1)return"just now";if(S<60)return`${S}m ago`;const T=Math.floor(S/60);if(T<24)return`${T}h ago`;const q=Math.floor(T/24);if(q<30)return`${q}d ago`;const O=Math.floor(q/30);return O<12?`${O}mo ago`:`${Math.floor(O/12)}y ago`}function I(){f("update:show",!1)}function N(c){f("select-commit",c),I()}function G(c){f("select-branch",c),I()}function V(){p.value=!1,g.value=!1}async function E(){const c=++d;p.value=!0,g.value=!0,m.value=[],y.value=[];const P=xt(n.box,n.directory,n.token,50).then(C=>{c===d&&(m.value=C.is_repo?C.commits:[])}).catch(()=>{c===d&&(m.value=[])}).finally(()=>{c===d&&(p.value=!1)}),w=Ct(n.box,n.directory,n.token).then(C=>{c===d&&(y.value=C.is_repo?C.branches:[])}).catch(()=>{c===d&&(y.value=[])}).finally(()=>{c===d&&(g.value=!1)});await Promise.allSettled([P,w])}function x(c){n.show&&c.key==="Escape"&&(c.preventDefault(),c.stopPropagation(),I())}return ee(()=>n.show,c=>{if(c){document.addEventListener("keydown",x,!0);return}document.removeEventListener("keydown",x,!0)},{immediate:!0}),ee(()=>[n.show,n.box,n.directory,n.token],([c,P,w,C],S)=>{if(!c){d+=1,V();return}const[T,q,O,xe]=S??[!1,"","",null],K=!T||P!==q||w!==O||C!==xe;T||(L.value="commits"),K&&E()},{immediate:!0}),Ze(()=>{document.removeEventListener("keydown",x,!0)}),(c,P)=>k.show?(s(),r("div",{key:0,class:"git-log-backdrop",onClick:Be(I,["self"])},[o("div",Yn,[o("div",Jn,[o("span",eo,h(D("commander.git_history","Git history")),1),o("button",{type:"button",class:"git-log-close",onClick:I},"×")]),R(b(Qt),{value:L.value,"onUpdate:value":P[0]||(P[0]=w=>L.value=w),type:"segment",size:"small",animated:"",class:"git-log-tabs"},{default:$e(()=>[R(b(st),{name:"commits",tab:D("commander.git_commits","Commits")},{default:$e(()=>[p.value?(s(),r("div",to,[R(b(ze),{size:"small"})])):(s(),r("div",ao,[(s(!0),r(ce,null,ge(m.value,w=>(s(),r("div",{key:w.hash,class:"git-log-row",onClick:C=>N(w)},[o("span",oo,h(w.short_hash),1),o("span",so,h(M(w.message,50)),1),o("span",lo,h(w.author),1),o("span",ro,h(Z(w.date)),1)],8,no))),128)),m.value.length===0?(s(),r("div",io,h(D("commander.no_commits","No commits")),1)):H("",!0)]))]),_:1},8,["tab"]),R(b(st),{name:"branches",tab:D("commander.git_branches","Branches")},{default:$e(()=>[g.value?(s(),r("div",co,[R(b(ze),{size:"small"})])):(s(),r("div",uo,[(s(!0),r(ce,null,ge(y.value,w=>(s(),r("div",{key:w.name,class:"git-log-row branch-row",onClick:C=>G(w)},[w.is_current?(s(),U(b(Ke),{key:0,weight:"duotone",class:"branch-check"})):(s(),U(b(Xt),{key:1,weight:"duotone",class:"branch-icon"})),o("span",{class:ie(["branch-name",{current:w.is_current}])},h(w.name),3),w.last_commit?(s(),r("span",vo,h(M(w.last_commit,24)),1)):H("",!0)],8,fo))),128)),y.value.length===0?(s(),r("div",mo,h(D("commander.no_branches","No branches")),1)):H("",!0)]))]),_:1},8,["tab"])]),_:1},8,["value"])])])):H("",!0)}}),po=be(ho,[["__scopeId","data-v-6ec6102b"]]),go={class:"help-panel"},yo={class:"help-header"},bo={class:"help-title"},ko={class:"help-body"},_o={class:"help-key"},wo={class:"help-action"},$o=te({__name:"CommanderHelpOverlay",props:{show:{type:Boolean}},emits:["update:show"],setup(k,{emit:F}){const n=k,f=F,{t:_}=ye(),L=[{key:"Tab",action:"Switch active pane"},{key:"↑ / ↓",action:"Navigate files"},{key:"Enter",action:"Open directory / preview file"},{key:"Backspace",action:"Go to parent directory"},{key:"Home",action:"Go to home (~)"},{key:"Space",action:"Toggle select file"},{key:"*",action:"Select all / deselect all"},{key:"Shift+Click",action:"Range select"},{key:"Ctrl+Click",action:"Toggle select"},{key:"F1",action:"This help"},{key:"F3",action:"Compare files between panes"},{key:"F4",action:"Edit file in CodeMirror editor"},{key:"F5",action:"Copy to other pane"},{key:"F6",action:"Move to other pane"},{key:"F7",action:"Create new directory"},{key:"F8",action:"Delete selected files"},{key:"F10",action:"Quit (go back)"},{key:"Ctrl+F",action:"Search/filter files in pane"},{key:"Ctrl+G",action:"Git log / branch picker"},{key:"Ctrl+B",action:"Git blame for cursor file"},{key:"Escape",action:"Close overlay / clear filter"}];function m(){f("update:show",!1)}function y(p){n.show&&(p.key==="Escape"||p.key==="F1")&&(p.preventDefault(),p.stopPropagation(),m())}return ee(()=>n.show,p=>{p?document.addEventListener("keydown",y,!0):document.removeEventListener("keydown",y,!0)},{immediate:!0}),Ze(()=>document.removeEventListener("keydown",y,!0)),(p,g)=>k.show?(s(),r("div",{key:0,class:"help-overlay",onClick:Be(m,["self"])},[o("div",go,[o("div",yo,[o("span",bo,h(b(_)("commander.help_title")),1),o("button",{class:"help-close",onClick:m},"×")]),o("div",ko,[(s(),r(ce,null,ge(L,d=>o("div",{key:d.key,class:"help-row"},[o("span",_o,h(d.key),1),o("span",wo,h(d.action),1)])),64))])])])):H("",!0)}}),xo=be($o,[["__scopeId","data-v-70affbbb"]]),Co={class:"hotbar"},Mo=["onClick"],Po={class:"key-num"},Fo={class:"key-label"},Lo=te({__name:"CommanderHotbar",emits:["action"],setup(k,{emit:F}){const n=F,{t:f}=ye(),_=$(()=>[{key:"F1",label:"Help"},{key:"F3",label:f("commander.compare")},{key:"F4",label:"Edit"},{key:"F5",label:f("commander.copy")+"→"},{key:"F6",label:f("commander.move")+"→"},{key:"F7",label:"Mkdir"},{key:"F8",label:"Delete"},{key:"F10",label:"Quit"}]);return(L,m)=>(s(),r("div",Co,[(s(!0),r(ce,null,ge(_.value,y=>(s(),r("div",{key:y.key,class:"hotbar-key",onClick:p=>n("action",y.key)},[o("span",Po,h(y.key),1),o("span",Fo,h(y.label),1)],8,Mo))),128))]))}}),Bo=be(Lo,[["__scopeId","data-v-e6a80aa2"]]),Zo={class:"pane-header"},Ao=["title"],So=["onClick"],Do={class:"crumb-text"},Vo={key:0,class:"crumb-separator"},Ho={key:0,class:"filter-bar"},Eo=["placeholder","onKeydown"],zo={key:0,class:"empty-state"},Io={key:1,class:"empty-state error-state"},No=["data-index","title","onClick","onDblclick"],Ro={key:0,class:"match-indicator",title:"Has match in other pane"},To={key:1,class:"branch-changed-indicator",title:"Changed between branches"},Go={class:"size"},Oo={class:"date"},Uo={class:"perms"},qo={key:0,class:"empty-state"},Ko={class:"pane-footer"},jo=te({__name:"CommanderPane",props:{box:{},directory:{},selected:{},active:{type:Boolean},token:{},boxOptions:{},favorites:{},matchedFiles:{},branchChangedFiles:{},matchedSizes:{}},emits:["update:box","update:directory","update:selected","focus","open-git-log","open-blame"],setup(k,{expose:F,emit:n}){const f=k,_=n,{t:L}=ye(),m=v(!1),y=v(null),p=v(null),g=v(null),d=v(0),M=v(null),D=v(null),Z=v(""),I=v(!1),N=v(null);let G=0,V=0;const E=$(()=>{const a=[];for(const l of f.boxOptions){const u=Mt(l.name),A=f.favorites?.get(l.name)??[];if(A.length===0){a.push({label:`${u} ${l.name}`,value:l.name});continue}a.push({type:"group",label:`${u} ${l.name}`,key:l.name,children:[{label:`${u} ${l.name} (home)`,value:l.name},...A.map(z=>({label:` 📁 ${z.split("/").filter(Boolean).pop()||z}`,value:`${l.name}::${z}`}))]})}return a}),x=$(()=>{const l={key:"__parent__",name:"..",path:T(f.directory),is_directory:!0,size:null,modified:null,mode:null,isParent:!0},u=[...p.value?.entries??[]].sort((A,z)=>A.is_directory!==z.is_directory?A.is_directory?-1:1:A.name.localeCompare(z.name));return[l,...u.map(A=>({...A,key:A.path}))]}),c=$(()=>{if(!Z.value)return x.value;const a=Z.value.toLowerCase();return x.value.filter(l=>l.isParent||l.name.toLowerCase().includes(a))}),P=$(()=>{const a=c.value.filter(l=>!l.isParent).length;return L("commander.files_count",{count:a})}),w=$(()=>{const a=c.value.filter(l=>!l.isParent).reduce((l,u)=>l+(u.size??0),0);return O(a)}),C=$(()=>q(f.directory));function S(a){return a||"~"}function T(a){const l=S(a).replace(/\/+$/,"");if(!l||l==="/"||l==="~")return l||"~";if(l.startsWith("~/"))return l.replace(/\/[^/]+$/,"")||"~";const u=l.lastIndexOf("/");return u<=0?"/":l.slice(0,u)||"/"}function q(a){const l=S(a);if(l==="~")return[{label:"~",path:"~"}];if(l==="/")return[{label:"/",path:"/"}];if(l.startsWith("~/")){const W=l.slice(2).split("/").filter(Boolean),Me=[{label:"~",path:"~"}];let le="~";for(const He of W)le=`${le}/${He}`,Me.push({label:He,path:le});return Me}const u=l.split("/").filter(Boolean),A=[{label:"/",path:"/"}];let z="";for(const W of u)z=`${z}/${W}`,A.push({label:W,path:z});return A}function O(a){return a==null?"-":a<1024?`${a}B`:a<1024*1024?`${(a/1024).toFixed(1)}K`:a<1024*1024*1024?`${(a/(1024*1024)).toFixed(1)}M`:`${(a/(1024*1024*1024)).toFixed(1)}G`}function xe(a){if(!a)return"-";const l=new Date(a*1e3),u=new Date,A=l.toDateString()===u.toDateString(),z=l.getFullYear()===u.getFullYear();return A?new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(l):z?new Intl.DateTimeFormat(void 0,{month:"short",day:"2-digit"}).format(l):new Intl.DateTimeFormat(void 0,{year:"numeric"}).format(l)}function K(a){if(a==null)return"---------";const l=a&511,u=[256,128,64,32,16,8,4,2,1],A=["r","w","x","r","w","x","r","w","x"];return u.map((z,W)=>l&z?A[W]:"-").join("")}function Pe(a){return a.isParent?Yt:a.is_directory?At:Wt}function ke(a){return a.isParent?"<UP>":a.is_directory?"<DIR>":O(a.size)}function ue(a){const l=f.matchedSizes?.get(a.name);return l==null||a.size==null?"":a.size<l?"size-smaller":a.size>l?"size-larger":"size-equal"}function Fe(a){const l=f.matchedSizes?.get(a.name);if(l==null||a.size==null)return"";const u=a.size-l;return u===0?"=":u>0?`+${O(u)}`:`-${O(Math.abs(u))}`}function fe(){I.value=!0,Z.value="",tt(()=>N.value?.focus())}function Ce(){I.value=!1,Z.value=""}function ve(a){return!a.isParent&&f.selected.includes(a.path)}function ae(){_("focus")}function me(a){d.value=Math.max(0,Math.min(x.value.length-1,a)),_e()}function _e(){tt(()=>{const a=D.value;if(!a)return;a.querySelector(`[data-index="${d.value}"]`)?.scrollIntoView({block:"nearest"})})}function Ae(a){me(d.value+a)}function ne(a){_("update:directory",a),_("update:selected",[]),M.value=null,d.value=0}function he(){const a=x.value[d.value];if(a){if(a.isParent||a.is_directory){ne(a.path);return}_("update:selected",[a.path])}}function Se(){ne(T(f.directory))}function De(){ne("~")}function de(){const a=x.value[d.value];if(!(!a||a.isParent)){if(f.selected.includes(a.path)){_("update:selected",f.selected.filter(l=>l!==a.path));return}_("update:selected",[...f.selected,a.path])}}function oe(){const a=x.value.filter(u=>!u.isParent).map(u=>u.path);a.length>0&&a.every(u=>f.selected.includes(u))?_("update:selected",[]):_("update:selected",a)}function se(){return x.value[d.value]??null}async function j(){const a=++G;m.value=!0,y.value=null;try{const l=await St(f.box,S(f.directory),f.token);if(a!==G)return;p.value=l,d.value=0,_e()}catch(l){if(a!==G)return;p.value=null,y.value=l instanceof Error?l.message:String(l)}finally{a===G&&(m.value=!1)}}async function pe(){const a=++V;try{const l=await Dt(f.box,S(f.directory),f.token);if(a!==V)return;g.value=l}catch{if(a!==V)return;g.value=null}}async function Ie(){await j(),pe()}function Ne(a,l,u){if(ae(),me(l),a.isParent){_("update:selected",[]),M.value=null;return}if(u.shiftKey&&M.value!==null){const A=Math.min(M.value,l),z=Math.max(M.value,l),W=x.value.slice(A,z+1).filter(le=>!le.isParent).map(le=>le.path),Me=new Set([...f.selected,...W]);_("update:selected",[...Me])}else u.ctrlKey||u.metaKey?f.selected.includes(a.path)?_("update:selected",f.selected.filter(A=>A!==a.path)):_("update:selected",[...f.selected,a.path]):_("update:selected",[]);M.value=l}function Q(a,l,u){Ne(a,l,u)}function Re(a,l){me(l),he()}function Te(a){if(ae(),!!a){if(a.includes("::")){const[l,u]=a.split("::",2);if(!l||!u)return;l!==f.box&&_("update:box",l),u!==f.directory&&_("update:directory",u);return}a!==f.box&&_("update:box",a),f.directory!=="~"&&_("update:directory","~")}}function Ve(a){ae(),ne(a)}function we(){g.value?.is_repo&&_("open-git-log")}return ee(()=>[f.box,f.directory,f.token],async()=>{_("update:selected",[]),M.value=null,await Promise.all([j(),pe()])},{immediate:!0}),ee(()=>x.value.length,()=>{d.value>=x.value.length&&(d.value=Math.max(0,x.value.length-1))}),F({moveCursor:Ae,activateCurrent:he,goUp:Se,goHome:De,toggleSelectCurrent:de,rows:x,cursorIndex:d,getCursorFile:se,selectAll:oe,reload:Ie,openSearch:fe}),(a,l)=>(s(),r("section",{class:ie(["commander-pane",{active:k.active,inactive:!k.active}]),tabindex:"0",onFocusin:ae,onMousedown:ae},[o("div",Zo,[R(b(Ft),{value:k.box,size:"tiny",options:E.value,class:"box-select","onUpdate:value":Te},null,8,["value","options"]),o("div",{class:"breadcrumb",title:k.directory},[(s(!0),r(ce,null,ge(C.value,(u,A)=>(s(),r("span",{key:u.path,class:"crumb",onClick:z=>Ve(u.path)},[o("span",Do,h(u.label),1),A<C.value.length-1?(s(),r("span",Vo,"/")):H("",!0)],8,So))),128))],8,Ao),o("div",{class:"git-wrap",onClick:Be(we,["stop"])},[g.value?.is_repo?(s(),U(ea,{key:0,info:g.value,compact:""},null,8,["info"])):H("",!0)])]),l[3]||(l[3]=Pt('<div class="column-header" data-v-8de6b21d><span class="name" data-v-8de6b21d>Name</span><span class="size" data-v-8de6b21d>Size</span><span class="date" data-v-8de6b21d>Modified</span><span class="perms" data-v-8de6b21d>Perms</span></div>',1)),I.value?(s(),r("div",Ho,[Ue(o("input",{ref_key:"filterInputRef",ref:N,"onUpdate:modelValue":l[0]||(l[0]=u=>Z.value=u),class:"filter-input",type:"text",placeholder:b(L)("commander.filter_placeholder"),onKeydown:[et(Be(Ce,["stop"]),["escape"]),l[1]||(l[1]=et(Be(()=>{},["stop"]),["enter"]))]},null,40,Eo),[[Lt,Z.value]]),o("button",{class:"filter-close",onClick:Ce},"×")])):H("",!0),(s(),r("div",{ref_key:"listRef",ref:D,class:"file-list",key:`${k.box}-${k.directory}`},[m.value?(s(),r("div",zo,h(b(L)("common.loading")),1)):y.value?(s(),r("div",Io,h(y.value),1)):(s(),r(ce,{key:2},[(s(!0),r(ce,null,ge(c.value,(u,A)=>(s(),r("div",{key:u.key,class:ie(["file-row",{cursor:A===d.value,selected:ve(u)}]),"data-index":A,title:u.isParent?b(L)("commander.parent_dir"):u.path,onClick:z=>Q(u,A,z),onDblclick:z=>Re(u,A)},[R(b(Zt),{size:"14",class:ie(["row-icon",{"dir-icon":u.is_directory||u.isParent}])},{default:$e(()=>[(s(),U(Bt(Pe(u)),{weight:"duotone"}))]),_:2},1032,["class"]),o("span",{class:ie(["name",{"dir-name":u.is_directory||u.isParent}])},h(u.name),3),k.matchedFiles?.has(u.name)?(s(),r("span",Ro,"≡")):H("",!0),k.branchChangedFiles?.has(u.name)?(s(),r("span",To,"~")):H("",!0),o("span",Go,[qe(h(ke(u))+" ",1),!u.isParent&&!u.is_directory&&k.matchedSizes?.has(u.name)?(s(),r("span",{key:0,class:ie(["size-delta",ue(u)])},h(Fe(u)),3)):H("",!0)]),o("span",Oo,h(xe(u.modified)),1),o("span",Uo,h(K(u.mode)),1)],42,No))),128)),x.value.length===1?(s(),r("div",qo,h(b(L)("commander.no_files")),1)):H("",!0)],64))])),o("div",Ko,[o("span",null,h(P.value),1),o("span",null,"Total "+h(w.value),1),l[2]||(l[2]=o("span",null,"Free --",-1))])],34))}}),it=be(jo,[["__scopeId","data-v-8de6b21d"]]),Wo={class:"transfer-modal"},Xo={class:"transfer-header"},Qo={class:"transfer-heading"},Yo={class:"transfer-heading-icon"},Jo={class:"transfer-heading-text"},es={class:"transfer-title"},ts={class:"transfer-dest"},as={class:"transfer-files"},ns={class:"file-status-icon"},os={class:"file-name"},ss={key:0,class:"file-progress"},ls=["title"],rs={key:0,class:"transfer-current"},is={class:"current-label"},cs={class:"transfer-overall"},us={class:"overall-label"},ds={key:1,class:"transfer-error"},fs={class:"transfer-footer"},vs=te({__name:"CommanderTransferProgress",props:{show:{type:Boolean},mode:{},srcBox:{},destBox:{},destination:{},files:{},progress:{},result:{},error:{}},emits:["cancel","close"],setup(k,{emit:F}){const n=k,f=F,{t:_}=ye(),L=$(()=>n.show&&!n.result&&!n.error),m=$(()=>!!n.result),y=$(()=>(n.result?.failed.length??0)>0),p=$(()=>n.progress?.file??null),g=$(()=>{if(!p.value)return"";const V=p.value.split("/");return V[V.length-1]||p.value}),d=$(()=>!n.progress||!n.progress.bytes_total?0:Math.round(n.progress.bytes_done/n.progress.bytes_total*100)),M=$(()=>n.result?n.files.length:n.progress?.index??0),D=$(()=>n.files.length?n.result?100:Math.round(M.value/n.files.length*100):0),Z=$(()=>`${n.mode==="move"?_("commander.move"):_("commander.copy")} ${n.files.length} file${n.files.length!==1?"s":""} -> ${n.destBox}`);function I(V){const E=V.split("/");return E[E.length-1]||V}function N(V){return n.result?n.result.failed.some(x=>x.path===V)?"failed":"done":n.progress?n.progress.file===V?"active":n.files.indexOf(V)<(n.progress.index??0)?"done":"pending":"pending"}function G(V){return n.result?.failed.find(x=>x.path===V)?.error??null}return(V,E)=>(s(),U(b(Vt),{show:k.show,"mask-closable":!L.value,"onUpdate:show":E[2]||(E[2]=x=>!x&&f("close"))},{default:$e(()=>[o("div",Wo,[o("div",Xo,[o("div",Qo,[o("span",Yo,[L.value?(s(),U(b(lt),{key:0,weight:"duotone",class:"heading-running"})):k.error||y.value?(s(),U(b(rt),{key:1,weight:"duotone",class:"heading-warning"})):m.value?(s(),U(b(Ke),{key:2,weight:"duotone",class:"heading-done"})):H("",!0)]),o("div",Jo,[o("span",es,h(Z.value),1),o("span",ts,h(k.srcBox)+" -> "+h(k.destBox)+" · "+h(k.destination),1)])])]),o("div",as,[(s(!0),r(ce,null,ge(k.files,x=>(s(),r("div",{key:x,class:ie(["transfer-file-row",N(x)])},[o("span",ns,[N(x)==="done"?(s(),U(b(Ke),{key:0,weight:"duotone",class:"status-done"})):N(x)==="active"?(s(),U(b(lt),{key:1,weight:"duotone",class:"status-active"})):N(x)==="pending"?(s(),U(b($a),{key:2,weight:"duotone",class:"status-pending"})):(s(),U(b(Ht),{key:3,weight:"duotone",class:"status-failed"}))]),o("span",os,h(I(x)),1),N(x)==="active"&&k.progress?(s(),r("span",ss,h(d.value)+"% ",1)):H("",!0),N(x)==="failed"?(s(),r("span",{key:1,class:"file-error",title:G(x)||""},h(G(x)),9,ls)):H("",!0)],2))),128))]),L.value&&k.progress?(s(),r("div",rs,[o("div",is,h(g.value),1),R(b(at),{percentage:d.value,"show-indicator":!1,height:4,color:"#a78bfa","rail-color":"#1a1a24"},null,8,["percentage"])])):H("",!0),o("div",cs,[o("div",us,h(M.value)+" / "+h(k.files.length)+" files",1),R(b(at),{percentage:D.value,"show-indicator":!1,height:6,color:"#a78bfa","rail-color":"#1a1a24"},null,8,["percentage"])]),k.error?(s(),r("div",ds,[R(b(rt),{weight:"duotone",class:"transfer-error-icon"}),o("span",null,h(k.error),1)])):H("",!0),o("div",fs,[L.value?(s(),U(b(nt),{key:0,type:"error",size:"small",ghost:"",onClick:E[0]||(E[0]=x=>f("cancel"))},{default:$e(()=>[qe(h(b(_)("commander.transfer_cancel")),1)]),_:1})):(s(),U(b(nt),{key:1,size:"small",onClick:E[1]||(E[1]=x=>f("close"))},{default:$e(()=>[qe(h(b(_)("common.close")),1)]),_:1}))])])]),_:1},8,["show","mask-closable"]))}}),ms=be(vs,[["__scopeId","data-v-b1e65aed"]]),hs={class:"commander"},ps={key:0,class:"mobile-pane-toggle"},ct="sshler:commander:config",gs=te({__name:"CommanderView",setup(k){const F=Gt(),n=Et(),f=zt(),_=ta(),L=It(),m=Nt(),{t:y}=ye(),p=$(()=>n.token||n.payload?.token||null),g=v("left"),d=v("local"),M=v("~"),D=v("local"),Z=v("~"),I=v([]),N=v([]),G=v(!1),V=v(""),E=v(""),x=v(0),c=v(!1),P=v("copy"),w=v([]),C=v(null),S=v(null),T=v(null),q=v(""),O=v(""),xe=v("");let K=null;const Pe=v(!1),ke=v([]),ue=v(50),Fe=v(!1),fe=v(!1),Ce=v("left"),ve=v(!1),ae=v(""),me=v(""),_e=v(""),Ae=v(new Set),ne=v(!1),he=v(!1),Se=v(""),De=v(""),{isMobile:de}=Rt(),oe=v(null),se=v(null),j=$(()=>g.value==="left"?oe.value:se.value);function pe(t){return!!(t&&!t.isParent&&!t.is_directory)}const Ie=$(()=>{const t=oe.value,e=new Map;if(!t)return e;for(const i of t.rows??[])pe(i)&&e.set(i.name,i.path);return e}),Ne=$(()=>{const t=se.value,e=new Map;if(!t)return e;for(const i of t.rows??[])pe(i)&&e.set(i.name,i.path);return e}),Q=$(()=>{const t=[];for(const[e,i]of Ie.value){const B=Ne.value.get(e);B&&t.push({leftPath:i,rightPath:B,name:e})}return t.sort((e,i)=>e.name.localeCompare(i.name))}),Re=$(()=>new Set(Q.value.map(t=>t.name))),Te=$(()=>new Set(Q.value.map(t=>t.name))),Ve=$(()=>{const t=new Map;for(const e of f.items){const i=_.favoritesForBox(e.name);i.size>0&&t.set(e.name,[...i])}return t});function we(){const t=g.value==="left";return{box:t?d.value:D.value,dir:t?M.value:Z.value,selected:t?I.value:N.value,paneRef:t?oe.value:se.value,otherBox:t?D.value:d.value,otherDir:t?Z.value:M.value,otherPaneRef:t?se.value:oe.value}}function a(){oe.value?.reload(),se.value?.reload()}function l(){L.activeBox=g.value==="left"?d.value:D.value,L.activeDir=g.value==="left"?M.value:Z.value}function u(t){return t instanceof HTMLElement?t.isContentEditable||t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"?!0:!!(t.closest(".n-base-selection")||t.closest(".n-input")):!1}function A(t,e,i=0){V.value=t,E.value=e,x.value=Math.max(0,i),G.value=!0}function z(){ne.value=!ne.value}function W(){const t=we(),e=t.paneRef?.getCursorFile();if(!e||e.isParent||e.is_directory){m.warning(y("commander.select_file_to_edit"));return}Se.value=t.box,De.value=e.path,he.value=!0}function Me(){he.value=!1,we().paneRef?.reload()}function le(){const t=I.value.length===1?I.value[0]:null,e=N.value.length===1?N.value[0]:null;if(t&&e){const Y=Q.value.findIndex(J=>J.leftPath===t&&J.rightPath===e);A(t,e,Y);return}const i=oe.value?.getCursorFile(),B=se.value?.getCursorFile();if(pe(i)&&pe(B)){const Y=Q.value.findIndex(J=>J.leftPath===i.path&&J.rightPath===B.path||J.name===i.name);A(i.path,B.path,Y);return}const Le=j.value?.getCursorFile();if(pe(Le)){const Y=Q.value.find(J=>J.name===Le.name);if(Y){A(Y.leftPath,Y.rightPath,Q.value.indexOf(Y));return}}const re=Q.value[0];if(re){A(re.leftPath,re.rightPath,0);return}m.warning(y("commander.no_matches"))}function He(t){const e=Q.value[t];e&&A(e.leftPath,e.rightPath,t)}async function Ee(t){const e=we();let i=[...e.selected];if(i.length===0){const B=e.paneRef?.getCursorFile();B&&!B.isParent&&!B.is_directory&&(i=[B.path])}if(i.length===0){m.warning(y("commander.no_selection"));return}if(e.box===e.otherBox&&e.dir===e.otherDir){m.warning(y("commander.same_directory"));return}if(P.value=t,w.value=i,C.value=null,S.value=null,T.value=null,q.value=e.box,O.value=e.otherBox,xe.value=e.otherDir,K=null,c.value=!0,e.box===e.otherBox){try{const B=await Ot(e.box,i,e.otherDir,t,p.value);S.value={succeeded:B.succeeded,failed:B.failed},a()}catch(B){T.value=B instanceof Error?B.message:String(B)}return}K=Ut(e.box,e.otherBox,i,e.otherDir,t,p.value,B=>{C.value=B},B=>{S.value=B,K=null,a()},B=>{T.value=B,K=null})}function ut(){K?.abort(),K=null,T.value="Cancelled"}function dt(){c.value=!1,K=null}async function Xe(){const t=we(),e=window.prompt(y("commander.mkdir_prompt"));if(e?.trim())try{await qt(t.box,t.dir,e.trim(),p.value),t.paneRef?.reload()}catch(i){m.error(i instanceof Error?i.message:String(i))}}async function Qe(){const t=we();let e=[...t.selected];if(e.length===0){const B=t.paneRef?.getCursorFile();B&&!B.isParent&&(e=[B.path])}if(e.length===0)return;ke.value=e,Pe.value=!0;const i=Pe.value&&window.confirm(y("commander.delete_confirm",{count:ke.value.length}));if(Pe.value=!1,!i){ke.value=[];return}try{await Kt(t.box,ke.value,p.value),g.value==="left"?I.value=[]:N.value=[],ke.value=[],t.paneRef?.reload()}catch(B){m.error(B instanceof Error?B.message:String(B))}}function Ge(t){Ce.value=t,fe.value=!0}function ft(t){fe.value=!1,m.info(`Commit: ${t.short_hash} — ${t.message}`,{duration:5e3})}function vt(t){fe.value=!1,m.info(`Branch: ${t.name}`,{duration:3e3})}function mt(t){const e=t==="left",i=e?d.value:D.value,B=e?M.value:Z.value,re=(e?oe.value:se.value)?.getCursorFile();if(!re||re.isParent||re.is_directory){m.warning(y("commander.select_file_for_blame"));return}ae.value=i,me.value=B,_e.value=re.path,ve.value=!0}function ht(t){switch(t){case"F1":z();break;case"F3":le();break;case"F4":W();break;case"F5":Ee("copy");break;case"F6":Ee("move");break;case"F7":Xe();break;case"F8":Qe();break;case"F10":window.history.back();break}}function Ye(t){if(!u(t.target)&&!(G.value||c.value||fe.value||ve.value||ne.value||he.value))switch(t.key){case"g":t.ctrlKey&&(t.preventDefault(),Ge(g.value));break;case"b":t.ctrlKey&&(t.preventDefault(),mt(g.value));break;case"F1":t.preventDefault(),z();break;case"Tab":t.preventDefault(),g.value=g.value==="left"?"right":"left";break;case"ArrowUp":t.preventDefault(),j.value?.moveCursor(-1);break;case"ArrowDown":t.preventDefault(),j.value?.moveCursor(1);break;case"Enter":t.preventDefault(),j.value?.activateCurrent();break;case"Backspace":t.preventDefault(),j.value?.goUp();break;case"Home":t.preventDefault(),j.value?.goHome();break;case" ":t.preventDefault(),j.value?.toggleSelectCurrent();break;case"F3":t.preventDefault(),le();break;case"F4":t.preventDefault(),W();break;case"f":t.ctrlKey&&(t.preventDefault(),j.value?.openSearch());break;case"F5":t.preventDefault(),Ee("copy");break;case"F6":t.preventDefault(),Ee("move");break;case"F7":t.preventDefault(),Xe();break;case"F8":t.preventDefault(),Qe();break;case"*":t.preventDefault(),j.value?.selectAll();break;case"F10":t.preventDefault(),window.history.back();break}}function pt(t){const i=t.currentTarget?.parentElement;if(!i)return;Fe.value=!0,document.body.style.userSelect="none",document.body.style.cursor="col-resize";const B=t.clientX,Le=ue.value,re=i.offsetWidth,Y=kt=>{const _t=kt.clientX-B,wt=Le+_t/re*100;ue.value=Math.max(20,Math.min(80,wt))},J=()=>{Fe.value=!1,document.body.style.userSelect="",document.body.style.cursor="",document.removeEventListener("mousemove",Y),document.removeEventListener("mouseup",J)};document.addEventListener("mousemove",Y),document.addEventListener("mouseup",J)}function gt(){localStorage.setItem(ct,JSON.stringify({leftBox:d.value,leftDir:M.value,rightBox:D.value,rightDir:Z.value,splitPercent:ue.value}))}function yt(){try{const t=localStorage.getItem(ct);if(!t)return;const e=JSON.parse(t);e.leftBox&&(d.value=e.leftBox),e.leftDir&&(M.value=e.leftDir),e.rightBox&&(D.value=e.rightBox),e.rightDir&&(Z.value=e.rightDir),typeof e.splitPercent=="number"&&(ue.value=e.splitPercent)}catch{}}async function bt(){!n.payload&&!n.loading&&await n.bootstrap(),!f.items.length&&!f.loading&&await f.load(p.value),f.items.length&&_.hydrateFromBoxes(f.items)}return ee([d,M,D,Z,ue],gt),ee([d,M,D,Z,g],l,{immediate:!0}),Tt(async()=>{document.title=`${y("commander.title")} - sshler`,await bt(),yt();const t=typeof F.query.box=="string"?F.query.box:null,e=typeof F.query.dir=="string"?F.query.dir:null;t&&(d.value=t),e&&(M.value=e),l(),document.addEventListener("keydown",Ye)}),Ze(()=>{K?.abort(),K=null,document.removeEventListener("keydown",Ye),document.body.style.userSelect="",document.body.style.cursor=""}),(t,e)=>(s(),r("div",hs,[b(de)?(s(),r("div",ps,[o("button",{class:ie({active:g.value==="left"}),onClick:e[0]||(e[0]=i=>g.value="left")},h(b(y)("commander.left_pane")),3),o("button",{class:ie({active:g.value==="right"}),onClick:e[1]||(e[1]=i=>g.value="right")},h(b(y)("commander.right_pane")),3)])):H("",!0),o("div",{class:ie(["panes",{dragging:Fe.value,mobile:b(de)}])},[Ue(o("div",{class:"pane-wrapper",style:Oe(b(de)?{}:{width:`${ue.value}%`})},[R(it,{ref_key:"leftPaneRef",ref:oe,box:d.value,"onUpdate:box":e[2]||(e[2]=i=>d.value=i),directory:M.value,"onUpdate:directory":e[3]||(e[3]=i=>M.value=i),selected:I.value,"onUpdate:selected":e[4]||(e[4]=i=>I.value=i),active:g.value==="left",token:p.value,"box-options":b(f).items,favorites:Ve.value,"matched-files":Re.value,"branch-changed-files":Ae.value,onFocus:e[5]||(e[5]=i=>g.value="left"),onOpenGitLog:e[6]||(e[6]=i=>Ge("left")),onOpenBlame:e[7]||(e[7]=i=>{ae.value=d.value,me.value=M.value,_e.value=i,ve.value=!0})},null,8,["box","directory","selected","active","token","box-options","favorites","matched-files","branch-changed-files"])],4),[[ot,!b(de)||g.value==="left"]]),b(de)?H("",!0):(s(),r("div",{key:0,class:"splitter",onMousedown:pt},[...e[19]||(e[19]=[o("div",{class:"splitter-handle"},null,-1)])],32)),Ue(o("div",{class:"pane-wrapper",style:Oe(b(de)?{}:{width:`${100-ue.value}%`})},[R(it,{ref_key:"rightPaneRef",ref:se,box:D.value,"onUpdate:box":e[8]||(e[8]=i=>D.value=i),directory:Z.value,"onUpdate:directory":e[9]||(e[9]=i=>Z.value=i),selected:N.value,"onUpdate:selected":e[10]||(e[10]=i=>N.value=i),active:g.value==="right",token:p.value,"box-options":b(f).items,favorites:Ve.value,"matched-files":Te.value,"branch-changed-files":Ae.value,onFocus:e[11]||(e[11]=i=>g.value="right"),onOpenGitLog:e[12]||(e[12]=i=>Ge("right")),onOpenBlame:e[13]||(e[13]=i=>{ae.value=D.value,me.value=Z.value,_e.value=i,ve.value=!0})},null,8,["box","directory","selected","active","token","box-options","favorites","matched-files","branch-changed-files"])],4),[[ot,!b(de)||g.value==="right"]])],2),R(Bo,{onAction:ht}),R(Qn,{show:G.value,"onUpdate:show":e[14]||(e[14]=i=>G.value=i),"left-box":d.value,"right-box":D.value,"left-path":V.value,"right-path":E.value,token:p.value,"matched-pairs":Q.value,"current-pair-index":x.value,onNavigatePair:He},null,8,["show","left-box","right-box","left-path","right-path","token","matched-pairs","current-pair-index"]),R(ms,{show:c.value,mode:P.value,"src-box":q.value,"dest-box":O.value,destination:xe.value,files:w.value,progress:C.value,result:S.value,error:T.value,onCancel:ut,onClose:dt},null,8,["show","mode","src-box","dest-box","destination","files","progress","result","error"]),R(po,{show:fe.value,"onUpdate:show":e[15]||(e[15]=i=>fe.value=i),box:Ce.value==="left"?d.value:D.value,directory:Ce.value==="left"?M.value:Z.value,token:p.value,onSelectCommit:ft,onSelectBranch:vt},null,8,["show","box","directory","token"]),R(Ln,{show:ve.value,"onUpdate:show":e[16]||(e[16]=i=>ve.value=i),box:ae.value,directory:me.value,path:_e.value,token:p.value},null,8,["show","box","directory","path","token"]),R(xo,{show:ne.value,"onUpdate:show":e[17]||(e[17]=i=>ne.value=i)},null,8,["show"]),R(Jt,{show:he.value,box:Se.value,path:De.value,token:p.value,theme:b(L).isDark?"dark":"light","onUpdate:show":e[18]||(e[18]=i=>he.value=i),onSaved:Me},null,8,["show","box","path","token","theme"])]))}}),Fs=be(gs,[["__scopeId","data-v-b23d54a8"]]);export{Fs as default};
|
|
1
|
+
import{d as te,i as X,c as $,a as r,o as s,r as je,b as H,e as o,m as We,a3 as ye,h as v,aB as ee,b2 as Ze,a7 as h,a8 as b,a5 as R,aa as ce,ab as ge,as as Oe,cm as $t,am as be,bZ as Je,aH as Be,a9 as $e,a6 as q,aq as ie,cn as xt,co as Ct,af as Mt,cp as Pt,aI as Ft,bC as qe,aK as et,cq as Lt,aZ as tt,cr as Bt,ad as Zt,ai as Ue,ae as At,cs as St,ct as Dt,aE as Vt,cu as Ht,au as at,ah as nt,a0 as zt,a1 as Et,ao as It,a2 as Nt,aA as Rt,a4 as Tt,aC as Gt,bn as ot,cv as Ot,cw as qt,cx as Ut,cy as Kt}from"./index-CeAHJWSQ.js";import{N as Ee}from"./Spin-DyIxCRqg.js";import{D as jt,I as Wt}from"./DiffViewer-BKOI30kQ.js";import{G as Ke}from"./PhCheck.vue-C9DFYQgy.js";import{I as Xt}from"./PhGitBranch.vue-BK8iMGps.js";import{N as Qt,a as st,F as Yt,b as Jt}from"./FileEditorModal-mQQlSzLp.js";import{G as ea}from"./GitBadge-B_4M8JOq.js";import{u as ta}from"./favorites-DhWkZ_Ge.js";import"./Add-DAOjsezW.js";import"./Switch-CXzkKkdP.js";const aa=["width","height","fill","transform"],na={key:0},oa=o("path",{d:"M204,75.64V40a20,20,0,0,0-20-20H72A20,20,0,0,0,52,40V76a20.1,20.1,0,0,0,8,16l48,36L60,164a20.1,20.1,0,0,0-8,16v36a20,20,0,0,0,20,20H184a20,20,0,0,0,20-20V180.36a20.13,20.13,0,0,0-7.94-16L147.9,128l48.16-36.4A20.13,20.13,0,0,0,204,75.64ZM180,212H76V182l52-39,52,39.33Zm0-138.35L128,113,76,74V44H180Z"},null,-1),sa=[oa],la={key:1},ra=o("path",{d:"M188.82,82,128,128,67.2,82.4A8,8,0,0,1,64,76V40a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8V75.64A8,8,0,0,1,188.82,82ZM64,180v36a8,8,0,0,0,8,8H184a8,8,0,0,0,8-8V180.36a8,8,0,0,0-3.18-6.38L128,128,67.2,173.6A8,8,0,0,0,64,180Z",opacity:"0.2"},null,-1),ia=o("path",{d:"M200,75.64V40a16,16,0,0,0-16-16H72A16,16,0,0,0,56,40V76a16.07,16.07,0,0,0,6.4,12.8L114.67,128,62.4,167.2A16.07,16.07,0,0,0,56,180v36a16,16,0,0,0,16,16H184a16,16,0,0,0,16-16V180.36a16.09,16.09,0,0,0-6.35-12.77L141.27,128l52.38-39.59A16.09,16.09,0,0,0,200,75.64ZM184,216H72V180l56-42,56,42.35Zm0-140.36L128,118,72,76V40H184Z"},null,-1),ca=[ra,ia],ua={key:2},da=o("path",{d:"M200,75.64V40a16,16,0,0,0-16-16H72A16,16,0,0,0,56,40V76a16.08,16.08,0,0,0,6.41,12.8L114.67,128,62.4,167.2A16.07,16.07,0,0,0,56,180v36a16,16,0,0,0,16,16H184a16,16,0,0,0,16-16V180.36a16,16,0,0,0-6.36-12.77L141.26,128l52.38-39.59A16.05,16.05,0,0,0,200,75.64Z"},null,-1),fa=[da],va={key:3},ma=o("path",{d:"M198,75.64V40a14,14,0,0,0-14-14H72A14,14,0,0,0,58,40V76a14.06,14.06,0,0,0,5.6,11.2L118,128,63.6,168.8A14.06,14.06,0,0,0,58,180v36a14,14,0,0,0,14,14H184a14,14,0,0,0,14-14V180.36a14.08,14.08,0,0,0-5.56-11.17L138,128l54.49-41.19A14.08,14.08,0,0,0,198,75.64ZM186,180.36V216a2,2,0,0,1-2,2H72a2,2,0,0,1-2-2V180a2,2,0,0,1,.8-1.6L128,135.51l57.22,43.25A2,2,0,0,1,186,180.36Zm0-104.72a2,2,0,0,1-.79,1.6L128,120.49,70.8,77.6A2,2,0,0,1,70,76V40a2,2,0,0,1,2-2H184a2,2,0,0,1,2,2Z"},null,-1),ha=[ma],pa={key:4},ga=o("path",{d:"M200,75.64V40a16,16,0,0,0-16-16H72A16,16,0,0,0,56,40V76a16.07,16.07,0,0,0,6.4,12.8L114.67,128,62.4,167.2A16.07,16.07,0,0,0,56,180v36a16,16,0,0,0,16,16H184a16,16,0,0,0,16-16V180.36a16.09,16.09,0,0,0-6.35-12.77L141.27,128l52.38-39.6A16.05,16.05,0,0,0,200,75.64ZM184,216H72V180l56-42,56,42.35Zm0-140.36L128,118,72,76V40H184Z"},null,-1),ya=[ga],ba={key:5},ka=o("path",{d:"M196,75.64V40a12,12,0,0,0-12-12H72A12,12,0,0,0,60,40V76a12,12,0,0,0,4.8,9.6L121.33,128,64.8,170.4A12,12,0,0,0,60,180v36a12,12,0,0,0,12,12H184a12,12,0,0,0,12-12V180.36a12.05,12.05,0,0,0-4.76-9.57L134.63,128l56.61-42.79A12.05,12.05,0,0,0,196,75.64Zm-8,104.72V216a4,4,0,0,1-4,4H72a4,4,0,0,1-4-4V180a4,4,0,0,1,1.6-3.2L128,133l58.42,44.16A4,4,0,0,1,188,180.36Zm0-104.72a4,4,0,0,1-1.59,3.19L128,123,69.6,79.2A4,4,0,0,1,68,76V40a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4Z"},null,-1),_a=[ka],wa={name:"PhHourglass"},$a=te({...wa,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(k){const F=k,n=X("weight","regular"),f=X("size","1em"),_=X("color","currentColor"),L=X("mirrored",!1),m=$(()=>F.weight??n),y=$(()=>F.size??f),p=$(()=>F.color??_),g=$(()=>F.mirrored!==void 0?F.mirrored?"scale(-1, 1)":void 0:L?"scale(-1, 1)":void 0);return(d,M)=>(s(),r("svg",We({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:y.value,height:y.value,fill:p.value,transform:g.value},d.$attrs),[je(d.$slots,"default"),m.value==="bold"?(s(),r("g",na,sa)):m.value==="duotone"?(s(),r("g",la,ca)):m.value==="fill"?(s(),r("g",ua,fa)):m.value==="light"?(s(),r("g",va,ha)):m.value==="regular"?(s(),r("g",pa,ya)):m.value==="thin"?(s(),r("g",ba,_a)):H("",!0)],16,aa))}}),xa=["width","height","fill","transform"],Ca={key:0},Ma=o("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"},null,-1),Pa=[Ma],Fa={key:1},La=o("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"},null,-1),Ba=o("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"},null,-1),Za=[La,Ba],Aa={key:2},Sa=o("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"},null,-1),Da=[Sa],Va={key:3},Ha=o("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"},null,-1),za=[Ha],Ea={key:4},Ia=o("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"},null,-1),Na=[Ia],Ra={key:5},Ta=o("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"},null,-1),Ga=[Ta],Oa={name:"PhSpinner"},lt=te({...Oa,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(k){const F=k,n=X("weight","regular"),f=X("size","1em"),_=X("color","currentColor"),L=X("mirrored",!1),m=$(()=>F.weight??n),y=$(()=>F.size??f),p=$(()=>F.color??_),g=$(()=>F.mirrored!==void 0?F.mirrored?"scale(-1, 1)":void 0:L?"scale(-1, 1)":void 0);return(d,M)=>(s(),r("svg",We({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:y.value,height:y.value,fill:p.value,transform:g.value},d.$attrs),[je(d.$slots,"default"),m.value==="bold"?(s(),r("g",Ca,Pa)):m.value==="duotone"?(s(),r("g",Fa,Za)):m.value==="fill"?(s(),r("g",Aa,Da)):m.value==="light"?(s(),r("g",Va,za)):m.value==="regular"?(s(),r("g",Ea,Na)):m.value==="thin"?(s(),r("g",Ra,Ga)):H("",!0)],16,xa))}}),qa=["width","height","fill","transform"],Ua={key:0},Ka=o("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"},null,-1),ja=[Ka],Wa={key:1},Xa=o("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"},null,-1),Qa=o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"},null,-1),Ya=[Xa,Qa],Ja={key:2},en=o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"},null,-1),tn=[en],an={key:3},nn=o("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"},null,-1),on=[nn],sn={key:4},ln=o("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"},null,-1),rn=[ln],cn={key:5},un=o("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"},null,-1),dn=[un],fn={name:"PhWarning"},rt=te({...fn,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(k){const F=k,n=X("weight","regular"),f=X("size","1em"),_=X("color","currentColor"),L=X("mirrored",!1),m=$(()=>F.weight??n),y=$(()=>F.size??f),p=$(()=>F.color??_),g=$(()=>F.mirrored!==void 0?F.mirrored?"scale(-1, 1)":void 0:L?"scale(-1, 1)":void 0);return(d,M)=>(s(),r("svg",We({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:y.value,height:y.value,fill:p.value,transform:g.value},d.$attrs),[je(d.$slots,"default"),m.value==="bold"?(s(),r("g",Ua,ja)):m.value==="duotone"?(s(),r("g",Wa,Ya)):m.value==="fill"?(s(),r("g",Ja,tn)):m.value==="light"?(s(),r("g",an,on)):m.value==="regular"?(s(),r("g",sn,rn)):m.value==="thin"?(s(),r("g",cn,dn)):H("",!0)],16,qa))}}),vn={key:0,class:"blame-overlay"},mn={class:"blame-header"},hn={class:"blame-filename"},pn=["title"],gn={key:0,class:"blame-truncated"},yn=["title","aria-label"],bn={key:0,class:"blame-loading"},kn={key:1,class:"blame-error"},_n={key:2,class:"blame-content"},wn={class:"blame-gutter"},$n=["title"],xn=["title"],Cn=["title"],Mn={class:"blame-line-no"},Pn={class:"blame-code"},Fn=te({__name:"CommanderBlame",props:{show:{type:Boolean},box:{},directory:{},path:{},token:{}},emits:["update:show"],setup(k,{emit:F}){const n=k,f=F,{t:_}=ye(),L=["rgba(167, 139, 250, 0.08)","rgba(56, 189, 248, 0.08)","rgba(52, 211, 153, 0.08)","rgba(251, 191, 36, 0.08)","rgba(248, 113, 113, 0.08)","rgba(244, 114, 182, 0.08)","rgba(45, 212, 191, 0.08)","rgba(163, 163, 163, 0.08)"],m=v([]),y=v(!1),p=v(null),g=v(!1),d=v(new Map);let M=0;const D=$(()=>{const c=n.path.split("/");return c[c.length-1]||n.path}),Z=$(()=>n.path||D.value),I=$(()=>m.value.map((c,P)=>{const w=P>0?m.value[P-1]:null,C=!w||w.commit!==c.commit;return{...c,isBlockStart:C,color:N(c.commit)}}));function N(c){return d.value.has(c)||d.value.set(c,L[d.value.size%L.length]),d.value.get(c)}function G(c){return c.length>12?`${c.slice(0,11)}…`:c}function V(){f("update:show",!1)}function z(c){n.show&&c.key==="Escape"&&(c.preventDefault(),V())}async function x(){const c=++M;if(!n.show||!n.path){m.value=[],y.value=!1,p.value=null,g.value=!1,d.value=new Map;return}y.value=!0,p.value=null,m.value=[],g.value=!1,d.value=new Map;try{const P=await $t(n.box,n.directory,n.path,n.token);if(c!==M)return;if(P.error){p.value=P.error;return}m.value=P.lines??[],g.value=P.truncated??!1}catch(P){if(c!==M)return;p.value=P instanceof Error?P.message:String(P)}finally{c===M&&(y.value=!1)}}return ee(()=>n.show,c=>{if(c){document.addEventListener("keydown",z);return}document.removeEventListener("keydown",z)},{immediate:!0}),ee(()=>[n.show,n.box,n.directory,n.path,n.token],async([c])=>{if(!c){M+=1,y.value=!1;return}await x()},{immediate:!0}),Ze(()=>{document.removeEventListener("keydown",z)}),(c,P)=>k.show?(s(),r("div",vn,[o("div",mn,[o("div",hn,[o("span",{class:"blame-path",title:Z.value},h(Z.value),9,pn),g.value?(s(),r("span",gn,h(b(_)("grep.truncated")),1)):H("",!0)]),o("button",{type:"button",class:"blame-close",title:b(_)("common.close"),"aria-label":b(_)("common.close"),onClick:V}," X ",8,yn)]),y.value?(s(),r("div",bn,[R(b(Ee),{size:"large"})])):p.value?(s(),r("div",kn,h(p.value),1)):(s(),r("div",_n,[(s(!0),r(ce,null,ge(I.value,w=>(s(),r("div",{key:w.line_number,class:"blame-line",style:Oe({background:w.color})},[o("div",wn,[w.isBlockStart?(s(),r(ce,{key:0},[o("span",{class:"gutter-hash",title:w.commit},h(w.commit),9,$n),o("span",{class:"gutter-author",title:w.author},h(G(w.author)),9,xn),o("span",{class:"gutter-date",title:w.date},h(w.date),9,Cn)],64)):H("",!0)]),o("div",Mn,h(w.line_number),1),o("pre",Pn,h(w.content),1)],4))),128))]))])):H("",!0)}}),Ln=be(Fn,[["__scopeId","data-v-f5f21c62"]]),Bn={key:0,class:"diff-overlay"},Zn={class:"diff-header"},An={class:"diff-paths"},Sn=["title"],Dn={class:"diff-box-badge"},Vn={class:"diff-file-name"},Hn=["title"],zn={class:"diff-box-badge"},En={class:"diff-file-name"},In={key:0,class:"diff-nav"},Nn=["disabled"],Rn={class:"diff-counter"},Tn=["disabled"],Gn=["title"],On={class:"diff-body"},qn={key:0,class:"diff-loading"},Un={key:1,class:"diff-empty diff-error"},Kn={key:2,class:"diff-content"},jn={key:0,class:"diff-identical"},Wn={class:"diff-viewer-wrap"},Xn=te({__name:"CommanderDiffOverlay",props:{show:{type:Boolean},leftBox:{},rightBox:{},leftPath:{},rightPath:{},token:{},matchedPairs:{default:()=>[]},currentPairIndex:{default:0}},emits:["update:show","navigate-pair"],setup(k,{emit:F}){const n=k,f=F,{t:_}=ye(),L=v(""),m=v(""),y=v("text"),p=v(!1),g=v(null);let d=0;const M=$(()=>n.matchedPairs.length),D=$(()=>M.value>0),Z=$(()=>n.currentPairIndex??0),I=$(()=>!p.value&&!g.value&&L.value===m.value),N=$(()=>V(n.leftPath)),G=$(()=>V(n.rightPath));function V(C){const S=C.split("/").filter(Boolean);return S[S.length-1]||C}function z(C){const S=C.split(".").pop()?.toLowerCase();return{js:"javascript",jsx:"javascript",ts:"javascript",tsx:"javascript",py:"python",html:"html",htm:"html",css:"css",scss:"css",sass:"css",json:"json",md:"markdown",xml:"xml",svg:"xml"}[S||""]||"text"}function x(){f("update:show",!1)}function c(C){!D.value||C<0||C>=M.value||f("navigate-pair",C)}function P(C){if(n.show)switch(C.key){case"Escape":C.preventDefault(),x();break;case"ArrowLeft":if(!D.value)return;C.preventDefault(),c(Z.value-1);break;case"ArrowRight":if(!D.value)return;C.preventDefault(),c(Z.value+1);break}}async function w(){const C=++d;if(!n.show||!n.leftPath||!n.rightPath){L.value="",m.value="",y.value="text",g.value=null,p.value=!1;return}p.value=!0,g.value=null,L.value="",m.value="";try{const[S,T]=await Promise.all([Je(n.leftBox,n.leftPath,n.token),Je(n.rightBox,n.rightPath,n.token)]);if(C!==d)return;L.value=S.content??"",m.value=T.content??"";const U=z(n.leftPath),O=z(n.rightPath);y.value=U===O?U:"text"}catch(S){if(C!==d)return;g.value=S instanceof Error?S.message:String(S)}finally{C===d&&(p.value=!1)}}return ee(()=>n.show,C=>{if(C){document.addEventListener("keydown",P);return}document.removeEventListener("keydown",P)},{immediate:!0}),ee(()=>[n.show,n.leftBox,n.rightBox,n.leftPath,n.rightPath,n.token],async([C])=>{C||(d+=1),await w()},{immediate:!0}),Ze(()=>{document.removeEventListener("keydown",P)}),(C,S)=>k.show?(s(),r("div",Bn,[o("div",Zn,[o("div",An,[o("div",{class:"diff-file",title:k.leftPath},[o("span",Dn,h(k.leftBox),1),o("span",Vn,h(N.value),1)],8,Sn),o("div",{class:"diff-file",title:k.rightPath},[o("span",zn,h(k.rightBox),1),o("span",En,h(G.value),1)],8,Hn)]),D.value?(s(),r("div",In,[o("button",{type:"button",disabled:Z.value<=0,onClick:S[0]||(S[0]=T=>c(Z.value-1))},"Prev",8,Nn),o("span",Rn,h(Z.value+1)+" of "+h(M.value),1),o("button",{type:"button",disabled:Z.value>=M.value-1,onClick:S[1]||(S[1]=T=>c(Z.value+1))},"Next",8,Tn)])):H("",!0),o("button",{type:"button",class:"diff-close",title:b(_)("common.close"),onClick:x},"X",8,Gn)]),o("div",On,[p.value?(s(),r("div",qn,[R(b(Ee),{size:"large"})])):g.value?(s(),r("div",Un,h(g.value),1)):(s(),r("div",Kn,[I.value?(s(),r("div",jn,h(b(_)("commander.files_identical")),1)):H("",!0),o("div",Wn,[R(jt,{original:L.value,modified:m.value,language:y.value,style:{height:"100%"}},null,8,["original","modified","language"])])]))])])):H("",!0)}}),Qn=be(Xn,[["__scopeId","data-v-35a730bb"]]),Yn={class:"git-log-panel",role:"dialog","aria-modal":"true"},Jn={class:"git-log-header"},eo={class:"git-log-title"},to={key:0,class:"git-log-loading"},ao={key:1,class:"git-log-list"},no=["onClick"],oo={class:"commit-hash"},so={class:"commit-msg"},lo={class:"commit-author"},ro={class:"commit-date"},io={key:0,class:"git-log-empty"},co={key:0,class:"git-log-loading"},uo={key:1,class:"git-log-list"},fo=["onClick"],vo={key:2,class:"branch-commit"},mo={key:0,class:"git-log-empty"},ho=te({__name:"CommanderGitLog",props:{show:{type:Boolean},box:{},directory:{},token:{}},emits:["update:show","select-commit","select-branch"],setup(k,{emit:F}){const n=k,f=F,{t:_}=ye(),L=v("commits"),m=v([]),y=v([]),p=v(!1),g=v(!1);let d=0;function M(c,P){return c.length<=P?c:P<=3?c.slice(0,P):`${c.slice(0,P-3)}...`}function D(c,P){const w=_(c);return w===c?P:w}function Z(c){const P=new Date(c),C=new Date().getTime()-P.getTime(),S=Math.floor(C/6e4);if(S<1)return"just now";if(S<60)return`${S}m ago`;const T=Math.floor(S/60);if(T<24)return`${T}h ago`;const U=Math.floor(T/24);if(U<30)return`${U}d ago`;const O=Math.floor(U/30);return O<12?`${O}mo ago`:`${Math.floor(O/12)}y ago`}function I(){f("update:show",!1)}function N(c){f("select-commit",c),I()}function G(c){f("select-branch",c),I()}function V(){p.value=!1,g.value=!1}async function z(){const c=++d;p.value=!0,g.value=!0,m.value=[],y.value=[];const P=xt(n.box,n.directory,n.token,50).then(C=>{c===d&&(m.value=C.is_repo?C.commits:[])}).catch(()=>{c===d&&(m.value=[])}).finally(()=>{c===d&&(p.value=!1)}),w=Ct(n.box,n.directory,n.token).then(C=>{c===d&&(y.value=C.is_repo?C.branches:[])}).catch(()=>{c===d&&(y.value=[])}).finally(()=>{c===d&&(g.value=!1)});await Promise.allSettled([P,w])}function x(c){n.show&&c.key==="Escape"&&(c.preventDefault(),c.stopPropagation(),I())}return ee(()=>n.show,c=>{if(c){document.addEventListener("keydown",x,!0);return}document.removeEventListener("keydown",x,!0)},{immediate:!0}),ee(()=>[n.show,n.box,n.directory,n.token],([c,P,w,C],S)=>{if(!c){d+=1,V();return}const[T,U,O,xe]=S??[!1,"","",null],K=!T||P!==U||w!==O||C!==xe;T||(L.value="commits"),K&&z()},{immediate:!0}),Ze(()=>{document.removeEventListener("keydown",x,!0)}),(c,P)=>k.show?(s(),r("div",{key:0,class:"git-log-backdrop",onClick:Be(I,["self"])},[o("div",Yn,[o("div",Jn,[o("span",eo,h(D("commander.git_history","Git history")),1),o("button",{type:"button",class:"git-log-close",onClick:I},"×")]),R(b(Qt),{value:L.value,"onUpdate:value":P[0]||(P[0]=w=>L.value=w),type:"segment",size:"small",animated:"",class:"git-log-tabs"},{default:$e(()=>[R(b(st),{name:"commits",tab:D("commander.git_commits","Commits")},{default:$e(()=>[p.value?(s(),r("div",to,[R(b(Ee),{size:"small"})])):(s(),r("div",ao,[(s(!0),r(ce,null,ge(m.value,w=>(s(),r("div",{key:w.hash,class:"git-log-row",onClick:C=>N(w)},[o("span",oo,h(w.short_hash),1),o("span",so,h(M(w.message,50)),1),o("span",lo,h(w.author),1),o("span",ro,h(Z(w.date)),1)],8,no))),128)),m.value.length===0?(s(),r("div",io,h(D("commander.no_commits","No commits")),1)):H("",!0)]))]),_:1},8,["tab"]),R(b(st),{name:"branches",tab:D("commander.git_branches","Branches")},{default:$e(()=>[g.value?(s(),r("div",co,[R(b(Ee),{size:"small"})])):(s(),r("div",uo,[(s(!0),r(ce,null,ge(y.value,w=>(s(),r("div",{key:w.name,class:"git-log-row branch-row",onClick:C=>G(w)},[w.is_current?(s(),q(b(Ke),{key:0,weight:"duotone",class:"branch-check"})):(s(),q(b(Xt),{key:1,weight:"duotone",class:"branch-icon"})),o("span",{class:ie(["branch-name",{current:w.is_current}])},h(w.name),3),w.last_commit?(s(),r("span",vo,h(M(w.last_commit,24)),1)):H("",!0)],8,fo))),128)),y.value.length===0?(s(),r("div",mo,h(D("commander.no_branches","No branches")),1)):H("",!0)]))]),_:1},8,["tab"])]),_:1},8,["value"])])])):H("",!0)}}),po=be(ho,[["__scopeId","data-v-6ec6102b"]]),go={class:"help-panel"},yo={class:"help-header"},bo={class:"help-title"},ko={class:"help-body"},_o={class:"help-key"},wo={class:"help-action"},$o=te({__name:"CommanderHelpOverlay",props:{show:{type:Boolean}},emits:["update:show"],setup(k,{emit:F}){const n=k,f=F,{t:_}=ye(),L=[{key:"Tab",action:"Switch active pane"},{key:"↑ / ↓",action:"Navigate files"},{key:"Enter",action:"Open directory / preview file"},{key:"Backspace",action:"Go to parent directory"},{key:"Home",action:"Go to home (~)"},{key:"Space",action:"Toggle select file"},{key:"*",action:"Select all / deselect all"},{key:"Shift+Click",action:"Range select"},{key:"Ctrl+Click",action:"Toggle select"},{key:"F1",action:"This help"},{key:"F3",action:"Compare files between panes"},{key:"F4",action:"Edit file in CodeMirror editor"},{key:"F5",action:"Copy to other pane"},{key:"F6",action:"Move to other pane"},{key:"F7",action:"Create new directory"},{key:"F8",action:"Delete selected files"},{key:"F10",action:"Quit (go back)"},{key:"Ctrl+F",action:"Search/filter files in pane"},{key:"Ctrl+G",action:"Git log / branch picker"},{key:"Ctrl+B",action:"Git blame for cursor file"},{key:"Escape",action:"Close overlay / clear filter"}];function m(){f("update:show",!1)}function y(p){n.show&&(p.key==="Escape"||p.key==="F1")&&(p.preventDefault(),p.stopPropagation(),m())}return ee(()=>n.show,p=>{p?document.addEventListener("keydown",y,!0):document.removeEventListener("keydown",y,!0)},{immediate:!0}),Ze(()=>document.removeEventListener("keydown",y,!0)),(p,g)=>k.show?(s(),r("div",{key:0,class:"help-overlay",onClick:Be(m,["self"])},[o("div",go,[o("div",yo,[o("span",bo,h(b(_)("commander.help_title")),1),o("button",{class:"help-close",onClick:m},"×")]),o("div",ko,[(s(),r(ce,null,ge(L,d=>o("div",{key:d.key,class:"help-row"},[o("span",_o,h(d.key),1),o("span",wo,h(d.action),1)])),64))])])])):H("",!0)}}),xo=be($o,[["__scopeId","data-v-70affbbb"]]),Co={class:"hotbar"},Mo=["onClick"],Po={class:"key-num"},Fo={class:"key-label"},Lo=te({__name:"CommanderHotbar",emits:["action"],setup(k,{emit:F}){const n=F,{t:f}=ye(),_=$(()=>[{key:"F1",label:"Help"},{key:"F3",label:f("commander.compare")},{key:"F4",label:"Edit"},{key:"F5",label:f("commander.copy")+"→"},{key:"F6",label:f("commander.move")+"→"},{key:"F7",label:"Mkdir"},{key:"F8",label:"Delete"},{key:"F10",label:"Quit"}]);return(L,m)=>(s(),r("div",Co,[(s(!0),r(ce,null,ge(_.value,y=>(s(),r("div",{key:y.key,class:"hotbar-key",onClick:p=>n("action",y.key)},[o("span",Po,h(y.key),1),o("span",Fo,h(y.label),1)],8,Mo))),128))]))}}),Bo=be(Lo,[["__scopeId","data-v-e6a80aa2"]]),Zo={class:"pane-header"},Ao=["title"],So=["onClick"],Do={class:"crumb-text"},Vo={key:0,class:"crumb-separator"},Ho={key:0,class:"filter-bar"},zo=["placeholder","onKeydown"],Eo={key:0,class:"empty-state"},Io={key:1,class:"empty-state error-state"},No=["data-index","title","onClick","onDblclick"],Ro={key:0,class:"match-indicator",title:"Has match in other pane"},To={key:1,class:"branch-changed-indicator",title:"Changed between branches"},Go={class:"size"},Oo={class:"date"},qo={class:"perms"},Uo={key:0,class:"empty-state"},Ko={class:"pane-footer"},jo=te({__name:"CommanderPane",props:{box:{},directory:{},selected:{},active:{type:Boolean},token:{},boxOptions:{},favorites:{},matchedFiles:{},branchChangedFiles:{},matchedSizes:{}},emits:["update:box","update:directory","update:selected","focus","open-git-log","open-blame"],setup(k,{expose:F,emit:n}){const f=k,_=n,{t:L}=ye(),m=v(!1),y=v(null),p=v(null),g=v(null),d=v(0),M=v(null),D=v(null),Z=v(""),I=v(!1),N=v(null);let G=0,V=0;const z=$(()=>{const a=[];for(const l of f.boxOptions){const u=Mt(l.name),A=f.favorites?.get(l.name)??[];if(A.length===0){a.push({label:`${u} ${l.name}`,value:l.name});continue}a.push({type:"group",label:`${u} ${l.name}`,key:l.name,children:[{label:`${u} ${l.name} (home)`,value:l.name},...A.map(E=>({label:` 📁 ${E.split("/").filter(Boolean).pop()||E}`,value:`${l.name}::${E}`}))]})}return a}),x=$(()=>{const l={key:"__parent__",name:"..",path:T(f.directory),is_directory:!0,size:null,modified:null,mode:null,isParent:!0},u=[...p.value?.entries??[]].sort((A,E)=>A.is_directory!==E.is_directory?A.is_directory?-1:1:A.name.localeCompare(E.name));return[l,...u.map(A=>({...A,key:A.path}))]}),c=$(()=>{if(!Z.value)return x.value;const a=Z.value.toLowerCase();return x.value.filter(l=>l.isParent||l.name.toLowerCase().includes(a))}),P=$(()=>{const a=c.value.filter(l=>!l.isParent).length;return L("commander.files_count",{count:a})}),w=$(()=>{const a=c.value.filter(l=>!l.isParent).reduce((l,u)=>l+(u.size??0),0);return O(a)}),C=$(()=>U(f.directory));function S(a){return a||"~"}function T(a){const l=S(a).replace(/\/+$/,"");if(!l||l==="/"||l==="~")return l||"~";if(l.startsWith("~/"))return l.replace(/\/[^/]+$/,"")||"~";const u=l.lastIndexOf("/");return u<=0?"/":l.slice(0,u)||"/"}function U(a){const l=S(a);if(l==="~")return[{label:"~",path:"~"}];if(l==="/")return[{label:"/",path:"/"}];if(l.startsWith("~/")){const W=l.slice(2).split("/").filter(Boolean),Me=[{label:"~",path:"~"}];let le="~";for(const He of W)le=`${le}/${He}`,Me.push({label:He,path:le});return Me}const u=l.split("/").filter(Boolean),A=[{label:"/",path:"/"}];let E="";for(const W of u)E=`${E}/${W}`,A.push({label:W,path:E});return A}function O(a){return a==null?"-":a<1024?`${a}B`:a<1024*1024?`${(a/1024).toFixed(1)}K`:a<1024*1024*1024?`${(a/(1024*1024)).toFixed(1)}M`:`${(a/(1024*1024*1024)).toFixed(1)}G`}function xe(a){if(!a)return"-";const l=new Date(a*1e3),u=new Date,A=l.toDateString()===u.toDateString(),E=l.getFullYear()===u.getFullYear();return A?new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(l):E?new Intl.DateTimeFormat(void 0,{month:"short",day:"2-digit"}).format(l):new Intl.DateTimeFormat(void 0,{year:"numeric"}).format(l)}function K(a){if(a==null)return"---------";const l=a&511,u=[256,128,64,32,16,8,4,2,1],A=["r","w","x","r","w","x","r","w","x"];return u.map((E,W)=>l&E?A[W]:"-").join("")}function Pe(a){return a.isParent?Yt:a.is_directory?At:Wt}function ke(a){return a.isParent?"<UP>":a.is_directory?"<DIR>":O(a.size)}function ue(a){const l=f.matchedSizes?.get(a.name);return l==null||a.size==null?"":a.size<l?"size-smaller":a.size>l?"size-larger":"size-equal"}function Fe(a){const l=f.matchedSizes?.get(a.name);if(l==null||a.size==null)return"";const u=a.size-l;return u===0?"=":u>0?`+${O(u)}`:`-${O(Math.abs(u))}`}function fe(){I.value=!0,Z.value="",tt(()=>N.value?.focus())}function Ce(){I.value=!1,Z.value=""}function ve(a){return!a.isParent&&f.selected.includes(a.path)}function ae(){_("focus")}function me(a){d.value=Math.max(0,Math.min(x.value.length-1,a)),_e()}function _e(){tt(()=>{const a=D.value;if(!a)return;a.querySelector(`[data-index="${d.value}"]`)?.scrollIntoView({block:"nearest"})})}function Ae(a){me(d.value+a)}function ne(a){_("update:directory",a),_("update:selected",[]),M.value=null,d.value=0}function he(){const a=x.value[d.value];if(a){if(a.isParent||a.is_directory){ne(a.path);return}_("update:selected",[a.path])}}function Se(){ne(T(f.directory))}function De(){ne("~")}function de(){const a=x.value[d.value];if(!(!a||a.isParent)){if(f.selected.includes(a.path)){_("update:selected",f.selected.filter(l=>l!==a.path));return}_("update:selected",[...f.selected,a.path])}}function oe(){const a=x.value.filter(u=>!u.isParent).map(u=>u.path);a.length>0&&a.every(u=>f.selected.includes(u))?_("update:selected",[]):_("update:selected",a)}function se(){return x.value[d.value]??null}async function j(){const a=++G;m.value=!0,y.value=null;try{const l=await St(f.box,S(f.directory),f.token);if(a!==G)return;p.value=l,d.value=0,_e()}catch(l){if(a!==G)return;p.value=null,y.value=l instanceof Error?l.message:String(l)}finally{a===G&&(m.value=!1)}}async function pe(){const a=++V;try{const l=await Dt(f.box,S(f.directory),f.token);if(a!==V)return;g.value=l}catch{if(a!==V)return;g.value=null}}async function Ie(){await j(),pe()}function Ne(a,l,u){if(ae(),me(l),a.isParent){_("update:selected",[]),M.value=null;return}if(u.shiftKey&&M.value!==null){const A=Math.min(M.value,l),E=Math.max(M.value,l),W=x.value.slice(A,E+1).filter(le=>!le.isParent).map(le=>le.path),Me=new Set([...f.selected,...W]);_("update:selected",[...Me])}else u.ctrlKey||u.metaKey?f.selected.includes(a.path)?_("update:selected",f.selected.filter(A=>A!==a.path)):_("update:selected",[...f.selected,a.path]):_("update:selected",[]);M.value=l}function Q(a,l,u){Ne(a,l,u)}function Re(a,l){me(l),he()}function Te(a){if(ae(),!!a){if(a.includes("::")){const[l,u]=a.split("::",2);if(!l||!u)return;l!==f.box&&_("update:box",l),u!==f.directory&&_("update:directory",u);return}a!==f.box&&_("update:box",a),f.directory!=="~"&&_("update:directory","~")}}function Ve(a){ae(),ne(a)}function we(){g.value?.is_repo&&_("open-git-log")}return ee(()=>[f.box,f.directory,f.token],async()=>{_("update:selected",[]),M.value=null,await Promise.all([j(),pe()])},{immediate:!0}),ee(()=>x.value.length,()=>{d.value>=x.value.length&&(d.value=Math.max(0,x.value.length-1))}),F({moveCursor:Ae,activateCurrent:he,goUp:Se,goHome:De,toggleSelectCurrent:de,rows:x,cursorIndex:d,getCursorFile:se,selectAll:oe,reload:Ie,openSearch:fe}),(a,l)=>(s(),r("section",{class:ie(["commander-pane",{active:k.active,inactive:!k.active}]),tabindex:"0",onFocusin:ae,onMousedown:ae},[o("div",Zo,[R(b(Ft),{value:k.box,size:"tiny",options:z.value,class:"box-select","onUpdate:value":Te},null,8,["value","options"]),o("div",{class:"breadcrumb",title:k.directory},[(s(!0),r(ce,null,ge(C.value,(u,A)=>(s(),r("span",{key:u.path,class:"crumb",onClick:E=>Ve(u.path)},[o("span",Do,h(u.label),1),A<C.value.length-1?(s(),r("span",Vo,"/")):H("",!0)],8,So))),128))],8,Ao),o("div",{class:"git-wrap",onClick:Be(we,["stop"])},[g.value?.is_repo?(s(),q(ea,{key:0,info:g.value,compact:""},null,8,["info"])):H("",!0)])]),l[3]||(l[3]=Pt('<div class="column-header" data-v-8de6b21d><span class="name" data-v-8de6b21d>Name</span><span class="size" data-v-8de6b21d>Size</span><span class="date" data-v-8de6b21d>Modified</span><span class="perms" data-v-8de6b21d>Perms</span></div>',1)),I.value?(s(),r("div",Ho,[qe(o("input",{ref_key:"filterInputRef",ref:N,"onUpdate:modelValue":l[0]||(l[0]=u=>Z.value=u),class:"filter-input",type:"text",placeholder:b(L)("commander.filter_placeholder"),onKeydown:[et(Be(Ce,["stop"]),["escape"]),l[1]||(l[1]=et(Be(()=>{},["stop"]),["enter"]))]},null,40,zo),[[Lt,Z.value]]),o("button",{class:"filter-close",onClick:Ce},"×")])):H("",!0),(s(),r("div",{ref_key:"listRef",ref:D,class:"file-list",key:`${k.box}-${k.directory}`},[m.value?(s(),r("div",Eo,h(b(L)("common.loading")),1)):y.value?(s(),r("div",Io,h(y.value),1)):(s(),r(ce,{key:2},[(s(!0),r(ce,null,ge(c.value,(u,A)=>(s(),r("div",{key:u.key,class:ie(["file-row",{cursor:A===d.value,selected:ve(u)}]),"data-index":A,title:u.isParent?b(L)("commander.parent_dir"):u.path,onClick:E=>Q(u,A,E),onDblclick:E=>Re(u,A)},[R(b(Zt),{size:"14",class:ie(["row-icon",{"dir-icon":u.is_directory||u.isParent}])},{default:$e(()=>[(s(),q(Bt(Pe(u)),{weight:"duotone"}))]),_:2},1032,["class"]),o("span",{class:ie(["name",{"dir-name":u.is_directory||u.isParent}])},h(u.name),3),k.matchedFiles?.has(u.name)?(s(),r("span",Ro,"≡")):H("",!0),k.branchChangedFiles?.has(u.name)?(s(),r("span",To,"~")):H("",!0),o("span",Go,[Ue(h(ke(u))+" ",1),!u.isParent&&!u.is_directory&&k.matchedSizes?.has(u.name)?(s(),r("span",{key:0,class:ie(["size-delta",ue(u)])},h(Fe(u)),3)):H("",!0)]),o("span",Oo,h(xe(u.modified)),1),o("span",qo,h(K(u.mode)),1)],42,No))),128)),x.value.length===1?(s(),r("div",Uo,h(b(L)("commander.no_files")),1)):H("",!0)],64))])),o("div",Ko,[o("span",null,h(P.value),1),o("span",null,"Total "+h(w.value),1),l[2]||(l[2]=o("span",null,"Free --",-1))])],34))}}),it=be(jo,[["__scopeId","data-v-8de6b21d"]]),Wo={class:"transfer-modal"},Xo={class:"transfer-header"},Qo={class:"transfer-heading"},Yo={class:"transfer-heading-icon"},Jo={class:"transfer-heading-text"},es={class:"transfer-title"},ts={class:"transfer-dest"},as={class:"transfer-files"},ns={class:"file-status-icon"},os={class:"file-name"},ss={key:0,class:"file-progress"},ls=["title"],rs={key:0,class:"transfer-current"},is={class:"current-label"},cs={class:"transfer-overall"},us={class:"overall-label"},ds={key:1,class:"transfer-error"},fs={class:"transfer-footer"},vs=te({__name:"CommanderTransferProgress",props:{show:{type:Boolean},mode:{},srcBox:{},destBox:{},destination:{},files:{},progress:{},result:{},error:{}},emits:["cancel","close"],setup(k,{emit:F}){const n=k,f=F,{t:_}=ye(),L=$(()=>n.show&&!n.result&&!n.error),m=$(()=>!!n.result),y=$(()=>(n.result?.failed.length??0)>0),p=$(()=>n.progress?.file??null),g=$(()=>{if(!p.value)return"";const V=p.value.split("/");return V[V.length-1]||p.value}),d=$(()=>!n.progress||!n.progress.bytes_total?0:Math.round(n.progress.bytes_done/n.progress.bytes_total*100)),M=$(()=>n.result?n.files.length:n.progress?.index??0),D=$(()=>n.files.length?n.result?100:Math.round(M.value/n.files.length*100):0),Z=$(()=>`${n.mode==="move"?_("commander.move"):_("commander.copy")} ${n.files.length} file${n.files.length!==1?"s":""} -> ${n.destBox}`);function I(V){const z=V.split("/");return z[z.length-1]||V}function N(V){return n.result?n.result.failed.some(x=>x.path===V)?"failed":"done":n.progress?n.progress.file===V?"active":n.files.indexOf(V)<(n.progress.index??0)?"done":"pending":"pending"}function G(V){return n.result?.failed.find(x=>x.path===V)?.error??null}return(V,z)=>(s(),q(b(Vt),{show:k.show,"mask-closable":!L.value,"onUpdate:show":z[2]||(z[2]=x=>!x&&f("close"))},{default:$e(()=>[o("div",Wo,[o("div",Xo,[o("div",Qo,[o("span",Yo,[L.value?(s(),q(b(lt),{key:0,weight:"duotone",class:"heading-running"})):k.error||y.value?(s(),q(b(rt),{key:1,weight:"duotone",class:"heading-warning"})):m.value?(s(),q(b(Ke),{key:2,weight:"duotone",class:"heading-done"})):H("",!0)]),o("div",Jo,[o("span",es,h(Z.value),1),o("span",ts,h(k.srcBox)+" -> "+h(k.destBox)+" · "+h(k.destination),1)])])]),o("div",as,[(s(!0),r(ce,null,ge(k.files,x=>(s(),r("div",{key:x,class:ie(["transfer-file-row",N(x)])},[o("span",ns,[N(x)==="done"?(s(),q(b(Ke),{key:0,weight:"duotone",class:"status-done"})):N(x)==="active"?(s(),q(b(lt),{key:1,weight:"duotone",class:"status-active"})):N(x)==="pending"?(s(),q(b($a),{key:2,weight:"duotone",class:"status-pending"})):(s(),q(b(Ht),{key:3,weight:"duotone",class:"status-failed"}))]),o("span",os,h(I(x)),1),N(x)==="active"&&k.progress?(s(),r("span",ss,h(d.value)+"% ",1)):H("",!0),N(x)==="failed"?(s(),r("span",{key:1,class:"file-error",title:G(x)||""},h(G(x)),9,ls)):H("",!0)],2))),128))]),L.value&&k.progress?(s(),r("div",rs,[o("div",is,h(g.value),1),R(b(at),{percentage:d.value,"show-indicator":!1,height:4,color:"#a78bfa","rail-color":"#1a1a24"},null,8,["percentage"])])):H("",!0),o("div",cs,[o("div",us,h(M.value)+" / "+h(k.files.length)+" files",1),R(b(at),{percentage:D.value,"show-indicator":!1,height:6,color:"#a78bfa","rail-color":"#1a1a24"},null,8,["percentage"])]),k.error?(s(),r("div",ds,[R(b(rt),{weight:"duotone",class:"transfer-error-icon"}),o("span",null,h(k.error),1)])):H("",!0),o("div",fs,[L.value?(s(),q(b(nt),{key:0,type:"error",size:"small",ghost:"",onClick:z[0]||(z[0]=x=>f("cancel"))},{default:$e(()=>[Ue(h(b(_)("commander.transfer_cancel")),1)]),_:1})):(s(),q(b(nt),{key:1,size:"small",onClick:z[1]||(z[1]=x=>f("close"))},{default:$e(()=>[Ue(h(b(_)("common.close")),1)]),_:1}))])])]),_:1},8,["show","mask-closable"]))}}),ms=be(vs,[["__scopeId","data-v-b1e65aed"]]),hs={class:"commander"},ps={key:0,class:"mobile-pane-toggle"},ct="sshler:commander:config",gs=te({__name:"CommanderView",setup(k){const F=Gt(),n=zt(),f=Et(),_=ta(),L=It(),m=Nt(),{t:y}=ye(),p=$(()=>n.token||n.payload?.token||null),g=v("left"),d=v("local"),M=v("~"),D=v("local"),Z=v("~"),I=v([]),N=v([]),G=v(!1),V=v(""),z=v(""),x=v(0),c=v(!1),P=v("copy"),w=v([]),C=v(null),S=v(null),T=v(null),U=v(""),O=v(""),xe=v("");let K=null;const Pe=v(!1),ke=v([]),ue=v(50),Fe=v(!1),fe=v(!1),Ce=v("left"),ve=v(!1),ae=v(""),me=v(""),_e=v(""),Ae=v(new Set),ne=v(!1),he=v(!1),Se=v(""),De=v(""),{isMobile:de}=Rt(),oe=v(null),se=v(null),j=$(()=>g.value==="left"?oe.value:se.value);function pe(t){return!!(t&&!t.isParent&&!t.is_directory)}const Ie=$(()=>{const t=oe.value,e=new Map;if(!t)return e;for(const i of t.rows??[])pe(i)&&e.set(i.name,i.path);return e}),Ne=$(()=>{const t=se.value,e=new Map;if(!t)return e;for(const i of t.rows??[])pe(i)&&e.set(i.name,i.path);return e}),Q=$(()=>{const t=[];for(const[e,i]of Ie.value){const B=Ne.value.get(e);B&&t.push({leftPath:i,rightPath:B,name:e})}return t.sort((e,i)=>e.name.localeCompare(i.name))}),Re=$(()=>new Set(Q.value.map(t=>t.name))),Te=$(()=>new Set(Q.value.map(t=>t.name))),Ve=$(()=>{const t=new Map;for(const e of f.items){const i=_.favoritesForBox(e.name);i.size>0&&t.set(e.name,[...i])}return t});function we(){const t=g.value==="left";return{box:t?d.value:D.value,dir:t?M.value:Z.value,selected:t?I.value:N.value,paneRef:t?oe.value:se.value,otherBox:t?D.value:d.value,otherDir:t?Z.value:M.value,otherPaneRef:t?se.value:oe.value}}function a(){oe.value?.reload(),se.value?.reload()}function l(){L.activeBox=g.value==="left"?d.value:D.value,L.activeDir=g.value==="left"?M.value:Z.value}function u(t){return t instanceof HTMLElement?t.isContentEditable||t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"?!0:!!(t.closest(".n-base-selection")||t.closest(".n-input")):!1}function A(t,e,i=0){V.value=t,z.value=e,x.value=Math.max(0,i),G.value=!0}function E(){ne.value=!ne.value}function W(){const t=we(),e=t.paneRef?.getCursorFile();if(!e||e.isParent||e.is_directory){m.warning(y("commander.select_file_to_edit"));return}Se.value=t.box,De.value=e.path,he.value=!0}function Me(){he.value=!1,we().paneRef?.reload()}function le(){const t=I.value.length===1?I.value[0]:null,e=N.value.length===1?N.value[0]:null;if(t&&e){const Y=Q.value.findIndex(J=>J.leftPath===t&&J.rightPath===e);A(t,e,Y);return}const i=oe.value?.getCursorFile(),B=se.value?.getCursorFile();if(pe(i)&&pe(B)){const Y=Q.value.findIndex(J=>J.leftPath===i.path&&J.rightPath===B.path||J.name===i.name);A(i.path,B.path,Y);return}const Le=j.value?.getCursorFile();if(pe(Le)){const Y=Q.value.find(J=>J.name===Le.name);if(Y){A(Y.leftPath,Y.rightPath,Q.value.indexOf(Y));return}}const re=Q.value[0];if(re){A(re.leftPath,re.rightPath,0);return}m.warning(y("commander.no_matches"))}function He(t){const e=Q.value[t];e&&A(e.leftPath,e.rightPath,t)}async function ze(t){const e=we();let i=[...e.selected];if(i.length===0){const B=e.paneRef?.getCursorFile();B&&!B.isParent&&!B.is_directory&&(i=[B.path])}if(i.length===0){m.warning(y("commander.no_selection"));return}if(e.box===e.otherBox&&e.dir===e.otherDir){m.warning(y("commander.same_directory"));return}if(P.value=t,w.value=i,C.value=null,S.value=null,T.value=null,U.value=e.box,O.value=e.otherBox,xe.value=e.otherDir,K=null,c.value=!0,e.box===e.otherBox){try{const B=await Ot(e.box,i,e.otherDir,t,p.value);S.value={succeeded:B.succeeded,failed:B.failed},a()}catch(B){T.value=B instanceof Error?B.message:String(B)}return}K=qt(e.box,e.otherBox,i,e.otherDir,t,p.value,B=>{C.value=B},B=>{S.value=B,K=null,a()},B=>{T.value=B,K=null})}function ut(){K?.abort(),K=null,T.value="Cancelled"}function dt(){c.value=!1,K=null}async function Xe(){const t=we(),e=window.prompt(y("commander.mkdir_prompt"));if(e?.trim())try{await Ut(t.box,t.dir,e.trim(),p.value),t.paneRef?.reload()}catch(i){m.error(i instanceof Error?i.message:String(i))}}async function Qe(){const t=we();let e=[...t.selected];if(e.length===0){const B=t.paneRef?.getCursorFile();B&&!B.isParent&&(e=[B.path])}if(e.length===0)return;ke.value=e,Pe.value=!0;const i=Pe.value&&window.confirm(y("commander.delete_confirm",{count:ke.value.length}));if(Pe.value=!1,!i){ke.value=[];return}try{await Kt(t.box,ke.value,p.value),g.value==="left"?I.value=[]:N.value=[],ke.value=[],t.paneRef?.reload()}catch(B){m.error(B instanceof Error?B.message:String(B))}}function Ge(t){Ce.value=t,fe.value=!0}function ft(t){fe.value=!1,m.info(`Commit: ${t.short_hash} — ${t.message}`,{duration:5e3})}function vt(t){fe.value=!1,m.info(`Branch: ${t.name}`,{duration:3e3})}function mt(t){const e=t==="left",i=e?d.value:D.value,B=e?M.value:Z.value,re=(e?oe.value:se.value)?.getCursorFile();if(!re||re.isParent||re.is_directory){m.warning(y("commander.select_file_for_blame"));return}ae.value=i,me.value=B,_e.value=re.path,ve.value=!0}function ht(t){switch(t){case"F1":E();break;case"F3":le();break;case"F4":W();break;case"F5":ze("copy");break;case"F6":ze("move");break;case"F7":Xe();break;case"F8":Qe();break;case"F10":window.history.back();break}}function Ye(t){if(!u(t.target)&&!(G.value||c.value||fe.value||ve.value||ne.value||he.value))switch(t.key){case"g":t.ctrlKey&&(t.preventDefault(),Ge(g.value));break;case"b":t.ctrlKey&&(t.preventDefault(),mt(g.value));break;case"F1":t.preventDefault(),E();break;case"Tab":t.preventDefault(),g.value=g.value==="left"?"right":"left";break;case"ArrowUp":t.preventDefault(),j.value?.moveCursor(-1);break;case"ArrowDown":t.preventDefault(),j.value?.moveCursor(1);break;case"Enter":t.preventDefault(),j.value?.activateCurrent();break;case"Backspace":t.preventDefault(),j.value?.goUp();break;case"Home":t.preventDefault(),j.value?.goHome();break;case" ":t.preventDefault(),j.value?.toggleSelectCurrent();break;case"F3":t.preventDefault(),le();break;case"F4":t.preventDefault(),W();break;case"f":t.ctrlKey&&(t.preventDefault(),j.value?.openSearch());break;case"F5":t.preventDefault(),ze("copy");break;case"F6":t.preventDefault(),ze("move");break;case"F7":t.preventDefault(),Xe();break;case"F8":t.preventDefault(),Qe();break;case"*":t.preventDefault(),j.value?.selectAll();break;case"F10":t.preventDefault(),window.history.back();break}}function pt(t){const i=t.currentTarget?.parentElement;if(!i)return;Fe.value=!0,document.body.style.userSelect="none",document.body.style.cursor="col-resize";const B=t.clientX,Le=ue.value,re=i.offsetWidth,Y=kt=>{const _t=kt.clientX-B,wt=Le+_t/re*100;ue.value=Math.max(20,Math.min(80,wt))},J=()=>{Fe.value=!1,document.body.style.userSelect="",document.body.style.cursor="",document.removeEventListener("mousemove",Y),document.removeEventListener("mouseup",J)};document.addEventListener("mousemove",Y),document.addEventListener("mouseup",J)}function gt(){localStorage.setItem(ct,JSON.stringify({leftBox:d.value,leftDir:M.value,rightBox:D.value,rightDir:Z.value,splitPercent:ue.value}))}function yt(){try{const t=localStorage.getItem(ct);if(!t)return;const e=JSON.parse(t);e.leftBox&&(d.value=e.leftBox),e.leftDir&&(M.value=e.leftDir),e.rightBox&&(D.value=e.rightBox),e.rightDir&&(Z.value=e.rightDir),typeof e.splitPercent=="number"&&(ue.value=e.splitPercent)}catch{}}async function bt(){!n.payload&&!n.loading&&await n.bootstrap(),!f.items.length&&!f.loading&&await f.load(p.value),f.items.length&&_.hydrateFromBoxes(f.items)}return ee([d,M,D,Z,ue],gt),ee([d,M,D,Z,g],l,{immediate:!0}),Tt(async()=>{document.title=`${y("commander.title")} - sshler`,await bt(),yt();const t=typeof F.query.box=="string"?F.query.box:null,e=typeof F.query.dir=="string"?F.query.dir:null;t&&(d.value=t),e&&(M.value=e),l(),document.addEventListener("keydown",Ye)}),Ze(()=>{K?.abort(),K=null,document.removeEventListener("keydown",Ye),document.body.style.userSelect="",document.body.style.cursor=""}),(t,e)=>(s(),r("div",hs,[b(de)?(s(),r("div",ps,[o("button",{class:ie({active:g.value==="left"}),onClick:e[0]||(e[0]=i=>g.value="left")},h(b(y)("commander.left_pane")),3),o("button",{class:ie({active:g.value==="right"}),onClick:e[1]||(e[1]=i=>g.value="right")},h(b(y)("commander.right_pane")),3)])):H("",!0),o("div",{class:ie(["panes",{dragging:Fe.value,mobile:b(de)}])},[qe(o("div",{class:"pane-wrapper",style:Oe(b(de)?{}:{width:`${ue.value}%`})},[R(it,{ref_key:"leftPaneRef",ref:oe,box:d.value,"onUpdate:box":e[2]||(e[2]=i=>d.value=i),directory:M.value,"onUpdate:directory":e[3]||(e[3]=i=>M.value=i),selected:I.value,"onUpdate:selected":e[4]||(e[4]=i=>I.value=i),active:g.value==="left",token:p.value,"box-options":b(f).items,favorites:Ve.value,"matched-files":Re.value,"branch-changed-files":Ae.value,onFocus:e[5]||(e[5]=i=>g.value="left"),onOpenGitLog:e[6]||(e[6]=i=>Ge("left")),onOpenBlame:e[7]||(e[7]=i=>{ae.value=d.value,me.value=M.value,_e.value=i,ve.value=!0})},null,8,["box","directory","selected","active","token","box-options","favorites","matched-files","branch-changed-files"])],4),[[ot,!b(de)||g.value==="left"]]),b(de)?H("",!0):(s(),r("div",{key:0,class:"splitter",onMousedown:pt},[...e[19]||(e[19]=[o("div",{class:"splitter-handle"},null,-1)])],32)),qe(o("div",{class:"pane-wrapper",style:Oe(b(de)?{}:{width:`${100-ue.value}%`})},[R(it,{ref_key:"rightPaneRef",ref:se,box:D.value,"onUpdate:box":e[8]||(e[8]=i=>D.value=i),directory:Z.value,"onUpdate:directory":e[9]||(e[9]=i=>Z.value=i),selected:N.value,"onUpdate:selected":e[10]||(e[10]=i=>N.value=i),active:g.value==="right",token:p.value,"box-options":b(f).items,favorites:Ve.value,"matched-files":Te.value,"branch-changed-files":Ae.value,onFocus:e[11]||(e[11]=i=>g.value="right"),onOpenGitLog:e[12]||(e[12]=i=>Ge("right")),onOpenBlame:e[13]||(e[13]=i=>{ae.value=D.value,me.value=Z.value,_e.value=i,ve.value=!0})},null,8,["box","directory","selected","active","token","box-options","favorites","matched-files","branch-changed-files"])],4),[[ot,!b(de)||g.value==="right"]])],2),R(Bo,{onAction:ht}),R(Qn,{show:G.value,"onUpdate:show":e[14]||(e[14]=i=>G.value=i),"left-box":d.value,"right-box":D.value,"left-path":V.value,"right-path":z.value,token:p.value,"matched-pairs":Q.value,"current-pair-index":x.value,onNavigatePair:He},null,8,["show","left-box","right-box","left-path","right-path","token","matched-pairs","current-pair-index"]),R(ms,{show:c.value,mode:P.value,"src-box":U.value,"dest-box":O.value,destination:xe.value,files:w.value,progress:C.value,result:S.value,error:T.value,onCancel:ut,onClose:dt},null,8,["show","mode","src-box","dest-box","destination","files","progress","result","error"]),R(po,{show:fe.value,"onUpdate:show":e[15]||(e[15]=i=>fe.value=i),box:Ce.value==="left"?d.value:D.value,directory:Ce.value==="left"?M.value:Z.value,token:p.value,onSelectCommit:ft,onSelectBranch:vt},null,8,["show","box","directory","token"]),R(Ln,{show:ve.value,"onUpdate:show":e[16]||(e[16]=i=>ve.value=i),box:ae.value,directory:me.value,path:_e.value,token:p.value},null,8,["show","box","directory","path","token"]),R(xo,{show:ne.value,"onUpdate:show":e[17]||(e[17]=i=>ne.value=i)},null,8,["show"]),R(Jt,{show:he.value,box:Se.value,path:De.value,token:p.value,theme:b(L).isDark?"dark":"light","onUpdate:show":e[18]||(e[18]=i=>he.value=i),onSaved:Me},null,8,["show","box","path","token","theme"])]))}}),Fs=be(gs,[["__scopeId","data-v-b23d54a8"]]);export{Fs as default};
|