(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6531],{735:(e,t,l)=>{Promise.resolve().then(l.t.bind(l,8173,23)),Promise.resolve().then(l.t.bind(l,7970,23)),Promise.resolve().then(l.bind(l,2110)),Promise.resolve().then(l.t.bind(l,5716,23)),Promise.resolve().then(l.bind(l,3582))},5565:(e,t,l)=>{"use strict";l.d(t,{default:()=>n.a});var s=l(4146),n=l.n(s)},6046:(e,t,l)=>{"use strict";var s=l(6658);l.o(s,"useParams")&&l.d(t,{useParams:function(){return s.useParams}}),l.o(s,"usePathname")&&l.d(t,{usePathname:function(){return s.usePathname}}),l.o(s,"useRouter")&&l.d(t,{useRouter:function(){return s.useRouter}})},4146:(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 s=l(306),n=l(666),r=l(7970),i=s._(l(5514));function a(e){let{props:t}=(0,n.getImgProps)(e,{defaultLoader:i.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=r.Image},8856:(e,t,l)=>{"use strict";l.d(t,{m:()=>n});var s=l(5155);l(2115);let n=e=>{let{children:t}=e;return(0,s.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,s.jsx)("div",{className:"px-[20px] md:max-w-[748px] lg:max-w-[1004px] w-full xl:max-w-[1240px] h-full",children:t})})}},3582:(e,t,l)=>{"use strict";l.d(t,{Navbar:()=>_});var s=l(5155),n=l(2115),r=l(8856),i=l(5565);let a=(0,n.createContext)(void 0),o=e=>{let{children:t}=e,[l,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>(l?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[l]),(0,s.jsx)(a.Provider,{value:{showDrawer:l,toggleDrawer:()=>{r(e=>!e)}},children:t})},c=()=>{let e=(0,n.useContext)(a);if(!e)throw Error("useDrawer must be used within a DrawerProvider");return e},u=e=>{let{children:t}=e;return(0,s.jsx)(o,{children:t})},d=e=>{let{children:t}=e,{toggleDrawer:l}=c();return(0,s.jsx)("button",{onClick:l,className:"block md:hidden",children:t})},h=e=>{let{children:t}=e,{showDrawer:l}=c(),[r,i]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{!0===l?i(!0):setTimeout(()=>{i(!1)},300)},[l]),(0,s.jsx)("div",{className:"fixed inset-0 z-50 \n transition-transform duration-300 \n ".concat(l?"translate-x-0":"-translate-x-[100vw]","\n ").concat(r?"opacity-100":"opacity-0"),children:(0,s.jsx)("div",{className:"fixed inset-0 bg-black h-screen p-6 overflow-y-auto z-50",children:t})})},x=e=>{let{children:t}=e;return(0,s.jsx)("nav",{className:"py-8",children:(0,s.jsx)("ul",{children:t})})},m=e=>{let{children:t}=e,{toggleDrawer:l}=c();return(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)("button",{onClick:l,className:"text-white ",children:t})})},f=[{title:"Beranda",type:"button",href:"/"},{title:"Tentang",type:"dropdown",menu:[{title:"Pondok",type:"menu",href:"/tentang"},{title:"Profile Pimpinan",type:"submenu",submenu:[{subtitle:"KH. Abdul Maksum",href:"/kh-abdul-maksum"},{subtitle:"KH. MU Hidayat",href:"/kh-mu-hidayat"},{subtitle:"KH. Ahmad Duanda",href:"/kh-ahmad-djuanda"}]},{title:"Falsafah",type:"submenu",submenu:[{subtitle:"Visi & Misi",href:"/visi-misi"},{subtitle:"Panca Pesona",href:"/panca-pesona"},{subtitle:"Panca Jiwa",href:"/panca-jiwa"}]}]},{title:"Warta",type:"button",href:"/warta"},{title:"Pendaftaran",type:"button",href:"/pendaftaran"},{title:"Kontak & Alamat",type:"button",href:"/kontak-alamat"}];var p=l(8173),w=l.n(p);let j=e=>{let{title:t,href:l,path:r}=e,[i,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=()=>{window.scrollY>64?a(!0):a(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),(0,s.jsx)("li",{className:"h-full z-50",children:(0,s.jsxs)(w(),{href:l,className:"h-full flex items-center gap-1 font-medium relative group",children:[(0,s.jsx)("p",{children:t}),(0,s.jsx)("div",{className:"h-1 transition-all duration-200 bg-accent1 absolute bottom-0 left-1/2 transform -translate-x-1/2 \n ".concat(r===l&&(!0===i||"/"!==l)?"w-10":"w-0 group-hover:w-10")})]})})},v=e=>{let{size:t,strokeWidth:l}=e;return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:null!=l?l:"1.5",stroke:"currentColor",className:"size-".concat(null!=t?t:"6"),children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})},b=e=>{let{title:t,children:l}=e;return(0,s.jsxs)("li",{className:"relative group h-full z-50",children:[(0,s.jsxs)("button",{className:"relative flex items-center gap-1 font-medium h-full",children:[(0,s.jsx)("p",{children:t}),(0,s.jsx)(v,{size:4}),(0,s.jsx)("div",{className:"h-1 transition-all duration-200 w-0 group-hover:w-10 bg-accent1 absolute bottom-0 left-1/2 transform -translate-x-1/2"})]}),(0,s.jsx)("ul",{className:"absolute group-hover:block hidden top-full -left-[30px] py-2 shadow-round bg-white text-black w-32 lg:w-44 text-xxs lg:text-xs",children:l})]})},g=e=>{let{title:t,href:l}=e;return(0,s.jsx)("li",{className:"w-full z-50",children:(0,s.jsx)(w(),{href:l,className:" h-full block px-4 py-2 hover:text-accent2",children:(0,s.jsx)("p",{children:t})})})},k=e=>{let{size:t,strokeWidth:l}=e;return(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"".concat(null!=l?l:1.5),stroke:"currentColor",className:"size-".concat(null!=t?t:6),children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})},N=e=>{let{menu:t}=e,[l,r]=(0,n.useState)(!1),[i,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{a("ontouchstart"in window||navigator.maxTouchPoints>0)},[]),(0,s.jsxs)("li",{className:"relative z-50",onMouseLeave:i?void 0:()=>r(!1),children:[(0,s.jsx)("button",{onMouseOver:()=>r(!0),onClick:()=>r(!0),onBlur:()=>{setTimeout(()=>r(!1),100)},children:(0,s.jsxs)("div",{className:"flex items-center justify-between w-full px-4 py-2 hover:cursor-pointer hover:text-accent2",children:[(0,s.jsx)("p",{children:t.title}),(0,s.jsx)(k,{size:3,strokeWidth:2})]})}),(0,s.jsx)("ul",{className:"absolute ".concat(l?"flex flex-col":"hidden"," -top-[9px] left-full py-2 shadow-round bg-white w-32 lg:w-44"),children:t.submenu.map((e,t)=>(0,s.jsx)("li",{className:"w-full",children:(0,s.jsx)(w(),{href:e.href,className:" h-full block px-4 py-2 hover:text-accent2",children:(0,s.jsx)("p",{children:e.subtitle})})},t))})]})},y=e=>{let{title:t,href:l}=e,{toggleDrawer:n}=c();return(0,s.jsx)("li",{className:"flex items-center",children:(0,s.jsx)(w(),{href:l,className:"text-xl h-full p-2 flex items-center w-full font-semibold text-white",onClick:n,children:(0,s.jsx)("p",{children:t})})})},P=e=>{let{title:t,children:l}=e,[r,i]=(0,n.useState)(!1);return(0,s.jsxs)("li",{className:"flex flex-col items-center justify-center",children:[(0,s.jsxs)("button",{className:"text-xl h-full flex items-center justify-between p-2 w-full font-semibold text-white",onClick:()=>i(!r),children:[(0,s.jsx)("p",{children:t}),(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-6 transition-all duration-300 ".concat(r?"transform rotate-90":""),children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})]}),(0,s.jsx)("ul",{className:"flex flex-col w-full text-base font-normal overflow-hidden transition-all duration-300 ".concat(r?"opacity-100 max-h-screen":"opacity-0 max-h-0"),children:l})]})},C=e=>{let{title:t,href:l}=e,{toggleDrawer:n}=c();return(0,s.jsx)("li",{className:"flex items-center justify-center",children:(0,s.jsx)(w(),{href:l,className:"text-sm h-full w-full flex items-center justify-between pl-8 p-2 pr-3 text-white",onClick:n,children:(0,s.jsx)("p",{children:t})})})},z=e=>{let{menu:t}=e,[l,r]=(0,n.useState)(!1),{toggleDrawer:i}=c();return(0,s.jsxs)("li",{className:"flex flex-col items-center",children:[(0,s.jsxs)("button",{className:"text-sm h-full w-full flex items-center justify-between pl-8 p-2 pr-3 text-white",onClick:()=>r(!l),children:[(0,s.jsx)("p",{children:t.title}),(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-4 transition-all duration-300 ".concat(l?"transform rotate-90":""),children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})]}),(0,s.jsx)("ul",{className:"flex w-full flex-col text-base font-normal overflow-hidden transition-all duration-300 ".concat(l?"opacity-100 max-h-screen":"opacity-0 max-h-0"),children:t.submenu.map((e,t)=>(0,s.jsx)("li",{className:"w-full",children:(0,s.jsx)(w(),{href:e.href,className:"h-full w-full text-sm flex items-center px-12 p-2 text-white",onClick:i,children:(0,s.jsx)("p",{children:e.subtitle})})},t))})]})},L=e=>{let{items:t,path:l}=e;return(0,s.jsx)(s.Fragment,{children:t.map((e,t)=>{switch(e.type){case"button":return(0,s.jsx)(j,{title:e.title,href:e.href||"#",path:l},t);case"dropdown":var n;return(0,s.jsx)(b,{title:e.title,children:null===(n=e.menu)||void 0===n?void 0:n.map((e,t)=>"menu"==e.type?(0,s.jsx)(g,{title:e.title,href:e.href||"#"},t):"submenu"==e.type?(0,s.jsx)(N,{menu:e||[]},t):void 0)},t);default:return null}})})},E=e=>{let{items:t}=e;return(0,s.jsx)(s.Fragment,{children:t.map((e,t)=>{switch(e.type){case"button":return(0,s.jsx)(y,{title:e.title,href:e.href||"#"},t);case"dropdown":var l;return(0,s.jsx)(P,{title:e.title,children:null===(l=e.menu)||void 0===l?void 0:l.map((e,t)=>"menu"==e.type?(0,s.jsx)(C,{title:e.title,href:e.href||"#"},t):"submenu"==e.type?(0,s.jsx)(z,{menu:e||[]},t):void 0)},t);default:return null}})})};var S=l(6046);let _=()=>{let[e,t]=(0,n.useState)(!1),[l,a]=(0,n.useState)(!1),o=(0,S.usePathname)();return(0,n.useEffect)(()=>{let e=()=>{window.scrollY>64?t(!0):t(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]),(0,s.jsx)("div",{className:"h-14 lg:h-16 shadow-easy-fade z-50 text-xs lg:text-sm ".concat(!0===e?"sticky -top-16 translate-y-16 transition-transform duration-300 bg-white":"/"===o?"bg-green-700 text-white":"bg-white"),children:(0,s.jsx)(r.m,{children:(0,s.jsxs)("div",{className:"flex h-full justify-between items-center",children:[(0,s.jsxs)(u,{children:[(0,s.jsx)(d,{children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-6",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})}),(0,s.jsxs)(h,{children:[(0,s.jsx)(m,{children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-8",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})})}),(0,s.jsx)(x,{children:(0,s.jsx)(E,{items:f})})]})]}),(0,s.jsx)(w(),{href:"/",children:(0,s.jsx)(i.default,{priority:!0,src:!1==e&&"/"===o?"/logo_ppd_2.png":"/logo_ppd.png",alt:"logo",width:470,height:125,className:"w-36"})}),(0,s.jsx)("nav",{className:"h-full",children:(0,s.jsxs)("div",{className:"flex items-center gap-5 lg:gap-10 h-full",children:[(0,s.jsx)("ul",{className:"max-md:hidden flex items-center gap-5 lg:gap-10 h-full",children:(0,s.jsx)(L,{items:f,path:o})}),(0,s.jsxs)("div",{className:"relative h-full flex items-center ",children:[(0,s.jsx)("button",{onClick:()=>a(!l),className:"px-6 md:py-2 py-1 border rounded-full text-sm hover:bg-green-300 bg-green-700 hover:text-black text-white",children:"Login"}),(0,s.jsx)("div",{className:"".concat(!0===l?"flex":"hidden"," absolute right-0 top-full w-36 lg:w-48 bg-white shadow-round p-4"),children:(0,s.jsx)("div",{className:"w-full z-[100]",onClick:()=>a(!l),children:(0,s.jsx)(w(),{href:"/pendaftaran/login",className:" h-full block text-black hover:text-accent2 z-[100]",children:(0,s.jsx)("p",{children:"Santri Baru"})})})})]})]})})]})})})}},5716:()=>{}},e=>{var t=t=>e(e.s=t);e.O(0,[4797,8173,7970,2110,8441,1517,7358],()=>t(735)),_N_E=e.O()}]);