1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1011],{82985:function(e,t,a){Promise.resolve().then(a.bind(a,83414))},83414:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return T}});var r=a(83890),s=a(20813),i=a(72334),n=a(53033),l=a(83642),o=a(26582),u=a(32675),c=a(56788),d=a(88779);function m(){let{auth:e}=(0,i.a)(),t=(0,d.usePathname)();if(t.startsWith("/forum")||t.startsWith("/kelas/")&&"/kelas"!==t)return null;let a=[{label:"Beranda",icon:(0,r.jsx)(n.Z,{className:"size-6"}),active:"/"===t||"/beranda"===t,link:"/beranda"},{label:"Kelas",icon:(0,r.jsx)(l.Z,{className:"size-6"}),active:t.startsWith("/kelas"),link:"/kelas"},{label:"Forum",icon:(0,r.jsx)(o.Z,{className:"size-6"}),active:t.startsWith("/forum"),link:"/forum"}];return(0,r.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-[100] max-w-[480px] mx-auto bg-white border-t border-slate-200 shadow-lg md:hidden",children:(0,r.jsx)("div",{className:"flex items-stretch justify-around h-16",children:a.map((e,t)=>(0,r.jsxs)(c.default,{href:e.link,className:"flex-1 flex flex-col items-center justify-center gap-1 transition",children:[(0,r.jsx)("div",{className:(0,u.Z)("transition-colors",e.active?"text-teal-600":"text-slate-400"),children:e.icon}),(0,r.jsx)("span",{className:(0,u.Z)("text-xs font-medium",e.active?"text-teal-600":"text-slate-400"),children:e.label})]},t))})})}var x=a(8862);function p(){let{auth:e}=(0,i.a)(),t=(0,d.usePathname)(),a=[{label:"Mitra",icon:(0,r.jsx)(n.Z,{className:"size-6"}),active:"/mitra"===t||t.startsWith("/mitra/"),link:"/mitra"},{label:"Profil",icon:(0,r.jsx)(x.Z,{className:"size-6"}),active:t.startsWith("/profile-mitra"),link:"/profile-mitra"}];return(0,r.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-[100] max-w-[480px] mx-auto bg-white border-t border-slate-200 shadow-lg md:hidden",children:(0,r.jsx)("div",{className:"flex items-stretch justify-around h-16",children:a.map((e,t)=>(0,r.jsxs)(c.default,{href:e.link,className:"flex-1 flex flex-col items-center justify-center gap-1 transition",children:[(0,r.jsx)("div",{className:(0,u.Z)("transition-colors",e.active?"text-green-600":"text-slate-400"),children:e.icon}),(0,r.jsx)("span",{className:(0,u.Z)("text-xs font-medium",e.active?"text-green-600":"text-slate-400"),children:e.label})]},t))})})}var h=a(86400),f=a(65086),g=a(51554),b=a(58496),v=a(13177),j=a(83809),y=a(43047),w=a(93966),N=a(70149),k=a(61717),_=a(42328),I=a(8913),C=a(75923),E=a(24137),P=a(95989),A=a(23057);function z(e){let{show:t,onClose:a,iuranNominal:s,iuranType:n}=e,l=(0,d.useRouter)(),o=(0,d.usePathname)(),{auth:u}=(0,i.a)(),[c,m]=(0,b.useState)(!1),[x,p]=(0,b.useState)(35e3),[h,v]=(0,b.useState)("Keanggotaan");(0,b.useEffect)(()=>{void 0!==t&&m(t)},[t]),(0,b.useEffect)(()=>{void 0!==s&&p(s),void 0!==n&&v(n)},[s,n]),(0,b.useEffect)(()=>{if(null==u?void 0:u.id)try{let e=sessionStorage.getItem("agpaii_just_paid_iuran");if(e){let t=JSON.parse(e);t.iuranNominal&&p(Number(t.iuranNominal)),t.iuranType&&v(t.iuranType);let a="agpaii_iuran_thankyou_popup_shown_user_".concat(u.id);localStorage.setItem(a,"true"),m(!0),sessionStorage.removeItem("agpaii_just_paid_iuran")}}catch(e){}},[null==u?void 0:u.id]);let j=(0,b.useCallback)(()=>{if(null==u?void 0:u.id)try{let r="agpaii_iuran_thankyou_popup_shown_user_".concat(u.id);if(!localStorage.getItem(r)){var e,t,a;((0,g.Tq)(u)===f.q.ACTIVE||null!==u.user_activated_at||Number(null!==(e=u.user_level)&&void 0!==e?e:0)>=2||2===Number(null!==(t=u.role_id)&&void 0!==t?t:0)||11===Number(null!==(a=u.role_id)&&void 0!==a?a:0))&&(m(!0),localStorage.setItem(r,"true"))}}catch(e){console.warn("Iuran thank you checker error:",e)}},[u]);(0,b.useEffect)(()=>{(null==u?void 0:u.id)&&j()},[null==u?void 0:u.id,j,o]),(0,b.useEffect)(()=>{try{let e=new URLSearchParams(window.location.search);("1"===e.get("preview_iuran")||"1"===e.get("preview_thankyou")||"1"===e.get("test_popup"))&&m(!0),window.showIuranThankYouPopup=e=>{(null==e?void 0:e.nominal)&&p(Number(e.nominal)),(null==e?void 0:e.type)&&v(e.type),m(!0)},window.resetIuranThankYouPopup=()=>{(null==u?void 0:u.id)&&(localStorage.removeItem("agpaii_iuran_thankyou_popup_shown_user_".concat(u.id)),console.log("Iuran popup flag reset for user:",u.id))}}catch(e){}},[null==u?void 0:u.id]);let y=()=>{m(!1),a&&a()};return(0,r.jsx)(k.M,{children:c&&(0,r.jsxs)("div",{className:"fixed inset-0 z-[999999] flex items-center justify-center p-3 sm:p-4 overflow-y-auto",children:[(0,r.jsx)(_.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},onClick:y,className:"fixed inset-0 bg-slate-950/75 backdrop-blur-sm transition-opacity"}),(0,r.jsxs)(_.E.div,{initial:{opacity:0,scale:.85,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:15},transition:{type:"spring",damping:26,stiffness:380},className:"relative w-full max-w-[390px] bg-white rounded-3xl shadow-2xl overflow-hidden border border-emerald-200/80 z-10 my-4",children:[(0,r.jsxs)("div",{className:"absolute top-0 left-0 right-0 h-32 bg-gradient-to-br from-[#005a4e] via-[#00796B] to-[#004D40] overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-amber-300/25 via-transparent to-transparent animate-pulse"}),(0,r.jsx)("div",{className:"absolute -top-10 -right-10 w-32 h-32 bg-white/10 rounded-full blur-xl"}),(0,r.jsx)("div",{className:"absolute -bottom-10 -left-10 w-32 h-32 bg-amber-400/20 rounded-full blur-xl"})]}),(0,r.jsx)("button",{onClick:y,className:"absolute top-2.5 right-2.5 p-1.5 bg-white/15 hover:bg-white/30 text-white rounded-full transition cursor-pointer z-20 border border-white/20",title:"Tutup",children:(0,r.jsx)(I.Z,{className:"w-4 h-4"})}),(0,r.jsxs)("div",{className:"relative pt-5 pb-5 px-5 text-center flex flex-col items-center",children:[(0,r.jsx)("div",{className:"absolute top-14 left-1/2 -translate-x-1/2 pointer-events-none",children:[{x:-90,y:-65,color:"#F59E0B",size:7,delay:.1},{x:95,y:-70,color:"#10B981",size:8,delay:.15},{x:-100,y:20,color:"#06B6D4",size:6,delay:.2},{x:100,y:25,color:"#3B82F6",size:7,delay:.25},{x:-60,y:-90,color:"#8B5CF6",size:8,delay:.12},{x:65,y:-95,color:"#F59E0B",size:7,delay:.18},{x:-70,y:70,color:"#10B981",size:8,delay:.22},{x:75,y:75,color:"#EAB308",size:6,delay:.28},{x:0,y:-100,color:"#06B6D4",size:7,delay:.05},{x:-110,y:-20,color:"#F97316",size:6,delay:.16},{x:110,y:-15,color:"#84CC16",size:8,delay:.24}].map((e,t)=>(0,r.jsx)(_.E.div,{initial:{opacity:0,scale:0,x:0,y:0},animate:{opacity:[0,1,1,0],scale:[0,1.2,1,.8],x:e.x,y:e.y,rotate:[0,180,360]},transition:{duration:1.5,delay:e.delay,repeat:1/0,repeatDelay:2.5,ease:"easeOut"},style:{backgroundColor:e.color,width:e.size,height:e.size},className:"absolute rounded-full shadow-xs"},t))}),(0,r.jsxs)("div",{className:"relative mb-3 mt-1",children:[(0,r.jsx)(_.E.div,{animate:{scale:[1,1.15,1],opacity:[.3,.7,.3]},transition:{duration:2.2,repeat:1/0,ease:"easeInOut"},className:"absolute -inset-3 bg-gradient-to-r from-amber-400 via-emerald-300 to-yellow-300 rounded-full blur-md opacity-50"}),(0,r.jsxs)(_.E.div,{initial:{rotateY:180,scale:0},animate:{rotateY:0,scale:1},transition:{type:"spring",damping:15,stiffness:220,delay:.1},className:"relative w-16 h-16 sm:w-20 sm:h-20 rounded-full bg-gradient-to-b from-amber-200 via-amber-400 to-yellow-600 p-1 shadow-lg shadow-amber-500/35 flex items-center justify-center border-2 border-yellow-100",children:[(0,r.jsxs)("div",{className:"w-full h-full rounded-full bg-gradient-to-tr from-amber-600 via-yellow-400 to-amber-300 flex flex-col items-center justify-center border border-dashed border-amber-800/40 text-amber-950 shadow-inner",children:[(0,r.jsx)("div",{className:"w-7 h-7 sm:w-8 sm:h-8 rounded-full bg-gradient-to-b from-amber-100 to-yellow-300 border border-amber-600/30 flex items-center justify-center shadow-xs",children:(0,r.jsx)(C.Z,{className:"w-4 h-4 sm:w-5 sm:h-5 text-amber-800 fill-amber-700"})}),(0,r.jsx)("span",{className:"text-[9px] font-black tracking-widest text-amber-950 uppercase mt-0.5",children:"AGPAII"})]}),(0,r.jsx)(_.E.div,{animate:{rotate:[0,20,0],scale:[1,1.2,1]},transition:{duration:1.8,repeat:1/0},className:"absolute -top-1 -right-1 bg-white text-emerald-600 rounded-full p-1 shadow-xs border border-emerald-200",children:(0,r.jsx)(E.Z,{className:"w-3.5 h-3.5 text-emerald-600 fill-emerald-600"})})]})]}),(0,r.jsxs)(_.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.15},className:"space-y-1 mb-3",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full bg-emerald-100 text-emerald-900 text-[10px] font-black tracking-wider up
1percase shadow-2xs border border-emerald-200",children:[(0,r.jsx)(P.Z,{className:"w-3 h-3 text-emerald-600"}),"Kontribusi Anggota AGPAII"]}),(0,r.jsx)("h2",{className:"text-lg sm:text-xl font-black text-slate-800 tracking-tight pt-0.5",children:"Alhamdulillah!"}),(0,r.jsx)("p",{className:"text-xs sm:text-[13px] text-emerald-900 font-bold max-w-xs mx-auto leading-snug",children:"Terima kasih, Anda sudah membantu pengembangan platform AGPAII Digital."})]}),(0,r.jsxs)(_.E.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:.2},className:"w-full bg-gradient-to-br from-emerald-50 via-teal-50/70 to-emerald-100/50 border border-emerald-200 rounded-2xl p-3.5 mb-3.5 text-left shadow-xs relative overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-start gap-2.5 mb-2.5",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-xl bg-emerald-500/20 border border-emerald-400/50 flex items-center justify-center text-emerald-800 shrink-0 mt-0.5",children:(0,r.jsx)(A.Z,{className:"w-5 h-5 text-emerald-700"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-[11px] font-black text-emerald-950 uppercase tracking-wide",children:"Mendukung Ekosistem Guru PAI"}),(0,r.jsx)("p",{className:"text-[11px] text-slate-600 font-normal leading-relaxed mt-0.5",children:"Iuran Anda sangat berarti dalam keberlanjutan layanan digital bagi ribuan Guru PAI di Indonesia."})]})]}),(0,r.jsxs)("div",{className:"pt-2 border-t border-emerald-200/80 flex items-center justify-between text-[10.5px]",children:[(0,r.jsxs)("span",{className:"text-emerald-800 font-semibold flex items-center gap-1",children:[(0,r.jsx)(E.Z,{className:"w-3.5 h-3.5 text-emerald-600"}),"Status Keanggotaan:"]}),(0,r.jsx)("span",{className:"px-2 py-0.5 rounded-md bg-emerald-600 text-white font-bold text-[10px] tracking-wide",children:"AKTIF"})]})]}),(0,r.jsxs)(_.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.25},className:"w-full space-y-2",children:[(0,r.jsxs)("button",{onClick:()=>{m(!1),a&&a(),l.push("/beranda")},className:"w-full py-2.5 px-4 bg-gradient-to-r from-[#00897B] via-[#00796B] to-[#00695C] hover:from-[#00796B] hover:to-[#004D40] text-white font-bold text-xs rounded-xl shadow-md shadow-teal-700/20 transition active:scale-[0.99] flex items-center justify-center gap-1.5 cursor-pointer",children:[(0,r.jsx)(C.Z,{className:"w-4 h-4 text-amber-300"}),(0,r.jsx)("span",{children:"Lanjutkan ke Beranda"})]}),(0,r.jsx)("button",{onClick:y,className:"w-full py-1 text-slate-400 hover:text-slate-600 text-[11px] font-medium transition cursor-pointer",children:"Tutup"})]})]})]})]})})}function Z(e){let{show:t=!0,userStatus:a,auth:s}=e,{auth:n}=(0,i.a)(),l=s||n,o=(0,d.useRouter)(),u=(0,y.NL)(),c=(0,g.UT)(),[m,x]=(0,b.useState)(!1),[p,h]=(0,b.useState)({coinAmount:500,iuranNominal:35e3,iuranType:"Pendaftaran"}),k=()=>new Promise(e=>{if(window.snap)return e();let t=document.createElement("script");t.src="https://app.midtrans.com/snap/snap.js",t.setAttribute("data-client-key","Mid-client-3qm3s6ecY3ZMx2Ah"),t.onload=()=>e(),document.head.appendChild(t)}),_=async()=>{if(c)return null;let e=await N.Z.post((null==l?void 0:l.user_activated_at)!==null?"/subscribe-fee":"/membership-fee");if(200===e.status)return e.data.data.snap_token},{mutate:I,isPending:C}=(0,w.D)({mutationFn:_,onSuccess:async e=>{e&&(await k(),window.snap.pay(e,{onSuccess:()=>{let e=a===f.q.EXPIRED||(null==l?void 0:l.user_activated_at)!==null,t=e?1e3:500,r=e?65e3:35e3,s=e?"Perpanjangan":"Pendaftaran";h({coinAmount:t,iuranNominal:r,iuranType:s}),sessionStorage.setItem("agpaii_just_paid_iuran",JSON.stringify({coinAmount:t,iuranNominal:r,iuranType:s})),x(!0)},onPending:()=>{window.location.reload()},onError:()=>{},onClose:()=>{}}))}}),E=async()=>{localStorage.removeItem("access_token"),localStorage.removeItem("agpaii_tutorial_tour_seen"),sessionStorage.removeItem("agpaii_tutorial_tour_seen"),await u.invalidateQueries({queryKey:["auth"]}),o.push("/auth/login")};return c||!t?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z,{show:m,onClose:async()=>
1{x(!1),await u.invalidateQueries({queryKey:["auth"]}),window.location.reload()},coinAmount:p.coinAmount,iuranNominal:p.iuranNominal,iuranType:p.iuranType}),(0,r.jsx)(v.Z,{show:t&&!m&&a===f.q.INACTIVE,onClose:()=>{},hideCloseButton:!0,children:(0,r.jsxs)("div",{className:"flex flex-col items-center text-center pt-2 pb-1",children:[(0,r.jsx)("div",{className:"w-14 h-14 bg-emerald-50 rounded-full flex items-center justify-center mb-3",children:(0,r.jsx)("svg",{className:"size-7 text-emerald-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a4 4 0 00-5-3.87M9 20H4v-2a4 4 0 015-3.87m6-4.13a4 4 0 11-8 0 4 4 0 018 0z"})})}),(0,r.jsxs)("div",{className:"mb-4 px-2",children:[(0,r.jsxs)("h3",{className:"text-base sm:text-lg font-bold text-slate-800 mb-1",children:["Halo, ",(null==l?void 0:l.name)||"Anggota"]}),(0,r.jsx)("p",{className:"text-xs sm:text-sm text-slate-600 font-medium leading-relaxed",children:"Tunaikan iuran keanggotaan organisasi supaya status keanggotaan Anda aktif"})]}),(0,r.jsxs)("div",{className:"w-full bg-emerald-50 border border-emerald-200 rounded-xl py-4 px-4 mb-5 text-center",children:[(0,r.jsx)("p",{className:"text-2xl font-semibold text-emerald-600 mb-1",children:"Rp 35.000"}),(0,r.jsx)("p",{className:"text-xs text-slate-500 font-medium",children:"Keanggotaan seumur hidup \xb7 akses 6 bulan"})]}),(0,r.jsx)("div",{className:"flex flex-col gap-2 w-full",children:C?(0,r.jsx)("div",{className:"w-full flex justify-center py-3",children:(0,r.jsx)(j.Z,{className:"size-7"})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:()=>I(),className:"w-full py-3 bg-emerald-600 hover:bg-emerald-700 text-white rounded-xl text-sm font-medium transition cursor-pointer",children:"Tunaikan Kontribusi"}),(0,r.jsxs)("button",{onClick:()=>window.open("https://cs1.agpaiidigital.org","_blank"),className:"w-full py-3 bg-slate-100 hover:bg-slate-200 text-slate-500 rounded-xl text-xs transition cursor-pointer flex items-center justify-center gap-2",children:[(0,r.jsxs)("svg",{className:"size-3.5",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,r.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z"}),(0,r.jsx)("path",{d:"M12 0C5.373 0 0 5.373 0 12c0 2.122.554 4.118 1.528 5.855L.057 23.885a.5.5 0 00.611.611l6.03-1.471A11.942 11.942 0 0012 24c6.627 0 12-5.373 12-12S18.627 0 12 0zm0 21.818a9.808 9.808 0 01-5.001-1.366l-.358-.214-3.718.907.922-3.615-.235-.372A9.818 9.818 0 012.182 12C2.182 6.57 6.57 2.182 12 2.182S21.818 6.57 21.818 12 17.43 21.818 12 21.818z"})]}),"Hubungi Pengurus"]}),(0,r.jsxs)("button",{onClick:()=>o.push("/tutorial"),className:"w-full py-2.5 bg-emerald-50 hover:bg-emerald-100 text-emerald-800 border border-emerald-200 rounded-xl text-xs font-bold transition cursor-pointer flex items-center justify-center gap-2 shadow-xs",children:[(0,r.jsx)("span",{children:"\uD83D\uDCD6"}),(0,r.jsx)("span",{children:"Panduan & Tutorial Pembayaran Iuran"})]}),(0,r.jsxs)("button",{onClick:E,className:"w-full py-2 text-slate-400 hover:text-red-500 text-xs transition cursor-pointer flex items-center justify-center gap-1.5",children:[(0,r.jsx)("svg",{className:"size-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h6a2 2 0 012 2v1"})}),"Logout"]})]})})]})}),(0,r.jsx)(v.Z,{show:t&&!m&&a===f.q.EXPIRED,onClose:()=>{},hideCloseButton:!0,children:(0,r.jsxs)("div",{className:"flex flex-col items-center text-center pt-2 pb-1",children:[(0,r.jsx)("div",{className:"w-14 h-14 bg-amber-50 rounded-full flex items-center justify-center mb-3",children:(0,r.jsx)("svg",{className:"size-7 text-amber-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,r.jsxs)("div",{className:"mb-4 px-2",children:[(0,r.jsxs)("h3",{className:"text-base sm:text-lg font-bold text-slate-800 mb-1",children:["Halo, ",(null==l?void 0:l.name)||"Anggota"]}),(0,r.jsx)("p",{className:"text-xs sm:text-sm text-slate-600 font-medium leading-relaxed",children:"Sudah saatnya menunaikan iuran keanggotaan organisasi"})]}),(0,r.jsxs)("div",{className:"w-full bg-emerald-50 border border-emerald-200 rounded-xl py-4 px-4 mb-5 text-center",children:[(0,r.jsx)("p",{className:"text-2xl font-semibold text-emerald-600 mb-1",children:"Rp 65.000"}),(0,r.jsx)("p",{className:"text-xs text-slate-500 font-medium",children:"Aktif selama 6 bulan ke depan"})]}),(0,r.jsx)("div",{className:"flex flex-col gap-2 w-full",children:C?(0,r.jsx)("div",{className:"w-full flex justify-center py-3",children:(0,r.jsx)(j.Z,{className:"size-7"})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:()=>I(),className:"w-full py-3 bg-emerald-600 hover:bg-emerald-700 text-white rounded-xl text-sm font-medium transition cursor-pointer",children:"Tunaikan Kontribusi"}),(0,r.jsxs)("button",{onClick:()=>window.open("https://cs1.agpaiidigital.org","_blank"),className:"w-full py-3 bg-slate-100 hover:bg-slate-200 text-slate-500 rounded-xl text-xs transition cursor-pointer flex items-center justify-center gap-2",children:[(0,r.jsxs)("svg",{className:"size-3.5",viewBox:"0 0 24 24",fill:"
1currentColor",children:[(0,r.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z"}),(0,r.jsx)("path",{d:"M12 0C5.373 0 0 5.373 0 12c0 2.122.554 4.118 1.528 5.855L.057 23.885a.5.5 0 00.611.611l6.03-1.471A11.942 11.942 0 0012 24c6.627 0 12-5.373 12-12S18.627 0 12 0zm0 21.818a9.808 9.808 0 01-5.001-1.366l-.358-.214-3.718.907.922-3.615-.235-.372A9.818 9.818 0 012.182 12C2.182 6.57 6.57 2.182 12 2.182S21.818 6.57 21.818 12 17.43 21.818 12 21.818z"})]}),"Hubungi Pengurus"]}),(0,r.jsxs)("button",{onClick:()=>o.push("/tutorial"),className:"w-full py-2.5 bg-emerald-50 hover:bg-emerald-100 text-emerald-800 border border-emerald-200 rounded-xl text-xs font-bold transition cursor-pointer flex items-center justify-center gap-2 shadow-xs",children:[(0,r.jsx)("span",{children:"\uD83D\uDCD6"}),(0,r.jsx)("span",{children:"Panduan & Tutorial Pembayaran Iuran"})]}),(0,r.jsxs)("button",{onClick:E,className:"w-full py-2 text-slate-400 hover:text-red-500 text-xs transition cursor-pointer flex items-center justify-center gap-1.5",children:[(0,r.jsx)("svg",{className:"size-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h6a2 2 0 012 2v1"})}),"Logout"]})]})})]})})]})}function T(e){var t,a,n;let{children:l}=e,{auth:o,authLoading:u}=(0,i.a)(),c=(0,d.usePathname)();if(u)return null;if(c&&(c.includes("/pin/reset")||c.includes("/reset-pin")))return(0,r.jsx)(r.Fragment,{children:l});if(!o)return(0,r.jsx)(s.Z,{to:"/getting-started"});let x=Number(null!==(n=null!==(a=null==o?void 0:o.role_id)&&void 0!==a?a:null==o?void 0:null===(t=o.role)||void 0===t?void 0:t.id)&&void 0!==n?n:null==o?void 0:o.role),b=x===h.II,v=x===h.sZ,j=16===x,y=7===x,w=13===x||(null==o?void 0:o.pensiun)===!0||(null==o?void 0:o.pensiun)===1||(null==o?void 0:o.pensiun)==="1",N=1===x||[3,4,5,6].includes(x);if(j&&!(c&&c.includes("riwayat-transaksi")))return(0,r.jsx)(s.Z,{to:"/edu-agpaii"});if(b)return"/beranda"===c||c.startsWith("/beranda/")||c.startsWith("/kelas")&&!c.startsWith("/kelas-guru")||c.startsWith("/forum")||"/profile-siswa"===c||c.startsWith("/profile-siswa/")||"/groups"===c||c.startsWith("/groups/")?(0,r.jsxs)(r.Fragment,{children:[l,(0,r.jsx)(m,{})]}):(0,r.jsx)(s.Z,{to:"/beranda"});if(v)return"/mitra"===c||c.startsWith("/mitra/")||"/profile-mitra"===c||"/groups"===c||c.startsWith("/groups/")?(0,r.jsxs)(r.Fragment,{children:[l,(0,r.jsx)(p,{})]}):(0,r.jsx)(s.Z,{to:"/mitra"});let k=2===x||11===x||!b&&!v&&!j&&!y&&!w&&!N,_=(0,g.Tq)(o),I=_===f.q.INACTIVE||_===f.q.EXPIRED;return k&&I&&!(c&&("/edu-agpaii"===c||c.startsWith("/edu-agpaii/")||"/tutorial"===c||c.startsWith("/tutorial/")))?(0,r.jsxs)("div",{className:"relative w-full min-h-screen",children:[(0,r.jsx)(Z,{show:!0,userStatus:_,auth:o}),(0,r.jsx)("div",{className:"pointer-events-none select-none",children:l})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z,{}),l]})}},83809:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var r=a(83890);function s(e){let{className:t}=e;return(0,r.jsx)("img",{src:"/img/loading.gif",alt:"loader",className:t})}},13177:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var r=a(83890),s=a(8913),i=a(32675),n=a(58496);function l(e){let{children:t,show:a,onClose:l,className:o,fullWidth:u=!1,hideCloseButton:c=!1}=e,d=(0,n.useRef)(null);return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{onClick:c?void 0:l,className:(0,i.Z)("fixed flex to
1p-0 left-0 bottom-0 right-0 bg-[rgba(0,0,0,0.250)] z-[99999] px-4 sm:px-8 duration-300 ease-in-out",a?" opacity-100":"opacity-0 pointer-events-none shadow"),children:(0,r.jsxs)("div",{ref:d,onClick:e=>e.stopPropagation(),className:(0,i.Z)("m-auto px-6 h-fit bg-white rounded-md py-5 shadow relative text-sm text-center text-slate-700 duration-300 ease-in-out w-full",a?"scale-100 opacity-100":"scale-75 opacity-0",u?"":"max-w-[480px]",o),children:[!c&&(0,r.jsx)(s.Z,{className:"text-slate-400 size-5 absolute right-3 top-3 cursor-pointer",onClick:l}),t]})})})}},20813:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});var r=a(88779),s=a(58496);function i(e){let{to:t,replace:a=!1}=e,i=(0,r.useRouter)();return(0,s.useEffect)(()=>{a?i.replace(t):-1==t?i.back():i.push(t)},[]),null}},65086:function(e,t,a){"use strict";var r,s;a.d(t,{q:function(){return r},y:function(){return i}}),(s=r||(r={})).EXPIRED="EXPIRED",s.PENDING="PENDING",s.INACTIVE="INACTIVE",s.ACTIVE="ACTIVE",s.PENSIUN="PENSIUN";let i="https://file.agpaiidigital.org"},86400:function(e,t,a){"use strict";a.d(t,{II:function(){return r},aP:function(){return i},sZ:function(){return s}});let r=8,s=14,i=e=>[]},70149:function(e,t,a){"use strict";var r=a(69693),s=a(86319);let i=r.Z.create({baseURL:"https://2024.agpaiidigital.org/api/v2/member"});(0,s.Z)(i),t.Z=i},86319:function(e,t){"use strict";t.Z=e=>{e.interceptors.request.use(e=>{let t=localStorage.getItem("access_token")||localStorage.getItem("token");return t&&(e.headers.Authorization="Bearer "+t),e},e=>Promise.reject(e))}},72334:function(e,t,a){"use strict";a.d(t,{AuthProvider:function(){return u},a:function(){return c}});var r=a(83890),s=a(43047),i=a(94497),n=a(58496),l=a(70149);let o=(0,n.createContext)(null),u=e=>{let{children:t}=e,a=(0,s.NL)(),{data:u,isError:c,isLoading:d,isFetching:m,refetch:x}=(0,i.a)({queryKey:["auth"],queryFn:async()=>{if(!localStorage.getItem("access_token"))return null;try{let e=await l.Z.get("/me");if(200===e.status)return e.data;return null}catch(e){return null}},refetchOnWindowFocus:!1,retry:!1}),p=(0,n.useMemo)(()=>u,[u]);return(0,r.jsx)(o.Provider,{value:{auth:p,authError:c,authLoading:d,authPending:m,setAuth:e=>{a.setQueryData(["auth"],e)},refetch:x},children:t})},c=()=>(0,n.useContext)(o)},51554:function(e,t,a){"use strict";a.d(t,{EL:function(){return p},NX:function(){return o},Tq:function(){return l},UT:function(){return s},VB:function(){return x},XF:function(){return d},aV:function(){return h},gJ:function(){return i},hv:function(){return f},jW:function(){return u},jt:function(){return n},qS:function(){return c}});var r=a(65086);let s=()=>!1,i=e=>e?e.startsWith("http://")||e.startsWith("https://")||e.startsWith("blob:")||e.startsWith("data:")||e.startsWith("/")?e:"".concat(r.y,"/").concat(e):"",n=e=>{if(!e||"null"===e||""===e)return!0;let t=new Date(String(e).replace(" ","T"));return!!isNaN(t.getTime())||new Date>t},l=e=>{var t;return e?!0===e.pensiun||1===e.pensiun||"1"===e.pensiun?r.q.PENSIUN:7===e.role_id||(null===(t=e.role)||void 0===t?void 0:t.id)===7?r.q.ACTIVE:null===e.user_activated_at||void 0===e.user_activated_at?r.q.INACTIVE:m(e)?n(e.expired_at)?r.q.EXPIRED:r.q.ACTIVE:r.q.PENDING:r.q.INACTIVE},o=e=>!!e&&!!e.profile&&["nik","contact","unit_kerja","gender","birthdate","school_status","nip","school_place","educational_level_id","headmaster_name","headmaster_nip"].every(t=>!!e.profile[t]),u=e=>!!e&&!!e.profile&&["city_id","province_id","district_id"].every(t=>null!=e.profile[t]);function c(e){if(!e)return null;try{let t=e.match(/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))([a-zA-Z0-9_-]{11})/i);if(t&&t[1])return t[1];let a=new URL(e.startsWith("http")?e:"https://".concat(e)).searchParams.get("v");if(a&&11===a.length)return a;return null}catch(e){return null}}let d=e=>!!e&&!!e.pns_status&&["is_pns","is_certification","is_non_pns_inpassing","pendidikan","jurusan","kampus","pemasukan","pengeluaran","kepemilikan_rumah"].every(t=>null!=e.pns_status[t]),m=e=>!!e&&o(e)&&u(e)&&d(e);function x(e){switch(e){case"Buku":return"Materi Ajar";case"Bahan Ajar":case"Bahan ajar":return"Presentasi/PPTX";case"Materi ajar & RPP":return"Modul Ajar/RPP";default:return e}}function p(e,t){return Number(e)<Number(t)?"".concat(e,"_").concat(t):"".concat(t,"_").concat(e)}function h(e){return e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/'/g,"'").replace(/–/g,"-").replace(/—/g,"-").replace(/‘/g,"'").replace(/’/g,"'").replace(/“/g,'"').replace(/”/g,'"').replace(/–/g,"-").replace(/—/g,"-").replace(/‘/g,"'").replace(/’/g,"'").replace(/“/g,'"').replace(/”/g,'"'):""}let f=e=>{var t,a,r,s;if(!e)return"/img/article.png";if(null===(r=e.yoast_head_json)||void 0===r?void 0:null===(a=r.og_image)||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:t.url)return e.yoast_head_json.og_image[0].url;if(e.image){if(e.image.startsWith("http://")||e.image.startsWith("https://"))return e.image;let t=e.image.startsWith("/")?e.image.slice(1):e.image;return"".concat("https://file.agpaiidigital.org","/").concat(t)}if(e.thumbnail){let t="string"==typeof e.thumbnail?e.thumbnail:null===(s=e.thumbnail)||void 0===s?void 0:s.src;if(t){if(t.startsWith("http://")||t.startsWith("https://"))return t;let e=t.startsWith("/")?t.slice(1):t;return"".concat("https://file.agpaiidigital.org","/").concat(e)}}return"/img/article.png"}}},function(e){e.O(0,[9693,4322,4497,6788,2328,282,9649,2945,1744],function(){return e(e.s=82985)}),_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.