chamba 0.7.0 → 0.9.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/LICENSE +53 -14
- package/README.md +34 -8
- package/dist/commands/advanced.js +7 -278
- package/dist/commands/dev.js +11 -612
- package/dist/commands/doctor.js +1 -29
- package/dist/commands/menu.js +1 -80
- package/dist/commands/onboard.js +6 -230
- package/dist/commands/settings.js +15 -349
- package/dist/lib/agent-commands.js +2 -0
- package/dist/lib/agent-context.js +6 -210
- package/dist/lib/browser.js +1 -40
- package/dist/lib/chamba-yaml.js +10 -191
- package/dist/lib/constants.js +1 -125
- package/dist/lib/dockerfile-builder.js +41 -261
- package/dist/lib/env.js +2 -78
- package/dist/lib/git-env.js +1 -21
- package/dist/lib/global-config.js +4 -66
- package/dist/lib/pnpm-store.js +1 -19
- package/dist/lib/ports.js +1 -210
- package/dist/lib/safe-rm.js +1 -36
- package/dist/lib/sessions.js +2 -34
- package/dist/lib/shadows.js +1 -176
- package/dist/lib/skills.js +2 -0
- package/dist/lib/templates.js +1 -0
- package/dist/lib/webterm.js +1 -305
- package/dist/lib/workspace-identity.js +4 -260
- package/package.json +4 -4
- package/templates/Dockerfile +15 -22
- package/templates/claude-statusline.sh +5 -7
- package/templates/context/baseline.md +4 -2
- package/templates/context/web-pane-craft.md +1 -1
- package/templates/pane-apps/client/assets/api-BBDf_rzz.js +12 -0
- package/templates/pane-apps/client/assets/api-DNLbSBpK.css +1 -0
- package/templates/pane-apps/client/assets/bee-B7t97l5B.webp +0 -0
- package/templates/pane-apps/client/assets/buzz-CUUsbnXH.mp3 +0 -0
- package/templates/pane-apps/client/assets/c-BNa-DeUl.json +3552 -0
- package/templates/pane-apps/client/assets/cpp-B-T4NRoH.json +20239 -0
- package/templates/pane-apps/client/assets/csharp-BbxHChhA.json +6010 -0
- package/templates/pane-apps/client/assets/css-CWCxuwmz.json +1860 -0
- package/templates/pane-apps/client/assets/diff-B-2N89g8.json +154 -0
- package/templates/pane-apps/client/assets/docker-DWTvYW26.json +103 -0
- package/templates/pane-apps/client/assets/files-BkmyervY.js +1 -0
- package/templates/pane-apps/client/assets/go-B2hyYeNg.json +3156 -0
- package/templates/pane-apps/client/assets/graphql-Z6Id2aNO.json +1292 -0
- package/templates/pane-apps/client/assets/home-3SeGzySM.css +1 -0
- package/templates/pane-apps/client/assets/home-Cu9xOd2i.js +1 -0
- package/templates/pane-apps/client/assets/html-BtzvlIfu.json +2627 -0
- package/templates/pane-apps/client/assets/ini-Bn3Twap1.json +108 -0
- package/templates/pane-apps/client/assets/java-C7t2dwLO.json +1885 -0
- package/templates/pane-apps/client/assets/javascript-DuC2v0C0.json +5996 -0
- package/templates/pane-apps/client/assets/json-CwdkWeV5.json +206 -0
- package/templates/pane-apps/client/assets/jsonc-MYWDbTU3.json +206 -0
- package/templates/pane-apps/client/assets/jsx-Cn8EZuIC.json +5996 -0
- package/templates/pane-apps/client/assets/kotlin-CFNOz1gw.json +580 -0
- package/templates/pane-apps/client/assets/make-BVnlFCcl.json +629 -0
- package/templates/pane-apps/client/assets/markdown-B4Xk2WM_.json +3263 -0
- package/templates/pane-apps/client/assets/php-CAQzQmmI.json +4188 -0
- package/templates/pane-apps/client/assets/pop-D5ZANBC3.mp3 +0 -0
- package/templates/pane-apps/client/assets/python-CYQee8m4.json +4174 -0
- package/templates/pane-apps/client/assets/reviews-DMrGB-kG.js +153 -0
- package/templates/pane-apps/client/assets/reviews-nK_yRav9.css +1 -0
- package/templates/pane-apps/client/assets/ruby-D7R58tus.json +3114 -0
- package/templates/pane-apps/client/assets/rust-BFBbFiei.json +1103 -0
- package/templates/pane-apps/client/assets/scss-TQRhBkPG.json +1874 -0
- package/templates/pane-apps/client/assets/shellscript-DieAkC4W.json +2375 -0
- package/templates/pane-apps/client/assets/specs-Cabb15F0.js +13 -0
- package/templates/pane-apps/client/assets/sql-Bxd030LV.json +634 -0
- package/templates/pane-apps/client/assets/toml-ChrKGzsV.json +430 -0
- package/templates/pane-apps/client/assets/tsx-D2e90MFw.json +5996 -0
- package/templates/pane-apps/client/assets/typescript-DonXQ_n1.json +5747 -0
- package/templates/pane-apps/client/assets/useNow-BHFKFraS.js +1 -0
- package/templates/pane-apps/client/assets/xml-B17r2RXF.json +382 -0
- package/templates/pane-apps/client/assets/yaml-CKn4h1zy.json +627 -0
- package/templates/pane-apps/client/home/index.html +16 -0
- package/templates/pane-apps/client/reviews/index.html +17 -0
- package/templates/pane-apps/client/specs/index.html +4 -2
- package/templates/pane-apps/server/home.mjs +12 -0
- package/templates/pane-apps/server/reviews.mjs +21 -0
- package/templates/pane-apps/server/specs.mjs +5 -1588
- package/templates/skills/chamba-statusline/SKILL.md +7 -19
- package/templates/skills/dx-review/SKILL.md +136 -0
- package/templates/skills/dx-review/references/acts.md +233 -0
- package/templates/skills/dx-spec/SKILL.md +230 -30
- package/templates/skills/dx-spec/references/principles-template.md +2 -0
- package/templates/skills/dx-spec/references/review-guide.md +6 -52
- package/templates/skills/dx-spec/references/spec-guide.md +25 -5
- package/templates/skills/dx-spec/references/stages.md +149 -60
- package/templates/skills/dx-spec-execute/SKILL.md +217 -38
- package/templates/startup.mjs +22 -16
- package/templates/tool-helper.sh +168 -0
- package/templates/webterm/README.md +82 -27
- package/templates/webterm/color.js +61 -0
- package/templates/webterm/config.js +55 -4
- package/templates/webterm/context/claude.md +0 -1
- package/templates/webterm/public/app/alerts.js +95 -14
- package/templates/webterm/public/app/anchored.js +81 -0
- package/templates/webterm/public/app/composer.js +37 -3
- package/templates/webterm/public/app/connection.js +23 -0
- package/templates/webterm/public/app/dom.js +3 -0
- package/templates/webterm/public/app/frames.js +52 -18
- package/templates/webterm/public/app/home-host.js +16 -0
- package/templates/webterm/public/app/main.js +24 -8
- package/templates/webterm/public/app/new-session.js +13 -41
- package/templates/webterm/public/app/palette.js +58 -0
- package/templates/webterm/public/app/pane-shape.js +169 -0
- package/templates/webterm/public/app/pane-shell.js +240 -135
- package/templates/webterm/public/app/pane.js +39 -24
- package/templates/webterm/public/app/reviews-host.js +19 -0
- package/templates/webterm/public/app/specs-host.js +12 -218
- package/templates/webterm/public/app/state.js +5 -0
- package/templates/webterm/public/app/tabs.js +6 -2
- package/templates/webterm/public/app/theme.js +75 -27
- package/templates/webterm/public/app/tool-host.js +318 -0
- package/templates/webterm/public/app/workspace-color.js +192 -0
- package/templates/webterm/public/index.html +22 -4
- package/templates/webterm/public/styles.css +195 -21
- package/templates/webterm/server.js +198 -150
- package/templates/webterm/tool-document.js +3 -2
- package/templates/webterm/tools/commands.js +61 -0
- package/templates/webterm/tools/home.js +58 -0
- package/templates/webterm/tools/index.js +26 -0
- package/templates/webterm/tools/mount.js +337 -0
- package/templates/webterm/tools/paths.js +34 -0
- package/templates/webterm/tools/reviews.js +137 -0
- package/templates/webterm/tools/specs.js +154 -0
- package/templates/webterm/typed-line.js +70 -7
- package/templates/context/context-usage.md +0 -1
- package/templates/context-usage.sh +0 -266
- package/templates/pane-apps/client/assets/specs-B1970L17.css +0 -1
- package/templates/pane-apps/client/assets/specs-cEee_SPn.js +0 -23
- package/templates/skills/dx-spec-config/SKILL.md +0 -313
- package/templates/skills/dx-spec-config/references/principles-template.md +0 -12
- package/templates/specs.sh +0 -106
- package/templates/webterm/specs.js +0 -358
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.hm-page{height:100%;padding:14px 16px 40px;font-size:13.5px;position:relative;overflow:hidden auto}.hm-column{min-width:0;max-width:1100px;margin:0 auto}.hm-head{color:var(--muted);flex-wrap:wrap;align-items:center;gap:6px 16px;margin-bottom:14px;font-size:12.5px;display:flex}.hm-repo{color:var(--fg);font-size:16px;font-weight:600}.hm-dot{background:var(--ok);vertical-align:middle;border-radius:50%;width:8px;height:8px;margin-right:5px;display:inline-block}.hm-dot.hm-dirty{background:var(--warn)}.hm-read{align-items:center;gap:8px;margin-left:auto;display:flex}.hm-read button{font:inherit;color:var(--fg);background:var(--panel);border:1px solid var(--border);cursor:pointer;border-radius:6px;align-items:center;gap:6px;padding:4px 10px;font-size:12.5px;display:flex}.hm-read button:hover{border-color:var(--muted)}.hm-read button[disabled]{cursor:default;color:var(--muted)}.hm-plain{color:var(--muted);margin:0;padding:20px 0}.hm-failed{color:var(--fg);border-left:3px solid var(--warn);flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 14px;padding:8px 12px;font-size:12.5px;display:flex}.hm-bar{background:var(--panel);border-radius:5px;width:90px;height:10px;display:inline-block}.hm-bar-name{width:120px;height:14px}@media (prefers-reduced-motion:no-preference){.hm-bar{animation:1.6s ease-in-out infinite hmBreathe}@keyframes hmBreathe{0%,to{opacity:1}50%{opacity:.55}}}.hm-card{background:var(--panel);border:1px solid var(--border);border-radius:8px;min-width:0;margin-bottom:12px;padding:12px 14px}.hm-card h3{text-transform:uppercase;letter-spacing:.06em;color:var(--muted);align-items:baseline;gap:8px;margin:0 0 8px;font-size:11.5px;font-weight:600;display:flex}.hm-card h3 small{text-transform:none;letter-spacing:0;font-weight:400}.hm-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:12px;display:grid}.hm-grid .hm-card{margin-bottom:12px}.hm-tiles{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px;display:grid}.hm-big{font-variant-numeric:tabular-nums;font-size:24px;font-weight:600;line-height:1.15}.hm-lines{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:20px}.hm-lines .hm-added{color:#7bb992;white-space:nowrap}.hm-lines .hm-deleted{color:#c78b8b;white-space:nowrap}.hm-lines .hm-slash{color:var(--muted)}.hm-span{color:var(--muted);font-size:14px;font-weight:400}.hm-sub{color:var(--muted);font-size:12px}.hm-up{color:var(--ok)}.hm-muted{color:var(--muted)}.hm-cut{color:var(--muted);margin:10px 0 0;font-size:12px}.hm-loader{background:linear-gradient(90deg,#1b2230 25%,#232b38 37%,#1b2230 63%) 0 0/400% 100%;border-radius:6px}@media (prefers-reduced-motion:no-preference){.hm-loader{animation:1.4s infinite hmShimmer}@keyframes hmShimmer{0%{background-position:100% 0}to{background-position:0 0}}}.hm-notice{color:var(--fg);margin:0;font-size:12.5px}.hm-tip{opacity:0;white-space:nowrap;background:#1b2230;max-width:none;padding:4px 8px;transition:opacity .12s}.hm-tip.hm-tip-on{opacity:1}.hm-scroll{scrollbar-width:thin;padding-bottom:4px;overflow:auto hidden}.hm-garden-wrap{position:relative}.hm-garden-wrap.hm-more:before{content:"";background:linear-gradient(90deg, var(--panel), transparent);z-index:2;pointer-events:none;width:64px;position:absolute;top:0;bottom:22px;left:0}.hm-earlier{z-index:3;color:var(--muted);background:var(--panel);border-radius:6px;align-items:center;gap:6px;padding:2px 6px;font-size:11.5px;display:flex;position:absolute;top:8px;left:8px}@media (prefers-reduced-motion:no-preference){.hm-earlier i{animation:1.6s ease-in-out infinite hmNudge;display:inline-block}@keyframes hmNudge{50%{transform:translate(-4px)}}}.hm-garden{background:linear-gradient(#0000 78%,#12281a 100%);border-radius:6px 6px 0 0;min-width:max-content;display:block}.hm-stem{stroke:#2f7a3e;stroke-width:2px;fill:none}.hm-leaf{fill:#26a641}.hm-bud{fill:#39d353}.hm-flower{fill:#a371f7}.hm-flower.hm-shade-1{fill:#b168e2}.hm-flower.hm-shade-2{fill:#c060c9}.hm-flower.hm-shade-3{fill:#c95aa5}.hm-flower.hm-shade-4{fill:#d55181}@media (prefers-reduced-motion:no-preference){.hm-plant.hm-sway{animation:3.2s ease-in-out infinite alternate hmSway}@keyframes hmSway{0%{transform:rotate(-2deg)}to{transform:rotate(2deg)}}}.hm-axis{border-top:1px solid var(--border);min-width:max-content;height:22px;color:var(--muted);font-size:11px;position:relative}.hm-axis span{white-space:nowrap;position:absolute;top:3px}.hm-axis span:before{content:"";border-left:1px solid var(--border);height:5px;position:absolute;top:-4px;left:0}.hm-axis span.hm-year{color:var(--fg);font-weight:600;top:11px}.hm-legend{color:var(--muted);flex-wrap:wrap;align-items:center;gap:16px;margin-top:8px;font-size:12px;display:flex}.hm-legend b{color:var(--fg)}.hm-info{all:unset;box-sizing:border-box;width:14px;height:14px;color:var(--muted);vertical-align:-2px;cursor:default;justify-content:center;align-items:center;margin-left:5px;display:inline-flex}.hm-info:hover,.hm-info:focus-visible{color:var(--fg)}.hm-infotip{width:280px}.hm-key{vertical-align:middle;border-radius:50%;width:8px;height:8px;margin-right:5px;display:inline-block}.hm-bud-key{background:#39d353}.hm-flower-key{background:#a371f7}.hm-big-key{background:#d55181}.hm-bars{align-items:flex-end;gap:3px;height:64px;display:flex}.hm-bars.hm-bars-wide{gap:8px}.hm-bars i{background:#006d32;border-radius:3px 3px 0 0;flex:1;min-width:3px}.hm-bars i.hm-tall{background:#39d353}.hm-bars i:hover{background:var(--accent)}.hm-axis-x{color:var(--muted);justify-content:space-between;margin-top:4px;font-size:11px;display:flex}.hm-hbar{grid-template-columns:78px 1fr 44px;align-items:center;gap:8px;margin:5px 0;font-size:12px;display:grid}.hm-key-name{color:var(--muted);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.hm-track{background:var(--sunken);border-radius:4px;height:8px;overflow:hidden}.hm-track i{border-radius:0 4px 4px 0;height:100%;display:block}.hm-value{text-align:right;color:var(--muted);font-variant-numeric:tabular-nums}.hm-areas .hm-hbar{grid-template-columns:minmax(64px,120px) 1fr auto 44px}.hm-shift{text-align:right;color:var(--muted);font-variant-numeric:tabular-nums}.hm-list{max-height:260px;font-size:12.5px;overflow-y:auto}.hm-list>div{border-bottom:1px dashed #21262d;grid-template-columns:1fr auto auto auto;align-items:center;gap:10px;padding:5px 0;display:grid}.hm-list>div:last-child{border-bottom:0}.hm-name{text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;overflow:hidden}.hm-flag{color:var(--muted);white-space:nowrap;background:#1f2937;border-radius:9px;padding:1px 7px;font-size:11px}.hm-flag.hm-merged,.hm-flag.hm-squash{color:var(--ok);background:#3fb95026}.hm-flag.hm-stale{color:var(--warn);background:#d2992226}.hm-flag.hm-current{color:var(--accent);background:#58a6ff26}.hm-pop{position:relative}.hm-del{color:var(--muted);cursor:pointer;background:0 0;border:0;padding:2px 4px;line-height:0}.hm-del:hover{color:var(--fg)}.hm-popover{z-index:5;background:var(--panel);border:1px solid var(--border);white-space:normal;border-radius:8px;width:min(420px,88vw);padding:10px 12px;font-size:12.5px;position:absolute;top:26px;right:0;box-shadow:0 8px 28px #00000080}.hm-popover p{color:var(--muted);margin:0 0 6px}.hm-warn-text{color:var(--warn)}.hm-cmd{align-items:center;gap:8px;display:flex}.hm-cmd input{background:var(--sunken);color:var(--fg);border:1px solid var(--border);border-radius:6px;flex:1;min-width:0;padding:6px 8px;font:12px ui-monospace,SFMono-Regular,Menlo,monospace}.hm-hint{color:var(--muted);white-space:nowrap;font-size:11px}.hm-bee{z-index:8;appearance:none;aspect-ratio:110/88;cursor:pointer;will-change:transform;visibility:hidden;background:0 0;border:0;width:110px;padding:0;position:fixed;top:0;left:0}.hm-bee.hm-here{visibility:visible}.hm-bee .hm-face{transform-origin:50%;width:100%;height:100%;display:block}.hm-bee img{object-fit:contain;pointer-events:none;width:100%;height:100%;display:block}.hm-bee.hm-hop .hm-face{animation:.5s cubic-bezier(.3,0,.2,1) hmHop}@keyframes hmHop{40%{transform:translateY(-14px)}}.hm-page.hm-still .hm-head{padding-right:76px}.hm-bee.hm-parked{width:64px;height:52px;position:absolute;top:4px;left:auto;right:12px;transform:none}@media (prefers-reduced-motion:reduce){.hm-bee.hm-hop .hm-face{animation:none}}.hm-bubble{z-index:9;background:var(--fg);color:#0d1117;opacity:0;pointer-events:none;border-radius:10px;max-width:280px;padding:10px 12px;font-size:12.5px;line-height:1.4;transition:opacity .2s,transform .2s;position:fixed;transform:translateY(6px);box-shadow:0 8px 28px #00000080}.hm-who{color:#4b5563;margin-top:4px;display:block}.hm-bubble.hm-said{opacity:1;transform:translateY(0)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,C as t,D as n,E as r,O as i,c as a,i as o,k as s,n as c,r as l,s as u,t as d,y as f}from"./api-BBDf_rzz.js";import{t as p}from"./useNow-BHFKFraS.js";var m=e(),h=i(),g=n();function _(e){return(0,g.jsxs)(`div`,{className:`hm-hbar`,children:[(0,g.jsx)(`span`,{className:`hm-key-name`,title:e.name,children:e.name}),(0,g.jsx)(`div`,{className:`hm-track`,children:(0,g.jsx)(`i`,{style:{width:`${e.width}%`,background:e.colour}})}),(0,g.jsx)(`span`,{className:`hm-value`,children:e.value}),e.note!==void 0&&(0,g.jsx)(`span`,{className:e.note.className,title:e.note.title,children:e.note.said})]})}var v=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function y(e){return e.toLocaleString(`en-GB`)}function b(e,t){return`${y(e)} ${t}${e===1?``:`s`}`}function x(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(t===null)return null;let n=Number(t[2])-1;return n<0||n>11?null:{year:t[1]??``,month:n,date:Number(t[3])}}function S(e){if(e===null)return``;let t=x(e.slice(0,10));return t===null?``:`${t.date} ${v[t.month]} ${t.year}`}function C(e){let t=x(e.slice(0,10));return t===null?``:`${t.date} ${v[t.month]}`}function ee(e,t){let n=x(e.slice(0,10)),r=x(t.slice(0,10));return n===null||r===null?``:n.year===r.year&&n.month===r.month?`${n.date}-${r.date} ${v[n.month]}`:`${C(e)} - ${C(t)}`}function te(e){return e===0?`working tree clean`:`${b(e,`uncommitted change`)}`}function ne(e,t){return`+${y(e)} / -${y(t)}`}var re=`#199e70`;function ie(e,t){if(t===0)return{said:e===0?`quiet`:`new`,up:e>0};let n=Math.round((e-t)/t*100);return{said:`${n>=0?`+`:``}${n}%`,up:n>0}}function ae(e){if(e.areas.length===0)return(0,g.jsx)(`p`,{className:`hm-plain hm-muted`,children:`No commit in the last sixty days.`});let t=Math.max(1,...e.areas.map(e=>e.lines));return(0,g.jsx)(`div`,{className:`hm-areas`,children:e.areas.map(e=>{let n=ie(e.lines,e.before.lines);return(0,g.jsx)(_,{name:e.area,width:e.lines/t*100,colour:re,value:`${y(e.lines)} lines · ${b(e.commits,`commit`)}`,note:{said:n.said,className:n.up?`hm-shift hm-up`:`hm-shift`,title:`${y(e.before.lines)} lines in ${b(e.before.commits,`commit`)} over the thirty days before`}},e.area)})})}var oe=/^[A-Za-z0-9._/-]+$/;function se(e){return oe.test(e)?e:`'${e.replace(/'/g,`'\\''`)}'`}function ce(e){return e===`merged`||e===`squash`||e===`stale`}function le(e,t){return`git branch ${t===`merged`?`-d`:`-D`} -- ${se(e)}`}function ue(e,t){switch(e){case`current`:return`current`;case`default`:return`default`;case`merged`:return`merged`;case`squash`:return`merged (squash)`;case`stale`:return`stale`;default:return`ahead of ${t}`}}function de(e){let t=e.filter(e=>e.state===`merged`||e.state===`squash`).length,n=e.filter(e=>e.state===`stale`).length;return`${y(e.length)} local · ${y(t)} merged, ${y(n)} stale`}function fe(e,t){return e===`stale`?{said:`This branch holds work that is not on ${t}. The command deletes it anyway.`,warn:!0}:e===`squash`?{said:`Squash-merged into ${t}. git cannot see a squash merge, so the force flag is needed. Home checked that the whole change is on ${t}.`,warn:!1}:{said:`Merged into ${t}, so the safe delete works.`,warn:!1}}function pe(e){let t=e.default??`the default branch`,[n,i]=(0,m.useState)(null),a=(0,m.useRef)(null);return(0,m.useEffect)(()=>{if(n===null)return;let e=e=>{a.current?.contains(e.target)!==!0&&i(null)};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[n]),(0,g.jsx)(`div`,{className:`hm-list`,children:e.branches.map(o=>{let s=o.ahead>0?` · ${b(o.ahead,`commit`)} ahead of ${t}`:``;return(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`span`,{className:`hm-name`,title:`${o.name}${s}`,children:o.name}),(0,g.jsx)(`span`,{className:`hm-muted`,children:u(o.lastCommit,e.now)}),(0,g.jsx)(`span`,{className:`hm-flag hm-${o.state}`,children:ue(o.state,t)}),(0,g.jsx)(`span`,{className:`hm-pop`,children:ce(o.state)&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`button`,{type:`button`,className:`hm-del`,title:`Delete this branch`,onClick:e=>{e.stopPropagation(),i(n===o.name?null:o.name)},children:(0,g.jsx)(r,{size:14})}),n===o.name&&(0,g.jsx)(me,{branch:o,into:t,held:a})]})})]},o.name)})})}function me(e){let t=fe(e.branch.state,e.into),n=le(e.branch.name,e.branch.state);return(0,g.jsxs)(`div`,{className:`hm-popover`,ref:e.held,children:[(0,g.jsxs)(`p`,{children:[(0,g.jsx)(`span`,{className:t.warn?`hm-warn-text`:void 0,children:t.said}),` Deletes the local branch alone: a remote branch of the same name is not touched.`]}),(0,g.jsxs)(`div`,{className:`hm-cmd`,children:[(0,g.jsx)(`input`,{readOnly:!0,value:n,"aria-label":`The command that deletes this branch`,onClick:e=>e.currentTarget.select()}),(0,g.jsx)(`span`,{className:`hm-hint`,children:`click selects · copy with the keyboard`})]})]})}function w(e){let{title:t,note:n,state:r,said:i,loaderHeight:a=120}=e;return(0,g.jsxs)(`section`,{className:e.className===void 0?`hm-card`:`hm-card ${e.className}`,children:[t!==void 0&&(0,g.jsxs)(`h3`,{children:[t,r===`read`&&n!==void 0&&(0,g.jsx)(`small`,{children:n})]}),r===`loading`?(0,g.jsx)(`div`,{className:`hm-loader`,style:{height:`${a}px`}}):r===`failed`?(0,g.jsxs)(`p`,{className:`hm-notice`,children:[(0,g.jsx)(`span`,{children:i}),` `,(0,g.jsx)(`span`,{className:`hm-muted`,children:`Press Refresh to try again.`})]}):e.children]})}var he=``+new URL(`bee-B7t97l5B.webp`,import.meta.url).href,ge=``+new URL(`buzz-CUUsbnXH.mp3`,import.meta.url).href,_e=``+new URL(`pop-D5ZANBC3.mp3`,import.meta.url).href,T=[{said:`Simplicity is prerequisite for reliability.`,who:`Edsger W. Dijkstra`},{said:`A system's design mirrors the communication structure of the organization that built it.`,who:`Melvin Conway (Conway's law)`}],ve=640,E=[50,70],ye=6e3,D=[.15,.75],be=[95,125],xe=16,O=[14,32],k=[2.2,3.4],Se=.6,A=[ge,_e];function j(e,t){return e+Math.random()*(t-e)}function M(){return window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}function Ce(e){let t=(0,m.useRef)(null),n=(0,m.useRef)(null),[r,i]=(0,m.useState)(null),a=(0,m.useRef)(e.sound);a.current=e.sound;let o=(0,m.useRef)(0),s=(0,m.useRef)(!1),c=(0,m.useRef)({x:0,y:0,base:0,amplitude:0,period:3,t:0,direction:1,speed:110,tilt:0,away:j(E[0],E[1]),flying:!1}),l=(0,m.useCallback)(()=>{if(s.current)return;if(s.current=!0,i(o.current%T.length),o.current+=1,a.current)try{let e=new Audio(A[(o.current-1)%A.length]);e.volume=.7,e.play().catch(e=>{console.warn(`[home] the bee could not play its clip:`,e)})}catch(e){console.warn(`[home] the bee could not play its clip:`,e)}let e=t.current;e!==null&&(e.classList.remove(`hm-hop`),e.offsetWidth,e.classList.add(`hm-hop`)),setTimeout(()=>{s.current=!1,i(null)},ye)},[]);(0,m.useEffect)(()=>{let e=t.current;if(e===null)return;let r=()=>Math.round(110*Math.min(1,window.innerWidth/ve));if(M()){e.style.width=`${r()}px`,e.classList.add(`hm-parked`,`hm-here`);return}let i=0,a=0,o=performance.now(),l=()=>{let t=c.current;e.style.transform=`translate(${t.x}px, ${t.y}px) scaleX(${t.direction}) rotate(${t.direction*t.tilt}deg)`},u=t=>{let d=Math.min(.05,(t-o)/1e3);o=t;let f=c.current,p=r();if(p!==i&&(i=p,e.style.width=`${p}px`),f.flying){let t=s.current?xe:f.speed;f.t+=d,f.x+=f.direction*t*d;let n=f.t/f.period*2*Math.PI;f.y=f.base+Math.sin(n)*f.amplitude;let r=Math.cos(n)*f.amplitude*2*Math.PI/f.period;f.tilt=Math.atan2(r,t)*180/Math.PI*Se,(f.x<-p*1.5||f.x>window.innerWidth+p*.5)&&!s.current&&(f.flying=!1,f.away=j(E[0],E[1]),e.classList.remove(`hm-here`))}else{if(f.away-=d,f.away>0){a=requestAnimationFrame(u);return}f.direction=Math.random()<.5?1:-1,f.x=f.direction>0?-p:window.innerWidth,f.amplitude=j(O[0],O[1]);let t=window.innerHeight*D[0]+f.amplitude,n=window.innerHeight*D[1]-f.amplitude;f.base=n>t?j(t,n):(t+n)/2,f.y=f.base,f.tilt=0,f.period=j(k[0],k[1]),f.speed=j(be[0],be[1]),f.t=0,f.flying=!0,e.classList.add(`hm-here`)}l();let m=n.current;m!==null&&(m.style.left=`${Math.min(Math.max(8,c.current.x-110),window.innerWidth-300)}px`,m.style.top=`${Math.max(8,c.current.y-92)}px`),a=requestAnimationFrame(u)};return a=requestAnimationFrame(u),()=>cancelAnimationFrame(a)},[]);let u=r===null?null:T[r];return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`button`,{type:`button`,className:`hm-bee`,ref:t,"aria-label":`The bee`,title:`A quote`,onClick:l,children:(0,g.jsx)(`span`,{className:`hm-face`,children:(0,g.jsx)(`img`,{src:he,alt:``})})}),(0,g.jsx)(`div`,{className:u==null?`hm-bubble`:`hm-bubble hm-said`,ref:n,children:u!=null&&(0,g.jsxs)(g.Fragment,{children:[u.said,(0,g.jsxs)(`span`,{className:`hm-who`,children:[`- `,u.who]})]})})]})}var N=10,P=170,we=10,Te=128,F=12,I=60,L=500,R=2e3,z=`Its height follows the lines changed that day, added plus deleted, on a square-root scale so a huge day does not flatten the rest.`,B=`plant-height`,Ee=5,De=.7;function V(e){return e.added+e.deleted}function Oe(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0)%1e4/1e4}function ke(e,t){let n=Math.min(Math.max((t-L)/(R-L),0),1),r=Math.min(Math.max(n+(Oe(e)-.5)*De,0),1);return Math.round(r*(Ee-1))}function H(e){let[t=0,n=1,r=1]=e.split(`-`).map(Number);return Date.UTC(t,n-1,r)}function U(e,t){return Math.round((H(t)-H(e))/864e5)}function Ae(e,t,n){if(n<=0)return[0,0];let r=t-I,i=t+n+I,a=0;for(;a<e.length&&(e[a]??0)<r;)a+=1;let o=a;for(;o<e.length&&(e[o]??0)<=i;)o+=1;return[a,o]}function je(e,t){let n=[],r=``,i=``;for(let a=0;a<t;a+=1){let t=new Date(H(e)+a*864e5).toISOString().slice(0,10),o=F+a*N;t.slice(0,4)!==i&&(i=t.slice(0,4),n.push({x:o,said:i,year:!0})),t.slice(0,7)!==r&&(r=t.slice(0,7),n.push({x:o,said:C(t).split(` `)[1]??``,year:!1}))}return n}function Me(e){let{at:t,lines:n}=e,r=we+Math.sqrt(n)/e.tallest*Te,i=P-r,a=e.index%2==0?-3:3,o=P-r*.55;return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`path`,{className:`hm-stem`,d:`M${t},${P} q${a},${-r/2} 0,${-r}`}),(0,g.jsx)(`ellipse`,{className:`hm-leaf`,cx:t-4,cy:o,rx:4,ry:2,transform:`rotate(-25 ${t-4} ${o})`}),n>=L?(0,g.jsx)(`circle`,{className:`hm-flower hm-shade-${ke(e.date,n)}`,cx:t,cy:i,r:n>=R?5.5:3.5}):(0,g.jsx)(`circle`,{className:`hm-bud`,cx:t,cy:i,r:2})]})}function Ne(e){let{days:t,today:n}=e,r=o({className:`hm-infotip`,side:`top`}),i=(0,m.useRef)(null),a=(0,m.useRef)(null),s=(0,m.useRef)([]),c=(0,m.useRef)([0,0]),[l,u]=(0,m.useState)(!1),d=t[0]?.date??n,p=t[t.length-1]?.date??n,h=Math.max(1,U(d,p>n?p:n)+1),_=h*N+F*2,v=Math.sqrt(Math.max(1,...t.map(V))),y=(0,m.useMemo)(()=>t.filter(e=>V(e)>0).map(e=>({day:e,x:F+U(d,e.date)*N})),[t,d]),x=(0,m.useCallback)(()=>{let e=i.current,t=a.current;if(e===null||t===null)return;let n=t.querySelectorAll(`g.hm-plant`),[r,o]=Ae(s.current,e.scrollLeft,e.clientWidth),[l,d]=c.current;for(let e=l;e<d;e+=1)(e<r||e>=o)&&n[e]?.classList.remove(`hm-sway`);for(let e=r;e<o;e+=1)n[e]?.classList.add(`hm-sway`);c.current=[r,o],u(e.scrollLeft>4)},[]);return(0,m.useEffect)(()=>{let e=i.current;if(e===null)return;s.current=y.map(e=>e.x),c.current=[0,0],e.scrollLeft=e.scrollWidth,x();let t=new ResizeObserver(x);return t.observe(e),()=>t.disconnect()},[x,y]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:l?`hm-garden-wrap hm-more`:`hm-garden-wrap`,children:[l&&(0,g.jsxs)(`div`,{className:`hm-earlier`,children:[(0,g.jsx)(`i`,{children:`‹`}),` earlier`]}),(0,g.jsxs)(`div`,{className:`hm-scroll`,ref:i,onScroll:x,"data-testid":`garden-scroll`,children:[(0,g.jsx)(`svg`,{className:`hm-garden`,ref:a,width:_,height:P,role:`img`,"aria-label":`One plant for each day worked on since ${S(d)}`,children:y.map(({day:t,x:n},r)=>(0,g.jsx)(`g`,{className:`hm-plant`,"data-day":t.date,style:{transformOrigin:`${n}px ${P}px`,animationDelay:`${r%7*-.4}s`},...e.hover(`${S(t.date)} · ${ne(t.added,t.deleted)} · ${b(t.commits,`commit`)}`),children:(0,g.jsx)(Me,{at:n,index:r,date:t.date,lines:V(t),tallest:v})},t.date))}),(0,g.jsx)(`div`,{className:`hm-axis`,style:{width:`${_}px`},children:je(d,h).map(e=>(0,g.jsx)(`span`,{className:e.year?`hm-year`:void 0,style:{left:`${e.x}px`},children:e.said},`${e.said}-${e.x}`))})]})]}),(0,g.jsxs)(`div`,{className:`hm-legend`,children:[(0,g.jsxs)(`span`,{children:[(0,g.jsx)(`b`,{children:`Each plant is one day`}),(0,g.jsxs)(`button`,{type:`button`,className:`hm-info`,"aria-label":`What a plant's height means`,"aria-describedby":B,...r.anchor,children:[(0,g.jsx)(f,{size:13}),(0,g.jsx)(`span`,{className:`visually-hidden`,id:B,children:z}),r.says(z)]})]}),(0,g.jsxs)(`span`,{children:[(0,g.jsx)(`i`,{className:`hm-key hm-bud-key`}),`a bud: a day with a change`]}),(0,g.jsxs)(`span`,{children:[(0,g.jsx)(`i`,{className:`hm-key hm-flower-key`}),`a flower: a day of 500 lines or more`]}),(0,g.jsxs)(`span`,{children:[(0,g.jsx)(`i`,{className:`hm-key hm-big-key`}),`a big flower: a day of 2,000 or more`]})]})]})}function Pe(e){let{repository:t,onTop:n,readAt:r,now:i}=e,a=(0,g.jsx)(Fe,{readAt:r,now:i,onRefresh:e.onRefresh});return t===null?(0,g.jsxs)(`div`,{className:`hm-head`,children:[(0,g.jsx)(`span`,{className:`hm-bar hm-bar-name`}),(0,g.jsx)(`span`,{className:`hm-bar`}),(0,g.jsx)(`span`,{className:`hm-bar`}),a]}):(0,g.jsxs)(`div`,{className:`hm-head`,children:[(0,g.jsx)(`span`,{className:`hm-repo`,children:t.name}),(0,g.jsxs)(`span`,{children:[(0,g.jsx)(`span`,{className:t.changedFiles>0?`hm-dot hm-dirty`:`hm-dot`}),t.detached?`${t.branch}, detached`:t.branch,` ·`,` `,te(t.changedFiles)]}),t.commits>0&&(0,g.jsxs)(g.Fragment,{children:[n===null?(0,g.jsx)(`span`,{children:b(t.commits,`commit`)}):(0,g.jsxs)(`span`,{children:[b(n.count,`commit`),` on top of `,n.base,` · `,y(t.commits),` `,`in total`]}),t.firstCommit!==null&&(0,g.jsxs)(`span`,{children:[`since `,S(t.firstCommit),t.shallow&&(0,g.jsx)(`span`,{className:`hm-muted`,children:` (shallow)`})]}),t.lastCommit!==null&&(0,g.jsxs)(`span`,{children:[`last commit `,u(t.lastCommit,i)]})]}),a]})}function Fe(e){return(0,g.jsxs)(`span`,{className:`hm-read`,children:[e.readAt!==null&&(0,g.jsxs)(`span`,{children:[`read `,u(e.readAt.toISOString(),e.now)]}),(0,g.jsxs)(`button`,{type:`button`,onClick:e.onRefresh,title:`Read the repository again`,children:[(0,g.jsx)(t,{size:13}),`Refresh`]})]})}var Ie=s();function Le(){let e=(0,m.useRef)(null),t=(0,m.useRef)(``);return{hover:(0,m.useCallback)(n=>({onMouseMove(r){t.current=n;let i=e.current;if(i===null)return;i.textContent=n;let a=l({left:r.clientX,top:r.clientY,width:0,height:0},{width:i.offsetWidth,height:i.offsetHeight},{width:window.innerWidth,height:window.innerHeight},`top`);i.style.left=`${a.left}px`,i.style.top=`${a.top}px`,i.classList.add(`hm-tip-on`)},onMouseLeave(){t.current===n&&(t.current=``,e.current?.classList.remove(`hm-tip-on`))}}),[]),node:(0,Ie.createPortal)((0,g.jsx)(`div`,{className:`tip hm-tip`,"aria-hidden":`true`,ref:e}),document.body)}}var W=`none`,G=`-`;function Re(e){let{facts:t,now:n}=e,r=t.longestStreak;return(0,g.jsx)(`div`,{className:`hm-list`,children:[[`First commit`,t.firstCommit===null?W:e.shallow?`${S(t.firstCommit)} (shallow)`:S(t.firstCommit),t.firstCommit===null?G:u(t.firstCommit,n)],[`Commits`,y(e.commits),`${t.commitsPerDay} a day`],[`Longest streak`,r===null?W:b(r.days,`day`),r===null?G:ee(r.from,r.to)],[`Biggest day`,t.biggestDay===null?W:S(t.biggestDay.date),t.biggestDay===null?G:b(t.biggestDay.commits,`commit`)],[`Last tag`,t.lastTag===null?W:t.lastTag.name,t.lastTag===null?G:u(t.lastTag.date,n)],[`Stashes`,y(t.stashes),G]].map(([e,t,n])=>(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`span`,{children:e}),(0,g.jsx)(`span`,{className:`hm-muted`,children:t}),(0,g.jsx)(`span`,{className:`hm-muted`,children:n})]},e))})}var K=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],ze=[`0`,`6`,`12`,`18`,`23`];function q(e){let t=Math.max(...e.counts);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`div`,{className:e.wide===!0?`hm-bars hm-bars-wide`:`hm-bars`,children:e.counts.map((n,r)=>(0,g.jsx)(`i`,{className:n===t&&t>0?`hm-tall`:void 0,style:{height:t>0?`${n/t*100}%`:`0%`},...e.hover(e.said(r,n))},r))}),(0,g.jsx)(`div`,{className:`hm-axis-x`,children:e.marks.map(e=>(0,g.jsx)(`span`,{children:e},e))})]})}function Be(e){return(0,g.jsx)(q,{counts:e.counts,marks:ze,hover:e.hover,said:(e,t)=>`${String(e).padStart(2,`0`)}:00 - ${b(t,`commit`)}`})}function Ve(e){return(0,g.jsx)(q,{counts:e.counts,marks:K,wide:!0,hover:e.hover,said:(e,t)=>`${K[e]} - ${b(t,`commit`)}`})}var J=c(`home`);J.receive;var He=J.credentialsReady,Ue=J.onSession;J.openOutside;var We=J.sayWaiting,Ge=J.listen,Ke=1e4,Y=[`#3987e5`,`#8b949e`,`#c98500`,`#199e70`,`#d95926`,`#d55181`,`#4f74d6`];function qe(e,t){if(e===null)return{size:`ignored files not counted yet`,when:``};let n=a(e.bytes),r=e.largest.map(e=>e.path).join(`, `),i=r===``?``:` (${r})`,o=e.atLeast?`the count hit its ${Ke/1e3} s limit · `:``;return{size:`${e.atLeast?`at least ${n}`:n} ignored${i}`,when:`${o}counted ${u(e.countedAt,t)}`}}function Je(e){let t=qe(e.ignored,e.now);return(0,g.jsxs)(`div`,{children:[e.kinds.map((e,t)=>(0,g.jsx)(_,{name:e.kind,width:e.share,colour:Y[t%Y.length]??``,value:`${e.share}%`},e.kind)),(0,g.jsxs)(`div`,{className:`hm-sub`,children:[b(e.tracked.files,`tracked file`),` · `,y(e.tracked.lines),` lines ·`,` `,a(e.tracked.bytes),` tracked · `,(0,g.jsx)(`b`,{children:t.size}),t.when!==``&&` · ${t.when}`]})]})}var X=d({prefix:`home`,label:`Home`,credentialsReady:He});function Ye(){return X.ask(`history`)}function Xe(){return X.ask(`branches`)}function Ze(){return X.ask(`tree`)}var Z={status:`waiting`};function Qe(e){let t=e instanceof Error?e.message:String(e);return t===``?`the Home tool could not read the repository`:t}function $e(){let[e,t]=(0,m.useState)(Z),[n,r]=(0,m.useState)(Z),[i,a]=(0,m.useState)(Z),[o,s]=(0,m.useState)(null),c=(0,m.useRef)(0),l=(0,m.useRef)(!0);return(0,m.useEffect)(()=>(l.current=!0,()=>{l.current=!1}),[]),{history:e,branches:n,tree:i,readAt:o,read:(0,m.useCallback)(()=>{c.current+=1;let e=c.current,n=()=>l.current&&c.current===e;s(new Date);let i=(e,t)=>{t(Z),e().then(e=>{n()&&t({status:`read`,answer:e})},e=>{n()&&t({status:`failed`,said:Qe(e)})})};i(Ye,t),i(Xe,r),i(Ze,a)},[])}}function et(e){let t=(0,m.useRef)(e);t.current=e,(0,m.useEffect)(()=>{let e=!1,n=new ResizeObserver(n=>{let r=(n[n.length-1]?.contentRect.width??0)>0;r&&!e&&t.current(),e=r});return n.observe(document.documentElement),()=>n.disconnect()},[])}function tt(e){return e===1?`active day`:`active days`}var nt=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`];function rt(e){return{year:e.getFullYear(),month:e.getMonth(),date:e.getDate()}}function it(e,t,n){let r=new Date(e,t,n),i=String(r.getMonth()+1).padStart(2,`0`),a=String(r.getDate()).padStart(2,`0`);return`${r.getFullYear()}-${i}-${a}`}function Q(e,t,n,r){let i=[];for(let a=0;a<r;a++)i.push(it(e,t,n+a));return i}function at(e){return(e.getDay()+6)%7+1}function ot(e,t){return new Date(e,t+1,0).getDate()}function $(e,t){return t.filter(t=>(e.get(t)?.commits??0)>0).length}function st(e,t){let n=0,r=0;for(let i of t){let t=e.get(i);t!==void 0&&(n+=t.added,r+=t.deleted)}return{added:n,deleted:r}}function ct(e,t,n){if(t===0)return e===0?{said:`none on ${n} either`,up:!1}:{said:`none on ${n}`,up:!0};let r=Math.round((e-t)/t*100);return{said:`${r>=0?`+`:``}${r}% on ${n}`,up:r>0}}function lt(e,t){let n=new Map(e.map(e=>[e.date,e])),r=rt(t),i=Q(r.year,r.month,1,r.date),a=r.month===0?{year:r.year-1,month:11}:{year:r.year,month:r.month-1},o=Q(a.year,a.month,1,Math.min(r.date,ot(a.year,a.month))),s=at(t),c=Q(r.year,r.month,r.date-s+1,s),l=Q(r.year,r.month,r.date-s-6,s),u=st(n,c);return{month:{planted:$(n,i),name:nt[r.month]??``,against:ct($(n,i),$(n,o),`the same days of ${nt[a.month]??``}`)},week:{planted:$(n,c),against:ct($(n,c),$(n,l),`the same days last week`)},lines:{added:u.added,deleted:u.deleted,perDay:Math.round((u.added+u.deleted)/s)}}}function ut(e){let t=lt(e.days,e.now);return(0,g.jsxs)(`div`,{className:`hm-tiles`,children:[(0,g.jsxs)(`div`,{className:`hm-card hm-tile`,children:[(0,g.jsxs)(`div`,{className:`hm-big`,children:[y(t.month.planted),` `,(0,g.jsxs)(`span`,{className:`hm-span`,children:[tt(t.month.planted),` in `,t.month.name]})]}),(0,g.jsx)(`div`,{className:`hm-sub`,children:(0,g.jsx)(dt,{...t.month.against})})]}),(0,g.jsxs)(`div`,{className:`hm-card hm-tile`,children:[(0,g.jsxs)(`div`,{className:`hm-big`,children:[y(t.week.planted),` `,(0,g.jsxs)(`span`,{className:`hm-span`,children:[tt(t.week.planted),` since Monday`]})]}),(0,g.jsx)(`div`,{className:`hm-sub`,children:(0,g.jsx)(dt,{...t.week.against})})]}),(0,g.jsxs)(`div`,{className:`hm-card hm-tile`,children:[(0,g.jsxs)(`div`,{className:`hm-big hm-lines`,children:[(0,g.jsxs)(`span`,{className:`hm-added`,children:[`+`,y(t.lines.added)]}),(0,g.jsx)(`span`,{className:`hm-slash`,children:` / `}),(0,g.jsxs)(`span`,{className:`hm-deleted`,children:[`-`,y(t.lines.deleted)]})]}),(0,g.jsxs)(`div`,{className:`hm-sub`,children:[`lines since Monday · `,y(t.lines.perDay),` a day on average`]})]})]})}function dt(e){return(0,g.jsx)(`span`,{className:e.up?`hm-up`:void 0,children:e.said})}function ft(e){if(e===null||e.default===null)return null;let t=e.branches.find(e=>e.current);return t===void 0||t.name===e.default?null:{count:t.ahead,base:e.default}}function pt(){let e=$e(),n=p(!0),r=Le(),[i,a]=(0,m.useState)(!0);(0,m.useEffect)(()=>Ue(e=>a(e.sound)),[]);let o=M();et(e.read),(0,m.useEffect)(()=>{We(0,!0)},[]);let s=e.history,c=s.status===`read`?s.answer:null,l=c===null?null:c.repository;if(c!==null&&c.repository===null)return(0,g.jsx)(`div`,{className:`hm-page`,children:(0,g.jsx)(`div`,{className:`hm-column`,children:(0,g.jsx)(`p`,{className:`hm-plain`,children:`This workspace holds no git repository, so there is no pulse to show.`})})});let u=l===null?`loading`:`read`,d=e.branches,f=e.tree,h=e=>e.status===`read`?`read`:e.status===`failed`?`failed`:`loading`,_=e=>e.status===`failed`?e.said:void 0,v=d.status===`read`&&d.answer.repository!==null?d.answer:null,y=f.status===`read`&&f.answer.repository!==null?f.answer:null,b=c!==null&&c.repository!==null?c:null,x=l!==null&&l.commits===0,S=(0,g.jsx)(w,{title:`Branches`,note:v===null?void 0:de(v.branches),state:h(d),said:_(d),loaderHeight:130,children:v!==null&&(0,g.jsx)(pe,{branches:v.branches,default:v.default,now:n})}),C=(0,g.jsx)(w,{title:`The tree`,note:`what the workspace is made of`,state:h(f),said:_(f),loaderHeight:130,children:y!==null&&(0,g.jsx)(Je,{kinds:y.kinds,tracked:y.tracked,ignored:y.ignored,now:n})});return s.status===`failed`?(0,g.jsxs)(`div`,{className:o?`hm-page hm-still`:`hm-page`,children:[(0,g.jsxs)(`div`,{className:`hm-column`,children:[(0,g.jsxs)(`div`,{className:`hm-failed`,children:[(0,g.jsx)(`span`,{children:s.said}),` `,(0,g.jsx)(`span`,{className:`hm-muted`,children:`Press Refresh to try again.`}),(0,g.jsx)(`span`,{className:`hm-read`,children:(0,g.jsxs)(`button`,{type:`button`,onClick:e.read,title:`Read the repository again`,children:[(0,g.jsx)(t,{size:13}),`Refresh`]})})]}),(0,g.jsxs)(`div`,{className:`hm-grid`,children:[S,C]})]}),r.node,(0,g.jsx)(Ce,{sound:i})]}):(0,g.jsxs)(`div`,{className:o?`hm-page hm-still`:`hm-page`,children:[(0,g.jsxs)(`div`,{className:`hm-column`,children:[(0,g.jsx)(Pe,{repository:l,onTop:ft(v),readAt:e.readAt,now:n,onRefresh:e.read}),x?(0,g.jsx)(`p`,{className:`hm-plain`,children:`This repository has no commit yet. The page fills in as the work starts.`}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(w,{state:u,loaderHeight:192,className:`hm-garden-card`,children:[b!==null&&(0,g.jsx)(Ne,{days:b.days,today:b.readAt.slice(0,10),hover:r.hover}),b?.repository.cut===!0&&(0,g.jsx)(`p`,{className:`hm-cut`,children:`The full history was too large to walk, so this garden is the last two years alone.`})]}),b===null?(0,g.jsxs)(`div`,{className:`hm-tiles`,children:[(0,g.jsx)(`div`,{className:`hm-card hm-tile`,children:(0,g.jsx)(`div`,{className:`hm-loader`,style:{height:`46px`}})}),(0,g.jsx)(`div`,{className:`hm-card hm-tile`,children:(0,g.jsx)(`div`,{className:`hm-loader`,style:{height:`46px`}})}),(0,g.jsx)(`div`,{className:`hm-card hm-tile`,children:(0,g.jsx)(`div`,{className:`hm-loader`,style:{height:`46px`}})})]}):(0,g.jsx)(ut,{days:b.days,now:n}),(0,g.jsxs)(`div`,{className:`hm-grid`,children:[(0,g.jsx)(w,{title:`Rhythm`,note:`commits by hour, author time`,state:u,loaderHeight:84,children:b!==null&&(0,g.jsx)(Be,{counts:b.hours,hover:r.hover})}),(0,g.jsx)(w,{title:`Rhythm`,note:`commits by weekday`,state:u,loaderHeight:84,children:b!==null&&(0,g.jsx)(Ve,{counts:b.weekdays,hover:r.hover})})]}),(0,g.jsxs)(`div`,{className:`hm-grid`,children:[S,(0,g.jsx)(w,{title:`Where the work goes`,note:`lines changed in the last 30 days, against the 30 before`,state:u,loaderHeight:130,children:b!==null&&(0,g.jsx)(ae,{areas:b.areas})})]}),(0,g.jsxs)(`div`,{className:`hm-grid`,children:[C,(0,g.jsx)(w,{title:`Milestones`,state:u,loaderHeight:130,children:b!==null&&(0,g.jsx)(Re,{facts:b.milestones,commits:b.repository.commits,now:n,shallow:b.repository.shallow})})]})]})]}),r.node,(0,g.jsx)(Ce,{sound:i})]})}Ge();var mt=document.getElementById(`root`);mt&&(0,h.createRoot)(mt).render((0,g.jsx)(m.StrictMode,{children:(0,g.jsx)(pt,{})}));
|