1import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{W as t}from"./useStore-CzV104MW.js";import{t as n}from"./jsx-runtime-DiK4U9sA.js";import{t as r}from"./createLucideIcon-CPr0Cu2H.js";import{b as i,v as a}from"./portal-data-BYALAB41.js";import{t as o}from"./chevron-down-DnbfSlXk.js";import{n as s,r as c,t as l}from"./portal-theme-CefbL8kG.js";import{t as u}from"./search-Uqp9sAQy.js";import{L as d}from"./index-DvEvuUoW.js";var f=r(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),p=r(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),m=e(t(),1);function h(){let[e,t]=(0,m.useState)(null),[n,r]=(0,m.useState)(!0);return(0,m.useEffect)(()=>{let e=!0;d.auth.getSession().then(({data:n})=>{e&&(t(n.session?.user??null),r(!1))});let{data:n}=d.auth.onAuthStateChange((e,n)=>{t(n?.user??null),r(!1)});return()=>{e=!1,n.subscription.unsubscribe()}},[]),{user:e,loading:n}}var g=n();function _({config:e,device:t=`desktop`}){let n=e.apps.filter(e=>e.enabled),r=t===`mobile`?3:t===`tablet`?4:5,d=t===`mobile`?6:t===`tablet`?8:10,f=e.logoText||(e.schoolName?e.schoolName.split(` `).slice(0,2).map(e=>e[0]).join(``).toUpperCase():`SK`);return(0,g.jsx)(`div`,{className:`flex h-full flex-col overflow-y-auto px-6 py-8`,style:{...l(e),fontFamily:i(e.font)},children:(0,g.jsxs)(`div`,{className:`mx-auto w-full max-w-sm text-center`,children:[(0,g.jsx)(`div`,{className:`text-left`,children:(0,g.jsx)(s,{announcement:e.announcement})}),e.logoUrl?(0,g.jsx)(`img`,{src:e.logoUrl,alt:`${e.schoolName||`School`}
1 logo`,className:`mx-auto size-14 rounded-[1.15rem] bg-white object-contain p-1.5`,style:{boxShadow:`0 14px 30px -12px ${e.primaryColor}80`}}):(0,g.jsx)(`div`,{className:`mx-auto flex size-14 items-center justify-center rounded-[1.15rem] text-sm font-bold text-white`,style:{backgroundImage:`linear-gradient(135deg, ${e.primaryColor}, ${e.accentColor})`,boxShadow:`0 14px 30px -12px ${e.primaryColor}80`},children:f}),(0,g.jsx)(`p`,{className:`mt-4 text-[15px] font-semibold tracking-tight text-slate-900`,children:e.portalName||e.schoolName||`Your School Portal`}),(0,g.jsx)(`p`,{className:`mt-1 text-[11px] text-slate-500`,children:e.websiteTitle||`Student Digital Learning Hub`}),(0,g.jsxs)(`div`,{className:`mt-6 space-y-2.5 rounded-3xl border border-slate-200/70 bg-white/80 p-4 text-left backdrop-blur-xl`,style:{boxShadow:`0 24px 60px -34px rgba(15,23,42,0.22)`},children:[[`Pilih Kelas`,`Pilih Nama Murid`].map((e,t)=>(0,g.jsxs)(`div`,{className:`flex items-center justify-between rounded-2xl border border-slate-200/80 bg-white px-3.5 py-2.5 shadow-[0_1px_2px_rgba(15,23,42,0.04)]`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`p`,{className:`text-[8px] font-semibold tracking-[0.14em] text-slate-400 uppercase`,children:e}),(0,g.jsx)(`p`,{className:`mt-0.5 text-[11px] font-medium text-slate-800`,children:t===0?`5 Bestari`:`Nur Aisyah binti Kamal`})]}),(0,g.jsx)(o,{className:`size-3.5 text-slate-400`})]},e)),e.securityMode===`accessCode`?(0,g.jsxs)(`div`,{className:`rounded-2xl border border-slate-200/80 bg-white px-3.5 py-2.5`,children:[(0,g.jsx)(`p`,{className:`text-[8px] font-semibold tracking-[0.14em] text-slate-400 uppercase`,children:`School Access Code`}),(0,g.jsx)(`p`,{className:`mt-0.5 text-[11px] font-medium tracking-[0.35em] text-slate-800`,children:`â¢â¢â¢â¢â¢â¢`})]}):null,(0,g.jsx)(`button`,{type:`button`,className:`w-full rounded-2xl py-3 text-[10px] font-bold tracking-[0.16em] text-white uppercase`,style:{backgroundImage:`linear-gradient(135deg, ${e.primaryColor}, ${e.accentColor})`,boxShadow:`0 12px 26px -12px ${e.primaryColor}99`},children:`Enter Portal`}),!e.toggles.hideEmail&&(0,g.jsx)(`p`,{className:`text-center text-[9px] text-slate-400`,children:`[email protected]`})]}),(0,g.jsxs)(`div`,{className:`mt-7 flex items-center gap-2 rounded-full border border-slate-200/80 bg-white/80 px-3.5 py-2 text-left backdrop-blur`,children:[(0,g.jsx)(u,{className:`size-3 text-slate-400`}),(0,g.jsx)(`span`,{className:`text-[10px] text-slate-400`,children:`Search applicationsâ¦`})]}),(0,g.jsx)(`div`,{className:`mt-4 grid gap-2.5`,style:{gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`},children:n.slice(0,d).map(t=>{let n=a(t.id,e.primaryColor);return(0,g.jsxs)(`div`,{className:`flex aspect-square flex-col items-center justify-center gap-1.5 rounded-2xl border border-slate-200/70 bg-white/85 shadow-[0_2px_10px_-6px_rgba(15,23,42,0.18)] backdrop-blur`,children:[(0,g.jsx)(`span`,{className:`flex size-7 items-center justify-center rounded-xl`,style:{backgroundColor:`${n}1f`},children:(0,g.jsx)(c,{app:t,color:n,className:`size-3.5`})}),(0,g.jsx)(`span`,{className:`max-w-full truncate px-1 text-[7px] font-medium text-slate-500`,children:t.name})]},t.id)})}),n.length>d&&(0,g.jsxs)(`p`,{className:`mt-3 text-[9px] text-slate-400`,children:[`+`,n.length-d,` more applications`]}),(0,g.jsxs)(`p`,{className:`mt-7 text-[8px] text-slate-400`,children:[`© `,new Date().getFullYear(),` `,e.schoolName||`Your School`,` · Powered by JomPortal`]})]})})}export{f as i,h as n,p as r,_ as t};
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.