whose-turn 1.0.0-alpha.3 → 1.0.0-alpha.5

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/README.md +34 -27
  3. package/config.example.json +0 -16
  4. package/connectors/index.mjs +1 -2
  5. package/dist/assets/_plugin-vue_export-helper-CeaKqebY.js +18 -0
  6. package/dist/assets/_plugin-vue_export-helper-aQHODzfZ.css +1 -0
  7. package/dist/assets/bem-HybmjowO.js +1 -0
  8. package/dist/assets/index-D_knX0Z-.js +3 -0
  9. package/dist/assets/index-q5Rj03LQ.css +1 -0
  10. package/dist/assets/report-B58sXh8K.js +1 -0
  11. package/dist/assets/report-D7II0AfP.css +1 -0
  12. package/dist/assets/scheme-CRAXq4Co.js +1 -0
  13. package/dist/assets/{sheet-CBYGM-FG.js → sheet-BYuZfjzp.js} +1 -1
  14. package/dist/index.html +6 -6
  15. package/dist/report.html +5 -5
  16. package/dist/sheet.html +4 -4
  17. package/install.sh +18 -6
  18. package/launch.sh +11 -0
  19. package/lib/api.mjs +18 -4
  20. package/lib/config.mjs +49 -23
  21. package/lib/default-table.mjs +3 -3
  22. package/lib/facts.mjs +1 -1
  23. package/lib/feedback.mjs +0 -1
  24. package/lib/handoff.mjs +1 -1
  25. package/lib/palette.mjs +2 -3
  26. package/lib/rules.mjs +12 -9
  27. package/lib/secrets.mjs +3 -2
  28. package/lib/static.mjs +6 -2
  29. package/lib/table.mjs +18 -0
  30. package/lib/update.mjs +5 -5
  31. package/lib/workspace.mjs +23 -8
  32. package/package.json +2 -1
  33. package/connectors/demo.mjs +0 -146
  34. package/dist/assets/_plugin-vue_export-helper-BKveAJb2.css +0 -1
  35. package/dist/assets/_plugin-vue_export-helper-DHr5RHTx.js +0 -18
  36. package/dist/assets/bem-COKTjsky.js +0 -1
  37. package/dist/assets/index-CuyWocyb.js +0 -3
  38. package/dist/assets/index-p8D7awn0.css +0 -1
  39. package/dist/assets/report-BtGnm9ax.js +0 -1
  40. package/dist/assets/report-xVOo7qip.css +0 -1
  41. package/dist/assets/scheme-DJ3WNw60.js +0 -1
