1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ecqNV_fk.js","./RyvkHnHM.js","./DL0Xpu2v.js","./CEIykhXW.js","./DLNpcykF.js","./CCIbnOLw.js","./FC47SwYL.js","./DrPVW_0W.js","./DY3Yz_TZ.js","./DeLRz3wp.js","./Bdv2xjB9.js","./Dv7KG4Yv.js","./DnR8d07b.js","./FXANGjSJ.js","./1fs1yw9t.js","./FreeBookBadge.CetYG1Ek.css","./Dh-bUwi5.js","./aNgHloq4.js","./CyQlvIzm.js","./D6TUFIVa.js","./VKQS5tGV.js","./Dlx19IXY.js","./DhbthPdZ.js","./DkGN16LQ.js","./RegistrationForm.DEzsd8BT.css","./ZNLnhvWg.js","./FlowTest.s8bVvPU_.css","./CGpusghW.js","./DmyPMF8k.js","./okUcf8VI.js","./w3YMHgno.js","./BuFaxK6E.js","./Drawer.Bmo6NqTA.css","./DU95hI5u.js","./CTDcLk3P.js","./CNNG57e1.js","./Dwb3cLGQ.js","./CsFO-zxd.js","./BJgICJEx.js","./D1HIOnob.js","./StylesLoader.-cvR0kyN.css"])))=>i.map(i=>d[i]); 2import{d as Ce,s as Ae,x as Pe,ar as Ee,B as O,K as I,N as Se,c as f,af as T,y as Re,aj as $e,J as ze,f as m,o as r,m as l,h as i,g as a,k as g,i as e,q as h,p as y,R as Be,F as j,l as Ne,H as Ve,a3 as D,A as L,S as M,_ as x}from"#entry";import{d as Fe,a as Oe,b as Ie,c as Te}from"./DYN2e7QJ.js";import{_ as je}from"./B3Y6HB5n.js";import{f as De}from"./DY3Yz_TZ.js";import{u as Le,a as Me}from"./CCIbnOLw.js";import{u as Ge}from"./ZNLnhvWg.js";import{u as Ue}from"./DL0Xpu2v.js";import{a as qe,b as He,u as Je}from"./FXANGjSJ.js";import{u as Ke}from"./B2JaTb6A.js";import{u as G}from"./DrcgtIqi.js";import{u as We}from"./1fs1yw9t.js";import"./Dv7KG4Yv.js";import"./Bdv2xjB9.js";import"./VKQS5tGV.js";import"./FC47SwYL.js";import"./DrPVW_0W.js";import"./DLNpcykF.js";const Qe=h(()=>x(()=>import("./ecqNV_fk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url).then(n=>n.default||n)),Xe=h(()=>x(()=>import("./DeLRz3wp.js"),__vite__mapDeps([9,10,3,11,12,13,8,14,5,6,7,15]),import.meta.url).then(n=>n.default||n)),Ye=h(()=>x(()=>import("./Dh-bUwi5.js"),__vite__mapDeps([16,10,3,12,13,8,14,5,6,7,17,18,19,20,21,22,23,24,25,26]),import.meta.url).then(n=>n.default||n)),Ze=h(()=>x(()=>import("./CGpusghW.js"),__vite__mapDeps([27,17,18,3,19,20,21,10,22,12,5,6,7,8,13,14,23,24,28,2,4,29,30,31,32,33,34,35,36,37,38]),import.meta.url).then(n=>n.default||n)),et=h(()=>x(()=>import("./D1HIOnob.js"),__vite__mapDeps([39,3,40]),import.meta.url).then(n=>n.default||n)),tt={class:"container py-8 max-md:py-6"},ot={class:"page-content book-chapter flex flex-col gap-8 max-md:gap-6 max-w-[800px] m-auto"},at={key:0,class:"min-h-[60vh]","aria-hidden":"true"},nt={class:"space-y-3"},rt={key:1},st={class:"flex justify-between items-center mb-8"},it={class:"text-2xl font-bold max-md:text-lg"},lt={key:0,class:"flex items-center gap-2"},ct={key:3,class:"flex justify-center"},ut={class:"flex gap-6 w-full max-w-lg max-md:gap-3 justify-center items-center"},zt=Ce({__name:"chapter-[order]",async setup(n){let d,v;const{slug:w,order:U}=Ae().params,{funnelAvailable:q,secondStepAvailable:H,offerHash:J}=Le(),{isMysteryBoxActive:K}=Ge(),{canShowPaywall:S}=Ue(),{pendingGift:R,claimGift:W,showAddedNotification:Q}=qe(),{setReadingContext:X}=He(),{sendEvent:Y}=Pe(),{trackEventUnique:Z}=Ee(),{enabled:C,pending:A}=Ke(),{getPromptChapterOrder:ee,canShowPopup:te,openPopup:oe}=Me(),p=O(parseInt(U));isNaN(p.value)&&(p.value=1),p.value<2&&([d,v]=I(()=>M(`/read-books/${w}`)),await d,v());const[ae,ne]=([d,v]=I(()=>Promise.all([G(`/novels/${w}/chapters/${p.value}`),G(`/novels/${w}/chapters/${p.value}/next`)])),d=await d,v(),d),{data:$,error:re,status:dt,refresh:se}=ae,{data:ie,error:pt,status:_t}=ne;if(re.value?.statusCode===404)throw Se({statusCode:404,statusMessage:"Page Not Found"});const s=$.value?.data.book,t=f(()=>$.value?.data.chapter);T(()=>{t.value&&X({bookId:s.id,chapterId:t.value.id,chapterNumber:t.value.order})});const _=ie.value?.data,z=_[0]??null,le=ee(De([t.value,..._])),k=f(()=>!S.value&&(q(t.value.is_free??!0,z?.is_free??!0)||K.value)),B=O(!1),ce=f(()=>S.value?!1:C.value?B.value:A.value?!1:H(t.value.is_free??!0)),P=f(()=>t.value.order-1),c=f(()=>_[0]?_[0].order:null),{setSkipContext:ue}=We(),{markIntent:de,initAntiSkip:pe,isVisible:N}=Je(),V=(b,o,E)=>{Y(E,{item_name:"button",placement:"reader_bottom"}),de(b,o)};T(()=>ue(s,t.value,_)),pe();const _e=()=>{se()},me=async()=>
2{W(),c.value&&(await M(`/read-books/${s.slug}/chapter-${c.value}`),window.scrollTo(0,0)),Q()};return Re(()=>{Z(`read_chapter_${p.value}`,J).catch(b=>console.error(b))}),Fe({layout:$e.Funnel}),(b,o)=>{const E=Qe,fe=Oe,he=Be,xe=je,ve=Ie,ke=Xe,be=Ye,ge=Ze,ye=Te,F=ze("router-link"),we=et;return r(),m(j,null,[e(ce)?(r(),l(E,{key:0,class:"mb-8"})):i("",!0),a("div",tt,[a("div",ot,[g(he,null,{default:y(()=>[e(C)?(r(),l(fe,{key:0,book:e(s),"initial-chapter":e(t),"next-chapters":e(_),"render-summary-header":!0,onPaywallVisibility:o[0]||(o[0]=u=>B.value=u)},null,8,["book","initial-chapter","next-chapters"])):i("",!0)]),_:1}),e(A)?(r(),m("div",at,[o[3]||(o[3]=a("div",{class:"h-7 w-1/2 rounded bg-gray-100 dark:bg-zinc-800 mb-8"},null,-1)),a("div",nt,[(r(),m(j,null,Ne(10,u=>a("div",{key:u,class:"h-4 rounded bg-gray-100 dark:bg-zinc-800"})),64))])])):i("",!0),!e(C)&&!e(A)?(r(),m("div",rt,[a("div",st,[a("h1",it,Ve(e(t).title),1),e(s).age_restriction?(r(),m("p",lt,[...o[4]||(o[4]=[a("span",{class:"text-gray-600"},"Age",-1),a("span",{class:"text-2xl max-md:text-lg font-semibold"},"18+",-1)])])):i("",!0)]),g(ve,{"is-armed":e(t).order===e(le)&&!e(k)&&e(te),class:"mb-8",onReached:e(oe)},{default:y(()=>[e(t)?(r(),l(xe,{key:0,chapter:e(t),"book-id":e(s).id},null,8,["chapter","book-id"])):i("",!0)]),_:1},8,["is-armed","onReached"]),e(R)&&!e(N)&&(e(t).is_free||e(t).is_purchased)?(r(),l(ke,{key:e(t).id,"gifted-book":e(R).book,class:"mb-8",onClaim:me},null,8,["gifted-book"])):i("",!0),e(k)&&!e(N)?(r(),l(be,{key:1,chapter:e(t),"next-chapter":e(z),"book-id":e(s).id},null,8,["chapter","next-chapter","book-id"])):!e(t).is_free&&!e(t).is_purchased?(r(),l(ge,{key:2,"book-id":e(s).id,"chapter-id":e(t).id,"chapter-number":e(t).order,coins:e(t).coins,onChapterUnlocked:_e},null,8,["book-id","chapter-id","chapter-number","coins"])):i("",!0),g(ye,{"book-id":e(s).id,chapter:e(t),"is-funnel-visible":e(k)},null,8,["book-id","chapter","is-funnel-visible"]),e(k)?i("",!0):(r(),m("div",ct,[a("div",ut,[e(t).order>=2?(r(),l(F,{key:0,to:e(P)<2?`/read-books/${e(s).slug}`:`/read-books/${e(s).slug}/chapter-${e(P)}`,onClick:o[1]||(o[1]=u=>V(e(P),u,e(L).PreviousChapterClicked)),class:D([e(c)?"lg:flex-1":"","flex items-center py-3 px-8 max-md:px-4 justify-center text-xl max-md:text-xl border-2 border-primary text-center rounded-xl text-violet-800 dark:text-violet-500 dark:hover:text-violet-600"])},{default:y(()=>[o[5]||(o[5]=a("svg",{class:"w-5 h-5 lg:mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)),a("span",{class:D(e(c)?"max-md:hidden":"")},"Previous Chapter",2)]),_:1},8,["to","class"])):i("",!0),e(c)?(r(),l(F,{key:1,to:`/read-books/${e(s).slug}/chapter-${e(c)}`,onClick:o[2]||(o[2]=u=>V(e(c),u,e(L).NextChapterClicked)),class:"flex flex-1 items-center py-3 px-8 max-md:px-4 bg-fm-gradient hover:bg-fm-gradient-active text-center justify-center rounded-xl !text-white text-xl max-md:text-xl"},{default:y(()=>[...o[6]||(o[6]=[a("span",null,"Next Chapter",-1),a("svg",{class:"w-5 h-5 ml-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])]),_:1},8,["to"])):i("",!0)])]))])):i("",!0)])]),g(we)],64)}}});export{zt 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.