@thxgg/steward 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{BA4e9-N5.js → BCiXS3ZV.js} +2 -2
- package/.output/public/_nuxt/BfUfZSFp.js +60 -0
- package/.output/public/_nuxt/{C_HVaH3B.js → BfV4oCiT.js} +1 -1
- package/.output/public/_nuxt/{CGzrvVc6.js → Bs6UO7IT.js} +1 -1
- package/.output/public/_nuxt/C9AsKFSQ.js +1 -0
- package/.output/public/_nuxt/{CJlXUkTg.js → C9jB6HQI.js} +1 -1
- package/.output/public/_nuxt/CCruYste.js +3 -0
- package/.output/public/_nuxt/CIIE0-WR.js +1 -0
- package/.output/public/_nuxt/{-z_Gr0GN.js → Cg4hnDua.js} +1 -1
- package/.output/public/_nuxt/CwdD8083.js +30 -0
- package/.output/public/_nuxt/{DAnnHVQP.js → D2RLSKEu.js} +1 -1
- package/.output/public/_nuxt/{DEr8q68O.js → D30YtxUg.js} +1 -1
- package/.output/public/_nuxt/{QAzsKGuP.js → DEekox9p.js} +1 -1
- package/.output/public/_nuxt/{WUF6Thhn.js → DddVAa3N.js} +1 -1
- package/.output/public/_nuxt/{TSsR_oCL.js → MO41rxll.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/627332c0-2e14-4849-8cac-e350f64ed513.json +1 -0
- package/.output/public/_nuxt/entry.Dp3jx0Yw.css +1 -0
- package/.output/public/_nuxt/f7vKgp5U.js +1 -0
- package/.output/public/_nuxt/xc3v2JZH.js +1 -0
- package/.output/server/chunks/_/prd-service.mjs +101 -68
- package/.output/server/chunks/_/prd-service.mjs.map +1 -1
- package/.output/server/chunks/_/repos.mjs +3 -179
- package/.output/server/chunks/_/repos.mjs.map +1 -1
- package/.output/server/chunks/_/task-graph.mjs +8 -4
- package/.output/server/chunks/_/task-graph.mjs.map +1 -1
- package/.output/server/chunks/_/watcher.mjs +2 -32
- package/.output/server/chunks/_/watcher.mjs.map +1 -1
- package/.output/server/chunks/build/{Detail-BQSkP9Zm.mjs → Detail-BcQGdJY5.mjs} +5 -6
- package/.output/server/chunks/build/Detail-BcQGdJY5.mjs.map +1 -0
- package/.output/server/chunks/build/{_prd_-CBR_wm9i.mjs → _prd_-CD_Bds_B.mjs} +81 -6
- package/.output/server/chunks/build/_prd_-CD_Bds_B.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/{default-Cao5eO80.mjs → default-BKKgG7HJ.mjs} +221 -23
- package/.output/server/chunks/build/default-BKKgG7HJ.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-Bf6kdO80.mjs +2 -0
- package/.output/server/chunks/build/error-500-D_bcARXN.mjs +2 -0
- package/.output/server/chunks/build/{index-ljj9uTXI.mjs → index-DE1tjHAd.mjs} +4 -3
- package/.output/server/chunks/build/index-DE1tjHAd.mjs.map +1 -0
- package/.output/server/chunks/build/nuxt-link-SvT1nf8Z.mjs +1 -1
- package/.output/server/chunks/build/{repo-graph-CVnkmn8i.mjs → repo-graph-CBfhpnd5.mjs} +26 -11
- package/.output/server/chunks/build/repo-graph-CBfhpnd5.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +15 -13
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/build/{usePrd-f7ylhIqs.mjs → usePrd-hXZOmvAv.mjs} +113 -9
- package/.output/server/chunks/build/usePrd-hXZOmvAv.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +1292 -580
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.get.mjs +2 -1
- package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/index.post.mjs +2 -2
- package/.output/server/chunks/routes/api/repos/_repoId/git/commits.get.mjs +2 -1
- package/.output/server/chunks/routes/api/repos/_repoId/git/commits.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/repos/_repoId/git/diff.get.mjs +2 -1
- package/.output/server/chunks/routes/api/repos/_repoId/git/diff.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/repos/_repoId/git/file-content.get.mjs +2 -1
- package/.output/server/chunks/routes/api/repos/_repoId/git/file-content.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/repos/_repoId/git/file-diff.get.mjs +2 -1
- package/.output/server/chunks/routes/api/repos/_repoId/git/file-diff.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/repos/_repoId/graph.get.mjs +27 -4
- package/.output/server/chunks/routes/api/repos/_repoId/graph.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/archive.post.mjs +93 -0
- package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/archive.post.mjs.map +1 -0
- package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/graph.get.mjs +2 -2
- package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/progress.get.mjs +3 -3
- package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/tasks/_taskId/commits.get.mjs +3 -3
- package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug/tasks.get.mjs +3 -3
- package/.output/server/chunks/routes/api/repos/_repoId/prd/_prdSlug_.get.mjs +2 -2
- package/.output/server/chunks/routes/api/repos/_repoId/prds.get.mjs +27 -4
- package/.output/server/chunks/routes/api/repos/_repoId/prds.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/repos/_repoId/refresh-git-repos.post.mjs +2 -1
- package/.output/server/chunks/routes/api/repos/_repoId/refresh-git-repos.post.mjs.map +1 -1
- package/.output/server/chunks/routes/api/repos/_repoId_.delete.mjs +2 -1
- package/.output/server/chunks/routes/api/repos/_repoId_.delete.mjs.map +1 -1
- package/.output/server/chunks/routes/api/runtime.get.mjs +2 -0
- package/.output/server/chunks/routes/api/runtime.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/state-migration/status.get.mjs +21 -0
- package/.output/server/chunks/routes/api/state-migration/status.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/watch.get.mjs +4 -3
- package/.output/server/chunks/routes/api/watch.get.mjs.map +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/index.mjs +3 -1
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/package.json +1 -1
- package/README.md +3 -0
- package/dist/server/utils/db.js +15 -0
- package/dist/server/utils/prd-archive.js +53 -0
- package/dist/server/utils/prd-service.js +26 -6
- package/dist/server/utils/prd-state.js +11 -2
- package/dist/server/utils/state-migration.js +225 -0
- package/dist/server/utils/state-schema.js +181 -4
- package/dist/server/utils/task-graph.js +10 -3
- package/package.json +1 -1
- package/.output/public/_nuxt/5LlyHjkF.js +0 -60
- package/.output/public/_nuxt/BA0u_CRT.js +0 -1
- package/.output/public/_nuxt/BO8EM227.js +0 -3
- package/.output/public/_nuxt/C0XT5P3Q.js +0 -1
- package/.output/public/_nuxt/CZsXZugv.js +0 -1
- package/.output/public/_nuxt/DrXxYwWw.js +0 -30
- package/.output/public/_nuxt/builds/meta/19e0e040-a531-4c25-b46d-a6ca54a1ae3e.json +0 -1
- package/.output/public/_nuxt/entry.LcDOtJnR.css +0 -1
- package/.output/public/_nuxt/i9wn3hS7.js +0 -1
- package/.output/server/chunks/build/Detail-BQSkP9Zm.mjs.map +0 -1
- package/.output/server/chunks/build/_prd_-CBR_wm9i.mjs.map +0 -1
- package/.output/server/chunks/build/default-Cao5eO80.mjs.map +0 -1
- package/.output/server/chunks/build/index-ByZO4Bvq.mjs +0 -76
- package/.output/server/chunks/build/index-ByZO4Bvq.mjs.map +0 -1
- package/.output/server/chunks/build/index-ljj9uTXI.mjs.map +0 -1
- package/.output/server/chunks/build/repo-graph-CVnkmn8i.mjs.map +0 -1
- package/.output/server/chunks/build/usePrd-f7ylhIqs.mjs.map +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{_ as Ns}from"./DEekox9p.js";import{u as ts,c as ns,a as ss,b as Dt,P as zs,B as on,C as as,d as Fs,e as Bs,L as Us,R as qs,G as Hs}from"./CCruYste.js";import{c as gt,d as rs,P as Qe,e as be,r as Pt,u as Gs,a as js,b as Vs,B as jt,F as Ws}from"./xc3v2JZH.js";import{C as Ys,E as $n,M as Mn,a as Nn,b as Zs,_ as Ks,c as Qs}from"./CwdD8083.js";import{g as F,v as cn,o as y,x as te,w as C,b as A,l as c,y as K,q as z,z as Rt,A as ls,s as $,B as Xs,C as Js,D as ea,E as ta,n as me,G as na,p as sa,c as D,a as P,t as ee,d as Pe,k as Fe,H as ke,I as is,F as os,r as cs,J as aa,K as ra,L as Ot,M as la,j as ia,m as zn,i as oa}from"./BCiXS3ZV.js";import{c as ca}from"./DddVAa3N.js";import{u as us,f as ps,E as ua,a as pa,g as da,w as fa,A as Fn}from"./CIIE0-WR.js";import{_ as ha}from"./DlAUqK2U.js";import"./C9jB6HQI.js";const ga=gt("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);const ma=gt("circle-dot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);const ka=gt("circle-play",[["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",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const Bn=gt("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);const ba=gt("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),[_a,xa]=ns("RovingFocusGroup");var ya=F({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(s,{expose:e,emit:t}){const a=s,n=t,{loop:i,orientation:l,dir:u}=cn(a),o=ts(u),d=rs(a,"currentTabStopId",n,{defaultValue:a.defaultCurrentTabStopId,passive:a.currentTabStopId===void 0}),p=z(!1),h=z(!1),k=z(0),{getItems:w,CollectionSlot:x}=us({isProvider:!0});function H(O){const T=!h.value;if(O.currentTarget&&O.target===O.currentTarget&&T&&!p.value){const L=new CustomEvent(ua,pa);if(O.currentTarget.dispatchEvent(L),n("entryFocus",L),!L.defaultPrevented){const E=w().map(Y=>Y.ref).filter(Y=>Y.dataset.disabled!==""),le=E.find(Y=>Y.getAttribute("data-active")===""),Q=E.find(Y=>Y.getAttribute("data-highlighted")===""),oe=E.find(Y=>Y.id===d.value),X=[le,Q,oe,...E].filter(Boolean);ps(X,a.preventScrollOnEntryFocus)}}h.value=!1}function G(){setTimeout(()=>{h.value=!1},1)}return e({getItems:w}),xa({loop:i,dir:o,orientation:l,currentTabStopId:d,onItemFocus:O=>{d.value=O},onItemShiftTab:()=>{p.value=!0},onFocusableItemAdd:()=>{k.value++},onFocusableItemRemove:()=>{k.value--}}),(O,T)=>(y(),te(c(x),null,{default:C(()=>[A(c(Qe),{tabindex:p.value||k.value===0?-1:0,"data-orientation":c(l),as:O.as,"as-child":O.asChild,dir:c(o),style:{outline:"none"},onMousedown:T[0]||(T[0]=L=>h.value=!0),onMouseup:G,onFocus:H,onBlur:T[1]||(T[1]=L=>p.value=!1)},{default:C(()=>[K(O.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Ta=ya,va=F({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(s){const e=s,t=_a(),a=ss(),n=$(()=>e.tabStopId||a),i=$(()=>t.currentTabStopId.value===n.value),{getItems:l,CollectionItem:u}=us();Rt(()=>{e.focusable&&t.onFocusableItemAdd()}),ls(()=>{e.focusable&&t.onFocusableItemRemove()});function o(d){if(d.key==="Tab"&&d.shiftKey){t.onItemShiftTab();return}if(d.target!==d.currentTarget)return;const p=da(d,t.orientation.value,t.dir.value);if(p!==void 0){if(d.metaKey||d.ctrlKey||d.altKey||!e.allowShiftKey&&d.shiftKey)return;d.preventDefault();let h=[...l().map(k=>k.ref).filter(k=>k.dataset.disabled!=="")];if(p==="last")h.reverse();else if(p==="prev"||p==="next"){p==="prev"&&h.reverse();const k=h.indexOf(d.currentTarget);h=t.loop.value?fa(h,k+1):h.slice(k+1)}Xs(()=>ps(h))}}return(d,p)=>(y(),te(c(u),null,{default:C(()=>[A(c(Qe),{tabindex:i.value?0:-1,"data-orientation":c(t).orientation.value,"data-active":d.active?"":void 0,"data-disabled":d.focusable?void 0:"",as:d.as,"as-child":d.asChild,onMousedown:p[0]||(p[0]=h=>{d.focusable?c(t).onItemFocus(n.value):h.preventDefault()}),onFocus:p[1]||(p[1]=h=>c(t).onItemFocus(n.value)),onKeydown:o},{default:C(()=>[K(d.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),wa=va;const[un,Sa]=ns("TabsRoot");var Aa=F({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,a=e,{orientation:n,unmountOnHide:i,dir:l}=cn(t),u=ts(l);Dt();const o=rs(t,"modelValue",a,{defaultValue:t.defaultValue,passive:t.modelValue===void 0}),d=z(),p=Js(new Set);return Sa({modelValue:o,changeModelValue:h=>{o.value=h},orientation:n,dir:u,unmountOnHide:i,activationMode:t.activationMode,baseId:ss(void 0,"reka-tabs"),tabsList:d,contentIds:p,registerContent:h=>{p.value=new Set([...p.value,h])},unregisterContent:h=>{const k=new Set(p.value);k.delete(h),p.value=k}}),(h,k)=>(y(),te(c(Qe),{dir:c(u),"data-orientation":c(n),"as-child":h.asChild,as:h.as},{default:C(()=>[K(h.$slots,"default",{modelValue:c(o)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),Ea=Aa;function ds(s,e){return`${s}-trigger-${e}`}function fs(s,e){return`${s}-content-${e}`}var Ra=F({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const e=s,{forwardRef:t}=Dt(),a=un(),n=$(()=>ds(a.baseId,e.value)),i=$(()=>fs(a.baseId,e.value)),l=$(()=>e.value===a.modelValue.value),u=z(l.value);return Rt(()=>{a.registerContent(e.value),requestAnimationFrame(()=>{u.value=!1})}),ea(()=>{a.unregisterContent(e.value)}),(o,d)=>(y(),te(c(zs),{present:o.forceMount||l.value,"force-mount":""},{default:C(({present:p})=>[A(c(Qe),{id:i.value,ref:c(t),"as-child":o.asChild,as:o.as,role:"tabpanel","data-state":l.value?"active":"inactive","data-orientation":c(a).orientation.value,"aria-labelledby":n.value,hidden:!p,tabindex:"0",style:ta({animationDuration:u.value?"0s":void 0})},{default:C(()=>[!c(a).unmountOnHide.value||p?K(o.$slots,"default",{key:0}):me("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),Ca=Ra,Ia=F({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const e=s,{loop:t}=cn(e),{forwardRef:a,currentElement:n}=Dt(),i=un();return i.tabsList=n,(l,u)=>(y(),te(c(Ta),{"as-child":"",orientation:c(i).orientation.value,dir:c(i).dir.value,loop:c(t)},{default:C(()=>[A(c(Qe),{ref:c(a),role:"tablist","as-child":l.asChild,as:l.as,"aria-orientation":c(i).orientation.value},{default:C(()=>[K(l.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),La=Ia,Da=F({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(s){const e=s,{forwardRef:t}=Dt(),a=un(),n=$(()=>ds(a.baseId,e.value)),i=$(()=>a.contentIds.value.has(e.value)?fs(a.baseId,e.value):void 0),l=$(()=>e.value===a.modelValue.value);return(u,o)=>(y(),te(c(wa),{"as-child":"",focusable:!u.disabled,active:l.value},{default:C(()=>[A(c(Qe),{id:n.value,ref:c(t),role:"tab",type:u.as==="button"?"button":void 0,as:u.as,"as-child":u.asChild,"aria-selected":l.value?"true":"false","aria-controls":i.value,"data-state":l.value?"active":"inactive",disabled:u.disabled,"data-disabled":u.disabled?"":void 0,"data-orientation":c(a).orientation.value,onMousedown:o[0]||(o[0]=sa(d=>{!u.disabled&&d.ctrlKey===!1?c(a).changeModelValue(u.value):d.preventDefault()},["left"])),onKeydown:o[1]||(o[1]=na(d=>c(a).changeModelValue(u.value),["enter","space"])),onFocus:o[2]||(o[2]=()=>{const d=c(a).activationMode!=="manual";!l.value&&!u.disabled&&d&&c(a).changeModelValue(u.value)})},{default:C(()=>[K(u.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),Pa=Da;const Oa={key:0,class:"flex flex-wrap items-center gap-3 text-sm"},$a={key:0,class:"flex items-center gap-1.5 text-muted-foreground"},Ma={key:1,class:"flex items-center gap-1.5 text-muted-foreground"},Na=["href"],za={key:4,class:"flex items-center gap-1.5 text-muted-foreground"},Fa=F({__name:"Meta",props:{metadata:{}},setup(s){const e=s,t=$(()=>{const n=e.metadata.status?.toLowerCase();return n?n.includes("complete")||n.includes("done")||n.includes("progress")||n.includes("active")?"default":n.includes("draft")?"secondary":n.includes("blocked")||n.includes("paused")?"destructive":"secondary":"secondary"}),a=$(()=>e.metadata.author||e.metadata.date||e.metadata.status||e.metadata.shortcutStory);return(n,i)=>c(a)?(y(),D("div",Oa,[s.metadata.author?(y(),D("div",$a,[A(c(ba),{class:"size-3.5"}),P("span",null,ee(s.metadata.author),1)])):me("",!0),s.metadata.date?(y(),D("div",Ma,[A(c(Ys),{class:"size-3.5"}),P("span",null,ee(s.metadata.date),1)])):me("",!0),s.metadata.status?(y(),te(c(on),{key:2,variant:c(t),class:"gap-1"},{default:C(()=>[A(c(ma),{class:"size-3"}),Pe(" "+ee(s.metadata.status),1)]),_:1},8,["variant"])):me("",!0),s.metadata.shortcutStory&&s.metadata.shortcutUrl?(y(),D("a",{key:3,href:s.metadata.shortcutUrl,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1.5 text-primary hover:underline"},[A(c($n),{class:"size-3.5"}),P("span",null,ee(s.metadata.shortcutStory),1)],8,Na)):s.metadata.shortcutStory?(y(),D("span",za,[A(c($n),{class:"size-3.5"}),P("span",null,ee(s.metadata.shortcutStory),1)])):me("",!0)])):me("",!0)}}),Ba=Object.assign(Fa,{__name:"PrdMeta"});function pn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var qe=pn();function hs(s){qe=s}var Be={exec:()=>null};function R(s,e=""){let t=typeof s=="string"?s:s.source,a={replace:(n,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(se.caret,"$1"),t=t.replace(n,l),a},getRegex:()=>new RegExp(t,e)};return a}var Ua=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),se={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}>`)},qa=/^(?:[ \t]*(?:\n|$))+/,Ha=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ga=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,mt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ja=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,dn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,gs=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ms=R(gs).replace(/bull/g,dn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Va=R(gs).replace(/bull/g,dn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),fn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Wa=/^[^\n]+/,hn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ya=R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",hn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Za=R(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,dn).getRegex(),$t="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",gn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ka=R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",gn).replace("tag",$t).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ks=R(fn).replace("hr",mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$t).getRegex(),Qa=R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ks).getRegex(),mn={blockquote:Qa,code:Ha,def:Ya,fences:Ga,heading:ja,hr:mt,html:Ka,lheading:ms,list:Za,newline:qa,paragraph:ks,table:Be,text:Wa},Un=R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$t).getRegex(),Xa={...mn,lheading:Va,table:Un,paragraph:R(fn).replace("hr",mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Un).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$t).getRegex()},Ja={...mn,html:R(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",gn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Be,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:R(fn).replace("hr",mt).replace("heading",` *#{1,6} *[^
|
|
2
|
+
]`).replace("lheading",ms).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},er=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,bs=/^( {2,}|\\)\n(?!\s*$)/,nr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Mt=/[\p{P}\p{S}]/u,kn=/[\s\p{P}\p{S}]/u,_s=/[^\s\p{P}\p{S}]/u,sr=R(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,kn).getRegex(),xs=/(?!~)[\p{P}\p{S}]/u,ar=/(?!~)[\s\p{P}\p{S}]/u,rr=/(?:[^\s\p{P}\p{S}]|~)/u,ys=/(?![*_])[\p{P}\p{S}]/u,lr=/(?![*_])[\s\p{P}\p{S}]/u,ir=/(?:[^\s\p{P}\p{S}]|[*_])/u,or=R(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ua?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ts=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,cr=R(Ts,"u").replace(/punct/g,Mt).getRegex(),ur=R(Ts,"u").replace(/punct/g,xs).getRegex(),vs="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",pr=R(vs,"gu").replace(/notPunctSpace/g,_s).replace(/punctSpace/g,kn).replace(/punct/g,Mt).getRegex(),dr=R(vs,"gu").replace(/notPunctSpace/g,rr).replace(/punctSpace/g,ar).replace(/punct/g,xs).getRegex(),fr=R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,_s).replace(/punctSpace/g,kn).replace(/punct/g,Mt).getRegex(),hr=R(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ys).getRegex(),gr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",mr=R(gr,"gu").replace(/notPunctSpace/g,ir).replace(/punctSpace/g,lr).replace(/punct/g,ys).getRegex(),kr=R(/\\(punct)/,"gu").replace(/punct/g,Mt).getRegex(),br=R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),_r=R(gn).replace("(?:-->|$)","-->").getRegex(),xr=R("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",_r).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ct=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,yr=R(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ct).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ws=R(/^!?\[(label)\]\[(ref)\]/).replace("label",Ct).replace("ref",hn).getRegex(),Ss=R(/^!?\[(ref)\](?:\[\])?/).replace("ref",hn).getRegex(),Tr=R("reflink|nolink(?!\\()","g").replace("reflink",ws).replace("nolink",Ss).getRegex(),qn=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,bn={_backpedal:Be,anyPunctuation:kr,autolink:br,blockSkip:or,br:bs,code:tr,del:Be,delLDelim:Be,delRDelim:Be,emStrongLDelim:cr,emStrongRDelimAst:pr,emStrongRDelimUnd:fr,escape:er,link:yr,nolink:Ss,punctuation:sr,reflink:ws,reflinkSearch:Tr,tag:xr,text:nr,url:Be},vr={...bn,link:R(/^!?\[(label)\]\((.*?)\)/).replace("label",Ct).getRegex(),reflink:R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ct).getRegex()},tn={...bn,emStrongRDelimAst:dr,emStrongLDelim:ur,delLDelim:hr,delRDelim:mr,url:R(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",qn).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:R(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",qn).getRegex()},wr={...tn,br:R(bs).replace("{2,}","*").getRegex(),text:R(tn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wt={normal:mn,gfm:Xa,pedantic:Ja},it={normal:bn,gfm:tn,breaks:wr,pedantic:vr},Sr={"&":"&","<":"<",">":">",'"':""","'":"'"},Hn=s=>Sr[s];function Se(s,e){if(e){if(se.escapeTest.test(s))return s.replace(se.escapeReplace,Hn)}else if(se.escapeTestNoEncode.test(s))return s.replace(se.escapeReplaceNoEncode,Hn);return s}function Gn(s){try{s=encodeURI(s).replace(se.percentDecode,"%")}catch{return null}return s}function jn(s,e){let t=s.replace(se.findPipe,(i,l,u)=>{let o=!1,d=l;for(;--d>=0&&u[d]==="\\";)o=!o;return o?"|":" |"}),a=t.split(se.splitPipe),n=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length<e;)a.push("");for(;n<a.length;n++)a[n]=a[n].trim().replace(se.slashPipe,"|");return a}function ot(s,e,t){let a=s.length;if(a===0)return"";let n=0;for(;n<a&&s.charAt(a-n-1)===e;)n++;return s.slice(0,a-n)}function Ar(s,e){if(s.indexOf(e[1])===-1)return-1;let t=0;for(let a=0;a<s.length;a++)if(s[a]==="\\")a++;else if(s[a]===e[0])t++;else if(s[a]===e[1]&&(t--,t<0))return a;return t>0?-2:-1}function Er(s,e=0){let t=e,a="";for(let n of s)if(n===" "){let i=4-t%4;a+=" ".repeat(i),t+=i}else a+=n,t++;return a}function Vn(s,e,t,a,n){let i=e.href,l=e.title||null,u=s[1].replace(n.other.outputLinkReplace,"$1");a.state.inLink=!0;let o={type:s[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:l,text:u,tokens:a.inlineTokens(u)};return a.state.inLink=!1,o}function Rr(s,e,t){let a=s.match(t.other.indentCodeCompensation);if(a===null)return e;let n=a[1];return e.split(`
|
|
3
|
+
`).map(i=>{let l=i.match(t.other.beginningSpace);if(l===null)return i;let[u]=l;return u.length>=n.length?i.slice(n.length):i}).join(`
|
|
4
|
+
`)}var It=class{options;rules;lexer;constructor(s){this.options=s||qe}space(s){let e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(s){let e=this.rules.block.code.exec(s);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:ot(t,`
|
|
5
|
+
`)}}}fences(s){let e=this.rules.block.fences.exec(s);if(e){let t=e[0],a=Rr(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:a}}}heading(s){let e=this.rules.block.heading.exec(s);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let a=ot(t,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(t=a.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(s){let e=this.rules.block.hr.exec(s);if(e)return{type:"hr",raw:ot(e[0],`
|
|
6
|
+
`)}}blockquote(s){let e=this.rules.block.blockquote.exec(s);if(e){let t=ot(e[0],`
|
|
7
|
+
`).split(`
|
|
8
|
+
`),a="",n="",i=[];for(;t.length>0;){let l=!1,u=[],o;for(o=0;o<t.length;o++)if(this.rules.other.blockquoteStart.test(t[o]))u.push(t[o]),l=!0;else if(!l)u.push(t[o]);else break;t=t.slice(o);let d=u.join(`
|
|
9
|
+
`),p=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
|
11
|
+
${d}`:d,n=n?`${n}
|
|
12
|
+
${p}`:p;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,i,!0),this.lexer.state.top=h,t.length===0)break;let k=i.at(-1);if(k?.type==="code")break;if(k?.type==="blockquote"){let w=k,x=w.raw+`
|
|
13
|
+
`+t.join(`
|
|
14
|
+
`),H=this.blockquote(x);i[i.length-1]=H,a=a.substring(0,a.length-w.raw.length)+H.raw,n=n.substring(0,n.length-w.text.length)+H.text;break}else if(k?.type==="list"){let w=k,x=w.raw+`
|
|
15
|
+
`+t.join(`
|
|
16
|
+
`),H=this.list(x);i[i.length-1]=H,a=a.substring(0,a.length-k.raw.length)+H.raw,n=n.substring(0,n.length-w.raw.length)+H.raw,t=x.substring(i.at(-1).raw.length).split(`
|
|
17
|
+
`);continue}}return{type:"blockquote",raw:a,tokens:i,text:n}}}list(s){let e=this.rules.block.list.exec(s);if(e){let t=e[1].trim(),a=t.length>1,n={type:"list",raw:"",ordered:a,start:a?+t.slice(0,-1):"",loose:!1,items:[]};t=a?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=a?t:"[*+-]");let i=this.rules.other.listItemRegex(t),l=!1;for(;s;){let o=!1,d="",p="";if(!(e=i.exec(s))||this.rules.block.hr.test(s))break;d=e[0],s=s.substring(d.length);let h=Er(e[2].split(`
|
|
18
|
+
`,1)[0],e[1].length),k=s.split(`
|
|
19
|
+
`,1)[0],w=!h.trim(),x=0;if(this.options.pedantic?(x=2,p=h.trimStart()):w?x=e[1].length+1:(x=h.search(this.rules.other.nonSpaceChar),x=x>4?1:x,p=h.slice(x),x+=e[1].length),w&&this.rules.other.blankLine.test(k)&&(d+=k+`
|
|
20
|
+
`,s=s.substring(k.length+1),o=!0),!o){let H=this.rules.other.nextBulletRegex(x),G=this.rules.other.hrRegex(x),O=this.rules.other.fencesBeginRegex(x),T=this.rules.other.headingBeginRegex(x),L=this.rules.other.htmlBeginRegex(x),E=this.rules.other.blockquoteBeginRegex(x);for(;s;){let le=s.split(`
|
|
21
|
+
`,1)[0],Q;if(k=le,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),Q=k):Q=k.replace(this.rules.other.tabCharGlobal," "),O.test(k)||T.test(k)||L.test(k)||E.test(k)||H.test(k)||G.test(k))break;if(Q.search(this.rules.other.nonSpaceChar)>=x||!k.trim())p+=`
|
|
22
|
+
`+Q.slice(x);else{if(w||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||O.test(h)||T.test(h)||G.test(h))break;p+=`
|
|
23
|
+
`+k}w=!k.trim(),d+=le+`
|
|
24
|
+
`,s=s.substring(le.length+1),h=Q.slice(x)}}n.loose||(l?n.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(l=!0)),n.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),n.raw+=d}let u=n.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let o of n.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(o.raw);if(d){let p={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};o.checked=p.checked,n.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=p.raw+o.tokens[0].raw,o.tokens[0].text=p.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(p)):o.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):o.tokens.unshift(p)}}if(!n.loose){let d=o.tokens.filter(h=>h.type==="space"),p=d.length>0&&d.some(h=>this.rules.other.anyLine.test(h.raw));n.loose=p}}if(n.loose)for(let o of n.items){o.loose=!0;for(let d of o.tokens)d.type==="text"&&(d.type="paragraph")}return n}}html(s){let e=this.rules.block.html.exec(s);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(s){let e=this.rules.block.def.exec(s);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:a,title:n}}}table(s){let e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=jn(e[1]),a=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
|
+
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===a.length){for(let l of a)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<t.length;l++)i.header.push({text:t[l],tokens:this.lexer.inline(t[l]),header:!0,align:i.align[l]});for(let l of n)i.rows.push(jn(l,i.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:i.align[o]})));return i}}lheading(s){let e=this.rules.block.lheading.exec(s);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(s){let e=this.rules.block.paragraph.exec(s);if(e){let t=e[1].charAt(e[1].length-1)===`
|
|
26
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(s){let e=this.rules.block.text.exec(s);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(s){let e=this.rules.inline.escape.exec(s);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(s){let e=this.rules.inline.tag.exec(s);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(s){let e=this.rules.inline.link.exec(s);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let i=ot(t.slice(0,-1),"\\");if((t.length-i.length)%2===0)return}else{let i=Ar(e[2],"()");if(i===-2)return;if(i>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let a=e[2],n="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(a);i&&(a=i[1],n=i[3])}else n=e[3]?e[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?a=a.slice(1):a=a.slice(1,-1)),Vn(e,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(s,e){let t;if((t=this.rules.inline.reflink.exec(s))||(t=this.rules.inline.nolink.exec(s))){let a=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[a.toLowerCase()];if(!n){let i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return Vn(t,n,t[0],this.lexer,this.rules)}}emStrong(s,e,t=""){let a=this.rules.inline.emStrongLDelim.exec(s);if(!(!a||a[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!t||this.rules.inline.punctuation.exec(t))){let n=[...a[0]].length-1,i,l,u=n,o=0,d=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*s.length+n);(a=d.exec(e))!=null;){if(i=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!i)continue;if(l=[...i].length,a[3]||a[4]){u+=l;continue}else if((a[5]||a[6])&&n%3&&!((n+l)%3)){o+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+o);let p=[...a[0]][0].length,h=s.slice(0,n+a.index+p+l);if(Math.min(n,l)%2){let w=h.slice(1,-1);return{type:"em",raw:h,text:w,tokens:this.lexer.inlineTokens(w)}}let k=h.slice(2,-2);return{type:"strong",raw:h,text:k,tokens:this.lexer.inlineTokens(k)}}}}codespan(s){let e=this.rules.inline.code.exec(s);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return a&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(s){let e=this.rules.inline.br.exec(s);if(e)return{type:"br",raw:e[0]}}del(s,e,t=""){let a=this.rules.inline.delLDelim.exec(s);if(a&&(!a[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...a[0]].length-1,i,l,u=n,o=this.rules.inline.delRDelim;for(o.lastIndex=0,e=e.slice(-1*s.length+n);(a=o.exec(e))!=null;){if(i=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!i||(l=[...i].length,l!==n))continue;if(a[3]||a[4]){u+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u);let d=[...a[0]][0].length,p=s.slice(0,n+a.index+d+l),h=p.slice(n,-n);return{type:"del",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(s){let e=this.rules.inline.autolink.exec(s);if(e){let t,a;return e[2]==="@"?(t=e[1],a="mailto:"+t):(t=e[1],a=t),{type:"link",raw:e[0],text:t,href:a,tokens:[{type:"text",raw:t,text:t}]}}}url(s){let e;if(e=this.rules.inline.url.exec(s)){let t,a;if(e[2]==="@")t=e[0],a="mailto:"+t;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);t=e[0],e[1]==="www."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:t,href:a,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(s){let e=this.rules.inline.text.exec(s);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},he=class nn{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||qe,this.options.tokenizer=this.options.tokenizer||new It,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:se,block:wt.normal,inline:it.normal};this.options.pedantic?(t.block=wt.pedantic,t.inline=it.pedantic):this.options.gfm&&(t.block=wt.gfm,this.options.breaks?t.inline=it.breaks:t.inline=it.gfm),this.tokenizer.rules=t}static get rules(){return{block:wt,inline:it}}static lex(e,t){return new nn(t).lex(e)}static lexInline(e,t){return new nn(t).inlineTokens(e)}lex(e){e=e.replace(se.carriageReturn,`
|
|
27
|
+
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let a=this.inlineQueue[t];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],a=!1){for(this.options.pedantic&&(e=e.replace(se.tabCharGlobal," ").replace(se.spaceLine,""));e;){let n;if(this.options.extensions?.block?.some(l=>(n=l.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let l=t.at(-1);n.raw.length===1&&l!==void 0?l.raw+=`
|
|
28
|
+
`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let l=t.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
29
|
+
`)?"":`
|
|
30
|
+
`)+n.raw,l.text+=`
|
|
31
|
+
`+n.text,this.inlineQueue.at(-1).src=l.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length);let l=t.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
32
|
+
`)?"":`
|
|
33
|
+
`)+n.raw,l.text+=`
|
|
34
|
+
`+n.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},t.push(n));continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}let i=e;if(this.options.extensions?.startBlock){let l=1/0,u=e.slice(1),o;this.options.extensions.startBlock.forEach(d=>{o=d.call({lexer:this},u),typeof o=="number"&&o>=0&&(l=Math.min(l,o))}),l<1/0&&l>=0&&(i=e.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){let l=t.at(-1);a&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
35
|
+
`)?"":`
|
|
36
|
+
`)+n.raw,l.text+=`
|
|
37
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(n),a=i.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let l=t.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
38
|
+
`)?"":`
|
|
39
|
+
`)+n.raw,l.text+=`
|
|
40
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(n);continue}if(e){let l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let a=e,n=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)o.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,n.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)i=n[2]?n[2].length:0,a=a.slice(0,n.index+i)+"["+"a".repeat(n[0].length-i-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=this.options.hooks?.emStrongMask?.call({lexer:this},a)??a;let l=!1,u="";for(;e;){l||(u=""),l=!1;let o;if(this.options.extensions?.inline?.some(p=>(o=p.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let p=t.at(-1);o.type==="text"&&p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,a,u)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,a,u)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let d=e;if(this.options.extensions?.startInline){let p=1/0,h=e.slice(1),k;this.options.extensions.startInline.forEach(w=>{k=w.call({lexer:this},h),typeof k=="number"&&k>=0&&(p=Math.min(p,k))}),p<1/0&&p>=0&&(d=e.substring(0,p+1))}if(o=this.tokenizer.inlineText(d)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(u=o.raw.slice(-1)),l=!0;let p=t.at(-1);p?.type==="text"?(p.raw+=o.raw,p.text+=o.text):t.push(o);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},Lt=class{options;parser;constructor(s){this.options=s||qe}space(s){return""}code({text:s,lang:e,escaped:t}){let a=(e||"").match(se.notSpaceStart)?.[0],n=s.replace(se.endingNewline,"")+`
|
|
41
|
+
`;return a?'<pre><code class="language-'+Se(a)+'">'+(t?n:Se(n,!0))+`</code></pre>
|
|
42
|
+
`:"<pre><code>"+(t?n:Se(n,!0))+`</code></pre>
|
|
43
|
+
`}blockquote({tokens:s}){return`<blockquote>
|
|
44
|
+
${this.parser.parse(s)}</blockquote>
|
|
45
|
+
`}html({text:s}){return s}def(s){return""}heading({tokens:s,depth:e}){return`<h${e}>${this.parser.parseInline(s)}</h${e}>
|
|
46
|
+
`}hr(s){return`<hr>
|
|
47
|
+
`}list(s){let e=s.ordered,t=s.start,a="";for(let l=0;l<s.items.length;l++){let u=s.items[l];a+=this.listitem(u)}let n=e?"ol":"ul",i=e&&t!==1?' start="'+t+'"':"";return"<"+n+i+`>
|
|
48
|
+
`+a+"</"+n+`>
|
|
49
|
+
`}listitem(s){return`<li>${this.parser.parse(s.tokens)}</li>
|
|
50
|
+
`}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
|
|
51
|
+
`}table(s){let e="",t="";for(let n=0;n<s.header.length;n++)t+=this.tablecell(s.header[n]);e+=this.tablerow({text:t});let a="";for(let n=0;n<s.rows.length;n++){let i=s.rows[n];t="";for(let l=0;l<i.length;l++)t+=this.tablecell(i[l]);a+=this.tablerow({text:t})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
52
|
+
<thead>
|
|
53
|
+
`+e+`</thead>
|
|
54
|
+
`+a+`</table>
|
|
55
|
+
`}tablerow({text:s}){return`<tr>
|
|
56
|
+
${s}</tr>
|
|
57
|
+
`}tablecell(s){let e=this.parser.parseInline(s.tokens),t=s.header?"th":"td";return(s.align?`<${t} align="${s.align}">`:`<${t}>`)+e+`</${t}>
|
|
58
|
+
`}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${Se(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:e,tokens:t}){let a=this.parser.parseInline(t),n=Gn(s);if(n===null)return a;s=n;let i='<a href="'+s+'"';return e&&(i+=' title="'+Se(e)+'"'),i+=">"+a+"</a>",i}image({href:s,title:e,text:t,tokens:a}){a&&(t=this.parser.parseInline(a,this.parser.textRenderer));let n=Gn(s);if(n===null)return Se(t);s=n;let i=`<img src="${s}" alt="${Se(t)}"`;return e&&(i+=` title="${Se(e)}"`),i+=">",i}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:Se(s.text)}},_n=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}checkbox({raw:s}){return s}},ge=class sn{options;renderer;textRenderer;constructor(e){this.options=e||qe,this.options.renderer=this.options.renderer||new Lt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _n}static parse(e,t){return new sn(t).parse(e)}static parseInline(e,t){return new sn(t).parseInline(e)}parse(e){let t="";for(let a=0;a<e.length;a++){let n=e[a];if(this.options.extensions?.renderers?.[n.type]){let l=n,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){t+=u||"";continue}}let i=n;switch(i.type){case"space":{t+=this.renderer.space(i);break}case"hr":{t+=this.renderer.hr(i);break}case"heading":{t+=this.renderer.heading(i);break}case"code":{t+=this.renderer.code(i);break}case"table":{t+=this.renderer.table(i);break}case"blockquote":{t+=this.renderer.blockquote(i);break}case"list":{t+=this.renderer.list(i);break}case"checkbox":{t+=this.renderer.checkbox(i);break}case"html":{t+=this.renderer.html(i);break}case"def":{t+=this.renderer.def(i);break}case"paragraph":{t+=this.renderer.paragraph(i);break}case"text":{t+=this.renderer.text(i);break}default:{let l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return t}parseInline(e,t=this.renderer){let a="";for(let n=0;n<e.length;n++){let i=e[n];if(this.options.extensions?.renderers?.[i.type]){let u=this.options.extensions.renderers[i.type].call({parser:this},i);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){a+=u||"";continue}}let l=i;switch(l.type){case"escape":{a+=t.text(l);break}case"html":{a+=t.html(l);break}case"link":{a+=t.link(l);break}case"image":{a+=t.image(l);break}case"checkbox":{a+=t.checkbox(l);break}case"strong":{a+=t.strong(l);break}case"em":{a+=t.em(l);break}case"codespan":{a+=t.codespan(l);break}case"br":{a+=t.br(l);break}case"del":{a+=t.del(l);break}case"text":{a+=t.text(l);break}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return a}},ht=class{options;block;constructor(s){this.options=s||qe}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(){return this.block?he.lex:he.lexInline}provideParser(){return this.block?ge.parse:ge.parseInline}},Cr=class{defaults=pn();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ge;Renderer=Lt;TextRenderer=_n;Lexer=he;Tokenizer=It;Hooks=ht;constructor(...s){this.use(...s)}walkTokens(s,e){let t=[];for(let a of s)switch(t=t.concat(e.call(this,a)),a.type){case"table":{let n=a;for(let i of n.header)t=t.concat(this.walkTokens(i.tokens,e));for(let i of n.rows)for(let l of i)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":{let n=a;t=t.concat(this.walkTokens(n.items,e));break}default:{let n=a;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(i=>{let l=n[i].flat(1/0);t=t.concat(this.walkTokens(l,e))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,e)))}}return t}use(...s){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(t=>{let a={...t};if(a.async=this.defaults.async||a.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let i=e.renderers[n.name];i?e.renderers[n.name]=function(...l){let u=n.renderer.apply(this,l);return u===!1&&(u=i.apply(this,l)),u}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[n.level];i?i.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),a.extensions=e),t.renderer){let n=this.defaults.renderer||new Lt(this.defaults);for(let i in t.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,u=t.renderer[l],o=n[l];n[l]=(...d)=>{let p=u.apply(n,d);return p===!1&&(p=o.apply(n,d)),p||""}}a.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new It(this.defaults);for(let i in t.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,u=t.tokenizer[l],o=n[l];n[l]=(...d)=>{let p=u.apply(n,d);return p===!1&&(p=o.apply(n,d)),p}}a.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new ht;for(let i in t.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,u=t.hooks[l],o=n[l];ht.passThroughHooks.has(i)?n[l]=d=>{if(this.defaults.async&&ht.passThroughHooksRespectAsync.has(i))return(async()=>{let h=await u.call(n,d);return o.call(n,h)})();let p=u.call(n,d);return o.call(n,p)}:n[l]=(...d)=>{if(this.defaults.async)return(async()=>{let h=await u.apply(n,d);return h===!1&&(h=await o.apply(n,d)),h})();let p=u.apply(n,d);return p===!1&&(p=o.apply(n,d)),p}}a.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,i=t.walkTokens;a.walkTokens=function(l){let u=[];return u.push(i.call(this,l)),n&&(u=u.concat(n.call(this,l))),u}}this.defaults={...this.defaults,...a}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,e){return he.lex(s,e??this.defaults)}parser(s,e){return ge.parse(s,e??this.defaults)}parseMarkdown(s){return(e,t)=>{let a={...t},n={...this.defaults,...a},i=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&a.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=s),n.async)return(async()=>{let l=n.hooks?await n.hooks.preprocess(e):e,u=await(n.hooks?await n.hooks.provideLexer():s?he.lex:he.lexInline)(l,n),o=n.hooks?await n.hooks.processAllTokens(u):u;n.walkTokens&&await Promise.all(this.walkTokens(o,n.walkTokens));let d=await(n.hooks?await n.hooks.provideParser():s?ge.parse:ge.parseInline)(o,n);return n.hooks?await n.hooks.postprocess(d):d})().catch(i);try{n.hooks&&(e=n.hooks.preprocess(e));let l=(n.hooks?n.hooks.provideLexer():s?he.lex:he.lexInline)(e,n);n.hooks&&(l=n.hooks.processAllTokens(l)),n.walkTokens&&this.walkTokens(l,n.walkTokens);let u=(n.hooks?n.hooks.provideParser():s?ge.parse:ge.parseInline)(l,n);return n.hooks&&(u=n.hooks.postprocess(u)),u}catch(l){return i(l)}}}onError(s,e){return t=>{if(t.message+=`
|
|
59
|
+
Please report this to https://github.com/markedjs/marked.`,s){let a="<p>An error occurred:</p><pre>"+Se(t.message+"",!0)+"</pre>";return e?Promise.resolve(a):a}if(e)return Promise.reject(t);throw t}}},Ue=new Cr;function I(s,e){return Ue.parse(s,e)}I.options=I.setOptions=function(s){return Ue.setOptions(s),I.defaults=Ue.defaults,hs(I.defaults),I};I.getDefaults=pn;I.defaults=qe;I.use=function(...s){return Ue.use(...s),I.defaults=Ue.defaults,hs(I.defaults),I};I.walkTokens=function(s,e){return Ue.walkTokens(s,e)};I.parseInline=Ue.parseInline;I.Parser=ge;I.parser=ge.parse;I.Renderer=Lt;I.TextRenderer=_n;I.Lexer=he;I.lexer=he.lex;I.Tokenizer=It;I.Hooks=ht;I.parse=I;I.options;I.setOptions;I.use;I.walkTokens;I.parseInline;ge.parse;he.lex;const{entries:As,setPrototypeOf:Wn,isFrozen:Ir,getPrototypeOf:Lr,getOwnPropertyDescriptor:Dr}=Object;let{freeze:ae,seal:ue,create:an}=Object,{apply:rn,construct:ln}=typeof Reflect<"u"&&Reflect;ae||(ae=function(e){return e});ue||(ue=function(e){return e});rn||(rn=function(e,t){for(var a=arguments.length,n=new Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i];return e.apply(t,n)});ln||(ln=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n<t;n++)a[n-1]=arguments[n];return new e(...a)});const St=re(Array.prototype.forEach),Pr=re(Array.prototype.lastIndexOf),Yn=re(Array.prototype.pop),ct=re(Array.prototype.push),Or=re(Array.prototype.splice),Et=re(String.prototype.toLowerCase),Vt=re(String.prototype.toString),Wt=re(String.prototype.match),ut=re(String.prototype.replace),$r=re(String.prototype.indexOf),Mr=re(String.prototype.trim),fe=re(Object.prototype.hasOwnProperty),ne=re(RegExp.prototype.test),pt=Nr(TypeError);function re(s){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n<t;n++)a[n-1]=arguments[n];return rn(s,e,a)}}function Nr(s){return function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return ln(s,t)}}function S(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Et;Wn&&Wn(s,null);let a=e.length;for(;a--;){let n=e[a];if(typeof n=="string"){const i=t(n);i!==n&&(Ir(e)||(e[a]=i),n=i)}s[n]=!0}return s}function zr(s){for(let e=0;e<s.length;e++)fe(s,e)||(s[e]=null);return s}function Ae(s){const e=an(null);for(const[t,a]of As(s))fe(s,t)&&(Array.isArray(a)?e[t]=zr(a):a&&typeof a=="object"&&a.constructor===Object?e[t]=Ae(a):e[t]=a);return e}function dt(s,e){for(;s!==null;){const a=Dr(s,e);if(a){if(a.get)return re(a.get);if(typeof a.value=="function")return re(a.value)}s=Lr(s)}function t(){return null}return t}const Zn=ae(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Yt=ae(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Zt=ae(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Fr=ae(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Kt=ae(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Br=ae(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Kn=ae(["#text"]),Qn=ae(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Qt=ae(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Xn=ae(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),At=ae(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ur=ue(/\{\{[\w\W]*|[\w\W]*\}\}/gm),qr=ue(/<%[\w\W]*|[\w\W]*%>/gm),Hr=ue(/\$\{[\w\W]*/gm),Gr=ue(/^data-[\-\w.\u00B7-\uFFFF]+$/),jr=ue(/^aria-[\-\w]+$/),Es=ue(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vr=ue(/^(?:\w+script|data):/i),Wr=ue(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rs=ue(/^html$/i),Yr=ue(/^[a-z][.\w]*(-[.\w]+)+$/i);var Jn=Object.freeze({__proto__:null,ARIA_ATTR:jr,ATTR_WHITESPACE:Wr,CUSTOM_ELEMENT:Yr,DATA_ATTR:Gr,DOCTYPE_NAME:Rs,ERB_EXPR:qr,IS_ALLOWED_URI:Es,IS_SCRIPT_OR_DATA:Vr,MUSTACHE_EXPR:Ur,TMPLIT_EXPR:Hr});const ft={element:1,text:3,progressingInstruction:7,comment:8,document:9},Zr=function(){return typeof window>"u"?null:window},Kr=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let a=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(a=t.getAttribute(n));const i="dompurify"+(a?"#"+a:"");try{return e.createPolicy(i,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},es=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Cs(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zr();const e=_=>Cs(_);if(e.version="3.3.1",e.removed=[],!s||!s.document||s.document.nodeType!==ft.document||!s.Element)return e.isSupported=!1,e;let{document:t}=s;const a=t,n=a.currentScript,{DocumentFragment:i,HTMLTemplateElement:l,Node:u,Element:o,NodeFilter:d,NamedNodeMap:p=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:h,DOMParser:k,trustedTypes:w}=s,x=o.prototype,H=dt(x,"cloneNode"),G=dt(x,"remove"),O=dt(x,"nextSibling"),T=dt(x,"childNodes"),L=dt(x,"parentNode");if(typeof l=="function"){const _=t.createElement("template");_.content&&_.content.ownerDocument&&(t=_.content.ownerDocument)}let E,le="";const{implementation:Q,createNodeIterator:oe,createDocumentFragment:X,getElementsByTagName:Y}=t,{importNode:Xe}=a;let U=es();e.isSupported=typeof As=="function"&&typeof L=="function"&&Q&&Q.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:_e,ERB_EXPR:xe,TMPLIT_EXPR:pe,DATA_ATTR:ye,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:Me,ATTR_WHITESPACE:He,CUSTOM_ELEMENT:kt}=Jn;let{IS_ALLOWED_URI:Je}=Jn,B=null;const et=S({},[...Zn,...Yt,...Zt,...Kt,...Kn]);let j=null;const Ge=S({},[...Qn,...Qt,...Xn,...At]);let M=Object.seal(an(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,tt=null;const Ee=Object.seal(an(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let bt=!0,nt=!0,_t=!1,je=!0,Re=!1,$e=!0,Ce=!1,st=!1,at=!1,f=!1,g=!1,v=!1,W=!0,ce=!1;const Nt="user-content-";let rt=!0,Ne=!1,de={},ve=null;const zt=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let xn=null;const yn=S({},["audio","video","img","source","image","track"]);let Ft=null;const Tn=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",yt="http://www.w3.org/2000/svg",Ie="http://www.w3.org/1999/xhtml";let Ve=Ie,Bt=!1,Ut=null;const Is=S({},[xt,yt,Ie],Vt);let Tt=S({},["mi","mo","mn","ms","mtext"]),vt=S({},["annotation-xml"]);const Ls=S({},["title","style","font","a","script"]);let lt=null;const Ds=["application/xhtml+xml","text/html"],Ps="text/html";let V=null,We=null;const Os=t.createElement("form"),vn=function(r){return r instanceof RegExp||r instanceof Function},qt=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(We&&We===r)){if((!r||typeof r!="object")&&(r={}),r=Ae(r),lt=Ds.indexOf(r.PARSER_MEDIA_TYPE)===-1?Ps:r.PARSER_MEDIA_TYPE,V=lt==="application/xhtml+xml"?Vt:Et,B=fe(r,"ALLOWED_TAGS")?S({},r.ALLOWED_TAGS,V):et,j=fe(r,"ALLOWED_ATTR")?S({},r.ALLOWED_ATTR,V):Ge,Ut=fe(r,"ALLOWED_NAMESPACES")?S({},r.ALLOWED_NAMESPACES,Vt):Is,Ft=fe(r,"ADD_URI_SAFE_ATTR")?S(Ae(Tn),r.ADD_URI_SAFE_ATTR,V):Tn,xn=fe(r,"ADD_DATA_URI_TAGS")?S(Ae(yn),r.ADD_DATA_URI_TAGS,V):yn,ve=fe(r,"FORBID_CONTENTS")?S({},r.FORBID_CONTENTS,V):zt,Oe=fe(r,"FORBID_TAGS")?S({},r.FORBID_TAGS,V):Ae({}),tt=fe(r,"FORBID_ATTR")?S({},r.FORBID_ATTR,V):Ae({}),de=fe(r,"USE_PROFILES")?r.USE_PROFILES:!1,bt=r.ALLOW_ARIA_ATTR!==!1,nt=r.ALLOW_DATA_ATTR!==!1,_t=r.ALLOW_UNKNOWN_PROTOCOLS||!1,je=r.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Re=r.SAFE_FOR_TEMPLATES||!1,$e=r.SAFE_FOR_XML!==!1,Ce=r.WHOLE_DOCUMENT||!1,f=r.RETURN_DOM||!1,g=r.RETURN_DOM_FRAGMENT||!1,v=r.RETURN_TRUSTED_TYPE||!1,at=r.FORCE_BODY||!1,W=r.SANITIZE_DOM!==!1,ce=r.SANITIZE_NAMED_PROPS||!1,rt=r.KEEP_CONTENT!==!1,Ne=r.IN_PLACE||!1,Je=r.ALLOWED_URI_REGEXP||Es,Ve=r.NAMESPACE||Ie,Tt=r.MATHML_TEXT_INTEGRATION_POINTS||Tt,vt=r.HTML_INTEGRATION_POINTS||vt,M=r.CUSTOM_ELEMENT_HANDLING||{},r.CUSTOM_ELEMENT_HANDLING&&vn(r.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(M.tagNameCheck=r.CUSTOM_ELEMENT_HANDLING.tagNameCheck),r.CUSTOM_ELEMENT_HANDLING&&vn(r.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(M.attributeNameCheck=r.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),r.CUSTOM_ELEMENT_HANDLING&&typeof r.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(M.allowCustomizedBuiltInElements=r.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(nt=!1),g&&(f=!0),de&&(B=S({},Kn),j=[],de.html===!0&&(S(B,Zn),S(j,Qn)),de.svg===!0&&(S(B,Yt),S(j,Qt),S(j,At)),de.svgFilters===!0&&(S(B,Zt),S(j,Qt),S(j,At)),de.mathMl===!0&&(S(B,Kt),S(j,Xn),S(j,At))),r.ADD_TAGS&&(typeof r.ADD_TAGS=="function"?Ee.tagCheck=r.ADD_TAGS:(B===et&&(B=Ae(B)),S(B,r.ADD_TAGS,V))),r.ADD_ATTR&&(typeof r.ADD_ATTR=="function"?Ee.attributeCheck=r.ADD_ATTR:(j===Ge&&(j=Ae(j)),S(j,r.ADD_ATTR,V))),r.ADD_URI_SAFE_ATTR&&S(Ft,r.ADD_URI_SAFE_ATTR,V),r.FORBID_CONTENTS&&(ve===zt&&(ve=Ae(ve)),S(ve,r.FORBID_CONTENTS,V)),r.ADD_FORBID_CONTENTS&&(ve===zt&&(ve=Ae(ve)),S(ve,r.ADD_FORBID_CONTENTS,V)),rt&&(B["#text"]=!0),Ce&&S(B,["html","head","body"]),B.table&&(S(B,["tbody"]),delete Oe.tbody),r.TRUSTED_TYPES_POLICY){if(typeof r.TRUSTED_TYPES_POLICY.createHTML!="function")throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof r.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=r.TRUSTED_TYPES_POLICY,le=E.createHTML("")}else E===void 0&&(E=Kr(w,n)),E!==null&&typeof le=="string"&&(le=E.createHTML(""));ae&&ae(r),We=r}},wn=S({},[...Yt,...Zt,...Fr]),Sn=S({},[...Kt,...Br]),$s=function(r){let m=L(r);(!m||!m.tagName)&&(m={namespaceURI:Ve,tagName:"template"});const b=Et(r.tagName),N=Et(m.tagName);return Ut[r.namespaceURI]?r.namespaceURI===yt?m.namespaceURI===Ie?b==="svg":m.namespaceURI===xt?b==="svg"&&(N==="annotation-xml"||Tt[N]):!!wn[b]:r.namespaceURI===xt?m.namespaceURI===Ie?b==="math":m.namespaceURI===yt?b==="math"&&vt[N]:!!Sn[b]:r.namespaceURI===Ie?m.namespaceURI===yt&&!vt[N]||m.namespaceURI===xt&&!Tt[N]?!1:!Sn[b]&&(Ls[b]||!wn[b]):!!(lt==="application/xhtml+xml"&&Ut[r.namespaceURI]):!1},we=function(r){ct(e.removed,{element:r});try{L(r).removeChild(r)}catch{G(r)}},ze=function(r,m){try{ct(e.removed,{attribute:m.getAttributeNode(r),from:m})}catch{ct(e.removed,{attribute:null,from:m})}if(m.removeAttribute(r),r==="is")if(f||g)try{we(m)}catch{}else try{m.setAttribute(r,"")}catch{}},An=function(r){let m=null,b=null;if(at)r="<remove></remove>"+r;else{const q=Wt(r,/^[\r\n\t ]+/);b=q&&q[0]}lt==="application/xhtml+xml"&&Ve===Ie&&(r='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+r+"</body></html>");const N=E?E.createHTML(r):r;if(Ve===Ie)try{m=new k().parseFromString(N,lt)}catch{}if(!m||!m.documentElement){m=Q.createDocument(Ve,"template",null);try{m.documentElement.innerHTML=Bt?le:N}catch{}}const J=m.body||m.documentElement;return r&&b&&J.insertBefore(t.createTextNode(b),J.childNodes[0]||null),Ve===Ie?Y.call(m,Ce?"html":"body")[0]:Ce?m.documentElement:J},En=function(r){return oe.call(r.ownerDocument||r,r,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Ht=function(r){return r instanceof h&&(typeof r.nodeName!="string"||typeof r.textContent!="string"||typeof r.removeChild!="function"||!(r.attributes instanceof p)||typeof r.removeAttribute!="function"||typeof r.setAttribute!="function"||typeof r.namespaceURI!="string"||typeof r.insertBefore!="function"||typeof r.hasChildNodes!="function")},Rn=function(r){return typeof u=="function"&&r instanceof u};function Le(_,r,m){St(_,b=>{b.call(e,r,m,We)})}const Cn=function(r){let m=null;if(Le(U.beforeSanitizeElements,r,null),Ht(r))return we(r),!0;const b=V(r.nodeName);if(Le(U.uponSanitizeElement,r,{tagName:b,allowedTags:B}),$e&&r.hasChildNodes()&&!Rn(r.firstElementChild)&&ne(/<[/\w!]/g,r.innerHTML)&&ne(/<[/\w!]/g,r.textContent)||r.nodeType===ft.progressingInstruction||$e&&r.nodeType===ft.comment&&ne(/<[/\w]/g,r.data))return we(r),!0;if(!(Ee.tagCheck instanceof Function&&Ee.tagCheck(b))&&(!B[b]||Oe[b])){if(!Oe[b]&&Ln(b)&&(M.tagNameCheck instanceof RegExp&&ne(M.tagNameCheck,b)||M.tagNameCheck instanceof Function&&M.tagNameCheck(b)))return!1;if(rt&&!ve[b]){const N=L(r)||r.parentNode,J=T(r)||r.childNodes;if(J&&N){const q=J.length;for(let ie=q-1;ie>=0;--ie){const De=H(J[ie],!0);De.__removalCount=(r.__removalCount||0)+1,N.insertBefore(De,O(r))}}}return we(r),!0}return r instanceof o&&!$s(r)||(b==="noscript"||b==="noembed"||b==="noframes")&&ne(/<\/no(script|embed|frames)/i,r.innerHTML)?(we(r),!0):(Re&&r.nodeType===ft.text&&(m=r.textContent,St([_e,xe,pe],N=>{m=ut(m,N," ")}),r.textContent!==m&&(ct(e.removed,{element:r.cloneNode()}),r.textContent=m)),Le(U.afterSanitizeElements,r,null),!1)},In=function(r,m,b){if(W&&(m==="id"||m==="name")&&(b in t||b in Os))return!1;if(!(nt&&!tt[m]&&ne(ye,m))){if(!(bt&&ne(Te,m))){if(!(Ee.attributeCheck instanceof Function&&Ee.attributeCheck(m,r))){if(!j[m]||tt[m]){if(!(Ln(r)&&(M.tagNameCheck instanceof RegExp&&ne(M.tagNameCheck,r)||M.tagNameCheck instanceof Function&&M.tagNameCheck(r))&&(M.attributeNameCheck instanceof RegExp&&ne(M.attributeNameCheck,m)||M.attributeNameCheck instanceof Function&&M.attributeNameCheck(m,r))||m==="is"&&M.allowCustomizedBuiltInElements&&(M.tagNameCheck instanceof RegExp&&ne(M.tagNameCheck,b)||M.tagNameCheck instanceof Function&&M.tagNameCheck(b))))return!1}else if(!Ft[m]){if(!ne(Je,ut(b,He,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&r!=="script"&&$r(b,"data:")===0&&xn[r])){if(!(_t&&!ne(Me,ut(b,He,"")))){if(b)return!1}}}}}}}return!0},Ln=function(r){return r!=="annotation-xml"&&Wt(r,kt)},Dn=function(r){Le(U.beforeSanitizeAttributes,r,null);const{attributes:m}=r;if(!m||Ht(r))return;const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0};let N=m.length;for(;N--;){const J=m[N],{name:q,namespaceURI:ie,value:De}=J,Ye=V(q),Gt=De;let Z=q==="value"?Gt:Mr(Gt);if(b.attrName=Ye,b.attrValue=Z,b.keepAttr=!0,b.forceKeepAttr=void 0,Le(U.uponSanitizeAttribute,r,b),Z=b.attrValue,ce&&(Ye==="id"||Ye==="name")&&(ze(q,r),Z=Nt+Z),$e&&ne(/((--!?|])>)|<\/(style|title|textarea)/i,Z)){ze(q,r);continue}if(Ye==="attributename"&&Wt(Z,"href")){ze(q,r);continue}if(b.forceKeepAttr)continue;if(!b.keepAttr){ze(q,r);continue}if(!je&&ne(/\/>/i,Z)){ze(q,r);continue}Re&&St([_e,xe,pe],On=>{Z=ut(Z,On," ")});const Pn=V(r.nodeName);if(!In(Pn,Ye,Z)){ze(q,r);continue}if(E&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!ie)switch(w.getAttributeType(Pn,Ye)){case"TrustedHTML":{Z=E.createHTML(Z);break}case"TrustedScriptURL":{Z=E.createScriptURL(Z);break}}if(Z!==Gt)try{ie?r.setAttributeNS(ie,q,Z):r.setAttribute(q,Z),Ht(r)?we(r):Yn(e.removed)}catch{ze(q,r)}}Le(U.afterSanitizeAttributes,r,null)},Ms=function _(r){let m=null;const b=En(r);for(Le(U.beforeSanitizeShadowDOM,r,null);m=b.nextNode();)Le(U.uponSanitizeShadowNode,m,null),Cn(m),Dn(m),m.content instanceof i&&_(m.content);Le(U.afterSanitizeShadowDOM,r,null)};return e.sanitize=function(_){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,b=null,N=null,J=null;if(Bt=!_,Bt&&(_="<!-->"),typeof _!="string"&&!Rn(_))if(typeof _.toString=="function"){if(_=_.toString(),typeof _!="string")throw pt("dirty is not a string, aborting")}else throw pt("toString is not a function");if(!e.isSupported)return _;if(st||qt(r),e.removed=[],typeof _=="string"&&(Ne=!1),Ne){if(_.nodeName){const De=V(_.nodeName);if(!B[De]||Oe[De])throw pt("root node is forbidden and cannot be sanitized in-place")}}else if(_ instanceof u)m=An("<!---->"),b=m.ownerDocument.importNode(_,!0),b.nodeType===ft.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?m=b:m.appendChild(b);else{if(!f&&!Re&&!Ce&&_.indexOf("<")===-1)return E&&v?E.createHTML(_):_;if(m=An(_),!m)return f?null:v?le:""}m&&at&&we(m.firstChild);const q=En(Ne?_:m);for(;N=q.nextNode();)Cn(N),Dn(N),N.content instanceof i&&Ms(N.content);if(Ne)return _;if(f){if(g)for(J=X.call(m.ownerDocument);m.firstChild;)J.appendChild(m.firstChild);else J=m;return(j.shadowroot||j.shadowrootmode)&&(J=Xe.call(a,J,!0)),J}let ie=Ce?m.outerHTML:m.innerHTML;return Ce&&B["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&ne(Rs,m.ownerDocument.doctype.name)&&(ie="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
|
|
60
|
+
`+ie),Re&&St([_e,xe,pe],De=>{ie=ut(ie,De," ")}),E&&v?E.createHTML(ie):ie},e.setConfig=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};qt(_),st=!0},e.clearConfig=function(){We=null,st=!1},e.isValidAttribute=function(_,r,m){We||qt({});const b=V(_),N=V(r);return In(b,N,m)},e.addHook=function(_,r){typeof r=="function"&&ct(U[_],r)},e.removeHook=function(_,r){if(r!==void 0){const m=Pr(U[_],r);return m===-1?void 0:Or(U[_],m,1)[0]}return Yn(U[_])},e.removeHooks=function(_){U[_]=[]},e.removeAllHooks=function(){U=es()},e}var Qr=Cs();const Xr={class:"prd-viewer"},Jr={key:0,class:"flex items-center justify-center py-8"},el=["innerHTML"],tl=F({__name:"Viewer",props:{content:{}},setup(s){const e=s,t=z(""),a=z(!0),n={ADD_TAGS:["style"],ADD_ATTR:["style","class","target","rel"]},i=new I.Renderer;i.link=({href:d,title:p,text:h})=>{const k=p?` title="${p}"`:"";return`<a href="${d}"${k} target="_blank" rel="noopener noreferrer">${h}</a>`};async function l(d,p){try{return await ca(d,{lang:p||"text",themes:{light:"github-light",dark:"github-dark"}})}catch{return`<pre><code class="language-${p}">${u(d)}</code></pre>`}}function u(d){return d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function o(d){const p=/```(\w*)\n([\s\S]*?)```/g,h=[];let k=0;const w=d.replace(p,(O,T,L)=>{const E=`CODEBLOCK${k++}PLACEHOLDER`;return h.push({placeholder:E,lang:T||"text",code:L.trim()}),E});I.setOptions({renderer:i,gfm:!0,breaks:!0});let x=await I.parse(w);const H=h.map(async({placeholder:O,lang:T,code:L})=>{const E=await l(L,T);return{placeholder:O,highlighted:E}}),G=await Promise.all(H);for(const{placeholder:O,highlighted:T}of G)x=x.replace(`<p>${O}</p>`,T),x=x.replace(O,T);return Qr.sanitize(x,n)}return Fe(()=>e.content,async d=>{if(!d){t.value="",a.value=!1;return}a.value=!0;try{t.value=await o(d)}finally{a.value=!1}},{immediate:!0}),(d,p)=>(y(),D("div",Xr,[c(a)?(y(),D("div",Jr,[...p[0]||(p[0]=[P("div",{class:"size-6 animate-spin rounded-full border-2 border-primary border-t-transparent"},null,-1)])])):(y(),D("div",{key:1,class:"prose prose-sm dark:prose-invert max-w-none",innerHTML:c(t)},null,8,el))]))}}),nl=Object.assign(tl,{__name:"PrdViewer"}),sl=F({__name:"Card",props:{class:{}},setup(s){const e=s;return(t,a)=>(y(),D("div",{"data-slot":"card",class:ke(c(be)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e.class))},[K(t.$slots,"default")],2))}}),al=Object.assign(sl,{__name:"UiCard"}),rl=F({__name:"CardAction",props:{class:{}},setup(s){const e=s;return(t,a)=>(y(),D("div",{"data-slot":"card-action",class:ke(c(be)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e.class))},[K(t.$slots,"default")],2))}});Object.assign(rl,{__name:"UiCardAction"});const ll=F({__name:"CardContent",props:{class:{}},setup(s){const e=s;return(t,a)=>(y(),D("div",{"data-slot":"card-content",class:ke(c(be)("px-6",e.class))},[K(t.$slots,"default")],2))}}),il=Object.assign(ll,{__name:"UiCardContent"}),ol=F({__name:"CardDescription",props:{class:{}},setup(s){const e=s;return(t,a)=>(y(),D("p",{"data-slot":"card-description",class:ke(c(be)("text-muted-foreground text-sm",e.class))},[K(t.$slots,"default")],2))}});Object.assign(ol,{__name:"UiCardDescription"});const cl=F({__name:"CardFooter",props:{class:{}},setup(s){const e=s;return(t,a)=>(y(),D("div",{"data-slot":"card-footer",class:ke(c(be)("flex items-center px-6 [.border-t]:pt-6",e.class))},[K(t.$slots,"default")],2))}});Object.assign(cl,{__name:"UiCardFooter"});const ul=F({__name:"CardHeader",props:{class:{}},setup(s){const e=s;return(t,a)=>(y(),D("div",{"data-slot":"card-header",class:ke(c(be)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e.class))},[K(t.$slots,"default")],2))}});Object.assign(ul,{__name:"UiCardHeader"});const pl=F({__name:"CardTitle",props:{class:{}},setup(s){const e=s;return(t,a)=>(y(),D("h3",{"data-slot":"card-title",class:ke(c(be)("leading-none font-semibold",e.class))},[K(t.$slots,"default")],2))}});Object.assign(pl,{__name:"UiCardTitle"});const dl={class:"flex items-center justify-between gap-2 mb-1.5"},fl={class:"text-sm font-medium leading-snug"},hl={class:"text-muted-foreground"},gl={key:0,class:"mt-2 flex items-center gap-1.5 text-xs text-destructive"},ml=F({__name:"Card",props:{task:{},blockedBy:{}},emits:["click"],setup(s,{emit:e}){const t=s,a=e,n=$(()=>{switch(t.task.category){case"setup":return{label:"Setup",variant:"secondary"};case"feature":return{label:"Feature",variant:"default"};case"integration":return{label:"Integration",variant:"outline"};case"testing":return{label:"Testing",variant:"secondary"};case"documentation":return{label:"Docs",variant:"secondary"};default:return{label:t.task.category,variant:"secondary"}}}),i=$(()=>{switch(t.task.priority){case"critical":return{icon:Fn,class:"text-destructive",label:"Critical"};case"high":return{icon:Fn,class:"text-orange-500",label:"High"};case"medium":return{icon:Mn,class:"text-muted-foreground",label:"Medium"};case"low":return{icon:ga,class:"text-muted-foreground",label:"Low"};default:return{icon:Mn,class:"text-muted-foreground",label:"Unknown"}}}),l=$(()=>t.blockedBy&&t.blockedBy.length>0),u=$(()=>{const h=t.task.id.match(/(\d+)$/)?.[1];return h?parseInt(h,10):0}),o=$(()=>t.blockedBy?.length??0);function d(){a("click",t.task)}return(p,h)=>(y(),te(c(al),{class:ke(["cursor-pointer py-0 gap-0 transition-all hover:shadow-md hover:border-primary/50",{"opacity-60":c(l)}]),onClick:d},{default:C(()=>[A(c(il),{class:"p-2.5"},{default:C(()=>[P("div",dl,[A(c(on),{variant:c(n).variant,class:"text-xs"},{default:C(()=>[Pe(ee(c(n).label),1)]),_:1},8,["variant"]),(y(),te(is(c(i).icon),{class:ke(["size-4",c(i).class]),title:c(i).label},null,8,["class","title"]))]),P("h4",fl,[P("span",hl,"#"+ee(c(u)),1),Pe(" "+ee(s.task.title),1)]),c(l)?(y(),D("div",gl,[A(c(as),{class:"size-3.5"}),P("span",null,"Blocked by "+ee(c(o))+" task"+ee(c(o)===1?"":"s"),1)])):me("",!0)]),_:1})]),_:1},8,["class"]))}}),kl=Object.assign(ml,{__name:"TasksCard"}),bl={class:"flex h-full min-w-56 flex-1 flex-col overflow-hidden rounded-lg border border-border bg-card"},_l={class:"text-sm font-medium"},xl={class:"ml-auto text-xs text-muted-foreground"},yl={class:"scrollbar-hide min-h-0 flex-1 overflow-y-auto p-1.5"},Tl={class:"space-y-1.5"},vl={key:0,class:"py-8 text-center text-sm text-muted-foreground"},wl=F({__name:"Column",props:{status:{},tasks:{},blockedByMap:{}},emits:["taskClick"],setup(s,{emit:e}){const t=s,a=e,n=$(()=>{switch(t.status){case"pending":return{label:"Pending",icon:Nn,headerClass:"bg-muted/50",iconClass:"text-muted-foreground"};case"in_progress":return{label:"In Progress",icon:ka,headerClass:"bg-blue-500/10",iconClass:"text-blue-500"};case"completed":return{label:"Completed",icon:Zs,headerClass:"bg-green-500/10",iconClass:"text-green-500"};default:return{label:t.status,icon:Nn,headerClass:"bg-muted/50",iconClass:"text-muted-foreground"}}});function i(u){return t.blockedByMap?.get(u)??[]}function l(u){a("taskClick",u)}return(u,o)=>{const d=kl;return y(),D("div",bl,[P("div",{class:ke(["flex items-center gap-2 rounded-t-lg border-b border-border px-3 py-2",c(n).headerClass])},[(y(),te(is(c(n).icon),{class:ke(["size-4",c(n).iconClass])},null,8,["class"])),P("h3",_l,ee(c(n).label),1),P("span",xl,ee(s.tasks.length),1)],2),P("div",yl,[P("div",Tl,[(y(!0),D(os,null,cs(s.tasks,p=>(y(),te(d,{key:p.id,task:p,"blocked-by":i(p.id),onClick:l},null,8,["task","blocked-by"]))),128)),s.tasks.length===0?(y(),D("div",vl," No tasks ")):me("",!0)])])])}}}),Sl=Object.assign(ha(wl,[["__scopeId","data-v-a1317eba"]]),{__name:"TasksColumn"}),Al={class:"flex h-full gap-3 overflow-x-auto pb-2"},El=F({__name:"Board",props:{tasks:{}},emits:["taskClick"],setup(s,{emit:e}){const t=s,a=e;function n(h){const w=h.id.match(/(\d+)$/)?.[1];return w?parseInt(w,10):0}const i=$(()=>t.tasks.filter(h=>h.status==="pending").sort((h,k)=>n(h)-n(k))),l=$(()=>t.tasks.filter(h=>h.status==="in_progress").sort((h,k)=>n(h)-n(k))),u=$(()=>t.tasks.filter(h=>h.status==="completed").sort((h,k)=>{const w=h.completedAt?new Date(h.completedAt).getTime():0;return(k.completedAt?new Date(k.completedAt).getTime():0)-w})),o=$(()=>{const h=new Map,k=new Set(u.value.map(w=>w.id));for(const w of t.tasks)if(w.dependencies.length>0){const x=w.dependencies.filter(H=>!k.has(H));x.length>0&&h.set(w.id,x)}return h}),d=[{status:"pending",tasks:i},{status:"in_progress",tasks:l},{status:"completed",tasks:u}];function p(h){a("taskClick",h)}return(h,k)=>{const w=Sl;return y(),D("div",Al,[(y(),D(os,null,cs(d,x=>A(w,{key:x.status,status:x.status,tasks:x.tasks.value,"blocked-by-map":c(o),onTaskClick:p},null,8,["status","tasks","blocked-by-map"])),64))])}}}),Rl=Object.assign(El,{__name:"TasksBoard"}),Cl=F({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,a=e,n=Pt(t,"class"),i=Fs(n,a);return(l,u)=>(y(),te(c(Ea),Ot({"data-slot":"tabs"},c(i),{class:c(be)("flex flex-col gap-2",t.class)}),{default:C(o=>[K(l.$slots,"default",aa(ra(o)))]),_:3},16,["class"]))}}),Il=Object.assign(Cl,{__name:"UiTabs"}),Ll=F({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(s){const e=s,t=Pt(e,"class");return(a,n)=>(y(),te(c(Ca),Ot({"data-slot":"tabs-content",class:c(be)("flex-1 outline-none",e.class)},c(t)),{default:C(()=>[K(a.$slots,"default")]),_:3},16,["class"]))}}),Xt=Object.assign(Ll,{__name:"UiTabsContent"}),Dl=F({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(s){const e=s,t=Pt(e,"class");return(a,n)=>(y(),te(c(La),Ot({"data-slot":"tabs-list"},c(t),{class:c(be)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e.class)}),{default:C(()=>[K(a.$slots,"default")]),_:3},16,["class"]))}}),Pl=Object.assign(Dl,{__name:"UiTabsList"}),Ol=F({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(s){const e=s,t=Pt(e,"class"),a=Bs(t);return(n,i)=>(y(),te(c(Pa),Ot({"data-slot":"tabs-trigger",class:c(be)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e.class)},c(a)),{default:C(()=>[K(n.$slots,"default")]),_:3},16,["class"]))}}),Jt=Object.assign(Ol,{__name:"UiTabsTrigger"}),$l={class:"h-full p-4 md:p-6"},Ml={key:0,class:"flex h-full items-center justify-center"},Nl={class:"flex flex-col items-center gap-4"},zl={key:1,class:"flex h-full items-center justify-center"},Fl={class:"flex max-w-md flex-col items-center gap-4 text-center"},Bl={class:"text-sm text-muted-foreground"},Ul={class:"flex gap-3"},ql={key:2,class:"mx-auto max-w-6xl space-y-6"},Hl={class:"flex flex-wrap items-start justify-between gap-3"},Gl={class:"space-y-2"},jl={class:"flex flex-wrap items-center gap-2"},Vl={class:"text-2xl font-bold tracking-tight"},Wl={key:0},Yl={key:1},Zl={key:0,class:"text-xs text-muted-foreground"},Kl={class:"rounded-lg border border-border bg-card p-4 md:p-6"},Ql={key:0,class:"h-[calc(100vh-280px)] min-h-[400px]"},Xl={key:1,class:"py-12 text-center"},Jl={class:"h-[calc(100vh-300px)] min-h-[440px] motion-safe:transition-[opacity,transform] motion-safe:duration-200 motion-safe:ease-[var(--ease-out-cubic)] motion-reduce:transition-none"},en="prd-viewer-tab",Ze="task",Ke="taskPrd",ci=F({__name:"[prd]",setup(s){function e(f){return f==="document"||f==="board"||f==="graph"}function t(f){if(typeof f=="string"){const g=f.trim();return g.length>0?g:null}if(Array.isArray(f)&&f.length>0){const g=f[0];if(typeof g=="string"){const v=g.trim();return v.length>0?v:null}}return null}function a(f){const g=f;return g.statusCode??g.status}function n(f,g){const v=f;return v.data?.message||v.statusMessage||v.message||g}const i=la(),l=ia(),{selectRepo:u}=Gs(),{prds:o,showArchived:d,setPrdArchived:p,fetchDocument:h,fetchTasks:k,fetchProgress:w,fetchTaskCommits:x,fetchPrdGraph:H}=js(),{showError:G}=Vs(),O=$(()=>i.params.repo),T=$(()=>i.params.prd),L=z(null),E=z(null),le=z(null),Q=z(!0),oe=z(null),X=z("document"),Y=z(null),Xe=z(!1),U=z(null),_e=z({}),xe=z(null),pe=z(null),ye=z(!1),Te=z([]),Me=z(!1),He=$(()=>t(i.query[Ze])),kt=$(()=>t(i.query[Ke])),Je=$(()=>He.value?{taskId:He.value,prdSlug:kt.value||T.value}:null);function B(f,g){_e.value={..._e.value,[f]:g}}async function et(f){if(f===T.value)return E.value;if(Object.prototype.hasOwnProperty.call(_e.value,f))return _e.value[f]??null;try{const g=await k(f);return B(f,g),g}catch(g){return G("Failed to load tasks",n(g,`Could not load tasks for ${f}.`)),null}}function j(){const f={};for(const[g,v]of Object.entries(i.query))if(!(g===Ze||g===Ke)){if(typeof v=="string"){f[g]=v;continue}if(Array.isArray(v)){const W=v.filter(ce=>typeof ce=="string");W.length>0&&(f[g]=W)}}return f}async function Ge(f,g=null){const v=j();f&&(v[Ze]=f,g&&g!==T.value&&(v[Ke]=g));const W=typeof v[Ze]=="string"?v[Ze]:null,ce=typeof v[Ke]=="string"?v[Ke]:null;He.value===W&&kt.value===ce||await l.replace({query:v})}async function M(f,g){xe.value=f,pe.value=g,ye.value=!0,Te.value=[],await Ge(f.id,g);try{Te.value=await x(g,f.id)}catch(v){Te.value=[],G("Failed to load commits",n(v,"Could not resolve commits for this task."))}}async function Oe(){const f=Je.value;if(!f){xe.value=null,pe.value=null,Te.value=[],ye.value=!1;return}const v=(await et(f.prdSlug))?.tasks.find(ce=>ce.id===f.taskId);if(!v){xe.value=null,pe.value=null,Te.value=[],ye.value=!1,G("Task unavailable",`Could not find ${f.taskId} in ${f.prdSlug}.`),await Ge(null);return}const W=xe.value?.id===v.id&&pe.value===f.prdSlug;if(xe.value=v,pe.value=f.prdSlug,ye.value=!0,!W)try{Te.value=await x(f.prdSlug,v.id)}catch(ce){Te.value=[],G("Failed to load commits",n(ce,"Could not resolve commits for this task."))}}const tt=$(()=>{const f=new Map,g=pe.value||T.value,v=g===T.value?E.value:_e.value[g]??null;if(!v?.tasks)return f;for(const W of v.tasks)f.set(W.id,W.title);return f});function Ee(f){f.key===en&&f.newValue&&e(f.newValue)&&(X.value=f.newValue)}Rt(()=>{const f=localStorage.getItem(en);f&&e(f)&&(X.value=f),window.addEventListener("storage",Ee)}),ls(()=>{window.removeEventListener("storage",Ee)}),Fe(X,f=>{localStorage.setItem(en,f)});const bt=oa("fileChangeEvent",z(null));async function nt(){try{const f=await h(T.value);f&&(L.value=f,oe.value=null)}catch(f){if(a(f)===404){oe.value=`PRD "${T.value}" not found in this repository.`;return}G("Failed to reload PRD",n(f,"Could not refresh the PRD document."))}}async function _t(){try{const[f,g]=await Promise.all([k(T.value),w(T.value)]);E.value=f,le.value=g,B(T.value,f)}catch(f){G("Failed to refresh task state",n(f,"Could not refresh tasks and progress."))}}async function je(f=!1){Xe.value=!0;try{if(!f&&Y.value?.prdSlug===T.value)return;const g=await H(T.value);if(!g){U.value="Failed to load PRD graph.";return}Y.value=g,U.value=null}catch(g){U.value=n(g,"Failed to load PRD graph.")}finally{Xe.value=!1}}async function Re(f=!1){X.value==="graph"&&await je(f)}async function $e(){Q.value=!0,oe.value=null,U.value=null,Y.value=null,_e.value={};try{u(O.value);const[f,g,v]=await Promise.all([h(T.value),k(T.value),w(T.value)]);if(!f){oe.value=`PRD "${T.value}" not found in this repository.`;return}L.value=f,E.value=g,le.value=v,B(T.value,g),!g&&X.value==="board"&&(X.value="document"),await Re(),await Oe()}catch(f){const g=a(f);g===404?oe.value=`PRD "${T.value}" not found. Check if the file exists in docs/prd/.`:g===500?(oe.value="Server error while loading the PRD. Check the file format.",G("Server error",n(f,"Failed to read PRD file"))):(oe.value="Failed to load PRD document. Please try again.",G("Load failed",n(f,"Could not fetch the PRD document")))}finally{Q.value=!1}}Fe(X,async f=>{f==="graph"&&await Re()}),Fe(()=>[i.query[Ze],i.query[Ke],T.value],async()=>{Q.value||await Oe()}),Fe(ye,async f=>{!f&&Je.value&&await Ge(null)}),Fe(()=>bt.value,async f=>{if(!f)return;if(f.category==="prd"){await nt(),X.value==="graph"&&await je(!0);return}if(f.category!=="tasks"&&f.category!=="progress")return;const g=f.path?.includes(`/${T.value}/`)??!1;g&&(await _t(),Y.value=null),X.value==="graph"&&g&&await je(!0)}),Rt($e),Fe([O,T],$e);async function Ce(f){await M(f,T.value)}async function st(f){const v=(await et(f.prdSlug))?.tasks.find(W=>W.id===f.taskId);if(!v){G("Task unavailable",`Could not find ${f.taskId} in ${f.prdSlug}.`);return}await M(v,f.prdSlug)}async function at(f){if(!(!L.value||Me.value)){Me.value=!0;try{const g=await p(T.value,f);if(L.value&&(L.value={...L.value,archived:g.archived,archivedAt:g.archivedAt}),f&&!d.value){const v=o.value?.find(W=>W.slug!==T.value);v?await l.push(`/${O.value}/${v.slug}`):await l.push("/")}}catch(g){G("Failed to update archive state",n(g,"Could not update this PRD archive state."))}finally{Me.value=!1}}}return(f,g)=>{const v=Ns,W=Ba,ce=nl,Nt=Rl,rt=Qs,Ne=Ks;return y(),D("div",$l,[c(Q)?(y(),D("div",Ml,[P("div",Nl,[A(c(Us),{class:"size-8 animate-spin text-primary"}),g[3]||(g[3]=P("p",{class:"text-sm text-muted-foreground"},"Loading PRD...",-1))])])):c(oe)?(y(),D("div",zl,[P("div",Fl,[A(c(as),{class:"size-12 text-destructive"}),g[6]||(g[6]=P("h2",{class:"text-lg font-semibold"},"Error Loading PRD",-1)),P("p",Bl,ee(c(oe)),1),P("div",Ul,[A(c(jt),{variant:"outline",size:"sm",onClick:$e},{default:C(()=>[A(c(qs),{class:"mr-2 size-4"}),g[4]||(g[4]=Pe(" Retry ",-1))]),_:1}),A(v,{to:"/"},{default:C(()=>[A(c(jt),{variant:"ghost",size:"sm"},{default:C(()=>[...g[5]||(g[5]=[Pe(" Go back home ",-1)])]),_:1})]),_:1})])])])):c(L)?(y(),D("div",ql,[P("div",Hl,[P("div",Gl,[P("div",jl,[P("h1",Vl,ee(c(L).name),1),c(L).archived?(y(),te(c(on),{key:0,variant:"outline",class:"text-[10px] uppercase tracking-wide"},{default:C(()=>[...g[7]||(g[7]=[Pe(" Archived ",-1)])]),_:1})):me("",!0)]),A(W,{metadata:c(L).metadata},null,8,["metadata"])]),A(c(jt),{variant:"outline",size:"sm",disabled:c(Me),onClick:g[0]||(g[0]=de=>at(!c(L).archived))},{default:C(()=>[c(Me)?(y(),D("span",Wl,"Saving...")):(y(),D("span",Yl,ee(c(L).archived?"Restore document":"Archive document"),1))]),_:1},8,["disabled"])]),A(c(Il),{modelValue:c(X),"onUpdate:modelValue":g[1]||(g[1]=de=>zn(X)?X.value=de:null),class:"w-full"},{default:C(()=>[A(c(Pl),null,{default:C(()=>[A(c(Jt),{value:"document",class:"gap-2"},{default:C(()=>[A(c(Ws),{class:"size-4"}),g[8]||(g[8]=Pe(" Document ",-1))]),_:1}),A(c(Jt),{value:"board",class:"gap-2",disabled:!c(E)},{default:C(()=>[A(c(Bn),{class:"size-4"}),g[9]||(g[9]=Pe(" Task Board ",-1)),c(E)?(y(),D("span",Zl," ("+ee(c(E).tasks.length)+") ",1)):me("",!0)]),_:1},8,["disabled"]),A(c(Jt),{value:"graph",class:"gap-2"},{default:C(()=>[A(c(Hs),{class:"size-4"}),g[10]||(g[10]=Pe(" Graph ",-1))]),_:1})]),_:1}),A(c(Xt),{value:"document",class:"mt-4"},{default:C(()=>[P("div",Kl,[A(ce,{content:c(L).content},null,8,["content"])])]),_:1}),A(c(Xt),{value:"board",class:"mt-4"},{default:C(()=>[c(E)?(y(),D("div",Ql,[A(Nt,{tasks:c(E).tasks,onTaskClick:Ce},null,8,["tasks"])])):(y(),D("div",Xl,[A(c(Bn),{class:"mx-auto size-12 text-muted-foreground/50"}),g[11]||(g[11]=P("p",{class:"mt-4 text-muted-foreground"}," No tasks found for this PRD ",-1)),g[12]||(g[12]=P("p",{class:"mt-1 text-sm text-muted-foreground/70"}," Task state has not been generated for this PRD yet. ",-1))]))]),_:1}),A(c(Xt),{value:"graph",class:"mt-4"},{default:C(()=>[P("div",Jl,[A(rt,{payload:c(Y),scope:"prd",loading:c(Xe),error:c(U),onTaskClick:st},null,8,["payload","loading","error"])])]),_:1})]),_:1},8,["modelValue"])])):me("",!0),A(Ne,{open:c(ye),"onUpdate:open":g[2]||(g[2]=de=>zn(ye)?ye.value=de:null),task:c(xe),"task-titles":c(tt),commits:c(Te),"repo-id":c(O),"task-prd-slug":c(pe),"current-prd-slug":c(T)},null,8,["open","task","task-titles","commits","repo-id","task-prd-slug","current-prd-slug"])])}}});export{ci as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s}from"./DlAUqK2U.js";import{u as i}from"
|
|
1
|
+
import{_ as s}from"./DlAUqK2U.js";import{u as i}from"./Cg4hnDua.js";import{o as a,c as u,a as e,t as o}from"./BCiXS3ZV.js";const l={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},c={class:"max-w-520px text-center"},d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},status:{type:Number,default:500},statusText:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const r=t;return i({title:`${r.status} - ${r.statusText} | ${r.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,n)=>(a(),u("div",l,[n[0]||(n[0]=e("div",{class:"-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight"},null,-1)),e("div",c,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:o(t.status)},null,8,d),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:o(t.description)},null,8,p)])]))}},x=s(f,[["__scopeId","data-v-647e9bc1"]]);export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a}from"./
|
|
1
|
+
import{_ as a}from"./DEekox9p.js";import{_ as i}from"./DlAUqK2U.js";import{u}from"./Cg4hnDua.js";import{o as c,c as l,a as e,t as r,b as d,w as p,d as f}from"./BCiXS3ZV.js";const m={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},g={class:"max-w-520px text-center z-20"},h=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},status:{type:Number,default:404},statusText:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return u({title:`${n.status} - ${n.statusText} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,o)=>{const s=a;return c(),l("div",m,[o[0]||(o[0]=e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),e("div",g,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:r(t.status)},null,8,h),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:r(t.description)},null,8,b),e("div",x,[d(s,{to:"/",class:"cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"},{default:p(()=>[f(r(t.backHome),1)]),_:1})])])])}}},N=i(y,[["__scopeId","data-v-a548e1ee"]]);export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as P,l as e,X as Et,g as T,k as ce,o as d,x as _,L as V,c as S,n as z,F as ae,r as ne,v as At,B as ge,w as c,y as L,q as C,b as p,G as Ce,p as Ee,a7 as Dt,z as ie,A as pe,a8 as Pt,a9 as Oe,a as u,H as le,t as D,d as N,E as Tt,aa as Bt,j as st,M as Ke,ab as It,ac as Mt,m as we,Y as Ot,J as Le,K as Fe,a5 as ze,ad as at,a6 as Lt,V as Ft,ae as zt,af as Vt}from"./BCiXS3ZV.js";import{c as fe,i as Ve,g as jt,h as ot,d as nt,P as me,j as Be,f as qt,B as re,u as Ae,o as Kt,b as lt,a as He,F as je,r as se,e as Y,k as Ht}from"./xc3v2JZH.js";import{v as Ut,V as Nt,u as Gt,c as Se,a as De,b as Wt,w as Qt,L as rt,T as Xt,f as Jt,t as it,k as Yt,s as Zt,r as es,m as ts,n as ss,o as as,p as os,S as ns,G as ut,g as ls,h as rs,i as is,j as us,C as ds,R as dt,B as Je,d as ye,D as cs,x as Ue,y as ct,z as pt,A as ft,X as mt,e as Pe,E as ps,F as fs,H as ms,l as vs,K as hs}from"./CCruYste.js";import{F as gs,I as ys,a as qe}from"./D2RLSKEu.js";import{b as Ne,u as Ge,g as _s,A as bs}from"./CIIE0-WR.js";import{_ as xs}from"./DEekox9p.js";const vt=fe("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);const ws=fe("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const ht=fe("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);const gt=fe("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);const ks=fe("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const yt=fe("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);const Cs=fe("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);function Ss(a,t,s){const o=a.findIndex(l=>Ve(l,t)),r=a.findIndex(l=>Ve(l,s));if(o===-1||r===-1)return[];const[i,n]=[o,r].sort((l,f)=>l-f);return a.slice(i,n+1)}function $s(a){const t=P(()=>e(a)),s=P(()=>new Intl.Collator("en",{usage:"search",...t.value}));return{startsWith:(n,l)=>l.length===0?!0:(n=n.normalize("NFC"),l=l.normalize("NFC"),s.value.compare(n.slice(0,l.length),l)===0),endsWith:(n,l)=>l.length===0?!0:(n=n.normalize("NFC"),l=l.normalize("NFC"),s.value.compare(n.slice(-l.length),l)===0),contains:(n,l)=>{if(l.length===0)return!0;n=n.normalize("NFC"),l=l.normalize("NFC");let f=0;const v=l.length;for(;f+v<=n.length;f++){const x=n.slice(f,f+v);if(s.value.compare(l,x)===0)return!0}return!1}}}function Rs(a){return P(()=>Et(a)?!!jt(a)?.closest("form"):!0)}function Es(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}function As(a){const t=ot("",1e3);return{search:t,handleTypeaheadSearch:(r,i)=>{t.value=t.value+r;{const n=Ut(),l=i.map(m=>({...m,textValue:m.value?.textValue??m.ref.textContent?.trim()??""})),f=l.find(m=>m.ref===n),v=l.map(m=>m.textValue),x=Ps(v,t.value,f?.textValue),y=l.find(m=>m.textValue===x);return y&&y.ref.focus(),y?.ref}},resetTypeahead:()=>{t.value=""}}}function Ds(a,t){return a.map((s,o)=>a[(t+o)%a.length])}function Ps(a,t,s){const r=t.length>1&&Array.from(t).every(v=>v===t[0])?t[0]:t,i=s?a.indexOf(s):-1;let n=Ds(a,Math.max(i,0));r.length===1&&(n=n.filter(v=>v!==s));const f=n.find(v=>v.toLowerCase().startsWith(r.toLowerCase()));return f!==s?f:void 0}var Ts=T({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(a){const t=a,{primitiveElement:s,currentElement:o}=Ne(),r=P(()=>t.checked??t.value);return ce(r,(i,n)=>{if(!o.value)return;const l=o.value,f=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(f,"value").set;if(x&&i!==n){const y=new Event("input",{bubbles:!0}),m=new Event("change",{bubbles:!0});x.call(l,i),l.dispatchEvent(y),l.dispatchEvent(m)}}),(i,n)=>(d(),_(Nt,V({ref_key:"primitiveElement",ref:s},{...t,...i.$attrs},{as:"input"}),null,16))}}),Ye=Ts,Bs=T({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(a){const t=a,s=P(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),o=P(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((r,i)=>typeof r=="object"?Object.entries(r).map(([n,l])=>({name:`${t.name}[${i}][${n}]`,value:l})):{name:`${t.name}[${i}]`,value:r}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([r,i])=>({name:`${t.name}[${r}]`,value:i})):[]);return(r,i)=>(d(),S(ae,null,[z(" We render single input if it's required "),s.value?(d(),_(Ye,V({key:r.name},{...t,...r.$attrs},{name:r.name,value:r.value}),null,16,["name","value"])):(d(!0),S(ae,{key:1},ne(o.value,n=>(d(),_(Ye,V({key:n.name},{ref_for:!0},{...t,...r.$attrs},{name:n.name,value:n.value}),null,16,["name","value"]))),128))],2112))}}),Is=Bs;function Ms(a,t,s){return a===void 0?!1:Array.isArray(a)?a.some(o=>ke(o,t,s)):ke(a,t,s)}function ke(a,t,s){return a===void 0||t===void 0?!1:typeof a=="string"?a===t:typeof s=="function"?s(a,t):typeof s=="string"?a?.[s]===t?.[s]:Ve(a,t)}const[We,Os]=Se("ListboxRoot");var Ls=T({__name:"ListboxRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:"vertical"},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:"toggle"},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(a,{expose:t,emit:s}){const o=a,r=s,{multiple:i,highlightOnHover:n,orientation:l,disabled:f,selectionBehavior:v,dir:x}=At(o),{getItems:y}=Ge({isProvider:!0}),{handleTypeaheadSearch:m}=As(),{primitiveElement:k,currentElement:h}=Ne(),B=Es(),Q=Gt(x),Z=Rs(h),q=C(),w=C(!1),$=C(!0),E=nt(o,"modelValue",r,{defaultValue:o.defaultValue??(i.value?[]:void 0),passive:o.modelValue===void 0,deep:!0});function X(g){if(w.value=!0,o.multiple){const R=Array.isArray(E.value)?[...E.value]:[],A=R.findIndex(U=>ke(U,g,o.by));o.selectionBehavior==="toggle"?(A===-1?R.push(g):R.splice(A,1),E.value=R):(E.value=[g],q.value=g)}else o.selectionBehavior==="toggle"&&ke(E.value,g,o.by)?E.value=void 0:E.value=g;setTimeout(()=>{w.value=!1},1)}const O=C(null),ee=C(null),W=C(!1),ue=C(!1),ve=Be(),te=Be(),G=Be();function J(){return y().map(g=>g.ref).filter(g=>g.dataset.disabled!=="")}function K(g,R=!0){if(!g)return;O.value=g,$.value&&O.value.focus(),R&&O.value.scrollIntoView({block:"nearest"});const A=y().find(U=>U.ref===g);r("highlight",A)}function oe(g){if(W.value)G.trigger(g);else{const R=y().find(A=>ke(A.value,g,o.by));R&&(O.value=R.ref,K(R.ref))}}function I(g){O.value&&O.value.isConnected&&(g.preventDefault(),g.stopPropagation(),ue.value||O.value.click())}function j(g){if($.value){if(w.value=!0,W.value)te.trigger(g);else{const R=g.altKey||g.ctrlKey||g.metaKey;if(R&&g.key==="a"&&i.value){const A=y(),U=A.map(he=>he.value);E.value=[...U],g.preventDefault(),K(A[A.length-1].ref)}else if(!R){const A=m(g.key,y());A&&K(A)}}setTimeout(()=>{w.value=!1},1)}}function H(){ue.value=!0}function M(){ge(()=>{ue.value=!1})}function b(){ge(()=>{const g=new KeyboardEvent("keydown",{key:"PageUp"});Qe(g)})}function F(g){const R=O.value;R?.isConnected&&(ee.value=R),O.value=null,r("leave",g)}function _e(g){const R=new CustomEvent("listbox.entryFocus",{bubbles:!1,cancelable:!0});if(g.currentTarget?.dispatchEvent(R),r("entryFocus",R),!R.defaultPrevented)if(ee.value)K(ee.value);else{const A=J()?.[0];K(A)}}function Qe(g){const R=_s(g,l.value,Q.value);if(!R)return;let A=J();if(O.value){if(R==="last")A.reverse();else if(R==="prev"||R==="next"){R==="prev"&&A.reverse();const U=A.indexOf(O.value);A=A.slice(U+1)}$t(g,A[0])}if(A.length){const U=!O.value&&R==="prev"?A.length-1:0;K(A[U])}if(W.value)return te.trigger(g)}function $t(g,R){if(!(W.value||o.selectionBehavior!=="replace"||!i.value||!Array.isArray(E.value)||(g.altKey||g.ctrlKey||g.metaKey)&&!g.shiftKey)&&g.shiftKey){const U=y().filter(be=>be.ref.dataset.disabled!=="");let he=U.find(be=>be.ref===R)?.value;if(g.key===B.END?he=U[U.length-1].value:g.key===B.HOME&&(he=U[0].value),!he||!q.value)return;const Rt=Ss(U.map(be=>be.value),q.value,he);E.value=Rt}}async function Xe(g){if(await ge(),W.value)ve.trigger(g);else{const R=J(),A=R.find(U=>U.dataset.state==="checked");A?K(A):R.length&&K(R[0])}}return ce(E,()=>{w.value||ge(()=>{Xe()})},{immediate:!0,deep:!0}),t({highlightedElement:O,highlightItem:oe,highlightFirstItem:b,highlightSelected:Xe,getItems:y}),Os({modelValue:E,onValueChange:X,multiple:i,orientation:l,dir:Q,disabled:f,highlightOnHover:n,highlightedElement:O,isVirtual:W,virtualFocusHook:ve,virtualKeydownHook:te,virtualHighlightHook:G,by:o.by,firstValue:q,selectionBehavior:v,focusable:$,onLeave:F,onEnter:_e,changeHighlight:K,onKeydownEnter:I,onKeydownNavigation:Qe,onKeydownTypeAhead:j,onCompositionStart:H,onCompositionEnd:M,highlightFirstItem:b}),(g,R)=>(d(),_(e(me),{ref_key:"primitiveElement",ref:k,as:g.as,"as-child":g.asChild,dir:e(Q),"data-disabled":e(f)?"":void 0,onPointerleave:F,onFocusout:R[0]||(R[0]=async A=>{const U=A.relatedTarget||A.target;await ge(),O.value&&e(h)&&!e(h).contains(U)&&F(A)})},{default:c(()=>[L(g.$slots,"default",{modelValue:e(E)}),e(Z)&&g.name?(d(),_(e(Is),{key:0,name:g.name,value:e(E),disabled:e(f),required:g.required},null,8,["name","value","disabled","required"])):z("v-if",!0)]),_:3},8,["as","as-child","dir","data-disabled"]))}}),Fs=Ls,zs=T({__name:"ListboxContent",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(a){const{CollectionSlot:t}=Ge(),s=We(),o=ot(!1,10);return(r,i)=>(d(),_(e(t),null,{default:c(()=>[p(e(me),{role:"listbox",as:r.as,"as-child":r.asChild,tabindex:e(s).focusable.value?e(s).highlightedElement.value?"-1":"0":"-1","aria-orientation":e(s).orientation.value,"aria-multiselectable":!!e(s).multiple.value,"data-orientation":e(s).orientation.value,onMousedown:i[0]||(i[0]=Ee(n=>o.value=!0,["left"])),onFocus:i[1]||(i[1]=n=>{e(o)||e(s).onEnter(n)}),onKeydown:[i[2]||(i[2]=Ce(n=>{e(s).orientation.value==="vertical"&&(n.key==="ArrowLeft"||n.key==="ArrowRight")||e(s).orientation.value==="horizontal"&&(n.key==="ArrowUp"||n.key==="ArrowDown")||(n.preventDefault(),e(s).focusable.value&&e(s).onKeydownNavigation(n))},["down","up","left","right","home","end"])),Ce(e(s).onKeydownEnter,["enter"]),e(s).onKeydownTypeAhead]},{default:c(()=>[L(r.$slots,"default")]),_:3},8,["as","as-child","tabindex","aria-orientation","aria-multiselectable","data-orientation","onKeydown"])]),_:3}))}}),Vs=zs,js=T({__name:"ListboxFilter",props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(a,{emit:t}){const s=a,r=nt(s,"modelValue",t,{defaultValue:"",passive:s.modelValue===void 0}),i=We(),{primitiveElement:n,currentElement:l}=Ne(),f=P(()=>s.disabled||i.disabled.value||!1),v=C();return Dt(()=>v.value=i.highlightedElement.value?.id),ie(()=>{i.focusable.value=!1,setTimeout(()=>{s.autoFocus&&l.value?.focus()},1)}),pe(()=>{i.focusable.value=!0}),(x,y)=>(d(),_(e(me),{ref_key:"primitiveElement",ref:n,as:x.as,"as-child":x.asChild,value:e(r),disabled:f.value?"":void 0,"data-disabled":f.value?"":void 0,"aria-disabled":f.value??void 0,"aria-activedescendant":v.value,type:"text",onKeydown:[Ce(Ee(e(i).onKeydownNavigation,["prevent"]),["down","up","home","end"]),Ce(e(i).onKeydownEnter,["enter"])],onInput:y[0]||(y[0]=m=>{r.value=m.target.value,e(i).highlightFirstItem()}),onCompositionstart:e(i).onCompositionStart,onCompositionend:e(i).onCompositionEnd},{default:c(()=>[L(x.$slots,"default",{modelValue:e(r)})]),_:3},8,["as","as-child","value","disabled","data-disabled","aria-disabled","aria-activedescendant","onKeydown","onCompositionstart","onCompositionend"]))}}),qs=js;const[Ks,Hs]=Se("ListboxGroup");var Us=T({__name:"ListboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(a){const t=a,s=De(void 0,"reka-listbox-group");return Hs({id:s}),(o,r)=>(d(),_(e(me),V({role:"group"},t,{"aria-labelledby":e(s)}),{default:c(()=>[L(o.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),Ns=Us,Gs=T({__name:"ListboxGroupLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(a){const t=a,s=Ks({id:""});return(o,r)=>(d(),_(e(me),V(t,{id:e(s).id}),{default:c(()=>[L(o.$slots,"default")]),_:3},16,["id"]))}}),Ws=Gs;const Qs="listbox.select",[Sn,Xs]=Se("ListboxItem");var Js=T({__name:"ListboxItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["select"],setup(a,{emit:t}){const s=a,o=t,r=De(void 0,"reka-listbox-item"),{CollectionItem:i}=Ge(),{forwardRef:n,currentElement:l}=Wt(),f=We(),v=P(()=>l.value===f.highlightedElement.value),x=P(()=>Ms(f.modelValue.value,s.value,f.by)),y=P(()=>f.disabled.value||s.disabled);async function m(h){o("select",h),!h?.defaultPrevented&&!y.value&&h&&(f.onValueChange(s.value),f.changeHighlight(l.value))}function k(h){const B={originalEvent:h,value:s.value};Qt(Qs,m,B)}return Xs({isSelected:x}),(h,B)=>(d(),_(e(i),{value:h.value},{default:c(()=>[Pt([v.value,x.value],()=>p(e(me),V({id:e(r)},h.$attrs,{ref:e(n),role:"option",tabindex:e(f).focusable.value?v.value?"0":"-1":-1,"aria-selected":x.value,as:h.as,"as-child":h.asChild,disabled:y.value?"":void 0,"data-disabled":y.value?"":void 0,"data-highlighted":v.value?"":void 0,"data-state":x.value?"checked":"unchecked",onClick:k,onKeydown:Ce(Ee(k,["prevent"]),["space"]),onPointermove:B[0]||(B[0]=()=>{e(f).highlightedElement.value!==e(l)&&e(f).highlightOnHover.value&&!e(f).focusable.value&&e(f).changeHighlight(e(l),!1)})}),{default:c(()=>[L(h.$slots,"default")]),_:3},16,["id","tabindex","aria-selected","as","as-child","disabled","data-disabled","data-highlighted","data-state","onKeydown"]),B,1)]),_:3},8,["value"]))}}),Ys=Js;const _t=globalThis.setInterval,Zs=700,ea={state:"idle",version:"progress-json-v2",startedAt:null,completedAt:null,totalRows:0,processedRows:0,migratedRows:0,failedRows:0,currentSlug:null,errorMessage:null,percent:0};let xe=null,Ie=!1,$e=0;function ta(){const a=Oe("state-migration:status",()=>({...ea})),t=Oe("state-migration:initialized",()=>!1),s=P(()=>a.value.state==="running"||a.value.state==="failed");async function o(){if(!Ie){Ie=!0;try{const n=await $fetch("/api/state-migration/status",{query:{_:Date.now()}});a.value=n,t.value=!0,n.state==="completed"&&i()}catch{t.value=!0}finally{Ie=!1}}}function r(){xe||(xe=_t(()=>{o()},Zs))}function i(){xe&&(clearInterval(xe),xe=null)}return ie(()=>{$e+=1,o(),r()}),pe(()=>{$e=Math.max(0,$e-1),$e===0&&i()}),{status:a,initialized:t,isBlocking:s,refreshStatus:o}}const sa={key:0,class:"fixed inset-0 z-[110] flex items-center justify-center bg-[radial-gradient(circle_at_18%_20%,oklch(0.92_0.03_218_/_0.65),transparent_52%),radial-gradient(circle_at_82%_80%,oklch(0.95_0.04_40_/_0.5),transparent_46%),oklch(0.17_0.02_240_/_0.72)] px-4 backdrop-blur-sm",role:"alert","aria-live":"assertive","aria-busy":"true"},aa={class:"w-full max-w-xl rounded-2xl border border-border/70 bg-background/95 p-6 shadow-2xl md:p-7"},oa={class:"mb-4 flex items-start gap-3"},na={class:"flex size-11 shrink-0 items-center justify-center rounded-xl border border-border bg-muted/60"},la={class:"space-y-1"},ra={class:"text-xl font-semibold tracking-tight"},ia={class:"space-y-3 rounded-xl border border-border/80 bg-card/70 p-4"},ua={class:"flex items-center justify-between gap-3 text-sm"},da={class:"inline-flex items-center gap-1.5 text-muted-foreground"},ca={class:"font-medium tabular-nums"},pa={class:"h-2 overflow-hidden rounded-full border border-border/70 bg-muted/60"},fa={class:"text-sm text-muted-foreground"},ma={key:0,class:"mt-4 flex items-center justify-end"},va=T({__name:"StateMigrationOverlay",setup(a){const{status:t,initialized:s,isBlocking:o,refreshStatus:r}=ta(),i=qt("(prefers-reduced-motion: reduce)"),n=P(()=>Math.max(0,Math.min(100,t.value.percent))),l=P(()=>`${n.value}%`),f=P(()=>{const y=t.value.totalRows,m=t.value.processedRows;return y<=0?"Preparing migration...":`${m} of ${y} PRD states migrated`}),v=P(()=>t.value.state==="failed"?t.value.errorMessage||"Migration failed before completion.":t.value.currentSlug?`Migrating ${t.value.currentSlug}`:"Preparing migration steps"),x=P(()=>s.value&&o.value);return(y,m)=>(d(),_(Bt,{"enter-active-class":"transition-all duration-300 ease-[var(--ease-out-cubic)] motion-reduce:transition-none","enter-from-class":"opacity-0 scale-[0.98]","leave-active-class":"transition-all duration-200 ease-[var(--ease-out-cubic)] motion-reduce:transition-none","leave-to-class":"opacity-0"},{default:c(()=>[e(x)?(d(),S("div",sa,[u("div",aa,[u("div",oa,[u("div",na,[e(t).state==="running"?(d(),_(e(rt),{key:0,class:le(["size-5 text-primary",e(i)?"":"animate-spin"])},null,8,["class"])):(d(),_(e(Xt),{key:1,class:"size-5 text-destructive"}))]),u("div",la,[m[0]||(m[0]=u("p",{class:"text-sm font-semibold uppercase tracking-[0.09em] text-muted-foreground"},"Data upgrade",-1)),u("h2",ra,D(e(t).state==="running"?"One-time migration in progress":"Migration needs attention"),1),m[1]||(m[1]=u("p",{class:"text-sm text-muted-foreground"}," Steward is upgrading legacy PRD progress data to the latest format. This runs once per local database. ",-1))])]),u("div",ia,[u("div",ua,[u("span",da,[p(e(ws),{class:"size-3.5"}),N(" "+D(e(f)),1)]),u("span",ca,D(e(n))+"%",1)]),u("div",pa,[u("div",{class:le(["migration-progress-fill h-full rounded-full motion-reduce:transition-none",e(i)?"":"migration-progress-fill--animated"]),style:Tt({width:e(l)})},null,6)]),u("p",fa,D(e(v)),1)]),e(t).state==="failed"?(d(),S("div",ma,[p(e(re),{size:"sm",variant:"outline",onClick:e(r)},{default:c(()=>[...m[2]||(m[2]=[N(" Retry status check ",-1)])]),_:1},8,["onClick"])])):z("",!0)])])):z("",!0)]),_:1}))}}),ha=Object.assign(va,{__name:"LayoutStateMigrationOverlay"}),ga={class:"flex items-center gap-2 truncate"},ya={class:"truncate"},_a={key:0,class:"absolute top-full right-0 z-[9999] mt-1 w-[280px] rounded-md border bg-popover p-1 text-popover-foreground shadow-md"},ba={class:"max-h-[200px] overflow-y-auto"},xa=["aria-selected","onClick"],wa={class:"flex flex-1 flex-col gap-0.5 overflow-hidden text-left"},ka={class:"truncate font-medium"},Ca={class:"truncate text-xs text-muted-foreground"},Sa=["onClick"],$a={key:1,class:"px-2 py-1.5 text-sm text-muted-foreground"},Ra={key:2,class:"my-1 h-px bg-border"},Ea={class:"space-y-2"},Aa={class:"flex gap-2"},Da={key:0,class:"text-sm text-destructive"},Pa={key:0,class:"space-y-2 rounded-md border p-3"},Ta={class:"flex items-center gap-2 text-sm"},Ba=["disabled"],Ia={class:"flex-1 truncate font-mono text-xs text-muted-foreground"},Ma={class:"max-h-[200px] overflow-y-auto"},Oa={key:0,class:"py-2 text-center text-sm text-muted-foreground"},La={key:1,class:"py-2 text-center text-sm text-muted-foreground"},Fa=["onClick"],za={class:"truncate"},Va={key:0},ja={key:1},qa=T({__name:"RepoSelector",setup(a,{expose:t}){const s=st(),o=Ke(),{repos:r,currentRepo:i,currentRepoId:n,selectRepo:l,addRepo:f,removeRepo:v}=Ae(),{showSuccess:x}=lt(),y=Oe("prd-show-archived",()=>!1),m=C(!1),k=C(""),h=C(null);Kt(h,()=>{m.value&&(m.value=!1,k.value="")}),ce(()=>o.fullPath,()=>{m.value=!1,k.value=""});async function B(M){l(M),m.value=!1,k.value="";try{const b=await Q(M);b?s.push(`/${M}/${b}`):s.push("/")}catch{s.push("/")}}async function Q(M){return(await $fetch(`/api/repos/${M}/prds`,{query:y.value?{includeArchived:"1"}:void 0}))?.[0]?.slug||null}function Z(){m.value=!1,te.value=!0}const q=C(!1),w=C(""),$=C(null),E=C([]),X=C(!1),O=P(()=>!!$.value&&$.value!==w.value);async function ee(M){X.value=!0;try{const b=await $fetch("/api/browse",{query:{path:M||w.value||void 0}});w.value=b.current,$.value=b.parent,E.value=b.directories}catch{}finally{X.value=!1}}function W(){q.value=!0,ee(G.value||void 0)}function ue(M){G.value=M,q.value=!1,J.value=null}function ve(){const M=$.value;!O.value||!M||ee(M)}const te=C(!1),G=C(""),J=C(null),K=C(!1),oe=P(()=>{if(!k.value)return r.value;const M=k.value.toLowerCase();return r.value?.filter(b=>b.name.toLowerCase().includes(M)||b.path.toLowerCase().includes(M))??[]});async function I(){if(!G.value.trim()){J.value="Please enter a repository path";return}K.value=!0,J.value=null;try{const M=await f(G.value.trim());if(te.value=!1,G.value="",x("Repository added",M?.name||"Successfully added repository"),M?.id)try{const b=await Q(M.id);b&&s.push(`/${M.id}/${b}`)}catch{}}catch(M){if(M instanceof Error){const b=M;J.value=b.data?.message||M.message}else J.value="Failed to add repository"}finally{K.value=!1}}async function j(M,b){M.stopPropagation(),await v(b)}function H(){te.value=!1,G.value="",J.value=null}return t({openAddDialog:()=>{te.value=!0}}),(M,b)=>(d(),S("div",{ref_key:"dropdownRef",ref:h,class:"relative"},[u("button",{type:"button",class:"inline-flex h-8 w-[200px] items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-sm font-normal ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",onClick:b[0]||(b[0]=F=>m.value=!e(m))},[u("span",ga,[p(e(gs),{class:"size-4 shrink-0 text-muted-foreground"}),u("span",ya,D(e(i)?.name??"Select repository"),1)]),p(e(Jt),{class:"size-4 shrink-0 opacity-50"})]),e(m)?(d(),S("div",_a,[It(u("input",{"onUpdate:modelValue":b[1]||(b[1]=F=>we(k)?k.value=F:null),type:"text",placeholder:"Search repositories...",class:"mb-1 h-9 w-full rounded-md border border-input bg-background px-3 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"},null,512),[[Mt,e(k)]]),u("div",ba,[e(oe)?.length?(d(!0),S(ae,{key:0},ne(e(oe),F=>(d(),S("div",{key:F.id,class:"group flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground cursor-pointer",role:"option","aria-selected":e(n)===F.id,onClick:_e=>B(F.id)},[p(e(it),{class:le(["size-4 shrink-0",e(n)===F.id?"opacity-100":"opacity-0"])},null,8,["class"]),u("div",wa,[u("span",ka,D(F.name),1),u("span",Ca,D(F.path),1)]),u("button",{type:"button",class:"ml-auto opacity-0 group-hover:opacity-100 p-1 hover:bg-destructive/10 rounded transition-opacity",title:"Remove repository",onClick:_e=>j(_e,F.id)},[p(e(Cs),{class:"size-3.5 text-destructive"})],8,Sa)],8,xa))),128)):(d(),S("div",$a," No repositories found. ")),e(oe)?.length?(d(),S("div",Ra)):z("",!0),u("button",{type:"button",class:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground",onClick:Z},[p(e(Yt),{class:"size-4"}),b[5]||(b[5]=u("span",null,"Add repository...",-1))])])])):z("",!0),p(e(Zt),{open:e(te),"onUpdate:open":b[4]||(b[4]=F=>te.value=F)},{default:c(()=>[p(e(es),{side:"right",class:"flex h-full flex-col",onEscapeKeyDown:H},{default:c(()=>[p(e(ts),{class:"px-6"},{default:c(()=>[p(e(ss),null,{default:c(()=>[...b[6]||(b[6]=[N("Add Repository",-1)])]),_:1}),p(e(as),null,{default:c(()=>[...b[7]||(b[7]=[N(" Enter the absolute path to a repository containing PRD documents. ",-1)])]),_:1})]),_:1}),u("form",{id:"add-repo-form",class:"min-h-0 flex-1 space-y-4 overflow-y-auto px-6",onSubmit:Ee(I,["prevent"])},[u("div",Ea,[b[8]||(b[8]=u("label",{for:"repo-path",class:"text-sm font-medium"}," Repository Path ",-1)),u("div",Aa,[p(e(ys),{id:"repo-path",modelValue:e(G),"onUpdate:modelValue":b[2]||(b[2]=F=>we(G)?G.value=F:null),placeholder:"/path/to/your/project","aria-invalid":!!e(J),disabled:e(K),class:"flex-1"},null,8,["modelValue","aria-invalid","disabled"]),p(e(re),{type:"button",variant:"outline",size:"icon",disabled:e(K),onClick:W},{default:c(()=>[p(e(qe),{class:"size-4"})]),_:1},8,["disabled"])]),e(J)?(d(),S("p",Da,D(e(J)),1)):z("",!0),b[9]||(b[9]=u("p",{class:"text-xs text-muted-foreground"},[N(" The repository should contain a "),u("code",{class:"rounded bg-muted px-1"},"docs/prd/"),N(" directory with markdown files. ")],-1))]),e(q)?(d(),S("div",Pa,[u("div",Ta,[u("button",{type:"button",class:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",disabled:!e(O),onClick:ve},[p(e(bs),{class:"size-3"}),b[10]||(b[10]=N(" Up ",-1))],8,Ba),u("span",Ia,D(e(w)),1),p(e(re),{type:"button",variant:"ghost",size:"sm",class:"h-7 text-xs",onClick:b[3]||(b[3]=F=>ue(e(w)))},{default:c(()=>[...b[11]||(b[11]=[N(" Select ",-1)])]),_:1})]),u("div",Ma,[e(X)?(d(),S("div",Oa," Loading... ")):e(E).length?(d(!0),S(ae,{key:2},ne(e(E),F=>(d(),S("button",{key:F.path,type:"button",class:"flex w-full items-center gap-2 rounded px-2 py-1 text-sm hover:bg-accent",onClick:_e=>ee(F.path)},[p(e(qe),{class:"size-4 text-muted-foreground"}),u("span",za,D(F.name),1)],8,Fa))),128)):(d(),S("div",La," No subdirectories "))])])):z("",!0)],32),p(e(os),{class:"px-6 pb-6"},{default:c(()=>[p(e(re),{type:"button",variant:"outline",disabled:e(K),onClick:H},{default:c(()=>[...b[12]||(b[12]=[N(" Cancel ",-1)])]),_:1},8,["disabled"]),p(e(re),{type:"submit",form:"add-repo-form",disabled:e(K)},{default:c(()=>[e(K)?(d(),S("span",Va,"Adding...")):(d(),S("span",ja,"Add Repository"))]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])],512))}}),Ka=Object.assign(qa,{__name:"LayoutRepoSelector"}),Ha={class:"flex h-full w-64 flex-col border-r border-border bg-background"},Ua={class:"p-2"},Na={class:"flex h-10 items-center justify-between px-2"},Ga={class:"sr-only"},Wa={key:1,class:"flex items-center justify-center py-8"},Qa={key:2,class:"px-2 py-8 text-center"},Xa={key:3,class:"px-2 py-8 text-center"},Ja={key:4,class:"px-2 py-8 text-center"},Ya={class:"mt-2 text-sm text-muted-foreground"},Za={class:"mt-1 text-xs text-muted-foreground/70"},eo={key:5,class:"space-y-1"},to={class:"flex-1 truncate"},so=T({__name:"Sidebar",setup(a){const t=Ke(),{prds:s,prdsStatus:o,showArchived:r,toggleShowArchived:i,refreshPrds:n}=He(),{currentRepoId:l}=Ae(),f=P(()=>t.params.prd);function v(m){return f.value===m}const x=P(()=>l.value?`/${l.value}/repo-graph`:"/"),y=P(()=>l.value?t.path===`/${l.value}/repo-graph`:!1);return(m,k)=>{const h=xs;return d(),S("aside",Ha,[p(e(ns),{class:"flex-1"},{default:c(()=>[u("div",Ua,[e(l)?(d(),_(h,{key:0,to:e(x),class:le(["group mb-2 flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",[e(y)?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"]])},{default:c(()=>[p(e(ut),{class:"size-4 shrink-0"}),k[0]||(k[0]=u("span",{class:"flex-1 truncate"},"Repo Graph",-1))]),_:1},8,["to","class"])):z("",!0),u("div",Na,[k[1]||(k[1]=u("h2",{class:"text-sm font-medium text-muted-foreground"},"Documents",-1)),p(e(ls),null,{default:c(()=>[p(e(rs),null,{default:c(()=>[p(e(is),{"as-child":""},{default:c(()=>[p(e(re),{variant:"ghost",size:"icon",class:"size-7 text-muted-foreground/70 hover:text-foreground",onClick:e(i)},{default:c(()=>[p(e(vt),{class:"size-3.5"}),u("span",Ga,D(e(r)?"Hide archived documents":"Show archived documents"),1)]),_:1},8,["onClick"])]),_:1}),p(e(us),{side:"bottom",align:"end"},{default:c(()=>[N(D(e(r)?"Hide archived documents":"Show archived documents"),1)]),_:1})]),_:1})]),_:1})]),e(o)==="pending"?(d(),S("div",Wa,[p(e(rt),{class:"size-5 animate-spin text-muted-foreground"})])):e(l)?e(o)==="error"?(d(),S("div",Xa,[p(e(ds),{class:"mx-auto size-8 text-destructive/50"}),k[4]||(k[4]=u("p",{class:"mt-2 text-sm text-muted-foreground"}," Failed to load PRDs ",-1)),p(e(re),{variant:"ghost",size:"sm",class:"mt-2",onClick:e(n)},{default:c(()=>[p(e(dt),{class:"mr-1 size-3"}),k[3]||(k[3]=N(" Retry ",-1))]),_:1},8,["onClick"])])):e(s)?.length?(d(),S("nav",eo,[(d(!0),S(ae,null,ne(e(s),B=>(d(),_(h,{key:B.slug,to:`/${e(l)}/${B.slug}`,class:le(["group flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",[v(B.slug)?"bg-accent text-accent-foreground":B.archived?"text-muted-foreground/75 hover:bg-accent/40 hover:text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"]])},{default:c(()=>[p(e(je),{class:"size-4 shrink-0"}),u("span",to,D(B.name),1),B.archived?(d(),_(e(Je),{key:0,variant:"outline",class:"shrink-0 text-[10px] uppercase tracking-wide"},{default:c(()=>[...k[5]||(k[5]=[N(" Archived ",-1)])]),_:1})):z("",!0),B.hasState&&B.taskCount?(d(),_(e(Je),{key:1,variant:"secondary",class:"shrink-0 text-xs"},{default:c(()=>[N(D(B.completedCount??0)+"/"+D(B.taskCount),1)]),_:2},1024)):z("",!0)]),_:2},1032,["to","class"]))),128))])):(d(),S("div",Ja,[p(e(je),{class:"mx-auto size-8 text-muted-foreground/50"}),u("p",Ya,D(e(r)?"No PRDs found":"No active PRDs found"),1),u("p",Za,D(e(r)?"Add .md files to docs/prd/":"Archived PRDs are hidden. Use the archive toggle above."),1)])):(d(),S("div",Qa,[...k[2]||(k[2]=[u("p",{class:"text-sm text-muted-foreground"}," Select a repository to view PRDs ",-1)])]))])]),_:1})])}}}),ao=Object.assign(so,{__name:"LayoutSidebar"}),oo=T({__name:"Command",props:{modelValue:{default:""},defaultValue:{},multiple:{type:Boolean},orientation:{},dir:{},disabled:{type:Boolean},selectionBehavior:{},highlightOnHover:{type:Boolean},by:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{},defaultSearch:{default:""}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(a,{emit:t}){const s=a,o=t,r=se(s,"class"),i=ye(r,o),n=C(new Map),l=C(new Map),{contains:f}=$s({sensitivity:"base"}),v=Ot({search:s.defaultSearch||"",filtered:{count:0,items:new Map,groups:new Set}});ce(()=>s.defaultSearch,y=>{y!==void 0&&(v.search=y)});function x(){if(!v.search){v.filtered.count=n.value.size;return}v.filtered.groups=new Set;let y=0;for(const[m,k]of n.value){const h=f(k,v.search);v.filtered.items.set(m,h?1:0),h&&y++}for(const[m,k]of l.value)for(const h of k)if(v.filtered.items.get(h)>0){v.filtered.groups.add(m);break}v.filtered.count=y}return ce(()=>v.search,()=>{x()}),ce(()=>n.value.size,()=>{v.search&&x()}),To({allItems:n,allGroups:l,filterState:v}),(y,m)=>(d(),_(e(Fs),V({"data-slot":"command"},e(i),{class:e(Y)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",s.class)}),{default:c(()=>[L(y.$slots,"default")]),_:3},16,["class"]))}}),no=Object.assign(oo,{__name:"UiCommand"}),lo=T({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(a,{emit:t}){const r=ye(a,t);return(i,n)=>(d(),_(e(cs),V({"data-slot":"dialog"},e(r)),{default:c(l=>[L(i.$slots,"default",Le(Fe(l)))]),_:3},16))}}),bt=Object.assign(lo,{__name:"UiDialog"}),ro=T({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(a){const t=a;return(s,o)=>(d(),_(e(Ue),V({"data-slot":"dialog-close"},t),{default:c(()=>[L(s.$slots,"default")]),_:3},16))}});Object.assign(ro,{__name:"UiDialogClose"});const io=T({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(a){const t=a,s=se(t,"class");return(o,r)=>(d(),_(e(ct),V({"data-slot":"dialog-overlay"},e(s),{class:e(Y)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",t.class)}),{default:c(()=>[L(o.$slots,"default")]),_:3},16,["class"]))}}),uo=Object.assign(io,{__name:"UiDialogOverlay"}),co=T({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},showCloseButton:{type:Boolean,default:!0}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(a,{emit:t}){const s=a,o=t,r=se(s,"class"),i=ye(r,o);return(n,l)=>(d(),_(e(pt),null,{default:c(()=>[p(uo),p(e(ft),V({"data-slot":"dialog-content"},{...n.$attrs,...e(i)},{class:e(Y)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",s.class)}),{default:c(()=>[L(n.$slots,"default"),a.showCloseButton?(d(),_(e(Ue),{key:0,"data-slot":"dialog-close",class:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},{default:c(()=>[p(e(mt)),l[0]||(l[0]=u("span",{class:"sr-only"},"Close",-1))]),_:1})):z("",!0)]),_:3},16,["class"])]),_:3}))}}),xt=Object.assign(co,{__name:"UiDialogContent"}),po=T({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(a){const t=a,s=se(t,"class"),o=Pe(s);return(r,i)=>(d(),_(e(ps),V({"data-slot":"dialog-description"},e(o),{class:e(Y)("text-muted-foreground text-sm",t.class)}),{default:c(()=>[L(r.$slots,"default")]),_:3},16,["class"]))}}),wt=Object.assign(po,{__name:"UiDialogDescription"}),fo=T({__name:"DialogFooter",props:{class:{}},setup(a){const t=a;return(s,o)=>(d(),S("div",{"data-slot":"dialog-footer",class:le(e(Y)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class))},[L(s.$slots,"default")],2))}});Object.assign(fo,{__name:"UiDialogFooter"});const mo=T({__name:"DialogHeader",props:{class:{}},setup(a){const t=a;return(s,o)=>(d(),S("div",{"data-slot":"dialog-header",class:le(e(Y)("flex flex-col gap-2 text-center sm:text-left",t.class))},[L(s.$slots,"default")],2))}}),kt=Object.assign(mo,{__name:"UiDialogHeader"}),vo=T({inheritAttrs:!1,__name:"DialogScrollContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(a,{emit:t}){const s=a,o=t,r=se(s,"class"),i=ye(r,o);return(n,l)=>(d(),_(e(pt),null,{default:c(()=>[p(e(ct),{class:"fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"},{default:c(()=>[p(e(ft),V({class:e(Y)("relative z-50 grid w-full max-w-lg my-8 gap-4 border border-border bg-background p-6 shadow-lg duration-200 sm:rounded-lg md:w-full",s.class)},{...n.$attrs,...e(i)},{onPointerDownOutside:l[0]||(l[0]=f=>{const v=f.detail.originalEvent,x=v.target;(v.offsetX>x.clientWidth||v.offsetY>x.clientHeight)&&f.preventDefault()})}),{default:c(()=>[L(n.$slots,"default"),p(e(Ue),{class:"absolute top-4 right-4 p-0.5 transition-colors rounded-md hover:bg-secondary"},{default:c(()=>[p(e(mt),{class:"w-4 h-4"}),l[1]||(l[1]=u("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["class"])]),_:3})]),_:3}))}});Object.assign(vo,{__name:"UiDialogScrollContent"});const ho=T({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(a){const t=a,s=se(t,"class"),o=Pe(s);return(r,i)=>(d(),_(e(fs),V({"data-slot":"dialog-title"},e(o),{class:e(Y)("text-lg leading-none font-semibold",t.class)}),{default:c(()=>[L(r.$slots,"default")]),_:3},16,["class"]))}}),Ct=Object.assign(ho,{__name:"UiDialogTitle"}),go=T({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(a){const t=a;return(s,o)=>(d(),_(e(ms),V({"data-slot":"dialog-trigger"},t),{default:c(()=>[L(s.$slots,"default")]),_:3},16))}});Object.assign(go,{__name:"UiDialogTrigger"});const yo=T({__name:"CommandDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean},title:{default:"Command Palette"},description:{default:"Search for a command to run..."},defaultSearch:{default:""}},emits:["update:open"],setup(a,{emit:t}){const r=ye(a,t);return(i,n)=>(d(),_(e(bt),Le(Fe(e(r))),{default:c(l=>[p(e(xt),{class:"overflow-hidden p-0","show-close-button":!1},{default:c(()=>[p(e(kt),{class:"sr-only"},{default:c(()=>[p(e(Ct),null,{default:c(()=>[N(D(a.title),1)]),_:1}),p(e(wt),null,{default:c(()=>[N(D(a.description),1)]),_:1})]),_:1}),p(no,{"default-search":a.defaultSearch},{default:c(()=>[L(i.$slots,"default",Le(Fe(l)))]),_:2},1032,["default-search"])]),_:2},1024)]),_:3},16))}}),_o=Object.assign(yo,{__name:"UiCommandDialog"}),bo=T({__name:"CommandEmpty",props:{asChild:{type:Boolean},as:{},class:{}},setup(a){const t=a,s=se(t,"class"),{filterState:o}=Te(),r=P(()=>!!o.search&&o.filtered.count===0);return(i,n)=>r.value?(d(),_(e(me),V({key:0,"data-slot":"command-empty"},e(s),{class:e(Y)("py-6 text-center text-sm",t.class)}),{default:c(()=>[L(i.$slots,"default")]),_:3},16,["class"])):z("",!0)}}),xo=Object.assign(bo,{__name:"UiCommandEmpty"}),wo=T({__name:"CommandGroup",props:{asChild:{type:Boolean},as:{},class:{},heading:{}},setup(a){const t=a,s=se(t,"class"),{allGroups:o,filterState:r}=Te(),i=De(),n=P(()=>r.search?r.filtered.groups.has(i):!0);return Io({id:i}),ie(()=>{o.value.has(i)||o.value.set(i,new Set)}),pe(()=>{o.value.delete(i)}),(l,f)=>(d(),_(e(Ns),V(e(s),{id:e(i),"data-slot":"command-group",class:e(Y)("text-foreground overflow-hidden p-1",t.class),hidden:n.value?void 0:!0}),{default:c(()=>[a.heading?(d(),_(e(Ws),{key:0,"data-slot":"command-group-heading",class:"px-2 py-1.5 text-xs font-medium text-muted-foreground"},{default:c(()=>[N(D(a.heading),1)]),_:1})):z("",!0),L(l.$slots,"default")]),_:3},16,["id","class","hidden"]))}}),Me=Object.assign(wo,{__name:"UiCommandGroup"}),ko={"data-slot":"command-input-wrapper",class:"flex h-9 items-center gap-2 border-b px-3"},Co=T({inheritAttrs:!1,__name:"CommandInput",props:{modelValue:{},autoFocus:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(a){const t=a,s=se(t,"class"),o=Pe(s),{filterState:r}=Te(),i=C(null);return ie(()=>{ge(()=>{const n=i.value?.$el;if(n&&r.search){const l=r.search.length;n.setSelectionRange(l,l)}})}),(n,l)=>(d(),S("div",ko,[p(e(ks),{class:"size-4 shrink-0 opacity-50"}),p(e(qs),V({ref_key:"inputRef",ref:i},{...e(o),...n.$attrs},{modelValue:e(r).search,"onUpdate:modelValue":l[0]||(l[0]=f=>e(r).search=f),"data-slot":"command-input","auto-focus":"",class:e(Y)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t.class)}),null,16,["modelValue","class"])]))}}),So=Object.assign(Co,{__name:"UiCommandInput"}),$o=T({__name:"CommandItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["select"],setup(a,{emit:t}){const s=a,o=t,r=se(s,"class"),i=ye(r,o),n=De(),{filterState:l,allItems:f,allGroups:v}=Te(),x=Bo(),y=P(()=>{if(l.search){const h=l.filtered.items.get(n);return h===void 0?!0:h>0}else return!0}),m=C(),k=Ht(m);return ie(()=>{if(!(k.value instanceof HTMLElement))return;f.value.set(n,k.value.textContent??s.value?.toString()??"");const h=x?.id;h&&(v.value.has(h)?v.value.get(h)?.add(n):v.value.set(h,new Set([n])))}),pe(()=>{f.value.delete(n)}),(h,B)=>y.value?(d(),_(e(Ys),V({key:0},e(i),{id:e(n),ref_key:"itemRef",ref:m,"data-slot":"command-item",class:e(Y)("data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s.class),onSelect:B[0]||(B[0]=()=>{e(l).search=""})}),{default:c(()=>[L(h.$slots,"default")]),_:3},16,["id","class"])):z("",!0)}}),de=Object.assign($o,{__name:"UiCommandItem"}),Ro={role:"presentation"},Eo=T({__name:"CommandList",props:{asChild:{type:Boolean},as:{},class:{}},setup(a){const t=a,s=se(t,"class"),o=Pe(s);return(r,i)=>(d(),_(e(Vs),V({"data-slot":"command-list"},e(o),{class:e(Y)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto scrollbar-none",t.class)}),{default:c(()=>[u("div",Ro,[L(r.$slots,"default")])]),_:3},16,["class"]))}}),Ao=Object.assign(Eo,{__name:"UiCommandList"}),Do=T({__name:"CommandSeparator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(a){const t=a,s=se(t,"class");return(o,r)=>(d(),_(e(vs),V({"data-slot":"command-separator"},e(s),{class:e(Y)("bg-border -mx-1 h-px",t.class)}),{default:c(()=>[L(o.$slots,"default")]),_:3},16,["class"]))}}),Ze=Object.assign(Do,{__name:"UiCommandSeparator"}),Po=T({__name:"CommandShortcut",props:{class:{}},setup(a){const t=a;return(s,o)=>(d(),S("span",{"data-slot":"command-shortcut",class:le(e(Y)("text-muted-foreground ml-auto text-xs tracking-widest",t.class))},[L(s.$slots,"default")],2))}});Object.assign(Po,{__name:"UiCommandShortcut"});const[Te,To]=Se("Command"),[Bo,Io]=Se("CommandGroup"),Mo={class:"flex items-center gap-1"},Oo={key:0,class:"text-[10px] uppercase tracking-wide text-muted-foreground"},Lo={class:"flex-1"},Fo={class:"flex-1"},zo={class:"ml-auto flex items-center gap-1"},Vo={class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},jo={class:"flex-1"},qo={class:"ml-auto flex items-center gap-1"},Ko={class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},Ho={class:"ml-auto flex items-center gap-1"},Uo={class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},No={class:"flex-1"},Go=T({__name:"CommandPalette",props:{open:{type:Boolean,default:!1},openModifiers:{},filter:{default:""},filterModifiers:{}},emits:Lt(["openShortcutsHelp"],["update:open","update:filter"]),setup(a,{emit:t}){const s=ze(a,"open"),o=ze(a,"filter"),r=t,i=st(),{themeMode:n,cycleThemeMode:l}=at(),{prds:f,showArchived:v,toggleShowArchived:x}=He(),{repos:y,currentRepoId:m,selectRepo:k,refreshGitRepos:h}=Ae(),{showSuccess:B,showError:Q}=lt(),Z=["document","board","graph"],q={document:"Document",board:"Task Board",graph:"Graph"},w=C("document");{const I=localStorage.getItem("prd-viewer-tab");(I==="document"||I==="board"||I==="graph")&&(w.value=I)}function $(I){I.key!=="prd-viewer-tab"||!I.newValue||(I.newValue==="document"||I.newValue==="board"||I.newValue==="graph")&&(w.value=I.newValue)}ie(()=>{window.addEventListener("storage",$)}),pe(()=>{window.removeEventListener("storage",$)});const E=P(()=>{const I=Z.indexOf(w.value),j=I>=0?I:0;return Z[(j+1)%Z.length]}),X=P(()=>q[E.value]);function O(I){m.value&&(i.push(`/${m.value}/${I}`),s.value=!1)}function ee(I){k(I),i.push("/"),s.value=!1}function W(){l(),s.value=!1}function ue(){const I=E.value;w.value=I,localStorage.setItem("prd-viewer-tab",I),window.dispatchEvent(new StorageEvent("storage",{key:"prd-viewer-tab",newValue:I})),s.value=!1}function ve(){s.value=!1,r("openShortcutsHelp")}function te(){x(),s.value=!1}const G=C(!1);async function J(){if(!(!m.value||G.value)){G.value=!0,s.value=!1;try{const I=await h(m.value);B(`Discovered ${I.discovered} git repositories`)}catch{Q("Failed to refresh git repos")}finally{G.value=!1}}}ce(s,I=>{I||(o.value="")});const K=P(()=>navigator.platform.toUpperCase().indexOf("MAC")>=0),oe=P(()=>K.value?"⌘":"Ctrl");return(I,j)=>(d(),_(e(_o),{open:s.value,"onUpdate:open":j[0]||(j[0]=H=>s.value=H),"default-search":o.value},{default:c(()=>[p(e(So),{placeholder:"Type a command or search..."}),p(e(Ao),null,{default:c(()=>[p(e(xo),null,{default:c(()=>[...j[1]||(j[1]=[N("No results found.",-1)])]),_:1}),e(f)?.length?(d(),_(e(Me),{key:0,heading:"Documents"},{default:c(()=>[(d(!0),S(ae,null,ne(e(f),H=>(d(),_(e(de),{key:H.slug,value:`PRD: ${H.name}`,onSelect:M=>O(H.slug)},{default:c(()=>[p(e(je),{class:"size-4"}),u("span",Mo,[u("span",null,D(H.name),1),H.archived?(d(),S("span",Oo,"Archived")):z("",!0)])]),_:2},1032,["value","onSelect"]))),128))]),_:1})):z("",!0),e(f)?.length&&e(y)?.length?(d(),_(e(Ze),{key:1})):z("",!0),e(y)?.length?(d(),_(e(Me),{key:2,heading:"Repositories"},{default:c(()=>[(d(!0),S(ae,null,ne(e(y),H=>(d(),_(e(de),{key:H.id,value:`repo-${H.id} ${H.name}`,onSelect:M=>ee(H.id)},{default:c(()=>[p(e(qe),{class:"size-4"}),u("span",Lo,D(H.name),1),H.id===e(m)?(d(),_(e(it),{key:0,class:"size-4 text-primary"})):z("",!0)]),_:2},1032,["value","onSelect"]))),128))]),_:1})):z("",!0),e(y)?.length?(d(),_(e(Ze),{key:3})):z("",!0),p(e(Me),{heading:"Actions"},{default:c(()=>[p(e(de),{value:"cycle-theme light dark system",onSelect:W},{default:c(()=>[e(n)==="system"?(d(),_(e(ht),{key:0,class:"size-4"})):e(n)==="light"?(d(),_(e(yt),{key:1,class:"size-4"})):(d(),_(e(gt),{key:2,class:"size-4"})),u("span",Fo,"Cycle theme mode ("+D(e(n))+")",1),u("div",zo,[u("kbd",Vo,D(e(oe)),1),j[2]||(j[2]=u("kbd",{class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},".",-1))])]),_:1}),p(e(de),{value:`switch-tab ${e(X).toLowerCase()}`,onSelect:ue},{default:c(()=>[p(e(ut),{class:"size-4"}),u("span",jo,"Switch to "+D(e(X)),1),u("div",qo,[u("kbd",Ko,D(e(oe)),1),j[3]||(j[3]=u("kbd",{class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},"\\",-1))])]),_:1},8,["value"]),p(e(de),{value:"keyboard shortcuts help",onSelect:ve},{default:c(()=>[p(e(hs),{class:"size-4"}),j[5]||(j[5]=u("span",{class:"flex-1"},"Keyboard shortcuts",-1)),u("div",Ho,[u("kbd",Uo,D(e(oe)),1),j[4]||(j[4]=u("kbd",{class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},"/",-1))])]),_:1}),e(m)?(d(),_(e(de),{key:0,value:"refresh git repos rescan discover",disabled:e(G),onSelect:J},{default:c(()=>[p(e(dt),{class:le(["size-4",{"animate-spin":e(G)}])},null,8,["class"]),j[6]||(j[6]=u("span",{class:"flex-1"},"Refresh git repos",-1))]),_:1},8,["disabled"])):z("",!0),p(e(de),{value:"toggle archived documents",onSelect:te},{default:c(()=>[p(e(vt),{class:"size-4"}),u("span",No,D(e(v)?"Hide archived documents":"Show archived documents"),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["open","default-search"]))}}),Wo=Object.assign(Go,{__name:"CommandPalette"}),Qo={class:"space-y-6"},Xo={class:"mb-3 text-sm font-medium text-muted-foreground"},Jo={class:"space-y-2"},Yo={class:"text-sm"},Zo={class:"flex items-center gap-1"},en=T({__name:"ShortcutsHelp",props:{open:{type:Boolean,default:!1},openModifiers:{}},emits:["update:open"],setup(a){const t=ze(a,"open"),s=P(()=>navigator.platform.toUpperCase().indexOf("MAC")>=0),o=P(()=>s.value?"⌘":"Ctrl"),r=P(()=>[{name:"Navigation",shortcuts:[{keys:[o.value,"K"],description:"Open command palette"},{keys:[o.value,"J"],description:"Quick jump to document"}]},{name:"Actions",shortcuts:[{keys:[o.value,"."],description:"Cycle theme mode (light/dark/system)"},{keys:[o.value,"\\"],description:"Cycle Document, Task Board, and Graph tabs"},{keys:[o.value,","],description:"Add repository"}]},{name:"Help",shortcuts:[{keys:[o.value,"/"],description:"Show this help"},{keys:["Esc"],description:"Close dialog or palette"}]}]);return(i,n)=>(d(),_(e(bt),{open:t.value,"onUpdate:open":n[0]||(n[0]=l=>t.value=l)},{default:c(()=>[p(e(xt),{class:"max-w-md"},{default:c(()=>[p(e(kt),null,{default:c(()=>[p(e(Ct),null,{default:c(()=>[...n[1]||(n[1]=[N("Keyboard Shortcuts",-1)])]),_:1}),p(e(wt),null,{default:c(()=>[...n[2]||(n[2]=[N(" Quick reference for available keyboard shortcuts. ",-1)])]),_:1})]),_:1}),u("div",Qo,[(d(!0),S(ae,null,ne(e(r),l=>(d(),S("div",{key:l.name},[u("h3",Xo,D(l.name),1),u("div",Jo,[(d(!0),S(ae,null,ne(l.shortcuts,f=>(d(),S("div",{key:f.description,class:"flex items-center justify-between"},[u("span",Yo,D(f.description),1),u("div",Zo,[(d(!0),S(ae,null,ne(f.keys,(v,x)=>(d(),S("kbd",{key:x,class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-xs font-medium text-muted-foreground"},D(v),1))),128))])]))),128))])]))),128))])]),_:1})]),_:1},8,["open"]))}}),tn=Object.assign(en,{__name:"ShortcutsHelp"});function St(){const a=document.activeElement;if(!a)return!1;const t=a.tagName.toLowerCase();return t==="input"||t==="textarea"||a.getAttribute("contenteditable")==="true"||a.getAttribute("role")==="textbox"}function sn(a){const t=a.toLowerCase().split("+"),s=t.pop()||"";return{meta:t.includes("meta"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt"),key:s}}function an(a,t){const s=a.key.toLowerCase();let o=s===t.key;return t.key==="\\"&&(o=s==="\\"||a.code==="Backslash"),t.key==="/"&&(o=s==="/"||a.code==="Slash"),t.key==="."&&(o=s==="."||a.code==="Period"),t.key===","&&(o=s===","||a.code==="Comma"),o&&a.metaKey===t.meta&&a.ctrlKey===t.ctrl&&a.shiftKey===t.shift&&a.altKey===t.alt}const Re=[];let et=!1;function on(a){for(const t of Re)if(an(a,t.combo)){if(!t.allowInInput&&St())continue;a.preventDefault(),a.stopPropagation(),t.handler();return}}function tt(){et||(document.addEventListener("keydown",on,{capture:!0}),et=!0)}function nn(){ie(()=>{tt()});function a(s,o,r){const n={combo:sn(s),handler:o,allowInInput:r?.allowInInput??!1};Re.push(n),tt(),pe(()=>{const l=Re.indexOf(n);l>-1&&Re.splice(l,1)})}function t(){return St()}return{onShortcut:a,isInputFocused:t}}const ln=2e3,rn=2e3;function un(a){return!a.instanceId||!a.buildId?null:`${a.buildId}:${a.instanceId}`}function dn(a){const t=C(null),s=C(!1),o=C(null),r=C(null),i=C(null),n=C(null),l=C(!1),f=C(!1),v=C(!1);function x(){r.value&&(clearTimeout(r.value),r.value=null)}function y(){i.value&&(clearInterval(i.value),i.value=null)}async function m(){try{const w=await $fetch(`/api/runtime?_=${Date.now()}`);return un(w)}catch{return null}}async function k(){n.value===null&&(n.value=await m())}async function h(){if(!(l.value||v.value)){l.value=!0;try{const w=await m();if(!w)return;if(!n.value){n.value=w;return}w!==n.value&&(v.value=!0,window.location.reload())}finally{l.value=!1}}}function B(){i.value||(i.value=_t(()=>{h()},rn))}function Q(){r.value||(r.value=setTimeout(()=>{r.value=null,Z()},ln))}function Z(){if(!t.value)try{const w=new EventSource("/api/watch");w.onopen=async()=>{s.value=!0,o.value=null,x(),y(),f.value&&(f.value=!1,await h())},w.onmessage=$=>{try{const E=JSON.parse($.data);a(E)}catch{}},w.onerror=()=>{s.value=!1,o.value="Connection lost",f.value=!0,t.value===w&&(w.close(),t.value=null),B(),Q()},t.value=w}catch{o.value="Failed to connect",B(),Q()}}function q(){x(),y(),f.value=!1,t.value&&(t.value.close(),t.value=null,s.value=!1)}return ie(async()=>{await k(),Z()}),pe(()=>{q()}),{isConnected:s,error:o,connect:Z,disconnect:q}}const cn={class:"min-h-screen bg-background text-foreground"},pn={class:"fixed top-0 left-0 right-0 z-50 h-14 border-b border-border bg-background/95 backdrop-blur-sm supports-[backdrop-filter]:bg-background/80"},fn={class:"flex h-full items-center justify-between px-4 md:px-6"},mn={class:"flex items-center gap-3"},vn={class:"hidden text-xs text-muted-foreground md:inline"},hn={class:"flex items-center gap-3"},gn={class:"flex h-screen pt-14"},yn={class:"flex-1 overflow-auto"},$n=T({__name:"default",setup(a){const{themeMode:t,cycleThemeMode:s}=at(),{refreshPrds:o}=He(),{currentRepoId:r}=Ae(),i=Ke(),n=Vt(),l=P(()=>n.public.stewardVersion||"0.0.0"),f=P(()=>n.public.stewardPackageName||"steward"),v=C(null);Ft("fileChangeEvent",v);const x=C(!1),y=C(""),m=C(!1),k=C(null),{onShortcut:h}=nn();h("Meta+k",()=>{x.value=!0}),h("Ctrl+k",()=>{x.value=!0}),h("Meta+j",()=>{y.value="PRD: ",x.value=!0}),h("Ctrl+j",()=>{y.value="PRD: ",x.value=!0});function B(){const w=["document","board","graph"],$=localStorage.getItem("prd-viewer-tab")||"document",E=w.indexOf($),X=E>=0?E:0,O=w[(X+1)%w.length]??"document";localStorage.setItem("prd-viewer-tab",O),window.dispatchEvent(new StorageEvent("storage",{key:"prd-viewer-tab",newValue:O}))}h("Meta+\\",B),h("Ctrl+\\",B);function Q(){s()}h("Meta+.",Q),h("Ctrl+.",Q);function Z(){k.value?.openAddDialog()}h("Meta+,",Z),h("Ctrl+,",Z);function q(){m.value=!0}return h("Meta+/",q),h("Ctrl+/",q),h("Meta+Shift+/",q),h("Ctrl+Shift+/",q),dn(w=>{if(w.type==="connected"||!w.category)return;const $=w.category;if(w.repoId!==r.value)return;($==="prd"||$==="tasks")&&o();const E=i.params.prd,X=$==="tasks"||$==="progress",O=$==="prd"&&(!E||w.path?.includes(`/${E}.`)),ee=!!E&&X&&w.path?.includes(`/${E}/`);(X||O||ee)&&(v.value={category:$,path:w.path,timestamp:Date.now()})}),(w,$)=>{const E=ha,X=Ka,O=zt,ee=ao;return d(),S("div",cn,[p(E),p(Wo,{open:e(x),"onUpdate:open":$[0]||($[0]=W=>we(x)?x.value=W:null),filter:e(y),"onUpdate:filter":$[1]||($[1]=W=>we(y)?y.value=W:null),onOpenShortcutsHelp:q},null,8,["open","filter"]),p(tn,{open:e(m),"onUpdate:open":$[2]||($[2]=W=>we(m)?m.value=W:null)},null,8,["open"]),u("header",pn,[u("div",fn,[u("div",mn,[$[3]||($[3]=u("h1",{class:"text-lg font-semibold tracking-tight"}," PRD Viewer ",-1)),u("span",vn,D(e(f))+" v"+D(e(l)),1)]),p(O,null,{fallback:c(()=>[...$[5]||($[5]=[u("div",{class:"flex items-center gap-3"},[u("div",{class:"h-8 w-[200px] animate-pulse rounded-md bg-muted"}),u("div",{class:"size-9 animate-pulse rounded-md bg-muted"})],-1)])]),default:c(()=>[u("div",hn,[p(X,{ref_key:"repoSelectorRef",ref:k},null,512),p(e(re),{variant:"ghost",size:"icon",class:"size-9",onClick:Q},{default:c(()=>[e(t)==="system"?(d(),_(e(ht),{key:0,class:"size-4"})):e(t)==="light"?(d(),_(e(yt),{key:1,class:"size-4"})):(d(),_(e(gt),{key:2,class:"size-4"})),$[4]||($[4]=u("span",{class:"sr-only"},"Cycle theme mode",-1))]),_:1})])]),_:1})])]),u("div",gn,[p(O,null,{fallback:c(()=>[...$[6]||($[6]=[u("aside",{class:"flex h-full w-64 flex-col border-r border-border bg-background"},[u("div",{class:"flex h-12 items-center border-b border-border px-4"},[u("div",{class:"h-4 w-20 animate-pulse rounded bg-muted"})]),u("div",{class:"flex-1 p-2 space-y-2"},[u("div",{class:"h-9 animate-pulse rounded-md bg-muted"}),u("div",{class:"h-9 animate-pulse rounded-md bg-muted"}),u("div",{class:"h-9 animate-pulse rounded-md bg-muted"})])],-1)])]),default:c(()=>[p(ee)]),_:1}),u("main",yn,[L(w.$slots,"default")])])])}}});export{$n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r}from"./
|
|
1
|
+
import{c as r}from"./xc3v2JZH.js";const a=r("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);export{a as A};
|