PageSourceSearch

https://www.cloud4feed.com/static/js/4955.ee35a158.chunk.js

js cloud4feed.com collected 2026-10-09 02:54:18 UTC 16,615 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkcloud4feed_react=self.webpackChunkcloud4feed_react||[]).push([[4955],{4955:(e,a,s)=>{s.r(a),s.d(a,{default:()=>N});var l=s(9379),i=s(5043),t=s(3216),n=s(2485),d=s(7696),c=s(9772),r=s(9046),o=s(7177),m=s(5988),h=(s(1283),s(1036)),g=s(579);const x=n.F.adminBlogs.blogCreate,p=n.F.autor.authorList,j=n.F.category.categoryList,u=n.F.tags.tagList,v=localStorage.getItem("username")?localStorage.getItem("username"):"Admin";function N(){const e=(0,t.Zp)(),[a,s]=(0,i.useState)([]),[n,N]=(0,i.useState)([]),[b,_]=(0,i.useState)([]),[w,f]=(0,i.useState)({title:0,h2_title:0,h3_title:0,quote2:0,quote4:0,image1_title:0,image2_title:0,image3_title:0,h4_title:0,h5_title:0}),A={title:70,h2_title:60,h3_title:60,quote2:120,quote4:120,image1_title:20,image2_title:20,image3_title:20,h4_title:60,h5_title:60},[C,y]=(0,i.useState)({banner_image:null,image1:null,image2:null,image3:null,big_image:null,small_image:null,thumbnail:null}),[S,E]=(0,i.useState)({category_id:"",author_id:"",title:"",slug:"",description1:"",banner_image:null,h2_title:"",h2_description:"",quote2:"",h3_title:"",h3_description:"",image1_title:"",image1:null,image2_title:"",image2:null,image3_title:"",image3:null,h4_title:"",h4_description:"",quote4:"",h5_title:"",h5_description:"",big_image:null,small_image:null,thumbnail:null,tag1:"",tag2:"",tag3:"",createdBy:v,createdAt:new Date});(0,i.useEffect)((()=>{(async()=>{try{const e=await(0,d.A)("GET",j);s((null===e||void 0===e?void 0:e.blog_categories)||[])}catch(e){console.error("Failed to fetch categories:",e),s([])}})(),(async()=>{try{const e=await(0,d.A)("GET",p);N((null===e||void 0===e?void 0:e.authors)||[])}catch(e){console.error("Failed to fetch authors:",e),N([])}})(),(async()=>{try{const e=await(0,d.A)("GET",u);_((null===e||void 0===e?void 0:e.tags)||[])}catch(e){console.error("Failed to fetch tags:",e),_([])}})()}),[]);const q=e=>{const{name:a,value:s,files:i}=e.target;if(i){const e=i[0];y((s=>(0,l.A)((0,l.A)({},s),{},{[a]:URL.createObjectURL(e)}))),E((s=>(0,l.A)((0,l.A)({},s),{},{[a]:e})))}else E((e=>(0,l.A)((0,l.A)({},e),{},{[a]:s})))},L=e=>{const{name:a,value:s}=e.target;s.length<=A[a]?(f((e=>(0,l.A)((0,l.A)({},e),{},{[a]:s.length}))),q(e)):e.preventDefault()},D=(e,a)=>{E((s=>(0,l.A)((0,l.A)({},s),{},{[e]:a})))};return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"header-add-category",children:[(0,g.jsx)("h5",{children:"admin > Blog Management"}),(0,g.jsxs)("div",{children:[(0,g.jsx)("span",{children:"Hello! Admin"}),(0,g.jsx)("img",{src:"/assets/admin-user.webp",alt:"user",className:"img-responsive"})]})]}),(0,g.jsxs)("div",{className:"header-navigation add-content-btn",children:[(0,g.jsx)("span",{children:"Blog Management / Blogs / Create New Blog"}),(0,g.jsxs)("button",{type:"submit",form:"blogAdd",className:"default-btn",children:["publish ",(0,g.jsx)("span",{})]})]}),(0,g.jsx)("div",{className:"add-content-page",children:(0,g.jsxs)("form",{id:"blogAdd",onSubmit:async a=>{a.preventDefault();for(const[e,i]of Object.entries(S))if("brief"!==e&&"image1_title"!==e&&"image2_title"!==e&&"image3_title"!==e&&"image1"!==e&&"image2"!==e&&"image3"!==e&&(""===i||null===i))return void h.oR.error('The field "'.concat(e,'" is mandatory.'));const s=new FormData;Object.entries(S).forEach((e=>{let[a,l]=e;s.append(a,l)}));try{const a=await(0,d.A)("POST",x,s,{headers:{"Content-Type":"multipart/form-data"}});h.oR.success(a.message),e("/admin/blog")}catch(l){console.error("Error submitting form:",l)}},children:[(0,g.jsx)("div",{className:"add-content-wrap",children:(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-lg-6",children:(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsxs)("div",{className:"label-wrap-add",children:[(0,g.jsxs)("label",{children:["title",(0,g.jsx)("small",{children:"*"})]}),(0,g.jsxs)("span",{children:[w.title,"/",A.title," characters"]})]}),(0,g.jsx)("input",{maxLength:A.title,onChange:L,name:"title",type:"text",className:"form-control",placeholder:"Enter Title"})]})}),(0,g.jsx)("div",{className:"col-lg-6",children:(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["slug",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)("input",{onChange:q,name:"slug",type:"text",className:"form-control",placeholder:"Enter Slug"})]})}),(0,g.jsx)("div",{className:"col-lg-4",children:(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["category",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(c.A,{onChange:q,name:"category_id",options:a,placeholder:"Select Category"})]})}),(0,g.jsx)("div",{className:"col-lg-4",children:(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["Date",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)("input",{onChange:q,name:"createdAt",type:"date",className:"form-control",placeholder:"Enter Author Name"})]})}),(0,g.jsx)("div",{className:"col-lg-4",children:(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["Author Name",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(c.A,{onChange:q,name:"author_id",options:n,placeholder:"Select Author Name"})]})})]})}),(0,g.jsx)("div",{className:"add-content-wrap",children:(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-lg-12",children:(0,g.jsx)("div",{className:"add-page-sections",children:"Section 1"})}),(0,g.jsx)("div",{className:"col-lg-8",children:(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["Description",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(o.A,{data:S.description1,onChange:(e,a)=>D("description1",a.getData())})]})}),(0,g.jsx)("div",{className:"col-lg-4",children:(0,g.jsxs)("div",{className:"add-page-inputs input-add-image",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["Banner Image: (1608 \xd7 720 px)",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(r.A,{name:"banner_image",maxSize:102400,acceptedFormats:[".webp",".svg"],onImageChange:q,imagePreview:C.banner_image})]})})]})}),(0,g.jsx)("div",{className:"add-content-wrap",children:(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-lg-12",children:(0,g.jsx)("div",{className:"add-page-sections",children:"Section 2"})}),(0,g.jsxs)("div",{className:"col-lg-4",children:[(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsxs)("div",{className:"label-wrap-add",children:[(0,g.jsxs)("label",{children:["h2 title",(0,g.jsx)("small",{children:"*"})]}),(0,g.jsxs)("span",{children:[w.h2_title,"/",A.h2_title," characters"]})]}),(0,g.jsx)("input",{maxLength:A.h2_title,onChange:L,name:"h2_title",type:"text",className:"form-control",placeholder:"Enter Title"})]}),(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["h2 Description",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(o.A,{data:S.h2_description,onChange:(e,a)=>D("h2_description",a.getData())})]})]}),(0,g.jsx)("div",{className:"col-lg-4",children:(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsxs)("div",{className:"label-wrap-add",children:[(0,g.jsxs)("label",{children:["Quote Statement 1",(0,g.jsx)("small",{children:"*"})]}),(0,g.jsxs)("span",{children:[w.quote2,"/",A.quote2," characters"]})]}),(0,g.jsxs)("div",{className:"quote-input-group",children:[(0,g.jsx)("textarea",{maxLength:A.quote2,onChange:L,name:"quote2",type:"text",className:"form-control",placeholder:"Enter Here"}),(0,g.jsx)("img",{src:"/assets/quote-input.webp",alt:"quote",className:"img-responsive"})]})]})}),(0,g.jsxs)("div",{className:"col-lg-4",children:[(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsxs)("div",{className:"label-wrap-add",children:[(0,g.jsxs)("label",{children:["h3 title",(0,g.jsx)("small",{children:"*"})]}),(0,g.jsxs)("span",{children:[w.h3_title,"/",A.h3_title," characters"]})]}),(0,g.jsx)("input",{maxLength:A.h3_title,onChange:L,name:"h3_title",type:"text",className:"form-control",placeholder:"Enter Title"})]}),(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["h3 Description",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(o.A,{data:S.h3_description,onChange:(e,a)=>D("h3_description",a.getData())})]})]})]})}),(0,g.jsx)("div",{className:"add-content-wrap",children:(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-lg-12",children:(0,g.jsx)("div",{className:"add-page-sections",children:"Section 4"})}),(0,g.jsxs)("div",{className:"col-lg-4",children:[(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsxs)("div",{className:"label-wrap-add",children:[(0,g.jsxs)("label",{children:["h4 title",(0,g.jsx)("small",{children:"*"})]}),(0,g.jsxs)("span",{children:[w.h4_title,"/",A.h4_title," characters"]})]}),(0,g.jsx)("input",{maxLength:A.h4_title,onChange:L,name:"h4_title",type:"text",className:"form-control",placeholder:"Enter Title"})]}),(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["h4 Description",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(o.A,{data:S.h4_description,onChange:(e,a)=>D("h4_description",a.getData())})]})]}),(0,g.jsx)("div",{className:"col-lg-4",children:(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsxs)("div",{className:"label-wrap-add",children:[(0,g.jsxs)("label",{children:["Quote Statement 2",(0,g.jsx)("small",{children:"*"})]}),(0,g.jsxs)("span",{children:[w.quote4,"/",A.quote4," characters"]})]}),(0,g.jsxs)("div",{className:"quote-input-group",children:[(0,g.jsx)("textarea",{maxLength:A.quote4,onChange:L,name:"quote4",type:"text",className:"form-control",placeholder:"Enter Here"}),(0,g.jsx)("img",{src:"/assets/quote-input.webp",alt:"quote",className:"img-responsive"})]})]})}),(0,g.jsxs)("div",{className:"col-lg-4",children:[(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsxs)("div",{className:"label-wrap-add",children:[(0,g.jsxs)("label",{children:["h
15 title",(0,g.jsx)("small",{children:"*"})]}),(0,g.jsxs)("span",{children:[w.h5_title,"/",A.h5_title," characters"]})]}),(0,g.jsx)("input",{maxLength:A.h5_title,onChange:L,name:"h5_title",type:"text",className:"form-control",placeholder:"Enter Title"})]}),(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["h5 Description",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(o.A,{data:S.h5_description,onChange:(e,a)=>D("h5_description",a.getData())})]})]})]})}),(0,g.jsx)("div",{className:"add-content-wrap",children:(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)("div",{className:"col-lg-12",children:(0,g.jsx)("div",{className:"add-page-sections",children:"Section 5"})}),(0,g.jsx)("div",{className:"col-lg-6",children:(0,g.jsxs)("div",{className:"add-page-inputs input-add-image",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["Big Image(1338 x 754 px)",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(r.A,{name:"big_image",maxSize:81920,acceptedFormats:[".webp",".svg"],onImageChange:q,imagePreview:C.big_image})]})}),(0,g.jsx)("div",{className:"col-lg-6",children:(0,g.jsxs)("div",{className:"add-page-inputs input-add-image",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["Small Image(583 x 388 px)",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(r.A,{name:"small_image",maxSize:51200,acceptedFormats:[".webp",".svg"],onImageChange:q,imagePreview:C.small_image})]})})]})}),(0,g.jsx)("div",{className:"add-content-wrap",children:(0,g.jsxs)("div",{className:"row",children:[(0,g.jsxs)("div",{className:"col-lg-6",children:[(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["Tag1",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(c.A,{onChange:q,name:"tag1",options:b,placeholder:"Select Tag1"})]}),(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["tag2",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(c.A,{onChange:q,name:"tag2",options:b,placeholder:"Select Tag2"})]}),(0,g.jsxs)("div",{className:"add-page-inputs",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["tag3",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(c.A,{onChange:q,name:"tag3",options:b,placeholder:"Select Tag3"})]})]}),(0,g.jsx)("div",{className:"col-lg-6",children:(0,g.jsxs)("div",{className:"add-page-inputs input-add-image",children:[(0,g.jsx)("div",{className:"label-wrap-add",children:(0,g.jsxs)("label",{children:["Thumbnail Image(780 x 513 px)",(0,g.jsx)("small",{children:"*"})]})}),(0,g.jsx)(r.A,{name:"thumbnail",maxSize:51200,acceptedFormats:[".webp",".svg"],onImageChange:q,imagePreview:C.thumbnail})]})})]})})]})}),(0,g.jsx)(m.A,{})]})}},9046:(e,a,s)=>{s.d(a,{A:()=>n});var l=s(5043),i=(s(1283),s(3026)),t=s(579);const n=e=>{let{onImageChange:a=()=>{},imagePreview:s,maxSize:n,acceptedFormats:d,name:c=""}=e;const r=(0,l.useRef)();return(0,t.jsxs)("div",{className:"image-upload-wrapper",onClick:()=>r.current.click(),children:[(0,t.jsxs)("div",{className:"image-placeholder",children:[(0,t.jsxs)("div",{className:"added-img-icon",children:[s?(0,t.jsx)("img",{src:s,alt:"preview",className:"image-preview"}):(0,t.jsx)(i.A,{name:"imageIcon"}),(0,t.jsx)("p",{children:"Drop or upload your image"})]}),(0,t.jsxs)("small",{children:[d.join(", ")," format"]})]}),(0,t.jsx)("input",{type:"file",accept:d.join(","),style:{display:"none"},ref:r,onChange:e=>{const s=e.target.files[0];if(!s)return;const l=".".concat(s.name.split(".").pop().toLowerCase()),i=d.includes(l);s.size;i?a(e):alert("Only ".concat(d.join(", ")," files are allowed."))},name:c}),(0,t.jsxs)("button",{type:"button",className:"default-btn",children:["UPLOAD IMAGE ",(0,t.jsx)("span",{})]})]})}},9772:(e,a,s)=>{s.d(a,{A:()=>t});var l=s(5043),i=(s(1283),s(579));const t=e=>{let{name:a,options:s=[],placeholder:t="Select",onChange:n=()=>{},multiple:d=!1,defaultValue:c=(d?[]:null)}=e;const[r,o]=(0,l.useState)(!1),[m,h]=(0,l.useState)(d?[]:null),g=(0,l.useRef)(null);(0,l.useEffect)((()=>
1{if(c)if(d){const e=s.filter((e=>c.includes(e._id)));h(e)}else{const e=s.find((e=>e._id===c));h(e||null)}}),[c,s,d]);(0,l.useEffect)((()=>{const e=e=>{g.current&&!g.current.contains(e.target)&&o(!1)};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)}),[]);const x=e=>d?m.some((a=>a._id===e._id)):(null===m||void 0===m?void 0:m._id)===e._id;return(0,i.jsx)("div",{className:"custom-select-wrapper form-control",ref:g,children:(0,i.jsxs)("div",{className:"custom-select",onClick:()=>o(!r),children:[(0,i.jsx)("div",{className:"custom-select-trigger",children:d?m.length>0?m.map((e=>e.name)).join(", "):t:(null===m||void 0===m?void 0:m.name)||t}),r&&(0,i.jsx)("div",{className:"custom-options",children:s.map((e=>(0,i.jsx)("span",{className:"custom-option ".concat(x(e)?"selected":""),onClick:()=>(e=>{if(d){const s=m.some((a=>a._id===e._id))?m.filter((a=>a._id!==e._id)):[...m,e];h(s);const l=s.map((e=>e._id)).join(",");n({target:{name:a,value:l}})}else{h(e),o(!1);const s={target:{name:a,value:e._id}};n(s)}})(e),children:e.name},e._id)))})]})})}},7177:(e,a,s)=>{s.d(a,{A:()=>c});var l=s(9379),i=s(1517),t=s(726),n=s.n(t),d=s(579);const c=e=>
1{let{data:a="",onChange:s,config:t={}}=e;return(0,d.jsx)("div",{children:(0,d.jsx)(i.aF,{editor:n(),data:a||"",onChange:s,config:(0,l.A)({toolbar:["heading","|","bold","italic","link","bulletedList","numberedList","blockQuote","|","undo","redo"]},t)})})}},5988:(e,a,s)=>{s.d(a,{A:()=>t});var l=s(5043),i=s(579);function t(){const[e,a]=(0,l.useState)(!1);(0,l.useEffect)((()=>{const e=()=>{window.scrollY>300?a(!0):a(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]);return(0,i.jsx)("div",{children:e&&(0,i.jsx)("button",{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},className:"admin-scroll-to-top","aria-label":"Scroll to top",children:"\u2191"})})}},1283:()=>{}}]);
2//# sourceMappingURL=4955.ee35a158.chunk.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.