1import{d as k,r as m,ak as w,f as N,e as p,g as t,w as c,ah as _,ai as $,F as V,o as y,ad as a}from"../modules/vue-BJq_zL9e.js";import{u as C,a as T,s as H}from"../index-DXF3xlh2.js";import{u as z}from"./useSlideInfo-2q3K2-gY.js";import{_ as B}from"./IconButton.vue_vue_type_script_setup_true_lang-C860KEnP.js";import{_ as E}from"./Modal.vue_vue_type_script_setup_true_lang-VncTTcw0.js";import"../modules/shiki-CUn3-tJ3.js";const D={class:"flex my-1"},F={class:"h-full"},I={class:"slidev-glass-effect fixed bottom-5 right-5 rounded-full border border-main"},A=k({__name:"notes-edit",setup(U){C({title:`Notes Edit - ${H}`});const{slides:i}=T(),l=m(!1),n=m(v(i.value));function v(o){const e=[];for(const s of o)s.meta.slide.note?.trim()&&(e.push(`--- #${s.no}`),e.push(""),e.push(s.meta.slide.note),e.push(""));return e.join(` 2`)}function h(o,e){const s=o.split(/^(---\s*#\d+\s*)$/gm);s.forEach((x,b)=>{const r=x.match(/^---\s*#(\d+)\s*$/);if(r){const d=Number.parseInt(r[1]),u=s[b+1].trim(),f=e.find(g=>g.no===d);f&&(f.meta.slide.note=u,z(d).update({note:u}))}})}return w(n,o=>{h(o,i.value)},{debounce:300}),(o,e)=>(y(),N(V,null,[p(E,{modelValue:l.value,"onUpdate:modelValue":e[1]||(e[1]=s=>l.value=s),class:"px-6 py-4 flex flex-col gap-2"},{default:c(()=>[e[4]||(e[4]=t("div",{class:"flex gap-2 text-xl"},[t("div",{class:"i-carbon:information my-auto"}),a(" Help ")],-1)),e[5]||(e[5]=t("div",{class:"prose dark:prose-invert"},[t("p",null,"This is the batch notes editor. You can edit the notes for all the slides at once here."),t("p",null,[a("The note for each slide are separated by "),t("code",null,"--- #[no]"),a(" lines, you might want to keep them while editing.")])],-1)),t("div",D,[t("button",{class:"slidev-form-button",onClick:e[0]||(e[0]=s=>l.value=!1)}," Close ")])]),_:1},8,["modelValue"]),t("div",F,[t("div",I,[p(B,{title:"Help",class:"rounded-full",onClick:e[2]||(e[2]=s=>l.value=!0)},{default:c(()=>[...e[6]||(e[6]=[t("div",{class:"i-carbon:help text-2xl"},null,-1)])]),_:1})]),_(t("textarea",{"onUpdate:modelValue":e[3]||(e[3]=s=>n.value=s),class:"prose dark:prose-invert resize-none p5 outline-none bg-transparent block h-full w-full! max-w-full! max-h-full! min-h-full! min-w-full!"},null,512),[[$,n.value]])])],64))}});export{A as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.