1import{ah as e,a3 as s}from"./vendor-misc-DBewy47e.js";import{gP as t,ck as r,ev as a,j as i,ek as o,ew as n,aq as l,J as d,eh as c,e6 as x,gg as m,i as p}from"./index-BgmH_Ksq.js";import{r as h}from"./readingCheckins-CsRHPWXP.js";import{trackLiteEvent as u}from"./liteAnalytics-Tp3MCfhh.js";import{C as j}from"./ChapterQuizSheet-De1wlWSQ.js";import{B as b}from"./BibleChapterReaderSheet-DAZ_R-sS.js";import{e as g,L as f,t as w}from"./vendor-icons-j3vl9R2U.js";import"./vendor-supabase-DCTo4nxi.js";import"./chinese-language-CLYDn-o3.js";import"./vendor-i18n-DMY_791a.js";import"./inlineMarkdown-DStxsrWI.js";import"./textToSpeech-CsfTiRRl.js";import"./googleTTS-DFYuf3qt.js";import"./ContentRating-ThB0p36g.js";import"./contentRatings-D7TI0xDW.js";import"./chapterQuiz-CdJ89e90.js";import"./chapterQuizCore-BDm58LAE.js";import"./useVerseMemorize-BmGFNtPz.js";import"./AnnotationNoteSheet-DpVnGlHp.js";import"./traditional-chinese-2pkNGbDt.js";import"./copyWithToast-hiZE9Y0Q.js";import"./annotationCard-BtM6mNIE.js";import"./clipboard-CvMPH2Rq.js";import"./fillTemplate-D-zmJcmb.js";import"./VersesMissingNotice-WBOfiegy.js";import"./markdownParser-C7-Biv6t.js";import"./ChapterQuizEntry-BrhzRK89.js";const N=({user:N,onBack:v})=>{const E=t(),[k,y]=e.useState(()=>r()),[B,C]=e.useState(()=>{const e="undefined"==typeof window?void 0:a(window.location.pathname,window.location.search).firstBookDay,s=Number(e);return Number.isInteger(s)&&s>=1&&s<=i?s:o()??i}),[F,D]=e.useState(!1),[S,$]=e.useState(!1),M=e.useMemo(()=>new Set(k),[k]),A=p[B-1],z=M.has(B),T=e.useMemo(()=>n(`约翰ç¦é³ 1-${i}ç« `),[]),I=e.useMemo(()=>new Set(k.map(e=>l(d,e))),[k]);e.useEffect(()=>(window.dispatchEvent(new CustomEvent("ai-chat:page-resource",{detail:{resource:`${E("éªä½ 读第ä¸å·")} · ${E("约翰ç¦é³")} ${E("第")} ${B} ${E("ç« ")}`,key:`firstBook:john:${B}`}})),()=>{window.dispatchEvent(new CustomEvent("ai-chat:page-resource",{detail:null}))}),[B,E]);const Q=e.useCallback(e=>{C(e),c("firstBook",{firstBookDay:String(e)},{replace:!0})},[]),R=e.useCallback((e,s)=>{s?x(e):m(e),y(r()),s&&(u("first_book_day_read","/firstBook",{eventData:{day:e}}),h(null==N?void 0:N.id,"chapter").catch(()=>{}))},[null==N?void 0:N.id]);return s.jsxs("div",{className:"min-h-screen bg-[#F5F1E8] pb-24",children:[s.jsx("header",{className:"sticky top-0 z-20 bg-[#F5F1E8]/95 backdrop-blur border-b border-[#E6E2D6]",children:s.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-3 flex items-center gap-3",children:[s.jsx("button",{onClick:v,"aria-label":E("è¿å"),className:"w-9 h-9 -ml-1.5 rounded-full flex items-center justify-center text-[#6B6557] hover:bg-[#EDE8DC] transition-colors",children:s.jsx(g,{className:"w-5 h-5"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h1",{className:"text-[17px] font-semibold text-[#2D2A22] leading-tight",children:E("éªä½ 读第ä¸å·")}),s.jsx("p",{className:"text-[13px] text-[#6B6557]",children:E("约翰ç¦é³ · ä¸å¨ · æ¯å¤©ä¸ç« ")})]})]})}),s.jsxs("main",{className:"max-w-2xl mx-auto px-4 pt-4 flex flex-col gap-3",children:[s.jsxs("section",{className:"rounded-2xl bg-[#FFFCF5] border border-[#E6E2D6] px-4 py-4 shadow-sm flex flex-col gap-3",children:[s.jsxs("div",{className:"text-[13px] text-[#64748B]",children:[E("第")," ",B," ",E("天 · å
±")," ",i," ",E("天")]}),s.jsx("h2",{className:"text-[17px] font-medium text-[#2D2A22] leading-relaxed",children:E(`æ¿èµ·ä½ çå£ç»ï¼ç¿»å°çº¦ç¿°ç¦é³ç¬¬ ${B} ç« ã`)}),s.jsx("p",{className:"text-[14px] text-[#4A4842] leading-[1.85]",children:E(A.intro)}),s.jsx("button",{onClick:()=>R(B,!z),className:"w-full rounded-xl px-4 py-3 text-[15px] font-medium transition-colors border "+(z?"bg-[#F0EDE3] border-[#E6E2D6] text-[#6B6557]":"bg-white border-[#E6E2D6] text-[#2D2A22] hover:border-[#B85138]/60"),children:z?s.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[s.jsx(f,{className:"w-4 h-4"}),E(`å·²æ 记第 ${B} ç« Â· ç¹ä¸ä¸å¯åæ¶`)]}):E(`å¨å£ç»ä¸è¯»å®äº · æ 记第 ${B} ç« `)}),s.jsx("button",{onClick:()=>D(!0),className:"w-full rounded-xl border border-[#E6E2D6] bg-white px-4 py-2.5 text-[14px] text-[#2D2A22] hover:border-[#B85138]/60 transition-colors",children:E("å 5 éå°é¢ï¼æ
1è¿ä¸ç« è®°ç¢")}),s.jsxs("p",{className:"text-[13px] text-[#64748B] leading-relaxed",children:[E("è¥æè¾¹æ²¡æå£ç»ï¼ä¹å¯ä»¥"),s.jsx("button",{onClick:()=>$(!0),className:"underline underline-offset-2 hover:text-[#B85138] transition-colors mx-0.5",children:E("å¨ç«å
读è¿ä¸ç« ")}),E("ã")]})]}),s.jsxs("section",{className:"rounded-2xl bg-[#FFFCF5] border border-[#E6E2D6] px-4 py-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between mb-2.5",children:[s.jsx("span",{className:"text-[13px] text-[#64748B]",children:E("è¿ä¸å¨")}),s.jsxs("span",{className:"text-[13px] text-[#6B6557] tabular-nums",children:[E("读è¿")," ",k.length," / ",i," ",E("ç« ")]})]}),s.jsx("div",{className:"grid grid-cols-7 gap-1.5",children:p.map(e=>{const t=M.has(e.day),r=e.day===B;return s.jsx("button",{onClick:()=>Q(e.day),"aria-label":E(`第 ${e.day} ç« `),"aria-current":r?"true":void 0,className:`aspect-square rounded-lg text-[13px] tabular-nums flex items-center justify-center transition-colors border ${t?"bg-[#B85138] border-[#B85138] text-white":"bg-white border-[#E6E2D6] text-[#6B6557] hover:border-[#B85138]/50"} ${r?"ring-2 ring-[#B85138]/35 ring-offset-1 ring-offset-[#FFFCF5]":""}`,children:e.day},e.day)})})]}),s.jsxs("p",{className:"px-1 text-[13px] text-[#6B6557] leading-relaxed flex items-start gap-1.5",children:[s.jsx(w,{className:"w-3.5 h-3.5 mt-0.5 flex-none"}),s.jsx("span",{children:E("éäºå 天没读ä¹ä¸è¦ç´§ï¼åæ¥æ¥çå¾ä¸èµ°å°±æ¯äºââä¸é¢çæ ¼ååªè®°ä½ 读è¿åªå ç« ã")})]})]}),s.jsx(j,{open:F,onClose:()=>D(!1),book:d,chapter:B,userId:(null==N?void 0:N.id)??null,initialMode:"lite"}),T&&s.jsx(b,{open:S,onClose:()=>$(!1),plan:T,initialChapterIndex:B-1,readSet:I,onToggleRead:(e,s,t)=>R(s,t),userId:(null==N?void 0:N.id)??null})]})};export{N as FirstBookZen};
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.