deckide 3.5.31 → 3.5.33
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/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Noto+Sans+JP:wght@400;500;600&display=swap";/**
|
|
2
|
+
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
|
+
* https://github.com/chjj/term.js
|
|
5
|
+
* @license MIT
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
|
15
|
+
* all copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
* THE SOFTWARE.
|
|
24
|
+
*
|
|
25
|
+
* Originally forked from (with the author's permission):
|
|
26
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
27
|
+
* http://bellard.org/jslinux/
|
|
28
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
29
|
+
* The original design remains. The terminal itself
|
|
30
|
+
* has been extended to include xterm CSI codes, among
|
|
31
|
+
* other features.
|
|
32
|
+
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.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,.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{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;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:"JetBrains Mono", monospace;--color-red-400:oklch(70.4% .191 22.216);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-semibold:600;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bg:#f3f3f3;--color-bg-soft:#e8e8e8;--color-panel:#fff;--color-sidebar:#f3f3f3;--color-activitybar:#2c2c2c;--color-activitybar-fg:#fff;--color-activitybar-inactive:#fff9;--color-border:#e5e5e5;--color-ink:#333;--color-ink-muted:#6e6e6e;--color-muted:#717171;--color-accent:#007acc;--color-statusbar:#007acc;--color-statusbar-fg:#fff;--color-list-hover:#0000000a;--color-list-active:#0078d41a;--color-focus:#0090f1;--color-title-bar:#ddd;--color-git-modified:#cca700;--color-git-untracked:#4ec9b0;--color-git-deleted:#f14c4c;--color-git-staged:#73c991;--color-git-renamed:#4fc1ff;--color-git-conflicted:#ff6b6b;--font-ui:"Noto Sans JP", sans-serif}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:before,:after{box-sizing:border-box}html,body,#root{height:100%;min-height:100%;margin:0}body{font-family:var(--font-ui);background:var(--color-bg);color:var(--color-ink);font-size:13px;line-height:1.4;overflow:hidden}button,input,select,textarea{color:inherit;font-family:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--color-focus);outline-offset:2px}@supports (height:100dvh){html,body,#root{height:100dvh;min-height:100dvh}}html,body,#root{height:var(--viewport-height,100dvh);min-height:var(--viewport-height,100dvh)}*{scrollbar-width:thin;scrollbar-color:#8080804d transparent}:root[data-theme=dark] *{scrollbar-color:#ffffff26 transparent}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#8080804d;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#80808080}:root[data-theme=dark] ::-webkit-scrollbar-thumb{background:#ffffff26}:root[data-theme=dark] ::-webkit-scrollbar-thumb:hover{background:#ffffff4d}::-webkit-scrollbar-corner{background:0 0}}@layer components{.activity-bar-item.active:before{content:"";background:var(--color-activitybar-fg);width:2px;position:absolute;top:0;bottom:0;left:0}.workspace-editor-grid .activity-bar-item.active:before{background:var(--color-accent)}.app>nav.activity-bar .activity-bar-item.active:before{width:auto;height:2px;inset:0 0 auto}.git-tab.active:after{content:"";background:var(--color-accent);height:2px;position:absolute;bottom:0;left:0;right:0}.editor-tab:hover .editor-tab-close,.editor-tab.active .editor-tab-close{opacity:1}.editor-tab.dirty .editor-tab-close{opacity:0}.editor-tab.dirty:hover .editor-tab-close{opacity:1}.editor-tab.dirty:hover .editor-tab-dirty{display:none}.deck-tab:hover .deck-tab-close,.deck-tab.active .deck-tab-close{opacity:.5}.deck-tab-close:hover{color:var(--color-ink);background:#ffffff1f;opacity:1!important}.git-file-row:hover .git-file-actions{opacity:1}.tree-row.is-open .tree-chevron-icon{transform:rotate(90deg)}.terminal-split-container.is-drop-target:after{content:"デッキをここにドロップして分割";border:2px dashed var(--color-accent);color:var(--color-ink-muted);pointer-events:none;z-index:2;background:#0078d414;border-radius:6px;justify-content:center;align-items:center;font-size:12px;font-weight:600;display:flex;position:absolute;top:10px;right:10px;bottom:10px;left:10px}.git-tree-modified .tree-label{color:var(--color-git-modified)}.git-tree-untracked .tree-label{color:var(--color-git-untracked)}.git-tree-deleted .tree-label{color:var(--color-git-deleted)}.git-tree-staged .tree-label{color:var(--color-git-staged)}.git-tree-renamed .tree-label{color:var(--color-git-renamed)}.git-tree-conflicted .tree-label{color:var(--color-git-conflicted)}.sidebar-content .panel{box-shadow:none;background:0 0;border:none;border-radius:0}.sidebar-content .panel-header{background:var(--color-sidebar);z-index:1;margin-bottom:0;padding:8px 12px;position:sticky;top:0}.sidebar-content .panel-body{padding:0}}@layer utilities{.fixed{position:fixed}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.z-50{z-index:50}.z-\[500\]{z-index:500}.z-\[999\]{z-index:999}.z-\[1000\]{z-index:1000}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing) * 0)}.my-1{margin-block:calc(var(--spacing) * 1)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-7{height:calc(var(--spacing) * 7)}.h-\[22px\]{height:22px}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-\[28px\]{min-height:28px}.min-h-\[40px\]{min-height:40px}.min-h-\[44px\]{min-height:44px}.min-h-\[50px\]{min-height:50px}.min-h-screen{min-height:100vh}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-7{width:calc(var(--spacing) * 7)}.w-\[22px\]{width:22px}.w-\[500px\]{width:500px}.w-full{width:100%}.max-w-\[500px\]{max-width:500px}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[44px\]{min-width:44px}.min-w-\[140px\]{min-width:140px}.min-w-\[160px\]{min-width:160px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-y{resize:vertical}.grid-rows-\[35px_minmax\(0\,1fr\)\]{grid-template-rows:35px minmax(0,1fr)}.flex-col{flex-direction:column}.place-items-center{place-items:center}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\!overflow-hidden{overflow:hidden!important}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[3px\]{border-radius:3px}.rounded-\[6px\]{border-radius:6px}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-accent{border-color:var(--color-accent)}.border-border{border-color:var(--color-border)}.bg-\[\#f14c4c\]{background-color:#f14c4c}.bg-accent{background-color:var(--color-accent)}.bg-accent\/20{background-color:#007acc33}@supports (color:color-mix(in lab,red,red)){.bg-accent\/20{background-color:color-mix(in oklab,var(--color-accent) 20%,transparent)}}.bg-bg{background-color:var(--color-bg)}.bg-bg-soft{background-color:var(--color-bg-soft)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-border{background-color:var(--color-border)}.bg-list-active{background-color:var(--color-list-active)}.bg-panel{background-color:var(--color-panel)}.bg-sidebar{background-color:var(--color-sidebar)}.bg-title-bar{background-color:var(--color-title-bar)}.bg-transparent{background-color:#0000}.fill-current{fill:currentColor}.p-0{padding:calc(var(--spacing) * 0)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.font-\[inherit\]{font-family:inherit}.font-mono{font-family:var(--font-mono)}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.75rem\]{font-size:.75rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.5px\]{--tw-tracking:.5px;letter-spacing:.5px}.break-words{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#f14c4c\]{color:#f14c4c}.text-accent{color:var(--color-accent)}.text-ink{color:var(--color-ink)}.text-ink-muted{color:var(--color-ink-muted)}.text-muted{color:var(--color-muted)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.shadow-\[0_4px_12px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:0 4px 12px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\:bg-\[rgba\(0\,0\,0\,0\.08\)\]:hover{background-color:#00000014}.hover\:bg-\[rgba\(241\,76\,76\,0\.1\)\]:hover{background-color:#f14c4c1a}.hover\:bg-list-hover:hover{background-color:var(--color-list-hover)}.hover\:bg-red-400\/10:hover{background-color:#ff65681a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-400\/10:hover{background-color:color-mix(in oklab,var(--color-red-400) 10%,transparent)}}.hover\:text-ink:hover{color:var(--color-ink)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-focus:focus{border-color:var(--color-focus)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-default:disabled{cursor:default}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (hover:hover){.dark\:hover\:bg-\[rgba\(255\,255\,255\,0\.08\)\]:where([data-theme=dark],[data-theme=dark] *):hover{background-color:#ffffff14}}.scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}.spin{animation:1s linear infinite spin}.slide-in{animation:.2s slideIn}}:root[data-theme=dark]{--color-bg:#1e1e1e;--color-bg-soft:#252526;--color-panel:#1e1e1e;--color-sidebar:#252526;--color-activitybar:#333;--color-activitybar-inactive:#fff6;--color-border:#3c3c3c;--color-ink:#ccc;--color-ink-muted:#9e9e9e;--color-muted:#8b8b8b;--color-accent:#0078d4;--color-list-hover:#ffffff0a;--color-list-active:#0078d433;--color-focus:#007fd4;--color-title-bar:#3c3c3c}@keyframes spin{to{transform:rotate(360deg)}}@keyframes slideIn{0%{transform:translate(-100%)}to{transform:translate(0)}}.app{grid-template-rows:minmax(0,1fr) 22px;grid-template-columns:48px minmax(0,1fr);height:100%;display:grid;overflow:hidden}.activity-bar{background:var(--color-activitybar);flex-direction:column;grid-row:1/3;width:48px;display:flex}.activity-bar-top{flex-direction:column;display:flex}.activity-bar-bottom{flex-direction:column;margin-top:auto;display:flex}.activity-bar-item{width:48px;height:48px;color:var(--color-activitybar-inactive);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;transition:color .15s;display:flex;position:relative}.activity-bar-item:hover,.activity-bar-item.active{color:var(--color-activitybar-fg)}.activity-bar-item svg{width:24px;height:24px}.activity-bar-badge{text-align:center;background:var(--color-accent);color:#fff;border-radius:8px;min-width:16px;height:16px;padding:0 4px;font-size:10px;font-weight:600;line-height:16px;position:absolute;top:8px;right:6px}.main{background:var(--color-bg);flex-direction:column;min-height:0;display:flex}.workspace-editor-overlay{background:var(--color-bg);z-index:30;grid-template-rows:35px minmax(0,1fr);display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.workspace-editor-header{background:var(--color-title-bar);border-bottom:1px solid var(--color-border);align-items:center;gap:12px;padding:0 12px;display:flex}.workspace-meta{color:var(--color-muted);font-size:12px;font-family:var(--font-mono);text-overflow:ellipsis;white-space:nowrap;text-align:center;flex:1;overflow:hidden}.workspace-editor-grid{grid-template-rows:minmax(0,1fr);grid-template-columns:48px 220px minmax(0,1fr);height:100%;min-height:0;display:grid}.sidebar-panel{background:var(--color-sidebar);border-right:1px solid var(--color-border);flex-direction:column;height:100%;min-height:0;display:flex}.sidebar-content{flex:1;min-height:0;overflow:auto}.workspace-editor-grid>.activity-bar{background:var(--color-activitybar);border-right:1px solid var(--color-border);grid-row:unset;flex-direction:column;width:48px;display:flex}.workspace-editor-grid .activity-bar-item{color:var(--color-activitybar-fg);opacity:.6;transition:opacity .15s}.workspace-editor-grid .activity-bar-item:hover,.workspace-editor-grid .activity-bar-item.active{opacity:1}.panel{background:var(--color-panel);border:1px solid var(--color-border);border-radius:0;flex-direction:column;min-height:0;padding:0;display:flex}.panel-header{border-bottom:1px solid var(--color-border);background:var(--color-sidebar);justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;display:flex}.panel-title{text-transform:uppercase;letter-spacing:.5px;color:var(--color-ink-muted);font-size:11px;font-weight:600}.panel-subtitle{color:var(--color-muted);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.panel-body{flex:1;min-height:0;overflow:auto}.modal{background:var(--color-panel);border:1px solid var(--color-border);border-radius:4px;width:480px;max-width:96vw;max-height:90dvh;padding:16px;overflow-y:auto;box-shadow:0 8px 32px #0000004d}.modal-close-btn{color:var(--color-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;width:32px;height:32px;padding:0;font-size:24px;line-height:1;display:flex}.modal-close-btn:hover{color:var(--color-ink);background:var(--color-list-hover)}.tree-body{padding:4px 0}.tree-row{color:var(--color-ink);text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:4px;width:100%;min-height:22px;padding:2px 8px 2px 4px;font-size:13px;transition:background .1s;display:flex}.tree-row:hover{background:var(--color-list-hover)}.tree-row:focus-visible{outline:2px solid var(--color-focus);outline-offset:-2px}.tree-chevron{width:16px;height:16px;color:var(--color-ink-muted);flex-shrink:0;justify-content:center;align-items:center;display:flex}.tree-chevron-icon{width:12px;height:12px;transition:transform .1s}.tree-icon{flex-shrink:0;justify-content:center;align-items:center;width:16px;height:16px;display:flex}.tree-svg{width:16px;height:16px}.tree-label{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.tree-meta{color:var(--color-muted);font-size:11px;font-family:var(--font-mono);margin-left:auto}.tree-state{color:var(--color-muted);padding:8px 12px;font-size:12px}.tree-actions{align-items:center;gap:4px;display:flex}.tree-input-row{align-items:center;gap:4px;min-height:22px;padding:2px 8px 2px 4px;display:flex}.tree-input{border:1px solid var(--color-accent);background:var(--color-panel);min-width:0;color:var(--color-ink);border-radius:2px;outline:none;flex:1;padding:2px 6px;font-size:13px}.tree-input::placeholder{color:var(--color-muted)}.editor-container{background:var(--color-panel);flex-direction:column;height:100%;display:flex;overflow:hidden}.editor-container.editor-empty{justify-content:center;align-items:center;display:flex}.editor-welcome{color:var(--color-ink-muted);text-align:center;flex-direction:column;align-items:center;gap:16px;padding:60px 40px;display:flex}.editor-welcome-icon{opacity:.2;width:80px;height:80px}.editor-welcome-icon svg{width:100%;height:100%;stroke:var(--color-ink)}.editor-welcome-text{color:var(--color-ink-muted);font-size:18px;font-weight:400}.editor-welcome-hint{opacity:.6;font-size:13px}.editor-tabs{background:var(--color-bg-soft);border-bottom:1px solid var(--color-border);flex-shrink:0;align-items:stretch;min-height:35px;display:flex}.editor-tabs-list{scrollbar-width:none;display:flex;overflow-x:auto}.editor-tabs-list::-webkit-scrollbar{display:none}.editor-tab{background:var(--color-bg-soft);border:none;border-right:1px solid var(--color-border);min-width:100px;max-width:180px;height:35px;color:var(--color-ink-muted);cursor:pointer;align-items:center;gap:6px;padding:0 10px;font-size:13px;transition:background .1s,color .1s;display:flex;position:relative}.editor-tab:hover{background:var(--color-panel);color:var(--color-ink)}.editor-tab.active{background:var(--color-panel);color:var(--color-ink);border-bottom:1px solid var(--color-panel);margin-bottom:-1px}.editor-tab-icon{font-size:10px;font-weight:600;font-family:var(--font-mono);flex-shrink:0}.editor-tab-name{text-overflow:ellipsis;white-space:nowrap;text-align:left;flex:1;overflow:hidden}.editor-tab-dirty{color:var(--color-ink);flex-shrink:0;font-size:18px;line-height:1}.editor-tab-saving{flex-shrink:0;width:14px;height:14px}.editor-tab-saving svg{width:100%;height:100%;stroke:var(--color-ink-muted)}.editor-tab-close{width:20px;height:20px;color:var(--color-ink-muted);cursor:pointer;opacity:0;background:0 0;border:none;border-radius:3px;flex-shrink:0;justify-content:center;align-items:center;padding:0;transition:opacity .1s,background .1s;display:flex}.editor-tab-close svg{width:16px;height:16px}.editor-tab-close:hover{background:var(--color-list-hover);color:var(--color-ink)}.editor-breadcrumb{background:var(--color-panel);border-bottom:1px solid var(--color-border);color:var(--color-ink-muted);flex-shrink:0;align-items:center;height:22px;padding:0 12px;font-size:12px;display:flex}.editor-breadcrumb-path{text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-mono);overflow:hidden}.editor-content{flex:1;min-height:0;position:relative}.editor-no-file{height:100%;color:var(--color-ink-muted);justify-content:center;align-items:center;display:flex}.editor-statusbar{background:var(--color-statusbar);height:22px;color:var(--color-statusbar-fg);flex-shrink:0;justify-content:space-between;align-items:center;padding:0 12px;font-size:12px;display:flex}.editor-statusbar-left,.editor-statusbar-right{align-items:center;gap:14px;display:flex}.editor-status-item{cursor:default;align-items:center;gap:4px;display:flex}.editor-status-item svg{width:14px;height:14px}.terminal-layout{overflow-anchor:none;flex-direction:column;flex:1;min-width:0;min-height:0;display:flex;overflow:hidden}.terminal-topbar{background:var(--color-sidebar);border-bottom:1px solid var(--color-border);flex-shrink:0;align-items:stretch;min-width:0;display:flex;overflow:hidden}.topbar-left{flex:1;align-items:stretch;min-width:0;display:flex;overflow:hidden}.deck-tabs{scrollbar-width:none;flex:1;align-items:stretch;min-width:0;display:flex;overflow-x:auto}.deck-tabs::-webkit-scrollbar{display:none}.deck-tab{border:none;border-top:2px solid #0000;border-right:1px solid var(--color-border);min-width:80px;max-width:200px;color:var(--color-muted);cursor:pointer;white-space:nowrap;background:0 0;flex-shrink:0;align-items:center;gap:4px;padding:0 8px 0 12px;font-size:12px;font-weight:500;transition:background .12s,color .12s;display:flex}.deck-tab[draggable=true]{cursor:grab}.deck-tab.is-dragging{opacity:.5}.deck-tab.is-drag-over{background:var(--color-list-active);color:var(--color-ink)}.deck-tab:hover{background:var(--color-list-hover);color:var(--color-ink)}.deck-tab.active{background:var(--color-panel);color:var(--color-ink);border-top-color:var(--color-accent)}.deck-tab-name{text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.deck-tab-close{opacity:0;width:16px;height:16px;color:var(--color-muted);border-radius:3px;flex-shrink:0;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:opacity .12s,background .12s;display:flex}.deck-tab-add{border-top:none;justify-content:center;min-width:35px;max-width:35px;padding:0;font-size:16px;font-weight:300}.deck-tab-add:hover{background:var(--color-list-hover);color:var(--color-ink)}.terminal-split-container{flex:1;grid-auto-rows:minmax(0,1fr);gap:4px;width:100%;min-width:0;max-width:100%;min-height:0;padding:4px;display:grid;position:relative}.deck-split-pane{border:1px solid var(--color-border);border-radius:4px;flex-direction:column;min-width:0;min-height:0;display:flex;overflow:hidden}.topbar-btn-sm{border:1px solid var(--color-border);color:var(--color-muted);cursor:pointer;background:0 0;border-radius:3px;padding:2px 6px;font-size:11px;font-weight:600;transition:all .15s}.topbar-btn-sm:hover{background:var(--color-list-hover);color:var(--color-ink);border-color:var(--color-accent)}.topbar-btn-sm.topbar-btn-claude{color:#d97757}.topbar-btn-sm.topbar-btn-claude:hover{background:#d9775726;border-color:#d97757}.topbar-btn-sm.topbar-btn-codex{color:#00a86b}.topbar-btn-sm.topbar-btn-codex:hover{background:#00a86b26;border-color:#00a86b}.terminal-pane{overflow-anchor:none;flex-direction:column;flex:1;min-width:0;min-height:0;padding:4px;display:flex}.terminal-grid{flex:1;gap:4px;width:100%;min-width:0;min-height:0;display:grid;overflow:hidden}.terminal-tile-slot{display:contents}.terminal-back-btn{display:none}.terminal-empty{background:var(--color-bg-soft);border:1px dashed var(--color-border);color:var(--color-muted);border-radius:4px;flex:1;justify-content:center;align-items:center;font-size:12px;display:flex}.terminal-tile{border:1px solid var(--color-border);color:#d4d4d4;background:#1e1e1e;border-radius:4px;flex-direction:column;min-width:0;min-height:0;display:flex;overflow:hidden}.terminal-tile-header{background:#2d2d2d;border-bottom:1px solid #404040;justify-content:space-between;align-items:center;gap:8px;padding:6px 10px;font-size:12px;display:flex}.terminal-tile-header span{text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-mono);flex:1;overflow:hidden}.terminal-close-btn{color:#858585;cursor:pointer;background:0 0;border:none;border-radius:3px;flex-shrink:0;justify-content:center;align-items:center;width:20px;height:20px;transition:background .1s,color .1s;display:flex}.terminal-close-btn:hover{color:#fff;background:#404040}.terminal-tile-body{overflow-anchor:none;overscroll-behavior:contain;touch-action:pan-y;flex:1;min-height:0;overflow:hidden}.terminal-tile-body .xterm,.terminal-tile-body .xterm-viewport,.terminal-tile-body .xterm-screen{overflow-anchor:none}.terminal-tile-body .xterm-helper-textarea{z-index:0!important}.terminal-tile-body .xterm-viewport{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}.git-modified{color:var(--color-git-modified)}.git-untracked{color:var(--color-git-untracked)}.git-deleted{color:var(--color-git-deleted)}.git-staged{color:var(--color-git-staged)}.git-renamed{color:var(--color-git-renamed)}.git-conflicted{color:var(--color-git-conflicted)}.git-tabs{border-bottom:1px solid var(--color-border);background:var(--color-sidebar);flex-shrink:0;display:flex}.git-tab{color:var(--color-ink-muted);cursor:pointer;background:0 0;border:none;align-items:center;gap:6px;padding:6px 12px;font-size:12px;transition:color .1s,background .1s;display:flex;position:relative}.git-tab:hover{color:var(--color-ink);background:var(--color-list-hover)}.git-tab.active{color:var(--color-ink)}.git-file-row{align-items:center;gap:4px;transition:background .1s;display:flex}.git-file-row:hover{background:var(--color-list-hover)}.git-file-main{color:var(--color-ink);cursor:pointer;text-align:left;background:0 0;border:none;flex:1;align-items:center;gap:6px;min-width:0;min-height:22px;padding:4px 12px;display:flex}.git-status-badge{width:16px;height:16px;font-size:11px;font-weight:600;font-family:var(--font-mono);flex-shrink:0;justify-content:center;align-items:center;display:flex}.git-file-path{text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.git-file-actions{opacity:0;gap:2px;padding-right:8px;transition:opacity .1s;display:flex}.git-action-btn{width:22px;height:22px;color:var(--color-ink-muted);cursor:pointer;background:0 0;border:none;border-radius:3px;justify-content:center;align-items:center;padding:0;transition:background .1s,color .1s;display:flex}.git-action-btn:hover{background:var(--color-list-hover);color:var(--color-ink)}.git-action-btn svg{fill:currentColor;width:14px;height:14px}.status-float{right:20px;bottom:calc(40px + env(safe-area-inset-bottom,0px));background:var(--color-panel);border:1px solid var(--color-border);color:var(--color-ink);border-radius:4px;max-width:min(400px,100vw - 40px);padding:8px 14px;font-size:12px;position:fixed;box-shadow:0 4px 16px #0003}.sidebar-toggle-btn,.sidebar-overlay{display:none}@media (max-width:1024px){.workspace-editor-grid{grid-template-rows:200px minmax(0,1fr);grid-template-columns:48px 1fr}.workspace-editor-grid>.activity-bar{grid-row:1/-1}.sidebar-panel{border-right:none;border-bottom:1px solid var(--color-border)}}@media (max-width:720px){.app{padding-bottom:env(safe-area-inset-bottom);grid-template-rows:minmax(0,1fr) 48px 22px;grid-template-columns:1fr}.app>nav.activity-bar{width:auto;height:48px;padding:0 max(8px,env(safe-area-inset-right,0px)) 0 max(8px,env(safe-area-inset-left,0px));border-top:1px solid var(--color-border);flex-direction:row;grid-row:2;justify-content:space-between;gap:8px}.activity-bar-top,.activity-bar-bottom{flex-direction:row;align-items:center;gap:4px}.activity-bar-bottom{margin-top:0;margin-left:0}.main{grid-row:1;min-width:0;overflow:hidden}.sidebar-toggle-btn{justify-content:center;align-items:center;display:flex}.activity-bar-item{min-width:44px;min-height:44px}.deck-tab{min-height:40px;padding:0 8px 0 14px;font-size:13px}.topbar-btn-sm{min-width:44px;min-height:40px;padding:0 10px}.tree-row,.editor-tab{min-height:36px}.modal-close-btn{min-width:44px;min-height:44px}.modal{border-radius:8px;max-width:calc(100vw - 16px);max-height:90dvh;margin:8px}.deck-tabs{-webkit-overflow-scrolling:touch;scrollbar-width:none;flex-wrap:nowrap;overflow-x:auto}.deck-tabs::-webkit-scrollbar{display:none}.terminal-split-container{scroll-snap-type:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:auto;scrollbar-width:none;width:100%;max-width:100%;overflow:scroll hidden;flex-direction:row!important;gap:0!important;padding:0!important;display:flex!important}.terminal-split-container::-webkit-scrollbar{display:none}.deck-split-pane{scroll-snap-align:start;border-left:none;border-right:none;border-radius:0;flex:0 0 100%;width:100%;max-width:100%;overflow:hidden}.terminal-pane{flex:auto;width:100%;max-width:100%;min-height:0;overflow:hidden;padding:0!important}.terminal-grid-preview{-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;scrollbar-width:none;flex:auto;min-height:0;grid-template-columns:repeat(2,1fr)!important;grid-template-rows:unset!important;gap:4px!important;padding:4px!important;display:grid!important;overflow:hidden auto!important}.terminal-grid-preview::-webkit-scrollbar{display:none}.terminal-tile-slot-preview{cursor:pointer;display:block;overflow:hidden}.terminal-tile-slot-preview .terminal-tile{border-radius:4px;height:150px!important;min-height:150px!important;max-height:150px!important}.terminal-tile-slot-preview .terminal-tile-body{pointer-events:none}.terminal-tile-slot-preview .terminal-close-btn{display:none}.terminal-tile-slot-preview .terminal-tile-header{padding:4px 8px;font-size:11px}.terminal-pane-expanded{flex-direction:column;display:flex}.terminal-back-btn{background:var(--color-sidebar);border:none;border-bottom:1px solid var(--color-border);min-height:36px;color:var(--color-accent);cursor:pointer;flex-shrink:0;align-items:center;gap:4px;padding:8px 12px;font-size:13px;font-weight:500;display:flex}.terminal-grid-expanded{flex-direction:column!important;flex:1!important;gap:0!important;min-height:0!important;padding:0!important;display:flex!important;overflow:hidden!important}.terminal-tile-slot-active{flex-direction:column;flex:1;min-height:0;overflow:hidden;display:flex!important}.terminal-tile-slot-active .terminal-tile{border:none;border-radius:0;flex:1;height:auto!important;min-height:0!important}.terminal-tile-slot-hidden{display:none!important}.terminal-pane-expanded[data-terminal-focus=true] .terminal-grid-expanded{overflow-y:hidden!important}.app:has(.terminal-pane-expanded){grid-template-rows:1fr;padding-bottom:0}.app:has(.terminal-pane-expanded)>.activity-bar,.app:has(.terminal-pane-expanded) .terminal-topbar,.app:has(.terminal-pane-expanded) .deck-split-pane>:first-child:not(.terminal-pane),.app:has(.terminal-pane-expanded) .terminal-tile-header,.app:has(.terminal-pane-expanded) .status-float{display:none}.status-float{right:12px;bottom:calc(78px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 24px)}.workspace-editor-grid{grid-template-rows:minmax(0,1fr);grid-template-columns:1fr;position:relative}.workspace-editor-grid>.activity-bar{z-index:101;border-right:1px solid var(--color-border);border-top:none;flex-direction:column;width:48px;height:auto;transition:transform .2s;position:absolute;top:0;bottom:0;left:0;transform:translate(-100%)}.sidebar-panel{z-index:100;border-bottom:none;border-right:1px solid var(--color-border);width:260px;transition:transform .2s;position:absolute;top:0;bottom:0;left:48px;overflow-y:auto;transform:translate(calc(-100% - 48px))}.drawer-open .workspace-editor-grid>.activity-bar,.drawer-open .sidebar-panel{transform:translate(0)}.sidebar-overlay{z-index:99;background:#0006;display:none;position:absolute;top:0;right:0;bottom:0;left:0}.drawer-open .sidebar-overlay{display:block}.workspace-editor-header{gap:8px;padding:0 8px}.workspace-editor-header .sidebar-toggle-btn{order:3;margin-left:auto}.workspace-editor-header .workspace-meta{text-align:left;min-width:0}}@media (pointer:coarse){.modal-close-btn:hover,.tree-row:hover,.editor-tab:hover,.deck-tab:hover,.deck-tab-add:hover,.topbar-btn-sm:hover,.terminal-close-btn:hover,.git-file-row:hover,.git-action-btn:hover,.git-tab:hover{border-color:inherit;color:inherit;opacity:1;background:0 0}.editor-tab:hover{color:var(--color-ink-muted);background:0 0}.git-file-actions{opacity:1}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
|
@@ -60,6 +60,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
60
60
|
monaco.config({ paths: { vs: '...' } })
|
|
61
61
|
|
|
62
62
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
63
|
-
`},Rc=Jm(rg)(hd),ig={config:eg},ng=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return function(n){return r.reduceRight(function(h,_){return _(h)},n)}};function dd(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],dd(e[r],t[r]))}),kc(kc({},e),t)}var sg={type:"cancelation",msg:"operation is manually canceled"};function no(e){var t=!1,r=new Promise(function(i,n){e.then(function(h){return t?n(sg):i(h)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var og=["monaco"],lg=Ym.create({config:Qm,isInitialized:!1,resolve:null,reject:null,monaco:null}),fd=Pm(lg,2),en=fd[0],Es=fd[1];function ag(e){var t=ig.config(e),r=t.monaco,i=Tm(t,og);Es(function(n){return{config:dd(n.config,i),monaco:r}})}function cg(){var e=en(function(t){var r=t.monaco,i=t.isInitialized,n=t.resolve;return{monaco:r,isInitialized:i,resolve:n}});if(!e.isInitialized){if(Es({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),no(so);if(window.monaco&&window.monaco.editor)return pd(window.monaco),e.resolve(window.monaco),no(so);ng(ug,dg)(fg)}return no(so)}function ug(e){return document.body.appendChild(e)}function hg(e){var t=document.createElement("script");return e&&(t.src=e),t}function dg(e){var t=en(function(i){var n=i.config,h=i.reject;return{config:n,reject:h}}),r=hg("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function fg(){var e=en(function(r){var i=r.config,n=r.resolve,h=r.reject;return{config:i,resolve:n,reject:h}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var i=r.m||r;pd(i),e.resolve(i)},function(r){e.reject(r)})}function pd(e){en().monaco||Es({monaco:e})}function pg(){return en(function(e){var t=e.monaco;return t})}var so=new Promise(function(e,t){return Es({resolve:e,reject:t})}),_d={config:ag,init:cg,__getMonacoInstance:pg},_g={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},oo=_g,vg={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},mg=vg;function gg({children:e}){return vr.createElement("div",{style:mg.container},e)}var yg=gg,Sg=yg;function Cg({width:e,height:t,isEditorReady:r,loading:i,_ref:n,className:h,wrapperProps:_}){return vr.createElement("section",{style:{...oo.wrapper,width:e,height:t},..._},!r&&vr.createElement(Sg,null,i),vr.createElement("div",{ref:n,style:{...oo.fullWidth,...!r&&oo.hide},className:h}))}var wg=Cg,vd=N.memo(wg);function xg(e){N.useEffect(e,[])}var md=xg;function bg(e,t,r=!0){let i=N.useRef(!0);N.useEffect(i.current||!r?()=>{i.current=!1}:e,t)}var nt=bg;function Ri(){}function zr(e,t,r,i){return Eg(e,i)||kg(e,t,r,i)}function Eg(e,t){return e.editor.getModel(gd(e,t))}function kg(e,t,r,i){return e.editor.createModel(t,r,i?gd(e,i):void 0)}function gd(e,t){return e.Uri.parse(t)}function Lg({original:e,modified:t,language:r,originalLanguage:i,modifiedLanguage:n,originalModelPath:h,modifiedModelPath:_,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:u=!1,theme:f="light",loading:y="Loading...",options:d={},height:m="100%",width:C="100%",className:w,wrapperProps:g={},beforeMount:a=Ri,onMount:o=Ri}){let[s,c]=N.useState(!1),[p,v]=N.useState(!0),x=N.useRef(null),b=N.useRef(null),S=N.useRef(null),k=N.useRef(o),R=N.useRef(a),O=N.useRef(!1);md(()=>{let I=_d.init();return I.then(j=>(b.current=j)&&v(!1)).catch(j=>(j==null?void 0:j.type)!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>x.current?z():I.cancel()}),nt(()=>{if(x.current&&b.current){let I=x.current.getOriginalEditor(),j=zr(b.current,e||"",i||r||"text",h||"");j!==I.getModel()&&I.setModel(j)}},[h],s),nt(()=>{if(x.current&&b.current){let I=x.current.getModifiedEditor(),j=zr(b.current,t||"",n||r||"text",_||"");j!==I.getModel()&&I.setModel(j)}},[_],s),nt(()=>{let I=x.current.getModifiedEditor();I.getOption(b.current.editor.EditorOption.readOnly)?I.setValue(t||""):t!==I.getValue()&&(I.executeEdits("",[{range:I.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),I.pushUndoStop())},[t],s),nt(()=>{var I,j;(j=(I=x.current)==null?void 0:I.getModel())==null||j.original.setValue(e||"")},[e],s),nt(()=>{let{original:I,modified:j}=x.current.getModel();b.current.editor.setModelLanguage(I,i||r||"text"),b.current.editor.setModelLanguage(j,n||r||"text")},[r,i,n],s),nt(()=>{var I;(I=b.current)==null||I.editor.setTheme(f)},[f],s),nt(()=>{var I;(I=x.current)==null||I.updateOptions(d)},[d],s);let T=N.useCallback(()=>{var $;if(!b.current)return;R.current(b.current);let I=zr(b.current,e||"",i||r||"text",h||""),j=zr(b.current,t||"",n||r||"text",_||"");($=x.current)==null||$.setModel({original:I,modified:j})},[r,t,n,e,i,h,_]),B=N.useCallback(()=>{var I;!O.current&&S.current&&(x.current=b.current.editor.createDiffEditor(S.current,{automaticLayout:!0,...d}),T(),(I=b.current)==null||I.editor.setTheme(f),c(!0),O.current=!0)},[d,f,T]);N.useEffect(()=>{s&&k.current(x.current,b.current)},[s]),N.useEffect(()=>{!p&&!s&&B()},[p,s,B]);function z(){var j,$,E,A;let I=(j=x.current)==null?void 0:j.getModel();l||(($=I==null?void 0:I.original)==null||$.dispose()),u||((E=I==null?void 0:I.modified)==null||E.dispose()),(A=x.current)==null||A.dispose()}return vr.createElement(vd,{width:C,height:m,isEditorReady:s,loading:y,_ref:S,className:w,wrapperProps:g})}var Dg=Lg,Rg=N.memo(Dg);function Tg(e){let t=N.useRef();return N.useEffect(()=>{t.current=e},[e]),t.current}var Ag=Tg,Cn=new Map;function Pg({defaultValue:e,defaultLanguage:t,defaultPath:r,value:i,language:n,path:h,theme:_="light",line:l,loading:u="Loading...",options:f={},overrideServices:y={},saveViewState:d=!0,keepCurrentModel:m=!1,width:C="100%",height:w="100%",className:g,wrapperProps:a={},beforeMount:o=Ri,onMount:s=Ri,onChange:c,onValidate:p=Ri}){let[v,x]=N.useState(!1),[b,S]=N.useState(!0),k=N.useRef(null),R=N.useRef(null),O=N.useRef(null),T=N.useRef(s),B=N.useRef(o),z=N.useRef(),I=N.useRef(i),j=Ag(h),$=N.useRef(!1),E=N.useRef(!1);md(()=>{let M=_d.init();return M.then(H=>(k.current=H)&&S(!1)).catch(H=>(H==null?void 0:H.type)!=="cancelation"&&console.error("Monaco initialization: error:",H)),()=>R.current?P():M.cancel()}),nt(()=>{var H,K,X,q;let M=zr(k.current,e||i||"",t||n||"",h||r||"");M!==((H=R.current)==null?void 0:H.getModel())&&(d&&Cn.set(j,(K=R.current)==null?void 0:K.saveViewState()),(X=R.current)==null||X.setModel(M),d&&((q=R.current)==null||q.restoreViewState(Cn.get(h))))},[h],v),nt(()=>{var M;(M=R.current)==null||M.updateOptions(f)},[f],v),nt(()=>{!R.current||i===void 0||(R.current.getOption(k.current.editor.EditorOption.readOnly)?R.current.setValue(i):i!==R.current.getValue()&&(E.current=!0,R.current.executeEdits("",[{range:R.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),R.current.pushUndoStop(),E.current=!1))},[i],v),nt(()=>{var H,K;let M=(H=R.current)==null?void 0:H.getModel();M&&n&&((K=k.current)==null||K.editor.setModelLanguage(M,n))},[n],v),nt(()=>{var M;l!==void 0&&((M=R.current)==null||M.revealLine(l))},[l],v),nt(()=>{var M;(M=k.current)==null||M.editor.setTheme(_)},[_],v);let A=N.useCallback(()=>{var M;if(!(!O.current||!k.current)&&!$.current){B.current(k.current);let H=h||r,K=zr(k.current,i||e||"",t||n||"",H||"");R.current=(M=k.current)==null?void 0:M.editor.create(O.current,{model:K,automaticLayout:!0,...f},y),d&&R.current.restoreViewState(Cn.get(H)),k.current.editor.setTheme(_),l!==void 0&&R.current.revealLine(l),x(!0),$.current=!0}},[e,t,r,i,n,h,f,y,d,_,l]);N.useEffect(()=>{v&&T.current(R.current,k.current)},[v]),N.useEffect(()=>{!b&&!v&&A()},[b,v,A]),I.current=i,N.useEffect(()=>{var M,H;v&&c&&((M=z.current)==null||M.dispose(),z.current=(H=R.current)==null?void 0:H.onDidChangeModelContent(K=>{E.current||c(R.current.getValue(),K)}))},[v,c]),N.useEffect(()=>{if(v){let M=k.current.editor.onDidChangeMarkers(H=>{var X;let K=(X=R.current.getModel())==null?void 0:X.uri;if(K&&H.find(q=>q.path===K.path)){let q=k.current.editor.getModelMarkers({resource:K});p==null||p(q)}});return()=>{M==null||M.dispose()}}return()=>{}},[v,p]);function P(){var M,H;(M=z.current)==null||M.dispose(),m?d&&Cn.set(h,R.current.saveViewState()):(H=R.current.getModel())==null||H.dispose(),R.current.dispose()}return vr.createElement(vd,{width:C,height:w,isEditorReady:v,loading:u,_ref:O,className:g,wrapperProps:a})}var Mg=Pg,Bg=N.memo(Mg),Og=Bg;const Tc="ファイルを選択してください",Ng="vs-dark",jg="vs";function Ig(e){var i;const t=((i=e.split(".").pop())==null?void 0:i.toLowerCase())||"";return{ts:{icon:"TS",color:"#3178c6"},tsx:{icon:"TSX",color:"#3178c6"},js:{icon:"JS",color:"#f7df1e"},jsx:{icon:"JSX",color:"#61dafb"},json:{icon:"{ }",color:"#cbcb41"},html:{icon:"<>",color:"#e34c26"},css:{icon:"#",color:"#264de4"},scss:{icon:"S",color:"#cc6699"},md:{icon:"M↓",color:"#083fa1"},py:{icon:"PY",color:"#3776ab"},go:{icon:"GO",color:"#00add8"},rs:{icon:"RS",color:"#dea584"},java:{icon:"J",color:"#b07219"},sql:{icon:"SQL",color:"#e38c00"},yml:{icon:"Y",color:"#cb171e"},yaml:{icon:"Y",color:"#cb171e"},sh:{icon:"$",color:"#89e051"},bash:{icon:"$",color:"#89e051"},txt:{icon:"TXT",color:"#6a737d"}}[t]||{icon:"📄",color:"var(--ink-muted)"}}function Fg(e){return{typescript:"TypeScript",typescriptreact:"TypeScript React",javascript:"JavaScript",javascriptreact:"JavaScript React",json:"JSON",html:"HTML",css:"CSS",scss:"SCSS",markdown:"Markdown",python:"Python",go:"Go",rust:"Rust",java:"Java",sql:"SQL",yaml:"YAML",shell:"Shell",plaintext:"Plain Text"}[e]||e}function Hg({files:e,activeFileId:t,onSelectFile:r,onCloseFile:i,onChangeFile:n,onSaveFile:h,savingFileId:_,theme:l}){const u=e.find(g=>g.id===t),f=N.useRef(null),[y,d]=N.useState({line:1,column:1}),m=N.useCallback(g=>{f.current=g,g.onDidChangeCursorPosition(a=>{d({line:a.position.lineNumber,column:a.position.column})})},[]);N.useEffect(()=>{const g=a=>{!t||!((a.ctrlKey||a.metaKey)&&a.key.toLowerCase()==="s")||(a.preventDefault(),h==null||h(t))};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[t,h]);const C=(g,a)=>{g.stopPropagation(),i(a)},w=(g,a)=>{g.button===1&&(g.preventDefault(),i(a))};return e.length===0?L.jsx("div",{className:"editor-container editor-empty",children:L.jsxs("div",{className:"editor-welcome",children:[L.jsx("div",{className:"editor-welcome-icon",children:L.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[L.jsx("path",{d:"M13 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V9z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),L.jsx("polyline",{points:"13 2 13 9 20 9",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),L.jsx("div",{className:"editor-welcome-text",children:Tc}),L.jsx("div",{className:"editor-welcome-hint",children:"左のファイルツリーからファイルを選択"})]})}):L.jsxs("div",{className:"editor-container",children:[L.jsx("div",{className:"editor-tabs",children:L.jsx("div",{className:"editor-tabs-list",children:e.map(g=>{const{icon:a,color:o}=Ig(g.name),s=g.id===t,c=_===g.id;return L.jsxs("div",{className:Ie("editor-tab",s&&"active",g.dirty&&"dirty"),onClick:()=>r(g.id),onMouseDown:p=>w(p,g.id),role:"tab","aria-selected":s,tabIndex:0,children:[L.jsx("span",{className:"editor-tab-icon",style:{color:o},children:a}),L.jsx("span",{className:"editor-tab-name",children:g.name}),g.dirty&&!c&&L.jsx("span",{className:"editor-tab-dirty","aria-label":"未保存",children:"●"}),c&&L.jsx("span",{className:"editor-tab-saving","aria-label":"保存中",children:L.jsx("svg",{viewBox:"0 0 24 24",className:"spin",children:L.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"30 70"})})}),L.jsx("button",{type:"button",className:"editor-tab-close",onClick:p=>C(p,g.id),"aria-label":"閉じる",children:L.jsx("svg",{viewBox:"0 0 24 24",children:L.jsx("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]},g.id)})})}),u&&L.jsx("div",{className:"editor-breadcrumb",children:L.jsx("span",{className:"editor-breadcrumb-path",children:u.path})}),L.jsx("div",{className:"editor-content",children:u?L.jsx(Og,{height:"100%",theme:l==="dark"?Ng:jg,language:u.language,value:u.contents,onChange:g=>n(u.id,g??""),onMount:m,options:{fontFamily:Zh,fontSize:ed,fontLigatures:!0,minimap:{enabled:!0,scale:1,showSlider:"mouseover"},smoothScrolling:!0,cursorBlinking:"smooth",cursorSmoothCaretAnimation:"on",renderLineHighlight:"all",scrollBeyondLastLine:!1,automaticLayout:!0,padding:{top:8,bottom:8},lineNumbers:"on",renderWhitespace:"selection",bracketPairColorization:{enabled:!0},guides:{bracketPairs:!0,indentation:!0}}}):L.jsx("div",{className:"editor-no-file",children:L.jsx("span",{children:Tc})})}),u&&L.jsxs("div",{className:"editor-statusbar",children:[L.jsx("div",{className:"editor-statusbar-left",children:L.jsxs("span",{className:"editor-status-item",children:[L.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[L.jsx("path",{d:"M6 3v12M18 9a3 3 0 110 6 3 3 0 010-6zM6 21a3 3 0 110-6 3 3 0 010 6z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),L.jsx("path",{d:"M18 12c0 3-3 4-6 4s-6-1-6-4",fill:"none",stroke:"currentColor",strokeWidth:"2"})]}),"main"]})}),L.jsxs("div",{className:"editor-statusbar-right",children:[L.jsxs("span",{className:"editor-status-item",children:["Ln ",y.line,", Col ",y.column]}),L.jsx("span",{className:"editor-status-item",children:"UTF-8"}),L.jsx("span",{className:"editor-status-item",children:Fg(u.language)})]})]})]})}const zg="差分ビューア",$g="読み込み中...",Ug="閉じる",Wg="vs-dark",Vg="vs";function Kg({diff:e,loading:t,theme:r,onClose:i}){const n=e?cd(e.path):"plaintext";return L.jsxs("div",{className:"fixed inset-0 bg-bg z-50 grid grid-rows-[35px_minmax(0,1fr)]",children:[L.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 bg-title-bar border-b border-border",children:[L.jsxs("div",{children:[L.jsx("div",{className:"text-[13px] font-medium",children:zg}),e&&L.jsx("div",{className:"text-xs text-muted font-mono",children:e.path})]}),L.jsx("button",{type:"button",className:"bg-transparent text-ink border-0 px-2 py-1 text-xs rounded-[2px] cursor-pointer hover:bg-list-hover",onClick:i,children:Ug})]}),L.jsx("div",{className:"min-h-0 overflow-hidden",children:t?L.jsx("div",{className:"flex items-center justify-center h-full text-muted text-[13px] p-5",children:$g}):e?L.jsx(Rg,{height:"100%",theme:r==="dark"?Wg:Vg,language:n,original:e.original,modified:e.modified,options:{fontFamily:Zh,fontSize:ed,readOnly:!0,renderSideBySide:!0,minimap:{enabled:!1},smoothScrolling:!0}}):null})]})}function qg({activeWorkspace:e,defaultRoot:t,activeWorkspaceState:r,editorWorkspaceId:i,gitState:n,theme:h,savingFileId:_,onCloseWorkspaceEditor:l,onToggleDir:u,onOpenFile:f,onRefreshTree:y,onCreateFile:d,onCreateDirectory:m,onDeleteFile:C,onDeleteDirectory:w,onRefreshGit:g,onSelectRepo:a,onStageFile:o,onUnstageFile:s,onStageAll:c,onUnstageAll:p,onCommit:v,onDiscardFile:x,onShowDiff:b,onCloseDiff:S,onPush:k,onPull:R,onLoadBranches:O,onCheckoutBranch:T,onCreateBranch:B,onLoadLogs:z,onSelectFile:I,onCloseFile:j,onChangeFile:$,onSaveFile:E}){var q,se;const[A,P]=N.useState(!1),[M,H]=N.useState("files"),K=N.useCallback(D=>{f(D),P(!1)},[f]),X=((q=n.status)==null?void 0:q.files.length)??0;return L.jsxs("div",{className:Ie("workspace-editor-overlay",A&&"drawer-open"),children:[L.jsxs("div",{className:"workspace-editor-header",children:[L.jsx("button",{type:"button",className:"bg-transparent text-ink border-0 px-2 py-1 text-xs rounded-[2px] cursor-pointer hover:bg-list-hover",onClick:l,children:"一覧に戻る"}),L.jsx("button",{type:"button",className:"sidebar-toggle-btn bg-transparent text-ink border-0 px-2 py-1 text-xs rounded-[2px] cursor-pointer hover:bg-list-hover min-h-[44px] min-w-[44px]",onClick:()=>P(D=>!D),"aria-label":"\\u30b5\\u30a4\\u30c9\\u30d0\\u30fc",children:L.jsx("svg",{viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:L.jsx("path",{d:"M3 12h18M3 6h18M3 18h18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),L.jsx("div",{className:"workspace-meta",children:e?e.path:null})]}),L.jsxs("div",{className:"workspace-editor-grid",children:[L.jsxs("div",{className:"activity-bar",children:[L.jsx("button",{type:"button",className:Ie("activity-bar-item",M==="files"&&"active"),onClick:()=>H("files"),title:"エクスプローラー",children:L.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:L.jsx("path",{d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),L.jsxs("button",{type:"button",className:Ie("activity-bar-item",M==="git"&&"active"),onClick:()=>{H("git"),g()},title:"ソースコントロール",children:[L.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[L.jsx("path",{d:"M6 3v12M18 9a3 3 0 110 6 3 3 0 010-6zM6 21a3 3 0 110-6 3 3 0 010 6z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),L.jsx("path",{d:"M18 12c0 3-3 4-6 4s-6-1-6-4",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})]}),X>0&&L.jsx("span",{className:"activity-bar-badge",children:X})]})]}),L.jsx("div",{className:"sidebar-panel",children:L.jsx("div",{className:"sidebar-content",children:M==="files"?L.jsx(ad,{root:(e==null?void 0:e.path)||t||"",entries:r.tree,loading:r.treeLoading,error:r.treeError,onToggleDir:u,onOpenFile:K,onRefresh:y,onCreateFile:d,onCreateDirectory:m,onDeleteFile:C,onDeleteDirectory:w,gitFiles:(se=n.status)==null?void 0:se.files}):L.jsx(Em,{status:n.status,loading:n.loading,error:n.error,workspaceId:i,branchStatus:n.branchStatus,hasRemote:n.hasRemote,pushing:n.pushing,pulling:n.pulling,branches:n.branches,branchesLoading:n.branchesLoading,logs:n.logs,logsLoading:n.logsLoading,repos:n.repos,selectedRepoPath:n.selectedRepoPath,onSelectRepo:a,onRefresh:g,onStageFile:o,onUnstageFile:s,onStageAll:c,onUnstageAll:p,onCommit:v,onDiscardFile:x,onShowDiff:b,onPush:k,onPull:R,onLoadBranches:O,onCheckoutBranch:T,onCreateBranch:B,onLoadLogs:z})})}),L.jsx(Hg,{files:r.files,activeFileId:r.activeFileId,onSelectFile:I,onCloseFile:j,onChangeFile:$,onSaveFile:E,savingFileId:_,theme:h})]}),L.jsx("div",{className:"sidebar-overlay",onClick:()=>P(!1),"aria-hidden":"true"}),n.diffPath&&L.jsx(Kg,{diff:n.diff,loading:n.diffLoading,theme:h,onClose:S})]})}const Gg="設定",Xg="サーバー設定",Yg="ポート番号",Qg="Basic認証",Jg="Basic認証を有効にする",Zg="ユーザー名",e0="パスワード",t0="※ 12文字以上推奨",r0="キャンセル",i0="保存",n0="※ 設定を保存すると、サーバーが再起動されます",s0="WebSocket設定",o0="接続数上限 (IP毎)",l0="現在の接続数",a0="全接続をクリア",c0="適用",wn="bg-panel border border-border rounded-[2px] px-2 py-1.5 text-[13px] font-mono text-ink focus:outline-none focus:border-focus";function u0({isOpen:e,onClose:t,onSave:r}){const[i,n]=N.useState(8787),[h,_]=N.useState(!1),[l,u]=N.useState(""),[f,y]=N.useState(""),[d,m]=N.useState(!1),[C,w]=N.useState(1e3),[g,a]=N.useState(null),[o,s]=N.useState(!1),c=()=>{fetch("/api/ws/stats").then(b=>b.json()).then(b=>{a(b),w(b.limit)}).catch(b=>{console.error("Failed to load WS stats:",b)})};N.useEffect(()=>{if(!e)return;const b=S=>{S.key==="Escape"&&(S.preventDefault(),t())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[e,t]),N.useEffect(()=>{e&&(fetch("/api/settings").then(b=>b.json()).then(b=>{n(b.port),_(b.basicAuthEnabled),u(b.basicAuthUser),y(b.basicAuthPassword)}).catch(b=>{console.error("Failed to load settings:",b)}),c())},[e]);const p=async()=>{try{await fetch("/api/ws/limit",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:C})}),c()}catch(b){console.error("Failed to set WS limit:",b)}},v=async()=>{s(!0);try{await fetch("/api/ws/clear",{method:"POST"}),c()}catch(b){console.error("Failed to clear WS connections:",b)}finally{s(!1)}},x=async b=>{b.preventDefault(),m(!0);try{await r({port:i,basicAuthEnabled:h,basicAuthUser:l,basicAuthPassword:f}),t()}catch(S){console.error("Failed to save settings:",S),alert("設定の保存に失敗しました")}finally{m(!1)}};return e?L.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[500]",role:"dialog","aria-modal":"true","aria-labelledby":"settings-modal-title",onClick:t,children:L.jsxs("div",{className:"modal w-[500px]",onClick:b=>b.stopPropagation(),children:[L.jsxs("div",{className:"flex items-center justify-between mb-4",children:[L.jsx("h2",{className:"m-0 text-[14px] font-semibold",id:"settings-modal-title",children:Gg}),L.jsx("button",{type:"button",className:"modal-close-btn",onClick:t,"aria-label":"閉じる",children:"×"})]}),L.jsxs("form",{onSubmit:x,children:[L.jsxs("div",{className:"flex flex-col gap-4",children:[L.jsxs("section",{className:"flex flex-col gap-3",children:[L.jsx("h3",{className:"m-0 text-[11px] font-semibold uppercase tracking-[0.5px] text-ink-muted border-b border-border pb-2",children:Xg}),L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("label",{htmlFor:"port",className:"text-xs text-ink-muted",children:Yg}),L.jsx("input",{type:"number",id:"port",className:wn,value:i,onChange:b=>n(Number(b.target.value)),min:1024,max:65535,required:!0})]}),L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("h4",{className:"m-0 text-xs font-semibold text-ink-muted",children:Qg}),L.jsxs("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[L.jsx("input",{type:"checkbox",checked:h,onChange:b=>_(b.target.checked)}),L.jsx("span",{children:Jg})]})]}),h&&L.jsxs(L.Fragment,{children:[L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("label",{htmlFor:"username",className:"text-xs text-ink-muted",children:Zg}),L.jsx("input",{type:"text",id:"username",className:wn,value:l,onChange:b=>u(b.target.value),required:h,autoComplete:"username"})]}),L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("label",{htmlFor:"password",className:"text-xs text-ink-muted",children:e0}),L.jsx("input",{type:"password",id:"password",className:wn,value:f,onChange:b=>y(b.target.value),required:h,minLength:12,autoComplete:"new-password"}),L.jsx("p",{className:"m-0 text-[11px] text-muted",children:t0})]})]})]}),L.jsxs("section",{className:"flex flex-col gap-3",children:[L.jsx("h3",{className:"m-0 text-[11px] font-semibold uppercase tracking-[0.5px] text-ink-muted border-b border-border pb-2",children:s0}),L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("label",{htmlFor:"wsLimit",className:"text-xs text-ink-muted",children:o0}),L.jsxs("div",{className:"flex gap-2 items-center",children:[L.jsx("input",{type:"number",id:"wsLimit",className:`flex-1 ${wn}`,value:C,onChange:b=>w(Number(b.target.value)),min:1,max:1e4}),L.jsx("button",{type:"button",className:"border border-border bg-transparent text-ink px-2.5 py-1 text-xs rounded-[2px] cursor-pointer hover:bg-list-hover",onClick:p,children:c0})]})]}),L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("label",{className:"text-xs text-ink-muted",children:l0}),L.jsx("div",{className:"border border-border rounded-[2px] p-2 text-xs bg-bg min-h-[40px] flex flex-col gap-1",children:g&&g.connections.length>0?g.connections.map(({ip:b,count:S})=>L.jsxs("div",{className:"flex justify-between items-center",children:[L.jsx("span",{className:"font-mono text-ink",children:b}),L.jsx("span",{className:"font-semibold text-ink-muted",children:S})]},b)):L.jsx("div",{className:"text-muted text-center",children:"接続なし"})})]}),L.jsx("div",{className:"flex flex-col gap-1",children:L.jsx("button",{type:"button",className:"bg-[#f14c4c] text-white border-0 px-3.5 py-1.5 text-[13px] font-medium rounded-[2px] cursor-pointer hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed",onClick:v,disabled:o,children:o?"クリア中...":a0})})]}),L.jsx("p",{className:"m-0 text-[11px] text-muted italic",children:n0})]}),L.jsxs("div",{className:"flex justify-end gap-2 mt-4 border-t border-border pt-4",children:[L.jsx("button",{type:"button",className:"bg-transparent text-ink border-0 px-2 py-1 text-xs rounded-[2px] cursor-pointer hover:bg-list-hover",onClick:t,disabled:d,children:r0}),L.jsx("button",{type:"submit",className:"bg-accent text-white border-0 px-3.5 py-1.5 text-[13px] font-medium rounded-[2px] cursor-pointer hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed",disabled:d,children:d?"保存中...":i0})]})]})]})}):null}const h0=()=>{const[e,t]=N.useState({}),r=N.useCallback((n,h)=>{t(_=>{const l=_[n]||ss();return{..._,[n]:h(l)}})},[]),i=N.useCallback(n=>{t(h=>{const _={...h};return n.forEach(l=>{_[l]||(_[l]=ss())}),_})},[]);return{workspaceStates:e,setWorkspaceStates:t,updateWorkspaceState:r,initializeWorkspaceStates:i}},d0=()=>{const[e,t]=N.useState({}),r=N.useCallback((n,h)=>{t(_=>{const l=_[n]||os();return{..._,[n]:h(l)}})},[]),i=N.useCallback(n=>{t(h=>{const _={...h};return n.forEach(l=>{_[l]||(_[l]=os())}),_})},[]);return{deckStates:e,setDeckStates:t,updateDeckState:r,initializeDeckStates:i}},f0=({setStatusMessage:e,defaultRoot:t,initializeWorkspaceStates:r,setWorkspaceStates:i})=>{const[n,h]=N.useState([]),[_,l]=N.useState(null);N.useEffect(()=>{let y=!0;return rv().then(d=>{y&&(h(d),l(m=>m&&d.some(C=>C.id===m)?m:null),r(d.map(m=>m.id)))}).catch(d=>{y&&e(`ワークスペースを取得できませんでした: ${Pe(d)}`)}),()=>{y=!1}},[e,r]);const u=N.useCallback(async y=>{const m=y.trim()||t;if(!m)return e("パスを入力してください。"),null;const C=yc(m);if(n.some(g=>yc(g.path)===C))return e("同じパスのワークスペースは追加できません。"),null;try{const g=await nv(m);return h(a=>[...a,g]),l(g.id),i(a=>({...a,[g.id]:ss()})),g}catch(g){return e(`ワークスペースを追加できませんでした: ${Pe(g)}`),null}},[n,t,e,i]),f=N.useCallback(async y=>{try{await sv(y),h(d=>d.filter(m=>m.id!==y)),l(d=>d===y?null:d),i(d=>{const m={...d};return delete m[y],m})}catch(d){e(`ワークスペースを削除できませんでした: ${Pe(d)}`)}},[e,i]);return{workspaces:n,editorWorkspaceId:_,setEditorWorkspaceId:l,handleCreateWorkspace:u,handleDeleteWorkspace:f}},p0=({setStatusMessage:e,initializeDeckStates:t,updateDeckState:r,setDeckStates:i,initialDeckIds:n})=>{const[h,_]=N.useState([]),[l,u]=N.useState(n??[]);N.useEffect(()=>{let g=!0;return ov().then(a=>{g&&(_(a),t(a.map(o=>o.id)),a.forEach(o=>{mv(o.id).then(s=>{g&&r(o.id,c=>({...c,terminals:s}))}).catch(()=>{})}))}).catch(a=>{g&&e(`デッキを取得できませんでした: ${Pe(a)}`)}),()=>{g=!1}},[e,t,r]),N.useEffect(()=>{if(h.length===0)return;const g=l.filter(a=>h.some(o=>o.id===a));g.length===l.length&&g.length>0||(g.length>0?u(g):h[0]&&u([h[0].id]))},[h,l]);const f=N.useCallback(async(g,a)=>{try{const o=await lv(g,a);return _(s=>[...s,o]),u(s=>[...s.filter(c=>c!==o.id),o.id]),i(s=>({...s,[o.id]:os()})),o}catch(o){return e(`デッキの作成に失敗しました: ${Pe(o)}`),null}},[e,i]),y=N.useCallback(async g=>{try{await av(g),_(a=>a.filter(o=>o.id!==g)),u(a=>a.filter(o=>o!==g)),i(a=>{const o={...a};return delete o[g],o})}catch(a){e(`デッキの削除に失敗しました: ${Pe(a)}`)}},[e,i]),d=N.useCallback(g=>{_(a=>{const o=g(a);return cv(o.map(s=>s.id)).catch(()=>{}),o})},[]),m=N.useCallback(async(g,a,o,s)=>{try{const c=await vv(g,s,o);r(g,p=>({...p,terminals:[...p.terminals,{id:c.id,title:c.title}]}))}catch(c){e(`ターミナルを起動できませんでした: ${Pe(c)}`)}},[r,e]),C=N.useCallback(async(g,a)=>{try{await gv(a),r(g,o=>({...o,terminals:o.terminals.filter(s=>s.id!==a)}))}catch(o){e(`ターミナルを削除できませんでした: ${Pe(o)}`)}},[r,e]),w=N.useCallback((g,a)=>{r(g,o=>({...o,terminals:o.terminals.filter(s=>s.id!==a)}))},[r]);return{decks:h,activeDeckIds:l,setActiveDeckIds:u,handleCreateDeck:f,handleDeleteDeck:y,handleReorderDecks:d,handleCreateTerminal:m,handleDeleteTerminal:C,handleRemoveTerminalLocal:w}},_0=({editorWorkspaceId:e,activeWorkspaceState:t,updateWorkspaceState:r,setStatusMessage:i})=>{const[n,h]=N.useState(null),_=N.useCallback(()=>{e&&(r(e,a=>({...a,treeLoading:!0,treeError:null})),Ne(hc(e,""),15e3).then(a=>{r(e,o=>({...o,tree:ls(a),treeLoading:!1}))}).catch(a=>{r(e,o=>({...o,treeLoading:!1,treeError:Pe(a)}))}))},[e,r]),l=N.useCallback(a=>{if(!(!e||a.type!=="dir")){if(a.expanded){r(e,o=>({...o,tree:Dr(o.tree,a.path,s=>({...s,expanded:!1}))}));return}if(a.children&&a.children.length>0){r(e,o=>({...o,tree:Dr(o.tree,a.path,s=>({...s,expanded:!0}))}));return}r(e,o=>({...o,tree:Dr(o.tree,a.path,s=>({...s,loading:!0}))})),Ne(hc(e,a.path),15e3).then(o=>{r(e,s=>({...s,tree:Dr(s.tree,a.path,c=>({...c,expanded:!0,loading:!1,children:ls(o)}))}))}).catch(o=>{r(e,s=>({...s,treeError:Pe(o),tree:Dr(s.tree,a.path,c=>({...c,loading:!1}))}))})}},[e,r]),u=N.useCallback(a=>{if(!e||a.type!=="file")return;const o=t.files.find(p=>p.path===a.path);if(o){r(e,p=>({...p,activeFileId:o.id}));return}const s=crypto.randomUUID(),c={id:s,name:a.name,path:a.path,language:cd(a.path),contents:"",dirty:!1};r(e,p=>({...p,files:[...p.files,{...c,contents:"読み込み中..."}],activeFileId:s})),Ne(uv(e,a.path),15e3).then(p=>{r(e,v=>({...v,files:v.files.map(x=>x.id===s?{...x,contents:p.contents}:x)}))}).catch(p=>{r(e,v=>({...v,files:v.files.filter(x=>x.id!==s),activeFileId:v.files.length>1?v.files[0].id:null})),i(`ファイルを開けませんでした: ${Pe(p)}`)})},[e,t.files,r,i]),f=N.useCallback((a,o)=>{e&&r(e,s=>({...s,files:s.files.map(c=>c.id===a?{...c,contents:o,dirty:!0}:c)}))},[e,r]),y=N.useCallback(async a=>{if(!e)return;const o=t.files.find(s=>s.id===a);if(o){h(a);try{await Ne(hv(e,o.path,o.contents),15e3),r(e,s=>({...s,files:s.files.map(c=>c.id===a?{...c,dirty:!1}:c)})),i(Jh)}catch(s){i(`保存に失敗しました: ${Pe(s)}`)}finally{h(null)}}},[e,t.files,r,i]),d=N.useCallback(a=>{e&&r(e,o=>{const s=o.files.findIndex(v=>v.id===a),c=o.files.filter(v=>v.id!==a);let p=o.activeFileId;return o.activeFileId===a&&(c.length===0?p=null:s>=c.length?p=c[c.length-1].id:p=c[s].id),{...o,files:c,activeFileId:p}})},[e,r]),m=N.useCallback(async(a,o)=>{if(!e)return;const s=a?`${a}/${o}`:o;try{await Ne(dv(e,s),15e3);const c={name:o,path:s,type:"file",expanded:!1,loading:!1};r(e,p=>({...p,tree:tl(p.tree,a,c)})),i(`ファイルを作成しました: ${o}`)}catch(c){i(`ファイル作成に失敗しました: ${Pe(c)}`)}},[e,r,i]),C=N.useCallback(async(a,o)=>{if(!e)return;const s=a?`${a}/${o}`:o;try{await Ne(pv(e,s),15e3);const c={name:o,path:s,type:"dir",expanded:!1,loading:!1,children:[]};r(e,p=>({...p,tree:tl(p.tree,a,c)})),i(`フォルダを作成しました: ${o}`)}catch(c){i(`フォルダ作成に失敗しました: ${Pe(c)}`)}},[e,r,i]),w=N.useCallback(async a=>{if(e)try{await Ne(fv(e,a),15e3),r(e,o=>{const s=o.files.filter(v=>v.path!==a);let c=o.activeFileId;const p=o.files.find(v=>v.path===a);return p&&o.activeFileId===p.id&&(c=s.length>0?s[0].id:null),{...o,files:s,activeFileId:c,tree:rl(o.tree,a)}}),i("ファイルを削除しました")}catch(o){i(`ファイル削除に失敗しました: ${Pe(o)}`)}},[e,r,i]),g=N.useCallback(async a=>{if(e)try{await Ne(_v(e,a),15e3),r(e,o=>{const s=o.files.filter(v=>!v.path.startsWith(a+"/")&&v.path!==a);let c=o.activeFileId;const p=o.files.find(v=>v.id===o.activeFileId);return p&&(p.path.startsWith(a+"/")||p.path===a)&&(c=s.length>0?s[0].id:null),{...o,files:s,activeFileId:c,tree:rl(o.tree,a)}}),i("フォルダを削除しました")}catch(o){i(`フォルダ削除に失敗しました: ${Pe(o)}`)}},[e,r,i]);return{savingFileId:n,handleRefreshTree:_,handleToggleDir:l,handleOpenFile:u,handleFileChange:f,handleSaveFile:y,handleCloseFile:d,handleCreateFile:m,handleCreateDirectory:C,handleDeleteFile:w,handleDeleteDirectory:g}};async function v0(e,t,r,i){if(!i.current[e]){i.current[e]=!0,t(e,n=>({...n,loading:!0,reposLoading:!0,error:null}));try{const h=(await Ne(yv(e)).catch(()=>({repos:[]}))).repos;t(e,d=>({...d,repos:h,reposLoading:!1,selectedRepoPath:d.selectedRepoPath??(h.length>0?h[0].path:null)}));const l=(r.current[e]||yi()).selectedRepoPath??(h.length>0?h[0].path:void 0),[u,f,y]=await Promise.all([Ne(id(e,l||void 0)),Ne(od(e,l||void 0)).catch(()=>({ahead:0,behind:0,hasUpstream:!1})),Ne(ld(e,l||void 0)).catch(()=>({hasRemote:!1,remotes:[]}))]);t(e,d=>({...d,status:u,branchStatus:f,hasRemote:y.hasRemote,loading:!1,error:null}))}catch(n){const h=n instanceof Error?n.message:"Failed to get git status";t(e,_=>({..._,status:null,loading:!1,reposLoading:!1,error:h}))}finally{i.current[e]=!1}}}async function m0(e,t,r,i){r(e,n=>({...n,selectedRepoPath:t,loading:!0}));try{const[n,h,_]=await Promise.all([Ne(id(e,t||void 0)),Ne(od(e,t||void 0)).catch(()=>({ahead:0,behind:0,hasUpstream:!1})),Ne(ld(e,t||void 0)).catch(()=>({hasRemote:!1,remotes:[]}))]);r(e,l=>({...l,status:n,branchStatus:h,hasRemote:_.hasRemote,loading:!1,branches:[],logs:[]}))}catch(n){const h=n instanceof Error?n.message:"Failed to get git status";i(h),r(e,_=>({..._,loading:!1}))}}async function g0(e,t,r,i,n){try{await nd(e,[t],r),await n()}catch(h){i(h instanceof Error?h.message:"Failed to stage file")}}async function y0(e,t,r,i,n){try{await sd(e,[t],r),await n()}catch(h){i(h instanceof Error?h.message:"Failed to unstage file")}}async function S0(e,t,r,i,n){if(t.length!==0)try{await nd(e,t,r),await n()}catch(h){i(h instanceof Error?h.message:"Failed to stage files")}}async function C0(e,t,r,i,n){if(t.length!==0)try{await sd(e,t,r),await n()}catch(h){i(h instanceof Error?h.message:"Failed to unstage files")}}async function w0(e,t,r,i,n){try{const h=await Sv(e,t.trim(),r);i(`Committed: ${h.summary.changes} changes, +${h.summary.insertions} -${h.summary.deletions}`),await n()}catch(h){i(h instanceof Error?h.message:"Failed to commit")}}async function x0(e,t,r,i,n){try{await Cv(e,[t],r),await n()}catch(h){i(h instanceof Error?h.message:"Failed to discard changes")}}async function b0(e,t,r,i,n){i(e,h=>({...h,diffPath:t.path,diffLoading:!0,diff:null}));try{const h=await wv(e,t.path,t.staged,r);i(e,_=>({..._,diff:h,diffLoading:!1}))}catch(h){n(h instanceof Error?h.message:"Failed to get diff"),i(e,_=>({..._,diffPath:null,diff:null,diffLoading:!1}))}}async function E0(e,t,r,i,n){r(e,h=>({...h,pushing:!0}));try{const h=await xv(e,t);i(`Pushed to ${h.branch}`),await n()}catch(h){i(h instanceof Error?h.message:"Failed to push")}finally{r(e,h=>({...h,pushing:!1}))}}async function k0(e,t,r,i,n){r(e,h=>({...h,pulling:!0}));try{const h=await bv(e,t);h.summary.changes>0?i(`Pulled: ${h.summary.changes} changes, +${h.summary.insertions} -${h.summary.deletions}`):i("Already up to date"),await n()}catch(h){i(h instanceof Error?h.message:"Failed to pull")}finally{r(e,h=>({...h,pulling:!1}))}}async function L0(e,t,r,i){try{await Ev(e,t),r("Fetched from remote"),await i()}catch(n){r(n instanceof Error?n.message:"Failed to fetch")}}async function D0(e,t,r,i){r(e,n=>({...n,branchesLoading:!0}));try{const n=await Ne(kv(e,t));r(e,h=>({...h,branches:n.branches,branchesLoading:!1}))}catch(n){i(n instanceof Error?n.message:"Failed to load branches"),r(e,h=>({...h,branchesLoading:!1}))}}async function R0(e,t,r,i,n,h){try{await Lv(e,t,r),i(`Switched to branch '${t}'`),await n(),await h()}catch(_){i(_ instanceof Error?_.message:"Failed to checkout branch")}}async function T0(e,t,r,i,n,h,_){try{await Dv(e,t,r,i),n(`Created branch '${t}'${r?" and switched to it":""}`),await h(),await _()}catch(l){n(l instanceof Error?l.message:"Failed to create branch")}}async function A0(e,t,r,i,n){i(e,h=>({...h,logsLoading:!0}));try{const h=await Ne(Rv(e,t,r));i(e,_=>({..._,logs:h.logs,logsLoading:!1}))}catch(h){n(h instanceof Error?h.message:"Failed to load git log"),i(e,_=>({..._,logsLoading:!1}))}}const yi=()=>({status:null,loading:!1,error:null,diffPath:null,diff:null,diffLoading:!1,branchStatus:null,hasRemote:!1,pushing:!1,pulling:!1,branches:[],branchesLoading:!1,logs:[],logsLoading:!1,repos:[],reposLoading:!1,selectedRepoPath:null}),P0=(e,t)=>{const[r,i]=N.useState({}),n=N.useRef({}),h=N.useRef(r);h.current=r;const _=e&&r[e]||yi(),l=N.useCallback((T,B)=>{i(z=>({...z,[T]:B(z[T]||yi())}))},[]),u=N.useCallback(async T=>{const B=T||e;B&&await v0(B,l,h,n)},[e,l]),f=N.useCallback(async T=>{e&&await m0(e,T,l,t)},[e,l,t]),y=N.useCallback(async()=>{const T=Object.keys(h.current);await Promise.all(T.map(B=>u(B)))},[u]),d=N.useCallback(()=>{if(!e)return;const T=h.current[e];return(T==null?void 0:T.selectedRepoPath)||void 0},[e]),m=N.useCallback(async T=>{e&&await g0(e,T,d(),t,u)},[e,d,t,u]),C=N.useCallback(async T=>{e&&await y0(e,T,d(),t,u)},[e,d,t,u]),w=N.useCallback(async()=>{if(!e||!_.status)return;const T=_.status.files.filter(B=>!B.staged).map(B=>B.path);await S0(e,T,d(),t,u)},[e,_.status,d,t,u]),g=N.useCallback(async()=>{if(!e||!_.status)return;const T=_.status.files.filter(B=>B.staged).map(B=>B.path);await C0(e,T,d(),t,u)},[e,_.status,d,t,u]),a=N.useCallback(async T=>{!e||!T.trim()||await w0(e,T,d(),t,u)},[e,d,t,u]),o=N.useCallback(async T=>{e&&await x0(e,T,d(),t,u)},[e,d,t,u]),s=N.useCallback(async T=>{e&&await b0(e,T,d(),l,t)},[e,d,l,t]),c=N.useCallback(()=>{e&&l(e,T=>({...T,diffPath:null,diff:null,diffLoading:!1}))},[e,l]),p=N.useCallback(async()=>{e&&await E0(e,d(),l,t,u)},[e,d,l,t,u]),v=N.useCallback(async()=>{e&&await k0(e,d(),l,t,u)},[e,d,l,t,u]),x=N.useCallback(async()=>{e&&await L0(e,d(),t,u)},[e,d,t,u]),b=N.useCallback(async()=>{e&&await D0(e,d(),l,t)},[e,d,l,t]),S=N.useCallback(async T=>{e&&await R0(e,T,d(),t,u,b)},[e,d,t,u,b]),k=N.useCallback(async(T,B=!0)=>{e&&await T0(e,T,B,d(),t,u,b)},[e,d,t,u,b]),R=N.useCallback(async(T=50)=>{e&&await A0(e,T,d(),l,t)},[e,d,l,t]),O=N.useCallback(T=>r[T]||yi(),[r]);return{gitState:_,gitStates:r,refreshGitStatus:u,refreshAllGitStatuses:y,getGitStateForWorkspace:O,handleSelectRepo:f,handleStageFile:m,handleUnstageFile:C,handleStageAll:w,handleUnstageAll:g,handleCommit:a,handleDiscardFile:o,handleShowDiff:s,handleCloseDiff:c,handlePush:p,handlePull:v,handleFetch:x,handleLoadBranches:b,handleCheckoutBranch:S,handleCreateBranch:k,handleLoadLogs:R}};function M0(){const[e,t]=N.useState(Xv);N.useEffect(()=>{if(!(typeof document>"u")){document.documentElement.dataset.theme=e;try{window.localStorage.setItem(td,e)}catch{}}},[e]);const r=N.useCallback(()=>{t(i=>i==="dark"?"light":"dark")},[]);return{theme:e,handleToggleTheme:r}}function B0({view:e,editorWorkspaceId:t,activeDeckIds:r,workspaceMode:i,setView:n,setEditorWorkspaceId:h,setActiveDeckIds:_,setWorkspaceMode:l}){N.useEffect(()=>{const u=()=>{const f=ud();n(f.view),h(f.workspaceId??null),_(f.deckIds),l(f.workspaceMode)};return window.addEventListener("popstate",u),()=>window.removeEventListener("popstate",u)},[n,h,_,l]),N.useEffect(()=>{const u=new URLSearchParams;u.set("view",e),e==="workspace"&&t&&u.set("workspace",t),r.length>0&&u.set("decks",r.join(",")),e==="workspace"&&i==="editor"&&t&&u.set("mode","editor");const f=u.toString(),y=f?`${window.location.pathname}?${f}`:window.location.pathname;window.history.replaceState(null,"",y)},[e,t,r,i])}function O0(){const[e,t]=N.useState(!1),[r,i]=N.useState(!1),[n,h]=N.useState(!1),_=N.useCallback(()=>t(!0),[]),l=N.useCallback(()=>t(!1),[]),u=N.useCallback(()=>i(!0),[]),f=N.useCallback(()=>i(!1),[]),y=N.useCallback(()=>h(!0),[]),d=N.useCallback(()=>h(!1),[]);return{isWorkspaceModalOpen:e,openWorkspaceModal:_,closeWorkspaceModal:l,isDeckModalOpen:r,openDeckModal:u,closeDeckModal:f,isSettingsModalOpen:n,openSettingsModal:y,closeSettingsModal:d}}const Ac=3;function Pc(e,t,r){const i=e.indexOf(t),n=e.indexOf(r);if(i<0||n<0||i===n)return e;const h=[...e];h.splice(i,1);const _=h.indexOf(r);return h.splice(_,0,t),h}function N0(){const e=ud(),t=N.useRef(null),r=N.useRef(!1),[i,n]=N.useState(e.view),[h,_]=N.useState(e.workspaceMode),[l,u]=N.useState(q_),[f,y]=N.useState(""),[d,m]=N.useState(null),[C,w]=N.useState(null),[g,a]=N.useState(!1),[o,s]=N.useState(!1),[c,p]=N.useState(null),{theme:v,handleToggleTheme:x}=M0(),{isWorkspaceModalOpen:b,openWorkspaceModal:S,closeWorkspaceModal:k,isDeckModalOpen:R,openDeckModal:O,closeDeckModal:T,isSettingsModalOpen:B,openSettingsModal:z,closeSettingsModal:I}=O0(),{workspaceStates:j,setWorkspaceStates:$,updateWorkspaceState:E,initializeWorkspaceStates:A}=h0(),{deckStates:P,setDeckStates:M,updateDeckState:H,initializeDeckStates:K}=d0(),{workspaces:X,editorWorkspaceId:q,setEditorWorkspaceId:se,handleCreateWorkspace:D,handleDeleteWorkspace:F}=f0({setStatusMessage:y,defaultRoot:l,initializeWorkspaceStates:A,setWorkspaceStates:$}),{decks:W,activeDeckIds:U,setActiveDeckIds:re,handleCreateDeck:Q,handleDeleteDeck:ae,handleReorderDecks:we,handleCreateTerminal:fe,handleDeleteTerminal:ut,handleRemoveTerminalLocal:ne}=p0({setStatusMessage:y,initializeDeckStates:K,updateDeckState:H,setDeckStates:M,initialDeckIds:e.deckIds}),ht=N.useMemo(()=>ss(),[]),Ye=N.useMemo(()=>os(),[]),Ut=X.find(V=>V.id===q)||null,J=q&&j[q]||ht,{savingFileId:Y,handleRefreshTree:te,handleToggleDir:ie,handleOpenFile:oe,handleFileChange:ce,handleSaveFile:Be,handleCloseFile:me,handleCreateFile:Tt,handleCreateDirectory:Ve,handleDeleteFile:At,handleDeleteDirectory:pe}=_0({editorWorkspaceId:q,activeWorkspaceState:J,updateWorkspaceState:E,setStatusMessage:y}),{gitState:ni,refreshGitStatus:ks,handleSelectRepo:yd,handleStageFile:Sd,handleUnstageFile:Cd,handleStageAll:wd,handleUnstageAll:xd,handleCommit:bd,handleDiscardFile:Ed,handleShowDiff:kd,handleCloseDiff:Ld,handlePush:Dd,handlePull:Rd,handleLoadBranches:Td,handleCheckoutBranch:Ad,handleCreateBranch:Pd,handleLoadLogs:Md}=P0(q,y);B0({view:i,editorWorkspaceId:q,activeDeckIds:U,workspaceMode:h,setView:n,setEditorWorkspaceId:se,setActiveDeckIds:re,setWorkspaceMode:_});const Bd=ev(),Ql=N.useMemo(()=>new Map(X.map(V=>[V.id,V])),[X]),Ls=W;N.useEffect(()=>{let V=!0;return iv().then(ee=>{V&&ee!=null&&ee.defaultRoot&&u(ee.defaultRoot)}).catch(()=>{}),()=>{V=!1}},[]),N.useEffect(()=>{if(f!==Jh)return;const V=setTimeout(()=>y(""),Y_);return()=>clearTimeout(V)},[f]),N.useEffect(()=>{h==="editor"&&!q&&_("list")},[h,q]),N.useEffect(()=>{if(typeof window>"u")return;const V=window.matchMedia("(pointer: fine) and (min-width: 721px)"),ee=()=>s(V.matches);return ee(),V.addEventListener("change",ee),()=>V.removeEventListener("change",ee)},[]);const Pt=N.useCallback(()=>{m(null),w(null),a(!1)},[]),tn=N.useCallback(()=>{r.current=!0,window.setTimeout(()=>{r.current=!1},100)},[]);N.useEffect(()=>{o||Pt()},[o,Pt]);const Ds=N.useRef(null);N.useEffect(()=>{if(h!=="editor"||!q){Ds.current=null;return}Ds.current!==q&&(Ds.current=q,te(),ks())},[h,q,te,ks]);const Od=N.useCallback(()=>{if(X.length===0){y(G_);return}O()},[X.length,O]),Nd=N.useCallback(async(V,ee)=>{if(!ee){y(X_);return}await Q(V,ee)&&T()},[Q,T]),jd=N.useCallback(async V=>{try{const ee=await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)});if(!ee.ok){const ge=await ee.text();throw new Error(ge||"Failed to save settings")}await ee.json(),y("設定を保存しました。ブラウザをリロードしてください。"),setTimeout(()=>{window.location.reload()},2e3)}catch(ee){throw console.error("Failed to save settings:",ee),ee}},[]),Id=N.useCallback(V=>{se(V),_("editor")},[se]),Fd=N.useCallback(()=>{_("list")},[]),Hd=N.useCallback(async V=>{await D(V)&&k()},[D,k]),zd=N.useCallback(V=>{const ee=P[V]||Ye;fe(V,ee.terminals.length)},[P,Ye,fe]),$d=N.useCallback(V=>{const ee=P[V]||Ye;fe(V,ee.terminals.length,"claude","Claude Code")},[P,Ye,fe]),Ud=N.useCallback(V=>{const ee=P[V]||Ye;fe(V,ee.terminals.length,"codex","Codex")},[P,Ye,fe]),Wd=N.useCallback((V,ee)=>{ut(V,ee)},[ut]),Vd=N.useCallback((V,ee)=>{ne(V,ee)},[ne]),Kd=N.useCallback(V=>{if(r.current){r.current=!1;return}re([V])},[re]),Jl=N.useCallback(V=>{re(ee=>{const ge=[...ee.filter(_e=>_e!==V),V];return ge.length<=Ac?ge:ge.slice(ge.length-Ac)})},[re]),qd=N.useCallback(V=>{re(ee=>{if(ee.length<=1){const ge=Ls.find(_e=>_e.id!==V);return ge?[ge.id]:ee}return ee.filter(ge=>ge!==V)})},[Ls,re]),Gd=N.useCallback((V,ee)=>{V.preventDefault(),V.stopPropagation(),p({deckId:ee,x:V.clientX,y:V.clientY})},[]),Xd=N.useCallback(()=>{if(!c)return;const{deckId:V}=c;p(null),window.confirm(`このデッキを完全に削除しますか?
|
|
63
|
+
`},Rc=Jm(rg)(hd),ig={config:eg},ng=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return function(n){return r.reduceRight(function(h,_){return _(h)},n)}};function dd(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],dd(e[r],t[r]))}),kc(kc({},e),t)}var sg={type:"cancelation",msg:"operation is manually canceled"};function no(e){var t=!1,r=new Promise(function(i,n){e.then(function(h){return t?n(sg):i(h)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var og=["monaco"],lg=Ym.create({config:Qm,isInitialized:!1,resolve:null,reject:null,monaco:null}),fd=Pm(lg,2),en=fd[0],Es=fd[1];function ag(e){var t=ig.config(e),r=t.monaco,i=Tm(t,og);Es(function(n){return{config:dd(n.config,i),monaco:r}})}function cg(){var e=en(function(t){var r=t.monaco,i=t.isInitialized,n=t.resolve;return{monaco:r,isInitialized:i,resolve:n}});if(!e.isInitialized){if(Es({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),no(so);if(window.monaco&&window.monaco.editor)return pd(window.monaco),e.resolve(window.monaco),no(so);ng(ug,dg)(fg)}return no(so)}function ug(e){return document.body.appendChild(e)}function hg(e){var t=document.createElement("script");return e&&(t.src=e),t}function dg(e){var t=en(function(i){var n=i.config,h=i.reject;return{config:n,reject:h}}),r=hg("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function fg(){var e=en(function(r){var i=r.config,n=r.resolve,h=r.reject;return{config:i,resolve:n,reject:h}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var i=r.m||r;pd(i),e.resolve(i)},function(r){e.reject(r)})}function pd(e){en().monaco||Es({monaco:e})}function pg(){return en(function(e){var t=e.monaco;return t})}var so=new Promise(function(e,t){return Es({resolve:e,reject:t})}),_d={config:ag,init:cg,__getMonacoInstance:pg},_g={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},oo=_g,vg={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},mg=vg;function gg({children:e}){return vr.createElement("div",{style:mg.container},e)}var yg=gg,Sg=yg;function Cg({width:e,height:t,isEditorReady:r,loading:i,_ref:n,className:h,wrapperProps:_}){return vr.createElement("section",{style:{...oo.wrapper,width:e,height:t},..._},!r&&vr.createElement(Sg,null,i),vr.createElement("div",{ref:n,style:{...oo.fullWidth,...!r&&oo.hide},className:h}))}var wg=Cg,vd=N.memo(wg);function xg(e){N.useEffect(e,[])}var md=xg;function bg(e,t,r=!0){let i=N.useRef(!0);N.useEffect(i.current||!r?()=>{i.current=!1}:e,t)}var nt=bg;function Ri(){}function zr(e,t,r,i){return Eg(e,i)||kg(e,t,r,i)}function Eg(e,t){return e.editor.getModel(gd(e,t))}function kg(e,t,r,i){return e.editor.createModel(t,r,i?gd(e,i):void 0)}function gd(e,t){return e.Uri.parse(t)}function Lg({original:e,modified:t,language:r,originalLanguage:i,modifiedLanguage:n,originalModelPath:h,modifiedModelPath:_,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:u=!1,theme:f="light",loading:y="Loading...",options:d={},height:m="100%",width:C="100%",className:w,wrapperProps:g={},beforeMount:a=Ri,onMount:o=Ri}){let[s,c]=N.useState(!1),[p,v]=N.useState(!0),x=N.useRef(null),b=N.useRef(null),S=N.useRef(null),k=N.useRef(o),R=N.useRef(a),O=N.useRef(!1);md(()=>{let I=_d.init();return I.then(j=>(b.current=j)&&v(!1)).catch(j=>(j==null?void 0:j.type)!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>x.current?z():I.cancel()}),nt(()=>{if(x.current&&b.current){let I=x.current.getOriginalEditor(),j=zr(b.current,e||"",i||r||"text",h||"");j!==I.getModel()&&I.setModel(j)}},[h],s),nt(()=>{if(x.current&&b.current){let I=x.current.getModifiedEditor(),j=zr(b.current,t||"",n||r||"text",_||"");j!==I.getModel()&&I.setModel(j)}},[_],s),nt(()=>{let I=x.current.getModifiedEditor();I.getOption(b.current.editor.EditorOption.readOnly)?I.setValue(t||""):t!==I.getValue()&&(I.executeEdits("",[{range:I.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),I.pushUndoStop())},[t],s),nt(()=>{var I,j;(j=(I=x.current)==null?void 0:I.getModel())==null||j.original.setValue(e||"")},[e],s),nt(()=>{let{original:I,modified:j}=x.current.getModel();b.current.editor.setModelLanguage(I,i||r||"text"),b.current.editor.setModelLanguage(j,n||r||"text")},[r,i,n],s),nt(()=>{var I;(I=b.current)==null||I.editor.setTheme(f)},[f],s),nt(()=>{var I;(I=x.current)==null||I.updateOptions(d)},[d],s);let T=N.useCallback(()=>{var $;if(!b.current)return;R.current(b.current);let I=zr(b.current,e||"",i||r||"text",h||""),j=zr(b.current,t||"",n||r||"text",_||"");($=x.current)==null||$.setModel({original:I,modified:j})},[r,t,n,e,i,h,_]),B=N.useCallback(()=>{var I;!O.current&&S.current&&(x.current=b.current.editor.createDiffEditor(S.current,{automaticLayout:!0,...d}),T(),(I=b.current)==null||I.editor.setTheme(f),c(!0),O.current=!0)},[d,f,T]);N.useEffect(()=>{s&&k.current(x.current,b.current)},[s]),N.useEffect(()=>{!p&&!s&&B()},[p,s,B]);function z(){var j,$,E,A;let I=(j=x.current)==null?void 0:j.getModel();l||(($=I==null?void 0:I.original)==null||$.dispose()),u||((E=I==null?void 0:I.modified)==null||E.dispose()),(A=x.current)==null||A.dispose()}return vr.createElement(vd,{width:C,height:m,isEditorReady:s,loading:y,_ref:S,className:w,wrapperProps:g})}var Dg=Lg,Rg=N.memo(Dg);function Tg(e){let t=N.useRef();return N.useEffect(()=>{t.current=e},[e]),t.current}var Ag=Tg,Cn=new Map;function Pg({defaultValue:e,defaultLanguage:t,defaultPath:r,value:i,language:n,path:h,theme:_="light",line:l,loading:u="Loading...",options:f={},overrideServices:y={},saveViewState:d=!0,keepCurrentModel:m=!1,width:C="100%",height:w="100%",className:g,wrapperProps:a={},beforeMount:o=Ri,onMount:s=Ri,onChange:c,onValidate:p=Ri}){let[v,x]=N.useState(!1),[b,S]=N.useState(!0),k=N.useRef(null),R=N.useRef(null),O=N.useRef(null),T=N.useRef(s),B=N.useRef(o),z=N.useRef(),I=N.useRef(i),j=Ag(h),$=N.useRef(!1),E=N.useRef(!1);md(()=>{let M=_d.init();return M.then(H=>(k.current=H)&&S(!1)).catch(H=>(H==null?void 0:H.type)!=="cancelation"&&console.error("Monaco initialization: error:",H)),()=>R.current?P():M.cancel()}),nt(()=>{var H,K,X,q;let M=zr(k.current,e||i||"",t||n||"",h||r||"");M!==((H=R.current)==null?void 0:H.getModel())&&(d&&Cn.set(j,(K=R.current)==null?void 0:K.saveViewState()),(X=R.current)==null||X.setModel(M),d&&((q=R.current)==null||q.restoreViewState(Cn.get(h))))},[h],v),nt(()=>{var M;(M=R.current)==null||M.updateOptions(f)},[f],v),nt(()=>{!R.current||i===void 0||(R.current.getOption(k.current.editor.EditorOption.readOnly)?R.current.setValue(i):i!==R.current.getValue()&&(E.current=!0,R.current.executeEdits("",[{range:R.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),R.current.pushUndoStop(),E.current=!1))},[i],v),nt(()=>{var H,K;let M=(H=R.current)==null?void 0:H.getModel();M&&n&&((K=k.current)==null||K.editor.setModelLanguage(M,n))},[n],v),nt(()=>{var M;l!==void 0&&((M=R.current)==null||M.revealLine(l))},[l],v),nt(()=>{var M;(M=k.current)==null||M.editor.setTheme(_)},[_],v);let A=N.useCallback(()=>{var M;if(!(!O.current||!k.current)&&!$.current){B.current(k.current);let H=h||r,K=zr(k.current,i||e||"",t||n||"",H||"");R.current=(M=k.current)==null?void 0:M.editor.create(O.current,{model:K,automaticLayout:!0,...f},y),d&&R.current.restoreViewState(Cn.get(H)),k.current.editor.setTheme(_),l!==void 0&&R.current.revealLine(l),x(!0),$.current=!0}},[e,t,r,i,n,h,f,y,d,_,l]);N.useEffect(()=>{v&&T.current(R.current,k.current)},[v]),N.useEffect(()=>{!b&&!v&&A()},[b,v,A]),I.current=i,N.useEffect(()=>{var M,H;v&&c&&((M=z.current)==null||M.dispose(),z.current=(H=R.current)==null?void 0:H.onDidChangeModelContent(K=>{E.current||c(R.current.getValue(),K)}))},[v,c]),N.useEffect(()=>{if(v){let M=k.current.editor.onDidChangeMarkers(H=>{var X;let K=(X=R.current.getModel())==null?void 0:X.uri;if(K&&H.find(q=>q.path===K.path)){let q=k.current.editor.getModelMarkers({resource:K});p==null||p(q)}});return()=>{M==null||M.dispose()}}return()=>{}},[v,p]);function P(){var M,H;(M=z.current)==null||M.dispose(),m?d&&Cn.set(h,R.current.saveViewState()):(H=R.current.getModel())==null||H.dispose(),R.current.dispose()}return vr.createElement(vd,{width:C,height:w,isEditorReady:v,loading:u,_ref:O,className:g,wrapperProps:a})}var Mg=Pg,Bg=N.memo(Mg),Og=Bg;const Tc="ファイルを選択してください",Ng="vs-dark",jg="vs";function Ig(e){var i;const t=((i=e.split(".").pop())==null?void 0:i.toLowerCase())||"";return{ts:{icon:"TS",color:"#3178c6"},tsx:{icon:"TSX",color:"#3178c6"},js:{icon:"JS",color:"#f7df1e"},jsx:{icon:"JSX",color:"#61dafb"},json:{icon:"{ }",color:"#cbcb41"},html:{icon:"<>",color:"#e34c26"},css:{icon:"#",color:"#264de4"},scss:{icon:"S",color:"#cc6699"},md:{icon:"M↓",color:"#083fa1"},py:{icon:"PY",color:"#3776ab"},go:{icon:"GO",color:"#00add8"},rs:{icon:"RS",color:"#dea584"},java:{icon:"J",color:"#b07219"},sql:{icon:"SQL",color:"#e38c00"},yml:{icon:"Y",color:"#cb171e"},yaml:{icon:"Y",color:"#cb171e"},sh:{icon:"$",color:"#89e051"},bash:{icon:"$",color:"#89e051"},txt:{icon:"TXT",color:"#6a737d"}}[t]||{icon:"📄",color:"var(--ink-muted)"}}function Fg(e){return{typescript:"TypeScript",typescriptreact:"TypeScript React",javascript:"JavaScript",javascriptreact:"JavaScript React",json:"JSON",html:"HTML",css:"CSS",scss:"SCSS",markdown:"Markdown",python:"Python",go:"Go",rust:"Rust",java:"Java",sql:"SQL",yaml:"YAML",shell:"Shell",plaintext:"Plain Text"}[e]||e}function Hg({files:e,activeFileId:t,onSelectFile:r,onCloseFile:i,onChangeFile:n,onSaveFile:h,savingFileId:_,theme:l}){const u=e.find(g=>g.id===t),f=N.useRef(null),[y,d]=N.useState({line:1,column:1}),m=N.useCallback(g=>{f.current=g,g.onDidChangeCursorPosition(a=>{d({line:a.position.lineNumber,column:a.position.column})})},[]);N.useEffect(()=>{const g=a=>{!t||!((a.ctrlKey||a.metaKey)&&a.key.toLowerCase()==="s")||(a.preventDefault(),h==null||h(t))};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[t,h]);const C=(g,a)=>{g.stopPropagation(),i(a)},w=(g,a)=>{g.button===1&&(g.preventDefault(),i(a))};return e.length===0?L.jsx("div",{className:"editor-container editor-empty",children:L.jsxs("div",{className:"editor-welcome",children:[L.jsx("div",{className:"editor-welcome-icon",children:L.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[L.jsx("path",{d:"M13 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V9z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),L.jsx("polyline",{points:"13 2 13 9 20 9",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),L.jsx("div",{className:"editor-welcome-text",children:Tc}),L.jsx("div",{className:"editor-welcome-hint",children:"左のファイルツリーからファイルを選択"})]})}):L.jsxs("div",{className:"editor-container",children:[L.jsx("div",{className:"editor-tabs",children:L.jsx("div",{className:"editor-tabs-list",children:e.map(g=>{const{icon:a,color:o}=Ig(g.name),s=g.id===t,c=_===g.id;return L.jsxs("div",{className:Ie("editor-tab",s&&"active",g.dirty&&"dirty"),onClick:()=>r(g.id),onMouseDown:p=>w(p,g.id),role:"tab","aria-selected":s,tabIndex:0,children:[L.jsx("span",{className:"editor-tab-icon",style:{color:o},children:a}),L.jsx("span",{className:"editor-tab-name",children:g.name}),g.dirty&&!c&&L.jsx("span",{className:"editor-tab-dirty","aria-label":"未保存",children:"●"}),c&&L.jsx("span",{className:"editor-tab-saving","aria-label":"保存中",children:L.jsx("svg",{viewBox:"0 0 24 24",className:"spin",children:L.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"30 70"})})}),L.jsx("button",{type:"button",className:"editor-tab-close",onClick:p=>C(p,g.id),"aria-label":"閉じる",children:L.jsx("svg",{viewBox:"0 0 24 24",children:L.jsx("path",{d:"M18 6L6 18M6 6l12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]},g.id)})})}),u&&L.jsx("div",{className:"editor-breadcrumb",children:L.jsx("span",{className:"editor-breadcrumb-path",children:u.path})}),L.jsx("div",{className:"editor-content",children:u?L.jsx(Og,{height:"100%",theme:l==="dark"?Ng:jg,language:u.language,value:u.contents,onChange:g=>n(u.id,g??""),onMount:m,options:{fontFamily:Zh,fontSize:ed,fontLigatures:!0,minimap:{enabled:!0,scale:1,showSlider:"mouseover"},smoothScrolling:!0,cursorBlinking:"smooth",cursorSmoothCaretAnimation:"on",renderLineHighlight:"all",scrollBeyondLastLine:!1,automaticLayout:!0,padding:{top:8,bottom:8},lineNumbers:"on",renderWhitespace:"selection",bracketPairColorization:{enabled:!0},guides:{bracketPairs:!0,indentation:!0}}}):L.jsx("div",{className:"editor-no-file",children:L.jsx("span",{children:Tc})})}),u&&L.jsxs("div",{className:"editor-statusbar",children:[L.jsx("div",{className:"editor-statusbar-left",children:L.jsxs("span",{className:"editor-status-item",children:[L.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[L.jsx("path",{d:"M6 3v12M18 9a3 3 0 110 6 3 3 0 010-6zM6 21a3 3 0 110-6 3 3 0 010 6z",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),L.jsx("path",{d:"M18 12c0 3-3 4-6 4s-6-1-6-4",fill:"none",stroke:"currentColor",strokeWidth:"2"})]}),"main"]})}),L.jsxs("div",{className:"editor-statusbar-right",children:[L.jsxs("span",{className:"editor-status-item",children:["Ln ",y.line,", Col ",y.column]}),L.jsx("span",{className:"editor-status-item",children:"UTF-8"}),L.jsx("span",{className:"editor-status-item",children:Fg(u.language)})]})]})]})}const zg="差分ビューア",$g="読み込み中...",Ug="閉じる",Wg="vs-dark",Vg="vs";function Kg({diff:e,loading:t,theme:r,onClose:i}){const n=e?cd(e.path):"plaintext";return L.jsxs("div",{className:"fixed inset-0 bg-bg z-50 grid grid-rows-[35px_minmax(0,1fr)]",children:[L.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 bg-title-bar border-b border-border",children:[L.jsxs("div",{children:[L.jsx("div",{className:"text-[13px] font-medium",children:zg}),e&&L.jsx("div",{className:"text-xs text-muted font-mono",children:e.path})]}),L.jsx("button",{type:"button",className:"bg-transparent text-ink border-0 px-2 py-1 text-xs rounded-[2px] cursor-pointer hover:bg-list-hover",onClick:i,children:Ug})]}),L.jsx("div",{className:"min-h-0 overflow-hidden",children:t?L.jsx("div",{className:"flex items-center justify-center h-full text-muted text-[13px] p-5",children:$g}):e?L.jsx(Rg,{height:"100%",theme:r==="dark"?Wg:Vg,language:n,original:e.original,modified:e.modified,options:{fontFamily:Zh,fontSize:ed,readOnly:!0,renderSideBySide:!0,minimap:{enabled:!1},smoothScrolling:!0}}):null})]})}function qg({activeWorkspace:e,defaultRoot:t,activeWorkspaceState:r,editorWorkspaceId:i,gitState:n,theme:h,savingFileId:_,onCloseWorkspaceEditor:l,onToggleDir:u,onOpenFile:f,onRefreshTree:y,onCreateFile:d,onCreateDirectory:m,onDeleteFile:C,onDeleteDirectory:w,onRefreshGit:g,onSelectRepo:a,onStageFile:o,onUnstageFile:s,onStageAll:c,onUnstageAll:p,onCommit:v,onDiscardFile:x,onShowDiff:b,onCloseDiff:S,onPush:k,onPull:R,onLoadBranches:O,onCheckoutBranch:T,onCreateBranch:B,onLoadLogs:z,onSelectFile:I,onCloseFile:j,onChangeFile:$,onSaveFile:E}){var q,se;const[A,P]=N.useState(!1),[M,H]=N.useState("files"),K=N.useCallback(D=>{f(D),P(!1)},[f]),X=((q=n.status)==null?void 0:q.files.length)??0;return L.jsxs("div",{className:Ie("workspace-editor-overlay",A&&"drawer-open"),children:[L.jsxs("div",{className:"workspace-editor-header",children:[L.jsx("button",{type:"button",className:"bg-transparent text-ink border-0 px-2 py-1 text-xs rounded-[2px] cursor-pointer hover:bg-list-hover",onClick:l,children:"一覧に戻る"}),L.jsx("button",{type:"button",className:"sidebar-toggle-btn bg-transparent text-ink border-0 px-2 py-1 text-xs rounded-[2px] cursor-pointer hover:bg-list-hover min-h-[44px] min-w-[44px]",onClick:()=>P(D=>!D),"aria-label":"\\u30b5\\u30a4\\u30c9\\u30d0\\u30fc",children:L.jsx("svg",{viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:L.jsx("path",{d:"M3 12h18M3 6h18M3 18h18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),L.jsx("div",{className:"workspace-meta",children:e?e.path:null})]}),L.jsxs("div",{className:"workspace-editor-grid",children:[L.jsxs("div",{className:"activity-bar",children:[L.jsx("button",{type:"button",className:Ie("activity-bar-item",M==="files"&&"active"),onClick:()=>H("files"),title:"エクスプローラー",children:L.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:L.jsx("path",{d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),L.jsxs("button",{type:"button",className:Ie("activity-bar-item",M==="git"&&"active"),onClick:()=>{H("git"),g()},title:"ソースコントロール",children:[L.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[L.jsx("path",{d:"M6 3v12M18 9a3 3 0 110 6 3 3 0 010-6zM6 21a3 3 0 110-6 3 3 0 010 6z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),L.jsx("path",{d:"M18 12c0 3-3 4-6 4s-6-1-6-4",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})]}),X>0&&L.jsx("span",{className:"activity-bar-badge",children:X})]})]}),L.jsx("div",{className:"sidebar-panel",children:L.jsx("div",{className:"sidebar-content",children:M==="files"?L.jsx(ad,{root:(e==null?void 0:e.path)||t||"",entries:r.tree,loading:r.treeLoading,error:r.treeError,onToggleDir:u,onOpenFile:K,onRefresh:y,onCreateFile:d,onCreateDirectory:m,onDeleteFile:C,onDeleteDirectory:w,gitFiles:(se=n.status)==null?void 0:se.files}):L.jsx(Em,{status:n.status,loading:n.loading,error:n.error,workspaceId:i,branchStatus:n.branchStatus,hasRemote:n.hasRemote,pushing:n.pushing,pulling:n.pulling,branches:n.branches,branchesLoading:n.branchesLoading,logs:n.logs,logsLoading:n.logsLoading,repos:n.repos,selectedRepoPath:n.selectedRepoPath,onSelectRepo:a,onRefresh:g,onStageFile:o,onUnstageFile:s,onStageAll:c,onUnstageAll:p,onCommit:v,onDiscardFile:x,onShowDiff:b,onPush:k,onPull:R,onLoadBranches:O,onCheckoutBranch:T,onCreateBranch:B,onLoadLogs:z})})}),L.jsx(Hg,{files:r.files,activeFileId:r.activeFileId,onSelectFile:I,onCloseFile:j,onChangeFile:$,onSaveFile:E,savingFileId:_,theme:h})]}),L.jsx("div",{className:"sidebar-overlay",onClick:()=>P(!1),"aria-hidden":"true"}),n.diffPath&&L.jsx(Kg,{diff:n.diff,loading:n.diffLoading,theme:h,onClose:S})]})}const Gg="設定",Xg="サーバー設定",Yg="ポート番号",Qg="Basic認証",Jg="Basic認証を有効にする",Zg="ユーザー名",e0="パスワード",t0="※ 12文字以上推奨",r0="キャンセル",i0="保存",n0="※ 設定を保存すると、サーバーが再起動されます",s0="WebSocket設定",o0="接続数上限 (IP毎)",l0="現在の接続数",a0="全接続をクリア",c0="適用",wn="bg-panel border border-border rounded-[2px] px-2 py-1.5 text-[13px] font-mono text-ink focus:outline-none focus:border-focus";function u0({isOpen:e,onClose:t,onSave:r}){const[i,n]=N.useState(8787),[h,_]=N.useState(!1),[l,u]=N.useState(""),[f,y]=N.useState(""),[d,m]=N.useState(!1),[C,w]=N.useState(1e3),[g,a]=N.useState(null),[o,s]=N.useState(!1),c=()=>{fetch("/api/ws/stats").then(b=>b.json()).then(b=>{a(b),w(b.limit)}).catch(b=>{console.error("Failed to load WS stats:",b)})};N.useEffect(()=>{if(!e)return;const b=S=>{S.key==="Escape"&&(S.preventDefault(),t())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[e,t]),N.useEffect(()=>{e&&(fetch("/api/settings").then(b=>b.json()).then(b=>{n(b.port),_(b.basicAuthEnabled),u(b.basicAuthUser),y(b.basicAuthPassword)}).catch(b=>{console.error("Failed to load settings:",b)}),c())},[e]);const p=async()=>{try{await fetch("/api/ws/limit",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:C})}),c()}catch(b){console.error("Failed to set WS limit:",b)}},v=async()=>{s(!0);try{await fetch("/api/ws/clear",{method:"POST"}),c()}catch(b){console.error("Failed to clear WS connections:",b)}finally{s(!1)}},x=async b=>{b.preventDefault(),m(!0);try{await r({port:i,basicAuthEnabled:h,basicAuthUser:l,basicAuthPassword:f}),t()}catch(S){console.error("Failed to save settings:",S),alert("設定の保存に失敗しました")}finally{m(!1)}};return e?L.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[500]",role:"dialog","aria-modal":"true","aria-labelledby":"settings-modal-title",onClick:t,children:L.jsxs("div",{className:"modal w-[500px]",onClick:b=>b.stopPropagation(),children:[L.jsxs("div",{className:"flex items-center justify-between mb-4",children:[L.jsx("h2",{className:"m-0 text-[14px] font-semibold",id:"settings-modal-title",children:Gg}),L.jsx("button",{type:"button",className:"modal-close-btn",onClick:t,"aria-label":"閉じる",children:"×"})]}),L.jsxs("form",{onSubmit:x,children:[L.jsxs("div",{className:"flex flex-col gap-4",children:[L.jsxs("section",{className:"flex flex-col gap-3",children:[L.jsx("h3",{className:"m-0 text-[11px] font-semibold uppercase tracking-[0.5px] text-ink-muted border-b border-border pb-2",children:Xg}),L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("label",{htmlFor:"port",className:"text-xs text-ink-muted",children:Yg}),L.jsx("input",{type:"number",id:"port",className:wn,value:i,onChange:b=>n(Number(b.target.value)),min:1024,max:65535,required:!0})]}),L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("h4",{className:"m-0 text-xs font-semibold text-ink-muted",children:Qg}),L.jsxs("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[L.jsx("input",{type:"checkbox",checked:h,onChange:b=>_(b.target.checked)}),L.jsx("span",{children:Jg})]})]}),h&&L.jsxs(L.Fragment,{children:[L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("label",{htmlFor:"username",className:"text-xs text-ink-muted",children:Zg}),L.jsx("input",{type:"text",id:"username",className:wn,value:l,onChange:b=>u(b.target.value),required:h,autoComplete:"username"})]}),L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("label",{htmlFor:"password",className:"text-xs text-ink-muted",children:e0}),L.jsx("input",{type:"password",id:"password",className:wn,value:f,onChange:b=>y(b.target.value),required:h,minLength:12,autoComplete:"new-password"}),L.jsx("p",{className:"m-0 text-[11px] text-muted",children:t0})]})]})]}),L.jsxs("section",{className:"flex flex-col gap-3",children:[L.jsx("h3",{className:"m-0 text-[11px] font-semibold uppercase tracking-[0.5px] text-ink-muted border-b border-border pb-2",children:s0}),L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("label",{htmlFor:"wsLimit",className:"text-xs text-ink-muted",children:o0}),L.jsxs("div",{className:"flex gap-2 items-center",children:[L.jsx("input",{type:"number",id:"wsLimit",className:`flex-1 ${wn}`,value:C,onChange:b=>w(Number(b.target.value)),min:1,max:1e4}),L.jsx("button",{type:"button",className:"border border-border bg-transparent text-ink px-2.5 py-1 text-xs rounded-[2px] cursor-pointer hover:bg-list-hover",onClick:p,children:c0})]})]}),L.jsxs("div",{className:"flex flex-col gap-1",children:[L.jsx("label",{className:"text-xs text-ink-muted",children:l0}),L.jsx("div",{className:"border border-border rounded-[2px] p-2 text-xs bg-bg min-h-[40px] flex flex-col gap-1",children:g&&g.connections.length>0?g.connections.map(({ip:b,count:S})=>L.jsxs("div",{className:"flex justify-between items-center",children:[L.jsx("span",{className:"font-mono text-ink",children:b}),L.jsx("span",{className:"font-semibold text-ink-muted",children:S})]},b)):L.jsx("div",{className:"text-muted text-center",children:"接続なし"})})]}),L.jsx("div",{className:"flex flex-col gap-1",children:L.jsx("button",{type:"button",className:"bg-[#f14c4c] text-white border-0 px-3.5 py-1.5 text-[13px] font-medium rounded-[2px] cursor-pointer hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed",onClick:v,disabled:o,children:o?"クリア中...":a0})})]}),L.jsx("p",{className:"m-0 text-[11px] text-muted italic",children:n0})]}),L.jsxs("div",{className:"flex justify-end gap-2 mt-4 border-t border-border pt-4",children:[L.jsx("button",{type:"button",className:"bg-transparent text-ink border-0 px-2 py-1 text-xs rounded-[2px] cursor-pointer hover:bg-list-hover",onClick:t,disabled:d,children:r0}),L.jsx("button",{type:"submit",className:"bg-accent text-white border-0 px-3.5 py-1.5 text-[13px] font-medium rounded-[2px] cursor-pointer hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed",disabled:d,children:d?"保存中...":i0})]})]})]})}):null}const h0=()=>{const[e,t]=N.useState({}),r=N.useCallback((n,h)=>{t(_=>{const l=_[n]||ss();return{..._,[n]:h(l)}})},[]),i=N.useCallback(n=>{t(h=>{const _={...h};return n.forEach(l=>{_[l]||(_[l]=ss())}),_})},[]);return{workspaceStates:e,setWorkspaceStates:t,updateWorkspaceState:r,initializeWorkspaceStates:i}},d0=()=>{const[e,t]=N.useState({}),r=N.useCallback((n,h)=>{t(_=>{const l=_[n]||os();return{..._,[n]:h(l)}})},[]),i=N.useCallback(n=>{t(h=>{const _={...h};return n.forEach(l=>{_[l]||(_[l]=os())}),_})},[]);return{deckStates:e,setDeckStates:t,updateDeckState:r,initializeDeckStates:i}},f0=({setStatusMessage:e,defaultRoot:t,initializeWorkspaceStates:r,setWorkspaceStates:i})=>{const[n,h]=N.useState([]),[_,l]=N.useState(null);N.useEffect(()=>{let y=!0;return rv().then(d=>{y&&(h(d),l(m=>m&&d.some(C=>C.id===m)?m:null),r(d.map(m=>m.id)))}).catch(d=>{y&&e(`ワークスペースを取得できませんでした: ${Pe(d)}`)}),()=>{y=!1}},[e,r]);const u=N.useCallback(async y=>{const m=y.trim()||t;if(!m)return e("パスを入力してください。"),null;const C=yc(m);if(n.some(g=>yc(g.path)===C))return e("同じパスのワークスペースは追加できません。"),null;try{const g=await nv(m);return h(a=>[...a,g]),l(g.id),i(a=>({...a,[g.id]:ss()})),g}catch(g){return e(`ワークスペースを追加できませんでした: ${Pe(g)}`),null}},[n,t,e,i]),f=N.useCallback(async y=>{try{await sv(y),h(d=>d.filter(m=>m.id!==y)),l(d=>d===y?null:d),i(d=>{const m={...d};return delete m[y],m})}catch(d){e(`ワークスペースを削除できませんでした: ${Pe(d)}`)}},[e,i]);return{workspaces:n,editorWorkspaceId:_,setEditorWorkspaceId:l,handleCreateWorkspace:u,handleDeleteWorkspace:f}},p0=({setStatusMessage:e,initializeDeckStates:t,updateDeckState:r,setDeckStates:i,initialDeckIds:n})=>{const[h,_]=N.useState([]),[l,u]=N.useState(n??[]);N.useEffect(()=>{let g=!0;return ov().then(a=>{g&&(_(a),t(a.map(o=>o.id)),a.forEach(o=>{mv(o.id).then(s=>{g&&r(o.id,c=>({...c,terminals:s}))}).catch(()=>{})}))}).catch(a=>{g&&e(`デッキを取得できませんでした: ${Pe(a)}`)}),()=>{g=!1}},[e,t,r]),N.useEffect(()=>{if(h.length===0)return;const g=l.filter(a=>h.some(o=>o.id===a));g.length===l.length&&g.length>0||(g.length>0?u(g):h[0]&&u([h[0].id]))},[h,l]);const f=N.useCallback(async(g,a)=>{try{const o=await lv(g,a);return _(s=>[...s,o]),u(s=>[...s.filter(c=>c!==o.id),o.id]),i(s=>({...s,[o.id]:os()})),o}catch(o){return e(`デッキの作成に失敗しました: ${Pe(o)}`),null}},[e,i]),y=N.useCallback(async g=>{try{await av(g),_(a=>a.filter(o=>o.id!==g)),u(a=>a.filter(o=>o!==g)),i(a=>{const o={...a};return delete o[g],o})}catch(a){e(`デッキの削除に失敗しました: ${Pe(a)}`)}},[e,i]),d=N.useCallback(g=>{_(a=>{const o=g(a);return cv(o.map(s=>s.id)).catch(()=>{}),o})},[]),m=N.useCallback(async(g,a,o,s)=>{try{const c=await vv(g,s,o);r(g,p=>({...p,terminals:[...p.terminals,{id:c.id,title:c.title}]}))}catch(c){e(`ターミナルを起動できませんでした: ${Pe(c)}`)}},[r,e]),C=N.useCallback(async(g,a)=>{try{await gv(a),r(g,o=>({...o,terminals:o.terminals.filter(s=>s.id!==a)}))}catch(o){e(`ターミナルを削除できませんでした: ${Pe(o)}`)}},[r,e]),w=N.useCallback((g,a)=>{r(g,o=>({...o,terminals:o.terminals.filter(s=>s.id!==a)}))},[r]);return{decks:h,activeDeckIds:l,setActiveDeckIds:u,handleCreateDeck:f,handleDeleteDeck:y,handleReorderDecks:d,handleCreateTerminal:m,handleDeleteTerminal:C,handleRemoveTerminalLocal:w}},_0=({editorWorkspaceId:e,activeWorkspaceState:t,updateWorkspaceState:r,setStatusMessage:i})=>{const[n,h]=N.useState(null),_=N.useCallback(()=>{e&&(r(e,a=>({...a,treeLoading:!0,treeError:null})),Ne(hc(e,""),15e3).then(a=>{r(e,o=>({...o,tree:ls(a),treeLoading:!1}))}).catch(a=>{r(e,o=>({...o,treeLoading:!1,treeError:Pe(a)}))}))},[e,r]),l=N.useCallback(a=>{if(!(!e||a.type!=="dir")){if(a.expanded){r(e,o=>({...o,tree:Dr(o.tree,a.path,s=>({...s,expanded:!1}))}));return}if(a.children&&a.children.length>0){r(e,o=>({...o,tree:Dr(o.tree,a.path,s=>({...s,expanded:!0}))}));return}r(e,o=>({...o,tree:Dr(o.tree,a.path,s=>({...s,loading:!0}))})),Ne(hc(e,a.path),15e3).then(o=>{r(e,s=>({...s,tree:Dr(s.tree,a.path,c=>({...c,expanded:!0,loading:!1,children:ls(o)}))}))}).catch(o=>{r(e,s=>({...s,treeError:Pe(o),tree:Dr(s.tree,a.path,c=>({...c,loading:!1}))}))})}},[e,r]),u=N.useCallback(a=>{if(!e||a.type!=="file")return;const o=t.files.find(p=>p.path===a.path);if(o){r(e,p=>({...p,activeFileId:o.id}));return}const s=crypto.randomUUID(),c={id:s,name:a.name,path:a.path,language:cd(a.path),contents:"",dirty:!1};r(e,p=>({...p,files:[...p.files,{...c,contents:"読み込み中..."}],activeFileId:s})),Ne(uv(e,a.path),15e3).then(p=>{r(e,v=>({...v,files:v.files.map(x=>x.id===s?{...x,contents:p.contents}:x)}))}).catch(p=>{r(e,v=>({...v,files:v.files.filter(x=>x.id!==s),activeFileId:v.files.length>1?v.files[0].id:null})),i(`ファイルを開けませんでした: ${Pe(p)}`)})},[e,t.files,r,i]),f=N.useCallback((a,o)=>{e&&r(e,s=>({...s,files:s.files.map(c=>c.id===a?{...c,contents:o,dirty:!0}:c)}))},[e,r]),y=N.useCallback(async a=>{if(!e)return;const o=t.files.find(s=>s.id===a);if(o){h(a);try{await Ne(hv(e,o.path,o.contents),15e3),r(e,s=>({...s,files:s.files.map(c=>c.id===a?{...c,dirty:!1}:c)})),i(Jh)}catch(s){i(`保存に失敗しました: ${Pe(s)}`)}finally{h(null)}}},[e,t.files,r,i]),d=N.useCallback(a=>{e&&r(e,o=>{const s=o.files.findIndex(v=>v.id===a),c=o.files.filter(v=>v.id!==a);let p=o.activeFileId;return o.activeFileId===a&&(c.length===0?p=null:s>=c.length?p=c[c.length-1].id:p=c[s].id),{...o,files:c,activeFileId:p}})},[e,r]),m=N.useCallback(async(a,o)=>{if(!e)return;const s=a?`${a}/${o}`:o;try{await Ne(dv(e,s),15e3);const c={name:o,path:s,type:"file",expanded:!1,loading:!1};r(e,p=>({...p,tree:tl(p.tree,a,c)})),i(`ファイルを作成しました: ${o}`)}catch(c){i(`ファイル作成に失敗しました: ${Pe(c)}`)}},[e,r,i]),C=N.useCallback(async(a,o)=>{if(!e)return;const s=a?`${a}/${o}`:o;try{await Ne(pv(e,s),15e3);const c={name:o,path:s,type:"dir",expanded:!1,loading:!1,children:[]};r(e,p=>({...p,tree:tl(p.tree,a,c)})),i(`フォルダを作成しました: ${o}`)}catch(c){i(`フォルダ作成に失敗しました: ${Pe(c)}`)}},[e,r,i]),w=N.useCallback(async a=>{if(e)try{await Ne(fv(e,a),15e3),r(e,o=>{const s=o.files.filter(v=>v.path!==a);let c=o.activeFileId;const p=o.files.find(v=>v.path===a);return p&&o.activeFileId===p.id&&(c=s.length>0?s[0].id:null),{...o,files:s,activeFileId:c,tree:rl(o.tree,a)}}),i("ファイルを削除しました")}catch(o){i(`ファイル削除に失敗しました: ${Pe(o)}`)}},[e,r,i]),g=N.useCallback(async a=>{if(e)try{await Ne(_v(e,a),15e3),r(e,o=>{const s=o.files.filter(v=>!v.path.startsWith(a+"/")&&v.path!==a);let c=o.activeFileId;const p=o.files.find(v=>v.id===o.activeFileId);return p&&(p.path.startsWith(a+"/")||p.path===a)&&(c=s.length>0?s[0].id:null),{...o,files:s,activeFileId:c,tree:rl(o.tree,a)}}),i("フォルダを削除しました")}catch(o){i(`フォルダ削除に失敗しました: ${Pe(o)}`)}},[e,r,i]);return{savingFileId:n,handleRefreshTree:_,handleToggleDir:l,handleOpenFile:u,handleFileChange:f,handleSaveFile:y,handleCloseFile:d,handleCreateFile:m,handleCreateDirectory:C,handleDeleteFile:w,handleDeleteDirectory:g}};async function v0(e,t,r,i){if(!i.current[e]){i.current[e]=!0,t(e,n=>({...n,loading:!0,reposLoading:!0,error:null}));try{const h=(await Ne(yv(e)).catch(()=>({repos:[]}))).repos;t(e,d=>({...d,repos:h,reposLoading:!1,selectedRepoPath:d.selectedRepoPath??(h.length>0?h[0].path:null)}));const l=(r.current[e]||yi()).selectedRepoPath??(h.length>0?h[0].path:void 0),[u,f,y]=await Promise.all([Ne(id(e,l||void 0)),Ne(od(e,l||void 0)).catch(()=>({ahead:0,behind:0,hasUpstream:!1})),Ne(ld(e,l||void 0)).catch(()=>({hasRemote:!1,remotes:[]}))]);t(e,d=>({...d,status:u,branchStatus:f,hasRemote:y.hasRemote,loading:!1,error:null}))}catch(n){const h=n instanceof Error?n.message:"Failed to get git status";t(e,_=>({..._,status:null,loading:!1,reposLoading:!1,error:h}))}finally{i.current[e]=!1}}}async function m0(e,t,r,i){r(e,n=>({...n,selectedRepoPath:t,loading:!0}));try{const[n,h,_]=await Promise.all([Ne(id(e,t||void 0)),Ne(od(e,t||void 0)).catch(()=>({ahead:0,behind:0,hasUpstream:!1})),Ne(ld(e,t||void 0)).catch(()=>({hasRemote:!1,remotes:[]}))]);r(e,l=>({...l,status:n,branchStatus:h,hasRemote:_.hasRemote,loading:!1,branches:[],logs:[]}))}catch(n){const h=n instanceof Error?n.message:"Failed to get git status";i(h),r(e,_=>({..._,loading:!1}))}}async function g0(e,t,r,i,n){try{await nd(e,[t],r),await n()}catch(h){i(h instanceof Error?h.message:"Failed to stage file")}}async function y0(e,t,r,i,n){try{await sd(e,[t],r),await n()}catch(h){i(h instanceof Error?h.message:"Failed to unstage file")}}async function S0(e,t,r,i,n){if(t.length!==0)try{await nd(e,t,r),await n()}catch(h){i(h instanceof Error?h.message:"Failed to stage files")}}async function C0(e,t,r,i,n){if(t.length!==0)try{await sd(e,t,r),await n()}catch(h){i(h instanceof Error?h.message:"Failed to unstage files")}}async function w0(e,t,r,i,n){try{const h=await Sv(e,t.trim(),r);i(`Committed: ${h.summary.changes} changes, +${h.summary.insertions} -${h.summary.deletions}`),await n()}catch(h){i(h instanceof Error?h.message:"Failed to commit")}}async function x0(e,t,r,i,n){try{await Cv(e,[t],r),await n()}catch(h){i(h instanceof Error?h.message:"Failed to discard changes")}}async function b0(e,t,r,i,n){i(e,h=>({...h,diffPath:t.path,diffLoading:!0,diff:null}));try{const h=await wv(e,t.path,t.staged,r);i(e,_=>({..._,diff:h,diffLoading:!1}))}catch(h){n(h instanceof Error?h.message:"Failed to get diff"),i(e,_=>({..._,diffPath:null,diff:null,diffLoading:!1}))}}async function E0(e,t,r,i,n){r(e,h=>({...h,pushing:!0}));try{const h=await xv(e,t);i(`Pushed to ${h.branch}`),await n()}catch(h){i(h instanceof Error?h.message:"Failed to push")}finally{r(e,h=>({...h,pushing:!1}))}}async function k0(e,t,r,i,n){r(e,h=>({...h,pulling:!0}));try{const h=await bv(e,t);h.summary.changes>0?i(`Pulled: ${h.summary.changes} changes, +${h.summary.insertions} -${h.summary.deletions}`):i("Already up to date"),await n()}catch(h){i(h instanceof Error?h.message:"Failed to pull")}finally{r(e,h=>({...h,pulling:!1}))}}async function L0(e,t,r,i){try{await Ev(e,t),r("Fetched from remote"),await i()}catch(n){r(n instanceof Error?n.message:"Failed to fetch")}}async function D0(e,t,r,i){r(e,n=>({...n,branchesLoading:!0}));try{const n=await Ne(kv(e,t));r(e,h=>({...h,branches:n.branches,branchesLoading:!1}))}catch(n){i(n instanceof Error?n.message:"Failed to load branches"),r(e,h=>({...h,branchesLoading:!1}))}}async function R0(e,t,r,i,n,h){try{await Lv(e,t,r),i(`Switched to branch '${t}'`),await n(),await h()}catch(_){i(_ instanceof Error?_.message:"Failed to checkout branch")}}async function T0(e,t,r,i,n,h,_){try{await Dv(e,t,r,i),n(`Created branch '${t}'${r?" and switched to it":""}`),await h(),await _()}catch(l){n(l instanceof Error?l.message:"Failed to create branch")}}async function A0(e,t,r,i,n){i(e,h=>({...h,logsLoading:!0}));try{const h=await Ne(Rv(e,t,r));i(e,_=>({..._,logs:h.logs,logsLoading:!1}))}catch(h){n(h instanceof Error?h.message:"Failed to load git log"),i(e,_=>({..._,logsLoading:!1}))}}const yi=()=>({status:null,loading:!1,error:null,diffPath:null,diff:null,diffLoading:!1,branchStatus:null,hasRemote:!1,pushing:!1,pulling:!1,branches:[],branchesLoading:!1,logs:[],logsLoading:!1,repos:[],reposLoading:!1,selectedRepoPath:null}),P0=(e,t)=>{const[r,i]=N.useState({}),n=N.useRef({}),h=N.useRef(r);h.current=r;const _=e&&r[e]||yi(),l=N.useCallback((T,B)=>{i(z=>({...z,[T]:B(z[T]||yi())}))},[]),u=N.useCallback(async T=>{const B=T||e;B&&await v0(B,l,h,n)},[e,l]),f=N.useCallback(async T=>{e&&await m0(e,T,l,t)},[e,l,t]),y=N.useCallback(async()=>{const T=Object.keys(h.current);await Promise.all(T.map(B=>u(B)))},[u]),d=N.useCallback(()=>{if(!e)return;const T=h.current[e];return(T==null?void 0:T.selectedRepoPath)||void 0},[e]),m=N.useCallback(async T=>{e&&await g0(e,T,d(),t,u)},[e,d,t,u]),C=N.useCallback(async T=>{e&&await y0(e,T,d(),t,u)},[e,d,t,u]),w=N.useCallback(async()=>{if(!e||!_.status)return;const T=_.status.files.filter(B=>!B.staged).map(B=>B.path);await S0(e,T,d(),t,u)},[e,_.status,d,t,u]),g=N.useCallback(async()=>{if(!e||!_.status)return;const T=_.status.files.filter(B=>B.staged).map(B=>B.path);await C0(e,T,d(),t,u)},[e,_.status,d,t,u]),a=N.useCallback(async T=>{!e||!T.trim()||await w0(e,T,d(),t,u)},[e,d,t,u]),o=N.useCallback(async T=>{e&&await x0(e,T,d(),t,u)},[e,d,t,u]),s=N.useCallback(async T=>{e&&await b0(e,T,d(),l,t)},[e,d,l,t]),c=N.useCallback(()=>{e&&l(e,T=>({...T,diffPath:null,diff:null,diffLoading:!1}))},[e,l]),p=N.useCallback(async()=>{e&&await E0(e,d(),l,t,u)},[e,d,l,t,u]),v=N.useCallback(async()=>{e&&await k0(e,d(),l,t,u)},[e,d,l,t,u]),x=N.useCallback(async()=>{e&&await L0(e,d(),t,u)},[e,d,t,u]),b=N.useCallback(async()=>{e&&await D0(e,d(),l,t)},[e,d,l,t]),S=N.useCallback(async T=>{e&&await R0(e,T,d(),t,u,b)},[e,d,t,u,b]),k=N.useCallback(async(T,B=!0)=>{e&&await T0(e,T,B,d(),t,u,b)},[e,d,t,u,b]),R=N.useCallback(async(T=50)=>{e&&await A0(e,T,d(),l,t)},[e,d,l,t]),O=N.useCallback(T=>r[T]||yi(),[r]);return{gitState:_,gitStates:r,refreshGitStatus:u,refreshAllGitStatuses:y,getGitStateForWorkspace:O,handleSelectRepo:f,handleStageFile:m,handleUnstageFile:C,handleStageAll:w,handleUnstageAll:g,handleCommit:a,handleDiscardFile:o,handleShowDiff:s,handleCloseDiff:c,handlePush:p,handlePull:v,handleFetch:x,handleLoadBranches:b,handleCheckoutBranch:S,handleCreateBranch:k,handleLoadLogs:R}};function M0(){const[e,t]=N.useState(Xv);N.useEffect(()=>{if(!(typeof document>"u")){document.documentElement.dataset.theme=e;try{window.localStorage.setItem(td,e)}catch{}}},[e]);const r=N.useCallback(()=>{t(i=>i==="dark"?"light":"dark")},[]);return{theme:e,handleToggleTheme:r}}function B0({view:e,editorWorkspaceId:t,activeDeckIds:r,workspaceMode:i,setView:n,setEditorWorkspaceId:h,setActiveDeckIds:_,setWorkspaceMode:l}){N.useEffect(()=>{const u=()=>{const f=ud();n(f.view),h(f.workspaceId??null),_(f.deckIds),l(f.workspaceMode)};return window.addEventListener("popstate",u),()=>window.removeEventListener("popstate",u)},[n,h,_,l]),N.useEffect(()=>{const u=new URLSearchParams;u.set("view",e),e==="workspace"&&t&&u.set("workspace",t),r.length>0&&u.set("decks",r.join(",")),e==="workspace"&&i==="editor"&&t&&u.set("mode","editor");const f=u.toString(),y=f?`${window.location.pathname}?${f}`:window.location.pathname;window.history.replaceState(null,"",y)},[e,t,r,i])}function O0(){const[e,t]=N.useState(!1),[r,i]=N.useState(!1),[n,h]=N.useState(!1),_=N.useCallback(()=>t(!0),[]),l=N.useCallback(()=>t(!1),[]),u=N.useCallback(()=>i(!0),[]),f=N.useCallback(()=>i(!1),[]),y=N.useCallback(()=>h(!0),[]),d=N.useCallback(()=>h(!1),[]);return{isWorkspaceModalOpen:e,openWorkspaceModal:_,closeWorkspaceModal:l,isDeckModalOpen:r,openDeckModal:u,closeDeckModal:f,isSettingsModalOpen:n,openSettingsModal:y,closeSettingsModal:d}}const Ac=3;function Pc(e,t,r){const i=e.indexOf(t),n=e.indexOf(r);if(i<0||n<0||i===n)return e;const h=[...e];h.splice(i,1);const _=h.indexOf(r);return h.splice(_,0,t),h}function N0(){const e=ud(),t=N.useRef(null),r=N.useRef(!1),[i,n]=N.useState(e.view),[h,_]=N.useState(e.workspaceMode),[l,u]=N.useState(q_),[f,y]=N.useState(""),[d,m]=N.useState(null),[C,w]=N.useState(null),[g,a]=N.useState(!1),[o,s]=N.useState(!1),[c,p]=N.useState(null),{theme:v,handleToggleTheme:x}=M0();N.useEffect(()=>{const V=window.visualViewport;if(!V)return;const ee=()=>{document.documentElement.style.setProperty("--viewport-height",`${V.height}px`)};return ee(),V.addEventListener("resize",ee),()=>V.removeEventListener("resize",ee)},[]);const{isWorkspaceModalOpen:b,openWorkspaceModal:S,closeWorkspaceModal:k,isDeckModalOpen:R,openDeckModal:O,closeDeckModal:T,isSettingsModalOpen:B,openSettingsModal:z,closeSettingsModal:I}=O0(),{workspaceStates:j,setWorkspaceStates:$,updateWorkspaceState:E,initializeWorkspaceStates:A}=h0(),{deckStates:P,setDeckStates:M,updateDeckState:H,initializeDeckStates:K}=d0(),{workspaces:X,editorWorkspaceId:q,setEditorWorkspaceId:se,handleCreateWorkspace:D,handleDeleteWorkspace:F}=f0({setStatusMessage:y,defaultRoot:l,initializeWorkspaceStates:A,setWorkspaceStates:$}),{decks:W,activeDeckIds:U,setActiveDeckIds:re,handleCreateDeck:Q,handleDeleteDeck:ae,handleReorderDecks:we,handleCreateTerminal:fe,handleDeleteTerminal:ut,handleRemoveTerminalLocal:ne}=p0({setStatusMessage:y,initializeDeckStates:K,updateDeckState:H,setDeckStates:M,initialDeckIds:e.deckIds}),ht=N.useMemo(()=>ss(),[]),Ye=N.useMemo(()=>os(),[]),Ut=X.find(V=>V.id===q)||null,J=q&&j[q]||ht,{savingFileId:Y,handleRefreshTree:te,handleToggleDir:ie,handleOpenFile:oe,handleFileChange:ce,handleSaveFile:Be,handleCloseFile:me,handleCreateFile:Tt,handleCreateDirectory:Ve,handleDeleteFile:At,handleDeleteDirectory:pe}=_0({editorWorkspaceId:q,activeWorkspaceState:J,updateWorkspaceState:E,setStatusMessage:y}),{gitState:ni,refreshGitStatus:ks,handleSelectRepo:yd,handleStageFile:Sd,handleUnstageFile:Cd,handleStageAll:wd,handleUnstageAll:xd,handleCommit:bd,handleDiscardFile:Ed,handleShowDiff:kd,handleCloseDiff:Ld,handlePush:Dd,handlePull:Rd,handleLoadBranches:Td,handleCheckoutBranch:Ad,handleCreateBranch:Pd,handleLoadLogs:Md}=P0(q,y);B0({view:i,editorWorkspaceId:q,activeDeckIds:U,workspaceMode:h,setView:n,setEditorWorkspaceId:se,setActiveDeckIds:re,setWorkspaceMode:_});const Bd=ev(),Ql=N.useMemo(()=>new Map(X.map(V=>[V.id,V])),[X]),Ls=W;N.useEffect(()=>{let V=!0;return iv().then(ee=>{V&&ee!=null&&ee.defaultRoot&&u(ee.defaultRoot)}).catch(()=>{}),()=>{V=!1}},[]),N.useEffect(()=>{if(f!==Jh)return;const V=setTimeout(()=>y(""),Y_);return()=>clearTimeout(V)},[f]),N.useEffect(()=>{h==="editor"&&!q&&_("list")},[h,q]),N.useEffect(()=>{if(typeof window>"u")return;const V=window.matchMedia("(pointer: fine) and (min-width: 721px)"),ee=()=>s(V.matches);return ee(),V.addEventListener("change",ee),()=>V.removeEventListener("change",ee)},[]);const Pt=N.useCallback(()=>{m(null),w(null),a(!1)},[]),tn=N.useCallback(()=>{r.current=!0,window.setTimeout(()=>{r.current=!1},100)},[]);N.useEffect(()=>{o||Pt()},[o,Pt]);const Ds=N.useRef(null);N.useEffect(()=>{if(h!=="editor"||!q){Ds.current=null;return}Ds.current!==q&&(Ds.current=q,te(),ks())},[h,q,te,ks]);const Od=N.useCallback(()=>{if(X.length===0){y(G_);return}O()},[X.length,O]),Nd=N.useCallback(async(V,ee)=>{if(!ee){y(X_);return}await Q(V,ee)&&T()},[Q,T]),jd=N.useCallback(async V=>{try{const ee=await fetch("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)});if(!ee.ok){const ge=await ee.text();throw new Error(ge||"Failed to save settings")}await ee.json(),y("設定を保存しました。ブラウザをリロードしてください。"),setTimeout(()=>{window.location.reload()},2e3)}catch(ee){throw console.error("Failed to save settings:",ee),ee}},[]),Id=N.useCallback(V=>{se(V),_("editor")},[se]),Fd=N.useCallback(()=>{_("list")},[]),Hd=N.useCallback(async V=>{await D(V)&&k()},[D,k]),zd=N.useCallback(V=>{const ee=P[V]||Ye;fe(V,ee.terminals.length)},[P,Ye,fe]),$d=N.useCallback(V=>{const ee=P[V]||Ye;fe(V,ee.terminals.length,"claude","Claude Code")},[P,Ye,fe]),Ud=N.useCallback(V=>{const ee=P[V]||Ye;fe(V,ee.terminals.length,"codex","Codex")},[P,Ye,fe]),Wd=N.useCallback((V,ee)=>{ut(V,ee)},[ut]),Vd=N.useCallback((V,ee)=>{ne(V,ee)},[ne]),Kd=N.useCallback(V=>{if(r.current){r.current=!1;return}re([V])},[re]),Jl=N.useCallback(V=>{re(ee=>{const ge=[...ee.filter(_e=>_e!==V),V];return ge.length<=Ac?ge:ge.slice(ge.length-Ac)})},[re]),qd=N.useCallback(V=>{re(ee=>{if(ee.length<=1){const ge=Ls.find(_e=>_e.id!==V);return ge?[ge.id]:ee}return ee.filter(ge=>ge!==V)})},[Ls,re]),Gd=N.useCallback((V,ee)=>{V.preventDefault(),V.stopPropagation(),p({deckId:ee,x:V.clientX,y:V.clientY})},[]),Xd=N.useCallback(()=>{if(!c)return;const{deckId:V}=c;p(null),window.confirm(`このデッキを完全に削除しますか?
|
|
64
64
|
ターミナルもすべて削除されます。`)&&ae(V)},[c,ae]),Zl=N.useCallback(()=>{p(null)},[]),Yd=N.useCallback((V,ee)=>{if(!o){V.preventDefault();return}V.dataTransfer.effectAllowed="move",V.dataTransfer.setData("text/plain",ee),m(ee),w(null),a(!1)},[o]),Qd=N.useCallback((V,ee)=>{!o||!d||d===ee||(V.preventDefault(),V.dataTransfer.dropEffect="move",w(ee),a(!1))},[o,d]),Jd=N.useCallback((V,ee)=>{V.currentTarget.contains(V.relatedTarget)||w(ge=>ge===ee?null:ge)},[]),Zd=N.useCallback((V,ee)=>{if(!o)return;V.preventDefault();const ge=d||V.dataTransfer.getData("text/plain");if(!ge||ge===ee){Pt();return}we(_e=>{const af=_e.map(kr=>kr.id),cf=Pc(af,ge,ee),uf=new Map(_e.map(kr=>[kr.id,kr]));return cf.map(kr=>uf.get(kr))}),re(_e=>Pc(_e,ge,ee)),tn(),Pt()},[d,o,Pt,re,tn,we]),ef=N.useCallback(V=>{!o||!d||(V.preventDefault(),V.dataTransfer.dropEffect="move",a(!0))},[o,d]),tf=N.useCallback(V=>{V.currentTarget.contains(V.relatedTarget)||a(!1)},[]),rf=N.useCallback(V=>{if(!o)return;V.preventDefault();const ee=d||V.dataTransfer.getData("text/plain");if(!ee){Pt();return}Jl(ee),tn(),Pt()},[d,Jl,o,Pt,tn]),nf=N.useCallback(V=>{q&&E(q,ee=>({...ee,activeFileId:V}))},[q,E]),sf=h==="editor"&&!!q,of=L.jsxs("div",{className:"flex flex-col flex-1 min-h-0 overflow-hidden",children:[L.jsxs("div",{className:"flex flex-col items-center gap-4 p-6 flex-shrink-0",children:[L.jsx("button",{type:"button",className:"bg-accent text-white border-0 px-3.5 py-1.5 text-[13px] font-medium rounded-[2px] cursor-pointer hover:opacity-90",onClick:S,children:"ワークスペース追加"}),L.jsx(jv,{workspaces:X,selectedWorkspaceId:q,onSelect:Id,onDelete:F})]}),sf&&L.jsx(qg,{activeWorkspace:Ut,defaultRoot:l,activeWorkspaceState:J,editorWorkspaceId:q,gitState:ni,theme:v,savingFileId:Y,onCloseWorkspaceEditor:Fd,onToggleDir:ie,onOpenFile:oe,onRefreshTree:te,onCreateFile:Tt,onCreateDirectory:Ve,onDeleteFile:At,onDeleteDirectory:pe,onRefreshGit:ks,onSelectRepo:yd,onStageFile:Sd,onUnstageFile:Cd,onStageAll:wd,onUnstageAll:xd,onCommit:bd,onDiscardFile:Ed,onShowDiff:kd,onCloseDiff:Ld,onPush:Dd,onPull:Rd,onLoadBranches:Td,onCheckoutBranch:Ad,onCreateBranch:Pd,onLoadLogs:Md,onSelectFile:nf,onCloseFile:me,onChangeFile:ce,onSaveFile:Be})]}),lf=L.jsxs("div",{className:"terminal-layout",children:[L.jsx("div",{className:"terminal-topbar",children:L.jsx("div",{className:"topbar-left",children:L.jsxs("div",{className:"deck-tabs",children:[Ls.map(V=>{var ee,ge;return L.jsxs("button",{type:"button",className:Ie("deck-tab",U.includes(V.id)&&"active",d===V.id&&"is-dragging",C===V.id&&"is-drag-over"),onClick:()=>Kd(V.id),onContextMenu:_e=>Gd(_e,V.id),draggable:o,onDragStart:_e=>Yd(_e,V.id),onDragOver:_e=>Qd(_e,V.id),onDragLeave:_e=>Jd(_e,V.id),onDrop:_e=>Zd(_e,V.id),onDragEnd:Pt,title:o?`${((ee=Ql.get(V.workspaceId))==null?void 0:ee.path)||V.root}
|
|
65
65
|
ドラッグで並び替え / メインにドロップで分割表示`:`${((ge=Ql.get(V.workspaceId))==null?void 0:ge.path)||V.root}`,children:[L.jsx("span",{className:"deck-tab-name",children:V.name}),L.jsx("span",{className:"deck-tab-close",role:"button","aria-label":"閉じる",onClick:_e=>{_e.stopPropagation(),qd(V.id)},children:"×"})]},V.id)}),L.jsx("button",{type:"button",className:"deck-tab deck-tab-add",onClick:Od,title:"デッキ作成",children:"+"})]})})}),L.jsx("div",{className:Ie("terminal-split-container",g&&"is-drop-target"),ref:t,style:{gridTemplateColumns:`repeat(${U.length}, minmax(0, 1fr))`},onDragOver:ef,onDragLeave:tf,onDrop:rf,children:U.length===0?L.jsx("div",{className:"panel flex items-center justify-center text-muted text-[13px] p-5",children:"デッキを作成してください。"}):U.map(V=>{const ee=W.find(_e=>_e.id===V),ge=P[V]||Ye;return ee?L.jsxs("div",{className:"deck-split-pane",children:[L.jsxs("div",{className:"flex items-center justify-between px-2 py-1 border-b border-border bg-sidebar gap-2 min-h-[28px]",children:[U.length>1&&L.jsx("span",{className:"flex-1 min-w-0 text-[11px] font-semibold text-ink-muted overflow-hidden text-ellipsis whitespace-nowrap",children:ee.name}),L.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[L.jsx("button",{type:"button",className:"topbar-btn-sm",onClick:()=>zd(V),title:"ターミナル追加",children:"+"}),L.jsx("button",{type:"button",className:"topbar-btn-sm topbar-btn-claude",onClick:()=>$d(V),title:"Claude",children:"C"}),L.jsx("button",{type:"button",className:"topbar-btn-sm topbar-btn-codex",onClick:()=>Ud(V),title:"Codex",children:"X"})]})]}),L.jsx(Ov,{terminals:ge.terminals,wsBase:Bd,onDeleteTerminal:_e=>Wd(V,_e),onExitTerminal:_e=>Vd(V,_e)})]},V):null})})]});return L.jsxs("div",{className:"app","data-view":i,children:[L.jsx(H_,{activeView:i,onSelect:n,theme:v,onToggleTheme:x,onOpenSettings:z}),L.jsxs("main",{className:"main",children:[i==="workspace"&&of,i==="terminal"&&lf]}),L.jsx(z_,{message:f}),L.jsx(Yv,{isOpen:b,defaultRoot:l,onSubmit:Hd,onClose:k}),L.jsx(F_,{isOpen:R,workspaces:X,onSubmit:Nd,onClose:T}),L.jsx(u0,{isOpen:B,onClose:I,onSave:jd}),c&&L.jsxs(L.Fragment,{children:[L.jsx("div",{className:"fixed inset-0 z-[999]",onClick:Zl,onContextMenu:V=>{V.preventDefault(),Zl()}}),L.jsx("div",{className:"fixed z-[1000] bg-panel border border-border shadow-lg rounded-[2px] py-1 min-w-[140px]",style:{left:c.x,top:c.y},children:L.jsx("button",{type:"button",className:"w-full text-left px-3 py-1.5 text-[13px] text-red-400 bg-transparent border-0 cursor-pointer hover:bg-list-hover",onClick:Xd,children:"デッキを削除"})})]})]})}class j0 extends N.Component{constructor(t){super(t),this.handleReload=()=>{window.location.reload()},this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("Application error:",t),console.error("Component stack:",r.componentStack)}render(){return this.state.hasError?L.jsx("div",{className:"flex items-center justify-center min-h-screen p-8 bg-bg",children:L.jsxs("div",{className:"max-w-[500px] p-8 bg-panel border border-border text-center",children:[L.jsx("h1",{className:"m-0 mb-4 text-xl text-[#f14c4c]",children:"Something went wrong"}),L.jsx("p",{className:"m-0 mb-6 text-muted",children:"The application encountered an unexpected error."}),this.state.error&&!1,L.jsx("button",{onClick:this.handleReload,className:"px-4 py-2 bg-accent text-white border-0 rounded-[2px] font-medium cursor-pointer hover:opacity-90",children:"Reload Application"})]})}):this.props.children}}lo.createRoot(document.getElementById("root")).render(L.jsx(vr.StrictMode,{children:L.jsx(j0,{children:L.jsx(N0,{})})}));
|
package/web/dist/index.html
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<html lang="ja">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content" />
|
|
6
6
|
<title>Deck IDE</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-MGg98kDU.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DINx38Yu.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Noto+Sans+JP:wght@400;500;600&display=swap";/**
|
|
2
|
-
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
|
-
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
|
-
* https://github.com/chjj/term.js
|
|
5
|
-
* @license MIT
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in
|
|
15
|
-
* all copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
-
* THE SOFTWARE.
|
|
24
|
-
*
|
|
25
|
-
* Originally forked from (with the author's permission):
|
|
26
|
-
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
27
|
-
* http://bellard.org/jslinux/
|
|
28
|
-
* Copyright (c) 2011 Fabrice Bellard
|
|
29
|
-
* The original design remains. The terminal itself
|
|
30
|
-
* has been extended to include xterm CSI codes, among
|
|
31
|
-
* other features.
|
|
32
|
-
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.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,.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{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;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:"JetBrains Mono", monospace;--color-red-400:oklch(70.4% .191 22.216);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-semibold:600;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bg:#f3f3f3;--color-bg-soft:#e8e8e8;--color-panel:#fff;--color-sidebar:#f3f3f3;--color-activitybar:#2c2c2c;--color-activitybar-fg:#fff;--color-activitybar-inactive:#fff9;--color-border:#e5e5e5;--color-ink:#333;--color-ink-muted:#6e6e6e;--color-muted:#717171;--color-accent:#007acc;--color-statusbar:#007acc;--color-statusbar-fg:#fff;--color-list-hover:#0000000a;--color-list-active:#0078d41a;--color-focus:#0090f1;--color-title-bar:#ddd;--color-git-modified:#cca700;--color-git-untracked:#4ec9b0;--color-git-deleted:#f14c4c;--color-git-staged:#73c991;--color-git-renamed:#4fc1ff;--color-git-conflicted:#ff6b6b;--font-ui:"Noto Sans JP", sans-serif}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:before,:after{box-sizing:border-box}html,body,#root{height:100%;min-height:100%;margin:0}body{font-family:var(--font-ui);background:var(--color-bg);color:var(--color-ink);font-size:13px;line-height:1.4;overflow:hidden}button,input,select,textarea{color:inherit;font-family:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--color-focus);outline-offset:2px}@supports (height:100svh){html,body,#root{height:100svh;min-height:100svh}}*{scrollbar-width:thin;scrollbar-color:#8080804d transparent}:root[data-theme=dark] *{scrollbar-color:#ffffff26 transparent}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#8080804d;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#80808080}:root[data-theme=dark] ::-webkit-scrollbar-thumb{background:#ffffff26}:root[data-theme=dark] ::-webkit-scrollbar-thumb:hover{background:#ffffff4d}::-webkit-scrollbar-corner{background:0 0}}@layer components{.activity-bar-item.active:before{content:"";background:var(--color-activitybar-fg);width:2px;position:absolute;top:0;bottom:0;left:0}.workspace-editor-grid .activity-bar-item.active:before{background:var(--color-accent)}.app>nav.activity-bar .activity-bar-item.active:before{width:auto;height:2px;inset:0 0 auto}.git-tab.active:after{content:"";background:var(--color-accent);height:2px;position:absolute;bottom:0;left:0;right:0}.editor-tab:hover .editor-tab-close,.editor-tab.active .editor-tab-close{opacity:1}.editor-tab.dirty .editor-tab-close{opacity:0}.editor-tab.dirty:hover .editor-tab-close{opacity:1}.editor-tab.dirty:hover .editor-tab-dirty{display:none}.deck-tab:hover .deck-tab-close,.deck-tab.active .deck-tab-close{opacity:.5}.deck-tab-close:hover{color:var(--color-ink);background:#ffffff1f;opacity:1!important}.git-file-row:hover .git-file-actions{opacity:1}.tree-row.is-open .tree-chevron-icon{transform:rotate(90deg)}.terminal-split-container.is-drop-target:after{content:"デッキをここにドロップして分割";border:2px dashed var(--color-accent);color:var(--color-ink-muted);pointer-events:none;z-index:2;background:#0078d414;border-radius:6px;justify-content:center;align-items:center;font-size:12px;font-weight:600;display:flex;position:absolute;top:10px;right:10px;bottom:10px;left:10px}.git-tree-modified .tree-label{color:var(--color-git-modified)}.git-tree-untracked .tree-label{color:var(--color-git-untracked)}.git-tree-deleted .tree-label{color:var(--color-git-deleted)}.git-tree-staged .tree-label{color:var(--color-git-staged)}.git-tree-renamed .tree-label{color:var(--color-git-renamed)}.git-tree-conflicted .tree-label{color:var(--color-git-conflicted)}.sidebar-content .panel{box-shadow:none;background:0 0;border:none;border-radius:0}.sidebar-content .panel-header{background:var(--color-sidebar);z-index:1;margin-bottom:0;padding:8px 12px;position:sticky;top:0}.sidebar-content .panel-body{padding:0}}@layer utilities{.fixed{position:fixed}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.z-50{z-index:50}.z-\[500\]{z-index:500}.z-\[999\]{z-index:999}.z-\[1000\]{z-index:1000}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing) * 0)}.my-1{margin-block:calc(var(--spacing) * 1)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-7{height:calc(var(--spacing) * 7)}.h-\[22px\]{height:22px}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-\[28px\]{min-height:28px}.min-h-\[40px\]{min-height:40px}.min-h-\[44px\]{min-height:44px}.min-h-\[50px\]{min-height:50px}.min-h-screen{min-height:100vh}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-7{width:calc(var(--spacing) * 7)}.w-\[22px\]{width:22px}.w-\[500px\]{width:500px}.w-full{width:100%}.max-w-\[500px\]{max-width:500px}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[44px\]{min-width:44px}.min-w-\[140px\]{min-width:140px}.min-w-\[160px\]{min-width:160px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-y{resize:vertical}.grid-rows-\[35px_minmax\(0\,1fr\)\]{grid-template-rows:35px minmax(0,1fr)}.flex-col{flex-direction:column}.place-items-center{place-items:center}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\!overflow-hidden{overflow:hidden!important}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[3px\]{border-radius:3px}.rounded-\[6px\]{border-radius:6px}.rounded-full{border-radius:3.40282e38px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-accent{border-color:var(--color-accent)}.border-border{border-color:var(--color-border)}.bg-\[\#f14c4c\]{background-color:#f14c4c}.bg-accent{background-color:var(--color-accent)}.bg-accent\/20{background-color:#007acc33}@supports (color:color-mix(in lab,red,red)){.bg-accent\/20{background-color:color-mix(in oklab,var(--color-accent) 20%,transparent)}}.bg-bg{background-color:var(--color-bg)}.bg-bg-soft{background-color:var(--color-bg-soft)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-border{background-color:var(--color-border)}.bg-list-active{background-color:var(--color-list-active)}.bg-panel{background-color:var(--color-panel)}.bg-sidebar{background-color:var(--color-sidebar)}.bg-title-bar{background-color:var(--color-title-bar)}.bg-transparent{background-color:#0000}.fill-current{fill:currentColor}.p-0{padding:calc(var(--spacing) * 0)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.font-\[inherit\]{font-family:inherit}.font-mono{font-family:var(--font-mono)}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.75rem\]{font-size:.75rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.5px\]{--tw-tracking:.5px;letter-spacing:.5px}.break-words{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#f14c4c\]{color:#f14c4c}.text-accent{color:var(--color-accent)}.text-ink{color:var(--color-ink)}.text-ink-muted{color:var(--color-ink-muted)}.text-muted{color:var(--color-muted)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.shadow-\[0_4px_12px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:0 4px 12px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\:bg-\[rgba\(0\,0\,0\,0\.08\)\]:hover{background-color:#00000014}.hover\:bg-\[rgba\(241\,76\,76\,0\.1\)\]:hover{background-color:#f14c4c1a}.hover\:bg-list-hover:hover{background-color:var(--color-list-hover)}.hover\:bg-red-400\/10:hover{background-color:#ff65681a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-400\/10:hover{background-color:color-mix(in oklab,var(--color-red-400) 10%,transparent)}}.hover\:text-ink:hover{color:var(--color-ink)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:opacity-90:hover{opacity:.9}}.focus\:border-focus:focus{border-color:var(--color-focus)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-default:disabled{cursor:default}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (hover:hover){.dark\:hover\:bg-\[rgba\(255\,255\,255\,0\.08\)\]:where([data-theme=dark],[data-theme=dark] *):hover{background-color:#ffffff14}}.scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}.spin{animation:1s linear infinite spin}.slide-in{animation:.2s slideIn}}:root[data-theme=dark]{--color-bg:#1e1e1e;--color-bg-soft:#252526;--color-panel:#1e1e1e;--color-sidebar:#252526;--color-activitybar:#333;--color-activitybar-inactive:#fff6;--color-border:#3c3c3c;--color-ink:#ccc;--color-ink-muted:#9e9e9e;--color-muted:#8b8b8b;--color-accent:#0078d4;--color-list-hover:#ffffff0a;--color-list-active:#0078d433;--color-focus:#007fd4;--color-title-bar:#3c3c3c}@keyframes spin{to{transform:rotate(360deg)}}@keyframes slideIn{0%{transform:translate(-100%)}to{transform:translate(0)}}.app{grid-template-rows:minmax(0,1fr) 22px;grid-template-columns:48px minmax(0,1fr);height:100%;display:grid;overflow:hidden}.activity-bar{background:var(--color-activitybar);flex-direction:column;grid-row:1/3;width:48px;display:flex}.activity-bar-top{flex-direction:column;display:flex}.activity-bar-bottom{flex-direction:column;margin-top:auto;display:flex}.activity-bar-item{width:48px;height:48px;color:var(--color-activitybar-inactive);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;transition:color .15s;display:flex;position:relative}.activity-bar-item:hover,.activity-bar-item.active{color:var(--color-activitybar-fg)}.activity-bar-item svg{width:24px;height:24px}.activity-bar-badge{text-align:center;background:var(--color-accent);color:#fff;border-radius:8px;min-width:16px;height:16px;padding:0 4px;font-size:10px;font-weight:600;line-height:16px;position:absolute;top:8px;right:6px}.main{background:var(--color-bg);flex-direction:column;min-height:0;display:flex}.workspace-editor-overlay{background:var(--color-bg);z-index:30;grid-template-rows:35px minmax(0,1fr);display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.workspace-editor-header{background:var(--color-title-bar);border-bottom:1px solid var(--color-border);align-items:center;gap:12px;padding:0 12px;display:flex}.workspace-meta{color:var(--color-muted);font-size:12px;font-family:var(--font-mono);text-overflow:ellipsis;white-space:nowrap;text-align:center;flex:1;overflow:hidden}.workspace-editor-grid{grid-template-rows:minmax(0,1fr);grid-template-columns:48px 220px minmax(0,1fr);height:100%;min-height:0;display:grid}.sidebar-panel{background:var(--color-sidebar);border-right:1px solid var(--color-border);flex-direction:column;height:100%;min-height:0;display:flex}.sidebar-content{flex:1;min-height:0;overflow:auto}.workspace-editor-grid>.activity-bar{background:var(--color-activitybar);border-right:1px solid var(--color-border);grid-row:unset;flex-direction:column;width:48px;display:flex}.workspace-editor-grid .activity-bar-item{color:var(--color-activitybar-fg);opacity:.6;transition:opacity .15s}.workspace-editor-grid .activity-bar-item:hover,.workspace-editor-grid .activity-bar-item.active{opacity:1}.panel{background:var(--color-panel);border:1px solid var(--color-border);border-radius:0;flex-direction:column;min-height:0;padding:0;display:flex}.panel-header{border-bottom:1px solid var(--color-border);background:var(--color-sidebar);justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;display:flex}.panel-title{text-transform:uppercase;letter-spacing:.5px;color:var(--color-ink-muted);font-size:11px;font-weight:600}.panel-subtitle{color:var(--color-muted);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.panel-body{flex:1;min-height:0;overflow:auto}.modal{background:var(--color-panel);border:1px solid var(--color-border);border-radius:4px;width:480px;max-width:96vw;max-height:90dvh;padding:16px;overflow-y:auto;box-shadow:0 8px 32px #0000004d}.modal-close-btn{color:var(--color-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;width:32px;height:32px;padding:0;font-size:24px;line-height:1;display:flex}.modal-close-btn:hover{color:var(--color-ink);background:var(--color-list-hover)}.tree-body{padding:4px 0}.tree-row{color:var(--color-ink);text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:4px;width:100%;min-height:22px;padding:2px 8px 2px 4px;font-size:13px;transition:background .1s;display:flex}.tree-row:hover{background:var(--color-list-hover)}.tree-row:focus-visible{outline:2px solid var(--color-focus);outline-offset:-2px}.tree-chevron{width:16px;height:16px;color:var(--color-ink-muted);flex-shrink:0;justify-content:center;align-items:center;display:flex}.tree-chevron-icon{width:12px;height:12px;transition:transform .1s}.tree-icon{flex-shrink:0;justify-content:center;align-items:center;width:16px;height:16px;display:flex}.tree-svg{width:16px;height:16px}.tree-label{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.tree-meta{color:var(--color-muted);font-size:11px;font-family:var(--font-mono);margin-left:auto}.tree-state{color:var(--color-muted);padding:8px 12px;font-size:12px}.tree-actions{align-items:center;gap:4px;display:flex}.tree-input-row{align-items:center;gap:4px;min-height:22px;padding:2px 8px 2px 4px;display:flex}.tree-input{border:1px solid var(--color-accent);background:var(--color-panel);min-width:0;color:var(--color-ink);border-radius:2px;outline:none;flex:1;padding:2px 6px;font-size:13px}.tree-input::placeholder{color:var(--color-muted)}.editor-container{background:var(--color-panel);flex-direction:column;height:100%;display:flex;overflow:hidden}.editor-container.editor-empty{justify-content:center;align-items:center;display:flex}.editor-welcome{color:var(--color-ink-muted);text-align:center;flex-direction:column;align-items:center;gap:16px;padding:60px 40px;display:flex}.editor-welcome-icon{opacity:.2;width:80px;height:80px}.editor-welcome-icon svg{width:100%;height:100%;stroke:var(--color-ink)}.editor-welcome-text{color:var(--color-ink-muted);font-size:18px;font-weight:400}.editor-welcome-hint{opacity:.6;font-size:13px}.editor-tabs{background:var(--color-bg-soft);border-bottom:1px solid var(--color-border);flex-shrink:0;align-items:stretch;min-height:35px;display:flex}.editor-tabs-list{scrollbar-width:none;display:flex;overflow-x:auto}.editor-tabs-list::-webkit-scrollbar{display:none}.editor-tab{background:var(--color-bg-soft);border:none;border-right:1px solid var(--color-border);min-width:100px;max-width:180px;height:35px;color:var(--color-ink-muted);cursor:pointer;align-items:center;gap:6px;padding:0 10px;font-size:13px;transition:background .1s,color .1s;display:flex;position:relative}.editor-tab:hover{background:var(--color-panel);color:var(--color-ink)}.editor-tab.active{background:var(--color-panel);color:var(--color-ink);border-bottom:1px solid var(--color-panel);margin-bottom:-1px}.editor-tab-icon{font-size:10px;font-weight:600;font-family:var(--font-mono);flex-shrink:0}.editor-tab-name{text-overflow:ellipsis;white-space:nowrap;text-align:left;flex:1;overflow:hidden}.editor-tab-dirty{color:var(--color-ink);flex-shrink:0;font-size:18px;line-height:1}.editor-tab-saving{flex-shrink:0;width:14px;height:14px}.editor-tab-saving svg{width:100%;height:100%;stroke:var(--color-ink-muted)}.editor-tab-close{width:20px;height:20px;color:var(--color-ink-muted);cursor:pointer;opacity:0;background:0 0;border:none;border-radius:3px;flex-shrink:0;justify-content:center;align-items:center;padding:0;transition:opacity .1s,background .1s;display:flex}.editor-tab-close svg{width:16px;height:16px}.editor-tab-close:hover{background:var(--color-list-hover);color:var(--color-ink)}.editor-breadcrumb{background:var(--color-panel);border-bottom:1px solid var(--color-border);color:var(--color-ink-muted);flex-shrink:0;align-items:center;height:22px;padding:0 12px;font-size:12px;display:flex}.editor-breadcrumb-path{text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-mono);overflow:hidden}.editor-content{flex:1;min-height:0;position:relative}.editor-no-file{height:100%;color:var(--color-ink-muted);justify-content:center;align-items:center;display:flex}.editor-statusbar{background:var(--color-statusbar);height:22px;color:var(--color-statusbar-fg);flex-shrink:0;justify-content:space-between;align-items:center;padding:0 12px;font-size:12px;display:flex}.editor-statusbar-left,.editor-statusbar-right{align-items:center;gap:14px;display:flex}.editor-status-item{cursor:default;align-items:center;gap:4px;display:flex}.editor-status-item svg{width:14px;height:14px}.terminal-layout{overflow-anchor:none;flex-direction:column;flex:1;min-width:0;min-height:0;display:flex;overflow:hidden}.terminal-topbar{background:var(--color-sidebar);border-bottom:1px solid var(--color-border);flex-shrink:0;align-items:stretch;min-width:0;display:flex;overflow:hidden}.topbar-left{flex:1;align-items:stretch;min-width:0;display:flex;overflow:hidden}.deck-tabs{scrollbar-width:none;flex:1;align-items:stretch;min-width:0;display:flex;overflow-x:auto}.deck-tabs::-webkit-scrollbar{display:none}.deck-tab{border:none;border-top:2px solid #0000;border-right:1px solid var(--color-border);min-width:80px;max-width:200px;color:var(--color-muted);cursor:pointer;white-space:nowrap;background:0 0;flex-shrink:0;align-items:center;gap:4px;padding:0 8px 0 12px;font-size:12px;font-weight:500;transition:background .12s,color .12s;display:flex}.deck-tab[draggable=true]{cursor:grab}.deck-tab.is-dragging{opacity:.5}.deck-tab.is-drag-over{background:var(--color-list-active);color:var(--color-ink)}.deck-tab:hover{background:var(--color-list-hover);color:var(--color-ink)}.deck-tab.active{background:var(--color-panel);color:var(--color-ink);border-top-color:var(--color-accent)}.deck-tab-name{text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.deck-tab-close{opacity:0;width:16px;height:16px;color:var(--color-muted);border-radius:3px;flex-shrink:0;justify-content:center;align-items:center;font-size:13px;line-height:1;transition:opacity .12s,background .12s;display:flex}.deck-tab-add{border-top:none;justify-content:center;min-width:35px;max-width:35px;padding:0;font-size:16px;font-weight:300}.deck-tab-add:hover{background:var(--color-list-hover);color:var(--color-ink)}.terminal-split-container{flex:1;grid-auto-rows:minmax(0,1fr);gap:4px;width:100%;min-width:0;max-width:100%;min-height:0;padding:4px;display:grid;position:relative}.deck-split-pane{border:1px solid var(--color-border);border-radius:4px;flex-direction:column;min-width:0;min-height:0;display:flex;overflow:hidden}.topbar-btn-sm{border:1px solid var(--color-border);color:var(--color-muted);cursor:pointer;background:0 0;border-radius:3px;padding:2px 6px;font-size:11px;font-weight:600;transition:all .15s}.topbar-btn-sm:hover{background:var(--color-list-hover);color:var(--color-ink);border-color:var(--color-accent)}.topbar-btn-sm.topbar-btn-claude{color:#d97757}.topbar-btn-sm.topbar-btn-claude:hover{background:#d9775726;border-color:#d97757}.topbar-btn-sm.topbar-btn-codex{color:#00a86b}.topbar-btn-sm.topbar-btn-codex:hover{background:#00a86b26;border-color:#00a86b}.terminal-pane{overflow-anchor:none;flex-direction:column;flex:1;min-width:0;min-height:0;padding:4px;display:flex}.terminal-grid{flex:1;gap:4px;width:100%;min-width:0;min-height:0;display:grid;overflow:hidden}.terminal-tile-slot{display:contents}.terminal-back-btn{display:none}.terminal-empty{background:var(--color-bg-soft);border:1px dashed var(--color-border);color:var(--color-muted);border-radius:4px;flex:1;justify-content:center;align-items:center;font-size:12px;display:flex}.terminal-tile{border:1px solid var(--color-border);color:#d4d4d4;background:#1e1e1e;border-radius:4px;flex-direction:column;min-width:0;min-height:0;display:flex;overflow:hidden}.terminal-tile-header{background:#2d2d2d;border-bottom:1px solid #404040;justify-content:space-between;align-items:center;gap:8px;padding:6px 10px;font-size:12px;display:flex}.terminal-tile-header span{text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-mono);flex:1;overflow:hidden}.terminal-close-btn{color:#858585;cursor:pointer;background:0 0;border:none;border-radius:3px;flex-shrink:0;justify-content:center;align-items:center;width:20px;height:20px;transition:background .1s,color .1s;display:flex}.terminal-close-btn:hover{color:#fff;background:#404040}.terminal-tile-body{overflow-anchor:none;overscroll-behavior:contain;touch-action:pan-y;flex:1;min-height:0;overflow:hidden}.terminal-tile-body .xterm,.terminal-tile-body .xterm-viewport,.terminal-tile-body .xterm-screen{overflow-anchor:none}.terminal-tile-body .xterm-helper-textarea{z-index:0!important}.terminal-tile-body .xterm-viewport{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}.git-modified{color:var(--color-git-modified)}.git-untracked{color:var(--color-git-untracked)}.git-deleted{color:var(--color-git-deleted)}.git-staged{color:var(--color-git-staged)}.git-renamed{color:var(--color-git-renamed)}.git-conflicted{color:var(--color-git-conflicted)}.git-tabs{border-bottom:1px solid var(--color-border);background:var(--color-sidebar);flex-shrink:0;display:flex}.git-tab{color:var(--color-ink-muted);cursor:pointer;background:0 0;border:none;align-items:center;gap:6px;padding:6px 12px;font-size:12px;transition:color .1s,background .1s;display:flex;position:relative}.git-tab:hover{color:var(--color-ink);background:var(--color-list-hover)}.git-tab.active{color:var(--color-ink)}.git-file-row{align-items:center;gap:4px;transition:background .1s;display:flex}.git-file-row:hover{background:var(--color-list-hover)}.git-file-main{color:var(--color-ink);cursor:pointer;text-align:left;background:0 0;border:none;flex:1;align-items:center;gap:6px;min-width:0;min-height:22px;padding:4px 12px;display:flex}.git-status-badge{width:16px;height:16px;font-size:11px;font-weight:600;font-family:var(--font-mono);flex-shrink:0;justify-content:center;align-items:center;display:flex}.git-file-path{text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.git-file-actions{opacity:0;gap:2px;padding-right:8px;transition:opacity .1s;display:flex}.git-action-btn{width:22px;height:22px;color:var(--color-ink-muted);cursor:pointer;background:0 0;border:none;border-radius:3px;justify-content:center;align-items:center;padding:0;transition:background .1s,color .1s;display:flex}.git-action-btn:hover{background:var(--color-list-hover);color:var(--color-ink)}.git-action-btn svg{fill:currentColor;width:14px;height:14px}.status-float{right:20px;bottom:calc(40px + env(safe-area-inset-bottom,0px));background:var(--color-panel);border:1px solid var(--color-border);color:var(--color-ink);border-radius:4px;max-width:min(400px,100vw - 40px);padding:8px 14px;font-size:12px;position:fixed;box-shadow:0 4px 16px #0003}.sidebar-toggle-btn,.sidebar-overlay{display:none}@media (max-width:1024px){.workspace-editor-grid{grid-template-rows:200px minmax(0,1fr);grid-template-columns:48px 1fr}.workspace-editor-grid>.activity-bar{grid-row:1/-1}.sidebar-panel{border-right:none;border-bottom:1px solid var(--color-border)}}@media (max-width:720px){.app{padding-bottom:env(safe-area-inset-bottom);grid-template-rows:minmax(0,1fr) 48px 22px;grid-template-columns:1fr}.app>nav.activity-bar{width:auto;height:48px;padding:0 max(8px,env(safe-area-inset-right,0px)) 0 max(8px,env(safe-area-inset-left,0px));border-top:1px solid var(--color-border);flex-direction:row;grid-row:2;justify-content:space-between;gap:8px}.activity-bar-top,.activity-bar-bottom{flex-direction:row;align-items:center;gap:4px}.activity-bar-bottom{margin-top:0;margin-left:0}.main{grid-row:1;min-width:0;overflow:hidden}.sidebar-toggle-btn{justify-content:center;align-items:center;display:flex}.activity-bar-item{min-width:44px;min-height:44px}.deck-tab{min-height:40px;padding:0 8px 0 14px;font-size:13px}.topbar-btn-sm{min-width:44px;min-height:40px;padding:0 10px}.tree-row,.editor-tab{min-height:36px}.modal-close-btn{min-width:44px;min-height:44px}.modal{border-radius:8px;max-width:calc(100vw - 16px);max-height:90dvh;margin:8px}.deck-tabs{-webkit-overflow-scrolling:touch;scrollbar-width:none;flex-wrap:nowrap;overflow-x:auto}.deck-tabs::-webkit-scrollbar{display:none}.terminal-split-container{scroll-snap-type:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:none;width:100%;max-width:100%;overflow:scroll hidden;flex-direction:row!important;gap:0!important;padding:0!important;display:flex!important}.terminal-split-container::-webkit-scrollbar{display:none}.deck-split-pane{scroll-snap-align:start;border-left:none;border-right:none;border-radius:0;flex:0 0 100%;width:100%;max-width:100%;overflow:hidden}.terminal-pane{flex:auto;width:100%;max-width:100%;min-height:0;overflow:hidden;padding:0!important}.terminal-grid-preview{-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;scrollbar-width:none;flex:auto;min-height:0;grid-template-columns:repeat(2,1fr)!important;grid-template-rows:unset!important;gap:4px!important;padding:4px!important;display:grid!important;overflow:hidden auto!important}.terminal-grid-preview::-webkit-scrollbar{display:none}.terminal-tile-slot-preview{cursor:pointer;display:block;overflow:hidden}.terminal-tile-slot-preview .terminal-tile{border-radius:4px;height:150px!important;min-height:150px!important;max-height:150px!important}.terminal-tile-slot-preview .terminal-tile-body{pointer-events:none}.terminal-tile-slot-preview .terminal-close-btn{display:none}.terminal-tile-slot-preview .terminal-tile-header{padding:4px 8px;font-size:11px}.terminal-pane-expanded{flex-direction:column;display:flex}.terminal-back-btn{background:var(--color-sidebar);border:none;border-bottom:1px solid var(--color-border);min-height:36px;color:var(--color-accent);cursor:pointer;flex-shrink:0;align-items:center;gap:4px;padding:8px 12px;font-size:13px;font-weight:500;display:flex}.terminal-grid-expanded{flex-direction:column!important;flex:1!important;gap:0!important;min-height:0!important;padding:0!important;display:flex!important;overflow:hidden!important}.terminal-tile-slot-active{flex-direction:column;flex:1;min-height:0;overflow:hidden;display:flex!important}.terminal-tile-slot-active .terminal-tile{border:none;border-radius:0;flex:1;height:auto!important;min-height:0!important}.terminal-tile-slot-hidden{display:none!important}.terminal-pane-expanded[data-terminal-focus=true] .terminal-grid-expanded{overflow-y:hidden!important}.status-float{right:12px;bottom:calc(78px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 24px)}.workspace-editor-grid{grid-template-rows:minmax(0,1fr);grid-template-columns:1fr;position:relative}.workspace-editor-grid>.activity-bar{z-index:101;border-right:1px solid var(--color-border);border-top:none;flex-direction:column;width:48px;height:auto;transition:transform .2s;position:absolute;top:0;bottom:0;left:0;transform:translate(-100%)}.sidebar-panel{z-index:100;border-bottom:none;border-right:1px solid var(--color-border);width:260px;transition:transform .2s;position:absolute;top:0;bottom:0;left:48px;overflow-y:auto;transform:translate(calc(-100% - 48px))}.drawer-open .workspace-editor-grid>.activity-bar,.drawer-open .sidebar-panel{transform:translate(0)}.sidebar-overlay{z-index:99;background:#0006;display:none;position:absolute;top:0;right:0;bottom:0;left:0}.drawer-open .sidebar-overlay{display:block}.workspace-editor-header{gap:8px;padding:0 8px}.workspace-editor-header .sidebar-toggle-btn{order:3;margin-left:auto}.workspace-editor-header .workspace-meta{text-align:left;min-width:0}}@media (pointer:coarse){.modal-close-btn:hover,.tree-row:hover,.editor-tab:hover,.deck-tab:hover,.deck-tab-add:hover,.topbar-btn-sm:hover,.terminal-close-btn:hover,.git-file-row:hover,.git-action-btn:hover,.git-tab:hover{border-color:inherit;color:inherit;opacity:1;background:0 0}.editor-tab:hover{color:var(--color-ink-muted);background:0 0}.git-file-actions{opacity:1}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|