@@ -1,3 +0,0 @@
1
- import{w as X,t as Ye,r as Le,s as Jt,c as g,d as U,o as r,a as i,F as V,b as N,e as K,u as p,n as W,f as o,g as h,h as C,i as D,_ as j,j as F,k as O,l as q,m as Ue,p as mt,q as Ne,v as te,x as Zt,y as He,z as je,A as Xe,B as Qt,C as kt,D as es,E as ts,G as ss,H as ns}from"./_plugin-vue_export-helper-DHr5RHTx.js";import{s as os,m as yt,u as gt,a as bt,r as wt,p as as,b as ls,i as ot,l as $t,c as rs,M as G,d as be,e as ke,f as is,g as Ke,h as Me,j as cs,k as Ae,n as ds,o as us,q as ps,t as _s,v as at,w as hs}from"./scheme-DJ3WNw60.js";import{g as he,r as fs,a as vs,e as ms,w as xt,p as oe,b as le,T as Pe,S as $e,c as ae,h as ks,s as Ge,m as fe,d as ys,f as Ct,i as Je,j as gs,k as Ze,l as bs,y as ws,n as $s,o as xs,q as St}from"./bem-COKTjsky.js";const pe=os(wt),lt=(e,t)=>{const s=G,a=new Float32Array(s*s);for(let l=0;l<a.length;l+=1)a[l]=e[l]===t?1e6:0;const n=(l,c,u)=>{a[c]+u<a[l]&&(a[l]=a[c]+u)};for(let l=0;l<s;l+=1)for(let c=0;c<s;c+=1){const u=l*s+c;c>0&&n(u,u-1,1),l>0&&n(u,u-s,1),c>0&&l>0&&n(u,u-s-1,Math.SQRT2),c<s-1&&l>0&&n(u,u-s+1,Math.SQRT2)}for(let l=s-1;l>=0;l-=1)for(let c=s-1;c>=0;c-=1){const u=l*s+c;c<s-1&&n(u,u+1,1),l<s-1&&n(u,u+s,1),c<s-1&&l<s-1&&n(u,u+s+1,Math.SQRT2),c>0&&l<s-1&&n(u,u+s-1,Math.SQRT2)}return a},Ie=e=>{const t=String(e||"").trim(),s=/^#([0-9a-f]{6})$/i.exec(t);if(s)return[0,2,4].map(n=>parseInt(s[1].slice(n,n+2),16));const a=t.match(/[\d.]+/g);return a&&a.length>=3?a.slice(0,3).map(Number):null},Cs=e=>{const t=getComputedStyle(e),s=Ie(t.getPropertyValue("--md-primary"))||[44,86,151],a=Ie(t.getPropertyValue("--md-on-primary-container"))||s;return{core:ot()?s:s.map((n,l)=>$t(n,a[l],.35)),rim:Ie(t.getPropertyValue("--blob-3"))||[23,223,220],strength:ot()?.9:1}},Ss=(e,t,s)=>({size:e.range(.85,1.05)*Math.min(t,s),right:e.chance(.4),bottom:e.chance(.7),overflowX:e.range(-.02,.06),overflowY:e.range(-.02,.04)}),Ts=e=>{const t={minX:G,maxX:0,minY:G,maxY:0};for(let a=0;a<e.length;a+=1)if(e[a]){const n=a%G,l=Math.floor(a/G);t.minX=Math.min(t.minX,n),t.maxX=Math.max(t.maxX,n),t.minY=Math.min(t.minY,l),t.maxY=Math.max(t.maxY,l)}const s=a=>(a-G/2)/be;return{minX:s(t.minX),maxX:s(t.maxX),minY:s(t.minY),maxY:s(t.maxY)}},Ms=(e,t,s,a)=>{const n=t.maxX-t.minX,l=t.maxY-t.minY,c=Math.min(e.size,2*s*.95/n,2*a*.98/l),u=c/2,v=-e.overflowX*c,_=-e.overflowY*c;return{size:c,centerX:e.right?s-v-t.maxX*u:v-t.minX*u,centerY:e.bottom?a-_-t.maxY*u:_-t.minY*u}},As=(e,t,s)=>"rgba("+e.core.map((n,l)=>Math.round($t(n,e.rim[l],t))).join(",")+","+s.toFixed(3)+")",Rs=(e,t,s)=>{const a=[],n=t.size/62,l=t.size/2/be,c=t.size*is/4,u=n*.866;for(let v=0,_=t.centerY-c;_<t.centerY+c;v+=1,_+=u)for(let y=t.centerX-c+v%2*n/2;y<t.centerX+c;y+=n){const A=y+e.range(-.3,.3)*n,E=_+e.range(-.3,.3)*n,R=Math.floor((A-t.centerX)/l+G/2),S=Math.floor((E-t.centerY)/l+G/2);if(R<0||S<0||R>=G||S>=G)continue;const d=S*G+R,k=e.next(),f=e.range(.75,1.25),B=e.range(-.15,.15);if(s.inside[d]){const z=s.depth[d]/be,L=ke(z/.035),J=ke(z/.3);if(k>.5+.5*L)continue;a.push({x:A,y:E,radius:n*.5*(.45+.55*L)*(.95+.3*J)*f,alpha:.5+.25*L+.25*J,tint:ke(.65-.65*J+B)})}else{const z=s.gap[d]/be;if(k>.14*Math.exp(-z/.05)+.004)continue;a.push({x:A,y:E,radius:n*e.range(.1,.24),alpha:.35,tint:ke(.8+B)})}}return a},Es=()=>document.getElementById("wt"),Os=()=>document.getElementById("backdrop"),Tt=()=>Math.floor(Math.random()*4294967296),ye={},I={workspace:"",seed:Tt(),species:"",wantedSpecies:"",wantedPose:"",built:null},Ds=(e,t)=>{const s=rs(I.seed),a=pe[Math.floor(s.next()*pe.length)];I.species=pe.includes(I.wantedSpecies)?I.wantedSpecies:a;const n=Ss(s,e,t),l={facing:n.right?-1:1,tilt:s.range(-.07,.07),stretchX:s.range(.92,1.08),stretchY:s.range(.92,1.08)};s.chance(.25)&&(l.facing=-l.facing);const c=as(ls(wt,I.species,s,{pose:I.wantedPose}).shapes,l),u={inside:c,depth:lt(c,1),gap:lt(c,0)},v=Ms(n,Ts(c),e,t);return{key:I.seed+":"+I.species+":"+e+"x"+t,dots:Rs(s,v,u)}},xe=()=>{const e=Os();if(!e)return;const t=e.clientWidth,s=e.clientHeight,a=window.devicePixelRatio||1,n=Math.round(t*a),l=Math.round(s*a);(e.width!==n||e.height!==l)&&(e.width=n,e.height=l);const c=e.getContext("2d");if(!c||(c.setTransform(a,0,0,a,0,0),c.clearRect(0,0,t,s),!t||!s))return;const u=I.seed+":"+(I.wantedSpecies||"?")+":"+t+"x"+s;(!I.built||I.built.key.split(":")[0]!==String(I.seed)||!I.built.key.endsWith(t+"x"+s)||I.wantedSpecies&&I.species!==I.wantedSpecies)&&(I.built=Ds(t,s));const v=Es();if(!v)return u;const _=Cs(v);return I.built.dots.forEach(y=>{c.fillStyle=As(_,y.tint,y.alpha*_.strength),c.beginPath(),c.arc(y.x,y.y,y.radius,0,Math.PI*2),c.fill()}),u};window.whoseTurnBackdrop={species:pe.slice(),seeded:yt,get current(){return{workspace:I.workspace,species:I.species,seed:I.seed}},show:e=>{const t=e||{},s=String(t.workspace||"");ye[s]||(ye[s]=Tt());const a=t.seed!==void 0?Number(t.seed)>>>0:ye[s];ye[s]=a;const n=t.species&&pe.includes(t.species)?t.species:"",l=String(t.pose||"");return s===I.workspace&&a===I.seed&&n===I.wantedSpecies&&l===I.wantedPose&&I.built||(I.workspace=s,I.seed=a,I.wantedSpecies=n,I.wantedPose=l,I.built=null,xe()),window.whoseTurnBackdrop.current},repaint:xe};X(Ke,xe);gt(window,"resize",bt(xe,200));const{show:Mt,repaint:Is,seeded:Yr}=window.whoseTurnBackdrop,Bs=()=>{window.tippy&&window.tippy.delegate(document.body,{target:"[data-tip]",content:e=>e.dataset.tip||"",trigger:"mouseenter focus click",delay:[0,80],duration:[120,80],interactive:!0,maxWidth:440,placement:"top",theme:"wt",appendTo:()=>document.body})},Vs=()=>{let e=0;return{next:()=>++e,accepts:t=>t===e}},rt=e=>{const t=structuredClone(Ye(e)),s=t.connectors||{},a=t.rules||{};return a.statuses=a.statuses||{},{...t,connectors:Array.isArray(s)?s:Object.entries(s).map(([n,l])=>({type:n,...l})),rules:a,theme:t.theme||{}}},Ws=e=>{const t=structuredClone(Ye(e));return t.theme&&!Object.keys(t.theme).length&&delete t.theme,t.rules&&!Object.keys(t.rules.statuses||{}).length&&delete t.rules.statuses,t.rules&&!Object.keys(t.rules).length&&delete t.rules,t},it=new WeakMap;let Us=0;const ct=e=>{const t=Ye(e);let s=it.get(t);return s||(s=++Us,it.set(t,s)),s},dt=e=>JSON.stringify(e),Ns=(e,t)=>{const s=[];return e.forEach(a=>a.connectors.forEach(n=>{const l=t.get(n)||{};Object.keys(l).forEach(c=>{l[c]&&s.push({ws:a.id,connector:n.id||n.type,key:c,value:l[c]})})})),s},re=(e,t,s)=>{typeof s=="boolean"||s&&s.length?e[t]=s:delete e[t]},js=(e,t)=>{const s=a=>{const n=t.indexOf(a.id);return n<0?t.length:n};return[...e].sort((a,n)=>s(a)-s(n))},Ps=(e,t,s,a)=>{const n=e.filter(l=>l!==t);return n.splice(n.indexOf(s)+(a?0:1),0,t),n},Fs={gt:">",gte:"≥",lt:"<",lte:"≤",prefix:"starts with"},zs=(e,t)=>`${e} is ${t?"present":"absent"}`,qs=(e,t)=>Array.isArray(t)?`${e} in ${t.join(", ")}`:t&&typeof t=="object"?Object.entries(t).map(([s,a])=>s==="present"?zs(e,a):`${e} ${Fs[s]} ${JSON.stringify(a)}`).join(" and "):`${e} = ${t}`,Ys=e=>({when:Object.entries(e.when).map(([t,s])=>qs(t,s)).join(" and ")||"anything else",then:e.then.whose==="hidden"?"hidden":`${e.then.whose}: ${e.then.next}`}),Ls=e=>e.modal?"modal":e.settings?"settings":e.feedback?"feedback":null,Hs=(e,t)=>{const s=new URLSearchParams(e).get("mode");return s==="app"||s==="tab"?s:t==="app"?"app":"tab"},Xs=e=>"/?mode=tab"+(e?"&ws="+encodeURIComponent(e):""),Ks=e=>({width:e.outerWidth,height:e.outerHeight}),At={writeDefaults:!1},Rt=Me("wt-ws","",At),Et=cs("wt-mode","",At),m=Jt({workspaces:[],workspace:{id:"",name:"",connectors:[],links:[],key_pattern:"",theme:null},turn:[],feed:[],marks:{seen:[],base:0,handled:{}},counts:{mine:0,others:0,failing:0,done:0},todos:[],errors:{},health:{ok:!0,stale:!1,fresh_at:"",failing:[],alerts:[]},problems:[],polled_at:"",update:{current:"",latest:"",available:!1,state:"idle"}}),b=Le({ws:new URLSearchParams(location.search).get("ws")||Rt.value,open:new Set,mode:Hs(location.search,Et.value),live:!1,reconnects:0,status:"Connecting…",modal:null,feedback:!1,settings:!1,settingsDirty:!1,settingsAsk:!1,settingsAt:""});Et.value=b.mode;const Ce=Ae("",6e3),se=(e,t)=>{const s=le(e,t);return s&&(Ce.value=s),!s},Gs=()=>{b.mode==="app"&&gt(window,"resize",bt(()=>oe("/api/window",Ks(window)).catch(se),600))},Ot={resume:()=>{}},ce=us({scheduler:e=>{const t=ps(e,3e4,{immediate:!1});return Ot.resume=t.resume,t}}),ut=g(()=>{const e=m.workspace.theme;return e&&e.light&&e.dark?e[Ke.value?"dark":"light"]:{}}),H=g(()=>m.counts),pt=g(()=>[...m.problems||[],...m.health.alerts.map(e=>e.text),...Object.entries(m.errors||{}).map(([e,t])=>e+": "+t)]),Js=(e="")=>{b.settingsAt=e,b.settings=!0},Dt=g(()=>Ls(b)),Zs=()=>{const e=Dt.value;if(e==="modal"&&(b.modal=null),e==="feedback"&&(b.feedback=!1),e==="settings"){if(b.settingsDirty){b.settingsAsk=!0;return}b.settings=!1}},Fe=new Map,Qs=(e,t)=>{t&&Fe.set(e,document.activeElement)},en=(e,t)=>{if(t)return;const s=Fe.get(e);Fe.delete(e),s instanceof HTMLElement&&s.focus()},tn={modal:()=>!!b.modal,settings:()=>b.settings,feedback:()=>b.feedback};Object.entries(tn).forEach(([e,t])=>{X(t,s=>Qs(e,s),{flush:"sync"}),X(t,s=>en(e,s),{flush:"post"})});let Se=-1,ze=0;const _t=Vs(),ve=(e=b.ws)=>{const t=_t.next();return he("/api/state"+(e?"?ws="+encodeURIComponent(e):"")).then(s=>_t.accepts(t)?s.error?fs(s.error)!=="NO_SUCH_WORKSPACE"||!vs(e)?(b.status=ms(s.error,"Could not load"),m):ve(""):(Object.assign(m,s),b.ws=m.workspace.id,b.status="",Mt({workspace:m.workspace.id}),document.title="Whose Turn · "+m.workspace.name,m):m)},It=()=>(Se=-1,ve()),_e=ds("/api/stream",[],{immediate:!1,autoConnect:!1,autoReconnect:!0,serializer:{read:e=>JSON.parse(e||"null")}});X(_e.status,e=>{b.live=e==="OPEN",b.live&&(b.status="",b.reconnects++)},{flush:"sync"});X(_e.error,e=>{e&&(b.status="Disconnected from the local server, retrying…")},{flush:"sync"});X(_e.data,e=>{if(e){if("update"in e){m.update=e.update;return}typeof e.open_moves=="number"&&(m.workspaces=xt(m.workspaces,e.ws,e.open_moves)),!(m.workspace.id&&e.ws!==m.workspace.id)&&(b.status="",e.version!==Se?(Se=e.version,ze===0&&ve()):m.polled_at=e.polled_at)}},{flush:"sync"});const sn=()=>{_e.eventSource.value||_e.open()},nn=()=>(Ot.resume(),ve().then(sn)),Bt=e=>e===m.workspace.id?Promise.resolve():(Se=-1,ze++,ve(e).then(()=>{b.ws===e&&(Rt.value=b.ws,b.open.clear())},()=>{Ce.value=$e+"; staying on "+m.workspace.name+"."}).finally(()=>{ze--})),Vt=(e,t)=>oe(e,{ws:m.workspace.id,...t}),qe=e=>Vt("/api/marks",e).then(t=>{const s=le(t);return s||(Object.assign(m,{marks:t.marks,turn:t.turn,counts:t.counts}),m.workspaces=xt(m.workspaces,m.workspace.id,t.counts.mine)),s},t=>le(t)),on=e=>Vt("/api/todos",e).then(t=>{const s=le(t,{unreachable:Pe});return!s&&Array.isArray(t)&&(m.todos=t),s},t=>le(t,{unreachable:Pe})),an=e=>he("/api/config").then(t=>oe("/api/config",{workspaces:js(t.workspaces,e),secrets:[]})).then(t=>{se(t,{refused:"The order was not saved"})&&It()},t=>se(t,{refused:"The order was not saved"})),Be={id:"demo",name:"Demo",key_pattern:"\\bNW-\\d+\\b",theme:{seed:"#3d7a5c",accent:"#c27a2c"},connectors:[{type:"demo",scenario:"northwind",label:"Demo tracker"}]},ln=()=>he("/api/config").then(e=>e.workspaces.some(t=>t.id===Be.id)?null:oe("/api/config",{workspaces:[...e.workspaces,Be],secrets:[]})).then(e=>{if(se(e,{refused:"The demo workspace was not added"}))return Bt(Be.id)},e=>se(e,{refused:"The demo workspace was not added"})),ht=()=>{b.status="Checking now…",oe("/api/refresh").catch(e=>{b.status="",se(e)}),Mt({workspace:m.workspace.id,seed:Math.floor(Math.random()*4294967296)})},rn="M12 2.5l1.9 5.6 5.6 1.9-5.6 1.9L12 17.5l-1.9-5.6L4.5 10l5.6-1.9L12 2.5zM5 15l.9 2.6 2.6.9-2.6.9L5 22l-.9-2.6-2.6-.9 2.6-.9L5 15zm14-2l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7.7-2z",cn="M19.4 13a7.6 7.6 0 0 0 0-2l2-1.5-2-3.4-2.4 1a7.5 7.5 0 0 0-1.7-1L15 3.5H9l-.3 2.6a7.5 7.5 0 0 0-1.7 1l-2.4-1-2 3.4 2 1.5a7.6 7.6 0 0 0 0 2l-2 1.5 2 3.4 2.4-1a7.5 7.5 0 0 0 1.7 1l.3 2.6h6l.3-2.6a7.5 7.5 0 0 0 1.7-1l2.4 1 2-3.4-2-1.5zM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7z",dn="M19 8h-1.8a5.9 5.9 0 0 0-1.3-1.9l1.6-1.6-1.4-1.4-1.9 1.9A5.7 5.7 0 0 0 12 4.5a5.7 5.7 0 0 0-2.2.5L7.9 3.1 6.5 4.5l1.6 1.6A5.9 5.9 0 0 0 6.8 8H5v2h1.2a7 7 0 0 0 0 1v1H5v2h1.3a6 6 0 0 0 11.4 0H19v-2h-1.2v-1a7 7 0 0 0 0-1H19V8zm-7 10a4 4 0 0 1-4-4v-3a4 4 0 0 1 8 0v3a4 4 0 0 1-4 4zm-1-7h2v5h-2z",un=e=>{let t=2166136261;for(let s=0;s<e.length;s+=1)t^=e.charCodeAt(s),t=Math.imul(t,16777619);return t>>>0},Wt=e=>{const t=String(e||"").trim().split(/[\s_-]+/).filter(Boolean);return(t.length>=2?t.slice(0,3).map(a=>a.charAt(0)):(t[0]||"?").slice(0,2).split("")).join("").toUpperCase()},pn=e=>({1:17,2:14,3:11})[e.length]||11,_n=(e,t)=>{const s=t(un(e.id)),a=[],n=3+Math.floor(s()*3);for(let c=0;c<n;c+=1){const u=s()*Math.PI*2,v=9+s()*7;a.push({cx:(18+Math.cos(u)*v).toFixed(1),cy:(18+Math.sin(u)*v).toFixed(1),r:(1.6+s()*2.2).toFixed(1),opacity:(.35+s()*.4).toFixed(2)})}const l=Wt(e.name||e.id);return{dots:a,glyph:l,fontSize:pn(l)}},hn={class:"rail","aria-label":"Workspaces"},fn=["data-drop","href","aria-label","aria-selected","onClick","onDragstart","onDragover","onDrop"],vn={viewBox:"0 0 36 36",class:"rail__icon","aria-hidden":"true"},mn=["fill"],kn=["cx","cy","r","fill","opacity"],yn=["y","font-size","fill"],gn={class:"rail__label"},bn={key:0,class:"rail__badge"},wn={viewBox:"0 0 24 24",class:"rail__gear","aria-hidden":"true"},$n=["d"],xn=U({__name:"Rail",emits:["settings"],setup(e,{emit:t}){const s=t,a=g(()=>Object.fromEntries(m.workspaces.map(d=>[d.id,_n(d,yt)]))),n=g(()=>Object.fromEntries(m.workspaces.map(d=>{const k=d.theme?d.theme[Ke.value?"dark":"light"]:null;return[d.id,{fill:k?k["--md-primary-container"]:"var(--md-primary-container)",ink:k?k["--md-on-primary-container"]:"var(--md-on-primary-container)",dot:k?k["--md-primary"]:"var(--md-primary)"}]}))),l=d=>{d.detail>0&&d.currentTarget.blur()},c=(d,k)=>{l(d),Bt(k)},u=d=>{s("settings"),l(d)},v=D(""),_=D({}),y=d=>{const k=d.currentTarget;return d.clientY-k.getBoundingClientRect().top<k.offsetHeight/2},A=(d,k)=>{v.value=k.id,d.dataTransfer&&(d.dataTransfer.effectAllowed="move",d.dataTransfer.setData("text/plain",k.id))},E=()=>{v.value="",_.value={}},R=(d,k)=>{if(!v.value||v.value===k.id)return;d.preventDefault(),d.dataTransfer&&(d.dataTransfer.dropEffect="move");const f=y(d)?"before":"after";(_.value.id!==k.id||_.value.side!==f)&&(_.value={id:k.id,side:f})},S=(d,k)=>{if(!v.value||v.value===k.id)return;d.preventDefault();const f=Ps(m.workspaces.map(B=>B.id),v.value,k.id,y(d));_.value={},an(f)};return(d,k)=>(r(),i("nav",hn,[(r(!0),i(V,null,N(p(m).workspaces,f=>(r(),i("a",{key:f.id,class:W(["rail__item",{"rail__item--dragging":v.value===f.id}]),"data-drop":_.value.id===f.id?_.value.side:null,href:"?ws="+encodeURIComponent(f.id),"aria-label":f.name,"aria-selected":f.id===p(m).workspace.id,draggable:"true",onClick:K(B=>c(B,f.id),["prevent"]),onDragstart:B=>A(B,f),onDragend:E,onDragover:B=>R(B,f),onDragleave:k[0]||(k[0]=B=>_.value={}),onDrop:B=>S(B,f)},[(r(),i("svg",vn,[o("rect",{x:"0",y:"0",width:"36",height:"36",rx:"10",fill:n.value[f.id].fill},null,8,mn),(r(!0),i(V,null,N(a.value[f.id].dots,(B,z)=>(r(),i("circle",{key:z,cx:B.cx,cy:B.cy,r:B.r,fill:n.value[f.id].dot,opacity:B.opacity},null,8,kn))),128)),o("text",{x:"18",y:a.value[f.id].fontSize>=17?24:23,"text-anchor":"middle","font-size":a.value[f.id].fontSize,"font-weight":"700","letter-spacing":"-0.5","font-family":"Roboto, Inter, system-ui, sans-serif",fill:n.value[f.id].ink},h(a.value[f.id].glyph),9,yn)])),o("span",gn,h(f.name),1),f.open_moves?(r(),i("span",bn,h(f.open_moves),1)):C("",!0)],42,fn))),128)),k[2]||(k[2]=o("span",{class:"rail__spacer"},null,-1)),o("a",{class:"rail__item",href:"#settings","aria-label":"Settings",onClick:K(u,["prevent"])},[(r(),i("svg",wn,[o("path",{d:p(cn),fill:"currentColor"},null,8,$n)])),k[1]||(k[1]=o("span",{class:"rail__label"},"Settings",-1))])]))}}),Cn=j(xn,[["__scopeId","data-v-be863916"]]),Ve=" · checks every minute",Ut=(e,t,s,a)=>{const n=e.failing.map(c=>c.source),l=t?ae(t):"—";return n.length&&n.length>=s?{dot:"off",text:"No data: "+n.join(", ")+" failing · last data "+ae(e.fresh_at),failing:n,noData:!0}:e.stale?{dot:"off",text:"Stale · last data "+ae(e.fresh_at)+Ve,failing:n,noData:!1}:n.length?{dot:a?"warn":"off",text:n.join(", ")+" failing · last check "+l+Ve,failing:n,noData:!1}:{dot:a?"ok":"off",text:"Live · last check "+l+Ve,failing:n,noData:!1}},Sn=["data-tip"],Tn={class:"ai-button__icon",viewBox:"0 0 24 24","aria-hidden":"true"},Mn=["d"],An=U({__name:"AiButton",props:{query:{},big:{type:Boolean}},setup(e){const t=e,s={"":"Copy for AI: this with its context as text, ready to paste into Claude or any other assistant",sent:"Copied",failed:"Could not copy"},a=Ae("",1600),n=g(()=>s[a.value]),l=()=>ks(t.query).then(c=>navigator.clipboard.writeText(c)).then(()=>{a.value="sent"},()=>{a.value="failed"});return(c,u)=>(r(),i("button",{type:"button",class:W(["ai-button",{"ai-button--big":e.big,"ai-button--sent":p(a)==="sent","ai-button--failed":p(a)==="failed"}]),"aria-label":"Copy for AI","data-tip":n.value,onClick:K(l,["stop"])},[(r(),i("svg",Tn,[o("path",{d:p(rn),fill:"currentColor"},null,8,Mn)]))],10,Sn))}}),de=j(An,[["__scopeId","data-v-d32a60c7"]]),Rn={key:0,class:"update-chip update-chip--done",role:"status"},En={key:1,class:"update-chip update-chip--busy",role:"status"},On=["title"],Dn=15e3,In=U({__name:"UpdateChip",setup(e){const t=D(!1),s=D(""),a=Ae("",Dn),n=g(()=>m.update),l=g(()=>t.value||n.value.state==="installing"||n.value.state==="restarting");X(()=>n.value.current,u=>{s.value&&u&&u!==s.value&&(a.value=u,s.value="")});const c=()=>{if(l.value)return;t.value=!0,s.value=n.value.current;const u=v=>{if(t.value=!1,!se(v,{refused:"The update did not start"})){s.value="";return}m.update=v.update};oe("/api/update").then(u,u)};return(u,v)=>p(a)?(r(),i("span",Rn,"Updated to "+h(p(a)),1)):l.value?(r(),i("span",En,"Updating…")):n.value.available&&n.value.state==="failed"?(r(),i("button",{key:2,type:"button",class:"update-chip update-chip--failed",title:n.value.reason,onClick:c}," Update failed · Retry ",8,On)):n.value.available?(r(),i("button",{key:3,type:"button",class:"update-chip",onClick:c},h(n.value.latest)+" is out · Update ",1)):C("",!0)}}),Bn=j(In,[["__scopeId","data-v-f70d2aed"]]),Vn={class:"status-bar"},Wn={class:"status-bar__icon",viewBox:"0 0 24 24","aria-hidden":"true"},Un=["d"],Nn={key:0,class:"status-bar__notice",role:"alert"},jn=["href"],Pn=["aria-disabled"],Fn=5e3,zn=U({__name:"StatusBar",emits:["report"],setup(e,{emit:t}){const s=t,a=g(()=>(ce.value,Ut(m.health,m.polled_at,m.workspace.connectors.length,b.live))),n=D(!1),l=D(!1),c=g(()=>l.value?"Opened in the app window. You can close this tab.":b.status||a.value.text),u=_=>se(_,{refused:"The app window did not open"}),v=()=>{if(n.value)return;n.value=!0,setTimeout(()=>n.value=!1,Fn);const _=y=>{u(y),l.value=!le(y)};oe("/api/open",{mode:"app"}).then(_,_)};return(_,y)=>(r(),i("div",Vn,[o("button",{type:"button",class:"btn status-bar__btn status-bar__report",title:"A bug or a wish about this monitor, straight to its backlog",onClick:y[0]||(y[0]=A=>s("report"))},[(r(),i("svg",Wn,[o("path",{d:p(dn),fill:"currentColor"},null,8,Un)])),y[2]||(y[2]=F("Report ",-1))]),o("span",{class:W(["status-bar__live",{"status-bar__live--off":a.value.dot==="off","status-bar__live--warn":a.value.dot==="warn"}])},null,2),o("span",null,h(c.value),1),p(Ce)?(r(),i("span",Nn,h(p(Ce)),1)):C("",!0),O(Bn),o("button",{type:"button",class:"btn status-bar__btn",onClick:y[1]||(y[1]=(...A)=>p(ht)&&p(ht)(...A))},"Refresh now"),p(b).mode==="app"?(r(),i("a",{key:1,class:"btn status-bar__btn",href:p(Xs)(p(b).ws),target:"_blank",rel:"noopener"},"Open in browser",8,jn)):(r(),i("button",{key:2,type:"button",class:W(["btn status-bar__btn",{"status-bar__btn--busy":n.value}]),"aria-disabled":n.value,onClick:v},h(n.value?"Opening…":"Open as app"),11,Pn)),O(de,{query:{all:"1"}}),y[3]||(y[3]=o("span",{class:"ai-hint status-bar__ai-hint"},"AI: copy everything",-1))]))}}),qn=j(zn,[["__scopeId","data-v-eefe1de8"]]),Nt=e=>{const t=Me("wt-collapsed",[],{writeDefaults:!1}),s=g(()=>t.value.includes(e));return{collapsed:s,toggle:()=>{t.value=s.value?t.value.filter(n=>n!==e):[...t.value,e]}}},Yn=["href"],Ln={key:1},ne=U({__name:"ExtLink",props:{text:{default:""},url:{default:""}},setup(e){const t=e,s=g(()=>Ge(t.url));return(a,n)=>s.value?(r(),i("a",{key:0,href:s.value,target:"_blank",rel:"noopener"},h(e.text),9,Yn)):(r(),i("span",Ln,h(e.text),1))}}),Hn={class:"workspace-header__title"},Xn={class:"workspace-header__name"},Kn={class:"workspace-header__line workspace-header__sentence"},Gn={class:"workspace-header__count"},Jn={class:"workspace-header__count"},Zn={key:0},Qn={class:"workspace-header__count"},eo={key:0,class:"workspace-header__line workspace-header__strip"},to={class:"workspace-header__count"},so={class:"workspace-header__count"},no={class:"workspace-header__count"},oo={class:"workspace-header__count"},ao={class:"workspace-header__line workspace-header__give"},lo={class:"workspace-header__links"},ro={class:"workspace-header__tiles"},io={class:"workspace-header__tile workspace-header__tile--you"},co={class:"workspace-header__tile-value"},uo={class:"workspace-header__tile"},po={class:"workspace-header__tile-value"},_o={class:"workspace-header__tile-value"},ho={class:"workspace-header__tile"},fo={class:"workspace-header__tile-value"},vo=U({__name:"WorkspaceHeader",setup(e){const{collapsed:t,toggle:s}=Nt("header");return(a,n)=>(r(),i("header",{id:"summary",class:W(["island workspace-header",{"workspace-header--collapsed":p(t)}])},[o("div",Hn,[o("h1",Xn,h(p(m).workspace.name||"Whose Turn"),1),o("p",Kn,[o("b",Gn,h(p(H).mine),1),n[3]||(n[3]=F(" waiting on you, ",-1)),o("b",Jn,h(p(H).others),1),n[4]||(n[4]=F(" waiting on someone else",-1)),p(H).failing?(r(),i("span",Zn,[n[1]||(n[1]=F(", ",-1)),o("b",Qn,h(p(H).failing),1),n[2]||(n[2]=F(" failing",-1))])):C("",!0),n[5]||(n[5]=F(". ",-1))]),p(t)?(r(),i("p",eo,[n[6]||(n[6]=F(" Your move ",-1)),o("b",to,h(p(H).mine),1),n[7]||(n[7]=F(" · Waiting on others ",-1)),o("b",so,h(p(H).others),1),n[8]||(n[8]=F(" · Failing ",-1)),o("b",no,h(p(H).failing),1),n[9]||(n[9]=F(" · Done ",-1)),o("b",oo,h(p(H).done),1)])):C("",!0),o("p",ao,[O(de,{query:{ws:p(m).workspace.id,kind:"workspace"},big:""},null,8,["query"]),n[10]||(n[10]=o("span",{class:"ai-hint"},"AI: copy this workspace",-1)),o("span",lo,[(r(!0),i(V,null,N(p(m).workspace.links||[],l=>(r(),q(ne,{key:l.url,text:l.label,url:l.url,title:l.url},null,8,["text","url","title"]))),128))])])]),o("button",{type:"button",class:W(["fold-toggle workspace-header__fold",{"fold-toggle--folded":p(t)}]),"aria-label":"Collapse or expand header","data-tip":"Fold the header; it stays folded until you open it again",onClick:n[0]||(n[0]=K((...l)=>p(s)&&p(s)(...l),["stop"]))}," ▾ ",2),o("div",ro,[o("div",io,[n[11]||(n[11]=o("span",{class:"workspace-header__tile-label"},"Your move",-1)),o("strong",co,h(p(H).mine),1)]),o("div",uo,[n[12]||(n[12]=o("span",{class:"workspace-header__tile-label"},"Waiting on others",-1)),o("strong",po,h(p(H).others),1)]),o("div",{class:W(["workspace-header__tile",{"workspace-header__tile--fail":p(H).failing}])},[n[13]||(n[13]=o("span",{class:"workspace-header__tile-label"},"Open PRs with failing checks",-1)),o("strong",_o,h(p(H).failing),1)],2),o("div",ho,[n[14]||(n[14]=o("span",{class:"workspace-header__tile-label"},"Done in the last 30 days",-1)),o("strong",fo,h(p(H).done),1)])])],2))}}),mo=j(vo,[["__scopeId","data-v-0f4b6d6e"]]),Qe=e=>{X(()=>b.reconnects,e)},ko=["id"],yo={class:"island__head"},go={class:"island__title"},bo={class:"island__note"},wo={class:"island__note-text"},$o=["data-tip"],xo=["aria-label"],Co={class:"island__body"},So=U({__name:"Island",props:{id:{},title:{},note:{default:""},tip:{default:""},column:{type:Boolean}},setup(e){const t=e,{collapsed:s,toggle:a}=Nt(t.id);return(n,l)=>(r(),i("section",{id:e.id,class:W(["island",{"island--collapsed":p(s),"island--column":e.column}])},[o("div",yo,[o("h2",go,[F(h(e.title)+" ",1),Ue(n.$slots,"head",{},void 0)]),o("p",bo,[o("span",wo,h(e.note),1),e.tip?(r(),i("button",{key:0,type:"button",class:"hint-icon","aria-label":"More info","data-tip":e.tip}," ? ",8,$o)):C("",!0),o("button",{type:"button",class:W(["fold-toggle",{"fold-toggle--folded":p(s)}]),"aria-label":"Collapse or expand "+e.id,"data-tip":"Fold this panel; it stays folded until you open it again",onClick:l[0]||(l[0]=K((...c)=>p(a)&&p(a)(...c),["stop"]))}," ▾ ",10,xo)])]),o("div",Co,[Ue(n.$slots,"default",{},void 0)])],10,ko))}}),Re=j(So,[["__scopeId","data-v-a03b7f62"]]),To=["aria-label"],Mo=["aria-pressed","onClick"],Ao={key:0,class:"segmented__count"},Ro=U({__name:"Segmented",props:Ne({options:{},label:{default:""},chips:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=mt(e,"modelValue");return(s,a)=>(r(),i("span",{class:W(["segmented",{"segmented--chips":e.chips}]),role:"group","aria-label":e.label},[(r(!0),i(V,null,N(e.options,n=>(r(),i("button",{key:n.id,type:"button",class:"segmented__option","aria-pressed":t.value===n.id,onClick:l=>t.value=n.id},[F(h(n.label),1),n.count!==void 0?(r(),i("b",Ao,h(n.count),1)):C("",!0)],8,Mo))),128))],10,To))}}),Te=j(Ro,[["__scopeId","data-v-7901b5d6"]]),Eo={class:"ticket-cell"},Oo={class:"ticket-cell__summary"},Do=U({__name:"TicketCell",props:{row:{}},setup(e){return(t,s)=>(r(),i("td",Eo,[O(ne,{text:e.row.key,url:e.row.ticket_url,class:"ticket-key"},null,8,["text","url"]),o("span",Oo,h(e.row.summary),1)]))}}),et=j(Do,[["__scopeId","data-v-8436de88"]]),Io={key:0,class:"pr-cell"},Bo={key:1,class:"pill"},Vo=U({__name:"PrCell",props:{row:{}},setup(e){return(t,s)=>(r(),i("td",null,[e.row.pr?(r(),i("span",Io,[O(ne,{text:e.row.pr,url:e.row.pr_url,class:"pr-cell__link"},null,8,["text","url"]),e.row.pr_state==="OPEN"&&e.row.checks?(r(),i("span",{key:0,class:W(["pill",p(fe)("pill",p(ys)(e.row.checks))])},h(e.row.checks),3)):e.row.pr_state?(r(),i("span",Bo,h(e.row.pr_state.toLowerCase()),1)):C("",!0)])):C("",!0)]))}}),jt=j(Vo,[["__scopeId","data-v-75c443c3"]]),Wo=["open"],Uo={class:"recently-done__summary"},No={class:"recently-done__count"},jo={class:"recently-done__list"},Po={class:"table"},Fo=["data-tip"],zo={class:"table__actions"},qo=U({__name:"RecentlyDone",setup(e){const t=Me("wt-recent-open",!1,{writeDefaults:!1,serializer:{read:n=>n==="1",write:n=>n?"1":"0"}}),s=n=>{t.value=n.target.open},a=g(()=>(ce.value,gs(m.turn).map(n=>({row:n,since:Ze(n.status_since||n.updated)}))));return(n,l)=>a.value.length?(r(),i("details",{key:0,class:"recently-done",open:p(t),onToggle:s},[o("summary",Uo,[l[0]||(l[0]=F(" Recently done ",-1)),o("span",No,h(a.value.length),1)]),o("div",jo,[o("table",Po,[l[1]||(l[1]=o("thead",null,[o("tr",null,[o("th",null,"Ticket"),o("th",null,"Status"),o("th",null,"Done"),o("th",{class:"table__actions-col"},[o("span",{class:"visually-hidden"},"Copy for AI")])])],-1)),o("tbody",null,[(r(!0),i(V,null,N(a.value,({row:c,since:u})=>(r(),i("tr",{key:c.row_id},[O(et,{row:c},null,8,["row"]),o("td",null,[o("span",{class:W(["pill",p(fe)("pill",p(Ct)(c.status_group))])},h(c.status),3)]),o("td",null,[o("span",{class:"age","data-tip":"Done "+p(Je)(c.status_since||c.updated)},h(u.text),9,Fo)]),o("td",zo,[O(de,{class:"table__ai",query:{ws:p(m).workspace.id,kind:"row",ref:c.row_id}},null,8,["query"])])]))),128))])])])],40,Wo)):C("",!0)}}),Yo=j(qo,[["__scopeId","data-v-12ee20e8"]]),Lo=13,Ho=U({__name:"RowScroll",props:{floor:{type:Boolean}},setup(e){const t=D(null),s=D(null),{y:a}=_s(t),{height:n}=at(t),{height:l}=at(s),c=()=>{var y,A,E;return[...((E=(A=(y=s.value)==null?void 0:y.querySelector("table"))==null?void 0:A.tBodies[0])==null?void 0:E.rows)||[]]},u=()=>{const y=t.value;return y?y.getBoundingClientRect().top+y.clientTop+y.clientHeight:0},v=g(()=>(a.value,n.value,l.value,bs(c().map(y=>y.getBoundingClientRect().bottom),u(),Lo))),_=()=>{var d,k;const y=t.value,A=c(),E=A[A.length-v.value];if(!y||!E)return;const S=((k=(d=s.value)==null?void 0:d.querySelector("thead"))==null?void 0:k.getBoundingClientRect().bottom)??y.getBoundingClientRect().top;y.scrollBy({top:E.getBoundingClientRect().top-S,behavior:"smooth"})};return(y,A)=>(r(),i(V,null,[o("div",{ref_key:"scroller",ref:t,class:W(["row-scroll",{"row-scroll--floor":e.floor}])},[o("div",{ref_key:"content",ref:s},[Ue(y.$slots,"default",{},void 0)],512)],2),v.value?(r(),i("button",{key:0,type:"button",class:"row-scroll__more",onClick:_}," +"+h(v.value)+" more ",1)):C("",!0)],64))}}),Pt=j(Ho,[["__scopeId","data-v-7bd9ace7"]]),Xo=D("open"),Ko=()=>Xo,Go={class:"table"},Jo={class:"hint-row"},Zo={class:"your-move__next"},Qo=["data-tip"],ea=["data-tip"],ta=["data-tip"],sa={key:0,class:"alert alert--inline your-move__problem",role:"alert"},na={class:"table__actions"},oa=["aria-label","onClick"],aa={key:0,class:"empty"},la=U({__name:"YourMove",setup(e){const t=Ko(),s=g(()=>{ce.value;const u=ws(m.turn,t.value);return{...u,rows:u.rows.map(v=>({...v,age:Ze(v.row.activity_at)}))}}),a=g(()=>[{id:"open",label:"Open",count:s.value.open},{id:"handled",label:"Handled",count:s.value.handled}]),n=g(()=>{if(t.value==="handled")return"Nothing marked as handled.";const{noData:u,failing:v}=Ut(m.health,m.polled_at,m.workspace.connectors.length,b.live);return u?"No data: "+v.join(", ")+(v.length===1?" is":" are")+" failing. Check Settings.":"Nothing is waiting on you."}),l=Le(new Map);Qe(()=>l.clear());const c=async u=>{const v=u.row.row_id,_=await qe({handled:{[v]:u.handled?null:new Date().toISOString()}});_?l.set(v,_):l.delete(v)};return(u,v)=>(r(),q(Re,{id:"your-move",title:"Your move",note:"Next step is yours",tip:"Each row is something where the next step is yours. Ticket, PR and comment open in a new tab."},{head:te(()=>[O(Te,{modelValue:p(t),"onUpdate:modelValue":v[0]||(v[0]=_=>Zt(t)?t.value=_:null),options:a.value,label:"Show",class:"your-move__view"},null,8,["modelValue","options"])]),default:te(()=>[O(Pt,{floor:""},{default:te(()=>[o("table",Go,[v[1]||(v[1]=o("thead",null,[o("tr",null,[o("th",null,"Ticket"),o("th",null,"Next step"),o("th",null,"PR"),o("th",{class:"hide-narrow"},"Last comment"),o("th",{class:"table__actions-col"},[o("span",{class:"visually-hidden"},"Mark")])])],-1)),o("tbody",null,[(r(!0),i(V,null,N(s.value.rows,_=>(r(),i("tr",{key:_.row.row_id,class:W(["your-move__row",{"your-move__row--handled":_.handled}])},[O(et,{row:_.row},null,8,["row"]),o("td",null,[o("span",Jo,[o("span",Zo,h(_.row.next),1),_.age.text?(r(),i("span",{key:0,class:W(["age",{"age--old":_.age.old}]),"data-tip":"Waiting since "+p(Je)(_.row.activity_at)},h(_.age.text),11,Qo)):C("",!0),_.row.why?(r(),i("button",{key:1,type:"button",class:"hint-icon","aria-label":"Why this is your move","data-tip":_.row.why}," ? ",8,ea)):C("",!0),_.handled?(r(),i("span",{key:2,class:"handled-chip","data-tip":"Marked "+p(ae)(p(m).marks.handled[_.row.row_id]||"")+". Comes back in 7 days if it is still open, or sooner when something new happens."},"handled",8,ta)):C("",!0)]),l.get(_.row.row_id)?(r(),i("p",sa,h(l.get(_.row.row_id)),1)):C("",!0)]),O(jt,{row:_.row},null,8,["row"]),o("td",{class:W(["hide-narrow",{"your-move__quote":_.row.comment}])},[_.row.comment?(r(),q(ne,{key:0,text:_.row.comment,url:_.row.comment_url},null,8,["text","url"])):C("",!0)],2),o("td",na,[O(de,{class:"table__ai",query:{ws:p(m).workspace.id,kind:"row",ref:_.row.row_id}},null,8,["query"]),o("button",{type:"button",class:W(["your-move__mark",{"your-move__mark--undo":_.handled}]),"aria-label":(_.handled?"Move back to open: ":"Mark as handled: ")+_.row.key,onClick:K(y=>c(_),["stop"])},h(_.handled?"Undo":"Handled"),11,oa)])],2))),128))])])]),_:1}),s.value.rows.length?C("",!0):(r(),i("p",aa,h(n.value),1)),p(t)==="open"?(r(),q(Yo,{key:1})):C("",!0)]),_:1}))}}),ra=j(la,[["__scopeId","data-v-e3e1502a"]]),ia=D(!1),ca=()=>ia,da={class:"todos__add"},ua={key:0,class:"alert alert--inline",role:"alert"},pa={class:"todos__list"},_a=["aria-checked","aria-label","onClick"],ha={class:"todos__text"},fa={class:"todos__meta"},va=["onClick"],ma={key:0,class:"empty todos__empty"},ka=U({__name:"Todos",setup(e){const t=ca(),s=D(""),a=g(()=>(m.todos||[]).filter(d=>!d.done)),n=g(()=>(m.todos||[]).filter(d=>d.done)),l=g(()=>new RegExp(m.workspace.key_pattern||"(?!)","g")),c=d=>{const k=[];let f=0;const B=d.text;for(const z of B.matchAll(l.value))z.index>f&&k.push({text:B.slice(f,z.index)}),k.push({text:z[0],url:z[0]===d.key?d.ticket_url:""}),f=z.index+z[0].length;return f<B.length&&k.push({text:B.slice(f)}),k},u=g(()=>(ce.value,(t.value?a.value.concat(n.value):a.value).map(d=>({todo:d,parts:c(d),meta:(d.by&&d.by!=="you"?d.by+" · ":"")+ae(d.created)})))),v=D("");Qe(()=>{v.value=""});const _=async d=>(v.value=await on(d),!v.value),y=async()=>{const d=s.value.trim();d&&await _({action:"add",text:d})&&s.value.trim()===d&&(s.value="")},A=d=>_({action:d.done?"undo":"done",id:d.id}),E=d=>_({action:"delete",id:d.id}),R=g({get:()=>t.value?"done":"open",set:d=>{t.value=d==="done"}}),S=g(()=>[{id:"open",label:"Open",count:a.value.length},{id:"done",label:"Done",count:n.value.length}]);return(d,k)=>(r(),q(Re,{id:"todo",title:"To do",note:"Your own notes",tip:'Your personal to-dos, kept on this machine. Add here, or ask Claude: "add to my to-do: …". A ticket key like PROJ-123 in the text becomes a link.'},{head:te(()=>[O(Te,{modelValue:R.value,"onUpdate:modelValue":k[0]||(k[0]=f=>R.value=f),options:S.value,label:"Show",class:"todos__view"},null,8,["modelValue","options"])]),default:te(()=>[o("div",da,[He(o("input",{"onUpdate:modelValue":k[1]||(k[1]=f=>s.value=f),class:"input todos__input",type:"text",placeholder:"Add a to-do and press Enter","aria-label":"New to-do",autocomplete:"off",onKeydown:je(y,["enter"])},null,544),[[Xe,s.value]]),o("button",{type:"button",class:"btn btn--tonal",onClick:y},"Add")]),v.value?(r(),i("p",ua,h(v.value),1)):C("",!0),o("ul",pa,[(r(!0),i(V,null,N(u.value,({todo:f,parts:B,meta:z})=>(r(),i("li",{key:f.id,class:W(["todos__item",{"todos__item--done":f.done}])},[o("button",{type:"button",class:W(["todos__check",{"todos__check--on":f.done}]),role:"checkbox","aria-checked":!!f.done,"aria-label":f.done?"Mark not done":"Mark done",onClick:L=>A(f)},null,10,_a),o("span",ha,[(r(!0),i(V,null,N(B,(L,J)=>(r(),i(V,{key:J},[L.url!==void 0?(r(),q(ne,{key:0,text:L.text,url:L.url},null,8,["text","url"])):(r(),i(V,{key:1},[F(h(L.text),1)],64))],64))),128))]),o("span",fa,h(z),1),o("button",{type:"button",class:"todos__delete","aria-label":"Delete to-do",onClick:L=>E(f)}," × ",8,va)],2))),128)),u.value.length?C("",!0):(r(),i("span",ma,h(p(t)?"Nothing here yet.":"Nothing to do. Add one above, or ask Claude."),1))])]),_:1}))}}),ya=j(ka,[["__scopeId","data-v-6f034e1e"]]),ga={key:0,class:"empty"},ba={class:"table waiting__table"},wa=["data-tip"],$a={class:"hide-narrow"},xa={key:0,class:"hint-row"},Ca=["data-tip"],Sa={class:"table__actions"},Ta=U({__name:"Waiting",setup(e){const t=g(()=>(ce.value,$s(m.turn).map(s=>({row:s,since:s.status_since?Ze(s.status_since):null}))));return(s,a)=>(r(),q(Re,{id:"waiting",title:"Waiting on others",note:"Someone else holds the next step",tip:"Tickets you touched in the last 30 days where someone else holds the next step: a reviewer, QA, or a new owner."},{default:te(()=>[t.value.length?(r(),q(Pt,{key:1},{default:te(()=>[o("table",ba,[a[0]||(a[0]=o("thead",null,[o("tr",null,[o("th",{class:"waiting__col waiting__col--ticket"},"Ticket"),o("th",{class:"waiting__col waiting__col--status"},"Status"),o("th",{class:"waiting__col waiting__col--with"},"With"),o("th",{class:"hide-narrow"},"Waiting for"),o("th",{class:"waiting__col waiting__col--pr"},"PR"),o("th",{class:"table__actions-col waiting__col waiting__col--actions"},[o("span",{class:"visually-hidden"},"Copy for AI")])])],-1)),o("tbody",null,[(r(!0),i(V,null,N(t.value,({row:n,since:l})=>(r(),i("tr",{key:n.row_id},[O(et,{row:n},null,8,["row"]),o("td",null,[o("span",{class:W(["pill",p(fe)("pill",p(Ct)(n.status_group))])},h(n.status),3)]),o("td",null,[F(h(n.whose)+" ",1),l?(r(),i("span",{key:0,class:W(["age",{"age--old":l.hours>=72}]),"data-tip":n.status+" since "+p(Je)(n.status_since)},h(l.text),11,wa)):C("",!0)]),o("td",$a,[n.hold_url?(r(),i("span",xa,[O(ne,{text:n.next,url:n.hold_url,class:"waiting__reason"},null,8,["text","url"]),o("button",{type:"button",class:"hint-icon","aria-label":"Full reason","data-tip":n.hold_full||n.next}," ? ",8,Ca)])):(r(),i(V,{key:1},[F(h(n.next),1)],64))]),O(jt,{row:n},null,8,["row"]),o("td",Sa,[O(de,{class:"table__ai",query:{ws:p(m).workspace.id,kind:"row",ref:n.row_id}},null,8,["query"])])]))),128))])])]),_:1})):(r(),i("p",ga,"Nothing is waiting on someone else."))]),_:1}))}}),Ma=j(Ta,[["__scopeId","data-v-a632447c"]]),Aa=(e,t)=>e.seen instanceof Set?e.seen.has(t):e.seen.includes(t),Ft=(e,t)=>new Date(e.at).getTime()>(t.base||0)&&!Aa(t,e.id),Ra=(e,t)=>{const s=String(t||"").toLowerCase().split(/\s+/).filter(Boolean);if(!s.length)return!0;const a=[e.ref,e.key,e.title,e.kind,e.who,e.text,e.body].join(" ").toLowerCase();return s.every(n=>a.includes(n))},Ea=e=>e.key||e.ref||e.id,Oa=(e,t)=>{const s=new Map;for(const a of e){const n=Ea(a),l=s.get(n)||{id:n,items:[],newest:a.at,unread:0,title:""};s.set(n,l),l.items.push(a),l.title||(l.title=a.title||""),a.at>l.newest&&(l.newest=a.at),Ft(a,t)&&(l.unread+=1)}return[...s.values()].sort((a,n)=>String(n.newest).localeCompare(String(a.newest)))},Da=e=>new Set(e.filter(t=>t.group==="you"&&!t.handled).map(t=>t.key)),Ia=(e,t=2)=>{const s=[...new Set(e.map(n=>n.kind))],a=s.length-t;return s.slice(0,t).join(" · ")+(a>0?` +${a}`:"")},Ba=e=>/fail|changes/.test(e)?"bad":/approved|merged|passed/.test(e)?"ok":"",Va=e=>/comment|approved|changes|mentioned|review requested/.test(e.kind)&&String(e.body||"").trim()!=="",zt=e=>e.ref!==e.key&&(e.key||e.title)||"",Wa=e=>[zt(e),e.text===e.title?"":e.text].filter(Boolean).join(" · "),Ua=e=>e.type==="github"&&e.label==="GitHub"?"GH":Wt(e.label),Na={class:"feed-item__body"},ja={class:"feed-item__top"},Pa={key:0,class:"feed-item__who"},Fa={key:1,class:"at-you"},za={class:"feed-item__right"},qa={class:"timestamp feed-item__when"},Ya=["aria-label","aria-expanded"],La={key:0,class:"feed-item__text"},Ha={class:"feed-item__full"},Xa={class:"feed-item__actions"},Ka={key:1,class:"feed-item__text"},Ga=U({__name:"FeedItem",props:{item:{},source:{},fresh:{type:Boolean},lit:{type:Boolean},expanded:{type:Boolean}},emits:["open","toggle","seen"],setup(e,{emit:t}){const s=e,a=t,n=g(()=>Ua(s.source)),l=g(()=>zt(s.item)),c=g(()=>Wa(s.item)),u=g(()=>Ba(s.item.kind)),v=g(()=>u.value||(s.source.type==="github"?"":"jira")),_=g(()=>Va(s.item)),y=g(()=>_.value&&s.expanded),A=g(()=>(ce.value,ae(s.item.at))),E=()=>{s.fresh&&a("seen",s.item.id)},R=()=>{a("toggle",s.item.id),E()};return(S,d)=>(r(),i("li",{class:W(["feed-item",{"feed-item--new":e.fresh,"feed-item--lit":e.lit,"feed-item--open":y.value}]),onClick:E},[o("span",{class:W(["feed-item__icon",p(fe)("feed-item__icon",v.value)])},h(n.value),3),o("div",Na,[o("div",ja,[O(ne,{text:e.item.ref,url:e.item.url},null,8,["text","url"]),o("span",{class:W(["feed-item__kind",{"feed-item__kind--bad":u.value==="bad"}])},h(e.item.kind),3),e.item.who?(r(),i("span",Pa,h(e.item.who),1)):C("",!0),e.item.mention?(r(),i("span",Fa,"@you")):C("",!0),o("span",za,[o("span",qa,h(A.value),1),_.value?(r(),i("button",{key:0,type:"button",class:"feed-item__toggle","aria-label":y.value?"Collapse":"Expand","aria-expanded":y.value,onClick:K(R,["stop"])},null,8,Ya)):C("",!0)])]),y.value?(r(),i(V,{key:0},[l.value?(r(),i("span",La,h(l.value),1)):C("",!0),o("div",Ha,h(e.item.body),1),o("div",Xa,[o("button",{type:"button",class:"btn btn--tonal",onClick:d[0]||(d[0]=K(k=>a("open",e.item),["stop"]))}," Open formatted "),O(de,{query:{ws:p(m).workspace.id,kind:"feed",ref:e.item.id}},null,8,["query"]),O(ne,{text:"Open in "+e.source.label,url:e.item.url,class:"btn"},null,8,["text","url"])])],64)):c.value?(r(),i("span",Ka,h(c.value),1)):C("",!0)])],2))}}),ft=j(Ga,[["__scopeId","data-v-27e556e1"]]),Ja=Le({source:"all",view:Me("wt-feed-view","ticket",{writeDefaults:!1}),query:"",openGroups:new Set}),Za=()=>Ja,Qa={key:0,class:"feed__new-count"},el={class:"feed__bar"},tl={key:0,class:"alert alert--inline",role:"alert"},sl={class:"feed__search"},nl={class:"feed__search-count"},ol={key:1,class:"empty"},al={key:2,class:"feed__list"},ll=["title","onClick"],rl=["aria-expanded","aria-label"],il={class:"feed__group-text"},cl={class:"feed__group-key"},dl={key:0,class:"feed__group-sum"},ul={class:"feed__group-meta"},pl={class:"feed__group-kinds"},_l={class:"timestamp feed__group-when"},hl={key:0,class:"feed__children"},fl=U({__name:"Feed",emits:["open"],setup(e,{emit:t}){const s=t,a=Za(),n=[{id:"ticket",label:"By ticket"},{id:"flat",label:"Flat"}],l=g(()=>m.workspace.connectors||[]),c=g(()=>Object.fromEntries(l.value.map($=>[$.id,$]))),u=$=>c.value[$]||{id:$,type:$,label:$},v=g(()=>l.value.length>1?[{id:"all",label:"All"}].concat(l.value.map($=>({id:$.id,label:$.label}))):[]),_=g({get:()=>v.value.some($=>$.id===a.source)?a.source:"all",set:$=>{a.source=$}}),y=g(()=>({base:m.marks.base,seen:new Set(m.marks.seen)})),A=$=>Ft($,y.value),E=g(()=>m.feed.filter(A).length),R=g(()=>m.feed.filter($=>_.value==="all"||$.source===_.value)),S=g(()=>R.value.filter($=>Ra($,a.query)).slice(0,200)),d=g(()=>new Map(m.turn.map($=>[$.key,$]))),k=g(()=>Da(m.turn)),f=g(()=>(ce.value,Oa(S.value,y.value).map($=>({...$,row:d.value.get($.id),move:k.value.has($.id),when:ae($.newest),kinds:Ia($.items),open:a.openGroups.has($.id)||!!a.query})))),B=($,Y)=>{$.has(Y)?$.delete(Y):$.add(Y)},z=$=>B(a.openGroups,$.id),L=$=>B(b.open,$),J=$=>qe({seen:[$]}).then(se),ue=D("");Qe(()=>{ue.value=""});const Q=async()=>{ue.value=await qe({seen:m.feed.map($=>$.id),base:Date.now()})};return($,Y)=>(r(),q(Re,{id:"feed",title:"What changed",note:"Newest first, every source",tip:"Newest first: comments, reviews, merges and failed checks on your PRs, and ticket changes. Each item opens where it happened.",class:"feed",column:""},{head:te(()=>[E.value?(r(),i("span",Qa,h(E.value)+" new",1)):C("",!0)]),default:te(()=>[o("div",el,[v.value.length?(r(),q(Te,{key:0,modelValue:_.value,"onUpdate:modelValue":Y[0]||(Y[0]=M=>_.value=M),options:v.value,label:"Feed source"},null,8,["modelValue","options"])):C("",!0),O(Te,{modelValue:p(a).view,"onUpdate:modelValue":Y[1]||(Y[1]=M=>p(a).view=M),options:n,label:"Feed view"},null,8,["modelValue"])]),ue.value?(r(),i("p",tl,h(ue.value),1)):C("",!0),o("div",sl,[He(o("input",{"onUpdate:modelValue":Y[2]||(Y[2]=M=>p(a).query=M),class:"input feed__search-input",type:"search",placeholder:"Search the feed: key, author, words…","aria-label":"Search the feed",autocomplete:"off"},null,512),[[Xe,p(a).query,void 0,{trim:!0}]]),o("span",nl,h(p(a).query?S.value.length+" of "+R.value.length:""),1),o("button",{type:"button",class:"feed__mark-read",onClick:Q},"Mark all read")]),p(m).feed.length?(r(),i("ol",al,[p(a).view==="ticket"?(r(!0),i(V,{key:0},N(f.value,M=>(r(),i("li",{key:M.id,class:W(["feed__group",{"feed__group--new":M.unread,"feed__group--open":M.open,"feed__group--move":M.move}])},[o("div",{class:"feed__group-head",title:M.move?"Your move on this ticket":void 0,onClick:Z=>z(M)},[o("button",{type:"button",class:"feed__group-caret","aria-expanded":M.open,"aria-label":"Collapse or expand "+M.id}," › ",8,rl),o("div",il,[o("div",cl,[O(ne,{text:M.id,url:M.row?M.row.ticket_url:M.items[0].url,class:"ticket-key feed__group-ticket"},null,8,["text","url"]),M.row||M.title?(r(),i("span",dl,h(M.row?M.row.summary:M.title),1)):C("",!0)]),o("div",ul,[o("span",{class:W(["feed__group-count",{"feed__group-count--new":M.unread}])},h(M.unread?M.unread+" new":M.items.length),3),o("span",pl,h(M.kinds),1),o("span",_l,h(M.when),1)])]),O(de,{class:"feed__group-copy",query:{ws:p(m).workspace.id,kind:"thread",ref:M.id}},null,8,["query"])],8,ll),M.open?(r(),i("ul",hl,[(r(!0),i(V,null,N(M.items,Z=>(r(),q(ft,{key:Z.id,item:Z,source:u(Z.source),fresh:A(Z),lit:!!M.unread,expanded:p(b).open.has(Z.id),onOpen:Y[3]||(Y[3]=Ee=>s("open",Ee)),onToggle:L,onSeen:J},null,8,["item","source","fresh","lit","expanded"]))),128))])):C("",!0)],2))),128)):(r(!0),i(V,{key:1},N(S.value,M=>(r(),q(ft,{key:M.id,item:M,source:u(M.source),fresh:A(M),expanded:p(b).open.has(M.id),onOpen:Y[4]||(Y[4]=Z=>s("open",Z)),onToggle:L,onSeen:J},null,8,["item","source","fresh","expanded"]))),128))])):(r(),i("p",ol," No changes yet. New comments, reviews and status changes show up here. "))]),_:1}))}}),vl=j(fl,[["__scopeId","data-v-d92a7c74"]]),ml={id:"first-run",class:"island first-run","aria-labelledby":"first-run-title"},kl={class:"first-run__text"},yl={class:"first-run__actions"},gl=["aria-disabled"],bl=U({__name:"FirstRun",setup(e){const t=D(!1),s=()=>Js("connectors"),a=()=>{t.value||(t.value=!0,ln().finally(()=>{t.value=!1}))};return(n,l)=>(r(),i("section",ml,[l[1]||(l[1]=o("h2",{id:"first-run-title",class:"first-run__title"}," Whose Turn watches your tickets and pull requests and shows what is waiting on you. ",-1)),o("p",kl,[o("b",null,h(p(m).workspace.name),1),l[0]||(l[0]=F(" has no sources yet, so there is nothing to watch. Connect a repository or a tracker, or look around a demo workspace with invented data first. ",-1))]),o("div",yl,[o("button",{type:"button",class:"btn btn--tonal",onClick:s},"Add a source"),o("button",{type:"button",class:"btn","aria-disabled":t.value,onClick:a}," Try a demo workspace ",8,gl)]),l[2]||(l[2]=o("p",{class:"first-run__text first-run__ai"},' Or ask Claude: "add my GitHub repository to Whose Turn." ',-1))]))}}),wl=j(bl,[["__scopeId","data-v-ef746675"]]),$l=new RegExp("(`[^`]{1,500}`)|(\\*\\*[^*]{1,500}\\*\\*)|(\\[[^\\]]{1,300}\\]\\(https?:\\/\\/[^)\\s]{1,2000}\\))|(https?:\\/\\/[^\\s<>()]{1,2000})|(@[A-Za-z0-9-]+(?: [A-Z][a-z]+)?)|((?<![A-Za-z0-9])\\*[^*\\s][^*]{0,500}\\*(?![A-Za-z0-9])|(?<![A-Za-z0-9])_[^_\\s][^_]{0,500}_(?![A-Za-z0-9]))","g"),vt=(e,t)=>{const s=Ge(t);return s?{type:"link",text:e,href:s}:{type:"text",text:e}},xl=e=>{const t=e[0];if(e[1])return{type:"code",text:t.slice(1,-1)};if(e[2])return{type:"strong",text:t.slice(2,-2)};if(e[3]){const s=t.indexOf("](");return vt(t.slice(1,s),t.slice(s+2,-1))}return e[4]?vt(t,t):e[5]?{type:"mention",text:t}:{type:"em",text:t.slice(1,-1)}},ge=e=>{const t=new RegExp($l),s=[];let a=0,n;for(;n=t.exec(e);)n.index>a&&s.push({type:"text",text:e.slice(a,n.index)}),s.push(xl(n)),a=n.index+n[0].length;return a<e.length&&s.push({type:"text",text:e.slice(a)}),s},Cl=e=>{const t=String(e||"").replace(/<!--[\s\S]*?-->/g,"").split(`
2
- `),s=[];let a=[],n=null;const l=()=>{a.length&&(s.push({type:"paragraph",lines:a.map(ge)}),a=[]),n=null};for(let c=0;c<t.length;c++){const u=t[c];if(/^\s*```/.test(u)){l();const A=[];for(c++;c<t.length&&!/^\s*```/.test(t[c]);c++)A.push(t[c]);s.push({type:"fence",text:A.join(`
3
- `)});continue}const v=u.match(/^(#{1,6})\s+(.*)$/);if(v){l(),s.push({type:"heading",level:v[1].length<=2?4:5,inline:ge(v[2])});continue}const _=u.match(/^>\s?(.*)$/);if(_){l(),s.push({type:"quote",inline:ge(_[1])});continue}const y=u.match(/^\s*([-*+]|\d+[.)])\s+(.*)$/);if(y){const A=n;a.length&&(l(),n=A);const E=/\d/.test(y[1]),R=n,S=R&&R.ordered===E?R:{type:"list",ordered:E,items:[]};S!==R&&s.push(S),n=S,S.items.push(ge(y[2]));continue}if(!u.trim()){l();continue}n=null,a.push(u)}return l(),s},we=(e,t,s="")=>{const a=document.createElement(e);return a.textContent=t,s&&(a.className=s),a},Sl=e=>{if(e.type==="text")return document.createTextNode(e.text);if(e.type==="link"){const t=we("a",e.text);return t.setAttribute("href",e.href),t.setAttribute("target","_blank"),t.setAttribute("rel","noopener"),t}return e.type==="mention"?we("span",e.text,"markdown-view__mention"):we(e.type,e.text)},qt=(e,t)=>{e.forEach(s=>t.append(Sl(s)))},We=(e,t)=>{const s=document.createElement(e);return qt(t,s),s},Tl=e=>{if(e.type==="fence"){const s=document.createElement("pre");return s.append(we("code",e.text)),s}if(e.type==="heading")return We(`h${e.level}`,e.inline);if(e.type==="quote")return We("blockquote",e.inline);if(e.type==="list"){const s=document.createElement(e.ordered?"ol":"ul");return e.items.forEach(a=>s.append(We("li",a))),s}const t=document.createElement("p");return e.lines.forEach((s,a)=>{a&&t.append(document.createElement("br")),qt(s,t)}),t},Ml=e=>{const t=document.createDocumentFragment();return Cl(e).forEach(s=>t.append(Tl(s))),t},Al=U({__name:"MarkdownView",props:{source:{default:""}},setup(e){const t=e,s=D(null);return Qt(()=>{s.value&&s.value.replaceChildren(Ml(t.source))}),(a,n)=>(r(),i("div",{ref_key:"host",ref:s,class:"markdown-view"},null,512))}}),Rl=j(Al,[["__scopeId","data-v-dcf42e95"]]),El={class:"modal__card"},Ol={class:"modal__head"},Dl={id:"modal-title",class:"modal__title"},Il=["href"],Bl=U({__name:"CommentModal",setup(e){const t=g(()=>b.modal),s=g(()=>t.value?[t.value.ref,t.value.kind,t.value.who].filter(Boolean).join(" · "):""),a=g(()=>t.value?Ge(t.value.url):""),n=g(()=>{var u;const c=(m.workspace.connectors||[]).find(v=>{var _;return v.id===((_=t.value)==null?void 0:_.source)});return"Open in "+(c?c.label:(u=t.value)==null?void 0:u.source)}),l=()=>{b.modal=null};return(c,u)=>t.value?(r(),i("div",{key:0,class:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",onClick:K(l,["self"])},[o("div",El,[o("div",Ol,[o("h3",Dl,h(s.value),1),a.value?(r(),i("a",{key:0,class:"btn",href:a.value,target:"_blank",rel:"noopener"},h(n.value),9,Il)):C("",!0),o("button",{type:"button",class:"btn btn--tonal",onClick:l},"Close")]),O(Rl,{source:t.value.body||t.value.text||""},null,8,["source"])])])):C("",!0)}}),Vl={class:"modal__card feedback-sheet__card"},Wl={class:"modal__head"},Ul={class:"modal__meta"},Nl=["aria-disabled"],jl={key:0,class:"alert"},Pl={class:"sheet-form"},Fl=["placeholder","onKeydown"],zl={key:0,class:"feedback-sheet__note"},ql={key:1,class:"feedback-sheet__note"},Yl={key:2,class:"empty"},Ll=["href"],Hl={key:3,class:"feedback-sheet__reports"},Xl=["href"],Kl={class:"feedback-sheet__report-title"},Gl={class:"timestamp"},Jl=U({__name:"FeedbackSheet",setup(e){const t=D(""),s=D(null),a=D(!1),n=D([]),l=D(null),c=D(""),u=D(!0),v=Ae("",1600),_=D([]),y=d=>"/report?id="+encodeURIComponent(d),A=()=>he("/api/feedback").then(d=>{u.value=d.configured,c.value=d.configured?"Linear · "+d.project:"not connected",_.value=d.reports||[]},()=>{n.value=[$e+"; past reports cannot be loaded."]}),E=()=>{b.feedback=!1},R=()=>{const d=t.value.trim();if(!d){n.value=["Write at least one line."];return}n.value=[],navigator.clipboard.writeText(d).then(()=>{v.value="sent"},()=>{v.value="failed"})},S=()=>{if(!u.value||a.value)return;const d=t.value.trim();if(!d){n.value=["Write at least one line."];return}a.value=!0,oe("/api/feedback",{text:d,from:"the window",ws:m.workspace.id,kind_ref:{kind:"workspace",ref:m.workspace.id}}).then(k=>{if(a.value=!1,k.error){n.value=St(k.error);return}l.value=k.issue||null,t.value="",_.value=k.reports||_.value}).catch(k=>{a.value=!1,n.value=[le(k,{refused:"Not sent",unreachable:Pe})]})};return X(()=>b.feedback,d=>{d&&(n.value=[],l.value=null,A().then(()=>kt(()=>{var k;return(k=s.value)==null?void 0:k.focus()})))}),(d,k)=>p(b).feedback?(r(),i("div",{key:0,class:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"feedback-title",onClick:K(E,["self"])},[o("div",Vl,[o("div",Wl,[k[1]||(k[1]=o("h3",{id:"feedback-title",class:"modal__title"},"To the Whose Turn backlog",-1)),o("span",Ul,h(c.value),1),o("button",{type:"button",class:"btn btn--tonal","aria-disabled":!u.value||a.value,onClick:S},h(a.value?"Composing…":"Send"),9,Nl),o("button",{type:"button",class:"btn",onClick:E},"Close")]),n.value.length?(r(),i("div",jl,h(n.value.join(" · ")),1)):C("",!0),o("div",Pl,[He(o("textarea",{ref_key:"field",ref:s,"onUpdate:modelValue":k[0]||(k[0]=f=>t.value=f),class:"input feedback-sheet__text",rows:"5",placeholder:"Describe the problem or the wish in your own words."+(u.value?" Cmd+Enter sends.":""),autocomplete:"off",onKeydown:[je(K(S,["meta","prevent"]),["enter"]),je(K(S,["ctrl","prevent"]),["enter"])]},null,40,Fl),[[Xe,t.value]]),u.value?(r(),i("p",ql," An assistant turns it into a proper issue (title, kind, description) and files it in the Whose Turn backlog with this workspace's summary attached. ")):(r(),i("p",zl,[k[2]||(k[2]=F(" The maintainer's tracker is not connected on this machine, so nothing can be sent from here. Copy your remark and pass it on yourself. ",-1)),o("button",{type:"button",class:"btn",onClick:R},h(p(v)==="sent"?"Copied":p(v)==="failed"?"Could not copy":"Copy remark"),1)])),l.value?(r(),i("p",Yl,[k[3]||(k[3]=F(" Filed as ",-1)),o("a",{href:y(l.value.identifier),target:"_blank",rel:"noopener"},h(l.value.identifier),9,Ll),F(" · "+h(l.value.title),1)])):C("",!0),_.value.length?(r(),i("div",Hl,[k[4]||(k[4]=o("h4",{class:"sheet-form__heading"},"Your reports",-1)),(r(!0),i(V,null,N(_.value,f=>(r(),i("div",{key:f.id,class:"feedback-sheet__report"},[o("a",{href:y(f.id),target:"_blank",rel:"noopener"},h(f.id),9,Xl),o("span",Kl,h(f.title),1),o("span",{class:W(["pill",p(fe)("pill",p(xs)(f.outcome))])},h(f.state||"filed"),3),o("span",Gl,h(p(ae)(f.changed_at||f.filed_at)),1)]))),128))])):C("",!0)])])])):C("",!0)}}),Zl=j(Jl,[["__scopeId","data-v-ec34adcc"]]),Ql={class:"field-row"},er={class:"field-row__label"},tr={key:0,class:"field-row__check"},sr=["checked"],nr={key:2,class:"field-row__inline"},or=["value"],ar=["value"],lr=["value"],rr=["placeholder","value"],ir={key:5,class:"field-row__hint"},cr=U({__name:"FieldRow",props:Ne({spec:{},placeholder:{default:""},hint:{default:""}},{modelValue:{type:[String,Array,Boolean]},modelModifiers:{}}),emits:Ne(["secret"],["update:modelValue"]),setup(e,{emit:t}){const s=e,a=t,n=mt(e,"modelValue"),l=/^#[0-9a-f]{6}$/i,c=()=>String(n.value??""),u=()=>n.value||[],v=R=>{n.value=R},_=()=>n.value??s.spec.default??!1,y=R=>{n.value=R===(s.spec.default??!1)?void 0:R},A=R=>R.target.value,E=R=>v(R.split(",").map(S=>S.trim()).filter(Boolean));return(R,S)=>(r(),i("div",Ql,[o("label",er,h(e.spec.label)+h(e.spec.required?" *":""),1),e.spec.boolean?(r(),i("label",tr,[o("input",{type:"checkbox",checked:_(),onChange:S[0]||(S[0]=d=>y(d.target.checked))},null,40,sr),F(" "+h(e.hint||e.spec.hint),1)])):e.spec.secret?(r(),i("input",{key:1,class:"input",type:"password",placeholder:"paste to replace",autocomplete:"off",onInput:S[1]||(S[1]=d=>a("secret",e.spec.key,A(d)))},null,32)):e.spec.colour?(r(),i("div",nr,[o("input",{class:"input field-row__colour",type:"color",value:l.test(c())?c():"#888888",onInput:S[2]||(S[2]=d=>v(A(d)))},null,40,or),o("input",{class:"input",type:"text",placeholder:"#rrggbb",value:c(),onInput:S[3]||(S[3]=d=>v(A(d)))},null,40,ar),o("button",{type:"button",class:"btn",onClick:S[4]||(S[4]=d=>v(""))},"None")])):e.spec.list?(r(),i("input",{key:3,class:"input",type:"text",value:u().join(", "),onInput:S[5]||(S[5]=d=>E(A(d)))},null,40,lr)):(r(),i("input",{key:4,class:"input",type:"text",placeholder:e.placeholder,value:c(),onInput:S[6]||(S[6]=d=>v(A(d)))},null,40,rr)),!e.spec.boolean&&(e.hint||e.spec.hint)?(r(),i("small",ir,h(e.hint||e.spec.hint),1)):C("",!0)]))}}),ie=j(cr,[["__scopeId","data-v-2ba0ba86"]]),dr={class:"modal__card settings-sheet__card"},ur={class:"modal__head"},pr={class:"modal__meta"},_r={key:0,class:"settings-sheet__dirty"},hr={key:0,class:"settings-sheet__confirm",role:"alertdialog"},fr={class:"settings-sheet__confirm-text"},vr={key:1,class:"alert settings-sheet__alert",role:"alert"},mr={key:2,class:"alert settings-sheet__alert"},kr={key:3,class:"settings-sheet__body"},yr={class:"settings-sheet__list"},gr=["aria-current","onClick"],br={class:"sheet-form"},wr={key:0,class:"empty"},$r={ref:"connectors-head",class:"sheet-form__heading"},xr={class:"settings-sheet__connector-head"},Cr={class:"settings-sheet__connector-name"},Sr=["onClick"],Tr={class:"settings-sheet__actions"},Mr=["onClick"],Ar={key:0,class:"settings-sheet__rules"},Rr={class:"settings-sheet__rule-when"},Er={class:"settings-sheet__rule-then"},Or={key:1,class:"empty"},Dr=U({__name:"SettingsSheet",setup(e){const t=D([]),s=D(0),a=D([]),n=D({workspace:[],theme:[],rules:[],statuses:[]}),l=D(""),c=D([]),u=D({}),v=es("connectors-head"),_=new Map,y=D(0),A=D(""),E=D(null),R=D(""),S=g(()=>b.settings&&!R.value&&(y.value>0||dt(t.value)!==A.value)),d={key:"id",label:"Entry id"},k={key:"label",label:"Label"},f=g(()=>t.value[s.value]),B=g(()=>(f.value&&u.value[f.value.id]||[]).map(Ys)),z=w=>a.value.find(T=>T.type===w.type)||{type:w.type,label:w.type,fields:[]},L=g(()=>t.value.map((w,T)=>({uid:ct(w),label:w.name||w.id||"Workspace "+(T+1)}))),J=g(()=>{var w;return(((w=f.value)==null?void 0:w.connectors)||[]).map(T=>({entry:T,uid:ct(T),spec:z(T)}))}),ue=w=>{var x;const T=(x=m.workspaces.find(P=>P.id===w))==null?void 0:x.theme_seed;return T?`empty: ${T}, derived from the workspace id`:"empty derives one from the workspace id"},Q=(w,T)=>w[T],$=(w,T,x)=>{_.set(w,Object.assign(_.get(w)||{},{[T]:x})),y.value+=1},Y=()=>{t.value.push(rt({id:"new-"+(t.value.length+1),name:"New workspace"})),s.value=t.value.length-1},M=()=>{t.value.splice(s.value,1),s.value=Math.max(0,s.value-1)},Z=()=>{f.value&&(E.value={text:`Delete ${f.value.name||f.value.id}? Its to-dos and marks stay on disk.`,yes:"Delete",no:"Keep",run:M})},Ee=w=>{var T;return(T=f.value)==null?void 0:T.connectors.push({type:w.type})},Yt=w=>{f.value&&(_.delete(f.value.connectors[w]),f.value.connectors.splice(w,1))},Lt=w=>{if(!f.value)return;const T=z(f.value.connectors[w]).label;E.value={text:`Remove the ${T} connector from ${f.value.name||f.value.id}?`,yes:"Remove",no:"Keep",run:()=>Yt(w)}},Ht=()=>he("/api/config").then(w=>{R.value="",t.value=(w.workspaces||[]).map(rt),a.value=w.connectors||[],n.value=w.fields,_.clear(),y.value=0,E.value=null,s.value=Math.max(0,t.value.findIndex(T=>T.id===m.workspace.id)),l.value=w.config_file||"",c.value=w.problems||[],u.value=w.tables||{},A.value=dt(t.value)}).catch(()=>{R.value=$e+"; settings cannot be loaded."}).then(kt).then(()=>{var w;b.settingsAt==="connectors"&&((w=v.value)==null||w.scrollIntoView({block:"start"})),b.settingsAt=""}),Oe=()=>{b.settings=!1},tt=()=>{E.value={text:"Discard changes?",yes:"Discard",no:"Keep editing",run:Oe}},st=()=>S.value?tt():Oe(),nt=w=>{const T=E.value;E.value=null,w&&(T==null||T.run())},Xt=async()=>{try{const w=await oe("/api/config",{workspaces:t.value.map(T=>Ws(T)),secrets:Ns(t.value,_)});if(w.error){c.value=St(w.error);return}Oe(),It()}catch(w){c.value=[le(w,{unreachable:$e+"; your changes are kept, save again."})]}};return X(S,w=>{b.settingsDirty=w},{immediate:!0}),X(()=>b.settingsAsk,w=>{w&&(b.settingsAsk=!1,tt())}),X(()=>b.settings,w=>{w&&Ht()}),(w,T)=>p(b).settings?(r(),i("div",{key:0,class:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"settings-title",onClick:K(st,["self"])},[o("div",dr,[o("div",ur,[T[2]||(T[2]=o("h3",{id:"settings-title",class:"modal__title"},"Workspaces",-1)),o("span",pr,h(l.value),1),S.value?(r(),i("span",_r,"Unsaved changes")):C("",!0),R.value?C("",!0):(r(),i("button",{key:1,type:"button",class:"btn btn--tonal",onClick:Xt},"Save")),o("button",{type:"button",class:"btn",onClick:st},"Close")]),E.value?(r(),i("div",hr,[o("span",fr,h(E.value.text),1),o("button",{type:"button",class:"btn btn--danger",onClick:T[0]||(T[0]=x=>nt(!0))},h(E.value.yes),1),o("button",{type:"button",class:"btn",onClick:T[1]||(T[1]=x=>nt(!1))},h(E.value.no),1)])):C("",!0),R.value?(r(),i("div",vr,h(R.value),1)):c.value.length?(r(),i("div",mr,h(c.value.join(" · ")),1)):C("",!0),R.value?C("",!0):(r(),i("div",kr,[o("ul",yr,[(r(!0),i(V,null,N(L.value,(x,P)=>(r(),i("li",{key:x.uid},[o("button",{type:"button",class:"settings-sheet__workspace","aria-current":P===s.value,onClick:me=>s.value=P},h(x.label),9,gr)]))),128)),o("li",null,[o("button",{type:"button",class:"settings-sheet__workspace settings-sheet__workspace--add",onClick:Y}," + Add workspace ")])]),o("div",br,[f.value?(r(),i(V,{key:1},[T[3]||(T[3]=o("h4",{class:"sheet-form__heading"},"Workspace",-1)),(r(!0),i(V,null,N(n.value.workspace,x=>(r(),q(ie,{key:x.key,spec:x,"model-value":Q(f.value,x.key),"onUpdate:modelValue":P=>p(re)(f.value,x.key,P)},null,8,["spec","model-value","onUpdate:modelValue"]))),128)),T[4]||(T[4]=o("h4",{class:"sheet-form__heading"},"Theme",-1)),(r(!0),i(V,null,N(n.value.theme,x=>{var P;return r(),q(ie,{key:x.key,spec:x,hint:x.key==="seed"&&!((P=f.value.theme)!=null&&P.seed)?ue(f.value.id):"","model-value":Q(f.value.theme,x.key),"onUpdate:modelValue":me=>p(re)(f.value.theme,x.key,me)},null,8,["spec","hint","model-value","onUpdate:modelValue"])}),128)),o("h4",$r,"Connectors",512),(r(!0),i(V,null,N(J.value,({entry:x,spec:P,uid:me},Kt)=>(r(),i("div",{key:me,class:"settings-sheet__connector"},[o("div",xr,[o("strong",Cr,h(P.label),1),o("button",{type:"button",class:"btn btn--danger",onClick:ee=>Lt(Kt)}," Remove ",8,Sr)]),O(ie,{spec:d,placeholder:P.type,hint:"only needed when one type appears twice","model-value":Q(x,"id"),"onUpdate:modelValue":ee=>p(re)(x,"id",ee)},null,8,["placeholder","model-value","onUpdate:modelValue"]),O(ie,{spec:k,placeholder:P.label,hint:"shown in the feed filter","model-value":Q(x,"label"),"onUpdate:modelValue":ee=>p(re)(x,"label",ee)},null,8,["placeholder","model-value","onUpdate:modelValue"]),(r(!0),i(V,null,N(P.fields,ee=>(r(),q(ie,{key:ee.key,spec:ee,"model-value":Q(x,ee.key),"onUpdate:modelValue":De=>p(re)(x,ee.key,De),onSecret:(De,Gt)=>$(x,De,Gt)},null,8,["spec","model-value","onUpdate:modelValue","onSecret"]))),128))]))),128)),o("div",Tr,[(r(!0),i(V,null,N(a.value,x=>(r(),i("button",{key:x.type,type:"button",class:"btn",onClick:P=>Ee(x)}," + "+h(x.label),9,Mr))),128))]),T[5]||(T[5]=o("h4",{class:"sheet-form__heading"},"Rules",-1)),(r(!0),i(V,null,N(n.value.rules,x=>(r(),q(ie,{key:x.key,spec:x,"model-value":Q(f.value.rules,x.key),"onUpdate:modelValue":P=>p(re)(f.value.rules,x.key,P)},null,8,["spec","model-value","onUpdate:modelValue"]))),128)),(r(!0),i(V,null,N(n.value.statuses,x=>(r(),q(ie,{key:x.key,spec:x,"model-value":Q(f.value.rules.statuses,x.key),"onUpdate:modelValue":P=>p(re)(f.value.rules.statuses,x.key,P)},null,8,["spec","model-value","onUpdate:modelValue"]))),128)),T[6]||(T[6]=o("h4",{class:"sheet-form__heading"},"Whose turn table",-1)),T[7]||(T[7]=o("p",{class:"settings-sheet__rules-note"}," The rows in force, first match wins. Read-only here: ask Claude to change rules.table through /api/config. ",-1)),B.value.length?(r(),i("ol",Ar,[(r(!0),i(V,null,N(B.value,(x,P)=>(r(),i("li",{key:P,class:"settings-sheet__rule"},[o("span",Rr,h(x.when),1),o("span",Er,h(x.then),1)]))),128))])):(r(),i("p",Or,"Save the workspace to see its rows.")),o("div",{class:"settings-sheet__actions"},[o("button",{type:"button",class:"btn btn--danger",onClick:Z}," Delete workspace ")])],64)):(r(),i("p",wr,"No workspaces yet. Add one on the left."))])]))])])):C("",!0)}}),Ir=j(Dr,[["__scopeId","data-v-779d567d"]]),Br={class:"app__shell"},Vr=["inert"],Wr={id:"wt",class:"dashboard dashboard--fit"},Ur=["inert"],Nr={class:"dashboard__main"},jr=U({__name:"App",setup(e){const t=g(()=>!!m.workspace.id&&!m.workspace.connectors.length),s=g(()=>Dt.value!==null);return X(ut,Is,{flush:"post"}),hs("Escape",Zs,{target:document}),ts(()=>{Gs()}),(a,n)=>(r(),i("div",{class:"app",style:ss(p(ut))},[O(Cn,{inert:s.value,onSettings:n[0]||(n[0]=l=>p(b).settings=!0)},null,8,["inert"]),o("div",Br,[O(qn,{inert:s.value,onReport:n[1]||(n[1]=l=>p(b).feedback=!0)},null,8,["inert"]),p(pt).length?(r(),i("div",{key:0,class:"alert",inert:s.value},h(p(pt).join(" · ")),9,Vr)):C("",!0),o("div",Wr,[n[3]||(n[3]=o("canvas",{id:"backdrop",class:"dashboard__backdrop","aria-hidden":"true"},null,-1)),O(mo,{inert:s.value},null,8,["inert"]),t.value?(r(),q(wl,{key:0,inert:s.value},null,8,["inert"])):(r(),i("div",{key:1,class:"dashboard__layout",inert:s.value},[o("div",Nr,[O(ra,{class:"dashboard__move"}),O(ya,{class:"dashboard__todo"}),O(Ma,{class:"dashboard__waiting"})]),O(vl,{class:"dashboard__feed",onOpen:n[2]||(n[2]=l=>p(b).modal=l)})],8,Ur)),O(Zl),O(Ir),O(Bl)])])],4))}}),Pr=j(jr,[["__scopeId","data-v-f146b085"]]);ns(Pr).mount("#app");nn();Bs();
@@ -1 +0,0 @@
1
- .rail[data-v-be863916]{position:fixed;inset:0 auto 0 0;z-index:30;box-sizing:border-box;display:flex;flex-direction:column;gap:4px;width:60px;padding:12px 8px;overflow:hidden;border-right:1px solid var(--glass-edge);background:rgb(var(--glass),.72);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);font-family:var(--md-font);color:var(--md-on-surface);transition:width .18s ease,box-shadow .18s ease}.rail[data-v-be863916]:hover,.rail[data-v-be863916]:has(:focus-visible){width:232px;box-shadow:12px 0 32px #0000001f}.app:has(.modal) .rail[data-v-be863916]{z-index:0}.rail__item[data-v-be863916]{position:relative;display:flex;align-items:center;gap:12px;height:44px;padding:0 4px;border-radius:12px;color:inherit;text-decoration:none;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none}.rail__item[data-v-be863916]:focus-visible{outline:var(--focus-ring);outline-offset:-2px}.rail__item--dragging[data-v-be863916]{opacity:.4}.rail__item[data-drop=before][data-v-be863916]{box-shadow:0 -2px 0 0 var(--md-primary)}.rail__item[data-drop=after][data-v-be863916]{box-shadow:0 2px 0 0 var(--md-primary)}.rail__item[data-v-be863916]:hover{background:var(--state-hover)}.rail__item[aria-selected=true][data-v-be863916]{background:var(--md-secondary-container);color:var(--md-on-secondary-container)}.rail__icon[data-v-be863916]{flex:none;display:block;width:36px;height:36px;border-radius:10px}.rail__gear[data-v-be863916]{flex:none;display:grid;place-items:center;width:36px;height:36px;color:var(--md-on-surface-variant)}.rail__label[data-v-be863916]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:500;opacity:0;transition:opacity .12s ease}.rail:hover .rail__label[data-v-be863916],.rail:has(:focus-visible) .rail__label[data-v-be863916]{opacity:1}.rail__badge[data-v-be863916]{position:absolute;top:2px;left:30px;box-sizing:border-box;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--md-primary);color:var(--md-on-primary);font-size:10px;font-weight:700;line-height:18px;text-align:center}.rail:hover .rail__badge[data-v-be863916],.rail:has(:focus-visible) .rail__badge[data-v-be863916]{position:static;flex:none}.rail__spacer[data-v-be863916]{flex:1}.ai-button[data-v-d32a60c7]{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;cursor:pointer;color:var(--md-primary);background:rgb(var(--md-state),.06);vertical-align:middle;transition:background .12s ease,transform .12s ease}.ai-button__icon[data-v-d32a60c7]{width:15px;height:15px}.ai-button[data-v-d32a60c7]:hover{background:var(--md-secondary-container);transform:scale(1.08)}.ai-button[data-v-d32a60c7]:focus-visible{outline:var(--focus-ring);outline-offset:1px}.ai-button.ai-button--sent[data-v-d32a60c7]{background:var(--md-tertiary-container);color:var(--md-on-tertiary-container)}.ai-button.ai-button--failed[data-v-d32a60c7]{background:var(--md-error-container);color:var(--md-on-error-container)}.ai-button--big[data-v-d32a60c7]{width:32px;height:32px;background:rgb(var(--glass),.7)}.ai-button--big .ai-button__icon[data-v-d32a60c7]{width:18px;height:18px}.update-chip[data-v-f70d2aed]{display:inline-flex;align-items:center;height:26px;padding:0 12px;font:inherit;color:var(--md-on-primary-container);cursor:pointer;background:var(--md-primary-container);border:0;border-radius:var(--md-r-chip)}.update-chip--busy[data-v-f70d2aed],.update-chip--done[data-v-f70d2aed]{cursor:default}.update-chip--busy[data-v-f70d2aed]{opacity:.7}.update-chip--failed[data-v-f70d2aed]{color:var(--md-on-error-container);background:var(--md-error-container)}.status-bar[data-v-eefe1de8]{display:flex;align-items:center;gap:10px;margin:0 4px 8px;font-family:var(--md-font);font-size:12px;color:var(--md-on-surface-variant)}.status-bar__btn[data-v-eefe1de8]{height:26px;padding:0 12px;font-size:12px;text-decoration:none}.status-bar__btn--busy[data-v-eefe1de8]{opacity:.6;pointer-events:none}.status-bar__report[data-v-eefe1de8]{gap:6px;color:var(--md-error);border-color:var(--md-error)}.status-bar__icon[data-v-eefe1de8]{width:16px;height:16px}.status-bar__live[data-v-eefe1de8]{width:8px;height:8px;border-radius:50%;background:var(--live-on);box-shadow:0 0 0 0 var(--live-pulse-rest);animation:status-bar-pulse-eefe1de8 2s infinite}.status-bar__live--off[data-v-eefe1de8]{background:var(--live-off);animation:none}.status-bar__live--warn[data-v-eefe1de8]{background:var(--live-warn);animation:none}.status-bar__notice[data-v-eefe1de8]{color:var(--live-off)}.status-bar__ai-hint[data-v-eefe1de8]{margin-left:-4px}@keyframes status-bar-pulse-eefe1de8{0%{box-shadow:0 0 0 0 var(--live-pulse-from)}70%{box-shadow:0 0 0 8px var(--live-pulse-to)}to{box-shadow:0 0 0 0 var(--live-pulse-to)}}@media(prefers-reduced-motion:reduce){.status-bar__live[data-v-eefe1de8]{animation:none}}.workspace-header[data-v-0f4b6d6e]{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,2fr) 32px;gap:8px;padding:8px;background:linear-gradient(135deg,var(--blob-1),var(--blob-2));color:var(--header-ink, var(--md-on-primary-container))}@media(prefers-reduced-transparency:reduce){.workspace-header[data-v-0f4b6d6e]{background:var(--md-s-low)}}.workspace-header__title[data-v-0f4b6d6e]{display:grid;align-content:center;gap:4px;padding:12px 16px}.workspace-header__name[data-v-0f4b6d6e]{margin:0;font-size:28px;font-weight:400;line-height:36px;color:var(--md-on-primary-container)}.workspace-header__line[data-v-0f4b6d6e]{margin:0;font-size:14px;opacity:.85}.workspace-header__count[data-v-0f4b6d6e]{font-weight:700;font-variant-numeric:tabular-nums}.workspace-header__give[data-v-0f4b6d6e]{display:flex;align-items:center;gap:8px;margin-top:8px}.workspace-header__links[data-v-0f4b6d6e]{display:inline-flex;flex-wrap:wrap;gap:6px;margin-left:10px}.workspace-header__links a[data-v-0f4b6d6e]{display:inline-flex;align-items:center;height:24px;padding:0 10px;border:1px solid var(--glass-edge);border-radius:999px;background:rgb(var(--glass),.55);color:inherit;font-size:12px;font-weight:500}.workspace-header__links a[data-v-0f4b6d6e]:hover{background:rgb(var(--glass),.85)}.workspace-header__fold[data-v-0f4b6d6e]{grid-row:1;grid-column:3;place-self:center center;margin:0;color:inherit}.workspace-header__tiles[data-v-0f4b6d6e]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.workspace-header__tile[data-v-0f4b6d6e]{display:grid;align-content:start;gap:4px;padding:12px 16px;border:1px solid var(--glass-edge);border-radius:var(--md-r-card);background:rgb(var(--glass),calc(var(--glass-a) + .1));-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);color:var(--md-on-surface)}@media(prefers-reduced-transparency:reduce){.workspace-header__tile[data-v-0f4b6d6e]{background:var(--md-s-low);-webkit-backdrop-filter:none;backdrop-filter:none}}.workspace-header__tile-label[data-v-0f4b6d6e]{color:var(--md-on-surface-variant);font-size:12px;font-weight:500;line-height:16px;letter-spacing:.03em}.workspace-header__tile-value[data-v-0f4b6d6e]{min-height:40px;font-size:32px;font-weight:400;line-height:40px;font-variant-numeric:tabular-nums}.workspace-header__tile--you[data-v-0f4b6d6e]{border-color:transparent;background:var(--md-primary);color:var(--md-on-primary)}.workspace-header__tile--you .workspace-header__tile-label[data-v-0f4b6d6e]{color:var(--md-on-primary);opacity:.85}.workspace-header__tile--fail .workspace-header__tile-value[data-v-0f4b6d6e]{color:var(--md-error)}.workspace-header--collapsed[data-v-0f4b6d6e]{grid-template-columns:minmax(0,1fr) 32px;padding:4px 8px}.workspace-header--collapsed .workspace-header__title[data-v-0f4b6d6e]{display:flex;flex-wrap:wrap;align-items:baseline;gap:14px;padding:4px 8px}.workspace-header--collapsed .workspace-header__name[data-v-0f4b6d6e]{font-size:18px;line-height:28px}.workspace-header--collapsed .workspace-header__tiles[data-v-0f4b6d6e],.workspace-header--collapsed .workspace-header__give[data-v-0f4b6d6e],.workspace-header--collapsed .workspace-header__sentence[data-v-0f4b6d6e]{display:none}.workspace-header--collapsed .workspace-header__fold[data-v-0f4b6d6e]{grid-column:2}.workspace-header--collapsed .workspace-header__strip[data-v-0f4b6d6e]{font-size:13px}@media(max-width:900px){.workspace-header[data-v-0f4b6d6e],.workspace-header--collapsed[data-v-0f4b6d6e]{grid-template-columns:minmax(0,1fr) 32px}.workspace-header__fold[data-v-0f4b6d6e]{grid-column:2}.workspace-header__tiles[data-v-0f4b6d6e]{grid-column:1 / -1}}@media(max-width:640px){.workspace-header__tiles[data-v-0f4b6d6e]{grid-template-columns:repeat(2,minmax(0,1fr))}}.island__head[data-v-a03b7f62]{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px}.island__title[data-v-a03b7f62]{flex:none;margin:0;font-size:16px;line-height:24px;font-weight:500;letter-spacing:.01em;white-space:nowrap}.island__note[data-v-a03b7f62]{display:flex;flex:1 1 auto;align-items:center;justify-content:flex-end;gap:6px;min-width:0;margin:0;overflow:visible;color:var(--md-on-surface-variant);font-size:12px;line-height:16px;letter-spacing:.03em;text-align:right;white-space:nowrap;text-overflow:ellipsis}.island__note-text[data-v-a03b7f62]{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.island__body[data-v-a03b7f62]{padding:0 20px 12px}.island--column .island__head[data-v-a03b7f62]{gap:4px}.island--column .island__body[data-v-a03b7f62]{display:flex;flex-direction:column;min-height:0;padding-top:4px}.island.island--collapsed .island__body[data-v-a03b7f62]{display:none}@media(min-width:901px){.dashboard--fit .dashboard__main .island__body[data-v-a03b7f62]{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;padding-bottom:0}.dashboard--fit .dashboard__main .island.island--collapsed .island__body[data-v-a03b7f62]{display:none}}.segmented[data-v-7901b5d6]{display:inline-flex;overflow:hidden;border:1px solid var(--md-outline);border-radius:999px;vertical-align:middle}.segmented--chips[data-v-7901b5d6]{flex:none;align-self:flex-start;background:rgb(var(--glass),.4)}.segmented__option[data-v-7901b5d6]{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 11px;border-left:1px solid var(--md-outline);font-size:12px;font-weight:500;color:var(--md-on-surface);cursor:pointer;-webkit-user-select:none;user-select:none}.segmented__option[data-v-7901b5d6]:first-child{border-left:0}.segmented__count[data-v-7901b5d6]{font-weight:700;font-variant-numeric:tabular-nums}.segmented__option[aria-pressed=true][data-v-7901b5d6]{background:var(--md-secondary-container);color:var(--md-on-secondary-container)}.segmented__option[data-v-7901b5d6]:focus-visible{outline:var(--focus-ring);outline-offset:-2px}.segmented--chips .segmented__option[data-v-7901b5d6]{gap:normal;height:32px;padding:0 14px;font-family:var(--md-font);font-size:14px;letter-spacing:.01em}.segmented--chips .segmented__option[data-v-7901b5d6]:hover{background:var(--state-hover)}.segmented--chips .segmented__option[aria-pressed=true][data-v-7901b5d6]{background:var(--md-secondary-container);color:var(--md-on-secondary-container)}.ticket-cell__summary[data-v-8436de88]{display:block;max-width:44ch;margin-top:2px;color:var(--md-on-surface-variant);font-size:12px;line-height:16px;letter-spacing:.03em}.pr-cell[data-v-75c443c3]{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.pr-cell__link[data-v-75c443c3]{max-width:100%;overflow-wrap:anywhere}.recently-done[data-v-12ee20e8]{display:flex;flex:0 1 auto;flex-direction:column;min-height:33px;margin:0 -20px;padding:0 20px;overflow:hidden;border-top:1px solid var(--md-outline-variant)}.recently-done[open][data-v-12ee20e8]{min-height:128px}.recently-done__summary[data-v-12ee20e8]{display:flex;flex:none;align-items:center;gap:4px;min-height:40px;list-style:none;color:var(--md-on-surface-variant);font-size:14px;font-weight:500;cursor:pointer}.recently-done__summary[data-v-12ee20e8]::-webkit-details-marker{display:none}.recently-done__summary[data-v-12ee20e8]:before{content:"▾";display:inline-grid;place-items:center;width:24px;font-size:18px;transform:rotate(-90deg);transition:transform .15s ease}.recently-done[open] .recently-done__summary[data-v-12ee20e8]:before{transform:none}.recently-done__count[data-v-12ee20e8]{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;margin-left:6px;padding:0 6px;border-radius:10px;background:var(--md-s-high);color:var(--md-on-surface-variant);font-size:12px;font-weight:700}.recently-done__list[data-v-12ee20e8]{flex:1 1 auto;min-height:0;max-height:min(30vh,240px);margin:0 -20px;padding-bottom:8px;overflow:auto}.row-scroll[data-v-7bd9ace7]{overflow-x:auto;margin:0 -20px}@media(min-width:901px){.dashboard--fit .dashboard__main .row-scroll[data-v-7bd9ace7]{flex:1 1 auto;min-height:0;overflow:auto}.dashboard--fit .row-scroll[data-v-7bd9ace7]::-webkit-scrollbar{width:8px;height:8px}.dashboard--fit .row-scroll[data-v-7bd9ace7]::-webkit-scrollbar-thumb{border-radius:4px;background:var(--md-outline-variant)}}.dashboard--fit .dashboard__main .row-scroll--floor[data-v-7bd9ace7]{min-height:5rem}.row-scroll__more[data-v-7bd9ace7]{flex:none;display:block;margin:0 -20px;padding:4px 20px 6px;border-top:1px solid var(--md-outline-variant);color:var(--md-primary);font-size:13px;font-weight:500;cursor:pointer}.row-scroll__more[data-v-7bd9ace7]:hover{background:rgb(var(--md-state),.06)}.row-scroll__more[data-v-7bd9ace7]:focus-visible{outline:var(--focus-ring);outline-offset:-2px}.your-move__view[data-v-e3e1502a]{margin-left:10px}.your-move__next[data-v-e3e1502a]{font-weight:500}.your-move__quote[data-v-e3e1502a]{max-width:48ch;color:var(--md-on-surface-variant);font-size:12px;line-height:16px}.your-move__quote a[data-v-e3e1502a]{color:var(--md-on-surface-variant)}.your-move__problem[data-v-e3e1502a]{margin:4px 0 0;padding:4px 10px;font-size:12px}.your-move__mark[data-v-e3e1502a]{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border:1px solid var(--md-outline);border-radius:999px;color:var(--md-on-surface);font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none}.your-move__mark[data-v-e3e1502a]:hover{background:var(--state-hover)}.your-move__mark[data-v-e3e1502a]:before{content:"";width:9px;height:5px;border-bottom:2px solid currentcolor;border-left:2px solid currentcolor;transform:translateY(-2px) rotate(-45deg)}.your-move__mark--undo[data-v-e3e1502a]:before{display:none}.your-move__mark[data-v-e3e1502a]:focus-visible{outline:var(--focus-ring);outline-offset:2px}.your-move__row--handled td[data-v-e3e1502a]{opacity:.55}.your-move__row--handled .your-move__next[data-v-e3e1502a]{text-decoration:line-through;text-decoration-color:var(--md-outline)}.your-move__row--handled .table__actions[data-v-e3e1502a]{opacity:1}.todos__view[data-v-6f034e1e]{margin-left:10px}.todos__add[data-v-6f034e1e]{display:flex;align-items:center;gap:8px;padding:8px 0}.todos__input[data-v-6f034e1e]{flex:1;min-width:0;height:32px;padding:0 12px;background:rgb(var(--md-state),.04);font-size:14px}.todos__list[data-v-6f034e1e]{margin:0 -20px;padding:0;overflow-y:auto;list-style:none}.todos__item[data-v-6f034e1e]{display:grid;grid-template-columns:20px minmax(0,1fr) auto 20px;align-items:center;gap:10px;padding:7px 20px;border-top:1px solid var(--md-outline-variant)}.todos__item[data-v-6f034e1e]:first-child{border-top:0}.todos__item[data-v-6f034e1e]:hover{background:rgb(var(--md-state),.06)}.todos__text[data-v-6f034e1e]{overflow-wrap:anywhere}.todos__item--done .todos__text[data-v-6f034e1e]{color:var(--md-on-surface-variant);text-decoration:line-through}.todos__empty[data-v-6f034e1e]{display:block;padding:6px 20px 10px}.todos__check[data-v-6f034e1e]{box-sizing:border-box;display:grid;place-items:center;width:18px;height:18px;border:2px solid var(--md-outline);border-radius:5px;cursor:pointer}.todos__check--on[data-v-6f034e1e]{border-color:var(--md-primary);background:var(--md-primary)}.todos__check--on[data-v-6f034e1e]:after{content:"";width:8px;height:4px;border-bottom:2px solid var(--md-on-primary);border-left:2px solid var(--md-on-primary);transform:translateY(-1px) rotate(-45deg)}.todos__meta[data-v-6f034e1e]{color:var(--md-on-surface-variant);font-size:11px;white-space:nowrap}.todos__delete[data-v-6f034e1e]{color:var(--md-on-surface-variant);font-size:16px;line-height:1;text-align:center;cursor:pointer;opacity:0}.todos__delete[data-v-6f034e1e]:focus-visible{opacity:1}.todos__item:hover .todos__delete[data-v-6f034e1e]{opacity:1}@media(min-width:901px){.dashboard--fit .dashboard__todo .todos__list[data-v-6f034e1e]{flex:1 1 auto;min-height:0}.dashboard--fit .dashboard__todo .todos__list[data-v-6f034e1e]:not(:has(.todos__item)){display:none}}.waiting__table[data-v-a632447c]{table-layout:fixed}.waiting__col--ticket[data-v-a632447c]{width:22%}.waiting__col--status[data-v-a632447c],.waiting__col--with[data-v-a632447c]{width:6.5rem}.waiting__col--pr[data-v-a632447c]{width:4.5rem}.waiting__col--actions[data-v-a632447c]{width:2rem}.waiting__reason[data-v-a632447c]{display:block;min-width:0;max-width:44ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.feed-item[data-v-27e556e1]{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:start;gap:12px;padding:10px 20px;cursor:default}.feed-item[data-v-27e556e1]:hover{background:var(--state-hover)}.feed-item.feed-item--open[data-v-27e556e1]{background:rgb(var(--md-state),.05)}.feed-item.feed-item--new[data-v-27e556e1]{background:var(--new-bg);box-shadow:inset 4px 0 0 var(--new),inset 0 0 0 1px var(--new-edge)}.feed-item__icon[data-v-27e556e1]{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--md-s-highest);color:var(--md-on-surface-variant);font-size:11px;font-weight:700;letter-spacing:.02em}.feed-item__icon--jira[data-v-27e556e1]{background:var(--md-primary-container);color:var(--md-on-primary-container)}.feed-item__icon--bad[data-v-27e556e1]{background:var(--md-error-container);color:var(--md-on-error-container)}.feed-item__icon--ok[data-v-27e556e1]{background:var(--md-tertiary-container);color:var(--md-on-tertiary-container)}.feed-item__body[data-v-27e556e1]{display:grid;gap:2px;min-width:0}.feed-item__top[data-v-27e556e1]{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;font-size:14px}.feed-item__right[data-v-27e556e1]{flex:none;display:inline-flex;align-items:center;gap:4px;margin-left:auto}.feed-item__kind[data-v-27e556e1]{font-weight:500}.feed-item__kind--bad[data-v-27e556e1]{color:var(--md-error)}.feed-item__who[data-v-27e556e1]{color:var(--md-on-surface-variant)}.feed-item__text[data-v-27e556e1]{display:-webkit-box;overflow:hidden;color:var(--md-on-surface-variant);font-size:12px;line-height:16px;letter-spacing:.03em;overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical}.feed-item__toggle[data-v-27e556e1]{display:inline-grid;place-items:center;width:24px;height:24px;margin-left:2px;border-radius:50%;color:var(--md-on-surface-variant);font-size:0;line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;transition:transform .15s ease}.feed-item__toggle[data-v-27e556e1]:before{content:"";width:7px;height:7px;border-right:2px solid currentcolor;border-bottom:2px solid currentcolor;transform:translateY(-2px) rotate(45deg)}.feed-item__toggle[data-v-27e556e1]:hover{background:rgb(var(--md-state),.1)}.feed-item__toggle[aria-expanded=true][data-v-27e556e1]{transform:rotate(180deg)}.feed-item__toggle[data-v-27e556e1]:focus-visible{outline:var(--focus-ring)}.feed-item__full[data-v-27e556e1]{max-height:16rem;margin-top:6px;padding:10px 12px;overflow:auto;border:1px solid var(--glass-edge);border-radius:var(--md-r-chip);background:rgb(var(--glass),.55);color:var(--md-on-surface);font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.feed-item__actions[data-v-27e556e1]{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.feed-item--new .feed-item__kind[data-v-27e556e1],.feed-item--lit .feed-item__kind[data-v-27e556e1]{color:var(--md-on-surface);font-weight:700}.feed-item--new .feed-item__text[data-v-27e556e1],.feed-item--lit .feed-item__text[data-v-27e556e1]{color:var(--md-on-surface)}.feed-item--new .feed-item__icon[data-v-27e556e1],.feed-item--lit .feed-item__icon[data-v-27e556e1]{box-shadow:0 0 0 2px var(--new)}.feed-item--new .feed-item__when[data-v-27e556e1]:before,.feed-item--lit .feed-item__when[data-v-27e556e1]:before{content:"NEW";display:inline-block;margin-right:6px;padding:1px 6px;border-radius:4px;background:var(--new);color:var(--new-ink);font-size:10px;font-weight:800;letter-spacing:.06em;vertical-align:1px}.feed-item:not(.feed-item--new) .feed-item__body[data-v-27e556e1]{opacity:.78}.feed__bar[data-v-d92a7c74]{display:flex;flex:none;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px}.feed__new-count[data-v-d92a7c74]{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;background:var(--new);color:var(--new-ink);box-shadow:0 0 12px var(--new-glow);font-size:12px;font-weight:800}.feed__mark-read[data-v-d92a7c74]{flex:none;padding:4px 8px;border-radius:999px;color:var(--md-primary);font-size:13px;font-weight:500;cursor:pointer;-webkit-user-select:none;user-select:none}.feed__mark-read[data-v-d92a7c74]:hover{background:var(--state-hover)}.feed__mark-read[data-v-d92a7c74]:focus-visible{outline:var(--focus-ring)}.feed__search[data-v-d92a7c74]{display:flex;flex:none;align-items:center;gap:8px;margin:0 0 8px}.feed__search-input[data-v-d92a7c74]{flex:1;min-width:0;height:30px;padding:0 10px;font-size:13px}.feed__search-count[data-v-d92a7c74]{flex:none;color:var(--md-on-surface-variant);font-size:12px}.feed__list[data-v-d92a7c74]{flex:1 1 auto;min-height:12rem;margin:0 -20px;padding:0 0 4px;overflow-y:auto;list-style:none}.feed__group[data-v-d92a7c74]{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:0;padding:0;cursor:default}.feed__group[data-v-d92a7c74]:hover{background:var(--state-hover)}.feed__group.feed__group--open[data-v-d92a7c74]{background:rgb(var(--md-state),.05)}.feed__group.feed__group--new[data-v-d92a7c74]{background:var(--new-bg);box-shadow:inset 4px 0 0 var(--new),inset 0 0 0 1px var(--new-edge)}.feed__group-head[data-v-d92a7c74]{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 20px;cursor:pointer}.feed__group-copy[data-v-d92a7c74]{opacity:.55}.feed__group-head:hover .feed__group-copy[data-v-d92a7c74]{opacity:1}.feed__group-head[data-v-d92a7c74]:hover{background:var(--state-hover)}.feed__group--new>.feed__group-head[data-v-d92a7c74]{background:var(--new-bg);box-shadow:inset 4px 0 0 var(--new)}.feed__group--move[data-v-d92a7c74],.feed__group--move>.feed__group-head[data-v-d92a7c74]{box-shadow:inset 4px 0 0 var(--move)}.feed__group.feed__group--new.feed__group--move[data-v-d92a7c74]{box-shadow:inset 4px 0 0 var(--move),inset 0 0 0 1px var(--new-edge)}.feed__group-text[data-v-d92a7c74]{min-width:0}.feed__group-key[data-v-d92a7c74]{display:flex;align-items:baseline;gap:8px;font-size:14px}.feed__group-ticket[data-v-d92a7c74]{flex:none;font-weight:600}.feed__group-sum[data-v-d92a7c74]{overflow:hidden;color:var(--md-on-surface-variant);font-size:13px;text-overflow:ellipsis;white-space:nowrap}.feed__group-meta[data-v-d92a7c74]{display:flex;align-items:center;gap:8px;margin-top:2px;color:var(--md-on-surface-variant);font-size:12px}.feed__group-kinds[data-v-d92a7c74]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.feed__group-when[data-v-d92a7c74]{margin-left:auto}.feed__group-count[data-v-d92a7c74]{flex:none;display:inline-flex;align-items:center;height:18px;padding:0 7px;border-radius:999px;background:var(--md-s-highest);color:var(--md-on-surface-variant);font-size:11px;font-weight:700}.feed__group-count--new[data-v-d92a7c74]{background:var(--new);color:var(--new-ink)}.feed__children[data-v-d92a7c74]{margin:0 0 0 35px;padding:0 0 4px;border-left:2px solid var(--md-outline-variant);list-style:none}.feed__children .feed-item[data-v-d92a7c74]{padding-left:14px}.feed__group-caret[data-v-d92a7c74]{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--md-s-highest);color:var(--md-on-surface-variant);font-size:14px;transition:transform .15s ease}.feed__group-caret[data-v-d92a7c74]:focus-visible{outline:var(--focus-ring)}.feed__group--open .feed__group-caret[data-v-d92a7c74]{transform:rotate(90deg)}@media(min-width:901px){.dashboard--fit .feed__list[data-v-d92a7c74]::-webkit-scrollbar{width:8px;height:8px}.dashboard--fit .feed__list[data-v-d92a7c74]::-webkit-scrollbar-thumb{border-radius:4px;background:var(--md-outline-variant)}}@media(max-width:900px){.feed__list[data-v-d92a7c74]{max-height:28rem}}.first-run[data-v-ef746675]{display:grid;place-self:start center;gap:14px;width:min(640px,100%);padding:28px 32px}.first-run__title[data-v-ef746675]{margin:0;font-size:22px;font-weight:400;line-height:28px}.first-run__text[data-v-ef746675]{margin:0;color:var(--md-on-surface-variant)}.first-run__actions[data-v-ef746675]{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.first-run__ai[data-v-ef746675]{font-size:13px}.markdown-view[data-v-dcf42e95]{padding:16px 20px 20px;overflow:auto;overflow-wrap:anywhere;font-size:14px;line-height:1.6}.markdown-view[data-v-dcf42e95] h4,.markdown-view[data-v-dcf42e95] h5{margin:16px 0 6px;font-weight:600}.markdown-view[data-v-dcf42e95] h4{font-size:16px}.markdown-view[data-v-dcf42e95] h5{font-size:14px}.markdown-view[data-v-dcf42e95] p{margin:0 0 10px}.markdown-view[data-v-dcf42e95] ul,.markdown-view[data-v-dcf42e95] ol{margin:0 0 10px;padding-left:22px}.markdown-view[data-v-dcf42e95] li{margin:2px 0}.markdown-view[data-v-dcf42e95] code{padding:1px 5px;border-radius:4px;background:rgb(var(--md-state),.1);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em}.markdown-view[data-v-dcf42e95] pre{margin:0 0 12px;padding:12px 14px;overflow:auto;border-radius:8px;background:#00000047}.markdown-view[data-v-dcf42e95] pre code{padding:0;background:none;font-size:12.5px;line-height:1.5;white-space:pre}.markdown-view[data-v-dcf42e95] blockquote{margin:0 0 10px;padding:4px 12px;border-left:3px solid var(--md-primary);color:var(--md-on-surface-variant)}.markdown-view[data-v-dcf42e95] strong{font-weight:600}.markdown-view[data-v-dcf42e95] .markdown-view__mention{color:var(--md-primary);font-weight:500}.feedback-sheet__card[data-v-ec34adcc]{width:min(640px,100%)}.feedback-sheet__text[data-v-ec34adcc]{min-height:7rem;resize:vertical}.feedback-sheet__note[data-v-ec34adcc]{margin:0;color:var(--md-on-surface-variant);font-size:12px}.feedback-sheet__report[data-v-ec34adcc]{display:flex;align-items:baseline;gap:8px;padding:4px 0;border-top:1px solid var(--md-outline-variant);font-size:13px}.feedback-sheet__report-title[data-v-ec34adcc]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.field-row[data-v-2ba0ba86]{display:grid;grid-template-columns:170px minmax(0,1fr);align-items:center;gap:4px 14px}.field-row__label[data-v-2ba0ba86]{color:var(--md-on-surface);font-size:13px}.field-row__hint[data-v-2ba0ba86]{grid-column:2;color:var(--md-on-surface-variant);font-size:11px}.field-row__check[data-v-2ba0ba86]{display:flex;align-items:center;gap:8px;color:var(--md-on-surface-variant);font-size:11px}.field-row__colour[data-v-2ba0ba86]{width:44px;height:30px;padding:2px}.field-row__inline[data-v-2ba0ba86]{display:flex;align-items:center;gap:8px}.settings-sheet__card[data-v-779d567d]{width:min(1040px,100%);height:min(760px,100%)}.settings-sheet__dirty[data-v-779d567d]{color:var(--md-error);font-size:12px;font-weight:600}.settings-sheet__confirm[data-v-779d567d]{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 20px 0;padding:8px 12px;border-radius:10px;background:var(--md-warn-container);color:var(--md-on-warn-container);font-size:13px}.settings-sheet__confirm-text[data-v-779d567d]{flex:1}.settings-sheet__alert[data-v-779d567d]{margin:12px 20px 0}.settings-sheet__body[data-v-779d567d]{display:grid;flex:1;grid-template-columns:220px minmax(0,1fr);gap:0;min-height:0}.settings-sheet__list[data-v-779d567d]{display:flex;flex-direction:column;gap:4px;margin:0;padding:12px;overflow:auto;border-right:1px solid var(--md-outline-variant);list-style:none}.settings-sheet__workspace[data-v-779d567d]{box-sizing:border-box;display:block;width:100%;padding:8px 12px;overflow:hidden;border-radius:10px;font-size:14px;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.settings-sheet__workspace[data-v-779d567d]:hover{background:var(--state-hover)}.settings-sheet__workspace[aria-current=true][data-v-779d567d]{background:var(--md-secondary-container);color:var(--md-on-secondary-container)}.settings-sheet__workspace[data-v-779d567d]:focus-visible{outline:var(--focus-ring);outline-offset:-2px}.settings-sheet__workspace--add[data-v-779d567d]{color:var(--md-primary);font-weight:500}.settings-sheet__connector[data-v-779d567d]{display:flex;flex-direction:column;gap:10px;padding:12px 14px;border:1px solid var(--md-outline-variant);border-radius:12px;background:rgb(var(--glass),.35)}.settings-sheet__connector-head[data-v-779d567d]{display:flex;align-items:center;gap:10px}.settings-sheet__connector-name[data-v-779d567d]{flex:1;font-weight:600}.settings-sheet__actions[data-v-779d567d]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.settings-sheet__rules[data-v-779d567d]{display:flex;flex-direction:column;gap:6px;margin:0;padding:0 0 0 28px;font-size:13px}.settings-sheet__rule[data-v-779d567d]{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:12px;padding:4px 0;border-bottom:1px solid var(--md-outline-variant)}.settings-sheet__rule-when[data-v-779d567d]{color:var(--md-on-surface-variant);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;overflow-wrap:anywhere}.settings-sheet__rule-then[data-v-779d567d]{overflow-wrap:anywhere}.settings-sheet__rules-note[data-v-779d567d]{margin:0;color:var(--md-on-surface-variant)}.app__shell[data-v-f146b085]{box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:12px 12px 12px 72px}.app__shell>.dashboard[data-v-f146b085]{flex:1 1 auto;min-height:0}@media(min-width:901px){.app__shell>.dashboard.dashboard--fit[data-v-f146b085]{height:auto}}@media(max-width:900px){.app__shell[data-v-f146b085]{height:auto}}
@@ -1 +0,0 @@
1
- import{d as v,E as f,o as s,a as o,g as a,F as c,f as t,n as w,u as n,j as u,h,b as y,i as g,_ as k,H as x}from"./_plugin-vue_export-helper-DHr5RHTx.js";import{g as N,S as R,m as b,o as C,i as d}from"./bem-COKTjsky.js";const E={class:"app report-page"},S={key:0,class:"empty"},T={class:"report-page__head"},V={class:"report-page__id"},B={class:"report-page__title"},L={class:"report-page__meta"},P={class:"report-page__section"},W={class:"report-page__text"},A={class:"report-page__section"},D={key:0,class:"report-page__unanswered"},F={key:1,class:"empty"},I={class:"report-page__answer-meta"},U={class:"report-page__text"},j=v({__name:"ReportPage",setup(H){const r=new URLSearchParams(location.search).get("id")||"",e=g(null),p=g(r?"Loading…":"No report id in the link.");return f(()=>{r&&(document.title=r+" · Your report · Whose Turn",N("/api/feedback?id="+encodeURIComponent(r)).then(l=>{e.value=l.report||null,p.value=l.report?"":"No report "+r+" was filed from this machine."}).catch(()=>{p.value=R+"; reload this page once it is back."}))}),(l,i)=>(s(),o("main",E,[e.value?(s(),o(c,{key:1},[t("header",T,[t("span",V,a(e.value.id),1),t("h1",B,a(e.value.title),1),t("span",{class:w(["pill",n(b)("pill",n(C)(e.value.outcome))])},a(e.value.state||"filed, not yet seen"),3)]),t("p",L,[u(a(e.value.kind||"report")+" · filed "+a(n(d)(e.value.filed_at)),1),e.value.changed_at?(s(),o(c,{key:0},[u(" · last change "+a(n(d)(e.value.changed_at)),1)],64)):h("",!0)]),t("section",P,[i[0]||(i[0]=t("h2",{class:"report-page__heading"},"What you reported",-1)),t("p",W,a(e.value.body||"(no text kept)"),1)]),t("section",A,[i[1]||(i[1]=t("h2",{class:"report-page__heading"},"Answers",-1)),e.value.unanswered?(s(),o("p",D," Closed without an answer. The maintainer owes you a reason; this page will show it once it is written. ")):e.value.answers.length?h("",!0):(s(),o("p",F,"No answer yet.")),(s(!0),o(c,null,y(e.value.answers,(_,m)=>(s(),o("article",{key:m,class:"report-page__answer"},[t("p",I,a(_.by||"maintainer")+" · "+a(n(d)(_.at)),1),t("p",U,a(_.text),1)]))),128))])],64)):(s(),o("p",S,a(p.value),1))]))}}),z=k(j,[["__scopeId","data-v-167de311"]]);x(z).mount("#app");
@@ -1 +0,0 @@
1
- .report-page[data-v-167de311]{box-sizing:border-box;max-width:720px;margin:40px auto;padding:28px 32px;border:1px solid var(--md-outline-variant);border-radius:16px;background:var(--md-surface);color:var(--md-on-surface);font-family:var(--md-font);font-size:14px;line-height:1.5}.report-page__head[data-v-167de311]{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.report-page__title[data-v-167de311]{flex:1;min-width:0;margin:0;font-size:20px;font-weight:600}.report-page__id[data-v-167de311]{color:var(--md-primary);font-weight:700}.report-page__meta[data-v-167de311]{margin:6px 0 20px;color:var(--md-on-surface-variant);font-size:13px}.report-page__heading[data-v-167de311]{margin:18px 0 8px;color:var(--md-on-surface-variant);font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.report-page__text[data-v-167de311]{margin:0;white-space:pre-wrap}.report-page__answer[data-v-167de311]{padding:10px 0;border-top:1px solid var(--md-outline-variant)}.report-page__answer-meta[data-v-167de311]{margin:0 0 4px;color:var(--md-on-surface-variant);font-size:12px}.report-page__unanswered[data-v-167de311]{margin:0;padding:10px 12px;border-radius:8px;background:var(--md-error-container);color:var(--md-on-error-container);font-weight:600}
@@ -1 +0,0 @@
1
- import{w as I,J as Q,K as Y,L as S,M as Xe,N as Ae,O as He,i as we,C as _e,P as ne,Q as ke,R as Ne,S as Se,E as Le,T as Ce,x as We,B as Pe,c as A,u as Ie,r as ge}from"./_plugin-vue_export-helper-DHr5RHTx.js";function F(e,t){return Se()?(Ce(e,t),!0):!1}const Z=new WeakMap,ze=(...e)=>{var t;const a=e[0],n=(t=ne())===null||t===void 0?void 0:t.proxy,i=n??Se();if(i==null&&!ke())throw new Error("injectLocal must be called in setup");return i&&Z.has(i)&&a in Z.get(i)?Z.get(i)[a]:Ne(...e)},q=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Fe=e=>e!=null,Be=Object.prototype.toString,Ve=e=>Be.call(e)==="[object Object]",T=()=>{};function $e(...e){if(e.length!==1)return Ae(...e);const t=e[0];return typeof t=="function"?He(Xe(()=>({get:t,set:T}))):we(t)}function ie(e,t){function a(...n){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(i).catch(o)})}return"cancel"in e&&Object.assign(a,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),a}const Ee=e=>e();function qe(e,t={}){let a,n,i=T,o=T;const s=S(!1),r=c=>{clearTimeout(c),i(),i=T};let d;return Object.assign(c=>{const u=Y(e),l=Y(t.maxWait);return a&&r(a),u<=0||l!==void 0&&l<=0?(n&&(r(n),n=void 0),s.value=!1,Promise.resolve(c())):(s.value=!0,new Promise((h,g)=>{i=t.rejectOnCancel?g:h,o=h,d=c,l&&!n&&(n=setTimeout(()=>{a&&r(a),n=void 0,s.value=!1,h(d())},l)),a=setTimeout(()=>{n&&r(n),n=void 0,s.value=!1,h(c())},u)}))},{cancel:()=>{a&&(r(a),a=void 0),n&&(r(n),n=void 0),s.value=!1,o=T},flush:()=>{if(s.value){a&&(clearTimeout(a),a=void 0),n&&(clearTimeout(n),n=void 0),s.value=!1;const c=o;i=T,o=T,c(d())}},isPending:Q(s)})}function Je(...e){let t=0,a,n=!0,i=T,o,s,r,d,p;!We(e[0])&&typeof e[0]=="object"?{delay:s,trailing:r=!0,leading:d=!0,rejectOnCancel:p=!1}=e[0]:[s,r=!0,d=!0,p=!1]=e;const c=()=>{a&&(clearTimeout(a),a=void 0,i(),i=T)};return l=>{const h=Y(s),g=Date.now()-t,f=()=>o=l();return c(),h<=0?(t=Date.now(),f()):(g>h?(t=Date.now(),(d||!n)&&f()):r&&(o=new Promise((v,R)=>{i=p?R:v,a=setTimeout(()=>{t=Date.now(),n=!0,v(f()),c()},Math.max(0,h-g))})),!d&&!a&&(a=setTimeout(()=>n=!0,h)),n=!1,o)}}function Ke(e=Ee,t={}){const{initialState:a="active"}=t,n=$e(a==="active");function i(){n.value=!1}function o(){n.value=!0}const s=(...r)=>{n.value&&e(...r)};return{isActive:Q(n),pause:i,resume:o,eventFilter:s}}function pe(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function V(e){return Array.isArray(e)?e:[e]}function Ue(e){return ne()}function Z0(e,t=1e4){return Xe((a,n)=>{let i=Y(e),o;const s=()=>setTimeout(()=>{i=Y(e),n()},Y(t));return F(()=>{clearTimeout(o)}),{get(){return a(),i},set(r){i=r,n(),clearTimeout(o),o=s()}}})}function Ge(e,t=200,a={}){return ie(qe(t,a),e)}function Qe(e,t=200,a=!0,n=!0,i=!1){return ie(Je(t,a,n,i),e)}function Ze(e,t,a={}){const{eventFilter:n=Ee,...i}=a;return I(e,ie(n,t),i)}function et(e,t,a={}){const{eventFilter:n,initialState:i="active",...o}=a,{eventFilter:s,pause:r,resume:d,isActive:p}=Ke(n,{initialState:i});return{stop:Ze(e,t,{...o,eventFilter:s}),pause:r,resume:d,isActive:p}}function oe(e,t=!0,a){Ue()?Le(e,a):t?e():_e(e)}function ea(e,t=1e3,a={}){const{immediate:n=!0,immediateCallback:i=!1}=a;let o=null;const s=S(!1);function r(){o&&(clearInterval(o),o=null)}function d(){s.value=!1,r()}function p(){const c=Y(t);c<=0||(s.value=!0,i&&e(),r(),s.value&&(o=setInterval(e,c)))}return n&&q&&p(),(We(t)||typeof t=="function")&&F(I(t,()=>{s.value&&q&&p()})),F(d),{isActive:Q(s),pause:d,resume:p}}function tt(e,t,a){return I(e,t,{...a,immediate:!0})}const $=q?window:void 0;function N(e){var t;const a=Y(e);return(t=a==null?void 0:a.$el)!==null&&t!==void 0?t:a}function B(...e){const t=(n,i,o,s)=>(n.addEventListener(i,o,s),()=>n.removeEventListener(i,o,s)),a=A(()=>{const n=V(Y(e[0])).filter(i=>i!=null);return n.every(i=>typeof i!="string")?n:void 0});return tt(()=>{var n,i;return[(n=(i=a.value)===null||i===void 0?void 0:i.map(o=>N(o)))!==null&&n!==void 0?n:[$].filter(o=>o!=null),V(Y(a.value?e[1]:e[0])),V(Ie(a.value?e[2]:e[1])),Y(a.value?e[3]:e[2])]},([n,i,o,s],r,d)=>{if(!(n!=null&&n.length)||!(i!=null&&i.length)||!(o!=null&&o.length))return;const p=Ve(s)?{...s}:s,c=n.flatMap(u=>i.flatMap(l=>o.map(h=>t(u,l,h,p))));d(()=>{c.forEach(u=>u())})},{flush:"post"})}function at(){const e=S(!1),t=ne();return t&&Le(()=>{e.value=!0},t),e}function se(e){const t=at();return A(()=>(t.value,!!e()))}function nt(e,t,a={}){const{window:n=$,...i}=a;let o;const s=se(()=>n&&"MutationObserver"in n),r=()=>{o&&(o.disconnect(),o=void 0)},d=A(()=>{const l=Y(e),h=V(l).map(N).filter(Fe);return new Set(h)}),p=I(d,l=>{r(),s.value&&l.size&&(o=new MutationObserver(t),l.forEach(h=>o.observe(h,i)))},{immediate:!0,flush:"post"}),c=()=>o==null?void 0:o.takeRecords(),u=()=>{p(),r()};return F(u),{isSupported:s,stop:u,takeRecords:c}}function it(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ta(...e){let t,a,n={};e.length===3?(t=e[0],a=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,a=e[0],n=e[1]):(t=e[0],a=e[1]):(t=!0,a=e[0]);const{target:i=$,eventName:o="keydown",passive:s=!1,dedupe:r=!1}=n,d=it(t);return B(i,o,c=>{c.repeat&&Y(r)||d(c)&&a(c)},s)}function ot(e,t={}){const{immediate:a=!0,fpsLimit:n=null,window:i=$,once:o=!1}=t,s=S(!1),r=A(()=>{const h=Y(n);return h?1e3/h:null});let d=0,p=null;function c(h){if(!s.value||!i)return;d||(d=h);const g=h-d;if(r.value&&g<r.value){p=i.requestAnimationFrame(c);return}if(d=h,e({delta:g,timestamp:h}),o){s.value=!1,p=null;return}p=i.requestAnimationFrame(c)}function u(){!s.value&&i&&(s.value=!0,d=0,p=i.requestAnimationFrame(c))}function l(){s.value=!1,p!=null&&i&&(i.cancelAnimationFrame(p),p=null)}return a&&u(),F(l),{isActive:Q(s),pause:l,resume:u}}const st=Symbol("vueuse-ssr-width");function rt(){const e=ke()?ze(st,null):null;return typeof e=="number"?e:void 0}function lt(e,t={}){const{window:a=$,ssrWidth:n=rt()}=t,i=se(()=>a&&"matchMedia"in a&&typeof a.matchMedia=="function"),o=S(typeof n=="number"),s=S(),r=S(!1),d=p=>{r.value=p.matches};return Pe(()=>{if(o.value){o.value=!i.value;const p=Y(e).split(",");r.value=p.some(c=>{const u=c.includes("not all"),l=c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),h=c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(l||h);return l&&g&&(g=n>=pe(l[1])),h&&g&&(g=n<=pe(h[1])),u?!g:g});return}i.value&&(s.value=a.matchMedia(Y(e)),r.value=s.value.matches)}),B(s,"change",d,{passive:!0}),A(()=>r.value)}const J=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},K="__vueuse_ssr_handlers__",dt=ut();function ut(){return K in J||(J[K]=J[K]||{}),J[K]}function ct(e,t){return dt[e]||t}function ht(e){return lt("(prefers-color-scheme: dark)",e)}function gt(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const pt={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},be="vueuse-storage";function je(e,t,a,n={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:r=!0,writeDefaults:d=!0,mergeDefaults:p=!1,shallow:c,window:u=$,eventFilter:l,onError:h=b=>{console.error(b)},initOnMounted:g}=n,f=(c?S:we)(typeof t=="function"?t():t),v=A(()=>Y(e));if(!a)try{a=ct("getDefaultStorage",()=>$==null?void 0:$.localStorage)()}catch(b){h(b)}if(!a)return f;const R=Y(t),w=gt(R),X=(i=n.serializer)!==null&&i!==void 0?i:pt[w],{pause:_,resume:H}=et(f,b=>O(b),{flush:o,deep:s,eventFilter:l});I(v,()=>D(),{flush:o});let W=!1;const E=b=>{g&&!W||D(b)},j=b=>{g&&!W||C(b)};u&&r&&(a instanceof Storage?B(u,"storage",E,{passive:!0}):B(u,be,j)),g?oe(()=>{W=!0,D()}):D();function y(b,m){if(u){const k={key:v.value,oldValue:b,newValue:m,storageArea:a};u.dispatchEvent(a instanceof Storage?new StorageEvent("storage",k):new CustomEvent(be,{detail:k}))}}function O(b){try{const m=a.getItem(v.value);if(b==null)y(m,null),a.removeItem(v.value);else{const k=X.write(b);m!==k&&(a.setItem(v.value,k),y(m,k))}}catch(m){h(m)}}function L(b){const m=b?b.newValue:a.getItem(v.value);if(m==null)return d&&R!=null&&a.setItem(v.value,X.write(R)),R;if(!b&&p){const k=X.read(m);return typeof p=="function"?p(k,R):w==="object"&&!Array.isArray(k)?{...R,...k}:k}else return typeof m!="string"?m:X.read(m)}function D(b){if(!(b&&b.storageArea!==a)){if(b&&b.key==null){f.value=R;return}if(!(b&&b.key!==v.value)){_();try{const m=X.write(f.value);(b===void 0||(b==null?void 0:b.newValue)!==m)&&(f.value=L(b))}catch(m){h(m)}finally{b?_e(H):H()}}}}function C(b){D(b.detail)}return f}function bt(e,t,a={}){const{window:n=$,...i}=a;let o;const s=se(()=>n&&"ResizeObserver"in n),r=()=>{o&&(o.disconnect(),o=void 0)},d=A(()=>{const u=Y(e);return Array.isArray(u)?u.map(l=>N(l)):[N(u)]}),p=I(d,u=>{if(r(),s.value&&n){o=new ResizeObserver(t);for(const l of u)l instanceof Element&&o.observe(l,i)}},{immediate:!0,flush:"post"}),c=()=>{r(),p()};return F(c),{isSupported:s,stop:c}}function aa(e,t={width:0,height:0},a={}){const{window:n=$,box:i="content-box"}=a,o=A(()=>{var u;return(u=N(e))===null||u===void 0||(u=u.namespaceURI)===null||u===void 0?void 0:u.includes("svg")}),s=S(t.width),r=S(t.height),{stop:d}=bt(e,([u])=>{const l=i==="border-box"?u.borderBoxSize:i==="content-box"?u.contentBoxSize:u.devicePixelContentBoxSize;if(n&&o.value){const h=N(e);if(h){const g=h.getBoundingClientRect();s.value=g.width,r.value=g.height}}else if(l){const h=V(l);s.value=h.reduce((g,{inlineSize:f})=>g+f,0),r.value=h.reduce((g,{blockSize:f})=>g+f,0)}else s.value=u.contentRect.width,r.value=u.contentRect.height},a);oe(()=>{const u=N(e);if(u&&"offsetWidth"in u)if(i==="content-box"&&n){const l=n.getComputedStyle(u),h=Number.parseFloat(l.paddingLeft)+Number.parseFloat(l.paddingRight),g=Number.parseFloat(l.paddingTop)+Number.parseFloat(l.paddingBottom),f=Number.parseFloat(l.borderLeftWidth)+Number.parseFloat(l.borderRightWidth),v=Number.parseFloat(l.borderTopWidth)+Number.parseFloat(l.borderBottomWidth);s.value=u.offsetWidth-h-f,r.value=u.offsetHeight-g-v}else s.value=u.offsetWidth,r.value=u.offsetHeight;else u&&(s.value=t.width,r.value=t.height)});const p=I(()=>N(e),u=>{s.value=u?t.width:0,r.value=u?t.height:0});function c(){d(),p()}return{width:s,height:r,stop:c}}function ft(e){return e===!0?{}:e}const yt="message";function na(e,t=[],a={}){const n=S(null),i=S(null),o=S("CONNECTING"),s=S(null),r=S(null),d=$e(e),p=S(null);let c=!1,u=0;const{withCredentials:l=!1,immediate:h=!0,autoConnect:g=!0,autoReconnect:f,serializer:v={read:_=>_}}=a,R=()=>{q&&s.value&&(s.value.close(),s.value=null,o.value="CLOSED",c=!0)},w=()=>{if(c||typeof d.value>"u")return;const _=new EventSource(d.value,{withCredentials:l});o.value="CONNECTING",s.value=_,_.onopen=()=>{o.value="OPEN",r.value=null},_.onerror=H=>{if(o.value="CLOSED",r.value=H,_.readyState===2&&!c&&f){_.close();const{retries:W=-1,delay:E=1e3,onFailed:j}=ft(f);u+=1,typeof W=="number"&&(W<0||u<W)||typeof W=="function"&&W()?setTimeout(w,E):j==null||j()}},t=t.length>0?t:[yt];for(const H of t)B(_,H,W=>{var E,j;n.value=H,i.value=(E=v.read(W.data))!==null&&E!==void 0?E:null,p.value=(j=W.lastEventId)!==null&&j!==void 0?j:null},{passive:!0})},X=()=>{q&&(R(),c=!1,u=0,w())};return h&&X(),g&&I(d,X),F(R),{eventSource:s,event:n,data:i,status:o,error:r,open:X,close:R,lastEventId:p}}const fe=1;function ia(e,t={}){const{throttle:a=0,idle:n=200,onStop:i=T,onScroll:o=T,offset:s={left:0,right:0,top:0,bottom:0},observe:r={mutation:!1},eventListenerOptions:d={capture:!1,passive:!0},behavior:p="auto",window:c=$,onError:u=y=>{console.error(y)}}=t,l=typeof r=="boolean"?{mutation:r}:r,h=S(0),g=S(0),f=A({get(){return h.value},set(y){R(y,void 0)}}),v=A({get(){return g.value},set(y){R(void 0,y)}});function R(y,O){var L,D,C,b;if(!c)return;const m=Y(e);if(!m)return;(L=m instanceof Document?c.document.body:m)===null||L===void 0||L.scrollTo({top:(D=Y(O))!==null&&D!==void 0?D:v.value,left:(C=Y(y))!==null&&C!==void 0?C:f.value,behavior:Y(p)});const k=(m==null||(b=m.document)===null||b===void 0?void 0:b.documentElement)||(m==null?void 0:m.documentElement)||m;f!=null&&(h.value=k.scrollLeft),v!=null&&(g.value=k.scrollTop)}const w=S(!1),X=ge({left:!0,right:!1,top:!0,bottom:!1}),_=ge({left:!1,right:!1,top:!1,bottom:!1}),H=y=>{w.value&&(w.value=!1,_.left=!1,_.right=!1,_.top=!1,_.bottom=!1,i(y))},W=Ge(H,a+n),E=y=>{var O;if(!c)return;const L=(y==null||(O=y.document)===null||O===void 0?void 0:O.documentElement)||(y==null?void 0:y.documentElement)||N(y),{display:D,flexDirection:C,direction:b}=c.getComputedStyle(L),m=b==="rtl"?-1:1,k=L.scrollLeft;_.left=k<h.value,_.right=k>h.value;const de=Math.abs(k*m)<=(s.left||0),ue=Math.abs(k*m)+L.clientWidth>=L.scrollWidth-(s.right||0)-fe;D==="flex"&&C==="row-reverse"?(X.left=ue,X.right=de):(X.left=de,X.right=ue),h.value=k;let z=L.scrollTop;y===c.document&&!z&&(z=c.document.body.scrollTop),_.top=z<g.value,_.bottom=z>g.value;const ce=Math.abs(z)<=(s.top||0),he=Math.abs(z)+L.clientHeight>=L.scrollHeight-(s.bottom||0)-fe;D==="flex"&&C==="column-reverse"?(X.top=he,X.bottom=ce):(X.top=ce,X.bottom=he),g.value=z},j=y=>{var O;if(!c)return;const L=(O=y.target.documentElement)!==null&&O!==void 0?O:y.target;E(L),w.value=!0,W(y),o(y)};return B(e,"scroll",a?Qe(j,a,!0,!1):j,d),oe(()=>{try{const y=Y(e);if(!y)return;E(y)}catch(y){u(y)}}),l!=null&&l.mutation&&e!=null&&e!==c&&e!==document&&nt(e,()=>{const y=Y(e);y&&E(y)},{attributes:!0,childList:!0,subtree:!0}),B(e,"scrollend",H,d),{x:f,y:v,isScrolling:w,arrivedState:X,directions:_,measure(){const y=Y(e);c&&y&&E(y)}}}function oa(e,t,a={}){const{window:n=$}=a;return je(e,t,n==null?void 0:n.localStorage,a)}function sa(e={}){const{controls:t=!1,scheduler:a=ot}=e,n=S(new Date),o=a(()=>n.value=new Date);return t?{now:n,...o}:n}function ra(e,t,a={}){const{window:n=$}=a;return je(e,t,n==null?void 0:n.sessionStorage,a)}const mt=e=>{let t=e>>>0;return()=>{t=t+1831565813>>>0;let a=t;return a=Math.imul(a^a>>>15,a|1),a^=a+Math.imul(a^a>>>7,a|61),((a^a>>>14)>>>0)/4294967296}},la=e=>{const t=mt(e),a=(n,i)=>n+(i-n)*t();return{next:t,range:a,int:(n,i)=>Math.floor(a(n,i+1)),chance:n=>t()<n,vary:(n,i=.12)=>n*a(1-i,1+i)}},De=(e,t=0,a=1)=>Math.min(a,Math.max(t,e)),Oe=(e,t,a)=>e+(t-e)*a,U=/\s*(?:(\d+\.?\d*(?:e[+-]?\d+)?|\.\d+)|([A-Za-z_]\w*)|(<=|>=|==|!=|[-+*/%<>(),[\]]))/iy,vt=e=>{const t=e.trim(),a=[];for(U.lastIndex=0;U.lastIndex<t.length;){const n=U.exec(t);if(!n)throw new Error(`cannot read "${t.slice(U.lastIndex).trim()}" in expression "${t}"`);a.push(n[1]!==void 0?{number:Number(n[1])}:n[2]!==void 0?{name:n[2]}:{op:n[3]})}return a},ee={"<":[1,(e,t)=>e<t],">":[1,(e,t)=>e>t],"<=":[1,(e,t)=>e<=t],">=":[1,(e,t)=>e>=t],"==":[1,(e,t)=>e===t],"!=":[1,(e,t)=>e!==t],"+":[2,(e,t)=>e+t],"-":[2,(e,t)=>e-t],"*":[3,(e,t)=>e*t],"/":[3,(e,t)=>e/t],"%":[3,(e,t)=>e%t]},Yt={range:(e,t,a)=>e.random.range(t,a),int:(e,t,a)=>e.random.int(t,a),chance:(e,t)=>e.random.chance(t),vary:(e,t,a)=>e.random.vary(t,a),cos:(e,t)=>Math.cos(t),sin:(e,t)=>Math.sin(t),sqrt:(e,t)=>Math.sqrt(t),abs:(e,t)=>Math.abs(t),hypot:(e,...t)=>Math.hypot(...t),min:(e,...t)=>Math.min(...t),max:(e,...t)=>Math.max(...t),lerp:(e,t,a,n)=>Oe(t,a,n),clamp:(e,t,a,n)=>De(t,a,n),len:(e,t)=>t.length},ye=new Map,Rt=e=>{const t=ye.get(e);if(t)return t;const a=vt(e);let n=0;const i=()=>a[n],o=()=>a[n++],s=l=>{const h=o();if(!h||h.op!==l)throw new Error(`expected "${l}" in expression "${e}"`)},r=()=>{const l=[];if(i()&&i().op===")")return o(),l;do l.push(c(0));while(i()&&i().op===","&&o());return s(")"),l},d=()=>{const l=o();if(!l)throw new Error(`expression "${e}" ends early`);const h=l.number;if(h!==void 0)return()=>h;if(l.op==="-"){const g=p();return(f,v)=>-g(f,v)}if(l.op==="("){const g=c(0);return s(")"),g}if(l.name!==void 0){const g=l.name;if(i()&&i().op==="("){o();const f=r();if(g==="if")return(R,w)=>f[0](R,w)?f[1](R,w):f[2](R,w);const v=Yt[g];if(!v)throw new Error(`unknown function "${g}" in expression "${e}"`);return(R,w)=>v(w,...f.map(X=>X(R,w)))}return g==="PI"?()=>Math.PI:f=>{if(!(g in f))throw new Error(`unknown name "${g}" in expression "${e}"`);return f[g]}}throw new Error(`unexpected "${l.op}" in expression "${e}"`)},p=()=>{let l=d();for(;i()&&i().op==="[";){o();const h=c(0);s("]");const g=l;l=(f,v)=>g(f,v)[h(f,v)]}return l},c=l=>{let h=p();for(;i()&&ee[i().op??""]&&ee[i().op??""][0]>=l;){const[g,f]=ee[o().op??""],v=c(g+1),R=h;h=(w,X)=>f(R(w,X),v(w,X))}return h},u=c(0);if(n<a.length)throw new Error(`unexpected "${JSON.stringify(a[n])}" in expression "${e}"`);return ye.set(e,u),u},te=e=>Object.create(e),P=(e,t,a)=>{const n=Object.keys(e).filter(i=>!t.includes(i));if(n.length)throw new Error(`${a} has unknown key "${n[0]}"`)},x=(e,t,a)=>{if(typeof e=="number")return e;if(typeof e=="string")return Rt(e)(t,a);if(Array.isArray(e))return e.map(n=>x(n,t,a));if(e&&typeof e=="object"&&"if"in e)return P(e,["if","then","else"],"value {if}"),x(x(e.if,t,a)?e.then:e.else,t,a);if(e&&typeof e=="object"&&e.map){const n=e.map;return P(n,["count","values","as","let","value"],"value {map}"),Me(n,t,a).map(i=>(re(n.let,i,a),x(n.value,i,a)))}throw new Error(`cannot evaluate ${JSON.stringify(e)}`)},re=(e,t,a)=>{Object.entries(e||{}).forEach(([n,i])=>{t[n]=x(i,t,a)})},Me=(e,t,a)=>(e.values!==void 0?x(e.values,t,a):Array.from({length:x(e.count,t,a)},(i,o)=>o)).map((i,o)=>{const s=te(t);return s.index=o,e.as&&(s[e.as]=i),s}),me={ellipse:e=>{const[t,a,n,i,o=0]=e;return{kind:"ellipse",x:t,y:a,radiusX:n,radiusY:i,angle:o}},circle:e=>{const[t,a,n]=e;return{kind:"ellipse",x:t,y:a,radiusX:n,radiusY:n,angle:0}},polygon:e=>({kind:"polygon",points:e}),blob:e=>({kind:"blob",points:e}),tube:(e,t,a,n)=>({kind:"tube",points:e,radii:[].concat(x(t.radii,a,n))})},G=(e,t,a,n)=>{e.forEach(i=>{const o=Object.keys(me).find(s=>s in i);if(o){P(i,[o,"radii","cut","part"],`shape {${o}}`);const s=me[o](x(i[o],t,a),i,t,a);n.push(i.cut?Object.assign({},s,{cut:!0}):s)}else if("let"in i)P(i,["let","part"],"statement {let}"),re(i.let,t,a);else if("repeat"in i){P(i,["repeat","part"],"statement {repeat}");const s=i.repeat;P(s,["count","values","as","body"],"repeat"),Me(s,t,a).forEach(r=>G(s.body||[],r,a,n))}else if("if"in i)P(i,["if","then","else","part"],"statement {if}"),G((x(i.if,t,a)?i.then:i.else)||[],te(t),a,n);else if("use"in i){P(i,["use","with","part"],"statement {use}");const s=a.defs[i.use];if(!s)throw new Error(`unknown def "${i.use}"`);const r=te(t);Object.entries(i.with||{}).forEach(([d,p])=>{r[d]=x(p,t,a)}),G(s,r,a,n)}else throw new Error(`unknown statement ${JSON.stringify(i)}`)})},Xt=(e,t)=>{const a={...e};return Object.entries(t||{}).forEach(([n,i])=>{const o=a[n]||{};a[n]={...o,...i,params:{...o.params,...i.params},drop:[...o.drop||[],...i.drop||[]],body:[...o.body||[],...i.body||[]]}}),a},ve=new WeakMap,le=(e,t,a=[])=>{const n=ve.get(e)||new Map;ve.set(e,n);const i=n.get(t);if(i)return i;const o=e[t];if(!o)throw new Error(`unknown species "${t}"`);if(a.includes(t))throw new Error(`species "${t}" extends itself through ${a.join(" > ")}`);const s=o.extends?le(e,o.extends,[...a,t]):{params:{},defs:{},body:[],poses:{}},r={name:t,params:{...s.params,...o.params},defs:{...s.defs,...o.defs},body:[...s.body.filter(d=>!(o.drop||[]).includes(d.part??"")),...o.body||[]],poses:Xt(s.poses,o.poses)};return n.set(t,r),r},Te=e=>Object.entries(e.poses).map(([t,a])=>[t,a.weight===void 0?1:a.weight]).filter(([,t])=>t>0),wt=(e,t)=>{if(e.length<2)return e.length?e[0][0]:"";let a=t.next()*e.reduce((i,[,o])=>i+o,0);return(e.find(([,i])=>(a-=i,a<0))||e[e.length-1])[0]},da=(e,t,a,n={})=>{const i=le(e,t),o=Te(i),s=n.pose&&o.some(([l])=>l===n.pose)?n.pose:wt(o,a),r=i.poses[s]||{},d=new Set(r.drop||[]),p={random:a,defs:i.defs},c={},u=[];try{re({...i.params,...r.params},c,p),G([...i.body.filter(l=>!d.has(l.part??"")),...r.body||[]],c,p,u)}catch(l){throw new Error(`species "${t}"${s?` (pose ${s})`:""}: ${l.message}`,{cause:l})}return{shapes:u,pose:s}},ua=e=>Object.keys(e).filter(t=>!e[t].abstract),ca=(e,t)=>{const a=Te(le(e,t)).map(([n])=>n);return a.length?a:[""]},M=256,ae=2.6,Ye=M/ae,_t=(e,t,a,n,i)=>{const o=i*i,s=o*i,r=d=>.5*(2*t[d]+(-e[d]+a[d])*i+(2*e[d]-5*t[d]+4*a[d]-n[d])*o+(-e[d]+3*t[d]-3*a[d]+n[d])*s);return[r(0),r(1)]},Re=(e,t,a)=>{const n=e.length,i=r=>t?e[(r+n)%n]:e[De(r,0,n-1)],o=t?n:n-1,s=[];for(let r=0;r<o;r+=1)for(let d=0;d<a;d+=1)s.push(_t(i(r-1),i(r),i(r+1),i(r+2),d/a));return t||s.push(e[n-1]),s},kt=(e,t)=>{if(e.length===1)return e[0];const a=t*(e.length-1),n=Math.min(e.length-2,Math.floor(a));return Oe(e[n],e[n+1],a-n)},xe=(e,t)=>{if(e.globalCompositeOperation=t.cut?"destination-out":"source-over",e.beginPath(),t.kind==="ellipse")e.ellipse(t.x,t.y,t.radiusX,t.radiusY,t.angle,0,Math.PI*2),e.fill();else if(t.kind==="polygon"||t.kind==="blob")(t.kind==="blob"?Re(t.points,!0,12):t.points).forEach(([n,i],o)=>o===0?e.moveTo(n,i):e.lineTo(n,i)),e.closePath(),e.fill();else if(t.kind==="tube"){const a=Re(t.points,!1,24);a.forEach(([n,i],o)=>{const s=kt(t.radii,o/Math.max(1,a.length-1));e.moveTo(n+s,i),e.arc(n,i,s,0,Math.PI*2)}),e.fill()}},ha=(e,t)=>{const a=document.createElement("canvas");a.width=M,a.height=M;const n=a.getContext("2d",{willReadFrequently:!0});if(!n)return new Uint8Array(M*M);n.translate(M/2,M/2),n.scale(Ye*t.facing*t.stretchX,Ye*t.stretchY),n.rotate(t.tilt),n.fillStyle="#000",e.forEach(s=>xe(n,s));const i=n.getImageData(0,0,M,M).data,o=new Uint8Array(M*M);for(let s=0;s<o.length;s+=1)o[s]=i[s*4+3]>127?1:0;return o},ga=(e,t,a)=>{const n=e.getContext("2d");n&&(n.clearRect(0,0,e.width,e.height),n.save(),n.translate(e.width/2,e.height/2),n.scale(e.width/ae,e.width/ae),n.fillStyle=a,t.forEach(i=>xe(n,i)),n.restore())},St=!0,Lt={groundY:.8,bodyRadiusX:"range(0.4, 0.46)",bodyRadiusY:"range(0.27, 0.32)",bodyAngle:-.45,legLength:"range(0.28, 0.34)",bodyY:"groundY - legLength - bodyRadiusY",headRadius:"range(0.15, 0.18)",headX:"bodyRadiusX * 0.55",headY:"bodyY - bodyRadiusY * 0.95 - headRadius * 0.4",neckWidth:"headRadius * 0.85",beakLength:"range(0.17, 0.23)",beakHeight:.09,tailLength:"range(0.3, 0.4)",tailSpread:.14,tailDrop:.18,legWidth:.022,wingWidth:.12},Wt=[{ellipse:[0,"bodyY","bodyRadiusX","bodyRadiusY","bodyAngle"],part:"body"},{tube:[["bodyRadiusX * 0.25","bodyY - bodyRadiusY * 0.4"],["headX","headY + headRadius * 0.4"]],radii:["bodyRadiusY * 0.7","neckWidth"],part:"neck"},{circle:["headX","headY","headRadius"],part:"head"},{polygon:[["headX + headRadius * 0.7","headY - beakHeight * 0.6"],["headX + headRadius + beakLength","headY + beakHeight * 0.3"],["headX + headRadius * 0.7","headY + beakHeight * 0.7"]],part:"head"},{circle:["headX + headRadius * 0.3","headY - headRadius * 0.15",.025],cut:!0,part:"eye"},{polygon:[["-bodyRadiusX * 0.6","bodyY - tailSpread * 0.4"],["-bodyRadiusX * 0.6 - tailLength","bodyY + tailDrop - tailSpread"],["-bodyRadiusX * 0.6 - tailLength * 0.95","bodyY + tailDrop + tailSpread * 0.4"],["-bodyRadiusX * 0.3","bodyY + tailSpread * 0.6"]],part:"tail"},{tube:[["-bodyRadiusX * 0.55","bodyY - bodyRadiusY * 0.15"],["-bodyRadiusX * 0.1","bodyY + bodyRadiusY * 0.3"],["bodyRadiusX * 0.35","bodyY - bodyRadiusY * 0.05"]],radii:.012,cut:!0,part:"wing"},{repeat:{values:[-.08,.1],as:"legShift",body:[{tube:[["legShift","bodyY + bodyRadiusY * 0.6"],["legShift","groundY"]],radii:"legWidth"},{ellipse:["legShift + 0.05","groundY",.07,.02]}]},part:"legs"}],$t={perched:{weight:3},sleeping:{weight:1,params:{headX:"bodyRadiusX * 0.35",headY:"bodyY - bodyRadiusY * 0.55",beakLength:.1,bodyAngle:-.2},drop:["neck","eye","wing"],body:[{tube:[["headX + headRadius * 0.4","headY - headRadius * 0.1"],["headX + headRadius * 0.65","headY - headRadius * 0.05"]],radii:.012,cut:!0}]},front:{weight:1,params:{headX:0,headY:"bodyY - bodyRadiusX * 0.8 - headRadius * 0.2"},drop:["body","neck","head","eye","tail","wing","legs"],body:[{ellipse:[0,"bodyY - 0.02","bodyRadiusY * 1.25","bodyRadiusX * 0.95"]},{circle:["headX","headY","headRadius * 1.1"]},{polygon:[["headX - beakHeight","headY + headRadius * 0.15"],["headX + beakHeight","headY + headRadius * 0.15"],["headX","headY + headRadius * 0.15 + beakLength * 0.6"]]},{repeat:{values:[-1,1],as:"side",body:[{circle:["headX + side * headRadius * 0.45","headY - headRadius * 0.2",.027],cut:!0},{ellipse:["side * bodyRadiusY * 1.15","bodyY + 0.02","wingWidth * 0.9","bodyRadiusX * 0.6","side * -0.15"]},{tube:[["side * 0.1","groundY - legLength"],["side * 0.1","groundY"]],radii:"legWidth"},{ellipse:["side * 0.12","groundY",.07,.02]}]}}]}},Et={abstract:St,params:Lt,body:Wt,poses:$t},jt=!0,Dt={groundY:.7,bodyRadiusX:"range(0.5, 0.56)",bodyRadiusY:"range(0.26, 0.31)",legLength:"range(0.4, 0.5)",legWidth:.07,stride:0,bodyY:"groundY - bodyRadiusY - legLength",headRadiusX:"range(0.19, 0.22)",headRadiusY:"range(0.16, 0.18)",headX:"bodyRadiusX * 0.95",headY:"bodyY - bodyRadiusY * 0.8",neckWidth:"headRadiusY * 0.9",snoutLength:.16,snoutRadius:.08,earHeight:"range(0.16, 0.22)",earWidth:.09,earSpread:"range(0.1, 0.3)",eyeSize:.028,tailLength:"range(0.35, 0.45)",tailLift:"range(0.05, 0.2)",tailWidth:.06},Ot={ears:[{repeat:{values:[-.5,.3],as:"shift",body:[{polygon:[["headX + headRadiusX * shift - earWidth","headY - headRadiusY * 0.5"],["headX + headRadiusX * shift - earWidth * 0.2","headY - headRadiusY * 0.75 - earHeight"],["headX + headRadiusX * shift + earWidth","headY - headRadiusY * 0.7"]]}]}}]},Mt=[{ellipse:[0,"bodyY","bodyRadiusX","bodyRadiusY"],part:"body"},{tube:[["bodyRadiusX * 0.5","bodyY - bodyRadiusY * 0.2"],["headX - headRadiusX * 0.3","headY + headRadiusY * 0.2"]],radii:["bodyRadiusY * 0.8","neckWidth"],part:"neck"},{ellipse:["headX","headY","headRadiusX","headRadiusY"],part:"head"},{ellipse:["headX + headRadiusX * 0.75","headY + headRadiusY * 0.35","snoutLength","snoutRadius"],part:"head"},{use:"ears",part:"head"},{circle:["headX + headRadiusX * 0.4","headY - headRadiusY * 0.15","eyeSize"],cut:!0,part:"eye"},{tube:[["-bodyRadiusX * 0.85","bodyY - bodyRadiusY * 0.2"],["-bodyRadiusX * 0.85 - tailLength * 0.5","bodyY - bodyRadiusY * 0.2 - tailLift * 0.5"],["-bodyRadiusX * 0.85 - tailLength","bodyY - bodyRadiusY * 0.2 - tailLift"]],radii:["tailWidth","tailWidth * 0.9","tailWidth * 0.6"],part:"tail"},{repeat:{values:[-.72,-.5,.4,.68],as:"along",body:[{let:{swing:"if(index % 2 == 0, stride, -stride)",legX:"along * bodyRadiusX",hipY:"bodyY + bodyRadiusY * 0.5"}},{tube:[["legX","hipY"],["legX + swing","(hipY + groundY) / 2"],["legX + swing * 1.2","groundY"]],radii:["legWidth * 1.25","legWidth * 0.9","legWidth * 0.8"]}]},part:"legs"}],Tt={standing:{weight:3},walking:{weight:2,params:{stride:"range(0.06, 0.14)"}},sleeping:{weight:1,params:{legLength:.02,headX:"bodyRadiusX * 0.8",headY:"groundY - headRadiusY",tailLift:.02},drop:["legs","eye","neck"],body:[{ellipse:["bodyRadiusX * 0.55","groundY - 0.05","bodyRadiusX * 0.28",.06]},{tube:[["headX + headRadiusX * 0.2","headY - headRadiusY * 0.1"],["headX + headRadiusX * 0.4","headY"],["headX + headRadiusX * 0.6","headY - headRadiusY * 0.1"]],radii:.012,cut:!0}]},sitting:{weight:1,params:{headX:"bodyRadiusY * 0.5",headY:"groundY - bodyRadiusX * 1.55 - headRadiusY * 0.4"},drop:["body","neck","legs","tail"],body:[{ellipse:["bodyRadiusY * 0.2","groundY - bodyRadiusX * 0.85","bodyRadiusY * 1.05","bodyRadiusX * 0.9",.12]},{ellipse:["-bodyRadiusY * 0.55","groundY - bodyRadiusY * 0.55","bodyRadiusY * 1.2","bodyRadiusY * 0.62"]},{tube:[["bodyRadiusY * 0.75","groundY - bodyRadiusX * 1.0"],["bodyRadiusY * 0.8","groundY"]],radii:"legWidth * 1.1"},{tube:[["-bodyRadiusY * 1.2","groundY - 0.05"],["-bodyRadiusY * 1.2 - tailLength","groundY - 0.03"]],radii:["tailWidth","tailWidth * 0.6"]}]},front:{weight:1,params:{headX:0,headY:"groundY - bodyRadiusX * 1.1 - headRadiusY * 0.9"},drop:["body","neck","head","eye","legs","tail"],body:[{ellipse:[0,"groundY - bodyRadiusX * 0.7","bodyRadiusY * 1.25","bodyRadiusX * 0.75"]},{ellipse:["headX","headY","headRadiusX * 1.15","headRadiusY * 1.1"]},{ellipse:["headX","headY + headRadiusY * 0.45","snoutRadius * 1.5","snoutRadius"]},{repeat:{values:[-1,1],as:"side",body:[{polygon:[["headX + side * headRadiusX * 1.05","headY - headRadiusY * 0.3"],["headX + side * headRadiusX * (0.75 + earSpread)","headY - headRadiusY * 0.8 - earHeight"],["headX + side * headRadiusX * 0.3","headY - headRadiusY * 1.0"]]},{circle:["headX + side * headRadiusX * 0.5","headY - headRadiusY * 0.15","eyeSize * 1.2"],cut:!0},{tube:[["side * bodyRadiusY * 0.55","groundY - bodyRadiusX * 0.4"],["side * bodyRadiusY * 0.55","groundY"]],radii:"legWidth * 1.3"}]}},{circle:["headX","headY + headRadiusY * 0.3","snoutRadius * 0.35"],cut:!0}]}},xt={abstract:jt,params:Dt,defs:Ot,body:Mt,poses:Tt},At=!0,Ht={length:"range(0.85, 0.95)",height:"range(0.36, 0.42)",arch:0,dorsalHeight:"range(0.2, 0.28)",finLength:.22,flukeSpan:.32,eyeX:.58,eyeSize:.035},Nt=[{blob:[["length","arch * 0.6"],["length * 0.55","-height * 0.8 - arch * 0.2"],["-length * 0.2","-height * 0.7 - arch * 0.2"],["-length * 0.75","-height * 0.12 + arch * 0.6"],["-length * 0.75","height * 0.12 + arch * 0.6"],["-length * 0.2","height * 0.8 - arch * 0.4"],["length * 0.5","height * 0.75 - arch * 0.2"]]},{polygon:[["-length * 0.7","arch * 0.6"],["-length - flukeSpan * 0.55","arch * 0.6 - flukeSpan"],["-length - flukeSpan * 0.3","arch * 0.6"],["-length - flukeSpan * 0.55","arch * 0.6 + flukeSpan"]],part:"fluke"},{polygon:[["length * 0.3","-height * 0.75 - arch * 0.2"],["-length * 0.2","-height * 0.7 - arch * 0.2 - dorsalHeight"],["-length * 0.35","-height * 0.65 - arch * 0.2"]]},{ellipse:["length * 0.2","height * 0.6 - arch * 0.3","finLength",.06,.6]},{circle:["length * eyeX","-height * 0.1 + arch * 0.4","eyeSize"],cut:!0}],Ct={cruising:{weight:3},leaping:{weight:0,params:{arch:.38}}},Pt={abstract:At,params:Ht,body:Nt,poses:Ct},It=[{let:{humpHeight:"range(0.18, 0.3)",headDrop:"range(-0.08, 0.12)",legLength:"range(0.68, 0.8)"}},{ellipse:[-.1,0,"vary(0.62, 0.06)","vary(0.38, 0.06)"]},{ellipse:[.2,-.12,.32,"humpHeight + 0.1"]},{ellipse:[.62,"-0.02 + headDrop",.27,.23,.15]},{ellipse:[.82,"0.08 + headDrop",.12,.09,.5]},{circle:[.5,"-0.24 + headDrop",.1]},{circle:[.68,"-0.26 + headDrop",.09]},{circle:[-.72,-.08,.07]},{circle:[.7,"-0.04 + headDrop",.03],cut:!0},{repeat:{values:[-.55,-.3,.15,.36],as:"legX",body:[{tube:[["legX",.15],["legX + range(-0.04, 0.04)","legLength"]],radii:[.14,.12]},{ellipse:["legX + 0.06","legLength + 0.03",.14,.06]}]}}],zt={body:It},Ft={sitting:{weight:.55,body:[{let:{headX:"range(0.12, 0.28)",headY:"range(-0.58, -0.45)",earHeight:"range(0.26, 0.4)",earTilt:"range(-0.08, 0.08)",curlsForward:"chance(0.5)",tailPoints:{if:"curlsForward",then:[[-.5,.78],[-.2,.92],[.25,.9],["range(0.45, 0.6)","range(0.7, 0.85)"]],else:[[-.55,.7],[-.88,.62],["-range(0.9, 1.05)",.3],["-range(0.75, 0.95)","range(-0.05, 0.15)"]]}}},{ellipse:[-.15,.45,"vary(0.48)","vary(0.4)"]},{ellipse:[.1,.05,"vary(0.3)",.5,-.15]},{ellipse:["headX","headY","vary(0.27, 0.08)","vary(0.23, 0.08)"]},{polygon:[["headX - 0.25","headY - 0.04"],["headX - 0.2 + earTilt","headY - 0.12 - earHeight"],["headX - 0.02","headY - 0.18"]]},{polygon:[["headX + 0.04","headY - 0.18"],["headX + 0.22 + earTilt","headY - 0.12 - earHeight"],["headX + 0.27","headY - 0.03"]]},{tube:[[.14,.3],[.16,.86]],radii:.07},{tube:[[.3,.3],[.33,.86]],radii:.065},{tube:"tailPoints",radii:[.075,.07,.065,.055]},{ellipse:["headX - 0.1","headY - 0.01",.045,.03],cut:!0},{ellipse:["headX + 0.1","headY - 0.01",.045,.03],cut:!0}]},walking:{weight:.45,body:[{let:{tailHeight:"range(0.6, 0.95)",tailHook:"range(-0.25, 0.15)",stride:"range(0.05, 0.16)",headY:"range(-0.32, -0.18)"}},{ellipse:[-.05,.05,"vary(0.58, 0.08)","vary(0.22)"]},{ellipse:[.62,"headY",.21,.19]},{polygon:[[.45,"headY - 0.08"],[.47,"headY - 0.38"],[.6,"headY - 0.17"]]},{polygon:[[.64,"headY - 0.17"],[.76,"headY - 0.38"],[.8,"headY - 0.06"]]},{tube:[[-.45,.1],["-0.45 - stride",.42],["-0.42 - stride",.68]],radii:[.08,.055,.05]},{tube:[[-.25,.12],["-0.22 + stride",.45],["-0.2 + stride",.68]],radii:[.07,.05,.05]},{tube:[[.3,.12],["0.3 + stride",.45],["0.32 + stride",.68]],radii:[.07,.05,.05]},{tube:[[.42,.12],["0.42 - stride",.45],["0.43 - stride",.68]],radii:[.07,.05,.05]},{tube:[[-.58,-.02],[-.85,-.25],[-.85,"-tailHeight + 0.2"],["-0.7 + tailHook","-tailHeight"]],radii:[.06,.055,.05,.045]},{ellipse:[.68,"headY - 0.02",.035,.022],cut:!0}]}},Bt={poses:Ft},Vt={antler:[{let:{height:"range(0.42, 0.6)"}},{let:{beam:[["rootX","rootY"],["rootX - 0.1 * spread","rootY - height * 0.4"],["rootX - 0.06 * spread","rootY - height * 0.8"],["rootX + 0.08 * spread","rootY - height"]]}},{tube:"beam",radii:[.04,.036,.032,.026]},{repeat:{count:"int(2, 4)",body:[{let:{anchor:"beam[min(3, index + 1)]",length:"range(0.12, 0.2)"}},{tube:["anchor",["anchor[0] + length * 0.7 * spread","anchor[1] - length"]],radii:[.03,.024]}]}}]},qt=[{let:{neckLean:"range(0.4, 0.55)",headY:"range(-0.55, -0.42)",legLength:"range(0.85, 0.95)",headX:"neckLean + 0.08"}},{ellipse:[-.1,.05,"vary(0.48, 0.06)","vary(0.21, 0.08)"]},{tube:[[.25,0],["neckLean - 0.05",-.25],["neckLean","headY + 0.05"]],radii:[.13,.09,.075]},{ellipse:["headX","headY",.14,.09,.4]},{ellipse:["headX + 0.13","headY + 0.07",.09,.06,.4]},{ellipse:["headX - 0.13","headY - 0.06",.1,.035,-.5]},{ellipse:[-.58,-.04,.07,.04,-.5]},{tube:[[-.45,.12],[-.5,.5],[-.42,"legLength"]],radii:[.055,.035,.03]},{tube:[[-.32,.14],[-.34,.5],[-.3,"legLength"]],radii:[.05,.035,.03]},{tube:[[.2,.15],[.22,.55],[.2,"legLength"]],radii:[.045,.035,.03]},{tube:[[.32,.12],[.36,.52],[.33,"legLength"]],radii:[.045,.035,.03]},{circle:["headX + 0.02","headY - 0.02",.025],cut:!0},{use:"antler",with:{rootX:"headX - 0.06",rootY:"headY - 0.06",spread:-.8}},{use:"antler",with:{rootX:"headX + 0.04",rootY:"headY - 0.06",spread:1.3}}],Jt={defs:Vt,body:qt},Kt={length:"range(0.8, 0.88)",height:"range(0.2, 0.25)",dorsalHeight:.2,flukeSpan:.36,finLength:.2,eyeX:.62,eyeSize:.025},Ut=["fluke"],Gt=[{ellipse:["-length * 0.85","arch * 0.6 - flukeSpan * 0.45","flukeSpan * 0.55",.07,-.95],part:"fluke"},{ellipse:["-length * 0.85","arch * 0.6 + flukeSpan * 0.45","flukeSpan * 0.55",.07,.95],part:"fluke"},{ellipse:["length + 0.03","height * 0.35 + arch * 0.6",.15,.06,.12]}],Qt={leaping:{weight:1}},Zt={extends:"swimmer",params:Kt,drop:Ut,body:Gt,poses:Qt},e0={bodyRadiusX:"range(0.5, 0.56)",bodyRadiusY:"range(0.27, 0.3)",bodyAngle:-.1,legLength:.16,headRadius:.15,headX:"bodyRadiusX * 0.7",headY:"bodyY - bodyRadiusY - 0.12",neckWidth:.1,beakLength:.17,beakHeight:.07,tailLength:.2,tailSpread:.1,tailDrop:-.12,wingWidth:.15},t0={extends:"bird",params:e0},a0=[{let:{earSize:"range(0.9, 1.15)",trunkCurl:"range(-0.1, 0.25)",headY:"range(-0.32, -0.2)",legLength:"range(0.76, 0.86)"}},{ellipse:[-.15,0,"vary(0.6, 0.06)","vary(0.4, 0.06)"]},{ellipse:[.45,"headY",.3,.3]},{tube:[[-.73,-.1],[-.8,.15],[-.8,.38]],radii:[.025,.02,.035]},{repeat:{values:[-.6,-.36,.05,.26],as:"legX",body:[{tube:[["legX",.2],["legX","legLength"]],radii:.12}]}},{tube:[[.6,"headY + 0.28"],[.78,"headY + 0.38"],[.92,"headY + 0.3"]],radii:.035,cut:!0},{tube:[[.68,"headY - 0.02"],[.84,"headY + 0.25"],[.86,"headY + 0.6"],["0.9 + trunkCurl","headY + 0.92"],["1.02 + trunkCurl","headY + 0.85"]],radii:[.12,.1,.075,.055,.045]},{let:{earPoints:{map:{values:[[.12,-.52],[.38,-.6],[.48,-.22],[.38,.16],[.14,.1],[.02,-.2]],as:"point",value:["0.27 + (point[0] - 0.27) * earSize","headY + 0.05 + (point[1] + 0.2) * earSize"]}}}},{blob:"earPoints"},{tube:["earPoints[1]","earPoints[2]","earPoints[3]"],radii:.022,cut:!0},{circle:[.58,"headY - 0.04",.035],cut:!0}],n0={body:a0},i0={height:"range(0.4, 0.48)",dorsalHeight:.22,eyeX:.62,eyeSize:.05},o0={extends:"swimmer",params:i0},s0=["neck"],r0={bodyRadiusX:"range(0.3, 0.34)",bodyRadiusY:.2,bodyAngle:-.12,legLength:"range(0.75, 0.85)",headRadius:.07,headX:"range(0.38, 0.48)",headY:"bodyY - bodyRadiusY - range(0.7, 0.8)",beakLength:.12,beakHeight:.05,tailLength:.12,tailSpread:.06,tailDrop:.02,legWidth:.026,wingWidth:.08},l0=[{tube:[["bodyRadiusX * 0.55","bodyY - bodyRadiusY * 0.4"],["bodyRadiusX * 0.9","bodyY - bodyRadiusY - 0.28"],["headX - 0.14","headY + 0.3"],["headX - 0.02","headY + 0.08"]],radii:[.075,.04,.035,.03],part:"neck"}],d0={sleeping:{weight:0},front:{weight:0}},u0={extends:"bird",drop:s0,params:r0,body:l0,poses:d0},c0=[{let:{earHeight:"range(0.28, 0.4)",snout:"range(0.95, 1.1)",tailDroop:"range(-0.15, 0.25)",tailBush:"range(0.13, 0.19)",legLength:"range(0.6, 0.72)"}},{ellipse:[-.05,.05,"vary(0.48, 0.08)","vary(0.19)"]},{ellipse:[.35,0,.18,.22]},{blob:[[.28,-.12],[.52,-.32],[.72,-.28],["snout",-.12],[.75,-.04],[.48,.14]]},{polygon:[[.48,-.26],[.5,"-0.28 - earHeight"],[.63,-.31]]},{polygon:[[.6,-.3],[.7,"-0.28 - earHeight * 0.95"],[.75,-.25]]},{tube:[[-.45,.02],[-.75,"0.12 + tailDroop * 0.5"],[-1,"0.08 + tailDroop"],[-1.15,"-0.06 + tailDroop"]],radii:[.06,"tailBush","tailBush * 0.85",.025]},{ellipse:[.7,-.17,.035,.022,-.3],cut:!0},{repeat:{values:[-.4,-.25,.28,.4],as:"legX",body:[{let:{step:"if(index % 2 == 0, range(-0.08, 0.08), 0)"}},{tube:[["legX",.12],["legX + step","legLength"]],radii:[.05,.035]}]}}],h0={body:c0},g0=[{let:{bodyY:"range(0.05, 0.15)",bodyRadiusX:"range(0.6, 0.72)",bodyRadiusY:"range(0.3, 0.38)",spikeCount:"int(11, 17)",spikeLength:"range(0.3, 0.45)",sweep:"range(0.2, 0.55)",frontAngle:"PI * range(1.62, 1.75)"}},{ellipse:[0,"bodyY","bodyRadiusX","bodyRadiusY"]},{repeat:{count:"spikeCount",body:[{let:{angle:"lerp(PI * 0.88, frontAngle, index / (spikeCount - 1)) + range(-0.04, 0.04)",baseX:"cos(angle) * bodyRadiusX * 0.9",baseY:"bodyY + sin(angle) * bodyRadiusY * 0.9",directionX:"cos(angle) - sweep",directionY:"sin(angle) * 1.2",directionLength:"hypot(directionX, directionY)",length:"spikeLength * range(0.7, 1.25)",halfWidth:"range(0.07, 0.1)",tangentX:"-directionY / directionLength",tangentY:"directionX / directionLength"}},{polygon:[["baseX - tangentX * halfWidth","baseY - tangentY * halfWidth"],["baseX + directionX / directionLength * (length + 0.08)","baseY + directionY / directionLength * (length + 0.08)"],["baseX + tangentX * halfWidth","baseY + tangentY * halfWidth"]]}]}},{let:{snoutX:"bodyRadiusX * 0.85",snoutReach:"range(0.28, 0.42)"}},{ellipse:["snoutX - 0.05","bodyY + 0.12",.3,.2,.3]},{polygon:[["snoutX - 0.05","bodyY - 0.02"],["snoutX + snoutReach","bodyY + 0.25"],["snoutX - 0.1","bodyY + 0.3"]]},{circle:["snoutX + snoutReach - 0.02","bodyY + 0.25",.055]},{repeat:{values:[-.42,-.15,.22,.45],as:"legX",body:[{tube:[["legX","bodyY + bodyRadiusY * 0.7"],["legX + 0.04","bodyY + bodyRadiusY + range(0.08, 0.14)"]],radii:.06}]}},{circle:["snoutX + 0.04","bodyY + 0.08",.04],cut:!0}],p0={body:g0},b0=["neck"],f0={bodyRadiusX:"range(0.6, 0.68)",bodyRadiusY:"range(0.3, 0.34)",legLength:"range(0.6, 0.7)",legWidth:.055,headRadiusX:.17,headRadiusY:.14,headX:"bodyRadiusX * 0.95 + 0.22",headY:"bodyY - bodyRadiusY - 0.32",neckWidth:.1,snoutLength:.24,snoutRadius:.09,earHeight:.1,earWidth:.05,tailLength:.3,tailLift:"range(-0.6, -0.4)",tailWidth:.07},y0=[{tube:[["bodyRadiusX * 0.55","bodyY - bodyRadiusY * 0.9"],["bodyRadiusX * 0.7","bodyY - bodyRadiusY - 0.2"],["headX - 0.06","headY - headRadiusY * 0.8"]],radii:[.1,.075,.045],part:"neck"}],m0={sitting:{weight:0},front:{weight:0}},v0={extends:"quadruped",drop:b0,params:f0,body:y0,poses:m0},Y0=[{let:{mantleRadius:"range(0.38, 0.46)",mantleLift:"range(0.35, 0.5)",armCount:"int(7, 8)",sway:"range(0.2, 0.5)"}},{ellipse:[0,"-mantleLift","mantleRadius","mantleRadius * 1.25"]},{ellipse:[0,.05,"mantleRadius * 1.1",.3]},{repeat:{count:"armCount",body:[{let:{spread:"lerp(-0.65, 0.65, index / (armCount - 1))",wave:"if(index % 2 == 0, sway, -sway) * range(0.6, 1.2)",reach:"range(0.5, 0.7)"}},{tube:[["spread * 0.45",.1],["spread * 0.9 + wave * 0.3","reach * 0.5"],["spread * 1.2 + wave","reach"],["spread * 1.1 + wave * 1.4","reach + 0.18"]],radii:[.1,.075,.05,.02]}]}},{circle:["-mantleRadius * 0.4","-mantleLift + 0.15",.07],cut:!0},{circle:["mantleRadius * 0.4","-mantleLift + 0.15",.07],cut:!0}],R0={body:Y0},X0={bodyRadiusX:"range(0.56, 0.62)",bodyRadiusY:"range(0.2, 0.24)",legLength:"range(0.16, 0.22)",legWidth:.075,headRadiusX:.17,headRadiusY:.15,headX:"bodyRadiusX + 0.02",headY:"bodyY - bodyRadiusY * 0.7",neckWidth:"bodyRadiusY * 0.8",snoutLength:.11,snoutRadius:.07,earHeight:.04,earWidth:.05,tailLength:"range(0.5, 0.62)",tailLift:"range(-0.1, 0.05)",tailWidth:.11},w0={extends:"quadruped",params:X0},_0=[{let:{tuftHeight:"range(0.3, 0.5)",eyeSize:"range(0.13, 0.17)",lookX:"range(-0.04, 0.04)"}},{ellipse:[0,.15,"vary(0.46, 0.08)","vary(0.6, 0.06)"]},{ellipse:[0,-.4,.44,.33]},{polygon:[[-.42,-.5],[-.5,"-0.5 - tuftHeight"],[-.16,-.66]]},{polygon:[[.42,-.5],[.5,"-0.5 - tuftHeight"],[.16,-.66]]},{ellipse:[-.42,.2,.15,.42,.18]},{ellipse:[.42,.2,.15,.42,-.18]},{tube:[[-1.15,.82],[0,.8],[1.15,"range(0.78, 0.88)"]],radii:.05},{tube:[[-.14,.7],[-.16,.82]],radii:.045},{tube:[[.14,.7],[.16,.82]],radii:.045},{circle:[-.2,-.4,"eyeSize"],cut:!0},{circle:[.2,-.4,"eyeSize"],cut:!0},{circle:["-0.2 + lookX",-.4,"eyeSize * 0.42"]},{circle:["0.2 + lookX",-.4,"eyeSize * 0.42"]},{polygon:[[-.05,-.27],[.05,-.27],[0,-.14]],cut:!0},{repeat:{count:3,as:"row",body:[{repeat:{values:[-1,0,1],as:"column",body:[{let:{featherX:"column * 0.16 + (row % 2) * 0.08 - 0.04",featherY:"0.05 + row * 0.15"}},{tube:[["featherX - 0.05","featherY"],["featherX","featherY + 0.04"],["featherX + 0.05","featherY"]],radii:.014,cut:!0}]}}]}}],k0={body:_0},S0=["wing"],L0={bodyRadiusX:"range(0.55, 0.62)",bodyRadiusY:"range(0.3, 0.34)",bodyAngle:"-PI / 2",legLength:.06,headRadius:.17,headX:.04,headY:"bodyY - bodyRadiusX * 0.85",neckWidth:.15,beakLength:.15,beakHeight:.06,tailLength:.12,tailSpread:.08,tailDrop:.1,wingWidth:.07},W0=[{ellipse:["-bodyRadiusY * 0.95","bodyY + 0.02",.08,"bodyRadiusX * 0.6",.15],part:"flipper"},{ellipse:["bodyRadiusY * 0.95","bodyY + 0.02",.08,"bodyRadiusX * 0.6",-.15],part:"flipper"}],$0={sleeping:{weight:0}},E0={extends:"bird",drop:S0,params:L0,body:W0,poses:$0},j0={bodyRadiusX:"range(0.56, 0.62)",bodyRadiusY:"range(0.36, 0.4)",legLength:"range(0.2, 0.26)",legWidth:.08,headRadiusX:.25,headRadiusY:.23,headX:"bodyRadiusX * 0.95",headY:"bodyY + 0.02",neckWidth:.22,snoutLength:.12,snoutRadius:.12,earHeight:.1,earWidth:.1,earSpread:.1,tailLength:.14,tailLift:"range(0.15, 0.25)",tailWidth:.035},D0={sitting:{weight:0}},O0={extends:"quadruped",params:j0,poses:D0},M0={ear:[{ellipse:["baseX + sin(angle) * length","baseY - cos(angle) * length",.085,"length","angle"]}]},T0=[{let:{earLength:"range(0.38, 0.52)",earLean:"range(-0.5, 0.05)",floppy:"chance(0.3)",headX:"range(0.36, 0.46)",headY:"range(-0.18, -0.05)"}},{ellipse:[-.2,.35,"vary(0.46, 0.08)","vary(0.38, 0.08)"]},{ellipse:[.08,.22,.38,.33]},{ellipse:["headX","headY",.24,.2,.2]},{use:"ear",with:{baseX:"headX - 0.06",baseY:"headY - 0.12",angle:"earLean",length:"earLength"}},{use:"ear",with:{baseX:"headX + 0.04",baseY:"headY - 0.1",angle:"earLean + if(floppy, 1.2, 0.25)",length:"earLength * if(floppy, 0.85, 0.95)"}},{circle:[-.68,.2,"range(0.11, 0.15)"]},{ellipse:[-.08,.72,.3,.07]},{tube:[[.3,.35],[.36,.72]],radii:.06},{circle:["headX + 0.06","headY - 0.04",.035],cut:!0}],x0={defs:M0,body:T0},A0=[{let:{hornLength:"range(0.62, 0.85)",hornLean:"range(-0.12, 0.02)",headDrop:"range(0, 0.12)",legLength:"range(0.68, 0.82)"}},{ellipse:[-.15,.05,"vary(0.62, 0.06)","vary(0.36, 0.08)"]},{ellipse:[.15,-.1,.34,.3]},{blob:[[.3,-.2],[.68,"-0.02 + headDrop"],[1.02,"0.24 + headDrop"],[.98,"0.42 + headDrop"],[.62,"0.42 + headDrop"],[.36,.3]]},{polygon:[[.8,"0.24 + headDrop"],[.84,"0.1 + headDrop"],["0.96 + hornLean","0.24 + headDrop - hornLength"],[1.05,"0.3 + headDrop"]]},{polygon:[[.66,"0.1 + headDrop"],["0.74 + hornLean","0.08 + headDrop - hornLength * 0.45"],[.82,"0.16 + headDrop"]]},{polygon:[[.34,-.14],["range(0.28, 0.34)",-.46],[.48,-.12]]},{tube:[[-.74,-.02],[-.84,.12],[-.83,.28]],radii:.025},{circle:[.6,"0.18 + headDrop",.03],cut:!0},{repeat:{values:[-.56,-.32,.08,.3],as:"legX",body:[{tube:[["legX",.2],["legX + range(-0.03, 0.03)","legLength"]],radii:.12}]}}],H0={body:A0},N0={length:"range(0.85, 0.92)",height:"range(0.2, 0.24)",dorsalHeight:"range(0.35, 0.42)",finLength:.3,flukeSpan:.4,eyeX:.68,eyeSize:.022},C0={extends:"swimmer",params:N0},P0=[{let:{shellRadius:"range(0.48, 0.6)",shellX:"range(-0.25, -0.1)",shellY:"0.55 - shellRadius - range(0.02, 0.08)",turns:"range(2.6, 3.4)",stalk:"range(0.3, 0.42)"}},{let:{spiral:{map:{count:49,as:"step",let:{angle:"step / 48 * turns * PI * 2",radius:"shellRadius * 0.86 * (step / 48)"},value:["shellX + cos(angle) * radius","shellY + sin(angle) * radius"]}}}},{blob:[[-.95,.66],[-.5,.56],[.4,.56],[.68,.38],[.82,.08],[.95,.02],[1.02,.18],[.96,.5],[.8,.7],[-.88,.76]]},{circle:["shellX","shellY","shellRadius"]},{tube:"spiral",radii:.026,cut:!0},{tube:[[.88,.08],["0.95 + range(0, 0.08)","0.08 - stalk"]],radii:.024},{circle:["0.95 + 0.04","0.08 - stalk - 0.02",.05]},{tube:[[.82,.1],[.78,"0.1 - stalk * 0.8"]],radii:.022},{circle:[.78,"0.1 - stalk * 0.8 - 0.02",.045]}],I0={body:P0},z0=[{let:{shellHeight:"range(0.45, 0.6)",shellWidth:"range(0.66, 0.76)",neckReach:"range(0.85, 1.0)",dome:{map:{count:25,as:"step",let:{angle:"PI + (step / 24) * PI"},value:["cos(angle) * shellWidth","0.25 + sin(angle) * shellHeight"]}},scuteY:"0.25 - shellHeight * 0.45"}},{polygon:"dome"},{ellipse:[0,.27,"shellWidth + 0.07",.08]},{tube:[["shellWidth - 0.1",.24],["neckReach - 0.15",.1]],radii:.09},{ellipse:["neckReach",.08,.17,.12,-.1]},{ellipse:["-shellWidth * 0.62",.42,.12,.16,.3]},{ellipse:["shellWidth * 0.6",.42,.12,.16,-.3]},{polygon:[["-shellWidth - 0.02",.22],["-shellWidth - 0.2",.3],["-shellWidth - 0.02",.3]]},{tube:[["-shellWidth * 0.95",.2],["-shellWidth * 0.5","scuteY"],["shellWidth * 0.5","scuteY"],["shellWidth * 0.95",.2]],radii:.015,cut:!0},{tube:[["-shellWidth * 0.25","scuteY"],["-shellWidth * 0.3",.2]],radii:.015,cut:!0},{tube:[["shellWidth * 0.25","scuteY"],["shellWidth * 0.3",.2]],radii:.015,cut:!0},{tube:[["-shellWidth * 0.2","scuteY"],[0,"0.25 - shellHeight * 0.95"]],radii:.014,cut:!0},{tube:[["shellWidth * 0.2","scuteY"],[0,"0.25 - shellHeight * 0.95"]],radii:.014,cut:!0},{circle:["neckReach + 0.06",.04,.028],cut:!0}],F0={body:z0},B0=[{let:{belly:"range(0.24, 0.34)",back:"range(-0.42, -0.32)",tailLift:"range(-0.35, 0.05)",spout:"chance(0.75)"}},{blob:[[.9,-.02],[.72,"back + 0.1"],[.3,"back"],[-.2,"back + 0.12"],[-.6,"-0.08 + tailLift * 0.4"],[-.88,"tailLift * 0.8"],[-.62,"0.12 + tailLift * 0.3"],[-.1,"belly"],[.5,"belly + 0.02"],[.84,.18]]},{ellipse:[-1,"tailLift - 0.16","vary(0.28)",.075,-.85]},{ellipse:[-1,"tailLift + 0.13","vary(0.28)",.075,.85]},{ellipse:[.22,"belly + 0.08","vary(0.24)",.065,.55]},{tube:[[.88,.1],[.6,.16],[.32,.12]],radii:.018,cut:!0},{circle:[.42,.04,.035],cut:!0},{if:"spout",then:[{tube:[[.55,"back - 0.06"],[.56,"back - 0.3"],[.44,"back - 0.5"]],radii:[.035,.03,.02]},{tube:[[.56,"back - 0.3"],[.7,"back - 0.48"]],radii:[.03,.02]},{circle:[.38,"back - 0.48",.03]},{circle:[.76,"back - 0.42",.025]},{circle:[.6,"back - 0.6",.025]}]}],V0={body:B0},q0={bodyRadiusX:"range(0.58, 0.66)",bodyRadiusY:"range(0.26, 0.3)",legLength:"range(0.52, 0.62)",legWidth:.06,headRadiusX:.2,headRadiusY:.16,snoutLength:.24,snoutRadius:.07,earHeight:"range(0.2, 0.26)",tailLength:"range(0.4, 0.5)",tailLift:"range(-0.25, -0.05)",tailWidth:.09},J0={extends:"quadruped",params:q0},K0=Object.assign({"./base/bird.json":Et,"./base/quadruped.json":xt,"./base/swimmer.json":Pt,"./bear.json":zt,"./cat.json":Bt,"./deer.json":Jt,"./dolphin.json":Zt,"./duck.json":t0,"./elephant.json":n0,"./fish.json":o0,"./flamingo.json":u0,"./fox.json":h0,"./hedgehog.json":p0,"./horse.json":v0,"./octopus.json":R0,"./otter.json":w0,"./owl.json":k0,"./penguin.json":E0,"./pig.json":O0,"./rabbit.json":x0,"./rhino.json":H0,"./shark.json":C0,"./snail.json":I0,"./turtle.json":F0,"./whale.json":V0,"./wolf.json":J0}),pa=Object.fromEntries(Object.entries(K0).map(([e,t])=>[e.replace(/^.*\//,"").replace(/\.json$/,""),t])),U0=ht(),G0=()=>U0.value,ba=A(G0);export{M,Ge as a,da as b,la as c,Ye as d,De as e,ae as f,ba as g,oa as h,G0 as i,ra as j,Z0 as k,Oe as l,mt as m,na as n,sa as o,ha as p,ea as q,pa as r,ua as s,ia as t,B as u,aa as v,ta as w,ga as x,ca as y};