github-issue-tower-defence-management 2.107.3 → 2.107.4
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/bin/adapter/entry-points/console/ui-dist/assets/index-CMq3t4ne.css +2 -0
- package/bin/adapter/entry-points/console/ui-dist/assets/{index-D9wVV6wh.js → index-K46baRog.js} +2 -2
- package/bin/adapter/entry-points/console/ui-dist/index.html +2 -2
- package/package.json +1 -1
- package/bin/adapter/entry-points/console/ui-dist/assets/index-BlQJRUQT.css +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@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-font-weight:initial;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--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:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-medium:500;--font-weight-semibold:600;--radius-md:.375rem;--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-input:#e5e5e5;--color-ring:#0a0a0a;--color-background:#fff;--color-foreground:#0a0a0a;--color-primary:#171717;--color-primary-foreground:#fafafa;--color-secondary:#f5f5f5;--color-secondary-foreground:#171717;--color-accent:#f5f5f5;--color-accent-foreground:#171717}}@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%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration: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:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}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]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.block{display:block}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.grow{flex-grow:1}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing) * 2)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-input{border-color:var(--color-input)}.border-transparent{border-color:#0000}.bg-background{background-color:var(--color-background)}.bg-primary{background-color:var(--color-primary)}.bg-secondary{background-color:var(--color-secondary)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-2{padding-block:calc(var(--spacing) * 2)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.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)}.whitespace-nowrap{white-space:nowrap}.text-foreground{color:var(--color-foreground)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.lowercase{text-transform:lowercase}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.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-accent:hover{background-color:var(--color-accent)}.hover\:bg-primary\/90:hover{background-color:#171717e6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--color-primary) 90%, transparent)}}.hover\:bg-secondary\/80:hover{background-color:#f5f5f5cc}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab, var(--color-secondary) 80%, transparent)}}.hover\:text-accent-foreground:hover{color:var(--color-accent-foreground)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--color-ring)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}}html{font-size:clamp(15px,2.1vw,26px)}body{color:#e6edf3;background-color:#0d1117;margin:0;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.console-app{flex-direction:column;width:100%;height:100dvh;display:flex;overflow:hidden}.console-list-screen{flex:1;min-height:0;overflow-y:auto}.console-tabbar{padding-top:env(safe-area-inset-top,0px);padding-left:env(safe-area-inset-left,0px);background:#161b22;border-bottom:2px solid #30363d;flex-direction:column;display:flex}.console-tabbar-top{-webkit-overflow-scrolling:touch;flex-wrap:nowrap;align-items:center;gap:12px;padding:4px 8px;display:flex;overflow-x:auto}.console-tabbar-bottom{-webkit-overflow-scrolling:touch;flex-wrap:nowrap;align-items:stretch;gap:0;padding:0 8px;display:flex;overflow-x:auto}.console-tab{color:#8b949e;white-space:nowrap;cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;align-items:center;gap:6px;margin-bottom:-2px;padding:10px 14px;font-size:.8125rem;font-weight:500;line-height:1.2;text-decoration:none;display:inline-flex}.console-tab:hover{color:#e6edf3}.console-tab[data-active=true]{color:#e6edf3;border-bottom-color:#2f81f7;font-weight:700}.console-tab-badge{text-align:center;color:#e6edf3;background:#484f58;border-radius:20px;min-width:20px;padding:1px 7px;font-size:.6875rem;font-weight:700;line-height:1.5}.console-tab-badge[data-zero=true]{color:#8b949e;background:#30363d}.console-tab-pjname{align-self:center;padding:0 8px}.console-tab-pjname-button{color:#e6edf3;cursor:pointer;background:0 0;border:none;border-radius:4px;align-items:center;gap:3px;padding:2px 4px;font-size:.8125rem;font-weight:600;line-height:1;display:flex}.console-tab-pjname-button:hover{color:#e6edf3;background:#21262d}.console-tab-pjname-arrow{font-size:.625rem}.console-tab-pjname-dropdown{z-index:100;background:#161b22;border:1px solid #30363d;border-radius:6px;min-width:120px;margin:0;padding:4px 0;list-style:none;box-shadow:0 8px 24px #01040980}.console-tab-pjname-option{color:#e6edf3;cursor:pointer;text-align:left;background:0 0;border:none;width:100%;padding:12px 16px;font-size:.7188rem;display:block}.console-tab-pjname-option:hover,.console-tab-pjname-option[data-active=true]{background:#21262d}.console-tab-project-link{color:#8b949e;border-radius:4px;padding:2px 4px;font-size:.7188rem;text-decoration:none}.console-tab-project-link:hover{color:#e6edf3;background:#21262d}.console-tab-geninfo{color:#8b949e;align-self:center;padding:0 4px;font-size:.6875rem}.console-tab-settings{align-self:center;padding:0 4px}.console-project-timer-bar{box-sizing:border-box;background:#2d0000;align-items:center;gap:8px;width:100%;min-height:28px;padding:4px 12px;display:flex;position:relative}.console-project-timer-bar-track{background:#4d0000;border-radius:3px;flex:1;height:6px;overflow:hidden}.console-project-timer-bar-fill{background:#e53e3e;border-radius:3px;height:100%;transition:width .5s linear}.console-project-timer-bar-label{color:#e53e3e;white-space:nowrap;text-align:right;min-width:60px;font-size:.6875rem;font-weight:700}.console-timer-settings-button{color:#8b949e;cursor:pointer;background:0 0;border:none;border-radius:4px;padding:4px 8px;font-size:1rem;line-height:1}.console-timer-settings-button:hover{color:#e6edf3;background:#21262d}.console-timer-settings-button--active{color:#e67e00}.console-timer-settings-overlay{z-index:100;position:fixed;inset:0}.console-timer-settings-backdrop{cursor:default;z-index:-1;background:#01040999;border:none;position:fixed;inset:0}.console-timer-settings-dialog-inner{background:#161b22;border:1px solid #30363d;border-radius:8px;min-width:280px;max-width:400px;max-height:80vh;padding:20px;overflow-y:auto}.console-timer-settings-title{color:#e6edf3;margin:0 0 16px;font-size:.9375rem;font-weight:600}.console-timer-settings-row{justify-content:space-between;align-items:center;margin-bottom:16px;display:flex}.console-timer-settings-label{color:#c9d1d9;font-size:.875rem}.console-timer-settings-loading{color:#8b949e;padding:8px 0;font-size:.875rem}.console-timer-settings-project-list{margin:0;padding:0;list-style:none}.console-timer-settings-project-row{border-bottom:1px solid #21262d;align-items:center;gap:8px;padding:6px 0;display:flex}.console-timer-settings-project-row:last-child{border-bottom:none}.console-timer-settings-pjcode{color:#c9d1d9;flex:1;font-family:ui-monospace,SFMono-Regular,monospace;font-size:.8125rem}.console-timer-settings-minutes-input{color:#e6edf3;text-align:right;background:#0d1117;border:1px solid #30363d;border-radius:4px;width:56px;padding:3px 6px;font-size:.8125rem}.console-timer-settings-minutes-label{color:#8b949e;width:24px;font-size:.75rem}.console-timer-settings-actions{justify-content:flex-end;margin-top:16px;display:flex}.console-timer-settings-save{color:#fff;cursor:pointer;background:#238636;border:1px solid #f0f6fc1a;border-radius:6px;padding:6px 14px;font-size:.8125rem;font-weight:500}.console-timer-settings-save:hover{background:#2ea043}.console-toggle-switch{cursor:pointer;background:#30363d;border:none;border-radius:12px;flex-shrink:0;align-items:center;width:44px;height:24px;padding:2px;transition:background .2s;display:inline-flex;position:relative}.console-toggle-switch--on{background:#238636}.console-toggle-switch-thumb{background:#e6edf3;border-radius:50%;width:20px;height:20px;transition:transform .2s;display:block}.console-toggle-switch--on .console-toggle-switch-thumb{transform:translate(20px)}.console-toggle-switch:focus-visible{outline-offset:2px;outline:2px solid #58a6ff}.console-tab-settings-button{color:#8b949e;cursor:pointer;background:0 0;border:1px solid #30363d;border-radius:6px;align-self:center;margin-left:4px;padding:4px 8px;font-size:1rem;line-height:1}.console-tab-settings-button:hover{color:#e6edf3;border-color:#58a6ff}.console-settings-modal{z-index:1000;background:#0d1117;flex-direction:column;display:flex;position:fixed;inset:0}.console-settings-modal-bar{background:#161b22;border-bottom:1px solid #30363d;justify-content:space-between;align-items:center;padding:12px 18px;display:flex}.console-settings-modal-title{color:#e6edf3;font-size:1rem;font-weight:600}.console-settings-modal-close{color:#8b949e;cursor:pointer;background:0 0;border:none;padding:4px 8px;font-size:1.125rem;line-height:1}.console-settings-modal-close:hover{color:#e6edf3}.console-settings-modal-body{flex-direction:column;flex:1;gap:16px;padding:24px 18px;display:flex}.console-settings-modal-loading{color:#8b949e;font-size:.875rem}.console-settings-modal-project-list{flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.console-settings-modal-project-row{flex-direction:column;gap:6px;display:flex}.console-settings-modal-label{color:#e6edf3;font-size:.875rem;font-weight:500}.console-settings-modal-input{color:#e6edf3;background:#0d1117;border:1px solid #30363d;border-radius:6px;max-width:200px;padding:6px 10px;font-size:.875rem}.console-settings-modal-input:focus{border-color:#58a6ff;outline:none}.console-settings-modal-error{color:#f85149;font-size:.875rem}.console-settings-modal-actions{gap:8px;display:flex}.console-settings-modal-save{color:#fff;cursor:pointer;background:#238636;border:1px solid #2ea043;border-radius:6px;padding:6px 16px;font-size:.875rem;font-weight:500}.console-settings-modal-save:hover:not(:disabled){background:#2ea043}.console-settings-modal-save:disabled{opacity:.5;cursor:not-allowed}.console-list{margin:0;padding:12px 18px 18px;list-style:none}.console-list-group{list-style:none}.console-item-row .console-item-icon{flex:none}.console-queued-item-title{text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;min-width:0;overflow:hidden}.console-queued-item-badges{flex-wrap:wrap;flex:1 1 0;align-items:center;gap:4px;min-width:0;display:flex}.console-queued-item-actions{flex:1 1 0;min-width:0}.console-group-header{background:#0b0f14;border-bottom:1px solid #21262d;justify-content:space-between;align-items:center;padding:6px 12px;display:flex}.console-storytag{align-items:center;gap:8px;font-size:.8125rem;font-weight:700;display:inline-flex}.console-story-dot{border-radius:999px;width:10px;height:10px;display:inline-block}.console-copy-story-name-button{color:#c9d1d9;border:1px solid #30363d;border-radius:6px;height:24px;padding:0 8px;font-size:.75rem}.console-copy-story-name-button:hover{color:#e6edf3;background-color:#21262d}.console-group-count{color:#8b949e;font-size:.75rem}.console-story-color-palette{flex-wrap:wrap;gap:4px;padding:6px 0;display:flex}.console-story-color-swatch{cursor:pointer;color:#e6edf3;border:2px solid #0000;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;padding:0;font-size:.625rem;display:inline-flex}.console-story-color-swatch:hover{border-color:#e6edf3}.console-story-color-swatch:disabled{opacity:.4;cursor:not-allowed}.console-story-color-swatch-label{font-size:.5rem;line-height:1}.console-item-row{color:#e6edf3;text-align:left;cursor:pointer;background:#161b22;border:1px solid #30363d;border-radius:8px;align-items:flex-start;gap:14px;width:100%;margin-bottom:10px;padding:12px 16px;display:flex}.console-item-row:hover{background:#1a2029;border-color:#484f58}.console-item-row[data-active=true]{background:#1a2029;border-color:#4493f8}.console-item-meta{flex:1;min-width:0}.console-item-title{align-items:center;gap:6px;font-size:.9063rem;font-weight:600;display:flex}.console-item-sub{color:#8b949e;margin-top:3px;font-size:.7813rem;display:block}.console-item-pill{color:#8b949e;border:1px solid #30363d;border-radius:20px;margin-right:6px;padding:1px 8px;font-size:.6875rem;display:inline-block}.console-item-createdat{color:#8b949e;cursor:help}.console-item-fields,.console-item-status-agent{color:#adbac7;flex-wrap:wrap;gap:4px 10px;margin-top:4px;font-size:.7188rem;display:flex}.console-item-field{word-break:break-all;align-items:baseline;gap:4px;min-width:0;display:inline-flex}.console-item-field-label{color:#6e7681;text-transform:uppercase;letter-spacing:.03em;font-size:.625rem}.console-item-executive-summary{color:#8b949e;white-space:pre-line;word-break:break-word;background:#0d1117;border-left:2px solid #30363d;border-radius:0 4px 4px 0;margin-top:6px;padding:6px 8px;font-size:.75rem;display:block}.console-list-message{color:#8b949e;padding:16px;font-size:.875rem}.console-list-empty{text-align:center;color:#8b949e;padding:40px;font-size:.875rem}.console-list-error,.console-detail-fetch-error{color:#f85149}.console-detail-fetch-error-line{margin:0}.console-comment-notloaded,.console-files-notloaded,.console-commits-notloaded,.console-detail-body-notloaded{color:#8b949e}.console-detail{flex-direction:column;flex:1;min-height:0;display:flex}.console-detail-header{background:#0d1117;flex-direction:column;flex-shrink:0;gap:12px;padding:16px 16px 12px;display:flex}.console-detail-body{flex-direction:column;flex:1;gap:12px;min-height:0;padding:0 16px 12px;display:flex;overflow-y:auto}.console-detail-topline{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.console-detail-title{align-items:center;gap:8px;margin:0;font-size:1.25rem;display:flex}.console-detail-title-text{flex:1}.console-detail-number{color:#8b949e;font-weight:400}.console-detail-closed-label{color:#a371f7;font-size:.8125rem}.console-detail-subbar{align-items:center;gap:12px;font-size:.8125rem;display:flex}.console-detail-link{color:#4493f8}.console-detail-repo{color:#8b949e;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.console-copy-url-button{color:#c9d1d9;border:1px solid #30363d;border-radius:6px;height:24px;padding:0 8px;font-size:.75rem}.console-copy-url-button:hover{color:#e6edf3;background-color:#21262d}.console-label-chip,.console-detail-status-chip{border:1px solid #30363d;border-radius:999px;padding:2px 8px;font-size:.75rem;display:inline-block}.console-detail-agent-chip{color:#8b949e;border:1px solid #30363d;border-radius:999px;padding:2px 8px;font-size:.75rem;font-weight:400;display:inline-block}.console-detail-pr-status{flex-wrap:wrap;align-items:center;gap:6px;display:inline-flex}.console-related-pr-group{align-items:center;gap:6px;display:inline-flex}.console-related-pr-label{color:#8b949e;font-size:.75rem}.console-detail-ci-missing{opacity:.85;font-weight:400}.console-detail-mergeable-chip{font-weight:600}.console-detail-mergeable-chip-unknown{opacity:.7;font-weight:400}.console-detail-createdat{color:#8b949e;font-size:.75rem}.console-panel{border:1px solid #30363d;border-radius:8px;overflow:clip}.console-panel-header{background:#161b22;justify-content:space-between;align-items:center;display:flex}.console-panel-toggle{color:#e6edf3;text-align:left;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;gap:8px;padding:6px 12px;font-size:.875rem;font-weight:600;display:flex}.console-panel-toggle:hover{background:#1a2029}.console-panel-action{padding:6px 12px}.console-panel-body{padding:12px}.console-markdown{word-break:break-word;font-size:.875rem;line-height:1.5}.console-markdown ul{margin:.5em 0;padding-left:1.5em;list-style:outside}.console-markdown ol{margin:.5em 0;padding-left:1.5em;list-style:decimal}.console-markdown li{margin:.25em 0}.console-markdown table{border-collapse:collapse;margin:.5em 0}.console-markdown th,.console-markdown td{border:1px solid #30363d;padding:4px 8px}.console-markdown th{background:#161b22}.console-markdown h1,.console-markdown h2,.console-markdown h3,.console-markdown h4,.console-markdown h5,.console-markdown h6{margin:1em 0 .5em;font-weight:700;line-height:1.25}.console-markdown h1{font-size:1.6em}.console-markdown h2{font-size:1.4em}.console-markdown h3{font-size:1.2em}.console-markdown h4{font-size:1.05em}.console-markdown h5{font-size:.95em}.console-markdown h6{color:#8b949e;font-size:.9em}.console-markdown pre{background:#161b22;border:1px solid #30363d;border-radius:6px;margin:.5em 0;padding:12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.8125rem;line-height:1.45;overflow-x:auto}.console-markdown code{background:#6e768166;border-radius:4px;padding:.15em .4em;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em}.console-markdown pre code{font-size:inherit;background:0 0;border-radius:0;padding:0}.console-markdown-code-block{flex-direction:column;margin:.5em 0;display:flex}.console-markdown-code-block pre{margin:0}.console-markdown-code-copy-host{justify-content:flex-end;margin-bottom:4px;display:flex}.console-copy-code-button{color:#c9d1d9;background-color:#161b22;border:1px solid #30363d;border-radius:6px;height:24px;padding:0 8px;font-size:.75rem}.console-copy-code-button:hover{color:#e6edf3;background-color:#21262d}.console-markdown blockquote{color:#8b949e;border-left:3px solid #30363d;margin:.5em 0;padding:0 1em}.console-markdown a{color:#4493f8;text-decoration:none}.console-markdown a:hover{text-decoration:underline}.console-markdown-reference-host{display:inline}.console-markdown-reference{vertical-align:baseline;align-items:center;gap:.25em;display:inline-flex}.console-markdown-reference .console-item-icon{flex-shrink:0}.console-markdown-reference-title{text-decoration:none}.console-markdown-reference:hover .console-markdown-reference-title{text-decoration:underline}.console-markdown-reference-number{color:#8b949e;flex-shrink:0;font-size:.75em}.console-markdown hr{border:none;border-top:1px solid #30363d;margin:1em 0}.console-mermaid-error{color:#f85149;font-size:.8125rem}.console-mermaid-enlarge{color:#e6edf3;background:#21262d;border:1px solid #30363d;border-radius:6px;width:100%;margin-top:6px;padding:10px 12px;font-size:.8125rem;display:block}.console-mermaid-modal{z-index:1000;background:#0d1117;flex-direction:column;display:flex;position:fixed;inset:0}.console-mermaid-modal-bar{border-bottom:1px solid #30363d;align-items:center;gap:8px;padding:8px 12px;display:flex}.console-mermaid-modal-button,.console-mermaid-modal-close{color:#e6edf3;background:#21262d;border:1px solid #30363d;border-radius:6px;min-width:44px;min-height:44px;font-size:1.125rem}.console-mermaid-modal-button:disabled{opacity:.4}.console-mermaid-modal-close{margin-left:auto}.console-mermaid-modal-scale{text-align:center;color:#8b949e;min-width:4.5rem;font-size:.875rem}.console-mermaid-modal-viewport{-webkit-overflow-scrolling:touch;flex:1;overflow:auto}.console-mermaid-modal-canvas{min-width:100%}.console-comment{white-space:nowrap;background:#161b22;border:1px solid #30363d;border-radius:8px;align-items:baseline;gap:8px;margin-bottom:4px;padding:6px 16px;display:flex;overflow:hidden}.console-comment-toggle{min-width:0;color:inherit;font:inherit;cursor:pointer;text-align:left;background:0 0;border:none;flex:1;align-items:baseline;gap:8px;padding:0;display:inline-flex}.console-comment-show-all{color:#e6edf3;cursor:pointer;background:#21262d;border:1px solid #30363d;border-radius:6px;margin-bottom:10px;padding:6px 12px;font-size:.75rem;font-weight:600}.console-comment-show-all:hover{background-color:#262c34;border-color:#484f58}.console-comment--expandable{cursor:pointer}.console-comment--expandable:hover{border-color:#484f58}.console-comment-author{color:#e6edf3;flex-shrink:0;font-size:.75rem;font-weight:600}.console-comment-time{color:#8b949e;flex-shrink:0;font-size:.75rem}.console-comment-body-preview{text-overflow:ellipsis;white-space:nowrap;color:#8b949e;flex:1;min-width:0;font-size:.75rem;overflow:hidden}.console-comment.is-expanded{white-space:normal;flex-wrap:wrap;overflow:visible}.console-comment-body-expanded{cursor:default;flex-basis:100%;min-width:0}.console-files,.console-commits{margin:0;padding:0;list-style:none}.console-commit{align-items:center;gap:8px;padding:4px 0;font-size:.8125rem;display:flex}.console-file{flex-direction:column;font-size:.8125rem;display:flex}.console-file-tree,.console-file-tree-children{margin:0;padding:0;list-style:none}.console-file-tree-dir{flex-direction:column;display:flex}.console-file-tree-dir-name{color:#8b949e;align-items:center;gap:6px;padding:4px 0;font-weight:600;display:flex}.console-file-tree-dir-icon{flex:none}.console-file-badge{text-align:center;border:1px solid;border-radius:4px;width:18px;font-size:.6875rem}.console-file-path,.console-commit-message{flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.console-file-add,.console-pr-add{color:#3fb950}.console-file-del,.console-pr-del{color:#f85149}.console-commit-sha{color:#8b949e;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.console-detail-dock{background:#161b22;border-top:2px solid #30363d;flex-shrink:0;max-height:45dvh;overflow-y:auto}.console-detail-dock-composer{max-height:50vh;padding:8px 16px 0;overflow-y:auto}.console-actionbar{padding:10px 16px;padding-bottom:calc(10px + env(safe-area-inset-bottom));background:#161b22}.console-operation-bar{flex-direction:column;gap:8px;width:100%;display:flex}.console-op-group{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.console-op-group-review{gap:10px}.console-op-group-rare-actions{justify-content:flex-start}.console-op-group-left-pair{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.console-op-group-bottom-row{justify-content:space-between;align-items:center;gap:8px;display:flex}.console-op-group-stories{max-height:33vh;overflow-y:auto}.console-story-select,.console-agent-select{color:#e6edf3;cursor:pointer;background:#21262d;border:1px solid #30363d;border-radius:6px;max-width:100%;padding:9px 12px;font-size:.8125rem;font-weight:600}.console-story-select:hover,.console-agent-select:hover{border-color:#484f58}.console-op-button{color:#e6edf3;white-space:nowrap;cursor:pointer;background:#21262d;border:1px solid #30363d;border-radius:6px;padding:9px 16px;font-size:.8125rem;font-weight:600}.console-op-button:hover{border-color:#484f58}.console-op-button:disabled{opacity:.4;cursor:not-allowed}.console-op-requirement{text-align:right;color:#8b949e;width:100%;margin:0;font-size:.75rem}.console-op-button-approve{color:#fff;background:#238636;border-color:#2ea043}.console-op-button-reject{color:#ffd166;background:#7d5000;border-color:#a06800}.console-op-button-wrong{color:#f85149;background:#3a1518;border-color:#f85149}.console-op-button-unneeded{color:#aab0b8;background:#2a2d31;border-color:#6e7681}.console-op-button-snooze{color:#79c0ff;background:#1c2b4a;border-color:#4493f8}.console-op-button-danger{color:#f85149;background:#3a1518;border-color:#f85149}.console-pr-section{border:1px solid #30363d;border-radius:8px;flex-direction:column;gap:10px;padding:12px;display:flex}.console-pr-statbar{color:#8b949e;gap:12px;font-size:.75rem;display:flex}.console-pr-repo{color:#8b949e;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.console-detail-screen{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.console-panel-open-link{color:#4493f8;font-size:.8125rem;font-weight:400}.console-composer{margin-top:4px}.console-composer-toggle{color:#8b949e;cursor:pointer;background:0 0;border:none;margin-left:auto;padding:2px 0;font-size:.7813rem;display:block}.console-composer-toggle:hover{color:#e6edf3}.console-composer-form{margin-top:8px}.console-composer-input{box-sizing:border-box;color:#e6edf3;width:100%;font:inherit;resize:vertical;background:#21262d;border:1px solid #30363d;border-radius:6px;padding:8px;font-size:.875rem}.console-composer-attach{align-items:center;gap:8px;padding:0 10px;display:flex}.console-composer-file-input{display:none}.console-composer-attach-button{color:#c9d1d9;cursor:pointer;background:#21262d;border:1px solid #30363d;border-radius:4px;padding:4px 8px;font-size:.75rem}.console-composer-attach-button:disabled{opacity:.6;cursor:default}.console-composer-row{justify-content:flex-end;align-items:center;gap:8px;margin-top:6px;display:flex}.console-composer-submit{color:#fff;cursor:pointer;background:#238636;border:1px solid #2ea043;border-radius:6px;padding:7px 16px;font-size:.8125rem;font-weight:600}.console-composer-submit:disabled{opacity:.6;cursor:default}.console-composer-status{color:#8b949e;font-size:.75rem}.console-composer-error{color:#f85149}.console-undo-toast,.console-error-toast{z-index:9998;white-space:nowrap;border-radius:10px;align-items:center;gap:12px;max-width:92vw;padding:12px 18px;font-size:.8438rem;display:flex;position:fixed;top:12px;left:50%;transform:translate(-50%);box-shadow:0 4px 20px #0009}.console-undo-toast-green{color:#3fb950;background:#0d3320;border:1px solid #2ea043}.console-undo-toast-amber{color:#ffd166;background:#3a2800;border:1px solid #a06800}.console-undo-toast-red{color:#f85149;background:#3a1518;border:1px solid #da3633}.console-undo-toast-gray{color:#aab0b8;background:#2a2d31;border:1px solid #6e7681}.console-undo-toast-blue{color:#79c0ff;background:#0d1f40;border:1px solid #4493f8}.console-undo-toast-error{color:#f85149;background:#3a1518;border:1px solid #f85149}.console-undo-toast-message,.console-error-toast-message{text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.console-undo-toast-undo,.console-error-toast-dismiss{cursor:pointer;color:inherit;background:#ffffff1f;border:none;border-radius:6px;flex:none;padding:4px 12px;font-size:.8125rem;font-weight:700}.console-undo-toast-undo:hover,.console-error-toast-dismiss:hover{background:#ffffff38}.console-undo-toast-countdown{opacity:.7;flex:none;font-size:.6875rem}.console-undo-toast-bar{opacity:.5;background:currentColor;border-radius:0 0 10px 10px;height:3px;transition:width .1s linear;position:absolute;bottom:0;left:0}.console-error-toast-title{flex:none;font-weight:700}.console-file-row{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;padding:4px 0;font-size:.8125rem;display:flex}.console-file-row:hover{background:#1a2029}.console-file-caret{color:#8b949e;flex:none;width:1em}.console-file-diff{border-collapse:collapse;width:100%;margin:4px 0 8px;font:.8125rem/1.6 ui-monospace,SFMono-Regular,Menlo,monospace}.console-file-diff td{white-space:pre-wrap;word-break:break-word;vertical-align:top;padding:0 10px}.console-diff-ln{text-align:right;color:#6e7681;-webkit-user-select:none;user-select:none;white-space:nowrap;border-right:1px solid #30363d;width:1%;padding:0 8px}.console-file-diff td.console-diff-ln{white-space:nowrap;word-break:normal;overflow-wrap:normal}.console-diff-add td{background:#2ea04326}.console-diff-add .console-diff-code{color:#aff5b4}.console-diff-del td{background:#f8514926}.console-diff-del .console-diff-code{color:#ffdcd7}.console-diff-hunk td{color:#79c0ff;background:#161b22}.console-diff-ctx .console-diff-code{color:#c9d1d9}.console-file-diff-empty{color:#8b949e;padding:8px 14px;font-size:.75rem}.console-file-diff-image{padding:8px 14px}.console-file-diff-image-content{object-fit:contain;object-position:left top;border:1px solid #30363d;border-radius:4px;max-width:100%;max-height:420px}.console-diff-comment-cell{text-align:center;-webkit-user-select:none;user-select:none;width:1%;padding:0 2px}.console-diff-comment-button{color:#6e7681;cursor:pointer;opacity:.6;background:0 0;border:1px solid #30363d;border-radius:4px;width:18px;height:18px;padding:0;font-size:.875rem;line-height:16px}.console-diff-row:hover .console-diff-comment-button,.console-diff-comment-button:focus-visible,.console-diff-comment-button[aria-expanded=true]{opacity:1;color:#fff;background:#1f6feb;border-color:#2f81f7}.console-diff-composer-row td{background:#0d1117;padding:6px 10px}.console-diff-composer{background:#161b22;border:1px solid #30363d;border-radius:6px;flex-direction:column;gap:6px;padding:8px;display:flex}.console-diff-composer-anchor{color:#8b949e;font-size:.6875rem}.console-diff-composer-input{resize:vertical;color:#c9d1d9;width:100%;font:inherit;background:#0d1117;border:1px solid #30363d;border-radius:6px;padding:6px 8px}.console-diff-composer-controls{align-items:center;gap:8px;display:flex}.console-diff-composer-submit{color:#fff;cursor:pointer;background:#238636;border:1px solid #238636;border-radius:6px;padding:4px 12px}.console-diff-composer-submit:disabled{opacity:.6;cursor:default}.console-diff-composer-cancel{color:#c9d1d9;cursor:pointer;background:0 0;border:1px solid #30363d;border-radius:6px;padding:4px 12px}.console-diff-composer-status{color:#8b949e;font-size:.75rem}.console-diff-composer-error{color:#ff7b72}.console-diff-composer-posted{color:#3fb950;margin:0;font-size:.75rem}.console-pr-header{flex-wrap:wrap;align-items:center;gap:10px;padding-top:4px;display:flex}.console-pr-section-title{color:#e6edf3;font-size:.9375rem;font-weight:600}.console-pr-section-state{color:#8b949e;border:1px solid #6e7681;border-radius:999px;padding:1px 8px;font-size:.6875rem}.console-offline-panel{background:#161b22;border-bottom:2px solid #30363d}.console-offline-panel-header{color:#c9d1d9;border-bottom:1px solid #21262d;padding:8px 16px;font-size:.8125rem;font-weight:600}.console-offline-panel-item{border-bottom:1px solid #21262d;border-left:3px solid #30363d;flex-direction:column;gap:4px;padding:10px 16px;display:flex}.console-offline-panel-item:last-child{border-bottom:none}.console-offline-panel-item-green{background:#0d332066;border-left-color:#2ea043}.console-offline-panel-item-amber{background:#3a280066;border-left-color:#a06800}.console-offline-panel-item-red{background:#3a151866;border-left-color:#da3633}.console-offline-panel-item-gray{background:#2a2d3166;border-left-color:#6e7681}.console-offline-panel-item-blue{background:#0d1f4066;border-left-color:#4493f8}.console-offline-panel-item-error{background:#3a151866;border-left-color:#f85149}.console-offline-panel-item-message{color:#e6edf3;font-size:.8125rem;font-weight:600}.console-offline-panel-item-target{color:#8b949e;font-size:.75rem}.console-offline-panel-item-fetch-error{color:#f85149;font-size:.75rem}.console-offline-panel-item-pr-status{color:#8b949e;font-size:.75rem}.console-offline-panel-item-controls{gap:8px;margin-top:4px;display:flex}.console-offline-panel-confirm{color:#fff;cursor:pointer;background:#238636;border:1px solid #2ea043;border-radius:6px;padding:4px 12px;font-size:.75rem;font-weight:600}.console-offline-panel-confirm:hover:not(:disabled){background:#2ea043}.console-offline-panel-confirm:disabled{opacity:.4;cursor:not-allowed}.console-offline-panel-discard{color:#8b949e;cursor:pointer;background:0 0;border:1px solid #30363d;border-radius:6px;padding:4px 12px;font-size:.75rem;font-weight:600}.console-offline-panel-discard:hover{color:#f85149;border-color:#f85149}.console-task-create-button{color:#8b949e;cursor:pointer;white-space:nowrap;background:0 0;border:1px solid #30363d;border-radius:6px;align-self:center;margin-left:4px;padding:4px 8px;font-size:.8125rem;line-height:1}.console-task-create-button:hover{color:#e6edf3;border-color:#58a6ff}.console-task-create-button:disabled{opacity:.4;cursor:not-allowed}.console-task-create-form{flex-wrap:wrap;align-items:center;gap:4px;margin-left:4px;display:flex}.console-task-create-form-select{color:#e6edf3;cursor:pointer;background:#161b22;border:1px solid #30363d;border-radius:6px;padding:3px 6px;font-size:.8125rem}.console-task-create-form-input{color:#e6edf3;background:#0d1117;border:1px solid #30363d;border-radius:6px;min-width:160px;padding:3px 8px;font-size:.8125rem}.console-task-create-form-input:focus{border-color:#58a6ff;outline:none}.console-task-create-form-submit,.console-task-create-form-cancel{color:#e6edf3;cursor:pointer;white-space:nowrap;background:#21262d;border:1px solid #30363d;border-radius:6px;padding:3px 10px;font-size:.8125rem}.console-task-create-form-submit:hover,.console-task-create-form-cancel:hover{border-color:#484f58}.console-task-create-form-submit:disabled,.console-task-create-form-cancel:disabled{opacity:.4;cursor:not-allowed}.console-task-create-dialog-overlay{z-index:1000;background:#01040999;justify-content:center;align-items:flex-start;padding-top:60px;display:flex;position:fixed;inset:0}.console-task-create-dialog{background:#0d1117;border:1px solid #30363d;border-radius:8px;flex-direction:column;width:100%;max-width:560px;max-height:calc(100vh - 100px);display:flex;overflow:hidden}.console-task-create-dialog-bar{background:#161b22;border-bottom:1px solid #30363d;flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 18px;display:flex}.console-task-create-dialog-title{color:#e6edf3;font-size:1rem;font-weight:600}.console-task-create-dialog-bar-actions{align-items:center;gap:4px;display:flex}.console-task-create-dialog-open-link{color:#8b949e;align-items:center;padding:4px 8px;font-size:1.125rem;line-height:1;text-decoration:none;display:inline-flex}.console-task-create-dialog-open-link:hover{color:#e6edf3}.console-task-create-dialog-close{color:#8b949e;cursor:pointer;background:0 0;border:none;padding:4px 8px;font-size:1.125rem;line-height:1}.console-task-create-dialog-close:hover{color:#e6edf3}.console-task-create-dialog-body{flex-direction:column;flex:1;gap:10px;min-height:0;padding:20px 18px;display:flex;overflow-y:auto}.console-task-create-dialog-section-label{color:#e6edf3;font-size:.875rem;font-weight:500}.console-task-create-dialog-textarea{color:#e6edf3;resize:vertical;background:#0d1117;border:1px solid #30363d;border-radius:6px;min-height:72px;padding:8px 10px;font-size:.875rem}.console-task-create-dialog-textarea:focus{border-color:#58a6ff;outline:none}.console-task-create-dialog-option-list{flex-wrap:wrap;gap:6px;max-height:160px;display:flex;overflow-y:auto}.console-task-create-dialog-option-button{color:#c9d1d9;cursor:pointer;white-space:nowrap;background:#21262d;border:1px solid #30363d;border-radius:20px;padding:4px 10px;font-size:.8125rem}.console-task-create-dialog-option-button:hover{color:#e6edf3;border-color:#58a6ff}.console-task-create-dialog-option-button--selected{color:#fff;background:#1f6feb;border-color:#1f6feb}.console-task-create-dialog-input{color:#e6edf3;background:#0d1117;border:1px solid #30363d;border-radius:6px;padding:6px 10px;font-size:.875rem}.console-task-create-dialog-input:focus{border-color:#58a6ff;outline:none}.console-task-create-dialog-file-input{color:#8b949e;font-size:.8125rem}.console-task-create-dialog-file-list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.console-task-create-dialog-file-item{background:#161b22;border:1px solid #30363d;border-radius:6px;align-items:center;gap:8px;padding:4px 8px;display:flex}.console-task-create-dialog-file-thumbnail{object-fit:cover;border-radius:4px;flex-shrink:0;width:32px;height:32px}.console-task-create-dialog-file-name{color:#c9d1d9;text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:.8125rem;overflow:hidden}.console-task-create-dialog-file-remove{color:#8b949e;cursor:pointer;background:0 0;border:none;flex-shrink:0;padding:2px 6px;font-size:.875rem;line-height:1}.console-task-create-dialog-file-remove:hover{color:#f85149}.console-task-create-dialog-file-remove:disabled{opacity:.5;cursor:not-allowed}.console-task-create-dialog-actions{justify-content:flex-end;gap:8px;margin-top:4px;display:flex}.console-task-create-dialog-submit{color:#fff;cursor:pointer;background:#238636;border:1px solid #2ea043;border-radius:6px;padding:6px 16px;font-size:.875rem;font-weight:500}.console-task-create-dialog-submit:hover:not(:disabled){background:#2ea043}.console-task-create-dialog-submit:disabled{opacity:.5;cursor:not-allowed}.console-task-create-dialog-cancel{color:#c9d1d9;cursor:pointer;background:#21262d;border:1px solid #30363d;border-radius:6px;padding:6px 16px;font-size:.875rem}.console-task-create-dialog-cancel:hover:not(:disabled){border-color:#484f58}.console-task-create-dialog-cancel:disabled{opacity:.5;cursor:not-allowed}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{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}
|
package/bin/adapter/entry-points/console/ui-dist/assets/{index-D9wVV6wh.js → index-K46baRog.js}
RENAMED
|
@@ -10,7 +10,7 @@ Error generating stack: `+e.message+`
|
|
|
10
10
|
|
|
11
11
|
`),_e=`In Tmux by human`,ve=`Awaiting Workspace`,ye=[`In Tmux by human`,`Todo by human`,ve],be=e=>e===`todo-by-human`||e===`todo-by-agent`,xe=({statusOptions:e,onOkAndAwaitingWorkspace:t})=>{let n=e.find(e=>e.name.toLowerCase()===ve.toLowerCase());if(n===void 0)return null;let r=j(n.color);return(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,style:{color:r.fg,borderColor:r.border,backgroundColor:r.bg},onClick:()=>t(n),children:`ok & Awaiting Workspace`})})},Se={issueOpen:{color:`#3fb950`,paths:[`M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z`,`M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z`]},issueClosed:{color:`#a371f7`,paths:[`M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z`,`M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z`]},issueClosedNotPlanned:{color:`#848d97`,paths:[`M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm9.78-2.22-5.5 5.5a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l5.5-5.5a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z`]},prOpen:{color:`#3fb950`,paths:[`M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z`]},prMerged:{color:`#a371f7`,paths:[`M5.45 5.154A4.25 4.25 0 0 0 9.25 7.5h1.378a2.251 2.251 0 1 1 0 1.5H9.25A5.734 5.734 0 0 1 5 7.123v3.505a2.25 2.25 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.95-.218ZM4.25 13.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm8.5-4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM5 3.25a.75.75 0 1 0 0 .005V3.25Z`]},prClosed:{color:`#f85149`,paths:[`M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 5.5a.75.75 0 0 1 .75.75v3.378a2.251 2.251 0 1 1-1.5 0V7.25a.75.75 0 0 1 .75-.75Zm-2.03-5.273a.75.75 0 0 1 1.06 0l.97.97.97-.97a.748.748 0 0 1 1.265.332.75.75 0 0 1-.205.729l-.97.97.97.97a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-.97-.97-.97.97a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l.97-.97-.97-.97a.75.75 0 0 1 0-1.06ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z`]},prDraft:{color:`#8b949e`,paths:[`M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 14a2.25 2.25 0 1 1 0-4.5 2.25 2.25 0 0 1 0 4.5ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM14 7.5a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm0-4.25a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Z`]}},Ce=({isPr:e,state:t,merged:n,isDraft:r,stateReason:i})=>e?r?`prDraft`:n?`prMerged`:t===`closed`?`prClosed`:`prOpen`:t===`closed`?i===`not_planned`?`issueClosedNotPlanned`:`issueClosed`:`issueOpen`,we=({size:e=12,...t})=>{let n=Ce(t),r=Se[n];return(0,x.jsx)(`svg`,{className:`console-item-icon`,viewBox:`0 0 16 16`,width:e,height:e,fill:r.color,role:`img`,"aria-label":n,children:r.paths.map(e=>(0,x.jsx)(`path`,{d:e},e))})},Te=({item:e,isActive:t,now:n,statusOptions:r=[],onSelect:i})=>(0,x.jsx)(`button`,{type:`button`,className:`console-item-row`,"aria-current":t?`true`:void 0,"data-active":t?`true`:void 0,onClick:()=>i(e),children:(0,x.jsxs)(`span`,{className:`console-item-meta`,children:[(0,x.jsxs)(`span`,{className:`console-item-title`,children:[(0,x.jsx)(we,{isPr:e.isPr,state:`open`,merged:!1,isDraft:!1,stateReason:``}),e.title]}),(0,x.jsxs)(`span`,{className:`console-item-sub`,children:[(0,x.jsxs)(`span`,{className:`console-item-pill`,children:[`#`,e.number]}),e.repo!==``&&(0,x.jsx)(`span`,{className:`console-item-pill`,children:e.repo}),(0,x.jsx)(`span`,{className:`console-item-pill`,children:e.isPr?`PR`:`Issue`}),e.createdAt!==``&&(0,x.jsxs)(`span`,{className:`console-item-opened`,children:[` · opened `,(0,x.jsx)(`span`,{className:`console-item-createdat`,title:O(e.createdAt),children:ie(e.createdAt,n)})]}),e.status!==null&&e.status!==``&&(0,x.jsx)(`span`,{className:`console-item-status-badge`,style:ce(r.find(t=>t.name===e.status)?.color??null),children:e.status})]}),(e.nextActionDate!==null||e.nextActionHour!==null||e.dependedIssueUrls.length>0)&&(0,x.jsxs)(`span`,{className:`console-item-fields`,children:[e.nextActionDate!==null&&(0,x.jsxs)(`span`,{className:`console-item-field`,children:[(0,x.jsx)(`span`,{className:`console-item-field-label`,children:`Next Action Date`}),e.nextActionDate.slice(0,10)]}),e.nextActionHour!==null&&(0,x.jsxs)(`span`,{className:`console-item-field`,children:[(0,x.jsx)(`span`,{className:`console-item-field-label`,children:`Next Action Hour`}),e.nextActionHour]}),e.dependedIssueUrls.length>0&&(0,x.jsxs)(`span`,{className:`console-item-field`,children:[(0,x.jsx)(`span`,{className:`console-item-field-label`,children:`Depended Issue URL`}),e.dependedIssueUrls.join(`, `)]})]}),e.agent!==null&&e.agent!==``&&(0,x.jsx)(`span`,{className:`console-item-status-agent`,children:(0,x.jsxs)(`span`,{className:`console-item-field`,children:[(0,x.jsx)(`span`,{className:`console-item-field-label`,children:`Agent`}),e.agent]})})]})}),Ee=({story:e,count:t,colorEnum:n})=>{let r=j(n);return(0,x.jsxs)(`div`,{className:`console-group-header`,children:[(0,x.jsxs)(`span`,{className:`console-storytag`,children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:r.dot}}),e]}),(0,x.jsx)(`span`,{className:`console-group-count`,children:t})]})},De=({rows:e,storyColors:t,statusOptions:n=[],activeItemId:r,now:i,isLoading:a,error:o,onSelectItem:s,executiveSummaries:c,onOkAndAwaitingWorkspace:l})=>o===null?a?(0,x.jsx)(`p`,{className:`console-list-message`,children:`Loading list...`}):e.length===0?(0,x.jsx)(`p`,{className:`console-list-empty`,children:`No items`}):(0,x.jsx)(`ul`,{className:`console-list`,children:e.map(e=>{if(e.kind===`group-header`)return(0,x.jsx)(`li`,{className:`console-list-group`,children:(0,x.jsx)(Ee,{story:e.story,count:e.count,colorEnum:F(t,e.story)})},`group:${e.story}`);let a=c?.[e.item.projectItemId]??null;return(0,x.jsxs)(`li`,{className:`console-list-row`,children:[(0,x.jsx)(Te,{item:e.item,isActive:e.item.itemId===r,now:i,statusOptions:n,onSelect:s}),a!==null&&a!==``&&(0,x.jsx)(`span`,{className:`console-item-executive-summary`,children:a}),l!==void 0&&(0,x.jsx)(xe,{statusOptions:n,onOkAndAwaitingWorkspace:t=>l(e.item,t)})]},e.item.itemId)})}):(0,x.jsxs)(`p`,{role:`alert`,className:`console-list-message console-list-error`,children:[`Failed to load list: `,o]}),Oe=({agentOptions:e,agentCounts:t,selectedAgent:n,onAgentChange:r})=>{let i=e.filter(e=>(t[e.name]??0)>0);return i.length===0?null:(0,x.jsx)(`div`,{className:`console-prs-agent-filter`,children:(0,x.jsxs)(`select`,{value:n??``,onChange:e=>r(e.target.value===``?null:e.target.value),"aria-label":`Filter by agent`,children:[(0,x.jsx)(`option`,{value:``,children:`All agents`}),i.map(e=>(0,x.jsxs)(`option`,{value:e.name,children:[e.name,` (`,t[e.name],`)`]},e.id))]})})},ke=e=>({...ce(e),fontSize:`12px`,whiteSpace:`nowrap`,flexShrink:0}),Ae=({item:e,isActive:t,statusOptions:n,agentOptions:r,onSelect:i})=>{let a=n.find(t=>t.name===e.status),o=r.find(t=>t.name===e.agent);return(0,x.jsxs)(`button`,{type:`button`,className:`console-item-row console-queued-item-row`,"aria-current":t?`true`:void 0,"data-active":t?`true`:void 0,onClick:()=>i(e),children:[(0,x.jsx)(we,{isPr:e.isPr,state:`open`,merged:!1,isDraft:!1,stateReason:``}),(0,x.jsx)(`span`,{className:`console-queued-item-title`,children:e.title}),(0,x.jsxs)(`span`,{className:`console-queued-item-badges`,children:[e.status!==null&&e.status!==``&&(0,x.jsx)(`span`,{className:`console-queued-item-badge`,style:ke(a?.color??null),children:e.status}),e.agent!==null&&e.agent!==``&&(0,x.jsx)(`span`,{className:`console-queued-item-badge`,style:ke(o?.color??null),children:e.agent})]}),(0,x.jsx)(`span`,{className:`console-queued-item-actions`})]})},je=({rows:e,storyColors:t,statusOptions:n,agentOptions:r,activeItemId:i,isLoading:a,error:o,onSelectItem:s})=>o===null?a?(0,x.jsx)(`p`,{className:`console-list-message`,children:`Loading list...`}):e.length===0?(0,x.jsx)(`p`,{className:`console-list-empty`,children:`No items`}):(0,x.jsx)(`ul`,{className:`console-list`,children:e.map(e=>e.kind===`group-header`?(0,x.jsx)(`li`,{className:`console-list-group`,children:(0,x.jsx)(Ee,{story:e.story,count:e.count,colorEnum:F(t,e.story)})},`group:${e.story}`):(0,x.jsx)(`li`,{className:`console-list-row`,children:(0,x.jsx)(Ae,{item:e.item,isActive:e.item.itemId===i,statusOptions:n,agentOptions:r,onSelect:s})},e.item.itemId))}):(0,x.jsxs)(`p`,{role:`alert`,className:`console-list-message console-list-error`,children:[`Failed to load list: `,o]}),Me=Object.keys(se),Ne=({placeholder:e,emptyValueError:t,onSubmit:n,onCancel:r,initialValue:i=``,submitLabel:a=`Create`,selectAllOnFocus:o=!1,multiline:s=!1})=>{let[c,l]=(0,y.useState)(i),[u,d]=(0,y.useState)(!1),[f,p]=(0,y.useState)(null),m=(0,y.useRef)(null),h=(0,y.useRef)(null),g=(0,y.useRef)(o);(0,y.useEffect)(()=>{s?(h.current?.focus(),g.current&&h.current?.select()):(m.current?.focus(),g.current&&m.current?.select())},[s]);let _=async()=>{let e=c.trim();if(e.length===0&&t!==``){p(t);return}d(!0),p(null);try{await n(e)}catch(e){p(e instanceof Error?e.message:String(e))}finally{d(!1)}};return(0,x.jsxs)(`form`,{className:`console-inline-input-form`,onSubmit:e=>{e.preventDefault(),_()},children:[s?(0,x.jsx)(`textarea`,{ref:h,className:`console-inline-input-form-textarea`,placeholder:e,value:c,onChange:e=>l(e.target.value),disabled:u,rows:3}):(0,x.jsx)(`input`,{ref:m,type:`text`,className:`console-inline-input-form-input`,placeholder:e,value:c,onChange:e=>l(e.target.value),disabled:u}),(0,x.jsx)(`button`,{type:`submit`,className:`console-op-button`,disabled:u,children:u?`${a.replace(/e$/,``)}ing…`:a}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:r,disabled:u,children:`Cancel`}),f!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:f})]})},Pe=({storyName:e,onSubmit:t,onCancel:n})=>(0,x.jsx)(Ne,{placeholder:`Issue title`,emptyValueError:`Title is required`,onSubmit:n=>t(e,n),onCancel:n}),Fe=({currentName:e,onSubmit:t,onCancel:n})=>(0,x.jsx)(Ne,{placeholder:`Story name`,emptyValueError:`Story name is required`,initialValue:e,submitLabel:`Rename`,selectAllOnFocus:!0,onSubmit:t,onCancel:n}),Ie=({currentDescription:e,onSubmit:t,onCancel:n})=>(0,x.jsx)(Ne,{placeholder:`Story description`,emptyValueError:``,initialValue:e,submitLabel:`Save`,selectAllOnFocus:!0,multiline:!0,onSubmit:t,onCancel:n}),Le=({onSelectColor:e,disabled:t})=>(0,x.jsx)(`div`,{className:`console-story-color-palette`,children:Me.map(n=>{let r=se[n];return(0,x.jsx)(`button`,{type:`button`,className:`console-story-color-swatch`,"aria-label":n===`GRAY`?`${n} (disable)`:n,style:{backgroundColor:r.dot},onClick:()=>e(n),disabled:t,children:n===`GRAY`&&(0,x.jsx)(`span`,{className:`console-story-color-swatch-label`,children:`disable`})},n)})}),Re=({storyName:e,isDeleting:t,deleteError:n,onConfirm:r,onCancel:i})=>(0,x.jsxs)(`div`,{className:`console-story-delete-confirm`,role:`dialog`,"aria-modal":`true`,"aria-label":`Confirm story deletion`,children:[(0,x.jsxs)(`p`,{className:`console-story-delete-confirm-message`,children:[`Delete story option "`,e,`" from the GitHub custom field? Tasks assigned to this story will not be deleted.`]}),n!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:n}),(0,x.jsxs)(`div`,{className:`console-story-delete-confirm-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:r,disabled:t,children:t?`Deleting…`:`Delete`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:i,disabled:t,children:`Cancel`})]})]}),ze=({items:e})=>(0,x.jsx)(`ul`,{className:`console-story-task-list`,children:e.map(e=>(0,x.jsxs)(`li`,{className:`console-story-task-row`,children:[(0,x.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`console-story-task-title`,children:e.title}),(0,x.jsx)(`span`,{className:`console-story-task-status`,children:e.status??`—`}),(0,x.jsx)(`span`,{className:`console-story-task-agent`,children:e.agent??`—`}),(0,x.jsx)(`span`,{className:`console-story-task-depended-urls`,children:e.dependedIssueUrls.length>0?e.dependedIssueUrls.join(`, `):`—`}),(0,x.jsx)(`span`,{className:`console-story-task-next-action-date`,children:e.nextActionDate===null?`—`:e.nextActionDate.slice(0,10)}),(0,x.jsx)(`span`,{className:`console-story-task-next-action-hour`,children:e.nextActionHour===null?`—`:String(e.nextActionHour)})]},e.url))}),Be=({stories:e,isLoading:t,error:n,showGray:r,onCreateIssue:i,onAddStory:a,onSelectColor:o,onToggleGray:s,onReorderStory:c,onDeleteStory:l,onRenameStory:u,onUpdateDescription:d,optimisticColors:f,colorChangeInFlight:p,colorErrors:m})=>{let[h,g]=(0,y.useState)(null),[_,v]=(0,y.useState)(null),[b,S]=(0,y.useState)(!1),[C,w]=(0,y.useState)(null),[T,ee]=(0,y.useState)({}),[te,E]=(0,y.useState)(null),[ne,re]=(0,y.useState)({}),[ie,D]=(0,y.useState)(null),[O,ae]=(0,y.useState)(null),oe=e=>T[e]??{inProgress:!1,error:null},k=async(e,t)=>{ee(t=>({...t,[e]:{inProgress:!0,error:null}}));try{await c(e,t),ee(t=>({...t,[e]:{inProgress:!1,error:null}}))}catch(t){ee(n=>({...n,[e]:{inProgress:!1,error:t instanceof Error?t.message:String(t)}}))}};if(n!==null)return(0,x.jsxs)(`p`,{role:`alert`,className:`console-list-message console-list-error`,children:[`Failed to load stories: `,n]});if(t)return(0,x.jsx)(`p`,{className:`console-list-message`,children:`Loading stories...`});let A=e=>{g(h===e?null:e)},se=async(e,t)=>{await i(e,t),g(null)},ce=e=>{w(C===e?null:e)},le=(e,t)=>{w(null),o(e,t)},M=e=>{E(e)},N=async e=>{re(t=>({...t,[e]:{isDeleting:!0,error:null}}));try{await l(e),E(null),re(t=>({...t,[e]:{isDeleting:!1,error:null}}))}catch(t){re(n=>({...n,[e]:{isDeleting:!1,error:t instanceof Error?t.message:String(t)}}))}},ue=()=>{E(null),re({})},P=e=>{D(ie===e?null:e)},F=async(e,t)=>{await u(e,t),D(null)},de=e=>{ae(O===e?null:e)},fe=async(e,t)=>{await d(e,t),ae(null)},I=r?e:e.filter(e=>e.color!==`GRAY`),pe=e.some(e=>e.color===`GRAY`);return(0,x.jsxs)(`div`,{className:`console-story-list-container`,children:[I.length===0?(0,x.jsx)(`p`,{className:`console-list-empty`,children:`No active stories`}):(0,x.jsx)(`ul`,{className:`console-story-list`,children:I.map((e,t)=>{let n=j(f[e.storyOptionId]??e.color),r=h===e.storyOptionId,i=C===e.storyOptionId,a=p===e.storyOptionId,o=m[e.storyOptionId]??null,{inProgress:s,error:c}=oe(e.storyOptionId),l=t===0,u=t===I.length-1,d=te===e.storyOptionId,y=ne[e.storyOptionId]??{isDeleting:!1,error:null},b=ie===e.storyOptionId,S=O===e.storyOptionId,w=_===e.storyOptionId,T=e.description??``;return(0,x.jsxs)(`li`,{className:`console-story-list-row`,children:[(0,x.jsxs)(`div`,{className:`console-story-list-row-main`,children:[e.storyViewUrl?(0,x.jsxs)(`a`,{href:e.storyViewUrl,target:`_blank`,rel:`noopener noreferrer`,className:`console-storytag`,style:{color:n.fg,borderColor:n.border},children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:n.dot}}),e.storyName]}):(0,x.jsxs)(`span`,{className:`console-storytag`,style:{color:n.fg,borderColor:n.border},children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:n.dot}}),e.storyName]}),(0,x.jsx)(`span`,{className:`console-story-count`,children:e.openItemCount}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>A(e.storyOptionId),children:`Add task`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>ce(e.storyOptionId),disabled:a,children:`Change color`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,"aria-label":`Move up`,disabled:l||s,onClick:()=>void k(e.storyOptionId,`up`),children:`↑`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,"aria-label":`Move down`,disabled:u||s,onClick:()=>void k(e.storyOptionId,`down`),children:`↓`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,"aria-label":`Delete story`,onClick:()=>M(e.storyOptionId),children:`Delete`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,"aria-label":`Rename story`,onClick:()=>P(e.storyOptionId),children:`Rename`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,"aria-label":`Edit description`,onClick:()=>de(e.storyOptionId),children:`Edit description`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>v(w?null:e.storyOptionId),children:w?`Hide tasks`:`Show tasks`})]}),T!==``&&(0,x.jsx)(`p`,{className:`console-story-description`,children:T}),w&&(0,x.jsx)(ze,{items:e.items}),c!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:c}),i&&(0,x.jsx)(Le,{onSelectColor:t=>le(e.storyOptionId,t),disabled:a}),o!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:o}),r&&(0,x.jsx)(Pe,{storyName:e.storyName,onSubmit:se,onCancel:()=>g(null)}),d&&(0,x.jsx)(Re,{storyName:e.storyName,isDeleting:y.isDeleting,deleteError:y.error,onConfirm:()=>void N(e.storyOptionId),onCancel:ue}),b&&(0,x.jsx)(Fe,{currentName:e.storyName,onSubmit:t=>F(e.storyOptionId,t),onCancel:()=>D(null)}),S&&(0,x.jsx)(Ie,{currentDescription:T,onSubmit:t=>fe(e.storyOptionId,t),onCancel:()=>ae(null)})]},e.storyOptionId)})}),pe&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:s,children:r?`Hide archived`:`Show archived`}),(0,x.jsxs)(`div`,{className:`console-add-story-section`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>S(!b),children:`Add story`}),b&&(0,x.jsx)(Ne,{placeholder:`Story name`,emptyValueError:`Story name is required`,onSubmit:async e=>{await a(e),S(!1)},onCancel:()=>S(!1)})]})]})},Ve=e=>`${e.isPr?`PR`:`Issue`} #${e.itemNumber}`,He=e=>e===null?`loading…`:e,Ue=e=>{let t=[];return t.push(`CI: ${e.isCiStateSuccess?`pass`:`fail`}`),t.push(`Merge: ${e.mergeableStatus.toLowerCase()}`),e.isBranchOutOfDate&&t.push(`branch out of date`),t.join(` · `)},We=e=>e.fetchError?`${Ve(e)} — failed to load current state`:e.currentTitle===null?`${Ve(e)} — loading current state…`:`${Ve(e)} — ${e.currentTitle} (${He(e.currentState)})`,Ge=({actions:e,isOnline:t,isConfirming:n,onConfirm:r,onDiscard:i})=>e.length===0?null:(0,x.jsxs)(`section`,{className:`console-offline-panel`,"aria-label":`Offline actions queue`,children:[(0,x.jsxs)(`div`,{className:`console-offline-panel-header`,children:[e.length,` action`,e.length===1?``:`s`,` held`,t?` — confirm each before sending`:` — awaiting connectivity`]}),e.map(e=>(0,x.jsxs)(`div`,{className:`console-offline-panel-item console-offline-panel-item-${e.color}`,children:[(0,x.jsx)(`div`,{className:`console-offline-panel-item-message`,children:e.message}),(0,x.jsx)(`div`,{className:`console-offline-panel-item-target`,children:We(e)}),e.fetchError&&(0,x.jsx)(`div`,{className:`console-offline-panel-item-fetch-error`,children:`Failed to load current state — sending will act on the last known state`}),t&&e.isPr&&e.currentPrStatus!==null&&!e.fetchError&&(0,x.jsx)(`div`,{className:`console-offline-panel-item-pr-status`,children:Ue(e.currentPrStatus)}),(0,x.jsxs)(`div`,{className:`console-offline-panel-item-controls`,children:[t&&(0,x.jsx)(`button`,{type:`button`,className:`console-offline-panel-confirm`,disabled:n||e.currentTitle===null&&!e.fetchError,onClick:()=>r(e.id),children:`Send`}),(0,x.jsx)(`button`,{type:`button`,className:`console-offline-panel-discard`,onClick:()=>i(e.id),children:`Discard`})]})]},e.id))]}),Ke=({message:e,color:t,remainingSeconds:n,progress:r,onUndo:i})=>(0,x.jsxs)(`div`,{className:`console-undo-toast console-undo-toast-${t}`,role:`status`,"aria-live":`polite`,children:[(0,x.jsx)(`span`,{className:`console-undo-toast-message`,children:e}),(0,x.jsx)(`button`,{type:`button`,className:`console-undo-toast-undo`,onClick:i,children:`Undo`}),(0,x.jsxs)(`span`,{className:`console-undo-toast-countdown`,"aria-hidden":`true`,children:[n,`s`]}),(0,x.jsx)(`span`,{className:`console-undo-toast-bar`,"aria-hidden":`true`,style:{width:`${Math.max(0,Math.min(100,r*100))}%`}})]}),qe=({title:e,message:t,onDismiss:n})=>(0,x.jsxs)(`div`,{className:`console-undo-toast-error console-error-toast`,role:`alert`,"aria-live":`assertive`,children:[e!==void 0&&(0,x.jsx)(`span`,{className:`console-error-toast-title`,children:e}),(0,x.jsx)(`span`,{className:`console-error-toast-message`,children:t}),(0,x.jsx)(`button`,{type:`button`,className:`console-error-toast-dismiss`,onClick:n,children:`Dismiss`})]}),Je=`tdpm-airplane-v1`,Ye=`/airplane-snapshot-data`,Xe=`tdpm_airplane_mode_on`,Ze=()=>typeof localStorage>`u`?!1:localStorage.getItem(Xe)===`1`,Qe=e=>{typeof localStorage>`u`||(e?localStorage.setItem(Xe,`1`):localStorage.removeItem(Xe))},$e=async e=>{if(typeof caches>`u`)throw Error(`Cache API unavailable`);try{await(await caches.open(Je)).put(Ye,new Response(JSON.stringify(e),{headers:{"Content-Type":`application/json`}}))}catch(e){throw e instanceof Error&&e.name===`QuotaExceededError`?Error(`Not enough browser storage to save the offline snapshot. Free up storage and retry.`):e}},et=async()=>{if(typeof caches>`u`)return null;let e=await(await caches.open(Je)).match(Ye);return e===void 0?null:e.json()},tt=async()=>{typeof caches>`u`||await caches.delete(Je)},nt=e=>typeof e==`object`&&!!e&&!Array.isArray(e),rt=e=>typeof e==`string`?e:``,it=e=>typeof e==`number`?e:0,at=e=>e===!0,ot=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],st=e=>e===`MERGEABLE`?`MERGEABLE`:e===`CONFLICTING`?`CONFLICTING`:`UNKNOWN`,ct=e=>nt(e)?{number:it(e.number),title:rt(e.title),url:rt(e.url),repo:rt(e.repo),nameWithOwner:rt(e.nameWithOwner),projectItemId:rt(e.projectItemId),itemId:rt(e.itemId),isPr:at(e.isPr),story:rt(e.story),status:typeof e.status==`string`?e.status:null,nextActionDate:typeof e.nextActionDate==`string`?e.nextActionDate:null,nextActionHour:typeof e.nextActionHour==`number`?e.nextActionHour:null,dependedIssueUrls:ot(e.dependedIssueUrls),labels:ot(e.labels),createdAt:rt(e.createdAt),relatedOpenPullRequestUrls:ot(e.relatedOpenPullRequestUrls),agent:typeof e.agent==`string`?e.agent:null}:null,L=e=>{if(!nt(e))return{items:[],generatedAt:``,statusOptions:[],agentOptions:[],storyOptions:[],storyColors:{},stories:[],defaultNameWithOwner:null,fromCache:!1,storyOrder:[],timerEndsAt:null,timerTotalSeconds:null};let t=Array.isArray(e.items)?e.items.map(ct).filter(e=>e!==null):[],n=Array.isArray(e.statusOptions)?e.statusOptions.filter(nt):[],r=Array.isArray(e.agentOptions)?e.agentOptions.filter(nt):[],i=Array.isArray(e.storyOptions)?e.storyOptions.filter(nt):[],a=Array.isArray(e.stories)?e.stories.filter(nt):[],o=Array.isArray(e.storyOrder)?e.storyOrder.filter(e=>typeof e==`string`):[];return{items:t,generatedAt:typeof e.generatedAt==`string`?e.generatedAt:``,statusOptions:n,agentOptions:r,storyOptions:i,storyColors:nt(e.storyColors)?e.storyColors:{},stories:a,defaultNameWithOwner:typeof e.defaultNameWithOwner==`string`?e.defaultNameWithOwner:null,fromCache:!1,storyOrder:o,timerEndsAt:null,timerTotalSeconds:null}},lt=e=>nt(e)?{author:rt(e.author),body:rt(e.body),createdAt:rt(e.createdAt),url:typeof e.url==`string`?e.url:null}:null,ut=e=>nt(e)?{path:rt(e.path),additions:it(e.additions),deletions:it(e.deletions),status:rt(e.status),patch:typeof e.patch==`string`?e.patch:null,rawUrl:typeof e.rawUrl==`string`?e.rawUrl:null}:null,dt=e=>nt(e)?{sha:rt(e.sha),message:rt(e.message),author:rt(e.author),authoredAt:rt(e.authoredAt)}:null,ft=e=>nt(e)?{found:at(e.found),isConflicted:at(e.isConflicted),mergeableStatus:st(e.mergeableStatus),isPassedAllCiJob:at(e.isPassedAllCiJob),isCiStateSuccess:at(e.isCiStateSuccess),isBranchOutOfDate:at(e.isBranchOutOfDate),missingRequiredCheckNames:ot(e.missingRequiredCheckNames)}:{found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]},pt=e=>{if(!nt(e))return null;let t=nt(e.summary)?{title:rt(e.summary.title),body:rt(e.summary.body),additions:it(e.summary.additions),deletions:it(e.summary.deletions),changedFiles:it(e.summary.changedFiles)}:null;return{url:rt(e.url),branchName:typeof e.branchName==`string`?e.branchName:null,createdAt:rt(e.createdAt),isDraft:at(e.isDraft),isConflicted:at(e.isConflicted),mergeableStatus:st(e.mergeableStatus),isPassedAllCiJob:at(e.isPassedAllCiJob),isCiStateSuccess:at(e.isCiStateSuccess),isResolvedAllReviewComments:at(e.isResolvedAllReviewComments),isBranchOutOfDate:at(e.isBranchOutOfDate),missingRequiredCheckNames:ot(e.missingRequiredCheckNames),summary:t}},mt=e=>{if(!nt(e))return{body:``,comments:[],state:{state:`open`,merged:!1,isPullRequest:!1,title:``},files:null,commits:null,prStatus:null,relatedPrs:null};let t=nt(e.state)?e.state:{},n={state:rt(t.state)||`open`,merged:at(t.merged),isPullRequest:at(t.isPullRequest),title:rt(t.title)},r=e.files===null?null:Array.isArray(e.files)?e.files.map(ut).filter(e=>e!==null):null,i=e.commits===null?null:Array.isArray(e.commits)?e.commits.map(dt).filter(e=>e!==null):null,a=e.prStatus===null?null:ft(e.prStatus),o=e.relatedPrs===null?null:Array.isArray(e.relatedPrs)?e.relatedPrs.map(pt).filter(e=>e!==null):null;return{body:rt(e.body),comments:Array.isArray(e.comments)?e.comments.map(lt).filter(e=>e!==null):[],state:n,files:r,commits:i,prStatus:a,relatedPrs:o}},ht=e=>{if(!nt(e))return null;let t=typeof e.capturedAt==`string`?e.capturedAt:``,n=ot(e.failures),r={};if(nt(e.tabs))for(let[t,n]of Object.entries(e.tabs)){if(!nt(n))continue;let e={};for(let[t,r]of Object.entries(n))e[t]=L(r);r[t]=e}let i={};if(nt(e.items))for(let[t,n]of Object.entries(e.items))i[t]=mt(n);return{capturedAt:t,tabs:r,items:i,failures:n}},gt=`/api/airplanesync`,_t=e=>{try{let t=JSON.parse(e);return typeof t==`object`&&t&&!Array.isArray(t)&&`type`in t&&typeof t.type==`string`?t:null}catch{return null}},vt=()=>{let[e,t]=(0,y.useState)(`off`),[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)([]),c=(0,y.useRef)(null);return(0,y.useEffect)(()=>{if(!Ze())return;let e=!1;return et().then(n=>{e||n===null||(a(n),t(`on`))}).catch(()=>{Qe(!1)}),()=>{e=!0}},[]),{status:e,progress:n,snapshot:i,failures:o,startSync:(0,y.useCallback)(()=>{c.current!==null&&c.current.abort();let e=new AbortController;c.current=e,t(`syncing`),r({fetched:0,total:0}),s([]),fetch(gt,{signal:e.signal}).then(async e=>{if(!e.ok||e.body===null){t(`error`),s([`HTTP ${e.status}`]);return}let n=e.body.pipeThrough(new TextDecoderStream).getReader(),i=``;for(;;){let{done:e,value:o}=await n.read();if(e)break;i+=o;let c=i.split(`
|
|
12
12
|
|
|
13
|
-
`);i=c.pop()??``;for(let e of c){if(!e.startsWith(`data: `))continue;let n=_t(e.slice(6));if(n!==null){if(n.type===`progress`)r({fetched:typeof n.fetched==`number`?n.fetched:0,total:typeof n.total==`number`?n.total:0});else if(n.type===`done`){let e=ht(n.snapshot);if(e===null){t(`error`),s([`Failed to parse snapshot`]);return}if(e.failures.length>0){s(e.failures),t(`error`);return}await $e(e),Qe(!0),a(e),t(`on`),s([])}}}}}).catch(e=>{e instanceof Error&&e.name===`AbortError`||(t(`error`),s([e instanceof Error?e.message:String(e)]))})},[]),turnOff:(0,y.useCallback)(()=>{c.current!==null&&(c.current.abort(),c.current=null),t(`off`),a(null),r(null),s([]),Qe(!1),tt().catch(()=>{})},[])}},R=e=>typeof e==`object`&&!!e&&!Array.isArray(e),z=e=>typeof e==`string`?e:``,yt=e=>typeof e==`number`?e:0,bt=e=>e===!0,xt=`console-api-v1`,St=async(e,t)=>{let n=`${e}?url=${encodeURIComponent(t)}`;try{let e=await fetch(n);if(!e.ok){let t=`HTTP ${e.status}`;try{let n=await e.json();R(n)&&typeof n.error==`string`&&n.error.length>0&&(t=n.error)}catch(e){console.warn(`Failed to parse error body from non-ok response:`,e)}throw Error(t)}let t=await e.json();try{`caches`in globalThis&&globalThis.caches.open(xt).then(e=>e.put(n,new Response(JSON.stringify(t),{headers:{"Content-Type":`application/json`}}))).catch(e=>{console.warn(`Failed to persist API response to cache:`,e)})}catch(e){console.warn(`Failed to access cache storage:`,e)}return t}catch(e){try{if(`caches`in globalThis){let e=await(await globalThis.caches.open(xt)).match(n);if(e!==void 0)return e.json()}}catch{}throw e}},Ct=e=>!R(e)||!Array.isArray(e.comments)?[]:e.comments.filter(R).map(e=>({author:z(e.author),body:z(e.body),createdAt:z(e.createdAt),url:typeof e.url==`string`?e.url:null})),wt=e=>!R(e)||!Array.isArray(e.files)?[]:e.files.filter(R).map(e=>({path:z(e.path)||z(e.filename),additions:yt(e.additions),deletions:yt(e.deletions),status:z(e.status),patch:typeof e.patch==`string`?e.patch:null,rawUrl:typeof e.rawUrl==`string`?e.rawUrl:null})),Tt=e=>!R(e)||!Array.isArray(e.commits)?[]:e.commits.filter(R).map(e=>({sha:z(e.sha),message:z(e.message),author:z(e.author),authoredAt:z(e.authoredAt)})),Et=e=>R(e)?{title:z(e.title),body:z(e.body),additions:yt(e.additions),deletions:yt(e.deletions),changedFiles:yt(e.changedFiles)}:null,Dt=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],Ot=e=>e===`MERGEABLE`?`MERGEABLE`:e===`CONFLICTING`?`CONFLICTING`:`UNKNOWN`,kt=e=>!R(e)||!Array.isArray(e.relatedPullRequests)?[]:e.relatedPullRequests.filter(R).map(e=>({url:z(e.url),branchName:typeof e.branchName==`string`?e.branchName:null,createdAt:z(e.createdAt),isDraft:bt(e.isDraft),isConflicted:bt(e.isConflicted),mergeableStatus:Ot(e.mergeableStatus),isPassedAllCiJob:bt(e.isPassedAllCiJob),isCiStateSuccess:bt(e.isCiStateSuccess),isResolvedAllReviewComments:bt(e.isResolvedAllReviewComments),isBranchOutOfDate:bt(e.isBranchOutOfDate),missingRequiredCheckNames:Dt(e.missingRequiredCheckNames),summary:Et(e.summary)})),At=e=>{if(!R(e)||!R(e.status))return{found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]};let t=e.status;return{found:!0,isConflicted:bt(t.isConflicted),mergeableStatus:Ot(t.mergeableStatus),isPassedAllCiJob:bt(t.isPassedAllCiJob),isCiStateSuccess:bt(t.isCiStateSuccess),isBranchOutOfDate:bt(t.isBranchOutOfDate),missingRequiredCheckNames:Dt(t.missingRequiredCheckNames)}},jt=e=>R(e)?{state:z(e.state)||`open`,merged:bt(e.merged),isPullRequest:bt(e.isPullRequest),title:z(e.title)}:{state:`open`,merged:!1,isPullRequest:!1,title:``},Mt=()=>({fetchItemBody:async e=>{let t=await St(`/api/itembody`,e);return R(t)?z(t.body):``},fetchComments:async e=>Ct(await St(`/api/comments`,e)),fetchPrFiles:async e=>wt(await St(`/api/prfiles`,e)),fetchPrCommits:async e=>Tt(await St(`/api/prcommits`,e)),fetchRelatedPrs:async e=>kt(await St(`/api/relatedprs`,e)),fetchIssueState:async e=>jt(await St(`/api/issuetitle`,e)),fetchPullRequestStatus:async e=>At(await St(`/api/pullrequeststatus`,e))}),Nt=async e=>{let t=await e.text().catch(()=>``);if(t.length===0)return`HTTP ${e.status}`;try{let e=JSON.parse(t);if(R(e)&&typeof e.error==`string`)return e.error}catch{return t}return t},Pt=async(e,t)=>{let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(await Nt(n))},Ft=`/api/comment`,It=e=>({author:z(e.author),body:z(e.body),createdAt:z(e.createdAt),url:typeof e.url==`string`?e.url:null}),Lt=async e=>{let t=await fetch(Ft,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{posted:!1,error:await Nt(t),rateLimitResetAt:null};let n=await t.json();return R(n)?n.ok===!1?{posted:!1,error:typeof n.error==`string`?n.error:`upstream error`,rateLimitResetAt:typeof n.rateLimitResetAt==`string`?n.rateLimitResetAt:null}:R(n.comment)?{posted:!0,comment:It(n.comment)}:{posted:!1,error:`comment was not returned`,rateLimitResetAt:null}:{posted:!1,error:`unexpected response shape`,rateLimitResetAt:null}},Rt=`/api/upload`,zt=e=>{let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t)},Bt=async e=>{let t=await fetch(Rt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t));let n=await t.json();if(!R(n)||typeof n.markdown!=`string`)throw Error(`markdown was not returned`);return n.markdown},Vt=`/api/addstory`,Ht=async e=>{let t=await fetch(Vt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},Ut=`/api/reviewcomment`,Wt=async e=>{let t=await fetch(Ut,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},Gt=`/api/createissue`,Kt=`/api/storycolor`,qt=async e=>{let t=await fetch(Kt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},Jt=async e=>{let t=await fetch(Gt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t));let n=await t.json();if(!(e=>typeof e==`object`&&!!e&&!Array.isArray(e))(n)||typeof n.issueUrl!=`string`)throw Error(`issueUrl was not returned`);return n.issueUrl},Yt=`/api/reorderstory`,Xt=async e=>{let t=await fetch(Yt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},Zt=`/api/deleteallcomments`,Qt=async e=>{let t=await fetch(Zt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},$t=`/api/deletestory`,en=async e=>{let t=await fetch($t,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},tn=`/api/renamestory`,nn=async e=>{let t=await fetch(tn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},rn=`/api/storydescription`,an=async e=>{let t=await fetch(rn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},on=async()=>{let e=await fetch(`/api/projects`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();if(typeof t!=`object`||!t||Array.isArray(t))return{pjcodes:[],projectUrls:null,workflowImprovementIssueUrl:null,fleetTaskCreateUrl:null};let n=t;return{pjcodes:Array.isArray(n.pjcodes)?n.pjcodes.filter(e=>typeof e==`string`):[],projectUrls:n.projectUrls!==null&&typeof n.projectUrls==`object`&&!Array.isArray(n.projectUrls)?Object.fromEntries(Object.entries(n.projectUrls).filter(e=>typeof e[1]==`string`)):null,workflowImprovementIssueUrl:typeof n.workflowImprovementIssueUrl==`string`?n.workflowImprovementIssueUrl:null,fleetTaskCreateUrl:typeof n.fleetTaskCreateUrl==`string`?n.fleetTaskCreateUrl:null}},sn=`/api/projectreadmeconfig`,cn=async e=>{let t=`${sn}?pjcode=${encodeURIComponent(e)}`,n=await fetch(t);if(!n.ok)throw Error(await Nt(n));let r=await n.json();return{maximumPreparingIssuesCount:R(r)&&typeof r.maximumPreparingIssuesCount==`number`?r.maximumPreparingIssuesCount:null}},ln=`/api/setdependedissueurl`,un=async e=>{let t=await fetch(ln,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},dn=`/api/projectsettings`,fn=async e=>{let t=await fetch(dn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},pn=5e3,mn=e=>`${e.isPr?`PR #`:`#`}${e.number}`,hn=(e,t)=>{switch(e.type){case`review`:return e.action===`approve_and_merge`?`Approved & Merged`:e.action===`request_changes`?`Rejected`:e.action===`totally_wrong`?`Marked totally wrong`:`Marked unnecessary`;case`next_action_date`:return e.action===`snooze_1hour`?`Next Action Hour +1 hour`:e.action===`snooze_3hours`?`Next Action Hour +3 hours`:e.action===`snooze_6hours`?`Next Action Hour +6 hours`:e.action===`snooze_1day`?`Next Action Date +1 day`:e.action===`snooze_2days`?`Next Action Date +2 days`:e.action===`snooze_3days`?`Next Action Date +3 days`:e.action===`snooze_5days`?`Next Action Date +5 days`:e.action===`snooze_1month`?`Next Action Date +1 month`:be(t)?`Next Action Date +1 week and skip`:`Next Action Date +1 week`;case`set_story`:return`Story → ${e.optionName}`;case`set_agent`:return`Agent → ${e.optionName}`;case`set_status`:return`Status → ${e.optionName}`;case`set_in_tmux_by_human`:return`Added to In Tmux by human`;case`ok_and_awaiting_workspace`:return`ok → Awaiting Workspace`;case`close`:return e.action===`close`?`Closed`:`Closed as not planned`;case`delete_all_comments`:return`Deleted all comments`}},gn=e=>{switch(e.type){case`review`:return e.action===`approve_and_merge`?`green`:e.action===`request_changes`?`amber`:e.action===`totally_wrong`?`red`:`gray`;case`next_action_date`:return`amber`;case`set_story`:case`set_agent`:case`set_status`:case`set_in_tmux_by_human`:case`ok_and_awaiting_workspace`:return`blue`;case`close`:return`red`;case`delete_all_comments`:return`red`}},_n=(e,t)=>e.type===`next_action_date`?be(t):e.type!==`delete_all_comments`,vn=(e,t,n)=>`${hn(e,n)} — ${mn(t)}`,yn=`console-offline-action-queue`,bn=e=>{if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&typeof t.message==`string`&&typeof t.color==`string`&&typeof t.enqueuedAt==`number`&&typeof t.itemUrl==`string`&&typeof t.projectItemId==`string`&&typeof t.itemNumber==`number`&&typeof t.repo==`string`&&typeof t.isPr==`boolean`&&typeof t.apiPath==`string`&&typeof t.requestBody==`object`&&t.requestBody!==null},xn=()=>{try{let e=localStorage.getItem(yn);if(e===null)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(bn):[]}catch{return[]}},Sn=e=>{localStorage.setItem(yn,JSON.stringify(e))},Cn=()=>typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`,wn=e=>e instanceof TypeError,Tn=e=>e instanceof Error&&e.message.length>0?e.message:String(e),En=100,Dn=e=>Math.max(0,Math.ceil((pn-e)/1e3)),On=e=>Math.max(0,1-e/pn),kn=()=>{let[e,t]=(0,y.useState)(null),[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(xn),o=(0,y.useRef)(i);o.current=i;let s=(0,y.useRef)(null),c=(0,y.useRef)(0),l=(0,y.useRef)(null),u=(0,y.useRef)(!1),d=(0,y.useCallback)(()=>{l.current!==null&&(clearInterval(l.current),l.current=null)},[]),f=(0,y.useCallback)(e=>{if(e.offline===void 0)return;let t={id:Cn(),message:e.message,color:e.color,enqueuedAt:Date.now(),...e.offline};a(e=>{let n=[...e,t];return Sn(n),n})},[]),p=(0,y.useCallback)(e=>{e.commit().catch(t=>{wn(t)&&e.offline!==void 0?f(e):r({message:e.message,reason:Tn(t)})})},[f]),m=(0,y.useCallback)(()=>{let e=s.current;d(),s.current=null,t(null),e!==null&&!u.current&&(u.current=!0,p(e))},[d,p]),h=(0,y.useCallback)(()=>{let e=s.current;d(),s.current=null,u.current=!0,t(null),e?.revertAdvance?.()},[d]),g=(0,y.useCallback)(()=>{r(null)},[]),_=(0,y.useCallback)((e,t)=>{r({message:e,reason:t})},[]),v=(0,y.useCallback)(e=>{a(t=>{let n=t.filter(t=>t.id!==e);return Sn(n),n})},[]),b=(0,y.useCallback)(async e=>{let t=o.current.find(t=>t.id===e);if(t!==void 0)try{await Pt(t.apiPath,t.requestBody),v(e)}catch(n){wn(n)?r({message:t.message,reason:`Still offline — action is still held in the queue`}):(r({message:t.message,reason:Tn(n)}),v(e))}},[v]),x=(0,y.useCallback)(e=>{if(s.current!==null&&!u.current){let e=s.current;d(),u.current=!0,p(e)}u.current=!1,s.current=e,c.current=Date.now(),t({message:e.message,color:e.color,remainingSeconds:Dn(0),progress:On(0)}),e.advance(),l.current=setInterval(()=>{let n=Date.now()-c.current;if(n>=5e3){m();return}t({message:e.message,color:e.color,remainingSeconds:Dn(n),progress:On(n)})},En)},[d,m,p]);return(0,y.useEffect)(()=>d,[d]),{pending:e,error:n,offlineActions:i,enqueue:x,showError:_,undo:h,dismissError:g,confirmOfflineAction:b,discardOfflineAction:v}},An=e=>{window.history.pushState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`))},jn=e=>{window.history.replaceState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`))},Mn=`tdpm-timer-settings`,Nn=()=>({timerMode:!1,projectMinutes:{}}),Pn=()=>{if(typeof localStorage>`u`)return Nn();let e=localStorage.getItem(Mn);if(e===null)return Nn();try{let t=JSON.parse(e);if(typeof t!=`object`||!t||Array.isArray(t))return Nn();let n=t,r=typeof n.timerMode==`boolean`&&n.timerMode,i=n.projectMinutes;return{timerMode:r,projectMinutes:typeof i==`object`&&i&&!Array.isArray(i)?Object.fromEntries(Object.entries(i).filter(([,e])=>typeof e==`number`).map(([e,t])=>[e,t])):{}}}catch{return Nn()}},Fn=e=>{typeof localStorage<`u`&&localStorage.setItem(Mn,JSON.stringify(e))},In=(e,t,n)=>{if(e.length===0)return null;let r=t===null?-1:e.indexOf(t),i=r===-1?0:(r+1)%e.length,a=r===-1?e.length:e.length-1;for(let t=0;t<a;t++){let r=e[(i+t)%e.length];if((n[r]??0)>0)return r}return null},Ln=(e,t,n,r,i)=>{let a=(0,y.useRef)(t),o=(0,y.useRef)(n);(0,y.useEffect)(()=>{let s=a.current,c=o.current;if(a.current=t,o.current=n,e){if(c!==n){a.current=0;return}if(s>0&&t===0){let e=In(r,n,i);e!==null&&An(`/projects/${e}`)}}},[e,t,n,r,i])},Rn=class{fetcher;cache=new Map;inFlight=new Map;prefetchInFlight=new Set;constructor(e){this.fetcher=e}peek=e=>this.cache.get(e);has=e=>this.cache.has(e);load=(e,t)=>{let n=this.cache.get(e);if(n!==void 0)return Promise.resolve(n);let r=this.inFlight.get(e);if(r!==void 0)return r;let i=this.fetcher(t).then(t=>(this.cache.set(e,t),t)).finally(()=>{this.inFlight.delete(e)});return this.inFlight.set(e,i),i};prefetch=(e,t)=>{this.cache.has(e)||this.inFlight.has(e)||this.prefetchInFlight.has(e)||(this.prefetchInFlight.add(e),this.fetcher(t).then(t=>{this.cache.set(e,t)}).catch(()=>{}).finally(()=>{this.prefetchInFlight.delete(e)}))};seed(e,t){this.cache.set(e,t)}invalidate=e=>{this.cache.delete(e)}},zn=e=>{try{let t=new URL(e).pathname.split(`/`).filter(Boolean);if(t.length>=4)return`${t[0]}/${t[1]}#${t[3]}`}catch{}return e},Bn=(e,t)=>{for(let[n,r]of Object.entries(t.items)){let t=zn(n);e.body.seed(t,r.body),e.comments.seed(t,r.comments),e.state.seed(t,r.state),r.files!==null&&e.files.seed(t,r.files),r.commits!==null&&e.commits.seed(t,r.commits),r.prStatus!==null&&e.prStatus.seed(t,r.prStatus),r.relatedPrs!==null&&e.relatedPrs.seed(t,r.relatedPrs)}},Vn=(e=null)=>(0,y.useMemo)(()=>{let t=Mt(),n={client:t,body:new Rn(t.fetchItemBody),comments:new Rn(t.fetchComments),files:new Rn(t.fetchPrFiles),commits:new Rn(t.fetchPrCommits),relatedPrs:new Rn(t.fetchRelatedPrs),state:new Rn(t.fetchIssueState),prStatus:new Rn(t.fetchPullRequestStatus)};return e!==null&&Bn(n,e),n},[e]),Hn=0,Un=500,Wn=2e3,Gn=e=>{let t=window;if(typeof t.requestIdleCallback==`function`&&typeof t.cancelIdleCallback==`function`){let n=t.requestIdleCallback(e,{timeout:Wn});return{cancel:()=>t.cancelIdleCallback?.(n)}}let n=window.setTimeout(e,0);return{cancel:()=>window.clearTimeout(n)}},Kn=(e,t)=>{let n=`${t.repo}#${t.number}`;e.body.prefetch(n,t.url),e.state.prefetch(n,t.url),e.comments.prefetch(n,t.url),t.isPr?(e.files.prefetch(n,t.url),e.commits.prefetch(n,t.url),e.prStatus.prefetch(n,t.url)):e.relatedPrs.prefetch(n,t.url)},qn=(e,t,n)=>{(0,y.useEffect)(()=>{if(t===null)return;let r=n.findIndex(e=>e.projectItemId===t.projectItemId);if(r===-1)return;let i=n.slice(r+1,r+1+Hn);if(i.length===0)return;let a=null,o=window.setTimeout(()=>{a=Gn(()=>{for(let t of i)Kn(e,t)})},Un);return()=>{window.clearTimeout(o),a?.cancel()}},[e,t,n])},Jn=`/api/features`,Yn=()=>{let[e,t]=(0,y.useState)({airplaneMode:!1});return(0,y.useEffect)(()=>{fetch(Jn).then(async e=>{if(!e.ok)return;let n=await e.json();typeof n==`object`&&n&&!Array.isArray(n)&&`airplaneMode`in n&&typeof n.airplaneMode==`boolean`&&t({airplaneMode:n.airplaneMode})}).catch(e=>{console.warn(`Failed to fetch /api/features`,e)})},[]),e},Xn=(e,t)=>{let n=ae.findIndex(t=>t.name===e);if(n===-1)return null;for(let e=n+1;e<ae.length;e+=1){let n=ae[e];if(n.isNavigable!==!1&&(t[n.name]??0)>0)return n.name}return null},Zn=e=>{let t=ae.filter(e=>e.isNavigable!==!1);for(let n of t)if((e[n.name]??0)>0)return n.name;return t[0].name},Qn=new Set(ae.map(e=>e.name)),$n=e=>{let t=e.split(`/`).filter(e=>e.length>0);if(t.length<3||t[0]!==`projects`)return null;let n=t[2];return Qn.has(n)?n:null},er=e=>{if(!e.startsWith(`#item/`))return null;let t=e.slice(6);return t.length===0?null:decodeURIComponent(t)},tr=`#settings`,nr=(e,t)=>{let n=(0,y.useCallback)(()=>{let e=Zn(t);return typeof window>`u`?{activeTab:e,selectedItemKey:null}:{activeTab:$n(window.location.pathname)??e,selectedItemKey:er(window.location.hash)}},[t]),[r,i]=(0,y.useState)(n),a=(0,y.useRef)(null);a.current=e,(0,y.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>{i(n())};return window.addEventListener(`popstate`,e),window.addEventListener(`hashchange`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`hashchange`,e)}},[n]),(0,y.useEffect)(()=>{if(typeof window>`u`||$n(window.location.pathname)!==null)return;let e=Zn(t);Object.values(t).some(e=>e>0)&&a.current!==null&&window.history.replaceState({},``,`/projects/${a.current}/${e}${window.location.search}`),i(t=>t.activeTab===e?t:{...t,activeTab:e})},[t]);let o=(0,y.useCallback)(t=>e===null?`#${t}`:`/projects/${e}/${t}`,[e]),s=(0,y.useCallback)(e=>{if(typeof window>`u`){i({activeTab:e,selectedItemKey:null});return}window.history.pushState({},``,o(e)),i({activeTab:e,selectedItemKey:null})},[o]),c=(0,y.useCallback)(e=>{typeof window<`u`&&(window.location.hash=`#item/${encodeURIComponent(e)}`),i(t=>({...t,selectedItemKey:e}))},[]),l=(0,y.useCallback)(()=>{if(typeof window<`u`&&window.location.hash!==``){let e=`${window.location.pathname}${window.location.search}`;window.history.pushState({},``,e)}i(e=>({...e,selectedItemKey:null}))},[]);return{activeTab:r.activeTab,selectedItemKey:r.selectedItemKey,tabHref:o,selectTab:s,openItem:c,closeItem:l}},rr=e=>`pv_overlay_${e}`,ir=e=>e.projectItemId===``?e.itemId:e.projectItemId,ar=(e,t)=>e!==void 0&&e.done===!0&&e.mode===t,or=(e,t,n)=>e.filter(e=>!ar(t[ir(e)],n)).length,sr=(e,t,n)=>e.filter(e=>!ar(t[ir(e)],n)),cr=(e,t)=>{let n=Date.parse(t);if(Number.isNaN(n))return{};let r={};for(let[t,i]of Object.entries(e))i.ts>=n&&(r[t]=i);return r},lr=(e,t,n)=>{if(n===null)return null;let r=Date.parse(n);if(Number.isNaN(r))return null;let i=e[ir(t)];return i===void 0||i.ts<r?null:i.status??null},ur=(e,t,n,r,i)=>{let a={...e[t]??{},...n,ts:i,mode:r};return{...e,[t]:a}},dr=`/api/review`,fr=`/api/triage`,pr=`/api/intmux`,mr=(e,t,n,r,i)=>{if(r===`approve_and_merge`)return{pjcode:e,action:`approve_and_merge`,prUrl:n,projectItemId:t.projectItemId};if(r===`request_changes`){let r=i[0];return{pjcode:e,action:`request_changes`,prUrl:n,projectItemId:t.projectItemId,commentBody:ge(i),...r===void 0?{}:{changedFilePath:r.path,line:r.line,side:r.side}}}return r===`totally_wrong`?{pjcode:e,action:`close`,prUrl:n,issueUrl:t.url,projectItemId:t.projectItemId,commentBody:pe}:{pjcode:e,action:`unnecessary`,prUrl:n,projectItemId:t.projectItemId,issueUrl:t.url,commentBody:me,issueCommentBody:he(n)}},hr=(e,t,n,r)=>({pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId,...r??{}}),gr=(e,t)=>({pjcode:e,action:`set_intmux`,issueUrl:t.url,projectItemId:t.projectItemId}),_r=()=>Error(`No project specified in the URL path.`),vr=`ok`,yr=(e,t,n,r,i)=>{let{patchOverlay:a}=n,o=(0,y.useCallback)(e=>{if(r===void 0)return;let t=`${e.repo}#${e.number}`;r.body.invalidate(t),r.comments.invalidate(t)},[r]),s=(0,y.useCallback)(e=>{a(ir(e),{done:!0},t)},[a,t]),c=(0,y.useCallback)(async(t,n,r,i=[])=>{if(e===null)throw _r();await Pt(dr,mr(e,t,n,r,i)),s(t),o(t)},[e,s,o]),l=(0,y.useCallback)(async(t,n)=>{if(e===null)throw _r();let r={pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId};s(t),await Pt(fr,r),o(t)},[e,s,o]),u=(0,y.useCallback)(async(n,r)=>{if(e===null)throw _r();let i={pjcode:e,action:`set_agent`,issueUrl:n.url,projectItemId:n.projectItemId,agentOptionId:r.id};a(ir(n),{done:!0},t),await Pt(fr,i),o(n)},[e,o,a,t]);return{reviewPullRequest:c,setNextActionDate:l,setStory:(0,y.useCallback)(async(n,r)=>{if(e===null)throw _r();let i={pjcode:e,action:`set_story`,issueUrl:n.url,projectItemId:n.projectItemId,storyOptionId:r.id};a(ir(n),{done:!0,story:{name:r.name,color:r.color}},t),await Pt(fr,i),o(n)},[e,o,a,t]),setAgent:u,setStatus:(0,y.useCallback)(async(n,r)=>{if(e===null)throw _r();let i={pjcode:e,action:`set_status`,issueUrl:n.url,projectItemId:n.projectItemId,statusName:r.name};a(ir(n),{done:!0,status:{name:r.name,color:r.color}},t),await Pt(fr,i),o(n)},[e,o,a,t]),setInTmuxByHuman:(0,y.useCallback)(async(n,r)=>{if(e===null)throw _r();let i={pjcode:e,action:`set_intmux`,issueUrl:n.url,projectItemId:n.projectItemId};a(ir(n),{done:!0,status:{name:r.name,color:r.color}},t),await Pt(pr,i),o(n)},[e,o,a,t]),closeIssue:(0,y.useCallback)(async(t,n)=>{if(e===null)throw _r();let r={pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId};s(t),await Pt(fr,r),o(t)},[e,s,o]),okAndMoveToAwaitingWorkspace:(0,y.useCallback)(async(n,r)=>{if(e===null)throw _r();a(ir(n),{done:!0,status:{name:r.name,color:r.color}},t);let s=await Lt({pjcode:e,url:n.url,body:vr});if(await Pt(fr,{pjcode:e,action:`set_status`,issueUrl:n.url,projectItemId:n.projectItemId,statusName:r.name}),o(n),await i?.(),!s.posted){let e=s.rateLimitResetAt===null?``:` Rate limit resets at ${s.rateLimitResetAt}.`;throw Error(`Comment not posted — ${s.error}.${e} Status was changed. Re-post: ${vr}`)}},[e,o,a,t,i]),addComment:(0,y.useCallback)(async(t,n)=>{if(e===null)throw _r();let r=await Lt({pjcode:e,url:t.url,body:n});if(!r.posted){let e=r.rateLimitResetAt===null?``:` Rate limit resets at ${r.rateLimitResetAt}.`;throw Error(`${r.error}.${e}`)}return o(t),r.comment},[e,o]),uploadAttachment:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`no project in the URL path`);let r=zt(new Uint8Array(await n.arrayBuffer()));return Bt({pjcode:e,url:t.url,fileName:n.name,contentBase64:r})},[e]),addInlineReviewComment:(0,y.useCallback)(async(t,n,r,i,a)=>{if(e===null)throw _r();await Wt({pjcode:e,url:t,path:n,line:r,side:i,body:a})},[e]),deleteAllComments:(0,y.useCallback)(async e=>{await Qt({issueUrl:e.url}),o(e)},[o]),setDependedIssueUrl:(0,y.useCallback)(async(t,n)=>{if(e===null)throw _r();await un({pjcode:e,issueUrl:t.url,dependedIssueUrl:n})},[e])}},br=e=>typeof e==`object`&&!!e&&typeof e.ts==`number`,xr=e=>{if(typeof localStorage>`u`)return{};let t=localStorage.getItem(rr(e));if(t===null)return{};let n=JSON.parse(t);if(typeof n!=`object`||!n)return{};let r={};for(let[e,t]of Object.entries(n))br(t)&&(r[e]=t);return r},Sr=(e,t)=>{typeof localStorage<`u`&&localStorage.setItem(rr(e),JSON.stringify(t))},Cr=e=>{let[t,n]=(0,y.useState)(()=>xr(e));return{overlay:t,patchOverlay:(0,y.useCallback)((t,r,i)=>{n(n=>{let a=ur(n,t,r,i,Date.now());return Sr(e,a),a})},[e])}},wr=e=>{let t=e.split(`/`).filter(e=>e.length>0);if(t.length<2||t[0]!==`projects`)return null;let n=t[1];return n.length===0?null:n},Tr=()=>{let[e,t]=(0,y.useState)(()=>wr(typeof window>`u`?``:window.location.pathname));return(0,y.useEffect)(()=>{let e=()=>{t(wr(window.location.pathname))};return window.addEventListener(`popstate`,e),()=>{window.removeEventListener(`popstate`,e)}},[]),e},Er=()=>{let[e,t]=(0,y.useState)([]),[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(!0),[u,d]=(0,y.useState)(null);return(0,y.useEffect)(()=>{let e=!1;return l(!0),d(null),on().then(n=>{e||(t(n.pjcodes),r(n.projectUrls),a(n.workflowImprovementIssueUrl),s(n.fleetTaskCreateUrl),l(!1))}).catch(t=>{e||(d(t instanceof Error?t:Error(String(t))),l(!1))}),()=>{e=!0}},[]),{pjcodes:e,projectUrls:n,workflowImprovementIssueUrl:i,fleetTaskCreateUrl:o,isLoading:c,error:u}},Dr=`console-comment-expanded:`,Or=e=>{try{let t=localStorage.getItem(Dr+e);if(t===null)return new Set;let n=JSON.parse(t);return Array.isArray(n)?new Set(n.filter(e=>typeof e==`string`)):new Set}catch(e){return console.error(`Failed to load comment expanded state from storage:`,e),new Set}},kr=(e,t)=>{try{localStorage.setItem(Dr+e,JSON.stringify([...t]))}catch(e){console.error(`Failed to save comment expanded state to storage:`,e)}},Ar=()=>{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(Dr)&&e.push(n)}for(let t of e)localStorage.removeItem(t)},jr=e=>(0,y.useCallback)(t=>{Ar(),e(t)},[e]),Mr=()=>typeof window<`u`&&window.location.hash===`#settings`,Nr=e=>{let[t,n]=(0,y.useState)(Mr),[r,i]=(0,y.useState)(!1),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)({}),d=(0,y.useRef)(``),f=(0,y.useRef)(e);f.current=e,(0,y.useEffect)(()=>{if(!t)return;let e=!1;return u({}),i(!0),c(null),Promise.all(f.current.map(e=>cn(e).then(t=>({pjcode:e,value:t.maximumPreparingIssuesCount===null?``:String(t.maximumPreparingIssuesCount)})))).then(t=>{if(!e){let e={};for(let{pjcode:n,value:r}of t)e[n]=r;u(e)}}).catch(t=>{e||c(t instanceof Error?t.message:`Failed to load settings`)}).finally(()=>{e||i(!1)}),()=>{e=!0}},[t]),(0,y.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>{let e=window.location.hash===tr;e||c(null),n(e)};return window.addEventListener(`popstate`,e),window.addEventListener(`hashchange`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`hashchange`,e)}},[]);let p=(0,y.useCallback)(()=>{typeof window<`u`&&(d.current=window.location.hash,window.history.pushState({},``,tr)),n(!0)},[]),m=(0,y.useCallback)(()=>{if(typeof window<`u`){let e=d.current,t=`${window.location.pathname}${window.location.search}${e}`;window.history.replaceState({},``,t)}n(!1),c(null)},[]),h=(0,y.useCallback)((e,t)=>{u(n=>({...n,[e]:t}))},[]),g=(0,y.useCallback)(async()=>{o(!0),c(null);try{if(await Promise.all(Object.entries(l).filter(([,e])=>{let t=parseInt(e,10);return!Number.isNaN(t)&&t>=0}).map(([e,t])=>fn({pjcode:e,maximumPreparingIssuesCount:parseInt(t,10)}))),typeof window<`u`){let e=d.current,t=`${window.location.pathname}${window.location.search}${e}`;window.history.replaceState({},``,t)}n(!1)}catch(e){c(e instanceof Error?e.message:`Failed to save settings`)}finally{o(!1)}},[l]);return(0,y.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&m()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,m]),{isOpen:t,isLoading:r,isSaving:a,error:s,inputValues:l,open:p,close:m,changeInput:h,save:g}},Pr=e=>{let t=(0,y.useRef)(e),n=(0,y.useRef)(Date.now());return t.current!==e&&(t.current=e,n.current=Date.now()),{isTimerExpired:(0,y.useCallback)(e=>e<=0?!1:Date.now()-n.current>=e*60*1e3,[])}},Fr=/##\s+(?:エグゼクティブサマリ(?:\s*\/\s*Executive\s+Summary)?|Executive\s+Summary)\s*\n/i,Ir=/^From:\s+:robot:/m,Lr=/^##\s/m,Rr=e=>{let t=Fr.exec(e);if(t===null)return null;let n=e.slice(t.index+t[0].length),r=Ir.exec(n),i=Lr.exec(n),a=n.length;r!==null&&(a=Math.min(a,r.index)),i!==null&&(a=Math.min(a,i.index));let o=n.slice(0,a).trim();return o.length>0?o:null},zr=e=>{if(e.length===0)return null;let t=e[e.length-1],n=Rr(t.body);if(n!==null)return n;let r=t.body.trim();return r.length>0?r:null},Br=e=>`${e.repo}#${e.number}`,Vr=(e,t,n)=>{let[r,i]=(0,y.useState)({});return(0,y.useEffect)(()=>{if(!n)return;let r=!1;for(let n of e){let e=Br(n),a=t.peek(e);if(a!==void 0){let e=zr(a);r||i(t=>t[n.projectItemId]===e?t:{...t,[n.projectItemId]:e});continue}t.load(e,n.url).then(e=>{if(r)return;let t=zr(e);i(e=>e[n.projectItemId]===t?e:{...e,[n.projectItemId]:t})}).catch(()=>{r||i(e=>e[n.projectItemId]===null?e:{...e,[n.projectItemId]:null})})}return()=>{r=!0}},[e,t,n]),r},Hr=(e,t)=>{let n=Math.abs(e);return n<60||n<=Math.abs(t)*1.5?null:e<0?`next`:`previous`},Ur=(e,t)=>{let n=Math.abs(e),r=Math.abs(t);return r>n*1.5&&r>20},Wr=e=>{let t=e instanceof Element?e:null;for(;t!==null&&t!==document.body;){let e=window.getComputedStyle(t).overflowX;if((e===`auto`||e===`scroll`)&&t.scrollWidth>t.clientWidth&&t.scrollLeft>0)return!0;t=t.parentElement}return!1},Gr=e=>{let t=(0,y.useRef)(e);t.current=e;let n=(0,y.useRef)(null),r=(0,y.useCallback)(e=>{let n=0,r=0,i=!1,a=e=>{if(e.touches.length!==1){i=!1;return}if(Wr(e.target)){i=!1;return}let t=e.touches[0];n=t.clientX,r=t.clientY,i=!0},o=e=>{if(!i)return;let t=e.touches[0];Ur(t.clientX-n,t.clientY-r)&&(i=!1)},s=e=>{if(!i||(i=!1,e.changedTouches.length!==1))return;let a=e.changedTouches[0],o=Hr(a.clientX-n,a.clientY-r);o!==null&&t.current(o)};return e.addEventListener(`touchstart`,a,{passive:!0}),e.addEventListener(`touchmove`,o,{passive:!0}),e.addEventListener(`touchend`,s,{passive:!0}),()=>{e.removeEventListener(`touchstart`,a),e.removeEventListener(`touchmove`,o),e.removeEventListener(`touchend`,s)}},[]),i=(0,y.useCallback)(e=>{n.current!==null&&(n.current(),n.current=null),e!==null&&(n.current=r(e))},[r]);return(0,y.useEffect)(()=>()=>{n.current!==null&&(n.current(),n.current=null)},[]),i},Kr=e=>typeof e==`object`&&!!e&&!Array.isArray(e),qr=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],Jr=e=>Array.isArray(e)?e.filter(Kr).map(e=>({...e,relatedOpenPullRequestUrls:qr(e.relatedOpenPullRequestUrls)})):[],Yr=e=>!Kr(e)||!Array.isArray(e.items)?[]:Jr(e.items),Xr=e=>Array.isArray(e)?e.filter(Kr):[],Zr=e=>Array.isArray(e)?e.filter(Kr).map(e=>({...e,items:Jr(e.items)})):[],Qr=e=>({items:Yr(e),generatedAt:Kr(e)&&typeof e.generatedAt==`string`?e.generatedAt:``,statusOptions:Kr(e)?Xr(e.statusOptions):[],agentOptions:Kr(e)?Xr(e.agentOptions):[],storyOptions:Kr(e)?Xr(e.storyOptions):[],storyColors:Kr(e)&&Kr(e.storyColors)?e.storyColors:{},stories:Kr(e)?Zr(e.stories):[],defaultNameWithOwner:Kr(e)&&typeof e.defaultNameWithOwner==`string`?e.defaultNameWithOwner:null,storyOrder:Kr(e)?qr(e.storyOrder):[],timerEndsAt:Kr(e)&&typeof e.timerEndsAt==`string`?e.timerEndsAt:null,timerTotalSeconds:Kr(e)&&typeof e.timerTotalSeconds==`number`&&e.timerTotalSeconds>0?e.timerTotalSeconds:null}),$r=()=>{let e={};for(let t of ae)e[t.name]=null;return e},ei=(e,t)=>`/projects/${e}/${t}/list.json`,ti=6e4,ni=`console-list-v1`,ri=(e,t)=>{try{if(!(`caches`in globalThis))return;globalThis.caches.open(ni).then(n=>n.put(e,new Response(JSON.stringify(t),{headers:{"Content-Type":`application/json`}}))).catch(e=>{console.warn(`Failed to persist tab snapshot to cache:`,e)})}catch(e){console.warn(`Failed to access cache storage:`,e)}},ii=async e=>{if(!(`caches`in globalThis))return null;try{let t=await(await globalThis.caches.open(ni)).match(e);return t===void 0?null:{...Qr(await t.json()),fromCache:!0}}catch{return null}},ai=async e=>{let t=await Promise.all(ae.map(async t=>({tabName:t.name,snapshot:await ii(ei(e,t.name))}))),n=$r();for(let{tabName:e,snapshot:r}of t)n[e]=r;return n},oi=async(e,t)=>{let n=ei(e,t);try{let e=await fetch(n);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();return ri(n,t),{snapshot:{...Qr(t),fromCache:!1},error:null}}catch(e){let t=await ii(n);return t===null?{snapshot:null,error:e instanceof Error?e:Error(String(e))}:{snapshot:t,error:null}}},si=async e=>{let t=await Promise.all(ae.map(async t=>{let{snapshot:n,error:r}=await oi(e,t.name);return{tabName:t.name,snapshot:n,error:r}})),n=$r(),r=null;for(let{tabName:e,snapshot:i,error:a}of t)n[e]=i,a!==null&&r===null&&(r=a);return{snapshots:n,firstError:Object.values(n).every(e=>e===null)?r:null}},ci=(e,t=null)=>{let[n,r]=(0,y.useState)($r),[i,a]=(0,y.useState)(!0),[o,s]=(0,y.useState)(null);return(0,y.useEffect)(()=>{if(t!==null&&e!==null){let n=t.tabs[e];if(n!==void 0){let e=$r();for(let t of ae){let r=n[t.name];r!==void 0&&(e[t.name]={...r})}r(e),a(!1),s(null);return}}let n=!1,i=!1;if(s(null),e===null)return r($r()),a(!1),s(`No project specified in the URL path.`),()=>{n=!0};ai(e).then(e=>{if(n)return;let t=Object.values(e).some(e=>e!==null);t&&!i?(r(e),a(!1)):!t&&!i&&(a(!0),r($r()))});let o=()=>{si(e).then(({snapshots:e,firstError:t})=>{n||(i=!0,r(e),s(t===null?null:t.message),a(!1))}).catch(e=>{n||(i=!0,s(e instanceof Error?e.message:String(e)),a(!1))})};o();let c=setInterval(o,ti);return()=>{n=!0,clearInterval(c)}},[e,t]),{snapshots:n,isLoading:i,error:o,refreshSingleTab:(0,y.useCallback)(async t=>{if(e===null)return;let{snapshot:n}=await oi(e,t);n!==null&&r(e=>({...e,[t]:n}))},[e])}},li=e=>(0,y.useCallback)(t=>{Ar(),e(t)},[e]),ui=()=>{let[e,t]=(0,y.useState)(Pn),[n,r]=(0,y.useState)(!1),[i,a]=(0,y.useState)(e),o=(0,y.useCallback)(()=>{t(e=>(a(e),e)),r(!0)},[]),s=(0,y.useCallback)(()=>{r(!1)},[]),c=(0,y.useCallback)(()=>{a(e=>(Fn(e),t(e),e)),r(!1)},[]),l=(0,y.useCallback)(e=>{a(t=>({...t,timerMode:e}))},[]),u=(0,y.useCallback)((e,t)=>{a(n=>({...n,projectMinutes:{...n.projectMinutes,[e]:t}}))},[]);return{timerMode:e.timerMode,projectMinutes:e.projectMinutes,isOpen:n,draftTimerMode:i.timerMode,draftProjectMinutes:i.projectMinutes,openSettings:o,closeSettings:s,saveSettings:c,toggleDraftTimerMode:l,changeDraftMinutes:u}},di=(e,t)=>{let n=e.indexOf(t);if(n<0)return e.length>0?e[0]:null;let r=n+1;return r<e.length?e[r]:null},fi=(e,t)=>{let n=e.indexOf(t);return n<0||n>=e.length-1?null:e[n+1]},pi=(e,t)=>{let n=e.indexOf(t);return n<=0?null:e[n-1]},mi=(e,t)=>e.length===0?`${t}\n`:e.endsWith(`
|
|
13
|
+
`);i=c.pop()??``;for(let e of c){if(!e.startsWith(`data: `))continue;let n=_t(e.slice(6));if(n!==null){if(n.type===`progress`)r({fetched:typeof n.fetched==`number`?n.fetched:0,total:typeof n.total==`number`?n.total:0});else if(n.type===`done`){let e=ht(n.snapshot);if(e===null){t(`error`),s([`Failed to parse snapshot`]);return}if(e.failures.length>0){s(e.failures),t(`error`);return}await $e(e),Qe(!0),a(e),t(`on`),s([])}}}}}).catch(e=>{e instanceof Error&&e.name===`AbortError`||(t(`error`),s([e instanceof Error?e.message:String(e)]))})},[]),turnOff:(0,y.useCallback)(()=>{c.current!==null&&(c.current.abort(),c.current=null),t(`off`),a(null),r(null),s([]),Qe(!1),tt().catch(()=>{})},[])}},R=e=>typeof e==`object`&&!!e&&!Array.isArray(e),z=e=>typeof e==`string`?e:``,yt=e=>typeof e==`number`?e:0,bt=e=>e===!0,xt=`console-api-v1`,St=async(e,t)=>{let n=`${e}?url=${encodeURIComponent(t)}`;try{let e=await fetch(n);if(!e.ok){let t=`HTTP ${e.status}`;try{let n=await e.json();R(n)&&typeof n.error==`string`&&n.error.length>0&&(t=n.error)}catch(e){console.warn(`Failed to parse error body from non-ok response:`,e)}throw Error(t)}let t=await e.json();try{`caches`in globalThis&&globalThis.caches.open(xt).then(e=>e.put(n,new Response(JSON.stringify(t),{headers:{"Content-Type":`application/json`}}))).catch(e=>{console.warn(`Failed to persist API response to cache:`,e)})}catch(e){console.warn(`Failed to access cache storage:`,e)}return t}catch(e){try{if(`caches`in globalThis){let e=await(await globalThis.caches.open(xt)).match(n);if(e!==void 0)return e.json()}}catch{}throw e}},Ct=e=>!R(e)||!Array.isArray(e.comments)?[]:e.comments.filter(R).map(e=>({author:z(e.author),body:z(e.body),createdAt:z(e.createdAt),url:typeof e.url==`string`?e.url:null})),wt=e=>!R(e)||!Array.isArray(e.files)?[]:e.files.filter(R).map(e=>({path:z(e.path)||z(e.filename),additions:yt(e.additions),deletions:yt(e.deletions),status:z(e.status),patch:typeof e.patch==`string`?e.patch:null,rawUrl:typeof e.rawUrl==`string`?e.rawUrl:null})),Tt=e=>!R(e)||!Array.isArray(e.commits)?[]:e.commits.filter(R).map(e=>({sha:z(e.sha),message:z(e.message),author:z(e.author),authoredAt:z(e.authoredAt)})),Et=e=>R(e)?{title:z(e.title),body:z(e.body),additions:yt(e.additions),deletions:yt(e.deletions),changedFiles:yt(e.changedFiles)}:null,Dt=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],Ot=e=>e===`MERGEABLE`?`MERGEABLE`:e===`CONFLICTING`?`CONFLICTING`:`UNKNOWN`,kt=e=>!R(e)||!Array.isArray(e.relatedPullRequests)?[]:e.relatedPullRequests.filter(R).map(e=>({url:z(e.url),branchName:typeof e.branchName==`string`?e.branchName:null,createdAt:z(e.createdAt),isDraft:bt(e.isDraft),isConflicted:bt(e.isConflicted),mergeableStatus:Ot(e.mergeableStatus),isPassedAllCiJob:bt(e.isPassedAllCiJob),isCiStateSuccess:bt(e.isCiStateSuccess),isResolvedAllReviewComments:bt(e.isResolvedAllReviewComments),isBranchOutOfDate:bt(e.isBranchOutOfDate),missingRequiredCheckNames:Dt(e.missingRequiredCheckNames),summary:Et(e.summary)})),At=e=>{if(!R(e)||!R(e.status))return{found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]};let t=e.status;return{found:!0,isConflicted:bt(t.isConflicted),mergeableStatus:Ot(t.mergeableStatus),isPassedAllCiJob:bt(t.isPassedAllCiJob),isCiStateSuccess:bt(t.isCiStateSuccess),isBranchOutOfDate:bt(t.isBranchOutOfDate),missingRequiredCheckNames:Dt(t.missingRequiredCheckNames)}},jt=e=>R(e)?{state:z(e.state)||`open`,merged:bt(e.merged),isPullRequest:bt(e.isPullRequest),title:z(e.title)}:{state:`open`,merged:!1,isPullRequest:!1,title:``},Mt=()=>({fetchItemBody:async e=>{let t=await St(`/api/itembody`,e);return R(t)?z(t.body):``},fetchComments:async e=>Ct(await St(`/api/comments`,e)),fetchPrFiles:async e=>wt(await St(`/api/prfiles`,e)),fetchPrCommits:async e=>Tt(await St(`/api/prcommits`,e)),fetchRelatedPrs:async e=>kt(await St(`/api/relatedprs`,e)),fetchIssueState:async e=>jt(await St(`/api/issuetitle`,e)),fetchPullRequestStatus:async e=>At(await St(`/api/pullrequeststatus`,e))}),Nt=async e=>{let t=await e.text().catch(()=>``);if(t.length===0)return`HTTP ${e.status}`;try{let e=JSON.parse(t);if(R(e)&&typeof e.error==`string`)return e.error}catch{return t}return t},Pt=async(e,t)=>{let n=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)throw Error(await Nt(n))},Ft=`/api/comment`,It=e=>({author:z(e.author),body:z(e.body),createdAt:z(e.createdAt),url:typeof e.url==`string`?e.url:null}),Lt=async e=>{let t=await fetch(Ft,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)return{posted:!1,error:await Nt(t),rateLimitResetAt:null};let n=await t.json();return R(n)?n.ok===!1?{posted:!1,error:typeof n.error==`string`?n.error:`upstream error`,rateLimitResetAt:typeof n.rateLimitResetAt==`string`?n.rateLimitResetAt:null}:R(n.comment)?{posted:!0,comment:It(n.comment)}:{posted:!1,error:`comment was not returned`,rateLimitResetAt:null}:{posted:!1,error:`unexpected response shape`,rateLimitResetAt:null}},Rt=`/api/upload`,zt=e=>{let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t)},Bt=async e=>{let t=await fetch(Rt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t));let n=await t.json();if(!R(n)||typeof n.markdown!=`string`)throw Error(`markdown was not returned`);return n.markdown},Vt=`/api/addstory`,Ht=async e=>{let t=await fetch(Vt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},Ut=`/api/reviewcomment`,Wt=async e=>{let t=await fetch(Ut,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},Gt=`/api/createissue`,Kt=`/api/storycolor`,qt=async e=>{let t=await fetch(Kt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},Jt=async e=>{let t=await fetch(Gt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t));let n=await t.json();if(!(e=>typeof e==`object`&&!!e&&!Array.isArray(e))(n)||typeof n.issueUrl!=`string`)throw Error(`issueUrl was not returned`);return n.issueUrl},Yt=`/api/reorderstory`,Xt=async e=>{let t=await fetch(Yt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},Zt=`/api/deleteallcomments`,Qt=async e=>{let t=await fetch(Zt,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},$t=`/api/deletestory`,en=async e=>{let t=await fetch($t,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},tn=`/api/renamestory`,nn=async e=>{let t=await fetch(tn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},rn=`/api/storydescription`,an=async e=>{let t=await fetch(rn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},on=async()=>{let e=await fetch(`/api/projects`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();if(typeof t!=`object`||!t||Array.isArray(t))return{pjcodes:[],projectUrls:null,workflowImprovementIssueUrl:null,fleetTaskCreateUrl:null};let n=t;return{pjcodes:Array.isArray(n.pjcodes)?n.pjcodes.filter(e=>typeof e==`string`):[],projectUrls:n.projectUrls!==null&&typeof n.projectUrls==`object`&&!Array.isArray(n.projectUrls)?Object.fromEntries(Object.entries(n.projectUrls).filter(e=>typeof e[1]==`string`)):null,workflowImprovementIssueUrl:typeof n.workflowImprovementIssueUrl==`string`?n.workflowImprovementIssueUrl:null,fleetTaskCreateUrl:typeof n.fleetTaskCreateUrl==`string`?n.fleetTaskCreateUrl:null}},sn=`/api/projectreadmeconfig`,cn=async e=>{let t=`${sn}?pjcode=${encodeURIComponent(e)}`,n=await fetch(t);if(!n.ok)throw Error(await Nt(n));let r=await n.json();return{maximumPreparingIssuesCount:R(r)&&typeof r.maximumPreparingIssuesCount==`number`?r.maximumPreparingIssuesCount:null}},ln=`/api/setdependedissueurl`,un=async e=>{let t=await fetch(ln,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},dn=`/api/projectsettings`,fn=async e=>{let t=await fetch(dn,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(await Nt(t))},pn=5e3,mn=e=>`${e.isPr?`PR #`:`#`}${e.number}`,hn=(e,t)=>{switch(e.type){case`review`:return e.action===`approve_and_merge`?`Approved & Merged`:e.action===`request_changes`?`Rejected`:e.action===`totally_wrong`?`Marked totally wrong`:`Marked unnecessary`;case`next_action_date`:return e.action===`snooze_1hour`?`Next Action Hour +1 hour`:e.action===`snooze_3hours`?`Next Action Hour +3 hours`:e.action===`snooze_6hours`?`Next Action Hour +6 hours`:e.action===`snooze_1day`?`Next Action Date +1 day`:e.action===`snooze_2days`?`Next Action Date +2 days`:e.action===`snooze_3days`?`Next Action Date +3 days`:e.action===`snooze_5days`?`Next Action Date +5 days`:e.action===`snooze_1month`?`Next Action Date +1 month`:be(t)?`Next Action Date +1 week and skip`:`Next Action Date +1 week`;case`set_story`:return`Story → ${e.optionName}`;case`set_agent`:return`Agent → ${e.optionName}`;case`set_status`:return`Status → ${e.optionName}`;case`set_in_tmux_by_human`:return`Added to In Tmux by human`;case`ok_and_awaiting_workspace`:return`ok → Awaiting Workspace`;case`close`:return e.action===`close`?`Closed`:`Closed as not planned`;case`delete_all_comments`:return`Deleted all comments`}},gn=e=>{switch(e.type){case`review`:return e.action===`approve_and_merge`?`green`:e.action===`request_changes`?`amber`:e.action===`totally_wrong`?`red`:`gray`;case`next_action_date`:return`amber`;case`set_story`:case`set_agent`:case`set_status`:case`set_in_tmux_by_human`:case`ok_and_awaiting_workspace`:return`blue`;case`close`:return`red`;case`delete_all_comments`:return`red`}},_n=(e,t)=>e.type===`next_action_date`?be(t):e.type!==`delete_all_comments`,vn=(e,t,n)=>`${hn(e,n)} — ${mn(t)}`,yn=`console-offline-action-queue`,bn=e=>{if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&typeof t.message==`string`&&typeof t.color==`string`&&typeof t.enqueuedAt==`number`&&typeof t.itemUrl==`string`&&typeof t.projectItemId==`string`&&typeof t.itemNumber==`number`&&typeof t.repo==`string`&&typeof t.isPr==`boolean`&&typeof t.apiPath==`string`&&typeof t.requestBody==`object`&&t.requestBody!==null},xn=()=>{try{let e=localStorage.getItem(yn);if(e===null)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(bn):[]}catch{return[]}},Sn=e=>{localStorage.setItem(yn,JSON.stringify(e))},Cn=()=>typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`,wn=e=>e instanceof TypeError,Tn=e=>e instanceof Error&&e.message.length>0?e.message:String(e),En=100,Dn=e=>Math.max(0,Math.ceil((pn-e)/1e3)),On=e=>Math.max(0,1-e/pn),kn=()=>{let[e,t]=(0,y.useState)(null),[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(xn),o=(0,y.useRef)(i);o.current=i;let s=(0,y.useRef)(null),c=(0,y.useRef)(0),l=(0,y.useRef)(null),u=(0,y.useRef)(!1),d=(0,y.useCallback)(()=>{l.current!==null&&(clearInterval(l.current),l.current=null)},[]),f=(0,y.useCallback)(e=>{if(e.offline===void 0)return;let t={id:Cn(),message:e.message,color:e.color,enqueuedAt:Date.now(),...e.offline};a(e=>{let n=[...e,t];return Sn(n),n})},[]),p=(0,y.useCallback)(e=>{e.commit().catch(t=>{wn(t)&&e.offline!==void 0?f(e):r({message:e.message,reason:Tn(t)})})},[f]),m=(0,y.useCallback)(()=>{let e=s.current;d(),s.current=null,t(null),e!==null&&!u.current&&(u.current=!0,p(e))},[d,p]),h=(0,y.useCallback)(()=>{let e=s.current;d(),s.current=null,u.current=!0,t(null),e?.revertAdvance?.()},[d]),g=(0,y.useCallback)(()=>{r(null)},[]),_=(0,y.useCallback)((e,t)=>{r({message:e,reason:t})},[]),v=(0,y.useCallback)(e=>{a(t=>{let n=t.filter(t=>t.id!==e);return Sn(n),n})},[]),b=(0,y.useCallback)(async e=>{let t=o.current.find(t=>t.id===e);if(t!==void 0)try{await Pt(t.apiPath,t.requestBody),v(e)}catch(n){wn(n)?r({message:t.message,reason:`Still offline — action is still held in the queue`}):(r({message:t.message,reason:Tn(n)}),v(e))}},[v]),x=(0,y.useCallback)(e=>{if(s.current!==null&&!u.current){let e=s.current;d(),u.current=!0,p(e)}u.current=!1,s.current=e,c.current=Date.now(),t({message:e.message,color:e.color,remainingSeconds:Dn(0),progress:On(0)}),e.advance(),l.current=setInterval(()=>{let n=Date.now()-c.current;if(n>=5e3){m();return}t({message:e.message,color:e.color,remainingSeconds:Dn(n),progress:On(n)})},En)},[d,m,p]);return(0,y.useEffect)(()=>d,[d]),{pending:e,error:n,offlineActions:i,enqueue:x,showError:_,undo:h,dismissError:g,confirmOfflineAction:b,discardOfflineAction:v}},An=e=>{window.history.pushState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`))},jn=e=>{window.history.replaceState({},``,e),window.dispatchEvent(new PopStateEvent(`popstate`))},Mn=`tdpm-timer-settings`,Nn=()=>({timerMode:!1,projectMinutes:{}}),Pn=()=>{if(typeof localStorage>`u`)return Nn();let e=localStorage.getItem(Mn);if(e===null)return Nn();try{let t=JSON.parse(e);if(typeof t!=`object`||!t||Array.isArray(t))return Nn();let n=t,r=typeof n.timerMode==`boolean`&&n.timerMode,i=n.projectMinutes;return{timerMode:r,projectMinutes:typeof i==`object`&&i&&!Array.isArray(i)?Object.fromEntries(Object.entries(i).filter(([,e])=>typeof e==`number`).map(([e,t])=>[e,t])):{}}}catch{return Nn()}},Fn=e=>{typeof localStorage<`u`&&localStorage.setItem(Mn,JSON.stringify(e))},In=(e,t,n)=>{if(e.length===0)return null;let r=t===null?-1:e.indexOf(t),i=r===-1?0:(r+1)%e.length,a=r===-1?e.length:e.length-1;for(let t=0;t<a;t++){let r=e[(i+t)%e.length];if((n[r]??0)>0)return r}return null},Ln=(e,t,n,r,i,a=!1)=>{let o=(0,y.useRef)(t),s=(0,y.useRef)(n),c=(0,y.useRef)(a);(0,y.useEffect)(()=>{let l=o.current,u=s.current,d=c.current;if(o.current=t,s.current=n,c.current=a,e){if(u!==n){o.current=0;return}if(d&&!a){o.current=t;return}if(l>0&&t===0){let e=In(r,n,i);e!==null&&An(`/projects/${e}`)}}},[e,t,a,n,r,i])},Rn=class{fetcher;cache=new Map;inFlight=new Map;prefetchInFlight=new Set;constructor(e){this.fetcher=e}peek=e=>this.cache.get(e);has=e=>this.cache.has(e);load=(e,t)=>{let n=this.cache.get(e);if(n!==void 0)return Promise.resolve(n);let r=this.inFlight.get(e);if(r!==void 0)return r;let i=this.fetcher(t).then(t=>(this.cache.set(e,t),t)).finally(()=>{this.inFlight.delete(e)});return this.inFlight.set(e,i),i};prefetch=(e,t)=>{this.cache.has(e)||this.inFlight.has(e)||this.prefetchInFlight.has(e)||(this.prefetchInFlight.add(e),this.fetcher(t).then(t=>{this.cache.set(e,t)}).catch(()=>{}).finally(()=>{this.prefetchInFlight.delete(e)}))};seed(e,t){this.cache.set(e,t)}invalidate=e=>{this.cache.delete(e)}},zn=e=>{try{let t=new URL(e).pathname.split(`/`).filter(Boolean);if(t.length>=4)return`${t[0]}/${t[1]}#${t[3]}`}catch{}return e},Bn=(e,t)=>{for(let[n,r]of Object.entries(t.items)){let t=zn(n);e.body.seed(t,r.body),e.comments.seed(t,r.comments),e.state.seed(t,r.state),r.files!==null&&e.files.seed(t,r.files),r.commits!==null&&e.commits.seed(t,r.commits),r.prStatus!==null&&e.prStatus.seed(t,r.prStatus),r.relatedPrs!==null&&e.relatedPrs.seed(t,r.relatedPrs)}},Vn=(e=null)=>(0,y.useMemo)(()=>{let t=Mt(),n={client:t,body:new Rn(t.fetchItemBody),comments:new Rn(t.fetchComments),files:new Rn(t.fetchPrFiles),commits:new Rn(t.fetchPrCommits),relatedPrs:new Rn(t.fetchRelatedPrs),state:new Rn(t.fetchIssueState),prStatus:new Rn(t.fetchPullRequestStatus)};return e!==null&&Bn(n,e),n},[e]),Hn=0,Un=500,Wn=2e3,Gn=e=>{let t=window;if(typeof t.requestIdleCallback==`function`&&typeof t.cancelIdleCallback==`function`){let n=t.requestIdleCallback(e,{timeout:Wn});return{cancel:()=>t.cancelIdleCallback?.(n)}}let n=window.setTimeout(e,0);return{cancel:()=>window.clearTimeout(n)}},Kn=(e,t)=>{let n=`${t.repo}#${t.number}`;e.body.prefetch(n,t.url),e.state.prefetch(n,t.url),e.comments.prefetch(n,t.url),t.isPr?(e.files.prefetch(n,t.url),e.commits.prefetch(n,t.url),e.prStatus.prefetch(n,t.url)):e.relatedPrs.prefetch(n,t.url)},qn=(e,t,n)=>{(0,y.useEffect)(()=>{if(t===null)return;let r=n.findIndex(e=>e.projectItemId===t.projectItemId);if(r===-1)return;let i=n.slice(r+1,r+1+Hn);if(i.length===0)return;let a=null,o=window.setTimeout(()=>{a=Gn(()=>{for(let t of i)Kn(e,t)})},Un);return()=>{window.clearTimeout(o),a?.cancel()}},[e,t,n])},Jn=`/api/features`,Yn=()=>{let[e,t]=(0,y.useState)({airplaneMode:!1});return(0,y.useEffect)(()=>{fetch(Jn).then(async e=>{if(!e.ok)return;let n=await e.json();typeof n==`object`&&n&&!Array.isArray(n)&&`airplaneMode`in n&&typeof n.airplaneMode==`boolean`&&t({airplaneMode:n.airplaneMode})}).catch(e=>{console.warn(`Failed to fetch /api/features`,e)})},[]),e},Xn=(e,t)=>{let n=ae.findIndex(t=>t.name===e);if(n===-1)return null;for(let e=n+1;e<ae.length;e+=1){let n=ae[e];if(n.isNavigable!==!1&&(t[n.name]??0)>0)return n.name}return null},Zn=e=>{let t=ae.filter(e=>e.isNavigable!==!1);for(let n of t)if((e[n.name]??0)>0)return n.name;return t[0].name},Qn=new Set(ae.map(e=>e.name)),$n=e=>{let t=e.split(`/`).filter(e=>e.length>0);if(t.length<3||t[0]!==`projects`)return null;let n=t[2];return Qn.has(n)?n:null},er=e=>{if(!e.startsWith(`#item/`))return null;let t=e.slice(6);return t.length===0?null:decodeURIComponent(t)},tr=`#settings`,nr=(e,t)=>{let n=(0,y.useCallback)(()=>{let e=Zn(t);return typeof window>`u`?{activeTab:e,selectedItemKey:null}:{activeTab:$n(window.location.pathname)??e,selectedItemKey:er(window.location.hash)}},[t]),[r,i]=(0,y.useState)(n),a=(0,y.useRef)(null);a.current=e,(0,y.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>{i(n())};return window.addEventListener(`popstate`,e),window.addEventListener(`hashchange`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`hashchange`,e)}},[n]),(0,y.useEffect)(()=>{if(typeof window>`u`||$n(window.location.pathname)!==null)return;let e=Zn(t);Object.values(t).some(e=>e>0)&&a.current!==null&&window.history.replaceState({},``,`/projects/${a.current}/${e}${window.location.search}`),i(t=>t.activeTab===e?t:{...t,activeTab:e})},[t]);let o=(0,y.useCallback)(t=>e===null?`#${t}`:`/projects/${e}/${t}`,[e]),s=(0,y.useCallback)(e=>{if(typeof window>`u`){i({activeTab:e,selectedItemKey:null});return}window.history.pushState({},``,o(e)),i({activeTab:e,selectedItemKey:null})},[o]),c=(0,y.useCallback)(e=>{typeof window<`u`&&(window.location.hash=`#item/${encodeURIComponent(e)}`),i(t=>({...t,selectedItemKey:e}))},[]),l=(0,y.useCallback)(()=>{if(typeof window<`u`&&window.location.hash!==``){let e=`${window.location.pathname}${window.location.search}`;window.history.pushState({},``,e)}i(e=>({...e,selectedItemKey:null}))},[]);return{activeTab:r.activeTab,selectedItemKey:r.selectedItemKey,tabHref:o,selectTab:s,openItem:c,closeItem:l}},rr=e=>`pv_overlay_${e}`,ir=e=>e.projectItemId===``?e.itemId:e.projectItemId,ar=(e,t)=>e!==void 0&&e.done===!0&&e.mode===t,or=(e,t,n)=>e.filter(e=>!ar(t[ir(e)],n)).length,sr=(e,t,n)=>e.filter(e=>!ar(t[ir(e)],n)),cr=(e,t)=>{let n=Date.parse(t);if(Number.isNaN(n))return{};let r={};for(let[t,i]of Object.entries(e))i.ts>=n&&(r[t]=i);return r},lr=(e,t,n)=>{if(n===null)return null;let r=Date.parse(n);if(Number.isNaN(r))return null;let i=e[ir(t)];return i===void 0||i.ts<r?null:i.status??null},ur=(e,t,n,r,i)=>{let a={...e[t]??{},...n,ts:i,mode:r};return{...e,[t]:a}},dr=`/api/review`,fr=`/api/triage`,pr=`/api/intmux`,mr=(e,t,n,r,i)=>{if(r===`approve_and_merge`)return{pjcode:e,action:`approve_and_merge`,prUrl:n,projectItemId:t.projectItemId};if(r===`request_changes`){let r=i[0];return{pjcode:e,action:`request_changes`,prUrl:n,projectItemId:t.projectItemId,commentBody:ge(i),...r===void 0?{}:{changedFilePath:r.path,line:r.line,side:r.side}}}return r===`totally_wrong`?{pjcode:e,action:`close`,prUrl:n,issueUrl:t.url,projectItemId:t.projectItemId,commentBody:pe}:{pjcode:e,action:`unnecessary`,prUrl:n,projectItemId:t.projectItemId,issueUrl:t.url,commentBody:me,issueCommentBody:he(n)}},hr=(e,t,n,r)=>({pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId,...r??{}}),gr=(e,t)=>({pjcode:e,action:`set_intmux`,issueUrl:t.url,projectItemId:t.projectItemId}),_r=()=>Error(`No project specified in the URL path.`),vr=`ok`,yr=(e,t,n,r,i)=>{let{patchOverlay:a}=n,o=(0,y.useCallback)(e=>{if(r===void 0)return;let t=`${e.repo}#${e.number}`;r.body.invalidate(t),r.comments.invalidate(t)},[r]),s=(0,y.useCallback)(e=>{a(ir(e),{done:!0},t)},[a,t]),c=(0,y.useCallback)(async(t,n,r,i=[])=>{if(e===null)throw _r();await Pt(dr,mr(e,t,n,r,i)),s(t),o(t)},[e,s,o]),l=(0,y.useCallback)(async(t,n)=>{if(e===null)throw _r();let r={pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId};s(t),await Pt(fr,r),o(t)},[e,s,o]),u=(0,y.useCallback)(async(n,r)=>{if(e===null)throw _r();let i={pjcode:e,action:`set_agent`,issueUrl:n.url,projectItemId:n.projectItemId,agentOptionId:r.id};a(ir(n),{done:!0},t),await Pt(fr,i),o(n)},[e,o,a,t]);return{reviewPullRequest:c,setNextActionDate:l,setStory:(0,y.useCallback)(async(n,r)=>{if(e===null)throw _r();let i={pjcode:e,action:`set_story`,issueUrl:n.url,projectItemId:n.projectItemId,storyOptionId:r.id};a(ir(n),{done:!0,story:{name:r.name,color:r.color}},t),await Pt(fr,i),o(n)},[e,o,a,t]),setAgent:u,setStatus:(0,y.useCallback)(async(n,r)=>{if(e===null)throw _r();let i={pjcode:e,action:`set_status`,issueUrl:n.url,projectItemId:n.projectItemId,statusName:r.name};a(ir(n),{done:!0,status:{name:r.name,color:r.color}},t),await Pt(fr,i),o(n)},[e,o,a,t]),setInTmuxByHuman:(0,y.useCallback)(async(n,r)=>{if(e===null)throw _r();let i={pjcode:e,action:`set_intmux`,issueUrl:n.url,projectItemId:n.projectItemId};a(ir(n),{done:!0,status:{name:r.name,color:r.color}},t),await Pt(pr,i),o(n)},[e,o,a,t]),closeIssue:(0,y.useCallback)(async(t,n)=>{if(e===null)throw _r();let r={pjcode:e,action:n,issueUrl:t.url,projectItemId:t.projectItemId};s(t),await Pt(fr,r),o(t)},[e,s,o]),okAndMoveToAwaitingWorkspace:(0,y.useCallback)(async(n,r)=>{if(e===null)throw _r();a(ir(n),{done:!0,status:{name:r.name,color:r.color}},t);let s=await Lt({pjcode:e,url:n.url,body:vr});if(await Pt(fr,{pjcode:e,action:`set_status`,issueUrl:n.url,projectItemId:n.projectItemId,statusName:r.name}),o(n),await i?.(),!s.posted){let e=s.rateLimitResetAt===null?``:` Rate limit resets at ${s.rateLimitResetAt}.`;throw Error(`Comment not posted — ${s.error}.${e} Status was changed. Re-post: ${vr}`)}},[e,o,a,t,i]),addComment:(0,y.useCallback)(async(t,n)=>{if(e===null)throw _r();let r=await Lt({pjcode:e,url:t.url,body:n});if(!r.posted){let e=r.rateLimitResetAt===null?``:` Rate limit resets at ${r.rateLimitResetAt}.`;throw Error(`${r.error}.${e}`)}return o(t),r.comment},[e,o]),uploadAttachment:(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`no project in the URL path`);let r=zt(new Uint8Array(await n.arrayBuffer()));return Bt({pjcode:e,url:t.url,fileName:n.name,contentBase64:r})},[e]),addInlineReviewComment:(0,y.useCallback)(async(t,n,r,i,a)=>{if(e===null)throw _r();await Wt({pjcode:e,url:t,path:n,line:r,side:i,body:a})},[e]),deleteAllComments:(0,y.useCallback)(async e=>{await Qt({issueUrl:e.url}),o(e)},[o]),setDependedIssueUrl:(0,y.useCallback)(async(t,n)=>{if(e===null)throw _r();await un({pjcode:e,issueUrl:t.url,dependedIssueUrl:n})},[e])}},br=e=>typeof e==`object`&&!!e&&typeof e.ts==`number`,xr=e=>{if(typeof localStorage>`u`)return{};let t=localStorage.getItem(rr(e));if(t===null)return{};let n=JSON.parse(t);if(typeof n!=`object`||!n)return{};let r={};for(let[e,t]of Object.entries(n))br(t)&&(r[e]=t);return r},Sr=(e,t)=>{typeof localStorage<`u`&&localStorage.setItem(rr(e),JSON.stringify(t))},Cr=e=>{let[t,n]=(0,y.useState)(()=>xr(e));return{overlay:t,patchOverlay:(0,y.useCallback)((t,r,i)=>{n(n=>{let a=ur(n,t,r,i,Date.now());return Sr(e,a),a})},[e])}},wr=e=>{let t=e.split(`/`).filter(e=>e.length>0);if(t.length<2||t[0]!==`projects`)return null;let n=t[1];return n.length===0?null:n},Tr=()=>{let[e,t]=(0,y.useState)(()=>wr(typeof window>`u`?``:window.location.pathname));return(0,y.useEffect)(()=>{let e=()=>{t(wr(window.location.pathname))};return window.addEventListener(`popstate`,e),()=>{window.removeEventListener(`popstate`,e)}},[]),e},Er=()=>{let[e,t]=(0,y.useState)([]),[n,r]=(0,y.useState)(null),[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(!0),[u,d]=(0,y.useState)(null);return(0,y.useEffect)(()=>{let e=!1;return l(!0),d(null),on().then(n=>{e||(t(n.pjcodes),r(n.projectUrls),a(n.workflowImprovementIssueUrl),s(n.fleetTaskCreateUrl),l(!1))}).catch(t=>{e||(d(t instanceof Error?t:Error(String(t))),l(!1))}),()=>{e=!0}},[]),{pjcodes:e,projectUrls:n,workflowImprovementIssueUrl:i,fleetTaskCreateUrl:o,isLoading:c,error:u}},Dr=`console-comment-expanded:`,Or=e=>{try{let t=localStorage.getItem(Dr+e);if(t===null)return new Set;let n=JSON.parse(t);return Array.isArray(n)?new Set(n.filter(e=>typeof e==`string`)):new Set}catch(e){return console.error(`Failed to load comment expanded state from storage:`,e),new Set}},kr=(e,t)=>{try{localStorage.setItem(Dr+e,JSON.stringify([...t]))}catch(e){console.error(`Failed to save comment expanded state to storage:`,e)}},Ar=()=>{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(Dr)&&e.push(n)}for(let t of e)localStorage.removeItem(t)},jr=e=>(0,y.useCallback)(t=>{Ar(),e(t)},[e]),Mr=()=>typeof window<`u`&&window.location.hash===`#settings`,Nr=e=>{let[t,n]=(0,y.useState)(Mr),[r,i]=(0,y.useState)(!1),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)({}),d=(0,y.useRef)(``),f=(0,y.useRef)(e);f.current=e,(0,y.useEffect)(()=>{if(!t)return;let e=!1;return u({}),i(!0),c(null),Promise.all(f.current.map(e=>cn(e).then(t=>({pjcode:e,value:t.maximumPreparingIssuesCount===null?``:String(t.maximumPreparingIssuesCount)})))).then(t=>{if(!e){let e={};for(let{pjcode:n,value:r}of t)e[n]=r;u(e)}}).catch(t=>{e||c(t instanceof Error?t.message:`Failed to load settings`)}).finally(()=>{e||i(!1)}),()=>{e=!0}},[t]),(0,y.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>{let e=window.location.hash===tr;e||c(null),n(e)};return window.addEventListener(`popstate`,e),window.addEventListener(`hashchange`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`hashchange`,e)}},[]);let p=(0,y.useCallback)(()=>{typeof window<`u`&&(d.current=window.location.hash,window.history.pushState({},``,tr)),n(!0)},[]),m=(0,y.useCallback)(()=>{if(typeof window<`u`){let e=d.current,t=`${window.location.pathname}${window.location.search}${e}`;window.history.replaceState({},``,t)}n(!1),c(null)},[]),h=(0,y.useCallback)((e,t)=>{u(n=>({...n,[e]:t}))},[]),g=(0,y.useCallback)(async()=>{o(!0),c(null);try{if(await Promise.all(Object.entries(l).filter(([,e])=>{let t=parseInt(e,10);return!Number.isNaN(t)&&t>=0}).map(([e,t])=>fn({pjcode:e,maximumPreparingIssuesCount:parseInt(t,10)}))),typeof window<`u`){let e=d.current,t=`${window.location.pathname}${window.location.search}${e}`;window.history.replaceState({},``,t)}n(!1)}catch(e){c(e instanceof Error?e.message:`Failed to save settings`)}finally{o(!1)}},[l]);return(0,y.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&m()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,m]),{isOpen:t,isLoading:r,isSaving:a,error:s,inputValues:l,open:p,close:m,changeInput:h,save:g}},Pr=e=>{let t=(0,y.useRef)(e),n=(0,y.useRef)(Date.now());return t.current!==e&&(t.current=e,n.current=Date.now()),{isTimerExpired:(0,y.useCallback)(e=>e<=0?!1:Date.now()-n.current>=e*60*1e3,[])}},Fr=/##\s+(?:エグゼクティブサマリ(?:\s*\/\s*Executive\s+Summary)?|Executive\s+Summary)\s*\n/i,Ir=/^From:\s+:robot:/m,Lr=/^##\s/m,Rr=e=>{let t=Fr.exec(e);if(t===null)return null;let n=e.slice(t.index+t[0].length),r=Ir.exec(n),i=Lr.exec(n),a=n.length;r!==null&&(a=Math.min(a,r.index)),i!==null&&(a=Math.min(a,i.index));let o=n.slice(0,a).trim();return o.length>0?o:null},zr=e=>{if(e.length===0)return null;let t=e[e.length-1],n=Rr(t.body);if(n!==null)return n;let r=t.body.trim();return r.length>0?r:null},Br=e=>`${e.repo}#${e.number}`,Vr=(e,t,n)=>{let[r,i]=(0,y.useState)({});return(0,y.useEffect)(()=>{if(!n)return;let r=!1;for(let n of e){let e=Br(n),a=t.peek(e);if(a!==void 0){let e=zr(a);r||i(t=>t[n.projectItemId]===e?t:{...t,[n.projectItemId]:e});continue}t.load(e,n.url).then(e=>{if(r)return;let t=zr(e);i(e=>e[n.projectItemId]===t?e:{...e,[n.projectItemId]:t})}).catch(()=>{r||i(e=>e[n.projectItemId]===null?e:{...e,[n.projectItemId]:null})})}return()=>{r=!0}},[e,t,n]),r},Hr=(e,t)=>{let n=Math.abs(e);return n<60||n<=Math.abs(t)*1.5?null:e<0?`next`:`previous`},Ur=(e,t)=>{let n=Math.abs(e),r=Math.abs(t);return r>n*1.5&&r>20},Wr=e=>{let t=e instanceof Element?e:null;for(;t!==null&&t!==document.body;){let e=window.getComputedStyle(t).overflowX;if((e===`auto`||e===`scroll`)&&t.scrollWidth>t.clientWidth&&t.scrollLeft>0)return!0;t=t.parentElement}return!1},Gr=e=>{let t=(0,y.useRef)(e);t.current=e;let n=(0,y.useRef)(null),r=(0,y.useCallback)(e=>{let n=0,r=0,i=!1,a=e=>{if(e.touches.length!==1){i=!1;return}if(Wr(e.target)){i=!1;return}let t=e.touches[0];n=t.clientX,r=t.clientY,i=!0},o=e=>{if(!i)return;let t=e.touches[0];Ur(t.clientX-n,t.clientY-r)&&(i=!1)},s=e=>{if(!i||(i=!1,e.changedTouches.length!==1))return;let a=e.changedTouches[0],o=Hr(a.clientX-n,a.clientY-r);o!==null&&t.current(o)};return e.addEventListener(`touchstart`,a,{passive:!0}),e.addEventListener(`touchmove`,o,{passive:!0}),e.addEventListener(`touchend`,s,{passive:!0}),()=>{e.removeEventListener(`touchstart`,a),e.removeEventListener(`touchmove`,o),e.removeEventListener(`touchend`,s)}},[]),i=(0,y.useCallback)(e=>{n.current!==null&&(n.current(),n.current=null),e!==null&&(n.current=r(e))},[r]);return(0,y.useEffect)(()=>()=>{n.current!==null&&(n.current(),n.current=null)},[]),i},Kr=e=>typeof e==`object`&&!!e&&!Array.isArray(e),qr=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],Jr=e=>Array.isArray(e)?e.filter(Kr).map(e=>({...e,relatedOpenPullRequestUrls:qr(e.relatedOpenPullRequestUrls)})):[],Yr=e=>!Kr(e)||!Array.isArray(e.items)?[]:Jr(e.items),Xr=e=>Array.isArray(e)?e.filter(Kr):[],Zr=e=>Array.isArray(e)?e.filter(Kr).map(e=>({...e,items:Jr(e.items)})):[],Qr=e=>({items:Yr(e),generatedAt:Kr(e)&&typeof e.generatedAt==`string`?e.generatedAt:``,statusOptions:Kr(e)?Xr(e.statusOptions):[],agentOptions:Kr(e)?Xr(e.agentOptions):[],storyOptions:Kr(e)?Xr(e.storyOptions):[],storyColors:Kr(e)&&Kr(e.storyColors)?e.storyColors:{},stories:Kr(e)?Zr(e.stories):[],defaultNameWithOwner:Kr(e)&&typeof e.defaultNameWithOwner==`string`?e.defaultNameWithOwner:null,storyOrder:Kr(e)?qr(e.storyOrder):[],timerEndsAt:Kr(e)&&typeof e.timerEndsAt==`string`?e.timerEndsAt:null,timerTotalSeconds:Kr(e)&&typeof e.timerTotalSeconds==`number`&&e.timerTotalSeconds>0?e.timerTotalSeconds:null}),$r=()=>{let e={};for(let t of ae)e[t.name]=null;return e},ei=(e,t)=>`/projects/${e}/${t}/list.json`,ti=6e4,ni=`console-list-v1`,ri=(e,t)=>{try{if(!(`caches`in globalThis))return;globalThis.caches.open(ni).then(n=>n.put(e,new Response(JSON.stringify(t),{headers:{"Content-Type":`application/json`}}))).catch(e=>{console.warn(`Failed to persist tab snapshot to cache:`,e)})}catch(e){console.warn(`Failed to access cache storage:`,e)}},ii=async e=>{if(!(`caches`in globalThis))return null;try{let t=await(await globalThis.caches.open(ni)).match(e);return t===void 0?null:{...Qr(await t.json()),fromCache:!0}}catch{return null}},ai=async e=>{let t=await Promise.all(ae.map(async t=>({tabName:t.name,snapshot:await ii(ei(e,t.name))}))),n=$r();for(let{tabName:e,snapshot:r}of t)n[e]=r;return n},oi=async(e,t)=>{let n=ei(e,t);try{let e=await fetch(n);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();return ri(n,t),{snapshot:{...Qr(t),fromCache:!1},error:null}}catch(e){let t=await ii(n);return t===null?{snapshot:null,error:e instanceof Error?e:Error(String(e))}:{snapshot:t,error:null}}},si=async e=>{let t=await Promise.all(ae.map(async t=>{let{snapshot:n,error:r}=await oi(e,t.name);return{tabName:t.name,snapshot:n,error:r}})),n=$r(),r=null;for(let{tabName:e,snapshot:i,error:a}of t)n[e]=i,a!==null&&r===null&&(r=a);return{snapshots:n,firstError:Object.values(n).every(e=>e===null)?r:null}},ci=(e,t=null)=>{let[n,r]=(0,y.useState)($r),[i,a]=(0,y.useState)(!0),[o,s]=(0,y.useState)(null);return(0,y.useEffect)(()=>{if(t!==null&&e!==null){let n=t.tabs[e];if(n!==void 0){let e=$r();for(let t of ae){let r=n[t.name];r!==void 0&&(e[t.name]={...r})}r(e),a(!1),s(null);return}}let n=!1,i=!1;if(s(null),e===null)return r($r()),a(!1),s(`No project specified in the URL path.`),()=>{n=!0};ai(e).then(e=>{if(n)return;let t=Object.values(e).some(e=>e!==null);t&&!i?(r(e),a(!1)):!t&&!i&&(a(!0),r($r()))});let o=()=>{si(e).then(({snapshots:e,firstError:t})=>{n||(i=!0,r(e),s(t===null?null:t.message),a(!1))}).catch(e=>{n||(i=!0,s(e instanceof Error?e.message:String(e)),a(!1))})};o();let c=setInterval(o,ti);return()=>{n=!0,clearInterval(c)}},[e,t]),{snapshots:n,isLoading:i,error:o,refreshSingleTab:(0,y.useCallback)(async t=>{if(e===null)return;let{snapshot:n}=await oi(e,t);n!==null&&r(e=>({...e,[t]:n}))},[e])}},li=e=>(0,y.useCallback)(t=>{Ar(),e(t)},[e]),ui=()=>{let[e,t]=(0,y.useState)(Pn),[n,r]=(0,y.useState)(!1),[i,a]=(0,y.useState)(e),o=(0,y.useCallback)(()=>{t(e=>(a(e),e)),r(!0)},[]),s=(0,y.useCallback)(()=>{r(!1)},[]),c=(0,y.useCallback)(()=>{a(e=>(Fn(e),t(e),e)),r(!1)},[]),l=(0,y.useCallback)(e=>{a(t=>({...t,timerMode:e}))},[]),u=(0,y.useCallback)((e,t)=>{a(n=>({...n,projectMinutes:{...n.projectMinutes,[e]:t}}))},[]);return{timerMode:e.timerMode,projectMinutes:e.projectMinutes,isOpen:n,draftTimerMode:i.timerMode,draftProjectMinutes:i.projectMinutes,openSettings:o,closeSettings:s,saveSettings:c,toggleDraftTimerMode:l,changeDraftMinutes:u}},di=(e,t)=>{let n=e.indexOf(t);if(n<0)return e.length>0?e[0]:null;let r=n+1;return r<e.length?e[r]:null},fi=(e,t)=>{let n=e.indexOf(t);return n<0||n>=e.length-1?null:e[n+1]},pi=(e,t)=>{let n=e.indexOf(t);return n<=0?null:e[n-1]},mi=(e,t)=>e.length===0?`${t}\n`:e.endsWith(`
|
|
14
14
|
`)?`${e}${t}\n`:`${e}\n${t}\n`,hi=(e,t)=>{let n=`![uploading ${t}]()`;return`${e.length===0?``:e.replace(/\n*$/,`
|
|
15
15
|
`)}\n\n\n${n}\n`},gi=(e,t,n)=>{let r=`![uploading ${t}]()`,i=e.indexOf(r);return i===-1?mi(e,n):e.slice(0,i)+n+e.slice(i+r.length)},_i=(e,t)=>{let n=`![uploading ${t}]()`,r=e.indexOf(n);if(r===-1)return e;let i=r,a=0;for(;a<3&&i>0&&e[i-1]===`
|
|
16
16
|
`;)i--,a++;let o=+(e[r+n.length]===`
|
|
@@ -86,6 +86,6 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
86
86
|
`)}),o+=1,i=null;continue}i.push(e);continue}if(Xs(e)){r.push(e),a=!0;continue}r.push(e)}return i!==null&&r.push("```mermaid",...i),s(),n},$s=Object.defineProperty,ec=(e,t)=>$s(e,`name`,{value:t,configurable:!0});function tc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ec(tc,`setRef`);function nc(...e){return t=>{let n=!1,r=e.map(e=>{let r=tc(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():tc(e[t],null)}}}}ec(nc,`composeRefs`);function rc(...e){return y.useCallback(nc(...e),e)}ec(rc,`useComposedRefs`);var ic=Object.defineProperty,ac=(e,t)=>ic(e,`name`,{value:t,configurable:!0});function oc(e){let t=y.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];hc(r)&&typeof yc==`function`&&(r=yc(r._payload)),y.Children.forEach(r,e=>{if(pc(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;hc(n)&&typeof yc==`function`&&(n=yc(n._payload)),a=uc(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=y.cloneElement(a,void 0,s):!o&&y.Children.count(r)===1&&y.isValidElement(r)&&(a=r);let c=a?fc(a):void 0,l=rc(n,c);if(!a){if(r||r===0)throw Error(o?vc(e):_c(e));return r}let u=dc(i,a.props??{});return a.type!==y.Fragment&&(u.ref=n?l:c),y.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}ac(oc,`createSlot`);var sc=oc(`Slot`),cc=Symbol.for(`radix.slottable`);function lc(e){let t=ac(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=cc,t}ac(lc,`createSlottable`);var uc=ac((e,t)=>{if(`child`in e.props){let t=e.props.child;return y.isValidElement(t)?y.cloneElement(t,void 0,e.props.children(t.props.children)):null}return y.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function dc(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}ac(dc,`mergeProps`);function fc(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ac(fc,`getElementRef`);function pc(e){return y.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===cc}ac(pc,`isSlottable`);var mc=Symbol.for(`react.lazy`);function hc(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===mc&&`_payload`in e&&gc(e._payload)}ac(hc,`isLazyComponent`);function gc(e){return typeof e==`object`&&!!e&&`then`in e}ac(gc,`isPromiseLike`);var _c=ac(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),vc=ac(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),yc=y.use;function bc(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=bc(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function xc(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=bc(e))&&(r&&(r+=` `),r+=t);return r}var Sc=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Cc=xc,wc=(e,t)=>n=>{if(t?.variants==null)return Cc(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Sc(t)||Sc(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Cc(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Tc=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ec=(e,t)=>({classGroupId:e,validator:t}),Dc=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Oc=`-`,kc=[],Ac=`arbitrary..`,jc=e=>{let t=Pc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Nc(e);let n=e.split(Oc);return Mc(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Tc(i,t):t:i||kc}return n[e]||kc}}},Mc=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Mc(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Oc):e.slice(t).join(Oc),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Nc=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Ac+r:void 0})(),Pc=e=>{let{theme:t,classGroups:n}=e;return Fc(n,t)},Fc=(e,t)=>{let n=Dc();for(let r in e){let i=e[r];Ic(i,n,r,t)}return n},Ic=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Lc(i,t,n,r)}},Lc=(e,t,n,r)=>{if(typeof e==`string`){Rc(e,t,n);return}if(typeof e==`function`){zc(e,t,n,r);return}Bc(e,t,n,r)},Rc=(e,t,n)=>{let r=e===``?t:Vc(t,e);r.classGroupId=n},zc=(e,t,n,r)=>{if(Hc(e)){Ic(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ec(n,e))},Bc=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ic(o,Vc(t,a),n,r)}},Vc=(e,t)=>{let n=e,r=t.split(Oc),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Dc(),n.nextPart.set(t,i)),n=i}return n},Hc=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Uc=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Wc=`!`,Gc=`:`,Kc=[],qc=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Jc=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Gc){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Wc)?(c=s.slice(0,-1),l=!0):s.startsWith(Wc)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return qc(t,l,c,u)};if(t){let e=t+Gc,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):qc(Kc,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Yc=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Xc=e=>({cache:Uc(e.cacheSize),parseClassName:Jc(e),sortModifiers:Yc(e),postfixLookupClassGroupIds:Zc(e),...jc(e)}),Zc=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Qc=/\s+/,$c=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Qc),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Wc:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},el=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=tl(n))&&(i&&(i+=` `),i+=r);return i},tl=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=tl(e[r]))&&(n&&(n+=` `),n+=t);return n},nl=(e,...t)=>{let n,r,i,a,o=o=>(n=Xc(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=$c(e,n);return i(e,a),a};return a=o,(...e)=>a(el(...e))},rl=[],il=e=>{let t=t=>t[e]||rl;return t.isThemeGetter=!0,t},al=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ol=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sl=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ll=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ul=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pl=e=>sl.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),ml=e=>!!e&&Number.isInteger(Number(e)),hl=e=>e.endsWith(`%`)&&K(e.slice(0,-1)),gl=e=>cl.test(e),_l=()=>!0,vl=e=>ll.test(e)&&!ul.test(e),yl=()=>!1,bl=e=>dl.test(e),xl=e=>fl.test(e),Sl=e=>!q(e)&&!J(e),Cl=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),wl=e=>X(e,Bl,yl),q=e=>al.test(e),Tl=e=>X(e,Vl,vl),El=e=>X(e,Hl,K),Dl=e=>X(e,Wl,_l),Ol=e=>X(e,Ul,yl),kl=e=>X(e,Rl,yl),Al=e=>X(e,zl,xl),jl=e=>X(e,Gl,bl),J=e=>ol.test(e),Ml=e=>Z(e,Vl),Nl=e=>Z(e,Ul),Pl=e=>Z(e,Rl),Fl=e=>Z(e,Bl),Il=e=>Z(e,zl),Ll=e=>Z(e,Gl,!0),Y=e=>Z(e,Wl,!0),X=(e,t,n)=>{let r=al.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Z=(e,t,n=!1)=>{let r=ol.exec(e);return r?r[1]?t(r[1]):n:!1},Rl=e=>e===`position`||e===`percentage`,zl=e=>e===`image`||e===`url`,Bl=e=>e===`length`||e===`size`||e===`bg-size`,Vl=e=>e===`length`,Hl=e=>e===`number`,Ul=e=>e===`family-name`,Wl=e=>e===`number`||e===`weight`,Gl=e=>e===`shadow`,Kl=nl(()=>{let e=il(`color`),t=il(`font`),n=il(`text`),r=il(`font-weight`),i=il(`tracking`),a=il(`leading`),o=il(`breakpoint`),s=il(`container`),c=il(`spacing`),l=il(`radius`),u=il(`shadow`),d=il(`inset-shadow`),f=il(`text-shadow`),p=il(`drop-shadow`),m=il(`blur`),h=il(`perspective`),g=il(`aspect`),_=il(`ease`),v=il(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),J,q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,q,c],T=()=>[pl,`full`,`auto`,...w()],ee=()=>[ml,`none`,`subgrid`,J,q],te=()=>[`auto`,{span:[`full`,ml,J,q]},ml,J,q],E=()=>[ml,`auto`,J,q],ne=()=>[`auto`,`min`,`max`,`fr`,J,q],re=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ie=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],D=()=>[`auto`,...w()],O=()=>[pl,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ae=()=>[pl,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],oe=()=>[pl,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[e,J,q],A=()=>[...b(),Pl,kl,{position:[J,q]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],j=()=>[`auto`,`cover`,`contain`,Fl,wl,{size:[J,q]}],ce=()=>[hl,Ml,Tl],le=()=>[``,`none`,`full`,l,J,q],M=()=>[``,K,Ml,Tl],N=()=>[`solid`,`dashed`,`dotted`,`double`],ue=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[K,hl,Pl,kl],F=()=>[``,`none`,m,J,q],de=()=>[`none`,K,J,q],fe=()=>[`none`,K,J,q],I=()=>[K,J,q],pe=()=>[pl,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[gl],breakpoint:[gl],color:[_l],container:[gl],"drop-shadow":[gl],ease:[`in`,`out`,`in-out`],font:[Sl],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[gl],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[gl],shadow:[gl],spacing:[`px`,K],text:[gl],"text-shadow":[gl],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,pl,q,J,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,J,q]}],"container-named":[Cl],columns:[{columns:[K,q,J,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ml,`auto`,J,q]}],basis:[{basis:[pl,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[K,pl,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,K,J,q]}],shrink:[{shrink:[``,K,J,q]}],order:[{order:[ml,`first`,`last`,`none`,J,q]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...re(),`normal`]}],"justify-items":[{"justify-items":[...ie(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ie()]}],"align-content":[{content:[`normal`,...re()]}],"align-items":[{items:[...ie(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ie(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...ie(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ie()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:O()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...oe()]}],"min-block-size":[{"min-block":[`auto`,...oe()]}],"max-block-size":[{"max-block":[`none`,...oe()]}],w:[{w:[s,`screen`,...O()]}],"min-w":[{"min-w":[s,`screen`,`none`,...O()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...O()]}],h:[{h:[`screen`,`lh`,...O()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...O()]}],"max-h":[{"max-h":[`screen`,`lh`,...O()]}],"font-size":[{text:[`base`,n,Ml,Tl]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Y,Dl]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,hl,q]}],"font-family":[{font:[Nl,Ol,t]}],"font-features":[{"font-features":[q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,J,q]}],"line-clamp":[{"line-clamp":[K,`none`,J,El]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,J,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...N(),`wavy`]}],"text-decoration-thickness":[{decoration:[K,`from-font`,`auto`,J,Tl]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[K,`auto`,J,q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[ml,J,q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,J,q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:j()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ml,J,q],radial:[``,J,q],conic:[ml,J,q]},Il,Al]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-bs":[{"border-bs":M()}],"border-w-be":[{"border-be":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":M()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...N(),`hidden`,`none`]}],"divide-style":[{divide:[...N(),`hidden`,`none`]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...N(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[K,J,q]}],"outline-w":[{outline:[``,K,Ml,Tl]}],"outline-color":[{outline:k()}],shadow:[{shadow:[``,`none`,u,Ll,jl]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ll,jl]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:M()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[K,Tl]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":[`none`,f,Ll,jl]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[K,J,q]}],"mix-blend":[{"mix-blend":[...ue(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[K]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[J,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[K]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,q]}],filter:[{filter:[``,`none`,J,q]}],blur:[{blur:F()}],brightness:[{brightness:[K,J,q]}],contrast:[{contrast:[K,J,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ll,jl]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:[``,K,J,q]}],"hue-rotate":[{"hue-rotate":[K,J,q]}],invert:[{invert:[``,K,J,q]}],saturate:[{saturate:[K,J,q]}],sepia:[{sepia:[``,K,J,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,q]}],"backdrop-blur":[{"backdrop-blur":F()}],"backdrop-brightness":[{"backdrop-brightness":[K,J,q]}],"backdrop-contrast":[{"backdrop-contrast":[K,J,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,K,J,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[K,J,q]}],"backdrop-invert":[{"backdrop-invert":[``,K,J,q]}],"backdrop-opacity":[{"backdrop-opacity":[K,J,q]}],"backdrop-saturate":[{"backdrop-saturate":[K,J,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,K,J,q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,J,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[K,`initial`,J,q]}],ease:[{ease:[`linear`,`initial`,_,J,q]}],delay:[{delay:[K,J,q]}],animate:[{animate:[`none`,v,J,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":[`scale-3d`],skew:[{skew:I()}],"skew-x":[{"skew-x":I()}],"skew-y":[{"skew-y":I()}],transform:[{transform:[J,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],zoom:[{zoom:[ml,J,q]}],accent:[{accent:k()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,J,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,J,q]}],fill:[{fill:[`none`,...k()]}],"stroke-w":[{stroke:[K,Ml,Tl,El]}],stroke:[{stroke:[`none`,...k()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),ql=(...e)=>Kl(xc(e)),Jl=wc(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,outline:`border border-input bg-background hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`}},defaultVariants:{variant:`default`,size:`default`}}),Yl=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,x.jsx)(r?sc:`button`,{className:ql(Jl({variant:t,size:n,className:e})),ref:a,...i}));Yl.displayName=`Button`;var Xl=`Copying to the clipboard is not available in this browser context.`,Zl=e=>{let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),t.setSelectionRange(0,e.length);let n=document.execCommand(`copy`);return t.remove(),n},Ql=async e=>{let t=navigator.clipboard;if(t!==void 0&&typeof t.writeText==`function`)try{await t.writeText(e);return}catch{if(Zl(e))return;throw Error(Xl)}if(!Zl(e))throw Error(Xl)},$l=1500,eu=`Copy failed`,tu=`Copying to the clipboard failed`,nu=({value:e,idleText:t,idleAriaLabel:n,copiedAriaLabel:r,className:i})=>{let[a,o]=(0,y.useState)(`idle`),s=(0,y.useRef)(null);return(0,y.useEffect)(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]),(0,x.jsx)(Yl,{type:`button`,variant:`ghost`,size:`sm`,className:i,"aria-label":a===`copied`?r:a===`failed`?tu:n,onClick:async()=>{try{await Ql(e),o(`copied`)}catch(e){console.error(e),o(`failed`)}s.current!==null&&clearTimeout(s.current),s.current=setTimeout(()=>{o(`idle`),s.current=null},$l)},children:a===`copied`?`Copied`:a===`failed`?eu:t})},ru=({code:e,label:t=`Copy code`})=>(0,x.jsx)(nu,{value:e,idleText:t,idleAriaLabel:t,copiedAriaLabel:`Code copied to clipboard`,className:`console-copy-code-button`}),iu=`https://cdn.jsdelivr.net/npm/mermaid@10.9.6/dist/mermaid.min.js`,au=null,ou=0,su=e=>(e.initialize({startOnLoad:!1,securityLevel:`strict`,theme:`dark`,themeVariables:{background:`#0d1117`,primaryColor:`#161b22`,primaryTextColor:`#e6edf3`,primaryBorderColor:`#30363d`,lineColor:`#8b949e`,fontSize:`14px`}}),e),cu=()=>au===null?window.mermaid===void 0?(au=new Promise((e,t)=>{let n=document.createElement(`script`);n.src=iu,n.async=!0,n.onload=()=>{if(window.mermaid===void 0){t(Error(`mermaid failed to load`));return}e(su(window.mermaid))},n.onerror=()=>t(Error(`mermaid script failed to load`)),document.head.appendChild(n)}),au):(au=Promise.resolve(su(window.mermaid)),au):au,lu=async e=>{let t=await cu();ou+=1;let n=`console-mermaid-${ou}`,{svg:r}=await t.render(n,e);return Za.sanitize(r,{USE_PROFILES:{svg:!0,svgFilters:!0},ADD_TAGS:[`foreignObject`]})},uu=.5,du=e=>Number.isNaN(e)||e<1?1:e>6?6:e,fu=e=>du(du(e)+uu),pu=e=>du(du(e)-uu),mu=e=>du(e)<=1,hu=e=>du(e)>=6,gu=e=>`${Math.round(du(e)*100)}%`,_u=e=>`${du(e)*100}%`,vu=({svg:e,onClose:t})=>{let[n,r]=(0,y.useState)(1),i=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let t=i.current;if(t===null)return;t.innerHTML=e;let n=t.querySelector(`svg`);n!==null&&(n.style.removeProperty(`max-width`),n.style.setProperty(`width`,`100%`),n.style.setProperty(`height`,`auto`))},[e]),(0,y.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t]),(0,x.jsxs)(`div`,{className:`console-mermaid-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Enlarged diagram`,children:[(0,x.jsxs)(`div`,{className:`console-mermaid-modal-bar`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-mermaid-modal-button`,"aria-label":`Zoom out`,disabled:mu(n),onClick:()=>r(pu(n)),children:`−`}),(0,x.jsx)(`span`,{className:`console-mermaid-modal-scale`,children:gu(n)}),(0,x.jsx)(`button`,{type:`button`,className:`console-mermaid-modal-button`,"aria-label":`Zoom in`,disabled:hu(n),onClick:()=>r(fu(n)),children:`+`}),(0,x.jsx)(`button`,{type:`button`,className:`console-mermaid-modal-close`,"aria-label":`Close enlarged diagram`,onClick:t,children:`✕`})]}),(0,x.jsx)(`div`,{className:`console-mermaid-modal-viewport`,children:(0,x.jsx)(`div`,{ref:i,className:`console-mermaid-modal-canvas`,style:{width:_u(n)}})})]})},yu=({code:e})=>{let[t,n]=(0,y.useState)({status:`loading`}),[r,i]=(0,y.useState)(!1),a=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let t=!1;return n({status:`loading`}),lu(e).then(e=>{t||n({status:`ready`,svg:e})}).catch(e=>{t||n({status:`error`,message:e instanceof Error?e.message:String(e)})}),()=>{t=!0}},[e]),(0,y.useEffect)(()=>{let e=a.current;e!==null&&(e.innerHTML=t.status===`ready`?t.svg:``)},[t]),t.status===`loading`?(0,x.jsx)(`div`,{className:`console-mermaid-loading`,children:`Rendering diagram...`}):t.status===`error`?(0,x.jsxs)(`div`,{className:`console-mermaid`,children:[(0,x.jsxs)(`div`,{className:`console-mermaid-error`,children:[`Mermaid render error: `,t.message]}),(0,x.jsx)(`pre`,{className:`console-mermaid-source`,children:(0,x.jsx)(`code`,{children:e})})]}):(0,x.jsxs)(`div`,{className:`console-mermaid`,children:[(0,x.jsx)(`div`,{ref:a,className:`console-mermaid-rendered`}),(0,x.jsx)(`button`,{type:`button`,className:`console-mermaid-enlarge`,onClick:()=>i(!0),children:`Enlarge diagram`}),r&&(0,x.jsx)(vu,{svg:t.svg,onClose:()=>i(!1)})]})},bu=e=>{let t=e.querySelectorAll(`a[href]`),n=[];return t.forEach((e,t)=>{let r=e.getAttribute(`href`)??``;if(bi(r)===null)return;let i=e.textContent??r,a=document.createElement(`span`);a.className=`console-markdown-reference-host`,e.replaceWith(a),n.push({key:`${t}:${r}`,host:a,href:r,fallbackText:i})}),n},xu=e=>{let t=e.querySelectorAll(`pre > code`),n=[];return t.forEach((e,t)=>{let r=e.parentElement;if(r===null)return;let i=e.textContent??``,a=document.createElement(`div`);a.className=`console-markdown-code-block`;let o=document.createElement(`div`);o.className=`console-markdown-code-copy-host`,r.replaceWith(a),a.append(o,r),n.push({key:`code:${t}`,host:o,code:i})}),n},Su=({source:e,buildImageProxyUrl:t,renderReferenceLink:n,repoContext:r})=>{let i=(0,y.useMemo)(()=>{let n=Js(e,r);return t===void 0?n:Di(n,t)},[e,t,r]),a=(0,y.useRef)(null),[o,s]=(0,y.useState)([]),[c,l]=(0,y.useState)([]);return(0,y.useEffect)(()=>{let e=a.current;e!==null&&(e.innerHTML=i,l(xu(e)),s(n===void 0?[]:bu(e)))},[i,n]),(0,x.jsxs)(`div`,{ref:a,className:`console-markdown`,children:[c.map(e=>(0,ee.createPortal)((0,x.jsx)(ru,{code:e.code}),e.host,e.key)),n!==void 0&&o.map(e=>(0,ee.createPortal)(n(e.href,e.fallbackText),e.host,e.key))]})},Cu=({body:e,buildImageProxyUrl:t,renderReferenceLink:n,repoContext:r})=>{let i=(0,y.useMemo)(()=>Qs(e),[e]);return e.trim()===``?(0,x.jsx)(`p`,{className:`console-markdown-empty`,children:`No description provided.`}):(0,x.jsx)(`div`,{className:`console-markdown-view`,children:i.map(e=>e.kind===`mermaid`?(0,x.jsx)(yu,{code:e.code},e.key):(0,x.jsx)(Su,{source:e.source,buildImageProxyUrl:t,renderReferenceLink:n,repoContext:r},e.key))})},wu=({title:e,count:t=null,defaultCollapsed:n=!1,headerAction:r,children:i})=>{let[a,o]=(0,y.useState)(n),s=t===null?e:`${e} (${t})`;return(0,x.jsxs)(`section`,{className:`console-panel`,children:[(0,x.jsxs)(`header`,{className:`console-panel-header`,children:[(0,x.jsxs)(`button`,{type:`button`,className:`console-panel-toggle`,"aria-expanded":!a,onClick:()=>o(e=>!e),children:[(0,x.jsx)(`span`,{className:`console-panel-caret`,children:a?`▸`:`▾`}),(0,x.jsx)(`span`,{className:`console-panel-title`,children:s})]}),r!==void 0&&(0,x.jsx)(`div`,{className:`console-panel-action`,children:r})]}),!a&&(0,x.jsx)(`div`,{className:`console-panel-body`,children:i})]})},Tu=e=>{switch(e){case`added`:return{label:`A`,color:`#3fb950`};case`modified`:return{label:`M`,color:`#d29922`};case`removed`:return{label:`D`,color:`#f85149`};case`renamed`:return{label:`R`,color:`#a371f7`};case`changed`:return{label:`M`,color:`#d29922`};default:return{label:`?`,color:`#8b949e`}}},Eu=()=>({directories:new Map,files:[]}),Du=e=>e.split(`/`).filter(e=>e!==``),Ou=(e,t)=>e.name.localeCompare(t.name),ku=(e,t)=>{let n=[];e.directories.forEach((e,r)=>{let i=t===``?r:`${t}/${r}`;n.push({kind:`directory`,name:r,path:i,children:ku(e,i)})}),n.sort(Ou);let r=e.files.map(e=>({kind:`file`,name:Du(e.path).at(-1)??e.path,path:e.path,file:e}));return r.sort(Ou),[...n,...r]},Au=e=>{let t=Eu();for(let n of e){let e=Du(n.path);if(e.length===0){t.files.push(n);continue}let r=e.slice(0,-1),i=t;for(let e of r){let t=i.directories.get(e);if(t===void 0){let t=Eu();i.directories.set(e,t),i=t;continue}i=t}i.files.push(n)}return ku(t,``)},ju=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/,Mu=e=>{let t=[],n=0,r=0;for(let i of e.split(`
|
|
87
87
|
`)){if(i.startsWith(`@@`)){let e=i.match(ju);e!==null&&(n=Number(e[1]),r=Number(e[2])),t.push({kind:`hunk`,oldLineNumber:null,newLineNumber:null,content:i});continue}if(i.startsWith(`+`)){t.push({kind:`add`,oldLineNumber:null,newLineNumber:r,content:i}),r+=1;continue}if(i.startsWith(`-`)){t.push({kind:`del`,oldLineNumber:n,newLineNumber:null,content:i}),n+=1;continue}t.push({kind:`ctx`,oldLineNumber:n,newLineNumber:r,content:i}),n+=1,r+=1}return t},Nu=[`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.svg`,`.avif`,`.bmp`,`.ico`],Pu=e=>{let t=e.toLowerCase();return Nu.some(e=>t.endsWith(e))},Fu=e=>e.kind===`add`||e.kind===`ctx`?e.newLineNumber===null?null:{line:e.newLineNumber,side:`RIGHT`}:e.kind===`del`?e.oldLineNumber===null?null:{line:e.oldLineNumber,side:`LEFT`}:null,Iu=e=>`${e.kind}:${e.oldLineNumber??`x`}:${e.newLineNumber??`x`}:${e.content}`,Lu=({target:e,onSubmit:t,onClose:n})=>{let[r,i]=(0,y.useState)(``),[a,o]=(0,y.useState)({kind:`idle`}),s=async()=>{let n=r.trim();if(n.length!==0&&a.kind!==`posting`){o({kind:`posting`});try{await t(e.path,e.line,e.side,n),i(``),o({kind:`posted`})}catch(e){o({kind:`error`,message:e instanceof Error?e.message:`failed to post`})}}};return(0,x.jsxs)(`div`,{className:`console-diff-composer`,children:[(0,x.jsxs)(`div`,{className:`console-diff-composer-anchor`,children:[`commenting on line `,e.line,` (`,e.side,`)`]}),a.kind===`posted`?(0,x.jsx)(`p`,{className:`console-diff-composer-posted`,children:`Comment saved.`}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`textarea`,{className:`console-diff-composer-input`,rows:3,placeholder:`Leave a review comment on this line…`,value:r,onChange:e=>i(e.target.value)}),(0,x.jsxs)(`div`,{className:`console-diff-composer-controls`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-diff-composer-submit`,disabled:a.kind===`posting`,onClick:()=>{s()},children:`Comment`}),(0,x.jsx)(`button`,{type:`button`,className:`console-diff-composer-cancel`,onClick:n,children:`Cancel`}),a.kind===`posting`&&(0,x.jsx)(`span`,{className:`console-diff-composer-status`,children:`Posting…`}),a.kind===`error`&&(0,x.jsxs)(`span`,{role:`alert`,className:`console-diff-composer-status console-diff-composer-error`,children:[`Failed: `,a.message]})]})]})]})},Ru=({patch:e,path:t,rawUrl:n,buildImageProxyUrl:r,onAddInlineComment:i})=>{let[a,o]=(0,y.useState)(null);if(e===null||e===``){if(t!==void 0&&n!=null){if(n.startsWith(`data:image/`))return(0,x.jsx)(`div`,{className:`console-file-diff-image`,children:(0,x.jsx)(`img`,{className:`console-file-diff-image-content`,src:n,alt:t})});if(Pu(t)&&r!==void 0)return(0,x.jsx)(`div`,{className:`console-file-diff-image`,children:(0,x.jsx)(`img`,{className:`console-file-diff-image-content`,src:r(n),alt:t})})}return(0,x.jsx)(`p`,{className:`console-file-diff-empty`,children:`(no diff / binary or too large)`})}let s=Mu(e),c=i!==void 0&&t!==void 0&&t.length>0,l=c?4:3;return(0,x.jsx)(`table`,{className:`console-file-diff`,children:(0,x.jsx)(`tbody`,{children:s.map(e=>{let n=Iu(e),r=c?Fu(e):null,s=a!==null&&r!==null&&a.line===r.line&&a.side===r.side;return(0,x.jsxs)(y.Fragment,{children:[(0,x.jsxs)(`tr`,{className:`console-diff-row console-diff-${e.kind}`,children:[c&&(0,x.jsx)(`td`,{className:`console-diff-comment-cell`,children:r!==null&&t!==void 0&&(0,x.jsx)(`button`,{type:`button`,className:`console-diff-comment-button`,"aria-label":`Comment on line ${r.line} (${r.side})`,"aria-expanded":s,onClick:()=>o(s?null:{path:t,line:r.line,side:r.side}),children:`+`})}),(0,x.jsx)(`td`,{className:`console-diff-ln`,children:e.oldLineNumber??``}),(0,x.jsx)(`td`,{className:`console-diff-ln`,children:e.newLineNumber??``}),(0,x.jsx)(`td`,{className:`console-diff-code`,children:e.content})]}),s&&i!==void 0&&a!==null&&(0,x.jsx)(`tr`,{className:`console-diff-composer-row`,children:(0,x.jsx)(`td`,{colSpan:l,children:(0,x.jsx)(Lu,{target:a,onSubmit:i,onClose:()=>o(null)})})})]},n)})})})},zu=e=>({paddingLeft:`${e*16}px`}),Bu=({file:e,depth:t,name:n,buildImageProxyUrl:r,onAddInlineComment:i})=>{let[a,o]=(0,y.useState)(!1),s=Tu(e.status);return(0,x.jsxs)(`li`,{className:`console-file`,children:[(0,x.jsxs)(`button`,{type:`button`,className:`console-file-row`,style:zu(t),"aria-expanded":a,onClick:()=>o(e=>!e),children:[(0,x.jsx)(`span`,{className:`console-file-caret`,children:a?`▾`:`▸`}),(0,x.jsx)(`span`,{className:`console-file-badge`,style:{color:s.color,borderColor:s.color},children:s.label}),(0,x.jsx)(`span`,{className:`console-file-path`,children:n}),(0,x.jsxs)(`span`,{className:`console-file-stat console-file-add`,children:[`+`,e.additions]}),(0,x.jsxs)(`span`,{className:`console-file-stat console-file-del`,children:[`-`,e.deletions]})]}),a&&(0,x.jsx)(Ru,{patch:e.patch,path:e.path,rawUrl:e.rawUrl,buildImageProxyUrl:r,onAddInlineComment:i})]})},Vu=({node:e,depth:t,buildImageProxyUrl:n,onAddInlineComment:r})=>e.kind===`file`?(0,x.jsx)(Bu,{file:e.file,depth:t,name:e.name,buildImageProxyUrl:n,onAddInlineComment:r}):(0,x.jsxs)(`li`,{className:`console-file-tree-dir`,children:[(0,x.jsxs)(`div`,{className:`console-file-tree-dir-name`,style:zu(t),children:[(0,x.jsx)(`span`,{className:`console-file-tree-dir-icon`,"aria-hidden":`true`,children:`📁`}),e.name]}),(0,x.jsx)(`ul`,{className:`console-file-tree-children`,children:e.children.map(e=>(0,x.jsx)(Vu,{node:e,depth:t+1,buildImageProxyUrl:n,onAddInlineComment:r},e.path))})]}),Hu=({files:e,isLoading:t,error:n,buildImageProxyUrl:r,onAddInlineComment:i})=>{if(n!==null)return(0,x.jsx)(`p`,{className:`console-files-notloaded`,children:`Not loaded.`});if(t)return(0,x.jsx)(`p`,{className:`console-files-loading`,children:`Loading changed files...`});if(e.length===0)return(0,x.jsx)(`p`,{className:`console-files-empty`,children:`No changed files.`});let a=Au(e);return(0,x.jsx)(`ul`,{className:`console-files console-file-tree`,children:a.map(e=>(0,x.jsx)(Vu,{node:e,depth:0,buildImageProxyUrl:r,onAddInlineComment:i},e.path))})},Uu=e=>e.split(`
|
|
88
88
|
`).find(e=>e.trim()!==``)??``,Wu=e=>`${e.author}:${e.createdAt}:${e.body}`,Gu=({comment:e,buildImageProxyUrl:t,renderReferenceLink:n,repoContext:r})=>{let i=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let e=i.current;if(!e)return;let t=e=>e.stopPropagation();return e.addEventListener(`click`,t),()=>e.removeEventListener(`click`,t)},[]),(0,x.jsx)(`div`,{ref:i,className:`console-comment-body-expanded`,children:(0,x.jsx)(Cu,{body:e.body,buildImageProxyUrl:t,renderReferenceLink:n,repoContext:r})})},Ku=({comments:e,isLoading:t,error:n,now:r,workflowImprovementIssueUrl:i=null,buildImageProxyUrl:a,renderReferenceLink:o,repoContext:s,persistenceKey:c=null})=>{let[l,u]=(0,y.useState)(!1),[d,f]=(0,y.useState)(()=>c==null?new Set:Or(c)),p=e.length>0?Wu(e[e.length-1]):null;(0,y.useEffect)(()=>{p!==null&&f(e=>new Set([...e,p]))},[p]),(0,y.useEffect)(()=>{c!=null&&kr(c,d)},[c,d]);let m=e=>{f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};if(n!==null)return(0,x.jsx)(`p`,{className:`console-comment-notloaded`,children:`Not loaded.`});if(t)return(0,x.jsx)(`p`,{className:`console-comment-loading`,children:`Loading comments...`});if(e.length===0)return(0,x.jsx)(`p`,{className:`console-comment-empty`,children:`No comments.`});let h=!l&&e.length>1;return(0,x.jsxs)(`div`,{className:`console-comment-list`,children:[h&&(0,x.jsxs)(`button`,{type:`button`,className:`console-comment-show-all`,onClick:()=>{u(!0),f(t=>new Set([...t,...e.map(Wu)]))},children:[`Show all `,e.length]}),e.map(e=>{let t=Wu(e),n=d.has(t);return(0,x.jsxs)(`article`,{className:`console-comment${n?` is-expanded`:h?` console-comment--expandable`:``}`,children:[(0,x.jsxs)(`button`,{type:`button`,className:`console-comment-toggle`,onClick:()=>m(t),"aria-expanded":n,children:[(0,x.jsx)(`span`,{className:`console-comment-author`,children:e.author}),(0,x.jsx)(`span`,{className:`console-comment-time`,children:ie(e.createdAt,r)}),!n&&(0,x.jsx)(`span`,{className:`console-comment-body-preview`,children:Uu(e.body)})]}),i!==null&&e.url!==null&&(0,x.jsx)(`a`,{href:Ci(i,e.url),target:`_blank`,rel:`noreferrer`,className:`console-comment-report-link`,"aria-label":`Create workflow incident report for this comment`,children:`⚡`}),n&&(0,x.jsx)(Gu,{comment:e,buildImageProxyUrl:a,renderReferenceLink:o,repoContext:s})]},t)})]})},qu=e=>e.slice(0,7),Ju=e=>e.split(`
|
|
89
|
-
`)[0],Yu=({commits:e,isLoading:t,error:n,now:r})=>n===null?t?(0,x.jsx)(`p`,{className:`console-commits-loading`,children:`Loading commits...`}):e.length===0?(0,x.jsx)(`p`,{className:`console-commits-empty`,children:`No commits.`}):(0,x.jsx)(`ul`,{className:`console-commits`,children:e.map(e=>(0,x.jsxs)(`li`,{className:`console-commit`,children:[(0,x.jsx)(`span`,{className:`console-commit-message`,children:Ju(e.message)}),(0,x.jsx)(`span`,{className:`console-commit-sha`,children:qu(e.sha)}),(0,x.jsx)(`span`,{className:`console-commit-author`,children:e.author}),(0,x.jsx)(`span`,{className:`console-commit-time`,children:ie(e.authoredAt,r)})]},e.sha))}):(0,x.jsx)(`p`,{className:`console-commits-notloaded`,children:`Not loaded.`}),Xu=({url:e,label:t=`Copy URL`})=>(0,x.jsx)(nu,{value:e,idleText:`Copy URL`,idleAriaLabel:t,copiedAriaLabel:`URL copied to clipboard`,className:`console-copy-url-button`}),Zu=e=>{let t=new Map;for(let n of e){let e=t.get(n.message);if(e===void 0){t.set(n.message,[n.section]);continue}e.push(n.section)}return Array.from(t,([e,t])=>({message:e,sections:t}))},Qu=e=>e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`,$u=({failures:e})=>e.length===0?null:(0,x.jsx)(`div`,{role:`alert`,className:`console-detail-fetch-error`,children:Zu(e).map(e=>(0,x.jsxs)(`p`,{className:`console-detail-fetch-error-line`,children:[`Failed to load `,Qu(e.sections),`:`,` `,e.message]},e.message))}),ed={MERGEABLE:{color:`GREEN`,label:`No conflict`,title:`This pull request has no merge conflicts`,modifier:`console-detail-mergeable-chip-ok`},CONFLICTING:{color:`RED`,label:`Conflict`,title:`This pull request has merge conflicts`,modifier:`console-detail-mergeable-chip-conflict`},UNKNOWN:{color:`GRAY`,label:`Checking merge status`,title:`GitHub has not finished computing the merge status yet`,modifier:`console-detail-mergeable-chip-unknown`}},td=({mergeableStatus:e})=>{let t=ed[e],n=j(t.color);return(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-mergeable-chip ${t.modifier}`,style:{color:n.fg,borderColor:n.border,backgroundColor:n.bg},title:t.title,children:t.label})},nd=e=>{let t=j(e);return{color:t.fg,borderColor:t.border,backgroundColor:t.bg}},rd=({isPassedAllCiJob:e,isCiStateSuccess:t,isBranchOutOfDate:n,missingRequiredCheckNames:r})=>{let i=e&&t,a=i?`GREEN`:`RED`,o=i?`CI passing`:`CI failing`,s=!i&&r.length>0?`missing: ${r.join(`, `)}`:null;return(0,x.jsxs)(`span`,{className:`console-detail-pr-status`,children:[(0,x.jsxs)(`span`,{className:`console-detail-status-chip console-detail-ci-chip`,style:nd(a),title:s??o,children:[o,s!==null&&(0,x.jsxs)(`span`,{className:`console-detail-ci-missing`,children:[` `,`(`,s,`)`]})]}),n&&(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-outofdate-chip`,style:nd(`YELLOW`),title:`This branch is out of date with the base branch`,children:`Out of date`})]})},id=({pullRequest:e,body:t,bodyIsLoading:n,files:r,filesAreLoading:i,filesError:a,commits:o,commitsAreLoading:s,commitsError:c,now:l,buildImageProxyUrl:u,renderReferenceLink:d,onAddInlineComment:f})=>{let p=e.summary,m=bi(e.url),h=m===null?void 0:{owner:m.owner,repo:m.repo},g=i||a!==null?null:r.length,_=s||c!==null?null:o.length;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`console-pr-header`,children:[(0,x.jsx)(`a`,{href:e.url,className:`console-pr-section-title`,target:`_blank`,rel:`noopener noreferrer`,children:p?.title??e.url}),e.isDraft&&(0,x.jsx)(`span`,{className:`console-pr-section-state`,children:`draft`}),(0,x.jsx)(td,{mergeableStatus:e.mergeableStatus}),(0,x.jsx)(rd,{isPassedAllCiJob:e.isPassedAllCiJob,isCiStateSuccess:e.isCiStateSuccess,isBranchOutOfDate:e.isBranchOutOfDate,missingRequiredCheckNames:e.missingRequiredCheckNames}),(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),(0,x.jsx)(Xu,{url:e.url,label:`Copy PR URL`}),(0,x.jsxs)(`div`,{className:`console-pr-statbar`,children:[m!==null&&(0,x.jsxs)(`span`,{className:`console-pr-repo`,children:[m.owner,`/`,m.repo]}),e.branchName!==null&&(0,x.jsx)(`span`,{className:`console-pr-branch`,children:e.branchName}),p!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`span`,{className:`console-pr-add`,children:[`+`,p.additions]}),(0,x.jsxs)(`span`,{className:`console-pr-del`,children:[`-`,p.deletions]}),(0,x.jsxs)(`span`,{className:`console-pr-files-count`,children:[p.changedFiles,` files`]})]})]})]}),(0,x.jsx)(wu,{title:`Description`,children:n?(0,x.jsx)(`p`,{className:`console-pr-body-loading`,children:`Loading description...`}):(0,x.jsx)(Cu,{body:p?.body??t,buildImageProxyUrl:u,renderReferenceLink:d,repoContext:h})}),(0,x.jsx)(wu,{title:`Changed files`,count:g,children:(0,x.jsx)(Hu,{files:r,isLoading:i,error:a,buildImageProxyUrl:u,onAddInlineComment:f})}),(0,x.jsx)(wu,{title:`Commits`,count:_,defaultCollapsed:!0,children:(0,x.jsx)(Yu,{commits:o,isLoading:s,error:c,now:l})})]})},ad=({item:e,storyName:t,storyColorEnum:n,overlayStatus:r,statusOptions:i,state:a,body:o,bodyIsLoading:s,bodyError:c,comments:l,commentsAreLoading:u,commentsError:d,files:f,filesAreLoading:p,filesError:m,commits:h,commitsAreLoading:g,commitsError:_,stateError:v,pullRequestStatus:y,pullRequestStatusError:b,relatedPullRequests:S,relatedPullRequestsError:C,now:w,commentComposer:T,operationBar:ee,buildImageProxyUrl:te,renderReferenceLink:E,onAddInlineComment:ne,workflowImprovementIssueUrl:re=null})=>{let D=a?.state??`open`,ae=a?.merged??!1,oe=!e.isPr&&D===`closed`?`Closed`:null,k=xi(e.nameWithOwner)??void 0,A=j(n),se=r===null?e.status===null?null:{name:e.status,color:i.find(t=>t.name===e.status)?.color??`GRAY`}:r,ce=se===null?null:j(se.color),le=p||m!==null?null:f.length,M=u||d!==null?null:l.length,N=g||_!==null?null:h.length,ue=!u&&d===null&&l.length>0,P=e=>{let t=bi(e);return t===null?e:`PR #${t.number}`},F=[{section:`item state`,message:v},{section:`pull request status`,message:e.isPr?b:null},{section:`description`,message:c},{section:`comments`,message:d},{section:`changed files`,message:e.isPr?m:null},{section:`commits`,message:e.isPr?_:null},{section:`related pull requests`,message:e.isPr?null:C},...S.flatMap(e=>[{section:`changed files of ${P(e.pullRequest.url)}`,message:e.filesError},{section:`commits of ${P(e.pullRequest.url)}`,message:e.commitsError}])].flatMap(e=>e.message===null?[]:[{section:e.section,message:e.message}]),de=e.isPr&&y?.found?[{url:e.url,mergeableStatus:y.mergeableStatus}]:[];return(0,x.jsxs)(`article`,{className:`console-detail`,children:[(0,x.jsxs)(`div`,{className:`console-detail-header`,children:[(0,x.jsxs)(`h2`,{className:`console-detail-title`,children:[(0,x.jsx)(we,{isPr:e.isPr,state:D,merged:ae,isDraft:!1,stateReason:``}),(0,x.jsx)(`span`,{className:`console-detail-title-text`,children:e.title}),(0,x.jsx)(`span`,{className:`console-detail-number`,children:e.isPr?`PR #${e.number}`:`#${e.number}`})]}),(0,x.jsxs)(`div`,{className:`console-detail-topline`,children:[se!==null&&ce!==null&&(0,x.jsx)(`span`,{className:`console-detail-status-chip`,style:{color:ce.fg,borderColor:ce.border,backgroundColor:ce.bg},children:se.name}),e.agent!==null&&e.agent!==``&&(0,x.jsx)(`span`,{className:`console-detail-agent-chip`,children:e.agent}),t!==null&&(0,x.jsxs)(`span`,{className:`console-storytag`,children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:A.dot}}),t]}),e.isPr&&y?.found&&(0,x.jsx)(rd,{isPassedAllCiJob:y.isPassedAllCiJob,isCiStateSuccess:y.isCiStateSuccess,isBranchOutOfDate:y.isBranchOutOfDate,missingRequiredCheckNames:y.missingRequiredCheckNames}),!e.isPr&&S.map(e=>(0,x.jsxs)(`span`,{className:`console-related-pr-group`,children:[S.length>1&&(0,x.jsx)(`span`,{className:`console-related-pr-label`,children:P(e.pullRequest.url)}),(0,x.jsx)(rd,{isPassedAllCiJob:e.pullRequest.isPassedAllCiJob,isCiStateSuccess:e.pullRequest.isCiStateSuccess,isBranchOutOfDate:e.pullRequest.isBranchOutOfDate,missingRequiredCheckNames:e.pullRequest.missingRequiredCheckNames}),(0,x.jsx)(td,{mergeableStatus:e.pullRequest.mergeableStatus})]},e.pullRequest.url)),de.map(e=>(0,x.jsx)(td,{mergeableStatus:e.mergeableStatus},e.url)),oe!==null&&(0,x.jsx)(`span`,{className:`console-detail-closed-label`,children:oe})]}),(0,x.jsx)($u,{failures:F}),(0,x.jsxs)(`div`,{className:`console-detail-subbar`,children:[(0,x.jsxs)(`a`,{href:e.url,className:`console-detail-link`,target:`_blank`,rel:`noopener noreferrer`,children:[`#`,e.number]}),(0,x.jsx)(`span`,{className:`console-detail-repo`,children:e.repo}),(0,x.jsxs)(`span`,{className:`console-detail-createdat`,title:O(e.createdAt),children:[`opened `,ie(e.createdAt,w)]}),(0,x.jsx)(Xu,{url:e.url}),re!==null&&(0,x.jsx)(`a`,{href:Ci(re,e.url),target:`_blank`,rel:`noreferrer`,className:`console-detail-report-link`,"aria-label":`Create workflow incident report for this task`,children:`⚡`}),e.labels.map(e=>(0,x.jsx)(`span`,{className:`console-label-chip`,children:e},e))]})]}),(0,x.jsxs)(`div`,{className:`console-detail-body`,children:[(0,x.jsx)(wu,{title:`Description`,defaultCollapsed:ue,headerAction:(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),children:c===null?s?(0,x.jsx)(`p`,{className:`console-detail-body-loading`,children:`Loading description...`}):(0,x.jsx)(Cu,{body:o,buildImageProxyUrl:te,renderReferenceLink:E,repoContext:k}):(0,x.jsx)(`p`,{className:`console-detail-body-notloaded`,children:`Not loaded.`})},ue?`desc-collapsed`:`desc-open`),e.isPr&&(0,x.jsx)(wu,{title:`Changed files`,count:le,children:(0,x.jsx)(Hu,{files:f,isLoading:p,error:m,onAddInlineComment:ne})}),(0,x.jsx)(wu,{title:`Comments`,count:M,children:(0,x.jsx)(Ku,{comments:l,isLoading:u,error:d,now:w,workflowImprovementIssueUrl:re,buildImageProxyUrl:te,renderReferenceLink:E,repoContext:k,persistenceKey:e.url})}),e.isPr&&(0,x.jsx)(wu,{title:`Commits`,count:N,defaultCollapsed:!0,children:(0,x.jsx)(Yu,{commits:h,isLoading:g,error:_,now:w})}),!e.isPr&&S.map(e=>(0,x.jsx)(id,{pullRequest:e.pullRequest,body:e.pullRequest.summary?.body??``,bodyIsLoading:!1,files:e.files,filesAreLoading:e.filesAreLoading,filesError:e.filesError,commits:e.commits,commitsAreLoading:e.commitsAreLoading,commitsError:e.commitsError,now:w,buildImageProxyUrl:te,renderReferenceLink:E,onAddInlineComment:ne},e.pullRequest.url))]}),(0,x.jsxs)(`div`,{className:`console-detail-dock`,children:[(0,x.jsx)(`div`,{className:`console-detail-dock-composer`,children:T}),(0,x.jsx)(`div`,{className:`console-actionbar`,children:ee})]})]})},od=({className:e,ariaLabel:t,placeholder:n,currentOption:r,options:i,onSelect:a})=>{let o=(0,y.useRef)({ready:!1,currentOptionId:r?.id??null});return(0,y.useLayoutEffect)(()=>{o.current.ready=!0,o.current.currentOptionId=r?.id??null}),(0,x.jsxs)(`select`,{className:e,defaultValue:r?.id??``,onChange:e=>{if(!o.current.ready||e.target.value===(o.current.currentOptionId??``))return;let t=i.find(t=>t.id===e.target.value);t!==void 0&&a(t)},"aria-label":t,children:[(0,x.jsx)(`option`,{value:``,children:n}),i.map(e=>(0,x.jsx)(`option`,{value:e.id,children:e.name},e.id))]})},sd=({agentOptions:e,currentAgentName:t,onSetAgent:n})=>{if(e.length===0)return null;let r=t===null?null:e.find(e=>e.name===t)??null;return(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(od,{className:`console-agent-select`,ariaLabel:`Set agent`,placeholder:`— agent —`,currentOption:r,options:e,onSelect:n},r?.id??`none`)})},cd=({onClose:e})=>(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close_not_planned`),children:`Close as not planned`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close`),children:`Close`})]}),ld=({onDeleteAllComments:e,onDeleteStory:t,storyNameForDeletion:n})=>{let[r,i]=(0,y.useState)(!1),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)(null),d=()=>{e(),i(!1)},f=()=>{o(!0),u(null)},p=async()=>{if(t){c(!0),u(null);try{await t()}catch(e){u(e instanceof Error?e.message:String(e)),c(!1)}}};return(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>i(e=>!e),children:`⚠`}),r&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:d,children:`Delete All Comments`}),t!=null&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:f,disabled:a,children:`Delete Story`})]}),a&&(0,x.jsxs)(`div`,{className:`console-story-delete-confirm`,role:`dialog`,"aria-modal":`true`,"aria-label":`Confirm story deletion`,children:[(0,x.jsxs)(`p`,{className:`console-story-delete-confirm-message`,children:[`Delete story option "`,n,`" from the GitHub custom field? Open tasks assigned to this story will be closed.`]}),l!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:l}),(0,x.jsxs)(`div`,{className:`console-story-delete-confirm-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>void p(),disabled:s,children:s?`Deleting…`:`Delete`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{o(!1),u(null)},disabled:s,children:`Cancel`})]})]})]})},ud=({isManualTriage:e,onSetNextActionDate:t})=>(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1hour`),children:`+1 hour`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_3hours`),children:`+3 hours`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_6hours`),children:`+6 hours`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1day`),children:`+1 day`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_2days`),children:`+2 days`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_3days`),children:`+3 days`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_5days`),children:`+5 days`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1week`),children:e?`+1 week and skip`:`+1 week`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1month`),children:`+1 month`})]}),dd=[{action:`unnecessary`,label:`Unnecessary`,variant:`unneeded`},{action:`totally_wrong`,label:`Totally wrong`,variant:`wrong`},{action:`request_changes`,label:`Reject`,variant:`reject`},{action:`approve_and_merge`,label:`Approve & Merge`,variant:`approve`}],fd=`Reject needs an inline comment on the diff.`,pd=({onReview:e,rejectEnabled:t})=>(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-review`,children:[!t&&(0,x.jsx)(`p`,{className:`console-op-requirement`,children:fd}),dd.map(n=>{let r=n.action===`request_changes`&&!t;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-${n.variant}`,disabled:r,onClick:()=>e(n.action),children:n.label},n.action)})]}),md=({onSetDependedIssueUrl:e})=>{let[t,n]=(0,y.useState)(!1),[r,i]=(0,y.useState)(``),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null);return(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-rare-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{n(e=>!e),c(null)},title:`Rare actions`,children:`⋯`}),t&&e!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`input`,{type:`url`,className:`console-settings-modal-input`,placeholder:`Depended issue URL`,value:r,onChange:e=>i(e.target.value),disabled:a}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:async()=>{if(e!==null&&r.trim()!==``){o(!0),c(null);try{await e(r.trim()),i(``),n(!1)}catch(e){c(e instanceof Error?e.message:`Failed to set depended issue URL`)}finally{o(!1)}}},disabled:a||r.trim()===``,children:a?`...`:`Set Depended Issue`})]}),s!==null&&(0,x.jsx)(`p`,{className:`console-settings-modal-error`,children:s})]})},hd=(e,t)=>{let n=t.toLowerCase();return e.find(e=>e.name.toLowerCase()===n)??null},gd=({statusOptions:e,onSetStatus:t,onSetInTmuxByHuman:n})=>{let r=ye.map(t=>({name:t,option:hd(e,t)})).filter(e=>e.option!==null);return r.length===0?null:(0,x.jsx)(`div`,{className:`console-op-group`,children:r.map(({name:e,option:r})=>{let i=j(r.color),a=e===_e;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,style:{color:i.fg,borderColor:i.border,backgroundColor:i.bg},onClick:()=>a?n(r):t(r),children:r.name},r.id)})})},_d=({storyOptions:e,currentStoryName:t,onSetStory:n})=>{if(e.length===0)return null;let r=t===null?null:e.find(e=>e.name===t)??null;return(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(od,{className:`console-story-select`,ariaLabel:`Set story`,placeholder:`— story —`,currentOption:r,options:e,onSelect:n},r?.id??`none`)})},vd=({tab:e,hasPullRequest:t,rejectEnabled:n,statusOptions:r,storyOptions:i,currentStoryName:a,agentOptions:o,currentAgentName:s,handlers:c,storyNameForDeletion:l})=>{let[u,d]=(0,y.useState)(!1);return(0,x.jsxs)(`div`,{className:`console-operation-bar`,children:[t&&(0,x.jsx)(pd,{onReview:c.onReview,rejectEnabled:n}),(0,x.jsx)(ud,{isManualTriage:be(e),onSetNextActionDate:c.onSetNextActionDate}),(0,x.jsx)(gd,{statusOptions:r,onSetStatus:c.onSetStatus,onSetInTmuxByHuman:c.onSetInTmuxByHuman}),u&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(_d,{storyOptions:i,currentStoryName:a,onSetStory:c.onSetStory}),(0,x.jsx)(sd,{agentOptions:o,currentAgentName:s,onSetAgent:c.onSetAgent})]}),(0,x.jsxs)(`div`,{className:`console-op-group-bottom-row`,children:[(0,x.jsxs)(`div`,{className:`console-op-group-left-pair`,children:[(i.length>0||o.length>0)&&(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>d(e=>!e),title:`Change agent or story`,children:`⚙`})}),(0,x.jsx)(md,{onSetDependedIssueUrl:c.onSetDependedIssueUrl}),(0,x.jsx)(ld,{onDeleteAllComments:c.onDeleteAllComments,onDeleteStory:c.onDeleteStory,storyNameForDeletion:l})]}),(0,x.jsx)(cd,{onClose:c.onClose})]})]})},yd=(e,t,n,r)=>{let i=t===null?void 0:e.peek(t),[a,o]=(0,y.useState)(i??r),[s,c]=(0,y.useState)(t!==null&&i===void 0),[l,u]=(0,y.useState)(null);return(0,y.useEffect)(()=>{if(t===null||n===null)return;let r=e.peek(t);if(r!==void 0){o(r),c(!1),u(null);return}let i=!1;return c(!0),u(null),e.load(t,n).then(e=>{i||(o(e),c(!1))}).catch(e=>{i||(u(e instanceof Error?e.message:String(e)),c(!1))}),()=>{i=!0}},[e,t,n]),{data:a,isLoading:s,error:l}},Q=[],bd=[],xd=[],Sd=[],Cd={state:`open`,merged:!1,isPullRequest:!1,title:``},wd={found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]},Td=(e,t,n)=>{let r=t===null?null:`${t.repo}#${t.number}`,i=t===null?null:t.url,a=t?.isPr??!1,o=yd(e.body,r,i,``),s=yd(e.state,r,i,Cd),c=yd(e.comments,r,i,Q),l=yd(e.files,a?r:null,a?i:null,bd),u=yd(e.commits,a?r:null,a?i:null,xd),d=yd(e.prStatus,a?r:null,a?i:null,wd),f=!a&&((t?.relatedOpenPullRequestUrls.length??0)>0||n===`prs`),p=yd(e.relatedPrs,f?r:null,f?i:null,Sd),[m,h]=(0,y.useState)([]);return(0,y.useEffect)(()=>{if(a||p.data.length===0){h([]);return}let t=!1,n=p.data.map(e=>({pullRequest:e,files:bd,filesAreLoading:!0,filesError:null,commits:xd,commitsAreLoading:!0,commitsError:null}));h(n);let r=(e,n)=>{t||h(t=>t.map(t=>t.pullRequest.url===e?{...t,...n}:t))};for(let t of p.data){let n=t.url;e.files.load(n,t.url).then(e=>r(t.url,{files:e,filesAreLoading:!1})).catch(e=>r(t.url,{filesAreLoading:!1,filesError:e instanceof Error?e.message:String(e)})),e.commits.load(n,t.url).then(e=>r(t.url,{commits:e,commitsAreLoading:!1})).catch(e=>r(t.url,{commitsAreLoading:!1,commitsError:e instanceof Error?e.message:String(e)}))}return()=>{t=!0}},[e,a,p.data]),{state:s.data,body:o.data,bodyIsLoading:o.isLoading,bodyError:o.error,comments:c.data,commentsAreLoading:c.isLoading,commentsError:c.error,files:l.data,filesAreLoading:l.isLoading,filesError:l.error,commits:u.data,commitsAreLoading:u.isLoading,commitsError:u.error,stateError:s.error,pullRequestStatus:a?d.data:null,pullRequestStatusError:a?d.error:null,relatedPullRequests:m,relatedPullRequestsError:a?null:p.error}},Ed=e=>JSON.stringify([e.author,e.createdAt,e.body]),Dd=(e,t)=>{let n=new Set(e.map(Ed));return[...e,...t.filter(e=>!n.has(Ed(e)))]},Od=({href:e,fallbackText:t,state:n})=>{if(n===null||n.title.trim()===``)return(0,x.jsx)(`a`,{className:`console-markdown-reference console-markdown-reference-plain`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t});let r=bi(e);return(0,x.jsxs)(`a`,{className:`console-markdown-reference`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:[(0,x.jsx)(we,{...Si(n)}),(0,x.jsx)(`span`,{className:`console-markdown-reference-title`,children:n.title}),r!==null&&(0,x.jsxs)(`span`,{className:`console-markdown-reference-number`,children:[`#`,r.number]})]})},kd=(e,t)=>{let[n,r]=(0,y.useState)(()=>e.peek(t)??null);return(0,y.useEffect)(()=>{let n=e.peek(t);if(n!==void 0){r(n);return}let i=!1;return r(null),e.load(t,t).then(e=>{i||r(e)}).catch(()=>{i||r(null)}),()=>{i=!0}},[e,t]),n},Ad=({cache:e,href:t,fallbackText:n})=>{let r=kd(e,t);return(0,x.jsx)(Od,{href:t,fallbackText:n,state:r})},jd=e=>({itemUrl:e.url,projectItemId:e.projectItemId,itemNumber:e.number,repo:e.repo,isPr:e.isPr}),Md=(e,t,n,r,i)=>({...jd(t),apiPath:dr,requestBody:mr(e,t,n,r,i)}),$=(e,t,n,r)=>({...jd(t),apiPath:fr,requestBody:hr(e,t,n,r)}),Nd=(e,t)=>({...jd(t),apiPath:pr,requestBody:gr(e,t)}),Pd=({tab:e,item:t,caches:n,operations:r,pjcode:i,statusOptions:a,storyOptions:o,agentOptions:s,storyColors:c,storyName:l,overlayStatus:u,now:d,initialCommentDraft:f,onCommentDraftChange:p,onQueueAction:m,onDeleteStory:h,storyNameForDeletion:g,workflowImprovementIssueUrl:_})=>{let v=Td(n,t,e),b=(0,y.useCallback)(e=>Ei(e,t.url),[t.url]),S=(0,y.useCallback)((e,t)=>(0,x.jsx)(Ad,{cache:n.state,href:e,fallbackText:t}),[n.state]),C=t.isPr||t.relatedOpenPullRequestUrls.length>0||v.relatedPullRequests.length>0,[w,T]=(0,y.useState)([]),ee=(0,y.useCallback)(async(e,t,n,r)=>{T(i=>[...i,{path:e,line:t,side:n,body:r}])},[]),[te,E]=(0,y.useState)([]),ne=(0,y.useCallback)(async e=>{let n=await r.addComment(t,e);return E(e=>[...e,n]),n},[t,r]),re={onReview:e=>{let n=t.isPr?t.url:v.relatedPullRequests[0]?.pullRequest.url??t.relatedOpenPullRequestUrls[0]??t.url,a=e===`request_changes`?w:[];m({kind:{type:`review`,action:e},item:t,commit:()=>r.reviewPullRequest(t,n,e,a),offline:i==null?void 0:Md(i,t,n,e,a)})},onSetNextActionDate:e=>{m({kind:{type:`next_action_date`,action:e},item:t,commit:()=>r.setNextActionDate(t,e),offline:i==null?void 0:$(i,t,e)})},onSetStory:e=>{m({kind:{type:`set_story`,optionName:e.name},item:t,commit:()=>r.setStory(t,e),offline:i==null?void 0:$(i,t,`set_story`,{storyOptionId:e.id})})},onSetAgent:e=>{m({kind:{type:`set_agent`,optionName:e.name},item:t,commit:()=>r.setAgent(t,e),offline:i==null?void 0:$(i,t,`set_agent`,{agentOptionId:e.id})})},onSetStatus:e=>{m({kind:{type:`set_status`,optionName:e.name},item:t,commit:()=>r.setStatus(t,e),offline:i==null?void 0:$(i,t,`set_status`,{statusName:e.name})})},onSetInTmuxByHuman:e=>{m({kind:{type:`set_in_tmux_by_human`,optionName:e.name},item:t,commit:()=>r.setInTmuxByHuman(t,e),offline:i==null?void 0:Nd(i,t)})},onClose:e=>{m({kind:{type:`close`,action:e},item:t,commit:()=>r.closeIssue(t,e),offline:i==null?void 0:$(i,t,e)})},onOkAndAwaitingWorkspace:e=>{m({kind:{type:`ok_and_awaiting_workspace`},item:t,commit:()=>r.okAndMoveToAwaitingWorkspace(t,e)})},onDeleteAllComments:()=>{m({kind:{type:`delete_all_comments`},item:t,commit:()=>r.deleteAllComments(t)})},onDeleteStory:h??null,onSetDependedIssueUrl:i==null?null:async e=>{await r.setDependedIssueUrl(t,e)}},ie=a.find(e=>e.name===`Awaiting Workspace`)??null,D=ie===null?void 0:async e=>(p?.(``),re.onSetStatus(ie),ne(e)),O=l??(t.story.trim()===``?null:t.story),ae=O===null?null:F(c,O);return(0,x.jsx)(ad,{item:t,storyName:O,storyColorEnum:ae,overlayStatus:u,statusOptions:a,state:v.state,stateError:v.stateError,body:v.body,bodyIsLoading:v.bodyIsLoading,bodyError:v.bodyError,comments:Dd(v.comments,te),commentsAreLoading:v.commentsAreLoading,commentsError:v.commentsError,files:v.files,filesAreLoading:v.filesAreLoading,filesError:v.filesError,commits:v.commits,commitsAreLoading:v.commitsAreLoading,commitsError:v.commitsError,pullRequestStatus:v.pullRequestStatus,pullRequestStatusError:v.pullRequestStatusError,relatedPullRequests:v.relatedPullRequests,relatedPullRequestsError:v.relatedPullRequestsError,now:d,buildImageProxyUrl:b,renderReferenceLink:S,onAddInlineComment:ee,workflowImprovementIssueUrl:_,commentComposer:(0,x.jsx)(vi,{initiallyOpen:!0,initialDraft:f,onSubmit:ne,onDraftChange:p,onOkAndAwaitingWorkspace:ie===null?void 0:()=>re.onOkAndAwaitingWorkspace(ie),onSubmitAndMoveToAwaitingWorkspace:D,onUploadFile:e=>r.uploadAttachment(t,e)}),operationBar:(0,x.jsx)(vd,{tab:e,item:t,hasPullRequest:C,rejectEnabled:w.length>0,statusOptions:a,storyOptions:o,currentStoryName:O,agentOptions:s,currentAgentName:t.agent,handlers:re,storyNameForDeletion:g})})},Fd=()=>{let e={};for(let t of ae)e[t.name]=0;return e},Id=`console`,Ld=()=>{let e=Tr(),t=Yn(),n=vt(),r=n.status===`on`?n.snapshot:null,{snapshots:i,isLoading:a,error:o,refreshSingleTab:s}=ci(e,r),{timerMode:c,projectMinutes:l,isOpen:u,draftTimerMode:d,draftProjectMinutes:f,openSettings:p,closeSettings:m,saveSettings:h,toggleDraftTimerMode:g,changeDraftMinutes:_}=ui(),{pjcodes:v,projectUrls:b,workflowImprovementIssueUrl:C,fleetTaskCreateUrl:w,isLoading:ee}=Er(),{isTimerExpired:te}=Pr(e),E=Cr(e??Id),ne=Nr(v),re=(0,y.useMemo)(()=>{let e=Fd();for(let t of ae){let n=i[t.name];n!==null&&(t.name===`stories`?e[t.name]=n.stories.filter(e=>e.color!==`GRAY`).length:e[t.name]=or(n.items,cr(E.overlay,n.generatedAt),t.name))}return e},[i,E.overlay]);Ln(c,re.prs,e,v,l);let ie=nr(e,re),{activeTab:D,selectedItemKey:O,openItem:oe,closeItem:k}=ie,se=li(ie.selectTab),j=jr((0,y.useCallback)(e=>An(`/projects/${e}`),[])),ce=(0,y.useRef)(new Map),le=(0,y.useCallback)(e=>{O!==null&&(e?ce.current.set(O,e):ce.current.delete(O))},[O]),N=Vn(r),P=yr(e,D,E,N,(0,y.useCallback)(()=>s(`queued`),[s])),F=kn(),[fe,pe]=(0,y.useState)(()=>Date.now());(0,y.useEffect)(()=>{let e=setInterval(()=>{pe(Date.now())},1e3);return()=>{clearInterval(e)}},[]);let[me,he]=(0,y.useState)(()=>navigator.onLine);(0,y.useEffect)(()=>{let e=()=>he(!0),t=()=>he(!1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]);let[ge,_e]=(0,y.useState)(new Map),[ve,ye]=(0,y.useState)(new Map),[be,xe]=(0,y.useState)(new Set);(0,y.useEffect)(()=>{if(!(!me||F.offlineActions.length===0))for(let e of F.offlineActions)ge.has(e.id)||be.has(e.id)||(_e(t=>new Map(t).set(e.id,null)),N.client.fetchIssueState(e.itemUrl).then(t=>{_e(n=>new Map(n).set(e.id,t)),e.isPr&&(ye(t=>new Map(t).set(e.id,null)),N.client.fetchPullRequestStatus(e.itemUrl).then(t=>{ye(n=>new Map(n).set(e.id,t))}).catch(e=>{console.warn(`Failed to fetch PR status for offline action:`,e)}))}).catch(t=>{console.warn(`Failed to fetch current state for offline action:`,t),xe(t=>new Set(t).add(e.id))}))},[me,F.offlineActions,N.client,ge,be]);let[Se,Ce]=(0,y.useState)(!1),we=(0,y.useCallback)(async e=>{Ce(!0);try{await F.confirmOfflineAction(e)}finally{Ce(!1)}},[F]),Te=(0,y.useMemo)(()=>F.offlineActions.map(e=>{let t=ge.get(e.id)??null,n=ve.get(e.id)??null,r=be.has(e.id);return{id:e.id,message:e.message,color:e.color,itemNumber:e.itemNumber,isPr:e.isPr,currentTitle:r?null:t?.title??null,currentState:r||t===null?null:t.merged?`closed`:t.state,currentPrStatus:n,fetchError:r}}),[F.offlineActions,ge,ve,be]),Ee=i[D],ke=(0,y.useMemo)(()=>Ee===null?[]:sr(Ee.items,cr(E.overlay,Ee.generatedAt),D),[Ee,E.overlay,D]),[Ae,Me]=(0,y.useState)(null),Ne=(0,y.useMemo)(()=>{if(D!==`prs`)return{};let e={};for(let t of ke)t.agent!==null&&t.agent!==``&&(e[t.agent]=(e[t.agent]??0)+1);return e},[ke,D]);(0,y.useEffect)(()=>{D===`prs`&&Ae!==null&&(Ne[Ae]??0)===0&&Me(null)},[Ne,Ae,D]);let Pe=(0,y.useMemo)(()=>D!==`prs`||Ae===null?ke:ke.filter(e=>e.agent===Ae),[ke,D,Ae]),Fe=(0,y.useMemo)(()=>Pe.map(e=>ir(e)),[Pe]),Ie=Ee?.storyOrder??[],Le=(0,y.useMemo)(()=>I(Pe,E.overlay,Ie,Ee?.generatedAt??null),[Pe,E.overlay,Ie,Ee]),Re=Ee?.storyColors??{},ze=Ee?.statusOptions??[],Ve=Ee?.agentOptions??[],He=Ee?.storyOptions??[],Ue=Ee?.generatedAt??null,We=Ee?.fromCache??!1,[Je,Ye]=(0,y.useState)(null),Xe=(0,y.useMemo)(()=>O===null||Ee===null?null:Ee.items.find(e=>e.projectItemId===O)??null,[O,Ee]);qn(N,Xe,ke),(0,y.useEffect)(()=>{O!==null&&window.scrollTo({top:0})},[O]),(0,y.useEffect)(()=>{if(e===null&&c&&v.length>0){let e=In(v,null,l);e!==null&&jn(`/projects/${e}`)}},[e,c,v,l]);let Ze=re[D],Qe=(0,y.useRef)({tab:D,count:Ze});(0,y.useEffect)(()=>{let e=Qe.current;if(Qe.current={tab:D,count:Ze},e.tab===D&&e.count>0&&Ze===0){let e=Xn(D,re);e!==null&&(se(e),k())}},[D,Ze,re,se,k]);let $e=Xe===null?null:lr(E.overlay,Xe,i[D]?.generatedAt??null),et=Xe===null?null:de(Xe,E.overlay,i[D]?.generatedAt??null),tt=(0,y.useCallback)(e=>{let t=di(Fe,e);t===null?k():oe(t)},[Fe,oe,k]),nt=(0,y.useCallback)(t=>{if(n.status===`on`){F.showError(`Airplane mode`,`This action requires a network connection. Turn off airplane mode and try again.`);return}let r=ir(t.item);F.enqueue({message:vn(t.kind,t.item,D),color:gn(t.kind),commit:t.commit,offline:t.offline,revertAdvance:t.revertAdvance,advance:()=>{if(t.onAdvance?.(),!t.skipAdvance&&_n(t.kind,D)){if(c&&te(l[e??``]??0)){let t=In(v,e,l);t!==null&&An(`/projects/${t}`)}else tt(r)}}})},[F,D,tt,n.status,c,te,l,e,v]),rt=Gr((0,y.useCallback)(e=>{if(O===null||e===null)return;let t=e===`next`?fi(Fe,O):pi(Fe,O);t!==null&&oe(t)},[O,Fe,oe])),[it,at]=(0,y.useState)(()=>localStorage.getItem(`console-story-show-gray`)===`true`),ot=(0,y.useCallback)(()=>{at(e=>{let t=!e;return localStorage.setItem(`console-story-show-gray`,String(t)),t})},[]),st=i.stories,ct=st?.stories??[],L=Je!==null&&Je.generatedAt===st?.generatedAt?Je.stories:ct,lt=st?.defaultNameWithOwner??null,ut=(0,y.useMemo)(()=>Xe===null||!Xe.labels.includes(`story`)?null:L.find(e=>e.storyName===Xe.story)??null,[Xe,L]),dt=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);if(lt===null)throw Error(`No repository configured for this project.`);await Jt({pjcode:e,title:n,storyName:t,nameWithOwner:lt})},[e,lt]),ft=(0,y.useCallback)(t=>{if(e===null)return Promise.reject(Error(`No project specified in the URL path.`));if(lt===null)return Promise.reject(Error(`No repository configured for this project.`));let n=e,r=lt;return F.enqueue({message:`Task created — "${t.title}"`,color:`blue`,commit:async()=>{let e=await Jt({pjcode:n,title:t.title,storyName:t.storyName,agentOptionId:t.agentOptionId,body:t.body,nameWithOwner:r});if(t.files.length>0){let r=[];for(let i of t.files){let t=zt(new Uint8Array(await i.arrayBuffer())),a=await Bt({pjcode:n,url:e,fileName:i.name,contentBase64:t});r.push(a)}await Lt({pjcode:n,url:e,body:r.join(`
|
|
89
|
+
`)[0],Yu=({commits:e,isLoading:t,error:n,now:r})=>n===null?t?(0,x.jsx)(`p`,{className:`console-commits-loading`,children:`Loading commits...`}):e.length===0?(0,x.jsx)(`p`,{className:`console-commits-empty`,children:`No commits.`}):(0,x.jsx)(`ul`,{className:`console-commits`,children:e.map(e=>(0,x.jsxs)(`li`,{className:`console-commit`,children:[(0,x.jsx)(`span`,{className:`console-commit-message`,children:Ju(e.message)}),(0,x.jsx)(`span`,{className:`console-commit-sha`,children:qu(e.sha)}),(0,x.jsx)(`span`,{className:`console-commit-author`,children:e.author}),(0,x.jsx)(`span`,{className:`console-commit-time`,children:ie(e.authoredAt,r)})]},e.sha))}):(0,x.jsx)(`p`,{className:`console-commits-notloaded`,children:`Not loaded.`}),Xu=({url:e,label:t=`Copy URL`})=>(0,x.jsx)(nu,{value:e,idleText:`Copy URL`,idleAriaLabel:t,copiedAriaLabel:`URL copied to clipboard`,className:`console-copy-url-button`}),Zu=e=>{let t=new Map;for(let n of e){let e=t.get(n.message);if(e===void 0){t.set(n.message,[n.section]);continue}e.push(n.section)}return Array.from(t,([e,t])=>({message:e,sections:t}))},Qu=e=>e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`,$u=({failures:e})=>e.length===0?null:(0,x.jsx)(`div`,{role:`alert`,className:`console-detail-fetch-error`,children:Zu(e).map(e=>(0,x.jsxs)(`p`,{className:`console-detail-fetch-error-line`,children:[`Failed to load `,Qu(e.sections),`:`,` `,e.message]},e.message))}),ed={MERGEABLE:{color:`GREEN`,label:`No conflict`,title:`This pull request has no merge conflicts`,modifier:`console-detail-mergeable-chip-ok`},CONFLICTING:{color:`RED`,label:`Conflict`,title:`This pull request has merge conflicts`,modifier:`console-detail-mergeable-chip-conflict`},UNKNOWN:{color:`GRAY`,label:`Checking merge status`,title:`GitHub has not finished computing the merge status yet`,modifier:`console-detail-mergeable-chip-unknown`}},td=({mergeableStatus:e})=>{let t=ed[e],n=j(t.color);return(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-mergeable-chip ${t.modifier}`,style:{color:n.fg,borderColor:n.border,backgroundColor:n.bg},title:t.title,children:t.label})},nd=e=>{let t=j(e);return{color:t.fg,borderColor:t.border,backgroundColor:t.bg}},rd=({isPassedAllCiJob:e,isCiStateSuccess:t,isBranchOutOfDate:n,missingRequiredCheckNames:r})=>{let i=e&&t,a=i?`GREEN`:`RED`,o=i?`CI passing`:`CI failing`,s=!i&&r.length>0?`missing: ${r.join(`, `)}`:null;return(0,x.jsxs)(`span`,{className:`console-detail-pr-status`,children:[(0,x.jsxs)(`span`,{className:`console-detail-status-chip console-detail-ci-chip`,style:nd(a),title:s??o,children:[o,s!==null&&(0,x.jsxs)(`span`,{className:`console-detail-ci-missing`,children:[` `,`(`,s,`)`]})]}),n&&(0,x.jsx)(`span`,{className:`console-detail-status-chip console-detail-outofdate-chip`,style:nd(`YELLOW`),title:`This branch is out of date with the base branch`,children:`Out of date`})]})},id=({pullRequest:e,body:t,bodyIsLoading:n,files:r,filesAreLoading:i,filesError:a,commits:o,commitsAreLoading:s,commitsError:c,now:l,buildImageProxyUrl:u,renderReferenceLink:d,onAddInlineComment:f})=>{let p=e.summary,m=bi(e.url),h=m===null?void 0:{owner:m.owner,repo:m.repo},g=i||a!==null?null:r.length,_=s||c!==null?null:o.length;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`console-pr-header`,children:[(0,x.jsx)(`a`,{href:e.url,className:`console-pr-section-title`,target:`_blank`,rel:`noopener noreferrer`,children:p?.title??e.url}),e.isDraft&&(0,x.jsx)(`span`,{className:`console-pr-section-state`,children:`draft`}),(0,x.jsx)(td,{mergeableStatus:e.mergeableStatus}),(0,x.jsx)(rd,{isPassedAllCiJob:e.isPassedAllCiJob,isCiStateSuccess:e.isCiStateSuccess,isBranchOutOfDate:e.isBranchOutOfDate,missingRequiredCheckNames:e.missingRequiredCheckNames}),(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),(0,x.jsx)(Xu,{url:e.url,label:`Copy PR URL`}),(0,x.jsxs)(`div`,{className:`console-pr-statbar`,children:[m!==null&&(0,x.jsxs)(`span`,{className:`console-pr-repo`,children:[m.owner,`/`,m.repo]}),e.branchName!==null&&(0,x.jsx)(`span`,{className:`console-pr-branch`,children:e.branchName}),p!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`span`,{className:`console-pr-add`,children:[`+`,p.additions]}),(0,x.jsxs)(`span`,{className:`console-pr-del`,children:[`-`,p.deletions]}),(0,x.jsxs)(`span`,{className:`console-pr-files-count`,children:[p.changedFiles,` files`]})]})]})]}),(0,x.jsx)(wu,{title:`Description`,children:n?(0,x.jsx)(`p`,{className:`console-pr-body-loading`,children:`Loading description...`}):(0,x.jsx)(Cu,{body:p?.body??t,buildImageProxyUrl:u,renderReferenceLink:d,repoContext:h})}),(0,x.jsx)(wu,{title:`Changed files`,count:g,children:(0,x.jsx)(Hu,{files:r,isLoading:i,error:a,buildImageProxyUrl:u,onAddInlineComment:f})}),(0,x.jsx)(wu,{title:`Commits`,count:_,defaultCollapsed:!0,children:(0,x.jsx)(Yu,{commits:o,isLoading:s,error:c,now:l})})]})},ad=({item:e,storyName:t,storyColorEnum:n,overlayStatus:r,statusOptions:i,state:a,body:o,bodyIsLoading:s,bodyError:c,comments:l,commentsAreLoading:u,commentsError:d,files:f,filesAreLoading:p,filesError:m,commits:h,commitsAreLoading:g,commitsError:_,stateError:v,pullRequestStatus:y,pullRequestStatusError:b,relatedPullRequests:S,relatedPullRequestsError:C,now:w,commentComposer:T,operationBar:ee,buildImageProxyUrl:te,renderReferenceLink:E,onAddInlineComment:ne,workflowImprovementIssueUrl:re=null})=>{let D=a?.state??`open`,ae=a?.merged??!1,oe=!e.isPr&&D===`closed`?`Closed`:null,k=xi(e.nameWithOwner)??void 0,A=j(n),se=r===null?e.status===null?null:{name:e.status,color:i.find(t=>t.name===e.status)?.color??`GRAY`}:r,ce=se===null?null:j(se.color),le=p||m!==null?null:f.length,M=u||d!==null?null:l.length,N=g||_!==null?null:h.length,ue=!u&&d===null&&l.length>0,P=e=>{let t=bi(e);return t===null?e:`PR #${t.number}`},F=[{section:`item state`,message:v},{section:`pull request status`,message:e.isPr?b:null},{section:`description`,message:c},{section:`comments`,message:d},{section:`changed files`,message:e.isPr?m:null},{section:`commits`,message:e.isPr?_:null},{section:`related pull requests`,message:e.isPr?null:C},...S.flatMap(e=>[{section:`changed files of ${P(e.pullRequest.url)}`,message:e.filesError},{section:`commits of ${P(e.pullRequest.url)}`,message:e.commitsError}])].flatMap(e=>e.message===null?[]:[{section:e.section,message:e.message}]),de=e.isPr&&y?.found?[{url:e.url,mergeableStatus:y.mergeableStatus}]:[];return(0,x.jsxs)(`article`,{className:`console-detail`,children:[(0,x.jsxs)(`div`,{className:`console-detail-header`,children:[(0,x.jsxs)(`h2`,{className:`console-detail-title`,children:[(0,x.jsx)(we,{isPr:e.isPr,state:D,merged:ae,isDraft:!1,stateReason:``}),(0,x.jsx)(`span`,{className:`console-detail-title-text`,children:e.title}),(0,x.jsx)(`span`,{className:`console-detail-number`,children:e.isPr?`PR #${e.number}`:`#${e.number}`})]}),(0,x.jsxs)(`div`,{className:`console-detail-topline`,children:[se!==null&&ce!==null&&(0,x.jsx)(`span`,{className:`console-detail-status-chip`,style:{color:ce.fg,borderColor:ce.border,backgroundColor:ce.bg},children:se.name}),e.agent!==null&&e.agent!==``&&(0,x.jsx)(`span`,{className:`console-detail-agent-chip`,children:e.agent}),t!==null&&(0,x.jsxs)(`span`,{className:`console-storytag`,children:[(0,x.jsx)(`span`,{className:`console-story-dot`,style:{backgroundColor:A.dot}}),t]}),e.isPr&&y?.found&&(0,x.jsx)(rd,{isPassedAllCiJob:y.isPassedAllCiJob,isCiStateSuccess:y.isCiStateSuccess,isBranchOutOfDate:y.isBranchOutOfDate,missingRequiredCheckNames:y.missingRequiredCheckNames}),!e.isPr&&S.map(e=>(0,x.jsxs)(`span`,{className:`console-related-pr-group`,children:[S.length>1&&(0,x.jsx)(`span`,{className:`console-related-pr-label`,children:P(e.pullRequest.url)}),(0,x.jsx)(rd,{isPassedAllCiJob:e.pullRequest.isPassedAllCiJob,isCiStateSuccess:e.pullRequest.isCiStateSuccess,isBranchOutOfDate:e.pullRequest.isBranchOutOfDate,missingRequiredCheckNames:e.pullRequest.missingRequiredCheckNames}),(0,x.jsx)(td,{mergeableStatus:e.pullRequest.mergeableStatus})]},e.pullRequest.url)),de.map(e=>(0,x.jsx)(td,{mergeableStatus:e.mergeableStatus},e.url)),oe!==null&&(0,x.jsx)(`span`,{className:`console-detail-closed-label`,children:oe})]}),(0,x.jsx)($u,{failures:F}),(0,x.jsxs)(`div`,{className:`console-detail-subbar`,children:[(0,x.jsxs)(`a`,{href:e.url,className:`console-detail-link`,target:`_blank`,rel:`noopener noreferrer`,children:[`#`,e.number]}),(0,x.jsx)(`span`,{className:`console-detail-repo`,children:e.repo}),(0,x.jsxs)(`span`,{className:`console-detail-createdat`,title:O(e.createdAt),children:[`opened `,ie(e.createdAt,w)]}),(0,x.jsx)(Xu,{url:e.url}),re!==null&&(0,x.jsx)(`a`,{href:Ci(re,e.url),target:`_blank`,rel:`noreferrer`,className:`console-detail-report-link`,"aria-label":`Create workflow incident report for this task`,children:`⚡`}),e.labels.map(e=>(0,x.jsx)(`span`,{className:`console-label-chip`,children:e},e))]})]}),(0,x.jsxs)(`div`,{className:`console-detail-body`,children:[(0,x.jsx)(wu,{title:`Description`,defaultCollapsed:ue,headerAction:(0,x.jsx)(`a`,{href:e.url,className:`console-panel-open-link`,target:`_blank`,rel:`noopener noreferrer`,children:`open`}),children:c===null?s?(0,x.jsx)(`p`,{className:`console-detail-body-loading`,children:`Loading description...`}):(0,x.jsx)(Cu,{body:o,buildImageProxyUrl:te,renderReferenceLink:E,repoContext:k}):(0,x.jsx)(`p`,{className:`console-detail-body-notloaded`,children:`Not loaded.`})},ue?`desc-collapsed`:`desc-open`),e.isPr&&(0,x.jsx)(wu,{title:`Changed files`,count:le,children:(0,x.jsx)(Hu,{files:f,isLoading:p,error:m,onAddInlineComment:ne})}),(0,x.jsx)(wu,{title:`Comments`,count:M,children:(0,x.jsx)(Ku,{comments:l,isLoading:u,error:d,now:w,workflowImprovementIssueUrl:re,buildImageProxyUrl:te,renderReferenceLink:E,repoContext:k,persistenceKey:e.url})}),e.isPr&&(0,x.jsx)(wu,{title:`Commits`,count:N,defaultCollapsed:!0,children:(0,x.jsx)(Yu,{commits:h,isLoading:g,error:_,now:w})}),!e.isPr&&S.map(e=>(0,x.jsx)(id,{pullRequest:e.pullRequest,body:e.pullRequest.summary?.body??``,bodyIsLoading:!1,files:e.files,filesAreLoading:e.filesAreLoading,filesError:e.filesError,commits:e.commits,commitsAreLoading:e.commitsAreLoading,commitsError:e.commitsError,now:w,buildImageProxyUrl:te,renderReferenceLink:E,onAddInlineComment:ne},e.pullRequest.url))]}),(0,x.jsxs)(`div`,{className:`console-detail-dock`,children:[(0,x.jsx)(`div`,{className:`console-detail-dock-composer`,children:T}),(0,x.jsx)(`div`,{className:`console-actionbar`,children:ee})]})]})},od=({className:e,ariaLabel:t,placeholder:n,currentOption:r,options:i,onSelect:a})=>{let o=(0,y.useRef)({ready:!1,currentOptionId:r?.id??null});return(0,y.useLayoutEffect)(()=>{o.current.ready=!0,o.current.currentOptionId=r?.id??null}),(0,x.jsxs)(`select`,{className:e,defaultValue:r?.id??``,onChange:e=>{if(!o.current.ready||e.target.value===(o.current.currentOptionId??``))return;let t=i.find(t=>t.id===e.target.value);t!==void 0&&a(t)},"aria-label":t,children:[(0,x.jsx)(`option`,{value:``,children:n}),i.map(e=>(0,x.jsx)(`option`,{value:e.id,children:e.name},e.id))]})},sd=({agentOptions:e,currentAgentName:t,onSetAgent:n})=>{if(e.length===0)return null;let r=t===null?null:e.find(e=>e.name===t)??null;return(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(od,{className:`console-agent-select`,ariaLabel:`Set agent`,placeholder:`— agent —`,currentOption:r,options:e,onSelect:n},r?.id??`none`)})},cd=({onClose:e})=>(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close_not_planned`),children:`Close as not planned`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>e(`close`),children:`Close`})]}),ld=({onDeleteAllComments:e,onDeleteStory:t,storyNameForDeletion:n})=>{let[r,i]=(0,y.useState)(!1),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)(null),d=()=>{e(),i(!1)},f=()=>{o(!0),u(null)},p=async()=>{if(t){c(!0),u(null);try{await t()}catch(e){u(e instanceof Error?e.message:String(e)),c(!1)}}};return(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>i(e=>!e),children:`⚠`}),r&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:d,children:`Delete All Comments`}),t!=null&&(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:f,disabled:a,children:`Delete Story`})]}),a&&(0,x.jsxs)(`div`,{className:`console-story-delete-confirm`,role:`dialog`,"aria-modal":`true`,"aria-label":`Confirm story deletion`,children:[(0,x.jsxs)(`p`,{className:`console-story-delete-confirm-message`,children:[`Delete story option "`,n,`" from the GitHub custom field? Open tasks assigned to this story will be closed.`]}),l!==null&&(0,x.jsx)(`p`,{role:`alert`,className:`console-list-error`,children:l}),(0,x.jsxs)(`div`,{className:`console-story-delete-confirm-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-danger`,onClick:()=>void p(),disabled:s,children:s?`Deleting…`:`Delete`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{o(!1),u(null)},disabled:s,children:`Cancel`})]})]})]})},ud=({isManualTriage:e,onSetNextActionDate:t})=>(0,x.jsxs)(`div`,{className:`console-op-group`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1hour`),children:`+1 hour`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_3hours`),children:`+3 hours`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_6hours`),children:`+6 hours`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1day`),children:`+1 day`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_2days`),children:`+2 days`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_3days`),children:`+3 days`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_5days`),children:`+5 days`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1week`),children:e?`+1 week and skip`:`+1 week`}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-snooze`,onClick:()=>t(`snooze_1month`),children:`+1 month`})]}),dd=[{action:`unnecessary`,label:`Unnecessary`,variant:`unneeded`},{action:`totally_wrong`,label:`Totally wrong`,variant:`wrong`},{action:`request_changes`,label:`Reject`,variant:`reject`},{action:`approve_and_merge`,label:`Approve & Merge`,variant:`approve`}],fd=`Reject needs an inline comment on the diff.`,pd=({onReview:e,rejectEnabled:t})=>(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-review`,children:[!t&&(0,x.jsx)(`p`,{className:`console-op-requirement`,children:fd}),dd.map(n=>{let r=n.action===`request_changes`&&!t;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button console-op-button-${n.variant}`,disabled:r,onClick:()=>e(n.action),children:n.label},n.action)})]}),md=({onSetDependedIssueUrl:e})=>{let[t,n]=(0,y.useState)(!1),[r,i]=(0,y.useState)(``),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(null);return(0,x.jsxs)(`div`,{className:`console-op-group console-op-group-rare-actions`,children:[(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>{n(e=>!e),c(null)},title:`Rare actions`,children:`⋯`}),t&&e!==null&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`input`,{type:`url`,className:`console-settings-modal-input`,placeholder:`Depended issue URL`,value:r,onChange:e=>i(e.target.value),disabled:a}),(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:async()=>{if(e!==null&&r.trim()!==``){o(!0),c(null);try{await e(r.trim()),i(``),n(!1)}catch(e){c(e instanceof Error?e.message:`Failed to set depended issue URL`)}finally{o(!1)}}},disabled:a||r.trim()===``,children:a?`...`:`Set Depended Issue`})]}),s!==null&&(0,x.jsx)(`p`,{className:`console-settings-modal-error`,children:s})]})},hd=(e,t)=>{let n=t.toLowerCase();return e.find(e=>e.name.toLowerCase()===n)??null},gd=({statusOptions:e,onSetStatus:t,onSetInTmuxByHuman:n})=>{let r=ye.map(t=>({name:t,option:hd(e,t)})).filter(e=>e.option!==null);return r.length===0?null:(0,x.jsx)(`div`,{className:`console-op-group`,children:r.map(({name:e,option:r})=>{let i=j(r.color),a=e===_e;return(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,style:{color:i.fg,borderColor:i.border,backgroundColor:i.bg},onClick:()=>a?n(r):t(r),children:r.name},r.id)})})},_d=({storyOptions:e,currentStoryName:t,onSetStory:n})=>{if(e.length===0)return null;let r=t===null?null:e.find(e=>e.name===t)??null;return(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(od,{className:`console-story-select`,ariaLabel:`Set story`,placeholder:`— story —`,currentOption:r,options:e,onSelect:n},r?.id??`none`)})},vd=({tab:e,hasPullRequest:t,rejectEnabled:n,statusOptions:r,storyOptions:i,currentStoryName:a,agentOptions:o,currentAgentName:s,handlers:c,storyNameForDeletion:l})=>{let[u,d]=(0,y.useState)(!1);return(0,x.jsxs)(`div`,{className:`console-operation-bar`,children:[t&&(0,x.jsx)(pd,{onReview:c.onReview,rejectEnabled:n}),(0,x.jsx)(ud,{isManualTriage:be(e),onSetNextActionDate:c.onSetNextActionDate}),(0,x.jsx)(gd,{statusOptions:r,onSetStatus:c.onSetStatus,onSetInTmuxByHuman:c.onSetInTmuxByHuman}),u&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(_d,{storyOptions:i,currentStoryName:a,onSetStory:c.onSetStory}),(0,x.jsx)(sd,{agentOptions:o,currentAgentName:s,onSetAgent:c.onSetAgent})]}),(0,x.jsxs)(`div`,{className:`console-op-group-bottom-row`,children:[(0,x.jsxs)(`div`,{className:`console-op-group-left-pair`,children:[(i.length>0||o.length>0)&&(0,x.jsx)(`div`,{className:`console-op-group`,children:(0,x.jsx)(`button`,{type:`button`,className:`console-op-button`,onClick:()=>d(e=>!e),title:`Change agent or story`,children:`⚙`})}),(0,x.jsx)(md,{onSetDependedIssueUrl:c.onSetDependedIssueUrl}),(0,x.jsx)(ld,{onDeleteAllComments:c.onDeleteAllComments,onDeleteStory:c.onDeleteStory,storyNameForDeletion:l})]}),(0,x.jsx)(cd,{onClose:c.onClose})]})]})},yd=(e,t,n,r)=>{let i=t===null?void 0:e.peek(t),[a,o]=(0,y.useState)(i??r),[s,c]=(0,y.useState)(t!==null&&i===void 0),[l,u]=(0,y.useState)(null);return(0,y.useEffect)(()=>{if(t===null||n===null)return;let r=e.peek(t);if(r!==void 0){o(r),c(!1),u(null);return}let i=!1;return c(!0),u(null),e.load(t,n).then(e=>{i||(o(e),c(!1))}).catch(e=>{i||(u(e instanceof Error?e.message:String(e)),c(!1))}),()=>{i=!0}},[e,t,n]),{data:a,isLoading:s,error:l}},Q=[],bd=[],xd=[],Sd=[],Cd={state:`open`,merged:!1,isPullRequest:!1,title:``},wd={found:!1,isConflicted:!1,mergeableStatus:`UNKNOWN`,isPassedAllCiJob:!1,isCiStateSuccess:!1,isBranchOutOfDate:!1,missingRequiredCheckNames:[]},Td=(e,t,n)=>{let r=t===null?null:`${t.repo}#${t.number}`,i=t===null?null:t.url,a=t?.isPr??!1,o=yd(e.body,r,i,``),s=yd(e.state,r,i,Cd),c=yd(e.comments,r,i,Q),l=yd(e.files,a?r:null,a?i:null,bd),u=yd(e.commits,a?r:null,a?i:null,xd),d=yd(e.prStatus,a?r:null,a?i:null,wd),f=!a&&((t?.relatedOpenPullRequestUrls.length??0)>0||n===`prs`),p=yd(e.relatedPrs,f?r:null,f?i:null,Sd),[m,h]=(0,y.useState)([]);return(0,y.useEffect)(()=>{if(a||p.data.length===0){h([]);return}let t=!1,n=p.data.map(e=>({pullRequest:e,files:bd,filesAreLoading:!0,filesError:null,commits:xd,commitsAreLoading:!0,commitsError:null}));h(n);let r=(e,n)=>{t||h(t=>t.map(t=>t.pullRequest.url===e?{...t,...n}:t))};for(let t of p.data){let n=t.url;e.files.load(n,t.url).then(e=>r(t.url,{files:e,filesAreLoading:!1})).catch(e=>r(t.url,{filesAreLoading:!1,filesError:e instanceof Error?e.message:String(e)})),e.commits.load(n,t.url).then(e=>r(t.url,{commits:e,commitsAreLoading:!1})).catch(e=>r(t.url,{commitsAreLoading:!1,commitsError:e instanceof Error?e.message:String(e)}))}return()=>{t=!0}},[e,a,p.data]),{state:s.data,body:o.data,bodyIsLoading:o.isLoading,bodyError:o.error,comments:c.data,commentsAreLoading:c.isLoading,commentsError:c.error,files:l.data,filesAreLoading:l.isLoading,filesError:l.error,commits:u.data,commitsAreLoading:u.isLoading,commitsError:u.error,stateError:s.error,pullRequestStatus:a?d.data:null,pullRequestStatusError:a?d.error:null,relatedPullRequests:m,relatedPullRequestsError:a?null:p.error}},Ed=e=>JSON.stringify([e.author,e.createdAt,e.body]),Dd=(e,t)=>{let n=new Set(e.map(Ed));return[...e,...t.filter(e=>!n.has(Ed(e)))]},Od=({href:e,fallbackText:t,state:n})=>{if(n===null||n.title.trim()===``)return(0,x.jsx)(`a`,{className:`console-markdown-reference console-markdown-reference-plain`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t});let r=bi(e);return(0,x.jsxs)(`a`,{className:`console-markdown-reference`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:[(0,x.jsx)(we,{...Si(n)}),(0,x.jsx)(`span`,{className:`console-markdown-reference-title`,children:n.title}),r!==null&&(0,x.jsxs)(`span`,{className:`console-markdown-reference-number`,children:[`#`,r.number]})]})},kd=(e,t)=>{let[n,r]=(0,y.useState)(()=>e.peek(t)??null);return(0,y.useEffect)(()=>{let n=e.peek(t);if(n!==void 0){r(n);return}let i=!1;return r(null),e.load(t,t).then(e=>{i||r(e)}).catch(()=>{i||r(null)}),()=>{i=!0}},[e,t]),n},Ad=({cache:e,href:t,fallbackText:n})=>{let r=kd(e,t);return(0,x.jsx)(Od,{href:t,fallbackText:n,state:r})},jd=e=>({itemUrl:e.url,projectItemId:e.projectItemId,itemNumber:e.number,repo:e.repo,isPr:e.isPr}),Md=(e,t,n,r,i)=>({...jd(t),apiPath:dr,requestBody:mr(e,t,n,r,i)}),$=(e,t,n,r)=>({...jd(t),apiPath:fr,requestBody:hr(e,t,n,r)}),Nd=(e,t)=>({...jd(t),apiPath:pr,requestBody:gr(e,t)}),Pd=({tab:e,item:t,caches:n,operations:r,pjcode:i,statusOptions:a,storyOptions:o,agentOptions:s,storyColors:c,storyName:l,overlayStatus:u,now:d,initialCommentDraft:f,onCommentDraftChange:p,onQueueAction:m,onDeleteStory:h,storyNameForDeletion:g,workflowImprovementIssueUrl:_})=>{let v=Td(n,t,e),b=(0,y.useCallback)(e=>Ei(e,t.url),[t.url]),S=(0,y.useCallback)((e,t)=>(0,x.jsx)(Ad,{cache:n.state,href:e,fallbackText:t}),[n.state]),C=t.isPr||t.relatedOpenPullRequestUrls.length>0||v.relatedPullRequests.length>0,[w,T]=(0,y.useState)([]),ee=(0,y.useCallback)(async(e,t,n,r)=>{T(i=>[...i,{path:e,line:t,side:n,body:r}])},[]),[te,E]=(0,y.useState)([]),ne=(0,y.useCallback)(async e=>{let n=await r.addComment(t,e);return E(e=>[...e,n]),n},[t,r]),re={onReview:e=>{let n=t.isPr?t.url:v.relatedPullRequests[0]?.pullRequest.url??t.relatedOpenPullRequestUrls[0]??t.url,a=e===`request_changes`?w:[];m({kind:{type:`review`,action:e},item:t,commit:()=>r.reviewPullRequest(t,n,e,a),offline:i==null?void 0:Md(i,t,n,e,a)})},onSetNextActionDate:e=>{m({kind:{type:`next_action_date`,action:e},item:t,commit:()=>r.setNextActionDate(t,e),offline:i==null?void 0:$(i,t,e)})},onSetStory:e=>{m({kind:{type:`set_story`,optionName:e.name},item:t,commit:()=>r.setStory(t,e),offline:i==null?void 0:$(i,t,`set_story`,{storyOptionId:e.id})})},onSetAgent:e=>{m({kind:{type:`set_agent`,optionName:e.name},item:t,commit:()=>r.setAgent(t,e),offline:i==null?void 0:$(i,t,`set_agent`,{agentOptionId:e.id})})},onSetStatus:e=>{m({kind:{type:`set_status`,optionName:e.name},item:t,commit:()=>r.setStatus(t,e),offline:i==null?void 0:$(i,t,`set_status`,{statusName:e.name})})},onSetInTmuxByHuman:e=>{m({kind:{type:`set_in_tmux_by_human`,optionName:e.name},item:t,commit:()=>r.setInTmuxByHuman(t,e),offline:i==null?void 0:Nd(i,t)})},onClose:e=>{m({kind:{type:`close`,action:e},item:t,commit:()=>r.closeIssue(t,e),offline:i==null?void 0:$(i,t,e)})},onOkAndAwaitingWorkspace:e=>{m({kind:{type:`ok_and_awaiting_workspace`},item:t,commit:()=>r.okAndMoveToAwaitingWorkspace(t,e)})},onDeleteAllComments:()=>{m({kind:{type:`delete_all_comments`},item:t,commit:()=>r.deleteAllComments(t)})},onDeleteStory:h??null,onSetDependedIssueUrl:i==null?null:async e=>{await r.setDependedIssueUrl(t,e)}},ie=a.find(e=>e.name===`Awaiting Workspace`)??null,D=ie===null?void 0:async e=>(p?.(``),re.onSetStatus(ie),ne(e)),O=l??(t.story.trim()===``?null:t.story),ae=O===null?null:F(c,O);return(0,x.jsx)(ad,{item:t,storyName:O,storyColorEnum:ae,overlayStatus:u,statusOptions:a,state:v.state,stateError:v.stateError,body:v.body,bodyIsLoading:v.bodyIsLoading,bodyError:v.bodyError,comments:Dd(v.comments,te),commentsAreLoading:v.commentsAreLoading,commentsError:v.commentsError,files:v.files,filesAreLoading:v.filesAreLoading,filesError:v.filesError,commits:v.commits,commitsAreLoading:v.commitsAreLoading,commitsError:v.commitsError,pullRequestStatus:v.pullRequestStatus,pullRequestStatusError:v.pullRequestStatusError,relatedPullRequests:v.relatedPullRequests,relatedPullRequestsError:v.relatedPullRequestsError,now:d,buildImageProxyUrl:b,renderReferenceLink:S,onAddInlineComment:ee,workflowImprovementIssueUrl:_,commentComposer:(0,x.jsx)(vi,{initiallyOpen:!0,initialDraft:f,onSubmit:ne,onDraftChange:p,onOkAndAwaitingWorkspace:ie===null?void 0:()=>re.onOkAndAwaitingWorkspace(ie),onSubmitAndMoveToAwaitingWorkspace:D,onUploadFile:e=>r.uploadAttachment(t,e)}),operationBar:(0,x.jsx)(vd,{tab:e,item:t,hasPullRequest:C,rejectEnabled:w.length>0,statusOptions:a,storyOptions:o,currentStoryName:O,agentOptions:s,currentAgentName:t.agent,handlers:re,storyNameForDeletion:g})})},Fd=()=>{let e={};for(let t of ae)e[t.name]=0;return e},Id=`console`,Ld=()=>{let e=Tr(),t=Yn(),n=vt(),r=n.status===`on`?n.snapshot:null,{snapshots:i,isLoading:a,error:o,refreshSingleTab:s}=ci(e,r),{timerMode:c,projectMinutes:l,isOpen:u,draftTimerMode:d,draftProjectMinutes:f,openSettings:p,closeSettings:m,saveSettings:h,toggleDraftTimerMode:g,changeDraftMinutes:_}=ui(),{pjcodes:v,projectUrls:b,workflowImprovementIssueUrl:C,fleetTaskCreateUrl:w,isLoading:ee}=Er(),{isTimerExpired:te}=Pr(e),E=Cr(e??Id),ne=Nr(v),re=(0,y.useMemo)(()=>{let e=Fd();for(let t of ae){let n=i[t.name];n!==null&&(t.name===`stories`?e[t.name]=n.stories.filter(e=>e.color!==`GRAY`).length:e[t.name]=or(n.items,cr(E.overlay,n.generatedAt),t.name))}return e},[i,E.overlay]);Ln(c,re.prs,e,v,l,i.prs?.fromCache??!1);let ie=nr(e,re),{activeTab:D,selectedItemKey:O,openItem:oe,closeItem:k}=ie,se=li(ie.selectTab),j=jr((0,y.useCallback)(e=>An(`/projects/${e}`),[])),ce=(0,y.useRef)(new Map),le=(0,y.useCallback)(e=>{O!==null&&(e?ce.current.set(O,e):ce.current.delete(O))},[O]),N=Vn(r),P=yr(e,D,E,N,(0,y.useCallback)(()=>s(`queued`),[s])),F=kn(),[fe,pe]=(0,y.useState)(()=>Date.now());(0,y.useEffect)(()=>{let e=setInterval(()=>{pe(Date.now())},1e3);return()=>{clearInterval(e)}},[]);let[me,he]=(0,y.useState)(()=>navigator.onLine);(0,y.useEffect)(()=>{let e=()=>he(!0),t=()=>he(!1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,t),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,t)}},[]);let[ge,_e]=(0,y.useState)(new Map),[ve,ye]=(0,y.useState)(new Map),[be,xe]=(0,y.useState)(new Set);(0,y.useEffect)(()=>{if(!(!me||F.offlineActions.length===0))for(let e of F.offlineActions)ge.has(e.id)||be.has(e.id)||(_e(t=>new Map(t).set(e.id,null)),N.client.fetchIssueState(e.itemUrl).then(t=>{_e(n=>new Map(n).set(e.id,t)),e.isPr&&(ye(t=>new Map(t).set(e.id,null)),N.client.fetchPullRequestStatus(e.itemUrl).then(t=>{ye(n=>new Map(n).set(e.id,t))}).catch(e=>{console.warn(`Failed to fetch PR status for offline action:`,e)}))}).catch(t=>{console.warn(`Failed to fetch current state for offline action:`,t),xe(t=>new Set(t).add(e.id))}))},[me,F.offlineActions,N.client,ge,be]);let[Se,Ce]=(0,y.useState)(!1),we=(0,y.useCallback)(async e=>{Ce(!0);try{await F.confirmOfflineAction(e)}finally{Ce(!1)}},[F]),Te=(0,y.useMemo)(()=>F.offlineActions.map(e=>{let t=ge.get(e.id)??null,n=ve.get(e.id)??null,r=be.has(e.id);return{id:e.id,message:e.message,color:e.color,itemNumber:e.itemNumber,isPr:e.isPr,currentTitle:r?null:t?.title??null,currentState:r||t===null?null:t.merged?`closed`:t.state,currentPrStatus:n,fetchError:r}}),[F.offlineActions,ge,ve,be]),Ee=i[D],ke=(0,y.useMemo)(()=>Ee===null?[]:sr(Ee.items,cr(E.overlay,Ee.generatedAt),D),[Ee,E.overlay,D]),[Ae,Me]=(0,y.useState)(null),Ne=(0,y.useMemo)(()=>{if(D!==`prs`)return{};let e={};for(let t of ke)t.agent!==null&&t.agent!==``&&(e[t.agent]=(e[t.agent]??0)+1);return e},[ke,D]);(0,y.useEffect)(()=>{D===`prs`&&Ae!==null&&(Ne[Ae]??0)===0&&Me(null)},[Ne,Ae,D]);let Pe=(0,y.useMemo)(()=>D!==`prs`||Ae===null?ke:ke.filter(e=>e.agent===Ae),[ke,D,Ae]),Fe=(0,y.useMemo)(()=>Pe.map(e=>ir(e)),[Pe]),Ie=Ee?.storyOrder??[],Le=(0,y.useMemo)(()=>I(Pe,E.overlay,Ie,Ee?.generatedAt??null),[Pe,E.overlay,Ie,Ee]),Re=Ee?.storyColors??{},ze=Ee?.statusOptions??[],Ve=Ee?.agentOptions??[],He=Ee?.storyOptions??[],Ue=Ee?.generatedAt??null,We=Ee?.fromCache??!1,[Je,Ye]=(0,y.useState)(null),Xe=(0,y.useMemo)(()=>O===null||Ee===null?null:Ee.items.find(e=>e.projectItemId===O)??null,[O,Ee]);qn(N,Xe,ke),(0,y.useEffect)(()=>{O!==null&&window.scrollTo({top:0})},[O]),(0,y.useEffect)(()=>{if(e===null&&c&&v.length>0){let e=In(v,null,l);e!==null&&jn(`/projects/${e}`)}},[e,c,v,l]);let Ze=re[D],Qe=(0,y.useRef)({tab:D,count:Ze});(0,y.useEffect)(()=>{let e=Qe.current;if(Qe.current={tab:D,count:Ze},e.tab===D&&e.count>0&&Ze===0){let e=Xn(D,re);e!==null&&(se(e),k())}},[D,Ze,re,se,k]);let $e=Xe===null?null:lr(E.overlay,Xe,i[D]?.generatedAt??null),et=Xe===null?null:de(Xe,E.overlay,i[D]?.generatedAt??null),tt=(0,y.useCallback)(e=>{let t=di(Fe,e);t===null?k():oe(t)},[Fe,oe,k]),nt=(0,y.useCallback)(t=>{if(n.status===`on`){F.showError(`Airplane mode`,`This action requires a network connection. Turn off airplane mode and try again.`);return}let r=ir(t.item);F.enqueue({message:vn(t.kind,t.item,D),color:gn(t.kind),commit:t.commit,offline:t.offline,revertAdvance:t.revertAdvance,advance:()=>{if(t.onAdvance?.(),!t.skipAdvance&&_n(t.kind,D)){if(c&&te(l[e??``]??0)){let t=In(v,e,l);t!==null&&An(`/projects/${t}`)}else tt(r)}}})},[F,D,tt,n.status,c,te,l,e,v]),rt=Gr((0,y.useCallback)(e=>{if(O===null||e===null)return;let t=e===`next`?fi(Fe,O):pi(Fe,O);t!==null&&oe(t)},[O,Fe,oe])),[it,at]=(0,y.useState)(()=>localStorage.getItem(`console-story-show-gray`)===`true`),ot=(0,y.useCallback)(()=>{at(e=>{let t=!e;return localStorage.setItem(`console-story-show-gray`,String(t)),t})},[]),st=i.stories,ct=st?.stories??[],L=Je!==null&&Je.generatedAt===st?.generatedAt?Je.stories:ct,lt=st?.defaultNameWithOwner??null,ut=(0,y.useMemo)(()=>Xe===null||!Xe.labels.includes(`story`)?null:L.find(e=>e.storyName===Xe.story)??null,[Xe,L]),dt=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);if(lt===null)throw Error(`No repository configured for this project.`);await Jt({pjcode:e,title:n,storyName:t,nameWithOwner:lt})},[e,lt]),ft=(0,y.useCallback)(t=>{if(e===null)return Promise.reject(Error(`No project specified in the URL path.`));if(lt===null)return Promise.reject(Error(`No repository configured for this project.`));let n=e,r=lt;return F.enqueue({message:`Task created — "${t.title}"`,color:`blue`,commit:async()=>{let e=await Jt({pjcode:n,title:t.title,storyName:t.storyName,agentOptionId:t.agentOptionId,body:t.body,nameWithOwner:r});if(t.files.length>0){let r=[];for(let i of t.files){let t=zt(new Uint8Array(await i.arrayBuffer())),a=await Bt({pjcode:n,url:e,fileName:i.name,contentBase64:t});r.push(a)}await Lt({pjcode:n,url:e,body:r.join(`
|
|
90
90
|
|
|
91
91
|
`)})}},advance:()=>{}}),Promise.resolve()},[e,lt,F]),pt=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await Xt({pjcode:e,storyOptionId:t,direction:n});let r=L.findIndex(e=>e.storyOptionId===t);if(r!==-1){let e=r+(n===`up`?-1:1);if(e>=0&&e<L.length){let t=[...L],n=t[r];t[r]=t[e],t[e]=n,Ye({generatedAt:st?.generatedAt,stories:t})}}},[e,L,st?.generatedAt]),mt=(0,y.useCallback)(async t=>{if(e===null)throw Error(`No project specified in the URL path.`);await Ht({pjcode:e,storyName:t})},[e]),[ht,gt]=(0,y.useState)({}),[_t,R]=(0,y.useState)(null),[z,yt]=(0,y.useState)({}),bt=(0,y.useCallback)((t,n)=>{let r=L.find(e=>e.storyOptionId===t)?.color;if(R(t),gt(e=>({...e,[t]:n})),yt(e=>{let n={...e};return delete n[t],n}),e===null||lt===null){gt(e=>r===void 0?e:{...e,[t]:r}),yt(e=>({...e,[t]:`No project or repository configured.`})),R(e=>e===t?null:e);return}qt({pjcode:e,storyOptionId:t,newColor:n,nameWithOwner:lt}).catch(e=>{gt(e=>r===void 0?e:{...e,[t]:r}),yt(n=>({...n,[t]:e instanceof Error?e.message:String(e)}))}).finally(()=>{R(e=>e===t?null:e)})},[e,lt,L]),xt=(0,y.useCallback)(async t=>{if(e===null)throw Error(`No project specified in the URL path.`);await en({pjcode:e,storyOptionId:t}),Ye({generatedAt:st?.generatedAt,stories:L.filter(e=>e.storyOptionId!==t)})},[e,L,st?.generatedAt]),St=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await nn({pjcode:e,storyOptionId:t,newName:n});let r=L.map(e=>e.storyOptionId===t?{...e,storyName:n}:e);Ye({generatedAt:st?.generatedAt,stories:r})},[e,L,st?.generatedAt]),Ct=(0,y.useCallback)(async(t,n)=>{if(e===null)throw Error(`No project specified in the URL path.`);await an({pjcode:e,storyOptionId:t,description:n});let r=L.map(e=>e.storyOptionId===t?{...e,description:n}:e);Ye({generatedAt:st?.generatedAt,stories:r})},[e,L,st?.generatedAt]),wt=Vr(ke,N.comments,D===`prs`),Tt=(0,y.useCallback)((e,t)=>{nt({kind:{type:`ok_and_awaiting_workspace`},item:e,commit:()=>P.okAndMoveToAwaitingWorkspace(e,t),skipAdvance:!0,onAdvance:()=>{E.patchOverlay(ir(e),{done:!0,status:{name:t.name,color:t.color}},D)},revertAdvance:()=>{E.patchOverlay(ir(e),{done:!1},D)}})},[nt,P,E,D]);return(0,x.jsxs)(`main`,{className:`console-app`,children:[F.pending!==null&&(0,x.jsx)(Ke,{message:F.pending.message,color:F.pending.color,remainingSeconds:F.pending.remainingSeconds,progress:F.pending.progress,onUndo:F.undo}),F.error!==null&&(0,x.jsx)(qe,{title:F.error.message,message:`Operation failed: ${F.error.reason}`,onDismiss:F.dismissError}),(0,x.jsx)(Ge,{actions:Te,isOnline:me,isConfirming:Se,onConfirm:we,onDiscard:F.discardOfflineAction}),ne.isOpen&&(0,x.jsx)(S,{pjcodes:v,inputValues:ne.inputValues,onChangeInput:ne.changeInput,isLoading:ne.isLoading,isSaving:ne.isSaving,error:ne.error,onSave:ne.save,onClose:ne.close}),(0,x.jsx)(A,{activeTab:D,counts:re,pjcode:e,pjcodes:v,generatedAt:Ue,fromCache:We,tabHref:ie.tabHref,onSelectTab:se,onSelectProject:j,settingsButton:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(ue,{isOpen:u,isTimerActive:c,timerMode:d,projectMinutes:f,pjcodes:v,isLoadingPjcodes:ee,onOpen:p,onToggleTimerMode:g,onChangeMinutes:_,onSave:h,onClose:m}),(0,x.jsx)(`button`,{type:`button`,className:`console-tab-settings-button`,"aria-label":`Open max settings`,onClick:ne.open,children:`⬆`}),e!==null&&(0,x.jsx)(M,{pjcode:e,storyEntries:L,agentOptions:Ve,defaultNameWithOwner:lt,onCreateIssue:ft,fleetTaskCreateUrl:w})]}),airplaneModeEnabled:t.airplaneMode,airplaneModeStatus:n.status,airplaneModeProgress:n.progress,airplaneModeCapturedAt:r?.capturedAt??null,airplaneModeFailures:n.failures,onAirplaneModeStartSync:n.startSync,onAirplaneModeTurnOff:n.turnOff,projectUrl:e===null?null:b?.[e]??null,workflowImprovementIssueUrl:C,fleetTaskCreateUrl:w,now:fe}),(0,x.jsx)(T,{timerEndsAt:Ee?.timerEndsAt??null,timerTotalSeconds:Ee?.timerTotalSeconds??null,now:fe}),D===`stories`?(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(Be,{stories:L,isLoading:a,error:o,showGray:it,onCreateIssue:dt,onAddStory:mt,onSelectColor:bt,onToggleGray:ot,onReorderStory:pt,onDeleteStory:xt,onRenameStory:St,onUpdateDescription:Ct,optimisticColors:ht,colorChangeInFlight:_t,colorErrors:z})}):Xe===null?D===`queued`?(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(je,{rows:Le,storyColors:Re,statusOptions:ze,agentOptions:Ve,activeItemId:null,isLoading:a,error:o,onSelectItem:e=>ie.openItem(e.projectItemId)})}):D===`prs`?(0,x.jsxs)(`div`,{className:`console-list-screen`,children:[(0,x.jsx)(Oe,{agentOptions:Ve,agentCounts:Ne,selectedAgent:Ae,onAgentChange:Me}),(0,x.jsx)(De,{rows:Le,storyColors:Re,statusOptions:ze,activeItemId:null,now:fe,isLoading:a,error:o,onSelectItem:e=>ie.openItem(e.projectItemId),executiveSummaries:wt,onOkAndAwaitingWorkspace:Tt})]}):(0,x.jsx)(`div`,{className:`console-list-screen`,children:(0,x.jsx)(De,{rows:Le,storyColors:Re,statusOptions:ze,activeItemId:null,now:fe,isLoading:a,error:o,onSelectItem:e=>ie.openItem(e.projectItemId)})}):(0,x.jsx)(`div`,{className:`console-detail-screen`,ref:rt,children:(0,x.jsx)(Pd,{tab:D,item:Xe,caches:N,operations:P,pjcode:e,statusOptions:ze,storyOptions:He,agentOptions:Ve,storyColors:Re,storyName:et,overlayStatus:$e,now:fe,initialCommentDraft:ce.current.get(Xe.projectItemId)??``,onCommentDraftChange:le,onQueueAction:nt,onDeleteStory:ut===null?null:async()=>{await xt(ut.storyOptionId),k()},storyNameForDeletion:ut?.storyName??null,workflowImprovementIssueUrl:C},Xe.projectItemId)})]})};`serviceWorker`in navigator&&navigator.serviceWorker.register(`/sw.js`).catch(e=>{console.warn(`Service worker registration failed:`,e)});var Rd=document.getElementById(`root`);if(Rd===null)throw Error(`Root container #root not found`);(0,b.createRoot)(Rd).render((0,x.jsx)(y.StrictMode,{children:(0,x.jsx)(Ld,{})}));
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>TDPM Console</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-K46baRog.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CMq3t4ne.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@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-font-weight:initial;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--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:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-medium:500;--font-weight-semibold:600;--radius-md:.375rem;--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-input:#e5e5e5;--color-ring:#0a0a0a;--color-background:#fff;--color-foreground:#0a0a0a;--color-primary:#171717;--color-primary-foreground:#fafafa;--color-secondary:#f5f5f5;--color-secondary-foreground:#171717;--color-accent:#f5f5f5;--color-accent-foreground:#171717}}@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%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration: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:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}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]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.block{display:block}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.grow{flex-grow:1}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing) * 2)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-input{border-color:var(--color-input)}.border-transparent{border-color:#0000}.bg-background{background-color:var(--color-background)}.bg-primary{background-color:var(--color-primary)}.bg-secondary{background-color:var(--color-secondary)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-2{padding-block:calc(var(--spacing) * 2)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.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)}.whitespace-nowrap{white-space:nowrap}.text-foreground{color:var(--color-foreground)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.lowercase{text-transform:lowercase}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-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-accent:hover{background-color:var(--color-accent)}.hover\:bg-primary\/90:hover{background-color:#171717e6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--color-primary) 90%, transparent)}}.hover\:bg-secondary\/80:hover{background-color:#f5f5f5cc}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab, var(--color-secondary) 80%, transparent)}}.hover\:text-accent-foreground:hover{color:var(--color-accent-foreground)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--color-ring)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}}html{font-size:clamp(15px,2.1vw,26px)}body{color:#e6edf3;background-color:#0d1117;margin:0;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.console-app{flex-direction:column;width:100%;height:100dvh;display:flex;overflow:hidden}.console-list-screen{flex:1;min-height:0;overflow-y:auto}.console-tabbar{padding-top:env(safe-area-inset-top,0px);padding-left:env(safe-area-inset-left,0px);background:#161b22;border-bottom:2px solid #30363d;flex-direction:column;display:flex}.console-tabbar-top{-webkit-overflow-scrolling:touch;flex-wrap:nowrap;align-items:center;gap:12px;padding:4px 8px;display:flex;overflow-x:auto}.console-tabbar-bottom{-webkit-overflow-scrolling:touch;flex-wrap:nowrap;align-items:stretch;gap:0;padding:0 8px;display:flex;overflow-x:auto}.console-tab{color:#8b949e;white-space:nowrap;cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;align-items:center;gap:6px;margin-bottom:-2px;padding:10px 14px;font-size:.8125rem;font-weight:500;line-height:1.2;text-decoration:none;display:inline-flex}.console-tab:hover{color:#e6edf3}.console-tab[data-active=true]{color:#e6edf3;border-bottom-color:#2f81f7;font-weight:700}.console-tab-badge{text-align:center;color:#e6edf3;background:#484f58;border-radius:20px;min-width:20px;padding:1px 7px;font-size:.6875rem;font-weight:700;line-height:1.5}.console-tab-badge[data-zero=true]{color:#8b949e;background:#30363d}.console-tab-pjname{align-self:center;padding:0 8px}.console-tab-pjname-button{color:#e6edf3;cursor:pointer;background:0 0;border:none;border-radius:4px;align-items:center;gap:3px;padding:2px 4px;font-size:.8125rem;font-weight:600;line-height:1;display:flex}.console-tab-pjname-button:hover{color:#e6edf3;background:#21262d}.console-tab-pjname-arrow{font-size:.625rem}.console-tab-pjname-dropdown{z-index:100;background:#161b22;border:1px solid #30363d;border-radius:6px;min-width:120px;margin:0;padding:4px 0;list-style:none;box-shadow:0 8px 24px #01040980}.console-tab-pjname-option{color:#e6edf3;cursor:pointer;text-align:left;background:0 0;border:none;width:100%;padding:12px 16px;font-size:.7188rem;display:block}.console-tab-pjname-option:hover,.console-tab-pjname-option[data-active=true]{background:#21262d}.console-tab-project-link{color:#8b949e;border-radius:4px;padding:2px 4px;font-size:.7188rem;text-decoration:none}.console-tab-project-link:hover{color:#e6edf3;background:#21262d}.console-tab-geninfo{color:#8b949e;align-self:center;padding:0 4px;font-size:.6875rem}.console-tab-settings{align-self:center;padding:0 4px}.console-project-timer-bar{box-sizing:border-box;background:#2d0000;align-items:center;gap:8px;width:100%;min-height:28px;padding:4px 12px;display:flex;position:relative}.console-project-timer-bar-track{background:#4d0000;border-radius:3px;flex:1;height:6px;overflow:hidden}.console-project-timer-bar-fill{background:#e53e3e;border-radius:3px;height:100%;transition:width .5s linear}.console-project-timer-bar-label{color:#e53e3e;white-space:nowrap;text-align:right;min-width:60px;font-size:.6875rem;font-weight:700}.console-timer-settings-button{color:#8b949e;cursor:pointer;background:0 0;border:none;border-radius:4px;padding:4px 8px;font-size:1rem;line-height:1}.console-timer-settings-button:hover{color:#e6edf3;background:#21262d}.console-timer-settings-button--active{color:#e67e00}.console-timer-settings-overlay{z-index:100;position:fixed;inset:0}.console-timer-settings-backdrop{cursor:default;z-index:-1;background:#01040999;border:none;position:fixed;inset:0}.console-timer-settings-dialog-inner{background:#161b22;border:1px solid #30363d;border-radius:8px;min-width:280px;max-width:400px;max-height:80vh;padding:20px;overflow-y:auto}.console-timer-settings-title{color:#e6edf3;margin:0 0 16px;font-size:.9375rem;font-weight:600}.console-timer-settings-row{justify-content:space-between;align-items:center;margin-bottom:16px;display:flex}.console-timer-settings-label{color:#c9d1d9;font-size:.875rem}.console-timer-settings-loading{color:#8b949e;padding:8px 0;font-size:.875rem}.console-timer-settings-project-list{margin:0;padding:0;list-style:none}.console-timer-settings-project-row{border-bottom:1px solid #21262d;align-items:center;gap:8px;padding:6px 0;display:flex}.console-timer-settings-project-row:last-child{border-bottom:none}.console-timer-settings-pjcode{color:#c9d1d9;flex:1;font-family:ui-monospace,SFMono-Regular,monospace;font-size:.8125rem}.console-timer-settings-minutes-input{color:#e6edf3;text-align:right;background:#0d1117;border:1px solid #30363d;border-radius:4px;width:56px;padding:3px 6px;font-size:.8125rem}.console-timer-settings-minutes-label{color:#8b949e;width:24px;font-size:.75rem}.console-timer-settings-actions{justify-content:flex-end;margin-top:16px;display:flex}.console-timer-settings-save{color:#fff;cursor:pointer;background:#238636;border:1px solid #f0f6fc1a;border-radius:6px;padding:6px 14px;font-size:.8125rem;font-weight:500}.console-timer-settings-save:hover{background:#2ea043}.console-toggle-switch{cursor:pointer;background:#30363d;border:none;border-radius:12px;flex-shrink:0;align-items:center;width:44px;height:24px;padding:2px;transition:background .2s;display:inline-flex;position:relative}.console-toggle-switch--on{background:#238636}.console-toggle-switch-thumb{background:#e6edf3;border-radius:50%;width:20px;height:20px;transition:transform .2s;display:block}.console-toggle-switch--on .console-toggle-switch-thumb{transform:translate(20px)}.console-toggle-switch:focus-visible{outline-offset:2px;outline:2px solid #58a6ff}.console-tab-settings-button{color:#8b949e;cursor:pointer;background:0 0;border:1px solid #30363d;border-radius:6px;align-self:center;margin-left:4px;padding:4px 8px;font-size:1rem;line-height:1}.console-tab-settings-button:hover{color:#e6edf3;border-color:#58a6ff}.console-settings-modal{z-index:1000;background:#0d1117;flex-direction:column;display:flex;position:fixed;inset:0}.console-settings-modal-bar{background:#161b22;border-bottom:1px solid #30363d;justify-content:space-between;align-items:center;padding:12px 18px;display:flex}.console-settings-modal-title{color:#e6edf3;font-size:1rem;font-weight:600}.console-settings-modal-close{color:#8b949e;cursor:pointer;background:0 0;border:none;padding:4px 8px;font-size:1.125rem;line-height:1}.console-settings-modal-close:hover{color:#e6edf3}.console-settings-modal-body{flex-direction:column;flex:1;gap:16px;padding:24px 18px;display:flex}.console-settings-modal-loading{color:#8b949e;font-size:.875rem}.console-settings-modal-project-list{flex-direction:column;gap:12px;margin:0;padding:0;list-style:none;display:flex}.console-settings-modal-project-row{flex-direction:column;gap:6px;display:flex}.console-settings-modal-label{color:#e6edf3;font-size:.875rem;font-weight:500}.console-settings-modal-input{color:#e6edf3;background:#0d1117;border:1px solid #30363d;border-radius:6px;max-width:200px;padding:6px 10px;font-size:.875rem}.console-settings-modal-input:focus{border-color:#58a6ff;outline:none}.console-settings-modal-error{color:#f85149;font-size:.875rem}.console-settings-modal-actions{gap:8px;display:flex}.console-settings-modal-save{color:#fff;cursor:pointer;background:#238636;border:1px solid #2ea043;border-radius:6px;padding:6px 16px;font-size:.875rem;font-weight:500}.console-settings-modal-save:hover:not(:disabled){background:#2ea043}.console-settings-modal-save:disabled{opacity:.5;cursor:not-allowed}.console-list{margin:0;padding:12px 18px 18px;list-style:none}.console-list-group{list-style:none}.console-item-row .console-item-icon{flex:none}.console-queued-item-title{text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;min-width:0;overflow:hidden}.console-queued-item-badges{flex-wrap:wrap;flex:1 1 0;align-items:center;gap:4px;min-width:0;display:flex}.console-queued-item-actions{flex:1 1 0;min-width:0}.console-group-header{background:#0b0f14;border-bottom:1px solid #21262d;justify-content:space-between;align-items:center;padding:6px 12px;display:flex}.console-storytag{align-items:center;gap:8px;font-size:.8125rem;font-weight:700;display:inline-flex}.console-story-dot{border-radius:999px;width:10px;height:10px;display:inline-block}.console-copy-story-name-button{color:#c9d1d9;border:1px solid #30363d;border-radius:6px;height:24px;padding:0 8px;font-size:.75rem}.console-copy-story-name-button:hover{color:#e6edf3;background-color:#21262d}.console-group-count{color:#8b949e;font-size:.75rem}.console-story-color-palette{flex-wrap:wrap;gap:4px;padding:6px 0;display:flex}.console-story-color-swatch{cursor:pointer;color:#e6edf3;border:2px solid #0000;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;padding:0;font-size:.625rem;display:inline-flex}.console-story-color-swatch:hover{border-color:#e6edf3}.console-story-color-swatch:disabled{opacity:.4;cursor:not-allowed}.console-story-color-swatch-label{font-size:.5rem;line-height:1}.console-item-row{color:#e6edf3;text-align:left;cursor:pointer;background:#161b22;border:1px solid #30363d;border-radius:8px;align-items:flex-start;gap:14px;width:100%;margin-bottom:10px;padding:12px 16px;display:flex}.console-item-row:hover{background:#1a2029;border-color:#484f58}.console-item-row[data-active=true]{background:#1a2029;border-color:#4493f8}.console-item-meta{flex:1;min-width:0}.console-item-title{align-items:center;gap:6px;font-size:.9063rem;font-weight:600;display:flex}.console-item-sub{color:#8b949e;margin-top:3px;font-size:.7813rem;display:block}.console-item-pill{color:#8b949e;border:1px solid #30363d;border-radius:20px;margin-right:6px;padding:1px 8px;font-size:.6875rem;display:inline-block}.console-item-createdat{color:#8b949e;cursor:help}.console-item-fields,.console-item-status-agent{color:#adbac7;flex-wrap:wrap;gap:4px 10px;margin-top:4px;font-size:.7188rem;display:flex}.console-item-field{word-break:break-all;align-items:baseline;gap:4px;min-width:0;display:inline-flex}.console-item-field-label{color:#6e7681;text-transform:uppercase;letter-spacing:.03em;font-size:.625rem}.console-item-executive-summary{color:#8b949e;white-space:pre-line;word-break:break-word;background:#0d1117;border-left:2px solid #30363d;border-radius:0 4px 4px 0;margin-top:6px;padding:6px 8px;font-size:.75rem;display:block}.console-list-message{color:#8b949e;padding:16px;font-size:.875rem}.console-list-empty{text-align:center;color:#8b949e;padding:40px;font-size:.875rem}.console-list-error,.console-detail-fetch-error{color:#f85149}.console-detail-fetch-error-line{margin:0}.console-comment-notloaded,.console-files-notloaded,.console-commits-notloaded,.console-detail-body-notloaded{color:#8b949e}.console-detail{flex-direction:column;flex:1;min-height:0;display:flex}.console-detail-header{background:#0d1117;flex-direction:column;flex-shrink:0;gap:12px;padding:16px 16px 12px;display:flex}.console-detail-body{flex-direction:column;flex:1;gap:12px;min-height:0;padding:0 16px 12px;display:flex;overflow-y:auto}.console-detail-topline{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.console-detail-title{align-items:center;gap:8px;margin:0;font-size:1.25rem;display:flex}.console-detail-title-text{flex:1}.console-detail-number{color:#8b949e;font-weight:400}.console-detail-closed-label{color:#a371f7;font-size:.8125rem}.console-detail-subbar{align-items:center;gap:12px;font-size:.8125rem;display:flex}.console-detail-link{color:#4493f8}.console-detail-repo{color:#8b949e;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.console-copy-url-button{color:#c9d1d9;border:1px solid #30363d;border-radius:6px;height:24px;padding:0 8px;font-size:.75rem}.console-copy-url-button:hover{color:#e6edf3;background-color:#21262d}.console-label-chip,.console-detail-status-chip{border:1px solid #30363d;border-radius:999px;padding:2px 8px;font-size:.75rem;display:inline-block}.console-detail-agent-chip{color:#8b949e;border:1px solid #30363d;border-radius:999px;padding:2px 8px;font-size:.75rem;font-weight:400;display:inline-block}.console-detail-pr-status{flex-wrap:wrap;align-items:center;gap:6px;display:inline-flex}.console-related-pr-group{align-items:center;gap:6px;display:inline-flex}.console-related-pr-label{color:#8b949e;font-size:.75rem}.console-detail-ci-missing{opacity:.85;font-weight:400}.console-detail-mergeable-chip{font-weight:600}.console-detail-mergeable-chip-unknown{opacity:.7;font-weight:400}.console-detail-createdat{color:#8b949e;font-size:.75rem}.console-panel{border:1px solid #30363d;border-radius:8px;overflow:clip}.console-panel-header{background:#161b22;justify-content:space-between;align-items:center;display:flex}.console-panel-toggle{color:#e6edf3;text-align:left;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;gap:8px;padding:6px 12px;font-size:.875rem;font-weight:600;display:flex}.console-panel-toggle:hover{background:#1a2029}.console-panel-action{padding:6px 12px}.console-panel-body{padding:12px}.console-markdown{word-break:break-word;font-size:.875rem;line-height:1.5}.console-markdown ul{margin:.5em 0;padding-left:1.5em;list-style:outside}.console-markdown ol{margin:.5em 0;padding-left:1.5em;list-style:decimal}.console-markdown li{margin:.25em 0}.console-markdown table{border-collapse:collapse;margin:.5em 0}.console-markdown th,.console-markdown td{border:1px solid #30363d;padding:4px 8px}.console-markdown th{background:#161b22}.console-markdown h1,.console-markdown h2,.console-markdown h3,.console-markdown h4,.console-markdown h5,.console-markdown h6{margin:1em 0 .5em;font-weight:700;line-height:1.25}.console-markdown h1{font-size:1.6em}.console-markdown h2{font-size:1.4em}.console-markdown h3{font-size:1.2em}.console-markdown h4{font-size:1.05em}.console-markdown h5{font-size:.95em}.console-markdown h6{color:#8b949e;font-size:.9em}.console-markdown pre{background:#161b22;border:1px solid #30363d;border-radius:6px;margin:.5em 0;padding:12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.8125rem;line-height:1.45;overflow-x:auto}.console-markdown code{background:#6e768166;border-radius:4px;padding:.15em .4em;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em}.console-markdown pre code{font-size:inherit;background:0 0;border-radius:0;padding:0}.console-markdown-code-block{flex-direction:column;margin:.5em 0;display:flex}.console-markdown-code-block pre{margin:0}.console-markdown-code-copy-host{justify-content:flex-end;margin-bottom:4px;display:flex}.console-copy-code-button{color:#c9d1d9;background-color:#161b22;border:1px solid #30363d;border-radius:6px;height:24px;padding:0 8px;font-size:.75rem}.console-copy-code-button:hover{color:#e6edf3;background-color:#21262d}.console-markdown blockquote{color:#8b949e;border-left:3px solid #30363d;margin:.5em 0;padding:0 1em}.console-markdown a{color:#4493f8;text-decoration:none}.console-markdown a:hover{text-decoration:underline}.console-markdown-reference-host{display:inline}.console-markdown-reference{vertical-align:baseline;align-items:center;gap:.25em;display:inline-flex}.console-markdown-reference .console-item-icon{flex-shrink:0}.console-markdown-reference-title{text-decoration:none}.console-markdown-reference:hover .console-markdown-reference-title{text-decoration:underline}.console-markdown-reference-number{color:#8b949e;flex-shrink:0;font-size:.75em}.console-markdown hr{border:none;border-top:1px solid #30363d;margin:1em 0}.console-mermaid-error{color:#f85149;font-size:.8125rem}.console-mermaid-enlarge{color:#e6edf3;background:#21262d;border:1px solid #30363d;border-radius:6px;width:100%;margin-top:6px;padding:10px 12px;font-size:.8125rem;display:block}.console-mermaid-modal{z-index:1000;background:#0d1117;flex-direction:column;display:flex;position:fixed;inset:0}.console-mermaid-modal-bar{border-bottom:1px solid #30363d;align-items:center;gap:8px;padding:8px 12px;display:flex}.console-mermaid-modal-button,.console-mermaid-modal-close{color:#e6edf3;background:#21262d;border:1px solid #30363d;border-radius:6px;min-width:44px;min-height:44px;font-size:1.125rem}.console-mermaid-modal-button:disabled{opacity:.4}.console-mermaid-modal-close{margin-left:auto}.console-mermaid-modal-scale{text-align:center;color:#8b949e;min-width:4.5rem;font-size:.875rem}.console-mermaid-modal-viewport{-webkit-overflow-scrolling:touch;flex:1;overflow:auto}.console-mermaid-modal-canvas{min-width:100%}.console-comment{white-space:nowrap;background:#161b22;border:1px solid #30363d;border-radius:8px;align-items:baseline;gap:8px;margin-bottom:4px;padding:6px 16px;display:flex;overflow:hidden}.console-comment-toggle{min-width:0;color:inherit;font:inherit;cursor:pointer;text-align:left;background:0 0;border:none;flex:1;align-items:baseline;gap:8px;padding:0;display:inline-flex}.console-comment-show-all{color:#e6edf3;cursor:pointer;background:#21262d;border:1px solid #30363d;border-radius:6px;margin-bottom:10px;padding:6px 12px;font-size:.75rem;font-weight:600}.console-comment-show-all:hover{background-color:#262c34;border-color:#484f58}.console-comment--expandable{cursor:pointer}.console-comment--expandable:hover{border-color:#484f58}.console-comment-author{color:#e6edf3;flex-shrink:0;font-size:.75rem;font-weight:600}.console-comment-time{color:#8b949e;flex-shrink:0;font-size:.75rem}.console-comment-body-preview{text-overflow:ellipsis;white-space:nowrap;color:#8b949e;flex:1;min-width:0;font-size:.75rem;overflow:hidden}.console-comment.is-expanded{white-space:normal;flex-wrap:wrap;overflow:visible}.console-comment-body-expanded{cursor:default;flex-basis:100%;min-width:0}.console-files,.console-commits{margin:0;padding:0;list-style:none}.console-commit{align-items:center;gap:8px;padding:4px 0;font-size:.8125rem;display:flex}.console-file{flex-direction:column;font-size:.8125rem;display:flex}.console-file-tree,.console-file-tree-children{margin:0;padding:0;list-style:none}.console-file-tree-dir{flex-direction:column;display:flex}.console-file-tree-dir-name{color:#8b949e;align-items:center;gap:6px;padding:4px 0;font-weight:600;display:flex}.console-file-tree-dir-icon{flex:none}.console-file-badge{text-align:center;border:1px solid;border-radius:4px;width:18px;font-size:.6875rem}.console-file-path,.console-commit-message{flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.console-file-add,.console-pr-add{color:#3fb950}.console-file-del,.console-pr-del{color:#f85149}.console-commit-sha{color:#8b949e;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.console-detail-dock{background:#161b22;border-top:2px solid #30363d;flex-shrink:0;max-height:45dvh;overflow-y:auto}.console-detail-dock-composer{max-height:50vh;padding:8px 16px 0;overflow-y:auto}.console-actionbar{padding:10px 16px;padding-bottom:calc(10px + env(safe-area-inset-bottom));background:#161b22}.console-operation-bar{flex-direction:column;gap:8px;width:100%;display:flex}.console-op-group{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.console-op-group-review{gap:10px}.console-op-group-rare-actions{justify-content:flex-start}.console-op-group-left-pair{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.console-op-group-bottom-row{justify-content:space-between;align-items:center;gap:8px;display:flex}.console-op-group-stories{max-height:33vh;overflow-y:auto}.console-story-select,.console-agent-select{color:#e6edf3;cursor:pointer;background:#21262d;border:1px solid #30363d;border-radius:6px;max-width:100%;padding:9px 12px;font-size:.8125rem;font-weight:600}.console-story-select:hover,.console-agent-select:hover{border-color:#484f58}.console-op-button{color:#e6edf3;white-space:nowrap;cursor:pointer;background:#21262d;border:1px solid #30363d;border-radius:6px;padding:9px 16px;font-size:.8125rem;font-weight:600}.console-op-button:hover{border-color:#484f58}.console-op-button:disabled{opacity:.4;cursor:not-allowed}.console-op-requirement{text-align:right;color:#8b949e;width:100%;margin:0;font-size:.75rem}.console-op-button-approve{color:#fff;background:#238636;border-color:#2ea043}.console-op-button-reject{color:#ffd166;background:#7d5000;border-color:#a06800}.console-op-button-wrong{color:#f85149;background:#3a1518;border-color:#f85149}.console-op-button-unneeded{color:#aab0b8;background:#2a2d31;border-color:#6e7681}.console-op-button-snooze{color:#79c0ff;background:#1c2b4a;border-color:#4493f8}.console-op-button-danger{color:#f85149;background:#3a1518;border-color:#f85149}.console-pr-section{border:1px solid #30363d;border-radius:8px;flex-direction:column;gap:10px;padding:12px;display:flex}.console-pr-statbar{color:#8b949e;gap:12px;font-size:.75rem;display:flex}.console-pr-repo{color:#8b949e;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.console-detail-screen{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.console-panel-open-link{color:#4493f8;font-size:.8125rem;font-weight:400}.console-composer{margin-top:4px}.console-composer-toggle{color:#8b949e;cursor:pointer;background:0 0;border:none;margin-left:auto;padding:2px 0;font-size:.7813rem;display:block}.console-composer-toggle:hover{color:#e6edf3}.console-composer-form{margin-top:8px}.console-composer-input{box-sizing:border-box;color:#e6edf3;width:100%;font:inherit;resize:vertical;background:#21262d;border:1px solid #30363d;border-radius:6px;padding:8px;font-size:.875rem}.console-composer-attach{align-items:center;gap:8px;padding:0 10px;display:flex}.console-composer-file-input{display:none}.console-composer-attach-button{color:#c9d1d9;cursor:pointer;background:#21262d;border:1px solid #30363d;border-radius:4px;padding:4px 8px;font-size:.75rem}.console-composer-attach-button:disabled{opacity:.6;cursor:default}.console-composer-row{justify-content:flex-end;align-items:center;gap:8px;margin-top:6px;display:flex}.console-composer-submit{color:#fff;cursor:pointer;background:#238636;border:1px solid #2ea043;border-radius:6px;padding:7px 16px;font-size:.8125rem;font-weight:600}.console-composer-submit:disabled{opacity:.6;cursor:default}.console-composer-status{color:#8b949e;font-size:.75rem}.console-composer-error{color:#f85149}.console-undo-toast,.console-error-toast{z-index:9998;white-space:nowrap;border-radius:10px;align-items:center;gap:12px;max-width:92vw;padding:12px 18px;font-size:.8438rem;display:flex;position:fixed;top:12px;left:50%;transform:translate(-50%);box-shadow:0 4px 20px #0009}.console-undo-toast-green{color:#3fb950;background:#0d3320;border:1px solid #2ea043}.console-undo-toast-amber{color:#ffd166;background:#3a2800;border:1px solid #a06800}.console-undo-toast-red{color:#f85149;background:#3a1518;border:1px solid #da3633}.console-undo-toast-gray{color:#aab0b8;background:#2a2d31;border:1px solid #6e7681}.console-undo-toast-blue{color:#79c0ff;background:#0d1f40;border:1px solid #4493f8}.console-undo-toast-error{color:#f85149;background:#3a1518;border:1px solid #f85149}.console-undo-toast-message,.console-error-toast-message{text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.console-undo-toast-undo,.console-error-toast-dismiss{cursor:pointer;color:inherit;background:#ffffff1f;border:none;border-radius:6px;flex:none;padding:4px 12px;font-size:.8125rem;font-weight:700}.console-undo-toast-undo:hover,.console-error-toast-dismiss:hover{background:#ffffff38}.console-undo-toast-countdown{opacity:.7;flex:none;font-size:.6875rem}.console-undo-toast-bar{opacity:.5;background:currentColor;border-radius:0 0 10px 10px;height:3px;transition:width .1s linear;position:absolute;bottom:0;left:0}.console-error-toast-title{flex:none;font-weight:700}.console-file-row{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;padding:4px 0;font-size:.8125rem;display:flex}.console-file-row:hover{background:#1a2029}.console-file-caret{color:#8b949e;flex:none;width:1em}.console-file-diff{border-collapse:collapse;width:100%;margin:4px 0 8px;font:.8125rem/1.6 ui-monospace,SFMono-Regular,Menlo,monospace}.console-file-diff td{white-space:pre-wrap;word-break:break-word;vertical-align:top;padding:0 10px}.console-diff-ln{text-align:right;color:#6e7681;-webkit-user-select:none;user-select:none;white-space:nowrap;border-right:1px solid #30363d;width:1%;padding:0 8px}.console-file-diff td.console-diff-ln{white-space:nowrap;word-break:normal;overflow-wrap:normal}.console-diff-add td{background:#2ea04326}.console-diff-add .console-diff-code{color:#aff5b4}.console-diff-del td{background:#f8514926}.console-diff-del .console-diff-code{color:#ffdcd7}.console-diff-hunk td{color:#79c0ff;background:#161b22}.console-diff-ctx .console-diff-code{color:#c9d1d9}.console-file-diff-empty{color:#8b949e;padding:8px 14px;font-size:.75rem}.console-file-diff-image{padding:8px 14px}.console-file-diff-image-content{object-fit:contain;object-position:left top;border:1px solid #30363d;border-radius:4px;max-width:100%;max-height:420px}.console-diff-comment-cell{text-align:center;-webkit-user-select:none;user-select:none;width:1%;padding:0 2px}.console-diff-comment-button{color:#6e7681;cursor:pointer;opacity:.6;background:0 0;border:1px solid #30363d;border-radius:4px;width:18px;height:18px;padding:0;font-size:.875rem;line-height:16px}.console-diff-row:hover .console-diff-comment-button,.console-diff-comment-button:focus-visible,.console-diff-comment-button[aria-expanded=true]{opacity:1;color:#fff;background:#1f6feb;border-color:#2f81f7}.console-diff-composer-row td{background:#0d1117;padding:6px 10px}.console-diff-composer{background:#161b22;border:1px solid #30363d;border-radius:6px;flex-direction:column;gap:6px;padding:8px;display:flex}.console-diff-composer-anchor{color:#8b949e;font-size:.6875rem}.console-diff-composer-input{resize:vertical;color:#c9d1d9;width:100%;font:inherit;background:#0d1117;border:1px solid #30363d;border-radius:6px;padding:6px 8px}.console-diff-composer-controls{align-items:center;gap:8px;display:flex}.console-diff-composer-submit{color:#fff;cursor:pointer;background:#238636;border:1px solid #238636;border-radius:6px;padding:4px 12px}.console-diff-composer-submit:disabled{opacity:.6;cursor:default}.console-diff-composer-cancel{color:#c9d1d9;cursor:pointer;background:0 0;border:1px solid #30363d;border-radius:6px;padding:4px 12px}.console-diff-composer-status{color:#8b949e;font-size:.75rem}.console-diff-composer-error{color:#ff7b72}.console-diff-composer-posted{color:#3fb950;margin:0;font-size:.75rem}.console-pr-header{flex-wrap:wrap;align-items:center;gap:10px;padding-top:4px;display:flex}.console-pr-section-title{color:#e6edf3;font-size:.9375rem;font-weight:600}.console-pr-section-state{color:#8b949e;border:1px solid #6e7681;border-radius:999px;padding:1px 8px;font-size:.6875rem}.console-offline-panel{background:#161b22;border-bottom:2px solid #30363d}.console-offline-panel-header{color:#c9d1d9;border-bottom:1px solid #21262d;padding:8px 16px;font-size:.8125rem;font-weight:600}.console-offline-panel-item{border-bottom:1px solid #21262d;border-left:3px solid #30363d;flex-direction:column;gap:4px;padding:10px 16px;display:flex}.console-offline-panel-item:last-child{border-bottom:none}.console-offline-panel-item-green{background:#0d332066;border-left-color:#2ea043}.console-offline-panel-item-amber{background:#3a280066;border-left-color:#a06800}.console-offline-panel-item-red{background:#3a151866;border-left-color:#da3633}.console-offline-panel-item-gray{background:#2a2d3166;border-left-color:#6e7681}.console-offline-panel-item-blue{background:#0d1f4066;border-left-color:#4493f8}.console-offline-panel-item-error{background:#3a151866;border-left-color:#f85149}.console-offline-panel-item-message{color:#e6edf3;font-size:.8125rem;font-weight:600}.console-offline-panel-item-target{color:#8b949e;font-size:.75rem}.console-offline-panel-item-fetch-error{color:#f85149;font-size:.75rem}.console-offline-panel-item-pr-status{color:#8b949e;font-size:.75rem}.console-offline-panel-item-controls{gap:8px;margin-top:4px;display:flex}.console-offline-panel-confirm{color:#fff;cursor:pointer;background:#238636;border:1px solid #2ea043;border-radius:6px;padding:4px 12px;font-size:.75rem;font-weight:600}.console-offline-panel-confirm:hover:not(:disabled){background:#2ea043}.console-offline-panel-confirm:disabled{opacity:.4;cursor:not-allowed}.console-offline-panel-discard{color:#8b949e;cursor:pointer;background:0 0;border:1px solid #30363d;border-radius:6px;padding:4px 12px;font-size:.75rem;font-weight:600}.console-offline-panel-discard:hover{color:#f85149;border-color:#f85149}.console-task-create-button{color:#8b949e;cursor:pointer;white-space:nowrap;background:0 0;border:1px solid #30363d;border-radius:6px;align-self:center;margin-left:4px;padding:4px 8px;font-size:.8125rem;line-height:1}.console-task-create-button:hover{color:#e6edf3;border-color:#58a6ff}.console-task-create-button:disabled{opacity:.4;cursor:not-allowed}.console-task-create-form{flex-wrap:wrap;align-items:center;gap:4px;margin-left:4px;display:flex}.console-task-create-form-select{color:#e6edf3;cursor:pointer;background:#161b22;border:1px solid #30363d;border-radius:6px;padding:3px 6px;font-size:.8125rem}.console-task-create-form-input{color:#e6edf3;background:#0d1117;border:1px solid #30363d;border-radius:6px;min-width:160px;padding:3px 8px;font-size:.8125rem}.console-task-create-form-input:focus{border-color:#58a6ff;outline:none}.console-task-create-form-submit,.console-task-create-form-cancel{color:#e6edf3;cursor:pointer;white-space:nowrap;background:#21262d;border:1px solid #30363d;border-radius:6px;padding:3px 10px;font-size:.8125rem}.console-task-create-form-submit:hover,.console-task-create-form-cancel:hover{border-color:#484f58}.console-task-create-form-submit:disabled,.console-task-create-form-cancel:disabled{opacity:.4;cursor:not-allowed}.console-task-create-dialog-overlay{z-index:1000;background:#01040999;justify-content:center;align-items:flex-start;padding-top:60px;display:flex;position:fixed;inset:0}.console-task-create-dialog{background:#0d1117;border:1px solid #30363d;border-radius:8px;flex-direction:column;width:100%;max-width:560px;max-height:calc(100vh - 100px);display:flex;overflow:hidden}.console-task-create-dialog-bar{background:#161b22;border-bottom:1px solid #30363d;flex-shrink:0;justify-content:space-between;align-items:center;padding:12px 18px;display:flex}.console-task-create-dialog-title{color:#e6edf3;font-size:1rem;font-weight:600}.console-task-create-dialog-bar-actions{align-items:center;gap:4px;display:flex}.console-task-create-dialog-open-link{color:#8b949e;align-items:center;padding:4px 8px;font-size:1.125rem;line-height:1;text-decoration:none;display:inline-flex}.console-task-create-dialog-open-link:hover{color:#e6edf3}.console-task-create-dialog-close{color:#8b949e;cursor:pointer;background:0 0;border:none;padding:4px 8px;font-size:1.125rem;line-height:1}.console-task-create-dialog-close:hover{color:#e6edf3}.console-task-create-dialog-body{flex-direction:column;flex:1;gap:10px;min-height:0;padding:20px 18px;display:flex;overflow-y:auto}.console-task-create-dialog-section-label{color:#e6edf3;font-size:.875rem;font-weight:500}.console-task-create-dialog-textarea{color:#e6edf3;resize:vertical;background:#0d1117;border:1px solid #30363d;border-radius:6px;min-height:72px;padding:8px 10px;font-size:.875rem}.console-task-create-dialog-textarea:focus{border-color:#58a6ff;outline:none}.console-task-create-dialog-option-list{flex-wrap:wrap;gap:6px;max-height:160px;display:flex;overflow-y:auto}.console-task-create-dialog-option-button{color:#c9d1d9;cursor:pointer;white-space:nowrap;background:#21262d;border:1px solid #30363d;border-radius:20px;padding:4px 10px;font-size:.8125rem}.console-task-create-dialog-option-button:hover{color:#e6edf3;border-color:#58a6ff}.console-task-create-dialog-option-button--selected{color:#fff;background:#1f6feb;border-color:#1f6feb}.console-task-create-dialog-input{color:#e6edf3;background:#0d1117;border:1px solid #30363d;border-radius:6px;padding:6px 10px;font-size:.875rem}.console-task-create-dialog-input:focus{border-color:#58a6ff;outline:none}.console-task-create-dialog-file-input{color:#8b949e;font-size:.8125rem}.console-task-create-dialog-file-list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.console-task-create-dialog-file-item{background:#161b22;border:1px solid #30363d;border-radius:6px;align-items:center;gap:8px;padding:4px 8px;display:flex}.console-task-create-dialog-file-thumbnail{object-fit:cover;border-radius:4px;flex-shrink:0;width:32px;height:32px}.console-task-create-dialog-file-name{color:#c9d1d9;text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:.8125rem;overflow:hidden}.console-task-create-dialog-file-remove{color:#8b949e;cursor:pointer;background:0 0;border:none;flex-shrink:0;padding:2px 6px;font-size:.875rem;line-height:1}.console-task-create-dialog-file-remove:hover{color:#f85149}.console-task-create-dialog-file-remove:disabled{opacity:.5;cursor:not-allowed}.console-task-create-dialog-actions{justify-content:flex-end;gap:8px;margin-top:4px;display:flex}.console-task-create-dialog-submit{color:#fff;cursor:pointer;background:#238636;border:1px solid #2ea043;border-radius:6px;padding:6px 16px;font-size:.875rem;font-weight:500}.console-task-create-dialog-submit:hover:not(:disabled){background:#2ea043}.console-task-create-dialog-submit:disabled{opacity:.5;cursor:not-allowed}.console-task-create-dialog-cancel{color:#c9d1d9;cursor:pointer;background:#21262d;border:1px solid #30363d;border-radius:6px;padding:6px 16px;font-size:.875rem}.console-task-create-dialog-cancel:hover:not(:disabled){border-color:#484f58}.console-task-create-dialog-cancel:disabled{opacity:.5;cursor:not-allowed}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{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}
|