DeepLearning-VT/DeepLearning_2026
0
1import{K as e,_ as t,b as n,g as r,w as i,xt as a,y as o,z as s}from"./modules/shiki-CkJq9tSf.js";import{n as c}from"./slidev/context-DnYiQGy6.js";import{n as l}from"./Plot2D-C9URVmMB.js";var u={key:0},d=[`fill`],f=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`,`marker-end`],p=i({__name:`PlotLine`,props:{from:{},to:{},color:{},width:{default:2},dashed:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},opacity:{default:1}},setup(i){let{$slidev:p,$nav:m,$clicksContext:h,$clicks:g,$page:_,$renderContext:v,$frontmatter:y}=c(),b=i,x=l(),S=`dl-arrow-${e()}`,C=r(()=>({x:x.sx(b.from[0]),y:x.sy(b.from[1])})),w=r(()=>({x:x.sx(b.to[0]),y:x.sy(b.to[1])})),T=r(()=>b.color??`var(--dl-heading)`);return(e,r)=>(s(),n(`g`,{class:`dl-line`,style:a({opacity:b.opacity})},[b.arrow?(s(),n(`defs`,u,[t(`marker`,{id:S,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[t(`path`,{d:`M0,0 L7,3.5 L0,7 Z`,fill:T.value},null,8,d)])])):o(`v-if`,!0),t(`line`,{x1:C.value.x,y1:C.value.y,x2:w.value.x,y2:w.value.y,stroke:T.value,"stroke-width":b.width,"stroke-dasharray":b.dashed?`6 5`:void 0,"marker-end":b.arrow?`url(#${S})`:void 0,"stroke-linecap":`round`},null,8,f)],4))}});export{p as t};