whose-turn 1.0.0-alpha.4 → 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.
@@ -0,0 +1,3 @@
1
+ import{w as Q,t as st,r as nt,s as ws,c as $,n as ye,d as j,o as l,a as i,F,b as L,e as ee,u as p,f as q,g as a,h as m,i as C,j as B,_ as K,k as Z,l as V,m as Y,p as bs,q as He,v as zt,x as Ee,y as Ze,z as Ot,A as Je,B as oe,C as xs,D as Ie,E as fe,G as ze,H as $s,I as Ss}from"./_plugin-vue_export-helper-CeaKqebY.js";import{s as Cs,m as ot,u as Dt,a as Pt,r as Bt,p as Rs,b as Ts,i as mt,l as Vt,c as As,M as te,d as Ae,e as Se,f as Ms,g as Ue,h as ke,j as Es,k as we,n as Is,o as zs,q as Os,t as at,v as Ds,w as Ps,x as Bs,y as vt,z as Vs}from"./scheme-CRAXq4Co.js";import{g as Fe,r as Hs,a as Us,e as Fs,w as Ht,p as ie,b as re,T as Qe,S as Oe,c as le,h as Ws,s as lt,i as Ut,m as be,d as qs,f as Ft,j as rt,k as Ns,l as it,n as js,y as Ls,o as Wt,q as Ys,t as Ks,u as qt,v as Xs}from"./bem-HybmjowO.js";const me=Cs(Bt),gt=(e,t)=>{const s=te,o=new Float32Array(s*s);for(let r=0;r<o.length;r+=1)o[r]=e[r]===t?1e6:0;const n=(r,u,c)=>{o[u]+c<o[r]&&(o[r]=o[u]+c)};for(let r=0;r<s;r+=1)for(let u=0;u<s;u+=1){const c=r*s+u;u>0&&n(c,c-1,1),r>0&&n(c,c-s,1),u>0&&r>0&&n(c,c-s-1,Math.SQRT2),u<s-1&&r>0&&n(c,c-s+1,Math.SQRT2)}for(let r=s-1;r>=0;r-=1)for(let u=s-1;u>=0;u-=1){const c=r*s+u;u<s-1&&n(c,c+1,1),r<s-1&&n(c,c+s,1),u<s-1&&r<s-1&&n(c,c+s+1,Math.SQRT2),u>0&&r<s-1&&n(c,c+s-1,Math.SQRT2)}return o},Ye=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 o=t.match(/[\d.]+/g);return o&&o.length>=3?o.slice(0,3).map(Number):null},Gs=e=>{const t=getComputedStyle(e),s=Ye(t.getPropertyValue("--md-primary"))||[44,86,151],o=Ye(t.getPropertyValue("--md-on-primary-container"))||s;return{core:mt()?s:s.map((n,r)=>Vt(n,o[r],.35)),rim:Ye(t.getPropertyValue("--blob-3"))||[23,223,220],strength:mt()?.9:1}},Zs=(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)}),Js=e=>{const t={minX:te,maxX:0,minY:te,maxY:0};for(let o=0;o<e.length;o+=1)if(e[o]){const n=o%te,r=Math.floor(o/te);t.minX=Math.min(t.minX,n),t.maxX=Math.max(t.maxX,n),t.minY=Math.min(t.minY,r),t.maxY=Math.max(t.maxY,r)}const s=o=>(o-te/2)/Ae;return{minX:s(t.minX),maxX:s(t.maxX),minY:s(t.minY),maxY:s(t.maxY)}},Qs=(e,t,s,o)=>{const n=t.maxX-t.minX,r=t.maxY-t.minY,u=Math.min(e.size,2*s*.95/n,2*o*.98/r),c=u/2,h=-e.overflowX*u,_=-e.overflowY*u;return{size:u,centerX:e.right?s-h-t.maxX*c:h-t.minX*c,centerY:e.bottom?o-_-t.maxY*c:_-t.minY*c}},en=(e,t,s)=>"rgba("+e.core.map((n,r)=>Math.round(Vt(n,e.rim[r],t))).join(",")+","+s.toFixed(3)+")",tn=(e,t,s)=>{const o=[],n=t.size/62,r=t.size/2/Ae,u=t.size*Ms/4,c=n*.866;for(let h=0,_=t.centerY-u;_<t.centerY+u;h+=1,_+=c)for(let d=t.centerX-u+h%2*n/2;d<t.centerX+u;d+=n){const f=d+e.range(-.3,.3)*n,w=_+e.range(-.3,.3)*n,k=Math.floor((f-t.centerX)/r+te/2),z=Math.floor((w-t.centerY)/r+te/2);if(k<0||z<0||k>=te||z>=te)continue;const b=z*te+k,y=e.next(),g=e.range(.75,1.25),x=e.range(-.15,.15);if(s.inside[b]){const A=s.depth[b]/Ae,P=Se(A/.035),X=Se(A/.3);if(y>.5+.5*P)continue;o.push({x:f,y:w,radius:n*.5*(.45+.55*P)*(.95+.3*X)*g,alpha:.5+.25*P+.25*X,tint:Se(.65-.65*X+x)})}else{const A=s.gap[b]/Ae;if(y>.14*Math.exp(-A/.05)+.004)continue;o.push({x:f,y:w,radius:n*e.range(.1,.24),alpha:.35,tint:Se(.8+x)})}}return o},sn=()=>document.getElementById("wt"),nn=()=>document.getElementById("backdrop"),Nt=()=>Math.floor(Math.random()*4294967296),Ce={},U={workspace:"",seed:Nt(),species:"",wantedSpecies:"",wantedPose:"",built:null},on=(e,t)=>{const s=As(U.seed),o=me[Math.floor(s.next()*me.length)];U.species=me.includes(U.wantedSpecies)?U.wantedSpecies:o;const n=Zs(s,e,t),r={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)&&(r.facing=-r.facing);const u=Rs(Ts(Bt,U.species,s,{pose:U.wantedPose}).shapes,r),c={inside:u,depth:gt(u,1),gap:gt(u,0)},h=Qs(n,Js(u),e,t);return{key:U.seed+":"+U.species+":"+e+"x"+t,dots:tn(s,h,c)}},De=()=>{const e=nn();if(!e)return;const t=e.clientWidth,s=e.clientHeight,o=window.devicePixelRatio||1,n=Math.round(t*o),r=Math.round(s*o);(e.width!==n||e.height!==r)&&(e.width=n,e.height=r);const u=e.getContext("2d");if(!u||(u.setTransform(o,0,0,o,0,0),u.clearRect(0,0,t,s),!t||!s))return;const c=U.seed+":"+(U.wantedSpecies||"?")+":"+t+"x"+s;(!U.built||U.built.key.split(":")[0]!==String(U.seed)||!U.built.key.endsWith(t+"x"+s)||U.wantedSpecies&&U.species!==U.wantedSpecies)&&(U.built=on(t,s));const h=sn();if(!h)return c;const _=Gs(h);return U.built.dots.forEach(d=>{u.fillStyle=en(_,d.tint,d.alpha*_.strength),u.beginPath(),u.arc(d.x,d.y,d.radius,0,Math.PI*2),u.fill()}),c};window.whoseTurnBackdrop={species:me.slice(),seeded:ot,get current(){return{workspace:U.workspace,species:U.species,seed:U.seed}},show:e=>{const t=e||{},s=String(t.workspace||"");Ce[s]||(Ce[s]=Nt());const o=t.seed!==void 0?Number(t.seed)>>>0:Ce[s];Ce[s]=o;const n=t.species&&me.includes(t.species)?t.species:"",r=String(t.pose||"");return s===U.workspace&&o===U.seed&&n===U.wantedSpecies&&r===U.wantedPose&&U.built||(U.workspace=s,U.seed=o,U.wantedSpecies=n,U.wantedPose=r,U.built=null,De()),window.whoseTurnBackdrop.current},repaint:De};Q(Ue,De);Dt(window,"resize",Pt(De,200));const{show:jt,repaint:an,seeded:Ui}=window.whoseTurnBackdrop,ln=()=>{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})},rn=()=>{let e=0;return{next:()=>++e,accepts:t=>t===e}},yt=e=>{const t=structuredClone(st(e)),s=t.connectors||{},o=t.rules||{};return o.statuses=o.statuses||{},{...t,connectors:Array.isArray(s)?s:Object.entries(s).map(([n,r])=>({type:n,...r})),rules:o,theme:t.theme||{}}},cn=e=>{const t=structuredClone(st(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},kt=new WeakMap;let un=0;const Re=e=>{const t=st(e);let s=kt.get(t);return s||(s=++un,kt.set(t,s)),s},wt=e=>JSON.stringify(e),dn=(e,t)=>{const s=[];return e.forEach(o=>o.connectors.forEach(n=>{const r=t.get(n)||{};Object.keys(r).forEach(u=>{r[u]&&s.push({ws:o.id,connector:n.id||n.type,key:u,value:r[u]})})})),s},ce=(e,t,s)=>{typeof s=="boolean"||s&&s.length?e[t]=s:delete e[t]},pn=(e,t)=>{const s=o=>{const n=t.indexOf(o.id);return n<0?t.length:n};return[...e].sort((o,n)=>s(o)-s(n))},hn=(e,t,s,o)=>{const n=e.filter(r=>r!==t);return n.splice(n.indexOf(s)+(o?0:1),0,t),n},_n={backlog:"in the backlog",passed:"passed",code_review:"in review",qa:"in testing",on_hold:"on hold",todo:"to do",in_progress:"in progress",done:"done"},Lt=e=>_n[e]||`in ${e.replace(/_/g," ")}`,fn={you:"your move",reviewer:"the reviewer's move",qa:"the tester's move",them:"waiting on others"},mn={"ticket.hold_reason":"the hold reason","ticket.status_name":"the status","ticket.key":"the ticket key","pr.number":"the PR number","pr.base":"the target branch","pr.commenter":"the commenter","run.workflow":"the workflow","run.branch":"the branch","comment.author":"the author"},de=e=>mn[e]||e.replace(/[._]/g," "),vn=(e,t,s)=>e?t:s,gn={approved:"the PR is approved",changes_requested:"changes are requested on the PR",none:"the PR has no review"},yn=(e,t)=>{switch(e){case"ticket.status":return`the ticket is ${Lt(String(t))}`;case"ticket.assignee":return t==="me"?"the ticket is on you":`the ticket is assigned to ${t}`;case"pr.checks":return t==="none"?"the PR has no checks":`the PR checks are ${t}`;case"pr.review":return gn[String(t)]||`the PR review is ${t}`;case"pr.base":return`the PR goes into ${t}`;default:return`${de(e)} is ${t}`}},bt={"ticket.done":["the ticket is done","the ticket is not done"],"ticket.started":["the ticket is started","the ticket is not started"],"pr.open":["the PR is open","no PR is open"],"pr.merged":["the PR is merged","the PR is not merged"],"pr.unanswered":["a comment on the PR waits for your answer","no comment on the PR waits for your answer"],"comment.mentions_me":["you are mentioned and have not answered","no mention of you waits for an answer"],"comment.is_question":["the mention is a question","the mention is not a question"],"run.failed":["a workflow run failed","no workflow run failed"],"run.mine":["the run is yours","the run is not yours"]},kn=(e,t,s)=>{if(t==="present")return vn(s,`${de(e)} is given`,`${de(e)} is missing`);if(t==="prefix")return e==="pr.base"?`the PR goes into a branch starting with ${s}`:`${de(e)} starts with ${s}`;if(e==="unanswered_count"){const n=Number(s);return`${{gt:`more than ${n}`,gte:`at least ${n}`,lt:`fewer than ${n}`,lte:`at most ${n}`}[t]} mentions of you wait for an answer`}const o={gt:"more than",gte:"at least",lt:"less than",lte:"at most"};return`${de(e)} is ${o[t]} ${s}`},wn=(e,t)=>Array.isArray(t)?e==="ticket.status"?`the ticket is ${t.map(s=>Lt(String(s))).join(" or ")}`:`${de(e)} is ${t.join(" or ")}`:t&&typeof t=="object"?Object.entries(t).map(([s,o])=>kn(e,s,o)).join(" and "):typeof t=="boolean"&&bt[e]?bt[e][t?0:1]:yn(e,t),bn=e=>e.replace(/\{([\w.]+)\}/g,(t,s)=>`{${de(s)}}`),xn=e=>{const t=Object.entries(e.when).map(([o,n])=>wn(o,n)),s=e.then.whose==="hidden"?"not shown":`${fn[e.then.whose]||e.then.whose}, "${bn(e.then.next||"")}"`;return{when:t.length?`When ${t.join(" and ")}:`:"In every other case:",then:s}},$n=e=>e.modal?"modal":e.settings?"settings":e.feedback?"feedback":null,Sn=(e,t)=>{const s=new URLSearchParams(e).get("mode");return s==="app"||s==="tab"?s:t==="app"?"app":"tab"},Cn=e=>"/?mode=tab"+(e?"&ws="+encodeURIComponent(e):""),Rn=e=>({width:e.outerWidth,height:e.outerHeight}),Yt={writeDefaults:!1},Kt=ke("wt-ws","",Yt),Xt=Es("wt-mode","",Yt),v=ws({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"}}),I=nt({ws:new URLSearchParams(location.search).get("ws")||Kt.value,open:new Set,mode:Sn(location.search,Xt.value),live:!1,reconnects:0,status:"Connecting…",modal:null,feedback:!1,settings:!1,settingsDirty:!1,settingsAsk:!1,settingsAt:""});Xt.value=I.mode;const Pe=we("",6e3),pe=(e,t)=>{const s=re(e,t);return s&&(Pe.value=s),!s},Tn=()=>{I.mode==="app"&&Dt(window,"resize",Pt(()=>ie("/api/window",Rn(window)).catch(pe),600))},Gt={resume:()=>{}},he=zs({scheduler:e=>{const t=Os(e,3e4,{immediate:!1});return Gt.resume=t.resume,t}}),Ke=$(()=>{const e=v.workspace.theme;return e&&e.light&&e.dark?e[Ue.value?"dark":"light"]:{}}),ne=$(()=>v.counts),xt=$(()=>{const e=v.workspace.name,t=e?e+": ":"",s=Object.entries(v.errors||{}),o=v.health.failing||[],n=c=>o.find(({source:h})=>c===h||c.startsWith(h+".")),r=o.map(({source:c,polls:h})=>{const _=s.filter(([d])=>{var f;return((f=n(d))==null?void 0:f.source)===c}).map(([,d])=>d);return`Source ${c}: ${_.join(", ")||"failing"}, failed ${h} polls in a row`}),u=new Set(o.map(({source:c})=>"failing:"+c));return[...v.problems||[],...v.health.alerts.filter(c=>!u.has(c.id||"")).map(c=>c.text),...r,...s.filter(([c])=>!n(c)).map(([c,h])=>t+c+": "+h)]}),Zt=(e="")=>{I.settingsAt=e,I.settings=!0},Jt=$(()=>$n(I)),An=()=>{const e=Jt.value;if(e==="modal"&&(I.modal=null),e==="feedback"&&(I.feedback=!1),e==="settings"){if(I.settingsDirty){I.settingsAsk=!0;return}I.settings=!1}},et=new Map,Mn=(e,t)=>{t&&et.set(e,document.activeElement)},En=(e,t)=>{if(t)return;const s=et.get(e);et.delete(e),s instanceof HTMLElement&&s.focus()},In={modal:()=>!!I.modal,settings:()=>I.settings,feedback:()=>I.feedback};Object.entries(In).forEach(([e,t])=>{Q(t,s=>Mn(e,s),{flush:"sync"}),Q(t,s=>En(e,s),{flush:"post"})});let Be=-1,tt=0;const $t=rn(),xe=(e=I.ws)=>{const t=$t.next();return Fe("/api/state"+(e?"?ws="+encodeURIComponent(e):"")).then(s=>$t.accepts(t)?s.error?Hs(s.error)!=="NO_SUCH_WORKSPACE"||!Us(e)?(I.status=Fs(s.error,"Could not load"),v):xe(""):(Object.assign(v,s),I.ws=v.workspace.id,I.status="",jt({workspace:v.workspace.id}),document.title="Whose Turn · "+v.workspace.name,v):v)},Qt=()=>(Be=-1,xe()),ge=Is("/api/stream",[],{immediate:!1,autoConnect:!1,autoReconnect:!0,serializer:{read:e=>JSON.parse(e||"null")}});Q(ge.status,e=>{I.live=e==="OPEN",I.live&&(I.status="",I.reconnects++)},{flush:"sync"});Q(ge.error,e=>{e&&(I.status="Disconnected from the local server, retrying…")},{flush:"sync"});Q(ge.data,e=>{if(e){if("update"in e){v.update=e.update;return}typeof e.open_moves=="number"&&(v.workspaces=Ht(v.workspaces,e.ws,e.open_moves)),!(v.workspace.id&&e.ws!==v.workspace.id)&&(I.status="",e.version!==Be?(Be=e.version,tt===0&&xe()):v.polled_at=e.polled_at)}},{flush:"sync"});const zn=()=>{ge.eventSource.value||ge.open()},On=()=>(Gt.resume(),xe().then(zn)),Dn=e=>e===v.workspace.id?Promise.resolve():(Be=-1,tt++,xe(e).then(()=>{I.ws===e&&(Kt.value=I.ws,I.open.clear())},()=>{Pe.value=Oe+"; staying on "+v.workspace.name+"."}).finally(()=>{tt--})),es=(e,t)=>ie(e,{ws:v.workspace.id,...t}),ve=e=>es("/api/marks",e).then(t=>{const s=re(t);return s||(Object.assign(v,{marks:t.marks,turn:t.turn,counts:t.counts}),v.workspaces=Ht(v.workspaces,v.workspace.id,t.counts.mine)),s},t=>re(t)),Pn=e=>es("/api/todos",e).then(t=>{const s=re(t,{unreachable:Qe});return!s&&Array.isArray(t)&&(v.todos=t),s},t=>re(t,{unreachable:Qe})),St=e=>Fe("/api/config").then(t=>ie("/api/config",{workspaces:pn(t.workspaces,e),secrets:[]})).then(t=>{pe(t,{refused:"The order was not saved"})&&Qt()},t=>pe(t,{refused:"The order was not saved"})),Ct=()=>{I.status="Checking now…",ie("/api/refresh").catch(e=>{I.status="",pe(e)}),jt({workspace:v.workspace.id,seed:Math.floor(Math.random()*4294967296)})},Bn="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",Vn="M16 1H6a2 2 0 0 0-2 2v12h2V3h10V1zm3 4H10a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm0 16h-9V7h9v14z",Hn="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",Un="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",Fn=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},ts=e=>{const t=String(e||"").trim().split(/[\s_-]+/).filter(Boolean);return(t.length>=2?t.slice(0,3).map(o=>o.charAt(0)):(t[0]||"?").slice(0,2).split("")).join("").toUpperCase()},Wn=e=>({1:17,2:14,3:11})[e.length]||11,ss=(e,t)=>{const s=t(Fn(e.id)),o=[],n=3+Math.floor(s()*3);for(let u=0;u<n;u+=1){const c=s()*Math.PI*2,h=9+s()*7;o.push({cx:(18+Math.cos(c)*h).toFixed(1),cy:(18+Math.sin(c)*h).toFixed(1),r:(1.6+s()*2.2).toFixed(1),opacity:(.35+s()*.4).toFixed(2)})}const r=ts(e.name||e.id);return{dots:o,glyph:r,fontSize:Wn(r)}},qn=(e,t)=>{const s=e.dots.map(r=>`<circle cx="${r.cx}" cy="${r.cy}" r="${r.r}" fill="${t.dot}" opacity="${r.opacity}"/>`).join(""),o=e.fontSize>=17?24:23,n=e.glyph.replace(/[&<>]/g,"");return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><rect width="36" height="36" rx="10" fill="${t.fill}"/>${s}<text x="18" y="${o}" text-anchor="middle" font-size="${e.fontSize}" font-weight="700" letter-spacing="-0.5" font-family="Roboto, Inter, system-ui, sans-serif" fill="${t.ink}">${n}</text></svg>`},Rt='a[href], button:not([disabled]), input:not([disabled]), select, textarea, [tabindex]:not([tabindex="-1"])',Nn="input, textarea, select, [contenteditable]",jn=(e,t,s)=>{if(!e.length)return null;const o=s?e[0]:e[e.length-1];return t===o||!e.some(n=>n===t)?s?e[e.length-1]:e[0]:null},Ln=e=>{let t=null;Q(e,s=>{s?(t=document.activeElement,ye(()=>{var r;const o=document.querySelectorAll(".modal"),n=o[o.length-1];n&&!n.contains(document.activeElement)&&((r=n.querySelector(Rt))==null||r.focus())})):(t==null||t.focus(),t=null)}),at("Tab",s=>{if(!e.value)return;const o=document.querySelectorAll(".modal"),n=o[o.length-1],r=n?[...n.querySelectorAll(Rt)]:[],u=jn(r,document.activeElement,s.shiftKey);u&&(s.preventDefault(),u.focus())},{target:document})},Tt={"/":".feed__search-input",t:".todos__input"},Yn=e=>at(Object.keys(Tt),t=>{const s=t.target;if(e.value||t.metaKey||t.ctrlKey||t.altKey||s!=null&&s.closest(Nn))return;const o=document.querySelector(Tt[t.key]);o&&(t.preventDefault(),o.focus())},{target:document}),Kn=30,At=(e,t,s)=>Math.round(Math.max(t,Math.min(s,e))),Xn=(e,t)=>Math.ceil(e+(t>1?Kn:0)),Gn=(e,t,s)=>e-t*s.length-s.reduce((o,n)=>o+(n.collapsed?n.height:n.floor),0),ct=e=>{const t=ke("wt-panel-sizes",{},{writeDefaults:!1});return{size:$(()=>{var n;return((n=t.value[v.workspace.id])==null?void 0:n[e])??null}),set:n=>{const r=v.workspace.id,{[e]:u,...c}=t.value[r]??{};t.value={...t.value,[r]:n===null?c:{...c,[e]:n}}}}},Zn={class:"rail","aria-label":"Workspaces"},Jn=["data-drop","href","aria-label","aria-selected","onClick","onKeydown","onDragstart","onDragover","onDrop"],Qn={viewBox:"0 0 36 36",class:"rail__icon","aria-hidden":"true"},eo=["fill"],to=["cx","cy","r","fill","opacity"],so=["y","font-size","fill"],no={class:"rail__label"},oo={key:0,class:"rail__warn",title:"A source of this workspace fails"},ao={key:1,class:"rail__badge"},lo={viewBox:"0 0 24 24",class:"rail__gear","aria-hidden":"true"},ro=["d"],io=j({__name:"Rail",emits:["settings"],setup(e,{emit:t}){const s=t,o=$(()=>Object.fromEntries(v.workspaces.map(g=>[g.id,ss(g,ot)]))),n=$(()=>Object.fromEntries(v.workspaces.map(g=>{const x=g.theme?g.theme[Ue.value?"dark":"light"]:null;return[g.id,{fill:x?x["--md-primary-container"]:"var(--md-primary-container)",ink:x?x["--md-on-primary-container"]:"var(--md-on-primary-container)",dot:x?x["--md-primary"]:"var(--md-primary)"}]}))),r=g=>g.id===v.workspace.id?Object.keys(v.errors||{}).length>0:!!g.failing_sources,u=g=>{g.detail>0&&g.currentTarget.blur()},c=(g,x)=>{u(g),Dn(x)},h=g=>{s("settings"),u(g)},_=async(g,x)=>{const A=g.key==="ArrowUp"?-1:g.key==="ArrowDown"?1:0,P=v.workspaces.map(O=>O.id),X=P.indexOf(x.id);if(!g.altKey||!A||X+A<0||X+A>=P.length)return;g.preventDefault();const D=g.currentTarget;P.splice(X+A,0,...P.splice(X,1)),await St(P),await ye(),D.focus()},d=B(""),f=B({}),w=g=>{const x=g.currentTarget;return g.clientY-x.getBoundingClientRect().top<x.offsetHeight/2},k=(g,x)=>{d.value=x.id,g.dataTransfer&&(g.dataTransfer.effectAllowed="move",g.dataTransfer.setData("text/plain",x.id))},z=()=>{d.value="",f.value={}},b=(g,x)=>{if(!d.value||d.value===x.id)return;g.preventDefault(),g.dataTransfer&&(g.dataTransfer.dropEffect="move");const A=w(g)?"before":"after";(f.value.id!==x.id||f.value.side!==A)&&(f.value={id:x.id,side:A})},y=(g,x)=>{if(!d.value||d.value===x.id)return;g.preventDefault();const A=hn(v.workspaces.map(P=>P.id),d.value,x.id,w(g));f.value={},St(A)};return(g,x)=>(l(),i("nav",Zn,[(l(!0),i(F,null,L(p(v).workspaces,A=>(l(),i("a",{key:A.id,class:q(["rail__item",{"rail__item--dragging":d.value===A.id}]),"data-drop":f.value.id===A.id?f.value.side:null,href:"?ws="+encodeURIComponent(A.id),"aria-label":A.name,"aria-selected":A.id===p(v).workspace.id,draggable:"true",onClick:ee(P=>c(P,A.id),["prevent"]),onKeydown:P=>_(P,A),onDragstart:P=>k(P,A),onDragend:z,onDragover:P=>b(P,A),onDragleave:x[0]||(x[0]=P=>f.value={}),onDrop:P=>y(P,A)},[(l(),i("svg",Qn,[a("rect",{x:"0",y:"0",width:"36",height:"36",rx:"10",fill:n.value[A.id].fill},null,8,eo),(l(!0),i(F,null,L(o.value[A.id].dots,(P,X)=>(l(),i("circle",{key:X,cx:P.cx,cy:P.cy,r:P.r,fill:n.value[A.id].dot,opacity:P.opacity},null,8,to))),128)),a("text",{x:"18",y:o.value[A.id].fontSize>=17?24:23,"text-anchor":"middle","font-size":o.value[A.id].fontSize,"font-weight":"700","letter-spacing":"-0.5","font-family":"Roboto, Inter, system-ui, sans-serif",fill:n.value[A.id].ink},m(o.value[A.id].glyph),9,so)])),a("span",no,m(A.name),1),r(A)?(l(),i("span",oo,"!")):C("",!0),A.open_moves?(l(),i("span",ao,m(A.open_moves),1)):C("",!0)],42,Jn))),128)),x[2]||(x[2]=a("span",{class:"rail__spacer"},null,-1)),a("a",{class:"rail__item",href:"#settings","aria-label":"Settings",onClick:ee(h,["prevent"])},[(l(),i("svg",lo,[a("path",{d:p(Hn),fill:"currentColor"},null,8,ro)])),x[1]||(x[1]=a("span",{class:"rail__label"},"Settings",-1))])]))}}),co=K(io,[["__scopeId","data-v-48248148"]]),Xe=" · checks every minute",ns=(e,t,s,o)=>{const n=e.failing.map(u=>u.source),r=t?le(t):"—";return n.length&&n.length>=s?{dot:"off",text:"No data: "+n.join(", ")+" failing · last data "+le(e.fresh_at),failing:n,noData:!0}:e.stale?{dot:"off",text:"Stale · last data "+le(e.fresh_at)+Xe,failing:n,noData:!1}:n.length?{dot:o?"warn":"off",text:n.join(", ")+" failing · last check "+r+Xe,failing:n,noData:!1}:{dot:o?"ok":"off",text:"Live · last check "+r+Xe,failing:n,noData:!1}},uo=["data-tip"],po={class:"ai-button__icon",viewBox:"0 0 24 24","aria-hidden":"true"},ho=["d"],_o={class:"ai-button__badge",viewBox:"0 0 24 24","aria-hidden":"true"},fo=["d"],mo=j({__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"},o=we("",1600),n=$(()=>s[o.value]),r=B(null);Q(n,c=>{var h,_;return(_=(h=r.value)==null?void 0:h._tippy)==null?void 0:_.setContent(c)});const u=()=>Ws(t.query).then(c=>navigator.clipboard.writeText(c)).then(()=>{o.value="sent"},()=>{o.value="failed"});return(c,h)=>(l(),i("button",{ref_key:"button",ref:r,type:"button",class:q(["ai-button",{"ai-button--big":e.big,"ai-button--sent":p(o)==="sent","ai-button--failed":p(o)==="failed"}]),"aria-label":"Copy for AI","data-tip":n.value,onClick:ee(u,["stop"])},[(l(),i("svg",po,[a("path",{d:p(Vn),fill:"currentColor"},null,8,ho)])),(l(),i("svg",_o,[a("path",{d:p(Bn),fill:"currentColor"},null,8,fo)]))],10,uo))}}),_e=K(mo,[["__scopeId","data-v-46197bdc"]]),vo={key:0,class:"update-chip update-chip--done",role:"status"},go={key:1,class:"update-chip update-chip--busy",role:"status"},yo=["title"],ko=15e3,wo=j({__name:"UpdateChip",setup(e){const t=B(!1),s=B(""),o=we("",ko),n=$(()=>v.update),r=$(()=>t.value||n.value.state==="installing"||n.value.state==="restarting");Q(()=>n.value.current,c=>{s.value&&c&&c!==s.value&&(o.value=c,s.value="")});const u=()=>{if(r.value)return;t.value=!0,s.value=n.value.current;const c=h=>{if(t.value=!1,!pe(h,{refused:"The update did not start"})){s.value="";return}v.update=h.update};ie("/api/update").then(c,c)};return(c,h)=>p(o)?(l(),i("span",vo,"Updated to "+m(p(o)),1)):r.value?(l(),i("span",go,"Updating…")):n.value.available&&n.value.state==="failed"?(l(),i("button",{key:2,type:"button",class:"update-chip update-chip--failed",title:n.value.reason,onClick:u}," Update failed · Retry ",8,yo)):n.value.available?(l(),i("button",{key:3,type:"button",class:"update-chip",onClick:u},m(n.value.latest)+" is out · Update ",1)):C("",!0)}}),bo=K(wo,[["__scopeId","data-v-f70d2aed"]]),xo={class:"status-bar"},$o={class:"status-bar__icon",viewBox:"0 0 24 24","aria-hidden":"true"},So=["d"],Co={key:0,class:"status-bar__notice",role:"alert"},Ro=["href"],To=["aria-disabled"],Ao=5e3,Mo=j({__name:"StatusBar",emits:["report"],setup(e,{emit:t}){const s=t,o=$(()=>(he.value,ns(v.health,v.polled_at,v.workspace.connectors.length,I.live))),n=B(!1),r=B(!1),u=$(()=>r.value?"Opened in the app window. You can close this tab.":I.status||o.value.text),c=_=>pe(_,{refused:"The app window did not open"}),h=()=>{if(n.value)return;n.value=!0,setTimeout(()=>n.value=!1,Ao);const _=d=>{c(d),r.value=!re(d)};ie("/api/open",{mode:"app"}).then(_,_)};return(_,d)=>(l(),i("div",xo,[a("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:d[0]||(d[0]=f=>s("report"))},[(l(),i("svg",$o,[a("path",{d:p(Un),fill:"currentColor"},null,8,So)])),d[2]||(d[2]=Z("Report ",-1))]),a("span",{class:q(["status-bar__live",{"status-bar__live--off":o.value.dot==="off","status-bar__live--warn":o.value.dot==="warn"}])},null,2),a("span",null,m(u.value),1),p(Pe)?(l(),i("span",Co,m(p(Pe)),1)):C("",!0),V(bo),a("button",{type:"button",class:"btn status-bar__btn",onClick:d[1]||(d[1]=(...f)=>p(Ct)&&p(Ct)(...f))},"Refresh now"),p(I).mode==="app"?(l(),i("a",{key:1,class:"btn status-bar__btn",href:p(Cn)(p(I).ws),target:"_blank",rel:"noopener"},"Open in browser",8,Ro)):(l(),i("button",{key:2,type:"button",class:q(["btn status-bar__btn",{"status-bar__btn--busy":n.value}]),"aria-disabled":n.value,onClick:h},m(n.value?"Opening…":"Open as app"),11,To)),V(_e,{query:{all:"1"}}),d[3]||(d[3]=a("span",{class:"ai-hint status-bar__ai-hint"},"Copy for AI: everything",-1))]))}}),Eo=K(Mo,[["__scopeId","data-v-1a4ce564"]]),os=e=>{const t=ke("wt-collapsed",[],{writeDefaults:!1}),s=$(()=>t.value.includes(e));return{collapsed:s,toggle:()=>{t.value=s.value?t.value.filter(n=>n!==e):[...t.value,e]}}},Io=["href"],zo={key:1},ae=j({__name:"ExtLink",props:{text:{default:""},url:{default:""}},setup(e){const t=e,s=$(()=>lt(t.url));return(o,n)=>s.value?(l(),i("a",{key:0,href:s.value,target:"_blank",rel:"noopener"},m(e.text),9,Io)):(l(),i("span",zo,m(e.text),1))}}),Oo={class:"workspace-header__title"},Do={class:"workspace-header__name"},Po={key:0,class:"workspace-header__line workspace-header__strip"},Bo={class:"workspace-header__count"},Vo={class:"workspace-header__count"},Ho={class:"workspace-header__count"},Uo={class:"workspace-header__count"},Fo={class:"workspace-header__line workspace-header__give"},Wo={class:"workspace-header__links"},qo={class:"workspace-header__tiles"},No={class:"workspace-header__tile-value"},jo={class:"workspace-header__tile"},Lo={class:"workspace-header__tile-value"},Yo={class:"workspace-header__tile-value"},Ko={class:"workspace-header__tile"},Xo={class:"workspace-header__tile-value"},Go=j({__name:"WorkspaceHeader",setup(e){const{collapsed:t,toggle:s}=os("header");return(o,n)=>(l(),i("header",{id:"summary",class:q(["island workspace-header",{"workspace-header--collapsed":p(t)}])},[a("div",Oo,[a("h1",Do,m(p(v).workspace.name||"Whose Turn"),1),p(t)?(l(),i("p",Po,[n[1]||(n[1]=Z(" Your move ",-1)),a("b",Bo,m(p(ne).mine),1),n[2]||(n[2]=Z(" · Waiting on others ",-1)),a("b",Vo,m(p(ne).others),1),n[3]||(n[3]=Z(" · Failing ",-1)),a("b",Ho,m(p(ne).failing),1),n[4]||(n[4]=Z(" · Done ",-1)),a("b",Uo,m(p(ne).done),1)])):C("",!0),a("p",Fo,[V(_e,{query:{ws:p(v).workspace.id,kind:"workspace"},big:""},null,8,["query"]),n[5]||(n[5]=a("span",{class:"ai-hint"},"Copy for AI: this workspace",-1)),a("span",Wo,[(l(!0),i(F,null,L(p(v).workspace.links||[],r=>(l(),Y(ae,{key:r.url,text:r.label,url:r.url,title:r.url},null,8,["text","url","title"]))),128))])])]),a("button",{type:"button",class:q(["fold-toggle workspace-header__fold",{"fold-toggle--folded":p(t)}]),"aria-label":"Fold the header","data-tip":"Fold the header; it stays folded until you open it again",onClick:n[0]||(n[0]=ee((...r)=>p(s)&&p(s)(...r),["stop"]))}," ▾ ",2),a("div",qo,[a("div",{class:q(["workspace-header__tile",{"workspace-header__tile--you":p(ne).mine>0}])},[n[6]||(n[6]=a("span",{class:"workspace-header__tile-label"},"Your move",-1)),a("strong",No,m(p(ne).mine),1)],2),a("div",jo,[n[7]||(n[7]=a("span",{class:"workspace-header__tile-label"},"Waiting on others",-1)),a("strong",Lo,m(p(ne).others),1)]),a("div",{class:q(["workspace-header__tile",{"workspace-header__tile--fail":p(ne).failing}])},[n[8]||(n[8]=a("span",{class:"workspace-header__tile-label"},"Open PRs with failing checks",-1)),a("strong",Yo,m(p(ne).failing),1)],2),a("div",Ko,[n[9]||(n[9]=a("span",{class:"workspace-header__tile-label"},"Done in the last 30 days",-1)),a("strong",Xo,m(p(ne).done),1)])])],2))}}),Zo=K(Go,[["__scopeId","data-v-df934d3f"]]),ut=e=>{Q(()=>I.reconnects,e)},Jo=j({__name:"Chevron",props:{open:{type:Boolean},tag:{default:"button"}},setup(e){return(t,s)=>(l(),Y(bs(e.tag),{class:q(["chevron",{"chevron--open":e.open}]),type:e.tag==="button"?"button":void 0,"aria-expanded":e.tag==="button"?e.open:void 0},null,8,["class","type","aria-expanded"]))}}),We=K(Jo,[["__scopeId","data-v-a14fa9ba"]]),Qo=["aria-orientation","aria-label"],Mt=16,ea=j({__name:"ResizeHandle",props:{label:{},axis:{},bounds:{type:Function},grow:{},top:{type:Boolean}},emits:["resize","reset"],setup(e,{emit:t}){const s=e,o=t,n=s.grow??1;let r={pointer:0,size:0,min:0,max:0};const u=d=>s.axis==="y"?d.clientY:d.clientX,c=d=>{const{current:f,min:w,max:k}=s.bounds();r={pointer:u(d),size:f,min:w,max:k},d.currentTarget.setPointerCapture(d.pointerId)},h=d=>{if(!d.currentTarget.hasPointerCapture(d.pointerId))return;const f=(u(d)-r.pointer)*n;o("resize",At(r.size+f,r.min,r.max))},_=d=>{const f=s.axis==="y"?"ArrowDown":"ArrowRight",w=s.axis==="y"?"ArrowUp":"ArrowLeft";if(d.key!==f&&d.key!==w)return;d.preventDefault();const{current:k,min:z,max:b}=s.bounds(),y=(d.key===f?Mt:-Mt)*n;o("resize",At(k+y,z,b))};return(d,f)=>(l(),i("div",{class:q(["resize-handle",["resize-handle--"+e.axis,{"resize-handle--top":e.top}]]),role:"separator",tabindex:"0","aria-orientation":e.axis==="y"?"horizontal":"vertical","aria-label":e.label,"data-tip":"Drag to resize; double click to reset",onPointerdown:ee(c,["prevent"]),onPointermove:h,onKeydown:_,onDblclick:f[0]||(f[0]=w=>o("reset"))},null,42,Qo))}}),as=K(ea,[["__scopeId","data-v-ff085c8c"]]),ta=["id"],sa={class:"island__head"},na={class:"island__title"},oa={class:"island__note"},aa={class:"island__note-text"},la=["aria-label","data-tip"],ra={class:"island__body"},ia=280,ca=360,ua=j({__name:"Island",props:{id:{},title:{},note:{default:""},tip:{default:""},column:{type:Boolean},resize:{default:"height"}},setup(e){const t=e,{collapsed:s,toggle:o}=os(t.id),{size:n,set:r}=ct(t.id),u=He("root"),c=B(0),h=y=>parseFloat(y)||0,_=(y,g)=>{let x=0;for(let A=y.parentElement;A&&A!==g;A=A.parentElement)x+=A.scrollTop;return x},d=(y,g)=>{const x=[...y.children].find(P=>P.contains(g));return(x?[...y.children].slice([...y.children].indexOf(x)+1):[]).filter(P=>!P.classList.contains("row-scroll__more")).reduce((P,X)=>{const D=X;return P+(h(getComputedStyle(D).minHeight)||D.offsetHeight)},0)},f=()=>{const y=u.value,g=y==null?void 0:y.querySelector(".island__body");if(!y||!g||s.value||t.resize!=="height")return;const x=g.querySelectorAll("tbody > tr, .todos__list > li"),A=y.getBoundingClientRect().top,P=h(getComputedStyle(g).paddingBottom);if(!x.length){c.value=Math.ceil(g.offsetTop+g.scrollHeight);return}const X=x[0].getBoundingClientRect().bottom-A+_(x[0],y);c.value=Xn(X+d(g,x[0])+P+2,x.length)};let w=0;const k=()=>{cancelAnimationFrame(w),w=requestAnimationFrame(f)};zt(()=>{var g;const y=(g=u.value)==null?void 0:g.querySelector(".island__body");y&&(Ds(y,k,{childList:!0,subtree:!0}),Ps(y,k)),k()});const z=y=>{var g;return[...((g=y.parentElement)==null?void 0:g.children)??[]].filter(x=>x!==y&&x instanceof HTMLElement).map(x=>({collapsed:x.classList.contains("island--collapsed"),height:x.offsetHeight,floor:h(x.style.getPropertyValue("--island-floor"))}))},b=()=>{const y=u.value;if(f(),t.resize==="width"){const A=y.parentElement,P=h(getComputedStyle(A).columnGap);return{current:y.offsetWidth,min:ia,max:A.clientWidth-P-ca}}const g=y.parentElement,x=h(getComputedStyle(g).rowGap);return{current:y.offsetHeight,min:c.value,max:Math.max(Gn(g.clientHeight,x,z(y)),g.clientHeight)}};return(y,g)=>(l(),i("section",{id:e.id,ref_key:"root",ref:u,class:q(["island",{"island--collapsed":p(s),"island--column":e.column,"island--sized":p(n)!==null&&e.resize==="height"}]),style:Ee(e.resize==="height"?{"--island-floor":c.value+"px","--island-height":(p(n)??0)+"px"}:void 0)},[a("div",sa,[V(We,{open:!p(s),"aria-label":"Fold "+e.title,"data-tip":"Fold this panel; it stays folded until you open it again",onClick:ee(p(o),["stop"])},null,8,["open","aria-label","onClick"]),a("h2",na,[Z(m(e.title)+" ",1),Ze(y.$slots,"head",{},void 0)]),a("p",oa,[a("span",aa,m(e.note),1),e.tip?(l(),i("button",{key:0,type:"button",class:"hint-icon","aria-label":"About "+e.title,"data-tip":e.tip}," ? ",8,la)):C("",!0)])]),a("div",ra,[Ze(y.$slots,"default",{},void 0)]),p(s)?C("",!0):(l(),Y(as,{key:0,label:"Resize "+e.title,axis:e.resize==="width"?"x":"y",grow:e.resize==="width"?-1:1,bounds:b,onResize:p(r),onReset:g[0]||(g[0]=x=>p(r)(null))},null,8,["label","axis","grow","onResize"]))],14,ta))}}),qe=K(ua,[["__scopeId","data-v-2113916e"]]),da=["aria-label"],pa=["aria-pressed","onClick"],ha={key:0,class:"count"},_a=j({__name:"Segmented",props:Je({options:{},label:{default:""},chips:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=Ot(e,"modelValue");return(s,o)=>(l(),i("span",{class:q(["segmented",{"segmented--chips":e.chips}]),role:"group","aria-label":e.label},[(l(!0),i(F,null,L(e.options,n=>(l(),i("button",{key:n.id,type:"button",class:"segmented__option","aria-pressed":t.value===n.id,onClick:r=>t.value=n.id},[Z(m(n.label),1),n.count!==void 0?(l(),i("b",ha,m(n.count),1)):C("",!0)],8,pa))),128))],10,da))}}),Ve=K(_a,[["__scopeId","data-v-201d5e2f"]]),fa={class:"ticket-cell"},ma={class:"ticket-cell__summary"},va=j({__name:"TicketCell",props:{row:{}},setup(e){return(t,s)=>(l(),i("td",fa,[V(ae,{text:e.row.key,url:p(Ut)(e.row)?e.row.pr_url:e.row.ticket_url,class:"ticket-key"},null,8,["text","url"]),a("span",ma,m(e.row.summary),1)]))}}),dt=K(va,[["__scopeId","data-v-e2d11a0b"]]),ga={key:0,class:"pr-cell"},ya={key:1,class:"pill"},ka=j({__name:"PrCell",props:{row:{}},setup(e){return(t,s)=>(l(),i("td",null,[e.row.pr&&!p(Ut)(e.row)?(l(),i("span",ga,[V(ae,{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?(l(),i("span",{key:0,class:q(["pill",p(be)("pill",p(qs)(e.row.checks))])},m(e.row.checks),3)):e.row.pr_state?(l(),i("span",ya,m(e.row.pr_state.toLowerCase()),1)):C("",!0)])):C("",!0)]))}}),ls=K(ka,[["__scopeId","data-v-6078ccbd"]]),wa=["open"],ba={class:"recently-done__summary"},xa={class:"count"},$a={class:"table"},Sa=["data-tip"],Ca={class:"table__actions"},Ra=480,Ta=j({__name:"RecentlyDone",setup(e){const{size:t,set:s}=ct("recently-done"),o=He("list"),n=_=>{var f;const d=(f=_.closest(".island__body"))==null?void 0:f.querySelector(".row-scroll");return d?Math.max(0,d.clientHeight-(parseFloat(getComputedStyle(d).minHeight)||0)):0},r=()=>{const _=o.value,f=(_.querySelector("tbody > tr")??_).getBoundingClientRect().bottom-_.getBoundingClientRect().top,w=parseFloat(getComputedStyle(_).paddingBottom)||0;return{current:_.offsetHeight,min:Math.ceil(f+_.scrollTop+w),max:Math.min(Ra,_.offsetHeight+n(_))}},u=ke("wt-recent-open",!1,{writeDefaults:!1,serializer:{read:_=>_==="1",write:_=>_?"1":"0"}}),c=_=>{u.value=_.target.open},h=$(()=>(he.value,Ns(v.turn).map(_=>({row:_,since:it(_.status_since||_.updated)}))));return(_,d)=>h.value.length?(l(),i("details",{key:0,class:"recently-done",open:p(u),onToggle:c},[a("summary",ba,[V(We,{tag:"span",open:p(u)},null,8,["open"]),d[1]||(d[1]=Z(" Recently done ",-1)),a("span",xa,m(h.value.length),1)]),a("div",{ref_key:"list",ref:o,class:"recently-done__list",style:Ee(p(t)===null?void 0:{maxHeight:p(t)+"px",height:p(t)+"px"})},[a("table",$a,[d[2]||(d[2]=a("thead",null,[a("tr",null,[a("th",null,"Ticket"),a("th",null,"Status"),a("th",null,"Done"),a("th",{class:"table__actions-col"},[a("span",{class:"visually-hidden"},"Copy for AI")])])],-1)),a("tbody",null,[(l(!0),i(F,null,L(h.value,({row:f,since:w})=>(l(),i("tr",{key:f.row_id},[V(dt,{row:f},null,8,["row"]),a("td",null,[a("span",{class:q(["pill",p(be)("pill",p(Ft)(f.status_group))])},m(f.status),3)]),a("td",null,[a("span",{class:"age","data-tip":"Done "+p(rt)(f.status_since||f.updated)},m(w.text),9,Sa)]),a("td",Ca,[V(_e,{class:"table__ai",query:{ws:p(v).workspace.id,kind:"row",ref:f.row_id}},null,8,["query"])])]))),128))])])],4),p(u)?(l(),Y(as,{key:0,label:"Resize Recently done",axis:"y",top:"",grow:-1,bounds:r,onResize:p(s),onReset:d[0]||(d[0]=f=>p(s)(null))},null,8,["onResize"])):C("",!0)],40,wa)):C("",!0)}}),Aa=K(Ta,[["__scopeId","data-v-eea77605"]]),Ma=13,Ea=j({__name:"RowScroll",props:{floor:{type:Boolean}},setup(e){const t=B(null),s=B(null),{y:o}=Bs(t),{height:n}=vt(t),{height:r}=vt(s),u=()=>{var d,f,w;return[...((w=(f=(d=s.value)==null?void 0:d.querySelector("table"))==null?void 0:f.tBodies[0])==null?void 0:w.rows)||[]]},c=()=>{const d=t.value;return d?d.getBoundingClientRect().top+d.clientTop+d.clientHeight:0},h=$(()=>(o.value,n.value,r.value,js(u().map(d=>d.getBoundingClientRect().bottom),c(),Ma))),_=()=>{var b,y;const d=t.value,f=u(),w=f[f.length-h.value];if(!d||!w)return;const z=((y=(b=s.value)==null?void 0:b.querySelector("thead"))==null?void 0:y.getBoundingClientRect().bottom)??d.getBoundingClientRect().top;d.scrollBy({top:w.getBoundingClientRect().top-z,behavior:"smooth"})};return(d,f)=>(l(),i(F,null,[a("div",{ref_key:"scroller",ref:t,class:q(["row-scroll",{"row-scroll--floor":e.floor}])},[a("div",{ref_key:"content",ref:s},[Ze(d.$slots,"default",{},void 0)],512)],2),h.value?(l(),i("button",{key:0,type:"button",class:"row-scroll__more",onClick:_}," +"+m(h.value)+" more ",1)):C("",!0)],64))}}),rs=K(Ea,[["__scopeId","data-v-263b2407"]]),Ia=B("open"),za=()=>Ia,Oa={key:0,class:"your-move__undo",role:"status"},Da={class:"table"},Pa={key:0},Ba={key:1,class:"hide-narrow"},Va={class:"hint-row"},Ha={class:"your-move__next"},Ua=["data-tip"],Fa=["data-tip"],Wa=["data-tip"],qa={key:0,class:"alert alert--inline your-move__problem",role:"alert"},Na={class:"table__actions"},ja=["aria-label","onClick"],La={key:1,class:"empty"},Ya=j({__name:"YourMove",setup(e){const t=za(),s=$(()=>{he.value;const f=Ls(v.turn,t.value);return{...f,rows:f.rows.map(w=>({...w,age:it(w.row.activity_at)}))}}),o=$(()=>Wt(s.value.rows.map(f=>f.row))),n=$(()=>s.value.rows.some(f=>f.row.comment)),r=$(()=>[{id:"open",label:"Open",count:s.value.open},{id:"handled",label:"Handled",count:s.value.handled}]),u=$(()=>{if(t.value==="handled")return"Nothing marked as handled.";const{noData:f,failing:w}=ns(v.health,v.polled_at,v.workspace.connectors.length,I.live);return f?"No data: "+w.join(", ")+(w.length===1?" is":" are")+" failing. Check Settings.":"Nothing is waiting on you."}),c=nt(new Map);ut(()=>c.clear());const h=async f=>{const w=f.row.row_id,k=await ve({handled:{[w]:f.handled?null:new Date().toISOString()}});k?c.set(w,k):(c.delete(w),_.value=f.handled?"":w)},_=we("",8e3),d=()=>{const f=_.value;return _.value="",ve({handled:{[f]:null}})};return(f,w)=>(l(),Y(qe,{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:oe(()=>[V(Ve,{modelValue:p(t),"onUpdate:modelValue":w[0]||(w[0]=k=>xs(t)?t.value=k:null),options:r.value,label:"Show",class:"your-move__view"},null,8,["modelValue","options"])]),default:oe(()=>[p(_)?(l(),i("p",Oa,[w[1]||(w[1]=Z(" Marked handled. ",-1)),a("button",{type:"button",class:"your-move__undo-btn",onClick:d},"Undo")])):C("",!0),V(rs,{floor:""},{default:oe(()=>[a("table",Da,[a("thead",null,[a("tr",null,[w[2]||(w[2]=a("th",null,"Ticket",-1)),w[3]||(w[3]=a("th",null,"Next step",-1)),o.value?(l(),i("th",Pa,"PR")):C("",!0),n.value?(l(),i("th",Ba,"Last comment")):C("",!0),w[4]||(w[4]=a("th",{class:"table__actions-col"},[a("span",{class:"visually-hidden"},"Mark")],-1))])]),a("tbody",null,[(l(!0),i(F,null,L(s.value.rows,k=>(l(),i("tr",{key:k.row.row_id,class:q(["your-move__row",{"your-move__row--handled":k.handled}])},[V(dt,{row:k.row},null,8,["row"]),a("td",null,[a("span",Va,[a("span",Ha,m(k.row.next),1),k.age.text?(l(),i("span",{key:0,class:q(["age",{"age--old":k.age.old}]),"data-tip":"Waiting since "+p(rt)(k.row.activity_at)},m(k.age.text),11,Ua)):C("",!0),k.row.why?(l(),i("button",{key:1,type:"button",class:"hint-label","aria-label":"Why this is your move","data-tip":k.row.why}," why ",8,Fa)):C("",!0),k.handled?(l(),i("span",{key:2,class:"handled-chip","data-tip":"Marked "+p(le)(p(v).marks.handled[k.row.row_id]||"")+". Comes back in 7 days if it is still open, or sooner when something new happens."},"handled",8,Wa)):C("",!0)]),c.get(k.row.row_id)?(l(),i("p",qa,m(c.get(k.row.row_id)),1)):C("",!0)]),o.value?(l(),Y(ls,{key:0,row:k.row},null,8,["row"])):C("",!0),n.value?(l(),i("td",{key:1,class:q(["hide-narrow",{"your-move__quote":k.row.comment}])},[k.row.comment?(l(),Y(ae,{key:0,text:k.row.comment,url:k.row.comment_url},null,8,["text","url"])):C("",!0)],2)):C("",!0),a("td",Na,[V(_e,{class:"table__ai",query:{ws:p(v).workspace.id,kind:"row",ref:k.row.row_id}},null,8,["query"]),a("button",{type:"button",class:q(["your-move__mark",{"your-move__mark--undo":k.handled}]),"aria-label":(k.handled?"Move back to open: ":"Mark as handled: ")+k.row.key,onClick:ee(z=>h(k),["stop"])},m(k.handled?"Undo":"Handled"),11,ja)])],2))),128))])])]),_:1}),s.value.rows.length?C("",!0):(l(),i("p",La,m(u.value),1)),p(t)==="open"?(l(),Y(Aa,{key:2})):C("",!0)]),_:1}))}}),Ka=K(Ya,[["__scopeId","data-v-2baa7496"]]),Xa=B(!1),Ga=()=>Xa,Za={class:"todos__add"},Ja={key:0,class:"alert alert--inline",role:"alert"},Qa={key:1,class:"todos__undo",role:"status"},el={class:"todos__list"},tl=["aria-checked","aria-label","onClick"],sl=["onKeydown"],nl=["onDblclick"],ol={class:"todos__meta"},al=["onClick"],ll=["onClick"],rl={key:0,class:"empty todos__empty"},il=j({__name:"Todos",setup(e){const t=Ga(),s=B(""),o=$(()=>(v.todos||[]).filter(O=>!O.done)),n=$(()=>(v.todos||[]).filter(O=>O.done)),r=$(()=>new RegExp(v.workspace.key_pattern||"(?!)","g")),u=O=>{const N=[];let H=0;const M=O.text;for(const W of M.matchAll(r.value))W.index>H&&N.push({text:M.slice(H,W.index)}),N.push({text:W[0],url:W[0]===O.key?O.ticket_url:""}),H=W.index+W[0].length;return H<M.length&&N.push({text:M.slice(H)}),N},c=$(()=>(he.value,(t.value?o.value.concat(n.value):o.value).map(O=>({todo:O,parts:u(O),meta:(O.by&&O.by!=="you"?O.by+" · ":"")+le(O.created)})))),h=B("");ut(()=>{h.value=""});const _=async O=>(h.value=await Pn(O),!h.value),d=async()=>{const O=s.value.trim();O&&await _({action:"add",text:O})&&s.value.trim()===O&&(s.value="")},f=O=>_({action:O.done?"undo":"done",id:O.id}),w=B(null),k=async O=>{await _({action:"delete",id:O.id})&&(w.value=O)},z=async()=>{const O=w.value;if(w.value=null,O&&await _({action:"add",text:O.text})&&O.done){const N=(v.todos||[]).find(H=>H.text===O.text&&!H.done);N&&await _({action:"done",id:N.id})}},b=B(""),y=B(""),g=He("editBox"),x=async O=>{var N,H;b.value=O.id,y.value=O.text,await ye(),(H=(N=g.value)==null?void 0:N[0])==null||H.focus()},A=()=>{b.value=""},P=async O=>{const N=y.value.trim();if(!N||N===O.text)return A();await _({action:"edit",id:O.id,text:N})&&A()},X=$({get:()=>t.value?"done":"open",set:O=>{t.value=O==="done"}}),D=$(()=>[{id:"open",label:"Open",count:o.value.length},{id:"done",label:"Done",count:n.value.length}]);return(O,N)=>(l(),Y(qe,{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:oe(()=>[V(Ve,{modelValue:X.value,"onUpdate:modelValue":N[0]||(N[0]=H=>X.value=H),options:D.value,label:"Show",class:"todos__view"},null,8,["modelValue","options"])]),default:oe(()=>[a("div",Za,[Ie(a("input",{"onUpdate:modelValue":N[1]||(N[1]=H=>s.value=H),class:"input todos__input",type:"text",placeholder:"Add a to-do and press Enter","aria-label":"New to-do",autocomplete:"off",onKeydown:fe(d,["enter"])},null,544),[[ze,s.value]]),a("button",{type:"button",class:"btn btn--tonal",onClick:d},"Add")]),h.value?(l(),i("p",Ja,m(h.value),1)):C("",!0),w.value?(l(),i("p",Qa,[N[3]||(N[3]=Z(" To-do deleted. ",-1)),a("button",{type:"button",class:"todos__undo-btn",onClick:z},"Undo")])):C("",!0),a("ul",el,[(l(!0),i(F,null,L(c.value,({todo:H,parts:M,meta:W})=>(l(),i("li",{key:H.id,class:q(["todos__item",{"todos__item--done":H.done}])},[a("button",{type:"button",class:q(["todos__check",{"todos__check--on":H.done}]),role:"checkbox","aria-checked":!!H.done,"aria-label":H.done?"Mark not done":"Mark done",onClick:T=>f(H)},null,10,tl),b.value===H.id?Ie((l(),i("input",{key:0,ref_for:!0,ref_key:"editBox",ref:g,"onUpdate:modelValue":N[2]||(N[2]=T=>y.value=T),class:"input todos__edit",type:"text",maxlength:"500","aria-label":"Edit to-do",autocomplete:"off",onKeydown:[fe(T=>P(H),["enter"]),fe(A,["esc"])],onBlur:A},null,40,sl)),[[ze,y.value]]):(l(),i("span",{key:1,class:"todos__text",onDblclick:T=>x(H)},[(l(!0),i(F,null,L(M,(T,J)=>(l(),i(F,{key:J},[T.url!==void 0?(l(),Y(ae,{key:0,text:T.text,url:T.url},null,8,["text","url"])):(l(),i(F,{key:1},[Z(m(T.text),1)],64))],64))),128))],40,nl)),a("span",ol,m(W),1),a("button",{type:"button",class:"todos__pencil","aria-label":"Edit to-do",onClick:T=>x(H)}," ✎ ",8,al),a("button",{type:"button",class:"todos__delete","aria-label":"Delete to-do",onClick:T=>k(H)}," × ",8,ll)],2))),128)),c.value.length?C("",!0):(l(),i("span",rl,m(p(t)?"Nothing here yet.":"Nothing to do. Add one above, or ask Claude."),1))])]),_:1}))}}),cl=K(il,[["__scopeId","data-v-9cae4a4b"]]),ul={key:0,class:"count"},dl={key:0,class:"empty"},pl={class:"table waiting__table"},hl={key:0,class:"hide-narrow"},_l={key:1,class:"waiting__col waiting__col--pr"},fl=["data-tip"],ml={key:0,class:"hide-narrow"},vl={key:0,class:"hint-row"},gl=["data-tip"],yl={class:"table__actions"},kl=j({__name:"Waiting",setup(e){const t=$(()=>(he.value,Ys(v.turn).map(r=>({row:r,since:r.status_since?it(r.status_since):null,own:r.status_group==="backlog"})))),s=$(()=>Wt(t.value.map(({row:r})=>r))),o=$(()=>t.value.some(({row:r,own:u})=>r.hold_url||!u&&r.next)),n=$(()=>t.value.length&&t.value.every(({own:r})=>r)?"Your backlog":"Someone else holds the next step");return(r,u)=>(l(),Y(qe,{id:"waiting",title:"Waiting on others",note:n.value,tip:"Tickets you touched in the last 30 days where someone else holds the next step: a reviewer, QA, or a new owner."},{head:oe(()=>[t.value.length?(l(),i("span",ul,m(t.value.length),1)):C("",!0)]),default:oe(()=>[t.value.length?(l(),Y(rs,{key:1},{default:oe(()=>[a("table",pl,[a("thead",null,[a("tr",null,[u[0]||(u[0]=a("th",{class:"waiting__col waiting__col--ticket"},"Ticket",-1)),u[1]||(u[1]=a("th",{class:"waiting__col waiting__col--status"},"Status",-1)),u[2]||(u[2]=a("th",{class:"waiting__col waiting__col--with"},"With",-1)),o.value?(l(),i("th",hl,"Waiting for")):C("",!0),s.value?(l(),i("th",_l,"PR")):C("",!0),u[3]||(u[3]=a("th",{class:"table__actions-col waiting__col waiting__col--actions"},[a("span",{class:"visually-hidden"},"Copy for AI")],-1))])]),a("tbody",null,[(l(!0),i(F,null,L(t.value,({row:c,since:h,own:_})=>(l(),i("tr",{key:c.row_id},[V(dt,{row:c},null,8,["row"]),a("td",null,[a("span",{class:q(["pill",p(be)("pill",p(Ft)(c.status_group))])},m(c.status),3)]),a("td",null,[Z(m(_?"you":c.whose)+" ",1),h?(l(),i("span",{key:0,class:q(["age",{"age--old":h.hours>=72}]),"data-tip":c.status+" since "+p(rt)(c.status_since)},m(h.text),11,fl)):C("",!0)]),o.value?(l(),i("td",ml,[c.hold_url?(l(),i("span",vl,[V(ae,{text:c.next,url:c.hold_url,class:"waiting__reason"},null,8,["text","url"]),a("button",{type:"button",class:"hint-label","aria-label":"Full reason","data-tip":c.hold_full||c.next}," full ",8,gl)])):_?C("",!0):(l(),i(F,{key:1},[Z(m(c.next),1)],64))])):C("",!0),s.value?(l(),Y(ls,{key:1,row:c},null,8,["row"])):C("",!0),a("td",yl,[V(_e,{class:"table__ai",query:{ws:p(v).workspace.id,kind:"row",ref:c.row_id}},null,8,["query"])])]))),128))])])]),_:1})):(l(),i("p",dl,"Nothing is waiting on someone else."))]),_:1},8,["note"]))}}),wl=K(kl,[["__scopeId","data-v-27152b25"]]),bl=(e,t)=>e.seen instanceof Set?e.seen.has(t):e.seen.includes(t),is=(e,t)=>new Date(e.at).getTime()>(t.base||0)&&!bl(t,e.id),xl=(e,t)=>{const s=String(t||"").toLowerCase().split(/\s+/).filter(Boolean);if(!s.length)return!0;const o=[e.ref,e.key,e.title,e.kind,e.who,e.text,e.body].join(" ").toLowerCase();return s.every(n=>o.includes(n))},$l=e=>e.key||e.ref||e.id,Sl=(e,t)=>{const s=new Map;for(const o of e){const n=$l(o),r=s.get(n)||{id:n,items:[],newest:o.at,unread:0,title:""};s.set(n,r),r.items.push(o),r.title||(r.title=o.title||""),o.at>r.newest&&(r.newest=o.at),is(o,t)&&(r.unread+=1)}return[...s.values()].sort((o,n)=>String(n.newest).localeCompare(String(o.newest)))},Cl=e=>new Set(e.filter(t=>t.group==="you"&&!t.handled).map(t=>t.key)),Rl=(e,t=2)=>{const s=[...new Set(e.map(n=>n.kind))],o=s.length-t;return s.slice(0,t).join(" · ")+(o>0?` +${o}`:"")},Tl=e=>/fail|changes/.test(e)?"bad":/approved|merged|passed/.test(e)?"ok":"",Al=e=>/comment|approved|changes|mentioned|review requested/.test(e.kind)&&String(e.body||"").trim()!=="",cs=e=>e.ref!==e.key&&(e.key||e.title)||"",Ml=e=>[cs(e),e.text===e.title?"":e.text].filter(Boolean).join(" · "),El=e=>e.type==="github"&&e.label==="GitHub"?"GH":ts(e.label),Il={class:"feed-item__body"},zl={class:"feed-item__top"},Ol={key:1,class:"feed-item__who"},Dl={key:2,class:"at-you"},Pl={class:"feed-item__right"},Bl={class:"timestamp feed-item__when"},Vl={key:0,class:"feed-item__text"},Hl={class:"feed-item__full"},Ul={class:"feed-item__actions"},Fl={key:1,class:"feed-item__text"},Wl=j({__name:"FeedItem",props:{item:{},source:{},fresh:{type:Boolean},expanded:{type:Boolean}},emits:["open","toggle","seen"],setup(e,{emit:t}){const s=e,o=t,n=$(()=>El(s.source)),r=$(()=>cs(s.item)),u=$(()=>Ml(s.item)),c=$(()=>Tl(s.item.kind)),h=$(()=>c.value||(s.source.type==="github"?"":"jira")),_=$(()=>Al(s.item)),d=$(()=>_.value&&s.expanded),f=$(()=>(he.value,le(s.item.at))),w=()=>{s.fresh&&o("seen",s.item.id)},k=()=>{o("toggle",s.item.id),w()};return(z,b)=>(l(),i("li",{class:q(["feed-item",{"feed-item--new":e.fresh,"feed-item--open":d.value}]),onClick:w},[a("span",{class:q(["feed-item__icon",p(be)("feed-item__icon",h.value)])},m(n.value),3),a("div",Il,[a("div",zl,[_.value?(l(),Y(We,{key:0,open:d.value,"aria-label":d.value?"Collapse":"Expand",onClick:ee(k,["stop"])},null,8,["open","aria-label"])):C("",!0),V(ae,{text:e.item.ref,url:e.item.url},null,8,["text","url"]),a("span",{class:q(["feed-item__kind",{"feed-item__kind--bad":c.value==="bad"}])},m(e.item.kind),3),e.item.who?(l(),i("span",Ol,m(e.item.who),1)):C("",!0),e.item.mention?(l(),i("span",Dl,"@you")):C("",!0),a("span",Pl,[a("span",Bl,m(f.value),1)])]),d.value?(l(),i(F,{key:0},[r.value?(l(),i("span",Vl,m(r.value),1)):C("",!0),a("div",Hl,m(e.item.body),1),a("div",Ul,[a("button",{type:"button",class:"btn btn--tonal",onClick:b[0]||(b[0]=ee(y=>o("open",e.item),["stop"]))}," Open formatted "),V(_e,{query:{ws:p(v).workspace.id,kind:"feed",ref:e.item.id}},null,8,["query"]),V(ae,{text:"Open in "+e.source.label,url:e.item.url,class:"btn"},null,8,["text","url"])])],64)):u.value?(l(),i("span",Fl,m(u.value),1)):C("",!0)])],2))}}),Et=K(Wl,[["__scopeId","data-v-03f50e9f"]]),ql=nt({source:"all",view:ke("wt-feed-view","ticket",{writeDefaults:!1}),query:"",openGroups:new Set}),Nl=()=>ql,jl={key:0,class:"feed__new-count"},Ll={class:"feed__bar"},Yl={key:0,class:"alert alert--inline",role:"alert"},Kl={key:1,class:"feed__undo",role:"status"},Xl={class:"feed__search"},Gl={class:"feed__search-count"},Zl={key:2,class:"empty"},Jl={key:3,class:"feed__list"},Ql=["title","onClick"],er={class:"feed__group-text"},tr={class:"feed__group-key"},sr={key:0,class:"feed__group-sum"},nr={class:"feed__group-meta"},or={class:"feed__group-kinds"},ar={class:"timestamp feed__group-when"},lr={key:0,class:"feed__children"},rr=j({__name:"Feed",emits:["open"],setup(e,{emit:t}){const s=t,o=Nl(),n=[{id:"ticket",label:"By ticket"},{id:"flat",label:"Flat"}],r=$(()=>v.workspace.connectors||[]),u=$(()=>Object.fromEntries(r.value.map(M=>[M.id,M]))),c=M=>u.value[M]||{id:M,type:M,label:M},h=$(()=>r.value.length>1?[{id:"all",label:"All"}].concat(r.value.map(M=>({id:M.id,label:M.label}))):[]),_=$({get:()=>h.value.some(M=>M.id===o.source)?o.source:"all",set:M=>{o.source=M}});Q(()=>v.workspace.id,()=>{o.query=""});const d=$(()=>({base:v.marks.base,seen:new Set(v.marks.seen)})),f=M=>is(M,d.value),w=$(()=>v.feed.filter(f).length),k=$(()=>v.feed.filter(M=>_.value==="all"||M.source===_.value)),z=$(()=>k.value.filter(M=>xl(M,o.query)).slice(0,200)),b=$(()=>new Map(v.turn.map(M=>[M.key,M]))),y=$(()=>Cl(v.turn)),g=$(()=>(he.value,Sl(z.value,d.value).map(M=>({...M,row:b.value.get(M.id),move:y.value.has(M.id),when:le(M.newest),kinds:Rl(M.items),open:o.openGroups.has(M.id)||!!o.query})))),x=(M,W)=>{M.has(W)?M.delete(W):M.add(W)},A=M=>x(o.openGroups,M.id),P=M=>x(I.open,M),X=M=>ve({seen:[M]}).then(pe),D=B("");ut(()=>{D.value=""});const O=B(null),N=async()=>{const M=new Set(v.marks.seen),W={base:v.marks.base,added:v.feed.map(T=>T.id).filter(T=>!M.has(T))};D.value=await ve({seen:v.feed.map(T=>T.id),base:Date.now()}),O.value=D.value?null:W},H=async()=>{const M=O.value;O.value=null,M&&(D.value=await ve({unseen:M.added,base:M.base}))};return(M,W)=>(l(),Y(qe,{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:"",resize:"width"},{head:oe(()=>[w.value?(l(),i("span",jl,m(w.value)+" new",1)):C("",!0)]),default:oe(()=>[a("div",Ll,[h.value.length?(l(),Y(Ve,{key:0,modelValue:_.value,"onUpdate:modelValue":W[0]||(W[0]=T=>_.value=T),options:h.value,label:"Feed source"},null,8,["modelValue","options"])):C("",!0),V(Ve,{modelValue:p(o).view,"onUpdate:modelValue":W[1]||(W[1]=T=>p(o).view=T),options:n,label:"Feed view"},null,8,["modelValue"])]),D.value?(l(),i("p",Yl,m(D.value),1)):C("",!0),O.value?(l(),i("p",Kl,[W[5]||(W[5]=Z(" Marked all read. ",-1)),a("button",{type:"button",class:"feed__undo-btn",onClick:H},"Undo")])):C("",!0),a("div",Xl,[Ie(a("input",{"onUpdate:modelValue":W[2]||(W[2]=T=>p(o).query=T),class:"input feed__search-input",type:"search",placeholder:"Search the feed: key, author, words…","aria-label":"Search the feed",autocomplete:"off"},null,512),[[ze,p(o).query,void 0,{trim:!0}]]),a("span",Gl,m(p(o).query?z.value.length+" of "+k.value.length:""),1),a("button",{type:"button",class:"feed__mark-read",onClick:N},"Mark all read")]),p(v).feed.length?(l(),i("ol",Jl,[p(o).view==="ticket"?(l(!0),i(F,{key:0},L(g.value,T=>(l(),i("li",{key:T.id,class:q(["feed__group",{"feed__group--new":T.unread,"feed__group--open":T.open,"feed__group--move":T.move}])},[a("div",{class:"feed__group-head",title:T.move?"Your move on this ticket":void 0,onClick:J=>A(T)},[V(We,{open:T.open,"aria-label":"Fold "+T.id},null,8,["open","aria-label"]),a("div",er,[a("div",tr,[V(ae,{text:T.id,url:T.row?T.row.ticket_url:T.items[0].url,class:"ticket-key feed__group-ticket"},null,8,["text","url"]),T.row||T.title?(l(),i("span",sr,m(T.row?T.row.summary:T.title),1)):C("",!0)]),a("div",nr,[a("span",{class:q(["feed__group-count",{"feed__group-count--new":T.unread}])},m(T.unread?T.unread+" new":T.items.length+(T.items.length===1?" event":" events")),3),a("span",or,m(T.kinds),1),a("span",ar,m(T.when),1)])]),V(_e,{class:"feed__group-copy",query:{ws:p(v).workspace.id,kind:"thread",ref:T.id}},null,8,["query"])],8,Ql),T.open?(l(),i("ul",lr,[(l(!0),i(F,null,L(T.items,J=>(l(),Y(Et,{key:J.id,item:J,source:c(J.source),fresh:f(J),expanded:p(I).open.has(J.id),onOpen:W[3]||(W[3]=Ne=>s("open",Ne)),onToggle:P,onSeen:X},null,8,["item","source","fresh","expanded"]))),128))])):C("",!0)],2))),128)):(l(!0),i(F,{key:1},L(z.value,T=>(l(),Y(Et,{key:T.id,item:T,source:c(T.source),fresh:f(T),expanded:p(I).open.has(T.id),onOpen:W[4]||(W[4]=J=>s("open",J)),onToggle:P,onSeen:X},null,8,["item","source","fresh","expanded"]))),128))])):(l(),i("p",Zl," No changes yet. New comments, reviews and status changes show up here. "))]),_:1}))}}),ir=K(rr,[["__scopeId","data-v-3068b692"]]),cr={id:"first-run",class:"island first-run","aria-labelledby":"first-run-title"},ur={class:"first-run__text"},dr=j({__name:"FirstRun",setup(e){const t=()=>Zt("connectors");return(s,o)=>(l(),i("section",cr,[o[1]||(o[1]=a("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)),a("p",ur,[a("b",null,m(p(v).workspace.name),1),o[0]||(o[0]=Z(" has no sources yet, so there is nothing to watch. Connect a repository or a tracker. ",-1))]),a("div",{class:"first-run__actions"},[a("button",{type:"button",class:"btn btn--tonal",onClick:t},"Add a source")]),o[2]||(o[2]=a("p",{class:"first-run__text first-run__ai"},' Or ask Claude: "add my GitHub repository to Whose Turn." ',-1))]))}}),pr=K(dr,[["__scopeId","data-v-84359c2d"]]),hr=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"),It=(e,t)=>{const s=lt(t);return s?{type:"link",text:e,href:s}:{type:"text",text:e}},_r=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 It(t.slice(1,s),t.slice(s+2,-1))}return e[4]?It(t,t):e[5]?{type:"mention",text:t}:{type:"em",text:t.slice(1,-1)}},Te=e=>{const t=new RegExp(hr),s=[];let o=0,n;for(;n=t.exec(e);)n.index>o&&s.push({type:"text",text:e.slice(o,n.index)}),s.push(_r(n)),o=n.index+n[0].length;return o<e.length&&s.push({type:"text",text:e.slice(o)}),s},fr=e=>{const t=String(e||"").replace(/<!--[\s\S]*?-->/g,"").split(`
2
+ `),s=[];let o=[],n=null;const r=()=>{o.length&&(s.push({type:"paragraph",lines:o.map(Te)}),o=[]),n=null};for(let u=0;u<t.length;u++){const c=t[u];if(/^\s*```/.test(c)){r();const f=[];for(u++;u<t.length&&!/^\s*```/.test(t[u]);u++)f.push(t[u]);s.push({type:"fence",text:f.join(`
3
+ `)});continue}const h=c.match(/^(#{1,6})\s+(.*)$/);if(h){r(),s.push({type:"heading",level:h[1].length<=2?4:5,inline:Te(h[2])});continue}const _=c.match(/^>\s?(.*)$/);if(_){r(),s.push({type:"quote",inline:Te(_[1])});continue}const d=c.match(/^\s*([-*+]|\d+[.)])\s+(.*)$/);if(d){const f=n;o.length&&(r(),n=f);const w=/\d/.test(d[1]),k=n,z=k&&k.ordered===w?k:{type:"list",ordered:w,items:[]};z!==k&&s.push(z),n=z,z.items.push(Te(d[2]));continue}if(!c.trim()){r();continue}n=null,o.push(c)}return r(),s},Me=(e,t,s="")=>{const o=document.createElement(e);return o.textContent=t,s&&(o.className=s),o},mr=e=>{if(e.type==="text")return document.createTextNode(e.text);if(e.type==="link"){const t=Me("a",e.text);return t.setAttribute("href",e.href),t.setAttribute("target","_blank"),t.setAttribute("rel","noopener"),t}return e.type==="mention"?Me("span",e.text,"markdown-view__mention"):Me(e.type,e.text)},us=(e,t)=>{e.forEach(s=>t.append(mr(s)))},Ge=(e,t)=>{const s=document.createElement(e);return us(t,s),s},vr=e=>{if(e.type==="fence"){const s=document.createElement("pre");return s.append(Me("code",e.text)),s}if(e.type==="heading")return Ge(`h${e.level}`,e.inline);if(e.type==="quote")return Ge("blockquote",e.inline);if(e.type==="list"){const s=document.createElement(e.ordered?"ol":"ul");return e.items.forEach(o=>s.append(Ge("li",o))),s}const t=document.createElement("p");return e.lines.forEach((s,o)=>{o&&t.append(document.createElement("br")),us(s,t)}),t},gr=e=>{const t=document.createDocumentFragment();return fr(e).forEach(s=>t.append(vr(s))),t},yr=j({__name:"MarkdownView",props:{source:{default:""}},setup(e){const t=e,s=B(null);return $s(()=>{s.value&&s.value.replaceChildren(gr(t.source))}),(o,n)=>(l(),i("div",{ref_key:"host",ref:s,class:"markdown-view"},null,512))}}),kr=K(yr,[["__scopeId","data-v-dcf42e95"]]),wr={class:"modal__card"},br={class:"modal__head"},xr={id:"modal-title",class:"modal__title"},$r=["href"],Sr=j({__name:"CommentModal",setup(e){const t=$(()=>I.modal),s=$(()=>t.value?[t.value.ref,t.value.kind,t.value.who].filter(Boolean).join(" · "):""),o=$(()=>t.value?lt(t.value.url):""),n=$(()=>{var c;const u=(v.workspace.connectors||[]).find(h=>{var _;return h.id===((_=t.value)==null?void 0:_.source)});return"Open in "+(u?u.label:(c=t.value)==null?void 0:c.source)}),r=()=>{I.modal=null};return(u,c)=>t.value?(l(),i("div",{key:0,class:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",onClick:ee(r,["self"])},[a("div",wr,[a("div",br,[a("h3",xr,m(s.value),1),o.value?(l(),i("a",{key:0,class:"btn",href:o.value,target:"_blank",rel:"noopener"},m(n.value),9,$r)):C("",!0),a("button",{type:"button",class:"btn",onClick:r},"Close")]),V(kr,{source:t.value.body||t.value.text||""},null,8,["source"])])])):C("",!0)}}),Cr={class:"modal__card feedback-sheet__card"},Rr={class:"modal__head"},Tr={class:"modal__meta"},Ar=["aria-disabled"],Mr={key:0,class:"alert"},Er={class:"sheet-form"},Ir=["placeholder","onKeydown"],zr={key:0,class:"feedback-sheet__note"},Or={key:1,class:"feedback-sheet__note"},Dr={key:2,class:"empty"},Pr=["href"],Br={key:3,class:"feedback-sheet__reports"},Vr=["href"],Hr={class:"feedback-sheet__report-title"},Ur={class:"timestamp"},Fr=j({__name:"FeedbackSheet",setup(e){const t=B(""),s=B(null),o=B(!1),n=B([]),r=B(null),u=B(""),c=B(!0),h=we("",1600),_=B([]),d=b=>"/report?id="+encodeURIComponent(b),f=()=>Fe("/api/feedback").then(b=>{c.value=b.configured,u.value=b.configured?"Linear · "+b.project:"not connected",_.value=b.reports||[]},()=>{n.value=[Oe+"; past reports cannot be loaded."]}),w=()=>{I.feedback=!1},k=()=>{const b=t.value.trim();if(!b){n.value=["Write at least one line."];return}n.value=[],navigator.clipboard.writeText(b).then(()=>{h.value="sent"},()=>{h.value="failed"})},z=()=>{if(!c.value||o.value)return;const b=t.value.trim();if(!b){n.value=["Write at least one line."];return}o.value=!0,ie("/api/feedback",{text:b,from:"the window",ws:v.workspace.id,kind_ref:{kind:"workspace",ref:v.workspace.id}}).then(y=>{if(o.value=!1,y.error){n.value=qt(y.error);return}r.value=y.issue||null,t.value="",_.value=y.reports||_.value}).catch(y=>{o.value=!1,n.value=[re(y,{refused:"Not sent",unreachable:Qe})]})};return Q(()=>I.feedback,b=>{b&&(n.value=[],r.value=null,f().then(()=>ye(()=>{var y;return(y=s.value)==null?void 0:y.focus()})))}),(b,y)=>p(I).feedback?(l(),i("div",{key:0,class:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"feedback-title",onClick:ee(w,["self"])},[a("div",Cr,[a("div",Rr,[y[1]||(y[1]=a("h3",{id:"feedback-title",class:"modal__title"},"Report a problem or a wish",-1)),a("span",Tr,m(u.value),1),a("button",{type:"button",class:"btn btn--tonal","aria-disabled":!c.value||o.value,onClick:z},m(o.value?"Composing…":"Send"),9,Ar),a("button",{type:"button",class:"btn",onClick:w},"Close")]),n.value.length?(l(),i("div",Mr,m(n.value.join(" · ")),1)):C("",!0),a("div",Er,[Ie(a("textarea",{ref_key:"field",ref:s,"onUpdate:modelValue":y[0]||(y[0]=g=>t.value=g),class:"input feedback-sheet__text",rows:"5",placeholder:"Describe the problem or the wish in your own words."+(c.value?" Cmd+Enter sends.":""),autocomplete:"off",onKeydown:[fe(ee(z,["meta","prevent"]),["enter"]),fe(ee(z,["ctrl","prevent"]),["enter"])]},null,40,Ir),[[ze,t.value]]),c.value?(l(),i("p",Or," 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. ")):(l(),i("p",zr,[y[2]||(y[2]=Z(" 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)),a("button",{type:"button",class:"btn",onClick:k},m(p(h)==="sent"?"Copied":p(h)==="failed"?"Could not copy":"Copy remark"),1)])),r.value?(l(),i("p",Dr,[y[3]||(y[3]=Z(" Filed as ",-1)),a("a",{href:d(r.value.identifier),target:"_blank",rel:"noopener"},m(r.value.identifier),9,Pr),Z(" · "+m(r.value.title),1)])):C("",!0),_.value.length?(l(),i("div",Br,[y[4]||(y[4]=a("h4",{class:"sheet-form__heading"},"Your reports",-1)),(l(!0),i(F,null,L(_.value,g=>(l(),i("div",{key:g.id,class:"feedback-sheet__report"},[a("a",{href:d(g.id),target:"_blank",rel:"noopener"},m(g.id),9,Vr),a("span",Hr,m(g.title),1),a("span",{class:q(["pill",p(be)("pill",p(Ks)(g.outcome))])},m(g.state||"filed"),3),a("span",Ur,m(p(le)(g.changed_at||g.filed_at)),1)]))),128))])):C("",!0)])])])):C("",!0)}}),Wr=K(Fr,[["__scopeId","data-v-8e2792d9"]]),qr={class:"field-row"},Nr={class:"field-row__label"},jr={key:0,class:"field-row__check"},Lr=["checked"],Yr=["aria-invalid","value"],Kr={key:0,value:""},Xr=["value"],Gr=["value"],Zr={key:3,class:"field-row__inline"},Jr=["value"],Qr=["value"],ei=["aria-invalid","value"],ti=["aria-invalid","placeholder","value"],si={key:6,class:"field-row__error",role:"alert"},ni={key:7,class:"field-row__hint"},oi=j({__name:"FieldRow",props:Je({spec:{},placeholder:{default:""},hint:{default:""},error:{default:""}},{modelValue:{type:[String,Array,Boolean]},modelModifiers:{}}),emits:Je(["secret"],["update:modelValue"]),setup(e,{emit:t}){const s=e,o=t,n=Ot(e,"modelValue"),r=/^#[0-9a-f]{6}$/i,u=()=>String(n.value??""),c=()=>n.value||[],h=k=>{n.value=k},_=()=>n.value??s.spec.default??!1,d=k=>{n.value=k===(s.spec.default??!1)?void 0:k},f=k=>k.target.value,w=k=>h(k.split(",").map(z=>z.trim()).filter(Boolean));return(k,z)=>(l(),i("div",qr,[a("label",Nr,m(e.spec.label)+m(e.spec.required?" *":""),1),e.spec.boolean?(l(),i("label",jr,[a("input",{type:"checkbox",checked:_(),onChange:z[0]||(z[0]=b=>d(b.target.checked))},null,40,Lr),Z(" "+m(e.hint||e.spec.hint),1)])):e.spec.choices?(l(),i("select",{key:1,class:"input","aria-invalid":!!e.error,value:u(),onChange:z[1]||(z[1]=b=>h(f(b)))},[!e.spec.required&&!e.spec.choices.includes(u())?(l(),i("option",Kr,"(default)")):C("",!0),u()&&!e.spec.choices.includes(u())?(l(),i("option",{key:1,value:u()},m(u()),9,Xr)):C("",!0),(l(!0),i(F,null,L(e.spec.choices,b=>(l(),i("option",{key:b,value:b},m(b),9,Gr))),128))],40,Yr)):e.spec.secret?(l(),i("input",{key:2,class:"input",type:"password",placeholder:"paste to replace",autocomplete:"off",onInput:z[2]||(z[2]=b=>o("secret",e.spec.key,f(b)))},null,32)):e.spec.colour?(l(),i("div",Zr,[a("input",{class:"input field-row__colour",type:"color",value:r.test(u())?u():"#888888",onInput:z[3]||(z[3]=b=>h(f(b)))},null,40,Jr),a("input",{class:"input",type:"text",placeholder:"#rrggbb",value:u(),onInput:z[4]||(z[4]=b=>h(f(b)))},null,40,Qr),a("button",{type:"button",class:"btn",onClick:z[5]||(z[5]=b=>h(""))},"None")])):e.spec.list?(l(),i("input",{key:4,class:"input",type:"text","aria-invalid":!!e.error,value:c().join(", "),onInput:z[6]||(z[6]=b=>w(f(b)))},null,40,ei)):(l(),i("input",{key:5,class:"input",type:"text","aria-invalid":!!e.error,placeholder:e.placeholder,value:u(),onInput:z[7]||(z[7]=b=>h(f(b)))},null,40,ti)),e.error?(l(),i("small",si,m(e.error),1)):C("",!0),!e.spec.boolean&&(e.hint||e.spec.hint)?(l(),i("small",ni,m(e.hint||e.spec.hint),1)):C("",!0)]))}}),ue=K(oi,[["__scopeId","data-v-33714840"]]),ai={class:"modal__card settings-sheet__card"},li={class:"modal__head"},ri={class:"modal__meta"},ii={key:0,class:"settings-sheet__dirty"},ci={key:0,class:"settings-sheet__confirm",role:"alertdialog"},ui={class:"settings-sheet__confirm-text"},di={key:1,class:"alert settings-sheet__alert",role:"alert"},pi={key:2,class:"alert settings-sheet__alert"},hi={key:3,class:"settings-sheet__body"},_i={class:"settings-sheet__list"},fi=["aria-current","onClick"],mi={class:"sheet-form"},vi={key:0,class:"empty"},gi={ref:"connectors-head",class:"sheet-form__heading"},yi={class:"settings-sheet__connector-head"},ki={class:"settings-sheet__connector-name"},wi=["onClick"],bi={class:"settings-sheet__actions"},xi=["onClick"],$i={key:0,class:"settings-sheet__rules"},Si={class:"settings-sheet__rule-when"},Ci={class:"settings-sheet__rule-then"},Ri={key:1,class:"empty"},Ti=j({__name:"SettingsSheet",setup(e){const t=B([]),s=B(0),o=B([]),n=B({workspace:[],theme:[],rules:[],statuses:[]}),r=B(""),u=B([]),c=B({}),h=new Map,_=B({}),d=B({}),f=He("connectors-head"),w=new Map,k=B(0),z=B(""),b=B(null),y=B(""),g=$(()=>I.settings&&!y.value&&(k.value>0||wt(t.value)!==z.value)),x=R=>c.value[`workspaces[${s.value}].${R}`]||"",A=$(()=>{const R=D.value&&h.get(Re(D.value));return R&&D.value&&R!==D.value.id?`Its to-dos and marks stay under the old id "${R}"; they do not follow the rename.`:""}),P={key:"id",label:"Source id"},X={key:"label",label:"Label"},D=$(()=>t.value[s.value]),O=$(()=>(D.value&&_.value[D.value.id]||[]).map(xn)),N=$(()=>D.value&&d.value[D.value.id]||[]),H=R=>o.value.find(E=>E.type===R.type)||{type:R.type,label:R.type,fields:[]},M=$(()=>t.value.map((R,E)=>({uid:Re(R),label:R.name||R.id||"Workspace "+(E+1)}))),W=$(()=>{var R;return(((R=D.value)==null?void 0:R.connectors)||[]).map(E=>({entry:E,uid:Re(E),spec:H(E)}))}),T=R=>{var S;const E=(S=v.workspaces.find(G=>G.id===R))==null?void 0:S.theme_seed;return E?`empty: ${E}, derived from the workspace id`:"empty derives one from the workspace id"},J=(R,E)=>R[E],Ne=(R,E,S)=>{w.set(R,Object.assign(w.get(R)||{},{[E]:S})),k.value+=1},ds=(R,E,S)=>E==="id"?R.id=String(S??""):ce(R,E,S),ps=()=>{t.value.push(yt({id:"new-"+(t.value.length+1),name:"New workspace"})),s.value=t.value.length-1},hs=()=>{t.value.splice(s.value,1),s.value=Math.max(0,s.value-1)},_s=()=>{D.value&&(b.value={text:`Delete ${D.value.name||D.value.id}? Its to-dos and marks stay on disk.`,yes:"Delete",no:"Keep",run:hs})},fs=R=>{var E;return(E=D.value)==null?void 0:E.connectors.push({type:R.type})},ms=R=>{D.value&&(w.delete(D.value.connectors[R]),D.value.connectors.splice(R,1))},vs=R=>{if(!D.value)return;const E=H(D.value.connectors[R]).label;b.value={text:`Remove the ${E} source from ${D.value.name||D.value.id}?`,yes:"Remove",no:"Keep",run:()=>ms(R)}},gs=()=>Fe("/api/config").then(R=>{y.value="",t.value=(R.workspaces||[]).map(yt),o.value=R.connectors||[],n.value=R.fields,w.clear(),k.value=0,b.value=null,s.value=Math.max(0,t.value.findIndex(E=>E.id===v.workspace.id)),r.value=R.config_file||"",u.value=R.problems||[],c.value={},h.clear(),t.value.forEach(E=>h.set(Re(E),E.id)),_.value=R.tables||{},d.value=R.table_warnings||{},z.value=wt(t.value)}).catch(()=>{y.value=Oe+"; settings cannot be loaded."}).then(ye).then(()=>{var R;I.settingsAt==="connectors"&&((R=f.value)==null||R.scrollIntoView({block:"start"})),I.settingsAt=""}),je=()=>{I.settings=!1},pt=()=>{b.value={text:"Discard changes?",yes:"Discard",no:"Keep editing",run:je}},ht=()=>g.value?pt():je(),_t=R=>{const E=b.value;b.value=null,R&&(E==null||E.run())},ys=async()=>{try{const R=await ie("/api/config",{workspaces:t.value.map(E=>cn(E)),secrets:dn(t.value,w)});if(R.error){const E=Xs(R.error);c.value=Object.fromEntries(E.filter(S=>S.field!=="workspaces").map(S=>[S.field,S.description])),u.value=E.length?E.filter(S=>S.field==="workspaces").map(S=>S.description):qt(R.error),E.length&&!u.value.length&&(u.value=["Fix the marked fields; nothing was saved."]);return}je(),Qt()}catch(R){u.value=[re(R,{unreachable:Oe+"; your changes are kept, save again."})]}};return Q(g,R=>{I.settingsDirty=R},{immediate:!0}),Q(()=>I.settingsAsk,R=>{R&&(I.settingsAsk=!1,pt())}),Q(()=>I.settings,R=>{R&&gs()}),(R,E)=>p(I).settings?(l(),i("div",{key:0,class:"modal",role:"dialog","aria-modal":"true","aria-labelledby":"settings-title",onClick:ee(ht,["self"])},[a("div",ai,[a("div",li,[E[2]||(E[2]=a("h3",{id:"settings-title",class:"modal__title"},"Settings",-1)),a("span",ri,m(r.value),1),g.value?(l(),i("span",ii,"Unsaved changes")):C("",!0),y.value?C("",!0):(l(),i("button",{key:1,type:"button",class:"btn btn--tonal",onClick:ys},"Save")),a("button",{type:"button",class:"btn",onClick:ht},"Close")]),b.value?(l(),i("div",ci,[a("span",ui,m(b.value.text),1),a("button",{type:"button",class:"btn btn--danger",onClick:E[0]||(E[0]=S=>_t(!0))},m(b.value.yes),1),a("button",{type:"button",class:"btn",onClick:E[1]||(E[1]=S=>_t(!1))},m(b.value.no),1)])):C("",!0),y.value?(l(),i("div",di,m(y.value),1)):u.value.length?(l(),i("div",pi,m(u.value.join(" · ")),1)):C("",!0),y.value?C("",!0):(l(),i("div",hi,[a("ul",_i,[(l(!0),i(F,null,L(M.value,(S,G)=>(l(),i("li",{key:S.uid},[a("button",{type:"button",class:"settings-sheet__workspace","aria-current":G===s.value,onClick:$e=>s.value=G},m(S.label),9,fi)]))),128)),a("li",null,[a("button",{type:"button",class:"settings-sheet__workspace settings-sheet__workspace--add",onClick:ps}," + Add workspace ")])]),a("div",mi,[D.value?(l(),i(F,{key:1},[E[3]||(E[3]=a("h4",{class:"sheet-form__heading"},"Workspace",-1)),(l(!0),i(F,null,L(n.value.workspace,S=>(l(),Y(ue,{key:S.key,spec:S,hint:S.key==="id"?A.value:"",error:x(S.key),"model-value":J(D.value,S.key),"onUpdate:modelValue":G=>ds(D.value,S.key,G)},null,8,["spec","hint","error","model-value","onUpdate:modelValue"]))),128)),E[4]||(E[4]=a("h4",{class:"sheet-form__heading"},"Theme",-1)),(l(!0),i(F,null,L(n.value.theme,S=>{var G;return l(),Y(ue,{key:S.key,spec:S,hint:S.key==="seed"&&!((G=D.value.theme)!=null&&G.seed)?T(D.value.id):"","model-value":J(D.value.theme,S.key),"onUpdate:modelValue":$e=>p(ce)(D.value.theme,S.key,$e)},null,8,["spec","hint","model-value","onUpdate:modelValue"])}),128)),a("h4",gi,"Sources",512),(l(!0),i(F,null,L(W.value,({entry:S,spec:G,uid:$e},ft)=>(l(),i("div",{key:$e,class:"settings-sheet__connector"},[a("div",yi,[a("strong",ki,m(G.label),1),a("button",{type:"button",class:"btn btn--danger",onClick:se=>vs(ft)}," Remove ",8,wi)]),V(ue,{spec:P,placeholder:G.type,hint:"only needed when one type appears twice","model-value":J(S,"id"),"onUpdate:modelValue":se=>p(ce)(S,"id",se)},null,8,["placeholder","model-value","onUpdate:modelValue"]),V(ue,{spec:X,placeholder:G.label,hint:"its name in the feed","model-value":J(S,"label"),"onUpdate:modelValue":se=>p(ce)(S,"label",se)},null,8,["placeholder","model-value","onUpdate:modelValue"]),(l(!0),i(F,null,L(G.fields,se=>(l(),Y(ue,{key:se.key,spec:se,error:x("connectors["+ft+"]."+se.key),"model-value":J(S,se.key),"onUpdate:modelValue":Le=>p(ce)(S,se.key,Le),onSecret:(Le,ks)=>Ne(S,Le,ks)},null,8,["spec","error","model-value","onUpdate:modelValue","onSecret"]))),128))]))),128)),a("div",bi,[(l(!0),i(F,null,L(o.value,S=>(l(),i("button",{key:S.type,type:"button",class:"btn",onClick:G=>fs(S)}," + Add "+m(S.label)+" source ",9,xi))),128))]),E[5]||(E[5]=a("h4",{class:"sheet-form__heading"},"Rules",-1)),(l(!0),i(F,null,L(n.value.rules,S=>(l(),Y(ue,{key:S.key,spec:S,error:x("rules."+S.key),"model-value":J(D.value.rules,S.key),"onUpdate:modelValue":G=>p(ce)(D.value.rules,S.key,G)},null,8,["spec","error","model-value","onUpdate:modelValue"]))),128)),(l(!0),i(F,null,L(n.value.statuses,S=>(l(),Y(ue,{key:S.key,spec:S,"model-value":J(D.value.rules.statuses,S.key),"onUpdate:modelValue":G=>p(ce)(D.value.rules.statuses,S.key,G)},null,8,["spec","model-value","onUpdate:modelValue"]))),128)),E[6]||(E[6]=a("h4",{class:"sheet-form__heading"},"Whose turn table",-1)),E[7]||(E[7]=a("p",{class:"settings-sheet__rules-note"}," The rows in force, top to bottom: the first one that fits decides. Read-only here: ask Claude to change them. ",-1)),(l(!0),i(F,null,L(N.value,S=>(l(),i("p",{key:S,class:"settings-sheet__rules-warning"},m(S),1))),128)),O.value.length?(l(),i("ol",$i,[(l(!0),i(F,null,L(O.value,(S,G)=>(l(),i("li",{key:G,class:"settings-sheet__rule"},[a("span",Si,m(S.when),1),a("span",Ci,m(S.then),1)]))),128))])):(l(),i("p",Ri,"Save the workspace to see its rows.")),a("div",{class:"settings-sheet__actions"},[a("button",{type:"button",class:"btn btn--danger",onClick:_s}," Delete workspace ")])],64)):(l(),i("p",vi,"No workspaces yet. Add one on the left."))])]))])])):C("",!0)}}),Ai=K(Ti,[["__scopeId","data-v-649d0735"]]),Mi={class:"app__shell"},Ei=["inert"],Ii={id:"wt",class:"dashboard dashboard--fit"},zi=["inert"],Oi={class:"dashboard__main"},Di=j({__name:"App",setup(e){const t=$(()=>!!v.workspace.id&&!v.workspace.connectors.length),{size:s}=ct("feed"),o=$(()=>s.value===null?void 0:{"--feed-width":s.value+"px"}),n=$(()=>Jt.value!==null);Ln(n),Yn(n),Q(Ke,an,{flush:"post"});const r={light:{fill:"#d8e2ff",ink:"#001a41",dot:"#2c5697"},dark:{fill:"#2b4678",ink:"#d8e2ff",dot:"#adc6ff"}},u=$(()=>{const{id:c,name:h}=v.workspace;if(!c)return null;const _=Ke.value,d=r[Ue.value?"dark":"light"],f={fill:_["--md-primary-container"]||d.fill,ink:_["--md-on-primary-container"]||d.ink,dot:_["--md-primary"]||d.dot};return"data:image/svg+xml,"+encodeURIComponent(qn(ss({id:c,name:h},ot),f))});return Vs(u),at("Escape",An,{target:document}),zt(()=>{Tn()}),(c,h)=>(l(),i("div",{class:"app",style:Ee(p(Ke))},[V(co,{inert:n.value,onSettings:h[0]||(h[0]=_=>p(I).settings=!0)},null,8,["inert"]),a("div",Mi,[V(Eo,{inert:n.value,onReport:h[1]||(h[1]=_=>p(I).feedback=!0)},null,8,["inert"]),p(xt).length?(l(),i("div",{key:0,class:"alert",inert:n.value},[Z(m(p(xt).join(" · "))+" ",1),a("button",{type:"button",class:"alert__action",onClick:h[2]||(h[2]=_=>p(Zt)())},"Open Settings")],8,Ei)):C("",!0),a("div",Ii,[h[4]||(h[4]=a("canvas",{id:"backdrop",class:"dashboard__backdrop","aria-hidden":"true"},null,-1)),V(Zo,{inert:n.value},null,8,["inert"]),t.value?(l(),Y(pr,{key:0,inert:n.value},null,8,["inert"])):(l(),i("div",{key:1,class:"dashboard__layout",style:Ee(o.value),inert:n.value},[a("div",Oi,[V(Ka,{class:"dashboard__move"}),V(cl,{class:"dashboard__todo"}),V(wl,{class:"dashboard__waiting"})]),V(ir,{class:"dashboard__feed",onOpen:h[3]||(h[3]=_=>p(I).modal=_)})],12,zi)),V(Wr),V(Ai),V(Sr)])])],4))}}),Pi=K(Di,[["__scopeId","data-v-d275360b"]]);Ss(Pi).mount("#app");On();ln();
@@ -0,0 +1 @@
1
+ .rail[data-v-48248148]{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-48248148]:hover,.rail[data-v-48248148]:has(:focus-visible){width:232px;box-shadow:12px 0 32px #0000001f}.app:has(.modal) .rail[data-v-48248148]{z-index:0}.rail__item[data-v-48248148]{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-48248148]:focus-visible{outline:var(--focus-ring);outline-offset:-2px}.rail__item--dragging[data-v-48248148]{opacity:.4}.rail__item[data-drop=before][data-v-48248148]{box-shadow:0 -2px 0 0 var(--md-primary)}.rail__item[data-drop=after][data-v-48248148]{box-shadow:0 2px 0 0 var(--md-primary)}.rail__item[data-v-48248148]:hover{background:var(--state-hover)}.rail__item[aria-selected=true][data-v-48248148]{background:var(--md-secondary-container);color:var(--md-on-secondary-container)}.rail__icon[data-v-48248148]{flex:none;display:block;width:36px;height:36px;border-radius:10px}.rail__gear[data-v-48248148]{flex:none;display:grid;place-items:center;width:36px;height:36px;color:var(--md-on-surface-variant)}.rail__label[data-v-48248148]{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-48248148],.rail:has(:focus-visible) .rail__label[data-v-48248148]{opacity:1}.rail__badge[data-v-48248148]{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-48248148],.rail:has(:focus-visible) .rail__badge[data-v-48248148]{position:static;flex:none}.rail__warn[data-v-48248148]{position:absolute;left:26px;top:26px;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:var(--md-error);color:var(--md-on-error);font-size:10px;font-weight:800;line-height:1}.rail__spacer[data-v-48248148]{flex:1}.ai-button[data-v-46197bdc]{position:relative;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-46197bdc]{width:15px;height:15px}.ai-button__badge[data-v-46197bdc]{position:absolute;right:-3px;top:-3px;width:12px;height:12px}.ai-button[data-v-46197bdc]:hover{background:var(--md-secondary-container);transform:scale(1.08)}.ai-button[data-v-46197bdc]:focus-visible{outline:var(--focus-ring);outline-offset:1px}.ai-button.ai-button--sent[data-v-46197bdc]{background:var(--md-tertiary-container);color:var(--md-on-tertiary-container)}.ai-button.ai-button--failed[data-v-46197bdc]{background:var(--md-error-container);color:var(--md-on-error-container)}.ai-button--big[data-v-46197bdc]{width:32px;height:32px;background:rgb(var(--glass),.7)}.ai-button--big .ai-button__icon[data-v-46197bdc]{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-1a4ce564]{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-1a4ce564]{height:26px;padding:0 12px;font-size:12px;text-decoration:none}.status-bar__btn--busy[data-v-1a4ce564]{opacity:.6;pointer-events:none}.status-bar__report[data-v-1a4ce564]{gap:6px}.status-bar__icon[data-v-1a4ce564]{width:16px;height:16px}.status-bar__live[data-v-1a4ce564]{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-1a4ce564 2s infinite}.status-bar__live--off[data-v-1a4ce564]{background:var(--live-off);animation:none}.status-bar__live--warn[data-v-1a4ce564]{background:var(--live-warn);animation:none}.status-bar__notice[data-v-1a4ce564]{color:var(--live-off)}.status-bar__ai-hint[data-v-1a4ce564]{margin-left:-4px}@keyframes status-bar-pulse-1a4ce564{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-1a4ce564]{animation:none}}.workspace-header[data-v-df934d3f]{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-df934d3f]{background:var(--md-s-low)}}.workspace-header__title[data-v-df934d3f]{display:grid;align-content:center;gap:4px;padding:12px 16px}.workspace-header__name[data-v-df934d3f]{margin:0;font-size:28px;font-weight:400;line-height:36px;color:var(--md-on-primary-container)}.workspace-header__line[data-v-df934d3f]{margin:0;font-size:14px;opacity:.85}.workspace-header__count[data-v-df934d3f]{font-weight:700;font-variant-numeric:tabular-nums}.workspace-header__give[data-v-df934d3f]{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:8px;white-space:nowrap}.workspace-header__links[data-v-df934d3f]{display:inline-flex;gap:6px}.workspace-header__links a[data-v-df934d3f]{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-df934d3f]:hover{background:rgb(var(--glass),.85)}.workspace-header__fold[data-v-df934d3f]{grid-row:1;grid-column:3;place-self:center center;margin:0;color:inherit}.workspace-header__tiles[data-v-df934d3f]{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.workspace-header__tile[data-v-df934d3f]{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-df934d3f]{background:var(--md-s-low);-webkit-backdrop-filter:none;backdrop-filter:none}}.workspace-header__tile-label[data-v-df934d3f]{color:var(--md-on-surface-variant);font-size:12px;font-weight:500;line-height:16px;letter-spacing:.03em}.workspace-header__tile-value[data-v-df934d3f]{min-height:40px;font-size:32px;font-weight:400;line-height:40px;font-variant-numeric:tabular-nums}.workspace-header__tile--you[data-v-df934d3f]{border-color:transparent;background:var(--md-primary);color:var(--md-on-primary)}.workspace-header__tile--you .workspace-header__tile-label[data-v-df934d3f]{color:var(--md-on-primary);opacity:.85}.workspace-header__tile--fail .workspace-header__tile-value[data-v-df934d3f]{color:var(--md-error)}.workspace-header--collapsed[data-v-df934d3f]{grid-template-columns:minmax(0,1fr) 32px;padding:4px 8px}.workspace-header--collapsed .workspace-header__title[data-v-df934d3f]{display:flex;flex-wrap:wrap;align-items:baseline;gap:14px;padding:4px 8px}.workspace-header--collapsed .workspace-header__name[data-v-df934d3f]{font-size:18px;line-height:28px}.workspace-header--collapsed .workspace-header__tiles[data-v-df934d3f],.workspace-header--collapsed .workspace-header__give[data-v-df934d3f]{display:none}.workspace-header--collapsed .workspace-header__fold[data-v-df934d3f]{grid-column:2}.workspace-header--collapsed .workspace-header__strip[data-v-df934d3f]{font-size:13px}@media(max-width:900px){.workspace-header[data-v-df934d3f],.workspace-header--collapsed[data-v-df934d3f]{grid-template-columns:minmax(0,1fr) 32px}.workspace-header__fold[data-v-df934d3f]{grid-column:2}.workspace-header__tiles[data-v-df934d3f]{grid-column:1 / -1}}@media(max-width:640px){.workspace-header__tiles[data-v-df934d3f]{grid-template-columns:repeat(2,minmax(0,1fr))}}.chevron[data-v-a14fa9ba]{flex:none;display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;color:var(--md-on-surface-variant);cursor:pointer;-webkit-user-select:none;user-select:none}.chevron[data-v-a14fa9ba]:before{content:"";width:7px;height:7px;border-right:2px solid currentcolor;border-bottom:2px solid currentcolor;transform:translate(-1px) rotate(-45deg);transition:transform .15s ease}.chevron--open[data-v-a14fa9ba]:before{transform:translateY(-2px) rotate(45deg)}.chevron[data-v-a14fa9ba]:hover{background:var(--state-hover)}.chevron[data-v-a14fa9ba]:focus-visible{outline:var(--focus-ring)}.resize-handle[data-v-ff085c8c]{position:absolute;z-index:2;touch-action:none;border-radius:4px}.resize-handle[data-v-ff085c8c]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;border-radius:2px;background:var(--md-outline-variant);opacity:0;transition:opacity .15s ease}.resize-handle[data-v-ff085c8c]:hover:after,.resize-handle[data-v-ff085c8c]:focus-visible:after{opacity:1}.resize-handle[data-v-ff085c8c]:focus-visible{outline:var(--focus-ring)}.resize-handle--y[data-v-ff085c8c]{right:0;bottom:0;left:0;height:10px;cursor:row-resize}.resize-handle--y.resize-handle--top[data-v-ff085c8c]{top:0;bottom:auto}.resize-handle--y[data-v-ff085c8c]:after{width:40px;height:4px}.resize-handle--x[data-v-ff085c8c]{top:0;bottom:0;left:0;width:10px;cursor:col-resize}.resize-handle--x[data-v-ff085c8c]:after{width:4px;height:40px}@media(max-width:900px){.resize-handle[data-v-ff085c8c]{display:none}}.island__head[data-v-2113916e]{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 20px 12px 12px}.island__title[data-v-2113916e]{flex:none;margin:0;font-size:16px;line-height:24px;font-weight:500;letter-spacing:.01em;white-space:nowrap}.island__note[data-v-2113916e]{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-2113916e]{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.island__body[data-v-2113916e]{padding:0 20px 12px}.island--column .island__head[data-v-2113916e]{gap:4px}.island--column .island__body[data-v-2113916e]{display:flex;flex-direction:column;min-height:0;padding-top:4px}.island.island--collapsed .island__body[data-v-2113916e]{display:none}@media(min-width:901px){.dashboard--fit .dashboard__main .island__body[data-v-2113916e]{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-2113916e]{display:none}}.segmented[data-v-201d5e2f]{display:inline-flex;overflow:hidden;border:1px solid var(--md-outline);border-radius:999px;vertical-align:middle}.segmented--chips[data-v-201d5e2f]{flex:none;align-self:flex-start;background:rgb(var(--glass),.4)}.segmented__option[data-v-201d5e2f]{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-201d5e2f]:first-child{border-left:0}.segmented__option[aria-pressed=true][data-v-201d5e2f]{background:var(--md-secondary-container);color:var(--md-on-secondary-container)}.segmented__option[data-v-201d5e2f]:focus-visible{outline:var(--focus-ring);outline-offset:-2px}.segmented--chips .segmented__option[data-v-201d5e2f]{gap:normal;height:32px;padding:0 14px;font-family:var(--md-font);font-size:14px;letter-spacing:.01em}.segmented--chips .segmented__option[data-v-201d5e2f]:hover{background:var(--state-hover)}.segmented--chips .segmented__option[aria-pressed=true][data-v-201d5e2f]{background:var(--md-secondary-container);color:var(--md-on-secondary-container)}.ticket-cell__summary[data-v-e2d11a0b]{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-6078ccbd]{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.pr-cell__link[data-v-6078ccbd]{max-width:100%;overflow-wrap:anywhere}.recently-done[data-v-eea77605]{position:relative;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-eea77605]{min-height:128px}.recently-done__summary[data-v-eea77605]{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-eea77605]::-webkit-details-marker{display:none}.recently-done__list[data-v-eea77605]{flex:1 1 auto;min-height:0;max-height:min(30vh,240px);margin:0 -20px;padding-bottom:8px;overflow:auto}.row-scroll[data-v-263b2407]{overflow-x:auto;margin:0 -20px}@media(min-width:901px){.dashboard--fit .dashboard__main .row-scroll[data-v-263b2407]{flex:1 1 auto;min-height:0;overflow:auto}.dashboard--fit .row-scroll[data-v-263b2407]::-webkit-scrollbar{width:8px;height:8px}.dashboard--fit .row-scroll[data-v-263b2407]::-webkit-scrollbar-thumb{border-radius:4px;background:var(--md-outline-variant)}}.dashboard--fit .dashboard__main .row-scroll--floor[data-v-263b2407]{min-height:5rem}.row-scroll__more[data-v-263b2407]{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-263b2407]:hover{background:rgb(var(--md-state),.06)}.row-scroll__more[data-v-263b2407]:focus-visible{outline:var(--focus-ring);outline-offset:-2px}.your-move__undo[data-v-2baa7496]{margin:0;padding:4px 0;color:var(--md-on-surface-variant);font-size:13px}.your-move__undo-btn[data-v-2baa7496]{color:var(--md-primary);font-weight:500;cursor:pointer}.your-move__view[data-v-2baa7496]{margin-left:10px}.your-move__next[data-v-2baa7496]{font-weight:500}.your-move__quote[data-v-2baa7496]{max-width:48ch;color:var(--md-on-surface-variant);font-size:12px;line-height:16px}.your-move__quote a[data-v-2baa7496]{color:var(--md-on-surface-variant)}.your-move__problem[data-v-2baa7496]{margin:4px 0 0;padding:4px 10px;font-size:12px}.your-move__mark[data-v-2baa7496]{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-2baa7496]:hover{background:var(--state-hover)}.your-move__mark[data-v-2baa7496]: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-2baa7496]:before{display:none}.your-move__mark[data-v-2baa7496]:focus-visible{outline:var(--focus-ring);outline-offset:2px}.your-move__row--handled td[data-v-2baa7496]{opacity:.55}.your-move__row--handled .your-move__next[data-v-2baa7496]{text-decoration:line-through;text-decoration-color:var(--md-outline)}.your-move__row--handled .table__actions[data-v-2baa7496]{opacity:1}.todos__view[data-v-9cae4a4b]{margin-left:10px}.todos__add[data-v-9cae4a4b]{display:flex;align-items:center;gap:8px;padding:8px 0}.todos__input[data-v-9cae4a4b]{flex:1;min-width:0;height:32px;padding:0 12px;background:rgb(var(--md-state),.04);font-size:14px}.todos__list[data-v-9cae4a4b]{margin:0 -20px;padding:0;overflow-y:auto;list-style:none}.todos__item[data-v-9cae4a4b]{display:grid;grid-template-columns:20px minmax(0,1fr) auto 20px 20px;align-items:center;gap:10px;padding:7px 20px;border-top:1px solid var(--md-outline-variant)}.todos__item[data-v-9cae4a4b]:first-child{border-top:0}.todos__item[data-v-9cae4a4b]:hover{background:rgb(var(--md-state),.06)}.todos__text[data-v-9cae4a4b]{overflow-wrap:anywhere}.todos__item--done .todos__text[data-v-9cae4a4b]{color:var(--md-on-surface-variant);text-decoration:line-through}.todos__empty[data-v-9cae4a4b]{display:block;padding:6px 20px 10px}.todos__check[data-v-9cae4a4b]{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-9cae4a4b]{border-color:var(--md-primary);background:var(--md-primary)}.todos__check--on[data-v-9cae4a4b]: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-9cae4a4b]{color:var(--md-on-surface-variant);font-size:11px;white-space:nowrap}.todos__edit[data-v-9cae4a4b]{min-width:0;height:28px;padding:0 8px;font-size:14px}.todos__undo[data-v-9cae4a4b]{margin:0;padding:4px 0;color:var(--md-on-surface-variant);font-size:13px}.todos__undo-btn[data-v-9cae4a4b]{color:var(--md-primary);font-weight:500;cursor:pointer}.todos__pencil[data-v-9cae4a4b],.todos__delete[data-v-9cae4a4b]{color:var(--md-on-surface-variant);font-size:16px;line-height:1;text-align:center;cursor:pointer;opacity:0}.todos__pencil[data-v-9cae4a4b]:focus-visible,.todos__delete[data-v-9cae4a4b]:focus-visible{opacity:1}.todos__item:hover .todos__pencil[data-v-9cae4a4b],.todos__item:hover .todos__delete[data-v-9cae4a4b]{opacity:1}@media(min-width:901px){.dashboard--fit .dashboard__todo .todos__list[data-v-9cae4a4b]{flex:1 1 auto;min-height:0}.dashboard--fit .dashboard__todo .todos__list[data-v-9cae4a4b]:not(:has(.todos__item)){display:none}}.waiting__table[data-v-27152b25]{table-layout:fixed}.waiting__col--ticket[data-v-27152b25]{width:22%}.waiting__col--status[data-v-27152b25],.waiting__col--with[data-v-27152b25]{width:6.5rem}.waiting__col--pr[data-v-27152b25]{width:4.5rem}.waiting__col--actions[data-v-27152b25]{width:2rem}.waiting__reason[data-v-27152b25]{display:block;min-width:0;max-width:44ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.feed-item[data-v-03f50e9f]{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:start;gap:12px;padding:10px 20px;cursor:default}.feed-item[data-v-03f50e9f]:hover{background:var(--state-hover)}.feed-item.feed-item--open[data-v-03f50e9f]{background:rgb(var(--md-state),.05)}.feed-item.feed-item--new[data-v-03f50e9f]{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-03f50e9f]{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-03f50e9f]{background:var(--md-primary-container);color:var(--md-on-primary-container)}.feed-item__icon--bad[data-v-03f50e9f]{background:var(--md-error-container);color:var(--md-on-error-container)}.feed-item__icon--ok[data-v-03f50e9f]{background:var(--md-tertiary-container);color:var(--md-on-tertiary-container)}.feed-item__body[data-v-03f50e9f]{display:grid;gap:2px;min-width:0}.feed-item__top[data-v-03f50e9f]{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;font-size:14px}.feed-item__right[data-v-03f50e9f]{flex:none;display:inline-flex;align-items:center;gap:4px;margin-left:auto}.feed-item__kind[data-v-03f50e9f]{font-weight:500}.feed-item__kind--bad[data-v-03f50e9f]{color:var(--md-error)}.feed-item__who[data-v-03f50e9f]{color:var(--md-on-surface-variant)}.feed-item__text[data-v-03f50e9f]{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__full[data-v-03f50e9f]{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-03f50e9f]{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.feed-item--new .feed-item__kind[data-v-03f50e9f]{color:var(--md-on-surface);font-weight:700}.feed-item--new .feed-item__text[data-v-03f50e9f]{color:var(--md-on-surface)}.feed-item--new .feed-item__icon[data-v-03f50e9f]{box-shadow:0 0 0 2px var(--new)}.feed-item--new .feed-item__when[data-v-03f50e9f]: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-03f50e9f]{opacity:.78}@media(max-width:1500px){.feed[data-v-3068b692] .island__note-text{display:none}}.feed__undo[data-v-3068b692]{margin:0 0 4px;color:var(--md-on-surface-variant);font-size:13px}.feed__undo-btn[data-v-3068b692]{color:var(--md-primary);font-weight:500;cursor:pointer}.feed__bar[data-v-3068b692]{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-3068b692]{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-3068b692]{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-3068b692]:hover{background:var(--state-hover)}.feed__mark-read[data-v-3068b692]:focus-visible{outline:var(--focus-ring)}.feed__search[data-v-3068b692]{display:flex;flex:none;align-items:center;gap:8px;margin:0 0 8px}.feed__search-input[data-v-3068b692]{flex:1;min-width:0;height:30px;padding:0 10px;font-size:13px}.feed__search-count[data-v-3068b692]{flex:none;color:var(--md-on-surface-variant);font-size:12px}.feed__list[data-v-3068b692]{flex:1 1 auto;min-height:12rem;margin:0 -20px;padding:0 0 4px;overflow-y:auto;list-style:none}.feed__group[data-v-3068b692]{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:0;padding:0;cursor:default}.feed__group[data-v-3068b692]:hover{background:var(--state-hover)}.feed__group.feed__group--open[data-v-3068b692]{background:rgb(var(--md-state),.05)}.feed__group.feed__group--new[data-v-3068b692]{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-3068b692]{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 20px;cursor:pointer}.feed__group-copy[data-v-3068b692]{opacity:.55}.feed__group-head:hover .feed__group-copy[data-v-3068b692]{opacity:1}.feed__group-head[data-v-3068b692]:hover{background:var(--state-hover)}.feed__group--new>.feed__group-head[data-v-3068b692]{background:var(--new-bg);box-shadow:inset 4px 0 0 var(--new)}.feed__group--move[data-v-3068b692],.feed__group--move>.feed__group-head[data-v-3068b692]{box-shadow:inset 4px 0 0 var(--move)}.feed__group.feed__group--new.feed__group--move[data-v-3068b692]{box-shadow:inset 4px 0 0 var(--move),inset 0 0 0 1px var(--new-edge)}.feed__group-text[data-v-3068b692]{min-width:0}.feed__group-key[data-v-3068b692]{display:flex;align-items:baseline;gap:8px;font-size:14px}.feed__group-ticket[data-v-3068b692]{flex:none;font-weight:600}.feed__group-sum[data-v-3068b692]{overflow:hidden;color:var(--md-on-surface-variant);font-size:13px;text-overflow:ellipsis;white-space:nowrap}.feed__group-meta[data-v-3068b692]{display:flex;align-items:center;gap:8px;margin-top:2px;color:var(--md-on-surface-variant);font-size:12px}.feed__group-kinds[data-v-3068b692]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.feed__group-when[data-v-3068b692]{margin-left:auto}.feed__group-count[data-v-3068b692]{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-3068b692]{background:var(--new);color:var(--new-ink)}.feed__children[data-v-3068b692]{margin:0 0 0 31px;padding:0 0 4px;border-left:2px solid var(--md-outline-variant);list-style:none}.feed__children .feed-item[data-v-3068b692]{padding-left:14px}@media(min-width:901px){.dashboard--fit .feed__list[data-v-3068b692]::-webkit-scrollbar{width:8px;height:8px}.dashboard--fit .feed__list[data-v-3068b692]::-webkit-scrollbar-thumb{border-radius:4px;background:var(--md-outline-variant)}}@media(max-width:900px){.feed__list[data-v-3068b692]{max-height:28rem}}.first-run[data-v-84359c2d]{display:grid;place-self:start center;gap:14px;width:min(640px,100%);padding:28px 32px}.first-run__title[data-v-84359c2d]{margin:0;font-size:22px;font-weight:400;line-height:28px}.first-run__text[data-v-84359c2d]{margin:0;color:var(--md-on-surface-variant)}.first-run__actions[data-v-84359c2d]{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.first-run__ai[data-v-84359c2d]{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-8e2792d9]{width:min(640px,100%)}.feedback-sheet__text[data-v-8e2792d9]{min-height:7rem;resize:vertical}.feedback-sheet__note[data-v-8e2792d9]{margin:0;color:var(--md-on-surface-variant);font-size:12px}.feedback-sheet__report[data-v-8e2792d9]{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-8e2792d9]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.field-row[data-v-33714840]{display:grid;grid-template-columns:170px minmax(0,1fr);align-items:center;gap:4px 14px}.field-row__label[data-v-33714840]{color:var(--md-on-surface);font-size:13px}.field-row__hint[data-v-33714840]{grid-column:2;color:var(--md-on-surface-variant);font-size:11px}.field-row__error[data-v-33714840]{grid-column:2;color:var(--md-error);font-size:12px}.field-row__check[data-v-33714840]{display:flex;align-items:center;gap:8px;color:var(--md-on-surface-variant);font-size:11px}.field-row__colour[data-v-33714840]{width:44px;height:30px;padding:2px}.field-row__inline[data-v-33714840]{display:flex;align-items:center;gap:8px}.settings-sheet__card[data-v-649d0735]{width:min(1040px,100%);height:min(760px,100%)}.settings-sheet__dirty[data-v-649d0735]{color:var(--md-error);font-size:12px;font-weight:600}.settings-sheet__confirm[data-v-649d0735]{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-649d0735]{flex:1}.settings-sheet__alert[data-v-649d0735]{margin:12px 20px 0}.settings-sheet__body[data-v-649d0735]{display:grid;flex:1;grid-template-columns:220px minmax(0,1fr);gap:0;min-height:0}.settings-sheet__list[data-v-649d0735]{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-649d0735]{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-649d0735]:hover{background:var(--state-hover)}.settings-sheet__workspace[aria-current=true][data-v-649d0735]{background:var(--md-secondary-container);color:var(--md-on-secondary-container)}.settings-sheet__workspace[data-v-649d0735]:focus-visible{outline:var(--focus-ring);outline-offset:-2px}.settings-sheet__workspace--add[data-v-649d0735]{color:var(--md-primary);font-weight:500}.settings-sheet__connector[data-v-649d0735]{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-649d0735]{display:flex;align-items:center;gap:10px}.settings-sheet__connector-name[data-v-649d0735]{flex:1;font-weight:600}.settings-sheet__actions[data-v-649d0735]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.settings-sheet__rules[data-v-649d0735]{display:flex;flex-direction:column;gap:6px;margin:0;padding:0 0 0 28px;font-size:13px}.settings-sheet__rule[data-v-649d0735]{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-649d0735]{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-649d0735]{overflow-wrap:anywhere}.settings-sheet__rules-note[data-v-649d0735]{margin:0;color:var(--md-on-surface-variant)}.settings-sheet__rules-warning[data-v-649d0735]{margin:0;padding:6px 10px;border-radius:8px;background:var(--md-warn-container);color:var(--md-on-warn-container)}.app__shell[data-v-d275360b]{box-sizing:border-box;display:flex;flex-direction:column;height:100%;padding:12px 12px 12px 72px}.app__shell>.dashboard[data-v-d275360b]{flex:1 1 auto;min-height:0}@media(min-width:901px){.app__shell>.dashboard.dashboard--fit[data-v-d275360b]{height:auto}}@media(max-width:900px){.app__shell[data-v-d275360b]{height:auto}}
@@ -0,0 +1 @@
1
+ import{d as v,v as f,o as s,a as o,h as a,F as c,g as t,f as w,u as p,k as u,i as h,b as k,j as g,_ as y,I as x}from"./_plugin-vue_export-helper-CeaKqebY.js";import{g as N,S as b,m as R,t as C,j as d}from"./bem-HybmjowO.js";const B={class:"app report-page"},S={key:0,class:"report-page__note"},T={class:"report-page__head"},V={class:"report-page__id"},E={class:"report-page__title"},I={class:"report-page__meta"},L={class:"report-page__section"},P={class:"report-page__text"},W={class:"report-page__section"},j={key:0,class:"report-page__unanswered"},A={key:1,class:"empty"},D={class:"report-page__answer-meta"},F={class:"report-page__text"},U=v({__name:"ReportPage",setup(J){const n=new URLSearchParams(location.search).get("id")||"",e=g(null),i=g(n?"Loading…":"No report id in the link.");return f(()=>{n&&(document.title=n+" · Your report · Whose Turn",N("/api/feedback?id="+encodeURIComponent(n)).then(_=>{e.value=_.report||null,i.value=_.report?"":"No report "+n+" was filed from this machine."}).catch(()=>{i.value=b+"; reload this page once it is back."}))}),(_,r)=>(s(),o("main",B,[e.value?(s(),o(c,{key:1},[t("header",T,[t("span",V,a(e.value.id),1),t("h1",E,a(e.value.title),1),t("span",{class:w(["pill",p(R)("pill",p(C)(e.value.outcome))])},a(e.value.state||"filed, not yet seen"),3)]),t("p",I,[u(a(e.value.kind||"report")+" · filed "+a(p(d)(e.value.filed_at)),1),e.value.changed_at?(s(),o(c,{key:0},[u(" · last change "+a(p(d)(e.value.changed_at)),1)],64)):h("",!0)]),t("section",L,[r[0]||(r[0]=t("h2",{class:"report-page__heading"},"What you reported",-1)),t("p",P,a(e.value.body||"(no text kept)"),1)]),t("section",W,[r[1]||(r[1]=t("h2",{class:"report-page__heading"},"Answers",-1)),e.value.unanswered?(s(),o("p",j," 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",A,"No answer yet.")),(s(!0),o(c,null,k(e.value.answers,(l,m)=>(s(),o("article",{key:m,class:"report-page__answer"},[t("p",D,a(l.by||"maintainer")+" · "+a(p(d)(l.at)),1),t("p",F,a(l.text),1)]))),128))])],64)):(s(),o("p",S,a(i.value),1)),r[2]||(r[2]=t("a",{class:"report-page__back",href:"/"},"Back to the window",-1))]))}}),z=y(U,[["__scopeId","data-v-16ea9dee"]]);x(z).mount("#app");
@@ -0,0 +1 @@
1
+ .report-page[data-v-16ea9dee]{box-sizing:border-box;height:auto;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__note[data-v-16ea9dee]{margin:0;font-size:15px}.report-page__back[data-v-16ea9dee]{display:inline-block;margin-top:24px;color:var(--md-primary)}.report-page__head[data-v-16ea9dee]{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.report-page__title[data-v-16ea9dee]{flex:1;min-width:0;margin:0;font-size:20px;font-weight:600}.report-page__id[data-v-16ea9dee]{color:var(--md-primary);font-weight:700}.report-page__meta[data-v-16ea9dee]{margin:6px 0 20px;color:var(--md-on-surface-variant);font-size:13px}.report-page__heading[data-v-16ea9dee]{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-16ea9dee]{margin:0;white-space:pre-wrap}.report-page__answer[data-v-16ea9dee]{padding:10px 0;border-top:1px solid var(--md-outline-variant)}.report-page__answer-meta[data-v-16ea9dee]{margin:0 0 4px;color:var(--md-on-surface-variant);font-size:12px}.report-page__unanswered[data-v-16ea9dee]{margin:0;padding:10px 12px;border-radius:8px;background:var(--md-error-container);color:var(--md-on-error-container);font-weight:600}
@@ -0,0 +1 @@
1
+ import{w as C,K as Q,L as Y,M as S,N as we,O as He,P as xe,j as _e,n as ke,Q as ne,R as Se,S as Ne,T as Le,v as We,U as Ce,C as $e,H as Pe,c as H,u as Ie,r as pe}from"./_plugin-vue_export-helper-CeaKqebY.js";function F(e,t){return Le()?(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??Le();if(i==null&&!Se())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,qe=e=>Be.call(e)==="[object Object]",M=()=>{};function ie(...e){if(e.length!==1)return He(...e);const t=e[0];return typeof t=="function"?xe(we(()=>({get:t,set:M}))):_e(t)}function oe(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 Ve(e,t={}){let a,n,i=M,o=M;const s=S(!1),r=c=>{clearTimeout(c),i(),i=M};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,p)=>{i=t.rejectOnCancel?p: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=M},flush:()=>{if(s.value){a&&(clearTimeout(a),a=void 0),n&&(clearTimeout(n),n=void 0),s.value=!1;const c=o;i=M,o=M,c(d())}},isPending:Q(s)})}function Ke(...e){let t=0,a,n=!0,i=M,o,s,r,d,g;!$e(e[0])&&typeof e[0]=="object"?{delay:s,trailing:r=!0,leading:d=!0,rejectOnCancel:g=!1}=e[0]:[s,r=!0,d=!0,g=!1]=e;const c=()=>{a&&(clearTimeout(a),a=void 0,i(),i=M)};return l=>{const h=Y(s),p=Date.now()-t,f=()=>o=l();return c(),h<=0?(t=Date.now(),f()):(p>h?(t=Date.now(),(d||!n)&&f()):r&&(o=new Promise((v,R)=>{i=g?R:v,a=setTimeout(()=>{t=Date.now(),n=!0,v(f()),c()},Math.max(0,h-p))})),!d&&!a&&(a=setTimeout(()=>n=!0,h)),n=!1,o)}}function Je(e=Ee,t={}){const{initialState:a="active"}=t,n=ie(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 be(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 ea(e,t=1e4){return we((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 oe(Ve(t,a),e)}function Qe(e,t=200,a=!0,n=!0,i=!1){return oe(Ke(t,a,n,i),e)}function Ze(e,t,a={}){const{eventFilter:n=Ee,...i}=a;return C(e,oe(n,t),i)}function et(e,t,a={}){const{eventFilter:n,initialState:i="active",...o}=a,{eventFilter:s,pause:r,resume:d,isActive:g}=Je(n,{initialState:i});return{stop:Ze(e,t,{...o,eventFilter:s}),pause:r,resume:d,isActive:g}}function se(e,t=!0,a){Ue()?We(e,a):t?e():ke(e)}function ta(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 g(){const c=Y(t);c<=0||(s.value=!0,i&&e(),r(),s.value&&(o=setInterval(e,c)))}return n&&q&&g(),($e(t)||typeof t=="function")&&F(C(t,()=>{s.value&&q&&g()})),F(d),{isActive:Q(s),pause:d,resume:g}}function tt(e,t,a){return C(e,t,{...a,immediate:!0})}const $=q?window:void 0,at=q?window.document: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=H(()=>{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 g=qe(s)?{...s}:s,c=n.flatMap(u=>i.flatMap(l=>o.map(h=>t(u,l,h,g))));d(()=>{c.forEach(u=>u())})},{flush:"post"})}function nt(){const e=S(!1),t=ne();return t&&We(()=>{e.value=!0},t),e}function re(e){const t=nt();return H(()=>(t.value,!!e()))}function it(e,t,a={}){const{window:n=$,...i}=a;let o;const s=re(()=>n&&"MutationObserver"in n),r=()=>{o&&(o.disconnect(),o=void 0)},d=H(()=>{const l=Y(e),h=V(l).map(N).filter(Fe);return new Set(h)}),g=C(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=()=>{g(),r()};return F(u),{isSupported:s,stop:u,takeRecords:c}}function ot(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function aa(...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=ot(t);return B(i,o,c=>{c.repeat&&Y(r)||d(c)&&a(c)},s)}function st(e,t={}){const{immediate:a=!0,fpsLimit:n=null,window:i=$,once:o=!1}=t,s=S(!1),r=H(()=>{const h=Y(n);return h?1e3/h:null});let d=0,g=null;function c(h){if(!s.value||!i)return;d||(d=h);const p=h-d;if(r.value&&p<r.value){g=i.requestAnimationFrame(c);return}if(d=h,e({delta:p,timestamp:h}),o){s.value=!1,g=null;return}g=i.requestAnimationFrame(c)}function u(){!s.value&&i&&(s.value=!0,d=0,g=i.requestAnimationFrame(c))}function l(){s.value=!1,g!=null&&i&&(i.cancelAnimationFrame(g),g=null)}return a&&u(),F(l),{isActive:Q(s),pause:l,resume:u}}const rt=Symbol("vueuse-ssr-width");function lt(){const e=Se()?ze(rt,null):null;return typeof e=="number"?e:void 0}function dt(e,t={}){const{window:a=$,ssrWidth:n=lt()}=t,i=re(()=>a&&"matchMedia"in a&&typeof a.matchMedia=="function"),o=S(typeof n=="number"),s=S(),r=S(!1),d=g=>{r.value=g.matches};return Pe(()=>{if(o.value){o.value=!i.value;const g=Y(e).split(",");r.value=g.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 p=!!(l||h);return l&&p&&(p=n>=be(l[1])),h&&p&&(p=n<=be(h[1])),u?!p:p});return}i.value&&(s.value=a.matchMedia(Y(e)),r.value=s.value.matches)}),B(s,"change",d,{passive:!0}),H(()=>r.value)}const K=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},J="__vueuse_ssr_handlers__",ut=ct();function ct(){return J in K||(K[J]=K[J]||{}),K[J]}function ht(e,t){return ut[e]||t}function gt(e){return dt("(prefers-color-scheme: dark)",e)}function pt(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 bt={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()}},fe="vueuse-storage";function je(e,t,a,n={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:r=!0,writeDefaults:d=!0,mergeDefaults:g=!1,shallow:c,window:u=$,eventFilter:l,onError:h=b=>{console.error(b)},initOnMounted:p}=n,f=(c?S:_e)(typeof t=="function"?t():t),v=H(()=>Y(e));if(!a)try{a=ht("getDefaultStorage",()=>$==null?void 0:$.localStorage)()}catch(b){h(b)}if(!a)return f;const R=Y(t),w=pt(R),X=(i=n.serializer)!==null&&i!==void 0?i:bt[w],{pause:_,resume:x}=et(f,b=>O(b),{flush:o,deep:s,eventFilter:l});C(v,()=>D(),{flush:o});let W=!1;const E=b=>{p&&!W||D(b)},j=b=>{p&&!W||P(b)};u&&r&&(a instanceof Storage?B(u,"storage",E,{passive:!0}):B(u,fe,j)),p?se(()=>{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(fe,{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&&g){const k=X.read(m);return typeof g=="function"?g(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?ke(x):x()}}}}function P(b){D(b.detail)}return f}function ft(e,t,a={}){const{window:n=$,...i}=a;let o;const s=re(()=>n&&"ResizeObserver"in n),r=()=>{o&&(o.disconnect(),o=void 0)},d=H(()=>{const u=Y(e);return Array.isArray(u)?u.map(l=>N(l)):[N(u)]}),g=C(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(),g()};return F(c),{isSupported:s,stop:c}}function na(e,t={width:0,height:0},a={}){const{window:n=$,box:i="content-box"}=a,o=H(()=>{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}=ft(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 p=h.getBoundingClientRect();s.value=p.width,r.value=p.height}}else if(l){const h=V(l);s.value=h.reduce((p,{inlineSize:f})=>p+f,0),r.value=h.reduce((p,{blockSize:f})=>p+f,0)}else s.value=u.contentRect.width,r.value=u.contentRect.height},a);se(()=>{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),p=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-p-v}else s.value=u.offsetWidth,r.value=u.offsetHeight;else u&&(s.value=t.width,r.value=t.height)});const g=C(()=>N(e),u=>{s.value=u?t.width:0,r.value=u?t.height:0});function c(){d(),g()}return{width:s,height:r,stop:c}}function yt(e){return e===!0?{}:e}const mt="message";function ia(e,t=[],a={}){const n=S(null),i=S(null),o=S("CONNECTING"),s=S(null),r=S(null),d=ie(e),g=S(null);let c=!1,u=0;const{withCredentials:l=!1,immediate:h=!0,autoConnect:p=!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=x=>{if(o.value="CLOSED",r.value=x,_.readyState===2&&!c&&f){_.close();const{retries:W=-1,delay:E=1e3,onFailed:j}=yt(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:[mt];for(const x of t)B(_,x,W=>{var E,j;n.value=x,i.value=(E=v.read(W.data))!==null&&E!==void 0?E:null,g.value=(j=W.lastEventId)!==null&&j!==void 0?j:null},{passive:!0})},X=()=>{q&&(R(),c=!1,u=0,w())};return h&&X(),p&&C(d,X),F(R),{eventSource:s,event:n,data:i,status:o,error:r,open:X,close:R,lastEventId:g}}function oa(e=null,t={}){const{baseUrl:a="",rel:n="icon",document:i=at}=t,o=ie(e),s=r=>{const d=i==null?void 0:i.head.querySelectorAll(`link[rel*="${n}"]`);if(!d||d.length===0){const g=i==null?void 0:i.createElement("link");g&&(g.rel=n,g.href=`${a}${r}`,g.type=`image/${r.split(".").pop()}`,i==null||i.head.append(g));return}d==null||d.forEach(g=>g.href=`${a}${r}`)};return C(o,(r,d)=>{typeof r=="string"&&r!==d&&s(r)},{immediate:!0}),o}const ye=1;function sa(e,t={}){const{throttle:a=0,idle:n=200,onStop:i=M,onScroll:o=M,offset:s={left:0,right:0,top:0,bottom:0},observe:r={mutation:!1},eventListenerOptions:d={capture:!1,passive:!0},behavior:g="auto",window:c=$,onError:u=y=>{console.error(y)}}=t,l=typeof r=="boolean"?{mutation:r}:r,h=S(0),p=S(0),f=H({get(){return h.value},set(y){R(y,void 0)}}),v=H({get(){return p.value},set(y){R(void 0,y)}});function R(y,O){var L,D,P,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:(P=Y(y))!==null&&P!==void 0?P:f.value,behavior:Y(g)});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&&(p.value=k.scrollTop)}const w=S(!1),X=pe({left:!0,right:!1,top:!0,bottom:!1}),_=pe({left:!1,right:!1,top:!1,bottom:!1}),x=y=>{w.value&&(w.value=!1,_.left=!1,_.right=!1,_.top=!1,_.bottom=!1,i(y))},W=Ge(x,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:P,direction:b}=c.getComputedStyle(L),m=b==="rtl"?-1:1,k=L.scrollLeft;_.left=k<h.value,_.right=k>h.value;const ue=Math.abs(k*m)<=(s.left||0),ce=Math.abs(k*m)+L.clientWidth>=L.scrollWidth-(s.right||0)-ye;D==="flex"&&P==="row-reverse"?(X.left=ce,X.right=ue):(X.left=ue,X.right=ce),h.value=k;let z=L.scrollTop;y===c.document&&!z&&(z=c.document.body.scrollTop),_.top=z<p.value,_.bottom=z>p.value;const he=Math.abs(z)<=(s.top||0),ge=Math.abs(z)+L.clientHeight>=L.scrollHeight-(s.bottom||0)-ye;D==="flex"&&P==="column-reverse"?(X.top=ge,X.bottom=he):(X.top=he,X.bottom=ge),p.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),se(()=>{try{const y=Y(e);if(!y)return;E(y)}catch(y){u(y)}}),l!=null&&l.mutation&&e!=null&&e!==c&&e!==document&&it(e,()=>{const y=Y(e);y&&E(y)},{attributes:!0,childList:!0,subtree:!0}),B(e,"scrollend",x,d),{x:f,y:v,isScrolling:w,arrivedState:X,directions:_,measure(){const y=Y(e);c&&y&&E(y)}}}function ra(e,t,a={}){const{window:n=$}=a;return je(e,t,n==null?void 0:n.localStorage,a)}function la(e={}){const{controls:t=!1,scheduler:a=st}=e,n=S(new Date),o=a(()=>n.value=new Date);return t?{now:n,...o}:n}function da(e,t,a={}){const{window:n=$}=a;return je(e,t,n==null?void 0:n.sessionStorage,a)}const vt=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}},ua=e=>{const t=vt(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,Yt=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]},Rt={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},me=new Map,Xt=e=>{const t=me.get(e);if(t)return t;const a=Yt(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 p=g();return(f,v)=>-p(f,v)}if(l.op==="("){const p=c(0);return s(")"),p}if(l.name!==void 0){const p=l.name;if(i()&&i().op==="("){o();const f=r();if(p==="if")return(R,w)=>f[0](R,w)?f[1](R,w):f[2](R,w);const v=Rt[p];if(!v)throw new Error(`unknown function "${p}" in expression "${e}"`);return(R,w)=>v(w,...f.map(X=>X(R,w)))}return p==="PI"?()=>Math.PI:f=>{if(!(p in f))throw new Error(`unknown name "${p}" in expression "${e}"`);return f[p]}}throw new Error(`unexpected "${l.op}" in expression "${e}"`)},g=()=>{let l=d();for(;i()&&i().op==="[";){o();const h=c(0);s("]");const p=l;l=(f,v)=>p(f,v)[h(f,v)]}return l},c=l=>{let h=g();for(;i()&&ee[i().op??""]&&ee[i().op??""][0]>=l;){const[p,f]=ee[o().op??""],v=c(p+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 me.set(e,u),u},te=e=>Object.create(e),I=(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]}"`)},T=(e,t,a)=>{if(typeof e=="number")return e;if(typeof e=="string")return Xt(e)(t,a);if(Array.isArray(e))return e.map(n=>T(n,t,a));if(e&&typeof e=="object"&&"if"in e)return I(e,["if","then","else"],"value {if}"),T(T(e.if,t,a)?e.then:e.else,t,a);if(e&&typeof e=="object"&&e.map){const n=e.map;return I(n,["count","values","as","let","value"],"value {map}"),Ae(n,t,a).map(i=>(le(n.let,i,a),T(n.value,i,a)))}throw new Error(`cannot evaluate ${JSON.stringify(e)}`)},le=(e,t,a)=>{Object.entries(e||{}).forEach(([n,i])=>{t[n]=T(i,t,a)})},Ae=(e,t,a)=>(e.values!==void 0?T(e.values,t,a):Array.from({length:T(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}),ve={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(T(t.radii,a,n))})},G=(e,t,a,n)=>{e.forEach(i=>{const o=Object.keys(ve).find(s=>s in i);if(o){I(i,[o,"radii","cut","part"],`shape {${o}}`);const s=ve[o](T(i[o],t,a),i,t,a);n.push(i.cut?Object.assign({},s,{cut:!0}):s)}else if("let"in i)I(i,["let","part"],"statement {let}"),le(i.let,t,a);else if("repeat"in i){I(i,["repeat","part"],"statement {repeat}");const s=i.repeat;I(s,["count","values","as","body"],"repeat"),Ae(s,t,a).forEach(r=>G(s.body||[],r,a,n))}else if("if"in i)I(i,["if","then","else","part"],"statement {if}"),G((T(i.if,t,a)?i.then:i.else)||[],te(t),a,n);else if("use"in i){I(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,g])=>{r[d]=T(g,t,a)}),G(s,r,a,n)}else throw new Error(`unknown statement ${JSON.stringify(i)}`)})},wt=(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},Ye=new WeakMap,de=(e,t,a=[])=>{const n=Ye.get(e)||new Map;Ye.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?de(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:wt(s.poses,o.poses)};return n.set(t,r),r},Me=e=>Object.entries(e.poses).map(([t,a])=>[t,a.weight===void 0?1:a.weight]).filter(([,t])=>t>0),_t=(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]},ca=(e,t,a,n={})=>{const i=de(e,t),o=Me(i),s=n.pose&&o.some(([l])=>l===n.pose)?n.pose:_t(o,a),r=i.poses[s]||{},d=new Set(r.drop||[]),g={random:a,defs:i.defs},c={},u=[];try{le({...i.params,...r.params},c,g),G([...i.body.filter(l=>!d.has(l.part??"")),...r.body||[]],c,g,u)}catch(l){throw new Error(`species "${t}"${s?` (pose ${s})`:""}: ${l.message}`,{cause:l})}return{shapes:u,pose:s}},ha=e=>Object.keys(e).filter(t=>!e[t].abstract),ga=(e,t)=>{const a=Me(de(e,t)).map(([n])=>n);return a.length?a:[""]},A=256,ae=2.6,Re=A/ae,kt=(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)]},Xe=(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(kt(i(r-1),i(r),i(r+1),i(r+2),d/a));return t||s.push(e[n-1]),s},St=(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)},Te=(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"?Xe(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=Xe(t.points,!1,24);a.forEach(([n,i],o)=>{const s=St(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()}},pa=(e,t)=>{const a=document.createElement("canvas");a.width=A,a.height=A;const n=a.getContext("2d",{willReadFrequently:!0});if(!n)return new Uint8Array(A*A);n.translate(A/2,A/2),n.scale(Re*t.facing*t.stretchX,Re*t.stretchY),n.rotate(t.tilt),n.fillStyle="#000",e.forEach(s=>Te(n,s));const i=n.getImageData(0,0,A,A).data,o=new Uint8Array(A*A);for(let s=0;s<o.length;s+=1)o[s]=i[s*4+3]>127?1:0;return o},ba=(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=>Te(n,i)),n.restore())},Lt=!0,Wt={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},$t=[{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"}],Et={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]}]}}]}},jt={abstract:Lt,params:Wt,body:$t,poses:Et},Dt=!0,Ot={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},At={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}]}},Ht={abstract:Dt,params:Ot,defs:At,body:Mt,poses:Tt},xt=!0,Nt={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},Ct=[{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}],Pt={cruising:{weight:3},leaping:{weight:0,params:{arch:.38}}},It={abstract:xt,params:Nt,body:Ct,poses:Pt},zt=[{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]}]}}],Ft={body:zt},Bt={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}]}},qt={poses:Bt},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]}]}}]},Kt=[{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:Kt},Ut={length:"range(0.8, 0.88)",height:"range(0.2, 0.25)",dorsalHeight:.2,flukeSpan:.36,finLength:.2,eyeX:.62,eyeSize:.025},Gt=["fluke"],Qt=[{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]}],Zt={leaping:{weight:1}},e0={extends:"swimmer",params:Ut,drop:Gt,body:Qt,poses:Zt},t0={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},a0={extends:"bird",params:t0},n0=[{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}],i0={body:n0},o0={height:"range(0.4, 0.48)",dorsalHeight:.22,eyeX:.62,eyeSize:.05},s0={extends:"swimmer",params:o0},r0=["neck"],l0={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},d0=[{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"}],u0={sleeping:{weight:0},front:{weight:0}},c0={extends:"bird",drop:r0,params:l0,body:d0,poses:u0},h0=[{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]}]}}],g0={body:h0},p0=[{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}],b0={body:p0},f0=["neck"],y0={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},m0=[{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"}],v0={sitting:{weight:0},front:{weight:0}},Y0={extends:"quadruped",drop:f0,params:y0,body:m0,poses:v0},R0=[{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}],X0={body:R0},w0={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},_0={extends:"quadruped",params:w0},k0=[{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}]}}]}}],S0={body:k0},L0=["wing"],W0={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},$0=[{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"}],E0={sleeping:{weight:0}},j0={extends:"bird",drop:L0,params:W0,body:$0,poses:E0},D0={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},O0={sitting:{weight:0}},A0={extends:"quadruped",params:D0,poses:O0},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}],H0={defs:M0,body:T0},x0=[{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}]}}],N0={body:x0},C0={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},P0={extends:"swimmer",params:C0},I0=[{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]}],z0={body:I0},F0=[{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}],B0={body:F0},q0=[{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:q0},K0={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:K0},U0=Object.assign({"./base/bird.json":jt,"./base/quadruped.json":Ht,"./base/swimmer.json":It,"./bear.json":Ft,"./cat.json":qt,"./deer.json":Jt,"./dolphin.json":e0,"./duck.json":a0,"./elephant.json":i0,"./fish.json":s0,"./flamingo.json":c0,"./fox.json":g0,"./hedgehog.json":b0,"./horse.json":Y0,"./octopus.json":X0,"./otter.json":_0,"./owl.json":S0,"./penguin.json":j0,"./pig.json":A0,"./rabbit.json":H0,"./rhino.json":N0,"./shark.json":P0,"./snail.json":z0,"./turtle.json":B0,"./whale.json":V0,"./wolf.json":J0}),fa=Object.fromEntries(Object.entries(U0).map(([e,t])=>[e.replace(/^.*\//,"").replace(/\.json$/,""),t])),G0=gt(),Q0=()=>G0.value,ya=H(Q0);export{ba as A,ga as B,A as M,Ge as a,ca as b,ua as c,Re as d,De as e,ae as f,ya as g,ra as h,Q0 as i,da as j,ea as k,Oe as l,vt as m,ia as n,la as o,pa as p,ta as q,fa as r,ha as s,aa as t,B as u,it as v,ft as w,sa as x,na as y,oa as z};
@@ -1 +1 @@
1
- import{d as M,B as I,o as t,a as l,g as i,f as a,i as c,c as y,_ as N,E as T,w as U,j as d,y as h,I as w,u as $,F as g,b as f,A as C,h as A,l as E,G as F,H as P}from"./_plugin-vue_export-helper-DHr5RHTx.js";import{x as D,b as L,r as k,c as j,s as q,y as z,g as G}from"./scheme-DJ3WNw60.js";const H={class:"species-cell"},O={key:0,class:"species-cell__error"},R={class:"species-cell__seed"},J=M({__name:"SpeciesCell",props:{name:{},pose:{},seed:{},ink:{}},setup(m){const o=m,n=c(null),r=y(()=>{try{return{shapes:L(k,o.name,j(o.seed),{pose:o.pose}).shapes,error:""}}catch(u){return{shapes:[],error:u.message}}});return I(()=>{n.value&&!r.value.error&&o.ink&&D(n.value,r.value.shapes,o.ink)}),(u,_)=>(t(),l("figure",H,[r.value.error?(t(),l("p",O,i(r.value.error),1)):(t(),l("canvas",{key:1,ref_key:"canvas",ref:n,class:"species-cell__canvas",width:"260",height:"260"},null,512)),a("figcaption",R,i(m.seed),1)]))}}),K=N(J,[["__scopeId","data-v-220e2a5a"]]),Q={class:"sheet-page__head"},W={class:"sheet-page__field"},X={value:""},Y=["value"],Z={class:"sheet-page__field"},ee={class:"sheet-page__field"},se={class:"sheet-page__label"},ae={key:0,class:"sheet-page__pose"},te=M({__name:"SheetPage",setup(m){const o=new URLSearchParams(location.search),n=c(Math.min(12,Math.max(1,Number(o.get("seeds"))||6))),r=c(Number(o.get("from"))||1),u=c(o.get("species")||""),_=q(k),V=y(()=>Array.from({length:n.value},(p,e)=>r.value+e)),B=y(()=>_.filter(p=>!u.value||p===u.value).flatMap(p=>z(k,p).map(e=>({name:p,pose:e,key:`${p}:${e}`})))),v=c(null),b=c(""),S=()=>{v.value&&(b.value=getComputedStyle(v.value).color)};return T(S),U(G,S),(p,e)=>(t(),l("main",{ref_key:"page",ref:v,class:"app sheet-page"},[a("header",Q,[e[6]||(e[6]=a("h1",{class:"sheet-page__title"},"Species sheet",-1)),a("label",W,[e[3]||(e[3]=d("Species ",-1)),h(a("select",{"onUpdate:modelValue":e[0]||(e[0]=s=>u.value=s)},[a("option",X,"all ("+i($(_).length)+")",1),(t(!0),l(g,null,f($(_),s=>(t(),l("option",{key:s,value:s},i(s),9,Y))),128))],512),[[w,u.value]])]),a("label",Z,[e[4]||(e[4]=d("Seeds ",-1)),h(a("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>n.value=s),class:"sheet-page__number",type:"number",min:"1",max:"12"},null,512),[[C,n.value,void 0,{number:!0}]])]),a("label",ee,[e[5]||(e[5]=d("From seed ",-1)),h(a("input",{"onUpdate:modelValue":e[2]||(e[2]=s=>r.value=s),class:"sheet-page__number",type:"number",min:"0"},null,512),[[C,r.value,void 0,{number:!0}]])])]),(t(!0),l(g,null,f(B.value,s=>(t(),l("section",{key:s.key,class:"sheet-page__row"},[a("h2",se,[d(i(s.name),1),s.pose?(t(),l("small",ae,i(s.pose),1)):A("",!0)]),a("div",{class:"sheet-page__cells",style:F({gridTemplateColumns:`repeat(${n.value}, minmax(0, 1fr))`})},[(t(!0),l(g,null,f(V.value,x=>(t(),E(K,{key:x,name:s.name,pose:s.pose,seed:x,ink:b.value},null,8,["name","pose","seed","ink"]))),128))],4)]))),128))],512))}}),le=N(te,[["__scopeId","data-v-b4daa75a"]]);P(le).mount("#app");
1
+ import{d as M,H as I,o as t,a as l,h as i,g as a,j as c,c as k,_ as N,v as T,w as U,k as d,D as h,J as w,u as $,F as g,b as f,G as C,i as A,m as D,x as F,I as P}from"./_plugin-vue_export-helper-CeaKqebY.js";import{A as E,b as L,r as y,c as j,s as q,B as z,g as G}from"./scheme-CRAXq4Co.js";const H={class:"species-cell"},J={key:0,class:"species-cell__error"},O={class:"species-cell__seed"},R=M({__name:"SpeciesCell",props:{name:{},pose:{},seed:{},ink:{}},setup(m){const o=m,n=c(null),r=k(()=>{try{return{shapes:L(y,o.name,j(o.seed),{pose:o.pose}).shapes,error:""}}catch(u){return{shapes:[],error:u.message}}});return I(()=>{n.value&&!r.value.error&&o.ink&&E(n.value,r.value.shapes,o.ink)}),(u,_)=>(t(),l("figure",H,[r.value.error?(t(),l("p",J,i(r.value.error),1)):(t(),l("canvas",{key:1,ref_key:"canvas",ref:n,class:"species-cell__canvas",width:"260",height:"260"},null,512)),a("figcaption",O,i(m.seed),1)]))}}),K=N(R,[["__scopeId","data-v-220e2a5a"]]),Q={class:"sheet-page__head"},W={class:"sheet-page__field"},X={value:""},Y=["value"],Z={class:"sheet-page__field"},ee={class:"sheet-page__field"},se={class:"sheet-page__label"},ae={key:0,class:"sheet-page__pose"},te=M({__name:"SheetPage",setup(m){const o=new URLSearchParams(location.search),n=c(Math.min(12,Math.max(1,Number(o.get("seeds"))||6))),r=c(Number(o.get("from"))||1),u=c(o.get("species")||""),_=q(y),V=k(()=>Array.from({length:n.value},(p,e)=>r.value+e)),B=k(()=>_.filter(p=>!u.value||p===u.value).flatMap(p=>z(y,p).map(e=>({name:p,pose:e,key:`${p}:${e}`})))),v=c(null),b=c(""),S=()=>{v.value&&(b.value=getComputedStyle(v.value).color)};return T(S),U(G,S),(p,e)=>(t(),l("main",{ref_key:"page",ref:v,class:"app sheet-page"},[a("header",Q,[e[6]||(e[6]=a("h1",{class:"sheet-page__title"},"Species sheet",-1)),a("label",W,[e[3]||(e[3]=d("Species ",-1)),h(a("select",{"onUpdate:modelValue":e[0]||(e[0]=s=>u.value=s)},[a("option",X,"all ("+i($(_).length)+")",1),(t(!0),l(g,null,f($(_),s=>(t(),l("option",{key:s,value:s},i(s),9,Y))),128))],512),[[w,u.value]])]),a("label",Z,[e[4]||(e[4]=d("Seeds ",-1)),h(a("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>n.value=s),class:"sheet-page__number",type:"number",min:"1",max:"12"},null,512),[[C,n.value,void 0,{number:!0}]])]),a("label",ee,[e[5]||(e[5]=d("From seed ",-1)),h(a("input",{"onUpdate:modelValue":e[2]||(e[2]=s=>r.value=s),class:"sheet-page__number",type:"number",min:"0"},null,512),[[C,r.value,void 0,{number:!0}]])])]),(t(!0),l(g,null,f(B.value,s=>(t(),l("section",{key:s.key,class:"sheet-page__row"},[a("h2",se,[d(i(s.name),1),s.pose?(t(),l("small",ae,i(s.pose),1)):A("",!0)]),a("div",{class:"sheet-page__cells",style:F({gridTemplateColumns:`repeat(${n.value}, minmax(0, 1fr))`})},[(t(!0),l(g,null,f(V.value,x=>(t(),D(K,{key:x,name:s.name,pose:s.pose,seed:x,ink:b.value},null,8,["name","pose","seed","ink"]))),128))],4)]))),128))],512))}}),le=N(te,[["__scopeId","data-v-b4daa75a"]]);P(le).mount("#app");
package/dist/index.html CHANGED
@@ -6,12 +6,12 @@
6
6
  <title>Whose Turn</title>
7
7
  <script src="/vendor/popper.min.js"></script>
8
8
  <script src="/vendor/tippy-bundle.umd.min.js"></script>
9
- <script type="module" crossorigin src="/assets/index-D-P2XKhJ.js"></script>
10
- <link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-DHr5RHTx.js">
11
- <link rel="modulepreload" crossorigin href="/assets/scheme-DJ3WNw60.js">
12
- <link rel="modulepreload" crossorigin href="/assets/bem-COKTjsky.js">
13
- <link rel="stylesheet" crossorigin href="/assets/_plugin-vue_export-helper-BKveAJb2.css">
14
- <link rel="stylesheet" crossorigin href="/assets/index-B23uRijc.css">
9
+ <script type="module" crossorigin src="/assets/index-D_knX0Z-.js"></script>
10
+ <link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-CeaKqebY.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/scheme-CRAXq4Co.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/bem-HybmjowO.js">
13
+ <link rel="stylesheet" crossorigin href="/assets/_plugin-vue_export-helper-aQHODzfZ.css">
14
+ <link rel="stylesheet" crossorigin href="/assets/index-q5Rj03LQ.css">
15
15
  </head>
16
16
  <body class="page">
17
17
  <div id="app" class="page__mount"></div>
package/dist/report.html CHANGED
@@ -4,11 +4,11 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>Your report · Whose Turn</title>
7
- <script type="module" crossorigin src="/assets/report-BtGnm9ax.js"></script>
8
- <link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-DHr5RHTx.js">
9
- <link rel="modulepreload" crossorigin href="/assets/bem-COKTjsky.js">
10
- <link rel="stylesheet" crossorigin href="/assets/_plugin-vue_export-helper-BKveAJb2.css">
11
- <link rel="stylesheet" crossorigin href="/assets/report-xVOo7qip.css">
7
+ <script type="module" crossorigin src="/assets/report-B58sXh8K.js"></script>
8
+ <link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-CeaKqebY.js">
9
+ <link rel="modulepreload" crossorigin href="/assets/bem-HybmjowO.js">
10
+ <link rel="stylesheet" crossorigin href="/assets/_plugin-vue_export-helper-aQHODzfZ.css">
11
+ <link rel="stylesheet" crossorigin href="/assets/report-D7II0AfP.css">
12
12
  </head>
13
13
  <body class="page page--scroll">
14
14
  <div id="app" class="page__mount"></div>
package/dist/sheet.html CHANGED
@@ -4,10 +4,10 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>Species sheet · Whose Turn</title>
7
- <script type="module" crossorigin src="/assets/sheet-CBYGM-FG.js"></script>
8
- <link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-DHr5RHTx.js">
9
- <link rel="modulepreload" crossorigin href="/assets/scheme-DJ3WNw60.js">
10
- <link rel="stylesheet" crossorigin href="/assets/_plugin-vue_export-helper-BKveAJb2.css">
7
+ <script type="module" crossorigin src="/assets/sheet-BYuZfjzp.js"></script>
8
+ <link rel="modulepreload" crossorigin href="/assets/_plugin-vue_export-helper-CeaKqebY.js">
9
+ <link rel="modulepreload" crossorigin href="/assets/scheme-CRAXq4Co.js">
10
+ <link rel="stylesheet" crossorigin href="/assets/_plugin-vue_export-helper-aQHODzfZ.css">
11
11
  <link rel="stylesheet" crossorigin href="/assets/sheet-DYpaJaXO.css">
12
12
  </head>
13
13
  <body class="page page--scroll">