1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-ByxpjbKE.js","assets/extends-CF3RwP-h.js","assets/main-CANXEJxe.js","assets/index-CwUJlZQT.js","assets/index-D8l4FXZc.js","assets/index-CvvzJRpt.js","assets/index-CSdkLgx-.js","assets/index-BzBw1O-E.js","assets/BundledEditor-CRrFqBK0.js"])))=>i.map(i=>d[i]); 2import{r as e,j as t,_ as d}from"./main-CANXEJxe.js";const v=e.lazy(()=>Promise.all([d(()=>import("./index-ByxpjbKE.js"),__vite__mapDeps([0,1,2,3,4,5])),d(()=>import("./index-CSdkLgx-.js"),__vite__mapDeps([6,4,3,5])),d(()=>import("./index-BzBw1O-E.js"),__vite__mapDeps([7,1,4,3])),d(()=>import("./index-CwUJlZQT.js").then(i=>i.aq),[])]).then(([i,r,n,l])=>{const c=i.default,m=r.html,u=n.monokai,o=l.EditorView.contentAttributes.of({"aria-label":"HTML source code"});return{default:e.forwardRef(({value:h,onChange:f},p)=>t.jsx(c,{ref:p,value:h,height:"700px",theme:u,extensions:[m(),o],onChange:f,basicSetup:{lineNumbers:!0,highlightActiveLineGutter:!0,highlightSpecialChars:!0,foldGutter:!0,drawSelection:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,rectangularSelection:!0,crosshairCursor:!0,highlightActiveLine:!0,highlightSelectionMatches:!0,closeBracketsKeymap:!0,searchKeymap:!0,foldKeymap:!0,completionKeymap:!0,lintKeymap:!0}}))}})),_=e.forwardRef(({value:i,onChange:r},n)=>t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx(e.Suspense,{fallback:t.jsx("div",{className:"h-[700px] bg-gray-900 rounded border border-gray-700 flex items-center justify-center",children:t.jsx("p",{className:"text-gray-400",children:"Loading code view..."})}),children:t.jsx(v,{ref:n,value:i,onChange:r})})}));_.displayName="CodeEditor";const C=e.lazy(()=>d(()=>import("./BundledEditor-CRrFqBK0.js"),__vite__mapDeps([8,2])));function E({initialValue:i,onInit:r,onChange:n}){return t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx(e.Suspense,{fallback:t.jsx("div",{className:"h-[700px] bg-white rounded border border-gray-300 flex items-center justify-center",children:t.jsx("p",{className:"text-gray-500",children:"Loading editor..."})}),children:t.jsx(C,{onInit:r,initialValue:i,init:{height:700,menubar:!0,skin:!1,content_css:!1,iframe_aria_text:"HTML editor (visual)",plugins:["advlist","anchor","autolink","charmap","code","codesample","directionality","emoticons","fullscreen","help","image","insertdatetime","link","lists","media","nonbreaking","pagebreak","preview","save","searchreplace","table","visualblocks","wordcount"],toolbar1:"undo redo | blocks | bold italic underline strikethrough | forecolor backcolor | alignleft aligncenter alignright al
2ignjustify | bullist numlist outdent indent | removeformat",toolbar2:"link image media table | charmap emoticons hr pagebreak | insertdatetime | preview fullscreen code codesample | print save",image_advtab:!0,content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"},onEditorChange:n,onKeyUp:n})})})}function j({initialContent:i}){const r=e.useRef(null),n=e.useRef(null),l=e.useRef(!1),c=e.useRef(!1),[m,u]=e.useState(i),o=e.useCallback(()=>{if(n.current?.view){const a=n.current.view,s=a.state.doc,g=s.lines;a.dispatch({changes:Array.from({length:g},(x,y)=>{const b=s.line(y+1);return{from:b.from,to:b.to,insert:b.text.trim()}}).filter(x=>x.insert!==s.lineAt(x.from).text)})}},[]),h=e.useCallback(()=>{if(r.current&&!c.current){l.current=!0;const a=r.current.getContent();u(a),setTimeout(()=>{o(),l.current=!1},0)}},[o]),f=e.useCallback(a=>{!l.current&&r.current&&(c.current=!0,u(a),r.current.setContent(a),setTimeout(()=>{o(),c.current=!1},0))},[o]),p=e.useCallback((a,s)=>{r.current=s;const g=s.getContent();u(g),setTimeout(()=>{o()},100)},[o]);return t.jsxs("section",{className:"flex flex-col lg:flex-row gap-5 px-5 py-5 bg-[#dddddd] mb-9",children:[t.jsx(E,{initialValue:i,onInit:p,onChange:h}),t.jsx(_,{ref:n,value:m,onChange:f})]})}export{j as DualEditorPanel}; 3//# sourceMappingURL=DualEditorPanel-JEN6BnPd.js.map
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.