PageSourceSearch

https://niilmuniversity.online/_next/static/chunks/pages/panel/blogs-3759267eacbcf04e.js

js niilmuniversity.online collected 2026-09-24 11:43:39 UTC 20,775 bytes, 1 lines download raw bytes

1void 0===Promise.withResolvers&&(Promise.withResolvers=function(){let e,t;return{promise:new Promise((a,s)=>{e=a,t=s}),resolve:e,reject:t}}),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[98681],{96874:function(e){e.exports=function(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}},82689:function(e,t,a){var s=a(29932),n=a(97786),r=a(67206),l=a(69199),i=a(71131),c=a(7518),o=a(85022),d=a(6557),u=a(1469);e.exports=function(e,t,a){t=t.length?s(t,function(e){return u(e)?function(t){return n(t,1===e.length?e[0]:e)}:e}):[d];var x=-1;return t=s(t,c(r)),i(l(e,function(e,a,n){return{criteria:s(t,function(t){return t(e)}),index:++x,value:e}}),function(e,t){return o(e,t,a)})}},5976:function(e,t,a){var s=a(6557),n=a(45357),r=a(30061);e.exports=function(e,t){return r(n(e,t,s),e+"")}},56560:function(e,t,a){var s=a(75703),n=a(38777),r=a(6557),l=n?function(e,t){return n(e,"toString",{configurable:!0,enumerable:!1,value:s(t),writable:!0})}:r;e.exports=l},71131:function(e){e.exports=function(e,t){var a=e.length;for(e.sort(t);a--;)e[a]=e[a].value;return e}},26393:function(e,t,a){var s=a(33448);e.exports=function(e,t){if(e!==t){var a=void 0!==e,n=null===e,r=e==e,l=s(e),i=void 0!==t,c=null===t,o=t==t,d=s(t);if(!c&&!d&&!l&&e>t||l&&i&&o&&!c&&!d||n&&i&&o||!a&&o||!r)return 1;if(!n&&!l&&!d&&e<t||d&&a&&r&&!n&&!l||c&&a&&r||!i&&r||!o)return -1}return 0}},85022:function(e,t,a){var s=a(26393);e.exports=function(e,t,a){for(var n=-1,r=e.criteria,l=t.criteria,i=r.length,c=a.length;++n<i;){var o=s(r[n],l[n]);if(o){if(n>=c)return o;return o*("desc"==a[n]?-1:1)}}return e.index-t.index}},38777:function(e,t,a){var s=a(10852),n=function(){try{var e=s(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=n},16612:function(e,t,a){var s=a(77813),n=a(98612),r=a(65776),l=a(13218);e.exports=function(e,t,a){if(!l(a))return!1;var i=typeof t;return("number"==i?!!(n(a)&&r(t,a.length)):"string"==i&&t in a)&&s(a[t],e)}},45357:function(e,t,a){var s=a(96874),n=Math.max;e.exports=function(e,t,a){return t=n(void 0===t?e.length-1:t,0),function(){for(var r=arguments,l=-1,i=n(r.length-t,0),c=Array(i);++l<i;)c[l]=r[t+l];l=-1;for(var o=Array(t+1);++l<t;)o[l]=r[l];return o[t]=a(c),s(e,this,o)}}},30061:function(e,t,a){var s=a(56560),n=a(21275)(s);e.exports=n},21275:function(e){var t=Date.now;e.exports=function(e){var a=0,s=0;return function(){var n=t(),r=16-(n-s);if(s=n,r>0){if(++a>=800)return arguments[0]}else a=0;return e.apply(void 0,arguments)}}},75703:function(e){e.exports=function(e){return function(){return e}}},89734:function(e,t,a){var s=a(21078),n=a(82689),r=a(5976),l=a(16612),i=r(function(e,t){if(null==e)return[];var a=t.length;return a>1&&l(e,t[0],t[1])?t=[]:a>2&&l(t[0],t[1],t[2])&&(t=[t[0]]),n(e,s(t,1),[])});e.exports=i},37941:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/panel/blogs",function(){return a(87938)}])},43886:function(e,t,a){"use strict";var s=a(85893),n=a(89121),r=a(46320),l=a(67294),i=a(85421),c=a(51726);t.Z=e=>{let{isOpen:t,setIsOpen:a,onDelete:o,title:d,loading:u=!1}=e;return(0,s.jsx)("div",{onClick:()=>a(!0),children:(0,s.jsx)(n.u,{appear:!0,show:t,as:l.Fragment,children:(0,s.jsxs)(r.V,{as:"div",open:t,onClose:()=>a(!1),children:[(0,s.jsx)(n.u.Child,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-[9998] bg-[black]/60 px-4",children:(0,s.jsx)("div",{className:"flex min-h-screen items-start justify-center px-4",children:(0,s.jsxs)(r.V.Panel,{className:"panel my-8 w-full max-w-lg overflow-hidden  rounded-lg border-0 p-0 text-black dark:text-white-dark z-[9999]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between bg-[#fbfbfb] px-5 py-3 dark:bg-[#121c2c]",children:[(0,s.jsxs)("h5",{className:"text-lg font-bold",children:["Delete ",d]}),(0,s.jsx)("button",{type:"button",onClick:()=>a(!1),className:"text-white-dark hover:text-dark",children:(0,s.jsx)(c.Z,{})})]}),(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsx)("p",{children:"Are you sure you want to delete this ".concat(null==d?void 0:d.toLowerCase(),"?")}
1),(0,s.jsxs)("div",{className:"mt-8 flex items-center justify-end",children:[(0,s.jsx)("button",{disabled:u,onClick:o,type:"button",className:"btn btn-outline-danger",children:u?(0,s.jsx)("div",{className:"animate-spin",children:(0,s.jsx)(i.Z,{})}):"Delete"}),(0,s.jsx)("button",{disabled:u,type:"button",onClick:()=>a(!1),className:"btn btn-primary ltr:ml-4 rtl:mr-4",children:"Cancel"})]})]})]})})})]})})})}},85421:function(e,t,a){"use strict";var s=a(85893);t.Z=e=>{let{className:t}=e;return(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[(0,s.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"6"}),(0,s.jsx)("line",{x1:"12",y1:"18",x2:"12",y2:"22"}),(0,s.jsx)("line",{x1:"4.93",y1:"4.93",x2:"7.76",y2:"7.76"}),(0,s.jsx)("line",{x1:"16.24",y1:"16.24",x2:"19.07",y2:"19.07"}),(0,s.jsx)("line",{x1:"2",y1:"12",x2:"6",y2:"12"}),(0,s.jsx)("line",{x1:"18",y1:"12",x2:"22",y2:"12"}),(0,s.jsx)("line",{x1:"4.93",y1:"19.07",x2:"7.76",y2:"16.24"}),(0,s.jsx)("line",{x1:"16.24",y1:"7.76",x2:"19.07",y2:"4.93"})]})}},51996:function(e,t,a){"use strict";var s=a(85893);t.Z=e=>{let{className:t,stroke:a}=e;return(0,s.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,s.jsx)("circle",{cx:"5",cy:"12",r:"2",stroke:a,strokeWidth:"1.5"}),(0,s.jsx)("circle",{cx:"12",cy:"12",r:"2",stroke:a,strokeWidth:"1.5"}),(0,s.jsx)("circle",{cx:"19",cy:"12",r:"2",stroke:a,strokeWidth:"1.5"})]})}},87938:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return E}});var s=a(85893),n=a(39133),r=a(23287),l=a(94425),i=a(43886),c=a(22551),o=a(30178),d=a(63172),u=a(51996),x=a(88057),h=a(93790),m=a(73237),f=a(87066),v=a(47041),b=a(89734),p=a.n(b),g=a(91002),y=a(41664),j=a.n(y),w=a(67294),N=a(41248),_=a(89121),k=a(46320),C=a(85421),S=a(51726),F=a(30561),T=a(86328),P=e=>{let{isOpen:t,setIsOpen:a,blogId:n,onSuccess:l}=e,[i,c]=(0,w.useState)([]),[d,u]=(0,w.useState)(!1),m=(0,r.CG)(e=>e.userData),{data:v=[],isLoading:b}=(0,T.SO)(t&&!!(null==m?void 0:m.user_id)&&(1==m.role_id||m.role_id>5)),{primaryColor:p}=(0,h.DY)(),g=()=>{a(!1),c([])},y=async()=>{if(!n){(0,o.CF)("error","Blog ID is missing");return}if(0===i.length){(0,o.CF)("error","Please select at least one campus");return}try{u(!0);let e=i.map(e=>e.value).join(",");await f.default.post("".concat(x._n,"/blogs/clone/").concat(n,"?school_id=").concat(e)),(0,o.CF)("success","Blog cloned successfully"),g(),l&&l()}catch(a){var e,t;console.error("Error cloning blog:",a),(0,o.CF)("error",(null==a?void 0:null===(t=a.response)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.message)||"Failed to clone blog")}finally{u(!1)}};return(0,s.jsx)(_.u,{appear:!0,show:t,as:w.Fragment,children:(0,s.jsxs)(k.V,{as:"div",open:t,onClose:g,children:[(0,s.jsx)(_.u.Child,{as:w.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"fixed inset-0"})}),(0,s.jsx)("div",{className:"fixed inset-0 z-[999] bg-[black]/60 px-4",children:(0,s.jsx)("div",{className:"flex min-h-screen items-start justify-center px-4",children:(0,s.jsxs)(k.V.Panel,{className:"panel my-8 w-full max-w-lg overflow-hidden rounded-lg border-0 p-0 text-black dark:text-white-dark",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between bg-[#fbfbfb] px-5 py-3 dark:bg-[#121c2c]",children:[(0,s.jsx)("h5",{className:"text-lg font-bold",children:"Clone Blog"}),(0,s.jsx)("button",{type:"button",onClick:g,className:"text-white-dark hover:text-dark",disabled:d,children:(0,s.jsx)(S.Z,{})})]}),(0,s.jsxs)("div",{className:"p-5",children:[(0,s.jsx)("p",{className:"mb-4 text-sm text-gray-600 dark:text-gray-400",children:"Select the campuses where you want to clone this blog. A copy will be created for each selected campus."}),(0,s.jsxs)("div",{className:"mb-4",children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Select Campuses"}),(0,s.jsx)(F.Z,{maxMenuHeight:100,menuPosition:"top",placeholder:"Select campuses...",options:v,value:i,onChange:e=>{c([...e])}
1,color:p,disabled:d||b,noOptionsMessage:b?"Loading campuses...":"No campuses available"})]}),i.length>0&&(0,s.jsxs)("div",{className:"mb-4 text-xs text-gray-500 dark:text-gray-400",children:[i.length," campus",i.length>1?"es":""," selected"]}),(0,s.jsxs)("div",{className:"mt-8 flex items-center justify-end gap-3",children:[(0,s.jsx)("button",{disabled:d,type:"button",onClick:g,className:"btn btn-outline-danger",children:"Cancel"}),(0,s.jsx)("button",{disabled:d||0===i.length||b,onClick:y,type:"button",className:"btn btn-primary",children:d?(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"animate-spin",children:(0,s.jsx)(C.Z,{})}),(0,s.jsx)("span",{children:"Cloning..."})]}):"Clone Blog"})]})]})]})})})]})})},B=()=>{let e=(0,N.I0)();(0,w.useEffect)(()=>{e((0,m.Iw)("Blogs"))});let{primaryColor:t}=(0,h.DY)(),[a,n]=(0,w.useState)(1),b=[10,30,50],[y,_]=(0,w.useState)(b[0]),[k,C]=(0,w.useState)(null),[S,F]=(0,w.useState)([]),[T,B]=(0,w.useState)(1),[A,E]=(0,w.useState)({columnAccessor:"serial_no",direction:"asc"}),q=(0,w.useMemo)(()=>{let e=p()(S,A.columnAccessor);return"desc"===A.direction?e.reverse():e},[S,A]),[D,Z]=(0,w.useState)(null),[O,R]=(0,w.useState)(!1),[W,L]=(0,w.useState)(""),[z,I]=(0,w.useState)(W),Q=(0,r.CG)(e=>e.userData),V=[2,4].includes(Q.role_id),[G,K]=(0,w.useState)(!1),[M,H]=(0,w.useState)([]),[Y,X]=(0,w.useState)({label:"All",value:""}),[$,J]=(0,w.useState)(!1),[U,ee]=(0,w.useState)(null);async function et(){try{let e=await f.default.get("".concat(x._n,"/school?limit=-1"),{headers:{}});if(200===e.status){let t=e.data.data.map(e=>({value:e.id.toString(),label:e.name}));H([{label:"All",value:""},...t]),X({label:"All",value:""})}}catch(e){}}async function ea(e,t,a){try{await f.default.patch("".concat(x._n,"/blogs/").concat(e,"/").concat(t),{is_active:a},{headers:{}})}catch(e){}}(0,w.useEffect)(()=>{Q&&(1===Q.role_id||Q.role_id>=6)&&et()},[Q]);let es=(e,t)=>{let s={method:"delete",maxBodyLength:1/0,url:"".concat(x._n,"/blogs/").concat(e,"/").concat(t),headers:{}};f.default.request(s).then(e=>{"success"===e.data.status&&((0,o.CF)("success","Blog deleted succesfully"),en(a,y,Y.value,z),ec(!1))}).catch(e=>{console.error(e)})};async function en(e,t,a,s){try{let n="".concat(x._n,"/blogs?limit=").concat(t,"&page=").concat(e);a&&(n+="&school_id=".concat(a)),s&&(n+="&search=".concat(s));let r=await f.default.get(n,{headers:{}});if(200==r.status){let a=r.data.data,s=[];a.map((a,n)=>{s.push(el(a,n,(e-1)*t))}),C(null),F(s),B(r.data.total)}}catch(t){let e="An unexpected error occurred. Please try again.";if(f.default.isAxiosError(t)){if(t.response)switch(t.response.status){case 400:e="Invalid request. Please check your input.";break;case 401:e="You are not authorized to view this data. Please log in.";break;case 404:e="The requested data could not be found.";break;case 500:e="We're experiencing server issues. Please try again later."}else t.request&&(e="Unable to connect to the server. Please check your internet connection.")}C(e),F([])}}(0,w.useEffect)(()=>{en(1,y,Y.value,z),n(1)},[z]);let er=(0,w.useRef)(null),el=(e,t,a)=>({serial_no:a+t+1,id:e.id,title:(0,s.jsx)("div",{className:"max-w-[150px] text-wrap",children:e.title}),created_at:new Date(e.created_at).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),slug:e.slug,school_id:e.school_id,action:(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)("div",{className:"mr-2 rounded-[2em] border-[2px] border-brand px-[.8rem] py-[.28rem]  hover:text-white",children:(0,s.jsx)(d.Z,{className:"h-[16px] text-brand"})})})}),status:(0,s.jsxs)("label",{className:"relative h-6 w-12",children:[(0,s.jsx)("input",{checked:!0===e.is_active,disabled:G,onChange:t=>{K(!0),ea(e.school_id,e.slug,!0!==e.is_active).then(()=>{n(e=>(en(e,y,Y.value,z),e))}).catch(()=>{(0,o.CF)("error","An error occurred while updating status")}).finally(()=>{K(!1)})},type:"checkbox",className:"custom_switch peer absolute z-10 h-full w-full cursor-pointer opacity-0",id:"custom_switch_checkbox1"}),(0,s.jsx)("span",{className:"block h-full rounded-full bg-[#ebedf2] before:absolute before:bottom-1 before:left-1 before:h-4 before:w-4 before:rounded-full before:bg-white before:transition-all before:duration-300 peer-checked:bg-[#3EB873] peer-checked:before:left-7 dark:bg-dark dark:before:bg-white-dark dark:peer-checked:before:bg-white"})]})});(0,w.useEffect)(()=>{en(1,10,Y.value,z),n(1),_(10)},[Y.value]);let[ei,ec]=(0,w.useState)(!1);(0,w.useEffect)(()=>{let e=setTimeout(()=>{I(W)},500);return()=>{clearTimeout(e)}},[W]),[3,2,4,5].includes(Q.role_id);let eo=(e,t)=>1===Q.role_id||8===Q.role_id||4==Q.role_id||Q.role_id>5&&(0,l.Fs)(Q.issued_certificates,e,t),ed=(e,t)=>1===Q.role_id||8===Q.role_id||Q.role_id>5&&(0,l.Fs)(Q.issued_certificates,e,t);return(0,s.jsxs)("div",{children:[k&&(0,s.jsxs)("div",{className:"relative flex w-full flex-row items-center justify-between rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700",role:"alert",children:[(0,s.jsxs)("div",{className:"flex flex-row",children:[(0,s.jsx)("strong",{className:"font-bold",children:"Error: "}),(0,s.jsx)("span",{className:"block sm:inline",children:k})]}),(0,s.jsx)("button",{onClick:async()=>{C(null),n(1),_(10),await en(1,10,Y.value,z)},className:"block rounded-md bg-red-500 px-4 py-2 text-white sm:inline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"panel mt-6",children:[(0,s.jsxs)("div",{className:"mb-5 flex flex-col gap-5 md:flex-row justify-start items-end",children:[(0,v.hasCookie)("token")&&!V&&(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("span",{className:"mb-1  text-start text-base",children:"Campus"}),(0,s.jsx)(c.Z,{placeholder:"Select Campus",onChange:e=>{e&&(n(1),C(null),X(e))},className:" w-72",options:M,value:Y,color:t})]}),(0,s.jsx)("div",{className:"",children:(0,s.jsx)("div",{className:"",children:(0,s.jsx)("input",{type:"text",className:"form-input w-auto py-2.5",placeholder:"Search...",value:W,onChange:e=>L(e.target.value)})})})]}),(0,s.jsx)("div",{className:"datatables relative",children:(0,s.jsx)(g.w,{noRecordsText:"No results match your search query",highlightOnHover:!0,className:"table-hover whitespace-nowrap",records:q,columns:[{accessor:"serial_no",title:"#",sortable:!0},{accessor:"title",title:"Title",sortable:!1},{accessor:"created_at",title:"Created At",sortable:!1},{accessor:"action",title:"Actions",render:(e,t)=>(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("div",{onClick:()=>{Z(e.id),R(!O)},className:"group mr-2 cursor-pointer rounded-[2em] border-[2px] border-brand px-[.8rem] py-[.28rem] hover:bg-brand hover:text-white",children:(0,s.jsx)(u.Z,{stroke:"currentColor",className:"h-[16px] rotate-90 text-brand group-hover:text-white"})}),D===e.id&&(0,s.jsxs)("div",{ref:er,className:"".concat(O?"visible":"invisible"," absolute z-[9999] rounded-md translate-x-5 bg-white shadow-lg ring-1 ring-black ring-opacity-5"),children:[(0,s.jsxs)("div",{className:"py-1",role:"menu","aria-orientation":"vertical","aria-labelledby":"options-menu",children:[(0,s.jsx)(j(),{href:"/blogs/preview?slug=".concat(e.slug,"&cid=").concat(e.school_id),className:"block px-4 py-2 text-sm text-gray-500 hover:bg-gray-100",role:"menuitem",children:"View"}),eo("blogs","edit")&&(0,s.jsx)(j(),{href:"/panel/blogs/edit?slug=".concat(e.slug,"&cid=").concat(e.school_id),className:"block px-4 py-2 text-sm text-gray-500 hover:bg-gray-100",role:"menuitem",children:"Edit"}),ed("blogs","add")&&(0,s.jsx)("button",{onClick:()=>{R(!1),J(!0),ee(e.id)},className:"w-full px-4 py-2 text-sm text-gray-500 hover:bg-gray-100",role:"menuitem",children:"Clone"}),eo("blogs","delete")&&(0,s.jsx)("button",{onClick:()=>{R(!1),ec(!0)},className:"block px-4 py-2 text-sm text-gray-500 hover:bg-gray-100",role:"menuitem",children:"Delete"})]}),(0,s.jsx)(i.Z,{isOpen:ei,setIsOpen:ec,onDelete:()=>es(e.school_id,e.slug),title:"Blog"}),(0,s.jsx)(P,{isOpen:$,setIsOpen:J,blogId:U,onSuccess:()=>{en(a,y,Y.value,z)}})]}),D&&O&&(0,s.jsx)("div",{className:"fixed inset-0 z-[9998]",onClick:()=>{Z(null),R(!1)}})]})},...eo("blogs","active")?[{accessor:"status",title:"Status",sortable:!1}]:[]],totalRecords:T,recordsPerPage:y,page:a,onPageChange:async e=>{n(e),await en(e,y,Y.value,z)},recordsPerPageOptions:b,onRecordsPerPageChange:async e=>{_(e),n(1),await en(1,e,Y.value,z)},sortStatus:A,onSortStatusChange:E,minHeight:200,paginationText:e=>{let{from:t,to:a,totalRecords:s}=e;return"Showing  ".concat(t," to ").concat(a," of ").concat(s," entries")}})})]})]})};let A=()=>{var e;let t=(0,r.CG)(e=>e.userData);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mb-6 justify-between p-3",children:(0,s.jsxs)("div",{className:"d-flex flex w-full items-center justify-between py-2",children:[(0,s.jsx)("h2",{className:"text-2xl font-semibold mr-2",children:"Blogs"}),(0,s.jsx)("div",{className:"flex gap-x-4",children:(e="blogs",(1===t.role_id||8===t.role_id||4===t.role_id||t.role_id>5&&(0,l.Fs)(t.issued_certificates,e,"add"))&&(0,s.jsx)(j(),{href:"/panel/blogs/add/",className:"btn btn-brand alignToTitle test_help_button",children:"Add Blog"}))})]})}),(0,s.jsx)(B,{})]})};A.getLayout=e=>(0,s.jsx)(n.Z,{children:e});var E=A},23604:function(e,t,a){"use strict";a.d(t,{$W:function(){return l},Fp:function(){return r},RW:function(){return c},gS:function(){return i},xB:function(){return o}});var s=a(88057),n=a(87066);let r=async function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];let e=await n.default.get("".concat(s._n,"/school?limit=-1"),{headers:{}});if(e.data&&e.data.data){var t,a;return(null==e?void 0:null===(a=e.data)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.map(e=>({value:e.id.toString(),label:e.name})))||[]}return[]},l=async e=>
1{let t=await n.default.get("".concat(s._n,"/departments?school_id=").concat(e),{headers:{}});if(t.data&&t.data.data){var a,r;return(null==t?void 0:null===(r=t.data)||void 0===r?void 0:null===(a=r.data)||void 0===a?void 0:a.map(e=>({value:e.id.toString(),label:e.name})))||[]}return[]},i=async e=>{var t,a,r;let l=await n.default.get("".concat(s._n,"/classes/").concat(e),{headers:{}});return l.data&&(null==l?void 0:null===(t=l.data)||void 0===t?void 0:t.classes)&&(null==l?void 0:null===(r=l.data)||void 0===r?void 0:null===(a=r.classes)||void 0===a?void 0:a.map(e=>({value:e.id.toString(),label:e.name})))||[]},c=async(e,t)=>{if("all"===e)return[];let a=await n.default.get("".concat(s._n,"/subjects/").concat(e),{headers:{}});return a.data&&a.data.subjects&&a.data.subjects.map(a=>({value:a.id.toString(),label:t?"".concat(a.name," | ").concat(t):a.name,parent_id:e}))||[]},o=async(e,t,a)=>{if(!e||!t)return;let r=await n.default.get("".concat(s._n,"/admin/categories/divisions?school_id=").concat(e,"&sub_category_id=").concat(t),{headers:{}});return r.data&&r.data.divisions?r.data.divisions.map(e=>({value:e.id.toString(),label:"".concat(e.name," ").concat(a?"| ".concat(a):""," "),parent_id:t})):[]}},86328:function(e,t,a){"use strict";a.d(t,{Jd:function(){return c},SO:function(){return r},m4:function(){return l},q9:function(){return o},x5:function(){return i}});var s=a(88767),n=a(23604);let r=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return(0,s.useQuery)(["schools"],()=>(0,n.Fp)(),{enabled:e,retry:!1,cacheTime:3e5,staleTime:3e5})},l=e=>(0,s.useQuery)({queryKey:["departments",e],queryFn:()=>(0,n.$W)(null!=e?e:""),enabled:!!e,cacheTime:3e5,staleTime:3e5}),i=e=>(0,s.useQuery)({queryKey:["courses",e],queryFn:()=>(0,n.gS)(null!=e?e:""),enabled:!!e,cacheTime:3e5,staleTime:3e5}),c=e=>(0,s.useQuery)({queryKey:["semesters",e],queryFn:()=>(0,n.RW)(null!=e?e:""),enabled:!!e,cacheTime:3e5,staleTime:3e5}),o=(e,t)=>(0,s.useQuery)({queryKey:["divisions",t],queryFn:()=>(0,n.xB)(null!=e?e:"",null!=t?t:""),enabled:!!t,cacheTime:3e5,staleTime:3e5})}},function(e){e.O(0,[70917,93021,24750,97083,81397,90457,11283,73011,27164,25623,991,79833,66991,91002,90939,89351,59100,46827,66183,67644,39133,92888,49774,40179],function(){return e(e.s=37941)}),_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.