dev-process-kit 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/THIRD_PARTY_LICENSES.md +46 -0
  2. package/dist/chunks/{shared-CrE-y5oF.js → shared-0MFKKPnB.js} +165 -96
  3. package/dist/chunks/shared-B2YRwZ0P.js +2062 -0
  4. package/dist/chunks/{shared-OGH3pSVq.js → shared-B4Mwapvi.js} +89 -63
  5. package/dist/chunks/shared-BDUe3aT-.js +1 -0
  6. package/dist/chunks/{shared-DGI_sFo5.js → shared-C1KQ5iU8.js} +55 -32
  7. package/dist/chunks/{shared-BgCDocVX.js → shared-CQG0dnvb.js} +17 -7
  8. package/dist/chunks/shared-CSC14I4g.js +2370 -0
  9. package/dist/chunks/shared-Cd8A5TjZ.js +2428 -0
  10. package/dist/chunks/shared-CirHYajF.js +30 -0
  11. package/dist/chunks/shared-D4K7KsfJ.js +1 -0
  12. package/dist/chunks/{shared-TW6kWbUL.js → shared-D7poXZ0z.js} +17 -9
  13. package/dist/chunks/shared-DO0pUSjw.js +571 -0
  14. package/dist/chunks/shared-DdefS1nG.js +1 -0
  15. package/dist/chunks/{shared-BSFZSMH5.js → shared-DjmQsa0n.js} +1 -1
  16. package/dist/chunks/{shared-DZfXwU7f.js → shared-DklLt1Sc.js} +1 -1
  17. package/dist/chunks/{shared-CHaHI5X3.js → shared-DrMSORn-.js} +34 -11
  18. package/dist/chunks/shared-DxAiavwJ.js +1102 -0
  19. package/dist/chunks/shared-aDPp8Vry.js +1 -0
  20. package/dist/components.js +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/templates/delegation-poker.js +1 -1
  23. package/dist/templates/event-storming.js +1 -1
  24. package/dist/templates/example-mapping.js +1 -1
  25. package/dist/templates/grill.js +1 -1
  26. package/dist/templates/plain.js +1 -1
  27. package/dist/templates/prototype.js +1 -1
  28. package/dist/templates/slides.js +1 -1
  29. package/dist/templates/task-board.js +1 -1
  30. package/dist/templates/usm.js +1 -1
  31. package/dist/templates/whiteboard.js +1 -1
  32. package/package.json +1 -1
  33. package/dist/chunks/shared-B4ewpBuM.js +0 -30
  34. package/dist/chunks/shared-B9OVJ7XA.js +0 -556
  35. package/dist/chunks/shared-BHRhwgui.js +0 -1252
  36. package/dist/chunks/shared-B_MMP97h.js +0 -2402
  37. package/dist/chunks/shared-CxFItadP.js +0 -1094
  38. package/dist/chunks/shared-DIJgMVpY.js +0 -2239
  39. package/dist/chunks/shared-xrCdgpNS.js +0 -1
