PageSourceSearch

https://ramzan-challenge-mka.web.app/assets/SpiritualPage-4qBLmZHW.js

js ramzan-challenge-mka.web.app collected 2026-10-03 12:34:00 UTC 8,039 bytes, 1 lines download raw bytes

1import{r as s,j as e,B as S,E as z,m,y as $,S as R,D as V,aG as M,aH as A,aI as q,M as L}from"./vendor-ui-BYeXt3fg.js";import{u as O,i as D}from"./index-OgXUQGwZ.js";import{a as F}from"./contentService-CykMcrjc.js";import{B as U}from"./Button-DqYZybKE.js";import"./vendor-firebase-DOE9lvE8.js";const Y=[{arabic:"إِنَّ مَعَ الْعُسْرِ يُسْرًا",translation:"Indeed, with hardship comes ease.",reference:"Surah Ash-Sharh (94:6)"},{arabic:"فَاذْكُرُونِي أَذْكُرْكُمْ",translation:"So remember Me; I will remember you.",reference:"Surah Al-Baqarah (2:152)"}],_=[{text:"The best among you are those who have the best manners and character.",reference:"Sahih Bukhari",topic:"Character"},{text:"None of you truly believes until he loves for his brother what he loves for himself.",reference:"Sahih Bukhari & Muslim",topic:"Brotherhood"}],G=()=>({fajr:"05:15",sunrise:"06:35",dhuhr:"12:30",asr:"15:45",maghrib:"18:20",isha:"19:45"}),ae=()=>{const{userProfile:K,isKhadim:Q,isAtfal:P}=O(),[c,y]=s.useState(null),[d,p]=s.useState(null),[g,T]=s.useState([]),[u,B]=s.useState([]),[t,E]=s.useState(null),[n,f]=s.useState(null),[W,b]=s.useState(!0);s.useEffect(()=>{H(),E(G())},[]);const H=async()=>{b(!0);const[a,h]=await Promise.all([F("quran"),F("hadith")]),r=a.data?.length>0?a.data:Y,i=h.data?.length>0?h.data:_;T(r),B(i);const x=D(),o=Math.floor((x-new Date(x.getFullYear(),0,0))/864e5);y(r[o%r.length]),p(i[o%i.length]),b(!1)};s.useEffect(()=>{if(!t)return;const a=()=>{const r=D(),i=r.getHours()*60+r.getMinutes(),x=[{name:"Fajr",time:t.fajr,icon:M},{name:"Dhuhr",time:t.dhuhr,icon:A},{name:"Asr",time:t.asr,icon:A},{name:"Maghrib",time:t.maghrib,icon:q},{name:"Isha",time:t.isha,icon:L}];for(const o of x){const[k,C]=o.time.split(":").map(Number),j=k*60+C;if(j>i){const N=j-i,v=Math.floor(N/60),w=N%60;f({...o,remaining:v>0?`${v}h ${w}m`:`${w}m`});return}}f({name:"Fajr",time:t.fajr,icon:M,remaining:"Tomorrow"})};a();const h=setInterval(a,6e4);return()=>clearInterval(h)},[t]);const I=()=>{if(g.length>0){const a=g[Math.floor(Math.random()*g.length)];y(a)}if(u.length>0){const a=u[Math.floor(Math.random()*u.length)];p(a)}},l=P?{gradient:"from-purple-500 to-indigo-600",light:"bg-purple-50",text:"text-purple-600"}:{gradient:"from-emerald-500 to-teal-600",light:"bg-emerald-50",text:"text-emerald-600"};return e.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-6",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl md:text-3xl font-bold text-gray-900 islamic-font flex items-center gap-3",children:[e.jsx(S,{className:l.text,size:32}),"Spiritual Content"]}),e.jsx("p",{className:"text-gray-600 mt-1",children:"Daily inspiration for your spiritual journey"})]}),e.jsxs(U,{variant:"ghost",onClick:I,children:[e.jsx(z,{size:18}),"Refresh"]})]}),n&&e.jsx(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:`bg-gradient-to-r ${l.gradient} rounded-2xl p-6 text-white mb-6`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-white/70 text-sm",children:"Next Prayer"}),e.jsx("h2",{className:"text-3xl font-bold",children:n.name}),e.jsx("p",{className:"text-white/80",children:n.time})]}),e.jsxs("div",{className:"text-center",children:[e.jsx(n.icon,{size:48,className:"mx-auto mb-2 opacity-80"}),e.jsxs("p",{className:"text-sm bg-white/20 rounded-full px-3 py-1",children:["in ",n.remaining]})]})]})}),t&&e.jsxs(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-white rounded-2xl p-6 shadow-lg border border-gray-100 mb-6",children:[e.jsxs("h2",{className:"text-lg font-bold text-gray-900 mb-4 flex items-center gap-2",children:[e.jsx($,{className:"text-gray-500",size:20}),"Today's Prayer Times"]}),e.jsx("div",{className:"grid grid-cols-3 md:grid-cols-5 gap-4",children:[{name:"Fajr",time:t.fajr,icon:"🌙"},{name:"Dhuhr",time:t.dhuhr,icon:"☀️"},{name:"Asr",time:t.asr,icon:"🌤️"},{name:"Maghrib",time:t.maghrib,icon:"🌅"},{name:"Isha",time:t.isha,icon:"🌙"}].map(a=>e.jsxs("div",{className:`${l.light} rounded-xl p-4 text-center`,children:[e.jsx("div",{className:"text-2xl mb-1",children:a.icon}),e.jsx("p",{className:"font-bold text-gray-900",children:a.name}),e.jsx("p",{className:`text-sm ${l.text}`,children:a.time})]},a.name))})]}),c&&e.jsxs(m.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{delay:.2},className:"bg-gradient-to-br from-amber-50 to-yellow-50 rounded-2xl p-6 border border-amber-100 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(S,{className:"text-amber-600",size:24}),e.jsx("h2",{className:"text-lg font-bold text-gray-900",children:"Quran Verse of the Day"})]}),e.jsxs("div",{className:"text-center py-4",children:[e.jsx("p",{className:"text-3xl md:text-4xl text-gray-800 mb-4 leading-relaxed",style:{fontFamily:"Amiri, serif",direction:"rtl"},children:c.arabic}),e.jsxs("p",{className:"text-lg text-gray-700 italic mb-3",children:['"',c.translation,'"']}),e.jsxs("p",{className:"text-sm text-amber-700 font-medium",children:["— ",c.reference]})]})]}),d&&e.jsxs(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-white rounded-2xl p-6 shadow-lg border border-gray-100 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(R,{className:"text-emerald-600",size:24}),e.jsx("h2",{className:"text-lg font-bold text-gray-900",children:"Hadith of the Day"}),e.jsx("span",{className:"ml-auto bg-emerald-100 text-emerald-700 text-xs px-2 py-1 rounded-full",children:d.topic})]}),e.jsxs("blockquote",{className:"border-l-4 border-emerald-500 pl-4 py-2",children:[e.jsxs("p",{className:"text-gray-700 text-lg italic mb-3",children:['"',d.text,'"']}),e.jsxs("footer",{className:"text-sm text-gray-500",children:["— Prophet Muhammad ﷺ (",d.narrator,")"]})]})]}),e.jsxs(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"bg-white rounded-2xl p-6 shadow-lg border border-gray-100",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(V,{className:"text-rose-500",size:24}),e.jsx("h2",{className:"text-lg font-bold text-gray-900",children:"Daily Duas"})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:`${l.light} rounded-xl p-4`,children:[e.jsx("p",{className:"font-medium text-gray-900 mb-1",children:"Morning Dua"}),e.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"When waking up"}),e.jsx("p",{className:"text-right text-lg",style:{fontFamily:"Amiri, serif"},children:"الحَمْدُ لِلَّهِ الَّذِي أَحْيَانَا بَعْدَ مَا أَمَاتَنَا"})]}),e.jsxs("div",{className:"bg-rose-50 rounded-xl p-4",children:[e.jsx("p",{className:"font-medium text-gray-900 mb-1",children:"Before Eating"}),e.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Start your meal with"}),e.jsx("p",{className:"text-right text-lg",style:{fontFamily:"Amiri, serif"},children:"بِسْمِ اللَّهِ وَعَلَى بَرَكَةِ اللَّهِ"})]}),e.jsxs("div",{className:"bg-sky-50 rounded-xl p-4",children:[e.jsx("p",{className:"font-medium text-gray-900 mb-1",children:"Before Sleeping"}),e.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Night prayer"}),e.jsx("p",{className:"text-right text-lg",style:{fontFamily:"Amiri, serif"},children:"بِاسْمِكَ اللَّهُمَّ أَمُوتُ وَأَحْيَا"})]}),e.jsxs("div",{className:"bg-amber-50 rounded-xl p-4",children:[e.jsx("p",{className:"font-medium text-gray-900 mb-1",children:"For Parents"}),e.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Pray for them"}),e.jsx("p",{className:"text-right text-lg",style:{fontFamily:"Amiri, serif"},children:"رَبِّ ارْحَمْهُمَا كَمَا رَبَّيَانِي صَغِيرًا"})]})]})]})]})};export{ae as default};

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.