@spencerboucher/switchyard 0.9.0 → 0.10.0
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/README.md +2 -2
- package/dist/switchyard.mjs +7073 -5396
- package/dist/terminal/holder.js +30 -4
- package/package.json +1 -1
- package/web-dist/assets/AutomationView-BsTwLnMp.js +2 -0
- package/web-dist/assets/{AutomationView-D7Syv1En.js.map → AutomationView-BsTwLnMp.js.map} +1 -1
- package/web-dist/assets/Card-CAFxHoHd.js +2 -0
- package/web-dist/assets/Card-CAFxHoHd.js.map +1 -0
- package/web-dist/assets/Checkbox-rDvnQnxc.js +2 -0
- package/web-dist/assets/Checkbox-rDvnQnxc.js.map +1 -0
- package/web-dist/assets/Copy-D8xhl7eJ.js +2 -0
- package/web-dist/assets/{Copy-B6XSAIUd.js.map → Copy-D8xhl7eJ.js.map} +1 -1
- package/web-dist/assets/DangerZone-og55TRug.js +2 -0
- package/web-dist/assets/DangerZone-og55TRug.js.map +1 -0
- package/web-dist/assets/{Field-D-Ty7fKT.js → Field-Dbg_8KTt.js} +2 -2
- package/web-dist/assets/{Field-D-Ty7fKT.js.map → Field-Dbg_8KTt.js.map} +1 -1
- package/web-dist/assets/{InteractionCard-DF1EcSpm.js → InteractionCard-Yu5wgLC3.js} +4 -4
- package/web-dist/assets/{InteractionCard-DF1EcSpm.js.map → InteractionCard-Yu5wgLC3.js.map} +1 -1
- package/web-dist/assets/Menu-euseM8yR.js +2 -0
- package/web-dist/assets/Menu-euseM8yR.js.map +1 -0
- package/web-dist/assets/Overlay-BNPvMjLX.js +2 -0
- package/web-dist/assets/{Overlay-DUQwh6_b.js.map → Overlay-BNPvMjLX.js.map} +1 -1
- package/web-dist/assets/Priority-Ca1B2yFr.js +2 -0
- package/web-dist/assets/{Priority-CHmzfoHg.js.map → Priority-Ca1B2yFr.js.map} +1 -1
- package/web-dist/assets/{SegmentedControl-C_hEVQMB.js → SegmentedControl-D2d-NEr-.js} +2 -2
- package/web-dist/assets/{SegmentedControl-C_hEVQMB.js.map → SegmentedControl-D2d-NEr-.js.map} +1 -1
- package/web-dist/assets/{Select-Cfql4Nwu.js → Select-C9L1HKMm.js} +2 -2
- package/web-dist/assets/{Select-Cfql4Nwu.js.map → Select-C9L1HKMm.js.map} +1 -1
- package/web-dist/assets/StatusChip-BYuVxYS7.js +2 -0
- package/web-dist/assets/StatusChip-BYuVxYS7.js.map +1 -0
- package/web-dist/assets/{Switch-DBfzmqkm.js → Switch-DAcUcSbH.js} +2 -2
- package/web-dist/assets/{Switch-DBfzmqkm.js.map → Switch-DAcUcSbH.js.map} +1 -1
- package/web-dist/assets/{Tabs-BNuL3_Et.js → Tabs-xtagjtA5.js} +2 -2
- package/web-dist/assets/{Tabs-BNuL3_Et.js.map → Tabs-xtagjtA5.js.map} +1 -1
- package/web-dist/assets/{TextArea-CKybrQyn.js → TextArea-CKGHwURx.js} +2 -2
- package/web-dist/assets/{TextArea-CKybrQyn.js.map → TextArea-CKGHwURx.js.map} +1 -1
- package/web-dist/assets/{TextLink-OzzyP2-p.js → TextLink-Bub7sMxr.js} +2 -2
- package/web-dist/assets/{TextLink-OzzyP2-p.js.map → TextLink-Bub7sMxr.js.map} +1 -1
- package/web-dist/assets/attention-CI4dHY81.js +2 -0
- package/web-dist/assets/{attention-V86Gye3I.js.map → attention-CI4dHY81.js.map} +1 -1
- package/web-dist/assets/auth-308hUVgi.js +2 -0
- package/web-dist/assets/auth-308hUVgi.js.map +1 -0
- package/web-dist/assets/automations-BzpsJoa3.js +2 -0
- package/web-dist/assets/{automations-Cw5Gacgm.js.map → automations-BzpsJoa3.js.map} +1 -1
- package/web-dist/assets/bell-DSwa2PAb.js +2 -0
- package/web-dist/assets/bell-DSwa2PAb.js.map +1 -0
- package/web-dist/assets/board-CeJxBVHC.js +10 -0
- package/web-dist/assets/board-CeJxBVHC.js.map +1 -0
- package/web-dist/assets/code-DkNQvMI9.js +12 -0
- package/web-dist/assets/code-DkNQvMI9.js.map +1 -0
- package/web-dist/assets/describe-CVXeUClF.js +5 -0
- package/web-dist/assets/{describe-D6KLGKWa.js.map → describe-CVXeUClF.js.map} +1 -1
- package/web-dist/assets/enroll-jnKygG4L.js +2 -0
- package/web-dist/assets/{enroll-DwT7AcuS.js.map → enroll-jnKygG4L.js.map} +1 -1
- package/web-dist/assets/index-BHGZTS2e.js +16 -0
- package/web-dist/assets/index-BHGZTS2e.js.map +1 -0
- package/web-dist/assets/index-D2ml031z.css +2 -0
- package/web-dist/assets/{more-DQR5uu1c.js → more-DvKHMdBk.js} +2 -2
- package/web-dist/assets/{more-DQR5uu1c.js.map → more-DvKHMdBk.js.map} +1 -1
- package/web-dist/assets/queue-B2Vl0uSh.js +2 -0
- package/web-dist/assets/{queue-DUg1rS8t.js.map → queue-B2Vl0uSh.js.map} +1 -1
- package/web-dist/assets/repo-BDS8RBxq.js +2 -0
- package/web-dist/assets/repo-BDS8RBxq.js.map +1 -0
- package/web-dist/assets/settings-CLt7x9u8.js +8 -0
- package/web-dist/assets/settings-CLt7x9u8.js.map +1 -0
- package/web-dist/assets/states-C773NlHo.js +56 -0
- package/web-dist/assets/states-C773NlHo.js.map +1 -0
- package/web-dist/assets/{terminal-login-S5CAd5xA.js → terminal-login-BK5UjUir.js} +2 -2
- package/web-dist/assets/{terminal-login-S5CAd5xA.js.map → terminal-login-BK5UjUir.js.map} +1 -1
- package/web-dist/assets/useBreakpoint-BphHBrzF.js +2 -0
- package/web-dist/assets/useBreakpoint-BphHBrzF.js.map +1 -0
- package/web-dist/assets/useNow-Cm-tdyod.js +2 -0
- package/web-dist/assets/{useNow-Dj7oEiwn.js.map → useNow-Cm-tdyod.js.map} +1 -1
- package/web-dist/assets/{useResource-CDGSq2At.js → useResource-BBqCoY2q.js} +2 -2
- package/web-dist/assets/{useResource-CDGSq2At.js.map → useResource-BBqCoY2q.js.map} +1 -1
- package/web-dist/index.html +7 -3
- package/web-dist/sw.js +1 -1
- package/web-dist/sw.js.map +1 -1
- package/web-dist/assets/AutomationView-D7Syv1En.js +0 -2
- package/web-dist/assets/Checkbox-D6tRfEeI.js +0 -2
- package/web-dist/assets/Checkbox-D6tRfEeI.js.map +0 -1
- package/web-dist/assets/Copy-B6XSAIUd.js +0 -2
- package/web-dist/assets/DangerZone-DfYlxDC1.js +0 -2
- package/web-dist/assets/DangerZone-DfYlxDC1.js.map +0 -1
- package/web-dist/assets/Menu-BfOszNC4.js +0 -2
- package/web-dist/assets/Menu-BfOszNC4.js.map +0 -1
- package/web-dist/assets/Overlay-DUQwh6_b.js +0 -2
- package/web-dist/assets/Priority-CHmzfoHg.js +0 -2
- package/web-dist/assets/attention-V86Gye3I.js +0 -2
- package/web-dist/assets/automations-Cw5Gacgm.js +0 -2
- package/web-dist/assets/board-B8X7TYYR.js +0 -10
- package/web-dist/assets/board-B8X7TYYR.js.map +0 -1
- package/web-dist/assets/code-BKroYJmR.js +0 -12
- package/web-dist/assets/code-BKroYJmR.js.map +0 -1
- package/web-dist/assets/describe-D6KLGKWa.js +0 -5
- package/web-dist/assets/enroll-DwT7AcuS.js +0 -2
- package/web-dist/assets/index-B3F7WcYf.css +0 -2
- package/web-dist/assets/index-hxvDvCS7.js +0 -12
- package/web-dist/assets/index-hxvDvCS7.js.map +0 -1
- package/web-dist/assets/queue-DUg1rS8t.js +0 -2
- package/web-dist/assets/repo-XzzzEI0d.js +0 -2
- package/web-dist/assets/repo-XzzzEI0d.js.map +0 -1
- package/web-dist/assets/search-C6cn5WOo.js +0 -2
- package/web-dist/assets/search-C6cn5WOo.js.map +0 -1
- package/web-dist/assets/settings-DyUu0tJM.js +0 -8
- package/web-dist/assets/settings-DyUu0tJM.js.map +0 -1
- package/web-dist/assets/states-ZhrxQa3K.js +0 -56
- package/web-dist/assets/states-ZhrxQa3K.js.map +0 -1
- package/web-dist/assets/useNow-Dj7oEiwn.js +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{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-mono:ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1.4s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--default-mono-font-family:ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--color-accent:var(--sy-accent)}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::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}html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}html,body{background:var(--sy-bg);color:var(--sy-text);font-family:var(--font-sans);overflow-x:clip}body{-webkit-font-smoothing:antialiased;min-height:100dvh;margin:0;line-height:1.5}#root{min-width:0;min-height:100dvh}:focus-visible{outline:2px solid var(--sy-focus);outline-offset:2px}code,pre,kbd,samp{font-family:var(--font-mono)}button,[role=button]{cursor:pointer}button:disabled,[aria-disabled=true]{cursor:not-allowed}}@layer components{@media (pointer:coarse){.tap{min-width:44px;min-height:44px}}.sy-prose{overflow-wrap:anywhere;min-width:0}.sy-prose>*+*{margin-top:.6em}.sy-prose h1,.sy-prose h2,.sy-prose h3,.sy-prose h4{margin-top:1em;font-weight:600;line-height:1.3}.sy-prose h1{font-size:1.25rem}.sy-prose h2{font-size:1.125rem}.sy-prose h3,.sy-prose h4{font-size:1rem}.sy-prose ul{padding-left:1.4em;list-style:outside}.sy-prose ol{padding-left:1.4em;list-style:decimal}.sy-prose a{color:var(--sy-accent);text-underline-offset:2px;text-decoration:underline}.sy-prose blockquote{border-left:3px solid var(--sy-border-strong);color:var(--sy-muted);padding-left:.75em}.sy-prose :not(pre)>code{background:var(--sy-surface-2);border:1px solid var(--sy-border);border-radius:4px;padding:0 .3em;font-size:.875em}.sy-prose hr{border-color:var(--sy-border)}.sy-prose input[type=checkbox]{margin-right:.4em}.sy-prose-compact{font-size:.875rem;line-height:1.5rem}@media (min-width:768px){.sy-prose-compact{font-size:15px}}.sy-prose-compact>*+*{margin-top:.5em}.sy-prose-compact h1{font-size:1.0625rem}.sy-prose-compact h2{font-size:1rem}.sy-prose-compact h2[data-active=true]{background:var(--sy-accent-soft);box-shadow:inset 3px 0 0 var(--sy-accent);border-radius:.375rem;margin-left:-.5rem;padding:.15em .5rem}.sy-prose-compact h3,.sy-prose-compact h4{font-size:.9375rem}.sy-prose-compact h1,.sy-prose-compact h2,.sy-prose-compact h3,.sy-prose-compact h4{margin-top:1.1em;font-weight:600}.sy-prose-compact ul,.sy-prose-compact ol{padding-left:1.2em}.sy-code span[style]{color:var(--shiki-light)}@media (prefers-color-scheme:dark){.sy-code span[style]{color:var(--shiki-dark)}}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.\!fixed{position:fixed!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-x-2{inset-inline:calc(var(--spacing) * 2)}.inset-y-0{inset-block:0}.-top-0\.5{top:calc(var(--spacing) * -.5)}.-top-1\.5{top:calc(var(--spacing) * -1.5)}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-16{top:calc(var(--spacing) * 16)}.top-\[calc\(var\(--safe-top\)\+0\.5rem\)\]{top:calc(var(--safe-top) + .5rem)}.top-full{top:100%}.right-0{right:0}.right-1{right:var(--spacing)}.-bottom-3{bottom:calc(var(--spacing) * -3)}.bottom-0{bottom:0}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.col-start-1{grid-column-start:1}.row-start-2{grid-row-start:2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-px{margin-top:1px}.-mr-1\.5{margin-right:calc(var(--spacing) * -1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-auto{margin-right:auto}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-1\.5{margin-left:calc(var(--spacing) * -1.5)}.-ml-2{margin-left:calc(var(--spacing) * -2)}.-ml-px{margin-left:-1px}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-6{-webkit-line-clamp:6;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\!block{display:block!important}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-14{height:calc(var(--spacing) * 14)}.h-\[3px\]{height:3px}.h-auto{height:auto}.h-auto\!{height:auto!important}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[90dvh\]{max-height:90dvh}.max-h-\[min\(90dvh\,720px\)\]{max-height:min(90dvh,720px)}.max-h-dvh{max-height:100dvh}.min-h-0{min-height:0}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-12{min-height:calc(var(--spacing) * 12)}.min-h-14{min-height:calc(var(--spacing) * 14)}.min-h-dvh{min-height:100dvh}.min-h-full{min-height:100%}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-\[6\.25rem\]{width:6.25rem}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-32{max-width:calc(var(--spacing) * 32)}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-\[16rem\]{max-width:16rem}.max-w-\[60vw\]{max-width:60vw}.max-w-\[80ch\]{max-width:80ch}.max-w-\[calc\(100\%-8px\)\]{max-width:calc(100% - 8px)}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-\[min\(20rem\,calc\(100vw-1rem\)\)\]{max-width:min(20rem,100vw - 1rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-48{min-width:calc(var(--spacing) * 48)}.min-w-\[6\.25rem\]{min-width:6.25rem}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-\[1_1_12rem\]{flex:12rem}.flex-\[1_1_15rem\]{flex:15rem}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.basis-48{flex-basis:calc(var(--spacing) * 48)}.basis-full{flex-basis:100%}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-5{--tw-translate-x:calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-1{rotate:1deg}.rotate-90{rotate:90deg}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.scroll-mt-14{scroll-margin-top:calc(var(--spacing) * 14)}.scroll-mt-16{scroll-margin-top:calc(var(--spacing) * 16)}.scroll-ml-\[6\.25rem\]{scroll-margin-left:6.25rem}.\[scrollbar-width\:none\]{scrollbar-width:none}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_minmax\(0\,1fr\)\]{grid-template-columns:auto minmax(0,1fr)}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(0\,1fr\)_minmax\(320px\,400px\)\]{grid-template-columns:minmax(0,1fr) minmax(320px,400px)}.grid-cols-\[minmax\(0\,2\.4fr\)_minmax\(0\,1fr\)_5\.5rem_minmax\(0\,1\.2fr\)_minmax\(0\,1\.4fr\)_7\.5rem_7rem_auto\]{grid-template-columns:minmax(0,2.4fr) minmax(0,1fr) 5.5rem minmax(0,1.2fr) minmax(0,1.4fr) 7.5rem 7rem auto}.grid-cols-\[minmax\(7rem\,auto\)_1fr\]{grid-template-columns:minmax(7rem,auto) 1fr}.grid-cols-\[repeat\(auto-fit\,minmax\(11rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(11rem,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-1{column-gap:var(--spacing)}.gap-x-1\.5{column-gap:calc(var(--spacing) * 1.5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--sy-border)}.self-center{align-self:center}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.overscroll-contain{overscroll-behavior:contain}.overscroll-x-contain{overscroll-behavior-x:contain}.overscroll-y-contain{overscroll-behavior-y:contain}.rounded{border-radius:.25rem}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent{border-color:var(--sy-accent)}.border-border{border-color:var(--sy-border)}.border-border-strong{border-color:var(--sy-border-strong)}.border-danger,.border-danger\/50{border-color:var(--sy-danger)}@supports (color:color-mix(in lab, red, red)){.border-danger\/50{border-color:color-mix(in oklab, var(--sy-danger) 50%, transparent)}}.border-info{border-color:var(--sy-info)}.border-transparent{border-color:#0000}.border-warning{border-color:var(--sy-warning)}.bg-accent{background-color:var(--sy-accent)}.bg-accent-fg{background-color:var(--sy-accent-fg)}.bg-accent-soft{background-color:var(--sy-accent-soft)}.bg-bg{background-color:var(--sy-bg)}.bg-border{background-color:var(--sy-border)}.bg-border-strong{background-color:var(--sy-border-strong)}.bg-danger{background-color:var(--sy-danger)}.bg-danger-soft{background-color:var(--sy-danger-soft)}.bg-diff-add{background-color:var(--sy-diff-add)}.bg-diff-del{background-color:var(--sy-diff-del)}.bg-diff-hunk{background-color:var(--sy-diff-hunk)}.bg-info-soft{background-color:var(--sy-info-soft)}.bg-muted{background-color:var(--sy-muted)}.bg-overlay{background-color:var(--sy-overlay)}.bg-subtle{background-color:var(--sy-subtle)}.bg-success{background-color:var(--sy-success)}.bg-success-soft{background-color:var(--sy-success-soft)}.bg-surface{background-color:var(--sy-surface)}.bg-surface-2{background-color:var(--sy-surface-2)}.bg-surface-3{background-color:var(--sy-surface-3)}.bg-transparent{background-color:#0000}.bg-warning{background-color:var(--sy-warning)}.bg-warning-soft{background-color:var(--sy-warning-soft)}.bg-\[conic-gradient\(var\(--sy-surface-2\)_25\%\,var\(--sy-surface\)_0_50\%\,var\(--sy-surface-2\)_0_75\%\,var\(--sy-surface\)_0\)\]{background-image:conic-gradient(var(--sy-surface-2) 25%,var(--sy-surface) 0 50%,var(--sy-surface-2) 0 75%,var(--sy-surface) 0)}.bg-\[length\:16px_16px\]{background-size:16px 16px}.object-cover{object-fit:cover}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-7{padding-inline:calc(var(--spacing) * 7)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.safe-pt{padding-top:var(--safe-top)}.safe-pt-1{padding-top:calc(var(--spacing) * 1 + var(--safe-top))}.safe-pt-1\.5{padding-top:calc(var(--spacing) * 1.5 + var(--safe-top))}.safe-pt-4{padding-top:calc(var(--spacing) * 4 + var(--safe-top))}.safe-pt-10{padding-top:calc(var(--spacing) * 10 + var(--safe-top))}.safe-px{padding-left:var(--safe-left);padding-right:var(--safe-right)}.pr-1{padding-right:var(--spacing)}.pr-1\.5{padding-right:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-7{padding-right:calc(var(--spacing) * 7)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.safe-pb{padding-bottom:var(--safe-bottom)}.safe-pb-2{padding-bottom:calc(var(--spacing) * 2 + var(--safe-bottom))}.safe-pb-10{padding-bottom:calc(var(--spacing) * 10 + var(--safe-bottom))}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.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))}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-normal\!{white-space:normal!important}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--sy-accent)}.text-accent-fg{color:var(--sy-accent-fg)}.text-danger{color:var(--sy-danger)}.text-danger-fg{color:var(--sy-danger-fg)}.text-info{color:var(--sy-info)}.text-inherit{color:inherit}.text-muted{color:var(--sy-muted)}.text-subtle{color:var(--sy-subtle)}.text-success{color:var(--sy-success)}.text-text{color:var(--sy-text)}.text-warning{color:var(--sy-warning)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.accent-\[var\(--color-accent\)\]{accent-color:var(--color-accent)}.accent-\[var\(--sy-accent\)\]{accent-color:var(--sy-accent)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-pop{--tw-shadow:var(--sy-shadow);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--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)}.ring-4{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + 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)}.ring-accent{--tw-ring-color:var(--sy-accent)}.ring-accent-soft{--tw-ring-color:var(--sy-accent-soft)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-bg{--tw-ring-offset-color:var(--sy-bg)}.outline,.outline-1{outline-style:var(--tw-outline-style);outline-width:1px}.-outline-offset-1{outline-offset:calc(1px * -1)}.outline-warning{outline-color:var(--sy-warning)}.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-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;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))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.\[overflow-anchor\:none\]{overflow-anchor:none}.group-open\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}@media (hover:hover){.group-hover\:w-0\.5:is(:where(.group):hover *){width:calc(var(--spacing) * .5)}.group-hover\:bg-accent:is(:where(.group):hover *){background-color:var(--sy-accent)}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/row\:opacity-100:is(:where(.group\/row):hover *){opacity:1}}.group-focus-visible\:w-0\.5:is(:where(.group):focus-visible *){width:calc(var(--spacing) * .5)}.group-focus-visible\:bg-accent:is(:where(.group):focus-visible *){background-color:var(--sy-accent)}.group-has-\[input\:focus-visible\]\:outline-2:is(:where(.group):has(:is(input:focus-visible)) *){outline-style:var(--tw-outline-style);outline-width:2px}.group-has-\[input\:focus-visible\]\:outline-offset-2:is(:where(.group):has(:is(input:focus-visible)) *){outline-offset:2px}.group-has-\[input\:focus-visible\]\:outline-accent:is(:where(.group):has(:is(input:focus-visible)) *){outline-color:var(--sy-accent)}.placeholder\:text-subtle::placeholder{color:var(--sy-subtle)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:inset-x-0:before{content:var(--tw-content);inset-inline:0}.before\:-top-3:before{content:var(--tw-content);top:calc(var(--spacing) * -3)}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:content-\[\'\'\]:before{--tw-content:"";content:var(--tw-content)}.first\:pt-0:first-child{padding-top:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.last\:pb-0:last-child{padding-bottom:0}@media (hover:hover){.hover\:border-accent-hover:hover{border-color:var(--sy-accent-hover)}.hover\:border-danger-hover:hover{border-color:var(--sy-danger-hover)}.hover\:bg-accent-hover:hover{background-color:var(--sy-accent-hover)}.hover\:bg-accent-soft:hover{background-color:var(--sy-accent-soft)}.hover\:bg-border:hover{background-color:var(--sy-border)}.hover\:bg-danger-hover:hover{background-color:var(--sy-danger-hover)}.hover\:bg-danger-soft:hover{background-color:var(--sy-danger-soft)}.hover\:bg-surface-2:hover{background-color:var(--sy-surface-2)}.hover\:text-text:hover{color:var(--sy-text)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:fixed:focus{position:fixed}.focus\:top-2:focus{top:calc(var(--spacing) * 2)}.focus\:left-2:focus{left:calc(var(--spacing) * 2)}.focus\:border-accent:focus{border-color:var(--sy-accent)}.focus\:bg-surface-2:focus{background-color:var(--sy-surface-2)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:underline:focus-visible{text-decoration-line:underline}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-0:focus-visible{outline-offset:0px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-\[var\(--sy-focus\)\]:focus-visible{outline-color:var(--sy-focus)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-55:disabled{opacity:.55}.disabled\:opacity-60:disabled{opacity:.6}.has-\[\:focus-visible\]\:outline-2:has(:focus-visible){outline-style:var(--tw-outline-style);outline-width:2px}.has-\[\:focus-visible\]\:outline-offset-1:has(:focus-visible){outline-offset:1px}.has-\[\:focus-visible\]\:outline-offset-2:has(:focus-visible){outline-offset:2px}.has-\[\:focus-visible\]\:outline-accent:has(:focus-visible){outline-color:var(--sy-accent)}.has-\[\[data-testid\=document-interaction\]\]\:max-w-none:has([data-testid=document-interaction]){max-width:none}.aria-\[current\=true\]\:border-accent[aria-current=true]{border-color:var(--sy-accent)}.aria-\[current\=true\]\:text-text[aria-current=true]{color:var(--sy-text)}.aria-\[invalid\=true\]\:border-danger[aria-invalid=true],.aria-\[invalid\=true\]\:focus\:border-danger[aria-invalid=true]:focus{border-color:var(--sy-danger)}@media not all and (min-width:379px){.max-\[379px\]\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.max-\[379px\]\:hidden{display:none}}@media not all and (min-width:48rem){.max-md\:static{position:static}.max-md\:hidden{display:none}.max-md\:overflow-hidden{overflow:hidden}.max-md\:opacity-100{opacity:1}}@media not all and (min-width:40rem){.max-sm\:w-full{width:100%}.max-sm\:basis-full{flex-basis:100%}}@media (min-width:380px){.min-\[380px\]\:hidden{display:none}}@media (min-width:1800px){.min-\[1800px\]\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}@media (min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-start-auto{grid-column-start:auto}.sm\:row-start-auto{grid-row-start:auto}.sm\:mb-0{margin-bottom:0}.sm\:ml-auto{margin-left:auto}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:max-w-48{max-width:calc(var(--spacing) * 48)}.sm\:flex-1{flex:1}.sm\:basis-auto{flex-basis:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.sm\:grid-cols-\[minmax\(8rem\,12rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(8rem,12rem) minmax(0,1fr)}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:items-center{align-items:center}.sm\:items-start{align-items:flex-start}.sm\:justify-center{justify-content:center}.sm\:text-center{text-align:center}}@media (min-width:48rem){.md\:sticky{position:sticky}.md\:-top-3{top:calc(var(--spacing) * -3)}.md\:top-0{top:0}.md\:top-auto{top:auto}.md\:bottom-\[calc\(var\(--safe-bottom\)\+1rem\)\]{bottom:calc(var(--safe-bottom) + 1rem)}.md\:-mx-6{margin-inline:calc(var(--spacing) * -6)}.md\:mx-6{margin-inline:calc(var(--spacing) * 6)}.md\:block{display:block}.md\:grid{display:grid}.md\:h-8{height:calc(var(--spacing) * 8)}.md\:grid-cols-\[13rem_minmax\(0\,1fr\)\]{grid-template-columns:13rem minmax(0,1fr)}.md\:flex-row{flex-direction:row}.md\:flex-wrap{flex-wrap:wrap}.md\:items-end{align-items:flex-end}.md\:gap-3{gap:calc(var(--spacing) * 3)}.md\:gap-8{gap:calc(var(--spacing) * 8)}.md\:px-4{padding-inline:calc(var(--spacing) * 4)}.md\:px-6{padding-inline:calc(var(--spacing) * 6)}.md\:text-center{text-align:center}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\:inline{display:inline}}@media (min-width:80rem){.xl\:hidden{display:none}.xl\:inline{display:inline}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:items-start{align-items:flex-start}}@media (min-width:96rem){.\32 xl\:max-w-\[100ch\]{max-width:100ch}.\32 xl\:grid-cols-\[15rem_minmax\(0\,1fr\)\]{grid-template-columns:15rem minmax(0,1fr)}}.\[\&_h2\]\:scroll-mt-14 h2{scroll-margin-top:calc(var(--spacing) * 14)}.\[\&_td\]\:min-w-28 td{min-width:calc(var(--spacing) * 28)}.\[\&_td\]\:border td{border-style:var(--tw-border-style);border-width:1px}.\[\&_td\]\:border-border td{border-color:var(--sy-border)}.\[\&_td\]\:px-2 td{padding-inline:calc(var(--spacing) * 2)}.\[\&_td\]\:py-1 td{padding-block:var(--spacing)}.\[\&_td\]\:align-top td{vertical-align:top}.\[\&_th\]\:min-w-28 th{min-width:calc(var(--spacing) * 28)}.\[\&_th\]\:border th{border-style:var(--tw-border-style);border-width:1px}.\[\&_th\]\:border-border th{border-color:var(--sy-border)}.\[\&_th\]\:bg-surface-2 th{background-color:var(--sy-surface-2)}.\[\&_th\]\:px-2 th{padding-inline:calc(var(--spacing) * 2)}.\[\&_th\]\:py-1 th{padding-block:var(--spacing)}.\[\&_th\]\:text-left th{text-align:left}.\[\&\:\:-moz-range-thumb\]\:size-4::-moz-range-thumb{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker{display:none}.\[\&\:\:-webkit-slider-thumb\]\:size-4::-webkit-slider-thumb{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\:\:-webkit-slider-thumb\]\:appearance-none::-webkit-slider-thumb{appearance:none}.\[\&\>span\]\:sr-only>span{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media (pointer:coarse){.\[\@media\(pointer\:coarse\)\]\:opacity-100{opacity:1}.\[\@media\(pointer\:coarse\)\]\:before\:-top-6:before{content:var(--tw-content);top:calc(var(--spacing) * -6)}}}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--sy-bg:#f8fafc;--sy-surface:#fff;--sy-surface-2:#f1f5f9;--sy-surface-3:#e2e8f0;--sy-border:#d5dce5;--sy-border-strong:#94a3b8;--sy-text:#0f172a;--sy-muted:#475569;--sy-subtle:#64748b;--sy-accent:#2563eb;--sy-accent-hover:#1d4ed8;--sy-accent-fg:#fff;--sy-accent-soft:#dbeafe;--sy-success:#15803d;--sy-success-soft:#dcfce7;--sy-warning:#b45309;--sy-warning-soft:#fef3c7;--sy-danger:#b91c1c;--sy-danger-hover:#991b1b;--sy-danger-fg:#fff;--sy-danger-soft:#fee2e2;--sy-info:#0369a1;--sy-info-soft:#e0f2fe;--sy-diff-add:#e6f6ea;--sy-diff-del:#fbe9e9;--sy-diff-hunk:#eef2f7;--sy-focus:#2563eb;--sy-overlay:#0f172a66;--sy-shadow:0 10px 30px #0f172a1f, 0 2px 6px #0f172a14;--rail-width:64px;--rail-expanded-width:200px;--bottom-nav-height:56px;--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px)}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--sy-bg:#0f1115;--sy-surface:#161a20;--sy-surface-2:#1d222a;--sy-surface-3:#262c36;--sy-border:#2e3541;--sy-border-strong:#4b5565;--sy-text:#e6e9ee;--sy-muted:#a3acb9;--sy-subtle:#8892a0;--sy-accent:#60a5fa;--sy-accent-hover:#93c5fd;--sy-accent-fg:#0b1220;--sy-accent-soft:#1e3a5f;--sy-success:#4ade80;--sy-success-soft:#14321f;--sy-warning:#fbbf24;--sy-warning-soft:#3a2c0c;--sy-danger:#f87171;--sy-danger-hover:#fca5a5;--sy-danger-fg:#1f0a0a;--sy-danger-soft:#3b1515;--sy-info:#38bdf8;--sy-info-soft:#0c2a3a;--sy-diff-add:#12291b;--sy-diff-del:#2f1517;--sy-diff-hunk:#1b2330;--sy-focus:#93c5fd;--sy-overlay:#0000008c;--sy-shadow:0 10px 30px #00000080, 0 2px 6px #0006}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}.animate-spin{animation:2.4s linear infinite spin!important}.sy-motion{transition-duration:.2s!important}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<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}@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-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e,t}from"./jsx-runtime-D13aM9HY.js";import{t as n}from"./chevron-right-evVLS6hq.js";import{
|
|
2
|
-
//# sourceMappingURL=more-
|
|
1
|
+
import{i as e,t}from"./jsx-runtime-D13aM9HY.js";import{t as n}from"./chevron-right-evVLS6hq.js";import{S as r,w as i,x as a}from"./index-BHGZTS2e.js";var o=t(),s=[{to:`/queue`,label:`Queue`,description:`Running and queued runs`,icon:r},{to:`/automations`,label:`Automations`,description:`Schedules, webhooks and history`,icon:a},{to:`/settings`,label:`Settings`,description:`Hosts, devices, projects, notifications`,icon:i}];function c(){return(0,o.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col gap-3 px-4 pb-4 safe-pt-4`,children:[(0,o.jsx)(`h1`,{className:`text-lg font-semibold`,children:`More`}),(0,o.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border bg-surface`,children:s.map(({to:t,label:r,description:i,icon:a})=>(0,o.jsx)(`li`,{className:`border-b border-border last:border-b-0`,children:(0,o.jsxs)(e,{to:t,className:`tap flex min-h-14 items-center gap-3 px-4 py-2 hover:bg-surface-2`,children:[(0,o.jsx)(a,{"aria-hidden":!0,className:`size-5 shrink-0 text-muted`}),(0,o.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,o.jsx)(`span`,{className:`block font-medium`,children:r}),(0,o.jsx)(`span`,{className:`block truncate text-sm text-muted`,children:i})]}),(0,o.jsx)(n,{"aria-hidden":!0,className:`size-4 shrink-0 text-subtle`})]})},t))})]})}export{c as default};
|
|
2
|
+
//# sourceMappingURL=more-DvKHMdBk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"more-
|
|
1
|
+
{"version":3,"file":"more-DvKHMdBk.js","names":["Link","ChevronRight","Timer","Settings","Workflow","import_jsx_runtime","require_jsx_runtime","ITEMS","MoreView","Icon","label","description","to"],"sources":["../../src/features/more/index.tsx"],"sourcesContent":["import { ChevronRight, type LucideIcon, Settings, Timer, Workflow } from \"lucide-react\";\nimport { Link } from \"react-router\";\n\nconst ITEMS: { to: string; label: string; description: string; icon: LucideIcon }[] = [\n { to: \"/queue\", label: \"Queue\", description: \"Running and queued runs\", icon: Timer },\n {\n to: \"/automations\",\n label: \"Automations\",\n description: \"Schedules, webhooks and history\",\n icon: Workflow,\n },\n {\n to: \"/settings\",\n label: \"Settings\",\n description: \"Hosts, devices, projects, notifications\",\n icon: Settings,\n },\n];\n\n/** Mobile \"More\": Queue, Automations and Settings (spec 10). */\nexport default function MoreView() {\n return (\n <div className=\"mx-auto flex w-full max-w-xl flex-col gap-3 px-4 pb-4 safe-pt-4\">\n <h1 className=\"text-lg font-semibold\">More</h1>\n <ul className=\"overflow-hidden rounded-lg border border-border bg-surface\">\n {ITEMS.map(({ to, label, description, icon: Icon }) => (\n <li key={to} className=\"border-b border-border last:border-b-0\">\n <Link\n to={to}\n className=\"tap flex min-h-14 items-center gap-3 px-4 py-2 hover:bg-surface-2\"\n >\n <Icon aria-hidden className=\"size-5 shrink-0 text-muted\" />\n <span className=\"min-w-0 flex-1\">\n <span className=\"block font-medium\">{label}</span>\n <span className=\"block truncate text-sm text-muted\">{description}</span>\n </span>\n <ChevronRight aria-hidden className=\"size-4 shrink-0 text-subtle\" />\n </Link>\n </li>\n ))}\n </ul>\n </div>\n );\n}\n"],"mappings":"A,gKAGMO,EAAgF,CACpF,CAAE,GAAI,SAAU,MAAO,QAAS,YAAa,0BAA2B,KAAML,CAAM,EACpF,CACE,GAAI,eACJ,MAAO,cACP,YAAa,kCACb,KAAME,CACR,EACA,CACE,GAAI,YACJ,MAAO,WACP,YAAa,0CACb,KAAMD,CACR,CACF,EAGA,SAAwBK,GAAW,CACjC,OACE,EAAAH,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,kEAAf,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,wBAAwB,SAAA,MAAQ,CAAA,GAC9C,EAAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,6DACX,SAAAE,EAAM,KAAK,CAAE,KAAI,QAAO,cAAa,KAAME,MAC1C,EAAAJ,EAAA,IAAA,CAAC,KAAD,CAAa,UAAU,yCACrB,UAAA,EAAAA,EAAA,KAAA,CAACL,EAAD,CACM,KACJ,UAAU,oEAFZ,SAAA,EAIE,EAAAK,EAAA,IAAA,CAACI,EAAD,CAAM,cAAA,GAAY,UAAU,4BAA8B,CAAA,GAC1D,EAAAJ,EAAA,KAAA,CAAC,OAAD,CAAM,UAAU,iBAAhB,SAAA,EACE,EAAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,oBAAqB,SAAAK,CAAY,CAAA,GACjD,EAAAL,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,oCAAqC,SAAAM,CAAkB,CAAA,CACnE,C,IACN,EAAAN,EAAA,IAAA,CAACJ,EAAD,CAAc,cAAA,GAAY,UAAU,6BAA+B,CAAA,CAC/D,C,EACJ,EAZKW,CAYL,CACL,CACC,CAAA,CACD,C,EAET,C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e,i as t,m as n,n as r,t as i}from"./jsx-runtime-D13aM9HY.js";import{m as a,o,y as s}from"./StatusChip-BYuVxYS7.js";import{bt as c,c as l,f as u,h as d,i as f,lt as p,n as m,p as h,r as g,s as _,t as v,u as y,v as b,w as x,yt as S,z as C}from"./states-C773NlHo.js";import{t as w}from"./calendar-clock-B8zE4JsX.js";import{r as T}from"./Priority-Ca1B2yFr.js";import{i as E,o as D,u as O}from"./useBreakpoint-BphHBrzF.js";import{t as k}from"./external-link-3jjTxo92.js";import{I as A,a as j,m as M,t as N,v as P}from"./useNow-Cm-tdyod.js";import{t as F}from"./link-2-CaMlUDRG.js";import{S as I,c as L}from"./index-BHGZTS2e.js";var R={name:`folder-lock`,size:24,node:[[`rect`,{width:`8`,height:`5`,x:`14`,y:`17`,rx:`1`,key:`19aais`}],[`path`,{d:`M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2.5`,key:`1w6v7t`}],[`path`,{d:`M20 17v-2a2 2 0 1 0-4 0v2`,key:`pwaxnr`}]]};R.node;var z=r(R),B={name:`gauge`,size:24,node:[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]};B.node;var V=r(B),H={name:`power-off`,size:24,node:[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};H.node;var U=r(H),W={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};W.node;var G=r(W),K=e(n(),1),q=i(),J={dependency:F,host_offline:D,project_limit:V,workspace_occupied:z,scheduled_time:w,invalid_configuration:b,dispatch_paused:s,project_automation_disabled:U,not_ready:x,already_dispatched:a,retry_backoff:G};function Y(){let e=N(),t=C(e=>e.tasks),n=C(e=>e.runs),r=C(e=>e.hydrated),i=c(e.error)&&e.error.status===404,a=!!e.data&&(!Array.isArray(e.data.running)||!Array.isArray(e.data.queued)),o=(0,K.useMemo)(()=>e.data&&!a?e.data.running.map(e=>({taskId:e.taskId,runId:e.runId,sessionId:e.sessionId})):Object.values(n).filter(e=>P(e)&&e.state!==`queued`).map(e=>({taskId:e.taskId,runId:e.id,sessionId:e.sessionId})),[e.data,n,a]),s=(0,K.useMemo)(()=>e.data&&!a?e.data.queued.map(e=>({taskId:e.taskId,eligibility:e.eligibility})):Object.values(t).filter(e=>e.state===`ready`&&!e.hiddenFromBoard).sort((e,t)=>e.priority-t.priority||e.position-t.position).map(e=>({taskId:e.id,eligibility:void 0})),[e.data,t,a]),u=!e.data&&e.loading&&!e.error||!r,d=!!e.error&&!i&&!e.data;return a?(0,q.jsx)(g,{title:`The coordinator sent a queue this version cannot read`,error:`GET /api/now returned an unexpected shape. Check that the web app and coordinator versions match.`}):(0,q.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-4 px-4 pb-4 safe-pt-4 md:px-6`,children:[(0,q.jsxs)(`header`,{className:`flex min-w-0 flex-wrap items-center gap-3`,children:[(0,q.jsx)(`h1`,{className:`flex-1 text-lg font-semibold`,children:`Queue`}),(0,q.jsx)(j,{})]}),(0,q.jsx)(`p`,{className:`text-sm text-muted`,children:`Pausing stops new work from starting. Runs already in progress keep going.`}),(0,q.jsx)(_,{subject:`queue`,show:!!e.data}),i&&(0,q.jsx)(y,{capability:`Queue explanations`,reason:`This coordinator does not report why queued tasks are waiting. The list below comes from local data.`}),e.error!=null&&!i&&(0,q.jsx)(m,{compact:!0,title:`Could not refresh running and queued work`,error:S(e.error),onRetry:e.reload}),u?(0,q.jsx)(l,{label:`Loading running and queued work…`}):d&&o.length===0&&s.length===0?null:o.length===0&&s.length===0?(0,q.jsx)(v,{icon:(0,q.jsx)(I,{className:`size-8`}),title:`Nothing running or queued`,description:`Move a task to Ready on the board and the dispatcher starts it when it is eligible.`,action:{label:`Go to Board`,to:L.board}}):(0,q.jsxs)(`div`,{className:`grid min-w-0 grid-cols-1 gap-4 xl:grid-cols-2 xl:items-start`,children:[(0,q.jsxs)(`section`,{"aria-labelledby":`now-running`,className:`flex min-w-0 flex-col gap-2`,children:[(0,q.jsxs)(`h2`,{id:`now-running`,className:`text-base font-semibold`,children:[`Running `,(0,q.jsxs)(`span`,{className:`text-sm font-normal text-muted`,children:[`(`,o.length,`)`]})]}),o.length===0?(0,q.jsx)(`p`,{className:`text-sm text-muted`,children:`Nothing is running.`}):(0,q.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-2`,children:o.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(X,{taskId:e.taskId,runId:e.runId,sessionId:e.sessionId})},e.runId))})]}),(0,q.jsxs)(`section`,{"aria-labelledby":`now-queued`,className:`flex min-w-0 flex-col gap-2`,children:[(0,q.jsxs)(`h2`,{id:`now-queued`,className:`text-base font-semibold`,children:[`Queued `,(0,q.jsxs)(`span`,{className:`text-sm font-normal text-muted`,children:[`(`,s.length,`)`]})]}),s.length===0?(0,q.jsx)(`p`,{className:`text-sm text-muted`,children:`No Ready tasks are waiting.`}):(0,q.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-2`,children:s.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(Z,{task:t[e.taskId],taskId:e.taskId,eligibility:e.eligibility})},e.taskId))})]})]})]})}function X({taskId:e,runId:n,sessionId:r}){let i=C(t=>t.tasks[e]),a=C(e=>e.runs[n]),s=C(e=>a?.hostId?e.hosts[a.hostId]:void 0),c=C(e=>i?e.projects[i.projectId]:void 0),l=!!s&&s.connectivity!==`connected`;return(0,q.jsxs)(`article`,{className:`flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface p-3`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-start gap-2`,children:[a?(0,q.jsx)(o,{kind:`run`,value:a.state,size:`sm`}):(0,q.jsx)(o,{kind:`task`,value:`in_progress`,size:`sm`}),(0,q.jsx)(t,{to:L.task(e),className:`min-w-0 flex-1 basis-48 font-medium break-words hover:underline`,children:i?.title??`Task`}),(r??i?.sessionId)&&(0,q.jsxs)(t,{to:L.session(r??i?.sessionId),className:u(`secondary`,`sm`),children:[(0,q.jsx)(k,{"aria-hidden":!0,className:`size-3.5`}),`Open session`]})]}),(0,q.jsx)(`p`,{className:`text-xs text-muted`,children:[c?.name,s?`on ${s.name}`:null,a?.attempt&&a.attempt>1?`attempt ${a.attempt}`:null,a?.startedAt?`started ${d(a.startedAt)}`:null,a?.controlMode===`human`?`you have control`:`automation`].filter(Boolean).join(` · `)}),a?.state===`uncertain`&&s&&(0,q.jsx)(`p`,{className:`text-sm text-warning`,children:(0,q.jsxs)(`span`,{className:`text-text`,children:[`Waiting for host `,s.name,` to confirm launch. It is never started elsewhere.`]})}),l&&s&&(0,q.jsx)(f,{compact:!0,hostName:s.name,connectivity:s.connectivity===`reconnecting`?`reconnecting`:`unreachable`,lastSeenAt:s.lastSeenAt})]})}function Z({task:e,taskId:n,eligibility:r}){let i=C(t=>e?t.projects[e.projectId]:void 0),[a,o]=(0,K.useState)(!1),s=(0,K.useId)(),c=r?r.eligible?O:J[r.wait]:I,l=r?r.eligible?`Starting on ${r.hostName}`:M[r.wait]:`Waiting for dispatch`,u=r&&!r.eligible?r.message:null;return(0,q.jsxs)(`article`,{"data-testid":`now-queued-row`,className:`flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface p-3 sm:flex-row sm:items-center`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,q.jsx)(t,{to:L.task(n),className:`min-w-0 font-medium break-words hover:underline`,children:e?.title??`Task`}),i&&(0,q.jsx)(`span`,{className:`text-xs text-muted`,children:i.name}),(0,q.jsxs)(`p`,{className:`flex min-w-0 items-start gap-1.5 text-sm`,children:[(0,q.jsx)(c,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 ${r?.eligible?`text-success`:`text-warning`}`}),(0,q.jsxs)(`span`,{className:`min-w-0 break-words`,children:[(0,q.jsx)(`span`,{className:`font-medium`,children:l}),u&&u!==l?(0,q.jsxs)(`span`,{className:`text-muted`,children:[`: `,u]}):null]})]})]}),e&&(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,q.jsx)(`label`,{htmlFor:s,className:`text-sm text-muted`,children:`Priority`}),(0,q.jsx)(T,{id:s,width:`auto`,value:e.priority,disabled:a,onChange:async t=>{o(!0);try{await A(e.id,{priority:t}),E.success(`"${e.title}" is now ${p[t]} priority`)}catch(e){E.error(`Could not change priority: ${S(e)}`)}finally{o(!1)}}}),a&&(0,q.jsx)(h,{label:`Saving priority`})]})]})}export{Y as default};
|
|
2
|
+
//# sourceMappingURL=queue-B2Vl0uSh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-DUg1rS8t.js","names":["__iconData","__iconData","__iconData","useMemo","useState","useId","__toESM","Link","require_react","createLucideIcon","require_jsx_runtime","isApiError","LoadingState","buttonClasses","formatRelative","HostUnavailable","PRIORITY_LABELS","ErrorState","Spinner","FatalError","LastKnownNote","EmptyState","UnsupportedCapability","TriangleAlert","Inbox","errorMessage","useSyncStore","CalendarClock","PrioritySelect","ExternalLink","updateTask","DispatchToggle","WAIT_LABELS","useNow","isRunActive","Link2","WifiOff","Timer","LoaderCircle","StatusChip","CircleCheck","toast","ROUTES","CirclePause","__iconData$3","FolderLock","__iconData$2","Gauge","__iconData$1","PowerOff","__iconData","RotateCw","import_react","import_jsx_runtime","WAIT_ICONS","QueueView","now","tasks","s","runs","hydrated","unsupported","malformed","running","r","queued","q","t","a","b","loading","fatal","RunningRow","QueuedRow","task","taskId","run","runId","host","project","offline","sessionId","busy","setBusy","id","Icon","eligibility","waitLabel","detail","p","err"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/folder-lock.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/gauge.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/power-off.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/rotate-cw.mjs","../../src/features/queue/index.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"folder-lock\",\n size: 24,\n node: [\n [\"rect\", { width: \"8\", height: \"5\", x: \"14\", y: \"17\", rx: \"1\", key: \"19aais\" }],\n [\n \"path\",\n {\n d: \"M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2.5\",\n key: \"1w6v7t\"\n }\n ],\n [\"path\", { d: \"M20 17v-2a2 2 0 1 0-4 0v2\", key: \"pwaxnr\" }]\n ]\n};\n__iconData.node;\nconst FolderLock = createLucideIcon(__iconData);\n\nexport { __iconData, FolderLock as default };\n//# sourceMappingURL=folder-lock.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"gauge\",\n size: 24,\n node: [\n [\"path\", { d: \"m12 14 4-4\", key: \"9kzdfg\" }],\n [\"path\", { d: \"M3.34 19a10 10 0 1 1 17.32 0\", key: \"19p75a\" }]\n ]\n};\n__iconData.node;\nconst Gauge = createLucideIcon(__iconData);\n\nexport { __iconData, Gauge as default };\n//# sourceMappingURL=gauge.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"power-off\",\n size: 24,\n node: [\n [\"path\", { d: \"M18.36 6.64A9 9 0 0 1 20.77 15\", key: \"dxknvb\" }],\n [\"path\", { d: \"M6.16 6.16a9 9 0 1 0 12.68 12.68\", key: \"1x7qb5\" }],\n [\"path\", { d: \"M12 2v4\", key: \"3427ic\" }],\n [\"path\", { d: \"m2 2 20 20\", key: \"1ooewy\" }]\n ]\n};\n__iconData.node;\nconst PowerOff = createLucideIcon(__iconData);\n\nexport { __iconData, PowerOff as default };\n//# sourceMappingURL=power-off.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"rotate-cw\",\n size: 24,\n node: [\n [\"path\", { d: \"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\", key: \"1p45f6\" }],\n [\"path\", { d: \"M21 3v5h-5\", key: \"1q7to0\" }]\n ]\n};\n__iconData.node;\nconst RotateCw = createLucideIcon(__iconData);\n\nexport { __iconData, RotateCw as default };\n//# sourceMappingURL=rotate-cw.mjs.map\n","import type { Eligibility, Task } from \"@switchyard/protocol\";\nimport { PRIORITY_LABELS } from \"@switchyard/protocol\";\nimport {\n CalendarClock,\n CircleCheck,\n CirclePause,\n ExternalLink,\n FolderLock,\n Gauge,\n Inbox,\n Link2,\n LoaderCircle,\n type LucideIcon,\n PowerOff,\n RotateCw,\n Timer,\n TriangleAlert,\n WifiOff,\n} from \"lucide-react\";\nimport { useId, useMemo, useState } from \"react\";\nimport { Link } from \"react-router\";\nimport { ROUTES } from \"../../app/routes\";\nimport { buttonClasses } from \"../../components/ui/Button\";\nimport { PrioritySelect } from \"../../components/ui/Priority\";\nimport { Spinner } from \"../../components/ui/Spinner\";\nimport { StatusChip } from \"../../components/ui/StatusChip\";\nimport {\n EmptyState,\n ErrorState,\n FatalError,\n HostUnavailable,\n LastKnownNote,\n LoadingState,\n UnsupportedCapability,\n} from \"../../components/ui/states\";\nimport { toast } from \"../../components/ui/Toast\";\nimport { formatRelative } from \"../../lib/time\";\nimport { errorMessage, isApiError } from \"../../sync/api\";\nimport { useSyncStore } from \"../../sync/store\";\nimport { updateTask } from \"../board/api\";\nimport { DispatchToggle } from \"../board/BoardChrome\";\nimport { isRunActive, WAIT_LABELS, type WaitReason } from \"../board/logic\";\nimport { useNow } from \"./useNow\";\n\nconst WAIT_ICONS: Record<WaitReason, LucideIcon> = {\n dependency: Link2,\n host_offline: WifiOff,\n project_limit: Gauge,\n workspace_occupied: FolderLock,\n scheduled_time: CalendarClock,\n invalid_configuration: TriangleAlert,\n dispatch_paused: CirclePause,\n project_automation_disabled: PowerOff,\n not_ready: Inbox,\n already_dispatched: LoaderCircle,\n retry_backoff: RotateCw,\n};\n\n/** /queue: running and queued work, each queued row explaining its wait. */\nexport default function QueueView() {\n const now = useNow();\n const tasks = useSyncStore((s) => s.tasks);\n const runs = useSyncStore((s) => s.runs);\n const hydrated = useSyncStore((s) => s.hydrated);\n const unsupported = isApiError(now.error) && now.error.status === 404;\n const malformed =\n !!now.data && (!Array.isArray(now.data.running) || !Array.isArray(now.data.queued));\n\n // Running from the server, or from the store when the endpoint is unavailable.\n const running = useMemo(() => {\n if (now.data && !malformed)\n return now.data.running.map((r) => ({\n taskId: r.taskId,\n runId: r.runId,\n sessionId: r.sessionId,\n }));\n return Object.values(runs)\n .filter((r) => isRunActive(r) && r.state !== \"queued\")\n .map((r) => ({ taskId: r.taskId, runId: r.id, sessionId: r.sessionId }));\n }, [now.data, runs, malformed]);\n const queued = useMemo(() => {\n if (now.data && !malformed)\n return now.data.queued.map((q) => ({\n taskId: q.taskId,\n eligibility: q.eligibility as Eligibility | undefined,\n }));\n return Object.values(tasks)\n .filter((t) => t.state === \"ready\" && !t.hiddenFromBoard)\n .sort((a, b) => a.priority - b.priority || a.position - b.position)\n .map((t) => ({ taskId: t.id, eligibility: undefined as Eligibility | undefined }));\n }, [now.data, tasks, malformed]);\n\n const loading = (!now.data && now.loading && !now.error) || !hydrated;\n const fatal = !!now.error && !unsupported && !now.data;\n if (malformed)\n return (\n <FatalError\n title=\"The coordinator sent a queue this version cannot read\"\n error=\"GET /api/now returned an unexpected shape. Check that the web app and coordinator versions match.\"\n />\n );\n\n return (\n <div className=\"flex w-full min-w-0 flex-col gap-4 px-4 pb-4 safe-pt-4 md:px-6\">\n <header className=\"flex min-w-0 flex-wrap items-center gap-3\">\n <h1 className=\"flex-1 text-lg font-semibold\">Queue</h1>\n <DispatchToggle />\n </header>\n <p className=\"text-sm text-muted\">\n Pausing stops new work from starting. Runs already in progress keep going.\n </p>\n <LastKnownNote subject=\"queue\" show={!!now.data} />\n {unsupported && (\n <UnsupportedCapability\n capability=\"Queue explanations\"\n reason=\"This coordinator does not report why queued tasks are waiting. The list below comes from local data.\"\n />\n )}\n {now.error != null && !unsupported && (\n <ErrorState\n compact\n title=\"Could not refresh running and queued work\"\n error={errorMessage(now.error)}\n onRetry={now.reload}\n />\n )}\n\n {loading ? (\n <LoadingState label=\"Loading running and queued work…\" />\n ) : fatal && running.length === 0 && queued.length === 0 ? null : running.length === 0 &&\n queued.length === 0 ? (\n <EmptyState\n icon={<Timer className=\"size-8\" />}\n title=\"Nothing running or queued\"\n description=\"Move a task to Ready on the board and the dispatcher starts it when it is eligible.\"\n action={{ label: \"Go to Board\", to: ROUTES.board }}\n />\n ) : (\n <div className=\"grid min-w-0 grid-cols-1 gap-4 xl:grid-cols-2 xl:items-start\">\n <section aria-labelledby=\"now-running\" className=\"flex min-w-0 flex-col gap-2\">\n <h2 id=\"now-running\" className=\"text-base font-semibold\">\n Running <span className=\"text-sm font-normal text-muted\">({running.length})</span>\n </h2>\n {running.length === 0 ? (\n <p className=\"text-sm text-muted\">Nothing is running.</p>\n ) : (\n <ul className=\"flex min-w-0 flex-col gap-2\">\n {running.map((r) => (\n <li key={r.runId}>\n <RunningRow taskId={r.taskId} runId={r.runId} sessionId={r.sessionId} />\n </li>\n ))}\n </ul>\n )}\n </section>\n <section aria-labelledby=\"now-queued\" className=\"flex min-w-0 flex-col gap-2\">\n <h2 id=\"now-queued\" className=\"text-base font-semibold\">\n Queued <span className=\"text-sm font-normal text-muted\">({queued.length})</span>\n </h2>\n {queued.length === 0 ? (\n <p className=\"text-sm text-muted\">No Ready tasks are waiting.</p>\n ) : (\n <ul className=\"flex min-w-0 flex-col gap-2\">\n {queued.map((q) => (\n <li key={q.taskId}>\n <QueuedRow\n task={tasks[q.taskId]}\n taskId={q.taskId}\n eligibility={q.eligibility}\n />\n </li>\n ))}\n </ul>\n )}\n </section>\n </div>\n )}\n </div>\n );\n}\n\nfunction RunningRow({\n taskId,\n runId,\n sessionId,\n}: {\n taskId: string;\n runId: string;\n sessionId: string | null;\n}) {\n const task = useSyncStore((s) => s.tasks[taskId]);\n const run = useSyncStore((s) => s.runs[runId]);\n const host = useSyncStore((s) => (run?.hostId ? s.hosts[run.hostId] : undefined));\n const project = useSyncStore((s) => (task ? s.projects[task.projectId] : undefined));\n const offline = !!host && host.connectivity !== \"connected\";\n return (\n <article className=\"flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface p-3\">\n <div className=\"flex min-w-0 flex-wrap items-start gap-2\">\n {run ? (\n <StatusChip kind=\"run\" value={run.state} size=\"sm\" />\n ) : (\n <StatusChip kind=\"task\" value=\"in_progress\" size=\"sm\" />\n )}\n <Link\n to={ROUTES.task(taskId)}\n className=\"min-w-0 flex-1 basis-48 font-medium break-words hover:underline\"\n >\n {task?.title ?? \"Task\"}\n </Link>\n {(sessionId ?? task?.sessionId) && (\n <Link\n to={ROUTES.session((sessionId ?? task?.sessionId) as string)}\n className={buttonClasses(\"secondary\", \"sm\")}\n >\n <ExternalLink aria-hidden className=\"size-3.5\" />\n Open session\n </Link>\n )}\n </div>\n <p className=\"text-xs text-muted\">\n {[\n project?.name,\n host ? `on ${host.name}` : null,\n run?.attempt && run.attempt > 1 ? `attempt ${run.attempt}` : null,\n run?.startedAt ? `started ${formatRelative(run.startedAt)}` : null,\n run?.controlMode === \"human\" ? \"you have control\" : \"automation\",\n ]\n .filter(Boolean)\n .join(\" · \")}\n </p>\n {run?.state === \"uncertain\" && host && (\n <p className=\"text-sm text-warning\">\n <span className=\"text-text\">\n Waiting for host {host.name} to confirm launch. It is never started elsewhere.\n </span>\n </p>\n )}\n {offline && host && (\n <HostUnavailable\n compact\n hostName={host.name}\n connectivity={host.connectivity === \"reconnecting\" ? \"reconnecting\" : \"unreachable\"}\n lastSeenAt={host.lastSeenAt}\n />\n )}\n </article>\n );\n}\n\nfunction QueuedRow({\n task,\n taskId,\n eligibility,\n}: {\n task: Task | undefined;\n taskId: string;\n eligibility?: Eligibility;\n}) {\n const project = useSyncStore((s) => (task ? s.projects[task.projectId] : undefined));\n const [busy, setBusy] = useState(false);\n const id = useId();\n const Icon = eligibility\n ? eligibility.eligible\n ? CircleCheck\n : WAIT_ICONS[eligibility.wait]\n : Timer;\n const waitLabel = eligibility\n ? eligibility.eligible\n ? `Starting on ${eligibility.hostName}`\n : WAIT_LABELS[eligibility.wait]\n : \"Waiting for dispatch\";\n const detail = eligibility && !eligibility.eligible ? eligibility.message : null;\n return (\n <article\n data-testid=\"now-queued-row\"\n className=\"flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface p-3 sm:flex-row sm:items-center\"\n >\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Link to={ROUTES.task(taskId)} className=\"min-w-0 font-medium break-words hover:underline\">\n {task?.title ?? \"Task\"}\n </Link>\n {project && <span className=\"text-xs text-muted\">{project.name}</span>}\n <p className=\"flex min-w-0 items-start gap-1.5 text-sm\">\n <Icon\n aria-hidden\n className={`mt-0.5 size-4 shrink-0 ${eligibility?.eligible ? \"text-success\" : \"text-warning\"}`}\n />\n <span className=\"min-w-0 break-words\">\n <span className=\"font-medium\">{waitLabel}</span>\n {detail && detail !== waitLabel ? <span className=\"text-muted\">: {detail}</span> : null}\n </span>\n </p>\n </div>\n {task && (\n <div className=\"flex shrink-0 items-center gap-2\">\n <label htmlFor={id} className=\"text-sm text-muted\">\n Priority\n </label>\n <PrioritySelect\n id={id}\n width=\"auto\"\n value={task.priority}\n disabled={busy}\n onChange={async (p) => {\n setBusy(true);\n try {\n await updateTask(task.id, { priority: p });\n toast.success(`\"${task.title}\" is now ${PRIORITY_LABELS[p]} priority`);\n } catch (err) {\n toast.error(`Could not change priority: ${errorMessage(err)}`);\n } finally {\n setBusy(false);\n }\n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AIiC,EAAK,MAAM,WAAW1D,EAAgByE,GAAG,UAAU,CACvE,OAASC,EAAK,CACZjD,EAAM,MAAM,8BAA8BhB,EAAaiE,CAAG,GAAG,CAC/D,QAAU,CACRP,EAAQ,EAAK,CACf,CACF,CACD,CAAA,EACAD,IAAQ,EAAA7B,EAAA,IAAA,CAACnC,EAAD,CAAS,MAAM,iBAAmB,CAAA,CACxC,CAEA,CAAA,CAAA,C,EAEb,C"}
|
|
1
|
+
{"version":3,"file":"queue-B2Vl0uSh.js","names":["__iconData","__iconData","__iconData","useMemo","useState","useId","__toESM","Link","require_react","createLucideIcon","require_jsx_runtime","LoaderCircle","CirclePause","isApiError","LoadingState","buttonClasses","formatRelative","HostUnavailable","PRIORITY_LABELS","ErrorState","Spinner","FatalError","LastKnownNote","EmptyState","UnsupportedCapability","TriangleAlert","Inbox","errorMessage","useSyncStore","CalendarClock","PrioritySelect","toast","WifiOff","CircleCheck","ExternalLink","updateTask","DispatchToggle","WAIT_LABELS","useNow","isRunActive","Link2","Timer","ROUTES","__iconData$3","FolderLock","__iconData$2","Gauge","__iconData$1","PowerOff","__iconData","RotateCw","import_react","import_jsx_runtime","WAIT_ICONS","QueueView","now","tasks","s","runs","hydrated","unsupported","malformed","running","r","queued","q","t","a","b","loading","fatal","RunningRow","QueuedRow","task","taskId","run","runId","host","project","offline","StatusChip","sessionId","busy","setBusy","id","Icon","eligibility","waitLabel","detail","p","err"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/folder-lock.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/gauge.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/power-off.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/rotate-cw.mjs","../../src/features/queue/index.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"folder-lock\",\n size: 24,\n node: [\n [\"rect\", { width: \"8\", height: \"5\", x: \"14\", y: \"17\", rx: \"1\", key: \"19aais\" }],\n [\n \"path\",\n {\n d: \"M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2.5\",\n key: \"1w6v7t\"\n }\n ],\n [\"path\", { d: \"M20 17v-2a2 2 0 1 0-4 0v2\", key: \"pwaxnr\" }]\n ]\n};\n__iconData.node;\nconst FolderLock = createLucideIcon(__iconData);\n\nexport { __iconData, FolderLock as default };\n//# sourceMappingURL=folder-lock.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"gauge\",\n size: 24,\n node: [\n [\"path\", { d: \"m12 14 4-4\", key: \"9kzdfg\" }],\n [\"path\", { d: \"M3.34 19a10 10 0 1 1 17.32 0\", key: \"19p75a\" }]\n ]\n};\n__iconData.node;\nconst Gauge = createLucideIcon(__iconData);\n\nexport { __iconData, Gauge as default };\n//# sourceMappingURL=gauge.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"power-off\",\n size: 24,\n node: [\n [\"path\", { d: \"M18.36 6.64A9 9 0 0 1 20.77 15\", key: \"dxknvb\" }],\n [\"path\", { d: \"M6.16 6.16a9 9 0 1 0 12.68 12.68\", key: \"1x7qb5\" }],\n [\"path\", { d: \"M12 2v4\", key: \"3427ic\" }],\n [\"path\", { d: \"m2 2 20 20\", key: \"1ooewy\" }]\n ]\n};\n__iconData.node;\nconst PowerOff = createLucideIcon(__iconData);\n\nexport { __iconData, PowerOff as default };\n//# sourceMappingURL=power-off.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"rotate-cw\",\n size: 24,\n node: [\n [\"path\", { d: \"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\", key: \"1p45f6\" }],\n [\"path\", { d: \"M21 3v5h-5\", key: \"1q7to0\" }]\n ]\n};\n__iconData.node;\nconst RotateCw = createLucideIcon(__iconData);\n\nexport { __iconData, RotateCw as default };\n//# sourceMappingURL=rotate-cw.mjs.map\n","import type { Eligibility, Task } from \"@switchyard/protocol\";\nimport { PRIORITY_LABELS } from \"@switchyard/protocol\";\nimport {\n CalendarClock,\n CircleCheck,\n CirclePause,\n ExternalLink,\n FolderLock,\n Gauge,\n Inbox,\n Link2,\n LoaderCircle,\n type LucideIcon,\n PowerOff,\n RotateCw,\n Timer,\n TriangleAlert,\n WifiOff,\n} from \"lucide-react\";\nimport { useId, useMemo, useState } from \"react\";\nimport { Link } from \"react-router\";\nimport { ROUTES } from \"../../app/routes\";\nimport { buttonClasses } from \"../../components/ui/Button\";\nimport { PrioritySelect } from \"../../components/ui/Priority\";\nimport { Spinner } from \"../../components/ui/Spinner\";\nimport { StatusChip } from \"../../components/ui/StatusChip\";\nimport {\n EmptyState,\n ErrorState,\n FatalError,\n HostUnavailable,\n LastKnownNote,\n LoadingState,\n UnsupportedCapability,\n} from \"../../components/ui/states\";\nimport { toast } from \"../../components/ui/Toast\";\nimport { formatRelative } from \"../../lib/time\";\nimport { errorMessage, isApiError } from \"../../sync/api\";\nimport { useSyncStore } from \"../../sync/store\";\nimport { updateTask } from \"../board/api\";\nimport { DispatchToggle } from \"../board/BoardChrome\";\nimport { isRunActive, WAIT_LABELS, type WaitReason } from \"../board/logic\";\nimport { useNow } from \"./useNow\";\n\nconst WAIT_ICONS: Record<WaitReason, LucideIcon> = {\n dependency: Link2,\n host_offline: WifiOff,\n project_limit: Gauge,\n workspace_occupied: FolderLock,\n scheduled_time: CalendarClock,\n invalid_configuration: TriangleAlert,\n dispatch_paused: CirclePause,\n project_automation_disabled: PowerOff,\n not_ready: Inbox,\n already_dispatched: LoaderCircle,\n retry_backoff: RotateCw,\n};\n\n/** /queue: running and queued work, each queued row explaining its wait. */\nexport default function QueueView() {\n const now = useNow();\n const tasks = useSyncStore((s) => s.tasks);\n const runs = useSyncStore((s) => s.runs);\n const hydrated = useSyncStore((s) => s.hydrated);\n const unsupported = isApiError(now.error) && now.error.status === 404;\n const malformed =\n !!now.data && (!Array.isArray(now.data.running) || !Array.isArray(now.data.queued));\n\n // Running from the server, or from the store when the endpoint is unavailable.\n const running = useMemo(() => {\n if (now.data && !malformed)\n return now.data.running.map((r) => ({\n taskId: r.taskId,\n runId: r.runId,\n sessionId: r.sessionId,\n }));\n return Object.values(runs)\n .filter((r) => isRunActive(r) && r.state !== \"queued\")\n .map((r) => ({ taskId: r.taskId, runId: r.id, sessionId: r.sessionId }));\n }, [now.data, runs, malformed]);\n const queued = useMemo(() => {\n if (now.data && !malformed)\n return now.data.queued.map((q) => ({\n taskId: q.taskId,\n eligibility: q.eligibility as Eligibility | undefined,\n }));\n return Object.values(tasks)\n .filter((t) => t.state === \"ready\" && !t.hiddenFromBoard)\n .sort((a, b) => a.priority - b.priority || a.position - b.position)\n .map((t) => ({ taskId: t.id, eligibility: undefined as Eligibility | undefined }));\n }, [now.data, tasks, malformed]);\n\n const loading = (!now.data && now.loading && !now.error) || !hydrated;\n const fatal = !!now.error && !unsupported && !now.data;\n if (malformed)\n return (\n <FatalError\n title=\"The coordinator sent a queue this version cannot read\"\n error=\"GET /api/now returned an unexpected shape. Check that the web app and coordinator versions match.\"\n />\n );\n\n return (\n <div className=\"flex w-full min-w-0 flex-col gap-4 px-4 pb-4 safe-pt-4 md:px-6\">\n <header className=\"flex min-w-0 flex-wrap items-center gap-3\">\n <h1 className=\"flex-1 text-lg font-semibold\">Queue</h1>\n <DispatchToggle />\n </header>\n <p className=\"text-sm text-muted\">\n Pausing stops new work from starting. Runs already in progress keep going.\n </p>\n <LastKnownNote subject=\"queue\" show={!!now.data} />\n {unsupported && (\n <UnsupportedCapability\n capability=\"Queue explanations\"\n reason=\"This coordinator does not report why queued tasks are waiting. The list below comes from local data.\"\n />\n )}\n {now.error != null && !unsupported && (\n <ErrorState\n compact\n title=\"Could not refresh running and queued work\"\n error={errorMessage(now.error)}\n onRetry={now.reload}\n />\n )}\n\n {loading ? (\n <LoadingState label=\"Loading running and queued work…\" />\n ) : fatal && running.length === 0 && queued.length === 0 ? null : running.length === 0 &&\n queued.length === 0 ? (\n <EmptyState\n icon={<Timer className=\"size-8\" />}\n title=\"Nothing running or queued\"\n description=\"Move a task to Ready on the board and the dispatcher starts it when it is eligible.\"\n action={{ label: \"Go to Board\", to: ROUTES.board }}\n />\n ) : (\n <div className=\"grid min-w-0 grid-cols-1 gap-4 xl:grid-cols-2 xl:items-start\">\n <section aria-labelledby=\"now-running\" className=\"flex min-w-0 flex-col gap-2\">\n <h2 id=\"now-running\" className=\"text-base font-semibold\">\n Running <span className=\"text-sm font-normal text-muted\">({running.length})</span>\n </h2>\n {running.length === 0 ? (\n <p className=\"text-sm text-muted\">Nothing is running.</p>\n ) : (\n <ul className=\"flex min-w-0 flex-col gap-2\">\n {running.map((r) => (\n <li key={r.runId}>\n <RunningRow taskId={r.taskId} runId={r.runId} sessionId={r.sessionId} />\n </li>\n ))}\n </ul>\n )}\n </section>\n <section aria-labelledby=\"now-queued\" className=\"flex min-w-0 flex-col gap-2\">\n <h2 id=\"now-queued\" className=\"text-base font-semibold\">\n Queued <span className=\"text-sm font-normal text-muted\">({queued.length})</span>\n </h2>\n {queued.length === 0 ? (\n <p className=\"text-sm text-muted\">No Ready tasks are waiting.</p>\n ) : (\n <ul className=\"flex min-w-0 flex-col gap-2\">\n {queued.map((q) => (\n <li key={q.taskId}>\n <QueuedRow\n task={tasks[q.taskId]}\n taskId={q.taskId}\n eligibility={q.eligibility}\n />\n </li>\n ))}\n </ul>\n )}\n </section>\n </div>\n )}\n </div>\n );\n}\n\nfunction RunningRow({\n taskId,\n runId,\n sessionId,\n}: {\n taskId: string;\n runId: string;\n sessionId: string | null;\n}) {\n const task = useSyncStore((s) => s.tasks[taskId]);\n const run = useSyncStore((s) => s.runs[runId]);\n const host = useSyncStore((s) => (run?.hostId ? s.hosts[run.hostId] : undefined));\n const project = useSyncStore((s) => (task ? s.projects[task.projectId] : undefined));\n const offline = !!host && host.connectivity !== \"connected\";\n return (\n <article className=\"flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface p-3\">\n <div className=\"flex min-w-0 flex-wrap items-start gap-2\">\n {run ? (\n <StatusChip kind=\"run\" value={run.state} size=\"sm\" />\n ) : (\n <StatusChip kind=\"task\" value=\"in_progress\" size=\"sm\" />\n )}\n <Link\n to={ROUTES.task(taskId)}\n className=\"min-w-0 flex-1 basis-48 font-medium break-words hover:underline\"\n >\n {task?.title ?? \"Task\"}\n </Link>\n {(sessionId ?? task?.sessionId) && (\n <Link\n to={ROUTES.session((sessionId ?? task?.sessionId) as string)}\n className={buttonClasses(\"secondary\", \"sm\")}\n >\n <ExternalLink aria-hidden className=\"size-3.5\" />\n Open session\n </Link>\n )}\n </div>\n <p className=\"text-xs text-muted\">\n {[\n project?.name,\n host ? `on ${host.name}` : null,\n run?.attempt && run.attempt > 1 ? `attempt ${run.attempt}` : null,\n run?.startedAt ? `started ${formatRelative(run.startedAt)}` : null,\n run?.controlMode === \"human\" ? \"you have control\" : \"automation\",\n ]\n .filter(Boolean)\n .join(\" · \")}\n </p>\n {run?.state === \"uncertain\" && host && (\n <p className=\"text-sm text-warning\">\n <span className=\"text-text\">\n Waiting for host {host.name} to confirm launch. It is never started elsewhere.\n </span>\n </p>\n )}\n {offline && host && (\n <HostUnavailable\n compact\n hostName={host.name}\n connectivity={host.connectivity === \"reconnecting\" ? \"reconnecting\" : \"unreachable\"}\n lastSeenAt={host.lastSeenAt}\n />\n )}\n </article>\n );\n}\n\nfunction QueuedRow({\n task,\n taskId,\n eligibility,\n}: {\n task: Task | undefined;\n taskId: string;\n eligibility?: Eligibility;\n}) {\n const project = useSyncStore((s) => (task ? s.projects[task.projectId] : undefined));\n const [busy, setBusy] = useState(false);\n const id = useId();\n const Icon = eligibility\n ? eligibility.eligible\n ? CircleCheck\n : WAIT_ICONS[eligibility.wait]\n : Timer;\n const waitLabel = eligibility\n ? eligibility.eligible\n ? `Starting on ${eligibility.hostName}`\n : WAIT_LABELS[eligibility.wait]\n : \"Waiting for dispatch\";\n const detail = eligibility && !eligibility.eligible ? eligibility.message : null;\n return (\n <article\n data-testid=\"now-queued-row\"\n className=\"flex min-w-0 flex-col gap-2 rounded-lg border border-border bg-surface p-3 sm:flex-row sm:items-center\"\n >\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Link to={ROUTES.task(taskId)} className=\"min-w-0 font-medium break-words hover:underline\">\n {task?.title ?? \"Task\"}\n </Link>\n {project && <span className=\"text-xs text-muted\">{project.name}</span>}\n <p className=\"flex min-w-0 items-start gap-1.5 text-sm\">\n <Icon\n aria-hidden\n className={`mt-0.5 size-4 shrink-0 ${eligibility?.eligible ? \"text-success\" : \"text-warning\"}`}\n />\n <span className=\"min-w-0 break-words\">\n <span className=\"font-medium\">{waitLabel}</span>\n {detail && detail !== waitLabel ? <span className=\"text-muted\">: {detail}</span> : null}\n </span>\n </p>\n </div>\n {task && (\n <div className=\"flex shrink-0 items-center gap-2\">\n <label htmlFor={id} className=\"text-sm text-muted\">\n Priority\n </label>\n <PrioritySelect\n id={id}\n width=\"auto\"\n value={task.priority}\n disabled={busy}\n onChange={async (p) => {\n setBusy(true);\n try {\n await updateTask(task.id, { priority: p });\n toast.success(`\"${task.title}\" is now ${PRIORITY_LABELS[p]} priority`);\n } catch (err) {\n toast.error(`Could not change priority: ${errorMessage(err)}`);\n } finally {\n setBusy(false);\n }\n }}\n />\n {busy && <Spinner label=\"Saving priority\" />}\n </div>\n )}\n </article>\n );\n}\n"],"ignoreList":[0,1,2,3],"mappings":"A,4nBASA,IAAMA,EAAa,CACjB,KAAM,cACN,KAAM,GACN,KAAM,CACJ,CAAC,OAAQ,CAAE,MAAO,IAAK,OAAQ,IAAK,EAAG,KAAM,EAAG,KAAM,GAAI,IAAK,IAAK,QAAS,CAAC,EAC9E,CACE,OACA,CACE,EAAG,4GACH,IAAK,QACP,CACF,EACA,CAAC,OAAQ,CAAE,EAAG,4BAA6B,IAAK,QAAS,CAAC,CAC5D,CACF,EACAA,EAAW,KACX,IAAM4C,EAAanC,EAAiBT,CAAU,EChBxCC,EAAa,CACjB,KAAM,QACN,KAAM,GACN,KAAM,CACJ,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAS,CAAC,EAC3C,CAAC,OAAQ,CAAE,EAAG,+BAAgC,IAAK,QAAS,CAAC,CAC/D,CACF,EACAA,EAAW,KACX,IAAM6C,EAAQrC,EAAiBR,CAAU,ECTnCC,EAAa,CACjB,KAAM,YACN,KAAM,GACN,KAAM,CACJ,CAAC,OAAQ,CAAE,EAAG,iCAAkC,IAAK,QAAS,CAAC,EAC/D,CAAC,OAAQ,CAAE,EAAG,mCAAoC,IAAK,QAAS,CAAC,EACjE,CAAC,OAAQ,CAAE,EAAG,UAAW,IAAK,QAAS,CAAC,EACxC,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAS,CAAC,CAC7C,CACF,EACAA,EAAW,KACX,IAAM8C,EAAWvC,EAAiBP,CAAU,ECXtC+C,EAAa,CACjB,KAAM,YACN,KAAM,GACN,KAAM,CACJ,CAAC,OAAQ,CAA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AAD,CACM,KACJ,MAAM,OACN,MAAO2C,EAAK,SACZ,SAAUS,EACV,SAAU,KAAO,IAAM,CACrBC,EAAQ,EAAI,EACZ,GAAI,CACF,MAAMhD,EAAWsC,EAAK,GAAI,CAAE,SAAUgB,CAAE,CAAC,EACzC1D,EAAM,QAAQ,IAAI0C,EAAK,MAAM,WAAWvD,EAAgBuE,GAAG,UAAU,CACvE,OAASC,EAAK,CACZ3D,EAAM,MAAM,8BAA8BJ,EAAa+D,CAAG,GAAG,CAC/D,QAAU,CACRP,EAAQ,EAAK,CACf,CACF,CACD,CAAA,EACAD,IAAQ,EAAA9B,EAAA,IAAA,CAAChC,EAAD,CAAS,MAAM,iBAAmB,CAAA,CACxC,CAEA,CAAA,CAAA,C,EAEb,C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e,m as t,n,t as r}from"./jsx-runtime-D13aM9HY.js";import{a as i,bt as a,d as o,gt as s,h as c,vt as l,yt as u}from"./states-C773NlHo.js";import{i as d}from"./useBreakpoint-BphHBrzF.js";import{t as f}from"./Checkbox-rDvnQnxc.js";import{t as p}from"./Card-CAFxHoHd.js";var m={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};m.node;var h=n(m),g={name:`folder-git-2`,size:24,node:[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]};g.node;var _=n(g),v={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};v.node;var y=n(v),b={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};b.node;var x=n(b),S=e(t(),1),C=r();function w({host:e,compact:t}){let[n,r]=(0,S.useState)(null),[m,h]=(0,S.useState)(new Set),[g,_]=(0,S.useState)(null),[v,y]=(0,S.useState)(!1),b=e.connectivity===`connected`;if((0,S.useEffect)(()=>{if(!b)return;let t=!0;return s(`/api/hosts/${encodeURIComponent(e.id)}/project-suggestions`).then(e=>{t&&(r(e.suggestions),h(new Set(e.suggestions.filter(e=>e.preselected).map(e=>e.rootPath))))},e=>{t&&!a(e,`unsupported_capability`)&&_(e)}),()=>{t=!1}},[e.id,b]),!n||n.length===0)return g?(0,C.jsx)(i,{error:g}):null;let x=async()=>{y(!0);let t=0,i=[];for(let r of n.filter(e=>m.has(e.rootPath)))try{await l(`/api/projects`,{name:r.name,hostId:e.id,path:r.rootPath}),t+=1}catch(e){a(e,`conflict`)?t+=1:i.push(`${r.name}: ${u(e)}`)}y(!1),t>0&&d.success(`Added ${t} project${t===1?``:`s`}`);for(let e of i)d.error(e);r(e=>e?.filter(e=>!m.has(e.rootPath))??null),h(new Set)};return(0,C.jsx)(p,{testId:`project-suggestions`,title:`Suggested from your Pi history`,description:`Repositories you used with Pi in the last 30 days on ${e.name}.`,className:t?`mb-3`:void 0,actions:(0,C.jsx)(o,{variant:`primary`,size:`sm`,busy:v,disabled:m.size===0,onClick:()=>void x(),children:`Add selected`}),children:(0,C.jsx)(`ul`,{className:`flex flex-col gap-1`,children:n.map(e=>(0,C.jsx)(`li`,{children:(0,C.jsx)(f,{label:e.name,description:(0,C.jsxs)(`span`,{className:`font-mono text-xs text-muted`,children:[e.rootPath,` · `,e.sessionCount,` session`,e.sessionCount===1?``:`s`,` · last`,` `,c(e.lastActivityAt)]}),checked:m.has(e.rootPath),onChange:t=>h(n=>{let r=new Set(n);return t?r.add(e.rootPath):r.delete(e.rootPath),r})})},e.rootPath))})})}function T(e){return e.startsWith(`local:`)?`Local only`:e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,``)}function E(e,t){let n=t.trim().toLowerCase();return!n||e.name.toLowerCase().includes(n)||e.repoIdentity.toLowerCase().includes(n)}export{y as a,x as i,T as n,_ as o,w as r,h as s,E as t};
|
|
2
|
+
//# sourceMappingURL=repo-BDS8RBxq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-BDS8RBxq.js","names":["__iconData","__iconData","__iconData","useState","__toESM","require_react","require_jsx_runtime","InlineError","isApiError","Button","apiGet","formatRelative","apiPost","errorMessage","toast","Checkbox","Card","__iconData$3","ChevronLeft","createLucideIcon","__iconData$2","FolderGit2","__iconData$1","Send","__iconData","SlidersHorizontal","import_react","import_jsx_runtime","ProjectSuggestions","items","setItems","checked","setChecked","error","setError","busy","setBusy","connected","host","alive","r","s","add","added","failed","i","f","prev","compact","next","on","repoLabel","identity","matchesProject","q","query","p"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/chevron-left.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/folder-git-2.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/send.mjs","../../../../node_modules/.pnpm/lucide-react@1.61.0_@types+react@19.3.0_react@19.3.1/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.mjs","../../src/features/settings/ProjectSuggestions.tsx","../../src/lib/repo.ts"],"sourcesContent":["/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"chevron-left\",\n size: 24,\n node: [[\"path\", { d: \"m15 18-6-6 6-6\", key: \"1wnfg3\" }]]\n};\n__iconData.node;\nconst ChevronLeft = createLucideIcon(__iconData);\n\nexport { __iconData, ChevronLeft as default };\n//# sourceMappingURL=chevron-left.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"folder-git-2\",\n size: 24,\n node: [\n [\"path\", { d: \"M18 19a5 5 0 0 1-5-5v8\", key: \"sz5oeg\" }],\n [\n \"path\",\n {\n d: \"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5\",\n key: \"1w6njk\"\n }\n ],\n [\"circle\", { cx: \"13\", cy: \"12\", r: \"2\", key: \"1j92g6\" }],\n [\"circle\", { cx: \"20\", cy: \"19\", r: \"2\", key: \"1obnsp\" }]\n ]\n};\n__iconData.node;\nconst FolderGit2 = createLucideIcon(__iconData);\n\nexport { __iconData, FolderGit2 as default };\n//# sourceMappingURL=folder-git-2.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"send\",\n size: 24,\n node: [\n [\n \"path\",\n {\n d: \"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\",\n key: \"1ffxy3\"\n }\n ],\n [\"path\", { d: \"m21.854 2.147-10.94 10.939\", key: \"12cjpa\" }]\n ]\n};\n__iconData.node;\nconst Send = createLucideIcon(__iconData);\n\nexport { __iconData, Send as default };\n//# sourceMappingURL=send.mjs.map\n","/**\n * @license lucide-react v1.61.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"sliders-horizontal\",\n size: 24,\n node: [\n [\"path\", { d: \"M10 5H3\", key: \"1qgfaw\" }],\n [\"path\", { d: \"M12 19H3\", key: \"yhmn1j\" }],\n [\"path\", { d: \"M14 3v4\", key: \"1sua03\" }],\n [\"path\", { d: \"M16 17v4\", key: \"1q0r14\" }],\n [\"path\", { d: \"M21 12h-9\", key: \"1o4lsq\" }],\n [\"path\", { d: \"M21 19h-5\", key: \"1rlt1p\" }],\n [\"path\", { d: \"M21 5h-7\", key: \"1oszz2\" }],\n [\"path\", { d: \"M8 10v4\", key: \"tgpxqk\" }],\n [\"path\", { d: \"M8 12H3\", key: \"a7s4jb\" }]\n ]\n};\n__iconData.node;\nconst SlidersHorizontal = createLucideIcon(__iconData);\n\nexport { __iconData, SlidersHorizontal as default };\n//# sourceMappingURL=sliders-horizontal.mjs.map\n","import type { Host, ProjectSuggestionsResponse } from \"@switchyard/protocol\";\nimport { useEffect, useState } from \"react\";\nimport { Button } from \"../../components/ui/Button\";\nimport { Card } from \"../../components/ui/Card\";\nimport { Checkbox } from \"../../components/ui/Checkbox\";\nimport { InlineError } from \"../../components/ui/states\";\nimport { toast } from \"../../components/ui/Toast\";\nimport { formatRelative } from \"../../lib/time\";\nimport { apiGet, apiPost, errorMessage, isApiError } from \"../../sync/api\";\n\n/** Repositories used with Pi recently on a host, to add as projects in one step. */\nexport function ProjectSuggestions({ host, compact }: { host: Host; compact?: boolean }) {\n const [items, setItems] = useState<ProjectSuggestionsResponse[\"suggestions\"] | null>(null);\n const [checked, setChecked] = useState<Set<string>>(new Set());\n const [error, setError] = useState<unknown>(null);\n const [busy, setBusy] = useState(false);\n const connected = host.connectivity === \"connected\";\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: load once per host and connection\n useEffect(() => {\n if (!connected) return;\n let alive = true;\n apiGet<ProjectSuggestionsResponse>(\n `/api/hosts/${encodeURIComponent(host.id)}/project-suggestions`,\n ).then(\n (r) => {\n if (!alive) return;\n setItems(r.suggestions);\n setChecked(new Set(r.suggestions.filter((s) => s.preselected).map((s) => s.rootPath)));\n },\n (e) => {\n if (alive && !isApiError(e, \"unsupported_capability\")) setError(e);\n },\n );\n return () => {\n alive = false;\n };\n }, [host.id, connected]);\n\n if (!items || items.length === 0) {\n return error ? <InlineError error={error} /> : null;\n }\n\n const add = async () => {\n setBusy(true);\n let added = 0;\n const failed: string[] = [];\n for (const s of items.filter((i) => checked.has(i.rootPath))) {\n try {\n await apiPost(\"/api/projects\", { name: s.name, hostId: host.id, path: s.rootPath });\n added += 1;\n } catch (e) {\n if (isApiError(e, \"conflict\")) added += 1;\n else failed.push(`${s.name}: ${errorMessage(e)}`);\n }\n }\n setBusy(false);\n if (added > 0) toast.success(`Added ${added} project${added === 1 ? \"\" : \"s\"}`);\n for (const f of failed) toast.error(f);\n setItems((prev) => prev?.filter((i) => !checked.has(i.rootPath)) ?? null);\n setChecked(new Set());\n };\n\n return (\n <Card\n testId=\"project-suggestions\"\n title=\"Suggested from your Pi history\"\n description={`Repositories you used with Pi in the last 30 days on ${host.name}.`}\n className={compact ? \"mb-3\" : undefined}\n actions={\n <Button\n variant=\"primary\"\n size=\"sm\"\n busy={busy}\n disabled={checked.size === 0}\n onClick={() => void add()}\n >\n Add selected\n </Button>\n }\n >\n <ul className=\"flex flex-col gap-1\">\n {items.map((s) => (\n <li key={s.rootPath}>\n <Checkbox\n label={s.name}\n description={\n <span className=\"font-mono text-xs text-muted\">\n {s.rootPath} · {s.sessionCount} session{s.sessionCount === 1 ? \"\" : \"s\"} · last{\" \"}\n {formatRelative(s.lastActivityAt)}\n </span>\n }\n checked={checked.has(s.rootPath)}\n onChange={(on) =>\n setChecked((prev) => {\n const next = new Set(prev);\n if (on) next.add(s.rootPath);\n else next.delete(s.rootPath);\n return next;\n })\n }\n />\n </li>\n ))}\n </ul>\n </Card>\n );\n}\n","import type { Project } from \"@switchyard/protocol\";\n\n/** \"Local only\" for repositories without a remote (`local:<sha|path>`), else the remote without its scheme. */\nexport function repoLabel(identity: string): string {\n if (identity.startsWith(\"local:\")) return \"Local only\";\n return identity.replace(/^[a-z][a-z0-9+.-]*:\\/\\//i, \"\");\n}\n\n/** Case-insensitive match on project name or remote. */\nexport function matchesProject(p: Pick<Project, \"name\" | \"repoIdentity\">, query: string): boolean {\n const q = query.trim().toLowerCase();\n if (!q) return true;\n return p.name.toLowerCase().includes(q) || p.repoIdentity.toLowerCase().includes(q);\n}\n"],"ignoreList":[0,1,2,3],"mappings":"A,uRASA,IAAMA,EAAa,CACjB,KAAM,eACN,KAAM,GACN,KAAM,CAAC,CAAC,OAAQ,CAAE,EAAG,iBAAkB,IAAK,QAAS,CAAC,CAAC,CACzD,EACAA,EAAW,KACX,IAAMkB,EAAcC,EAAiBnB,CAAU,ECNzCC,EAAa,CACjB,KAAM,eACN,KAAM,GACN,KAAM,CACJ,CAAC,OAAQ,CAAE,EAAG,yBAA0B,IAAK,QAAS,CAAC,EACvD,CACE,OACA,CACE,EAAG,yGACH,IAAK,QACP,CACF,EACA,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,IAAK,IAAK,QAAS,CAAC,EACxD,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,IAAK,IAAK,QAAS,CAAC,CAC1D,CACF,EACA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,aAAa,YAAY,CAAC,CAAC,SAASF,CAAC,CACpF,C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{_ as e,c as t,f as n,i as r,l as i,m as a,n as o,o as s,p as c,t as l,u}from"./jsx-runtime-D13aM9HY.js";import{_ as d,m as f,n as p,o as m,x as h}from"./StatusChip-BYuVxYS7.js";import{A as g,P as _,S as v,X as y,_ as b,_t as x,a as S,at as C,bt as w,c as T,d as E,dt as D,f as O,g as k,h as A,ht as j,i as M,n as N,ot as ee,p as te,pt as ne,r as re,rt as ie,s as P,st as ae,t as F,u as oe,ut as se,v as I,vt as L,x as ce,y as le,yt as ue,z as R}from"./states-C773NlHo.js";import{a as de,n as fe,s as pe}from"./auth-308hUVgi.js";import{a as me,i as he,r as z,t as B}from"./Field-Dbg_8KTt.js";import{t as ge}from"./bell-DSwa2PAb.js";import{n as _e,r as ve,t as ye}from"./Copy-D8xhl7eJ.js";import{a as be,i as xe,n as Se,o as Ce,r as we,s as Te,t as Ee}from"./repo-BDS8RBxq.js";import{t as De}from"./chevron-right-evVLS6hq.js";import{c as Oe,i as V,l as ke,n as Ae,s as je,t as Me,u as Ne}from"./useBreakpoint-BphHBrzF.js";import{n as Pe,t as Fe}from"./pencil-DI8QbCN8.js";import{t as Ie}from"./key-round-VDbE9E4X.js";import{i as Le,n as Re,r as ze,t as Be}from"./useBackTo-BIrCq3W2.js";import{n as Ve,t as He}from"./DangerZone-og55TRug.js";import{n as Ue,t as We}from"./Checkbox-rDvnQnxc.js";import{t as Ge}from"./server-BqZ-w6M8.js";import{t as Ke}from"./terminal-BOV_MXPZ.js";import{a as qe,b as Je,i as Ye,n as Xe,o as Ze,r as Qe,s as $e,t as et}from"./index-BHGZTS2e.js";import{n as tt,t as H}from"./Overlay-BNPvMjLX.js";import{n as nt,r as U}from"./TextArea-CKGHwURx.js";import{t as rt}from"./TextLink-Bub7sMxr.js";import{n as it,t as W}from"./useResource-BBqCoY2q.js";import{t as G}from"./Card-CAFxHoHd.js";import{t as K}from"./Select-C9L1HKMm.js";import{n as at}from"./Switch-DAcUcSbH.js";import{d as ot,f as st,l as ct,r as lt}from"./logic-B46fwD-8.js";var ut={name:`bell-off`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]};ut.node;var dt=o(ut),ft={name:`bell-ring`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]};ft.node;var pt=o(ft),mt={name:`database-backup`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 12a9 3 0 0 0 5 2.69`,key:`1ui2ym`}],[`path`,{d:`M21 9.3V5`,key:`6k6cib`}],[`path`,{d:`M3 5v14a9 3 0 0 0 6.47 2.88`,key:`i62tjy`}],[`path`,{d:`M12 12v4h4`,key:`1bxaet`}],[`path`,{d:`M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16`,key:`1f4ei9`}]]};mt.node;var ht=o(mt),gt={name:`folder-plus`,size:24,node:[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};gt.node;var _t=o(gt),vt={name:`folder-search`,size:24,node:[[`path`,{d:`M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1`,key:`1bw5m7`}],[`path`,{d:`m21 21-1.9-1.9`,key:`1g2n9r`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}]]};vt.node;var yt=o(vt),bt={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};bt.node;var xt=o(bt),St={name:`laptop`,size:24,node:[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]};St.node;var Ct=o(St),wt={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};wt.node;var Tt=o(wt),Et={name:`monitor-smartphone`,size:24,node:[[`path`,{d:`M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8`,key:`10dyio`}],[`path`,{d:`M10 19v-3.96 3.15`,key:`1irgej`}],[`path`,{d:`M7 19h5`,key:`qswx4l`}],[`rect`,{width:`6`,height:`10`,x:`16`,y:`12`,rx:`2`,key:`1egngj`}]]};Et.node;var Dt=o(Et),Ot={name:`shield-off`,size:24,node:[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]};Ot.node;var kt=o(Ot),At={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};At.node;var jt=o(At),Mt={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};Mt.node;var Nt=o(Mt),Pt={name:`stethoscope`,size:24,node:[[`path`,{d:`M11 2v2`,key:`1539x4`}],[`path`,{d:`M5 2v2`,key:`1yf1q8`}],[`path`,{d:`M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1`,key:`rb5t3r`}],[`path`,{d:`M8 15a6 6 0 0 0 12 0v-3`,key:`x18d4x`}],[`circle`,{cx:`20`,cy:`10`,r:`2`,key:`ts1r5v`}]]};Pt.node;var Ft=o(Pt),q=e(a(),1),J=l(),It=[{path:`projects`,label:`Projects`,description:`Repositories, checkouts and workspaces`,icon:Ce,group:`Workspace`},{path:`profiles`,label:`Pi profiles`,description:`Provider, model and thinking presets`,icon:xe,group:`Workspace`},{path:`hosts`,label:`Hosts`,description:`Execution hosts, capabilities and versions`,icon:Ge,group:`Infrastructure`},{path:`adapters`,label:`Adapters`,description:`Extension adapters on each host`,icon:v,group:`Infrastructure`},{path:`backups`,label:`Backups`,description:`Back up and restore the coordinator`,icon:ht,group:`Infrastructure`},{path:`diagnostics`,label:`Diagnostics`,description:`Versions, migrations, events and recent problems`,icon:Ft,group:`Infrastructure`},{path:`sign-in`,label:`Sign-in`,description:`Passkeys, single sign-on and signing out`,icon:Ie,group:`Access`},{path:`devices`,label:`Devices`,description:`Signed-in browsers, apps and terminals`,icon:Dt,group:`Access`},{path:`notifications`,label:`Notifications`,description:`Push, quiet hours and previews`,icon:ge,group:`This device`},{path:`device`,label:`This device`,description:`Preferences stored on this device`,icon:xt,group:`This device`}],Lt=[`Workspace`,`Infrastructure`,`Access`,`This device`].map(e=>({label:e,sections:It.filter(t=>t.group===e)})),Y=e=>e?`/settings/${e}`:`/settings`;function X({title:e,description:t,actions:n,back:i,testId:a,children:o}){let s=Me()===`mobile`,c=i??(s?{to:Y(),label:`Settings`}:null),l=ze(c?.to??Y()),u=s&&!!c;return(0,J.jsxs)(`section`,{"data-testid":a,className:`flex w-full min-w-0 flex-col gap-4 px-4 py-4 md:px-6`,children:[u&&c?(0,J.jsxs)(`header`,{className:`sticky top-0 z-20 -mx-4 -mt-4 flex min-w-0 items-center gap-1 border-b border-border bg-surface px-1 pb-1 safe-pt-1`,children:[(0,J.jsx)(r,{to:c.to,onClick:Re(l),"aria-label":`Back to ${c.label}`,title:`Back to ${c.label}`,className:O(`ghost`,`md`,`size-11 px-0`),children:(0,J.jsx)(me,{"aria-hidden":!0,className:`size-5`})}),(0,J.jsx)(`h1`,{className:`min-w-0 flex-1 truncate text-base font-semibold`,children:e})]}):c&&(0,J.jsxs)(r,{to:c.to,onClick:Re(l),className:`tap -ml-2 inline-flex w-fit items-center gap-1 rounded-md px-2 py-1 text-sm font-medium text-accent hover:bg-surface-2`,children:[(0,J.jsx)(Te,{"aria-hidden":!0,className:`size-4`}),`Back to `,c.label]}),(!u||t||n)&&(0,J.jsxs)(`header`,{className:`flex min-w-0 flex-wrap items-start gap-3`,children:[(0,J.jsxs)(`div`,{className:`min-w-0 flex-[1_1_15rem]`,children:[!u&&(0,J.jsx)(`h1`,{className:`break-words text-lg font-semibold`,children:e}),t&&(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:t})]}),n&&(0,J.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:n})]}),o]})}function Z({items:e}){return(0,J.jsx)(`dl`,{className:`grid min-w-0 gap-x-4 gap-y-1 text-sm sm:grid-cols-[minmax(8rem,12rem)_minmax(0,1fr)]`,children:e.map(([e,t],n)=>(0,J.jsxs)(`div`,{className:`contents`,children:[(0,J.jsx)(`dt`,{className:`text-muted`,children:e}),(0,J.jsx)(`dd`,{className:`mb-1 min-w-0 break-words sm:mb-0`,children:t})]},n))})}function Q(){return R(e=>e.hydrated)}var Rt={darwin:`macOS`,linux:`Linux`};function zt({host:e}){return e.piVersion?e.piCompatible?(0,J.jsx)(p,{icon:Ne,tone:`success`,label:`Pi ${e.piVersion} (compatible)`}):(0,J.jsx)(p,{icon:I,tone:`danger`,label:`Pi ${e.piVersion} (incompatible, needs ${y})`}):(0,J.jsx)(p,{icon:I,tone:`warning`,label:`Pi not detected (incompatible)`})}function Bt(e){let t=e.trim();return t?t.startsWith(`/`)?null:`Use an absolute path that starts with /, e.g. /Users/me/src/app.`:`Enter the path of the checkout on the host.`}function Vt(e){if(typeof e!=`object`||!e)return!1;let t=e;return Array.isArray(t.passkeys)&&typeof t.passkeyAvailability==`object`}function Ht(e){return e.split(`
|
|
2
|
+
`).map(e=>e.trim()).filter(Boolean)}function Ut(e){let[t,n]=(0,q.useState)(()=>Date.now());if((0,q.useEffect)(()=>{if(!e)return;n(Date.now());let t=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(t)},[e]),!e)return null;let r=Date.parse(e);return Number.isNaN(r)?null:Math.max(0,r-t)}function Wt(e){let t=Math.ceil(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}var Gt={active:{icon:Ne,label:`Active`,tone:`success`},disabled:{icon:d,label:`Disabled`,tone:`neutral`},error:{icon:ke,label:`Error`,tone:`danger`}};function Kt({status:e}){let t=Gt[e]??Gt.error;return(0,J.jsx)(p,{icon:t.icon,label:t.label,tone:t.tone})}var qt={project:`Project`,owner:`Owner`,plugin:`Plugin`,bundled:`Bundled`},Jt={info:{icon:je,label:`Info`,tone:`info`},warning:{icon:I,label:`Warning`,tone:`warning`},error:{icon:ke,label:`Error`,tone:`danger`}};function Yt({level:e}){let t=Jt[e]??Jt.info;return(0,J.jsx)(p,{icon:t.icon,label:t.label,tone:t.tone})}function Xt(e){let t=R(e=>e.diagnostics);return(0,q.useMemo)(()=>{let n=new Set,r=[];for(let i of[...e??[],...t]){let e=`${i.at}|${i.adapterId??``}|${i.sessionId??``}|${i.message}`;n.has(e)||(n.add(e),r.push(i))}return r.sort((e,t)=>t.at.localeCompare(e.at))},[e,t])}function Zt(){let e=Q(),t=R(e=>e.adapters),n=R(e=>e.hosts),i=it(`/api/diagnostics`,W),a=Xt(Array.isArray(i.data?.diagnostics)?i.data.diagnostics:void 0),o=(0,q.useMemo)(()=>Object.entries(t).filter(([,e])=>e.length>0).map(([e,t])=>({hostId:e,hostName:n[e]?.name??`Removed host`,adapters:[...t].sort((e,t)=>e.id.localeCompare(t.id))})).sort((e,t)=>e.hostName.localeCompare(t.hostName)),[t,n]);return(0,J.jsxs)(X,{title:`Adapters`,description:`Adapters translate Pi extensions into Switchyard cards, panels and interactions. Each host reports its own.`,children:[(0,J.jsx)(P,{}),i.error!==null&&!i.loading&&!i.fatal&&(0,J.jsx)(N,{compact:!0,title:`Could not load adapter diagnostics history`,error:i.error,onRetry:i.reload}),e?o.length===0?(0,J.jsx)(F,{icon:(0,J.jsx)(v,{className:`size-8`}),title:`No adapters reported`,description:`Hosts report adapters when their agent connects. Check that your hosts are connected.`,action:{label:`Open hosts`,to:Y(`hosts`)}}):o.map(e=>(0,J.jsxs)(`section`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,J.jsx)(`h2`,{className:`text-base font-semibold`,children:(0,J.jsx)(r,{to:Y(`hosts/${encodeURIComponent(e.hostId)}`),className:`hover:underline`,children:e.hostName})}),e.adapters.map(e=>(0,J.jsx)(Qt,{adapter:e,diagnostics:a.filter(t=>t.adapterId===e.id)},e.id))]},e.hostId)):(0,J.jsx)(T,{label:`Loading adapters…`})]})}function Qt({adapter:e,diagnostics:t}){return(0,J.jsxs)(G,{title:(0,J.jsx)(`span`,{className:`break-all font-mono`,children:e.id}),actions:(0,J.jsx)(Kt,{status:e.status}),children:[(0,J.jsx)(Z,{items:[[`Version`,e.version],[`Tier`,qt[e.tier]??e.tier],[`Target extension`,(0,J.jsx)(`span`,{className:`break-all font-mono`,children:e.target.extension},`t`)],[`Version range`,(0,J.jsx)(`span`,{className:`font-mono`,children:e.target.versionRange},`r`)],[`Tested versions`,e.target.testedVersions.length?e.target.testedVersions.join(`, `):`None recorded`],[`Capabilities`,e.capabilities.length?e.capabilities.join(`, `):`None`],[`Web renderer`,e.webRenderer?`Yes (runs in a sandboxed frame; mobile uses a fallback)`:`No (native cards only)`],...e.detail?[[`Detail`,e.detail]]:[]]}),(0,J.jsx)(`h3`,{className:`mt-3 mb-1 text-sm font-semibold`,children:`Recent diagnostics`}),t.length===0?(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`No diagnostics for this adapter.`}):(0,J.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-2`,children:t.slice(0,10).map(e=>(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-start gap-2 text-sm`,children:[(0,J.jsx)(Yt,{level:e.level}),(0,J.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:e.message}),(0,J.jsx)(`time`,{dateTime:e.at,className:`text-xs text-muted`,children:k(e.at)})]},`${e.at}-${e.message}`))})]})}function $t(e){return W(e)&&W(e.versions)}var en=`/api/diagnostics`,tn=`switchyard coordinator backup <file>`,nn=`switchyard coordinator restore <file>`;function rn(e){let t=e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/_/g,` `);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function an(e,t){return t==null?`None`:typeof t==`string`&&/At$|time|date/i.test(e)?k(t):typeof t==`object`?JSON.stringify(t):String(t)}function on(){let e=it(en,$t),t=e.data&&W(e.data.backup)?e.data.backup:null;return(0,J.jsxs)(X,{title:`Backups`,description:`The coordinator keeps all state in one SQLite database. Back it up from the machine that runs the coordinator.`,children:[(0,J.jsxs)(G,{title:`Back up`,children:[(0,J.jsx)(`p`,{className:`mb-2 text-sm`,children:`Writes a consistent copy of the database to a file while the coordinator keeps running.`}),(0,J.jsx)(ye,{text:tn,label:`Backup command`,copyLabel:`Copy command`})]}),(0,J.jsxs)(G,{title:`Restore`,children:[(0,J.jsxs)(`p`,{className:`mb-2 text-sm`,children:[`Restore refuses to run while the coordinator is running: stop it first. The current database is kept next to it as`,` `,(0,J.jsx)(`code`,{className:`break-all`,children:`coordinator.db.bak-<ts>`}),`.`]}),(0,J.jsx)(ye,{text:nn,label:`Restore command`,copyLabel:`Copy command`}),(0,J.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:`Hosts keep running sessions during a coordinator restart and replay their events when it comes back.`})]}),(0,J.jsx)(G,{title:`Last backup`,children:e.fatal?(0,J.jsx)(re,{error:e.error}):e.error&&!e.loading&&!e.data?(0,J.jsx)(N,{compact:!0,title:`Could not load backup info`,error:e.error,onRetry:e.reload}):e.data?t&&Object.keys(t).length>0?(0,J.jsx)(Z,{items:Object.entries(t).map(([e,t])=>[rn(e),an(e,t)])}):(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`No backup info is recorded by the coordinator. Keep track of your backup files yourself, or schedule the backup command with cron or launchd.`}):(0,J.jsx)(T,{label:`Loading backup info…`})})]})}var sn={browser:`Browser`,pwa:`Home Screen app`,terminal:`Terminal`,cli:`CLI`},cn={granted:`allowed`,denied:`blocked`,default:`not requested`,unknown:`unknown`};function ln({kind:e}){return(0,J.jsx)(e===`pwa`?jt:e===`browser`?Ct:Ke,{"aria-hidden":!0,className:`mt-0.5 size-5 shrink-0 text-muted`})}function un(){let e=Q(),t=R(e=>e.devices);pe(e=>e.me);let n=fe(),r=(0,q.useMemo)(()=>Object.values(t).filter(e=>e.revokedAt===null).sort((e,t)=>Number(t.id===n)-Number(e.id===n)||(t.lastSeenAt??``).localeCompare(e.lastSeenAt??``)),[t,n]),[i,a]=(0,q.useState)(null),[o,s]=(0,q.useState)(``),[c,l]=(0,q.useState)(!1),[u,d]=(0,q.useState)(null),[f,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(!1),[_,v]=(0,q.useState)(null),[y,b]=(0,q.useState)(null),S=async()=>{if(f){g(!0),v(null);try{await L(`/api/devices/${encodeURIComponent(f.id)}/revoke`),V.success(`${f.name} revoked`),m(null)}catch(e){v(e)}finally{g(!1)}}},C=async e=>{b(e.id);try{await x(`/api/devices/${encodeURIComponent(e.id)}`,{preferredMobile:!0}),V.success(`${e.name} is now the preferred mobile device`)}catch(e){V.error(`Could not set the preferred device: ${ue(e)}`)}finally{b(null)}},w=async()=>{if(!i)return;let e=o.trim();if(e){l(!0),d(null);try{await x(`/api/devices/${encodeURIComponent(i.id)}`,{name:e}),V.success(`Renamed to ${e}`),a(null)}catch(e){d(e)}finally{l(!1)}}};return(0,J.jsxs)(X,{testId:`settings-devices`,title:`Devices`,description:`Browsers, Home Screen apps and terminals signed in to this coordinator. Revoke one to sign it out.`,children:[(0,J.jsx)(P,{}),e?r.length===0?(0,J.jsx)(F,{icon:(0,J.jsx)(Dt,{className:`size-8`}),title:`No devices`,description:`Browsers and terminals appear here once they sign in.`}):(0,J.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border bg-surface`,children:r.map(e=>{let t=e.id===n;return(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-start gap-3 border-b border-border px-4 py-3 last:border-b-0`,children:[(0,J.jsx)(ln,{kind:e.kind}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`min-w-0 break-words font-medium`,children:e.name}),t&&(0,J.jsx)(p,{icon:Ct,tone:`info`,label:`This device`}),e.preferredMobile&&(0,J.jsx)(p,{icon:Nt,tone:`success`,label:`Preferred mobile`})]}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted`,children:[(0,J.jsx)(`span`,{children:sn[e.kind]}),(0,J.jsxs)(`span`,{children:[`Last seen `,A(e.lastSeenAt)]}),(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[e.push.subscribed?(0,J.jsx)(pt,{"aria-hidden":!0,className:`size-4 shrink-0`}):(0,J.jsx)(dt,{"aria-hidden":!0,className:`size-4 shrink-0`}),e.push.subscribed?`Push subscribed`:`No push subscription`,`, permission`,` `,cn[e.push.permission]]})]})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[!e.preferredMobile&&(0,J.jsx)(E,{size:`sm`,icon:(0,J.jsx)(Nt,{className:`size-4`}),busy:y===e.id,onClick:()=>C(e),children:`Set as preferred mobile device`}),(0,J.jsx)(E,{size:`sm`,variant:`ghost`,"data-testid":`device-rename`,icon:(0,J.jsx)(Fe,{className:`size-4`}),onClick:()=>{d(null),s(e.name),a(e)},children:`Rename`}),(0,J.jsx)(E,{size:`sm`,variant:`ghost`,className:`text-danger`,icon:(0,J.jsx)(kt,{className:`size-4`}),onClick:()=>{v(null),m(e)},children:`Revoke`})]})]},e.id)})}):(0,J.jsx)(T,{label:`Loading devices…`}),(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`The preferred mobile device receives push notifications when no desktop was recently active.`}),(0,J.jsx)(H,{open:i!==null,onClose:()=>a(null),title:`Rename device`,confirmLabel:`Save`,danger:!1,busy:c,error:u,confirmDisabled:!o.trim(),onConfirm:w,children:(0,J.jsx)(U,{"aria-label":`Device name`,maxLength:80,value:o,autoComplete:`off`,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&o.trim()&&!c&&w()}})}),(0,J.jsxs)(H,{open:f!==null,onClose:()=>m(null),title:f?`Revoke ${f.name}?`:`Revoke device`,confirmLabel:`Revoke device`,busy:h,error:_,onConfirm:S,children:[(0,J.jsx)(`p`,{className:`text-sm`,children:`Its credential stops working immediately and its push subscription is removed. To use it again, sign in on it again.`}),f?.id===n&&(0,J.jsx)(`p`,{className:`text-sm font-medium text-danger`,children:`This is the device you are using now. Revoking it signs you out here.`})]})]})}function dn(){let e=Je(e=>e.sendWithEnter),t=Je(e=>e.collapseWork),n=Je(e=>e.set),r=Me(),i=Ae();pe(e=>e.me);let a=fe(),o=R(e=>a?e.devices[a]:void 0);return(0,J.jsxs)(X,{title:`This device`,description:`These preferences are stored in this browser only; your other devices keep their own.`,children:[(0,J.jsx)(G,{title:`Composer`,children:(0,J.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,J.jsx)(at,{label:`Send with Enter`,description:`On desktop, Enter sends the message and Shift+Enter inserts a newline. When off, Enter inserts a newline; send with the Send button.`,checked:e,onChange:e=>n(`sendWithEnter`,e)}),(0,J.jsxs)(`p`,{className:`text-sm text-muted`,children:[`On mobile, Return always inserts a newline and messages are sent with the Send button.`,r===`mobile`||i?` That applies on this device now.`:``]})]})}),(0,J.jsx)(G,{title:`Transcript`,children:(0,J.jsx)(at,{label:`Fold finished turns`,description:`Collapse the tool calls and thinking of each finished turn into one line. The final reply always shows.`,checked:t,onChange:e=>n(`collapseWork`,e)})}),(0,J.jsx)(G,{title:`Identity`,children:(0,J.jsx)(Z,{items:[[`Name`,o?.name??`Unknown`],[`Kind`,o?sn[o.kind]:`Unknown`],[`Device ID`,(0,J.jsx)(`span`,{className:`break-all font-mono`,children:a??`Unknown`},`id`)]]})})]})}var $=e=>e==null||e===``?`Unknown`:String(e);function fn(){let e=it(en,$t),t=e.data,n=Xt(Array.isArray(t?.diagnostics)?t.diagnostics:void 0),r=R(e=>e.hosts),i=(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(E,{icon:(0,J.jsx)(ve,{className:`size-4`}),disabled:!t,onClick:()=>t&&_e(JSON.stringify(t,null,2),`Diagnostics JSON copied`),children:`Copy diagnostics JSON`}),(0,J.jsx)(E,{busy:e.loading&&!!t,icon:(0,J.jsx)(ce,{className:`size-4`}),onClick:e.reload,children:`Refresh`})]}),a;if(e.fatal)a=(0,J.jsx)(re,{error:e.error,diagnosticsHref:`/settings/diagnostics`});else if(e.error&&!e.loading&&!t)a=(0,J.jsx)(N,{title:`Could not load diagnostics`,error:e.error,onRetry:e.reload});else if(!t)a=(0,J.jsx)(T,{label:`Loading diagnostics…`});else{let i=t.migrationLevel!==void 0&&t.latestMigration!==void 0&&t.migrationLevel>=t.latestMigration,o=(t.hosts??[]).filter(e=>!e.revokedAt);a=(0,J.jsxs)(J.Fragment,{children:[e.error&&!e.loading?(0,J.jsx)(N,{compact:!0,title:`Refresh failed`,error:e.error,onRetry:e.reload}):null,(0,J.jsx)(G,{title:`Versions`,children:(0,J.jsx)(`div`,{className:`overflow-x-auto`,children:(0,J.jsxs)(`table`,{className:`w-full min-w-0 text-left text-sm`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{className:`border-b border-border text-muted`,children:[(0,J.jsx)(`th`,{scope:`col`,className:`py-1 pr-4 font-medium`,children:`Component`}),(0,J.jsx)(`th`,{scope:`col`,className:`py-1 font-medium`,children:`Version`})]})}),(0,J.jsxs)(`tbody`,{children:[Object.entries(t.versions).map(([e,t])=>(0,J.jsxs)(`tr`,{className:`border-b border-border last:border-b-0`,children:[(0,J.jsx)(`th`,{scope:`row`,className:`py-1 pr-4 font-normal capitalize`,children:e}),(0,J.jsx)(`td`,{className:`py-1 font-mono break-all`,children:$(t)})]},e)),(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{scope:`row`,className:`py-1 pr-4 font-normal`,children:`Supported Pi`}),(0,J.jsx)(`td`,{className:`py-1 font-mono`,children:y})]})]})]})})}),(0,J.jsx)(G,{title:`Coordinator`,children:(0,J.jsx)(Z,{items:[[`Database migration`,(0,J.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-2`,children:[(0,J.jsxs)(`span`,{children:[`Level `,$(t.migrationLevel),` of `,$(t.latestMigration)]}),i?(0,J.jsx)(p,{icon:Ne,tone:`success`,label:`Up to date`}):(0,J.jsx)(p,{icon:I,tone:`warning`,label:`Behind latest`})]},`m`)],[`Public URL`,(0,J.jsx)(`span`,{className:`break-all`,children:$(t.publicUrl)},`u`)],[`Events`,t.events?`Seq ${$(t.events.minSeq)} to ${$(t.events.maxSeq)} stored (current ${$(t.events.currentSeq)}, oldest retained ${$(t.events.minRetainedSeq)})`:`Unknown`],[`Event retention`,t.events?.retentionDays==null?`Unknown`:`${t.events.retentionDays} days`],[`Push`,t.push?`${t.push.vapidConfigured?`VAPID keys configured`:`VAPID keys not configured`}, ${$(t.push.subscriptions)} subscription(s)`:`Unknown`],[`Connected clients`,`${$(t.clients?.connectedDevices)} device(s)`]]})}),(0,J.jsx)(G,{title:`Hosts`,children:o.length===0?(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`No hosts enrolled.`}):(0,J.jsx)(`ul`,{className:`flex min-w-0 flex-col divide-y divide-border`,children:o.map(e=>{let t=r[e.id];return(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-1 py-2 text-sm`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`break-words font-medium`,children:e.name}),(0,J.jsx)(m,{kind:`host`,value:t?.connectivity??e.connectivity}),(0,J.jsx)(zt,{host:e})]}),(0,J.jsxs)(`div`,{className:`text-xs text-muted`,children:[`Agent `,$(e.agentVersion),` · Last seen `,A(e.lastSeenAt)]}),e.unsupported&&e.unsupported.length>0&&(0,J.jsx)(`ul`,{className:`list-disc pl-5 text-xs text-muted`,children:e.unsupported.map(e=>(0,J.jsxs)(`li`,{className:`break-words`,children:[e.capability,`: `,e.reason]},e.capability))})]},e.id)})})}),(0,J.jsx)(G,{title:`Recent diagnostics`,children:n.length===0?(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`No diagnostics recorded.`}):(0,J.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-2`,children:n.slice(0,100).map((e,t)=>(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-start gap-2 text-sm`,children:[(0,J.jsx)(Yt,{level:e.level}),(0,J.jsxs)(`span`,{className:`min-w-0 flex-1 break-words`,children:[e.message,e.adapterId&&(0,J.jsxs)(`span`,{className:`block text-xs text-muted`,children:[`Adapter `,e.adapterId]})]}),(0,J.jsx)(`time`,{dateTime:e.at,className:`text-xs text-muted`,children:k(e.at)})]},`${e.at}-${t}`))})})]})}return(0,J.jsxs)(X,{title:`Diagnostics`,description:`Versions, database state, hosts and recent problems. Copy the JSON when reporting a problem.`,actions:i,children:[(0,J.jsx)(P,{}),a]})}function pn(e){return L(`/api/enrollments`,{kind:e})}function mn({expiresAt:e,onRenew:t,busy:n}){let r=Ut(e);return r!==null&&r<=0?(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,role:`status`,children:[(0,J.jsx)(I,{"aria-hidden":!0,className:`size-4 shrink-0 text-warning`}),(0,J.jsx)(`span`,{className:`font-medium`,children:`Expired: create a new link`}),(0,J.jsx)(E,{size:`sm`,busy:n,icon:(0,J.jsx)(ce,{className:`size-4`}),onClick:t,children:`Create new link`})]}):(0,J.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted`,children:[(0,J.jsx)(Oe,{"aria-hidden":!0,className:`size-4 shrink-0`}),(0,J.jsxs)(`span`,{children:[`Expires in`,` `,(0,J.jsx)(`span`,{className:`font-mono tabular-nums`,children:r===null?`unknown`:Wt(r)}),`. Single use.`]})]})}function hn({busy:e,error:t,onRetry:n}){return e?(0,J.jsx)(T,{label:`Creating a single-use link…`}):t?(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(S,{error:t}),(0,J.jsx)(E,{icon:(0,J.jsx)(ce,{className:`size-4`}),onClick:n,children:`Retry`})]}):null}function gn(e){let t=Ht(e),n=t.find(e=>!ie(e));return n?{folders:t,problem:`"${n}" is not an absolute path or a ~/ path.`}:t.length>20?{folders:t,problem:`Use at most 20 folders.`}:{folders:t,problem:null}}function _n(e,t=Date.now()){return e?e.state===`running`?`Scanning…`:e.state===`failed`?`Last scan failed ${A(e.finishedAt??e.startedAt,t)}: ${e.errors.at(-1)??`unknown error`}`:`Last scanned ${A(e.finishedAt,t)}: ${e.repositories} repositories, ${e.checkoutsAdded} new checkouts, ${e.projectsCreated} new projects.`:`Not scanned yet.`}function vn({host:e}){let t=(0,q.useId)(),n=(e.projectFolders??[]).join(`
|
|
3
|
+
`),[r,i]=(0,q.useState)(null),[a,o]=(0,q.useState)(!1),[s,c]=(0,q.useState)(!1),[l,u]=(0,q.useState)(null),d=r??n,f=r!==null&&r!==n,{folders:p,problem:m}=gn(d),h=e.projectScan,g=s||h?.state===`running`,_=e.connectivity===`connected`,v=n?_?g?`A scan is running`:null:`${e.name} is offline`:`Save a folder first`,y=async()=>{o(!0),u(null);try{await x(`/api/hosts/${encodeURIComponent(e.id)}`,{projectFolders:p}),V.success(`Project folders saved`),i(null)}catch(e){u(e)}finally{o(!1)}},b=async()=>{c(!0),u(null);try{let t=await L(`/api/hosts/${encodeURIComponent(e.id)}/scan-projects`);V.success(`Found ${t.repositories} repositories; ${t.projectsCreated} new projects`)}catch(e){u(e)}finally{c(!1)}},C=f?m:null;return(0,J.jsx)(G,{title:`Project folders`,description:`Every Git repository directly inside these folders becomes a project, or another checkout of the project with the same remote. Folders are rescanned when the host connects and every 10 minutes; nothing is removed automatically.`,children:(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,J.jsx)(B,{id:`${t}-folders`,label:`Folders on this host`,hint:`One per line: an absolute path or ~/..., e.g. ~/Projects.`,error:C,children:(0,J.jsx)(nt,{id:`${t}-folders`,value:d,onChange:e=>i(e.target.value),minRows:3,placeholder:`~/Projects`,className:`font-mono`,spellCheck:!1,autoCapitalize:`off`,autoComplete:`off`,...z(`${t}-folders`,{hint:!0,error:C})})}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,J.jsx)(E,{variant:`primary`,icon:(0,J.jsx)(Ve,{className:`size-4`}),busy:a,disabled:!f||!!m,onClick:y,children:`Save folders`}),(0,J.jsx)(E,{icon:(0,J.jsx)(yt,{className:`size-4`}),busy:s,disabled:!!v,title:v??void 0,onClick:b,children:`Scan now`})]}),(0,J.jsx)(`p`,{"aria-live":`polite`,className:`text-sm text-muted`,children:s?`Scanning…`:_n(h)}),h&&h.state!==`running`&&h.errors.length>0&&(0,J.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-0.5 text-xs text-muted`,children:h.errors.map(e=>(0,J.jsx)(`li`,{className:`break-words`,children:e},e))}),(0,J.jsx)(S,{error:l})]})})}var yn={prompt:`Prompt`,steer:`Steer a running turn`,followUp:`Queue follow-up`,abort:`Abort`,resume:`Resume`,rename:`Rename session`,importInactive:`Import inactive sessions`,extensionDialogs:`Extension dialogs`,customUi:`Custom extension UI`,widgetsText:`Text widgets`,widgetsComponent:`Component widgets`,tokenAccounting:`Token accounting`,costAccounting:`Cost accounting`};function bn(){let e=Q(),t=g(),[n,r]=(0,q.useState)(!1),i=t.filter(e=>e.connectivity!==`connected`);return(0,J.jsxs)(X,{testId:`settings-hosts`,title:`Hosts`,description:`Machines that run Pi sessions through the Switchyard host agent.`,actions:(0,J.jsx)(E,{variant:`primary`,icon:(0,J.jsx)(Le,{className:`size-4`}),onClick:()=>r(!0),children:`Add host`}),children:[(0,J.jsx)(P,{}),e?t.length===0?(0,J.jsx)(F,{icon:(0,J.jsx)(Ge,{className:`size-8`}),title:`No hosts yet`,description:`Add a host to run Pi sessions. You will get a command to run on that machine.`,action:{label:`Add host`,onClick:()=>r(!0)}}):(0,J.jsxs)(J.Fragment,{children:[i.length===1&&(0,J.jsx)(M,{compact:!0,hostName:i[0].name,connectivity:i[0].connectivity===`reconnecting`?`reconnecting`:`unreachable`,lastSeenAt:i[0].lastSeenAt}),i.length>1&&(0,J.jsxs)(`div`,{role:`status`,className:`flex items-start gap-2 rounded-md border border-border bg-danger-soft px-3 py-2 text-sm`,children:[(0,J.jsx)(le,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 text-danger`}),(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsx)(`div`,{className:`font-medium`,children:xn(i.map(e=>e.name))}),(0,J.jsx)(`div`,{className:`text-muted`,children:`Work on them keeps its last known state; nothing is restarted elsewhere.`})]})]}),(0,J.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border bg-surface`,children:t.map(e=>(0,J.jsx)(`li`,{className:`border-b border-border last:border-b-0`,children:(0,J.jsx)(Sn,{host:e})},e.id))})]}):(0,J.jsx)(T,{label:`Loading hosts…`}),(0,J.jsx)(Tn,{open:n,onClose:()=>r(!1)})]})}function xn(e){return`${e.length} hosts are not connected: ${e.join(`, `)}`}function Sn({host:e}){return(0,J.jsxs)(r,{to:Y(`hosts/${encodeURIComponent(e.id)}`),state:Be,className:`tap flex min-w-0 items-center gap-3 px-4 py-3 hover:bg-surface-2`,children:[(0,J.jsx)(Ge,{"aria-hidden":!0,className:`size-5 shrink-0 self-center text-muted`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`min-w-0 break-words font-medium`,children:e.name}),(0,J.jsx)(`span`,{className:`text-sm text-muted`,children:Rt[e.platform]})]}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,J.jsx)(m,{kind:`host`,value:e.connectivity}),(0,J.jsx)(zt,{host:e}),e.connectivity!==`connected`&&(0,J.jsxs)(`span`,{className:`text-xs text-muted`,children:[`Last seen `,A(e.lastSeenAt)]})]})]}),(0,J.jsx)(De,{"aria-hidden":!0,className:`size-4 shrink-0 self-center text-subtle`})]})}var Cn=`@spencerboucher/switchyard`;function wn(e){return[`npm install -g ${Cn}`,e,`switchyard host install-service`].join(`
|
|
4
|
+
`)}function Tn({open:e,onClose:t}){let[n,r]=(0,q.useState)(null),[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(null),c=async()=>{a(!0),s(null);try{r(await pn(`host`))}catch(e){s(e)}finally{a(!1)}},l=()=>{r(null),s(null),t()};return(0,J.jsx)(tt,{open:e,onClose:l,title:`Add host`,description:`Enroll a machine that runs Pi. Provider credentials stay on that machine.`,footer:(0,J.jsx)(E,{onClick:l,children:`Done`}),children:(0,J.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[!n&&!i&&!o&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`p`,{className:`text-sm`,children:`Create a single-use enrollment, then run the command it shows on the new host. The host appears here once its agent connects.`}),(0,J.jsx)(E,{variant:`primary`,onClick:c,children:`Create enrollment command`})]}),(0,J.jsx)(hn,{busy:i,error:o,onRetry:c}),n&&!i&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`p`,{className:`text-sm`,children:`Run this on the host, as the user that should run Pi (it needs Node 24 or newer, git and Pi):`}),(0,J.jsx)(ye,{text:n.command?wn(n.command):n.url,label:n.command?`Host setup commands`:`Host enrollment link`,copyLabel:`Copy commands`}),(0,J.jsx)(mn,{expiresAt:n.expiresAt,onRenew:c,busy:i})]})]})})}function En(){let{hostId:e=``}=c(),t=Q(),r=R(t=>t.hosts[e]),i=R(t=>t.adapters[e]),a=R(e=>e.checkouts),o=R(e=>e.projects),s=n(),[l,u]=(0,q.useState)(!1),[f,p]=(0,q.useState)(!1),[h,g]=(0,q.useState)(null),_=(0,q.useMemo)(()=>Object.values(a).filter(t=>t.hostId===e).sort((e,t)=>e.path.localeCompare(t.path)),[a,e]),v={to:Y(`hosts`),label:`Hosts`};if(!t)return(0,J.jsx)(X,{title:`Host`,back:v,children:(0,J.jsx)(T,{label:`Loading host…`})});if(!r||r.revokedAt)return(0,J.jsx)(X,{title:`Host`,back:v,children:(0,J.jsx)(F,{icon:(0,J.jsx)(Ge,{className:`size-8`}),title:r?`This host was revoked`:`Host not found`,description:r?`${r.name} was revoked ${A(r.revokedAt)}. Add it again to use it.`:`It may have been revoked or never enrolled with this coordinator.`,action:{label:`Back to hosts`,to:Y(`hosts`)}})});let y=async()=>{p(!0),g(null);try{await L(`/api/hosts/${encodeURIComponent(r.id)}/revoke`),V.success(`Host ${r.name} revoked`),u(!1),s(Y(`hosts`))}catch(e){g(e)}finally{p(!1)}},b=r.capabilities,x=e=>b?.unsupported.find(t=>t.capability===e)?.reason,S=b?.unsupported.filter(e=>!C.includes(e.capability))??[];return(0,J.jsxs)(X,{title:r.name,description:`${Rt[r.platform]} host`,back:v,children:[(0,J.jsx)(P,{}),r.connectivity!==`connected`&&(0,J.jsx)(M,{compact:!0,hostName:r.name,connectivity:r.connectivity===`reconnecting`?`reconnecting`:`unreachable`,lastSeenAt:r.lastSeenAt}),(0,J.jsx)(G,{title:`Connectivity and versions`,children:(0,J.jsx)(Z,{items:[[`Status`,(0,J.jsx)(m,{kind:`host`,value:r.connectivity},`s`)],[`Last seen`,r.lastSeenAt?`${A(r.lastSeenAt)} (${k(r.lastSeenAt)})`:`Never`],[`Platform`,Rt[r.platform]],[`Agent version`,(0,J.jsx)(`span`,{className:`font-mono`,children:r.agentVersion},`a`)],[`Pi`,(0,J.jsx)(zt,{host:r},`p`)],[`Enrolled`,k(r.createdAt)]]})}),r.usage&&r.usage.length>0&&(0,J.jsx)(G,{title:`Subscription usage`,children:(0,J.jsx)(Z,{items:r.usage.map(e=>[e.provider===`anthropic`?`Claude`:`ChatGPT`,e.status===`available`?e.windows.map(e=>`${e.id===`five_hour`?`Session`:`Weekly`} ${Math.round(e.usedPct)}% used, resets ${A(e.resetsAt)}`).join(`; `)||`No limits reported`:e.message??e.status])})}),(0,J.jsx)(G,{title:`Capabilities`,description:`What Pi on this host supports. Unsupported features are hidden or explained in sessions.`,children:b?(0,J.jsxs)(`ul`,{className:`grid min-w-0 gap-2 sm:grid-cols-2`,children:[C.map(e=>{let t=b[e],n=x(e);return(0,J.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2 text-sm`,children:[t?(0,J.jsx)(Ne,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 text-success`}):(0,J.jsx)(d,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 text-muted`}),(0,J.jsxs)(`span`,{className:`min-w-0`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:yn[e]}),(0,J.jsxs)(`span`,{className:`text-muted`,children:[`: `,t?`Supported`:`Not supported`]}),!t&&n&&(0,J.jsx)(`span`,{className:`block break-words text-xs text-muted`,children:n})]})]},e)}),S.map(e=>(0,J.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2 text-sm`,children:[(0,J.jsx)(d,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 text-muted`}),(0,J.jsxs)(`span`,{className:`min-w-0`,children:[(0,J.jsx)(`span`,{className:`font-medium break-words`,children:e.capability}),(0,J.jsx)(`span`,{className:`text-muted`,children:`: Not supported`}),(0,J.jsx)(`span`,{className:`block break-words text-xs text-muted`,children:e.reason})]})]},e.capability))]}):(0,J.jsx)(oe,{capability:`Capability report`,reason:`This host has not reported its Pi capabilities yet. It may be offline, or Pi may be missing or incompatible.`})}),(0,J.jsx)(vn,{host:r}),(0,J.jsx)(G,{title:`Checkout mappings`,description:`Project clones on this host. Sessions and runs for a project use these paths.`,children:_.length===0?(0,J.jsx)(F,{className:`py-4`,title:`No checkouts on this host`,description:`Create a project or add a checkout to an existing project.`,action:{label:`Open projects`,to:Y(`projects`)}}):(0,J.jsx)(`ul`,{className:`flex min-w-0 flex-col divide-y divide-border`,children:_.map(e=>(0,J.jsxs)(`li`,{className:`min-w-0 py-2 text-sm`,children:[(0,J.jsx)(rt,{to:Y(`projects/${encodeURIComponent(e.projectId)}`),variant:`action`,children:o[e.projectId]?.name??`Unknown project`}),(0,J.jsx)(`div`,{className:`break-all font-mono text-xs`,children:e.path}),(0,J.jsxs)(`div`,{className:`text-xs text-muted`,children:[`Default branch: `,e.defaultBranch]})]},e.id))})}),(0,J.jsx)(G,{title:`Adapters`,actions:(0,J.jsx)(rt,{to:Y(`adapters`),size:`sm`,variant:`action`,children:`All adapters`}),children:!i||i.length===0?(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`No adapters reported by this host.`}):(0,J.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-2`,children:i.map(e=>(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-2 text-sm`,children:[(0,J.jsx)(`span`,{className:`break-all font-mono`,children:e.id}),(0,J.jsx)(`span`,{className:`text-muted`,children:e.version}),(0,J.jsx)(Kt,{status:e.status})]},e.id))})}),(0,J.jsx)(He,{description:`Revoking disconnects the host agent and invalidates its credential. Sessions on it are not moved elsewhere.`,children:(0,J.jsx)(E,{variant:`danger`,icon:(0,J.jsx)(kt,{className:`size-4`}),onClick:()=>{g(null),u(!0)},children:`Revoke host`})}),(0,J.jsx)(H,{open:l,onClose:()=>u(!1),title:`Revoke ${r.name}?`,confirmLabel:`Revoke host`,busy:f,error:h,onConfirm:y,children:(0,J.jsx)(`p`,{className:`text-sm`,children:`The host agent is disconnected and its credential stops working. Sessions on it are not moved or restarted elsewhere. To use this machine again, add it as a new host.`})})]})}var Dn={granted:{icon:pt,label:`Allowed`,tone:`success`,guidance:`This device can show Switchyard notifications.`},denied:{icon:dt,label:`Blocked`,tone:`danger`,guidance:`Notifications are blocked for this site. Allow them in your browser's site settings (or the system notification settings for the Home Screen app), then reload.`},default:{icon:ge,label:`Not requested yet`,tone:`neutral`,guidance:`Enable notifications to hear about sessions that need input, failed, or are ready for review.`},unknown:{icon:ge,label:`Unknown`,tone:`neutral`,guidance:`The browser did not report a permission state. Try enabling notifications.`},unsupported:{icon:d,label:`Not supported`,tone:`warning`,guidance:`This browser cannot receive web push here. On iPhone and iPad, add Switchyard to the Home Screen first.`}};function On(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`}catch{return`UTC`}}function kn(e){let t=W(e)&&W(e.settings)?e.settings:e;return!W(t)||typeof t.privatePreviews!=`boolean`?null:{quietHours:W(t.quietHours)?t.quietHours:null,privatePreviews:t.privatePreviews,preferredDeviceId:typeof t.preferredDeviceId==`string`?t.preferredDeviceId:null}}function An(){let[e,t]=(0,q.useState)(()=>Ye()),[n,r]=(0,q.useState)(null),[i,a]=(0,q.useState)(null),[o,s]=(0,q.useState)(null),c=Xe()&&!Qe();(0,q.useEffect)(()=>{let e=!0;et().then(t=>e&&r(t!==null)).catch(()=>e&&r(!1));let n=()=>{document.visibilityState===`visible`&&t(Ye())};return document.addEventListener(`visibilitychange`,n),()=>{e=!1,document.removeEventListener(`visibilitychange`,n)}},[]);let l=()=>{a(`enable`),s(null),Ze().then(e=>{t(e),e===`granted`?(r(!0),V.success(`Notifications enabled on this device`)):e===`denied`&&V.error(`Notifications were blocked. Allow them in your browser settings.`)}).catch(e=>{s(e),t(Ye())}).finally(()=>a(null))},u=async()=>{a(`disable`),s(null);try{await $e(),r(!1),V.success(`Notifications disabled on this device`)}catch(e){s(e)}finally{a(null)}},d=async()=>{a(`test`),s(null);try{await qe(),V.success(`Test notification sent. It can take a few seconds to arrive.`)}catch(e){s(e),V.error(`Test notification failed: ${ue(e)}`)}finally{a(null)}},f=Dn[e]??Dn.unknown;return(0,J.jsxs)(X,{testId:`settings-notifications`,title:`Notifications`,description:`Push notifications for sessions that need input, failed, or are ready for review.`,children:[(0,J.jsx)(G,{title:`This device`,children:(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:`Permission:`}),(0,J.jsx)(p,{icon:f.icon,label:f.label,tone:f.tone}),n!==null&&e===`granted`&&(0,J.jsx)(`span`,{className:`text-muted`,children:n?`Subscribed to push`:`Not subscribed to push`})]}),(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:f.guidance}),c&&(0,J.jsxs)(`div`,{className:`rounded-md border border-border bg-surface-2 p-3 text-sm`,children:[(0,J.jsxs)(`p`,{className:`mb-2 flex items-center gap-2 font-medium`,children:[(0,J.jsx)(jt,{"aria-hidden":!0,className:`size-4 shrink-0`}),`On iPhone and iPad, notifications need the Home Screen app`]}),(0,J.jsxs)(`ol`,{className:`list-decimal space-y-1 pl-5`,children:[(0,J.jsx)(`li`,{children:`Tap Share`}),(0,J.jsx)(`li`,{children:`Add to Home Screen`}),(0,J.jsx)(`li`,{children:`Open Switchyard from the Home Screen`}),(0,J.jsx)(`li`,{children:`Enable notifications here`})]})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e!==`unsupported`&&!(e===`granted`&&n)&&(0,J.jsx)(E,{variant:`primary`,icon:(0,J.jsx)(pt,{className:`size-4`}),busy:i===`enable`,disabled:i!==null&&i!==`enable`,onClick:l,children:`Enable notifications`}),n&&(0,J.jsx)(E,{icon:(0,J.jsx)(dt,{className:`size-4`}),busy:i===`disable`,disabled:i!==null&&i!==`disable`,onClick:u,children:`Disable on this device`}),(0,J.jsx)(E,{icon:(0,J.jsx)(be,{className:`size-4`}),busy:i===`test`,disabled:i!==null&&i!==`test`,onClick:d,children:`Send test notification`})]}),e===`unsupported`&&(0,J.jsx)(`p`,{className:`text-xs text-muted`,children:`Enabling is not possible in this browser. A test notification still goes to your other subscribed devices.`}),(0,J.jsx)(S,{error:o}),(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`Delivery and clearing are best effort: browsers and operating systems may delay, group or keep notifications even after you answer elsewhere.`})]})}),(0,J.jsx)(jn,{})]})}function jn(){let e=it(`/api/me/notification-settings`,e=>!!kn(e)),t=(0,q.useMemo)(()=>e.data?kn(e.data):null,[e.data]),n=e.error instanceof ne&&e.error.status===404;return(0,J.jsx)(G,{title:`Delivery preferences`,description:`Shared by all your devices. Attention items in Switchyard are unaffected.`,children:n?(0,J.jsx)(oe,{capability:`Notification settings`,reason:`This coordinator does not expose notification settings yet`}):e.fatal?(0,J.jsx)(re,{error:e.error}):e.error&&!e.loading&&!t?(0,J.jsx)(N,{compact:!0,title:`Could not load notification settings`,error:e.error,onRetry:e.reload}):t?(0,J.jsx)(Nn,{settings:t,onSaved:t=>e.setData(t)}):(0,J.jsx)(T,{label:`Loading notification settings…`})})}var Mn=/^\d{2}:\d{2}$/;function Nn({settings:e,onSaved:t}){let n=(0,q.useId)(),r=R(e=>e.devices),i=(0,q.useMemo)(()=>Object.values(r).filter(e=>e.revokedAt===null).sort((e,t)=>e.name.localeCompare(t.name)),[r]),[a,o]=(0,q.useState)(e.quietHours!==null),[s,c]=(0,q.useState)(e.quietHours?.start??`22:00`),[l,u]=(0,q.useState)(e.quietHours?.end??`07:00`),[d,f]=(0,q.useState)(e.quietHours?.timezone??On()),[p,m]=(0,q.useState)(e.privatePreviews),[h,g]=(0,q.useState)(e.preferredDeviceId??``),[_,v]=(0,q.useState)(!1),[y,b]=(0,q.useState)(null),C=a&&!Mn.test(s)?`Use a time like 22:00.`:null,w=a&&!Mn.test(l)?`Use a time like 07:00.`:null,T=a&&!d.trim()?`Enter a time zone, e.g. Europe/Berlin.`:null,D=!h||i.some(e=>e.id===h);return(0,J.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-4`,onSubmit:async e=>{if(e.preventDefault(),C||w||T)return;let n={quietHours:a?{start:s,end:l,timezone:d.trim()}:null,privatePreviews:p,preferredDeviceId:h||null};v(!0),b(null);try{t(kn(await x(`/api/me/notification-settings`,n))??n),V.success(`Notification preferences saved`)}catch(e){b(e)}finally{v(!1)}},noValidate:!0,children:[(0,J.jsx)(at,{label:`Quiet hours`,description:`No push notifications during these hours. Attention items still collect in Switchyard.`,checked:a,onChange:o}),a&&(0,J.jsxs)(`div`,{className:`grid min-w-0 gap-4 sm:grid-cols-3`,children:[(0,J.jsx)(B,{id:`${n}-start`,label:`From`,error:C,children:(0,J.jsx)(U,{id:`${n}-start`,type:`time`,value:s,onChange:e=>c(e.target.value),...z(`${n}-start`,{error:C})})}),(0,J.jsx)(B,{id:`${n}-end`,label:`Until`,error:w,children:(0,J.jsx)(U,{id:`${n}-end`,type:`time`,value:l,onChange:e=>u(e.target.value),...z(`${n}-end`,{error:w})})}),(0,J.jsx)(B,{id:`${n}-tz`,label:`Time zone`,error:T,children:(0,J.jsx)(U,{id:`${n}-tz`,value:d,onChange:e=>f(e.target.value),autoCapitalize:`off`,spellCheck:!1,...z(`${n}-tz`,{error:T})})})]}),(0,J.jsx)(at,{label:`Private previews`,description:`Hide task and session text in notifications; show only the status, e.g. Needs input.`,checked:p,onChange:m}),(0,J.jsx)(B,{id:`${n}-device`,label:`Preferred device`,hint:`Receives push when no desktop was recently active.`,children:(0,J.jsxs)(K,{id:`${n}-device`,value:h,onChange:e=>g(e.target.value),...z(`${n}-device`,{hint:!0}),children:[(0,J.jsx)(`option`,{value:``,children:`Automatic (the preferred mobile device)`}),i.map(e=>(0,J.jsxs)(`option`,{value:e.id,children:[e.name,e.push.subscribed?``:` (no push subscription)`]},e.id)),!D&&(0,J.jsxs)(`option`,{value:h,children:[`Unknown device (`,h,`)`]})]})}),(0,J.jsx)(S,{error:y}),(0,J.jsx)(`div`,{children:(0,J.jsx)(E,{type:`submit`,variant:`primary`,busy:_,icon:(0,J.jsx)(Ve,{className:`size-4`}),children:`Save preferences`})})]})}var Pn={ask:`Ask`,approve:`Approve`,ignore:`Ignore`},Fn={ask:`Ask before trusting project-local Pi settings and extensions.`,approve:`Trust project-local Pi settings and extensions automatically.`,ignore:`Never load project-local Pi settings or extensions.`},In=se.options,Ln={all:`Loads your extensions, skills and prompt templates.`,vanilla:`Starts Pi with --no-extensions --no-skills --no-prompt-templates (also no built-in MCP). Your logins, default model and AGENTS.md still apply, and Switchyard's model, effort, context and command controls keep working.`};function Rn(e){let t=[];return e.forEach((e,n)=>{let r=ae.safeParse(e);r.success||t.push(`Line ${n+1} (${e}): ${r.error.issues[0]?.message??`invalid argument`}`)}),t}function zn(){let e=Q(),t=R(e=>e.profiles),n=R(e=>e.projects),r=(0,q.useMemo)(()=>Object.values(t).sort((e,t)=>e.name.localeCompare(t.name)),[t]),[i,a]=(0,q.useState)(null),[o,s]=(0,q.useState)(null),[c,l]=(0,q.useState)(!1),[u,d]=(0,q.useState)(null),f=async()=>{if(o){l(!0),d(null);try{await j(`/api/profiles/${encodeURIComponent(o.id)}`),V.success(`Profile ${o.name} deleted`),s(null)}catch(e){d(e)}finally{l(!1)}}},p=e=>Object.values(n).filter(t=>t.defaultProfileId===e).map(e=>e.name);return(0,J.jsxs)(X,{title:`Pi profiles`,description:`Presets for provider, model, thinking level and Pi flags. Sessions keep a snapshot of the profile they started with.`,actions:(0,J.jsx)(E,{variant:`primary`,icon:(0,J.jsx)(Le,{className:`size-4`}),onClick:()=>a(`new`),children:`New profile`}),children:[(0,J.jsx)(P,{}),e?r.length===0?(0,J.jsx)(F,{icon:(0,J.jsx)(xe,{className:`size-8`}),title:`No profiles`,description:`Create a profile to choose a provider and model for sessions.`,action:{label:`New profile`,onClick:()=>a(`new`)}}):(0,J.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border bg-surface`,children:r.map(e=>{let t=p(e.id);return(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-start gap-3 border-b border-border px-4 py-3 last:border-b-0`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5 text-sm`,children:[(0,J.jsx)(`span`,{className:`break-words font-medium`,children:e.name}),(0,J.jsxs)(`span`,{className:`break-words text-muted`,children:[e.provider??`Default provider`,` / `,e.model??`default model`,` · Thinking`,` `,e.thinking??`default`,` · Project trust `,Pn[e.projectTrust],e.resources===`vanilla`&&` · Vanilla Pi`]}),e.extraArgs.length>0&&(0,J.jsx)(`span`,{className:`break-all font-mono text-xs text-muted`,children:e.extraArgs.join(` `)}),t.length>0&&(0,J.jsxs)(`span`,{className:`text-xs text-muted`,children:[`Default for `,t.join(`, `)]})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,J.jsx)(E,{size:`sm`,icon:(0,J.jsx)(Fe,{className:`size-4`}),onClick:()=>a(e),children:`Edit`}),(0,J.jsx)(E,{size:`sm`,variant:`ghost`,className:`text-danger`,icon:(0,J.jsx)(he,{className:`size-4`}),onClick:()=>{d(null),s(e)},children:`Delete`})]})]},e.id)})}):(0,J.jsx)(T,{label:`Loading profiles…`}),i&&(0,J.jsx)(Bn,{profile:i===`new`?null:i,onClose:()=>a(null)},i===`new`?`new`:i.id),(0,J.jsx)(H,{open:o!==null,onClose:()=>s(null),title:o?`Delete ${o.name}?`:`Delete profile`,confirmLabel:`Delete profile`,busy:c,error:u,onConfirm:f,children:(0,J.jsx)(`p`,{className:`text-sm`,children:`Existing sessions keep their snapshot of this profile. Projects that use it as their default must be changed first.`})})]})}function Bn({profile:e,onClose:t}){let n=(0,q.useId)(),[r,i]=(0,q.useState)(e?.name??``),[a,o]=(0,q.useState)(e?.provider??``),[s,c]=(0,q.useState)(e?.model??``),[l,u]=(0,q.useState)(e?.thinking??``),[d,f]=(0,q.useState)(e?.projectTrust??`ask`),[p,m]=(0,q.useState)(e?.resources??`all`),[h,g]=(0,q.useState)((e?.extraArgs??[]).join(`
|
|
5
|
+
`)),[_,v]=(0,q.useState)(!1),[y,b]=(0,q.useState)(!1),[C,w]=(0,q.useState)(null),T=Ht(h),D=Rn(T),O=_&&!r.trim()?`Enter a profile name.`:null,k=D.length?D.join(`
|
|
6
|
+
`):null,A=async n=>{if(n.preventDefault(),v(!0),!r.trim()||D.length)return;let i={name:r.trim(),provider:a.trim()||null,model:s.trim()||null,thinking:l||null,projectTrust:d,resources:p,extraArgs:T};b(!0),w(null);try{e?(await x(`/api/profiles/${encodeURIComponent(e.id)}`,i),V.success(`Profile ${i.name} saved`)):(await L(`/api/profiles`,i),V.success(`Profile ${i.name} created`)),t()}catch(e){w(e)}finally{b(!1)}},j=`${n}-form`;return(0,J.jsx)(tt,{open:!0,onClose:y?()=>void 0:t,dismissOnBackdrop:!y,title:e?`Edit ${e.name}`:`New profile`,footer:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(E,{onClick:t,disabled:y,children:`Cancel`}),(0,J.jsx)(E,{type:`submit`,form:j,variant:`primary`,busy:y,children:e?`Save profile`:`Create profile`})]}),children:(0,J.jsxs)(`form`,{id:j,className:`flex min-w-0 flex-col gap-4`,onSubmit:A,noValidate:!0,children:[(0,J.jsx)(B,{id:`${n}-name`,label:`Name`,error:O,children:(0,J.jsx)(U,{id:`${n}-name`,value:r,onChange:e=>i(e.target.value),...z(`${n}-name`,{error:O})})}),(0,J.jsxs)(`div`,{className:`grid min-w-0 gap-4 sm:grid-cols-2`,children:[(0,J.jsx)(B,{id:`${n}-provider`,label:`Provider`,hint:`Empty uses Pi's default.`,children:(0,J.jsx)(U,{id:`${n}-provider`,value:a,onChange:e=>o(e.target.value),placeholder:`anthropic`,autoCapitalize:`off`,spellCheck:!1,...z(`${n}-provider`,{hint:!0})})}),(0,J.jsx)(B,{id:`${n}-model`,label:`Model`,hint:`Empty uses Pi's default.`,children:(0,J.jsx)(U,{id:`${n}-model`,value:s,onChange:e=>c(e.target.value),autoCapitalize:`off`,spellCheck:!1,...z(`${n}-model`,{hint:!0})})})]}),(0,J.jsxs)(`div`,{className:`grid min-w-0 gap-4 sm:grid-cols-2`,children:[(0,J.jsx)(B,{id:`${n}-thinking`,label:`Thinking`,children:(0,J.jsxs)(K,{id:`${n}-thinking`,value:l,onChange:e=>u(e.target.value),children:[(0,J.jsx)(`option`,{value:``,children:`Default (none)`}),In.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))]})}),(0,J.jsx)(B,{id:`${n}-trust`,label:`Project trust`,hint:Fn[d],children:(0,J.jsx)(K,{id:`${n}-trust`,value:d,onChange:e=>f(e.target.value),...z(`${n}-trust`,{hint:!0}),children:Object.keys(Pn).map(e=>(0,J.jsx)(`option`,{value:e,children:Pn[e]},e))})})]}),(0,J.jsx)(B,{id:`${n}-resources`,label:`Resources`,hint:Ln[p],children:(0,J.jsxs)(K,{id:`${n}-resources`,value:p,onChange:e=>m(e.target.value),...z(`${n}-resources`,{hint:!0}),children:[(0,J.jsx)(`option`,{value:`all`,children:`Your Pi setup`}),(0,J.jsx)(`option`,{value:`vanilla`,children:`Vanilla Pi`})]})}),(0,J.jsx)(B,{id:`${n}-extra`,label:`Extra Pi arguments`,hint:`One long flag per line, e.g. --max-turns=40. Session, mode and extension flags are managed by Switchyard.`,error:k,children:(0,J.jsx)(nt,{id:`${n}-extra`,value:h,minRows:3,onChange:e=>g(e.target.value),className:`font-mono`,autoCapitalize:`off`,spellCheck:!1,...z(`${n}-extra`,{hint:!0,error:k})})}),(0,J.jsx)(S,{error:C})]})})}var Vn={managed:`Managed by Switchyard`,discovered:`Discovered worktree`,main:`Main checkout`},Hn={none:{icon:h,label:`No setup`,tone:`neutral`},running:{icon:f,label:`Setup running`,tone:`info`},succeeded:{icon:Ne,label:`Setup succeeded`,tone:`success`},failed:{icon:ke,label:`Setup failed`,tone:`danger`}};function Un(e){let t=[e.dirty?`Uncommitted changes (${e.changedFiles} file${e.changedFiles===1?``:`s`})`:`Clean`];return(e.ahead||e.behind)&&t.push(`${e.ahead} ahead, ${e.behind} behind`),t.push(e.unmerged?`Not merged into base`:`Merged`),t.join(` · `)}function Wn({project:e}){let t=R(e=>e.workspaces),n=R(e=>e.hosts),r=(0,q.useMemo)(()=>Object.values(t).filter(t=>t.projectId===e.id&&t.archivedAt===null).sort((e,t)=>Number(t.provenance===`main`)-Number(e.provenance===`main`)||(e.branch??``).localeCompare(t.branch??``)),[t,e.id]),[i,a]=(0,q.useState)(null),[o,s]=(0,q.useState)(null),c=async e=>{s(e.id);try{await L(`/api/workspaces/${encodeURIComponent(e.id)}/refresh`),V.success(`Workspace status refreshed`)}catch(e){V.error(`Could not refresh: ${ue(e)}`)}finally{s(null)}};return(0,J.jsxs)(G,{title:`Workspaces`,description:`Worktrees where sessions and runs work. Removing one never deletes its branch.`,children:[r.length===0?(0,J.jsx)(F,{className:`py-4`,title:`No workspaces`,description:`Workspaces appear after a checkout is discovered. Use Refresh to discover them again.`}):(0,J.jsx)(`ul`,{className:`flex min-w-0 flex-col divide-y divide-border`,children:r.map(e=>{let t=n[e.hostId],r=t?.connectivity!==`connected`,i=Hn[e.setup.state]??Hn.none;return(0,J.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-1.5 py-3 text-sm`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,J.jsx)(Pe,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted`}),(0,J.jsx)(`span`,{className:`min-w-0 break-all font-mono font-medium`,children:e.branch??`(detached HEAD)`}),(0,J.jsx)(`span`,{className:`text-xs text-muted`,children:Vn[e.provenance]})]}),(0,J.jsxs)(`div`,{className:`break-all font-mono text-xs text-muted`,children:[t?.name?`${t.name}: `:``,e.path]}),(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{children:Un(e.git)}),(0,J.jsx)(p,{icon:i.icon,label:i.label,tone:i.tone,spin:e.setup.state===`running`})]}),(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(E,{size:`sm`,icon:(0,J.jsx)(ce,{className:`size-4`}),busy:o===e.id,disabled:r,onClick:()=>c(e),children:`Refresh status`}),e.provenance!==`main`&&(0,J.jsx)(E,{size:`sm`,variant:`ghost`,className:`text-danger`,icon:(0,J.jsx)(he,{className:`size-4`}),disabled:r,onClick:()=>a(e),children:`Remove`}),e.provenance===`main`&&(0,J.jsx)(`span`,{className:`text-xs text-muted`,children:`The main checkout cannot be removed; remove the project's checkout instead.`}),r&&(0,J.jsxs)(`span`,{className:`text-xs text-muted`,children:[`Host `,t?.name??`unknown`,` is `,t?.connectivity??`unknown`,`: refresh and removal need it online.`]})]})]},e.id)})}),i&&(0,J.jsx)(Gn,{workspace:t[i.id]??i,onClose:()=>a(null)},i.id)]})}function Gn({workspace:e,onClose:t}){let[n,r]=(0,q.useState)(e.git.dirty),[i,a]=(0,q.useState)(e.git.unmerged),[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(!1),[u,d]=(0,q.useState)(!1),[f,p]=(0,q.useState)(null),m=n&&!o||i&&!c;return(0,J.jsxs)(H,{open:!0,onClose:t,title:`Remove workspace?`,description:(0,J.jsx)(`span`,{className:`break-all font-mono`,children:e.branch??e.path}),confirmLabel:`Remove workspace`,busy:u,error:f,onConfirm:async()=>{d(!0),p(null);try{await L(`/api/workspaces/${encodeURIComponent(e.id)}/remove`,{force:{dirty:o,unmerged:c}}),V.success(`Workspace ${e.branch??e.path} removed`),t()}catch(e){w(e,`workspace_dirty`)&&r(!0),w(e,`workspace_unmerged`)&&a(!0),p(e)}finally{d(!1)}},confirmDisabled:m,disabledReason:`Check the boxes above to confirm what will be lost.`,children:[(0,J.jsxs)(`p`,{className:`text-sm`,children:[`The worktree at `,(0,J.jsx)(`span`,{className:`break-all font-mono`,children:e.path}),` is deleted from the host. The branch is kept.`]}),n&&(0,J.jsx)(We,{label:`Discard uncommitted changes`,description:e.git.dirty?`${e.git.changedFiles} changed file${e.git.changedFiles===1?``:`s`} will be lost.`:`The host reported uncommitted changes; they will be lost.`,checked:o,onChange:s}),i&&(0,J.jsx)(We,{label:`Remove although the branch is not merged`,description:`Commits stay on the branch, but the workspace is gone.`,checked:c,onChange:l})]})}var Kn=`Inside the repository, for example .worktrees or .git/worktrees-switchyard`;function qn(e){let t=e.trim();return t?t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.includes(`\\`)?`Use a relative path inside the repository, e.g. .worktrees.`:t.split(`/`).includes(`..`)?`The folder must stay inside the repository (no ..).`:D.safeParse(t).success?null:`Use a plain relative path such as .worktrees (no empty or . segments).`:`Enter a folder inside the repository, e.g. .worktrees.`}function Jn(){let{projectId:e=``}=c(),t=Q(),n=R(t=>t.projects[e]),r=R(e=>e.hosts),i=R(e=>e.profiles),[a,o]=(0,q.useState)(!1),[s,l]=(0,q.useState)([]),u=g(),d=(0,q.useMemo)(()=>Object.values(i).sort((e,t)=>e.name.localeCompare(t.name)),[i]),f={to:Y(`projects`),label:`Projects`};return t?n?(0,J.jsxs)(X,{title:n.name,description:(0,J.jsx)(`span`,{className:`break-all`,title:n.repoIdentity,children:Se(n.repoIdentity)}),back:f,actions:(0,J.jsx)(E,{busy:a,icon:(0,J.jsx)(ce,{className:`size-4`}),onClick:async()=>{o(!0);try{let e=await L(`/api/projects/${encodeURIComponent(n.id)}/refresh`),t=Array.isArray(e?.errors)?e.errors:[];l(t),t.length?V.error(`Refreshed with ${t.length} checkout error(s)`):V.success(`Workspaces refreshed`)}catch(e){V.error(`Refresh failed: ${ue(e)}`)}finally{o(!1)}},children:`Refresh`}),children:[(0,J.jsx)(P,{}),s&&s.length>0&&(0,J.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-border bg-danger-soft px-3 py-2 text-sm`,children:[(0,J.jsx)(`p`,{className:`font-medium`,children:`Some checkouts could not be refreshed`}),(0,J.jsx)(`ul`,{className:`list-disc pl-5`,children:s.map(e=>(0,J.jsx)(`li`,{className:`break-words`,children:e.message},e.checkoutId))})]}),(0,J.jsx)(Yn,{project:n,hosts:u,profiles:d},n.id),(0,J.jsx)(Xn,{project:n,hosts:u,hostsById:r}),(0,J.jsx)(Wn,{project:n})]}):(0,J.jsx)(X,{title:`Project`,back:f,children:(0,J.jsx)(F,{icon:(0,J.jsx)(Ce,{className:`size-8`}),title:`Project not found`,description:`It may have been removed, or this link is from another coordinator.`,action:{label:`Back to projects`,to:Y(`projects`)}})}):(0,J.jsx)(X,{title:`Project`,back:f,children:(0,J.jsx)(T,{label:`Loading project…`})})}function Yn({project:e,hosts:t,profiles:n}){let r=(0,q.useId)(),[i,a]=(0,q.useState)(e.name),[o,s]=(0,q.useState)(e.setupCommand??``),[c,l]=(0,q.useState)(e.checks.join(`
|
|
7
|
+
`)),[u,d]=(0,q.useState)(String(e.maxConcurrentRuns)),[f,p]=(0,q.useState)(e.automationEnabled),[m,h]=(0,q.useState)(e.workspaceSharing),[g,_]=(0,q.useState)(e.defaultProfileId??``),[v,y]=(0,q.useState)(e.defaultHostId??``),[b,C]=(0,q.useState)(e.worktreeDir??`.worktrees`),[w,T]=(0,q.useState)(!1),[D,O]=(0,q.useState)(null),k=Number(u),A=i.trim()?null:`Enter a project name.`,j=Number.isInteger(k)&&k>=1&&k<=32?null:`Use a whole number from 1 to 32.`,M=qn(b),N=async t=>{if(t.preventDefault(),!(A||j||M)){T(!0),O(null);try{await x(`/api/projects/${encodeURIComponent(e.id)}`,{name:i.trim(),setupCommand:o.trim()||null,checks:Ht(c),maxConcurrentRuns:k,automationEnabled:f,workspaceSharing:m,defaultProfileId:g||null,defaultHostId:v||null,worktreeDir:b.trim()}),V.success(`Project settings saved`)}catch(e){O(e)}finally{T(!1)}}},te=!v||t.some(e=>e.id===v),ne=!g||n.some(e=>e.id===g);return(0,J.jsx)(G,{title:`Project settings`,children:(0,J.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-4`,onSubmit:N,noValidate:!0,children:[(0,J.jsx)(B,{id:`${r}-name`,label:`Name`,error:A,children:(0,J.jsx)(U,{id:`${r}-name`,value:i,onChange:e=>a(e.target.value),...z(`${r}-name`,{error:A})})}),(0,J.jsx)(B,{id:`${r}-setup`,label:`Setup command`,hint:`Runs in each new workspace before the first session, e.g. pnpm install. Leave empty for none.`,children:(0,J.jsx)(U,{id:`${r}-setup`,value:o,onChange:e=>s(e.target.value),className:`font-mono`,spellCheck:!1,autoCapitalize:`off`,...z(`${r}-setup`,{hint:!0})})}),(0,J.jsx)(B,{id:`${r}-checks`,label:`Checks`,hint:`One command per line. Runs must pass these before review.`,children:(0,J.jsx)(nt,{id:`${r}-checks`,value:c,minRows:3,onChange:e=>l(e.target.value),className:`font-mono`,spellCheck:!1,autoCapitalize:`off`,...z(`${r}-checks`,{hint:!0})})}),(0,J.jsx)(B,{id:`${r}-runs`,label:`Max concurrent runs`,hint:`Between 1 and 32.`,error:j,children:(0,J.jsx)(U,{id:`${r}-runs`,type:`number`,inputMode:`numeric`,min:1,max:32,step:1,value:u,onChange:e=>d(e.target.value),className:`max-w-32`,...z(`${r}-runs`,{hint:!0,error:j})})}),(0,J.jsx)(B,{id:`${r}-worktree`,label:`Worktree folder`,hint:Kn,error:M,children:(0,J.jsx)(U,{id:`${r}-worktree`,"data-testid":`project-worktree-dir`,value:b,onChange:e=>C(e.target.value),placeholder:ee,className:`font-mono`,autoComplete:`off`,autoCapitalize:`off`,spellCheck:!1,...z(`${r}-worktree`,{hint:!0,error:M})})}),(0,J.jsx)(at,{label:`Auto-start Ready tasks`,description:`When off, Ready tasks in this project wait instead of starting automatically.`,checked:f,onChange:p}),(0,J.jsxs)(`fieldset`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,J.jsx)(`legend`,{className:`mb-1 text-sm font-medium`,children:`Workspace sharing`}),[[`single_writer`,`Single writer`,`Only one run or session writes in a workspace at a time; others wait. Safest.`],[`shared`,`Shared`,`Several sessions may write in the same workspace at once. Their changes can interleave.`]].map(([e,t,n])=>(0,J.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,J.jsx)(`input`,{id:`${r}-sharing-${e}`,type:`radio`,name:`${r}-sharing`,value:e,checked:m===e,onChange:()=>h(e),"aria-describedby":`${r}-sharing-${e}-desc`,className:`tap mt-0.5 size-5 shrink-0 accent-[var(--sy-accent)]`}),(0,J.jsxs)(`label`,{htmlFor:`${r}-sharing-${e}`,className:`min-w-0 text-sm`,children:[(0,J.jsx)(`span`,{className:`block font-medium`,children:t}),(0,J.jsx)(`span`,{id:`${r}-sharing-${e}-desc`,className:`block text-muted`,children:n})]})]},e))]}),(0,J.jsxs)(`div`,{className:`grid min-w-0 gap-4 sm:grid-cols-2`,children:[(0,J.jsx)(B,{id:`${r}-profile`,label:`Default Pi profile`,children:(0,J.jsxs)(K,{id:`${r}-profile`,value:g,onChange:e=>_(e.target.value),children:[(0,J.jsx)(`option`,{value:``,children:`None (use the coordinator default)`}),n.map(e=>(0,J.jsx)(`option`,{value:e.id,children:e.name},e.id)),!ne&&(0,J.jsx)(`option`,{value:g,children:`Removed profile`})]})}),(0,J.jsx)(B,{id:`${r}-host`,label:`Default host`,hint:`Runs start here when the task does not choose a host.`,children:(0,J.jsxs)(K,{id:`${r}-host`,value:v,onChange:e=>y(e.target.value),...z(`${r}-host`,{hint:!0}),children:[(0,J.jsx)(`option`,{value:``,children:`None (any host with a checkout)`}),t.map(e=>(0,J.jsxs)(`option`,{value:e.id,children:[e.name,e.connectivity===`connected`?``:` (${e.connectivity})`]},e.id)),!te&&(0,J.jsx)(`option`,{value:v,children:`Removed host`})]})})]}),(0,J.jsx)(S,{error:D}),(0,J.jsx)(`div`,{children:(0,J.jsx)(E,{type:`submit`,variant:`primary`,busy:w,icon:(0,J.jsx)(Ve,{className:`size-4`}),children:`Save project`})})]})})}function Xn({project:e,hosts:t,hostsById:n}){let r=R(e=>e.checkouts),i=(0,q.useMemo)(()=>Object.values(r).filter(t=>t.projectId===e.id).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)),[r,e.id]),[a,o]=(0,q.useState)(!1);return(0,J.jsxs)(G,{title:`Checkouts`,description:`Clones of this repository. Add one per host that should run this project.`,actions:(0,J.jsx)(E,{size:`sm`,icon:(0,J.jsx)(Le,{className:`size-4`}),onClick:()=>o(!0),children:`Add checkout`}),children:[i.length===0?(0,J.jsx)(F,{className:`py-4`,title:`No checkouts`,description:`Add a checkout so sessions and runs have somewhere to work.`,action:{label:`Add checkout`,onClick:()=>o(!0)}}):(0,J.jsx)(`ul`,{className:`flex min-w-0 flex-col divide-y divide-border`,children:i.map(e=>{let t=n[e.hostId];return(0,J.jsxs)(`li`,{className:`min-w-0 py-2 text-sm`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`font-medium`,children:t?.name??`Unknown host`}),t&&t.connectivity!==`connected`&&(0,J.jsxs)(`span`,{className:`text-xs text-muted`,children:[`(`,t.connectivity,`)`]})]}),(0,J.jsx)(`div`,{className:`break-all font-mono text-xs`,children:e.path}),(0,J.jsxs)(`div`,{className:`text-xs text-muted`,children:[`Default branch: `,e.defaultBranch]})]},e.id)})}),(0,J.jsx)(Zn,{open:a,onClose:()=>o(!1),project:e,hosts:t})]})}function Zn({open:e,onClose:t,project:n,hosts:r}){let i=(0,q.useId)(),a=r.filter(e=>e.connectivity===`connected`),[o,s]=(0,q.useState)(``),[c,l]=(0,q.useState)(``),[u,d]=(0,q.useState)(!1),[f,p]=(0,q.useState)(!1),[m,h]=(0,q.useState)(null),g=o||a[0]?.id||``,_=u||c?Bt(c):null,v=()=>{f||(d(!1),h(null),t())},y=async e=>{if(e.preventDefault(),d(!0),g&&!Bt(c)){p(!0),h(null);try{await L(`/api/projects/${encodeURIComponent(n.id)}/checkouts`,{hostId:g,path:c.trim()}),V.success(`Checkout added`),l(``),d(!1),t()}catch(e){h(e)}finally{p(!1)}}},b=`${i}-form`;return(0,J.jsx)(tt,{open:e,onClose:v,dismissOnBackdrop:!f,title:`Add checkout`,description:`Another clone of ${n.repoIdentity}.`,footer:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(E,{onClick:v,disabled:f,children:`Cancel`}),(0,J.jsx)(E,{type:`submit`,form:b,variant:`primary`,busy:f,disabled:a.length===0,children:`Add checkout`})]}),children:(0,J.jsxs)(`form`,{id:b,className:`flex min-w-0 flex-col gap-4`,onSubmit:y,noValidate:!0,children:[a.length===0&&(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`No host is connected. The checkout is inspected on its host, so the host must be online.`}),(0,J.jsx)(B,{id:`${i}-host`,label:`Host`,hint:`Only connected hosts are listed.`,children:(0,J.jsxs)(K,{id:`${i}-host`,value:g,onChange:e=>s(e.target.value),disabled:a.length===0,...z(`${i}-host`,{hint:!0}),children:[a.length===0&&(0,J.jsx)(`option`,{value:``,children:`No connected hosts`}),a.map(e=>(0,J.jsx)(`option`,{value:e.id,children:e.name},e.id))]})}),(0,J.jsx)(B,{id:`${i}-path`,label:`Checkout path on the host`,hint:`Absolute path of an existing clone of this repository.`,error:_,children:(0,J.jsx)(U,{id:`${i}-path`,value:c,onChange:e=>l(e.target.value),placeholder:`/Users/me/src/app`,className:`font-mono`,autoCapitalize:`off`,autoComplete:`off`,spellCheck:!1,...z(`${i}-path`,{hint:!0,error:_})})}),(0,J.jsx)(S,{error:m})]})})}var Qn=e=>Y(`projects/${encodeURIComponent(e)}`);function $n(){let e=Q(),t=_(),n=g().filter(e=>!e.revokedAt&&e.connectivity===`connected`),[i,a]=(0,q.useState)(``),o=t.filter(e=>Ee(e,i)),s=R(e=>e.checkouts),c=R(e=>e.workspaces),l=(0,q.useMemo)(()=>{let e={},t=t=>(e[t]??={checkouts:0,workspaces:0},e[t]);for(let e of Object.values(s))t(e.projectId).checkouts++;for(let e of Object.values(c))e.archivedAt||t(e.projectId).workspaces++;return e},[s,c]);return(0,J.jsxs)(X,{testId:`settings-projects`,title:`Projects`,description:`A project is one repository. It can have checkouts on several hosts. Repositories in a host's project folders are added automatically.`,actions:(0,J.jsxs)(r,{to:Y(`projects/new`),state:Be,className:O(`primary`),children:[(0,J.jsx)(Le,{"aria-hidden":!0,className:`size-4`}),`New project`]}),children:[(0,J.jsx)(P,{}),n.map(e=>(0,J.jsx)(we,{host:e},e.id)),e?t.length===0?(0,J.jsx)(F,{icon:(0,J.jsx)(Ce,{className:`size-8`}),title:`No projects yet`,description:`Create a project from a Git checkout on one of your hosts.`,action:{label:`New project`,to:Y(`projects/new`)}}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`div`,{className:`relative max-w-md`,children:[(0,J.jsx)(Ue,{"aria-hidden":!0,className:`pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-subtle`}),(0,J.jsx)(U,{type:`search`,"aria-label":`Search projects`,placeholder:`Search projects by name or remote`,value:i,onChange:e=>a(e.target.value),className:`pl-8`})]}),o.length===0?(0,J.jsx)(F,{className:`py-4`,title:`No matches`,description:`No project matches "${i.trim()}".`,action:{label:`Clear search`,onClick:()=>a(``)}}):(0,J.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border bg-surface`,children:o.map(e=>(0,J.jsx)(`li`,{className:`border-b border-border last:border-b-0`,children:(0,J.jsx)(er,{project:e,counts:l[e.id]})},e.id))})]}):(0,J.jsx)(T,{label:`Loading projects…`})]})}function er({project:e,counts:t}){let n=t??{checkouts:0,workspaces:0};return(0,J.jsxs)(r,{to:Qn(e.id),state:Be,className:`tap flex min-w-0 items-center gap-3 px-4 py-2 hover:bg-surface-2`,children:[(0,J.jsx)(Ce,{"aria-hidden":!0,className:`size-4 shrink-0 text-muted`}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,J.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.name}),(0,J.jsx)(`span`,{className:`truncate text-xs text-muted`,title:e.repoIdentity,children:Se(e.repoIdentity)}),(0,J.jsxs)(`span`,{className:`flex flex-wrap gap-x-2 text-xs text-subtle`,children:[(0,J.jsxs)(`span`,{children:[n.checkouts,` checkout`,n.checkouts===1?``:`s`]}),(0,J.jsxs)(`span`,{children:[n.workspaces,` workspace`,n.workspaces===1?``:`s`]}),!e.automationEnabled&&(0,J.jsx)(`span`,{children:`Auto-start off`})]})]}),(0,J.jsx)(De,{"aria-hidden":!0,className:`size-4 shrink-0 text-subtle`})]})}function tr(){let e=Q(),t=g(),r=R(e=>e.profiles),i=(0,q.useMemo)(()=>Object.values(r).sort((e,t)=>e.name.localeCompare(t.name)),[r]),a=t.filter(e=>e.connectivity===`connected`),o=n(),s=(0,q.useId)(),[c,l]=(0,q.useState)(``),[u,d]=(0,q.useState)(``),[f,m]=(0,q.useState)(``),[h,_]=(0,q.useState)(``),[v,y]=(0,q.useState)(ee),[b,x]=(0,q.useState)(!1),[C,w]=(0,q.useState)(!1),[D,O]=(0,q.useState)(null),k=u||a[0]?.id||``,A=b&&!c.trim()?`Enter a project name.`:null,j=b&&!k?`Choose a connected host.`:null,M=b||f?Bt(f):null,N=qn(v),te=async e=>{if(e.preventDefault(),x(!0),c.trim()&&k&&!Bt(f)&&!N){w(!0),O(null);try{let e=await L(`/api/projects`,{name:c.trim(),hostId:k,path:f.trim(),defaultProfileId:h||null,worktreeDir:v.trim()});V.success(`Project ${c.trim()} created`),o(e?.id?Qn(e.id):Y(`projects`),{replace:!0})}catch(e){O(e)}finally{w(!1)}}},ne={to:Y(`projects`),label:`Projects`};return e?(0,J.jsxs)(X,{title:`New project`,description:`Switchyard inspects the checkout on the host, then discovers its worktrees.`,back:ne,children:[a.length===0&&(0,J.jsx)(oe,{capability:`Creating a project`,reason:t.length===0?`No hosts are enrolled. Add a host first.`:`No host is connected. The checkout is inspected on its host, so the host must be online.`,fallback:(0,J.jsx)(rt,{to:Y(`hosts`),variant:`action`,children:`Open hosts`})}),(0,J.jsx)(G,{children:(0,J.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-4`,onSubmit:te,noValidate:!0,children:[(0,J.jsx)(B,{id:`${s}-name`,label:`Name`,error:A,children:(0,J.jsx)(U,{id:`${s}-name`,value:c,onChange:e=>l(e.target.value),autoComplete:`off`,...z(`${s}-name`,{error:A})})}),(0,J.jsx)(B,{id:`${s}-host`,label:`Host`,hint:`Only connected hosts are listed.`,error:j,children:(0,J.jsxs)(K,{id:`${s}-host`,value:k,onChange:e=>d(e.target.value),disabled:a.length===0,...z(`${s}-host`,{hint:!0,error:j}),children:[a.length===0&&(0,J.jsx)(`option`,{value:``,children:`No connected hosts`}),a.map(e=>(0,J.jsx)(`option`,{value:e.id,children:e.name},e.id))]})}),(0,J.jsx)(B,{id:`${s}-path`,label:`Checkout path on the host`,hint:`Absolute path of an existing Git checkout, e.g. /Users/me/src/app.`,error:M,children:(0,J.jsx)(U,{id:`${s}-path`,value:f,onChange:e=>m(e.target.value),placeholder:`/Users/me/src/app`,autoComplete:`off`,autoCapitalize:`off`,spellCheck:!1,className:`font-mono`,...z(`${s}-path`,{hint:!0,error:M})})}),(0,J.jsx)(B,{id:`${s}-worktree`,label:`Worktree folder`,hint:Kn,error:N,children:(0,J.jsx)(U,{id:`${s}-worktree`,value:v,onChange:e=>y(e.target.value),placeholder:ee,autoComplete:`off`,autoCapitalize:`off`,spellCheck:!1,className:`font-mono`,...z(`${s}-worktree`,{hint:!0,error:N})})}),(0,J.jsx)(B,{id:`${s}-profile`,label:`Default Pi profile (optional)`,children:(0,J.jsxs)(K,{id:`${s}-profile`,value:h,onChange:e=>_(e.target.value),children:[(0,J.jsx)(`option`,{value:``,children:`None`}),i.map(e=>(0,J.jsx)(`option`,{value:e.id,children:e.name},e.id))]})}),(0,J.jsx)(S,{error:D}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,J.jsx)(E,{type:`submit`,variant:`primary`,busy:C,icon:(0,J.jsx)(_t,{className:`size-4`}),disabled:a.length===0,children:`Create project`}),a.length===0&&(0,J.jsx)(p,{icon:_t,label:`Needs a connected host`})]})]})})]}):(0,J.jsx)(X,{title:`New project`,back:ne,children:(0,J.jsx)(T,{})})}function nr(){let e=it(`/api/auth/methods`,Vt),[t,n]=(0,q.useState)(!1),[r,i]=(0,q.useState)(null),[a,o]=(0,q.useState)(!1),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(!1),[d,f]=(0,q.useState)(!1),[m,h]=(0,q.useState)(null),g=async()=>{if(r){o(!0),c(null);try{await j(`/api/auth/passkeys/${encodeURIComponent(r.id)}`),V.success(`Passkey ${r.name} removed`),i(null),e.reload()}catch(e){c(e)}finally{o(!1)}}},_=async()=>{f(!0),h(null);try{await L(`/api/logout`),u(!1),de(null)}catch(e){h(e)}finally{f(!1)}},v=e.data,y=v?.passkeyAvailability,b=st(),x=v?y?.available?b?null:`This browser does not support passkeys.`:y?.reason??`Passkeys are not available on this server.`:null;return(0,J.jsxs)(X,{testId:`settings-signin`,title:`Sign-in`,description:`How you sign in to Switchyard on new devices. Each signed-in device keeps its own revocable credential.`,children:[(0,J.jsx)(P,{}),e.loading&&!v?(0,J.jsx)(T,{label:`Loading sign-in methods…`}):e.error&&!v?(0,J.jsx)(N,{title:`Could not load sign-in methods`,error:e.error,onRetry:e.reload}):v?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(G,{title:`Passkeys`,description:`Sign in on any device with its fingerprint, face or screen lock. Passkeys are stored on this server only as public keys.`,actions:(0,J.jsx)(E,{"data-testid":`passkey-add`,variant:`primary`,icon:(0,J.jsx)(Le,{className:`size-4`}),disabled:x!==null,onClick:()=>n(!0),children:`Add a passkey`}),children:[x&&(0,J.jsxs)(`p`,{role:`status`,className:`mb-3 flex items-start gap-2 rounded-md bg-warning-soft px-3 py-2 text-sm`,children:[(0,J.jsx)(I,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0`}),(0,J.jsxs)(`span`,{className:`min-w-0 break-words`,children:[`Adding a passkey is unavailable: `,x]})]}),v.passkeys.length===0?(0,J.jsx)(`p`,{className:`text-sm text-muted`,children:`No passkeys yet. Add one as a backup to single sign-on, or to sign in without it.`}):(0,J.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border`,children:v.passkeys.map(e=>(0,J.jsxs)(`li`,{"data-testid":`passkey-row`,className:`flex min-w-0 flex-wrap items-center gap-3 border-b border-border px-3 py-2 last:border-b-0`,children:[(0,J.jsx)(Ie,{"aria-hidden":!0,className:`size-5 shrink-0 text-muted`}),(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`div`,{className:`break-words font-medium`,children:e.name}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-x-3 text-sm text-muted`,children:[(0,J.jsxs)(`span`,{children:[`Added `,A(e.createdAt)]}),(0,J.jsxs)(`span`,{children:[`Last used `,A(e.lastUsedAt)]})]})]}),(0,J.jsx)(E,{size:`sm`,variant:`ghost`,className:`text-danger`,icon:(0,J.jsx)(he,{className:`size-4`}),"aria-label":`Remove passkey ${e.name}`,onClick:()=>{c(null),i(e)},children:`Remove`})]},e.id))})]}),(0,J.jsx)(G,{title:`Single sign-on`,description:`Configured on the server`,children:v.oidc?(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(Z,{items:[[`Button label`,v.oidc.label],[`Provider`,(0,J.jsx)(`span`,{className:`break-all`,children:v.oidc.issuer},`i`)],[`Allowed account`,v.oidc.ownerMatch],[`Status`,v.oidc.status===`ready`?(0,J.jsx)(p,{icon:Ne,tone:`success`,label:`Ready`},`s`):(0,J.jsx)(p,{icon:I,tone:`danger`,label:`Error`},`s`)]]}),v.oidc.status===`error`&&v.oidc.error&&(0,J.jsx)(`p`,{role:`alert`,className:`break-words text-sm text-danger`,children:v.oidc.error})]}):(0,J.jsxs)(`p`,{"data-testid":`signin-oidc-status`,className:`text-sm text-muted`,children:[`Not configured. Set the `,(0,J.jsx)(`code`,{children:`SWITCHYARD_OIDC_*`}),` variables on the server to sign in with an identity provider.`]})})]}):null,(0,J.jsx)(G,{title:`This device`,description:`Signing out removes this device's credential here. Other devices stay signed in; revoke a device in Settings › Devices to cut it off.`,children:(0,J.jsx)(E,{icon:(0,J.jsx)(Tt,{className:`size-4`}),onClick:()=>{h(null),u(!0)},children:`Sign out of this device`})}),(0,J.jsx)(rr,{open:t,onClose:()=>n(!1),onAdded:()=>{n(!1),e.reload()}}),(0,J.jsx)(H,{open:r!==null,onClose:()=>i(null),title:r?`Remove passkey ${r.name}?`:`Remove passkey`,confirmLabel:`Remove passkey`,busy:a,error:s,onConfirm:g,children:(0,J.jsxs)(`p`,{className:`text-sm`,children:[`Devices already signed in stay signed in. This passkey can no longer sign in new devices.`,v&&v.passkeys.length===1&&!v.oidc?` It is your only passkey and no single sign-on is set up: afterwards new browsers need switchyard pair run on the server.`:``]})}),(0,J.jsx)(H,{open:l,onClose:()=>u(!1),title:`Sign out of this device?`,confirmLabel:`Sign out`,busy:d,error:m,onConfirm:_,children:(0,J.jsxs)(`p`,{className:`text-sm`,children:[`You will need single sign-on, a passkey or `,(0,J.jsx)(`code`,{children:`switchyard pair`}),` on the server to sign in here again.`]})})]})}function rr({open:e,onClose:t,onAdded:n}){let r=(0,q.useId)(),[i,a]=(0,q.useState)(()=>lt()),[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)(null),u=ct(),d=i.trim()?null:`Enter a name for this passkey.`,f=()=>{if(u.waiting)u.cancel();else if(o)return;l(null),t()},p=async e=>{if(e.preventDefault(),!d){s(!0),l(null);try{let{challengeId:e,options:t}=await L(`/api/auth/passkeys/register/options`),r=await u.run(()=>ot({optionsJSON:t}));if(!r.ok){s(!1);return}let a=r.value;await L(`/api/auth/passkeys/register/verify`,{challengeId:e,name:i.trim().slice(0,80),response:a}),V.success(`Passkey added`),n()}catch(e){l(e instanceof Error&&e.name===`NotAllowedError`?Error(`The passkey prompt was canceled or timed out. Try again.`):e instanceof Error?e:Error(ue(e)))}finally{s(!1)}}},m=`${r}-form`;return(0,J.jsx)(tt,{open:e,onClose:f,dismissOnBackdrop:!o||u.waiting,title:`Add a passkey`,description:`Name it after where it is stored, then confirm with your device.`,footer:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(E,{onClick:f,disabled:o&&!u.waiting,children:`Cancel`}),(0,J.jsx)(E,{type:`submit`,form:m,variant:`primary`,busy:o,children:`Create passkey`})]}),children:(0,J.jsxs)(`form`,{id:m,className:`flex min-w-0 flex-col gap-4`,onSubmit:p,noValidate:!0,children:[(0,J.jsx)(B,{id:`${r}-name`,label:`Passkey name`,error:d,children:(0,J.jsx)(U,{id:`${r}-name`,value:i,maxLength:80,autoComplete:`off`,onChange:e=>a(e.target.value),...z(`${r}-name`,{error:d})})}),u.waiting&&(0,J.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-sm text-muted`,children:[(0,J.jsx)(te,{}),` Waiting for your passkey… Cancel stops it.`]}),(0,J.jsx)(S,{error:c})]})})}function ir(){let e=Me(),n=e===`mobile`,r=(0,J.jsxs)(i,{children:[(0,J.jsx)(t,{index:!0,element:n?(0,J.jsx)(cr,{}):(0,J.jsx)(s,{to:Y(`hosts`),replace:!0})}),(0,J.jsx)(t,{path:`hosts`,element:(0,J.jsx)(bn,{})}),(0,J.jsx)(t,{path:`hosts/:hostId`,element:(0,J.jsx)(En,{})}),(0,J.jsx)(t,{path:`devices`,element:(0,J.jsx)(un,{})}),(0,J.jsx)(t,{path:`sign-in`,element:(0,J.jsx)(nr,{})}),(0,J.jsx)(t,{path:`projects`,element:(0,J.jsx)($n,{})}),(0,J.jsx)(t,{path:`projects/new`,element:(0,J.jsx)(tr,{})}),(0,J.jsx)(t,{path:`projects/:projectId`,element:(0,J.jsx)(Jn,{})}),(0,J.jsx)(t,{path:`profiles`,element:(0,J.jsx)(zn,{})}),(0,J.jsx)(t,{path:`adapters`,element:(0,J.jsx)(Zt,{})}),(0,J.jsx)(t,{path:`notifications`,element:(0,J.jsx)(An,{})}),(0,J.jsx)(t,{path:`backups`,element:(0,J.jsx)(on,{})}),(0,J.jsx)(t,{path:`diagnostics`,element:(0,J.jsx)(fn,{})}),(0,J.jsx)(t,{path:`device`,element:(0,J.jsx)(dn,{})}),(0,J.jsx)(t,{path:`*`,element:(0,J.jsx)(lr,{})})]});return n?(0,J.jsx)(`div`,{className:`min-w-0`,children:r}):(0,J.jsxs)(`div`,{className:`flex min-h-full min-w-0`,children:[(0,J.jsx)(or,{compact:e===`compact`}),(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:r})]})}function ar(){let{pathname:e}=u(),t=e.split(`/`),n=t.indexOf(`settings`);return n>=0&&(t[n+1]??null)||null}function or({compact:e}){let t=ar();return(0,J.jsx)(`div`,{className:b(`shrink-0 border-r border-border`,e?`w-52`:`w-60`),children:(0,J.jsxs)(`nav`,{"aria-label":`Settings sections`,"data-testid":`settings-nav`,className:`sticky top-0 flex max-h-dvh flex-col gap-1 overflow-y-auto px-2 py-4`,children:[(0,J.jsx)(`h2`,{className:`mb-1 px-3 py-1 text-base font-semibold`,children:`Settings`}),Lt.map(e=>(0,J.jsxs)(`div`,{className:`flex flex-col`,children:[(0,J.jsx)(`h3`,{className:`px-3 pt-3 pb-1 text-xs font-semibold tracking-wide text-muted uppercase`,children:e.label}),(0,J.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:e.sections.map(({path:e,label:n,icon:i})=>{let a=t===e;return(0,J.jsx)(`li`,{children:(0,J.jsxs)(r,{to:Y(e),"aria-current":a?`page`:void 0,className:b(`tap flex h-10 items-center gap-3 rounded-md px-3 text-sm font-medium`,a?`bg-accent-soft text-text`:`text-muted hover:bg-surface-2 hover:text-text`),children:[(0,J.jsx)(i,{"aria-hidden":!0,className:`size-4 shrink-0`}),(0,J.jsx)(`span`,{className:`min-w-0 truncate`,children:n})]})},e)})})]},e.label))]})})}function sr(){let e=R(e=>e.hosts),t=R(e=>e.devices),n=R(e=>e.projects),r=R(e=>e.profiles),i=R(e=>e.adapters),a=R(e=>e.hydrated);return(0,q.useMemo)(()=>{if(!a)return{};let o=Object.values(e).filter(e=>e.revokedAt===null),s=o.filter(e=>e.connectivity===`connected`).length,c=Object.values(i).reduce((e,t)=>e+t.length,0),l=(e,t)=>`${e} ${t}${e===1?``:`s`}`;return{hosts:`${l(o.length,`host`)}, ${s} connected`,devices:l(Object.values(t).filter(e=>e.revokedAt===null).length,`device`),projects:l(Object.keys(n).length,`project`),profiles:l(Object.keys(r).length,`profile`),adapters:l(c,`adapter`)}},[e,t,n,r,i,a])}function cr(){let e=sr();return(0,J.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-xl flex-col gap-3 px-4 py-4`,children:[(0,J.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Settings`}),(0,J.jsx)(P,{}),(0,J.jsx)(`nav`,{"aria-label":`Settings sections`,"data-testid":`settings-nav`,children:Lt.map(t=>(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h2`,{className:`px-1 pt-3 pb-1 text-xs font-semibold tracking-wide text-muted uppercase`,children:t.label}),(0,J.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border bg-surface`,children:t.sections.map(({path:t,label:n,description:i,icon:a})=>(0,J.jsx)(`li`,{className:`border-b border-border last:border-b-0`,children:(0,J.jsxs)(r,{to:Y(t),state:Be,className:`tap flex min-h-14 items-center gap-3 px-4 py-2 hover:bg-surface-2`,children:[(0,J.jsx)(a,{"aria-hidden":!0,className:`size-5 shrink-0 text-muted`}),(0,J.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`span`,{className:`block font-medium`,children:n}),(0,J.jsx)(`span`,{className:`block truncate text-sm text-muted`,children:e[t]??i})]}),(0,J.jsx)(De,{"aria-hidden":!0,className:`size-4 shrink-0 text-subtle`})]})},t))})]},t.label))})]})}function lr(){return(0,J.jsx)(F,{title:`Settings page not found`,description:`This link does not match a settings section.`,action:{label:`Open Settings`,to:Y()}})}export{ir as default};
|
|
8
|
+
//# sourceMappingURL=settings-CLt7x9u8.js.map
|