const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/slidev/DrawingControls-Bb-_NjUH.js","assets/slidev/DrawingControls.vue_vue_type_style_index_0_lang-BKyAdcnS.js","assets/modules/vue-DkYzewYG.js","assets/modules/shiki-COU8xzp7.js","assets/modules/shiki-UqVAgQbi.css","assets/slidev/SlideWrapper-CqdKCKqw.js","assets/index-Dgc7rSMr.js","assets/index-CbGGkD77.css","assets/SlideWrapper-ClpOTFWc.css","assets/slidev/IconButton.vue_vue_type_script_setup_true_lang-Bk4_sWNY.js","assets/slidev/shortcuts-yzAyAoyn.js","assets/slidev/context-CSCKgLWe.js","assets/modules/unplugin-icons-ykXbDv9Z.js","assets/shortcuts-BfMSgAKn.css","assets/DrawingControls-Cxk9a9ub.css"])))=>i.map(i=>d[i]);
import{J as B,a1 as L,A as g,a5 as H,f as x,o as a,b as p,a3 as $,z as t,w as D,g as r,e as y,j as u,D as O,B as z,F as P,d,V as k,k as A,n as M,r as F}from"../modules/vue-DkYzewYG.js";import{u as U,a as W}from"./SlideWrapper-CqdKCKqw.js";import{I as j,v as w,j as R,J as G,K as V,L as C,l as S,A as h,M as J,N as K,O as i,P as b}from"../index-Dgc7rSMr.js";import{c as X,G as Y,d as q,u as Q,r as Z,a as ee,o as te,b as se,S as oe}from"./shortcuts-yzAyAoyn.js";import{_ as ae}from"./Modal.vue_vue_type_script_setup_true_lang-CZdOOjRt.js";import{b as ne}from"../modules/unplugin-icons-ykXbDv9Z.js";import"../modules/shiki-COU8xzp7.js";import"./context-CSCKgLWe.js";import"./IconButton.vue_vue_type_script_setup_true_lang-Bk4_sWNY.js";const le=2e3;function ie(v){const l=g(()=>v.value&&j.value);function m(){document.body.style.cursor="none"}function s(){document.body.style.cursor=""}let e=null;B(l,c=>{c||(s(),e&&clearTimeout(e),e=null)}),H(()=>{s(),e&&clearTimeout(e),e=null}),L(document.body,["pointermove","pointerdown"],()=>{s(),e&&clearTimeout(e),l.value?e=setTimeout(m,le):e=null},{passive:!0})}const re="/tp/3-25/assets/logo-BYkHSa_O.png",ue={class:"slidev-info-dialog slidev-layout flex flex-col gap-4 text-base"},ce=["innerHTML"],de=x({__name:"InfoDialog",props:{modelValue:{default:!1}},emits:["update:modelValue"],setup(v,{emit:l}){const e=z(v,"modelValue",l),c=g(()=>typeof w.info=="string");return(_,o)=>(a(),p(ae,{modelValue:t(e),"onUpdate:modelValue":o[0]||(o[0]=f=>$(e)?e.value=f:null),class:"px-6 py-4"},{default:D(()=>[r("div",ue,[c.value?(a(),y("div",{key:0,class:"mb-4",innerHTML:t(w).info},null,8,ce)):u("v-if",!0),o[1]||(o[1]=r("a",{href:"https://github.com/slidevjs/slidev",target:"_blank",class:"!opacity-100 !border-none !text-current"},[r("div",{class:"flex gap-1 children:my-auto"},[r("div",{class:"opacity-50 text-sm mr-2"},"Powered by"),r("img",{class:"w-5 h-5",src:re,alt:"Slidev logo"}),r("div",{style:{color:"#2082A6"}},[r("b",null,"Sli"),O("dev ")])])],-1))])]),_:1},8,["modelValue"]))}}),me=x({__name:"Controls",setup(v){const{isEmbedded:l}=R(),m=!w.drawings.presenterOnly&&!l.value,s=k();m&&G(()=>import("./DrawingControls-Bb-_NjUH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(_=>s.value=_.default);const e=k(),c=k();return(_,o)=>(a(),y(P,null,[s.value?(a(),p(t(s),{key:0})):u("v-if",!0),d(X),d(Y),e.value?(a(),p(t(e),{key:1})):u("v-if",!0),c.value?(a(),p(t(c),{key:2,modelValue:t(V),"onUpdate:modelValue":o[0]||(o[0]=f=>$(V)?V.value=f:null)},null,8,["modelValue"])):u("v-if",!0),t(w).info?(a(),p(de,{key:3,modelValue:t(C),"onUpdate:modelValue":o[1]||(o[1]=f=>$(C)?C.value=f:null)},null,8,["modelValue"])):u("v-if",!0),d(q)],64))}}),fe={key:0,class:"absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl"},pe=x({__name:"PresenterMouse",setup(v){return(l,m)=>{const s=ne;return t(S).cursor?(a(),y("div",fe,[d(s,{class:"absolute stroke-white dark:stroke-black",style:A({left:`${t(S).cursor.x}%`,top:`${t(S).cursor.y}%`,strokeWidth:16})},null,8,["style"])])):u("v-if",!0)}}}),Ve=x({__name:"play",setup(v){const{next:l,prev:m,isPrintMode:s,isPlaying:e,isEmbedded:c}=R(),{isDrawing:_}=U(),o=F();function f(n){h.value||n.button===0&&n.target?.id==="slide-container"&&(n.pageX/window.innerWidth>.5?l():m())}Q(o),Z(),ee(),ie(g(()=>e.value&&!c.value&&!h.value));const E=g(()=>K.value||h.value),T=k(),N=g(()=>{let n="";return i.value.brightness!==b.brightness&&(n+=`brightness(${i.value.brightness}) `),i.value.contrast!==b.contrast&&(n+=`contrast(${i.value.contrast}) `),i.value.sepia!==b.sepia&&(n+=`sepia(${i.value.sepia}) `),i.value.hueRotate!==b.hueRotate&&(n+=`hue-rotate(${i.value.hueRotate}deg) `),i.value.invert&&(n+="invert(1) "),{filter:n}});return(n,I)=>(a(),y(P,null,[r("div",{id:"page-root",ref_key:"root",ref:o,class:M(["grid",t(J)?"grid-rows-[1fr_max-content]":"grid-cols-[1fr_max-content]"])},[d(W,{style:{background:"var(--slidev-slide-container-background, black)"},"is-main":"","content-style":N.value,onPointerdown:f,onContextmenu:t(te)},{default:D(()=>[d(oe,{"render-context":"slide"}),d(pe)]),controls:D(()=>[t(s)?u("v-if",!0):(a(),y("div",{key:0,class:M(["absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100 focus-within:opacity-100 focus-visible:opacity-100",[E.value?"!opacity-100 right-0":"opacity-0 p-2",t(_)?"pointer-events-none":""]])},[d(se,{persist:E.value},null,8,["persist"])],2))]),_:1},8,["content-style","onContextmenu"]),T.value&&t(h)?(a(),p(t(T),{key:0,resize:!0})):u("v-if",!0)],2),t(s)?u("v-if",!0):(a(),p(me,{key:0})),I[0]||(I[0]=r("div",{id:"twoslash-container"},null,-1))],64))}});export{Ve as default};
