projet-fin-etude-rapport/assets/DrawingControls-b71ecd01.js
2023-09-06 22:54:14 +02:00

4 lines
7.1 KiB
JavaScript

import{o as l,f as r,g as e,d as k,i as y,a as M,B as C,s as K,a5 as O,a6 as P,n as B,h as n,_ as D,x as R,R as T,E as a,m as i,a7 as m,p as f,a8 as w,r as q,a9 as $,aa as _,ab as I,F as U,ac as Y,ad as G,ae as J,af as Q,ag as v,ah as b,ai as u,aj as x,ak as W}from"./index-621d9fd0.js";const X={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},nn=e("path",{fill:"currentColor",d:"M16 2C8.2 2 2 8.2 2 16s6.2 14 14 14s14-6.2 14-14S23.8 2 16 2zm0 26C9.4 28 4 22.6 4 16S9.4 4 16 4s12 5.4 12 12s-5.4 12-12 12z"},null,-1),en=e("path",{fill:"currentColor",d:"M21.4 23L16 17.6L10.6 23L9 21.4l5.4-5.4L9 10.6L10.6 9l5.4 5.4L21.4 9l1.6 1.6l-5.4 5.4l5.4 5.4z"},null,-1),on=[nn,en];function tn(c,s){return l(),r("svg",X,on)}const sn={name:"carbon-close-outline",render:tn},ln={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},rn=e("path",{fill:"currentColor",d:"M2 16A14 14 0 1 0 16 2A14 14 0 0 0 2 16Zm23.15 7.75L8.25 6.85a12 12 0 0 1 16.9 16.9ZM8.24 25.16a12 12 0 0 1-1.4-16.89l16.89 16.89a12 12 0 0 1-15.49 0Z"},null,-1),an=[rn];function cn(c,s){return l(),r("svg",ln,an)}const dn={name:"carbon-error",render:cn},_n={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},un=e("path",{fill:"currentColor",d:"M28.59 13.31L30 11.9L20 2l-1.31 1.42l1.18 1.18l-11.49 9.72l-1.72-1.71L5.25 14l5.66 5.68L2 28.58L3.41 30l8.91-8.91L18 26.75l1.39-1.42l-1.71-1.71l9.72-11.49ZM16.26 22.2L9.8 15.74L21.29 6L26 10.71Z"},null,-1),hn=[un];function mn(c,s){return l(),r("svg",_n,hn)}const pn={name:"carbon-pin",render:mn},vn={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},bn=e("path",{fill:"currentColor",d:"M28.586 13.314L30 11.9L20 2l-1.314 1.415l1.186 1.186L8.38 14.322l-1.716-1.715L5.25 14l5.657 5.677L2 28.583L3.41 30l8.911-8.909L18 26.748l1.393-1.414l-1.716-1.716l9.724-11.49Z"},null,-1),gn=[bn];function fn(c,s){return l(),r("svg",vn,gn)}const wn={name:"carbon-pin-filled",render:fn},$n={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},Ln=e("path",{fill:"currentColor",d:"M29 26H12a1 1 0 0 1-.707-.293l-9-9a1 1 0 0 1 0-1.414l9-9A1 1 0 0 1 12 6h17a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1Zm-16.586-2H28V8H12.414l-8 8l8 8Z"},null,-1),Cn=e("path",{fill:"currentColor",d:"M20.414 16L25 11.414L23.586 10L19 14.586L14.414 10L13 11.414L17.586 16L13 20.586L14.414 22L19 17.414L23.586 22L25 20.586L20.414 16z"},null,-1),xn=[Ln,Cn];function kn(c,s){return l(),r("svg",$n,xn)}const yn={name:"carbon-delete",render:kn},Mn={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},Bn=e("path",{fill:"currentColor",d:"M12 10h12.185l-3.587-3.586L22 5l6 6l-6 6l-1.402-1.415L24.182 12H12a6 6 0 0 0 0 12h8v2h-8a8 8 0 0 1 0-16Z"},null,-1),Dn=[Bn];function Zn(c,s){return l(),r("svg",Mn,Dn)}const En={name:"carbon-redo",render:Zn},Hn={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},Sn=e("path",{fill:"currentColor",d:"M20 10H7.815l3.587-3.586L10 5l-6 6l6 6l1.402-1.415L7.818 12H20a6 6 0 0 1 0 12h-8v2h8a8 8 0 0 0 0-16Z"},null,-1),Vn=[Sn];function zn(c,s){return l(),r("svg",Hn,Vn)}const An={name:"carbon-undo",render:zn},Nn={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},jn=e("path",{fill:"currentColor",d:"M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM6 26V6h20v20Z"},null,-1),Fn=[jn];function Kn(c,s){return l(),r("svg",Nn,Fn)}const On={name:"carbon-checkbox",render:Kn},Pn={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},Rn=e("path",{fill:"currentColor",d:"M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2Zm0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12Z"},null,-1),Tn=[Rn];function qn(c,s){return l(),r("svg",Pn,Tn)}const In={name:"carbon-radio-button",render:qn},Un={class:"slidev-icon",viewBox:"0 0 32 32",width:"1.2em",height:"1.2em"},Yn=e("path",{fill:"currentColor",d:"M10 6v2h12.59L6 24.59L7.41 26L24 9.41V22h2V6H10z"},null,-1),Gn=[Yn];function Jn(c,s){return l(),r("svg",Un,Gn)}const Qn={name:"carbon-arrow-up-right",render:Jn},Wn=k({__name:"Draggable",props:{storageKey:{type:String,required:!1},initial:{type:Object,required:!1}},setup(c){const s=c;y(M);const p=C(null),d=s.initial??{x:0,y:0},g=s.storageKey?K(s.storageKey,d):C(d),{style:h}=O(p,{initialValue:g});return(o,L)=>(l(),r("div",{ref_key:"el",ref:p,class:"fixed",style:B(n(h))},[P(o.$slots,"default")],4))}}),Xn=D(Wn,[["__file","/home/laurent/Documents/Cours/ENSEEIHT/PFE/etude-biblio/slides/node_modules/@slidev/client/internals/Draggable.vue"]]),ne=e("svg",{width:"1em",height:"1em",class:"-mt-0.5",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24"},[e("path",{d:"M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z",fill:"currentColor"})],-1),ee=[ne],oe=["onClick"],te=k({__name:"DrawingControls",setup(c){y(M);function s(){x.undo()}function p(){x.redo()}function d(h){m.value=h,_.value=!0}function g(h){$.color=h,_.value=!0}return(h,o)=>{const L=W,Z=Qn,E=In,H=On,S=An,V=En,z=yn,A=wn,N=pn,j=dn,F=sn;return l(),R(Xn,{class:a(["flex flex-wrap text-xl p-2 gap-1 rounded-md bg-main shadow transition-opacity duration-200",n(_)?"":n(u)?"opacity-40 hover:opacity-90":"opacity-0 pointer-events-none"]),dark:"border border-gray-400 border-opacity-10","storage-key":"slidev-drawing-pos","initial-x":10,"initial-y":10},{default:T(()=>[e("button",{class:a(["slidev-icon-btn",{shallow:n(m)!=="stylus"}]),onClick:o[0]||(o[0]=t=>d("stylus"))},[i(L)],2),e("button",{class:a(["slidev-icon-btn",{shallow:n(m)!=="line"}]),onClick:o[1]||(o[1]=t=>d("line"))},ee,2),e("button",{class:a(["slidev-icon-btn",{shallow:n(m)!=="arrow"}]),onClick:o[2]||(o[2]=t=>d("arrow"))},[i(Z)],2),e("button",{class:a(["slidev-icon-btn",{shallow:n(m)!=="ellipse"}]),onClick:o[3]||(o[3]=t=>d("ellipse"))},[i(E)],2),e("button",{class:a(["slidev-icon-btn",{shallow:n(m)!=="rectangle"}]),onClick:o[4]||(o[4]=t=>d("rectangle"))},[i(H)],2),f(" TODO: not sure why it's not working! "),f(` <button class="slidev-icon-btn" :class="{ shallow: drawingMode != 'eraseLine' }" @click="setDrawingMode('eraseLine')">
<carbon:erase />
</button> `),i(w),(l(!0),r(U,null,q(n(I),t=>(l(),r("button",{key:t,class:a(["slidev-icon-btn",n($).color===t?"active":"shallow"]),onClick:se=>g(t)},[e("div",{class:a(["w-6 h-6 transition-all transform border border-gray-400/50",n($).color!==t?"rounded-1/2 scale-85":"rounded-md"]),style:B(n(_)?{background:t}:{borderColor:t})},null,6)],10,oe))),128)),i(w),e("button",{class:a(["slidev-icon-btn",{disabled:!n(Y)}]),onClick:o[5]||(o[5]=t=>s())},[i(S)],2),e("button",{class:a(["slidev-icon-btn",{disabled:!n(G)}]),onClick:o[6]||(o[6]=t=>p())},[i(V)],2),e("button",{class:a(["slidev-icon-btn",{disabled:!n(J)}]),onClick:o[7]||(o[7]=t=>n(Q)())},[i(z)],2),i(w),e("button",{class:a(["slidev-icon-btn",{shallow:!n(u)}]),onClick:o[8]||(o[8]=t=>u.value=!n(u))},[v(i(A,{class:"transform -rotate-45"},null,512),[[b,n(u)]]),v(i(N,null,null,512),[[b,!n(u)]])],2),n(_)?(l(),r("button",{key:0,class:a(["slidev-icon-btn",{shallow:!n(_)}]),onClick:o[9]||(o[9]=t=>_.value=!n(_))},[v(i(j,null,null,512),[[b,n(u)]]),v(i(F,null,null,512),[[b,!n(u)]])],2)):f("v-if",!0)]),_:1},8,["class"])}}}),ie=D(te,[["__file","/home/laurent/Documents/Cours/ENSEEIHT/PFE/etude-biblio/slides/node_modules/@slidev/client/internals/DrawingControls.vue"]]);export{ie as default};