@@ -0,0 +1,2062 @@
1
+ import{ac as mt,aL as gt,ad as U,ae as z,af as G,aA as T,ag as c,az as D,ai as f,aj as b,aK as ht,a_ as vt,ah as ge,p as g,at as h,v as H,ay as P,P as ft,e as bt,a0 as yt,V as R,R as y,a7 as V,a2 as W,G as kt,a4 as l,aP as M,a3 as m,a8 as xt,j as St,a9 as wt,aN as Tt,aO as $t,A as Et,l as F,a5 as A,aD as N,J as At,B as It,aH as _t,K as he,z as ve,h as Mt,as as Ot,T as fe,a1 as Lt}from"./shared-CSC14I4g.js";import{s as Dt}from"./shared-D4K7KsfJ.js";import{P as Rt,p as Nt}from"./shared-aDPp8Vry.js";import{r as se,D as Ct}from"./shared-DdefS1nG.js";import{a as Yt}from"./shared-BDUe3aT-.js";const Ut=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]],zt=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7"}]],Pt=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9"}]],Vt=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z"}],["circle",{cx:"12",cy:"12",r:"10"}]],Bt=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],Gt=[["circle",{cx:"12",cy:"12",r:"10"}]],Ft=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],Kt=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]],jt=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528"}]],qt=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"}],["path",{d:"M9 18h6"}],["path",{d:"M10 22h4"}]],X=["gray","blue","violet","green","amber","accent"],be=["progress","circle","lightbulb","flag","play","clock","eye","pause","check","x"],Ht=U({id:f(c(),b(1)),name:f(c(),b(1))}),Wt=U({id:D,name:f(c(),b(1)),actor:T(c()),steps:z(G(Ht),[])}),Xt=U({id:f(c(),b(1)),name:f(c(),b(1)),timeframe:T(c()),description:T(c())}),ie=ge(X),ne=ge(be),re=f(c(),vt(),ht(e=>/^https?:\/\//i.test(e),"a link must be an http(s) URL")),Zt=U({url:re,label:T(f(c(),b(1)))}),Jt=U({id:D,name:f(c(),b(1)),tone:z(ie),icon:z(ne)}),Qt=U({id:D,name:f(c(),b(1)),description:T(c()),activityId:f(c(),b(1)),stepId:f(c(),b(1)),milestoneId:T(c()),statusId:T(c()),links:T(G(Zt))}),ea=U({title:T(c()),activities:z(G(Wt),[]),milestones:z(G(Xt),[]),statuses:z(G(Jt),[]),stories:z(G(Qt),[])}),ye=e=>X[e%X.length]??"gray",ke=e=>{const t=mt(ea,e),a=t.statuses[0]?.id,s={...t,stories:a===void 0?t.stories:t.stories.map(d=>d.statusId===void 0?{...d,statusId:a}:d),statuses:t.statuses.map((d,u)=>({...d,tone:d.tone??ye(u),icon:d.icon??"progress"}))},i=new Map;for(const d of s.activities)for(const u of d.steps)i.set(u.id,d.id);const n=new Set(s.milestones.map(d=>d.id)),r=new Set(s.statuses.map(d=>d.id)),o=new Set,p=(d,u)=>{if(o.has(u))throw new Error(`duplicate id "${u}" in ${d}`);o.add(u)};for(const d of s.activities){p("activities",d.id);for(const u of d.steps)p("steps",u.id)}for(const d of s.milestones)p("milestones",d.id);for(const d of s.statuses)p("statuses",d.id);for(const d of s.stories){p("stories",d.id);const u=i.get(d.stepId);if(u===void 0||u!==d.activityId)throw new Error(`story "${d.id}" references unknown activityId/stepId`);if(d.milestoneId!==void 0&&!n.has(d.milestoneId))throw new Error(`story "${d.id}" references unknown milestoneId "${d.milestoneId}"`);const E=(d.links??[]).map(I=>I.url);if(new Set(E).size!==E.length)throw new Error(`story "${d.id}" links the same URL twice`);if(d.statusId!==void 0&&!r.has(d.statusId))throw new Error(`story "${d.id}" references unknown statusId "${d.statusId}"`)}return s},xe=()=>({activities:[],milestones:[],statuses:[],stories:[]}),L=(e,t)=>{if(t!==void 0)return e.activities.find(a=>a.id===t)},oe=(e,t)=>`${e}.${t}`,S=(e,t)=>{if(t===void 0)return;const a=gt(t,2);if(a){const[s,i]=a;if(s===void 0||i===void 0)return;const n=e.activities.find(o=>o.id===s),r=n?.steps.find(o=>o.id===i);return n&&r?{activity:n,step:r}:void 0}if(!t.includes("."))for(const s of e.activities){const i=s.steps.find(n=>n.id===t);if(i)return{activity:s,step:i}}},O=(e,t)=>{if(t!==void 0)return e.milestones.find(a=>a.id===t)},$=(e,t)=>{if(t!==void 0)return e.statuses.find(a=>a.id===t)},x=(e,t)=>{if(t!==void 0)return e.stories.find(a=>a.id===t)},de=e=>e.activities.flatMap(t=>t.steps.map(a=>({activity:t,step:a}))),ta=e=>({...e,stories:Dt(e.stories,[t=>`${t.activityId}/${t.stepId}/${t.milestoneId??""}`])}),Z=(e,t,a)=>e.stories.filter(s=>s.stepId===t&&(s.milestoneId??void 0)===a),Se=(e,t,a)=>e.stories.filter(s=>s.activityId===t&&(s.milestoneId??void 0)===a),B=e=>[...e.activities.map(t=>t.id),...e.activities.flatMap(t=>t.steps.map(a=>a.id)),...e.milestones.map(t=>t.id),...e.statuses.map(t=>t.id),...e.stories.map(t=>t.id)],we=(e,t)=>e.stories.filter(a=>a.stepId===t).length,v={SET_ACTIVITY_NAME:g("SET_ACTIVITY_NAME","activity",h({name:f(c(),b(1))})),SET_ACTIVITY_ACTOR:g("SET_ACTIVITY_ACTOR","activity",h({actor:c()})),SET_STEP_NAME:g("SET_STEP_NAME","step",h({name:f(c(),b(1))})),REORDER_STEP:g("REORDER_STEP","step",h({after:P(c())}),{mode:"sequence"}),ADD_ACTIVITY:g("ADD_ACTIVITY","page",h({id:D,name:f(c(),b(1))}),{dedupeKey:H}),ADD_STEP:g("ADD_STEP","activity",h({id:D,name:f(c(),b(1))}),{dedupeKey:H}),DELETE_ACTIVITY:g("DELETE_ACTIVITY","activity",h({})),DELETE_STEP:g("DELETE_STEP","step",h({})),SET_STORY_NAME:g("SET_STORY_NAME","story",h({name:f(c(),b(1))})),SET_STORY_DESCRIPTION:g("SET_STORY_DESCRIPTION","story",h({description:c()})),SET_STORY_MILESTONE:g("SET_STORY_MILESTONE","story",h({milestoneId:P(c())})),MOVE_STORY:g("MOVE_STORY","story",h({activityId:f(c(),b(1)),stepId:f(c(),b(1)),milestoneId:P(c()),after:P(c())}),{mode:"sequence"}),REORDER_STORY:g("REORDER_STORY","story",h({after:P(c())}),{mode:"sequence"}),ADD_STORY:g("ADD_STORY","step",h({id:D,name:f(c(),b(1)),activityId:f(c(),b(1)),milestoneId:T(c())}),{dedupeKey:H}),DELETE_STORY:g("DELETE_STORY","story",h({})),ADD_STORY_LINK:g("ADD_STORY_LINK","story",h({url:re,label:T(f(c(),b(1)))})),REMOVE_STORY_LINK:g("REMOVE_STORY_LINK","story",h({url:c()})),SET_STORY_STATUS:g("SET_STORY_STATUS","story",h({statusId:f(c(),b(1))})),SET_MILESTONE_NAME:g("SET_MILESTONE_NAME","milestone",h({name:f(c(),b(1))})),ADD_MILESTONE:g("ADD_MILESTONE","page",h({id:D,name:f(c(),b(1))}),{dedupeKey:H}),DELETE_MILESTONE:g("DELETE_MILESTONE","milestone",h({})),REORDER_MILESTONE:g("REORDER_MILESTONE","milestone",h({after:P(c())}),{mode:"sequence"}),ADD_STATUS:g("ADD_STATUS","page",h({id:D,name:f(c(),b(1)),tone:ie,icon:T(ne)}),{dedupeKey:H}),SET_STATUS_NAME:g("SET_STATUS_NAME","status",h({name:f(c(),b(1))})),SET_STATUS_TONE:g("SET_STATUS_TONE","status",h({tone:ie})),SET_STATUS_ICON:g("SET_STATUS_ICON","status",h({icon:ne})),DELETE_STATUS:g("DELETE_STATUS","status",h({})),REORDER_STATUS:g("REORDER_STATUS","status",h({after:P(c())}),{mode:"sequence"})},aa={setActivityName:(e,t)=>({type:"SET_ACTIVITY_NAME",target:{type:"activity",id:e},payload:{name:t}}),setStepName:(e,t)=>({type:"SET_STEP_NAME",target:{type:"step",id:e},payload:{name:t}})},Te=(e,t)=>{const a=ft(v,t);if(a===null)return null;const s=a.target.id;switch(a.type){case"SET_ACTIVITY_NAME":{const{name:i}=a.payload;return e.activities.some(n=>n.id===s)?{...e,activities:e.activities.map(n=>n.id===s?{...n,name:i}:n)}:null}case"SET_ACTIVITY_ACTOR":{const i=a.payload.actor.trim();return e.activities.some(n=>n.id===s)?{...e,activities:e.activities.map(n=>{if(n.id!==s)return n;const{actor:r,...o}=n;return i===""?o:{...o,actor:i}})}:null}case"SET_STEP_NAME":{const{name:i}=a.payload,n=S(e,s);return n?{...e,activities:e.activities.map(r=>r.id===n.activity.id?{...r,steps:r.steps.map(o=>o.id===n.step.id?{...o,name:i}:o)}:r)}:null}case"REORDER_STEP":{const{after:i}=a.payload,n=S(e,s);if(!n)return null;const r=i===null?null:S(e,i);if(i!==null&&(!r||r.activity.id!==n.activity.id))return null;const o=pe(n.activity.steps,n.step.id,r?.step.id??null);return o===null?null:{...e,activities:e.activities.map(p=>p.id===n.activity.id?{...p,steps:o}:p)}}case"ADD_ACTIVITY":{const i=a.payload;return e.activities.some(n=>n.id===i.id)?e:{...e,activities:[...e.activities,{id:i.id,name:i.name,steps:[]}]}}case"ADD_STEP":{const i=a.payload,n=e.activities.find(r=>r.id===s);return n?n.steps.some(r=>r.id===i.id)?e:{...e,activities:e.activities.map(r=>r.id===s?{...r,steps:[...r.steps,{id:i.id,name:i.name}]}:r)}:null}case"DELETE_ACTIVITY":{const i=e.activities.find(r=>r.id===s);if(!i)return null;const n=new Set(i.steps.map(r=>r.id));return{...e,activities:e.activities.filter(r=>r.id!==s),stories:e.stories.filter(r=>r.activityId!==s&&!n.has(r.stepId))}}case"DELETE_STEP":{const i=S(e,s);return i?{...e,activities:e.activities.map(n=>n.id===i.activity.id?{...n,steps:n.steps.filter(r=>r.id!==i.step.id)}:n),stories:e.stories.filter(n=>n.activityId!==i.activity.id||n.stepId!==i.step.id)}:null}case"SET_STORY_NAME":{const{name:i}=a.payload;return K(e,s,n=>({...n,name:i}))}case"SET_STORY_DESCRIPTION":{const{description:i}=a.payload;return K(e,s,n=>({...n,description:i}))}case"SET_STORY_MILESTONE":{const{milestoneId:i}=a.payload;return i!==null&&!O(e,i)?null:K(e,s,n=>i===null?le(n):{...n,milestoneId:i})}case"MOVE_STORY":{const i=a.payload,n=x(e,s);if(!n)return null;const r=S(e,i.stepId);if(!r||r.activity.id!==i.activityId||i.milestoneId!==null&&!O(e,i.milestoneId))return null;const o=i.milestoneId??void 0,p=o===void 0?{...le(n),activityId:r.activity.id,stepId:r.step.id}:{...n,activityId:r.activity.id,stepId:r.step.id,milestoneId:o};return $e(e,p,i.after)}case"REORDER_STORY":{const{after:i}=a.payload,n=x(e,s);return n?$e(e,n,i,!0):null}case"ADD_STORY":{const i=a.payload,n=S(e,t.target.id);if(!n||n.activity.id!==i.activityId||i.milestoneId!==void 0&&!O(e,i.milestoneId))return null;if(e.stories.some(o=>o.id===i.id))return e;const r={id:i.id,name:i.name,activityId:i.activityId,stepId:n.step.id,...i.milestoneId===void 0?{}:{milestoneId:i.milestoneId},...e.statuses[0]===void 0?{}:{statusId:e.statuses[0].id}};return{...e,stories:[...e.stories,r]}}case"DELETE_STORY":return e.stories.some(i=>i.id===s)?{...e,stories:e.stories.filter(i=>i.id!==s)}:null;case"ADD_STORY_LINK":{const{url:i,label:n}=a.payload,r=x(e,s);if(!r)return null;if(r.links?.some(p=>p.url===i))return e;const o=n===void 0?{url:i}:{url:i,label:n};return K(e,s,p=>({...p,links:[...p.links??[],o]}))}case"REMOVE_STORY_LINK":{const{url:i}=a.payload;return x(e,s)?.links?.some(r=>r.url===i)?K(e,s,r=>{const o=(r.links??[]).filter(u=>u.url!==i),{links:p,...d}=r;return o.length===0?d:{...d,links:o}}):null}case"SET_STORY_STATUS":{const{statusId:i}=a.payload;return $(e,i)?K(e,s,n=>({...n,statusId:i})):null}case"SET_MILESTONE_NAME":{const{name:i}=a.payload;return e.milestones.some(n=>n.id===s)?{...e,milestones:e.milestones.map(n=>n.id===s?{...n,name:i}:n)}:null}case"ADD_MILESTONE":{const i=a.payload;return e.milestones.some(n=>n.id===i.id)?e:{...e,milestones:[...e.milestones,{id:i.id,name:i.name}]}}case"DELETE_MILESTONE":return e.milestones.some(i=>i.id===s)?{...e,milestones:e.milestones.filter(i=>i.id!==s),stories:e.stories.map(i=>i.milestoneId===s?le(i):i)}:null;case"REORDER_MILESTONE":{const{after:i}=a.payload,n=pe(e.milestones,s,i);return n===null?null:{...e,milestones:n}}case"ADD_STATUS":{const{id:i,name:n,tone:r,icon:o}=a.payload;if(e.statuses.some(d=>d.id===i))return e;const p=[...e.statuses,{id:i,name:n,tone:r,icon:o??"progress"}];return e.statuses.length===0?{...e,statuses:p,stories:e.stories.map(d=>({...d,statusId:i}))}:{...e,statuses:p}}case"SET_STATUS_NAME":{const{name:i}=a.payload;return $(e,s)?{...e,statuses:e.statuses.map(n=>n.id===s?{...n,name:i}:n)}:null}case"SET_STATUS_TONE":{const{tone:i}=a.payload;return $(e,s)?{...e,statuses:e.statuses.map(n=>n.id===s?{...n,tone:i}:n)}:null}case"SET_STATUS_ICON":{const{icon:i}=a.payload;return $(e,s)?{...e,statuses:e.statuses.map(n=>n.id===s?{...n,icon:i}:n)}:null}case"DELETE_STATUS":{if(!$(e,s))return null;const i=e.statuses.filter(r=>r.id!==s),n=i[0]?.id;return{...e,statuses:i,stories:e.stories.map(r=>r.statusId!==s?r:n===void 0?sa(r):{...r,statusId:n})}}case"REORDER_STATUS":{const{after:i}=a.payload,n=pe(e.statuses,s,i);return n===null?null:{...e,statuses:n}}default:return bt(a)}},K=(e,t,a)=>e.stories.some(s=>s.id===t)?{...e,stories:e.stories.map(s=>s.id===t?a(s):s)}:null,le=e=>{const{milestoneId:t,...a}=e;return a},sa=e=>{const{statusId:t,...a}=e;return a},$e=(e,t,a,s=!1)=>{const i=t.milestoneId??void 0,n=e.stories.filter(k=>k.id!==t.id),r=n.filter(k=>k.stepId===t.stepId&&(k.milestoneId??void 0)===i);if(a!==null){const k=n.find(_=>_.id===a);if(!k||k.stepId!==t.stepId||(k.milestoneId??void 0)!==i)return null;if(s){const _=x(e,t.id);if(!_||k.stepId!==_.stepId||(k.milestoneId??void 0)!==(_.milestoneId??void 0))return null}}const o=a===null?[t,...r]:Ee(r,t,a),p=n.findIndex(k=>k.stepId===t.stepId&&(k.milestoneId??void 0)===i),d=new Set(r.map(k=>k.id)),u=n.filter(k=>!d.has(k.id)),E=p<0?u.length:Math.min(p,u.length),I=[...u.slice(0,E),...o,...u.slice(E)];return{...e,stories:I}},pe=(e,t,a)=>{if(!e.some(n=>n.id===t)||a!==null&&!e.some(n=>n.id===a))return null;if(a===t)return[...e];const s=e.find(n=>n.id===t);if(s===void 0)return null;const i=e.filter(n=>n.id!==t);return Ee(i,s,a)},Ee=(e,t,a)=>{const s=[...e],i=a===null?-1:s.findIndex(n=>n.id===a);return s.splice(i+1,0,t),s},J=yt({en:{renameActivity:"Rename activity",changeActivityActor:"Change whose experience",renameStep:"Rename step",reorderStep:"Reorder step",addActivity:"Add activity",addStep:"Add step",deleteActivity:"Delete activity",deleteStep:"Delete step",renameStory:"Rename story",updateStoryDescription:"Update story description",changeMilestone:"Change milestone",moveStory:"Move story",reorderStory:"Reorder story",addStory:"Add story",deleteStory:"Delete story",renameMilestone:"Rename milestone",addMilestone:"Add milestone",deleteMilestone:"Delete milestone",reorderMilestone:"Reorder milestone",changeStoryStatus:"Change story status",addStatus:"Add status",renameStatus:"Rename status",changeStatusTone:"Change status color",changeStatusIcon:"Change status icon",addStoryLink:"Link to story",removeStoryLink:"Unlink from story",deleteStatus:"Delete status",reorderStatus:"Reorder status",toValue:e=>`\u2192 \u201C${e}\u201D`,fromTo:(e,t)=>`\u201C${e}\u201D \u2192 \u201C${t}\u201D`,added:e=>`+ \u201C${e}\u201D`,removed:e=>`\u2212 \u201C${e}\u201D`,toFront:"\u2192 To the front",afterName:e=>`\u2192 Right after \u201C${e}\u201D`,toUnassigned:"\u2192 Unassigned",toName:e=>`\u2192 ${e}`,activityGroup:"Activity",stepGroup:"Step",storyGroup:"Story",milestoneGroup:"Milestone",statusGroup:"Status",mapGroup:"Map",targetLabel:(e,t)=>`${e} \xB7 ${t}`,targetMissing:(e,t)=>`${e} \xB7 ${t} (missing)`,wholeMap:"Whole map",unassigned:"Unassigned",emptyTitle:"No backbone yet",emptyBody:"Add activities and steps, and the story map appears here.",firstActivityButton:"+ First activity",groupingLabel:"Group by",groupViewTab:"Activity group",groupAxisHeader:"Activity group \u2192",activityAxis:"Activity \u2192",milestoneAxis:"Milestone \u2193",stepNameLabel:"Step name",activityNameLabel:"Activity name",milestoneNameLabel:"Milestone name",addStepAria:"Add a step to this activity",newActivityButton:"+ Activity",newMilestoneButton:"+ Milestone",addCellButton:"+ Add",addStoryCellAria:"Add a story to this cell",storyCount:e=>e===1?"1 story":`${e} stories`,pageTabsLabel:"Page",mapTab:"User Story Mapping",milestonesTab:"Milestones",statusesTab:"Statuses",shareOfStories:e=>`${e}% of all stories`,coverageLabel:"Backbone coverage",coverage:(e,t)=>`${e} / ${t} steps`,storiesLabel:"Stories",timeframeUnset:"Timing not set",milestoneNoDescription:"No description yet.",noMilestonesTitle:"No milestones yet",noMilestonesBody:"Add a milestone to slice the map into releases.",commentCountAria:e=>e===1?"1 comment":`${e} comments`,statusNameLabel:"Status name",statusToneLabel:"Color",toneName:e=>({gray:"Gray",blue:"Blue",violet:"Violet",green:"Green",amber:"Amber",accent:"Orange"})[e],statusIconLabel:"Icon",iconName:e=>({progress:"Progress ring",circle:"Circle",lightbulb:"Light bulb",flag:"Flag",play:"Play",clock:"Clock",eye:"Eye",pause:"Pause",check:"Check",x:"Cross"})[e],statusShare:(e,t)=>`${e===1?"1 story":`${e} stories`} \xB7 ${t}%`,statusFilterLabel:"Status",clearFilter:"Clear",progressAria:e=>`Progress: ${e}`,activityActorLabel:"Who",noStatusesTitle:"No statuses yet",noStatusesBody:"Add statuses such as Idea / Ready / Done, and the map colors each story by where it stands.",newStatusButton:"+ Status",moveUpAria:"Move up",moveDownAria:"Move down",deleteStatusAria:"Delete this status",moveDialogLabel:"Step to move to",moveDialogSelectLabel:"Destination",moveConfirm:"Move",moveCancel:"Cancel",storyStatusLabel:"Status",panelLabel:e=>`Story: ${e}`,closePanelAria:"Close",storyTitleLabel:"Title",storyDescriptionLabel:"Description",storyLinksLabel:"Links",linkUrlLabel:"URL",addLinkButton:"Add",removeLinkAria:e=>`Remove ${e}`,deleteStoryButton:"Delete story",storyCommentsLabel:"Comments",commentSubmit:"Comment",storyStatusAria:e=>`Status: ${e}`,newActivityName:"New activity",newStepName:"New step",newMilestoneName:"New milestone",newStoryName:"New story",newStatusName:"New status"},ja:{renameActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u540D\u3092\u5909\u66F4",changeActivityActor:"\u4F53\u9A13\u3059\u308B\u4EBA\u3092\u5909\u66F4",renameStep:"\u30B9\u30C6\u30C3\u30D7\u540D\u3092\u5909\u66F4",reorderStep:"\u30B9\u30C6\u30C3\u30D7\u306E\u9806\u5E8F\u3092\u5909\u66F4",addActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u8FFD\u52A0",addStep:"\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0",deleteActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u524A\u9664",deleteStep:"\u30B9\u30C6\u30C3\u30D7\u3092\u524A\u9664",renameStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u540D\u3092\u5909\u66F4",updateStoryDescription:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u8AAC\u660E\u3092\u66F4\u65B0",changeMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u5909\u66F4",moveStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u79FB\u52D5",reorderStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u9806\u5E8F\u3092\u5909\u66F4",addStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u8FFD\u52A0",deleteStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u524A\u9664",renameMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u540D\u3092\u5909\u66F4",addMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0",deleteMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u524A\u9664",reorderMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u306E\u9806\u5E8F\u3092\u5909\u66F4",changeStoryStatus:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u5909\u66F4",addStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8FFD\u52A0",renameStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u540D\u3092\u5909\u66F4",changeStatusTone:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u8272\u3092\u5909\u66F4",changeStatusIcon:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30A2\u30A4\u30B3\u30F3\u3092\u5909\u66F4",addStoryLink:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30EA\u30F3\u30AF\u3092\u8FFD\u52A0",removeStoryLink:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30EA\u30F3\u30AF\u3092\u524A\u9664",deleteStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u524A\u9664",reorderStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u9806\u5E8F\u3092\u5909\u66F4",toValue:e=>`\u2192 \u300C${e}\u300D`,fromTo:(e,t)=>`\u300C${e}\u300D\u2192\u300C${t}\u300D`,added:e=>`+ \u300C${e}\u300D`,removed:e=>`\u2212 \u300C${e}\u300D`,toFront:"\u2192 \u5148\u982D\u3078",afterName:e=>`\u2192 \u300C${e}\u300D\u306E\u76F4\u5F8C\u3078`,toUnassigned:"\u2192 \u672A\u5272\u5F53\u3078",toName:e=>`\u2192 ${e}`,activityGroup:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",stepGroup:"\u30B9\u30C6\u30C3\u30D7",storyGroup:"\u30B9\u30C8\u30FC\u30EA\u30FC",milestoneGroup:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusGroup:"\u30B9\u30C6\u30FC\u30BF\u30B9",mapGroup:"\u30DE\u30C3\u30D7",targetLabel:(e,t)=>`${e} \xB7 ${t}`,targetMissing:(e,t)=>`${e} \xB7 ${t} (missing)`,wholeMap:"\u30DE\u30C3\u30D7\u5168\u4F53",unassigned:"\u672A\u5272\u5F53",emptyTitle:"\u30D0\u30C3\u30AF\u30DC\u30FC\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",emptyBody:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3068\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u3053\u3053\u306B\u30B9\u30C8\u30FC\u30EA\u30FC\u30DE\u30C3\u30D7\u304C\u73FE\u308C\u307E\u3059\u3002",firstActivityButton:"+ \u6700\u521D\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",groupingLabel:"\u307E\u3068\u3081\u308B\u5358\u4F4D",groupViewTab:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7",groupAxisHeader:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7 \u2192",activityAxis:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3 \u2192",milestoneAxis:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3 \u2193",stepNameLabel:"\u30B9\u30C6\u30C3\u30D7\u540D",activityNameLabel:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u540D",milestoneNameLabel:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u540D",addStepAria:"\u3053\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306B\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0",newActivityButton:"+ \u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",newMilestoneButton:"+ \u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",addCellButton:"+ \u8FFD\u52A0",addStoryCellAria:"\u3053\u306E\u30DE\u30B9\u306B\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u8FFD\u52A0",storyCount:e=>`${e} \u30B9\u30C8\u30FC\u30EA\u30FC`,pageTabsLabel:"\u30DA\u30FC\u30B8",mapTab:"User Story Mapping",milestonesTab:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusesTab:"\u30B9\u30C6\u30FC\u30BF\u30B9",shareOfStories:e=>`\u5168\u30B9\u30C8\u30FC\u30EA\u30FC\u306E ${e}%`,coverageLabel:"\u30D0\u30C3\u30AF\u30DC\u30FC\u30F3\u306E\u7DB2\u7F85",coverage:(e,t)=>`${e} / ${t} \u30B9\u30C6\u30C3\u30D7`,storiesLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC",timeframeUnset:"\u6642\u671F\u672A\u5B9A",milestoneNoDescription:"\u8AAC\u660E\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",noMilestonesTitle:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noMilestonesBody:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u30DE\u30C3\u30D7\u3092\u30EA\u30EA\u30FC\u30B9\u3054\u3068\u306B\u533A\u5207\u308C\u307E\u3059\u3002",commentCountAria:e=>`\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,statusNameLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9\u540D",statusToneLabel:"\u8272",toneName:e=>({gray:"\u30B0\u30EC\u30FC",blue:"\u9752",violet:"\u7D2B",green:"\u7DD1",amber:"\u9EC4",accent:"\u30AA\u30EC\u30F3\u30B8"})[e],statusIconLabel:"\u30A2\u30A4\u30B3\u30F3",iconName:e=>({progress:"\u9032\u6357\u30EA\u30F3\u30B0",circle:"\u5186",lightbulb:"\u96FB\u7403",flag:"\u65D7",play:"\u518D\u751F",clock:"\u6642\u8A08",eye:"\u76EE",pause:"\u4E00\u6642\u505C\u6B62",check:"\u30C1\u30A7\u30C3\u30AF",x:"\u30D0\u30C4"})[e],statusShare:(e,t)=>`${e} \u30B9\u30C8\u30FC\u30EA\u30FC \xB7 ${t}%`,statusFilterLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9",clearFilter:"\u30AF\u30EA\u30A2",progressAria:e=>`\u9032\u307F\u5177\u5408: ${e}`,activityActorLabel:"\u8AB0\u306E\u4F53\u9A13",noStatusesTitle:"\u30B9\u30C6\u30FC\u30BF\u30B9\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noStatusesBody:"Idea / Ready / Done \u306E\u3088\u3046\u306A\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u30DE\u30C3\u30D7\u306E\u30AB\u30FC\u30C9\u304C\u9032\u307F\u5177\u5408\u3067\u8272\u5206\u3051\u3055\u308C\u307E\u3059\u3002",newStatusButton:"+ \u30B9\u30C6\u30FC\u30BF\u30B9",moveUpAria:"\u4E0A\u3078\u79FB\u52D5",moveDownAria:"\u4E0B\u3078\u79FB\u52D5",deleteStatusAria:"\u3053\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u524A\u9664",moveDialogLabel:"\u79FB\u52D5\u5148\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",moveDialogSelectLabel:"\u79FB\u52D5\u5148",moveConfirm:"\u79FB\u52D5\u3059\u308B",moveCancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",storyStatusLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9",panelLabel:e=>`\u30B9\u30C8\u30FC\u30EA\u30FC: ${e}`,closePanelAria:"\u9589\u3058\u308B",storyTitleLabel:"\u30BF\u30A4\u30C8\u30EB",storyDescriptionLabel:"\u8AAC\u660E",storyLinksLabel:"\u30EA\u30F3\u30AF",linkUrlLabel:"URL",addLinkButton:"\u8FFD\u52A0",removeLinkAria:e=>`${e} \u3092\u5916\u3059`,deleteStoryButton:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u524A\u9664",storyCommentsLabel:"\u30B3\u30E1\u30F3\u30C8",commentSubmit:"\u30B3\u30E1\u30F3\u30C8\u3059\u308B",storyStatusAria:e=>`\u30B9\u30C6\u30FC\u30BF\u30B9: ${e}`,newActivityName:"\u65B0\u3057\u3044\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",newStepName:"\u65B0\u3057\u3044\u30B9\u30C6\u30C3\u30D7",newMilestoneName:"\u65B0\u3057\u3044\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",newStoryName:"\u65B0\u3057\u3044\u30B9\u30C8\u30FC\u30EA\u30FC",newStatusName:"\u65B0\u3057\u3044\u30B9\u30C6\u30FC\u30BF\u30B9"}}),ce=/^[A-Z][A-Z0-9]+-\d+$/,Ae=e=>{let t=e;try{t=decodeURIComponent(e)}catch{}return t.replace(/[-_+]+/g," ").trim()},ia=(e,t)=>{if(e!=="github.com")return null;const[a,s,i,n]=t;if(a===void 0)return{kind:"github",text:"GitHub",title:"github.com"};if(s===void 0)return{kind:"github",text:a,title:a};const r=`${a}/${s}`;return(i==="issues"||i==="pull"||i==="discussions")&&n&&/^\d+$/.test(n)?{kind:"github",text:`#${n}`,title:`${r}#${n}`}:i==="commit"&&n?{kind:"github",text:n.slice(0,7),title:`${r}@${n}`}:{kind:"github",text:r,title:r}},na=(e,t)=>{if(e!=="gitlab.com")return null;const a=t.indexOf("-"),s=(a<0?t:t.slice(0,a)).join("/"),i=a<0?void 0:t[a+1],n=a<0?void 0:t[a+2];if(n&&/^\d+$/.test(n)){if(i==="issues")return{kind:"gitlab",text:`#${n}`,title:`${s}#${n}`};if(i==="merge_requests")return{kind:"gitlab",text:`!${n}`,title:`${s}!${n}`}}return{kind:"gitlab",text:s||"GitLab",title:s||e}},ra=(e,t,a)=>{if(!t.endsWith(".atlassian.net")&&!t.startsWith("jira."))return null;const s=(a[0]==="browse"?a[1]:void 0)??e.searchParams.get("selectedIssue")??a.find(i=>ce.test(i));return s&&ce.test(s)?{kind:"jira",text:s,title:`${t} ${s}`}:{kind:"jira",text:"Jira",title:t}},oa=(e,t)=>{if(e!=="linear.app")return null;const a=t[1]==="issue"?t[2]?.toUpperCase():void 0;return a&&ce.test(a)?{kind:"linear",text:a,title:a}:{kind:"linear",text:"Linear",title:e}},da=(e,t)=>{if(e!=="figma.com")return null;const[a,,s]=t;if((a==="file"||a==="design"||a==="proto"||a==="board")&&s){const i=Ae(s);return{kind:"figma",text:i,title:i}}return{kind:"figma",text:"Figma",title:e}},la=(e,t)=>{if(e!=="notion.so"&&!e.endsWith(".notion.site"))return null;const s=(t.at(-1)??"").replace(/-?[0-9a-f]{32}$/i,""),i=s===""?"Notion":Ae(s);return{kind:"notion",text:i,title:i}},Q=e=>{let t;try{t=new URL(e)}catch{return{kind:"web",text:e,title:e}}const a=t.hostname.replace(/^www\./,""),s=t.pathname.split("/").filter(i=>i!=="");return ia(a,s)??na(a,s)??ra(t,a,s)??oa(a,s)??da(a,s)??la(a,s)??{kind:"web",text:a,title:e}},Ie=e=>{const t=e.tab;return t==="milestones"||t==="statuses"?t:"map"},ee=e=>{const t=e.statuses.length-1;return e.statuses.map((a,s)=>({id:a.id,name:a.name,tone:a.tone,icon:a.icon,progress:t<=0?1:s/t}))},_e=(e,t)=>e.find(a=>a.id===t.statusId),Me=(e,t)=>ee(e).map(a=>({...a,count:t.filter(s=>s.statusId===a.id).length})).filter(a=>a.count>0),te=(e,t)=>{const a=t.status;if(a===void 0||a==="")return new Set;const s=new Set(a.split(","));return new Set(e.statuses.map(i=>i.id).filter(i=>s.has(i)))},Oe=(e,t)=>{const a=e.statuses.map(s=>s.id).filter(s=>t.has(s));return a.length===0?null:a.join(",")},pa=(e,t)=>{const a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a},Le=(e,t)=>e.size===0?!0:t.statusId!==void 0&&e.has(t.statusId),C=(e,t,a)=>{const s=typeof a=="string"?a:"",i=typeof t=="string"?t:void 0;return i===void 0?e.toValue(s):e.fromTo(i,s)},ae=(e,t)=>typeof t=="string"?e.afterName(t):e.toFront,ca={SET_ACTIVITY_NAME:(e,t,a)=>({title:e.renameActivity,tone:"update",body:C(e,L(a,t.target.id)?.name,y(v.SET_ACTIVITY_NAME,t).name??"")}),SET_ACTIVITY_ACTOR:(e,t,a)=>{const s=y(v.SET_ACTIVITY_ACTOR,t).actor.trim();return{title:e.changeActivityActor,tone:"update",body:s===""?e.removed(L(a,t.target.id)?.actor??""):C(e,L(a,t.target.id)?.actor,s)}},SET_STEP_NAME:(e,t,a)=>({title:e.renameStep,tone:"update",body:C(e,S(a,t.target.id)?.step.name,y(v.SET_STEP_NAME,t).name??"")}),REORDER_STEP:(e,t)=>({title:e.reorderStep,tone:"move",body:ae(e,y(v.REORDER_STEP,t).after)}),ADD_ACTIVITY:(e,t)=>({title:e.addActivity,tone:"create",body:e.added(String(y(v.ADD_ACTIVITY,t).name??""))}),ADD_STEP:(e,t)=>({title:e.addStep,tone:"create",body:e.added(String(y(v.ADD_STEP,t).name??""))}),DELETE_ACTIVITY:(e,t,a)=>({title:e.deleteActivity,tone:"delete",body:e.removed(L(a,t.target.id)?.name??t.target.id)}),DELETE_STEP:(e,t,a)=>({title:e.deleteStep,tone:"delete",body:e.removed(S(a,t.target.id)?.step.name??t.target.id)}),SET_STORY_NAME:(e,t,a)=>({title:e.renameStory,tone:"update",body:C(e,x(a,t.target.id)?.name,y(v.SET_STORY_NAME,t).name??"")}),SET_STORY_DESCRIPTION:(e,t)=>({title:e.updateStoryDescription,tone:"update",body:e.toValue(String(y(v.SET_STORY_DESCRIPTION,t).description??"").slice(0,90))}),SET_STORY_MILESTONE:(e,t,a)=>{const s=y(v.SET_STORY_MILESTONE,t).milestoneId;return{title:e.changeMilestone,tone:"move",body:s==null?e.toUnassigned:e.toName(O(a,String(s))?.name??String(s))}},MOVE_STORY:(e,t,a)=>({title:e.moveStory,tone:"move",body:e.toName(S(a,String(y(v.MOVE_STORY,t).stepId))?.step.name??String(y(v.MOVE_STORY,t).stepId??""))}),REORDER_STORY:(e,t)=>({title:e.reorderStory,tone:"move",body:ae(e,y(v.REORDER_STORY,t).after)}),ADD_STORY:(e,t)=>({title:e.addStory,tone:"create",body:e.added(String(y(v.ADD_STORY,t).name??""))}),DELETE_STORY:(e,t,a)=>({title:e.deleteStory,tone:"delete",body:e.removed(x(a,t.target.id)?.name??t.target.id)}),SET_MILESTONE_NAME:(e,t,a)=>({title:e.renameMilestone,tone:"update",body:C(e,O(a,t.target.id)?.name,y(v.SET_MILESTONE_NAME,t).name??"")}),ADD_MILESTONE:(e,t)=>({title:e.addMilestone,tone:"create",body:e.added(String(y(v.ADD_MILESTONE,t).name??""))}),DELETE_MILESTONE:(e,t,a)=>({title:e.deleteMilestone,tone:"delete",body:e.removed(O(a,t.target.id)?.name??t.target.id)}),REORDER_MILESTONE:(e,t)=>({title:e.reorderMilestone,tone:"move",body:ae(e,y(v.REORDER_MILESTONE,t).after)}),ADD_STORY_LINK:(e,t)=>{const{url:a,label:s}=y(v.ADD_STORY_LINK,t);return{title:e.addStoryLink,tone:"create",body:e.added(s??Q(a).title)}},REMOVE_STORY_LINK:(e,t,a)=>{const{url:s}=y(v.REMOVE_STORY_LINK,t),i=x(a,t.target.id)?.links?.find(n=>n.url===s);return{title:e.removeStoryLink,tone:"delete",body:e.removed(i?.label??Q(s).title)}},SET_STORY_STATUS:(e,t,a)=>{const s=y(v.SET_STORY_STATUS,t).statusId;return{title:e.changeStoryStatus,tone:"update",body:e.toName($(a,s)?.name??s)}},ADD_STATUS:(e,t)=>({title:e.addStatus,tone:"create",body:e.added(y(v.ADD_STATUS,t).name)}),SET_STATUS_NAME:(e,t,a)=>({title:e.renameStatus,tone:"update",body:C(e,$(a,t.target.id)?.name,y(v.SET_STATUS_NAME,t).name)}),SET_STATUS_TONE:(e,t,a)=>{const s=$(a,t.target.id)?.tone,i=y(v.SET_STATUS_TONE,t).tone;return{title:e.changeStatusTone,tone:"update",body:C(e,s===void 0?void 0:e.toneName(s),e.toneName(i))}},SET_STATUS_ICON:(e,t,a)=>{const s=$(a,t.target.id)?.icon,i=y(v.SET_STATUS_ICON,t).icon;return{title:e.changeStatusIcon,tone:"update",body:C(e,s===void 0?void 0:e.iconName(s),e.iconName(i))}},DELETE_STATUS:(e,t,a)=>({title:e.deleteStatus,tone:"delete",body:e.removed($(a,t.target.id)?.name??t.target.id)}),REORDER_STATUS:(e,t)=>({title:e.reorderStatus,tone:"move",body:ae(e,y(v.REORDER_STATUS,t).after)})},De=(e,t,a,s)=>{let i;try{const n=ca[t.type];i=n?n(e,t,s??a):{title:t.type,tone:"meta"}}catch{i={title:t.type,tone:"meta"}}return{title:i.title,targetLabel:Ne(e,a,t.target),tone:i.tone,...i.body===void 0?{}:{summary:i.body}}},Re=e=>`${e.type} ${R(e.target)} ${JSON.stringify(e.payload)}`,Ne=(e,t,a)=>{try{switch(a.type){case"activity":{const s=L(t,a.id);return s?e.targetLabel(e.activityGroup,s.name):e.targetMissing(e.activityGroup,a.id)}case"step":{const s=S(t,a.id)?.step;return s?e.targetLabel(e.stepGroup,s.name):e.targetMissing(e.stepGroup,a.id)}case"story":{const s=x(t,a.id);return s?e.targetLabel(e.storyGroup,s.name):e.targetMissing(e.storyGroup,a.id)}case"milestone":{const s=O(t,a.id);return s?e.targetLabel(e.milestoneGroup,s.name):e.targetMissing(e.milestoneGroup,a.id)}case"status":{const s=$(t,a.id);return s?e.targetLabel(e.statusGroup,s.name):e.targetMissing(e.statusGroup,a.id)}case"page":return e.targetLabel(e.mapGroup,ue(t));default:return`${a.type} \xB7 ${a.id}`}}catch{return`${a.type} \xB7 ${a.id}`}},Ce=(e,t,a)=>{const s=[{value:"page:usm",label:e.wholeMap,group:e.mapGroup}];for(const i of t.activities){s.push({value:R({type:"activity",id:i.id}),label:i.name,group:e.activityGroup});for(const n of i.steps)s.push({value:R({type:"step",id:oe(i.id,n.id)}),label:`${i.name} \u203A ${n.name}`,group:e.stepGroup})}for(const i of t.milestones)s.push({value:R({type:"milestone",id:i.id}),label:i.name,group:e.milestoneGroup});for(const i of t.statuses)s.push({value:R({type:"status",id:i.id}),label:i.name,group:e.statusGroup});for(const i of t.stories)s.push({value:R({type:"story",id:i.id}),label:i.name,group:e.storyGroup});return s},Ye=(e,t,a)=>{const s=t.stories.find(i=>i.id===a.story);if(s)return{value:R({type:"story",id:s.id}),label:s.name,group:e.storyGroup};for(const i of t.activities){const n=i.steps.find(r=>r.id===a.step);if(n)return{value:R({type:"step",id:oe(i.id,n.id)}),label:n.name,group:e.stepGroup}}return null},ue=e=>e.title??"User Story Mapping",Ue=(e,t)=>{const a=S(e,t.step),s=a?.activity??L(e,t.activity)??e.activities[0],i=a?.step??s?.steps.find(d=>d.id===t.step)??s?.steps[0],n=x(e,t.story),r={...t};s?r.activity=s.id:delete r.activity,i?r.step=i.id:delete r.step,n?r.story=n.id:delete r.story,r.view=t.view==="group"?"group":"activity";const o=Oe(e,te(e,t));o===null?delete r.status:r.status=o;const p=Ie(t);return p==="map"?delete r.tab:r.tab=p,r},ze=(e,t)=>{switch(t.type){case"activity":return L(e,t.id)!==void 0;case"step":return S(e,t.id)!==void 0;case"story":return x(e,t.id)!==void 0;case"milestone":return O(e,t.id)!==void 0;case"status":return $(e,t.id)!==void 0;case"page":return!0;default:return!1}},Pe=e=>{const t=J(e);return{name:"usm",label:"User Story Mapping",parseBase:ke,emptyBase:xe,actions:v,apply:Te,canonicalState:ta,hasTarget:ze,canonicalTarget:(a,s)=>{if(s.type!=="step")return s;const i=S(a,s.id);return i?{...s,id:oe(i.activity.id,i.step.id)}:s},describe:(a,s,i)=>De(t,a,s,i),serialize:Re,resolveNavigation:Ue,commentTargets:(a,s)=>Ce(t,a),currentTarget:(a,s)=>Ye(t,a,s),title:ue}},ua={github:V`<path fill-rule="evenodd" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>`,gitlab:V`<path d="M8 15 1.2 9.9a.7.7 0 0 1-.25-.78L2.7 2.6a.35.35 0 0 1 .66 0L5.1 7.6h5.8l1.74-5a.35.35 0 0 1 .66 0l1.75 6.52a.7.7 0 0 1-.25.78z"></path>`,jira:V`<path d="M14.6 7.4 8.6 1.4 8 .8 3.5 5.3 1.4 7.4a.85.85 0 0 0 0 1.2l4.1 4.1L8 15.2l4.5-4.5.07-.07 2.03-2.03a.85.85 0 0 0 0-1.2zM8 9.9 5.9 8 8 5.9 10.1 8z"></path>`,linear:V`<path d="M1.2 9.4a6.9 6.9 0 0 0 5.4 5.4zM1 7.3l7.7 7.7a7 7 0 0 0 1.9-.5L1.5 5.4a7 7 0 0 0-.5 1.9zm1.2-3.1 9.6 9.6a7 7 0 0 0 1.2-1.1L3.3 3a7 7 0 0 0-1.1 1.2zM4.3 2.3a7 7 0 1 1 9.4 9.4z"></path>`,figma:V`<path d="M5.5 1h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm2.3 0h2.3a2.3 2.3 0 1 1 0 4.6H7.8zm2.3 4.6a2.3 2.3 0 1 1 0 4.6 2.3 2.3 0 0 1 0-4.6zM5.5 5.6h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm0 4.6h2.3v2.3a2.3 2.3 0 1 1-2.3-2.3z"></path>`,notion:V`<path fill-rule="evenodd" d="M2.5 1.6 11 1c1 0 1.3.1 2 .6l2.1 1.5c.4.3.5.4.5.7v9.6c0 .7-.3 1.1-1.1 1.2l-9.4.6c-.6 0-.9-.1-1.2-.5L1.9 12c-.3-.5-.5-.8-.5-1.3V2.8c0-.6.3-1.1 1.1-1.2zM5 4.4v8.9l8.6-.5V4zm1 1.2 2.9-.2 3 4.7V5.6l-.8-.1v-.5l2-.1v.6l-.6.1v6.1l-.9.1-3.5-5.4v4.9l.8.2v.5l-2.3.1v-.5l.6-.2V6.4l-.8-.1z"></path>`},Ve=e=>e==="web"?kt():l`<svg class="link-mark" viewBox="0 0 16 16" aria-hidden="true">${ua[e]}</svg>`,Be=W`
2
+ .link-mark {
3
+ fill: currentColor;
4
+ }
5
+ .link-chip {
6
+ display: inline-flex;
7
+ align-items: center;
8
+ gap: 5px;
9
+ min-width: 0;
10
+ max-width: 100%;
11
+ padding: 1px 8px 1px 6px;
12
+ border: 1px solid var(--dpk-rule-strong);
13
+ border-radius: 999px;
14
+ background: var(--dpk-paper-raised);
15
+ color: var(--dpk-ink-soft);
16
+ font-family: var(--dpk-mono);
17
+ font-size: 10.5px;
18
+ font-weight: 600;
19
+ line-height: 18px;
20
+ text-decoration: none;
21
+ transition:
22
+ color 140ms var(--dpk-ease),
23
+ border-color 140ms var(--dpk-ease);
24
+ }
25
+ .link-chip:hover {
26
+ border-color: var(--dpk-ink-faint);
27
+ color: var(--dpk-ink);
28
+ }
29
+ .link-chip:focus-visible {
30
+ outline: none;
31
+ box-shadow: var(--dpk-focus);
32
+ }
33
+ .link-chip svg {
34
+ flex: none;
35
+ width: 12px;
36
+ height: 12px;
37
+ }
38
+ .link-chip span {
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ white-space: nowrap;
42
+ }
43
+ `,Y=e=>`--usm-tone: var(--dpk-${e==null||e==="gray"?"ink-faint":e})`,Ge={circle:M(Gt),lightbulb:M(qt),flag:M(jt),play:M(Vt),clock:M(Ft),eye:M(Kt),pause:M(Pt),check:M(Ut),x:M(Bt)},ma=M(zt),ga=e=>{if(e>=1)return Ge.check();const t=2*Math.PI*4.5;return l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
44
+ <circle cx="12" cy="12" r="10"></circle>
45
+ ${e>0?V`<circle
46
+ class="si-pie"
47
+ cx="12"
48
+ cy="12"
49
+ r="4.5"
50
+ stroke-dasharray=${`${e*t} ${t}`}
51
+ transform="rotate(-90 12 12)"
52
+ ></circle>`:m}
53
+ </svg>`},j=e=>{const t=e===void 0?ma():e.icon==="progress"?ga(e.progress??1):Ge[e.icon]();return l`<span class="status-icon">${t}</span>`},Fe=(e,t)=>e.length===0?m:l`<span class="status-bar" role="img" aria-label=${t}>
54
+ ${e.map(a=>l`<span
55
+ class="status-bar-part"
56
+ data-status=${a.id}
57
+ title=${`${a.name}: ${a.count}`}
58
+ style=${`${Y(a.tone)};flex-grow:${a.count}`}
59
+ ></span>`)}
60
+ </span>`,Ke=W`
61
+ .status-icon {
62
+ display: block;
63
+ flex: none;
64
+ width: 16px;
65
+ height: 16px;
66
+ color: var(--usm-tone);
67
+ }
68
+ .status-icon svg {
69
+ display: block;
70
+ width: 100%;
71
+ height: 100%;
72
+ }
73
+ .status-icon .si-pie {
74
+ stroke-width: 9;
75
+ }
76
+ .status-bar {
77
+ display: flex;
78
+ gap: 2px;
79
+ height: 6px;
80
+ min-width: 0;
81
+ }
82
+ .status-bar-part {
83
+ min-width: 4px;
84
+ border-radius: 3px;
85
+ background: var(--usm-tone);
86
+ }
87
+ .status-bar-part[data-status=''] {
88
+ background: color-mix(in srgb, var(--dpk-ink-faint) 30%, transparent);
89
+ }
90
+ `,ha=3,va=W`
91
+ /*
92
+ * The card wears its status's color the way a modern board does: a flat,
93
+ * barely tinted face and a hairline edge in that hue, with a neutral, soft
94
+ * elevation. Tints are mixed in OKLab so every hue stays clean instead of
95
+ * turning muddy.
96
+ */
97
+ :host {
98
+ --card-tone: var(--usm-tone, var(--dpk-ink-faint));
99
+ position: relative;
100
+ display: grid;
101
+ gap: 8px;
102
+ padding: 12px 13px;
103
+ border: 1px solid color-mix(in oklab, var(--card-tone) 24%, var(--dpk-rule));
104
+ border-radius: 12px;
105
+ background: color-mix(in oklab, var(--card-tone) 6%, var(--dpk-paper-raised));
106
+ box-shadow:
107
+ 0 1px 1px var(--dpk-shade-1),
108
+ 0 2px 6px -3px var(--dpk-shade-2);
109
+ cursor: pointer;
110
+ transition:
111
+ box-shadow 180ms var(--dpk-ease),
112
+ transform 180ms var(--dpk-ease),
113
+ border-color 180ms var(--dpk-ease);
114
+ }
115
+
116
+ :host(:hover) {
117
+ border-color: color-mix(in oklab, var(--card-tone) 45%, var(--dpk-rule));
118
+ box-shadow:
119
+ 0 1px 2px var(--dpk-shade-1),
120
+ 0 8px 20px -10px var(--dpk-shade-3);
121
+ transform: translateY(-1px);
122
+ }
123
+
124
+ :host([focused]) {
125
+ border-color: var(--dpk-blue);
126
+ box-shadow:
127
+ 0 0 0 3px color-mix(in oklab, var(--dpk-blue) 20%, transparent),
128
+ 0 8px 20px -10px var(--dpk-shade-3);
129
+ }
130
+
131
+ :host([dragging]) {
132
+ opacity: 0.45;
133
+ transform: none;
134
+ }
135
+
136
+ .card-head {
137
+ display: flex;
138
+ align-items: flex-start;
139
+ gap: 8px;
140
+ min-width: 0;
141
+ }
142
+
143
+ .card-status {
144
+ flex: none;
145
+ display: inline-flex;
146
+ margin-top: 1.5px;
147
+ }
148
+
149
+ .card-name {
150
+ flex: 1 1 auto;
151
+ min-width: 0;
152
+ color: var(--dpk-ink);
153
+ font-size: 13px;
154
+ font-weight: 600;
155
+ letter-spacing: -0.01em;
156
+ line-height: 1.45;
157
+ overflow-wrap: anywhere;
158
+ }
159
+
160
+ /* The description, rendered from Markdown and cut after three lines. */
161
+ .card-text {
162
+ display: -webkit-box;
163
+ -webkit-box-orient: vertical;
164
+ -webkit-line-clamp: 3;
165
+ overflow: hidden;
166
+ color: var(--dpk-ink-soft);
167
+ font-size: 12px;
168
+ line-height: 1.55;
169
+ overflow-wrap: anywhere;
170
+ }
171
+
172
+ .card-text > * {
173
+ margin: 0;
174
+ }
175
+
176
+ /* A heading in the description reads as a line of the preview, not a title over the card. */
177
+ .card-text :is(h1, h2, h3, h4, h5, h6) {
178
+ font-size: inherit;
179
+ font-weight: 650;
180
+ }
181
+
182
+ .card-text ul,
183
+ .card-text ol {
184
+ padding-left: 1.2em;
185
+ }
186
+
187
+ .card-text code {
188
+ padding: 0 3px;
189
+ border-radius: 4px;
190
+ background: var(--dpk-paper-inset);
191
+ font-family: var(--dpk-mono);
192
+ font-size: 0.92em;
193
+ }
194
+
195
+ .card-text a {
196
+ color: var(--dpk-blue);
197
+ }
198
+
199
+ /* Where the story sits and what was said about it. */
200
+ .card-foot {
201
+ display: flex;
202
+ align-items: center;
203
+ gap: 6px;
204
+ min-width: 0;
205
+ }
206
+
207
+ .card-chip {
208
+ display: inline-flex;
209
+ align-items: center;
210
+ gap: 4px;
211
+ min-width: 0;
212
+ padding: 1px 7px;
213
+ border-radius: 6px;
214
+ background: color-mix(in oklab, var(--card-tone) 10%, var(--dpk-paper-sunken));
215
+ color: var(--dpk-ink-soft);
216
+ font-size: 10.5px;
217
+ font-weight: 600;
218
+ line-height: 18px;
219
+ }
220
+
221
+ .card-chip span {
222
+ overflow: hidden;
223
+ text-overflow: ellipsis;
224
+ white-space: nowrap;
225
+ }
226
+
227
+ .card-chip[data-kind='comments'] {
228
+ margin-left: auto;
229
+ background: transparent;
230
+ color: var(--dpk-ink-faint);
231
+ font-family: var(--dpk-mono);
232
+ font-variant-numeric: tabular-nums;
233
+ }
234
+
235
+ .card-chip svg {
236
+ flex: none;
237
+ width: 12px;
238
+ height: 12px;
239
+ }
240
+
241
+ .card-links {
242
+ display: flex;
243
+ flex-wrap: wrap;
244
+ gap: 4px;
245
+ min-width: 0;
246
+ }
247
+
248
+ .card-links .link-chip {
249
+ border-color: color-mix(in oklab, var(--card-tone) 16%, var(--dpk-rule));
250
+ background: var(--dpk-paper-raised);
251
+ }
252
+ `;class fa extends xt{static{this.styles=[St,Ke,Be,va]}static{this.properties={story:{attribute:!1},stepName:{attribute:!1},statuses:{attribute:!1},notes:{attribute:!1},focused:{type:Boolean,reflect:!0},dragging:{type:Boolean,reflect:!0}}}#a=new wt(this);constructor(){super(),this.story=null,this.stepName="",this.statuses=[],this.notes=[],this.focused=!1,this.dragging=!1}render(){const t=this.story;if(!t)return m;const a=J(this.#a.locale),s=this.stepName!==""||this.notes.length>0;return l`
253
+ <div class="card-head">
254
+ ${this.statuses.length===0?m:this.#e(a,t)}
255
+ <div class="card-name"><span>${t.name}</span></div>
256
+ </div>
257
+ ${t.description?l`<div class="card-text" @click=${ba}>${Tt($t(t.description))}</div>`:m}
258
+ ${t.links&&t.links.length>0?this.#t(t.links):m}
259
+ ${s?l`<div class="card-foot">
260
+ ${this.stepName===""?m:l`<span class="card-chip" data-kind="step"><span>${this.stepName}</span></span>`}
261
+ ${this.notes.length>0?l`<span
262
+ class="card-chip"
263
+ data-kind="comments"
264
+ aria-label=${a.commentCountAria(this.notes.length)}
265
+ >
266
+ ${Et()}<span>${this.notes.length}</span>
267
+ </span>`:m}
268
+ </div>`:m}
269
+ `}#e(t,a){const s=_e(this.statuses,a);if(!s)return m;const i=s.name;return l`<span class="card-status" role="img" aria-label=${t.storyStatusAria(i)} title=${i}>
270
+ ${j(s)}
271
+ </span>`}#t(t){const a=t.slice(0,ha);return l`<div class="card-links">
272
+ ${a.map(s=>{const i=Q(s.url);return l`<a
273
+ class="link-chip"
274
+ data-kind=${i.kind}
275
+ href=${s.url}
276
+ target="_blank"
277
+ rel="noopener noreferrer"
278
+ title=${s.label??i.title}
279
+ draggable="false"
280
+ @click=${n=>n.stopPropagation()}
281
+ >${Ve(i.kind)}<span>${s.label??i.text}</span></a
282
+ >`})}
283
+ ${t.length>a.length?l`<span class="link-chip">+${t.length-a.length}</span>`:m}
284
+ </div>`}}const ba=e=>{e.target instanceof Element&&e.target.closest("a")&&e.stopPropagation()},ya=()=>{customElements.get("dpk-internal-usm-story-card")||customElements.define("dpk-internal-usm-story-card",fa)},ka=(e,t,a)=>{const s=e.at(-1)??null;if(t===null||a==="end")return s;const i=e.indexOf(t);return i<0?s:a==="after"?t:i===0?null:e.at(i-1)??null},je=(e,t,a,s,i)=>{const n=Z(e,t.stepId,t.milestoneId).map(r=>r.id);return{type:"MOVE_STORY",target:{type:"story",id:a},payload:{activityId:t.activityId,stepId:t.stepId,milestoneId:t.milestoneId??null,after:se(n,a,s,i)}}},qe=(e,t,a,s,i,n)=>{const r=x(e,s);if(!r||r.activityId!==t)return null;const o=Se(e,t,a).map(p=>p.id);return{type:"MOVE_STORY",target:{type:"story",id:s},payload:{activityId:t,stepId:r.stepId,milestoneId:a??null,after:se(o,s,i,n)}}},He=(e,t,a,s,i)=>{const n=Z(e,s,i).filter(r=>r.id!==t);return{type:"MOVE_STORY",target:{type:"story",id:t},payload:{activityId:a,stepId:s,milestoneId:i??null,after:n.at(-1)?.id??null}}},We=(e,t,a,s)=>e.includes(t)?{type:"REORDER_MILESTONE",target:{type:"milestone",id:t},payload:{after:se(e,t,a,s)}}:null,xa=e=>{const t=e.stories.length,a=de(e);return e.milestones.map((s,i)=>{const n=e.stories.filter(o=>o.milestoneId===s.id),r=new Set(n.map(o=>o.stepId));return{id:s.id,ordinal:i+1,name:s.name,timeframe:s.timeframe?.trim()??"",description:s.description?.trim()??"",storyCount:n.length,share:t===0?0:n.length/t,coverage:{covered:a.filter(({step:o})=>r.has(o.id)).length,total:a.length},progress:Me(e,n)}})},Xe=(e,t)=>{const a=F("new-activity",B(t.state));if(!t.dispatch({type:"ADD_ACTIVITY",target:{type:"page",id:"usm"},payload:{id:a,name:e.newActivityName}}).ok)return;const i=F("new-step",[...B(t.state),a]);t.dispatch({type:"ADD_STEP",target:{type:"activity",id:a},payload:{id:i,name:e.newStepName}}),t.navigate({activity:a,step:null,story:null})},Sa=(e,t,a)=>{const s=F("new-step",B(t.state));t.dispatch({type:"ADD_STEP",target:{type:"activity",id:a},payload:{id:s,name:e.newStepName}})},Ze=(e,t)=>{const a=F("new-milestone",B(t.state));t.dispatch({type:"ADD_MILESTONE",target:{type:"page",id:"usm"},payload:{id:a,name:e.newMilestoneName}})},Je=(e,t,a,s,i)=>{const n=F("new-story",B(t.state));t.dispatch({type:"ADD_STORY",target:{type:"step",id:s},payload:{id:n,name:e.newStoryName,activityId:a,...i===void 0?{}:{milestoneId:i}}}).ok&&t.navigate({activity:a,step:s,story:n})},wa=(e,t)=>{const a=F("new-status",B(t.state));t.dispatch({type:"ADD_STATUS",target:{type:"page",id:"usm"},payload:{id:a,name:e.newStatusName,tone:ye(t.state.statuses.length)}})},Qe=(e,t)=>{const a=s=>t.stories.filter(i=>i.milestoneId===s).length;return[...t.milestones.map(({id:s,name:i,timeframe:n})=>({id:s,name:i,timeframe:n?.trim()??"",storyCount:a(s)})),{id:void 0,name:e.unassigned,timeframe:"",storyCount:a(void 0)}]},Ta=(e,t)=>l`
285
+ <div class="empty">
286
+ <h2>${e.emptyTitle}</h2>
287
+ <p>${e.emptyBody}</p>
288
+ <button class="dpk-btn dpk-btn--accent" type="button" @click=${()=>Xe(e,t)}>
289
+ ${e.firstActivityButton}
290
+ </button>
291
+ </div>
292
+ `,$a=e=>{const{m:t,context:a}=e,s=de(a.state);return s.length===0?Ta(t,a):l`${Ea(t,a)}
293
+ ${et(a)==="activity"?Ia(e,s):_a(e)}`},Ea=(e,t)=>{const{state:a}=t;if(a.statuses.length===0)return m;const s=te(a,t.navigation),i=ee(a),n=o=>a.stories.filter(p=>p.statusId===o).length,r=o=>{const p=o.id,d=s.has(p);return l`<a
294
+ class="filter-chip"
295
+ role="checkbox"
296
+ data-status=${p}
297
+ aria-checked=${String(d)}
298
+ style=${Y(o.tone)}
299
+ href=${t.hashFor({status:Oe(a,pa(s,p))})}
300
+ >${j(o)}<span class="filter-name" title=${o.name}>${o.name}</span
301
+ ><span class="filter-count">${n(p)}</span></a
302
+ >`};return l`<div class="map-toolbar" role="group" aria-label=${e.statusFilterLabel} data-testid="usm-status-filter">
303
+ <span class="filter-label">${e.statusFilterLabel}</span>
304
+ ${i.map(r)}
305
+ ${s.size===0?m:l`<a class="filter-clear" href=${t.hashFor({status:null})}>${e.clearFilter}</a>`}
306
+ </div>`},et=e=>e.navigation.view==="group"?"group":"activity",Aa=(e,t)=>{const a=et(t);return l`<div class="segmented view-tabs" role="tablist" aria-label=${e.groupingLabel}>
307
+ ${tt(t,"activity",a,e.activityGroup)}
308
+ ${tt(t,"group",a,e.groupViewTab)}
309
+ </div>`},tt=(e,t,a,s)=>{const i=t===a;return l`<a
310
+ class="tab"
311
+ role="tab"
312
+ data-current=${String(i)}
313
+ aria-selected=${i?"true":"false"}
314
+ href=${e.hashFor({view:t})}
315
+ >${s}</a
316
+ >`},Ia=(e,t)=>{const{m:a,context:s}=e,{state:i}=s,n=Qe(a,i);return l`
317
+ <div class="map-scroll">
318
+ <div class="map" style=${`--cols:${t.length+1}`} data-testid="usm-map">
319
+ <div class="map-head">
320
+ <div class="map-row">
321
+ <div class="corner">
322
+ <span class="dpk-label">${a.groupAxisHeader}</span>
323
+ </div>
324
+ ${A(i.activities,r=>r.id,r=>st(a,s,r.id,`grid-column: span ${Math.max(r.steps.length,1)}`))}
325
+ ${it(a,s)}
326
+ </div>
327
+ <div class="map-row">
328
+ ${at(a)}
329
+ ${A(t,({activity:r,step:o})=>`${r.id}.${o.id}`,({step:r})=>l`
330
+ <div class="col-head" data-current=${String(s.navigation.step===r.id)}>
331
+ <h4>
332
+ <dpk-component-inline-edit
333
+ .value=${r.name}
334
+ .label=${a.stepNameLabel}
335
+ @dpk-commit=${N(o=>s.dispatch({type:"SET_STEP_NAME",target:{type:"step",id:r.id},payload:{name:o}}))}
336
+ @click=${o=>o.stopPropagation()}
337
+ ></dpk-component-inline-edit>
338
+ </h4>
339
+ <span class="count">${we(i,r.id)}</span>
340
+ </div>
341
+ `)}
342
+ <div class="corner"><span class="dpk-label">—</span></div>
343
+ </div>
344
+ </div>
345
+ ${A(n,r=>r.id,r=>rt(e,r,l`${A(t,({activity:o,step:p})=>`${o.id}.${p.id}`,({activity:o,step:p})=>Oa(e,{activityId:o.id,stepId:p.id,milestoneId:r.id}))}`))}
346
+ ${nt(a,s,t.length)}
347
+ </div>
348
+ </div>
349
+ `},_a=e=>{const{m:t,context:a}=e,{state:s}=a,i=Qe(t,s);return l`
350
+ <div class="map-scroll">
351
+ <div class="map" style=${`--cols:${s.activities.length+1}`} data-testid="usm-map-group">
352
+ <div class="map-head">
353
+ <div class="map-row">
354
+ ${at(t)}
355
+ ${A(s.activities,n=>n.id,n=>st(t,a,n.id,void 0,!0))}
356
+ ${it(t,a)}
357
+ </div>
358
+ </div>
359
+ ${A(i,n=>n.id,n=>rt(e,n,l`${A(s.activities,r=>r.id,r=>La(e,r.id,n.id))}`))}
360
+ ${nt(t,a,s.activities.length)}
361
+ </div>
362
+ </div>
363
+ `},at=e=>l`<div class="corner">
364
+ <span class="dpk-label">${e.activityAxis}</span>
365
+ <span class="dpk-label">${e.milestoneAxis}</span>
366
+ </div>`,st=(e,t,a,s,i=!1)=>{const{state:n}=t,r=n.activities.find(d=>d.id===a);if(!r)return l`<div class="act-head"></div>`;const o=n.stories.filter(d=>d.activityId===r.id),p=Me(n,o);return l`
367
+ <div class="act-head" style=${s??""} data-activity=${r.id}>
368
+ <div class="act-title">
369
+ <dpk-component-inline-edit
370
+ .value=${r.name}
371
+ .label=${e.activityNameLabel}
372
+ @dpk-commit=${N(d=>t.dispatch({type:"SET_ACTIVITY_NAME",target:{type:"activity",id:r.id},payload:{name:d}}))}
373
+ ></dpk-component-inline-edit>
374
+ <span class="count">${o.length}</span>
375
+ <button
376
+ class="dpk-icon-btn"
377
+ type="button"
378
+ aria-label=${e.addStepAria}
379
+ @click=${()=>Sa(e,t,r.id)}
380
+ >
381
+ ${At()}
382
+ </button>
383
+ </div>
384
+ <div class="act-meta">
385
+ <span class="act-actor" data-empty=${String(r.actor===void 0)}>
386
+ <dpk-component-inline-edit
387
+ truncate
388
+ .value=${r.actor??""}
389
+ .label=${e.activityActorLabel}
390
+ .placeholder=${e.activityActorLabel}
391
+ @dpk-commit=${N(d=>t.dispatch({type:"SET_ACTIVITY_ACTOR",target:{type:"activity",id:r.id},payload:{actor:d}}))}
392
+ ></dpk-component-inline-edit>
393
+ </span>
394
+ ${Fe(p,e.progressAria(p.map(d=>`${d.name} ${d.count}`).join(", ")))}
395
+ </div>
396
+ ${i&&r.steps.length>0?l`<ol class="act-steps">
397
+ ${r.steps.map(d=>l`<li>${d.name}</li>`)}
398
+ </ol>`:m}
399
+ </div>
400
+ `},it=(e,t)=>l`<div class="act-head">
401
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Xe(e,t)}>
402
+ ${e.newActivityButton}
403
+ </button>
404
+ </div>`,nt=(e,t,a)=>l`<div class="map-row">
405
+ <div class="row-lead">
406
+ <div class="row-head">
407
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ze(e,t)}>
408
+ ${e.newMilestoneButton}
409
+ </button>
410
+ </div>
411
+ </div>
412
+ ${Array.from({length:a+1},()=>l`<div class="cell"></div>`)}
413
+ </div>`,rt=(e,t,a)=>{const{m:s,context:i,drag:n,handlers:r}=e,o=t.id;if(o===void 0)return l`<div
414
+ class="map-row"
415
+ data-unassigned="true"
416
+ data-draggable="false"
417
+ data-row-dragging="false"
418
+ data-row-drop="false"
419
+ >
420
+ <div class="row-lead">
421
+ <div class="row-head" data-milestone="" draggable="false"><span>${t.name}</span></div>
422
+ ${ot(s,t)}
423
+ </div>
424
+ ${a}
425
+ <div class="cell"></div>
426
+ </div>`;const p=Ma(s,i,o,t.name),d=`row:${o}`,u=n.target({key:d,accepts:"milestone",hovered:Ra,onDrop:I=>r.dropOnMilestoneRow(o,I)}),E=n.source({type:"milestone",id:o});return l`
427
+ <div
428
+ class="map-row"
429
+ data-draggable="true"
430
+ data-row-dragging=${String(n.isDragging("milestone",o))}
431
+ data-row-drop=${String(n.isOver(d))}
432
+ @dragenter=${u.dragenter}
433
+ @dragover=${u.dragover}
434
+ @dragleave=${u.dragleave}
435
+ @drop=${u.drop}
436
+ >
437
+ <div class="row-lead">
438
+ <div
439
+ class="row-head"
440
+ data-milestone=${o}
441
+ draggable="true"
442
+ @dragstart=${I=>{Da(I),E.dragstart(I)}}
443
+ @dragend=${E.dragend}
444
+ >
445
+ <span class="row-grip" aria-hidden="true">${It()}</span>${p}
446
+ </div>
447
+ ${ot(s,t)}
448
+ </div>
449
+ ${a}
450
+ <div class="cell"></div>
451
+ </div>
452
+ `},ot=(e,t)=>l`<div class="row-meta">
453
+ ${t.timeframe===""?m:l`<span class="row-timeframe">${t.timeframe}</span>`}
454
+ <span class="row-count">${e.storyCount(t.storyCount)}</span>
455
+ </div>`,Ma=(e,t,a,s)=>l`<dpk-component-inline-edit
456
+ draggable="false"
457
+ .value=${s}
458
+ .label=${e.milestoneNameLabel}
459
+ @dpk-commit=${N(i=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:a},payload:{name:i}}))}
460
+ ></dpk-component-inline-edit>`,Oa=(e,t)=>{const{m:a,context:s,drag:i,handlers:n}=e,r=te(s.state,s.navigation),o=Z(s.state,t.stepId,t.milestoneId).filter(u=>Le(r,u)),p=`cell:${t.stepId}:${t.milestoneId??""}`,d=i.target({key:p,accepts:"story",hovered:lt,onDrop:u=>n.dropOnCell(t,u)});return l`
461
+ <div
462
+ class="cell"
463
+ data-step=${t.stepId}
464
+ data-milestone=${t.milestoneId??""}
465
+ data-drop=${String(i.isOver(p))}
466
+ @dragenter=${d.dragenter}
467
+ @dragover=${d.dragover}
468
+ @dragleave=${d.dragleave}
469
+ @drop=${d.drop}
470
+ >
471
+ <div class="card-list" data-testid=${`cell-${t.stepId}-${t.milestoneId??"unassigned"}`}>
472
+ ${A(o,u=>u.id,u=>dt(e,u,""))}
473
+ </div>
474
+ <button
475
+ class="dpk-btn dpk-btn--ghost add-cell"
476
+ type="button"
477
+ title=${a.addStoryCellAria}
478
+ @click=${()=>Je(a,s,t.activityId,t.stepId,t.milestoneId)}
479
+ >
480
+ ${a.addCellButton}
481
+ </button>
482
+ </div>
483
+ `},La=(e,t,a)=>{const{m:s,context:i,drag:n,handlers:r}=e,{state:o}=i,p=te(o,i.navigation),d=Se(o,t,a).filter(w=>Le(p,w)),u=o.activities.find(w=>w.id===t)?.steps??[],E=u[0],I=w=>u.find(ut=>ut.id===w)?.name??"",k=`group:${t}:${a??""}`,_=n.target({key:k,accepts:"story",hovered:lt,onDrop:w=>r.dropOnGroupCell(t,a,w)});return l`
484
+ <div
485
+ class="cell"
486
+ data-activity=${t}
487
+ data-milestone=${a??""}
488
+ data-drop=${String(n.isOver(k))}
489
+ @dragenter=${_.dragenter}
490
+ @dragover=${_.dragover}
491
+ @dragleave=${_.dragleave}
492
+ @drop=${_.drop}
493
+ >
494
+ <div class="card-list" data-testid=${`group-cell-${t}-${a??"unassigned"}`}>
495
+ ${A(d,w=>w.id,w=>dt(e,w,I(w.stepId)))}
496
+ </div>
497
+ ${E?l`<button
498
+ class="dpk-btn dpk-btn--ghost add-cell"
499
+ type="button"
500
+ aria-label=${s.addStoryCellAria}
501
+ @click=${()=>Je(s,i,t,E.id,a)}
502
+ >
503
+ ${s.addCellButton}
504
+ </button>`:m}
505
+ </div>
506
+ `},dt=(e,t,a)=>{const{context:s,drag:i,handlers:n}=e,r=ee(s.state),o=s.comments.filter(d=>d.target.type==="story"&&d.target.id===t.id),p=i.source({type:"story",id:t.id});return l`<dpk-internal-usm-story-card
507
+ data-story=${t.id}
508
+ data-status=${t.statusId??""}
509
+ draggable="true"
510
+ style=${Y(_e(r,t)?.tone)}
511
+ .story=${t}
512
+ .stepName=${a}
513
+ .statuses=${r}
514
+ .notes=${o}
515
+ @click=${()=>n.selectStory(t.id)}
516
+ ?focused=${s.navigation.story===t.id}
517
+ ?dragging=${i.isDragging("story",t.id)}
518
+ @dragstart=${p.dragstart}
519
+ @dragend=${p.dragend}
520
+ ></dpk-internal-usm-story-card>`},lt=e=>{const t=e.target instanceof Element?e.target.closest("dpk-internal-usm-story-card"):null;return t?{id:t.getAttribute("data-story"),element:t}:null},Da=e=>{const a=(e.currentTarget instanceof Element?e.currentTarget:null)?.closest(".map-row");if(!a||!e.dataTransfer)return;const s=a.getBoundingClientRect();e.dataTransfer.setDragImage(a,e.clientX-s.left,e.clientY-s.top)},Ra=e=>{const t=e.target instanceof Element?e.target.closest(".map-row"):null,a=t?.querySelector(".row-head[data-milestone]");if(!t||!a)return null;const s=a.getAttribute("data-milestone");return{id:s===""?null:s,element:t}},Na=(e,t,a)=>l`
521
+ <section class="ms-overview" data-testid="usm-milestones">
522
+ ${a.length===0?l`<div class="empty">
523
+ <h2>${e.noMilestonesTitle}</h2>
524
+ <p>${e.noMilestonesBody}</p>
525
+ </div>`:m}
526
+ <ol class="ms-timeline">
527
+ ${A(a,s=>s.id,s=>Ca(e,t,s))}
528
+ <li class="ms-add">
529
+ <span class="ms-when" aria-hidden="true"></span>
530
+ <span class="ms-rail" aria-hidden="true"><span class="ms-node ms-node--add"></span></span>
531
+ <div class="ms-body">
532
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ze(e,t)}>
533
+ ${e.newMilestoneButton}
534
+ </button>
535
+ </div>
536
+ </li>
537
+ </ol>
538
+ </section>
539
+ `,Ca=(e,t,a)=>{const s=a.id;return l`
540
+ <li class="ms-entry" data-milestone-card=${s}>
541
+ <div class="ms-when">
542
+ ${a.timeframe===""?l`<span class="ms-timeframe" data-empty="true">${e.timeframeUnset}</span>`:l`<span class="ms-timeframe">${a.timeframe}</span>`}
543
+ </div>
544
+ <span class="ms-rail" aria-hidden="true"><span class="ms-node">${a.ordinal}</span></span>
545
+ <article class="ms-body">
546
+ <h3 class="ms-name">
547
+ <dpk-component-inline-edit
548
+ .value=${a.name}
549
+ .label=${e.milestoneNameLabel}
550
+ @dpk-commit=${N(i=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:s},payload:{name:i}}))}
551
+ ></dpk-component-inline-edit>
552
+ </h3>
553
+ ${a.description===""?l`<p class="ms-description" data-empty="true">${e.milestoneNoDescription}</p>`:l`<p class="ms-description">${a.description}</p>`}
554
+ <dl class="ms-facts">
555
+ <div>
556
+ <dt>${e.storiesLabel}</dt>
557
+ <dd>
558
+ <strong>${a.storyCount}</strong>
559
+ <span>${e.shareOfStories(Math.round(a.share*100))}</span>
560
+ </dd>
561
+ </div>
562
+ <div>
563
+ <dt>${e.coverageLabel}</dt>
564
+ <dd>
565
+ <strong>${e.coverage(a.coverage.covered,a.coverage.total)}</strong>
566
+ <span class="ms-meter" aria-hidden="true">
567
+ <span
568
+ style=${`width:${a.coverage.total===0?0:a.coverage.covered/a.coverage.total*100}%`}
569
+ ></span>
570
+ </span>
571
+ </dd>
572
+ </div>
573
+ </dl>
574
+ ${a.progress.length===0?m:Ya(e,a)}
575
+ </article>
576
+ </li>
577
+ `},Ya=(e,t)=>l`
578
+ <div class="ms-breakdown">
579
+ ${Fe(t.progress,e.progressAria(t.progress.map(a=>`${a.name} ${a.count}`).join(", ")))}
580
+ <ul class="ms-legend" aria-hidden="true">
581
+ ${t.progress.map(a=>l`<li data-status=${a.id} style=${Y(a.tone)}>
582
+ ${j(a)}
583
+ <span class="ms-breakdown-name">${a.name}</span>
584
+ <span class="ms-breakdown-count">${a.count}</span>
585
+ </li>`)}
586
+ </ul>
587
+ </div>
588
+ `,Ua=(e,t,a,s)=>{if(a.kind!=="picking-step")return m;const i=x(t.state,a.storyId),n=L(t.state,a.activityId);if(!i||!n)return m;const r=n.steps[0]?.id;return l`<div class="comment-pop move-dialog" id="move-dialog" popover="manual">
589
+ <span class="dpk-label">${e.moveDialogLabel}</span>
590
+ <select class="dpk-select" aria-label=${e.moveDialogSelectLabel} data-move-dialog>
591
+ ${n.steps.map(o=>l`<option value=${o.id} ?selected=${o.id===r}>${o.name}</option>`)}
592
+ </select>
593
+ <div class="pop-actions">
594
+ <button
595
+ class="dpk-btn dpk-btn--accent"
596
+ type="button"
597
+ @click=${o=>{const d=(_t(o.currentTarget,HTMLElement)?.closest("#move-dialog")??null)?.querySelector("select")?.value??r;d?s.confirm(d):s.cancel()}}
598
+ >
599
+ ${e.moveConfirm}
600
+ </button>
601
+ <button class="dpk-btn" type="button" @click=${s.cancel}>${e.moveCancel}</button>
602
+ </div>
603
+ </div>`},za=(e,t,a)=>{const{state:s}=t;return l`
604
+ <div class="board-bar">
605
+ <div class="page-tabs" role="tablist" aria-label=${e.pageTabsLabel}>
606
+ ${me(t,"map",a,e.mapTab,s.stories.length)}
607
+ ${me(t,"milestones",a,e.milestonesTab,s.milestones.length)}
608
+ ${me(t,"statuses",a,e.statusesTab,s.statuses.length)}
609
+ </div>
610
+ ${a==="map"&&s.activities.some(i=>i.steps.length>0)?Aa(e,t):m}
611
+ </div>
612
+ `},me=(e,t,a,s,i)=>l`<a
613
+ role="tab"
614
+ data-tab=${t}
615
+ aria-selected=${t===a?"true":"false"}
616
+ href=${e.hashFor({tab:t==="map"?null:t})}
617
+ >${s}<span class="page-tab-count">${i}</span></a
618
+ >`,Pa=(e,t,a,s)=>l`
619
+ <section class="st-overview" data-testid="usm-statuses">
620
+ ${a.rows.length===0?l`<div class="empty">
621
+ <h2>${e.noStatusesTitle}</h2>
622
+ <p>${e.noStatusesBody}</p>
623
+ </div>`:m}
624
+ <ol class="st-list">
625
+ ${A(a.rows,i=>i.id,i=>Va(e,t,i,s))}
626
+ </ol>
627
+ <div>
628
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>wa(e,t)}>
629
+ ${e.newStatusButton}
630
+ </button>
631
+ </div>
632
+ </section>
633
+ `,Va=(e,t,a,s)=>{const i=s.openFor===a.id,n={type:"status",id:a.id},r=o=>{t.dispatch({type:"REORDER_STATUS",target:n,payload:{after:o}})};return l`
634
+ <li class="st-row" data-status=${a.id} style=${Y(a.tone)}>
635
+ <button
636
+ class="st-icon-trigger"
637
+ type="button"
638
+ data-icon-trigger=${a.id}
639
+ aria-haspopup="menu"
640
+ aria-expanded=${String(i)}
641
+ aria-label=${`${e.statusIconLabel}: ${e.iconName(a.icon)}`}
642
+ title=${e.iconName(a.icon)}
643
+ @click=${()=>s.toggle(a.id)}
644
+ >
645
+ ${j(a)}
646
+ </button>
647
+ ${i?Ba(e,t,a,s):m}
648
+ <span class="st-name">
649
+ <dpk-component-inline-edit
650
+ .value=${a.name}
651
+ .label=${e.statusNameLabel}
652
+ @dpk-commit=${N(o=>t.dispatch({type:"SET_STATUS_NAME",target:n,payload:{name:o}}))}
653
+ ></dpk-component-inline-edit>
654
+ </span>
655
+ ${Fa(e,a.storyCount,a.share)}
656
+ <span class="st-tones" role="radiogroup" aria-label=${e.statusToneLabel}>
657
+ ${X.map(o=>l`<button
658
+ class="st-tone"
659
+ type="button"
660
+ role="radio"
661
+ data-tone=${o}
662
+ style=${Y(o)}
663
+ title=${e.toneName(o)}
664
+ aria-label=${e.toneName(o)}
665
+ aria-checked=${o===a.tone?"true":"false"}
666
+ @click=${()=>{o!==a.tone&&t.dispatch({type:"SET_STATUS_TONE",target:n,payload:{tone:o}})}}
667
+ ></button>`)}
668
+ </span>
669
+ <span class="st-tools">
670
+ <button
671
+ class="dpk-icon-btn"
672
+ type="button"
673
+ aria-label=${e.moveUpAria}
674
+ ?disabled=${a.previousId===null}
675
+ @click=${()=>r(Ga(t.state,a))}
676
+ >
677
+ ↑
678
+ </button>
679
+ <button
680
+ class="dpk-icon-btn"
681
+ type="button"
682
+ aria-label=${e.moveDownAria}
683
+ ?disabled=${a.nextId===null}
684
+ @click=${()=>r(a.nextId)}
685
+ >
686
+ ↓
687
+ </button>
688
+ <button
689
+ class="dpk-icon-btn"
690
+ type="button"
691
+ data-role="delete"
692
+ aria-label=${e.deleteStatusAria}
693
+ @click=${()=>t.dispatch({type:"DELETE_STATUS",target:n,payload:{}})}
694
+ >
695
+ ${he()}
696
+ </button>
697
+ </span>
698
+ </li>
699
+ `},Ba=(e,t,a,s)=>l`<div
700
+ id="icon-menu"
701
+ class="comment-pop icon-menu"
702
+ popover="manual"
703
+ role="menu"
704
+ aria-label=${e.statusIconLabel}
705
+ style=${Y(a.tone)}
706
+ @keydown=${i=>{i.key==="Escape"&&(i.preventDefault(),s.close())}}
707
+ >
708
+ ${be.map(i=>l`<button
709
+ class="icon-option"
710
+ type="button"
711
+ role="menuitemradio"
712
+ data-icon=${i}
713
+ title=${e.iconName(i)}
714
+ aria-label=${e.iconName(i)}
715
+ aria-checked=${String(i===a.icon)}
716
+ @click=${()=>{i!==a.icon&&t.dispatch({type:"SET_STATUS_ICON",target:{type:"status",id:a.id},payload:{icon:i}}),s.close()}}
717
+ >
718
+ ${j({icon:i,progress:a.progress})}
719
+ </button>`)}
720
+ </div>`,Ga=(e,t)=>{const a=e.statuses.findIndex(s=>s.id===t.previousId);return a<=0?null:e.statuses[a-1]?.id??null},Fa=(e,t,a)=>l`
721
+ <span class="st-share">
722
+ <span class="st-share-text">${e.statusShare(t,Math.round(a*100))}</span>
723
+ <span class="st-meter" aria-hidden="true"><span style=${`width:${a*100}%`}></span></span>
724
+ </span>
725
+ `,Ka=e=>x(e.state,e.navigation.story),ja=(e,t,a)=>{const{state:s}=t,i={type:"story",id:a.id},n=()=>t.navigate({story:null}),r=S(s,`${a.activityId}.${a.stepId}`),o=O(s,a.milestoneId);return l`<aside
726
+ class="story-panel"
727
+ role="dialog"
728
+ aria-label=${e.panelLabel(a.name)}
729
+ data-testid="usm-story-panel"
730
+ data-story=${a.id}
731
+ @keydown=${p=>{p.key!=="Escape"||p.isComposing||p.defaultPrevented||(p.preventDefault(),n())}}
732
+ >
733
+ <header class="sp-head">
734
+ <span class="sp-where">
735
+ ${r?l`<span>${r.activity.name}</span><span>${r.step.name}</span>`:m}
736
+ <span>${o?.name??e.unassigned}</span>
737
+ </span>
738
+ <button class="dpk-icon-btn" type="button" data-role="close" aria-label=${e.closePanelAria} @click=${n}>
739
+ ${ve()}
740
+ </button>
741
+ </header>
742
+ <div class="sp-body">
743
+ <h2 class="sp-title">
744
+ <dpk-component-inline-edit
745
+ wrap
746
+ .value=${a.name}
747
+ .label=${e.storyTitleLabel}
748
+ @dpk-commit=${N(p=>t.dispatch({type:"SET_STORY_NAME",target:i,payload:{name:p}}))}
749
+ ></dpk-component-inline-edit>
750
+ </h2>
751
+ ${s.statuses.length===0?m:qa(e,t,a)}
752
+ <section class="sp-field">
753
+ <h3>${e.storyDescriptionLabel}</h3>
754
+ <dpk-component-inline-edit
755
+ multiline
756
+ markdown
757
+ class="sp-description"
758
+ .value=${a.description??""}
759
+ .label=${e.storyDescriptionLabel}
760
+ @dpk-commit=${N(p=>t.dispatch({type:"SET_STORY_DESCRIPTION",target:i,payload:{description:p}}))}
761
+ ></dpk-component-inline-edit>
762
+ </section>
763
+ ${Ha(e,t,a)} ${Wa(e,t,a)}
764
+ </div>
765
+ <footer class="sp-foot">
766
+ <button
767
+ class="dpk-btn dpk-btn--ghost sp-delete"
768
+ type="button"
769
+ @click=${()=>{t.dispatch({type:"DELETE_STORY",target:i,payload:{}}).ok&&n()}}
770
+ >
771
+ ${he()}<span>${e.deleteStoryButton}</span>
772
+ </button>
773
+ </footer>
774
+ </aside>`},qa=(e,t,a)=>{const s=ee(t.state),i=a.statusId;return l`<section class="sp-field">
775
+ <h3 id="sp-status-label">${e.storyStatusLabel}</h3>
776
+ <div class="sp-statuses" role="radiogroup" aria-labelledby="sp-status-label">
777
+ ${s.map(n=>l`<button
778
+ class="sp-status"
779
+ type="button"
780
+ role="radio"
781
+ data-status=${n.id}
782
+ aria-checked=${String(n.id===i)}
783
+ style=${Y(n.tone)}
784
+ @click=${()=>{n.id!==i&&t.dispatch({type:"SET_STORY_STATUS",target:{type:"story",id:a.id},payload:{statusId:n.id}})}}
785
+ >
786
+ ${j(n)}<span>${n.name}</span>
787
+ </button>`)}
788
+ </div>
789
+ </section>`},Ha=(e,t,a)=>{const s={type:"story",id:a.id},i=a.links??[],n=r=>{r.preventDefault();const o=r.currentTarget instanceof HTMLFormElement?r.currentTarget:null,p=o?.querySelector("input");if(!o||!p)return;const d=p.value.trim();if(!Ot(re,d).success){p.setAttribute("aria-invalid","true");return}t.dispatch({type:"ADD_STORY_LINK",target:s,payload:{url:d}}).ok&&(p.removeAttribute("aria-invalid"),o.reset())};return l`<section class="sp-field">
790
+ <h3>${e.storyLinksLabel}</h3>
791
+ ${i.length===0?m:l`<ul class="sp-links">
792
+ ${i.map(r=>{const o=Q(r.url),p=r.label??o.text;return l`<li data-kind=${o.kind}>
793
+ <a class="sp-link" href=${r.url} target="_blank" rel="noopener noreferrer" title=${r.url}>
794
+ ${Ve(o.kind)}
795
+ <span class="sp-link-text">${p}</span>
796
+ <span class="sp-link-url">${o.title===p?r.url:o.title}</span>
797
+ </a>
798
+ <button
799
+ class="dpk-icon-btn"
800
+ type="button"
801
+ aria-label=${e.removeLinkAria(p)}
802
+ @click=${()=>t.dispatch({type:"REMOVE_STORY_LINK",target:s,payload:{url:r.url}})}
803
+ >
804
+ ${ve()}
805
+ </button>
806
+ </li>`})}
807
+ </ul>`}
808
+ <form class="sp-add-link" @submit=${n}>
809
+ <input
810
+ class="dpk-input"
811
+ type="url"
812
+ inputmode="url"
813
+ placeholder="https://"
814
+ aria-label=${e.linkUrlLabel}
815
+ @input=${r=>{r.currentTarget instanceof HTMLInputElement&&r.currentTarget.removeAttribute("aria-invalid")}}
816
+ />
817
+ <button class="dpk-btn" type="submit">${e.addLinkButton}</button>
818
+ </form>
819
+ </section>`},Wa=(e,t,a)=>{const s=t.comments.filter(n=>n.target.type==="story"&&n.target.id===a.id),i=n=>{const r=n.querySelector("textarea"),o=r?.value.trim()??"";if(!r||o==="")return;t.dispatch({type:"comment",target:`story:${a.id}`,payload:{body:o}}).ok&&(r.value="")};return l`<section class="sp-field sp-comments">
820
+ <h3>${e.storyCommentsLabel}${s.length>0?l`<span class="sp-count">${s.length}</span>`:m}</h3>
821
+ ${s.length===0?m:l`<ol class="sp-comment-list">
822
+ ${s.map(n=>l`<li>${Mt(n)}</li>`)}
823
+ </ol>`}
824
+ <form
825
+ class="sp-comment-form"
826
+ @submit=${n=>{n.preventDefault(),n.currentTarget instanceof HTMLFormElement&&i(n.currentTarget)}}
827
+ >
828
+ <textarea
829
+ class="dpk-textarea"
830
+ rows="3"
831
+ aria-label=${e.storyCommentsLabel}
832
+ data-dpk-text-key=${`story:${a.id}`}
833
+ @keydown=${n=>{if(n.isComposing||n.key!=="Enter"||!(n.ctrlKey||n.metaKey))return;n.preventDefault();const r=n.currentTarget instanceof HTMLElement?n.currentTarget.closest("form"):null;r&&i(r)}}
834
+ ></textarea>
835
+ <div class="sp-comment-actions">
836
+ <button class="dpk-btn dpk-btn--accent" type="submit">${e.commentSubmit}</button>
837
+ </div>
838
+ </form>
839
+ </section>`},Xa=W`
840
+ /* Over the main column's edge, below the header: the page's own controls stay in reach. */
841
+ .story-panel {
842
+ position: absolute;
843
+ top: 0;
844
+ right: 0;
845
+ bottom: 0;
846
+ z-index: 20;
847
+ display: grid;
848
+ grid-template-rows: auto minmax(0, 1fr) auto;
849
+ width: min(420px, 100%);
850
+ border-left: 1px solid var(--dpk-rule-strong);
851
+ background: var(--dpk-paper-raised);
852
+ box-shadow: var(--dpk-shadow-lg);
853
+ animation: sp-slide-in 220ms var(--dpk-ease);
854
+ }
855
+ @keyframes sp-slide-in {
856
+ from {
857
+ opacity: 0;
858
+ transform: translateX(24px);
859
+ }
860
+ }
861
+ .sp-head {
862
+ display: flex;
863
+ align-items: center;
864
+ gap: 10px;
865
+ padding: 14px 22px 12px;
866
+ min-height: 60px;
867
+ box-sizing: border-box;
868
+ border-bottom: 1px solid var(--dpk-rule);
869
+ }
870
+ .sp-where {
871
+ display: flex;
872
+ flex-wrap: wrap;
873
+ gap: 2px 0;
874
+ flex: 1 1 auto;
875
+ min-width: 0;
876
+ color: var(--dpk-ink-faint);
877
+ font-size: 11.5px;
878
+ font-weight: 600;
879
+ }
880
+ .sp-where > span + span::before {
881
+ content: '›';
882
+ margin: 0 6px;
883
+ color: var(--dpk-rule-strong);
884
+ }
885
+ .sp-body {
886
+ display: grid;
887
+ align-content: start;
888
+ gap: 22px;
889
+ overflow: auto;
890
+ padding: 18px 22px 24px;
891
+ }
892
+ .sp-title {
893
+ margin: 0;
894
+ font-size: 19px;
895
+ font-weight: 700;
896
+ letter-spacing: -0.015em;
897
+ line-height: 1.35;
898
+ }
899
+ .sp-title dpk-component-inline-edit {
900
+ display: block;
901
+ margin: 0 -4px;
902
+ }
903
+ .sp-field {
904
+ display: grid;
905
+ gap: 8px;
906
+ }
907
+ .sp-field h3 {
908
+ margin: 0;
909
+ color: var(--dpk-ink-faint);
910
+ font-size: 11px;
911
+ font-weight: 650;
912
+ letter-spacing: 0.04em;
913
+ text-transform: uppercase;
914
+ }
915
+ .sp-statuses {
916
+ display: flex;
917
+ flex-wrap: wrap;
918
+ gap: 6px;
919
+ }
920
+ .sp-status {
921
+ display: inline-flex;
922
+ align-items: center;
923
+ gap: 7px;
924
+ padding: 5px 12px 5px 9px;
925
+ border: 1px solid var(--dpk-rule-strong);
926
+ border-radius: 999px;
927
+ background: var(--dpk-paper-raised);
928
+ color: var(--dpk-ink);
929
+ font: inherit;
930
+ font-size: 12.5px;
931
+ font-weight: 600;
932
+ cursor: pointer;
933
+ transition:
934
+ background 140ms var(--dpk-ease),
935
+ border-color 140ms var(--dpk-ease);
936
+ }
937
+ .sp-status:hover {
938
+ border-color: color-mix(in oklab, var(--usm-tone) 60%, var(--dpk-rule-strong));
939
+ }
940
+ .sp-status:focus-visible {
941
+ outline: none;
942
+ box-shadow: var(--dpk-focus);
943
+ }
944
+ .sp-status[aria-checked='true'] {
945
+ border-color: var(--usm-tone);
946
+ background: color-mix(in oklab, var(--usm-tone) 14%, var(--dpk-paper-raised));
947
+ box-shadow: inset 0 0 0 1px var(--usm-tone);
948
+ }
949
+ .sp-description {
950
+ display: block;
951
+ margin: 0 -4px;
952
+ color: var(--dpk-ink-soft);
953
+ font-size: 13px;
954
+ line-height: 1.65;
955
+ }
956
+ .sp-links {
957
+ display: grid;
958
+ gap: 4px;
959
+ margin: 0;
960
+ padding: 0;
961
+ list-style: none;
962
+ }
963
+ .sp-links li {
964
+ display: flex;
965
+ align-items: center;
966
+ gap: 4px;
967
+ border: 1px solid var(--dpk-rule);
968
+ border-radius: var(--dpk-radius-sm);
969
+ background: var(--dpk-paper-sunken);
970
+ }
971
+ .sp-link {
972
+ display: grid;
973
+ grid-template-columns: 16px minmax(0, 1fr);
974
+ column-gap: 9px;
975
+ align-items: center;
976
+ flex: 1 1 auto;
977
+ min-width: 0;
978
+ padding: 7px 4px 7px 10px;
979
+ color: var(--dpk-ink);
980
+ text-decoration: none;
981
+ }
982
+ .sp-link:hover .sp-link-text {
983
+ text-decoration: underline;
984
+ }
985
+ .sp-link svg {
986
+ grid-row: span 2;
987
+ width: 16px;
988
+ height: 16px;
989
+ color: var(--dpk-ink-soft);
990
+ }
991
+ .sp-link-text {
992
+ overflow: hidden;
993
+ font-family: var(--dpk-mono);
994
+ font-size: 12.5px;
995
+ font-weight: 650;
996
+ text-overflow: ellipsis;
997
+ white-space: nowrap;
998
+ }
999
+ .sp-link-url {
1000
+ overflow: hidden;
1001
+ color: var(--dpk-ink-faint);
1002
+ font-size: 11px;
1003
+ text-overflow: ellipsis;
1004
+ white-space: nowrap;
1005
+ }
1006
+ .sp-add-link {
1007
+ display: flex;
1008
+ gap: 6px;
1009
+ }
1010
+ .sp-add-link input {
1011
+ flex: 1 1 auto;
1012
+ min-width: 0;
1013
+ }
1014
+ .sp-add-link input[aria-invalid='true'] {
1015
+ border-color: var(--dpk-accent);
1016
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--dpk-accent) 22%, transparent);
1017
+ }
1018
+ /* The handoff dock floats at the bottom right, so the footer keeps left. */
1019
+ .sp-field h3 .sp-count {
1020
+ margin-left: 6px;
1021
+ font-family: var(--dpk-mono);
1022
+ letter-spacing: 0;
1023
+ }
1024
+ .sp-comment-list {
1025
+ display: grid;
1026
+ gap: 6px;
1027
+ margin: 0;
1028
+ padding: 0;
1029
+ list-style: none;
1030
+ }
1031
+ .sp-comment-list li {
1032
+ padding: 8px 11px;
1033
+ border-radius: var(--dpk-radius-sm);
1034
+ background: var(--dpk-paper-sunken);
1035
+ color: var(--dpk-ink);
1036
+ font-size: 12.5px;
1037
+ line-height: 1.6;
1038
+ white-space: pre-wrap;
1039
+ overflow-wrap: anywhere;
1040
+ }
1041
+ .sp-comment-form {
1042
+ display: grid;
1043
+ gap: 6px;
1044
+ }
1045
+ .sp-comment-form textarea {
1046
+ resize: vertical;
1047
+ min-height: 64px;
1048
+ }
1049
+ .sp-comment-actions {
1050
+ display: flex;
1051
+ justify-content: flex-end;
1052
+ }
1053
+ .sp-foot {
1054
+ display: flex;
1055
+ justify-content: flex-start;
1056
+ padding: 12px 22px;
1057
+ border-top: 1px solid var(--dpk-rule);
1058
+ }
1059
+ .sp-delete {
1060
+ display: inline-flex;
1061
+ align-items: center;
1062
+ gap: 6px;
1063
+ color: var(--dpk-ink-soft);
1064
+ }
1065
+ .sp-delete svg {
1066
+ width: 14px;
1067
+ height: 14px;
1068
+ }
1069
+ `,Za=e=>{const t=e.stories.length,a=n=>t===0?0:n/t,s=n=>e.stories.filter(r=>r.statusId===n).length;return{rows:e.statuses.map((n,r)=>{const o=s(n.id);return{id:n.id,name:n.name,tone:n.tone,icon:n.icon,progress:e.statuses.length<=1?1:r/(e.statuses.length-1),previousId:e.statuses[r-1]?.id??null,nextId:e.statuses[r+1]?.id??null,storyCount:o,share:a(o)}})}},Ja=W`
1070
+ :host {
1071
+ --dpk-usm-accent: var(--dpk-blue);
1072
+ }
1073
+ /*
1074
+ * A wide table must scroll inside itself and never widen the template shell.
1075
+ * It scrolls both ways so the backbone can stick to its top and the
1076
+ * milestone column to its left: a box that scrolls only sideways still
1077
+ * becomes the sticky ancestor, and its top would never move. Capped near the
1078
+ * viewport height, it fits under the tab bar once the page brings it up.
1079
+ */
1080
+ .map-scroll {
1081
+ min-width: 0;
1082
+ max-width: 100%;
1083
+ max-height: max(320px, calc(100dvh - 170px));
1084
+ overflow: auto;
1085
+ overscroll-behavior-x: contain;
1086
+ border: 1px solid var(--dpk-rule);
1087
+ border-radius: var(--dpk-radius-lg);
1088
+ background: var(--dpk-paper-sunken);
1089
+ box-shadow: var(--dpk-shadow);
1090
+ }
1091
+ .map {
1092
+ display: grid;
1093
+ gap: 0;
1094
+ min-width: max-content;
1095
+ /* The map scrolls on its own: its last row clears the hand-off dock at the end of that scroll. */
1096
+ padding-bottom: var(--dpk-dock-clearance, 0px);
1097
+ }
1098
+ .map-row {
1099
+ display: grid;
1100
+ grid-template-columns: 140px repeat(var(--cols), minmax(180px, 240px));
1101
+ }
1102
+ .map-row + .map-row {
1103
+ border-top: 1px solid var(--dpk-rule);
1104
+ }
1105
+
1106
+ /* The backbone (activities and steps) stays at the top while the rows scroll. */
1107
+ .map-head {
1108
+ position: sticky;
1109
+ top: 0;
1110
+ z-index: 3;
1111
+ border-bottom: 1px solid var(--dpk-rule-strong);
1112
+ box-shadow: 0 8px 14px -12px var(--dpk-shade-3);
1113
+ }
1114
+
1115
+ /* The leading column (axis corners and milestone labels) stays at the left
1116
+ while the steps scroll sideways; it is opaque so cards pass under it. */
1117
+ .corner:first-child,
1118
+ .row-lead {
1119
+ position: sticky;
1120
+ left: 0;
1121
+ z-index: 2;
1122
+ box-shadow: 1px 0 0 var(--dpk-rule);
1123
+ }
1124
+ .row-lead {
1125
+ display: flex;
1126
+ flex-direction: column;
1127
+ align-items: flex-start;
1128
+ justify-content: center;
1129
+ gap: 2px;
1130
+ min-width: 0;
1131
+ padding: 8px 6px 8px 4px;
1132
+ background: var(--dpk-paper-sunken);
1133
+ }
1134
+ /* Row names and their meta line share one column: past the grip (15px), its
1135
+ gap (6px) and the inline edit's own padding (4px). */
1136
+ .row-lead {
1137
+ --usm-row-indent: 25px;
1138
+ }
1139
+ .row-meta {
1140
+ display: flex;
1141
+ flex-wrap: wrap;
1142
+ gap: 2px 8px;
1143
+ padding-left: var(--usm-row-indent);
1144
+ font-size: 10.5px;
1145
+ color: var(--dpk-ink-faint);
1146
+ }
1147
+ .row-timeframe {
1148
+ color: var(--dpk-ink-soft);
1149
+ font-weight: 600;
1150
+ }
1151
+ .row-count {
1152
+ font-family: var(--dpk-mono);
1153
+ font-variant-numeric: tabular-nums;
1154
+ }
1155
+ .corner,
1156
+ .act-head,
1157
+ .col-head,
1158
+ .row-head,
1159
+ .cell {
1160
+ padding: 10px;
1161
+ }
1162
+ .corner {
1163
+ background: var(--dpk-paper-sunken);
1164
+ display: grid;
1165
+ gap: 3px;
1166
+ align-content: start;
1167
+ }
1168
+
1169
+ /* Above the content: the page tabs (map / milestones) and, on the map, the
1170
+ unit toggle (group band vs one column per activity). */
1171
+ /* The grid's status filter: one toggle per status, which also reads as the
1172
+ legend of the card colors. */
1173
+ .map-toolbar {
1174
+ display: flex;
1175
+ flex-wrap: wrap;
1176
+ align-items: center;
1177
+ gap: 6px;
1178
+ margin: 16px 0 12px;
1179
+ }
1180
+ .filter-label {
1181
+ margin-right: 4px;
1182
+ color: var(--dpk-ink-faint);
1183
+ font-size: 11px;
1184
+ font-weight: 650;
1185
+ letter-spacing: 0.04em;
1186
+ text-transform: uppercase;
1187
+ }
1188
+ .filter-chip {
1189
+ display: inline-flex;
1190
+ align-items: center;
1191
+ gap: 6px;
1192
+ min-width: 0;
1193
+ max-width: 100%;
1194
+ padding: 3px 9px 3px 7px;
1195
+ border: 1px solid var(--dpk-rule-strong);
1196
+ border-radius: 999px;
1197
+ background: var(--dpk-paper-raised);
1198
+ box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
1199
+ color: var(--dpk-ink);
1200
+ font-size: 12px;
1201
+ font-weight: 600;
1202
+ text-decoration: none;
1203
+ transition:
1204
+ background 140ms var(--dpk-ease),
1205
+ border-color 140ms var(--dpk-ease);
1206
+ }
1207
+ /* A long status name ends in an ellipsis; the chip stays a one-line pill. */
1208
+ .filter-chip > :not(.filter-name) {
1209
+ flex: none;
1210
+ }
1211
+ .filter-name {
1212
+ min-width: 0;
1213
+ overflow: hidden;
1214
+ text-overflow: ellipsis;
1215
+ white-space: nowrap;
1216
+ }
1217
+ .filter-chip:hover {
1218
+ border-color: color-mix(in oklab, var(--usm-tone) 60%, var(--dpk-rule-strong));
1219
+ }
1220
+ .filter-chip:focus-visible {
1221
+ outline: none;
1222
+ box-shadow: var(--dpk-focus);
1223
+ }
1224
+ .filter-chip[aria-checked='true'] {
1225
+ border-color: var(--usm-tone);
1226
+ background: color-mix(in oklab, var(--usm-tone) 14%, var(--dpk-paper-raised));
1227
+ box-shadow: inset 0 0 0 1px var(--usm-tone);
1228
+ }
1229
+ .filter-count {
1230
+ line-height: 1;
1231
+ color: var(--dpk-ink-faint);
1232
+ font-family: var(--dpk-mono);
1233
+ font-size: 10.5px;
1234
+ font-variant-numeric: tabular-nums;
1235
+ }
1236
+ .filter-clear {
1237
+ margin-left: 4px;
1238
+ color: var(--dpk-blue);
1239
+ font-size: 12px;
1240
+ font-weight: 600;
1241
+ text-decoration: none;
1242
+ }
1243
+ .filter-clear:hover {
1244
+ text-decoration: underline;
1245
+ }
1246
+
1247
+ .board-bar {
1248
+ border-bottom: 1px solid var(--dpk-rule);
1249
+ /* Stays on top while a long milestone list scrolls under it. */
1250
+ position: sticky;
1251
+ top: 0;
1252
+ z-index: 5;
1253
+ margin: -24px -24px 0;
1254
+ padding: 12px 24px;
1255
+ background: var(--dpk-glass);
1256
+ backdrop-filter: saturate(1.6) blur(14px);
1257
+ display: flex;
1258
+ flex-wrap: wrap;
1259
+ align-items: center;
1260
+ gap: 10px 14px;
1261
+ min-width: 0;
1262
+ }
1263
+
1264
+ /* The two pages: an underlined tab strip, heavier than the view toggle. It
1265
+ scrolls sideways on a phone rather than cutting off the last tab; the
1266
+ bottom padding keeps the selected tab's underline inside the scroller. */
1267
+ .page-tabs {
1268
+ display: inline-flex;
1269
+ gap: 4px;
1270
+ min-width: 0;
1271
+ max-width: 100%;
1272
+ margin-right: auto;
1273
+ margin-bottom: -13px;
1274
+ padding-bottom: 13px;
1275
+ overflow-x: auto;
1276
+ scrollbar-width: none;
1277
+ }
1278
+ .page-tabs [role='tab'] {
1279
+ position: relative;
1280
+ display: inline-flex;
1281
+ align-items: center;
1282
+ gap: 8px;
1283
+ padding: 7px 12px;
1284
+ border-radius: var(--dpk-radius-sm);
1285
+ color: var(--dpk-ink-soft);
1286
+ font-size: 13.5px;
1287
+ font-weight: 600;
1288
+ letter-spacing: -0.005em;
1289
+ text-decoration: none;
1290
+ white-space: nowrap;
1291
+ transition:
1292
+ color 160ms var(--dpk-ease),
1293
+ background 160ms var(--dpk-ease);
1294
+ }
1295
+ .page-tabs [role='tab']:hover {
1296
+ color: var(--dpk-ink);
1297
+ background: var(--dpk-paper-inset);
1298
+ }
1299
+ .page-tabs [role='tab']:focus-visible {
1300
+ outline: none;
1301
+ box-shadow: var(--dpk-focus);
1302
+ }
1303
+ .page-tabs [role='tab'][aria-selected='true'] {
1304
+ color: var(--dpk-ink);
1305
+ font-weight: 700;
1306
+ }
1307
+ .page-tabs [role='tab'][aria-selected='true']::after {
1308
+ content: '';
1309
+ position: absolute;
1310
+ left: 12px;
1311
+ right: 12px;
1312
+ bottom: -13px;
1313
+ height: 2px;
1314
+ border-radius: 2px;
1315
+ background: var(--dpk-usm-accent);
1316
+ }
1317
+ .page-tab-count {
1318
+ min-width: 18px;
1319
+ padding: 0 6px;
1320
+ border-radius: 999px;
1321
+ background: var(--dpk-rule);
1322
+ color: var(--dpk-ink-soft);
1323
+ font-family: var(--dpk-mono);
1324
+ font-size: 10.5px;
1325
+ font-weight: 650;
1326
+ font-variant-numeric: tabular-nums;
1327
+ line-height: 17px;
1328
+ text-align: center;
1329
+ }
1330
+ [role='tab'][aria-selected='true'] .page-tab-count {
1331
+ background: var(--dpk-blue-soft);
1332
+ color: var(--dpk-blue);
1333
+ }
1334
+
1335
+ /* A sunken track with the selected segment raised on top of it. */
1336
+ .segmented {
1337
+ display: inline-flex;
1338
+ gap: 2px;
1339
+ padding: 3px;
1340
+ max-width: 100%;
1341
+ overflow-x: auto;
1342
+ scrollbar-width: none;
1343
+ border: 1px solid var(--dpk-rule);
1344
+ border-radius: 999px;
1345
+ background: var(--dpk-paper-sunken);
1346
+ box-shadow: inset 0 1px 3px var(--dpk-shade-1);
1347
+ }
1348
+
1349
+ .tab {
1350
+ padding: 5px 14px;
1351
+ border-radius: 999px;
1352
+ font-size: 12px;
1353
+ font-weight: 550;
1354
+ text-decoration: none;
1355
+ color: var(--dpk-ink-soft);
1356
+ white-space: nowrap;
1357
+ transition:
1358
+ background 160ms var(--dpk-ease),
1359
+ color 160ms var(--dpk-ease),
1360
+ box-shadow 160ms var(--dpk-ease);
1361
+ }
1362
+
1363
+ .tab:hover {
1364
+ color: var(--dpk-ink);
1365
+ background: var(--dpk-paper-inset);
1366
+ }
1367
+
1368
+ .tab[data-current='true'] {
1369
+ background: var(--dpk-paper-raised);
1370
+ color: var(--dpk-ink);
1371
+ font-weight: 650;
1372
+ box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
1373
+ }
1374
+
1375
+ /* Activity band: raised above the working canvas. A head spans its steps,
1376
+ so its contents stay in view beside the sticky column while the map
1377
+ scrolls sideways. */
1378
+ .act-head {
1379
+ position: relative;
1380
+ display: grid;
1381
+ align-content: start;
1382
+ gap: 7px;
1383
+ border-left: 1px solid var(--dpk-rule);
1384
+ background: var(--dpk-paper-raised);
1385
+ box-shadow:
1386
+ var(--dpk-bevel),
1387
+ inset 0 -1px 0 var(--dpk-rule-strong);
1388
+ font-size: 13px;
1389
+ font-weight: 650;
1390
+ letter-spacing: -0.005em;
1391
+ }
1392
+ .act-title,
1393
+ .act-meta,
1394
+ .act-steps {
1395
+ position: sticky;
1396
+ left: 150px;
1397
+ width: min(100%, 340px);
1398
+ min-width: 0;
1399
+ }
1400
+ .act-title {
1401
+ display: flex;
1402
+ align-items: center;
1403
+ gap: 8px;
1404
+ }
1405
+ .act-title > dpk-component-inline-edit {
1406
+ flex: 1 1 auto;
1407
+ min-width: 0;
1408
+ }
1409
+ .act-meta {
1410
+ display: flex;
1411
+ align-items: center;
1412
+ gap: 10px;
1413
+ }
1414
+ .act-meta .status-bar {
1415
+ flex: 1 1 auto;
1416
+ }
1417
+ /* Whose experience the activity is: a label, editable in place. */
1418
+ .act-actor {
1419
+ flex: none;
1420
+ max-width: 60%;
1421
+ padding: 0 4px;
1422
+ border-radius: 999px;
1423
+ background: var(--dpk-blue-soft);
1424
+ color: var(--dpk-blue);
1425
+ font-size: 11px;
1426
+ font-weight: 650;
1427
+ line-height: 20px;
1428
+ }
1429
+ .act-actor[data-empty='true'] {
1430
+ background: transparent;
1431
+ opacity: 0;
1432
+ transition: opacity 150ms ease;
1433
+ }
1434
+ .act-head:hover .act-actor[data-empty='true'],
1435
+ .act-actor[data-empty='true']:focus-within {
1436
+ opacity: 1;
1437
+ }
1438
+ /* The group view gives the steps no columns; the head lists them instead. */
1439
+ .act-steps {
1440
+ display: grid;
1441
+ gap: 3px;
1442
+ margin: 0;
1443
+ padding: 0 0 0 18px;
1444
+ color: var(--dpk-ink-soft);
1445
+ font-size: 11.5px;
1446
+ font-weight: 500;
1447
+ line-height: 1.45;
1448
+ }
1449
+ .act-steps li::marker {
1450
+ color: var(--dpk-ink-faint);
1451
+ font-family: var(--dpk-mono);
1452
+ font-size: 10px;
1453
+ }
1454
+ .act-head .count,
1455
+ .col-head .count {
1456
+ flex: 0 0 auto;
1457
+ padding: 0 6px;
1458
+ border-radius: 999px;
1459
+ background: var(--dpk-rule);
1460
+ line-height: 16px;
1461
+ }
1462
+ .col-head {
1463
+ display: flex;
1464
+ align-items: center;
1465
+ gap: 6px;
1466
+ border-left: 1px solid var(--dpk-rule);
1467
+ background: var(--dpk-paper-sunken);
1468
+ transition: background 160ms var(--dpk-ease);
1469
+ }
1470
+ .col-head h4 {
1471
+ flex: 1 1 auto;
1472
+ min-width: 0;
1473
+ }
1474
+ .col-head[data-current='true'] {
1475
+ background: color-mix(in srgb, var(--dpk-usm-accent) 8%, var(--dpk-paper-sunken));
1476
+ }
1477
+ .col-head h4 {
1478
+ font-size: 13px;
1479
+ font-weight: 600;
1480
+ margin: 0;
1481
+ }
1482
+
1483
+ .row-head {
1484
+ display: flex;
1485
+ align-items: center;
1486
+ gap: 6px;
1487
+ }
1488
+
1489
+ /* Milestone row label: plain text with a grip, not a chip. The "add
1490
+ milestone" row reuses \`.row-head\` for its ghost button. */
1491
+ .row-head[data-milestone] {
1492
+ align-self: stretch;
1493
+ margin: 0;
1494
+ padding: 0 6px 0 0;
1495
+ color: var(--dpk-ink);
1496
+ font-size: 12.5px;
1497
+ font-weight: 650;
1498
+ max-width: 100%;
1499
+ }
1500
+
1501
+ .row-head[draggable='true'] {
1502
+ cursor: grab;
1503
+ -webkit-user-select: none;
1504
+ user-select: none;
1505
+ }
1506
+
1507
+ .row-head[draggable='true'] dpk-component-inline-edit {
1508
+ -webkit-user-drag: none;
1509
+ }
1510
+
1511
+ .row-head[draggable='true']:active {
1512
+ cursor: grabbing;
1513
+ }
1514
+
1515
+ .row-grip {
1516
+ flex: 0 0 auto;
1517
+ display: inline-flex;
1518
+ color: var(--dpk-ink-faint);
1519
+ }
1520
+
1521
+ .row-grip svg {
1522
+ display: block;
1523
+ width: 15px;
1524
+ height: 15px;
1525
+ }
1526
+
1527
+ /* Row-level drag affordance: only the grip answers the hover. */
1528
+ .map-row[data-draggable='true']:hover .row-grip {
1529
+ color: var(--dpk-blue);
1530
+ }
1531
+ .map-row[data-draggable='true'] {
1532
+ cursor: grab;
1533
+ }
1534
+ .map-row[data-draggable='true']:active {
1535
+ cursor: grabbing;
1536
+ }
1537
+
1538
+ /*
1539
+ * Dragging state: entire row fades. Never disable pointer events on the
1540
+ * source here: Lit applies this state in the microtask right after
1541
+ * \`dragstart\`, and Blink then re-hit-tests the pointer and aborts the drag
1542
+ * when the source is no longer under it.
1543
+ */
1544
+ .map-row[data-row-dragging='true'] {
1545
+ opacity: 0.45;
1546
+ }
1547
+
1548
+ /* Drop target: entire row highlights. */
1549
+ .map-row[data-row-drop='true'] {
1550
+ outline: 2px dashed var(--dpk-blue);
1551
+ outline-offset: -2px;
1552
+ }
1553
+
1554
+ /* Unassigned is a holding area, not a release: its label is quieter. */
1555
+ .map-row[data-unassigned='true'] .row-head {
1556
+ padding-left: var(--usm-row-indent);
1557
+ color: var(--dpk-ink-soft);
1558
+ }
1559
+
1560
+ /* Cells are the working canvas: sunken, with a quiet dot lattice, so raised
1561
+ story cards read as things placed on the board. */
1562
+ .cell {
1563
+ border-left: 1px solid var(--dpk-rule);
1564
+ border-top: 1px solid var(--dpk-rule);
1565
+ display: flex;
1566
+ flex-direction: column;
1567
+ gap: 8px;
1568
+ min-height: 100px;
1569
+ background: var(--dpk-dots), var(--dpk-paper-sunken);
1570
+ transition: background 160ms var(--dpk-ease);
1571
+ }
1572
+ .cell[data-drop='true'] {
1573
+ outline: 2px dashed var(--dpk-blue);
1574
+ outline-offset: -2px;
1575
+ }
1576
+ .card-list {
1577
+ display: grid;
1578
+ gap: 10px;
1579
+ align-content: start;
1580
+ flex: 1 1 auto;
1581
+ }
1582
+ .add-cell {
1583
+ margin-top: auto;
1584
+ opacity: 0;
1585
+ transition:
1586
+ opacity 180ms var(--dpk-ease),
1587
+ background 160ms var(--dpk-ease),
1588
+ border-color 160ms var(--dpk-ease),
1589
+ color 160ms var(--dpk-ease);
1590
+ border: 1px dashed var(--dpk-rule-strong);
1591
+ border-radius: var(--dpk-radius-sm);
1592
+ background: transparent;
1593
+ color: var(--dpk-ink-faint);
1594
+ padding: 4px 8px;
1595
+ font-size: 11.5px;
1596
+ }
1597
+ .add-cell:hover {
1598
+ background: var(--dpk-blue-soft);
1599
+ border-color: var(--dpk-blue);
1600
+ color: var(--dpk-blue);
1601
+ }
1602
+ .cell:hover .add-cell {
1603
+ opacity: 1;
1604
+ }
1605
+ .empty {
1606
+ border: 1px dashed var(--dpk-rule-strong);
1607
+ border-radius: var(--dpk-radius-lg);
1608
+ padding: 28px 24px;
1609
+ background: var(--dpk-dots), var(--dpk-paper-sunken);
1610
+ max-width: 620px;
1611
+ display: grid;
1612
+ gap: 10px;
1613
+ }
1614
+ .count {
1615
+ font-family: var(--dpk-mono);
1616
+ font-variant-numeric: tabular-nums;
1617
+ font-size: 10px;
1618
+ color: var(--dpk-ink-faint);
1619
+ }
1620
+
1621
+ /* ------------------------------------------------------ milestones tab */
1622
+
1623
+ /* The release slices as a timeline, like the experience section of a
1624
+ portfolio: when on the left, one node per slice on a single rail, what
1625
+ and how big on the right. Nothing is boxed; the rail carries the order. */
1626
+ .ms-overview {
1627
+ --ms-node: 30px;
1628
+ --ms-when: 132px;
1629
+ --ms-gap: 44px;
1630
+ display: grid;
1631
+ gap: 28px;
1632
+ max-width: 920px;
1633
+ padding: 28px 0 40px;
1634
+ }
1635
+ .ms-timeline {
1636
+ margin: 0;
1637
+ padding: 0;
1638
+ list-style: none;
1639
+ }
1640
+ .ms-entry,
1641
+ .ms-add {
1642
+ display: grid;
1643
+ grid-template-columns: var(--ms-when) var(--ms-node) minmax(0, 1fr);
1644
+ grid-template-areas: 'when rail body';
1645
+ column-gap: 24px;
1646
+ }
1647
+ .ms-entry {
1648
+ padding-bottom: var(--ms-gap);
1649
+ }
1650
+ .ms-when {
1651
+ grid-area: when;
1652
+ display: flex;
1653
+ justify-content: flex-end;
1654
+ padding-top: 5px;
1655
+ }
1656
+ .ms-timeframe {
1657
+ color: var(--dpk-ink);
1658
+ font-size: 13px;
1659
+ font-weight: 650;
1660
+ font-variant-numeric: tabular-nums;
1661
+ letter-spacing: 0.01em;
1662
+ text-align: right;
1663
+ }
1664
+ .ms-timeframe[data-empty='true'] {
1665
+ color: var(--dpk-ink-faint);
1666
+ font-weight: 500;
1667
+ }
1668
+
1669
+ /* The rail runs through every entry's padding, so the nodes read as one line;
1670
+ it starts at the first node and fades out into the add node. */
1671
+ .ms-rail {
1672
+ grid-area: rail;
1673
+ position: relative;
1674
+ display: flex;
1675
+ justify-content: center;
1676
+ }
1677
+ .ms-rail::before {
1678
+ content: '';
1679
+ position: absolute;
1680
+ top: 0;
1681
+ bottom: calc(-1 * var(--ms-gap));
1682
+ left: calc(50% - 1px);
1683
+ width: 2px;
1684
+ border-radius: 1px;
1685
+ background: var(--dpk-rule-strong);
1686
+ }
1687
+ .ms-entry:first-child .ms-rail::before {
1688
+ top: calc(var(--ms-node) / 2);
1689
+ }
1690
+ .ms-add .ms-rail::before {
1691
+ bottom: auto;
1692
+ height: calc(var(--ms-node) / 2);
1693
+ background: repeating-linear-gradient(to bottom, var(--dpk-rule-strong) 0 3px, transparent 3px 7px);
1694
+ }
1695
+ .ms-node {
1696
+ position: relative;
1697
+ display: grid;
1698
+ place-items: center;
1699
+ width: var(--ms-node);
1700
+ height: var(--ms-node);
1701
+ box-sizing: border-box;
1702
+ border: 1px solid var(--dpk-rule-strong);
1703
+ border-radius: 50%;
1704
+ background: var(--dpk-paper-raised);
1705
+ color: var(--dpk-ink);
1706
+ font-family: var(--dpk-mono);
1707
+ font-size: 12px;
1708
+ font-weight: 700;
1709
+ font-variant-numeric: tabular-nums;
1710
+ /* A ring of page color cuts the rail around the node. */
1711
+ box-shadow:
1712
+ 0 0 0 5px var(--dpk-paper),
1713
+ var(--dpk-bevel),
1714
+ var(--dpk-shadow-xs);
1715
+ transition:
1716
+ border-color 160ms var(--dpk-ease),
1717
+ color 160ms var(--dpk-ease);
1718
+ }
1719
+ .ms-entry:hover .ms-node,
1720
+ .ms-entry:focus-within .ms-node {
1721
+ border-color: var(--dpk-blue);
1722
+ color: var(--dpk-blue-strong);
1723
+ }
1724
+ .ms-node--add {
1725
+ border-style: dashed;
1726
+ background: var(--dpk-paper);
1727
+ box-shadow: 0 0 0 5px var(--dpk-paper);
1728
+ }
1729
+ .ms-node--add::before,
1730
+ .ms-node--add::after {
1731
+ content: '';
1732
+ position: absolute;
1733
+ left: 50%;
1734
+ top: 50%;
1735
+ width: 10px;
1736
+ height: 1.5px;
1737
+ border-radius: 1px;
1738
+ background: var(--dpk-ink-faint);
1739
+ transform: translate(-50%, -50%);
1740
+ }
1741
+ .ms-node--add::after {
1742
+ transform: translate(-50%, -50%) rotate(90deg);
1743
+ }
1744
+ .ms-add .ms-body {
1745
+ display: flex;
1746
+ align-items: center;
1747
+ min-height: var(--ms-node);
1748
+ }
1749
+ /* The label lines up with the names above; the button's padding hangs out. */
1750
+ .ms-add .dpk-btn {
1751
+ margin-left: -12px;
1752
+ }
1753
+
1754
+ .ms-body {
1755
+ grid-area: body;
1756
+ display: grid;
1757
+ gap: 10px;
1758
+ min-width: 0;
1759
+ justify-items: start;
1760
+ }
1761
+ .ms-name {
1762
+ justify-self: stretch;
1763
+ min-width: 0;
1764
+ margin: 0;
1765
+ padding-top: 1px;
1766
+ font-size: 19px;
1767
+ font-weight: 700;
1768
+ line-height: 1.4;
1769
+ letter-spacing: -0.015em;
1770
+ }
1771
+ /* The field pads its text by 4px; pull it out by as much so the name lines
1772
+ up with the description and keeps its place when editing starts. */
1773
+ .ms-name dpk-component-inline-edit {
1774
+ display: block;
1775
+ margin: 0 -4px;
1776
+ }
1777
+ .ms-description {
1778
+ margin: 0;
1779
+ max-width: 64ch;
1780
+ color: var(--dpk-ink-soft);
1781
+ font-size: 14px;
1782
+ line-height: 1.75;
1783
+ white-space: pre-wrap;
1784
+ }
1785
+ .ms-description[data-empty='true'] {
1786
+ color: var(--dpk-ink-faint);
1787
+ font-size: 13px;
1788
+ }
1789
+ .ms-facts {
1790
+ display: flex;
1791
+ flex-wrap: wrap;
1792
+ gap: 10px 36px;
1793
+ margin: 6px 0 0;
1794
+ }
1795
+ .ms-facts dt {
1796
+ margin-bottom: 3px;
1797
+ color: var(--dpk-ink-faint);
1798
+ font-size: 11px;
1799
+ font-weight: 600;
1800
+ letter-spacing: 0.02em;
1801
+ }
1802
+ .ms-facts dd {
1803
+ display: flex;
1804
+ align-items: center;
1805
+ gap: 10px;
1806
+ margin: 0;
1807
+ color: var(--dpk-ink-faint);
1808
+ font-size: 12px;
1809
+ }
1810
+ .ms-facts strong {
1811
+ color: var(--dpk-ink);
1812
+ font-size: 15px;
1813
+ font-weight: 650;
1814
+ font-variant-numeric: tabular-nums;
1815
+ }
1816
+ .ms-meter {
1817
+ display: block;
1818
+ width: 72px;
1819
+ height: 4px;
1820
+ border-radius: 2px;
1821
+ background: var(--dpk-paper-inset);
1822
+ overflow: hidden;
1823
+ }
1824
+ .ms-meter > span {
1825
+ display: block;
1826
+ height: 100%;
1827
+ border-radius: inherit;
1828
+ background: var(--dpk-blue);
1829
+ }
1830
+
1831
+ /* Where the slice's stories sit across the backbone, in activity tones. */
1832
+ .ms-breakdown {
1833
+ display: grid;
1834
+ gap: 10px;
1835
+ width: min(100%, 460px);
1836
+ margin-top: 4px;
1837
+ }
1838
+ .ms-breakdown .status-bar {
1839
+ height: 8px;
1840
+ }
1841
+ .ms-legend {
1842
+ display: flex;
1843
+ flex-wrap: wrap;
1844
+ gap: 6px 16px;
1845
+ margin: 0;
1846
+ padding: 0;
1847
+ list-style: none;
1848
+ }
1849
+ .ms-legend li {
1850
+ display: inline-flex;
1851
+ align-items: center;
1852
+ gap: 6px;
1853
+ color: var(--dpk-ink-soft);
1854
+ font-size: 12px;
1855
+ }
1856
+ .ms-breakdown-count {
1857
+ color: var(--dpk-ink-faint);
1858
+ font-family: var(--dpk-mono);
1859
+ font-size: 11px;
1860
+ font-variant-numeric: tabular-nums;
1861
+ }
1862
+
1863
+ /* Narrow: the date moves above the name, the rail stays on the left. */
1864
+ @media (max-width: 640px) {
1865
+ .ms-overview {
1866
+ --ms-node: 26px;
1867
+ }
1868
+ .ms-entry,
1869
+ .ms-add {
1870
+ grid-template-columns: var(--ms-node) minmax(0, 1fr);
1871
+ grid-template-areas:
1872
+ 'rail when'
1873
+ 'rail body';
1874
+ column-gap: 16px;
1875
+ }
1876
+ .ms-add {
1877
+ grid-template-areas: 'rail body';
1878
+ }
1879
+ .ms-add .ms-when {
1880
+ display: none;
1881
+ }
1882
+ .ms-when {
1883
+ justify-content: flex-start;
1884
+ padding: 4px 0 2px;
1885
+ }
1886
+ .ms-timeframe {
1887
+ text-align: left;
1888
+ }
1889
+ }
1890
+
1891
+ /* ------------------------------------------------------- statuses tab */
1892
+
1893
+ /* The statuses in order, one row each: color, name, how many stories stand
1894
+ there, the palette to recolor it, and the order / delete tools. */
1895
+ .st-overview {
1896
+ display: grid;
1897
+ gap: 20px;
1898
+ max-width: 1040px;
1899
+ padding: 28px 0 40px;
1900
+ }
1901
+ .st-list {
1902
+ display: grid;
1903
+ margin: 0;
1904
+ padding: 0;
1905
+ list-style: none;
1906
+ border: 1px solid var(--dpk-rule);
1907
+ border-radius: var(--dpk-radius-lg);
1908
+ background: var(--dpk-paper-raised);
1909
+ box-shadow: var(--dpk-shadow-xs);
1910
+ }
1911
+ .st-row {
1912
+ display: grid;
1913
+ /* Fixed tool columns keep the unset row, which has no tools, in line. */
1914
+ grid-template-columns: 16px minmax(120px, 1fr) minmax(140px, 200px) 150px 84px;
1915
+ align-items: center;
1916
+ gap: 14px;
1917
+ padding: 12px 16px;
1918
+ }
1919
+ .st-row + .st-row {
1920
+ border-top: 1px solid var(--dpk-rule);
1921
+ }
1922
+ .st-name {
1923
+ min-width: 0;
1924
+ font-size: 14px;
1925
+ font-weight: 650;
1926
+ }
1927
+ .st-share {
1928
+ display: grid;
1929
+ gap: 5px;
1930
+ }
1931
+ .st-share-text {
1932
+ color: var(--dpk-ink-faint);
1933
+ font-family: var(--dpk-mono);
1934
+ font-size: 11px;
1935
+ font-variant-numeric: tabular-nums;
1936
+ }
1937
+ .st-meter {
1938
+ height: 5px;
1939
+ border-radius: 3px;
1940
+ background: var(--dpk-paper-sunken);
1941
+ overflow: hidden;
1942
+ }
1943
+ .st-meter > span {
1944
+ display: block;
1945
+ height: 100%;
1946
+ border-radius: 3px;
1947
+ background: var(--usm-tone);
1948
+ }
1949
+ .st-tones {
1950
+ display: inline-flex;
1951
+ flex-wrap: wrap;
1952
+ gap: 5px;
1953
+ }
1954
+ /* The status's own icon opens the menu of icons. */
1955
+ .st-icon-trigger {
1956
+ display: inline-grid;
1957
+ place-items: center;
1958
+ width: 30px;
1959
+ height: 30px;
1960
+ margin: -7px;
1961
+ padding: 0;
1962
+ border: 1px solid transparent;
1963
+ border-radius: var(--dpk-radius-sm);
1964
+ background: transparent;
1965
+ cursor: pointer;
1966
+ transition:
1967
+ background 140ms var(--dpk-ease),
1968
+ border-color 140ms var(--dpk-ease);
1969
+ }
1970
+ .st-icon-trigger:hover,
1971
+ .st-icon-trigger[aria-expanded='true'] {
1972
+ border-color: var(--dpk-rule-strong);
1973
+ background: var(--dpk-paper-raised);
1974
+ box-shadow: var(--dpk-shadow-xs);
1975
+ }
1976
+ .st-icon-trigger:focus-visible {
1977
+ outline: none;
1978
+ box-shadow: var(--dpk-focus);
1979
+ }
1980
+ .comment-pop.icon-menu {
1981
+ grid-template-columns: repeat(5, 36px);
1982
+ gap: 4px;
1983
+ padding: 8px;
1984
+ }
1985
+ .icon-option {
1986
+ display: inline-grid;
1987
+ place-items: center;
1988
+ width: 36px;
1989
+ height: 36px;
1990
+ padding: 0;
1991
+ border: 1px solid transparent;
1992
+ border-radius: var(--dpk-radius-sm);
1993
+ background: transparent;
1994
+ cursor: pointer;
1995
+ }
1996
+ .icon-option .status-icon {
1997
+ width: 18px;
1998
+ height: 18px;
1999
+ }
2000
+ .icon-option:hover,
2001
+ .icon-option:focus-visible {
2002
+ outline: none;
2003
+ background: var(--dpk-paper-inset);
2004
+ }
2005
+ .icon-option[aria-checked='true'] {
2006
+ border-color: color-mix(in oklab, var(--usm-tone) 55%, transparent);
2007
+ background: color-mix(in oklab, var(--usm-tone) 12%, transparent);
2008
+ }
2009
+ .st-tone {
2010
+ width: 18px;
2011
+ height: 18px;
2012
+ padding: 0;
2013
+ border: 2px solid var(--dpk-paper-raised);
2014
+ border-radius: 50%;
2015
+ background: var(--usm-tone);
2016
+ box-shadow: 0 0 0 1px var(--dpk-rule-strong);
2017
+ cursor: pointer;
2018
+ transition: box-shadow 150ms ease;
2019
+ }
2020
+ .st-tone:hover {
2021
+ box-shadow: 0 0 0 1px var(--usm-tone);
2022
+ }
2023
+ .st-tone[aria-checked='true'] {
2024
+ box-shadow: 0 0 0 2px var(--usm-tone);
2025
+ }
2026
+ .st-tone:focus-visible {
2027
+ outline: none;
2028
+ box-shadow: var(--dpk-focus);
2029
+ }
2030
+ .st-tools {
2031
+ display: inline-flex;
2032
+ gap: 2px;
2033
+ }
2034
+ .st-tools .dpk-icon-btn {
2035
+ width: 26px;
2036
+ height: 26px;
2037
+ font-size: 13px;
2038
+ }
2039
+ @media (max-width: 640px) {
2040
+ .st-row {
2041
+ grid-template-columns: 16px minmax(0, 1fr) auto;
2042
+ row-gap: 8px;
2043
+ }
2044
+ .st-share,
2045
+ .st-tones {
2046
+ grid-column: 2 / -1;
2047
+ }
2048
+ /* The tools stay on the name's row, so the rows below are the name's width. */
2049
+ .st-tools {
2050
+ grid-column: 3;
2051
+ grid-row: 1;
2052
+ }
2053
+ }
2054
+
2055
+ /* Step picker shown after a cross-activity drop. */
2056
+ .move-dialog {
2057
+ min-width: 220px;
2058
+ }
2059
+ `,q={kind:"idle"},Qa={width:300,height:240},es={width:228,height:116};class pt extends fe{static{this.styles=[fe.styles,Ja,Ke,Be,Xa,Lt]}definitionFor(t){return Pe(t)}static{this.properties={mode:{state:!0}}}#a=new Ct(this);#e=new Rt(this);#t=null;constructor(){super(),this.mode=q}renderRegions(t){return{main:this.#i(t)}}updated(){if(super.updated(),this.#s(),this.mode.kind==="picking-icon"){const a=this.renderRoot.querySelector("#icon-menu"),s=this.renderRoot.querySelector(`[data-icon-trigger="${CSS.escape(this.mode.statusId)}"]`);a&&s&&this.#e.open(a,s,es);return}if(this.mode.kind!=="picking-step")return;const t=this.renderRoot.querySelector("#move-dialog");t&&this.#e.open(t,Nt(this.mode.point.x,this.mode.point.y),Qa)}#s(){const t=this.renderRoot.querySelector(".page-tabs"),a=t?.querySelector('[aria-selected="true"]'),s=a?.getAttribute("href")??null;!t||!a||s===this.#t||(this.#t=s,Yt(t,a))}#i(t){const a=J(this.locale),s=Ie(t.navigation);return l`
2060
+ ${za(a,t,s)} ${this.#r(a,t,s)} ${this.#n(a,t,s)}
2061
+ ${Ua(a,t,this.mode,{confirm:i=>this.#u(i),cancel:()=>this.mode=q})}
2062
+ `}#n(t,a,s){if(s!=="map")return m;const i=Ka(a);return i?ja(t,a,i):m}#r(t,a,s){switch(s){case"milestones":return Na(t,a,xa(a.state));case"statuses":return Pa(t,a,Za(a.state),{openFor:this.mode.kind==="picking-icon"?this.mode.statusId:null,toggle:i=>{const n=this.mode.kind==="picking-icon"&&this.mode.statusId===i;this.mode=n?q:{kind:"picking-icon",statusId:i}},close:()=>this.mode=q});case"map":return this.#o(t,a)}}#o(t,a){return $a({m:t,context:a,drag:this.#a,handlers:{selectStory:s=>this.#d(s),dropOnCell:(s,i)=>this.#l(s,i),dropOnGroupCell:(s,i,n)=>this.#p(s,i,n),dropOnMilestoneRow:(s,i)=>this.#c(s,i)}})}#d(t){const a=this.context(),s=x(a.state,t);s&&a.navigate({step:s.stepId,story:s.id})}#l(t,a){const s=this.context();s.dispatch(je(s.state,t,a.item.id,a.hoveredId,a.place))}#p(t,a,s){const i=this.context(),n=x(i.state,s.item.id);if(!n)return;if(n.activityId!==t){this.mode={kind:"picking-step",storyId:n.id,activityId:t,milestoneId:a,point:{x:s.event.clientX,y:s.event.clientY}};return}const r=qe(i.state,t,a,n.id,s.hoveredId,s.place);r&&i.dispatch(r)}#c(t,a){const s=this.context(),i=s.state.milestones.map(r=>r.id),n=We(i,a.item.id,a.hoveredId,a.place);n&&s.dispatch(n)}#u(t){const a=this.mode;if(a.kind!=="picking-step")return;const s=this.context();s.dispatch(He(s.state,a.storyId,a.activityId,t,a.milestoneId)),this.mode=q}}const ct=()=>{ya(),customElements.get("dpk-template-usm")||customElements.define("dpk-template-usm",pt)},ts=Object.freeze(Object.defineProperty({__proto__:null,DpkTemplateUsm:pt,IDLE_MODE:q,allUsmIds:B,applyUsmAction:Te,defineUsmElement:ct,describeUsmAction:De,dropAfter:ka,emptyUsmBase:xe,findActivity:L,findMilestone:O,findStep:S,findStory:x,flatSteps:de,parseUsmBase:ke,resolveCellDrop:je,resolveGroupDrop:qe,resolveMilestoneDrop:We,resolvePickedStepMove:He,resolveUsmNavigation:Ue,serializeUsmAction:Re,storiesInCell:Z,storyCountForStep:we,usmAction:aa,usmActions:v,usmCommentTargets:Ce,usmCurrentTarget:Ye,usmDefinitionFor:Pe,usmHasTarget:ze,usmMessages:J,usmTargetLabel:Ne,usmTitle:ue},Symbol.toStringTag,{value:"Module"}));export{ct as d,ts as i};