@dotdirfm/ui 0.1.2 → 0.1.3
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.
- package/dist/dotdir.css +1 -1
- package/dist/dotdir.js +1 -1
- package/dist/dotdir.mjs +3 -3
- package/package.json +1 -1
package/dist/dotdir.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
._hotkey-char_1lp0s_1{text-underline-offset:2px;text-decoration:underline}._overlay-backdrop_1lp0s_6{z-index:200;background:#00000080;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}._overlay-backdrop-top_1lp0s_16{align-items:flex-start;padding-top:15vh}._modal-dialog_1lp0s_21{background:var(--bg);width:400px;max-width:90vw;color:var(--fg);border:1px solid var(--border-active);border-radius:4px;flex-direction:column;max-height:min(90vh,100% - 32px);margin:auto;padding:0;display:flex;overflow:hidden}._modal-dialog-header_1lp0s_36{border-bottom:1px solid var(--border);background:var(--bg-secondary);color:var(--fg-secondary);-webkit-user-select:none;user-select:none;padding:8px 12px;font-size:12px;font-weight:600}._modal-dialog_1lp0s_21._error_1lp0s_46 ._modal-dialog-header_1lp0s_36{background:var(--error-bg);color:var(--error-fg)}._modal-dialog-body_1lp0s_51{word-break:break-word;padding:16px 12px;font-size:13px;line-height:1.4}._modal-dialog-buttons_1lp0s_58{border-top:1px solid var(--border);justify-content:flex-end;gap:8px;padding:8px 12px;display:flex}._modal-dialog-buttons_1lp0s_58 button{border:1px solid var(--border-active);background:var(--bg-secondary);color:var(--fg);cursor:pointer;border-radius:3px;padding:4px 16px;font-size:12px}._modal-dialog-buttons_1lp0s_58 button:focus{outline:2px solid var(--border-active);outline-offset:1px}._open-create-file-dialog_1lp0s_81 ._modal-dialog-body_1lp0s_51{flex-direction:column;gap:12px;display:flex}._open-create-file-form_1lp0s_87{flex-direction:column;display:flex}._open-create-file-field_1lp0s_92{flex-direction:column;gap:4px;display:flex}._open-create-file-field_1lp0s_92 label{color:var(--fg-secondary);font-size:12px}._open-create-file-field_1lp0s_92 input,._open-create-file-field_1lp0s_92 select,._make-folder-field_1lp0s_105 input,._copy-config-field_1lp0s_106 input,._copy-config-field_1lp0s_106 select,._conflict-rename-field_1lp0s_108 input,._rename-field_1lp0s_109 input{background:var(--bg-secondary);border:1px solid var(--border);color:var(--fg);border-radius:3px;padding:6px 8px;font-size:13px}._open-create-file-field_1lp0s_92 input:focus,._open-create-file-field_1lp0s_92 select:focus,._make-folder-field_1lp0s_105 input:focus,._copy-config-field_1lp0s_106 input:focus,._copy-config-field_1lp0s_106 select:focus,._conflict-rename-field_1lp0s_108 input:focus,._rename-field_1lp0s_109 input:focus{outline:2px solid var(--border-active);outline-offset:0}._open-create-file-hint_1lp0s_129{color:var(--fg-muted);font-size:11px}._make-folder-dialog_1lp0s_134 ._modal-dialog-body_1lp0s_51{flex-direction:column;gap:8px;display:flex}._make-folder-form_1lp0s_140{flex-direction:column;gap:12px;display:flex}._make-folder-field_1lp0s_105,._copy-config-field_1lp0s_106,._conflict-rename-field_1lp0s_108,._rename-field_1lp0s_109{flex-direction:column;gap:4px;display:flex}._make-folder-field_1lp0s_105 label,._copy-config-field_1lp0s_106 label,._conflict-rename-field_1lp0s_108 label,._rename-field_1lp0s_109 label{color:var(--fg-secondary);font-size:12px}._make-folder-checkbox_1lp0s_163{color:var(--fg-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;font-size:12px;display:flex}._make-folder-checkbox_1lp0s_163 input,._copy-config-section_1lp0s_174 input[type=checkbox]{margin:0}._modal-dialog-buttons_1lp0s_58 button[type=submit]:disabled{opacity:.6;cursor:not-allowed}._delete-progress-dialog_1lp0s_183 ._delete-progress-text_1lp0s_183{margin-bottom:4px;font-weight:600}._delete-progress-dialog_1lp0s_183 ._delete-progress-path_1lp0s_188{color:var(--fg-secondary);text-overflow:ellipsis;white-space:nowrap;max-width:60vw;font-size:12px;overflow:hidden}._delete-progress-dialog_1lp0s_183 ._delete-progress-hint_1lp0s_197{color:var(--fg-muted);margin:12px 0 0;font-size:12px}._copy-config-dialog_1lp0s_203,._copy-progress-dialog_1lp0s_204{width:440px}._move-config-dialog_1lp0s_208{width:400px}._copy-config-dialog_1lp0s_203 ._modal-dialog-body_1lp0s_51,._move-config-dialog_1lp0s_208 ._modal-dialog-body_1lp0s_51{flex-direction:column;gap:10px;display:flex}._copy-config-section_1lp0s_174{border:1px solid var(--border);border-radius:3px;margin:0;padding:8px 12px}._copy-config-section_1lp0s_174 legend{color:var(--fg-secondary);padding:0 4px;font-size:11px;font-weight:600}._copy-config-section_1lp0s_174 label{cursor:pointer;align-items:center;gap:6px;padding:2px 0;font-size:12px;display:flex}._copy-progress-bar-container_1lp0s_242{background:var(--bg-secondary);border-radius:3px;height:6px;margin-bottom:8px;overflow:hidden}._copy-progress-bar_1lp0s_242{background:var(--border-active);border-radius:3px;height:100%;transition:width .15s}._copy-progress-stats_1lp0s_257{color:var(--fg-secondary);justify-content:space-between;margin-bottom:4px;font-size:12px;display:flex}._copy-progress-current_1lp0s_265{color:var(--fg-secondary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}._conflict-dialog_1lp0s_273{width:500px}._conflict-file-info_1lp0s_277{margin-bottom:12px}._conflict-file-info_1lp0s_277:last-child{margin-bottom:0}._conflict-file-label_1lp0s_285{color:var(--fg-secondary);margin-bottom:2px;font-size:11px;font-weight:600}._conflict-file-path_1lp0s_292{text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}._conflict-file-meta_1lp0s_299{color:var(--fg-muted);margin-top:2px;font-size:11px}._conflict-buttons_1lp0s_305{flex-wrap:wrap}._rename-dialog_1lp0s_309{width:400px}._help-dialog_riri2_1{background:var(--bg);width:560px;max-width:90vw;color:var(--fg);border:1px solid var(--border-active);border-radius:6px;margin:auto;padding:0}._help-dialog_riri2_1::backdrop{background:#00000080}._help-dialog-header_riri2_16{background:var(--bg-secondary);border-bottom:1px solid var(--border);color:var(--fg-secondary);text-transform:uppercase;letter-spacing:.05em;padding:8px 12px;font-size:12px;font-weight:600}._help-dialog-body_riri2_27{outline:none;max-height:60vh;padding:16px 18px;line-height:1.6;overflow-y:auto}._help-dialog-body_riri2_27 h1{color:var(--fg);margin-bottom:10px;font-size:15px;font-weight:600}._help-dialog-body_riri2_27 h2{text-transform:uppercase;letter-spacing:.05em;color:var(--fg-secondary);margin-top:16px;margin-bottom:6px;font-size:12px;font-weight:600}._help-dialog-body_riri2_27 p{color:var(--fg);margin-bottom:8px}._help-dialog-body_riri2_27 ul{margin-bottom:8px;padding-left:18px}._help-dialog-body_riri2_27 li{color:var(--fg);margin-bottom:4px}._help-dialog-body_riri2_27 strong{color:var(--fg);font-weight:600}._help-dialog-body_riri2_27 code{background:var(--bg-secondary);border:1px solid var(--border);color:var(--fg);border-radius:3px;padding:1px 5px;font-family:SF Mono,Cascadia Code,Fira Code,monospace;font-size:12px}._help-dialog-buttons_riri2_82{border-top:1px solid var(--border);flex-shrink:0;justify-content:flex-end;gap:8px;padding:8px 12px;display:flex}._help-dialog-buttons_riri2_82 button{border:1px solid var(--border-active);background:var(--bg-secondary);color:var(--fg);cursor:pointer;border-radius:3px;padding:4px 16px;font-size:13px}._help-dialog-buttons_riri2_82 button:hover{background:var(--entry-hover)}._help-dialog-buttons_riri2_82 button:focus{outline:2px solid var(--border-active);outline-offset:1px}._action-bar_11mfr_1{-webkit-user-select:none;user-select:none;flex:auto;align-items:center;gap:1px;min-width:0;height:24px;font-size:12px;display:flex;overflow:hidden}._action-bar-item_11mfr_13{cursor:pointer;background:var(--action-bar-bg);border:1px solid var(--action-bar-border);flex:1 1 0;justify-content:center;align-items:center;gap:5px;min-width:0;height:100%;padding:0 6px;transition:background .1s;display:flex}._action-bar-item_11mfr_13:hover:not(._disabled_11mfr_28){background:var(--entry-hover)}._action-bar-item_11mfr_13:active:not(._disabled_11mfr_28){background:var(--border)}._action-bar-item_11mfr_13._disabled_11mfr_28{cursor:default}._action-bar-item_11mfr_13._disabled_11mfr_28 ._action-bar-key_11mfr_40,._action-bar-item_11mfr_13._disabled_11mfr_28 ._action-bar-label_11mfr_41{opacity:.35}._action-bar-key_11mfr_40{color:var(--action-bar-badge-fg);background:var(--action-bar-badge-bg);border-radius:2px;padding:0 2px;font-size:11px;font-weight:600}._action-bar-label_11mfr_41{color:var(--action-bar-fg);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._terminal-and-panels_l0nwk_1{grid-row:1;display:grid;overflow:hidden}._command-line_l0nwk_7{color:#d7dae0;background:#11131a;flex-shrink:0;align-items:center;height:23px;min-height:0;padding:0 4px;font-family:Menlo,Monaco,Courier New,monospace;font-size:13px;display:flex}._command-line_l0nwk_7._hidden_l0nwk_20{display:none}._command-line-prompt_l0nwk_24{color:#8b9fc2;white-space:nowrap;text-overflow:ellipsis;flex-shrink:0;max-width:40%;margin-right:8px;font-weight:600;overflow:hidden}._command-line-input_l0nwk_35{white-space:pre;flex:1;min-width:0;overflow:hidden}._command-line-text_l0nwk_42{color:#d7dae0}._command-line-cursor_l0nwk_46{vertical-align:text-bottom;pointer-events:none;width:0;height:15px;display:inline-block;position:relative;overflow:visible}._command-line-cursor_l0nwk_46:after{content:"";background-color:#f5f7ff;width:1px;height:100%;position:absolute;top:0;left:.5px}._command-line-selected_l0nwk_66{color:#fff;background-color:#6496ff66}._terminal-background_l0nwk_71{z-index:0;border-top:1px solid var(--border);background:#11131a;flex-direction:column;grid-area:1/1;display:flex;overflow:hidden}._terminal-panel_l0nwk_82{background:#11131a;flex-direction:column;flex:auto;width:100%;min-height:0;max-height:100%;display:flex}._terminal-body_l0nwk_92{flex-direction:column;flex:auto;justify-content:stretch;min-height:0;display:flex;overflow:hidden}._terminal-container_l0nwk_101{flex:auto;width:100%;min-height:0;overflow:hidden}._terminal-toolbar_l0nwk_108{background:var(--bg-secondary);min-width:0;min-height:20px;color:var(--fg-secondary);border-top:1px solid #0b0d12;flex-shrink:0;align-items:center;gap:10px;padding:1px 8px;font-size:12px;display:flex}._terminal-tabs_l0nwk_122{flex:1;align-items:center;gap:6px;min-width:0;display:flex}._terminal-tab_l0nwk_122{border:1px solid var(--border);background:var(--bg);min-width:0;max-width:180px;color:var(--fg-secondary);cursor:pointer;border-radius:3px;align-items:center;gap:6px;padding:2px 8px;font-size:12px;display:inline-flex}._terminal-tab_l0nwk_122._active_l0nwk_145{border-color:var(--border-active);color:var(--fg)}._terminal-tab-add_l0nwk_150{justify-content:center;width:26px}._terminal-tab-status_l0nwk_155{background:var(--fg-muted);border-radius:999px;flex-shrink:0;width:7px;height:7px}._terminal-tab-status_l0nwk_155._status-running_l0nwk_163{background:#89b4fa}._terminal-tab-status_l0nwk_155._status-starting_l0nwk_167{background:#f9e2af}._terminal-tab-status_l0nwk_155._status-error_l0nwk_171{background:#f38ba8}._terminal-tab-status_l0nwk_155._status-exited_l0nwk_175{background:#6c7086}._terminal-tab-label_l0nwk_179{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._terminal-tab-close_l0nwk_185{color:var(--fg-muted);flex-shrink:0}._terminal-profile-picker_l0nwk_190{align-items:center;gap:8px;min-width:0;display:flex}._terminal-profile-label_l0nwk_197{text-transform:uppercase;letter-spacing:.04em;font-size:11px}._terminal-profile-picker_l0nwk_190 select{border:1px solid var(--border-active);background:var(--bg);min-width:140px;color:var(--fg);border-radius:3px;padding:2px 8px;font-size:12px}._terminal-profile-shell_l0nwk_213{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--fg-muted);font-family:monospace;overflow:hidden}._terminal-status-error_l0nwk_222{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--error-fg);overflow:hidden}._terminal-loading_l0nwk_230{color:var(--fg-muted);flex:1;align-items:center;min-height:0;padding:0 10px;display:flex}._terminal-container_l0nwk_101 .xterm{height:100%;padding:0 0 1px 4px;display:grid}._terminal-container_l0nwk_101 .xterm-viewport{height:100%!important;overflow-y:auto!important}._terminal-container_l0nwk_101 .xterm .xterm-viewport{position:absolute!important;inset:0!important}._command-palette-dialog_2w2i0_1{width:800px;max-width:calc(100% - 32px);max-height:none;overflow:visible}._command-palette_2w2i0_1{background:var(--bg);border:1px solid var(--border);border-radius:8px;width:100%;max-width:800px;overflow:hidden;box-shadow:0 16px 70px #00000080}._command-palette_2w2i0_1 [cmdk-input]{border:none;border-bottom:1px solid var(--border);background:var(--bg);width:100%;color:var(--fg);outline:none;padding:14px 16px;font-family:inherit;font-size:15px}._command-palette_2w2i0_1 [cmdk-input]::placeholder{color:var(--fg-muted)}._command-palette_2w2i0_1 [cmdk-list]{max-height:400px;padding:8px;overflow-y:auto}._command-palette_2w2i0_1 [cmdk-empty]{text-align:center;color:var(--fg-muted);padding:24px;font-size:13px}._command-palette_2w2i0_1 [cmdk-group-heading]{color:var(--fg-muted);text-transform:uppercase;letter-spacing:.05em;padding:8px 12px 4px;font-size:11px;font-weight:600}._command-palette_2w2i0_1 [cmdk-item]{cursor:pointer;color:var(--fg);-webkit-user-select:none;user-select:none;border-radius:6px;justify-content:space-between;align-items:center;padding:10px 12px;font-size:13px;display:flex}._command-palette_2w2i0_1 [cmdk-item][data-selected=true]{background:var(--accent);color:var(--accent-fg)}._command-palette_2w2i0_1 [cmdk-item][data-selected=true] ._command-item-keybinding_2w2i0_73{color:var(--accent-fg);background:#0003}._command-item-title_2w2i0_78{flex:1}._command-item-keybinding_2w2i0_73{color:var(--fg-muted);background:var(--bg-secondary);border-radius:4px;margin-left:12px;padding:2px 6px;font-family:system-ui,-apple-system,sans-serif;font-size:11px}._file-viewer_1gb4m_1{background:var(--bg);width:min(90vw,100% - 32px);max-width:calc(100% - 32px);height:min(90vh,100% - 32px);max-height:calc(100% - 32px);color:var(--fg);border:1px solid var(--border-active);border-radius:4px;flex-direction:column;margin:auto;padding:0;display:flex;overflow:hidden}._file-viewer-inline_1gb4m_17{border:none;border-radius:0;flex-direction:column;flex:1;width:100%;height:100%;min-height:0;margin:0;display:flex;overflow:hidden}._file-viewer-overlay_1gb4m_30,._file-editor-overlay_1gb4m_31{z-index:100;background:#00000080;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}._file-editor_1gb4m_31{background:var(--bg);width:min(90vw,100% - 32px);max-width:calc(100% - 32px);height:min(90vh,100% - 32px);max-height:calc(100% - 32px);color:var(--fg);border:1px solid var(--border-active);border-radius:4px;flex-direction:column;margin:auto;padding:0;display:flex;overflow:hidden}._ext-panel_jpq35_1{background:var(--bg);width:560px;max-width:calc(100% - 32px);height:min(80vh,100% - 32px);max-height:calc(100% - 32px);color:var(--fg);border:1px solid var(--border-active);border-radius:4px;flex-direction:column;margin:auto;padding:0;display:flex;overflow:hidden}._ext-panel-header_jpq35_17{background:var(--bg-secondary);border-bottom:1px solid var(--border);-webkit-user-select:none;user-select:none;flex-shrink:0;justify-content:space-between;align-items:center;padding:8px 12px;display:flex}._ext-panel-title_jpq35_28{color:var(--fg-secondary);font-size:12px;font-weight:600}._ext-panel-close_jpq35_34{color:var(--fg-muted);cursor:pointer;background:0 0;border:none;border-radius:3px;padding:2px 6px;font-size:14px}._ext-panel-close_jpq35_34:hover{background:var(--entry-hover);color:var(--fg)}._ext-panel-tabs_jpq35_49{border-bottom:1px solid var(--border);flex-shrink:0;display:flex}._ext-tab_jpq35_55{color:var(--fg-muted);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;flex:1;padding:6px 12px;font-size:12px}._ext-tab_jpq35_55:hover{color:var(--fg-secondary);background:var(--entry-hover)}._ext-tab_jpq35_55._active_jpq35_71{color:var(--fg);border-bottom-color:var(--fg-secondary)}._ext-search_jpq35_76{border-bottom:1px solid var(--border);flex-shrink:0;padding:8px}._ext-source-selector_jpq35_82{gap:4px;margin-bottom:8px;display:flex}._ext-source-btn_jpq35_88{border:1px solid var(--border);background:var(--bg-secondary);color:var(--fg-muted);cursor:pointer;border-radius:3px;flex:1;padding:4px 8px;font-size:11px}._ext-source-btn_jpq35_88:hover{background:var(--bg-hover)}._ext-source-btn_jpq35_88._active_jpq35_71{background:var(--border-active);border-color:var(--border-active);color:var(--fg)}._ext-search_jpq35_76 input{border:1px solid var(--border);background:var(--bg-secondary);width:100%;color:var(--fg);border-radius:3px;outline:none;padding:5px 8px;font-family:inherit;font-size:12px}._ext-search_jpq35_76 input:focus{border-color:var(--border-active)}._ext-search_jpq35_76 input::placeholder{color:var(--fg-muted)}._ext-error_jpq35_129{color:var(--error-fg);background:var(--error-bg);flex-shrink:0;padding:6px 12px;font-size:11px}._ext-list_jpq35_137{flex:1;min-height:0;overflow-y:auto}._ext-empty_jpq35_143{text-align:center;color:var(--fg-muted);padding:32px 12px;font-size:12px}._ext-item_jpq35_150{border-bottom:1px solid var(--border);align-items:flex-start;gap:10px;padding:10px 12px;display:flex}._ext-item_jpq35_150:hover{background:var(--entry-hover)}._ext-icon_jpq35_162{background:var(--border);width:36px;height:36px;color:var(--fg-secondary);border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;font-size:16px;font-weight:600;display:flex;overflow:hidden}._ext-icon_jpq35_162 img{object-fit:cover;width:100%;height:100%;display:block}._ext-info_jpq35_184{flex:1;min-width:0}._ext-name_jpq35_189{color:var(--fg);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;overflow:hidden}._ext-publisher_jpq35_198{color:var(--fg-muted);margin-top:1px;font-size:11px}._ext-desc_jpq35_204{color:var(--fg-secondary);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:3px;font-size:12px;display:-webkit-box;overflow:hidden}._ext-meta_jpq35_214{color:var(--fg-muted);gap:10px;margin-top:4px;font-family:monospace;font-size:11px;display:flex}._ext-theme-badge_jpq35_223{color:var(--fg-muted);font-style:italic}._ext-theme-badge_jpq35_223._active_jpq35_71{color:var(--border-active);font-style:normal;font-weight:600}._ext-actions_jpq35_234{flex-shrink:0;gap:6px;padding-top:2px;display:flex}._ext-btn_jpq35_241{border:1px solid var(--border-active);background:var(--bg-secondary);color:var(--fg);cursor:pointer;white-space:nowrap;border-radius:3px;padding:3px 12px;font-size:11px}._ext-btn_jpq35_241:hover:not(:disabled){background:var(--entry-hover)}._ext-btn_jpq35_241:disabled{opacity:.5;cursor:default}._ext-btn_jpq35_241._install_jpq35_261{background:var(--border-active);color:var(--fg)}._ext-btn_jpq35_241._uninstall_jpq35_266{border-color:var(--error-fg);color:var(--error-fg);background:0 0}._ext-btn_jpq35_241._uninstall_jpq35_266:hover:not(:disabled){background:var(--error-bg)}._ext-btn_jpq35_241._installed_jpq35_276{border-color:var(--fg-muted);color:var(--fg-muted)}._ext-color-themes_jpq35_281{flex-wrap:wrap;gap:4px;margin-top:4px;display:flex}._ext-color-theme-btn_jpq35_288{align-items:center;gap:4px;display:inline-flex;padding:2px 8px!important;font-size:10px!important}._ext-color-theme-indicator_jpq35_296{border:1px solid var(--fg-muted);border-radius:50%;width:8px;height:8px;display:inline-block}._ext-color-theme-indicator_jpq35_296[data-ui-theme=vs-dark],._ext-color-theme-indicator_jpq35_296[data-ui-theme=hc-black]{background:#1e1e1e}._ext-color-theme-indicator_jpq35_296[data-ui-theme=vs],._ext-color-theme-indicator_jpq35_296[data-ui-theme=hc-light]{background:#f5f5f5}._file-list_15ml8_1{flex-direction:column;height:100%;display:flex}._file-list_15ml8_1._active-panel_15ml8_7 ._path-bar_15ml8_7{background:var(--bg);color:var(--fg)}._path-bar_15ml8_7{background:var(--bg-secondary);color:var(--fg-secondary);border-bottom:1px solid var(--border);-webkit-user-select:none;user-select:none;flex-shrink:0;padding:8px 12px;font-family:monospace;font-size:12px;position:relative;overflow:visible}._breadcrumbs_15ml8_25{white-space:nowrap;scrollbar-width:none;justify-content:flex-start;align-items:center;gap:8px;min-width:0;display:flex;position:relative;overflow:auto hidden;-webkit-mask-image:none;mask-image:none}._breadcrumbs_15ml8_25::-webkit-scrollbar{display:none}._breadcrumbs_15ml8_25._is-cropped-left_15ml8_44{-webkit-mask-image:linear-gradient(90deg,#0000 0,#000 18px 100%);mask-image:linear-gradient(90deg,#0000 0,#000 18px 100%);-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}._breadcrumbs_15ml8_25._is-cropped-right_15ml8_53{-webkit-mask-image:linear-gradient(90deg,#000 0 calc(100% - 18px),#0000 100%);mask-image:linear-gradient(90deg,#000 0 calc(100% - 18px),#0000 100%);-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}._breadcrumbs_15ml8_25._is-cropped-left_15ml8_44._is-cropped-right_15ml8_53{-webkit-mask-image:linear-gradient(90deg,#0000 0,#000 18px calc(100% - 18px),#0000 100%);mask-image:linear-gradient(90deg,#0000 0,#000 18px calc(100% - 18px),#0000 100%)}._breadcrumbs_15ml8_25 ._breadcrumb-copied-tooltip_15ml8_67{background:var(--fg);color:var(--bg);white-space:nowrap;pointer-events:none;z-index:10;border-radius:4px;margin-top:4px;padding:4px 8px;font-size:11px;font-weight:500;position:absolute;top:100%;left:0;box-shadow:0 1px 4px #0003}._breadcrumb-segment_15ml8_84{cursor:pointer;border-radius:4px;flex:none;align-items:center;margin:-2px -6px;padding:2px 6px;transition:background-color .1s;display:flex;position:relative}._breadcrumb-segment_15ml8_84:hover{background:var(--entry-hover,#ffffff0f)}._breadcrumb-segment-text_15ml8_100{white-space:nowrap}._breadcrumb-separator_15ml8_104{opacity:.6;pointer-events:none;-webkit-user-select:none;user-select:none;flex-shrink:0}._file-list-body_15ml8_111{flex:1;min-height:0;overflow:hidden}._columns-scroller-root_15ml8_117{width:100%;height:100%;position:relative}._columns-scroller-content_15ml8_123{flex-flow:column wrap;display:flex;overflow:hidden}._columns-scroller-content_15ml8_123>div{box-sizing:border-box;overflow:hidden}._columns-borders_15ml8_135{pointer-events:none;z-index:1;display:grid;position:absolute;inset:0}._columns-border_15ml8_135{border-inline-end:1px solid var(--border)}._columns-border_15ml8_135:last-child{border-inline-end:none}._entry_15ml8_151{cursor:default;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;padding:0 12px;display:flex;position:relative;overflow:hidden}._file-list_15ml8_1:not(._no-hover_15ml8_162) ._entry_15ml8_151:hover{background:var(--entry-hover)}._entry_15ml8_151._selected_15ml8_166{background:var(--entry-selected);color:var(--entry-selected-fg)}._file-list_15ml8_1._inactive-panel_15ml8_171 ._entry_15ml8_151._selected_15ml8_166{background:var(--entry-selected-inactive);color:var(--entry-selected-inactive-fg)}._entry_15ml8_151._marked_15ml8_176:before{content:"";background:var(--entry-marked-bg,#e5c07b26);pointer-events:none;border-radius:6px;position:absolute;inset:0 4px}._columns-scroller-content_15ml8_123>div:has(>._entry_15ml8_151._marked_15ml8_176)+div:has(>._entry_15ml8_151._marked_15ml8_176)>._entry_15ml8_151._marked_15ml8_176:before{border-top-left-radius:0;border-top-right-radius:0}._columns-scroller-content_15ml8_123>div:has(>._entry_15ml8_151._marked_15ml8_176):has(+div>._entry_15ml8_151._marked_15ml8_176)>._entry_15ml8_151._marked_15ml8_176:before{border-bottom-right-radius:0;border-bottom-left-radius:0}._entry-icon_15ml8_195{flex-shrink:0;align-items:center;display:flex}._entry-name_15ml8_201{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}._entry-size_15ml8_208{color:var(--fg-muted);text-align:right;flex-shrink:0;min-width:70px;font-family:monospace;font-size:12px}._file-info-footer_15ml8_217{border-top:1px solid var(--border);background:var(--bg-secondary);height:26px;color:var(--fg-secondary);-webkit-user-select:none;user-select:none;flex-shrink:0;align-items:center;gap:12px;padding:0 12px;font-size:12px;display:flex}._file-info-name_15ml8_231{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}._file-info-link_15ml8_238{text-overflow:ellipsis;white-space:nowrap;color:var(--fg-muted);flex:2;font-family:monospace;overflow:hidden}._file-info-size_15ml8_247{text-align:right;min-width:60px;font-family:monospace}._file-info-date_15ml8_253{text-align:right;min-width:120px;font-family:monospace}._panel-summary_15ml8_259{color:var(--fg-muted);border-top:1px solid var(--border);-webkit-user-select:none;user-select:none;flex-shrink:0;padding:2px 12px;font-size:11px}._panels-overlay_1i903_1{z-index:1;background:var(--bg);grid-area:1/1;gap:4px;min-height:0;display:flex;overflow:hidden}._panels-overlay_1i903_1._hidden_1i903_12{visibility:hidden;pointer-events:none}._panel_1i903_1{border:1px solid var(--border);background:var(--bg);-webkit-user-select:none;user-select:none;flex-direction:column;flex:1;min-width:0;display:flex;position:relative}._panel_1i903_1+._panel_1i903_1{border-left:1px solid var(--border)}._panel_1i903_1._active_1i903_33{border-color:var(--border-active)}._panel-progress_1i903_37{z-index:1;height:2px;position:absolute;top:0;left:0;right:0;overflow:hidden}._panel-progress_1i903_37:after{content:"";background:var(--border-active);width:40%;height:100%;animation:1s ease-in-out infinite _progress-slide_1i903_1;position:absolute;top:0;left:0}@keyframes _progress-slide_1i903_1{0%{left:-40%}to{left:100%}}._panel-tabs_1i903_67{background:var(--bg-tabs,var(--bg));border-bottom:1px solid var(--border);flex-shrink:0;align-items:center;height:28px;display:flex;overflow:hidden}._panel-tabs-list_1i903_77{scrollbar-width:none;flex:1;align-items:center;min-width:0;display:flex;overflow:auto hidden}._panel-tabs-list_1i903_77::-webkit-scrollbar{display:none}._panel-tab_1i903_67{white-space:nowrap;cursor:pointer;border-right:1px solid var(--border);color:var(--fg-muted,var(--fg));flex-shrink:0;align-items:center;gap:6px;min-width:48px;max-width:160px;padding:4px 8px;font-size:12px;display:flex}._panel-tab_1i903_67 ._panel-tab-label_1i903_106{text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}._panel-tab_1i903_67:hover{color:var(--fg);background:var(--entry-hover,#ffffff0f)}._panel-tab_1i903_67._active_1i903_33{color:var(--fg);background:var(--bg)}._panel-tab_1i903_67._temp_1i903_123 ._panel-tab-label_1i903_106{font-style:italic}._panel-tab-close_1i903_127{width:16px;height:16px;color:inherit;opacity:.6;cursor:pointer;background:0 0;border:none;border-radius:2px;flex-shrink:0;padding:0;font-size:14px;line-height:1}._panel-tab-close_1i903_127:hover{opacity:1;background:var(--entry-hover,#ffffff1a)}._panel-tab-new_1i903_147{width:28px;height:24px;color:var(--fg-muted,var(--fg));cursor:pointer;background:0 0;border:none;border-radius:2px;flex-shrink:0;padding:0;font-size:16px;line-height:1}._panel-tab-new_1i903_147:hover{color:var(--fg);background:var(--entry-hover,#ffffff0f)}._panel-tab-dragging_1i903_166{opacity:.5}._panel-tab-drop-indicator_1i903_170{background:var(--border-active,#0078d4);border-radius:1px;flex:0 0 3px;align-self:stretch;width:3px;min-width:3px;margin:2px 0}._panel-content_1i903_180{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;inset:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;inset:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre;font-family:monospace}.xterm .xterm-accessibility-tree>div{transform-origin:0;width:fit-content}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;z-index:11;background:0 0;transition:opacity .1s linear}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{display:none;position:absolute}.xterm .xterm-scrollable-element>.shadow.top{width:100%;height:3px;box-shadow:var(--vscode-scrollbar-shadow,#000) 0 6px 6px -6px inset;display:block;top:0;left:3px}.xterm .xterm-scrollable-element>.shadow.left{width:3px;height:100%;box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset;display:block;top:3px;left:0}.xterm .xterm-scrollable-element>.shadow.top-left-corner{width:3px;height:3px;display:block;top:0;left:0}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset}._dotdir-root_19j9p_1,._dotdir-root_19j9p_1 *{box-sizing:border-box;margin:0;padding:0}._dotdir-root_19j9p_1{--bg:#1e1e2e;--fg:#cdd6f4;--bg-secondary:#181825;--fg-secondary:#a6adc8;--fg-muted:#6c7086;--border:#313244;--border-active:#585b70;--entry-hover:#252536;--entry-selected:#313244;--entry-selected-fg:#f5e0dc;--entry-selected-inactive:#252536;--error-bg:#45243a;--error-fg:#f38ba8;--accent:#89b4fa;--accent-fg:#1e1e2e;background:var(--bg);color:var(--fg);width:100%;min-width:0;height:100%;min-height:0;padding-bottom:env(safe-area-inset-bottom);flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:13px;display:flex;position:relative;overflow:hidden}._dotdir-root_19j9p_1[data-theme=light]{--bg:#eff1f5;--fg:#4c4f69;--bg-secondary:#e6e9ef;--fg-secondary:#6c6f85;--fg-muted:#9ca0b0;--border:#ccd0da;--border-active:#8c8fa1;--entry-hover:#e6e9ef;--entry-selected:#ccd0da;--entry-selected-fg:#4c4f69;--entry-selected-inactive:#e6e9ef;--error-bg:#fce4e4;--error-fg:#d20f39;--accent:#1e66f5;--accent-fg:#fff}._app_19j9p_57{grid-template-rows:1fr auto auto auto;height:100%;min-height:0;display:grid;overflow:hidden}._status-bar_19j9p_65{align-items:stretch;display:flex}._loading_19j9p_70{height:100%;color:var(--fg-muted);justify-content:center;align-items:center;display:flex}
|
|
1
|
+
._hotkey-char_1lp0s_1{text-underline-offset:2px;text-decoration:underline}._overlay-backdrop_1lp0s_6{z-index:200;background:#00000080;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}._overlay-backdrop-top_1lp0s_16{align-items:flex-start;padding-top:15vh}._modal-dialog_1lp0s_21{background:var(--bg);width:400px;max-width:90vw;color:var(--fg);border:1px solid var(--border-active);border-radius:4px;flex-direction:column;max-height:min(90vh,100% - 32px);margin:auto;padding:0;display:flex;overflow:hidden}._modal-dialog-header_1lp0s_36{border-bottom:1px solid var(--border);background:var(--bg-secondary);color:var(--fg-secondary);-webkit-user-select:none;user-select:none;padding:8px 12px;font-size:12px;font-weight:600}._modal-dialog_1lp0s_21._error_1lp0s_46 ._modal-dialog-header_1lp0s_36{background:var(--error-bg);color:var(--error-fg)}._modal-dialog-body_1lp0s_51{word-break:break-word;padding:16px 12px;font-size:13px;line-height:1.4}._modal-dialog-buttons_1lp0s_58{border-top:1px solid var(--border);justify-content:flex-end;gap:8px;padding:8px 12px;display:flex}._modal-dialog-buttons_1lp0s_58 button{border:1px solid var(--border-active);background:var(--bg-secondary);color:var(--fg);cursor:pointer;border-radius:3px;padding:4px 16px;font-size:12px}._modal-dialog-buttons_1lp0s_58 button:focus{outline:2px solid var(--border-active);outline-offset:1px}._open-create-file-dialog_1lp0s_81 ._modal-dialog-body_1lp0s_51{flex-direction:column;gap:12px;display:flex}._open-create-file-form_1lp0s_87{flex-direction:column;display:flex}._open-create-file-field_1lp0s_92{flex-direction:column;gap:4px;display:flex}._open-create-file-field_1lp0s_92 label{color:var(--fg-secondary);font-size:12px}._open-create-file-field_1lp0s_92 input,._open-create-file-field_1lp0s_92 select,._make-folder-field_1lp0s_105 input,._copy-config-field_1lp0s_106 input,._copy-config-field_1lp0s_106 select,._conflict-rename-field_1lp0s_108 input,._rename-field_1lp0s_109 input{background:var(--bg-secondary);border:1px solid var(--border);color:var(--fg);border-radius:3px;padding:6px 8px;font-size:13px}._open-create-file-field_1lp0s_92 input:focus,._open-create-file-field_1lp0s_92 select:focus,._make-folder-field_1lp0s_105 input:focus,._copy-config-field_1lp0s_106 input:focus,._copy-config-field_1lp0s_106 select:focus,._conflict-rename-field_1lp0s_108 input:focus,._rename-field_1lp0s_109 input:focus{outline:2px solid var(--border-active);outline-offset:0}._open-create-file-hint_1lp0s_129{color:var(--fg-muted);font-size:11px}._make-folder-dialog_1lp0s_134 ._modal-dialog-body_1lp0s_51{flex-direction:column;gap:8px;display:flex}._make-folder-form_1lp0s_140{flex-direction:column;gap:12px;display:flex}._make-folder-field_1lp0s_105,._copy-config-field_1lp0s_106,._conflict-rename-field_1lp0s_108,._rename-field_1lp0s_109{flex-direction:column;gap:4px;display:flex}._make-folder-field_1lp0s_105 label,._copy-config-field_1lp0s_106 label,._conflict-rename-field_1lp0s_108 label,._rename-field_1lp0s_109 label{color:var(--fg-secondary);font-size:12px}._make-folder-checkbox_1lp0s_163{color:var(--fg-secondary);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;font-size:12px;display:flex}._make-folder-checkbox_1lp0s_163 input,._copy-config-section_1lp0s_174 input[type=checkbox]{margin:0}._modal-dialog-buttons_1lp0s_58 button[type=submit]:disabled{opacity:.6;cursor:not-allowed}._delete-progress-dialog_1lp0s_183 ._delete-progress-text_1lp0s_183{margin-bottom:4px;font-weight:600}._delete-progress-dialog_1lp0s_183 ._delete-progress-path_1lp0s_188{color:var(--fg-secondary);text-overflow:ellipsis;white-space:nowrap;max-width:60vw;font-size:12px;overflow:hidden}._delete-progress-dialog_1lp0s_183 ._delete-progress-hint_1lp0s_197{color:var(--fg-muted);margin:12px 0 0;font-size:12px}._copy-config-dialog_1lp0s_203,._copy-progress-dialog_1lp0s_204{width:440px}._move-config-dialog_1lp0s_208{width:400px}._copy-config-dialog_1lp0s_203 ._modal-dialog-body_1lp0s_51,._move-config-dialog_1lp0s_208 ._modal-dialog-body_1lp0s_51{flex-direction:column;gap:10px;display:flex}._copy-config-section_1lp0s_174{border:1px solid var(--border);border-radius:3px;margin:0;padding:8px 12px}._copy-config-section_1lp0s_174 legend{color:var(--fg-secondary);padding:0 4px;font-size:11px;font-weight:600}._copy-config-section_1lp0s_174 label{cursor:pointer;align-items:center;gap:6px;padding:2px 0;font-size:12px;display:flex}._copy-progress-bar-container_1lp0s_242{background:var(--bg-secondary);border-radius:3px;height:6px;margin-bottom:8px;overflow:hidden}._copy-progress-bar_1lp0s_242{background:var(--border-active);border-radius:3px;height:100%;transition:width .15s}._copy-progress-stats_1lp0s_257{color:var(--fg-secondary);justify-content:space-between;margin-bottom:4px;font-size:12px;display:flex}._copy-progress-current_1lp0s_265{color:var(--fg-secondary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}._conflict-dialog_1lp0s_273{width:500px}._conflict-file-info_1lp0s_277{margin-bottom:12px}._conflict-file-info_1lp0s_277:last-child{margin-bottom:0}._conflict-file-label_1lp0s_285{color:var(--fg-secondary);margin-bottom:2px;font-size:11px;font-weight:600}._conflict-file-path_1lp0s_292{text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}._conflict-file-meta_1lp0s_299{color:var(--fg-muted);margin-top:2px;font-size:11px}._conflict-buttons_1lp0s_305{flex-wrap:wrap}._rename-dialog_1lp0s_309{width:400px}._help-dialog_riri2_1{background:var(--bg);width:560px;max-width:90vw;color:var(--fg);border:1px solid var(--border-active);border-radius:6px;margin:auto;padding:0}._help-dialog_riri2_1::backdrop{background:#00000080}._help-dialog-header_riri2_16{background:var(--bg-secondary);border-bottom:1px solid var(--border);color:var(--fg-secondary);text-transform:uppercase;letter-spacing:.05em;padding:8px 12px;font-size:12px;font-weight:600}._help-dialog-body_riri2_27{outline:none;max-height:60vh;padding:16px 18px;line-height:1.6;overflow-y:auto}._help-dialog-body_riri2_27 h1{color:var(--fg);margin-bottom:10px;font-size:15px;font-weight:600}._help-dialog-body_riri2_27 h2{text-transform:uppercase;letter-spacing:.05em;color:var(--fg-secondary);margin-top:16px;margin-bottom:6px;font-size:12px;font-weight:600}._help-dialog-body_riri2_27 p{color:var(--fg);margin-bottom:8px}._help-dialog-body_riri2_27 ul{margin-bottom:8px;padding-left:18px}._help-dialog-body_riri2_27 li{color:var(--fg);margin-bottom:4px}._help-dialog-body_riri2_27 strong{color:var(--fg);font-weight:600}._help-dialog-body_riri2_27 code{background:var(--bg-secondary);border:1px solid var(--border);color:var(--fg);border-radius:3px;padding:1px 5px;font-family:SF Mono,Cascadia Code,Fira Code,monospace;font-size:12px}._help-dialog-buttons_riri2_82{border-top:1px solid var(--border);flex-shrink:0;justify-content:flex-end;gap:8px;padding:8px 12px;display:flex}._help-dialog-buttons_riri2_82 button{border:1px solid var(--border-active);background:var(--bg-secondary);color:var(--fg);cursor:pointer;border-radius:3px;padding:4px 16px;font-size:13px}._help-dialog-buttons_riri2_82 button:hover{background:var(--entry-hover)}._help-dialog-buttons_riri2_82 button:focus{outline:2px solid var(--border-active);outline-offset:1px}._action-bar_11mfr_1{-webkit-user-select:none;user-select:none;flex:auto;align-items:center;gap:1px;min-width:0;height:24px;font-size:12px;display:flex;overflow:hidden}._action-bar-item_11mfr_13{cursor:pointer;background:var(--action-bar-bg);border:1px solid var(--action-bar-border);flex:1 1 0;justify-content:center;align-items:center;gap:5px;min-width:0;height:100%;padding:0 6px;transition:background .1s;display:flex}._action-bar-item_11mfr_13:hover:not(._disabled_11mfr_28){background:var(--entry-hover)}._action-bar-item_11mfr_13:active:not(._disabled_11mfr_28){background:var(--border)}._action-bar-item_11mfr_13._disabled_11mfr_28{cursor:default}._action-bar-item_11mfr_13._disabled_11mfr_28 ._action-bar-key_11mfr_40,._action-bar-item_11mfr_13._disabled_11mfr_28 ._action-bar-label_11mfr_41{opacity:.35}._action-bar-key_11mfr_40{color:var(--action-bar-badge-fg);background:var(--action-bar-badge-bg);border-radius:2px;padding:0 2px;font-size:11px;font-weight:600}._action-bar-label_11mfr_41{color:var(--action-bar-fg);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._terminal-and-panels_l0nwk_1{grid-row:1;display:grid;overflow:hidden}._command-line_l0nwk_7{color:#d7dae0;background:#11131a;flex-shrink:0;align-items:center;height:23px;min-height:0;padding:0 4px;font-family:Menlo,Monaco,Courier New,monospace;font-size:13px;display:flex}._command-line_l0nwk_7._hidden_l0nwk_20{display:none}._command-line-prompt_l0nwk_24{color:#8b9fc2;white-space:nowrap;text-overflow:ellipsis;flex-shrink:0;max-width:40%;margin-right:8px;font-weight:600;overflow:hidden}._command-line-input_l0nwk_35{white-space:pre;flex:1;min-width:0;overflow:hidden}._command-line-text_l0nwk_42{color:#d7dae0}._command-line-cursor_l0nwk_46{vertical-align:text-bottom;pointer-events:none;width:0;height:15px;display:inline-block;position:relative;overflow:visible}._command-line-cursor_l0nwk_46:after{content:"";background-color:#f5f7ff;width:1px;height:100%;position:absolute;top:0;left:.5px}._command-line-selected_l0nwk_66{color:#fff;background-color:#6496ff66}._terminal-background_l0nwk_71{z-index:0;border-top:1px solid var(--border);background:#11131a;flex-direction:column;grid-area:1/1;display:flex;overflow:hidden}._terminal-panel_l0nwk_82{background:#11131a;flex-direction:column;flex:auto;width:100%;min-height:0;max-height:100%;display:flex}._terminal-body_l0nwk_92{flex-direction:column;flex:auto;justify-content:stretch;min-height:0;display:flex;overflow:hidden}._terminal-container_l0nwk_101{flex:auto;width:100%;min-height:0;overflow:hidden}._terminal-toolbar_l0nwk_108{background:var(--bg-secondary);min-width:0;min-height:20px;color:var(--fg-secondary);border-top:1px solid #0b0d12;flex-shrink:0;align-items:center;gap:10px;padding:1px 8px;font-size:12px;display:flex}._terminal-tabs_l0nwk_122{flex:1;align-items:center;gap:6px;min-width:0;display:flex}._terminal-tab_l0nwk_122{border:1px solid var(--border);background:var(--bg);min-width:0;max-width:180px;color:var(--fg-secondary);cursor:pointer;border-radius:3px;align-items:center;gap:6px;padding:2px 8px;font-size:12px;display:inline-flex}._terminal-tab_l0nwk_122._active_l0nwk_145{border-color:var(--border-active);color:var(--fg)}._terminal-tab-add_l0nwk_150{justify-content:center;width:26px}._terminal-tab-status_l0nwk_155{background:var(--fg-muted);border-radius:999px;flex-shrink:0;width:7px;height:7px}._terminal-tab-status_l0nwk_155._status-running_l0nwk_163{background:#89b4fa}._terminal-tab-status_l0nwk_155._status-starting_l0nwk_167{background:#f9e2af}._terminal-tab-status_l0nwk_155._status-error_l0nwk_171{background:#f38ba8}._terminal-tab-status_l0nwk_155._status-exited_l0nwk_175{background:#6c7086}._terminal-tab-label_l0nwk_179{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._terminal-tab-close_l0nwk_185{color:var(--fg-muted);flex-shrink:0}._terminal-profile-picker_l0nwk_190{align-items:center;gap:8px;min-width:0;display:flex}._terminal-profile-label_l0nwk_197{text-transform:uppercase;letter-spacing:.04em;font-size:11px}._terminal-profile-picker_l0nwk_190 select{border:1px solid var(--border-active);background:var(--bg);min-width:140px;color:var(--fg);border-radius:3px;padding:2px 8px;font-size:12px}._terminal-profile-shell_l0nwk_213{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--fg-muted);font-family:monospace;overflow:hidden}._terminal-status-error_l0nwk_222{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--error-fg);overflow:hidden}._terminal-loading_l0nwk_230{color:var(--fg-muted);flex:1;align-items:center;min-height:0;padding:0 10px;display:flex}._terminal-container_l0nwk_101 .xterm{height:100%;padding:0 0 1px 4px;display:grid}._terminal-container_l0nwk_101 .xterm-viewport{height:100%!important;overflow-y:auto!important}._terminal-container_l0nwk_101 .xterm .xterm-viewport{position:absolute!important;inset:0!important}._command-palette-dialog_2w2i0_1{width:800px;max-width:calc(100% - 32px);max-height:none;overflow:visible}._command-palette_2w2i0_1{background:var(--bg);border:1px solid var(--border);border-radius:8px;width:100%;max-width:800px;overflow:hidden;box-shadow:0 16px 70px #00000080}._command-palette_2w2i0_1 [cmdk-input]{border:none;border-bottom:1px solid var(--border);background:var(--bg);width:100%;color:var(--fg);outline:none;padding:14px 16px;font-family:inherit;font-size:15px}._command-palette_2w2i0_1 [cmdk-input]::placeholder{color:var(--fg-muted)}._command-palette_2w2i0_1 [cmdk-list]{max-height:400px;padding:8px;overflow-y:auto}._command-palette_2w2i0_1 [cmdk-empty]{text-align:center;color:var(--fg-muted);padding:24px;font-size:13px}._command-palette_2w2i0_1 [cmdk-group-heading]{color:var(--fg-muted);text-transform:uppercase;letter-spacing:.05em;padding:8px 12px 4px;font-size:11px;font-weight:600}._command-palette_2w2i0_1 [cmdk-item]{cursor:pointer;color:var(--fg);-webkit-user-select:none;user-select:none;border-radius:6px;justify-content:space-between;align-items:center;padding:10px 12px;font-size:13px;display:flex}._command-palette_2w2i0_1 [cmdk-item][data-selected=true]{background:var(--accent);color:var(--accent-fg)}._command-palette_2w2i0_1 [cmdk-item][data-selected=true] ._command-item-keybinding_2w2i0_73{color:var(--accent-fg);background:#0003}._command-item-title_2w2i0_78{flex:1}._command-item-keybinding_2w2i0_73{color:var(--fg-muted);background:var(--bg-secondary);border-radius:4px;margin-left:12px;padding:2px 6px;font-family:system-ui,-apple-system,sans-serif;font-size:11px}._file-viewer_1gb4m_1{background:var(--bg);width:min(90vw,100% - 32px);max-width:calc(100% - 32px);height:min(90vh,100% - 32px);max-height:calc(100% - 32px);color:var(--fg);border:1px solid var(--border-active);border-radius:4px;flex-direction:column;margin:auto;padding:0;display:flex;overflow:hidden}._file-viewer-inline_1gb4m_17{border:none;border-radius:0;flex-direction:column;flex:1;width:100%;height:100%;min-height:0;margin:0;display:flex;overflow:hidden}._file-viewer-overlay_1gb4m_30,._file-editor-overlay_1gb4m_31{z-index:100;background:#00000080;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}._file-editor_1gb4m_31{background:var(--bg);width:min(90vw,100% - 32px);max-width:calc(100% - 32px);height:min(90vh,100% - 32px);max-height:calc(100% - 32px);color:var(--fg);border:1px solid var(--border-active);border-radius:4px;flex-direction:column;margin:auto;padding:0;display:flex;overflow:hidden}._ext-panel_jpq35_1{background:var(--bg);width:560px;max-width:calc(100% - 32px);height:min(80vh,100% - 32px);max-height:calc(100% - 32px);color:var(--fg);border:1px solid var(--border-active);border-radius:4px;flex-direction:column;margin:auto;padding:0;display:flex;overflow:hidden}._ext-panel-header_jpq35_17{background:var(--bg-secondary);border-bottom:1px solid var(--border);-webkit-user-select:none;user-select:none;flex-shrink:0;justify-content:space-between;align-items:center;padding:8px 12px;display:flex}._ext-panel-title_jpq35_28{color:var(--fg-secondary);font-size:12px;font-weight:600}._ext-panel-close_jpq35_34{color:var(--fg-muted);cursor:pointer;background:0 0;border:none;border-radius:3px;padding:2px 6px;font-size:14px}._ext-panel-close_jpq35_34:hover{background:var(--entry-hover);color:var(--fg)}._ext-panel-tabs_jpq35_49{border-bottom:1px solid var(--border);flex-shrink:0;display:flex}._ext-tab_jpq35_55{color:var(--fg-muted);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;flex:1;padding:6px 12px;font-size:12px}._ext-tab_jpq35_55:hover{color:var(--fg-secondary);background:var(--entry-hover)}._ext-tab_jpq35_55._active_jpq35_71{color:var(--fg);border-bottom-color:var(--fg-secondary)}._ext-search_jpq35_76{border-bottom:1px solid var(--border);flex-shrink:0;padding:8px}._ext-source-selector_jpq35_82{gap:4px;margin-bottom:8px;display:flex}._ext-source-btn_jpq35_88{border:1px solid var(--border);background:var(--bg-secondary);color:var(--fg-muted);cursor:pointer;border-radius:3px;flex:1;padding:4px 8px;font-size:11px}._ext-source-btn_jpq35_88:hover{background:var(--bg-hover)}._ext-source-btn_jpq35_88._active_jpq35_71{background:var(--border-active);border-color:var(--border-active);color:var(--fg)}._ext-search_jpq35_76 input{border:1px solid var(--border);background:var(--bg-secondary);width:100%;color:var(--fg);border-radius:3px;outline:none;padding:5px 8px;font-family:inherit;font-size:12px}._ext-search_jpq35_76 input:focus{border-color:var(--border-active)}._ext-search_jpq35_76 input::placeholder{color:var(--fg-muted)}._ext-error_jpq35_129{color:var(--error-fg);background:var(--error-bg);flex-shrink:0;padding:6px 12px;font-size:11px}._ext-list_jpq35_137{flex:1;min-height:0;overflow-y:auto}._ext-empty_jpq35_143{text-align:center;color:var(--fg-muted);padding:32px 12px;font-size:12px}._ext-item_jpq35_150{border-bottom:1px solid var(--border);align-items:flex-start;gap:10px;padding:10px 12px;display:flex}._ext-item_jpq35_150:hover{background:var(--entry-hover)}._ext-icon_jpq35_162{background:var(--border);width:36px;height:36px;color:var(--fg-secondary);border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;font-size:16px;font-weight:600;display:flex;overflow:hidden}._ext-icon_jpq35_162 img{object-fit:cover;width:100%;height:100%;display:block}._ext-info_jpq35_184{flex:1;min-width:0}._ext-name_jpq35_189{color:var(--fg);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;overflow:hidden}._ext-publisher_jpq35_198{color:var(--fg-muted);margin-top:1px;font-size:11px}._ext-desc_jpq35_204{color:var(--fg-secondary);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:3px;font-size:12px;display:-webkit-box;overflow:hidden}._ext-meta_jpq35_214{color:var(--fg-muted);gap:10px;margin-top:4px;font-family:monospace;font-size:11px;display:flex}._ext-theme-badge_jpq35_223{color:var(--fg-muted);font-style:italic}._ext-theme-badge_jpq35_223._active_jpq35_71{color:var(--border-active);font-style:normal;font-weight:600}._ext-actions_jpq35_234{flex-shrink:0;gap:6px;padding-top:2px;display:flex}._ext-btn_jpq35_241{border:1px solid var(--border-active);background:var(--bg-secondary);color:var(--fg);cursor:pointer;white-space:nowrap;border-radius:3px;padding:3px 12px;font-size:11px}._ext-btn_jpq35_241:hover:not(:disabled){background:var(--entry-hover)}._ext-btn_jpq35_241:disabled{opacity:.5;cursor:default}._ext-btn_jpq35_241._install_jpq35_261{background:var(--border-active);color:var(--fg)}._ext-btn_jpq35_241._uninstall_jpq35_266{border-color:var(--error-fg);color:var(--error-fg);background:0 0}._ext-btn_jpq35_241._uninstall_jpq35_266:hover:not(:disabled){background:var(--error-bg)}._ext-btn_jpq35_241._installed_jpq35_276{border-color:var(--fg-muted);color:var(--fg-muted)}._ext-color-themes_jpq35_281{flex-wrap:wrap;gap:4px;margin-top:4px;display:flex}._ext-color-theme-btn_jpq35_288{align-items:center;gap:4px;display:inline-flex;padding:2px 8px!important;font-size:10px!important}._ext-color-theme-indicator_jpq35_296{border:1px solid var(--fg-muted);border-radius:50%;width:8px;height:8px;display:inline-block}._ext-color-theme-indicator_jpq35_296[data-ui-theme=vs-dark],._ext-color-theme-indicator_jpq35_296[data-ui-theme=hc-black]{background:#1e1e1e}._ext-color-theme-indicator_jpq35_296[data-ui-theme=vs],._ext-color-theme-indicator_jpq35_296[data-ui-theme=hc-light]{background:#f5f5f5}._file-list_15ml8_1{flex-direction:column;height:100%;display:flex}._file-list_15ml8_1._active-panel_15ml8_7 ._path-bar_15ml8_7{background:var(--bg);color:var(--fg)}._path-bar_15ml8_7{background:var(--bg-secondary);color:var(--fg-secondary);border-bottom:1px solid var(--border);-webkit-user-select:none;user-select:none;flex-shrink:0;padding:8px 12px;font-family:monospace;font-size:12px;position:relative;overflow:visible}._breadcrumbs_15ml8_25{white-space:nowrap;scrollbar-width:none;justify-content:flex-start;align-items:center;gap:8px;min-width:0;display:flex;position:relative;overflow:auto hidden;-webkit-mask-image:none;mask-image:none}._breadcrumbs_15ml8_25::-webkit-scrollbar{display:none}._breadcrumbs_15ml8_25._is-cropped-left_15ml8_44{-webkit-mask-image:linear-gradient(90deg,#0000 0,#000 18px 100%);mask-image:linear-gradient(90deg,#0000 0,#000 18px 100%);-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}._breadcrumbs_15ml8_25._is-cropped-right_15ml8_53{-webkit-mask-image:linear-gradient(90deg,#000 0 calc(100% - 18px),#0000 100%);mask-image:linear-gradient(90deg,#000 0 calc(100% - 18px),#0000 100%);-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}._breadcrumbs_15ml8_25._is-cropped-left_15ml8_44._is-cropped-right_15ml8_53{-webkit-mask-image:linear-gradient(90deg,#0000 0,#000 18px calc(100% - 18px),#0000 100%);mask-image:linear-gradient(90deg,#0000 0,#000 18px calc(100% - 18px),#0000 100%)}._breadcrumbs_15ml8_25 ._breadcrumb-copied-tooltip_15ml8_67{background:var(--fg);color:var(--bg);white-space:nowrap;pointer-events:none;z-index:10;border-radius:4px;margin-top:4px;padding:4px 8px;font-size:11px;font-weight:500;position:absolute;top:100%;left:0;box-shadow:0 1px 4px #0003}._breadcrumb-segment_15ml8_84{cursor:pointer;border-radius:4px;flex:none;align-items:center;margin:-2px -6px;padding:2px 6px;transition:background-color .1s;display:flex;position:relative}._breadcrumb-segment_15ml8_84:hover{background:var(--entry-hover,#ffffff0f)}._breadcrumb-segment-text_15ml8_100{white-space:nowrap}._breadcrumb-separator_15ml8_104{opacity:.6;pointer-events:none;-webkit-user-select:none;user-select:none;flex-shrink:0}._file-list-body_15ml8_111{flex:1;min-height:0;overflow:hidden}._columns-scroller-root_15ml8_117{width:100%;height:100%;position:relative}._columns-scroller-content_15ml8_123{flex-flow:column wrap;display:flex;overflow:hidden}._columns-scroller-content_15ml8_123>div{box-sizing:border-box;overflow:hidden}._columns-borders_15ml8_135{pointer-events:none;z-index:1;display:grid;position:absolute;inset:0}._columns-border_15ml8_135{border-inline-end:1px solid var(--border)}._columns-border_15ml8_135:last-child{border-inline-end:none}._entry_15ml8_151{cursor:default;-webkit-user-select:none;user-select:none;align-items:center;gap:8px;padding:0 12px;display:flex;position:relative;overflow:hidden}._file-list_15ml8_1:not(._no-hover_15ml8_162) ._entry_15ml8_151:hover{background:var(--entry-hover)}._entry_15ml8_151._selected_15ml8_166{background:var(--entry-selected);color:var(--entry-selected-fg)}._file-list_15ml8_1._inactive-panel_15ml8_171 ._entry_15ml8_151._selected_15ml8_166{background:var(--entry-selected-inactive);color:var(--entry-selected-inactive-fg)}._entry_15ml8_151._marked_15ml8_176:before{content:"";background:var(--entry-marked-bg,#e5c07b26);pointer-events:none;border-radius:6px;position:absolute;inset:0 4px}._columns-scroller-content_15ml8_123>div:has(>._entry_15ml8_151._marked_15ml8_176)+div:has(>._entry_15ml8_151._marked_15ml8_176)>._entry_15ml8_151._marked_15ml8_176:before{border-top-left-radius:0;border-top-right-radius:0}._columns-scroller-content_15ml8_123>div:has(>._entry_15ml8_151._marked_15ml8_176):has(+div>._entry_15ml8_151._marked_15ml8_176)>._entry_15ml8_151._marked_15ml8_176:before{border-bottom-right-radius:0;border-bottom-left-radius:0}._entry-icon_15ml8_195{flex-shrink:0;align-items:center;display:flex}._entry-name_15ml8_201{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}._entry-size_15ml8_208{color:var(--fg-muted);text-align:right;flex-shrink:0;min-width:70px;font-family:monospace;font-size:12px}._file-info-footer_15ml8_217{border-top:1px solid var(--border);background:var(--bg-secondary);height:26px;color:var(--fg-secondary);-webkit-user-select:none;user-select:none;flex-shrink:0;align-items:center;gap:12px;padding:0 12px;font-size:12px;display:flex}._file-info-name_15ml8_231{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}._file-info-link_15ml8_238{text-overflow:ellipsis;white-space:nowrap;color:var(--fg-muted);flex:2;font-family:monospace;overflow:hidden}._file-info-size_15ml8_247{text-align:right;min-width:60px;font-family:monospace}._file-info-date_15ml8_253{text-align:right;min-width:120px;font-family:monospace}._panel-summary_15ml8_259{color:var(--fg-muted);border-top:1px solid var(--border);-webkit-user-select:none;user-select:none;flex-shrink:0;padding:2px 12px;font-size:11px}._panels-overlay_1i903_1{z-index:1;background:var(--bg);grid-area:1/1;gap:4px;min-height:0;display:flex;overflow:hidden}._panels-overlay_1i903_1._hidden_1i903_12{visibility:hidden;pointer-events:none}._panel_1i903_1{border:1px solid var(--border);background:var(--bg);-webkit-user-select:none;user-select:none;flex-direction:column;flex:1;min-width:0;display:flex;position:relative}._panel_1i903_1+._panel_1i903_1{border-left:1px solid var(--border)}._panel_1i903_1._active_1i903_33{border-color:var(--border-active)}._panel-progress_1i903_37{z-index:1;height:2px;position:absolute;top:0;left:0;right:0;overflow:hidden}._panel-progress_1i903_37:after{content:"";background:var(--border-active);width:40%;height:100%;animation:1s ease-in-out infinite _progress-slide_1i903_1;position:absolute;top:0;left:0}@keyframes _progress-slide_1i903_1{0%{left:-40%}to{left:100%}}._panel-tabs_1i903_67{background:var(--bg-tabs,var(--bg));border-bottom:1px solid var(--border);flex-shrink:0;align-items:center;height:28px;display:flex;overflow:hidden}._panel-tabs-list_1i903_77{scrollbar-width:none;flex:1;align-items:center;min-width:0;display:flex;overflow:auto hidden}._panel-tabs-list_1i903_77::-webkit-scrollbar{display:none}._panel-tab_1i903_67{white-space:nowrap;cursor:pointer;border-right:1px solid var(--border);color:var(--fg-muted,var(--fg));flex-shrink:0;align-items:center;gap:6px;min-width:48px;max-width:160px;padding:4px 8px;font-size:12px;display:flex}._panel-tab_1i903_67 ._panel-tab-label_1i903_106{text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}._panel-tab_1i903_67:hover{color:var(--fg);background:var(--entry-hover,#ffffff0f)}._panel-tab_1i903_67._active_1i903_33{color:var(--fg);background:var(--bg)}._panel-tab_1i903_67._temp_1i903_123 ._panel-tab-label_1i903_106{font-style:italic}._panel-tab-close_1i903_127{width:16px;height:16px;color:inherit;opacity:.6;cursor:pointer;background:0 0;border:none;border-radius:2px;flex-shrink:0;padding:0;font-size:14px;line-height:1}._panel-tab-close_1i903_127:hover{opacity:1;background:var(--entry-hover,#ffffff1a)}._panel-tab-new_1i903_147{width:28px;height:24px;color:var(--fg-muted,var(--fg));cursor:pointer;background:0 0;border:none;border-radius:2px;flex-shrink:0;padding:0;font-size:16px;line-height:1}._panel-tab-new_1i903_147:hover{color:var(--fg);background:var(--entry-hover,#ffffff0f)}._panel-tab-dragging_1i903_166{opacity:.5}._panel-tab-drop-indicator_1i903_170{background:var(--border-active,#0078d4);border-radius:1px;flex:0 0 3px;align-self:stretch;width:3px;min-width:3px;margin:2px 0}._panel-content_1i903_180{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;inset:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;inset:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre;font-family:monospace}.xterm .xterm-accessibility-tree>div{transform-origin:0;width:fit-content}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;z-index:11;background:0 0;transition:opacity .1s linear}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{display:none;position:absolute}.xterm .xterm-scrollable-element>.shadow.top{width:100%;height:3px;box-shadow:var(--vscode-scrollbar-shadow,#000) 0 6px 6px -6px inset;display:block;top:0;left:3px}.xterm .xterm-scrollable-element>.shadow.left{width:3px;height:100%;box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset;display:block;top:3px;left:0}.xterm .xterm-scrollable-element>.shadow.top-left-corner{width:3px;height:3px;display:block;top:0;left:0}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset}:where(._dotdir-root_4bfa7_1,._dotdir-root_4bfa7_1 *){box-sizing:border-box;margin:0;padding:0}._dotdir-root_4bfa7_1{--bg:#1e1e2e;--fg:#cdd6f4;--bg-secondary:#181825;--fg-secondary:#a6adc8;--fg-muted:#6c7086;--border:#313244;--border-active:#585b70;--entry-hover:#252536;--entry-selected:#313244;--entry-selected-fg:#f5e0dc;--entry-selected-inactive:#252536;--error-bg:#45243a;--error-fg:#f38ba8;--accent:#89b4fa;--accent-fg:#1e1e2e;background:var(--bg);color:var(--fg);width:100%;min-width:0;height:100%;min-height:0;padding-bottom:env(safe-area-inset-bottom);flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:13px;display:flex;position:relative;overflow:hidden}._dotdir-root_4bfa7_1[data-theme=light]{--bg:#eff1f5;--fg:#4c4f69;--bg-secondary:#e6e9ef;--fg-secondary:#6c6f85;--fg-muted:#9ca0b0;--border:#ccd0da;--border-active:#8c8fa1;--entry-hover:#e6e9ef;--entry-selected:#ccd0da;--entry-selected-fg:#4c4f69;--entry-selected-inactive:#e6e9ef;--error-bg:#fce4e4;--error-fg:#d20f39;--accent:#1e66f5;--accent-fg:#fff}._app_4bfa7_56{grid-template-rows:1fr auto auto auto;height:100%;min-height:0;display:grid;overflow:hidden}._status-bar_4bfa7_64{align-items:stretch;display:flex}._loading_4bfa7_69{height:100%;color:var(--fg-muted);justify-content:center;align-items:center;display:flex}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/dotdir.js
CHANGED
|
@@ -127,4 +127,4 @@ folder { font-weight: bold; }
|
|
|
127
127
|
`;await n.session.write(e+i)},[]),dispose:(0,c.useCallback)(()=>{for(let e of a.current)e.session.dispose();n([]),i(null)},[n,i])}}function qi(){let e=(0,d.useAtomValue)(Oe),t=(0,d.useAtomValue)(ke),{sessions:n,activeSessionId:r,activeSession:i,activate:a,createSession:o,closeSession:s,switchActiveProfile:c}=Ki(),u=i?.profileId??null,f=i?e.find(e=>e.id===i.profileId)?.shell??null:null,p=i?.error??null;return(0,l.jsxs)(`div`,{className:V[`terminal-toolbar`],children:[(0,l.jsxs)(`div`,{className:V[`terminal-tabs`],children:[n.map(e=>(0,l.jsxs)(`button`,{type:`button`,className:C(V,`terminal-tab`,e.id===r&&`active`),onClick:()=>a(e.id),children:[(0,l.jsx)(`span`,{className:C(V,`terminal-tab-status`,`status-${e.status}`)}),(0,l.jsx)(`span`,{className:V[`terminal-tab-label`],children:e.profileLabel}),n.length>1&&(0,l.jsx)(`span`,{className:V[`terminal-tab-close`],onClick:t=>{t.stopPropagation(),s(e.id)},children:`x`})]},e.id)),(0,l.jsx)(`button`,{type:`button`,className:C(V,`terminal-tab`,`terminal-tab-add`),onClick:()=>o(u??e[0]?.id),children:`+`})]}),(0,l.jsxs)(`label`,{className:V[`terminal-profile-picker`],children:[(0,l.jsx)(`span`,{className:V[`terminal-profile-label`],children:`Shell`}),(0,l.jsx)(`select`,{value:u??``,disabled:!t||e.length===0||!r,onChange:e=>c(e.target.value),children:e.map(e=>(0,l.jsx)(`option`,{value:e.id,children:e.label},e.id))})]}),r&&(0,l.jsx)(`div`,{className:V[`terminal-profile-shell`],children:f??``}),p&&(0,l.jsx)(`div`,{className:V[`terminal-status-error`],children:p})]})}function Ji(){let{activeSession:e}=Ki(),t=(0,d.useAtomValue)(je),n=(0,d.useAtomValue)(Me);return(0,l.jsx)(`div`,{className:V[`terminal-panel`],children:(0,l.jsx)(`div`,{className:V[`terminal-body`],children:e?(0,l.jsx)(Ii,{session:e.session,expanded:!t,focusRequestKey:n},e.id):(0,l.jsx)(`div`,{className:V[`terminal-loading`],children:`Loading terminal...`})})})}var Yi={left:`right`,right:`left`},Xi={left:`leftPanel`,right:`rightPanel`},Zi=[`left`,`right`];function Qi(e,t){return e?e.some(e=>e===t||e===`darwin`&&t===`macos`||e===`unix`&&(t===`macos`||t===`linux`)):!0}function $i(e,t){return e.replace(/\$([A-Za-z_][A-Za-z0-9_]*)/g,(e,n)=>t[n]??``)}function ea(e){let t=e.toLowerCase();return t===`cmd`?{hiddenCdTemplate:`@cd /d {{cwd}}`,cwdEscape:`cmd`,lineEnding:`\r
|
|
128
128
|
`,spawnArgs:[]}:t===`powershell`||t===`pwsh`?{hiddenCdTemplate:`Set-Location -LiteralPath {{cwd}}`,cwdEscape:`powershell`,lineEnding:`\r
|
|
129
129
|
`,spawnArgs:[]}:{hiddenCdTemplate:`cd {{cwd}}`,cwdEscape:`posix`,lineEnding:`
|
|
130
|
-
`,spawnArgs:[]}}function ta(e,t,n){let r=ea(n.shell);return{id:e,label:t,shell:e,hiddenCdTemplate:n.hiddenCdTemplate??r.hiddenCdTemplate,cwdEscape:n.cwdEscape??r.cwdEscape,lineEnding:n.lineEnding??r.lineEnding,spawnArgs:n.spawnArgs??r.spawnArgs}}async function na(e,t,n){let r=n.__platform__??``,i=n.SHELL??``,a=[],o={},s=new Set,c=[];for(let e of t)for(let t of e.shellIntegrations??[])Qi(t.platforms,r)&&c.push(t);if(i&&r!==`windows`){let t=i.split(`/`).pop()??``,n=c.find(e=>e.shell===t);if(n&&!s.has(i))try{await e.fs.exists(i)&&(s.add(i),a.push(ta(i,n.label,n)),o[i]={script:n.script,scriptArg:n.scriptArg??!1})}catch{}}for(let t of c)for(let r of t.executableCandidates){let i=$i(r,n);if(!(!i||s.has(i)))try{if(await e.fs.exists(i)){s.add(i),a.push(ta(i,t.label,t)),o[i]={script:t.script,scriptArg:t.scriptArg??!1};break}}catch{}}return{profiles:a,shellScripts:o}}function ra({settingsLoaded:e,onRefreshPanels:t}){let n=z(),r=vn(),i=(0,d.useAtomValue)(we),a=(0,d.useAtomValue)(Te),o=(0,d.useAtomValue)(Ae),s=(0,d.useSetAtom)(Ee),l=(0,d.useSetAtom)(De),u=(0,d.useSetAtom)(Oe),f=(0,d.useSetAtom)(ke),{setIconTheme:p}=Er(),{setIconThemeKind:m}=Dr(),h=(0,c.useRef)(i);h.current=i;let g=(0,c.useRef)(a);g.current=a;let _=(0,c.useRef)(t);_.current=t;let v=(0,c.useRef)([]),y=(0,c.useRef)([]),b=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let e=a?Fn(v.current,a):null,t=e?on(e.theme.uiTheme):o===`light`||o===`high-contrast-light`?`light`:`dark`;jt().dataset.theme=t,m(t)},[o,a]);let x=(0,c.useCallback)(async(e,t)=>{if(!t)return;let r=e.find(e=>`${e.ref.publisher}.${e.ref.name}`===t);if(r?.iconThemeFssPath&&!r.iconThemeFss)try{r.iconThemeFss=await K(n,r.iconThemeFssPath),r.iconThemeBasePath||=U(r.iconThemeFssPath)}catch{}},[n]);(0,c.useEffect)(()=>{b.current&&(async()=>{let e=v.current;if(await x(e,i),Vr(e,i),!i)p(`fss`);else{let t=e.find(e=>`${e.ref.publisher}.${e.ref.name}`===i);t?.vscodeIconThemePath?p(`vscode`,t.vscodeIconThemePath):t?.iconThemeFssPath?p(`fss`):p(`none`)}_.current()})()},[i,x]),(0,c.useEffect)(()=>{if(b.current)if(!a)an();else{let e=Fn(v.current,a);e&&sn(n,e.theme.jsonPath,e.theme.uiTheme).catch(()=>an())}},[a]),(0,c.useEffect)(()=>{if(!e)return;ue.initialize();let t=async e=>{ue.clear();for(let t of e)if(t.languages)for(let e of t.languages)ue.registerLanguage(e);await ue.activateGrammars()},i=async(e,t)=>{if(!t){await p(`fss`);return}let n=e.find(e=>`${e.ref.publisher}.${e.ref.name}`===t);n?.vscodeIconThemePath?await p(`vscode`,n.vscodeIconThemePath):n?.iconThemeFssPath?await p(`fss`):await p(`none`)},a=async(e,t)=>{if(!t){an();return}let r=Fn(e,t);if(r){let e=on(r.theme.uiTheme);jt().dataset.theme=e,m(e);try{await sn(n,r.theme.jsonPath,r.theme.uiTheme)}catch(e){console.warn(`[ExtHost] Failed to load color theme:`,t,e),an()}}else an()},o=e=>{for(let e of y.current)try{e()}catch{}y.current=[];for(let t of e){if(t.commands){let e=B.registerContributions(t.commands);y.current.push(e);for(let e of t.commands){let t=B.registerCommand(e.command,async(...t)=>{await r.executeCommand(e.command,t)});y.current.push(t)}}t.keybindings?.length&&y.current.push(...tt(B,t.keybindings))}},c=r.onLoaded(e=>{(async()=>{if(v.current=e,s(e),qt(e),Ot(),n.fsProvider){for(let t of e)for(let e of t.fsProviders??[])if(e.runtime===`backend`){let r=W(t.dirPath,e.entry);n.fsProvider.load(r).catch(()=>{})}}n.utils.getEnv().then(t=>na(n,e,t).then(({profiles:e,shellScripts:t})=>{u(e),f(!0),n.pty.setShellIntegrations&&Object.keys(t).length>0&&n.pty.setShellIntegrations(t).catch(()=>{})})).catch(()=>{f(!0)}),await x(e,h.current),Vr(e,h.current),t(e),o(e),Promise.all([i(e,h.current),a(e,g.current)]).then(()=>{l(!0),b.current=!0,_.current()})})()});return r.start(),()=>{c();for(let e of y.current)try{e()}catch{}y.current=[],r.dispose()}},[e,x,s,u,f,l])}async function ia(e,t,n){let r=await e(t);if(r.length===0)return[{innerPath:t,destRelPath:n}];let i=[];for(let a of r){let r=t===`/`?`/${a.name}`:`${t}/${a.name}`,o=`${n}/${a.name}`;i.push(...await ia(e,r,o))}return i}function aa(e,t,n,r){let{showDialog:i,closeDialog:a,updateDialog:o}=ve(),s=z(),l=(0,c.useRef)(null),u=(0,c.useRef)(null),d=(0,c.useRef)(null),f=(0,c.useRef)(null),p=(0,c.useRef)(null),m=(0,c.useRef)(null),h=(0,c.useCallback)(()=>{r(e=>e+1),t.current.navigateTo(t.current.currentPath),n.current.navigateTo(n.current.currentPath)},[r,t,n]),g=(0,c.useCallback)((e,t)=>{e.length!==0&&i({type:`message`,title:`Move to Trash`,message:e.length===1?`Move "${G(e[0])}" to Trash?`:`Move ${e.length} items to Trash?`,variant:`default`,buttons:[{label:`Cancel`},{label:`Move to Trash`,default:!0,onClick:async()=>{try{await s.fs.moveToTrash(e),t()}catch(e){i({type:`message`,title:`Error`,message:e instanceof Error?e.message:String(e),variant:`error`})}}}]})},[i]),_=(0,c.useCallback)((e,t)=>{e.length!==0&&i({type:`message`,title:`Permanently Delete`,message:e.length===1?`Permanently delete "${G(e[0])}"? This cannot be undone.`:`Permanently delete ${e.length} items? This cannot be undone.`,variant:`default`,buttons:[{label:`Cancel`},{label:`Delete`,default:!0,onClick:async()=>{try{let t={type:`deleteProgress`,filesDone:0,currentFile:`Preparing...`,onCancel:()=>{i({type:`cancelDeleteConfirm`,onResume:()=>{m.current&&i(m.current)},onCancelDeletion:()=>{p.current!==null&&s.fs.delete.cancel(p.current),p.current=null,m.current=null,a()}})}};m.current=t,i(t);let n=await s.fs.delete.start(e);m.current!==null&&(p.current=n)}catch(e){p.current=null,m.current=null,a(),i({type:`message`,title:`Error`,message:e instanceof Error?e.message:String(e),variant:`error`})}}}]})},[i,a]),v=(0,c.useCallback)((r,c)=>{let d=(e.current===`left`?n.current:t.current).currentPath;!d||r.length===0||i({type:`copyConfig`,itemCount:r.length,destPath:d,onConfirm:async(e,t)=>{try{if(r.some(e=>Mt(e))){if(!r.every(e=>Mt(e)))throw Error(`Cannot copy files from archives and local files in the same operation`);let e={type:`copyProgress`,bytesCopied:0,bytesTotal:0,filesDone:0,filesTotal:0,currentFile:`Collecting files...`,onCancel:a};u.current=e,i(e);let n=[];for(let e of r){let{containerFile:t,innerPath:r}=Nt(e),i=Kt.resolve(G(t));if(!i)throw Error(`No fsProvider registered for "${G(t)}"`);let a=null,o=null;i.contribution.runtime===`backend`&&s.fsProvider?a=W(i.extensionDirPath,i.contribution.entry):o=await Dt(s,i.extensionDirPath,i.contribution.entry),(await ia(async e=>a?s.fsProvider.listEntries(a,t,e):(await o.listEntries(t,e)).map(e=>({name:e.name,kind:e.type})),r,G(r))).forEach(e=>n.push({...e,hostFile:t,wasmPath:a,provider:o}))}o({filesTotal:n.length,currentFile:`Extracting...`}),u.current={...e,filesTotal:n.length,currentFile:`Extracting...`};let l=0;for(let{innerPath:e,destRelPath:r,hostFile:i,wasmPath:a,provider:c}of n){let n=W(t,r);o({currentFile:G(r),filesDone:l}),s.fs.createDir&&await s.fs.createDir(U(n)).catch(()=>{});let u;if(a)u=await s.fsProvider.readFileRange(a,i,e,0,64*1024*1024);else{if(!c?.readFileRange)throw Error(`Provider does not support readFileRange`);u=await c.readFileRange(i,e,0,64*1024*1024)}await s.fs.writeBinaryFile(n,new Uint8Array(u)),l++}u.current=null,a(),c();return}let n={type:`copyProgress`,bytesCopied:0,bytesTotal:0,filesDone:0,filesTotal:0,currentFile:`Preparing...`,onCancel:()=>{i({type:`cancelCopyConfirm`,onResume:()=>{u.current&&i(u.current)},onCancelCopy:()=>{l.current!==null&&s.fs.copy.cancel(l.current),l.current=null,u.current=null,a(),c()}})}};u.current=n,i(n);let d=await s.fs.copy.start(r,t,e);u.current!==null&&(l.current=d)}catch(e){l.current=null,u.current=null,a(),i({type:`message`,title:`Copy Error`,message:e instanceof Error?e.message:String(e),variant:`error`})}},onCancel:()=>{}})},[i,a]);(0,c.useEffect)(()=>s.fs.copy.onProgress(e=>{if(l.current===null)if(u.current!==null)l.current=e.copyId;else return;else if(e.copyId!==l.current)return;let t=e.event;switch(t.kind){case`progress`:{let e={bytesCopied:t.bytesCopied,bytesTotal:t.bytesTotal,filesDone:t.filesDone,filesTotal:t.filesTotal,currentFile:t.currentFile};u.current&&={...u.current,...e},o(e);break}case`conflict`:i({type:`copyConflict`,src:t.src,dest:t.dest,srcSize:t.srcSize,srcMtimeMs:t.srcMtimeMs,destSize:t.destSize,destMtimeMs:t.destMtimeMs,onResolve:e=>{s.fs.copy.resolveConflict(l.current,e),u.current&&i(u.current)}});break;case`done`:l.current=null,u.current=null,a(),h();break;case`error`:l.current=null,u.current=null,a(),i({type:`message`,title:`Copy Error`,message:t.message,variant:`error`}),h();break}}),[i,a,o,h]);let y=(0,c.useCallback)((r,o)=>{let c=(e.current===`left`?n.current:t.current).currentPath;!c||r.length===0||i({type:`moveConfig`,itemCount:r.length,destPath:c,onConfirm:async(e,t)=>{try{let n={type:`moveProgress`,bytesCopied:0,bytesTotal:0,filesDone:0,filesTotal:0,currentFile:`Preparing...`,onCancel:()=>{i({type:`cancelMoveConfirm`,onResume:()=>{f.current&&i(f.current)},onCancelMove:()=>{d.current!==null&&s.fs.move.cancel(d.current),d.current=null,f.current=null,a(),o()}})}};f.current=n,i(n);let c=await s.fs.move.start(r,t,e);f.current!==null&&(d.current=c)}catch(e){d.current=null,f.current=null,a(),i({type:`message`,title:`Move Error`,message:e instanceof Error?e.message:String(e),variant:`error`})}},onCancel:()=>{}})},[i,a]);return(0,c.useEffect)(()=>s.fs.move.onProgress(e=>{if(d.current===null)if(f.current!==null)d.current=e.moveId;else return;else if(e.moveId!==d.current)return;let t=e.event;switch(t.kind){case`progress`:{let e={bytesCopied:t.bytesCopied,bytesTotal:t.bytesTotal,filesDone:t.filesDone,filesTotal:t.filesTotal,currentFile:t.currentFile};f.current&&={...f.current,...e},o(e);break}case`conflict`:i({type:`moveConflict`,src:t.src,dest:t.dest,srcSize:t.srcSize,srcMtimeMs:t.srcMtimeMs,destSize:t.destSize,destMtimeMs:t.destMtimeMs,onResolve:e=>{s.fs.move.resolveConflict(d.current,e),f.current&&i(f.current)}});break;case`done`:d.current=null,f.current=null,a(),h();break;case`error`:d.current=null,f.current=null,a(),i({type:`message`,title:`Move Error`,message:t.message,variant:`error`}),h();break}}),[i,a,o,h]),(0,c.useEffect)(()=>s.fs.delete.onProgress(e=>{if(p.current===null)if(m.current!==null)p.current=e.deleteId;else return;else if(e.deleteId!==p.current)return;let t=e.event;switch(t.kind){case`progress`:{let e={filesDone:t.filesDone,currentFile:t.currentFile};m.current&&={...m.current,...e},o(e);break}case`done`:p.current=null,m.current=null,a(),h();break;case`error`:p.current=null,m.current=null,a(),i({type:`message`,title:`Delete Error`,message:t.message,variant:`error`}),h();break}}),[i,a,o,h]),{handleCopy:v,handleMove:y,handleMoveToTrash:g,handlePermanentDelete:_,handleRename:(0,c.useCallback)((e,t,n)=>{i({type:`rename`,currentName:t,onConfirm:async t=>{try{await s.fs.rename.rename(e,t),n()}catch(e){i({type:`message`,title:`Rename Error`,message:e instanceof Error?e.message:String(e),variant:`error`})}},onCancel:()=>{}})},[i])}}function oa(e){let t=e.trim();if(!t)return null;if(/^cd::/i.test(t)){let e=t.match(/^cd::\s*(\S+)\s*$/i);return e?{kind:`setAlias`,alias:e[1]}:{kind:`error`,message:`Usage: cd::alias — save current folder as alias`}}if(/^cd:/i.test(t)){let e=t.match(/^cd:\s*(\S+)\s*$/i);return e?{kind:`goAlias`,alias:e[1]}:{kind:`error`,message:`Usage: cd:alias — go to folder saved under alias`}}if(/^cd(?:\s|$)/i.test(t)||/^cd$/i.test(t)){let e=t.match(/^cd(?:\s+(.*))?$/i);if(!e)return null;let n=(e[1]??``).trim();return(n.startsWith(`"`)&&n.endsWith(`"`)||n.startsWith(`'`)&&n.endsWith(`'`))&&(n=n.slice(1,-1)),{kind:`chdir`,pathArg:n}}return null}async function sa(e,t,n){let r=t.trim();if(!r)return Q(await e.utils.getHomePath());let i=r;if(i.startsWith(`~`)){let t=await e.utils.getHomePath(),n=Q(t);if(i===`~`||i===`~/`)return n;let r=i.slice(1).replace(/^\//,``);i=r?W(t,r):t}return Q(ht(H(i.startsWith(`/`)||i.startsWith(`//`)||/^[A-Za-z]:\//.test(i)||/^[A-Za-z]:$/i.test(i)?i:W(n,i))))}async function ca(e,t){if(!await e.fs.exists(t))return!1;try{return await e.fs.entries(t),!0}catch{return!1}}function la(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function ua(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}var da,fa=`__TAURI_TO_IPC_KEY__`;function pa(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function $(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}var ma=class{get rid(){return la(this,da,`f`)}constructor(e){da.set(this,void 0),ua(this,da,e,`f`)}async close(){return $(`plugin:resources|close`,{rid:this.rid})}};da=new WeakMap;function ha(){return!!(globalThis||window).isTauri}var ga=class{constructor(...e){this.type=`Logical`,e.length===1?`Logical`in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new _a(this.width*e,this.height*e)}[fa](){return{width:this.width,height:this.height}}toJSON(){return this[fa]()}},_a=class{constructor(...e){this.type=`Physical`,e.length===1?`Physical`in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new ga(this.width/e,this.height/e)}[fa](){return{width:this.width,height:this.height}}toJSON(){return this[fa]()}},va=class{constructor(e){this.size=e}toLogical(e){return this.size instanceof ga?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof _a?this.size:this.size.toPhysical(e)}[fa](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[fa]()}},ya=class{constructor(...e){this.type=`Logical`,e.length===1?`Logical`in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new ba(this.x*e,this.y*e)}[fa](){return{x:this.x,y:this.y}}toJSON(){return this[fa]()}},ba=class{constructor(...e){this.type=`Physical`,e.length===1?`Physical`in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new ya(this.x/e,this.y/e)}[fa](){return{x:this.x,y:this.y}}toJSON(){return this[fa]()}},xa=class{constructor(e){this.position=e}toLogical(e){return this.position instanceof ya?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof ba?this.position:this.position.toPhysical(e)}[fa](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[fa]()}},Sa;(function(e){e.WINDOW_RESIZED=`tauri://resize`,e.WINDOW_MOVED=`tauri://move`,e.WINDOW_CLOSE_REQUESTED=`tauri://close-requested`,e.WINDOW_DESTROYED=`tauri://destroyed`,e.WINDOW_FOCUS=`tauri://focus`,e.WINDOW_BLUR=`tauri://blur`,e.WINDOW_SCALE_FACTOR_CHANGED=`tauri://scale-change`,e.WINDOW_THEME_CHANGED=`tauri://theme-changed`,e.WINDOW_CREATED=`tauri://window-created`,e.WEBVIEW_CREATED=`tauri://webview-created`,e.DRAG_ENTER=`tauri://drag-enter`,e.DRAG_OVER=`tauri://drag-over`,e.DRAG_DROP=`tauri://drag-drop`,e.DRAG_LEAVE=`tauri://drag-leave`})(Sa||={});async function Ca(e,t){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,t),await $(`plugin:event|unlisten`,{event:e,eventId:t})}async function wa(e,t,n){return $(`plugin:event|listen`,{event:e,target:typeof n?.target==`string`?{kind:`AnyLabel`,label:n.target}:n?.target??{kind:`Any`},handler:pa(t)}).then(t=>async()=>Ca(e,t))}async function Ta(e,t,n){return wa(e,n=>{Ca(e,n.id),t(n)},n)}async function Ea(e,t){await $(`plugin:event|emit`,{event:e,payload:t})}async function Da(e,t,n){await $(`plugin:event|emit_to`,{target:typeof e==`string`?{kind:`AnyLabel`,label:e}:e,event:t,payload:n})}var Oa=class e extends ma{constructor(e){super(e)}static async new(t,n,r){return $(`plugin:image|new`,{rgba:ka(t),width:n,height:r}).then(t=>new e(t))}static async fromBytes(t){return $(`plugin:image|from_bytes`,{bytes:ka(t)}).then(t=>new e(t))}static async fromPath(t){return $(`plugin:image|from_path`,{path:t}).then(t=>new e(t))}async rgba(){return $(`plugin:image|rgba`,{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return $(`plugin:image|size`,{rid:this.rid})}};function ka(e){return e==null?null:typeof e==`string`?e:e instanceof Oa?e.rid:e}var Aa;(function(e){e[e.Critical=1]=`Critical`,e[e.Informational=2]=`Informational`})(Aa||={});var ja=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},Ma;(function(e){e.None=`none`,e.Normal=`normal`,e.Indeterminate=`indeterminate`,e.Paused=`paused`,e.Error=`error`})(Ma||={});function Na(){return new Ia(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function Pa(){return $(`plugin:window|get_all_windows`).then(e=>e.map(e=>new Ia(e,{skip:!0})))}var Fa=[`tauri://created`,`tauri://error`],Ia=class{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||$(`plugin:window|create`,{options:{...t,parent:typeof t.parent==`string`?t.parent:t.parent?.label,label:e}}).then(async()=>this.emit(`tauri://created`)).catch(async e=>this.emit(`tauri://error`,e))}static async getByLabel(e){return(await Pa()).find(t=>t.label===e)??null}static getCurrent(){return Na()}static async getAll(){return Pa()}static async getFocusedWindow(){for(let e of await Pa())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}:wa(e,t,{target:{kind:`Window`,label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}:Ta(e,t,{target:{kind:`Window`,label:this.label}})}async emit(e,t){if(Fa.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,payload:t});return}return Ea(e,t)}async emitTo(e,t,n){if(Fa.includes(t)){for(let e of this.listeners[t]||[])e({event:t,id:-1,payload:n});return}return Da(e,t,n)}_handleTauriEvent(e,t){return Fa.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}async scaleFactor(){return $(`plugin:window|scale_factor`,{label:this.label})}async innerPosition(){return $(`plugin:window|inner_position`,{label:this.label}).then(e=>new ba(e))}async outerPosition(){return $(`plugin:window|outer_position`,{label:this.label}).then(e=>new ba(e))}async innerSize(){return $(`plugin:window|inner_size`,{label:this.label}).then(e=>new _a(e))}async outerSize(){return $(`plugin:window|outer_size`,{label:this.label}).then(e=>new _a(e))}async isFullscreen(){return $(`plugin:window|is_fullscreen`,{label:this.label})}async isMinimized(){return $(`plugin:window|is_minimized`,{label:this.label})}async isMaximized(){return $(`plugin:window|is_maximized`,{label:this.label})}async isFocused(){return $(`plugin:window|is_focused`,{label:this.label})}async isDecorated(){return $(`plugin:window|is_decorated`,{label:this.label})}async isResizable(){return $(`plugin:window|is_resizable`,{label:this.label})}async isMaximizable(){return $(`plugin:window|is_maximizable`,{label:this.label})}async isMinimizable(){return $(`plugin:window|is_minimizable`,{label:this.label})}async isClosable(){return $(`plugin:window|is_closable`,{label:this.label})}async isVisible(){return $(`plugin:window|is_visible`,{label:this.label})}async title(){return $(`plugin:window|title`,{label:this.label})}async theme(){return $(`plugin:window|theme`,{label:this.label})}async isAlwaysOnTop(){return $(`plugin:window|is_always_on_top`,{label:this.label})}async center(){return $(`plugin:window|center`,{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===Aa.Critical?{type:`Critical`}:{type:`Informational`}),$(`plugin:window|request_user_attention`,{label:this.label,value:t})}async setResizable(e){return $(`plugin:window|set_resizable`,{label:this.label,value:e})}async setEnabled(e){return $(`plugin:window|set_enabled`,{label:this.label,value:e})}async isEnabled(){return $(`plugin:window|is_enabled`,{label:this.label})}async setMaximizable(e){return $(`plugin:window|set_maximizable`,{label:this.label,value:e})}async setMinimizable(e){return $(`plugin:window|set_minimizable`,{label:this.label,value:e})}async setClosable(e){return $(`plugin:window|set_closable`,{label:this.label,value:e})}async setTitle(e){return $(`plugin:window|set_title`,{label:this.label,value:e})}async maximize(){return $(`plugin:window|maximize`,{label:this.label})}async unmaximize(){return $(`plugin:window|unmaximize`,{label:this.label})}async toggleMaximize(){return $(`plugin:window|toggle_maximize`,{label:this.label})}async minimize(){return $(`plugin:window|minimize`,{label:this.label})}async unminimize(){return $(`plugin:window|unminimize`,{label:this.label})}async show(){return $(`plugin:window|show`,{label:this.label})}async hide(){return $(`plugin:window|hide`,{label:this.label})}async close(){return $(`plugin:window|close`,{label:this.label})}async destroy(){return $(`plugin:window|destroy`,{label:this.label})}async setDecorations(e){return $(`plugin:window|set_decorations`,{label:this.label,value:e})}async setShadow(e){return $(`plugin:window|set_shadow`,{label:this.label,value:e})}async setEffects(e){return $(`plugin:window|set_effects`,{label:this.label,value:e})}async clearEffects(){return $(`plugin:window|set_effects`,{label:this.label,value:null})}async setAlwaysOnTop(e){return $(`plugin:window|set_always_on_top`,{label:this.label,value:e})}async setAlwaysOnBottom(e){return $(`plugin:window|set_always_on_bottom`,{label:this.label,value:e})}async setContentProtected(e){return $(`plugin:window|set_content_protected`,{label:this.label,value:e})}async setSize(e){return $(`plugin:window|set_size`,{label:this.label,value:e instanceof va?e:new va(e)})}async setMinSize(e){return $(`plugin:window|set_min_size`,{label:this.label,value:e instanceof va?e:e?new va(e):null})}async setMaxSize(e){return $(`plugin:window|set_max_size`,{label:this.label,value:e instanceof va?e:e?new va(e):null})}async setSizeConstraints(e){function t(e){return e?{Logical:e}:null}return $(`plugin:window|set_size_constraints`,{label:this.label,value:{minWidth:t(e?.minWidth),minHeight:t(e?.minHeight),maxWidth:t(e?.maxWidth),maxHeight:t(e?.maxHeight)}})}async setPosition(e){return $(`plugin:window|set_position`,{label:this.label,value:e instanceof xa?e:new xa(e)})}async setFullscreen(e){return $(`plugin:window|set_fullscreen`,{label:this.label,value:e})}async setSimpleFullscreen(e){return $(`plugin:window|set_simple_fullscreen`,{label:this.label,value:e})}async setFocus(){return $(`plugin:window|set_focus`,{label:this.label})}async setFocusable(e){return $(`plugin:window|set_focusable`,{label:this.label,value:e})}async setIcon(e){return $(`plugin:window|set_icon`,{label:this.label,value:ka(e)})}async setSkipTaskbar(e){return $(`plugin:window|set_skip_taskbar`,{label:this.label,value:e})}async setCursorGrab(e){return $(`plugin:window|set_cursor_grab`,{label:this.label,value:e})}async setCursorVisible(e){return $(`plugin:window|set_cursor_visible`,{label:this.label,value:e})}async setCursorIcon(e){return $(`plugin:window|set_cursor_icon`,{label:this.label,value:e})}async setBackgroundColor(e){return $(`plugin:window|set_background_color`,{color:e})}async setCursorPosition(e){return $(`plugin:window|set_cursor_position`,{label:this.label,value:e instanceof xa?e:new xa(e)})}async setIgnoreCursorEvents(e){return $(`plugin:window|set_ignore_cursor_events`,{label:this.label,value:e})}async startDragging(){return $(`plugin:window|start_dragging`,{label:this.label})}async startResizeDragging(e){return $(`plugin:window|start_resize_dragging`,{label:this.label,value:e})}async setBadgeCount(e){return $(`plugin:window|set_badge_count`,{label:this.label,value:e})}async setBadgeLabel(e){return $(`plugin:window|set_badge_label`,{label:this.label,value:e})}async setOverlayIcon(e){return $(`plugin:window|set_overlay_icon`,{label:this.label,value:e?ka(e):void 0})}async setProgressBar(e){return $(`plugin:window|set_progress_bar`,{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return $(`plugin:window|set_visible_on_all_workspaces`,{label:this.label,value:e})}async setTitleBarStyle(e){return $(`plugin:window|set_title_bar_style`,{label:this.label,value:e})}async setTheme(e){return $(`plugin:window|set_theme`,{label:this.label,value:e})}async onResized(e){return this.listen(Sa.WINDOW_RESIZED,t=>{t.payload=new _a(t.payload),e(t)})}async onMoved(e){return this.listen(Sa.WINDOW_MOVED,t=>{t.payload=new ba(t.payload),e(t)})}async onCloseRequested(e){return this.listen(Sa.WINDOW_CLOSE_REQUESTED,async t=>{let n=new ja(t);await e(n),n.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){let t=await this.listen(Sa.DRAG_ENTER,t=>{e({...t,payload:{type:`enter`,paths:t.payload.paths,position:new ba(t.payload.position)}})}),n=await this.listen(Sa.DRAG_OVER,t=>{e({...t,payload:{type:`over`,position:new ba(t.payload.position)}})}),r=await this.listen(Sa.DRAG_DROP,t=>{e({...t,payload:{type:`drop`,paths:t.payload.paths,position:new ba(t.payload.position)}})}),i=await this.listen(Sa.DRAG_LEAVE,t=>{e({...t,payload:{type:`leave`}})});return()=>{t(),r(),n(),i()}}async onFocusChanged(e){let t=await this.listen(Sa.WINDOW_FOCUS,t=>{e({...t,payload:!0})}),n=await this.listen(Sa.WINDOW_BLUR,t=>{e({...t,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen(Sa.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(Sa.WINDOW_THEME_CHANGED,e)}},La;(function(e){e.Disabled=`disabled`,e.Throttle=`throttle`,e.Suspend=`suspend`})(La||={});var Ra;(function(e){e.Default=`default`,e.FluentOverlay=`fluentOverlay`})(Ra||={});var za;(function(e){e.AppearanceBased=`appearanceBased`,e.Light=`light`,e.Dark=`dark`,e.MediumLight=`mediumLight`,e.UltraDark=`ultraDark`,e.Titlebar=`titlebar`,e.Selection=`selection`,e.Menu=`menu`,e.Popover=`popover`,e.Sidebar=`sidebar`,e.HeaderView=`headerView`,e.Sheet=`sheet`,e.WindowBackground=`windowBackground`,e.HudWindow=`hudWindow`,e.FullScreenUI=`fullScreenUI`,e.Tooltip=`tooltip`,e.ContentBackground=`contentBackground`,e.UnderWindowBackground=`underWindowBackground`,e.UnderPageBackground=`underPageBackground`,e.Mica=`mica`,e.Blur=`blur`,e.Acrylic=`acrylic`,e.Tabbed=`tabbed`,e.TabbedDark=`tabbedDark`,e.TabbedLight=`tabbedLight`})(za||={});var Ba;(function(e){e.FollowsWindowActiveState=`followsWindowActiveState`,e.Active=`active`,e.Inactive=`inactive`})(Ba||={});function Va(e){let t=z(),n=(0,c.useRef)(e);n.current=e;let r=(0,d.useAtomValue)(Ee),i=(0,c.useRef)(r);i.current=r;let{updateSettings:a}=er(),[o,s]=(0,d.useAtom)(Pe),l=(0,d.useSetAtom)(Fe),u=(0,d.useSetAtom)(je),f=(0,d.useSetAtom)(Ce),p=(0,d.useSetAtom)(Le),m=(0,d.useSetAtom)(Re),h=(0,d.useSetAtom)(Ie),g=(0,c.useRef)(o);g.current=o,(0,c.useEffect)(()=>{let e=[];return e.push(B.registerCommand(`dotdir.toggleHiddenFiles`,()=>l(e=>{let t=!e;return a({showHidden:t}),t}))),e.push(B.registerCommand(`dotdir.togglePanels`,()=>u(e=>{let t=!e;return t&&v.set(`panel`),t}))),e.push(B.registerCommand(`dotdir.showExtensions`,()=>f(!0))),e.push(B.registerCommand(`dotdir.showCommandPalette`,()=>h(e=>!e))),e.push(B.registerCommand(`dotdir.closeViewer`,()=>p(null))),e.push(B.registerCommand(`dotdir.closeEditor`,()=>m(null))),e.push(B.registerCommand(`dotdir.switchPanel`,()=>s(e=>e===`left`?`right`:`left`))),e.push(B.registerCommand(`dotdir.focusLeftPanel`,()=>s(`left`))),e.push(B.registerCommand(`dotdir.focusRightPanel`,()=>s(`right`))),e.push(B.registerCommand(`dotdir.cancelNavigation`,()=>{n.current.leftRef.current.cancelNavigation(),n.current.rightRef.current.cancelNavigation()})),e.push(B.registerCommand(`dotdir.goToParent`,()=>{let{leftRef:e,rightRef:t}=n.current,r=g.current===`left`?e.current:t.current,i=r.currentPath;if(Mt(i)){let{containerFile:e,innerPath:t}=Nt(i);if(t===`/`||t===``){r.navigateTo(U(e),!1,G(e));return}}let a=U(i);a!==i&&r.navigateTo(a)})),e.push(B.registerCommand(`dotdir.goHome`,async()=>{let{leftRef:e,rightRef:r}=n.current,i=await t.utils.getHomePath();(g.current===`left`?e.current:r.current).navigateTo(i)})),e.push(B.registerCommand(`dotdir.refresh`,()=>{let{leftRef:e,rightRef:t}=n.current,r=g.current===`left`?e.current:t.current;r.navigateTo(r.currentPath)})),e.push(B.registerCommand(`dotdir.newTab`,()=>void ji()?.newTab())),e.push(B.registerCommand(`dotdir.closeTab`,()=>void ji()?.closeActiveTab())),e.push(B.registerCommand(`dotdir.previewInOppositePanel`,()=>n.current.onPreviewInOppositePanel())),e.push(B.registerCommand(`dotdir.openCurrentFolderInOppositePanelCurrentTab`,()=>n.current.onOpenCurrentFolderInOppositeCurrentTab())),e.push(B.registerCommand(`dotdir.openCurrentFolderInOppositePanelNewTab`,()=>n.current.onOpenCurrentFolderInOppositeNewTab())),e.push(B.registerCommand(`dotdir.openSelectedFolderInOppositePanelCurrentTab`,()=>n.current.onOpenSelectedFolderInOppositeCurrentTab())),e.push(B.registerCommand(`dotdir.openSelectedFolderInOppositePanelNewTab`,()=>n.current.onOpenSelectedFolderInOppositeNewTab())),e.push(B.registerCommand(`dotdir.openCreateFile`,()=>{let{leftRef:e,rightRef:t,showDialog:r,onOpenCreateFileConfirm:a}=n.current,o=(g.current===`left`?e.current:t.current).currentPath,s=i.current.flatMap(e=>e.languages??[]),c=new Set;r({type:`openCreateFile`,currentPath:o,languages:s.filter(e=>c.has(e.id)?!1:(c.add(e.id),!0)).map(e=>({id:e.id,label:e.aliases?.[0]??e.id})),onConfirm:a,onCancel:()=>{}})})),e.push(B.registerCommand(`dotdir.makeFolder`,()=>{let{leftRef:e,rightRef:r,showDialog:i}=n.current,a=g.current===`left`?e.current:r.current,o=a.currentPath;i({type:`makeFolder`,currentPath:o,onConfirm:async e=>{let n=e=>o?`${o.replace(/\/?$/,``)}/${e}`:e;if(e.mode===`single`){let r=n(e.name);t.fs.createDir&&await t.fs.createDir(r),a.navigateTo(r);return}for(let r of e.names){let e=n(r);t.fs.createDir&&await t.fs.createDir(e)}a.navigateTo(o)},onCancel:()=>{}})})),e.push(B.registerCommand(`dotdir.exit`,async()=>{ha()?await Na().close():window.close()})),e.push(B.registerCommand(`terminal.execute`,async e=>{let t=G(e),r=/^[a-zA-Z0-9._+-]+$/.test(t)?`./${t}`:`./${JSON.stringify(t)}`;await n.current.onExecuteInTerminal(`${r}\r`)})),e.push(B.registerCommand(`dotdir.viewFile`,(e,t,r)=>{n.current.onViewFile(e,t,r)})),e.push(B.registerCommand(`dotdir.editFile`,(e,t,r,i)=>{let a=n.current.editorFileSizeLimit;a>0&&r>a||n.current.onEditFile(e,t,r,i)})),e.push(B.registerCommand(`list.cursorUp`,()=>Y()?.cursorUp())),e.push(B.registerCommand(`list.cursorDown`,()=>Y()?.cursorDown())),e.push(B.registerCommand(`list.cursorLeft`,()=>Y()?.cursorLeft())),e.push(B.registerCommand(`list.cursorRight`,()=>Y()?.cursorRight())),e.push(B.registerCommand(`list.cursorHome`,()=>Y()?.cursorHome())),e.push(B.registerCommand(`list.cursorEnd`,()=>Y()?.cursorEnd())),e.push(B.registerCommand(`list.cursorPageUp`,()=>Y()?.cursorPageUp())),e.push(B.registerCommand(`list.cursorPageDown`,()=>Y()?.cursorPageDown())),e.push(B.registerCommand(`list.selectUp`,()=>Y()?.selectUp())),e.push(B.registerCommand(`list.selectDown`,()=>Y()?.selectDown())),e.push(B.registerCommand(`list.selectLeft`,()=>Y()?.selectLeft())),e.push(B.registerCommand(`list.selectRight`,()=>Y()?.selectRight())),e.push(B.registerCommand(`list.selectHome`,()=>Y()?.selectHome())),e.push(B.registerCommand(`list.selectEnd`,()=>Y()?.selectEnd())),e.push(B.registerCommand(`list.selectPageUp`,()=>Y()?.selectPageUp())),e.push(B.registerCommand(`list.selectPageDown`,()=>Y()?.selectPageDown())),e.push(B.registerCommand(`list.execute`,()=>Y()?.execute())),e.push(B.registerCommand(`list.open`,()=>Y()?.open())),e.push(B.registerCommand(`list.viewFile`,()=>Y()?.viewFile())),e.push(B.registerCommand(`list.editFile`,()=>Y()?.editFile())),e.push(B.registerCommand(`list.moveToTrash`,()=>Y()?.moveToTrash())),e.push(B.registerCommand(`list.permanentDelete`,()=>Y()?.permanentDelete())),e.push(B.registerCommand(`list.copy`,()=>Y()?.copy())),e.push(B.registerCommand(`list.move`,()=>Y()?.move())),e.push(B.registerCommand(`list.rename`,()=>Y()?.rename())),e.push(B.registerCommand(`list.pasteFilename`,()=>Y()?.pasteFilename())),e.push(B.registerCommand(`list.pastePath`,()=>Y()?.pastePath())),e.push(...Xe(B)),e.push(...Qe(B)),()=>{for(let t of e)t()}},[s,l,u,f,p,m,h,a])}var Ha=function(e){return e[e.None=0]=`None`,e[e.Expanded=1]=`Expanded`,e[e.Selected=2]=`Selected`,e[e.Hovered=4]=`Hovered`,e[e.Active=8]=`Active`,e[e.DragOver=16]=`DragOver`,e[e.Focused=32]=`Focused`,e}({});Ha.Expanded,Ha.Selected,Ha.Hovered,Ha.Active,Ha.DragOver,Ha.Focused;function Ua(e){let t=e.name.indexOf(`.`),n=e.name.lastIndexOf(`.`),r=``,i=``;return e.type===`file`&&t>0&&(i=e.name.substring(t+1),r=n>0?e.name.substring(n+1):i),{type:e.type,name:e.name,baseExt:r,fullExt:i,lang:e.lang??``,path:e.path,parent:e.parent,stateFlags:e.stateFlags??Ha.None,meta:e.meta??{}}}function Wa(e){if(U(e)===e)return;let t=[],n=e;for(;;){t.push(n);let e=U(n);if(e===n)break;n=e}t.reverse();let r;for(let e of t)r=Ua({name:G(e)||e,type:`folder`,path:e,parent:r});return r}function Ga(e){return e.kind===`directory`||e.kind===`symlink`&&(e.mode&61440)==16384}function Ka(e,t,n){let r=Ga(e),i={size:e.size,mtimeMs:e.mtimeMs,mode:e.mode,nlink:e.nlink,kind:e.kind,hidden:e.hidden,linkTarget:e.linkTarget};return Ua({name:e.name,type:r?`folder`:`file`,lang:r?``:ue.detectLanguage(e.name),meta:{size:i.size,mtimeMs:i.mtimeMs,executable:!r&&vt(i.mode??0,e.name),hidden:i.hidden??e.name.startsWith(`.`),nlink:i.nlink??1,entryKind:i.kind??(r?`directory`:`file`),linkTarget:i.linkTarget},path:W(t,e.name),parent:n})}async function qa(e,t){let n=t;for(;;){if(await e.fs.exists(n))return n;let t=U(n);if(t===n||mt(n))return n;n=t}}function Ja(e){let t=[],n=e;for(;;){t.push(n);let e=U(n);if(e===n)break;n=e}return t}var Ya={currentPath:``,parentNode:void 0,entries:[],requestedCursor:void 0};function Xa(e){let t=z(),n=(0,d.useAtomValue)(Ae),[r,i]=(0,c.useState)(Ya),[a,o]=(0,c.useState)(!1),s=(0,c.useRef)(null),l=(0,c.useRef)(null),u=(0,c.useMemo)(()=>Wr(n),[n]),f=(0,c.useRef)(u);f.current=u;let p=(0,c.useRef)(null),m=(0,c.useRef)(null),h=(0,c.useRef)(``),g=(0,c.useRef)(e);g.current=e,(0,c.useEffect)(()=>{h.current&&v(h.current,!0)},[u]);let _=(0,c.useCallback)(e=>{let t=p.current,n=Ja(e),r=[];for(let e of n)r.push(e),r.push(W(e,`.dotdir`));t.sync(r)},[]),v=(0,c.useCallback)(async(e,n=!1,r)=>{if(!n&&h.current===e&&l.current)return;l.current?.abort();let a=new AbortController;l.current=a,s.current=setTimeout(()=>o(!0),300);try{let n=(async()=>{if(h.current=e,Mt(e)){let{containerFile:n,innerPath:o}=Nt(e),s=Kt.resolve(G(n));if(!s)throw Error(`No fsProvider registered for "${G(n)}"`);let c;if(s.contribution.runtime===`backend`&&t.fsProvider){let e=W(s.extensionDirPath,s.contribution.entry),r=await t.fsProvider.listEntries(e,n,o);if(a.signal.aborted)return;c=r.map(e=>({name:e.name,type:e.kind,size:e.size,mtimeMs:e.mtimeMs}))}else{let e=await Dt(t,s.extensionDirPath,s.contribution.entry);if(a.signal.aborted||(c=await e.listEntries(n,o),a.signal.aborted))return}let l=Wa(e);i({currentPath:e,parentNode:l,entries:c.map(e=>{let t=(o===`/`?``:o)+`/`+e.name;return Ua({name:e.name,type:e.type===`directory`?`folder`:`file`,lang:e.type===`file`?ue.detectLanguage(e.name):``,meta:{size:e.size??0,mtimeMs:e.mtimeMs??0,executable:!1,hidden:e.name.startsWith(`.`),nlink:1,entryKind:e.type===`directory`?`directory`:`file`},path:Pt(n,t),parent:l})}),requestedCursor:r})}else{if(await Gr(t,f.current,e),a.signal.aborted)return;let n=Wa(e),o=await t.fs.entries(e);if(a.signal.aborted)return;let s=o.map(t=>Ka(t,e,n));if(a.signal.aborted)return;i({currentPath:e,parentNode:n,entries:s,requestedCursor:r}),_(e)}})();n.catch(()=>{}),await Promise.race([n,new Promise(e=>{a.signal.addEventListener(`abort`,()=>e(),{once:!0})})])}catch(e){if(!a.signal.aborted){let t=e&&typeof e==`object`&&`message`in e?e.message:String(e);g.current(`Failed to read directory: ${t}`)}}finally{l.current===a&&(l.current=null),clearTimeout(s.current),s.current=null,o(!1)}},[_]),y=(0,c.useCallback)(()=>{l.current?.abort(),l.current=null,s.current&&=(clearTimeout(s.current),null),o(!1)},[]);(0,c.useEffect)(()=>(p.current=new wt(t,e=>{let n=h.current;if(!n)return;let r=!1,i=!1,a=!1;for(let t of e){let e=t.root.path,o=t.relativePathComponents[0]??null,s=t.type;e===n?s===`errored`?a=!0:r=!0:e.endsWith(`/.dotdir`)?o===`fs.css`&&(Ur(U(e)),i=!0):(n.startsWith(e+`/`)||n===e)&&(o===`.dotdir`?(Ur(e),i=!0):o&&o===n.slice(e.length+1).split(`/`)[0]&&s===`disappeared`&&(a=!0))}if(a){m.current&&=(clearTimeout(m.current),null),qa(t,n).then(e=>{b.current(e)});return}(r||i)&&(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{m.current=null,b.current(h.current)},100))}),()=>{p.current?.disconnect(),p.current=null,m.current&&=(clearTimeout(m.current),null)}),[]);let b=(0,c.useRef)(v);b.current=v;let x=(0,c.useCallback)(()=>{b.current(h.current,!0)},[]);return{...r,navigateTo:v,navigating:a,cancelNavigation:y,refresh:x,resolver:f.current}}function Za({activePanelCwd:e,onNavigatePanel:t}){let n=z(),r=(0,d.useAtomValue)(Oe),i=(0,d.useAtomValue)(ke),a=(0,d.useAtomValue)(je),o=(0,d.useSetAtom)(je),s=(0,d.useSetAtom)(Me),l=(0,d.useAtomValue)(Ne),u=(0,d.useSetAtom)(Ne),f=(0,d.useSetAtom)(ze),{activeSession:p,activeSessionId:m,setProfiles:h,setCurrentCwd:g,restartAll:_,dispose:y,writeToActiveSession:b,executeCommandInCwd:x}=Ki(),S=(0,c.useRef)(e);S.current=e;let C=(0,c.useRef)(t);C.current=t;let w=(0,c.useRef)(!1),T=(0,c.useRef)(null),E=(0,c.useCallback)(e=>{T.current&&=(clearTimeout(T.current),null),o(e)},[o]);(0,c.useEffect)(()=>{if(!p){E(!0),B.setContext(`terminalCommandRunning`,!1);return}let e=p.session.getCapabilities().commandRunning;return E(!e),B.setContext(`terminalCommandRunning`,e),p.session.subscribe(e=>{if(e.type===`command-start`)E(!1),B.setContext(`terminalCommandRunning`,!0);else if(e.type===`command-finish`)E(!0),B.setContext(`terminalCommandRunning`,!1);else if(e.type===`capabilities`){let t=e.capabilities.commandRunning;E(!t),B.setContext(`terminalCommandRunning`,t)}})},[m,E]),(0,c.useEffect)(()=>{i&&r.length>0&&h(r,e)},[i,r]),(0,c.useEffect)(()=>()=>{y()},[y]),(0,c.useEffect)(()=>{g(e)},[e,g]),(0,c.useEffect)(()=>{if(n.onReconnect)return n.onReconnect(()=>_())},[_]),(0,c.useEffect)(()=>{if(p?.cwd&&p.cwdUserInitiated){let e=Q(H(p.cwd));if(e===Q(S.current))return;C.current(e),u(null)}},[p,u]);let D=l??e;(0,c.useEffect)(()=>{f(D)},[D,f]),(0,c.useEffect)(()=>{l&&Q(e)===l&&u(null)},[e,l,u]),(0,c.useEffect)(()=>{if(!a)return;let e=requestAnimationFrame(()=>{v.set(`panel`)});return()=>cancelAnimationFrame(e)},[a]);let O=(0,c.useCallback)(e=>{u(Q(e))},[u]);return{activeCwd:D,writeToTerminal:(0,c.useCallback)(e=>b(e),[b]),runCommand:(0,c.useCallback)(async(e,t)=>{w.current=!0,o(!1),v.set(`terminal`),s(e=>e+1),await x(e,t)},[o,s,x]),rememberExpectedTerminalCwd:O}}var Qa={},$a=null,eo=null;async function to(e){return $a||=W(await e.utils.getHomePath(),`.dotdir`,`ui-state.json`),$a}async function no(e){try{let t=await K(e,await to(e)),n=JSON.parse(t);typeof n==`object`&&n&&!Array.isArray(n)&&(Qa=n)}catch{}return Qa}function ro(e,t){Qa={...Qa,...t},eo&&clearTimeout(eo),eo=setTimeout(()=>{eo=null,ao(e,Qa)},500)}function io(e){eo&&=(clearTimeout(eo),null),ao(e,Qa)}async function ao(e,t){try{let n=await to(e);await e.fs.writeFile(n,JSON.stringify(t,null,2))}catch(e){console.error(`[uiState] Failed to save:`,e)}}function oo({ready:e,setLeftTabs:t,setRightTabs:n,setLeftActiveTabId:r,setRightActiveTabId:i,leftTabSelectionRef:a,rightTabSelectionRef:o,prevLeftActiveTabIdRef:s,prevRightActiveTabIdRef:l,onAfterRestore:u}){let d=z(),[f,p]=(0,c.useState)(!1),m=(0,c.useRef)({}),[h,g]=(0,c.useState)(!1),[_,v]=(0,c.useState)(void 0),[y,b]=(0,c.useState)(void 0),[x,S]=(0,c.useState)(void 0);return(0,c.useEffect)(()=>{no(d).then(e=>{m.current=e,g(!0)})},[]),(0,c.useEffect)(()=>{if(!e||!h)return;let c=m.current,d=e=>e?.tabs?.length?e.tabs.map(e=>e.type===`filelist`?_i(e.path):{id:gi(),type:`preview`,path:e.path,name:e.name,size:e.size,isTemp:!1}):e?.currentPath?[_i(e.currentPath)]:null,f=(e,t,n)=>{if(!(!t?.length||!n?.tabs?.length))for(let r=0;r<t.length&&r<n.tabs.length;r++){let i=t[r],a=n.tabs[r];i.type===`filelist`&&a.type===`filelist`&&(a.selectedName!=null||a.topmostName!=null)&&(e.current[i.id]={selectedName:a.selectedName,topmostName:a.topmostName})}},g=d(c.leftPanel),_=d(c.rightPanel);g&&f(a,g,c.leftPanel),_&&f(o,_,c.rightPanel);let y=g?Math.min(c.leftPanel?.activeTabIndex??0,g.length-1):0,x=_?Math.min(c.rightPanel?.activeTabIndex??0,_.length-1):0,C=g?.[y]?.id,w=_?.[x]?.id;C&&(s.current=C),w&&(l.current=w),g&&t(g),_&&n(_),C&&r(C),w&&i(w),c.leftPanel&&v(c.leftPanel),c.rightPanel&&b(c.rightPanel),c.activePanel&&S(c.activePanel),p(!0),u()},[e,h]),{settingsLoaded:f,initialLeftPanel:_,initialRightPanel:y,initialActivePanel:x,setInitialLeftPanel:v,setInitialRightPanel:b,setInitialActivePanel:S}}function so({activePanel:e,settingsLoaded:t,left:n,right:r,leftTabsRef:i,rightTabsRef:a,leftActiveTabIdRef:o,rightActiveTabIdRef:s,leftTabSelectionRef:l,rightTabSelectionRef:u,leftSelectedNameRef:d,rightSelectedNameRef:f,setLeftTabs:p,setRightTabs:m,setLeftActiveTabId:h,setRightActiveTabId:g}){let _=z(),v=(0,c.useRef)(null),y=(0,c.useRef)({}),b=(0,c.useCallback)((e,t,n)=>{let r=e===`left`?l:u;return{tabs:t.map(e=>{if(e.type===`filelist`){let t=r.current[e.id],n={type:`filelist`,path:e.path};return t?.selectedName!=null&&(n.selectedName=t.selectedName),t?.topmostName!=null&&(n.topmostName=t.topmostName),n}return{type:`preview`,path:e.path,name:e.name,size:e.size}}),activeTabIndex:Math.max(0,t.findIndex(e=>e.id===n))}},[l,u]),x=(0,c.useCallback)(()=>{v.current&&=(clearTimeout(v.current),null);let e=y.current;for(let t of Zi){let c=Xi[t];e[c]||(e[c]={currentPath:t===`left`?n.currentPath:r.currentPath});let l=t===`left`?i:a,u=t===`left`?o:s;Object.assign(e[c],b(t,l.current,u.current))}ro(_,e),io(_),y.current={}},[b,n.currentPath,r.currentPath,i,a,o,s]),S=(0,c.useCallback)(()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{v.current=null,ro(_,y.current),y.current={}},1e4)},[_]);(0,c.useEffect)(()=>{let e=()=>{x()};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[x]);let C=(0,c.useCallback)((e,t,c)=>{let _=e===`left`?i:a,v=e===`left`?o:s,x=e===`left`?l:u,C=e===`left`?d:f,w=e===`left`?n:r,T=_.current.find(e=>e.id===v.current);T?.type===`filelist`&&(x.current[T.id]={selectedName:t,topmostName:c}),C.current=t,y.current[Xi[e]]={currentPath:w.currentPath,...b(e,_.current,v.current)},S();let E=Yi[e],D=E===`left`?i:a,O=E===`right`?m:p,k=E===`right`?g:h,A=D.current.find(t=>t.type===`preview`&&t.isTemp&&t.sourcePanel===e);if(!A||!t)return;let j=w.entries.find(e=>e.name===t);if(!j||j.type!==`file`)return;let ee=j.path,M=j.name,N=Number(j.meta.size);A.type===`preview`&&A.path===ee&&A.name===M||(O(t=>t.map(t=>t.id===A.id?{id:t.id,type:`preview`,path:ee,name:M,size:N,isTemp:!0,sourcePanel:e}:t)),k(A.id))},[n,r,b,S,i,a,o,s,l,u,d,f,m,p,g,h]);return(0,c.useEffect)(()=>{t&&ro(_,{activePanel:e})},[e,t]),{handlePanelStateChange:C}}function co(e){return Array.isArray(e)?e.filter(e=>{if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.command==`string`&&typeof t.key==`string`}).map(e=>({command:e.command,key:e.key,mac:typeof e.mac==`string`?e.mac:void 0,when:typeof e.when==`string`?e.when:void 0})):(console.error(`[userKeybindings] keybindings.json must be an array`),null)}async function lo(e){await Hn(e,{name:`userKeybindings`,getPath:async()=>W(await e.utils.getHomePath(),`.dotdir`,`keybindings.json`),validate:co,defaultValue:[],onLoad:e=>{B.setLayerKeybindings(`user`,e),console.log(`[userKeybindings] Applied ${e.length} keybindings`)}})}var uo=new Set([`png`,`jpg`,`jpeg`,`gif`,`bmp`,`webp`,`ico`,`svg`,`avif`,`tiff`,`tif`]),fo=new Set([`mp4`,`webm`,`ogv`,`ogg`,`mov`,`m4v`]);function po(e){let t=e.lastIndexOf(`.`);return t<0?``:e.slice(t+1).toLowerCase()}function mo(e){return uo.has(po(e))}function ho(e){return fo.has(po(e))}function go(e){return mo(e)||ho(e)}var _o=`_app_19j9p_57`,vo=`_loading_19j9p_70`,yo={"dotdir-root":`_dotdir-root_19j9p_1`,app:_o,"status-bar":`_status-bar_19j9p_65`,loading:vo};function bo({widget:e}){let t=z(),{settings:n,ready:r,updateSettings:i}=er(),a=(0,c.useRef)(n);a.current=n;let o=(0,d.useSetAtom)(Ae),{dialog:s,showDialog:u}=ve(),[f,p]=(0,d.useAtom)(Fe),m=(0,c.useCallback)(e=>{u({type:`message`,title:`Error`,message:e,variant:`error`})},[u]),h=Xa(m),g=Xa(m),[_,v]=(0,d.useAtom)(Pe),y=(0,d.useAtomValue)(je),[b,x]=(0,d.useAtom)(Le),[S,w]=(0,d.useAtom)(Re),[T,E]=(0,c.useState)(null),[D,O]=(0,c.useState)(null),k=(0,d.useAtomValue)(Ce),A=(0,d.useSetAtom)(we),j=(0,d.useSetAtom)(Te),[ee,M]=(0,c.useState)(0),[N,P]=(0,d.useAtom)(xi),[te,F]=(0,d.useAtom)(Si),[I,ne]=(0,d.useAtom)(Ci),[re,ie]=(0,d.useAtom)(wi),ae=(0,c.useRef)(void 0),R=(0,c.useRef)(void 0),oe=(0,c.useRef)({}),se=(0,c.useRef)({}),ce=(0,c.useRef)(I),le=(0,c.useRef)(re),ue=(0,d.useAtomValue)(Ee),de=(0,d.useAtomValue)(De),fe=(0,c.useRef)(N);fe.current=N;let pe=(0,c.useRef)(te);pe.current=te;let me=(0,c.useRef)(I);me.current=I;let he=(0,c.useRef)(re);he.current=re;let[ge,ye]=(0,c.useState)(0),be=st(),xe=(0,d.useSetAtom)(Be),Se=(0,d.useAtomValue)(Ve),Oe=(0,c.useRef)(()=>{});Se&&(Oe.current=Se),(0,c.useEffect)(()=>{r&&(n.iconTheme&&A(n.iconTheme),n.colorTheme!==void 0&&j(n.colorTheme||void 0),n.editorFileSizeLimit!==void 0&&M(n.editorFileSizeLimit),n.showHidden!==void 0&&p(n.showHidden))},[n,r]);let{settingsLoaded:ke,initialLeftPanel:Me,initialRightPanel:Ne,initialActivePanel:Ie,setInitialLeftPanel:ze,setInitialRightPanel:He,setInitialActivePanel:Ue}=oo({ready:r,setLeftTabs:P,setRightTabs:F,setLeftActiveTabId:ne,setRightActiveTabId:ie,leftTabSelectionRef:oe,rightTabSelectionRef:se,prevLeftActiveTabIdRef:ce,prevRightActiveTabIdRef:le,onAfterRestore:(0,c.useCallback)(()=>{lo(t)},[t])}),We=(0,c.useRef)(_);We.current=_;let Ke=(0,c.useRef)(h.navigateTo);Ke.current=_===`left`?h.navigateTo:g.navigateTo;let qe=(0,c.useRef)(h);qe.current=h;let Je=(0,c.useRef)(g);Je.current=g;let Ye=(0,c.useRef)(``),Xe=(0,c.useCallback)(async e=>{let n=oa(e);if(!n){Et.runCommand(e,Ye.current);return}if(n.kind===`error`){u({type:`message`,title:`cd`,message:n.message,variant:`error`});return}let r=We.current===`left`?qe.current:Je.current,o=r.currentPath;if(n.kind===`setAlias`){i({pathAliases:{...a.current.pathAliases,[n.alias]:Q(o)}});return}if(n.kind===`goAlias`){let e=a.current.pathAliases?.[n.alias];if(!e){u({type:`message`,title:`cd`,message:`Unknown alias: ${n.alias}`,variant:`error`});return}let i=Q(ht(H(e)));if(!await ca(t,i)){u({type:`message`,title:`cd`,message:`Folder not found: ${i}`,variant:`error`});return}await r.navigateTo(i);return}if(n.kind===`chdir`){let e=await sa(t,n.pathArg,o);if(!await ca(t,e)){u({type:`message`,title:`cd`,message:`Path not found: ${e}`,variant:`error`});return}await r.navigateTo(e)}},[u]);(0,c.useEffect)(()=>{xe(()=>Xe)},[Xe,xe]);let{handleCopy:Ze,handleMove:Qe,handleMoveToTrash:$e,handlePermanentDelete:et,handleRename:tt}=aa(We,qe,Je,ye);(0,c.useEffect)(()=>{Pr({moveToTrash:$e,permanentDelete:et,copy:Ze,move:Qe,rename:tt,pasteToCommandLine:e=>Oe.current(e)})},[$e,et,Ze,Qe,tt]),(0,c.useEffect)(()=>{B.setContext(`leftPanelActive`,_===`left`),B.setContext(`rightPanelActive`,_===`right`)},[_]),(0,c.useEffect)(()=>{B.setContext(`dialogOpen`,s!==null)},[s]);let nt=(0,c.useCallback)((e,t,n)=>{if(Kt.resolve(G(e))){Ke.current(e+`\0`);return}x({path:e,name:t,size:n,panel:We.current})},[]),rt=(0,c.useCallback)((e,t,n,r)=>{w({path:e,name:t,size:n,langId:r})},[]),at=(0,c.useCallback)(async(e,n,r)=>{let i=await t.fs.exists(e);i||await t.fs.writeFile(e,``),w({path:e,name:n,size:i?(await t.fs.stat(e)).size:0,langId:r})},[]),ct=b?b.panel===`left`?h.entries:g.entries:[],lt=(0,c.useCallback)((e,t)=>t.some(t=>{if(t.startsWith(`*.`)){let n=t.slice(1).toLowerCase();return e.toLowerCase().endsWith(n)}return e.toLowerCase()===t.toLowerCase()}),[]),ut=(0,c.useCallback)(e=>b?(f?ct:ct.filter(e=>!e.meta.hidden)).filter(t=>t.type===`file`&<(t.name,e)).map(e=>({path:e.path,name:e.name,size:Number(e.meta.size)})).sort((e,t)=>e.name.localeCompare(t.name)):[],[b,ct,f,lt]),dt=(0,c.useCallback)(async(e,t)=>{let{patterns:n}=t??{};if(!n||!b)return;let r=ut(n),i=r.findIndex(e=>e.path===b.path);if(e===`navigatePrev`){if(i>0){let e=r[i-1];x(t=>t?{...e,panel:t.panel}:null)}return}if(e===`navigateNext`){if(i>=0&&i<r.length-1){let e=r[i+1];x(t=>t?{...e,panel:t.panel}:null)}return}if(e===`getFileIndex`)return{index:i,total:r.length}},[b,ut]),ft=b?Wt.resolve(b.name):null,pt=S?Gt.resolve(S.name):null;(0,c.useEffect)(()=>{ft&&E(e=>e?.dirPath===ft.extensionDirPath&&e?.entry===ft.contribution.entry?e:{dirPath:ft.extensionDirPath,entry:ft.contribution.entry})},[ft?.extensionDirPath,ft?.contribution.entry]),(0,c.useEffect)(()=>{pt&&O(e=>e?.dirPath===pt.extensionDirPath&&e?.entry===pt.contribution.entry?e:{dirPath:pt.extensionDirPath,entry:pt.contribution.entry})},[pt?.extensionDirPath,pt?.contribution.entry]);let mt=b&&go(b.name)?b.name:void 0,U=h.requestedCursor??(b?.panel===`left`?mt:void 0),W=g.requestedCursor??(b?.panel===`right`?mt:void 0),{handlePanelStateChange:gt}=so({activePanel:_,settingsLoaded:ke,left:h,right:g,leftTabsRef:fe,rightTabsRef:pe,leftActiveTabIdRef:me,rightActiveTabIdRef:he,leftTabSelectionRef:oe,rightTabSelectionRef:se,leftSelectedNameRef:ae,rightSelectedNameRef:R,setLeftTabs:P,setRightTabs:F,setLeftActiveTabId:ne,setRightActiveTabId:ie}),_t=(0,c.useCallback)(()=>{let e=We.current,t=Yi[e],n=e===`left`?h.currentPath:g.currentPath,r=(t===`left`?me:he).current,i=t===`left`?P:F,a=t===`left`?h:g;i(e=>e.map(e=>e.id===r&&e.type===`filelist`?{...e,path:n}:e)),a.navigateTo(n),v(t)},[h.currentPath,g.currentPath,h,g]),vt=(0,c.useCallback)(()=>{let e=We.current,t=Yi[e],n=e===`left`?h.currentPath:g.currentPath,r=_i(n),i=t===`left`?P:F,a=t===`left`?ne:ie,o=t===`left`?h:g;i(e=>[...e,r]),a(r.id),o.navigateTo(n),v(t)},[h.currentPath,g.currentPath,h,g]),yt=(0,c.useCallback)(()=>{let e=We.current,t=e===`left`?h.entries:g.entries,n=e===`left`?ae.current:R.current,r=n?t.find(e=>e.name===n):void 0;if(!r||r.type!==`folder`)return;let i=r.path,a=Yi[e],o=(a===`left`?me:he).current,s=a===`left`?P:F,c=a===`left`?h:g;s(e=>e.map(e=>e.id===o&&e.type===`filelist`?{...e,path:i}:e)),c.navigateTo(i),v(a)},[h.entries,g.entries,h,g]),bt=(0,c.useCallback)(()=>{let e=We.current,t=e===`left`?h.entries:g.entries,n=e===`left`?ae.current:R.current,r=n?t.find(e=>e.name===n):void 0;if(!r||r.type!==`folder`)return;let i=r.path,a=Yi[e],o=_i(i),s=a===`left`?P:F,c=a===`left`?ne:ie,l=a===`left`?h:g;s(e=>[...e,o]),c(o.id),l.navigateTo(i),v(a)},[h.entries,g.entries,h,g]),xt=(0,c.useCallback)(()=>{let e=We.current,t=e===`left`?h.entries:g.entries,n=e===`left`?ae.current:R.current,r=n?t.find(e=>e.name===n):void 0;if(!r||r.type!==`file`)return;let i=r.path,a=r.name,o=Number(r.meta.size),s=e,c=Yi[e],l=(c===`left`?fe:pe).current,u=c===`left`?P:F,d=c===`left`?ne:ie,f=l.find(e=>e.type===`preview`&&e.isTemp);if(f&&f.type===`preview`)u(e=>e.map(e=>e.id===f.id?{...e,path:i,name:a,size:o,sourcePanel:s}:e)),d(f.id);else{let e=vi(i,a,o,s);u(t=>[...t,e]),d(e.id)}v(c)},[h.entries,g.entries]);(0,c.useEffect)(()=>(t.theme.get().then(e=>o(e)),t.theme.onChange(e=>o(e))),[]);let St=(0,c.useRef)(h.currentPath);St.current=h.currentPath;let K=(0,c.useRef)(g.currentPath);K.current=g.currentPath,(0,c.useEffect)(()=>{if(ce.current===I)return;ce.current=I;let e=fe.current.find(e=>e.id===I);e?.type===`filelist`&&e.path!=null&&h.navigateTo(e.path)},[I]),(0,c.useEffect)(()=>{if(le.current===re)return;le.current=re;let e=pe.current.find(e=>e.id===re);e?.type===`filelist`&&e.path!=null&&g.navigateTo(e.path)},[re]);let Ct=(0,c.useRef)(h.currentPath),wt=(0,c.useRef)(g.currentPath);(0,c.useEffect)(()=>{Ct.current!==h.currentPath&&(Ct.current=h.currentPath,P(e=>{let t=e.findIndex(e=>e.id===I);if(t<0)return e;let n=e[t];if(n?.type!==`filelist`||n.path===h.currentPath)return e;let r=[...e];return r[t]={...n,path:h.currentPath},r}))},[h.currentPath,I]),(0,c.useEffect)(()=>{wt.current!==g.currentPath&&(wt.current=g.currentPath,F(e=>{let t=e.findIndex(e=>e.id===re);if(t<0)return e;let n=e[t];if(n?.type!==`filelist`||n.path===g.currentPath)return e;let r=[...e];return r[t]={...n,path:g.currentPath},r}))},[g.currentPath,re]),(0,c.useEffect)(()=>{if(!ke)return;let e=async(e,n,r)=>{let i=n?.currentPath??r;i&&(await t.fs.exists(i)||(i=await qa(t,i))),i||=await t.utils.getHomePath(),await e.navigateTo(i)};e(h,Me),e(g,Ne),Ie&&v(Ie),setTimeout(()=>{ze(void 0),He(void 0),Ue(void 0)},500)},[ke]),ra({settingsLoaded:ke,onRefreshPanels:()=>{qe.current.refresh(),Je.current.refresh()}});let Tt=(0,c.useCallback)(e=>{(We.current===`left`?qe.current:Je.current).navigateTo(e)},[]),Et=Za({activePanelCwd:_===`left`?h.currentPath:g.currentPath,onNavigatePanel:Tt});return Ye.current=Et.activeCwd,Va({leftRef:qe,rightRef:Je,onPreviewInOppositePanel:xt,onOpenCurrentFolderInOppositeCurrentTab:_t,onOpenCurrentFolderInOppositeNewTab:vt,onOpenSelectedFolderInOppositeCurrentTab:yt,onOpenSelectedFolderInOppositeNewTab:bt,onOpenCreateFileConfirm:at,showDialog:u,onViewFile:nt,onEditFile:rt,onExecuteInTerminal:e=>Et.writeToTerminal(e),editorFileSizeLimit:ee}),(0,c.useEffect)(()=>{if(t.onReconnect)return t.onReconnect(()=>{qe.current.navigateTo(St.current),Je.current.navigateTo(K.current)})},[]),!h.currentPath||!g.currentPath||!de?(0,l.jsx)(`div`,{className:yo.loading,children:`Loading...`}):(0,l.jsxs)(`div`,{className:yo.app,children:[(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:V[`terminal-and-panels`],children:[(0,l.jsx)(`div`,{className:V[`terminal-background`],children:(0,l.jsx)(Ji,{})}),(0,l.jsxs)(`div`,{className:C(Z,`panels-overlay`,!y&&`hidden`),children:[(0,l.jsx)(Mi,{side:`left`,panel:h,onRememberExpectedTerminalCwd:Et.rememberExpectedTerminalCwd,selectionKey:ge,requestedActiveName:U,initialPanelState:Me,onStateChange:(e,t)=>gt(`left`,e,t)}),(0,l.jsx)(Mi,{side:`right`,panel:g,onRememberExpectedTerminalCwd:Et.rememberExpectedTerminalCwd,selectionKey:ge,requestedActiveName:W,initialPanelState:Ne,onStateChange:(e,t)=>gt(`right`,e,t)})]})]}),(0,l.jsx)(it,{}),(0,l.jsx)(qi,{})]}),(0,l.jsxs)(`div`,{className:yo[`status-bar`],children:[(0,l.jsx)(Ge,{}),e]}),b&&!ft&&(0,l.jsx)(L,{title:`No viewer`,message:`No viewer extension found for this file type. Install viewer extensions (e.g. Image Viewer, File Viewer) from the extensions panel.`,onClose:()=>x(null)}),T&&(0,l.jsx)(dn,{extensionDirPath:T.dirPath,entry:T.entry,filePath:b?.path??``,fileName:b?.name??``,fileSize:b?.size??0,visible:b!=null&&ft!=null,onClose:()=>x(null),onExecuteCommand:dt},`viewer:${T.dirPath}:${T.entry}`),S&&!pt&&(0,l.jsx)(L,{title:`No editor`,message:`No editor extension found for this file type. Install an editor extension (e.g. Monaco Editor) from the extensions panel.`,onClose:()=>w(null)}),D&&(()=>{let e=ue.flatMap(e=>e.languages??[]),t=ue.flatMap(e=>e.grammarRefs??[]).map(e=>({contribution:e.contribution,path:e.path}));return(0,l.jsx)(fn,{extensionDirPath:D.dirPath,entry:D.entry,filePath:S?.path??``,fileName:S?.name??``,langId:S?.langId??`plaintext`,visible:S!=null&&pt!=null,onClose:()=>w(null),languages:e,grammars:t},`editor:${D.dirPath}:${D.entry}`)})(),k&&(0,l.jsx)(or,{}),(0,l.jsx)(_e,{}),(0,l.jsx)(ot,{open:be.open,onOpenChange:be.setOpen})]})}function xo({bridge:e,widget:t}){let n=(0,c.useRef)(null);return(0,c.useEffect)(()=>{B.registerContributions(xe)},[]),(0,c.useEffect)(()=>{let e=n.current;if(e)return At(e),()=>{n.current===e&&At(null)}},[]),(0,l.jsx)(`div`,{ref:n,className:yo[`dotdir-root`],children:(0,l.jsx)(d.Provider,{children:(0,l.jsx)(be,{bridge:e,children:(0,l.jsx)(_,{children:(0,l.jsx)(me,{children:(0,l.jsx)(bo,{widget:t})})})})})})}exports.DotDir=xo,exports.basename=G,exports.dirname=U,exports.join=W,exports.normalizePath=H;
|
|
130
|
+
`,spawnArgs:[]}}function ta(e,t,n){let r=ea(n.shell);return{id:e,label:t,shell:e,hiddenCdTemplate:n.hiddenCdTemplate??r.hiddenCdTemplate,cwdEscape:n.cwdEscape??r.cwdEscape,lineEnding:n.lineEnding??r.lineEnding,spawnArgs:n.spawnArgs??r.spawnArgs}}async function na(e,t,n){let r=n.__platform__??``,i=n.SHELL??``,a=[],o={},s=new Set,c=[];for(let e of t)for(let t of e.shellIntegrations??[])Qi(t.platforms,r)&&c.push(t);if(i&&r!==`windows`){let t=i.split(`/`).pop()??``,n=c.find(e=>e.shell===t);if(n&&!s.has(i))try{await e.fs.exists(i)&&(s.add(i),a.push(ta(i,n.label,n)),o[i]={script:n.script,scriptArg:n.scriptArg??!1})}catch{}}for(let t of c)for(let r of t.executableCandidates){let i=$i(r,n);if(!(!i||s.has(i)))try{if(await e.fs.exists(i)){s.add(i),a.push(ta(i,t.label,t)),o[i]={script:t.script,scriptArg:t.scriptArg??!1};break}}catch{}}return{profiles:a,shellScripts:o}}function ra({settingsLoaded:e,onRefreshPanels:t}){let n=z(),r=vn(),i=(0,d.useAtomValue)(we),a=(0,d.useAtomValue)(Te),o=(0,d.useAtomValue)(Ae),s=(0,d.useSetAtom)(Ee),l=(0,d.useSetAtom)(De),u=(0,d.useSetAtom)(Oe),f=(0,d.useSetAtom)(ke),{setIconTheme:p}=Er(),{setIconThemeKind:m}=Dr(),h=(0,c.useRef)(i);h.current=i;let g=(0,c.useRef)(a);g.current=a;let _=(0,c.useRef)(t);_.current=t;let v=(0,c.useRef)([]),y=(0,c.useRef)([]),b=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let e=a?Fn(v.current,a):null,t=e?on(e.theme.uiTheme):o===`light`||o===`high-contrast-light`?`light`:`dark`;jt().dataset.theme=t,m(t)},[o,a]);let x=(0,c.useCallback)(async(e,t)=>{if(!t)return;let r=e.find(e=>`${e.ref.publisher}.${e.ref.name}`===t);if(r?.iconThemeFssPath&&!r.iconThemeFss)try{r.iconThemeFss=await K(n,r.iconThemeFssPath),r.iconThemeBasePath||=U(r.iconThemeFssPath)}catch{}},[n]);(0,c.useEffect)(()=>{b.current&&(async()=>{let e=v.current;if(await x(e,i),Vr(e,i),!i)p(`fss`);else{let t=e.find(e=>`${e.ref.publisher}.${e.ref.name}`===i);t?.vscodeIconThemePath?p(`vscode`,t.vscodeIconThemePath):t?.iconThemeFssPath?p(`fss`):p(`none`)}_.current()})()},[i,x]),(0,c.useEffect)(()=>{if(b.current)if(!a)an();else{let e=Fn(v.current,a);e&&sn(n,e.theme.jsonPath,e.theme.uiTheme).catch(()=>an())}},[a]),(0,c.useEffect)(()=>{if(!e)return;ue.initialize();let t=async e=>{ue.clear();for(let t of e)if(t.languages)for(let e of t.languages)ue.registerLanguage(e);await ue.activateGrammars()},i=async(e,t)=>{if(!t){await p(`fss`);return}let n=e.find(e=>`${e.ref.publisher}.${e.ref.name}`===t);n?.vscodeIconThemePath?await p(`vscode`,n.vscodeIconThemePath):n?.iconThemeFssPath?await p(`fss`):await p(`none`)},a=async(e,t)=>{if(!t){an();return}let r=Fn(e,t);if(r){let e=on(r.theme.uiTheme);jt().dataset.theme=e,m(e);try{await sn(n,r.theme.jsonPath,r.theme.uiTheme)}catch(e){console.warn(`[ExtHost] Failed to load color theme:`,t,e),an()}}else an()},o=e=>{for(let e of y.current)try{e()}catch{}y.current=[];for(let t of e){if(t.commands){let e=B.registerContributions(t.commands);y.current.push(e);for(let e of t.commands){let t=B.registerCommand(e.command,async(...t)=>{await r.executeCommand(e.command,t)});y.current.push(t)}}t.keybindings?.length&&y.current.push(...tt(B,t.keybindings))}},c=r.onLoaded(e=>{(async()=>{if(v.current=e,s(e),qt(e),Ot(),n.fsProvider){for(let t of e)for(let e of t.fsProviders??[])if(e.runtime===`backend`){let r=W(t.dirPath,e.entry);n.fsProvider.load(r).catch(()=>{})}}n.utils.getEnv().then(t=>na(n,e,t).then(({profiles:e,shellScripts:t})=>{u(e),f(!0),n.pty.setShellIntegrations&&Object.keys(t).length>0&&n.pty.setShellIntegrations(t).catch(()=>{})})).catch(()=>{f(!0)}),await x(e,h.current),Vr(e,h.current),t(e),o(e),Promise.all([i(e,h.current),a(e,g.current)]).then(()=>{l(!0),b.current=!0,_.current()})})()});return r.start(),()=>{c();for(let e of y.current)try{e()}catch{}y.current=[],r.dispose()}},[e,x,s,u,f,l])}async function ia(e,t,n){let r=await e(t);if(r.length===0)return[{innerPath:t,destRelPath:n}];let i=[];for(let a of r){let r=t===`/`?`/${a.name}`:`${t}/${a.name}`,o=`${n}/${a.name}`;i.push(...await ia(e,r,o))}return i}function aa(e,t,n,r){let{showDialog:i,closeDialog:a,updateDialog:o}=ve(),s=z(),l=(0,c.useRef)(null),u=(0,c.useRef)(null),d=(0,c.useRef)(null),f=(0,c.useRef)(null),p=(0,c.useRef)(null),m=(0,c.useRef)(null),h=(0,c.useCallback)(()=>{r(e=>e+1),t.current.navigateTo(t.current.currentPath),n.current.navigateTo(n.current.currentPath)},[r,t,n]),g=(0,c.useCallback)((e,t)=>{e.length!==0&&i({type:`message`,title:`Move to Trash`,message:e.length===1?`Move "${G(e[0])}" to Trash?`:`Move ${e.length} items to Trash?`,variant:`default`,buttons:[{label:`Cancel`},{label:`Move to Trash`,default:!0,onClick:async()=>{try{await s.fs.moveToTrash(e),t()}catch(e){i({type:`message`,title:`Error`,message:e instanceof Error?e.message:String(e),variant:`error`})}}}]})},[i]),_=(0,c.useCallback)((e,t)=>{e.length!==0&&i({type:`message`,title:`Permanently Delete`,message:e.length===1?`Permanently delete "${G(e[0])}"? This cannot be undone.`:`Permanently delete ${e.length} items? This cannot be undone.`,variant:`default`,buttons:[{label:`Cancel`},{label:`Delete`,default:!0,onClick:async()=>{try{let t={type:`deleteProgress`,filesDone:0,currentFile:`Preparing...`,onCancel:()=>{i({type:`cancelDeleteConfirm`,onResume:()=>{m.current&&i(m.current)},onCancelDeletion:()=>{p.current!==null&&s.fs.delete.cancel(p.current),p.current=null,m.current=null,a()}})}};m.current=t,i(t);let n=await s.fs.delete.start(e);m.current!==null&&(p.current=n)}catch(e){p.current=null,m.current=null,a(),i({type:`message`,title:`Error`,message:e instanceof Error?e.message:String(e),variant:`error`})}}}]})},[i,a]),v=(0,c.useCallback)((r,c)=>{let d=(e.current===`left`?n.current:t.current).currentPath;!d||r.length===0||i({type:`copyConfig`,itemCount:r.length,destPath:d,onConfirm:async(e,t)=>{try{if(r.some(e=>Mt(e))){if(!r.every(e=>Mt(e)))throw Error(`Cannot copy files from archives and local files in the same operation`);let e={type:`copyProgress`,bytesCopied:0,bytesTotal:0,filesDone:0,filesTotal:0,currentFile:`Collecting files...`,onCancel:a};u.current=e,i(e);let n=[];for(let e of r){let{containerFile:t,innerPath:r}=Nt(e),i=Kt.resolve(G(t));if(!i)throw Error(`No fsProvider registered for "${G(t)}"`);let a=null,o=null;i.contribution.runtime===`backend`&&s.fsProvider?a=W(i.extensionDirPath,i.contribution.entry):o=await Dt(s,i.extensionDirPath,i.contribution.entry),(await ia(async e=>a?s.fsProvider.listEntries(a,t,e):(await o.listEntries(t,e)).map(e=>({name:e.name,kind:e.type})),r,G(r))).forEach(e=>n.push({...e,hostFile:t,wasmPath:a,provider:o}))}o({filesTotal:n.length,currentFile:`Extracting...`}),u.current={...e,filesTotal:n.length,currentFile:`Extracting...`};let l=0;for(let{innerPath:e,destRelPath:r,hostFile:i,wasmPath:a,provider:c}of n){let n=W(t,r);o({currentFile:G(r),filesDone:l}),s.fs.createDir&&await s.fs.createDir(U(n)).catch(()=>{});let u;if(a)u=await s.fsProvider.readFileRange(a,i,e,0,64*1024*1024);else{if(!c?.readFileRange)throw Error(`Provider does not support readFileRange`);u=await c.readFileRange(i,e,0,64*1024*1024)}await s.fs.writeBinaryFile(n,new Uint8Array(u)),l++}u.current=null,a(),c();return}let n={type:`copyProgress`,bytesCopied:0,bytesTotal:0,filesDone:0,filesTotal:0,currentFile:`Preparing...`,onCancel:()=>{i({type:`cancelCopyConfirm`,onResume:()=>{u.current&&i(u.current)},onCancelCopy:()=>{l.current!==null&&s.fs.copy.cancel(l.current),l.current=null,u.current=null,a(),c()}})}};u.current=n,i(n);let d=await s.fs.copy.start(r,t,e);u.current!==null&&(l.current=d)}catch(e){l.current=null,u.current=null,a(),i({type:`message`,title:`Copy Error`,message:e instanceof Error?e.message:String(e),variant:`error`})}},onCancel:()=>{}})},[i,a]);(0,c.useEffect)(()=>s.fs.copy.onProgress(e=>{if(l.current===null)if(u.current!==null)l.current=e.copyId;else return;else if(e.copyId!==l.current)return;let t=e.event;switch(t.kind){case`progress`:{let e={bytesCopied:t.bytesCopied,bytesTotal:t.bytesTotal,filesDone:t.filesDone,filesTotal:t.filesTotal,currentFile:t.currentFile};u.current&&={...u.current,...e},o(e);break}case`conflict`:i({type:`copyConflict`,src:t.src,dest:t.dest,srcSize:t.srcSize,srcMtimeMs:t.srcMtimeMs,destSize:t.destSize,destMtimeMs:t.destMtimeMs,onResolve:e=>{s.fs.copy.resolveConflict(l.current,e),u.current&&i(u.current)}});break;case`done`:l.current=null,u.current=null,a(),h();break;case`error`:l.current=null,u.current=null,a(),i({type:`message`,title:`Copy Error`,message:t.message,variant:`error`}),h();break}}),[i,a,o,h]);let y=(0,c.useCallback)((r,o)=>{let c=(e.current===`left`?n.current:t.current).currentPath;!c||r.length===0||i({type:`moveConfig`,itemCount:r.length,destPath:c,onConfirm:async(e,t)=>{try{let n={type:`moveProgress`,bytesCopied:0,bytesTotal:0,filesDone:0,filesTotal:0,currentFile:`Preparing...`,onCancel:()=>{i({type:`cancelMoveConfirm`,onResume:()=>{f.current&&i(f.current)},onCancelMove:()=>{d.current!==null&&s.fs.move.cancel(d.current),d.current=null,f.current=null,a(),o()}})}};f.current=n,i(n);let c=await s.fs.move.start(r,t,e);f.current!==null&&(d.current=c)}catch(e){d.current=null,f.current=null,a(),i({type:`message`,title:`Move Error`,message:e instanceof Error?e.message:String(e),variant:`error`})}},onCancel:()=>{}})},[i,a]);return(0,c.useEffect)(()=>s.fs.move.onProgress(e=>{if(d.current===null)if(f.current!==null)d.current=e.moveId;else return;else if(e.moveId!==d.current)return;let t=e.event;switch(t.kind){case`progress`:{let e={bytesCopied:t.bytesCopied,bytesTotal:t.bytesTotal,filesDone:t.filesDone,filesTotal:t.filesTotal,currentFile:t.currentFile};f.current&&={...f.current,...e},o(e);break}case`conflict`:i({type:`moveConflict`,src:t.src,dest:t.dest,srcSize:t.srcSize,srcMtimeMs:t.srcMtimeMs,destSize:t.destSize,destMtimeMs:t.destMtimeMs,onResolve:e=>{s.fs.move.resolveConflict(d.current,e),f.current&&i(f.current)}});break;case`done`:d.current=null,f.current=null,a(),h();break;case`error`:d.current=null,f.current=null,a(),i({type:`message`,title:`Move Error`,message:t.message,variant:`error`}),h();break}}),[i,a,o,h]),(0,c.useEffect)(()=>s.fs.delete.onProgress(e=>{if(p.current===null)if(m.current!==null)p.current=e.deleteId;else return;else if(e.deleteId!==p.current)return;let t=e.event;switch(t.kind){case`progress`:{let e={filesDone:t.filesDone,currentFile:t.currentFile};m.current&&={...m.current,...e},o(e);break}case`done`:p.current=null,m.current=null,a(),h();break;case`error`:p.current=null,m.current=null,a(),i({type:`message`,title:`Delete Error`,message:t.message,variant:`error`}),h();break}}),[i,a,o,h]),{handleCopy:v,handleMove:y,handleMoveToTrash:g,handlePermanentDelete:_,handleRename:(0,c.useCallback)((e,t,n)=>{i({type:`rename`,currentName:t,onConfirm:async t=>{try{await s.fs.rename.rename(e,t),n()}catch(e){i({type:`message`,title:`Rename Error`,message:e instanceof Error?e.message:String(e),variant:`error`})}},onCancel:()=>{}})},[i])}}function oa(e){let t=e.trim();if(!t)return null;if(/^cd::/i.test(t)){let e=t.match(/^cd::\s*(\S+)\s*$/i);return e?{kind:`setAlias`,alias:e[1]}:{kind:`error`,message:`Usage: cd::alias — save current folder as alias`}}if(/^cd:/i.test(t)){let e=t.match(/^cd:\s*(\S+)\s*$/i);return e?{kind:`goAlias`,alias:e[1]}:{kind:`error`,message:`Usage: cd:alias — go to folder saved under alias`}}if(/^cd(?:\s|$)/i.test(t)||/^cd$/i.test(t)){let e=t.match(/^cd(?:\s+(.*))?$/i);if(!e)return null;let n=(e[1]??``).trim();return(n.startsWith(`"`)&&n.endsWith(`"`)||n.startsWith(`'`)&&n.endsWith(`'`))&&(n=n.slice(1,-1)),{kind:`chdir`,pathArg:n}}return null}async function sa(e,t,n){let r=t.trim();if(!r)return Q(await e.utils.getHomePath());let i=r;if(i.startsWith(`~`)){let t=await e.utils.getHomePath(),n=Q(t);if(i===`~`||i===`~/`)return n;let r=i.slice(1).replace(/^\//,``);i=r?W(t,r):t}return Q(ht(H(i.startsWith(`/`)||i.startsWith(`//`)||/^[A-Za-z]:\//.test(i)||/^[A-Za-z]:$/i.test(i)?i:W(n,i))))}async function ca(e,t){if(!await e.fs.exists(t))return!1;try{return await e.fs.entries(t),!0}catch{return!1}}function la(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)}function ua(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n}var da,fa=`__TAURI_TO_IPC_KEY__`;function pa(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function $(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}var ma=class{get rid(){return la(this,da,`f`)}constructor(e){da.set(this,void 0),ua(this,da,e,`f`)}async close(){return $(`plugin:resources|close`,{rid:this.rid})}};da=new WeakMap;function ha(){return!!(globalThis||window).isTauri}var ga=class{constructor(...e){this.type=`Logical`,e.length===1?`Logical`in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new _a(this.width*e,this.height*e)}[fa](){return{width:this.width,height:this.height}}toJSON(){return this[fa]()}},_a=class{constructor(...e){this.type=`Physical`,e.length===1?`Physical`in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new ga(this.width/e,this.height/e)}[fa](){return{width:this.width,height:this.height}}toJSON(){return this[fa]()}},va=class{constructor(e){this.size=e}toLogical(e){return this.size instanceof ga?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof _a?this.size:this.size.toPhysical(e)}[fa](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[fa]()}},ya=class{constructor(...e){this.type=`Logical`,e.length===1?`Logical`in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new ba(this.x*e,this.y*e)}[fa](){return{x:this.x,y:this.y}}toJSON(){return this[fa]()}},ba=class{constructor(...e){this.type=`Physical`,e.length===1?`Physical`in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new ya(this.x/e,this.y/e)}[fa](){return{x:this.x,y:this.y}}toJSON(){return this[fa]()}},xa=class{constructor(e){this.position=e}toLogical(e){return this.position instanceof ya?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof ba?this.position:this.position.toPhysical(e)}[fa](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[fa]()}},Sa;(function(e){e.WINDOW_RESIZED=`tauri://resize`,e.WINDOW_MOVED=`tauri://move`,e.WINDOW_CLOSE_REQUESTED=`tauri://close-requested`,e.WINDOW_DESTROYED=`tauri://destroyed`,e.WINDOW_FOCUS=`tauri://focus`,e.WINDOW_BLUR=`tauri://blur`,e.WINDOW_SCALE_FACTOR_CHANGED=`tauri://scale-change`,e.WINDOW_THEME_CHANGED=`tauri://theme-changed`,e.WINDOW_CREATED=`tauri://window-created`,e.WEBVIEW_CREATED=`tauri://webview-created`,e.DRAG_ENTER=`tauri://drag-enter`,e.DRAG_OVER=`tauri://drag-over`,e.DRAG_DROP=`tauri://drag-drop`,e.DRAG_LEAVE=`tauri://drag-leave`})(Sa||={});async function Ca(e,t){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,t),await $(`plugin:event|unlisten`,{event:e,eventId:t})}async function wa(e,t,n){return $(`plugin:event|listen`,{event:e,target:typeof n?.target==`string`?{kind:`AnyLabel`,label:n.target}:n?.target??{kind:`Any`},handler:pa(t)}).then(t=>async()=>Ca(e,t))}async function Ta(e,t,n){return wa(e,n=>{Ca(e,n.id),t(n)},n)}async function Ea(e,t){await $(`plugin:event|emit`,{event:e,payload:t})}async function Da(e,t,n){await $(`plugin:event|emit_to`,{target:typeof e==`string`?{kind:`AnyLabel`,label:e}:e,event:t,payload:n})}var Oa=class e extends ma{constructor(e){super(e)}static async new(t,n,r){return $(`plugin:image|new`,{rgba:ka(t),width:n,height:r}).then(t=>new e(t))}static async fromBytes(t){return $(`plugin:image|from_bytes`,{bytes:ka(t)}).then(t=>new e(t))}static async fromPath(t){return $(`plugin:image|from_path`,{path:t}).then(t=>new e(t))}async rgba(){return $(`plugin:image|rgba`,{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return $(`plugin:image|size`,{rid:this.rid})}};function ka(e){return e==null?null:typeof e==`string`?e:e instanceof Oa?e.rid:e}var Aa;(function(e){e[e.Critical=1]=`Critical`,e[e.Informational=2]=`Informational`})(Aa||={});var ja=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},Ma;(function(e){e.None=`none`,e.Normal=`normal`,e.Indeterminate=`indeterminate`,e.Paused=`paused`,e.Error=`error`})(Ma||={});function Na(){return new Ia(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function Pa(){return $(`plugin:window|get_all_windows`).then(e=>e.map(e=>new Ia(e,{skip:!0})))}var Fa=[`tauri://created`,`tauri://error`],Ia=class{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||$(`plugin:window|create`,{options:{...t,parent:typeof t.parent==`string`?t.parent:t.parent?.label,label:e}}).then(async()=>this.emit(`tauri://created`)).catch(async e=>this.emit(`tauri://error`,e))}static async getByLabel(e){return(await Pa()).find(t=>t.label===e)??null}static getCurrent(){return Na()}static async getAll(){return Pa()}static async getFocusedWindow(){for(let e of await Pa())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}:wa(e,t,{target:{kind:`Window`,label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}:Ta(e,t,{target:{kind:`Window`,label:this.label}})}async emit(e,t){if(Fa.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,payload:t});return}return Ea(e,t)}async emitTo(e,t,n){if(Fa.includes(t)){for(let e of this.listeners[t]||[])e({event:t,id:-1,payload:n});return}return Da(e,t,n)}_handleTauriEvent(e,t){return Fa.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}async scaleFactor(){return $(`plugin:window|scale_factor`,{label:this.label})}async innerPosition(){return $(`plugin:window|inner_position`,{label:this.label}).then(e=>new ba(e))}async outerPosition(){return $(`plugin:window|outer_position`,{label:this.label}).then(e=>new ba(e))}async innerSize(){return $(`plugin:window|inner_size`,{label:this.label}).then(e=>new _a(e))}async outerSize(){return $(`plugin:window|outer_size`,{label:this.label}).then(e=>new _a(e))}async isFullscreen(){return $(`plugin:window|is_fullscreen`,{label:this.label})}async isMinimized(){return $(`plugin:window|is_minimized`,{label:this.label})}async isMaximized(){return $(`plugin:window|is_maximized`,{label:this.label})}async isFocused(){return $(`plugin:window|is_focused`,{label:this.label})}async isDecorated(){return $(`plugin:window|is_decorated`,{label:this.label})}async isResizable(){return $(`plugin:window|is_resizable`,{label:this.label})}async isMaximizable(){return $(`plugin:window|is_maximizable`,{label:this.label})}async isMinimizable(){return $(`plugin:window|is_minimizable`,{label:this.label})}async isClosable(){return $(`plugin:window|is_closable`,{label:this.label})}async isVisible(){return $(`plugin:window|is_visible`,{label:this.label})}async title(){return $(`plugin:window|title`,{label:this.label})}async theme(){return $(`plugin:window|theme`,{label:this.label})}async isAlwaysOnTop(){return $(`plugin:window|is_always_on_top`,{label:this.label})}async center(){return $(`plugin:window|center`,{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===Aa.Critical?{type:`Critical`}:{type:`Informational`}),$(`plugin:window|request_user_attention`,{label:this.label,value:t})}async setResizable(e){return $(`plugin:window|set_resizable`,{label:this.label,value:e})}async setEnabled(e){return $(`plugin:window|set_enabled`,{label:this.label,value:e})}async isEnabled(){return $(`plugin:window|is_enabled`,{label:this.label})}async setMaximizable(e){return $(`plugin:window|set_maximizable`,{label:this.label,value:e})}async setMinimizable(e){return $(`plugin:window|set_minimizable`,{label:this.label,value:e})}async setClosable(e){return $(`plugin:window|set_closable`,{label:this.label,value:e})}async setTitle(e){return $(`plugin:window|set_title`,{label:this.label,value:e})}async maximize(){return $(`plugin:window|maximize`,{label:this.label})}async unmaximize(){return $(`plugin:window|unmaximize`,{label:this.label})}async toggleMaximize(){return $(`plugin:window|toggle_maximize`,{label:this.label})}async minimize(){return $(`plugin:window|minimize`,{label:this.label})}async unminimize(){return $(`plugin:window|unminimize`,{label:this.label})}async show(){return $(`plugin:window|show`,{label:this.label})}async hide(){return $(`plugin:window|hide`,{label:this.label})}async close(){return $(`plugin:window|close`,{label:this.label})}async destroy(){return $(`plugin:window|destroy`,{label:this.label})}async setDecorations(e){return $(`plugin:window|set_decorations`,{label:this.label,value:e})}async setShadow(e){return $(`plugin:window|set_shadow`,{label:this.label,value:e})}async setEffects(e){return $(`plugin:window|set_effects`,{label:this.label,value:e})}async clearEffects(){return $(`plugin:window|set_effects`,{label:this.label,value:null})}async setAlwaysOnTop(e){return $(`plugin:window|set_always_on_top`,{label:this.label,value:e})}async setAlwaysOnBottom(e){return $(`plugin:window|set_always_on_bottom`,{label:this.label,value:e})}async setContentProtected(e){return $(`plugin:window|set_content_protected`,{label:this.label,value:e})}async setSize(e){return $(`plugin:window|set_size`,{label:this.label,value:e instanceof va?e:new va(e)})}async setMinSize(e){return $(`plugin:window|set_min_size`,{label:this.label,value:e instanceof va?e:e?new va(e):null})}async setMaxSize(e){return $(`plugin:window|set_max_size`,{label:this.label,value:e instanceof va?e:e?new va(e):null})}async setSizeConstraints(e){function t(e){return e?{Logical:e}:null}return $(`plugin:window|set_size_constraints`,{label:this.label,value:{minWidth:t(e?.minWidth),minHeight:t(e?.minHeight),maxWidth:t(e?.maxWidth),maxHeight:t(e?.maxHeight)}})}async setPosition(e){return $(`plugin:window|set_position`,{label:this.label,value:e instanceof xa?e:new xa(e)})}async setFullscreen(e){return $(`plugin:window|set_fullscreen`,{label:this.label,value:e})}async setSimpleFullscreen(e){return $(`plugin:window|set_simple_fullscreen`,{label:this.label,value:e})}async setFocus(){return $(`plugin:window|set_focus`,{label:this.label})}async setFocusable(e){return $(`plugin:window|set_focusable`,{label:this.label,value:e})}async setIcon(e){return $(`plugin:window|set_icon`,{label:this.label,value:ka(e)})}async setSkipTaskbar(e){return $(`plugin:window|set_skip_taskbar`,{label:this.label,value:e})}async setCursorGrab(e){return $(`plugin:window|set_cursor_grab`,{label:this.label,value:e})}async setCursorVisible(e){return $(`plugin:window|set_cursor_visible`,{label:this.label,value:e})}async setCursorIcon(e){return $(`plugin:window|set_cursor_icon`,{label:this.label,value:e})}async setBackgroundColor(e){return $(`plugin:window|set_background_color`,{color:e})}async setCursorPosition(e){return $(`plugin:window|set_cursor_position`,{label:this.label,value:e instanceof xa?e:new xa(e)})}async setIgnoreCursorEvents(e){return $(`plugin:window|set_ignore_cursor_events`,{label:this.label,value:e})}async startDragging(){return $(`plugin:window|start_dragging`,{label:this.label})}async startResizeDragging(e){return $(`plugin:window|start_resize_dragging`,{label:this.label,value:e})}async setBadgeCount(e){return $(`plugin:window|set_badge_count`,{label:this.label,value:e})}async setBadgeLabel(e){return $(`plugin:window|set_badge_label`,{label:this.label,value:e})}async setOverlayIcon(e){return $(`plugin:window|set_overlay_icon`,{label:this.label,value:e?ka(e):void 0})}async setProgressBar(e){return $(`plugin:window|set_progress_bar`,{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return $(`plugin:window|set_visible_on_all_workspaces`,{label:this.label,value:e})}async setTitleBarStyle(e){return $(`plugin:window|set_title_bar_style`,{label:this.label,value:e})}async setTheme(e){return $(`plugin:window|set_theme`,{label:this.label,value:e})}async onResized(e){return this.listen(Sa.WINDOW_RESIZED,t=>{t.payload=new _a(t.payload),e(t)})}async onMoved(e){return this.listen(Sa.WINDOW_MOVED,t=>{t.payload=new ba(t.payload),e(t)})}async onCloseRequested(e){return this.listen(Sa.WINDOW_CLOSE_REQUESTED,async t=>{let n=new ja(t);await e(n),n.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){let t=await this.listen(Sa.DRAG_ENTER,t=>{e({...t,payload:{type:`enter`,paths:t.payload.paths,position:new ba(t.payload.position)}})}),n=await this.listen(Sa.DRAG_OVER,t=>{e({...t,payload:{type:`over`,position:new ba(t.payload.position)}})}),r=await this.listen(Sa.DRAG_DROP,t=>{e({...t,payload:{type:`drop`,paths:t.payload.paths,position:new ba(t.payload.position)}})}),i=await this.listen(Sa.DRAG_LEAVE,t=>{e({...t,payload:{type:`leave`}})});return()=>{t(),r(),n(),i()}}async onFocusChanged(e){let t=await this.listen(Sa.WINDOW_FOCUS,t=>{e({...t,payload:!0})}),n=await this.listen(Sa.WINDOW_BLUR,t=>{e({...t,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen(Sa.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(Sa.WINDOW_THEME_CHANGED,e)}},La;(function(e){e.Disabled=`disabled`,e.Throttle=`throttle`,e.Suspend=`suspend`})(La||={});var Ra;(function(e){e.Default=`default`,e.FluentOverlay=`fluentOverlay`})(Ra||={});var za;(function(e){e.AppearanceBased=`appearanceBased`,e.Light=`light`,e.Dark=`dark`,e.MediumLight=`mediumLight`,e.UltraDark=`ultraDark`,e.Titlebar=`titlebar`,e.Selection=`selection`,e.Menu=`menu`,e.Popover=`popover`,e.Sidebar=`sidebar`,e.HeaderView=`headerView`,e.Sheet=`sheet`,e.WindowBackground=`windowBackground`,e.HudWindow=`hudWindow`,e.FullScreenUI=`fullScreenUI`,e.Tooltip=`tooltip`,e.ContentBackground=`contentBackground`,e.UnderWindowBackground=`underWindowBackground`,e.UnderPageBackground=`underPageBackground`,e.Mica=`mica`,e.Blur=`blur`,e.Acrylic=`acrylic`,e.Tabbed=`tabbed`,e.TabbedDark=`tabbedDark`,e.TabbedLight=`tabbedLight`})(za||={});var Ba;(function(e){e.FollowsWindowActiveState=`followsWindowActiveState`,e.Active=`active`,e.Inactive=`inactive`})(Ba||={});function Va(e){let t=z(),n=(0,c.useRef)(e);n.current=e;let r=(0,d.useAtomValue)(Ee),i=(0,c.useRef)(r);i.current=r;let{updateSettings:a}=er(),[o,s]=(0,d.useAtom)(Pe),l=(0,d.useSetAtom)(Fe),u=(0,d.useSetAtom)(je),f=(0,d.useSetAtom)(Ce),p=(0,d.useSetAtom)(Le),m=(0,d.useSetAtom)(Re),h=(0,d.useSetAtom)(Ie),g=(0,c.useRef)(o);g.current=o,(0,c.useEffect)(()=>{let e=[];return e.push(B.registerCommand(`dotdir.toggleHiddenFiles`,()=>l(e=>{let t=!e;return a({showHidden:t}),t}))),e.push(B.registerCommand(`dotdir.togglePanels`,()=>u(e=>{let t=!e;return t&&v.set(`panel`),t}))),e.push(B.registerCommand(`dotdir.showExtensions`,()=>f(!0))),e.push(B.registerCommand(`dotdir.showCommandPalette`,()=>h(e=>!e))),e.push(B.registerCommand(`dotdir.closeViewer`,()=>p(null))),e.push(B.registerCommand(`dotdir.closeEditor`,()=>m(null))),e.push(B.registerCommand(`dotdir.switchPanel`,()=>s(e=>e===`left`?`right`:`left`))),e.push(B.registerCommand(`dotdir.focusLeftPanel`,()=>s(`left`))),e.push(B.registerCommand(`dotdir.focusRightPanel`,()=>s(`right`))),e.push(B.registerCommand(`dotdir.cancelNavigation`,()=>{n.current.leftRef.current.cancelNavigation(),n.current.rightRef.current.cancelNavigation()})),e.push(B.registerCommand(`dotdir.goToParent`,()=>{let{leftRef:e,rightRef:t}=n.current,r=g.current===`left`?e.current:t.current,i=r.currentPath;if(Mt(i)){let{containerFile:e,innerPath:t}=Nt(i);if(t===`/`||t===``){r.navigateTo(U(e),!1,G(e));return}}let a=U(i);a!==i&&r.navigateTo(a)})),e.push(B.registerCommand(`dotdir.goHome`,async()=>{let{leftRef:e,rightRef:r}=n.current,i=await t.utils.getHomePath();(g.current===`left`?e.current:r.current).navigateTo(i)})),e.push(B.registerCommand(`dotdir.refresh`,()=>{let{leftRef:e,rightRef:t}=n.current,r=g.current===`left`?e.current:t.current;r.navigateTo(r.currentPath)})),e.push(B.registerCommand(`dotdir.newTab`,()=>void ji()?.newTab())),e.push(B.registerCommand(`dotdir.closeTab`,()=>void ji()?.closeActiveTab())),e.push(B.registerCommand(`dotdir.previewInOppositePanel`,()=>n.current.onPreviewInOppositePanel())),e.push(B.registerCommand(`dotdir.openCurrentFolderInOppositePanelCurrentTab`,()=>n.current.onOpenCurrentFolderInOppositeCurrentTab())),e.push(B.registerCommand(`dotdir.openCurrentFolderInOppositePanelNewTab`,()=>n.current.onOpenCurrentFolderInOppositeNewTab())),e.push(B.registerCommand(`dotdir.openSelectedFolderInOppositePanelCurrentTab`,()=>n.current.onOpenSelectedFolderInOppositeCurrentTab())),e.push(B.registerCommand(`dotdir.openSelectedFolderInOppositePanelNewTab`,()=>n.current.onOpenSelectedFolderInOppositeNewTab())),e.push(B.registerCommand(`dotdir.openCreateFile`,()=>{let{leftRef:e,rightRef:t,showDialog:r,onOpenCreateFileConfirm:a}=n.current,o=(g.current===`left`?e.current:t.current).currentPath,s=i.current.flatMap(e=>e.languages??[]),c=new Set;r({type:`openCreateFile`,currentPath:o,languages:s.filter(e=>c.has(e.id)?!1:(c.add(e.id),!0)).map(e=>({id:e.id,label:e.aliases?.[0]??e.id})),onConfirm:a,onCancel:()=>{}})})),e.push(B.registerCommand(`dotdir.makeFolder`,()=>{let{leftRef:e,rightRef:r,showDialog:i}=n.current,a=g.current===`left`?e.current:r.current,o=a.currentPath;i({type:`makeFolder`,currentPath:o,onConfirm:async e=>{let n=e=>o?`${o.replace(/\/?$/,``)}/${e}`:e;if(e.mode===`single`){let r=n(e.name);t.fs.createDir&&await t.fs.createDir(r),a.navigateTo(r);return}for(let r of e.names){let e=n(r);t.fs.createDir&&await t.fs.createDir(e)}a.navigateTo(o)},onCancel:()=>{}})})),e.push(B.registerCommand(`dotdir.exit`,async()=>{ha()?await Na().close():window.close()})),e.push(B.registerCommand(`terminal.execute`,async e=>{let t=G(e),r=/^[a-zA-Z0-9._+-]+$/.test(t)?`./${t}`:`./${JSON.stringify(t)}`;await n.current.onExecuteInTerminal(`${r}\r`)})),e.push(B.registerCommand(`dotdir.viewFile`,(e,t,r)=>{n.current.onViewFile(e,t,r)})),e.push(B.registerCommand(`dotdir.editFile`,(e,t,r,i)=>{let a=n.current.editorFileSizeLimit;a>0&&r>a||n.current.onEditFile(e,t,r,i)})),e.push(B.registerCommand(`list.cursorUp`,()=>Y()?.cursorUp())),e.push(B.registerCommand(`list.cursorDown`,()=>Y()?.cursorDown())),e.push(B.registerCommand(`list.cursorLeft`,()=>Y()?.cursorLeft())),e.push(B.registerCommand(`list.cursorRight`,()=>Y()?.cursorRight())),e.push(B.registerCommand(`list.cursorHome`,()=>Y()?.cursorHome())),e.push(B.registerCommand(`list.cursorEnd`,()=>Y()?.cursorEnd())),e.push(B.registerCommand(`list.cursorPageUp`,()=>Y()?.cursorPageUp())),e.push(B.registerCommand(`list.cursorPageDown`,()=>Y()?.cursorPageDown())),e.push(B.registerCommand(`list.selectUp`,()=>Y()?.selectUp())),e.push(B.registerCommand(`list.selectDown`,()=>Y()?.selectDown())),e.push(B.registerCommand(`list.selectLeft`,()=>Y()?.selectLeft())),e.push(B.registerCommand(`list.selectRight`,()=>Y()?.selectRight())),e.push(B.registerCommand(`list.selectHome`,()=>Y()?.selectHome())),e.push(B.registerCommand(`list.selectEnd`,()=>Y()?.selectEnd())),e.push(B.registerCommand(`list.selectPageUp`,()=>Y()?.selectPageUp())),e.push(B.registerCommand(`list.selectPageDown`,()=>Y()?.selectPageDown())),e.push(B.registerCommand(`list.execute`,()=>Y()?.execute())),e.push(B.registerCommand(`list.open`,()=>Y()?.open())),e.push(B.registerCommand(`list.viewFile`,()=>Y()?.viewFile())),e.push(B.registerCommand(`list.editFile`,()=>Y()?.editFile())),e.push(B.registerCommand(`list.moveToTrash`,()=>Y()?.moveToTrash())),e.push(B.registerCommand(`list.permanentDelete`,()=>Y()?.permanentDelete())),e.push(B.registerCommand(`list.copy`,()=>Y()?.copy())),e.push(B.registerCommand(`list.move`,()=>Y()?.move())),e.push(B.registerCommand(`list.rename`,()=>Y()?.rename())),e.push(B.registerCommand(`list.pasteFilename`,()=>Y()?.pasteFilename())),e.push(B.registerCommand(`list.pastePath`,()=>Y()?.pastePath())),e.push(...Xe(B)),e.push(...Qe(B)),()=>{for(let t of e)t()}},[s,l,u,f,p,m,h,a])}var Ha=function(e){return e[e.None=0]=`None`,e[e.Expanded=1]=`Expanded`,e[e.Selected=2]=`Selected`,e[e.Hovered=4]=`Hovered`,e[e.Active=8]=`Active`,e[e.DragOver=16]=`DragOver`,e[e.Focused=32]=`Focused`,e}({});Ha.Expanded,Ha.Selected,Ha.Hovered,Ha.Active,Ha.DragOver,Ha.Focused;function Ua(e){let t=e.name.indexOf(`.`),n=e.name.lastIndexOf(`.`),r=``,i=``;return e.type===`file`&&t>0&&(i=e.name.substring(t+1),r=n>0?e.name.substring(n+1):i),{type:e.type,name:e.name,baseExt:r,fullExt:i,lang:e.lang??``,path:e.path,parent:e.parent,stateFlags:e.stateFlags??Ha.None,meta:e.meta??{}}}function Wa(e){if(U(e)===e)return;let t=[],n=e;for(;;){t.push(n);let e=U(n);if(e===n)break;n=e}t.reverse();let r;for(let e of t)r=Ua({name:G(e)||e,type:`folder`,path:e,parent:r});return r}function Ga(e){return e.kind===`directory`||e.kind===`symlink`&&(e.mode&61440)==16384}function Ka(e,t,n){let r=Ga(e),i={size:e.size,mtimeMs:e.mtimeMs,mode:e.mode,nlink:e.nlink,kind:e.kind,hidden:e.hidden,linkTarget:e.linkTarget};return Ua({name:e.name,type:r?`folder`:`file`,lang:r?``:ue.detectLanguage(e.name),meta:{size:i.size,mtimeMs:i.mtimeMs,executable:!r&&vt(i.mode??0,e.name),hidden:i.hidden??e.name.startsWith(`.`),nlink:i.nlink??1,entryKind:i.kind??(r?`directory`:`file`),linkTarget:i.linkTarget},path:W(t,e.name),parent:n})}async function qa(e,t){let n=t;for(;;){if(await e.fs.exists(n))return n;let t=U(n);if(t===n||mt(n))return n;n=t}}function Ja(e){let t=[],n=e;for(;;){t.push(n);let e=U(n);if(e===n)break;n=e}return t}var Ya={currentPath:``,parentNode:void 0,entries:[],requestedCursor:void 0};function Xa(e){let t=z(),n=(0,d.useAtomValue)(Ae),[r,i]=(0,c.useState)(Ya),[a,o]=(0,c.useState)(!1),s=(0,c.useRef)(null),l=(0,c.useRef)(null),u=(0,c.useMemo)(()=>Wr(n),[n]),f=(0,c.useRef)(u);f.current=u;let p=(0,c.useRef)(null),m=(0,c.useRef)(null),h=(0,c.useRef)(``),g=(0,c.useRef)(e);g.current=e,(0,c.useEffect)(()=>{h.current&&v(h.current,!0)},[u]);let _=(0,c.useCallback)(e=>{let t=p.current,n=Ja(e),r=[];for(let e of n)r.push(e),r.push(W(e,`.dotdir`));t.sync(r)},[]),v=(0,c.useCallback)(async(e,n=!1,r)=>{if(!n&&h.current===e&&l.current)return;l.current?.abort();let a=new AbortController;l.current=a,s.current=setTimeout(()=>o(!0),300);try{let n=(async()=>{if(h.current=e,Mt(e)){let{containerFile:n,innerPath:o}=Nt(e),s=Kt.resolve(G(n));if(!s)throw Error(`No fsProvider registered for "${G(n)}"`);let c;if(s.contribution.runtime===`backend`&&t.fsProvider){let e=W(s.extensionDirPath,s.contribution.entry),r=await t.fsProvider.listEntries(e,n,o);if(a.signal.aborted)return;c=r.map(e=>({name:e.name,type:e.kind,size:e.size,mtimeMs:e.mtimeMs}))}else{let e=await Dt(t,s.extensionDirPath,s.contribution.entry);if(a.signal.aborted||(c=await e.listEntries(n,o),a.signal.aborted))return}let l=Wa(e);i({currentPath:e,parentNode:l,entries:c.map(e=>{let t=(o===`/`?``:o)+`/`+e.name;return Ua({name:e.name,type:e.type===`directory`?`folder`:`file`,lang:e.type===`file`?ue.detectLanguage(e.name):``,meta:{size:e.size??0,mtimeMs:e.mtimeMs??0,executable:!1,hidden:e.name.startsWith(`.`),nlink:1,entryKind:e.type===`directory`?`directory`:`file`},path:Pt(n,t),parent:l})}),requestedCursor:r})}else{if(await Gr(t,f.current,e),a.signal.aborted)return;let n=Wa(e),o=await t.fs.entries(e);if(a.signal.aborted)return;let s=o.map(t=>Ka(t,e,n));if(a.signal.aborted)return;i({currentPath:e,parentNode:n,entries:s,requestedCursor:r}),_(e)}})();n.catch(()=>{}),await Promise.race([n,new Promise(e=>{a.signal.addEventListener(`abort`,()=>e(),{once:!0})})])}catch(e){if(!a.signal.aborted){let t=e&&typeof e==`object`&&`message`in e?e.message:String(e);g.current(`Failed to read directory: ${t}`)}}finally{l.current===a&&(l.current=null),clearTimeout(s.current),s.current=null,o(!1)}},[_]),y=(0,c.useCallback)(()=>{l.current?.abort(),l.current=null,s.current&&=(clearTimeout(s.current),null),o(!1)},[]);(0,c.useEffect)(()=>(p.current=new wt(t,e=>{let n=h.current;if(!n)return;let r=!1,i=!1,a=!1;for(let t of e){let e=t.root.path,o=t.relativePathComponents[0]??null,s=t.type;e===n?s===`errored`?a=!0:r=!0:e.endsWith(`/.dotdir`)?o===`fs.css`&&(Ur(U(e)),i=!0):(n.startsWith(e+`/`)||n===e)&&(o===`.dotdir`?(Ur(e),i=!0):o&&o===n.slice(e.length+1).split(`/`)[0]&&s===`disappeared`&&(a=!0))}if(a){m.current&&=(clearTimeout(m.current),null),qa(t,n).then(e=>{b.current(e)});return}(r||i)&&(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{m.current=null,b.current(h.current)},100))}),()=>{p.current?.disconnect(),p.current=null,m.current&&=(clearTimeout(m.current),null)}),[]);let b=(0,c.useRef)(v);b.current=v;let x=(0,c.useCallback)(()=>{b.current(h.current,!0)},[]);return{...r,navigateTo:v,navigating:a,cancelNavigation:y,refresh:x,resolver:f.current}}function Za({activePanelCwd:e,onNavigatePanel:t}){let n=z(),r=(0,d.useAtomValue)(Oe),i=(0,d.useAtomValue)(ke),a=(0,d.useAtomValue)(je),o=(0,d.useSetAtom)(je),s=(0,d.useSetAtom)(Me),l=(0,d.useAtomValue)(Ne),u=(0,d.useSetAtom)(Ne),f=(0,d.useSetAtom)(ze),{activeSession:p,activeSessionId:m,setProfiles:h,setCurrentCwd:g,restartAll:_,dispose:y,writeToActiveSession:b,executeCommandInCwd:x}=Ki(),S=(0,c.useRef)(e);S.current=e;let C=(0,c.useRef)(t);C.current=t;let w=(0,c.useRef)(!1),T=(0,c.useRef)(null),E=(0,c.useCallback)(e=>{T.current&&=(clearTimeout(T.current),null),o(e)},[o]);(0,c.useEffect)(()=>{if(!p){E(!0),B.setContext(`terminalCommandRunning`,!1);return}let e=p.session.getCapabilities().commandRunning;return E(!e),B.setContext(`terminalCommandRunning`,e),p.session.subscribe(e=>{if(e.type===`command-start`)E(!1),B.setContext(`terminalCommandRunning`,!0);else if(e.type===`command-finish`)E(!0),B.setContext(`terminalCommandRunning`,!1);else if(e.type===`capabilities`){let t=e.capabilities.commandRunning;E(!t),B.setContext(`terminalCommandRunning`,t)}})},[m,E]),(0,c.useEffect)(()=>{i&&r.length>0&&h(r,e)},[i,r]),(0,c.useEffect)(()=>()=>{y()},[y]),(0,c.useEffect)(()=>{g(e)},[e,g]),(0,c.useEffect)(()=>{if(n.onReconnect)return n.onReconnect(()=>_())},[_]),(0,c.useEffect)(()=>{if(p?.cwd&&p.cwdUserInitiated){let e=Q(H(p.cwd));if(e===Q(S.current))return;C.current(e),u(null)}},[p,u]);let D=l??e;(0,c.useEffect)(()=>{f(D)},[D,f]),(0,c.useEffect)(()=>{l&&Q(e)===l&&u(null)},[e,l,u]),(0,c.useEffect)(()=>{if(!a)return;let e=requestAnimationFrame(()=>{v.set(`panel`)});return()=>cancelAnimationFrame(e)},[a]);let O=(0,c.useCallback)(e=>{u(Q(e))},[u]);return{activeCwd:D,writeToTerminal:(0,c.useCallback)(e=>b(e),[b]),runCommand:(0,c.useCallback)(async(e,t)=>{w.current=!0,o(!1),v.set(`terminal`),s(e=>e+1),await x(e,t)},[o,s,x]),rememberExpectedTerminalCwd:O}}var Qa={},$a=null,eo=null;async function to(e){return $a||=W(await e.utils.getHomePath(),`.dotdir`,`ui-state.json`),$a}async function no(e){try{let t=await K(e,await to(e)),n=JSON.parse(t);typeof n==`object`&&n&&!Array.isArray(n)&&(Qa=n)}catch{}return Qa}function ro(e,t){Qa={...Qa,...t},eo&&clearTimeout(eo),eo=setTimeout(()=>{eo=null,ao(e,Qa)},500)}function io(e){eo&&=(clearTimeout(eo),null),ao(e,Qa)}async function ao(e,t){try{let n=await to(e);await e.fs.writeFile(n,JSON.stringify(t,null,2))}catch(e){console.error(`[uiState] Failed to save:`,e)}}function oo({ready:e,setLeftTabs:t,setRightTabs:n,setLeftActiveTabId:r,setRightActiveTabId:i,leftTabSelectionRef:a,rightTabSelectionRef:o,prevLeftActiveTabIdRef:s,prevRightActiveTabIdRef:l,onAfterRestore:u}){let d=z(),[f,p]=(0,c.useState)(!1),m=(0,c.useRef)({}),[h,g]=(0,c.useState)(!1),[_,v]=(0,c.useState)(void 0),[y,b]=(0,c.useState)(void 0),[x,S]=(0,c.useState)(void 0);return(0,c.useEffect)(()=>{no(d).then(e=>{m.current=e,g(!0)})},[]),(0,c.useEffect)(()=>{if(!e||!h)return;let c=m.current,d=e=>e?.tabs?.length?e.tabs.map(e=>e.type===`filelist`?_i(e.path):{id:gi(),type:`preview`,path:e.path,name:e.name,size:e.size,isTemp:!1}):e?.currentPath?[_i(e.currentPath)]:null,f=(e,t,n)=>{if(!(!t?.length||!n?.tabs?.length))for(let r=0;r<t.length&&r<n.tabs.length;r++){let i=t[r],a=n.tabs[r];i.type===`filelist`&&a.type===`filelist`&&(a.selectedName!=null||a.topmostName!=null)&&(e.current[i.id]={selectedName:a.selectedName,topmostName:a.topmostName})}},g=d(c.leftPanel),_=d(c.rightPanel);g&&f(a,g,c.leftPanel),_&&f(o,_,c.rightPanel);let y=g?Math.min(c.leftPanel?.activeTabIndex??0,g.length-1):0,x=_?Math.min(c.rightPanel?.activeTabIndex??0,_.length-1):0,C=g?.[y]?.id,w=_?.[x]?.id;C&&(s.current=C),w&&(l.current=w),g&&t(g),_&&n(_),C&&r(C),w&&i(w),c.leftPanel&&v(c.leftPanel),c.rightPanel&&b(c.rightPanel),c.activePanel&&S(c.activePanel),p(!0),u()},[e,h]),{settingsLoaded:f,initialLeftPanel:_,initialRightPanel:y,initialActivePanel:x,setInitialLeftPanel:v,setInitialRightPanel:b,setInitialActivePanel:S}}function so({activePanel:e,settingsLoaded:t,left:n,right:r,leftTabsRef:i,rightTabsRef:a,leftActiveTabIdRef:o,rightActiveTabIdRef:s,leftTabSelectionRef:l,rightTabSelectionRef:u,leftSelectedNameRef:d,rightSelectedNameRef:f,setLeftTabs:p,setRightTabs:m,setLeftActiveTabId:h,setRightActiveTabId:g}){let _=z(),v=(0,c.useRef)(null),y=(0,c.useRef)({}),b=(0,c.useCallback)((e,t,n)=>{let r=e===`left`?l:u;return{tabs:t.map(e=>{if(e.type===`filelist`){let t=r.current[e.id],n={type:`filelist`,path:e.path};return t?.selectedName!=null&&(n.selectedName=t.selectedName),t?.topmostName!=null&&(n.topmostName=t.topmostName),n}return{type:`preview`,path:e.path,name:e.name,size:e.size}}),activeTabIndex:Math.max(0,t.findIndex(e=>e.id===n))}},[l,u]),x=(0,c.useCallback)(()=>{v.current&&=(clearTimeout(v.current),null);let e=y.current;for(let t of Zi){let c=Xi[t];e[c]||(e[c]={currentPath:t===`left`?n.currentPath:r.currentPath});let l=t===`left`?i:a,u=t===`left`?o:s;Object.assign(e[c],b(t,l.current,u.current))}ro(_,e),io(_),y.current={}},[b,n.currentPath,r.currentPath,i,a,o,s]),S=(0,c.useCallback)(()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{v.current=null,ro(_,y.current),y.current={}},1e4)},[_]);(0,c.useEffect)(()=>{let e=()=>{x()};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[x]);let C=(0,c.useCallback)((e,t,c)=>{let _=e===`left`?i:a,v=e===`left`?o:s,x=e===`left`?l:u,C=e===`left`?d:f,w=e===`left`?n:r,T=_.current.find(e=>e.id===v.current);T?.type===`filelist`&&(x.current[T.id]={selectedName:t,topmostName:c}),C.current=t,y.current[Xi[e]]={currentPath:w.currentPath,...b(e,_.current,v.current)},S();let E=Yi[e],D=E===`left`?i:a,O=E===`right`?m:p,k=E===`right`?g:h,A=D.current.find(t=>t.type===`preview`&&t.isTemp&&t.sourcePanel===e);if(!A||!t)return;let j=w.entries.find(e=>e.name===t);if(!j||j.type!==`file`)return;let ee=j.path,M=j.name,N=Number(j.meta.size);A.type===`preview`&&A.path===ee&&A.name===M||(O(t=>t.map(t=>t.id===A.id?{id:t.id,type:`preview`,path:ee,name:M,size:N,isTemp:!0,sourcePanel:e}:t)),k(A.id))},[n,r,b,S,i,a,o,s,l,u,d,f,m,p,g,h]);return(0,c.useEffect)(()=>{t&&ro(_,{activePanel:e})},[e,t]),{handlePanelStateChange:C}}function co(e){return Array.isArray(e)?e.filter(e=>{if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.command==`string`&&typeof t.key==`string`}).map(e=>({command:e.command,key:e.key,mac:typeof e.mac==`string`?e.mac:void 0,when:typeof e.when==`string`?e.when:void 0})):(console.error(`[userKeybindings] keybindings.json must be an array`),null)}async function lo(e){await Hn(e,{name:`userKeybindings`,getPath:async()=>W(await e.utils.getHomePath(),`.dotdir`,`keybindings.json`),validate:co,defaultValue:[],onLoad:e=>{B.setLayerKeybindings(`user`,e),console.log(`[userKeybindings] Applied ${e.length} keybindings`)}})}var uo=new Set([`png`,`jpg`,`jpeg`,`gif`,`bmp`,`webp`,`ico`,`svg`,`avif`,`tiff`,`tif`]),fo=new Set([`mp4`,`webm`,`ogv`,`ogg`,`mov`,`m4v`]);function po(e){let t=e.lastIndexOf(`.`);return t<0?``:e.slice(t+1).toLowerCase()}function mo(e){return uo.has(po(e))}function ho(e){return fo.has(po(e))}function go(e){return mo(e)||ho(e)}var _o=`_app_4bfa7_56`,vo=`_loading_4bfa7_69`,yo={"dotdir-root":`_dotdir-root_4bfa7_1`,app:_o,"status-bar":`_status-bar_4bfa7_64`,loading:vo};function bo({widget:e}){let t=z(),{settings:n,ready:r,updateSettings:i}=er(),a=(0,c.useRef)(n);a.current=n;let o=(0,d.useSetAtom)(Ae),{dialog:s,showDialog:u}=ve(),[f,p]=(0,d.useAtom)(Fe),m=(0,c.useCallback)(e=>{u({type:`message`,title:`Error`,message:e,variant:`error`})},[u]),h=Xa(m),g=Xa(m),[_,v]=(0,d.useAtom)(Pe),y=(0,d.useAtomValue)(je),[b,x]=(0,d.useAtom)(Le),[S,w]=(0,d.useAtom)(Re),[T,E]=(0,c.useState)(null),[D,O]=(0,c.useState)(null),k=(0,d.useAtomValue)(Ce),A=(0,d.useSetAtom)(we),j=(0,d.useSetAtom)(Te),[ee,M]=(0,c.useState)(0),[N,P]=(0,d.useAtom)(xi),[te,F]=(0,d.useAtom)(Si),[I,ne]=(0,d.useAtom)(Ci),[re,ie]=(0,d.useAtom)(wi),ae=(0,c.useRef)(void 0),R=(0,c.useRef)(void 0),oe=(0,c.useRef)({}),se=(0,c.useRef)({}),ce=(0,c.useRef)(I),le=(0,c.useRef)(re),ue=(0,d.useAtomValue)(Ee),de=(0,d.useAtomValue)(De),fe=(0,c.useRef)(N);fe.current=N;let pe=(0,c.useRef)(te);pe.current=te;let me=(0,c.useRef)(I);me.current=I;let he=(0,c.useRef)(re);he.current=re;let[ge,ye]=(0,c.useState)(0),be=st(),xe=(0,d.useSetAtom)(Be),Se=(0,d.useAtomValue)(Ve),Oe=(0,c.useRef)(()=>{});Se&&(Oe.current=Se),(0,c.useEffect)(()=>{r&&(n.iconTheme&&A(n.iconTheme),n.colorTheme!==void 0&&j(n.colorTheme||void 0),n.editorFileSizeLimit!==void 0&&M(n.editorFileSizeLimit),n.showHidden!==void 0&&p(n.showHidden))},[n,r]);let{settingsLoaded:ke,initialLeftPanel:Me,initialRightPanel:Ne,initialActivePanel:Ie,setInitialLeftPanel:ze,setInitialRightPanel:He,setInitialActivePanel:Ue}=oo({ready:r,setLeftTabs:P,setRightTabs:F,setLeftActiveTabId:ne,setRightActiveTabId:ie,leftTabSelectionRef:oe,rightTabSelectionRef:se,prevLeftActiveTabIdRef:ce,prevRightActiveTabIdRef:le,onAfterRestore:(0,c.useCallback)(()=>{lo(t)},[t])}),We=(0,c.useRef)(_);We.current=_;let Ke=(0,c.useRef)(h.navigateTo);Ke.current=_===`left`?h.navigateTo:g.navigateTo;let qe=(0,c.useRef)(h);qe.current=h;let Je=(0,c.useRef)(g);Je.current=g;let Ye=(0,c.useRef)(``),Xe=(0,c.useCallback)(async e=>{let n=oa(e);if(!n){Et.runCommand(e,Ye.current);return}if(n.kind===`error`){u({type:`message`,title:`cd`,message:n.message,variant:`error`});return}let r=We.current===`left`?qe.current:Je.current,o=r.currentPath;if(n.kind===`setAlias`){i({pathAliases:{...a.current.pathAliases,[n.alias]:Q(o)}});return}if(n.kind===`goAlias`){let e=a.current.pathAliases?.[n.alias];if(!e){u({type:`message`,title:`cd`,message:`Unknown alias: ${n.alias}`,variant:`error`});return}let i=Q(ht(H(e)));if(!await ca(t,i)){u({type:`message`,title:`cd`,message:`Folder not found: ${i}`,variant:`error`});return}await r.navigateTo(i);return}if(n.kind===`chdir`){let e=await sa(t,n.pathArg,o);if(!await ca(t,e)){u({type:`message`,title:`cd`,message:`Path not found: ${e}`,variant:`error`});return}await r.navigateTo(e)}},[u]);(0,c.useEffect)(()=>{xe(()=>Xe)},[Xe,xe]);let{handleCopy:Ze,handleMove:Qe,handleMoveToTrash:$e,handlePermanentDelete:et,handleRename:tt}=aa(We,qe,Je,ye);(0,c.useEffect)(()=>{Pr({moveToTrash:$e,permanentDelete:et,copy:Ze,move:Qe,rename:tt,pasteToCommandLine:e=>Oe.current(e)})},[$e,et,Ze,Qe,tt]),(0,c.useEffect)(()=>{B.setContext(`leftPanelActive`,_===`left`),B.setContext(`rightPanelActive`,_===`right`)},[_]),(0,c.useEffect)(()=>{B.setContext(`dialogOpen`,s!==null)},[s]);let nt=(0,c.useCallback)((e,t,n)=>{if(Kt.resolve(G(e))){Ke.current(e+`\0`);return}x({path:e,name:t,size:n,panel:We.current})},[]),rt=(0,c.useCallback)((e,t,n,r)=>{w({path:e,name:t,size:n,langId:r})},[]),at=(0,c.useCallback)(async(e,n,r)=>{let i=await t.fs.exists(e);i||await t.fs.writeFile(e,``),w({path:e,name:n,size:i?(await t.fs.stat(e)).size:0,langId:r})},[]),ct=b?b.panel===`left`?h.entries:g.entries:[],lt=(0,c.useCallback)((e,t)=>t.some(t=>{if(t.startsWith(`*.`)){let n=t.slice(1).toLowerCase();return e.toLowerCase().endsWith(n)}return e.toLowerCase()===t.toLowerCase()}),[]),ut=(0,c.useCallback)(e=>b?(f?ct:ct.filter(e=>!e.meta.hidden)).filter(t=>t.type===`file`&<(t.name,e)).map(e=>({path:e.path,name:e.name,size:Number(e.meta.size)})).sort((e,t)=>e.name.localeCompare(t.name)):[],[b,ct,f,lt]),dt=(0,c.useCallback)(async(e,t)=>{let{patterns:n}=t??{};if(!n||!b)return;let r=ut(n),i=r.findIndex(e=>e.path===b.path);if(e===`navigatePrev`){if(i>0){let e=r[i-1];x(t=>t?{...e,panel:t.panel}:null)}return}if(e===`navigateNext`){if(i>=0&&i<r.length-1){let e=r[i+1];x(t=>t?{...e,panel:t.panel}:null)}return}if(e===`getFileIndex`)return{index:i,total:r.length}},[b,ut]),ft=b?Wt.resolve(b.name):null,pt=S?Gt.resolve(S.name):null;(0,c.useEffect)(()=>{ft&&E(e=>e?.dirPath===ft.extensionDirPath&&e?.entry===ft.contribution.entry?e:{dirPath:ft.extensionDirPath,entry:ft.contribution.entry})},[ft?.extensionDirPath,ft?.contribution.entry]),(0,c.useEffect)(()=>{pt&&O(e=>e?.dirPath===pt.extensionDirPath&&e?.entry===pt.contribution.entry?e:{dirPath:pt.extensionDirPath,entry:pt.contribution.entry})},[pt?.extensionDirPath,pt?.contribution.entry]);let mt=b&&go(b.name)?b.name:void 0,U=h.requestedCursor??(b?.panel===`left`?mt:void 0),W=g.requestedCursor??(b?.panel===`right`?mt:void 0),{handlePanelStateChange:gt}=so({activePanel:_,settingsLoaded:ke,left:h,right:g,leftTabsRef:fe,rightTabsRef:pe,leftActiveTabIdRef:me,rightActiveTabIdRef:he,leftTabSelectionRef:oe,rightTabSelectionRef:se,leftSelectedNameRef:ae,rightSelectedNameRef:R,setLeftTabs:P,setRightTabs:F,setLeftActiveTabId:ne,setRightActiveTabId:ie}),_t=(0,c.useCallback)(()=>{let e=We.current,t=Yi[e],n=e===`left`?h.currentPath:g.currentPath,r=(t===`left`?me:he).current,i=t===`left`?P:F,a=t===`left`?h:g;i(e=>e.map(e=>e.id===r&&e.type===`filelist`?{...e,path:n}:e)),a.navigateTo(n),v(t)},[h.currentPath,g.currentPath,h,g]),vt=(0,c.useCallback)(()=>{let e=We.current,t=Yi[e],n=e===`left`?h.currentPath:g.currentPath,r=_i(n),i=t===`left`?P:F,a=t===`left`?ne:ie,o=t===`left`?h:g;i(e=>[...e,r]),a(r.id),o.navigateTo(n),v(t)},[h.currentPath,g.currentPath,h,g]),yt=(0,c.useCallback)(()=>{let e=We.current,t=e===`left`?h.entries:g.entries,n=e===`left`?ae.current:R.current,r=n?t.find(e=>e.name===n):void 0;if(!r||r.type!==`folder`)return;let i=r.path,a=Yi[e],o=(a===`left`?me:he).current,s=a===`left`?P:F,c=a===`left`?h:g;s(e=>e.map(e=>e.id===o&&e.type===`filelist`?{...e,path:i}:e)),c.navigateTo(i),v(a)},[h.entries,g.entries,h,g]),bt=(0,c.useCallback)(()=>{let e=We.current,t=e===`left`?h.entries:g.entries,n=e===`left`?ae.current:R.current,r=n?t.find(e=>e.name===n):void 0;if(!r||r.type!==`folder`)return;let i=r.path,a=Yi[e],o=_i(i),s=a===`left`?P:F,c=a===`left`?ne:ie,l=a===`left`?h:g;s(e=>[...e,o]),c(o.id),l.navigateTo(i),v(a)},[h.entries,g.entries,h,g]),xt=(0,c.useCallback)(()=>{let e=We.current,t=e===`left`?h.entries:g.entries,n=e===`left`?ae.current:R.current,r=n?t.find(e=>e.name===n):void 0;if(!r||r.type!==`file`)return;let i=r.path,a=r.name,o=Number(r.meta.size),s=e,c=Yi[e],l=(c===`left`?fe:pe).current,u=c===`left`?P:F,d=c===`left`?ne:ie,f=l.find(e=>e.type===`preview`&&e.isTemp);if(f&&f.type===`preview`)u(e=>e.map(e=>e.id===f.id?{...e,path:i,name:a,size:o,sourcePanel:s}:e)),d(f.id);else{let e=vi(i,a,o,s);u(t=>[...t,e]),d(e.id)}v(c)},[h.entries,g.entries]);(0,c.useEffect)(()=>(t.theme.get().then(e=>o(e)),t.theme.onChange(e=>o(e))),[]);let St=(0,c.useRef)(h.currentPath);St.current=h.currentPath;let K=(0,c.useRef)(g.currentPath);K.current=g.currentPath,(0,c.useEffect)(()=>{if(ce.current===I)return;ce.current=I;let e=fe.current.find(e=>e.id===I);e?.type===`filelist`&&e.path!=null&&h.navigateTo(e.path)},[I]),(0,c.useEffect)(()=>{if(le.current===re)return;le.current=re;let e=pe.current.find(e=>e.id===re);e?.type===`filelist`&&e.path!=null&&g.navigateTo(e.path)},[re]);let Ct=(0,c.useRef)(h.currentPath),wt=(0,c.useRef)(g.currentPath);(0,c.useEffect)(()=>{Ct.current!==h.currentPath&&(Ct.current=h.currentPath,P(e=>{let t=e.findIndex(e=>e.id===I);if(t<0)return e;let n=e[t];if(n?.type!==`filelist`||n.path===h.currentPath)return e;let r=[...e];return r[t]={...n,path:h.currentPath},r}))},[h.currentPath,I]),(0,c.useEffect)(()=>{wt.current!==g.currentPath&&(wt.current=g.currentPath,F(e=>{let t=e.findIndex(e=>e.id===re);if(t<0)return e;let n=e[t];if(n?.type!==`filelist`||n.path===g.currentPath)return e;let r=[...e];return r[t]={...n,path:g.currentPath},r}))},[g.currentPath,re]),(0,c.useEffect)(()=>{if(!ke)return;let e=async(e,n,r)=>{let i=n?.currentPath??r;i&&(await t.fs.exists(i)||(i=await qa(t,i))),i||=await t.utils.getHomePath(),await e.navigateTo(i)};e(h,Me),e(g,Ne),Ie&&v(Ie),setTimeout(()=>{ze(void 0),He(void 0),Ue(void 0)},500)},[ke]),ra({settingsLoaded:ke,onRefreshPanels:()=>{qe.current.refresh(),Je.current.refresh()}});let Tt=(0,c.useCallback)(e=>{(We.current===`left`?qe.current:Je.current).navigateTo(e)},[]),Et=Za({activePanelCwd:_===`left`?h.currentPath:g.currentPath,onNavigatePanel:Tt});return Ye.current=Et.activeCwd,Va({leftRef:qe,rightRef:Je,onPreviewInOppositePanel:xt,onOpenCurrentFolderInOppositeCurrentTab:_t,onOpenCurrentFolderInOppositeNewTab:vt,onOpenSelectedFolderInOppositeCurrentTab:yt,onOpenSelectedFolderInOppositeNewTab:bt,onOpenCreateFileConfirm:at,showDialog:u,onViewFile:nt,onEditFile:rt,onExecuteInTerminal:e=>Et.writeToTerminal(e),editorFileSizeLimit:ee}),(0,c.useEffect)(()=>{if(t.onReconnect)return t.onReconnect(()=>{qe.current.navigateTo(St.current),Je.current.navigateTo(K.current)})},[]),!h.currentPath||!g.currentPath||!de?(0,l.jsx)(`div`,{className:yo.loading,children:`Loading...`}):(0,l.jsxs)(`div`,{className:yo.app,children:[(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:V[`terminal-and-panels`],children:[(0,l.jsx)(`div`,{className:V[`terminal-background`],children:(0,l.jsx)(Ji,{})}),(0,l.jsxs)(`div`,{className:C(Z,`panels-overlay`,!y&&`hidden`),children:[(0,l.jsx)(Mi,{side:`left`,panel:h,onRememberExpectedTerminalCwd:Et.rememberExpectedTerminalCwd,selectionKey:ge,requestedActiveName:U,initialPanelState:Me,onStateChange:(e,t)=>gt(`left`,e,t)}),(0,l.jsx)(Mi,{side:`right`,panel:g,onRememberExpectedTerminalCwd:Et.rememberExpectedTerminalCwd,selectionKey:ge,requestedActiveName:W,initialPanelState:Ne,onStateChange:(e,t)=>gt(`right`,e,t)})]})]}),(0,l.jsx)(it,{}),(0,l.jsx)(qi,{})]}),(0,l.jsxs)(`div`,{className:yo[`status-bar`],children:[(0,l.jsx)(Ge,{}),e]}),b&&!ft&&(0,l.jsx)(L,{title:`No viewer`,message:`No viewer extension found for this file type. Install viewer extensions (e.g. Image Viewer, File Viewer) from the extensions panel.`,onClose:()=>x(null)}),T&&(0,l.jsx)(dn,{extensionDirPath:T.dirPath,entry:T.entry,filePath:b?.path??``,fileName:b?.name??``,fileSize:b?.size??0,visible:b!=null&&ft!=null,onClose:()=>x(null),onExecuteCommand:dt},`viewer:${T.dirPath}:${T.entry}`),S&&!pt&&(0,l.jsx)(L,{title:`No editor`,message:`No editor extension found for this file type. Install an editor extension (e.g. Monaco Editor) from the extensions panel.`,onClose:()=>w(null)}),D&&(()=>{let e=ue.flatMap(e=>e.languages??[]),t=ue.flatMap(e=>e.grammarRefs??[]).map(e=>({contribution:e.contribution,path:e.path}));return(0,l.jsx)(fn,{extensionDirPath:D.dirPath,entry:D.entry,filePath:S?.path??``,fileName:S?.name??``,langId:S?.langId??`plaintext`,visible:S!=null&&pt!=null,onClose:()=>w(null),languages:e,grammars:t},`editor:${D.dirPath}:${D.entry}`)})(),k&&(0,l.jsx)(or,{}),(0,l.jsx)(_e,{}),(0,l.jsx)(ot,{open:be.open,onOpenChange:be.setOpen})]})}function xo({bridge:e,widget:t}){let n=(0,c.useRef)(null);return(0,c.useEffect)(()=>{B.registerContributions(xe)},[]),(0,c.useEffect)(()=>{let e=n.current;if(e)return At(e),()=>{n.current===e&&At(null)}},[]),(0,l.jsx)(`div`,{ref:n,className:yo[`dotdir-root`],children:(0,l.jsx)(d.Provider,{children:(0,l.jsx)(be,{bridge:e,children:(0,l.jsx)(_,{children:(0,l.jsx)(me,{children:(0,l.jsx)(bo,{widget:t})})})})})})}exports.DotDir=xo,exports.basename=G,exports.dirname=U,exports.join=W,exports.normalizePath=H;
|
package/dist/dotdir.mjs
CHANGED
|
@@ -9034,10 +9034,10 @@ function Oo(e) {
|
|
|
9034
9034
|
}
|
|
9035
9035
|
//#endregion
|
|
9036
9036
|
//#region lib/styles/base.module.css
|
|
9037
|
-
var ko = "
|
|
9038
|
-
"dotdir-root": "_dotdir-
|
|
9037
|
+
var ko = "_app_4bfa7_56", Ao = "_loading_4bfa7_69", jo = {
|
|
9038
|
+
"dotdir-root": "_dotdir-root_4bfa7_1",
|
|
9039
9039
|
app: ko,
|
|
9040
|
-
"status-bar": "_status-
|
|
9040
|
+
"status-bar": "_status-bar_4bfa7_64",
|
|
9041
9041
|
loading: Ao
|
|
9042
9042
|
};
|
|
9043
9043
|
//#endregion
|