projet-long/assets/Presenter-2516abd1.js
2023-06-25 20:09:16 +02:00

2 lines
4.7 KiB
JavaScript

import{o as d,f as k,g as e,B as S,C as B,v as h,d as E,i as P,a as H,D as y,x as v,E as M,h as t,_ as z,G as D,H as I,c as b,b as j,I as N,J as R,K as A,L,M as q,N as F,O,P as U,Q as W,w as Z,R as G,S as J,p as u,t as K,n as x,j as $,T,U as V,q as Q,V as X,l as Y,W as w,X as ee,Y as te,F as se,Z as oe,$ as ne,a0 as le,a1 as ae,a2 as re,a3 as ie,a4 as ce}from"./index-b4b4a2ac.js";import{N as ue}from"./NoteDisplay-39559114.js";import de from"./DrawingControls-f024b6c9.js";const _e={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},pe=e("path",{fill:"currentColor",d:"M12 10H6.78A11 11 0 0 1 27 16h2A13 13 0 0 0 6 7.68V4H4v8h8zm8 12h5.22A11 11 0 0 1 5 16H3a13 13 0 0 0 23 8.32V28h2v-8h-8z"},null,-1),me=[pe];function ve(n,a){return d(),k("svg",_e,me)}const he={name:"carbon-renew",render:ve},fe={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},ge=e("path",{fill:"currentColor",d:"M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14Zm0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4Z"},null,-1),xe=e("path",{fill:"currentColor",d:"M20.59 22L15 16.41V7h2v8.58l5 5.01L20.59 22z"},null,-1),we=[ge,xe];function Se(n,a){return d(),k("svg",fe,we)}const ye={name:"carbon-time",render:Se},ke="/projet-long/assets/logo-title-horizontal-96c3c915.png";function Ce(){const n=S(Date.now()),a=B({interval:1e3}),_=h(()=>{const s=(a.value-n.value)/1e3,l=Math.floor(s%60).toString().padStart(2,"0");return`${Math.floor(s/60).toString().padStart(2,"0")}:${l}`});function p(){n.value=a.value}return{timer:_,resetTimer:p}}const be=E({__name:"NoteStatic",props:{class:{type:String,required:!1}},setup(n){const a=n;P(H);const _=h(()=>{var s,l,o;return(o=(l=(s=y.value)==null?void 0:s.meta)==null?void 0:l.slide)==null?void 0:o.note}),p=h(()=>{var s,l,o;return(o=(l=(s=y.value)==null?void 0:s.meta)==null?void 0:l.slide)==null?void 0:o.noteHTML});return(s,l)=>(d(),v(ue,{class:M(a.class),note:t(_),"note-html":t(p)},null,8,["class","note","note-html"]))}}),Ne=z(be,[["__file","/home/laurent/Documents/Cours/ENSEEIHT/Projet-long/prez/node_modules/@slidev/client/internals/NoteStatic.vue"]]),f=n=>(ie("data-v-574fd206"),n=n(),ce(),n),$e={class:"bg-main h-full slidev-presenter"},Te={class:"grid-container"},Ve={class:"grid-section top flex"},Ee=f(()=>e("img",{src:ke,class:"ml-2 my-auto h-10 py-1 lg:h-14 lg:py-2"},null,-1)),Pe=f(()=>e("div",{class:"flex-auto"},null,-1)),He={class:"text-2xl pl-2 pr-6 my-auto tabular-nums"},Me=f(()=>e("div",{class:"context"}," current ",-1)),ze=f(()=>e("div",{class:"context"}," next ",-1)),Be={class:"grid-section note overflow-auto"},De={class:"grid-section bottom"},Ie={class:"progress-bar"},je=E({__name:"Presenter",setup(n){P(H);const a=S();D(),I(a);const _=b.titleTemplate.replace("%s",b.title||"Slidev");j({title:`Presenter - ${_}`});const{timer:p,resetTimer:s}=Ce(),l=S([]),o=h(()=>N.value<R.value?{route:y.value,clicks:N.value+1}:A.value?{route:L.value,clicks:0}:null);return q(()=>{const C=a.value.querySelector("#slide-content"),i=F(O()),g=U();W(()=>{if(!g.value||G.value||!J.value)return;const c=C.getBoundingClientRect(),r=(i.x-c.left)/c.width*100,m=(i.y-c.top)/c.height*100;if(!(r<0||r>100||m<0||m>100))return{x:r,y:m}},c=>{Z.cursor=c})}),(C,i)=>{const g=ye,c=he;return d(),k(se,null,[e("div",$e,[e("div",Te,[e("div",Ve,[Ee,Pe,e("div",{class:"timer-btn my-auto relative w-22px h-22px cursor-pointer text-lg",opacity:"50 hover:100",onClick:i[0]||(i[0]=(...r)=>t(s)&&t(s)(...r))},[u(g,{class:"absolute"}),u(c,{class:"absolute opacity-0"})]),e("div",He,K(t(p)),1)]),e("div",{ref_key:"main",ref:a,class:"relative grid-section main flex flex-col p-2 lg:p-4",style:x(t($))},[u(V,{key:"main",class:"h-full w-full"},{default:T(()=>[u(oe,{context:"presenter"})]),_:1}),Me],4),e("div",{class:"relative grid-section next flex flex-col p-2 lg:p-4",style:x(t($))},[t(o)?(d(),v(V,{key:"next",class:"h-full w-full"},{default:T(()=>{var r;return[u(t(le),{is:(r=t(o).route)==null?void 0:r.component,"clicks-elements":l.value,"onUpdate:clicksElements":i[1]||(i[1]=m=>l.value=m),clicks:t(o).clicks,"clicks-disabled":!1,class:M(t(ne)(t(o).route)),route:t(o).route,context:"previewNext"},null,8,["is","clicks-elements","clicks","class","route"])]}),_:1})):Q("v-if",!0),ze],4),e("div",Be,[(d(),v(Ne,{key:1,class:"w-full h-full overflow-auto p-2 lg:p-4"}))]),e("div",De,[u(ae,{persist:!0})]),(d(),v(de,{key:0}))]),e("div",Ie,[e("div",{class:"progress h-2px bg-primary transition-all",style:x({width:`${(t(X)-1)/(t(Y)-1)*100}%`})},null,4)])]),u(re),u(te,{modelValue:t(w),"onUpdate:modelValue":i[2]||(i[2]=r=>ee(w)?w.value=r:null)},null,8,["modelValue"])],64)}}});const qe=z(je,[["__scopeId","data-v-574fd206"],["__file","/home/laurent/Documents/Cours/ENSEEIHT/Projet-long/prez/node_modules/@slidev/client/internals/Presenter.vue"]]);export{qe as default};