1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4029],{10383:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});let r=(0,l(71847).A)("calendar-days",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]])},15239:(e,t,l)=>{"use strict";l.d(t,{default:()=>i.a});var r=l(54652),i=l.n(r)},17288:(e,t,l)=>{"use strict";l.d(t,{_:()=>r});let r=(0,l(12115).createContext)({data:{},setData:()=>{}})},44473:(e,t,l)=>{"use strict";l.d(t,{default:()=>f});var r=l(95155),i=l(12115),s=l(17288),n=l(42328),a=l(15239),o=l(63570);let c=e=>{let{title:t,image:l,desc1:i,subtitle:s}=e,n=i||s;return(0,r.jsxs)("div",{className:"",children:[t&&(0,r.jsx)("h2",{className:"text-3xl lg:text-[40px] text-center text-dpViolet mb-8",children:t}),(0,r.jsxs)("div",{children:[l&&(0,r.jsx)("div",{className:"relative float-left w-full max-w-[428px] aspect-[428/382] mr-6 mb-4 overflow-hidden rounded-md",children:(0,r.jsx)(a.default,{src:l,alt:t||"certification program image",fill:!0,className:"object-cover",sizes:"(max-width: 768px) 100vw, 428px",priority:!0})}),n&&(0,r.jsx)(o.A,{className:"text-desc text-justify leading-relaxed",html:n}),(0,r.jsx)("div",{className:"clear-both"})]})]})};var d=l(86275),u=l(64269),m=l(10383);let v="/placeholder.svg",p=e=>{let{img:t,title:l,desc:s,link:n,date:c,dateLabel:p}=e,[h,f]=(0,i.useState)(t||v),x=h===v,g=(0,u.Yq)(c),b="â"===g?"":g;return(0,r.jsxs)("div",{className:"flex flex-col rounded-lg shadow-xl h-full",children:[(0,r.jsxs)("div",{className:"relative aspect-[4/5] rounded-t-lg overflow-hidden bg-gray-100",children:[!x&&(0,r.jsx)(a.default,{src:h,alt:"","aria-hidden":!0,fill:!0,sizes:"(max-width: 1024px) 100vw, 33vw",className:"object-cover scale-110 blur-2xl opacity-60"}),(0,r.jsx)(a.default,{className:"relative z-10 ".concat(x?"object-contain p-10 opacity-70":"object-contain"),src:h,alt:l||"Certificate course",fill:!0,sizes:"(max-width: 1024px) 100vw, 33vw",onError:()=>f(v)})]}),(0,r.jsxs)("div",{className:"p-4 flex flex-col flex-grow",children:[l&&(0,r.jsx)("h2",{className:"text-base text-dpViolet",children:l}),b&&(0,r.jsxs)("p",{className:"mt-1.5 flex items-center gap-1.5 text-xs font-medium text-dpViolet/80",children:[(0,r.jsx)(m.A,{className:"h-3.5 w-3.5 shrink-0"}),p?"".concat(p," ").concat(b):b]}),(0,r.jsx)(o.A,{className:"text-desc mt-2 line-clamp-1 text-xs **:text-xs! **:font-normal! ".concat(l?"":"mt-0"),html:s}),(0,r.jsx)("div",{className:"mt-auto pt-10 ",children:(0,r.jsx)(d.A,{text:"Read More",link:n,icon:!1})})]})]})},h=e=>{let{title:t,imageUrl:l,description:i,subtitle:s,cardsTitle:a,cardsImage:o,showCardsSection:d=!0,apiData:u}=e,{data:m,isLoading:v,error:h}=(0,n.Gs)(["certificate-courses"],"/bmu/api/v1/certificate-courses"),f=u||m,x=(()=>{var e;if(!(null==f?void 0:f.data))return[];let t=(null==(e=f.data)?void 0:e.data)||f.data||[];return Array.isArray(t)?t:[]})().filter(e=>e.isActive).sort((e,t)=>{var l,r;return new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()||(null!=(l=t.id)?l:0)-(null!=(r=e.id)?r:0)});return v?(0,r.jsxs)("div",{children:[(0,r.jsx)(c,{title:t,image:l,desc1:i||s}),(0,r.jsxs)("div",{className:"my-20 text-center",children:[(0,r.jsx)("div",{className:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-dpViolet border-r-transparent"}),(0,r.jsx)("p",{className:"mt-2 text-gray-600",children:"Loading courses..."})]})]}):(0,r.jsxs)("div",{children:[(0,r.jsx)(c,{title:t,image:l,desc1:i||s}),d&&x.length>0&&(0,r.jsxs)("div",{className:"my-10",children:[a&&(0,r.jsx)("h2",{className:"text-[40px] text-center text-dpViolet",children:a}),(0,r.jsx)("div",{className:"mt-10 grid grid-cols-1 lg:grid-cols-3 gap-5",children:x.map((e,t)=>{var l,i;return(0,r.jsx)(p,{img:(null==(i=e.media)||null==(l=i.find(e=>"THUMBNAIL"===e.type&&e.isActive))?void 0:l.url)||"",title:e.name||e.courseName||"Certificate Course",desc:e.description||e.courseDescription||"",link:e.link||"/admission/courses/".concat(e.id),date:e.lastSubmissionDate||e.createdAt,dateLabel:e.lastSubmissionDate?"Apply by":"Added"},e.id||t)})})]}),h&&(0,r.jsx)("div",{className:"my-20 text-center text-red-600",children:(0,r.jsx)("p",{children:"Failed to load courses. Please try again later."})})]})},f=()=>{var e,t,l,a,o,c;let{data:d}=(0,n.Gs)(["templates47"],"/bmu/api/v1/templates/47"),{setData:u}=(0,i.useContext)(s._);(0,i.useEffect)(()=>{var e,t,l,r,i,s,n,a,o,c,m,v,p,h,f;if(!d)return;let x=null==d||null==(i=d.data)||null==(r=i.sections)||null==(l=r[0])||null==(t=l.components)||null==(e=t[0])?void 0:e.contents,g=null==x||null==(n=x[2])||null==(s=n.images)?void 0:s.filter(e=>e.isActive);u({title:(null==x||null==(a=x[0])?void 0:a.isActive)?null==x||null==(o=x[0])?void 0:o.title:"",desc:(null==x||null==(c=x[1])?void 0:c.isActive)?null==x||null==(m
1=x[1])?void 0:m.subtitle:"",images:(null==x||null==(v=x[2])?void 0:v.isActive)?g:[],isActive:null==d||null==(f=d.data)||null==(h=f.sections)||null==(p=h[0])?void 0:p.isActive})},[u,d]);let m=null==d||null==(t=d.data)||null==(e=t.sections)?void 0:e[1],v=null==m||null==(l=m.components)?void 0:l[0],p=(null==v?void 0:v.contents)||[],f=(null==m?void 0:m.isActive)&&(null==v?void 0:v.isActive),x=(()=>{var e,t,l,r;let i=p[0],s=p[1],n=p[2];return{title:(null==i?void 0:i.isActive)?null==i?void 0:i.title:"",imageUrl:(null==s?void 0:s.isActive)&&(null==s||null==(t=s.images)||null==(e=t[0])?void 0:e.url)?s.images[0].url:"",description:(null==n?void 0:n.isActive)?null==n?void 0:n.description:"",subtitle:(null==s?void 0:s.isActive)?null==s?void 0:s.subtitle:"",contentImage:(null==n?void 0:n.isActive)&&(null==n||null==(r=n.images)||null==(l=r[0])?void 0:l.url)?n.images[0].url:""}})(),g=null==d||null==(o=d.data)||null==(a=o.sections)?void 0:a[2],b=null==g||null==(c=g.components)?void 0:c[0],y=(null==b?void 0:b.contents)||[],j=(null==g?void 0:g.isActive)&&(null==b?void 0:b.isActive),w=(()=>{var e,t;let l=y[0];return{title:(null==l?void 0:l.isActive)?null==l?void 0:l.title:"Upgrade Your Skills with Certificate Courses",imageUrl:(null==l?void 0:l.isActive)&&(null==l||null==(t=l.images)||null==(e=t[0])?void 0:e.url)?l.images[0].url:"",isActive:null==l?void 0:l.isActive}})();return(0,r.jsx)("section",{children:f&&(0,r.jsx)(h,{title:x.title,imageUrl:x.imageUrl,description:x.description,subtitle:x.subtitle,cardsTitle:w.title,cardsImage:w.imageUrl,showCardsSection:j})})}},54652:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var l in t)Object.defineProperty(e,l,{enumerable:!0,get:t[l]})}(t,{default:function(){return o},getImageProps:function(){return a}});let r=l(28140),i=l(75040),s=l(81356),n=r._(l(71124));function a(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,l]of Object.entries(t))void 0===l&&delete t[e];return{props:t}}let o=s.Image},56724:(e,t,l)=>{"use strict";l.d(t,{k5:()=>d});var r=l(12115),i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},s=r.createContext&&r.createContext(i),n=["attr","size","title"];function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r])}return e}).apply(this,arguments)}function o(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),l.push.apply(l,r)}return l}function c(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?o(Object(l),!0).forEach(function(t){var r,i,s;r=e,i=t,s=l[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var l=e[Symbol.toPrimitive];if(void 0!==l){var r=l.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(i))in r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):o(Object(l)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))})}return e}function d(e){return t=>r.createElement(u,a({attr:c({},e.attr)},t),function e(t){return t&&t.map((t,l)=>r.createElement(t.tag,c({key:l},t.attr),e(t.child)))}(e.child))}function u(e){var t=t=>{var l,{attr:i,size:s,title:o}=e,d=function(e,t){if(null==e)return{};var l,r,i=function(e,t){if(null==e)return{};var l={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;l[r]=e[r]}return l}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)l=s[r],!(t.indexOf(l)>=0)&&Object.prototype.propertyIsEnumerable.call(e,l)&&(i[l]=e[l])}return i}(e,n),u=s||t.size||"1em";return t.className&&(l=t.className),e.className&&(l=(l?l+" ":"")+e.className),r.createElement("svg",a({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,d,{className:l,style:c(c({color:e.color||t.color},t.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),o&&r.createElement("title",null,o),e.children)};return void 0!==s?r.createElement(s.Consumer,null,e=>t(e)):t(i)}},63570:(e,t,l)=>{"use strict";l.d(t,{A:()=>s});var r=l(95155),i=l(64269);let s=e=>{let{html:t,className:l,...s}=e;return(0,r.jsx)("div",{...s,className:(0,i.cn)("prose max-w-none",l),dangerouslySetInnerHTML:{__html:null!=t?t:""}})}},71847:(e,t,l)=>{"use strict";l.d(t,{A:()=>o});var r=l(12115);let i=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,l)=>l?l.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},s=function(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];return t.filter((e,t,l)=>!!e&&""!==e.trim()&&l.indexOf(e)===t).join(" ").trim()};var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,r.forwardRef)((e,t)=>{let{color:l="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:c="",children:d,iconNode:u,...m}=e;return(0,r.createElement)("svg",{ref:t,...n,width:i,height:i,stroke:l,strokeWidth:o?24*Number(a)/Number(i):a,className:s("lucide",c),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(m)&&{"aria-hidden":"true"},...m},[...u.map(e=>{let[t,l]=e;return(0,r.createElement)(t,l)}),...Array.isArray(d)?d:[d]])}),o=(e,t)=>{let l=(0,r.forwardRef)((l,n)=>{let{className:o,...c}=l;return(0,r.createElement)(a,{ref:n,iconNode:t,className:s("lucide-".concat(i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),o),...c})});return l.displayName=i(e),l}},86275:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var r=l(95155),i=l(52619),s=l.n(i),n=l(30308);let a=e=>{let{text:t="Read More",link:l,icon:i=!0,width:a,disabled:o=!1,openNewTab:c=!1}=e,d="flex gap-3 py-3 px-6 sm:px-16 ".concat(a||"w-full lg:w-80"," whitespace-nowrap items-center justify-center font-medium border border-[#E7E7EC] rounded-sm transition-colors ").concat(o?"bg-gray-400 cursor-not-allowed text-white/70":"bg-dpViolet hover:bg-dpViolet/90 text-white cursor-pointer");return o?(0,r.jsxs)("div",{className:d,children:[t,i&&(0,r.jsx)(n.r9I,{className:"w-6 h-6 shrink-0"})]}):l?(0,r.jsxs)(s(),{href:l,className:d,target:c?"_blank":void 0,rel:c?"noopener noreferrer":void 0,children:[t,i&&(0,r.jsx)(n.r9I,{className:"w-6 h-6 shrink-0"})]}):(0,r.jsxs)("div",{className:d,children:[t,i&&(0,r.jsx)(n.r9I,{className:"w-6 h-6 shrink-0"})]})}},97684:(e,t,l)=>{Promise.resolve().then(l.bind(l,44473))}}]);
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.