PageSourceSearch

https://owri.netlify.app/_next/static/chunks/4573-c5559d4648529498.js

js owri.netlify.app collected 2026-10-03 11:14:43 UTC 19,357 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4573],{4573:function(e,t,a){a.d(t,{ZP:function(){return ep}});var r=a(57437),l=a(44308),s=a(42214),i=a(43894),n=a(69930),o=a(29572),c=a(82804);let d=o.hj.create({name:"fileHandler",addOptions:()=>({allowedMimeTypes:["image/png","image/jpeg","image/gif","image/webp"],onDrop:()=>{},onPaste:()=>{}}),addProseMirrorPlugins(){let{allowedMimeTypes:e,onDrop:t,onPaste:a}=this.options;return[new c.Sy({key:new c.H$("fileHandler"),props:{handleDOMEvents:{drop:(a,r)=>{var l;let{state:s}=a,{tr:i}=s,n=a.posAtCoords({left:r.clientX,top:r.clientY});if(!n)return!1;let o=n.pos,c=Array.from((null===(l=r.dataTransfer)||void 0===l?void 0:l.files)||[]).filter(t=>e.includes(t.type));return 0!==c.length&&(r.preventDefault(),t(this.editor,c,o),!0)},paste:(t,r)=>{var l,s;console.log("We just pasted!");let i=Array.from((null===(l=r.clipboardData)||void 0===l?void 0:l.files)||[]).filter(t=>e.includes(t.type));if(0===i.length)return!1;r.preventDefault();let n=(null===(s=r.clipboardData)||void 0===s?void 0:s.getData("text/html"))||null;return a(this.editor,i,n),!0}}}})]}});var u=a(66648),m=a(84593),p=a(23705),h=a(2265);let f=(0,m.eI)("https://rmaikbonpvsnqumxxufn.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJtYWlrYm9ucHZzbnF1bXh4dWZuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjIzNzM4NjMsImV4cCI6MjAzNzk0OTg2M30.HwUYXzec3OGrM0lkOy_-O9urHNrvTbSv6in5XkVC1_E"),g=o.NB.create({name:"nextImage",group:"block",content:"inline*",addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null},width:{default:768},height:{default:400}}),parseHTML:()=>[{tag:'div[data-type="next-image"]'}],renderHTML(e){let{HTMLAttributes:t}=e;return["div",(0,o.P1)(t,{"data-type":"next-image"}),0]},addNodeView:()=>(0,p.fW)(y)}),x=e=>{let{children:t,width:a,height:l,minWidth:s=200,maxWidth:i=1400,isEditing:n,onResize:o}=e,[c,d]=(0,h.useState)(!1),u=(0,h.useRef)(null),m=()=>{d(!1)},p=e=>{var t;if(!c)return;let r=Math.min(Math.max(e.clientX-(null===(t=u.current)||void 0===t?void 0:t.getBoundingClientRect().left),s),i);o(r,l*r/a)};return(0,h.useEffect)(()=>(document.addEventListener("mouseup",m),document.addEventListener("mousemove",p),()=>{document.removeEventListener("mouseup",m),document.removeEventListener("mousemove",p)}),[c]),(0,r.jsxs)("div",{ref:u,className:"relative border-3 border-transparent hover:border-gray-300 rounded-xl mx-auto my-8 hidden md:block",style:{width:"".concat(a,"px"),height:"".concat(l,"px")},children:[t,n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"absolute right-[-5px] bottom-[-5px] w-[10px] h-[10px] cursor-se-resize opacity-0 rounded-full transition-all duration-200 bg-gradient-to-br from-indigo-500 to-blue-500 shadow-md hover:opacity-100 hover:scale-110",onMouseDown:e=>{n&&(e.preventDefault(),d(!0))},onMouseEnter:e=>{e.currentTarget.style.opacity="1",e.currentTarget.style.transform="scale(1.2)"},onMouseLeave:e=>!c&&(e.currentTarget.style.opacity="0")}),c&&(0,r.jsxs)("div",{className:"absolute top-2 left-2 bg-green-500 text-white px-2 py-1 rounded text-sm font-bold",children:[Math.round(a),"x",Math.round(l)]})]})]})},b=e=>{let{src:t,alt:a,title:l,width:s,height:i,loader:n}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(u.default,{src:t,alt:a||"",title:l,layout:"fill",objectFit:"cover",className:"rounded-lg",loader:n})})},y=e=>{let{node:t,updateAttributes:a,editor:l}=e,{src:s,alt:i,title:n,width:o,height:c}=t.attrs,d=l.isEditable,m=e=>{let{src:t,width:a}=e;if(!t.startsWith("public/"))return"".concat(t,"?width=").concat(a);{let{data:e}=f.storage.from("editorimages").getPublicUrl(t);return"".concat(e.publicUrl,"?width=").concat(a)}};return(0,r.jsx)(p.T5,{className:"next-image-wrapper",children:(0,r.jsxs)("div",{className:"relative w-screen left-1/2 right-1/2 -mx-[50vw]",children:[(0,r.jsx)(x,{width:o,height:c,isEditing:d,onResize:(e,t)=>
1{a({width:e,height:t})},children:(0,r.jsx)(b,{src:s,alt:i,title:n,width:o,height:c,loader:m})}),(0,r.jsx)("div",{className:"md:hidden",children:(0,r.jsx)(u.default,{src:s,alt:i||"",title:n,layout:"responsive",width:o,height:c,loader:m})})]})})};var v=a(41553),j=a(27776),w=a(20920);let N=(0,m.eI)("https://rmaikbonpvsnqumxxufn.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJtYWlrYm9ucHZzbnF1bXh4dWZuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjIzNzM4NjMsImV4cCI6MjAzNzk0OTg2M30.HwUYXzec3OGrM0lkOy_-O9urHNrvTbSv6in5XkVC1_E");async function I(e){console.log("Uploading image to supabase?");let t=(0,w.Z)(),a="".concat(t,".").concat(e.name.split(".").pop()),r=new FileReader;return new Promise(t=>{r.onload=async()=>{let l=r.result,s=await fetch(l),i=await s.blob(),{data:n,error:o}=await N.storage.from("editorimages").upload("public/".concat(a),i,{contentType:e.type,cacheControl:"3600",upsert:!1});console.log("Uploaded image to supabase",n),o?(console.error("Error uploading image:",o),t(null)):t(n.path)},r.readAsDataURL(e)})}var k=a(50495),C=a(83102),z=a(613),M=a(42421),Z=a(14392),S=a(22468),E=a(37440);let H=z.fC;z.ZA;let J=z.B4,O=h.forwardRef((e,t)=>{let{className:a,children:l,...s}=e;return(0,r.jsxs)(z.xz,{ref:t,className:(0,E.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
1ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...s,children:[l,(0,r.jsx)(z.JO,{asChild:!0,children:(0,r.jsx)(M.Z,{className:"h-4 w-4 opacity-50"})})]})});O.displayName=z.xz.displayName;let T=h.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(z.u_,{ref:t,className:(0,E.cn)("flex cursor-default items-center justify-center py-1",a),...l,children:(0,r.jsx)(Z.Z,{className:"h-4 w-4"})})});T.displayName=z.u_.displayName;let A=h.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(z.$G,{ref:t,className:(0,E.cn)("flex cursor-default items-center justify-center py-1",a),...l,children:(0,r.jsx)(M.Z,{className:"h-4 w-4"})})});A.displayName=z.$G.displayName;let R=h.forwardRef((e,t)=>{let{className:a,children:l,position:s="popper",...i}=e;return(0,r.jsx)(z.h_,{children:(0,r.jsxs)(z.VY,{ref:t,className:(0,E.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:s,...i,children:[(0,r.jsx)(T,{}),(0,r.jsx)(z.l_,{className:(0,E.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:l}),(0,r.jsx)(A,{})]})})});R.displayName=z.VY.displayName,h.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(z.__,{ref:t,className:(0,E.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...l})}).displayName=z.__.displayName;let _=h.forwardRef((e,t)=>{let{className:a,children:l,...s}=e;return(0,r.jsxs)(z.ck,{ref:t,className:(0,E.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...s,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(z.wU,{children:(0,r.jsx)(S.Z,{className:"h-4 w-4"})})}),(0,r.jsx)(z.eT,{children:l})]})});_.displayName=z.ck.displayName,h.forwardRef((e,t)=>{let{className:a,...l}=e;return(0,r.jsx)(z.Z0,{ref:t,className:(0,E.cn)("-mx-1 my-1 h-px bg-muted",a),...l})}).displayName=z.Z0.displayName;var L=a(87138);let P=e=>{let{node:t,updateAttributes:a,editor:l}=e,[s,i]=(0,h.useState)(t.attrs.label),[n,o]=(0,h.useState)(t.attrs.action),[c,d]=(0,h.useState)(t.attrs.actionValue),u=l.isEditable;(0,h.useEffect)(()=>{i(t.attrs.label),o(t.attrs.action),d(t.attrs.actionValue)},[t.attrs]);let m=()=>{switch(n){case"alert":alert(c);break;case"message":console.log(c);break;case"link":window.open(c,"_blank")}};return u?(0,r.jsx)(p.T5,{className:"custom-button-wrapper",children:(0,r.jsxs)("div",{className:"flex flex-col items-center w-full my-2 p-4 border rounded",children:[(0,r.jsx)(C.I,{type:"text",value:s,onChange:e=>{i(e.target.value),a({label:e.target.value})},placeholder:"Button Text",className:"mb-2"}),(0,r.jsxs)(H,{value:n,onValueChange:e=>{o(e),a({action:e})},children:[(0,r.jsx)(O,{className:"w-full mb-2",children:(0,r.jsx)(J,{placeholder:"Select action"})}),(0,r.jsxs)(R,{children:[(0,r.jsx)(_,{value:"alert",children:"Alert"}),(0,r.jsx)(_,{value:"message",children:"Display Message"}),(0,r.jsx)(_,{value:"link",children:"Link"})]})]}),(0,r.jsx)(C.I,{type:"text",value:c,onChange:e=>{d(e.target.value),a({actionValue:e.target.value})},placeholder:"link"===n?"URL":"Message",className:"mb-2"}),(0,r.jsx)(k.z,{onClick:m,children:s})]})}):(0,r.jsx)(p.T5,{className:"custom-button-wrapper",children:(0,r.jsx)("div",{className:"flex justify-center w-full my-2",children:"link"===n?(0,r.jsx)(L.default,{href:c,target:"_blank",passHref:!0,children:(0,r.jsx)(k.z,{children:s})}):(0,r.jsx)(k.z,{onClick:m,children:s})})})},X=o.NB.create({name:"customButton",group:"block",content:"inline*",atom:!0,addAttributes:()=>({label:{default:"Click me"},action:{default:"alert"},actionValue:{default:"Button clicked!"}}),parseHTML:()=>[{tag:"div[data-custom-button]"}],renderHTML(e){let{HTMLAttributes:t}=e;return["div",(0,o.P1)(t,{"data-custom-button":""}),0]},addNodeView:()=>(0,p.fW)(P),addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.deleteSelection(),Delete:()=>this.editor.commands.deleteSelection()}}});var D=a(74421),V=a(67135),F=a(10883),Y=a(38746),U=a(74300),G=a(95137),W=a(
171976);let B=h.createContext(null);function q(){let e=h.useContext(B);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}let Q=h.forwardRef((e,t)=>{let{orientation:a="horizontal",opts:l,setApi:s,plugins:i,className:n,children:o,...c}=e,[d,u]=(0,U.Z)({...l,axis:"horizontal"===a?"x":"y"},i),[m,p]=h.useState(!1),[f,g]=h.useState(!1),x=h.useCallback(e=>{e&&(p(e.canScrollPrev()),g(e.canScrollNext()))},[]),b=h.useCallback(()=>{null==u||u.scrollPrev()},[u]),y=h.useCallback(()=>{null==u||u.scrollNext()},[u]),v=h.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),b()):"ArrowRight"===e.key&&(e.preventDefault(),y())},[b,y]);return h.useEffect(()=>{u&&s&&s(u)},[u,s]),h.useEffect(()=>{if(u)return x(u),u.on("reInit",x),u.on("select",x),()=>{null==u||u.off("select",x)}},[u,x]),(0,r.jsx)(B.Provider,{value:{carouselRef:d,api:u,opts:l,orientation:a||((null==l?void 0:l.axis)==="y"?"vertical":"horizontal"),scrollPrev:b,scrollNext:y,canScrollPrev:m,canScrollNext:f},children:(0,r.jsx)("div",{ref:t,onKeyDownCapture:v,className:(0,E.cn)("relative",n),role:"region","aria-roledescription":"carousel",...c,children:o})})});Q.displayName="Carousel";let $=h.forwardRef((e,t)=>{let{className:a,...l}=e,{carouselRef:s,orientation:i}=q();return(0,r.jsx)("div",{ref:s,className:"overflow-hidden",children:(0,r.jsx)("div",{ref:t,className:(0,E.cn)("flex","horizontal"===i?"-ml-4":"-mt-4 flex-col",a),...l})})});$.displayName="CarouselContent";let K=h.forwardRef((e,t)=>{let{className:a,...l}=e,{orientation:s}=q();return(0,r.jsx)("div",{ref:t,role:"group","aria-roledescription":"slide",className:(0,E.cn)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===s?"pl-4":"pt-4",a),...l})});K.displayName="CarouselItem";let ee=h.forwardRef((e,t)=>{let{className:a,variant:l="outline",size:s="icon",...i}=e,{orientation:n,scrollPrev:o,canScrollPrev:c}=q();return(0,r.jsxs)(k.z,{ref:t,variant:l,size:s,className:(0,E.cn)("absolute  h-8 w-8 rounded-full","horizontal"===n?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",a),disabled:!c,onClick:o,...i,children:[(0,r.jsx)(G.Z,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});ee.displayName="CarouselPrevious";let et=h.forwardRef((e,t)=>{let{className:a,variant:l="outline",size:s="icon",...i}=e,{orientation:n,scrollNext:o,canScrollNext:c}=q();return(0,r.jsxs)(k.z,{ref:t,variant:l,size:s,className:(0,E.cn)("absolute h-8 w-8 rounded-full","horizontal"===n?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",a),disabled:!c,onClick:o,...i,children:[(0,r.jsx)(W.Z,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Next slide"})]})});et.displayName="CarouselNext";let ea=(0,m.eI)("https://rmaikbonpvsnqumxxufn.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJtYWlrYm9ucHZzbnF1bXh4dWZuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjIzNzM4NjMsImV4cCI6MjAzNzk0OTg2M30.HwUYXzec3OGrM0lkOy_-O9urHNrvTbSv6in5XkVC1_E"),er=e=>{let{src:t,width:a}=e;if(!t.startsWith("public/"))return"".concat(t,"?width=").concat(a);{let{data:e}=ea.storage.from("editorimages").getPublicUrl(t);return"".concat(e.publicUrl,"?width=").concat(a)}},el=e=>{let{node:t,updateAttributes:a,editor:l}=e,[s,i]=(0,h.useState)(t.attrs.layout),[n,o]=(0,h.useState)(Array.isArray(t.attrs.images)?t.attrs.images:[]),[c,d]=(0,h.useState)(t.attrs.caption),[m,f]=(0,h.useState)(t.attrs.maxHeight||600),g=l.isEditable;(0,h.useEffect)(()=>{i(t.attrs.layout),o(Array.isArray(t.attrs.images)?t.attrs.images:[]),d(t.attrs.caption),f(t.attrs.maxHeight||600)},[t.attrs]);let x=e=>{let t=n.filter((t,a)=>a!==e);o(t),a({images:t})},b=(0,h.useCallback)(async e=>{let t=[...n,...(await Promise.all(e.map(async e=>await I(e)))).filter(e=>null!==e)];o(t),a({images:t})},[n,a]),{getRootProps:y,getInputProps:v,isDragActive:j}=(0,Y.uI)({onDrop:b}),w=()=>{if(!n||0===n.length)return(0,r.jsx)("div",{className:"flex justify-center items-center h-40 bg-gray-100",children:(0,r.jsx)("p",{className:"text-gray-500",children:"No images in gallery"})});let e=(e,t)=>
1(0,r.jsxs)("div",{className:"relative group h-full",children:[(0,r.jsx)(u.default,{src:e,alt:"Gallery image ".concat(t+1),loader:er,width:800,height:600,className:"object-cover w-full h-full",style:{maxHeight:"".concat(m,"px")}}),g&&(0,r.jsx)("button",{className:"absolute top-2 right-2 p-1 bg-red-500 text-white rounded-full opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>x(t),children:(0,r.jsx)(F.Z,{size:16})})]},t);if("carousel"!==s)return(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-1 p-2",children:n.map((t,a)=>e(t,a))});{let t=()=>{switch(n.length){case 1:return"basis-full";case 2:return"basis-1/2";default:return"basis-full md:basis-1/3 lg:basis-2/5"}};return(0,r.jsxs)(Q,{className:(()=>{switch(n.length){case 1:return"w-1/2 mx-auto";case 2:return"w-3/4 mx-auto";default:return"w-full"}})(),opts:{dragFree:!0},children:[(0,r.jsx)($,{children:n.map((a,l)=>(0,r.jsx)(K,{className:t(),children:e(a,l)},l))}),n.length>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ee,{}),(0,r.jsx)(et,{})]})]})}};return g?(0,r.jsx)(p.T5,{children:(0,r.jsxs)("div",{className:"custom-image-gallery-wrapper border rounded p-4 my-4",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Gallery"}),(0,r.jsxs)("div",{className:"settings-section mb-4",children:[(0,r.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(D.r,{id:"layout-switch",checked:"grid"===s,onCheckedChange:()=>{let e="carousel"===s?"grid":"carousel";i(e),a({layout:e})}}),(0,r.jsxs)(V._,{htmlFor:"layout-switch",children:["carousel"===s?"Carousel":"Grid"," Layout"]})]})}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(V._,{htmlFor:"max-height",children:"Max Height (px):"}),(0,r.jsx)(C.I,{id:"max-height",type:"number",value:m,onChange:e=>{let t=parseInt(e.target.value,10);f(t),a({maxHeight:t})},className:"w-20"})]})]}),(0,r.jsxs)("div",{...y(),className:"dropzone-section mb-4 border-2 border-dashed border-gray-300 p-4 text-center cursor-pointer",children:[(0,r.jsx)("input",{...v()}),j?(0,r.jsx)("p",{children:"Drop the images here ..."}):(0,r.jsx)("p",{children:"Drag 'n' drop some images here, or click to select files"})]}),(0,r.jsx)("div",{className:"gallery-preview relative left-1/2 right-1/2 -mx-[45vw] w-[90vw]",children:w()}),(0,r.jsx)(C.I,{type:"text",value:c,onChange:e=>{d(e.target.value),a({caption:e.target.value})},placeholder:"Gallery Caption",className:"mt-4"})]})}):(0,r.jsx)(p.T5,{children:(0,r.jsxs)("div",{className:"custom-image-gallery-wrapper relative left-1/2 right-1/2 -mx-[45vw] w-[90vw]",children:[w(),c&&(0,r.jsx)("p",{className:"text-center mt-2 italic text-gray-500",children:c})]})})},es=o.NB.create({name:"customImageGallery",group:"block",content:"inline*",atom:!0,addAttributes:()=>({layout:{default:"carousel"},images:{default:[],parseHTML:e=>{let t=e.getAttribute("data-images");return t?JSON.parse(t):[]}},caption:{default:""},maxHeight:{default:400}}),parseHTML:()=>[{tag:"div[data-custom-image-gallery]",getAttrs:e=>({layout:e.getAttribute("data-layout")||"carousel",images:JSON.parse(e.getAttribute("data-images")||"[]"),caption:e.getAttribute("data-caption")||"",maxHeight:parseInt(e.getAttribute("data-max-height")||"400",10)})}],renderHTML(e){let{HTMLAttributes:t}=e,{layout:a,images:r,caption:l,maxHeight:s,...i}=t;return["div",(0,o.P1)(i,{"data-custom-image-gallery":"","data-layout":a,"data-images":JSON.stringify(r),"data-caption":l,"data-max-height":s}),0]},addNodeView:()=>(0,p.fW)(el)});var ei=a(98041),en=a(56780),eo=a(68723),ec=a(43366),ed=a(53742),eu=a(37600);async function em(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2],j.A.info("Uploading image to cloud....");try{let a=await I(t);console.log("Supabase path",a),e.chain().insertContent([{type:"nextImage",attrs:{src:a}},{type:"paragraph"}]).focus().run()}catch(e){j.A.error("Error uploading image:",e.message)}}var ep=e=>{let{editable:t=!0,initialContent:a=null,font:o="serif"}=e,{setEditor:c}=(0,v.j)(),u=(0,p.jE)({extensions:[s.Z,ei.Z.configure({placeholder:"Write your note here..."}),en.Z.configure({className:"focus"}),l.Z,g,n.ZP,X,ec.Z,eo.ZP.configure({nested:!0}),es,i.Z.configure({controls:!1,nocookie:!0}),d.configure({allowedMimeTypes:["image/png","image/jpeg","image/gif","
1image/webp"],onDrop:(e,t,a)=>{t.forEach(async t=>{em(e,t,a)})},onPaste:(e,t,a)=>{if(a){let t=new DOMParser().parseFromString(a,"text/html").querySelector("img");return console.log("pasted html content",a,t),!!t&&!!t.src&&(function(e,t){e.chain().insertContent([{type:"nextImage",attrs:{src:t}},{type:"paragraph"}]).focus().run()}(e,t.src),!0)}t.forEach(async t=>{em(e,t)})}})],content:a,editorProps:{attributes:{class:"font-body h-full pb-10 min-h-[400px] focus:outline-none"}},editable:t});(0,h.useEffect)(()=>{u&&null!==a&&u.commands.setContent(a)},[u,a]);let m=(0,ed.b9)(eu.v8);return(0,h.useEffect)(()=>{if(u){c(u);let e=()=>{m(u.getHTML())};return u.on("update",e),()=>{u.off("update",e)}}},[u,c]),(0,r.jsx)("div",{children:u&&(0,r.jsx)(p.kg,{editor:u})})}}}]);

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.