PageSourceSearch

https://www.dawan.africa/_next/static/chunks/2478-7803fc0f393e06d7.js

js dawan.africa collected 2026-10-02 04:50:06 UTC 8,320 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2478],{22478:(e,r,n)=>{Promise.resolve().then(n.bind(n,35214)),Promise.resolve().then(n.bind(n,83684)),Promise.resolve().then(n.bind(n,40367)),Promise.resolve().then(n.bind(n,76160)),Promise.resolve().then(n.bind(n,72606)),Promise.resolve().then(n.bind(n,44490)),Promise.resolve().then(n.bind(n,37804)),Promise.resolve().then(n.bind(n,94686)),Promise.resolve().then(n.bind(n,45975)),Promise.resolve().then(n.bind(n,84737)),Promise.resolve().then(n.bind(n,56912)),Promise.resolve().then(n.bind(n,52241)),Promise.resolve().then(n.bind(n,84154)),Promise.resolve().then(n.bind(n,85259)),Promise.resolve().then(n.bind(n,95295)),Promise.resolve().then(n.bind(n,82723)),Promise.resolve().then(n.bind(n,77283)),Promise.resolve().then(n.bind(n,2992)),Promise.resolve().then(n.bind(n,65182)),Promise.resolve().then(n.bind(n,28349)),Promise.resolve().then(n.bind(n,58238)),Promise.resolve().then(n.bind(n,15915)),Promise.resolve().then(n.bind(n,49819)),Promise.resolve().then(n.bind(n,20258)),Promise.resolve().then(n.bind(n,68460)),Promise.resolve().then(n.bind(n,36065)),Promise.resolve().then(n.bind(n,87106)),Promise.resolve().then(n.bind(n,54450)),Promise.resolve().then(n.bind(n,26416)),Promise.resolve().then(n.bind(n,37704)),Promise.resolve().then(n.bind(n,35839)),Promise.resolve().then(n.bind(n,46590)),Promise.resolve().then(n.bind(n,20964)),Promise.resolve().then(n.bind(n,15985)),Promise.resolve().then(n.bind(n,42769)),Promise.resolve().then(n.bind(n,6562)),Promise.resolve().then(n.bind(n,14366)),Promise.resolve().then(n.bind(n,87439)),Promise.resolve().then(n.bind(n,38619)),Promise.resolve().then(n.bind(n,20619)),Promise.resolve().then(n.bind(n,4427)),Promise.resolve().then(n.bind(n,14653)),Promise.resolve().then(n.bind(n,97169)),Promise.resolve().then(n.bind(n,65842)),Promise.resolve().then(n.bind(n,42464)),Promise.resolve().then(n.bind(n,81587)),Promise.resolve().then(n.bind(n,52361)),Promise.resolve().then(n.bind(n,13989)),Promise.resolve().then(n.t.bind(n,17506,23)),Promise.resolve().then(n.bind(n,28076)),Promise.resolve().then(n.bind(n,26245))},26245:(e,r,n)=>{"use strict";n.d(r,{default:()=>h});var t=n(30388),o=n(28920);let i=e=>Array.isArray(e)?e[0]:e,l=e=>{let r=[],n=[e],t=new Set;for(;n.length>0;){let e=n.shift();!(!e||"object"!=typeof e||t.has(e))&&(t.add(e),r.push(e),"value"in e&&n.push(e.value),"data"in e&&n.push(e.data))}return r},s=e=>{if("string"==typeof e){let r=e.trim();return r.length>0?r:null}return null},d=e=>{let r=i(e),n=s(r);if(n)return n;for(let e of l(r)){let r=s(e.id)||s(e._id)||s(e.value);if(r)return r}return null},a=e=>{if(!e||"object"!=typeof e)return null;let r=s(e.name);if(r)return r;let n=s(e.fullName);return n||s(e.email)},u=e=>{let r=i(e),n=a(r);if(n)return n;for(let e of l(r)){let r=a(e);if(r)return r}return null},h=e=>{let{rowData:r}=e,n=(0,o.useMemo)(()=>{if(!(null==r?void 0:r.useManualReporter))return null;let e=r.manualReporter;return"string"==typeof(null==e?void 0:e.name)&&e.name.trim().length>0?e.name.trim():null},[r]),i=(0,o.useMemo)(()=>n||u(null==r?void 0:r.author),[n,r]),[l,s]=(0,o.useState)(i);return((0,o.useEffect)(()=>{s(i)},[i]),(0,o.useEffect)(()=>{if(l||n)return;let e=d(null==r?void 0:r.author);if(!e)return;let t=new AbortController;return(async()=>{try{let r=await fetch("/api/users/".concat(e),{credentials:"include",signal:t.signal});if(!r.ok)return;let n=await r.json(),o=null;n&&"object"==typeof n&&(o="doc"in n&&n.doc&&"object"==typeof n.doc?n.doc:n);let i=(null==o?void 0:o.name)||(null==o?void 0:o.fullName)||(null==o?void 0:o.email)||null;if(i)return void s(i)}catch(e){if("AbortError"===e.name)return}})(),()=>{t.abort()}},[n,l,null==r?void 0:r.author]),n)?(0,t.jsx)("span",{children:n}):l?(0,t.jsx)("span",{children:l}):(0,t.jsx)("span",{children:"No Author"})}},28076:(e,r,n)=>{"use strict";n.d(r,{default:()=>l});var t=n(30388),o=n(28920),i=n(52361);let l=()=>{let[e,r]=(0,o.useState)(null),[n,l]=(0,o.useState)(!1),[s,d]=(0,o.useState)(null),a=(0,i.useFormFields)(e=>{let[r]=e;return r.blogPost});if((0,o.useEffect)(()=>{(async()=>{let e=null==a?void 0:a.value;if(!e)return r(null);l(!0),d(null);try{let n=await fetch("/api/blogPosts/".concat(e));if(!n.ok)throw Error("Failed to fetch blog post");let t=await n.json();r(t)}catch(e){console.error("Error fetching blog post for preview:",e),d("Failed to load blog post preview")}finally{l(!1)}})()},[null==a?void 0:a.value]),!(null==a?void 0:a.value))return null;if(n)return(0,t.jsx)("div",{className:"field-type ui",children:(0,t.jsxs)("div",{style:{padding:"16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#f9f9f9"},children:[(0,t.jsx)("h3",{style:{margin:"0 0 12px 0",fontSize:"16px",fontWeight:"600"},children:"\uD83D\uDCC4 Blog Post Preview"}),(0,t.jsx)("div",{style:{color:"#666",fontStyle:"italic"},children:"Loading blog post preview..."})]})});if(s)return(0,t.jsx)("div",{className:"field-type ui",children:(0,t.jsxs)("div",{style:{padding:"16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#fef2f2"},children:[(0,t.jsx)("h3",{style:{margin:"0 0 12px 0",fontSize:"16px",fontWeight:"600",color:"#dc2626"},children:"❌ Preview Error"}),(0,t.jsx)("div",{style:{color:"#dc2626"},children:s})]})});if(!e)return null;let u=(e=>{if(!e||!Array.isArray(e))return"No content available";try{var r;let n=e.find(e=>"richtext"===e.blockType);if(!n||"richtext"!==n.blockType)return"No text content found";let t=n.content;if(!(null==t||null==(r=t.root)?void 0:r.children))return"No content available";let o="",i=e=>
1{e.text&&(o+=e.text+" "),e.children&&e.children.forEach(i)};t.root.children.forEach(i);let l=o.trim();return l.length>200?"".concat(l.substring(0,200),"..."):l||"No text content"}catch(e){return console.error("Error extracting content preview:",e),"Unable to preview content"}})(e.layout),h=(e=>{var r;if(e.useManualReporter&&(null==(r=e.manualReporter)?void 0:r.name)){let r=e.manualReporter.role?" (".concat(e.manualReporter.role,")"):"";return"".concat(e.manualReporter.name).concat(r)}let n=e.author;return"string"==typeof n?"Author ID: "+n:"object"==typeof n&&n&&(n.name||n.email)||"Unknown Author"})(e);return(0,t.jsx)("div",{className:"field-type ui",children:(0,t.jsxs)("div",{style:{padding:"16px",border:"1px solid #e0e0e0",borderRadius:"4px",backgroundColor:"#f9f9f9",marginBottom:"16px"},children:[(0,t.jsx)("h3",{style:{margin:"0 0 16px 0",fontSize:"16px",fontWeight:"600",color:"#333"},children:"\uD83D\uDCC4 Blog Post Preview"}),(0,t.jsx)("div",{style:{marginBottom:"12px"},children:(0,t.jsx)("strong",{style:{color:"#333",fontSize:"18px"},children:e.name||"Untitled Post"})}),e.slug&&(0,t.jsxs)("div",{style:{marginBottom:"12px",fontSize:"14px",color:"#666"},children:[(0,t.jsx)("strong",{children:"Slug:"})," /",e.slug]}),(0,t.jsxs)("div",{style:{marginBottom:"12px",padding:"12px",backgroundColor:"#fff",border:"1px solid #e0e0e0",borderRadius:"4px",lineHeight:"1.5"},children:[(0,t.jsx)("div",{style:{fontSize:"12px",color:"#666",marginBottom:"8px",fontWeight:"600"},children:"CONTENT PREVIEW:"}),(0,t.jsx)("div",{style:{color:"#333"},children:u})]}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px",fontSize:"14px",color:"#666"},children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Author:"})," ",h]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Status:"}),(0,t.jsx)("span",{style:{marginLeft:"4px",padding:"2px 6px",backgroundColor:"published"===e.status?"#22c55e":"#f59e0b",color:"white",borderRadius:"3px",fontSize:"12px"},children:"published"===e.status?"\uD83D\uDE80 Published":"⏳ Pending"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Created:"})," ",new Date(e.createdAt).toLocaleDateString()]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Updated:"})," ",new Date(e.updatedAt).toLocaleDateString()]})]}),(e.views||e.likes)&&(0,t.jsxs)("div",{style:{marginTop:"12px",paddingTop:"12px",borderTop:"1px solid #e0e0e0",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px",fontSize:"14px",color:"#666"},children:[e.views&&(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Views:"})," ",e.views.toLocaleString()]}),e.likes&&(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Likes:"})," ",e.likes.toLocaleString()]})]})]})})}}}]);

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.