PageSourceSearch

https://www.mangalmay.org/_next/static/chunks/pages/admin/Components/FacultyDynamicPage-b92f0d56623b85f3.js

js mangalmay.org collected 2026-10-04 00:14:41 UTC 31,535 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7841],{14398:(e,a,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/Components/FacultyDynamicPage",function(){return r(23170)}])},18264:(e,a,r)=>{"use strict";r.r(a),r.d(a,{uploadImages:()=>t});var s=r(54196);async function t(e){let a=new FormData;for(let r of Array.isArray(e)?e:[e])a.append("files",r);try{let r=await fetch("".concat(s.Qs,"upload/"),{method:"POST",body:a,credentials:"include"}),t=await r.json();if(!r.ok)throw Error(t.message||"Image upload failed");let l=t.data.fileUrls.map(e=>{try{return new URL(e).pathname}catch(r){let a=e.split("/");return"/"+a.slice(-2).join("/")}});return Array.isArray(e)?l:l[0]}catch(e){throw console.error("Upload error:",e),e}}},23170:(e,a,r)=>{"use strict";r.r(a),r.d(a,{default:()=>b});var s=r(3576),t=r(62701),l=r(37876),n=r(14232),o=r(18847),i=r.n(o),d=r(54196),c=r(14e3),m=r(13734);r(93754);var g=r(18264);let h=i()(()=>Promise.all([r.e(5100),r.e(5364)]).then(r.t.bind(r,47860,23)),{loadableGenerated:{webpack:()=>[47860]},ssr:!1,loading:()=>(0,l.jsxs)("div",{className:"flex items-center justify-center h-32 bg-gray-50 rounded-lg",children:[(0,l.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"}),(0,l.jsx)("span",{className:"ml-2 text-gray-600",children:"Loading editor..."})]})}),u=e=>{let{file:a,imageUrl:r,onDelete:s,label:t,dimensions:o,isUploading:i}
1=e,[c,m]=(0,n.useState)(null);return(n.useEffect(()=>{if(r)m(r);else if(a&&"object"==typeof a){let e=URL.createObjectURL(a);return m(e),()=>URL.revokeObjectURL(e)}},[a,r]),a||r)?(0,l.jsx)("div",{className:"mt-3 p-3 bg-gray-50 rounded-lg border",children:(0,l.jsxs)("div",{className:"flex items-start justify-between",children:[(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"text-sm font-medium text-gray-700 mb-2",children:t}),(0,l.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("img",{src:d.Ir+c||"/placeholder.svg",alt:"Preview",className:"w-16 h-16 object-cover rounded-lg border"}),i&&(0,l.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50 rounded-lg flex items-center justify-center",children:(0,l.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-2 border-white border-t-transparent"})})]}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"text-sm text-gray-600 truncate",children:"string"==typeof a?"Uploaded Image":(null==a?void 0:a.name)||"Image"}),(0,l.jsx)("p",{className:"text-xs text-gray-500",children:o}),(null==a?void 0:a.size)&&(0,l.jsxs)("p",{className:"text-xs text-gray-500",children:[(a.size/1024).toFixed(1)," KB"]}),i&&(0,l.jsx)("p",{className:"text-xs text-blue-500",children:"Uploading..."})]})]})]}),(0,l.jsx)("button",{type:"button",onClick:s,disabled:i,className:"ml-2 p-1 text-red-500 hover:text-red-700 hover:bg-red-50 rounded-full transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Delete image",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}):null},x=e=>{let{files:a,imageUrls:r,onDeleteFile:s,label:t,uploadingIndexes:n}=e;if((!a||0===a.length)&&(!r||0===r.length))return null;let o=Math.max((null==a?void 0:a.length)||0,(null==r?void 0:r.length)||0);return(0,l.jsxs)("div",{className:"mt-3 p-3 bg-gray-50 rounded-lg border",children:[(0,l.jsxs)("p",{className:"text-sm font-medium text-gray-700 mb-3",children:[t," (",o," files)"]}),(0,l.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:Array.from({length:o}).map((e,t)=>{let o=null==a?void 0:a[t],i=null==r?void 0:r[t],d=null==n?void 0:n.includes(t),c=null;return i?c=i:o&&(c=URL.createObjectURL(o)),(0,l.jsxs)("div",{className:"relative group",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("img",{src:c||"/placeholder.svg",alt:"Gallery ".concat(t+1),className:"w-full h-20 object-cover rounded-lg border"}),d&&(0,l.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-50 rounded-lg flex items-center justify-center",children:(0,l.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent"})})]}),(0,l.jsx)("button",{type:"button",onClick:()=>s(t),disabled:d,className:"absolute -top-2 -right-2 p-1 bg-red-500 text-white rounded-full opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-600 disabled:opacity-50 disabled:cursor-not-allowed",title:"Delete image",children:(0,l.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,l.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-black bg-opacity-50 text-white text-xs p-1 rounded-b-lg truncate",children:"string"==typeof o?"Uploaded":(null==o?void 0:o.name)||"Image"})]},t)})})]})},p=e=>{let{id:a,label:r,file:s,imageUrl:t,onChange:n,onDelete:o,dimensions:i,required:d=!1,isUploading:c=!1,type:m="image"}=e;return(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("label",{htmlFor:a,className:"block text-sm font-medium text-gray-700",children:[r," ",d&&(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsxs)("div",{className:"border-2 border-dashed border-gray-300 hover:border-blue-400 transition-colors rounded-lg p-6 text-center bg-gray-50 hover:bg-gray-100",children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400",stroke:"currentColor",fill:"none",viewBox:"0 0 48 48",children:(0,l.jsx)("path",{d:"M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})}),(0,l.jsxs)("div",{className:"text-sm text-gray-600",children:[(0,l.jsx)("p",{className:"font-medium",children:"Click to upload or drag and drop"}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"pdf"===m?"PDF format only":"WebP format recommended"}),i&&(0,l.jsxs)("p",{className:"text-xs text-gray-500",children:["Dimensions: ",i]})]})]}),(0,l.jsx)("input",{type:"file",id:a,accept:"pdf"===m?"application/pdf":"image/webp,image/jpeg,image/png",onCh
1ange:n,className:"hidden",disabled:c}),(0,l.jsx)("label",{htmlFor:a,className:"mt-4 inline-flex items-center px-4 py-2 text-white text-sm font-medium rounded-lg cursor-pointer transition-colors ".concat(c?"bg-gray-400 cursor-not-allowed":"bg-blue-600 hover:bg-blue-700"),children:c?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Uploading..."]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Choose File"]})})]}),(0,l.jsx)(u,{file:s,imageUrl:t,onDelete:o,label:r,dimensions:i,isUploading:c})]})};function b(e){let a,{allData:r,parentPage:o,type:i,componentType:u}=e,b=(0,c.useRouter)(),[v,f]=(0,n.useState)(!1),[j,y]=(0,n.useState)(""),[N,w]=(0,n.useState)(!1),[k,_]=(0,n.use
1State)([]),[C,S]=(0,n.useState)(null),[L,R]=(0,n.useState)(!0),[P,F]=(0,n.useState)([]),[U,M]=(0,n.useState)(0),[B,D]=(0,n.useState)({}),[I,W]=(0,n.useState)([]),[T,E]=(0,n.useState)({page_id:null==r?void 0:r.page_id,parent_id:null==r?void 0:r.parent_id,languageId:1,price:"",name:null==r?void 0:r.name,parentPage:null==o?void 0:o.name,pageTitle:null==r?void 0:r.name,date:(a=null==r?void 0:r.date)&&!isNaN(new Date(a).getTime())?new Date(r.date).toISOString().split("T")[0]:"",shortdesc:"",description:"",param1:"",paramvalue1:"",param_img1:"",param_url1:"",param2:"",paramvalue2:"",param_img2:"",param_url2:"",param3:"",paramvalue3:"",param_img3:"",param_url3:"",param4:"",paramvalue4:"",param_img4:"",param_url4:"",param5:"",paramvalue5:"",param_img5:"",param_url5:"",param6:"",paramvalue6:"",param_img6:"",param_url6:"",param7:"",paramvalue7:"",param_img7:"",param_url7:"",param8:"",paramvalue8:"",param_img8:"",param_url8:"",param9:"",paramvalue9:"",param_img9:"",param_url9:"",param10:"",paramvalue10:"",param_img10:"",param_url10:"",banner_img:"",downloadCenterPdf:"",tag1:"",tag2:"",tag3:"",schemaid:"",nic_name:"",featured_img:"",col_width:"",video_url:"",old_url:"",featured_status:"",highlightBanner:"",galleryimg:[],type:null==r?void 0:r.type,mainReportImage:"",metatitle:"",metadesc:"",keywords_tag:""});(0,n.useEffect)(()=>{T.parentPage&&y(T.parentPage)},[T.parentPage]);let A=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{let a=await fetch("".concat(d.Qs,"slug/getParents"),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({query:e,page:1,limit:10,type:["Department","School"]}
1)}),r=(await a.json()).data.pages||[];0===r.length?(F([]),_([{name:"This is parent page",reportId:null}]),R(!1)):(F(r),_(r.slice(0,10)),R(r.length>10))}catch(e){console.error("Error fetching parent pages:",e)}};(0,n.useEffect)(()=>{A()},[]);let z=e=>{let{name:a,value:r}=e.target;E(e=>(0,t._)((0,s._)({},e),{[a]:r}))},H=async(e,a)=>{let r=e.target.files[0];if(r){D(e=>(0,t._)((0,s._)({},e),{[a]:!0}));try{let e=await (0,g.uploadImages)([r]);E(r=>(0,t._)((0,s._)({},r),{[a]:e[0]})),m.oR.success("Image uploaded successfully!")}catch(e){console.error("Upload error:",e),m.oR.error("Failed to upload image. Please try again.")}finally{D(e=>(0,t._)((0,s._)({},e),{[a]:!1}))}}},O=e=>{E(a=>(0,t._)((0,s._)({},a),{[e]:""}))},q=async(e,a)=>{let r=Array.from(e.target.files);if(0===r.length)return;let l=T[a]||[],n=l.length,o=r.map((e,a)=>n+a);W(e=>[...e,...o]);try{let e=await (0,g.uploadImages)(r);E(r=>(0,t._)((0,s._)({},r),{[a]:[...l,...e]})),m.oR.success("".concat(r.length," image(s) uploaded successfully!"))}catch(e){console.error("Upload error:",e),m.oR.error("Failed to upload images. Please try again.")}finally{W(e=>e.filter(e=>!o.includes(e)))}},V=async()=>{let e=document.getElementById("progress-bar");try{e.style.width="0%",e.style.transition="none",requestAnimationFrame(()=>{e.style.transition="width 0.5s ease",e.style.width="100%"});let a=(0,t._)((0,s._)({},T),{ComponentType:u||(null==r?void 0:r.ComponentType)}),l=await fetch("".concat(d.Qs,"slug/update"),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(a)}),n=await l.json(),o=n.data.pages||[];n.status?(m.oR.success("".concat(i," inserted Successfully")),b.push("/admin/".concat(null==i?void 0:i.toLowerCase().replace(/\s+/g,"-"),"-list"))):m.oR.error("Something went wrong: ".concat(null==o?void 0:o.message))}catch(e){console.error("Error fetching parent pages:",e),m.oR.error("An error occurred while processing your request.")}finally{e.style.width="0%"}};return(0,l.jsx)("div",{className:"pb-10",children:(0,l.jsx)("div",{className:"",children:(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault(),V()},className:"space-y-8",children:[(0,l.jsx)("div",{id:"progress-bar",className:"fixed top-0 left-0 h-1 bg-gradient-to-r from-blue-500 to-purple-600 z-50 transition-all duration-500"}),(0,l.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("h1",{className:"text-3xl font-novaBold text-gray-900",children:["Add ",i," Details"]}),(0,l.jsxs)("p",{className:"text-gray-600 mt-2 font-novaReg",children:["Create and configure your ",null==i?void 0:i.toLowerCase()," content with all necessary details"]})]}),(0,l.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,l.jsx)("div",{className:"bg-gradient-to-r from-purple-500 to-pink-600 text-white px-6 py-3 rounded-lg cursor-pointer hover:from-purple-600 hover:to-pink-700 transition-all duration-200 transform hover:scale-105 shadow-lg",children:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),(0,l.jsx)("span",{className:"font-novaSemi",children:"Generate Meta with AI"})]})}),(0,l.jsx)("button",{type:"button",onClick:()=>b.back(),className:"px-4 py-2 text-gray-600 hover:text-gray-800 hover:bg-gray-100 rounded-lg transition-colors",children:(0,l.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})})})]})]})}),(0,l.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-3 mb-6",children:[(0,l.jsx)("div",{className:"w-8 h-8 bg-blue-100 rounded-lg flex items-center justify-center",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,l.jsx)("h2",{className:"text-xl font-novaSemi text-gray-900",children:"Basic Details"})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2  gap-6",children:(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsxs)("label",{htmlFor:"parent-page",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:["Choose School or Department Page",(0,l.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("input",{id:"parent-page",type:"text",value:j,onChange:e=>{let a=e.target.value;y(a),a.length>0?(A(a),w(!0)):(_(P.slice(0,10)),w(!1))},placeholder:"Search and select parent page...",className:"w-full border-2 border-gray-200 font-novaReg rounded-xl py-3 px-4 focus:outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-200 transition-all duration-200 bg-gray-50 hover:bg-white"}),(0,l.jsx)("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})]}),N&&(0,l.jsxs)("div",{className:"absolute z-20 w-full bg-white border-2 border-gray-200 rounded-xl mt-2 max-h-64 overflow-auto shadow-2xl",children:[k.map((e,a)=>0!=e.page_id&&(0,l.jsxs)("div",{onClick:()=>{y(e.name),S(e),w(!1),E(a=>(0,t._)((0,s._)({},a),{parent_id:e.page_id,parentPage:e.name}))},className:"cursor-pointer px-5 py-2 hover:bg-blue-100/60 border-b border-gray-200 last:border-b-0 transition-all duration-150 rounded-md hover:shadow-sm group",children:[(0,l.jsx)("div",{className:"font-semibold text-gray-800 text-base group-hover:text-blue-700",children:e.name}),(0,l.jsxs)("div",{className:"flex items-center gap-3 mt-1 text-sm text-gray-500",children:[(null==e?void 0:e.type)&&(0,l.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs\n                                                        ".concat("School"===e.type?"bg-blue-100 text-blue-700":"Department"===e.type?"bg-green-100 text-green-700":"bg-gray-100 text-gray-700"),children:e.type}),(null==e?void 0:e.page_id)&&(0,l.jsxs)("span",{className:"text-xs",children:["ID: ",(0,l.jsx)("span",{className:"font-medium text-gray-600",children:e.page_id})]})]})]},a)),L&&k.length>0&&(0,l.jsx)("button",{type:"button",onClick:()=>{let e=U+10;_(P.slice(0,e)),M(e),e>=P.length&&R(!1)},className:"w-full px-4 py-3 text-blue-600 hover:bg-blue-50 transition-colors duration-150",children:"Load More Pages"})]})]})})]}),(0,l.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-3 mb-6",children:[(0,l.jsx)("div",{className:"w-8 h-8 bg-green-100 rounded-lg flex items-center justify-center",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,l.jsx)("h2",{className:"text-xl font-novaSemi text-gray-900",children:"Page Details"})]}),(0,l.jsx)("div",{className:"space-y-6",children:(0,l.jsxs)("div",{className:"grid grid-cols-1 ".concat("Page"===i?"md:grid-cols-3":"md:grid-cols-2","  gap-6"),children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{htmlFor:"name",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:["Page Title ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("input",{type:"text",id:"name",name:"name",value:T.name,onChange:z,required:!0,disabled:!0,className:"w-full px-4 cursor-not-allowed py-3 border border-gray-300 font-novaReg text-gray-600 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",placeholder:"Enter page title"})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{htmlFor:"date",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:["Page Date ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("input",{type:"date",id:"date",name:"date",value:T.date,onChange:z,required:!0,className:"w-full px-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all"})]}),"Page"===i&&(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{htmlFor:"type",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:["Page Type ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}
1),(0,l.jsxs)("select",{id:"type",name:"type",value:T.type,onChange:z,className:"w-full px-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",children:[(0,l.jsx)("option",{value:"",children:"Select Page Type"}),(0,l.jsx)("option",{value:"Page",children:"Page"}),(0,l.jsx)("option",{value:"Admission",children:"Admission"})]})]})]})})]}),(0,l.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-3 mb-6",children:[(0,l.jsx)("div",{className:"w-8 h-8 bg-purple-100 rounded-lg flex items-center justify-center",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-purple-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),(0,l.jsx)("h2",{className:"text-xl font-novaSemi text-gray-900",children:"Content"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"block text-sm font-novaSemi text-gray-700 mb-2",children:["Short Description ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("div",{className:"border border-gray-300 font-novaReg rounded-lg overflow-hidden",children:(0,l.jsx)(h,{value:T.shortdesc,onBlur:e=>{E(a=>(0,t._)((0,s._)({},a),{shortdesc:e}))}})})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"block text-sm font-novaSemi text-gray-700 mb-2",children:["Page Description ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("div",{className:"border border-gray-300 font-novaReg rounded-lg overflow-hidden",children:(0,l.jsx)(h,{value:T.description,onBlur:e=>{E(a=>(0,t._)((0,s._)({},a),{description:e}))}})})]})]})]}),(0,l.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-3 mb-6",children:[(0,l.jsx)("div",{className:"w-8 h-8 bg-yellow-100 rounded-lg flex items-center justify-center",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-yellow-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}),(0,l.jsx)("h2",{className:"text-xl font-novaSemi text-gray-900",children:"Tags & Configuration"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"tag1",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:"Tag 1"}),(0,l.jsx)("input",{type:"text",id:"tag1",name:"tag1",value:T.tag1,onChange:z,className:"w-full px-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",placeholder:"Enter tag"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"tag2",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:"Tag 2"}),(0,l.jsx)("input",{type:"text",id:"tag2",name:"tag2",value:T.tag2,onChange:z,className:"w-full px-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",placeholder:"Enter tag"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"tag3",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:"Tag 3"}),(0,l.jsx)("input",{type:"text",id:"tag3",name:"tag3",value:T.tag3,onChange:z,className:"w-full px-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",placeholder:"Enter tag"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"featured_status",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:"Featured Status"}),(0,l.jsxs)("select",{id:"featured_status",name:"featured_status",value:T.featured_status,onChange:z,className:"w-full px-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",children:[(0,l.jsx)("option",{value:"",children:"Select Status"}),(0,l.jsx)("option",{value:"Yes",children:"Yes"}),(0,l.jsx)("option",{value:"No",children:"No"})]})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-6",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"video_url",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:"Video URL"}),(0,l.jsx)("input",{type:"url",id:"video_url",name:"video_url",value:T.video_url,onChange:z,className:"w-full px-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",placeholder:"https://example.com/video"})]})})]}),(0,l.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-3 mb-6",children:[(0,l.jsx)("div",{className:"w-8 h-8 bg-indigo-100 rounded-lg flex items-center justify-center",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-indigo-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),(0,l.jsx)("h2",{className:"text-xl font-novaSemi text-gray-900",children:"Media Upload"})]}),"Download Center"===i||"Circular"===i||"Notice"===i&&(0,l.jsx)("div",{className:"mb-10",children:(0,l.jsx)(p,{id:"downloadCenterPdf",label:"Upload PDF",imageUrl:T.downloadCenterPdf,onChange:e=>H(e,"downloadCenterPdf"),onDelete:()=>O("downloadCenterPdf"),required:!0,isUploading:B.downloadCenterPdf,type:"pdf"})}),(0,l.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,l.jsx)(p,{id:"banner_img",label:"Banner Image",imageUrl:T.banner_img,onChange:e=>H(e,"banner_img"),onDelete:()=>O("banner_img"),dimensions:"936 W \xd7 337 H",required:!0,isUploading:B.banner_img}),(0,l.jsx)(p,{id:"featured_img",label:"Featured Image",imageUrl:T.featured_img,onChange:e=>H(e,"featured_img"),onDelete:()=>O("featured_img"),dimensions:"100 W \xd7 75 H",required:!0,isUploading:B.featured_img}),(0,l.jsx)(p,{id:"mainReportImage",label:"Extra Image",imageUrl:T.mainReportImage,onChange:e=>H(e,"mainReportImage"),onDelete:()=>O("mainReportImage"),dimensions:"936 W \xd7 337 H",required:!0,isUploading:B.mainReportImage})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mt-6 font-novaSemi",children:[(0,l.jsx)(p,{id:"highlightBanner",label:"Highlight Banner",imageUrl:T.highlightBanner,onChange:e=>H(e,"highlightBanner"),onDelete:()=>O("highlightBanner"),dimensions:"936 W \xd7 337 H",isUploading:B.highlightBanner}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("label",{htmlFor:"galleryimg",className:"block text-sm font-novaSemi text-gray-700",children:"Gallery Images"}),(0,l.jsxs)("div",{className:"border-2 border-dashed border-gray-300 hover:border-blue-400 transition-colors rounded-lg p-6 text-center bg-gray-50 hover:bg-gray-100",children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400",stroke:"currentColor",fill:"none",viewBox:"0 0 48 48",children:(0,l.jsx)("path",{d:"M28 8H12a4 4 0 00-4 4v20m32-12v8m0 0v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-4l-3.172-3.172a4 4 0 00-5.656 0L28 28M8 32l9.172-9.172a4 4 0 015.656 0L28 28m0 0l4 4m4-24h8m-4-4v8m-12 4h.02",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})}),(0,l.jsxs)("div",{className:"text-sm text-gray-600",children:[(0,l.jsx)("p",{className:"font-medium",children:"Upload multiple images"}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"WebP format • 100 W \xd7 75 H"})]})]}),(0,l.jsx)("input",{type:"file",id:"galleryimg",accept:"image/webp",multiple:!0,onChange:e=>q(e,"galleryimg"),className:"hidden",disabled:I.length>0}),(0,l.jsx)("label",{htmlFor:"galleryimg",className:"mt-4 inline-flex items-center px-4 py-2 text-white text-sm font-medium rounded-lg cursor-pointer transition-colors ".concat(I.length>0?"bg-gray-400 cursor-not-allowed":"bg-blue-600 hover:bg-blue-700"),
1children:I.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-white border-t-transparent mr-2"}),"Uploading..."]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Choose Files"]})})]}),(0,l.jsx)(x,{imageUrls:T.galleryimg,onDeleteFile:e=>{E(a=>(0,t._)((0,s._)({},a),{galleryimg:a.galleryimg.filter((a,r)=>r!==e)}))},label:"Gallery Images",uploadingIndexes:I})]})]})]}),(0,l.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-3 mb-6",children:[(0,l.jsx)("div",{className:"w-8 h-8 bg-pink-100 rounded-lg flex items-center justify-center",children:(0,l.jsx)("svg",{className:"w-5 h-5 text-pink-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),(0,l.jsx)("h2",{className:"text-xl font-novaSemi text-gray-900",children:"SEO Meta Information"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{htmlFor:"metatitle",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:["Meta Title ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("input",{type:"text",id:"metatitle",name:"metatitle",value:T.metatitle,onChange:z,className:"w-full px-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",placeholder:"Enter meta title"}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Recommended: 50-60 characters"})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{htmlFor:"metadesc",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:["Meta Description ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("textarea",{id:"metadesc",name:"metadesc",rows:3,value:T.metadesc,onChange:z,className:"w-full px-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all resize-none",placeholder:"Enter meta description"}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Recommended: 150-160 characters"})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{htmlFor:"keywords_tag",className:"block text-sm font-novaSemi text-gray-700 mb-2",children:["Keywords ",(0,l.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,l.jsx)("input",{type:"text",id:"keywords_tag",name:"keywords_tag",value:T.keywords_tag,onChange:z,className:"w-full px-4 py-3 border border-gray-300 font-novaReg rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all",placeholder:"keyword1, keyword2, keyword3"}),(0,l.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Separate keywords with commas"})]})]})]}),(0,l.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-lg font-novaSemi text-gray-900",children:"Ready to Submit?"}),(0,l.jsx)("p",{className:"text-gray-600 mt-1 font-novaReg",children:"Review all information before submitting the page"})]}),(0,l.jsx)("button",{type:"submit",disabled:v||Object.values(B).some(Boolean)||I.length>0,className:"inline-flex items-center px-8 py-3 bg-gradient-to-r from-green-500 to-green-600 text-white font-novaSemi rounded-lg hover:from-green-600 hover:to-green-700 focus:ring-4 focus:ring-green-200 transition-all duration-200 transform hover:scale-105 shadow-lg disabled:opacity-50 disabled:cursor-not-allowed disabled:transform-none",children:v?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-2 border-white border-t-transparent mr-2"}),"Submitting..."]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Submit Page"]})})]})})]})})})}},54196:(e,a,r)=>{"use strict";r.d(a,{CY:()=>l,Ir:()=>t,Qs:()=>s});let s="https://sea-lion-app-zhe9q.ondigitalocean.app/api/",t="https://mangalmay.sfo3.cdn.digitaloceanspaces.com",l="https://www.mangalmay.org/"}},e=>{e.O(0,[4e3,636,6593,8792],()=>e(e.s=14398)),_N_E=e.O()}]);

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.