PageSourceSearch

https://www.hekma.ai/_next/static/chunks/209.2f1df15eb316f2b8.js

js hekma.ai collected 2026-10-05 14:28:23 UTC 4,707 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[209],{34971:(e,i,t)=>{t.r(i),t.d(i,{default:()=>f});var n=t(95155),l=t(13439),c=t(35880),s=t(27337),a=t(59265),r=t(43561),o=t(97233),d=t(6296),u=t(17243),h=t(12115),g=t(96256);function x({onClick:e,active:i,title:t,children:l}){return(0,n.jsx)("button",{type:"button",onMouseDown:i=>{i.preventDefault(),e()},title:t,className:`p-1.5 rounded text-sm font-medium transition-colors ${i?"bg-[#7948A5] text-white":"text-gray-600 hover:bg-gray-100 hover:text-[#7948A5]"}`,children:l})}function f({value:e,onChange:i,placeholder:t="Write your blog post here…",minHeight:v="320px"}){let m=(0,l.hG)({immediatelyRender:!1,extensions:[c.A,s.Ay.configure({inline:!1}),a.Ay.configure({openOnClick:!1,HTMLAttributes:{class:"text-[#7948A5] underline"}}),r.A.configure({placeholder:t})],content:e,onUpdate:({editor:e})=>{i(e.getHTML())},editorProps:{attributes:{class:"prose prose-sm max-w-none focus:outline-none p-4 min-h-[inherit]"}}});(0,h.useEffect)(()=>{m&&e!==m.getHTML()&&m.commands.setContent(e)},[e]);let k=(0,h.useRef)(null),[p,j]=(0,h.useState)(!1),b=(0,h.useCallback)(()=>{k.current?.click()},[]),C=(0,h.useCallback)(async e=>{let i=e.target.files?.[0];if(!i||!m)return;j(!0);let t=new FormData;t.append("file",i);try{let e=await fetch("/api/admin/upload",{method:"POST",body:t}),i=await (0,g.q)(e);e.ok&&"string"==typeof i.url&&m.chain().focus().setImage({src:i.url}).run()}catch{}finally{j(!1),e.target.value=""}},[m]),y=(0,h.useCallback)(()=>{let e=window.prompt("Enter URL");null!==e&&(""===e?m?.chain().focus().extendMarkRange("link").unsetLink().run():m?.chain().focus().extendMarkRange("link").setLink({href:e}).run())},[m]);return m?(0,n.jsxs)("div",{className:"border border-gray-200 rounded-xl overflow-hidden focus-within:border-[#7948A5] transition-colors",children:[(0,n.jsx)("input",{ref:k,type:"file",accept:"image/*",className:"hidden",onChange:C}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-0.5 p-2 border-b border-gray-100 bg-gray-50",children:[(0,n.jsx)(x,{onClick:()=>m.chain().focus().toggleBold().run(),active:m.isActive("bold"),title:"Bold",children:(0,n.jsx)("strong",{children:"B"})}),(0,n.jsx)(x,{onClick:()=>m.chain().focus().toggleItalic().run(),active:m.isActive("italic"),title:"Italic",children:(0,n.jsx)("em",{children:"I"})}),(0,n.jsx)("div",{className:"w-px h-5 bg-gray-200 mx-1"}),(0,n.jsx)(x,{onClick:()=>m.chain().focus().toggleHeading({level:1}).run(),active:m.isActive("heading",{level:1}),title:"Heading 1",children:"H1"}),(0,n.jsx)(x,{onClick:()=>m.chain().focus().toggleHeading({level:2}).run(),active:m.isActive("heading",{level:2}),title:"Heading 2",children:"H2"}),(0,n.jsx)(x,{onClick:()=>m.chain().focus().toggleHeading({level:3}).run(),active:m.isActive("heading",{level:3}),title:"Heading 3",children:"H3"}),(0,n.jsx)("div",{className:"w-px h-5 bg-gray-200 mx-1"}),(0,n.jsx)(x,{onClick:()=>m.chain().focus().toggleBulletList().run(),active:m.isActive("bulletList"),title:"Bullet list",children:"• List"}),(0,n.jsx)(x,{onClick:()=>m.chain().focus().toggleOrderedList().run(),active:m.isActive("orderedList"),title:"Numbered list",children:"1. List"}),(0,n.jsx)("div",{className:"w-px h-5 bg-gray-200 mx-1"}),(0,n.jsx)(x,{onClick:()=>m.chain().focus().toggleBlockquote().run(),active:m.isActive("blockquote"),title:"Blockquote",children:"❝"}),(0,n.jsx)(x,{onClick:()=>m.chain().focus().toggleCode().run(),active:m.isActive("code"),title:"Inline code",children:"</>"}),(0,n.jsx)(x,{onClick:()=>m.chain().focus().toggleCodeBlock().run(),active:m.isActive("codeBlock"),title:"Code block",children:"Code"}),(0,n.jsx)("div",{className:"w-px h-5 bg-gray-200 mx-1"}),(0,n.jsx)(x,{onClick:y,active:m.isActive("link"),title:"Add link",children:(0,n.jsx)(o.A,{className:"w-4 h-4","aria-hidden":"true"})}),(0,n.jsx)(x,{onClick:b,title:"Upload image",children:p?(0,n.jsx)(d.A,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}):(0,n.jsx)(u.A,{className:"w-4 h-4","aria-hidden":"true"})}),(0,n.jsx)("div",{className:"w-px h-5 bg-gray-200 mx-1"}),(0,n.jsx)(x,{onClick:()=>
1m.chain().focus().undo().run(),title:"Undo",children:"↩"}),(0,n.jsx)(x,{onClick:()=>m.chain().focus().redo().run(),title:"Redo",children:"↪"}),(0,n.jsx)("div",{className:"ml-auto",children:(0,n.jsx)(x,{onClick:()=>m.chain().focus().clearContent().run(),title:"Clear content",children:(0,n.jsx)("span",{className:"text-xs text-red-400",children:"Clear"})})})]}),(0,n.jsx)("div",{style:{minHeight:v},className:"bg-white",children:(0,n.jsx)(l.$Z,{editor:m})})]}):null}},96256:(e,i,t)=>{t.d(i,{q:()=>n});async function n(e){let i=await e.text();if(!i)return{};try{return JSON.parse(i)}catch{return{}}}}}]);

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.