PageSourceSearch

https://cycomi.com/_next/static/chunks/3515-9b7ae4410a3fb03a.js

js cycomi.com collected 2026-09-24 20:39:56 UTC 56,371 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3515],{43969:(e,t,l)=>{l.d(t,{z:()=>s});var n=l(14232),i=l(1032);let s=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,n.useRef)(0),l=(0,n.useRef)(0),{isUaIOS:s}=(0,i.W)();(0,n.useEffect)(()=>{var n;if(!s||!e)return;let i=()=>{var e,n,s,r;let a=null!=(s=null!=(n=document.scrollingElement)?n:document.documentElement)?s:document.body;if((window.scrollY||a.scrollTop||0)>8)return;let o=null!=(r=null==(e=window.visualViewport)?void 0:e.height)?r:window.innerHeight;a.scrollHeight>o&&(a.scrollTo(0,1),(window.scrollY||a.scrollTop||0)>=1)||l.current++<60&&(t.current=requestAnimationFrame(i))},r=()=>{var e,n;let s=null!=(n=null!=(e=document.scrollingElement)?e:document.documentElement)?n:document.body;(window.scrollY||s.scrollTop||0)>8||(l.current=0,cancelAnimationFrame(t.current),t.current=requestAnimationFrame(i))};return t.current=requestAnimationFrame(i),null==(n=window.visualViewport)||n.addEventListener("resize",r),()=>{var e;cancelAnimationFrame(t.current),null==(e=window.visualViewport)||e.removeEventListener("resize",r)}},[s,e])}},52046:(e,t,l)=>{l.d(t,{G:()=>u,U:()=>o});var n=l(37876),i=l(56502),s=l(14232),r=l(99674),a=l(8642);let o=e=>{let{component:t=r.A,children:l,loadingNode:o=(0,n.jsx)(a.H,{height:"100%"}),keepMounted:d,options:c,...u}=e,m=(0,s.useRef)(null),{isIntersecting:h}
1=(0,i.v)(m,c),[x,p]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{h?p(!0):d||p(!1)},[h,d]),(0,n.jsxs)(t,{...u,children:[(0,n.jsx)(r.A,{ref:m}),x?l:o]})};var d=l(36287),c=l(2066);let u=e=>{let{children:t,loadingNode:l=(0,n.jsx)(a.H,{py:c.K.S}),onIntercept:o,end:u,endNode:m=null,keepMounted:h=!1,options:x,...p}=e,j=(0,s.useRef)(null),{isIntersecting:S}=(0,i.v)(j,x),[g,v]=(0,d.C)(h);return(0,s.useEffect)(()=>{S&&(v(),u||null==o||o())},[S,o,v,u]),(0,n.jsxs)(r.A,{...p,children:[g&&t,(0,n.jsx)(r.A,{ref:j}),u?m:l]})}},58936:(e,t,l)=>{l.d(t,{v:()=>x});var n=l(37876),i=l(2066),s=l(65850),r=l(75193),a=l(18847),o=l.n(a),d=l(14232);let c=(0,d.memo)(e=>{let{isFirstBannerAndOddItems:t,sizeList:l,src:i,isTitleTop:s,...a}=e,o=t?s?"middle":"large":s?"small":"middle",d=l[o]||l.middle,c=i[o];return c?(0,n.jsx)(r.l,{display:{xs:"none",sm:"block"},src:c,dimension:d,...a}):null}),u=(0,d.memo)(e=>{let{isFirstBannerAndOddItems:t,sizeList:l,src:i,...s}=e,a=t?"middle":"small",o=l[a]||l.middle,d=i[a];return d?(0,n.jsx)(r.l,{display:{xs:"block",sm:"none"},src:d,dimension:o,...s}):null}),m=o()(()=>Promise.all([l.e(1328),l.e(8581),l.e(4632)]).then(l.bind(l,64632)).then(e=>e.BannerListFixCarousel),{loadableGenerated:{webpack:()=>[64632]},ssr:!1}),h={S:3,M:6,L:12},x=e=>{let{gaItemListName:t,items:l,viewPage:a,isDesignFixed:o,isConveyor:d=!1,spacing:x=i.K.S,sizeList:p}=e,j="titleTop"===a;return d&&o?(0,n.jsx)(m,{banners:l,gaItemListName:t}):(0,n.jsx)(s.A,{container:!0,direction:"row",justifyContent:"flex-start",spacing:x,children:l.map((e,i)=>{let{src:a,alt:d,href:m,id:x}=e,S=0===i&&l.length%2,g=S?h.L:h.M,v=p.fix||p.middle;return o?a.fix&&(0,n.jsx)(s.A,{size:{xs:h.M,sm:h.S},children:(0,n.jsx)(r.l,{dimension:v,src:a.fix,alt:d,href:m,id:x,gaItemListName:t})},x):(0,n.jsxs)(s.A,{size:g,children:[(0,n.jsx)(u,{src:a,alt:d,href:m,isFirstBannerAndOddItems:!!S,sizeList:p,id:x,gaItemListName:t}),(0,n.jsx)(c,{src:a,alt:d,href:m,isFirstBannerAndOddItems:!!S,sizeList:p,isTitleTop:j,id:x,gaItemListName:t})]},x)})})}},63515:(e,t,l)=>{l.r(t),l.d(t,{TitleContents:()=>lQ});var n=l(37876),i=l(14232),s=l(2066),r=l(99674),a=l(71538),o=l(22114),d=l(52046),c=l(97740),u=l(68351),m=l(9227),h=l(68327);let x=e=>{let{informations:t}=e;return t?0===t.length?null:(0,n.jsxs)(c.wn,{disableMargin:!0,sx:{mb:s.K.S},children:[(0,n.jsx)(c.CD,{size:"h4",center:"none",disableMargin:!0,disableRootPx:!0,children:"お知らせ"}),(0,n.jsx)(c.RG,{children:t.map(e=>(0,n.jsx)(r.A,{px:s.K.S,sx:{overflowWrap:"break-word",whiteSpace:"pre-line",mt:s.K.SS,fontSize:u.Z.M},children:e.content},e.content))})]}):(0,n.jsxs)(m.A,{mb:s.K.S,children:[(0,n.jsx)(h.A,{width:"90%"}),(0,n.jsx)(h.A,{width:"100%",sx:{mt:s.K.SS}}),(0,n.jsx)(h.A,{width:"40%"})]})};x.displayName="AsideTitleNotice";var p=l(53476),j=l(65850);let S={src:"/_next/static/media/sample_roll_release_info.ad9b3176.png"};var g=l(54921),v=l(18243),b=l(6390),A=l(36701),f=l(83921),C=l(99284),y=l(11951),w=l(94878);let k={thumb:"singleBookReleaseInfoThumb"},{SelectContent:I}=p.W_,P=e=>{var t,l;let{contentType:i,item:a}=e,{title:o}=(0,A.l)();return(0,n.jsx)(g.Rd,{eventName:I,contentType:i,id:null!=(t=null==a?void 0:a.id)?t:0,imgUrl:null!=(l=null==a?void 0:a.image)?l:"",children:(0,n.jsx)(r.A,{children:(0,n.jsxs)(j.A,{flexWrap:"wrap",container:!0,children:[(0,n.jsx)(j.A,{children:(0,n.jsx)(r.A,{component:v.A,href:a?o(a.titleId,C.L.SingleBook).path:void 0,display:"block",width:{xs:40,md:60},height:{xs:59,md:86},overflow:"hidden",sx:{["&:hover .".concat(k.thumb)]:{transform:"scale(".concat(f.bm,")")}},children:(0,n.jsx)(r.A,{position:"relative",width:"100%",height:"100%",children:a?(0,n.jsx)(w.Xq,{className:k.thumb,src:a.image||S.src,fill:!0,style:{objectFit:"contain"},alt:a.name}):(0,n.jsx)(h.A,{variant:"rectangular",width:"100%",height:"100%"})})})}),(0,n.jsx)(j.A,{flex:1,children:(0,n.jsxs)(y.A,{sx:{borderRadius:0,boxShadow:"none",px:s.K.SP.S},children:[(0,n.jsx)(b.A,{component:"h3",fontSize:u.Z.M,sx:{color:e=>e.palette.headline.main},lineHeight:1.5,lineClamp:1,position:"relative",width:"100%",bold:!0,children:a?"最新の巻読みが発売されました":(0,n.jsx)(h.A,{width:170})}),(0,n.jsx)(m.A,{mt:s.K.SS,spacing:s.K.SS,direction:"row",children:(0,n.jsx)(b.A,{fontSize:u.Z.M,lineHeight:1.5,lineClamp:1,bold:!0,children:a?"".concat(a.name).concat(a.stories):(0,n.jsx)(h.A,{width:150})})})]})})]})})})},{SideNewsAreaBlocksSingleBookReleaseInfo:L}=p.Sx,N=e=>{let{singleBookReleaseInformations:t,hidePc:l,hideTab:i,hideSp:r}=e;return t?0===t.length?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(c.wn,{disableMargin:!0,sx:{mb:s.K.S,display:{xs:r?"none":"flex",sm:i?"none":"flex",md:l?"none":"flex"}},children:[(0,n.jsx)(c.CD,{center:"none",size:"h4",titleAlign:"flex-end",disableMargin:!0,disableRootPx:!0,children:"巻読み発売情報"}),(0,n.jsx)(c.RG,{sx:{px:s.K.PC.S,pt:s.K.SS},showOverflow:!0,children:(0,n.jsx)(j.A,{container:!0,flexDirection:"column",spacing:s.K.SS,children:t.map(e=>(0,n.jsx)(j.A,{size:"grow",children:(0,n.jsx)(P,{item:e,contentType:L})},e.id))})})]}),(0,n.jsx)(a.A,{sx:{mb:s.K.SP.S,display:{xs:r?"none":"block",sm:i?"none":"block",md:l?"none":"block"}}})]}):(0,n.jsxs)(m.A,{mb:s.K.S,display:{xs:r?"none":"flex",sm:i?"none":"flex",md:l?"none":"flex"},children:[(0,n.jsx)(h.A,{width:200}),(0,n.jsx)(P,{})]})};N.displayName="SingleBookReleaseInfo";let M={src:"/_next/static/media/thumb.86335e52.png"};var K=l(41553);let B=e=>{var t,l,i,a;let{item:o}=e,{title:d}=(0,A.l)();return(0,n.jsx)(r.A,{border:"1px solid",borderColor:e=>e.palette.mainGrey.main,mt:s.K.SS,sx:{"&:first-of-type":{mt:0}},children:(0,n.jsx)(g.JB,{eventName:p.W_.SelectContent,contentType:p.Sx.SideNewsAreaBlocksOtherPeopleReadRecommend,id:null!=(t=null==o?void 0:o.titleId)?t:0,imgUrl:null!=(l=null==o?void 0:o.image)?l:"",children:(0,n.jsxs)(v.A,{href:o?d(o.titleId).path:void 0,sx:{textDecoration:"none","&:hover .largeImage":{transform:"scale(".concat(f.bm,")")}},children:[(0,n.jsx)(r.A,{overflow:"hidden",children:(0,n.jsx)(r.A,{position:"relative",children:o?(0,n.jsx)(w.Xq,{responsive:!0,className:"largeImage",src:o.image||M.src,sizes:"435px",dimension:K.Y_.TitleRecommendBlockLarge,alt:o.titleName}):(0,n.jsx)(h.A,{variant:"rectangular",width:"100%",sx:{pt:"58.4%"}})})}
1),(0,n.jsxs)(y.A,{sx:{p:s.K.S,borderRadius:0,boxShadow:"none"},children:[(0,n.jsx)(b.A,{component:"h3",fontSize:u.Z.M,color:"headline.main",lineHeight:1.5,lineClamp:1,bold:!0,mb:s.K.SS,children:null!=(i=null==o?void 0:o.titleName)?i:(0,n.jsx)(h.A,{width:140})}),(0,n.jsx)(b.A,{fontSize:u.Z.M,lineHeight:1.5,lineClamp:2,color:"headline.light",children:null!=(a=null==o?void 0:o.shortBody)?a:(0,n.jsx)(h.A,{width:120})})]})]})})})},T=e=>{let{recommend:t}=e;return t?(0,n.jsx)(B,{item:t}):(0,n.jsx)(B,{})};T.displayName="SideNewsLarge";let R={src:"/_next/static/media/sample_middle.e4f39c43.png"},z=e=>{var t,l,i,a;let{item:o}=e,{title:d}=(0,A.l)();return(0,n.jsx)(r.A,{sx:{mt:s.K.SS,"&:first-of-type":{mt:0}},children:(0,n.jsx)(g.JB,{eventName:p.W_.SelectContent,contentType:p.Sx.SideNewsAreaBlocksOtherPeopleReadRecommend,id:null!=(t=null==o?void 0:o.titleId)?t:0,imgUrl:null!=(l=null==o?void 0:o.image)?l:"",children:(0,n.jsxs)(v.A,{href:o?d(o.titleId).path:void 0,sx:{textDecoration:"none","&:hover img":{transform:"scale(".concat(f.bm,")")}},children:[(0,n.jsx)(r.A,{sx:{borderStyle:"solid",borderWidth:1,borderColor:e=>e.palette.mainGrey.main,overflow:"hidden"},children:(0,n.jsx)(r.A,{className:"middleImage",position:"relative",children:o?(0,n.jsx)(w.Xq,{responsive:!0,src:o.image||R.src,sizes:"1077px",dimension:K.Y_.TitleRecommendBlockWide,alt:o.titleName}):(0,n.jsx)(h.A,{variant:"rectangular",width:"100%",sx:{pt:"26.2%"}})})}),(0,n.jsxs)(y.A,{sx:{borderRadius:0,boxShadow:"none"},children:[(0,n.jsx)(b.A,{component:"h3",fontSize:u.Z.M,color:"headline.main",lineHeight:1.5,lineClamp:1,bold:!0,my:s.K.SS,children:null!=(i=null==o?void 0:o.titleName)?i:(0,n.jsx)(h.A,{width:150})}),(0,n.jsx)(b.A,{fontSize:u.Z.M,lineHeight:1.5,lineClamp:2,color:"headline.light",children:null!=(a=null==o?void 0:o.shortBody)?a:(0,n.jsx)(h.A,{width:100})})]})]})})})},E=e=>{let{recommend:t}=e;return t?(0,n.jsx)(z,{item:t}):(0,n.jsx)(z,{})};E.displayName="AsideBlocksBlockMiddle";let D={src:"/_next/static/media/sample_square.07fe4b2c.png"},_=e=>{var t,l,i,a;let{item:o}=e,{title:d}=(0,A.l)();return(0,n.jsx)(r.A,{border:"1px solid",borderColor:e=>e.palette.mainGrey.main,mt:s.K.SS,sx:{"&:first-of-type":{mt:0}},children:(0,n.jsx)(g.JB,{eventName:p.W_.SelectContent,contentType:p.Sx.SideNewsAreaBlocksOtherPeopleReadRecommend,id:null!=(t=null==o?void 0:o.titleId)?t:0,imgUrl:null!=(l=null==o?void 0:o.image)?l:"",children:(0,n.jsx)(v.A,{href:o?d(o.titleId).path:void 0,sx:{textDecoration:"none","&:hover img":{transform:"scale(".concat(f.bm,")")}},children:(0,n.jsxs)(j.A,{flexWrap:"wrap",container:!0,sx:{alignItems:"center"},children:[(0,n.jsx)(j.A,{overflow:"hidden",children:(0,n.jsx)(r.A,{className:"smallImage",position:"relative",width:{xs:94,md:141},height:{xs:94,md:141},children:o?(0,n.jsx)(w.Xq,{responsive:!0,src:o.image||D.src,fill:!0,style:{objectFit:"contain"},alt:o.titleName}):(0,n.jsx)(h.A,{variant:"rectangular",width:"100%",height:"100%"})})}),(0,n.jsx)(j.A,{flex:1,children:(0,n.jsxs)(y.A,{sx:{borderRadius:0,boxShadow:"none",p:s.K.S},children:[(0,n.jsx)(b.A,{component:"h3",fontSize:u.Z.M,color:"headline.main",lineHeight:1.5,lineClamp:2,mb:s.K.SS,bold:!0,children:null!=(i=null==o?void 0:o.titleName)?i:(0,n.jsx)(h.A,{width:100})}),(0,n.jsx)(b.A,{fontSize:u.Z.M,lineHeight:1.5,lineClamp:2,color:"headline.light",children:null!=(a=null==o?void 0:o.shortBody)?a:(0,n.jsx)(h.A,{width:80})})]})})]})})})})},W=e=>{let{recommend:t}=e;return t?(0,n.jsx)(_,{item:t}):(0,n.jsx)(_,{})};W.displayName="AsideBlocksBlockSmall";var F=l(60233),O=l(31455);let Z={useListData:e=>O.u.useData(["api/title/recommend/list",e],F.nC.Fetcher.read)},G=()=>(0,n.jsxs)(m.A,{mb:s.K.S,children:[(0,n.jsx)(W,{}),(0,n.jsx)(W,{}),(0,n.jsx)(T,{}),(0,n.jsx)(E,{})]}),H={large:T,medium:E,small:W},U=e=>{let{titleId:t}=e,{data:l,isLoading:i}=Z.useListData({titleId:t});return i||!l?(0,n.jsx)(G,{}):0===l.length?null:(0,n.jsxs)(c.wn,{disableMargin:!0,sx:{mb:s.K.S},children:[(0,n.jsx)(c.CD,{center:"none",size:"h5",titleAlign:"flex-end",disableMargin:!0,disablePx:!0,disableDivider:!0,disableRootPx:!0,sx:{overflowX:"hidden"},children:"この作品の読者はこれも読んでいます"}),(0,n.jsx)(c.RG,{children:(0,n.jsx)(m.A,{children:l.map(e=>{let t=H[e.imageSize];return(0,n.jsx)(t,{recommend:e},e.titleId)})})})]})};U.displayName="Recommends";var q=l(58936);let Y={large:void 0,middle:K.Y_.TitleBannerMiddle,small:K.Y_.TitleBannerSmall,fix:void 0},J=(0,i.memo)(e=>{let{banners:t}=e;return t?0===t.bannerList.length?null:(0,n.jsx)(c.wn,{disableMargin:!0,sx:{mb:s.K.S},children:(0,n.jsx)(c.RG,{children:(0,n.jsx)(q.v,{items:t.bannerList,spacing:s.K.S,sizeList:Y,viewPage:"titleTop",gaItemListName:p.Sx.SideNewsAreaBlocksBanner})})}):(0,n.jsx)(m.A,{mb:s.K.S,children:(0,n.jsx)(h.A,{variant:"rectangular",width:"100%",sx:{pt:"24.8%"}})})});J.displayName="SideBannerList";var $=l(13293),V=l(77224),X=l(54773),Q=l(18289),ee=l(66180);let et=(0,X.Ay)(Q.u4)(e=>{let{theme:{unstable_sx:t,palette:l}}=e;return t({width:"100%",maxWidth:{xs:112,md:143},minHeight:32,py:{xs:"6px",md:"8px"},px:{xs:"10px",md:"8px"},color:l.primary.main,fontSize:{xs:u.Z.SP.S,md:u.Z.PC.M},fontWeight:700,lineHeight:1,border:"1px solid",borderColor:l.mainGrey.main,borderRadius:32,backgroundColor:l.secondary.c
1ontrastText,transition:"all .2s",[".".concat(ee.A.startIcon)]:{mr:0,ml:0,"> svg":{fontSize:u.Z.L}},"&:hover":{borderColor:l.primary.main,backgroundColor:l.secondary.contrastText},"@media (hover: none)":{"&:hover":{color:l.secondary.main,borderColor:l.mainGrey.main}}})}),el=e=>{let{onClick:t,...l}=e;return(0,n.jsx)(et,{variant:"outlined",onClick:t,disableElevation:!0,startIcon:(0,n.jsx)(V.uI,{}),...l,children:"待てばタダ!とは"})};var en=l(27431),ei=l(92577),es=l(30566),er=l(5849);let ea=()=>{let{closeDialog:e}=(0,ei.s)(),t=(0,es.A)();return(0,n.jsxs)(m.A,{maxWidth:er.x2,spacing:s.K.S,alignItems:"center",children:[(0,n.jsx)(en._V,{responsive:!0,src:t.image.stayFree.body,alt:"待てばタダだと22時間ごとに1話無料で読める!"}),(0,n.jsx)(r.A,{width:128,children:(0,n.jsx)(Q.hj,{variant:"outlined",onClick:e,sx:{width:"100%",height:Q.Ji,p:{xs:0,md:0}},children:"OK"})})]})};var eo=l(54361),ed=l(50750);let ec=()=>(0,eo.$m)({eventName:p.W_.ViewContent,contentType:ed.nR.StayFreeNotes});var eu=l(16956);let em=(0,X.Ay)(V.t1)(e=>{let{theme:t}=e;return t.unstable_sx({fontSize:{xs:30,md:40}})}),eh=()=>(0,n.jsx)(j.A,{display:"flex",alignSelf:{xs:"flex-start",sm:"center"},size:"auto",children:(0,n.jsx)(em,{bgcolor:eu.A.palette.background.default})}),ex=e=>{let{sx:t,stayFreeProgressBar:l}=e,{openStayFreeDialog:a}=(()=>{let{openDialog:e}=(0,ei.s)();return{openStayFreeDialog:(0,i.useCallback)(()=>{e((0,n.jsx)(ea,{}),{hideCloseButton:!0,key:"stayFreeContent"},ec)},[e])}})();return(0,n.jsx)(r.A,{bgcolor:e=>e.palette.grey["200"],px:{xs:1.5,md:3},py:{xs:1,md:1.5},sx:t,children:(0,n.jsxs)(j.A,{flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",spacing:s.K.S,container:!0,children:[(0,n.jsxs)(j.A,{justifyContent:"flex-start",alignItems:"center",color:eu.A.palette.stayFree.main,direction:"row",spacing:s.K.SS,container:!0,size:"grow",sx:{p:.5},children:[(0,n.jsx)(eh,{}),l]}),(0,n.jsx)(j.A,{size:"auto",children:(0,n.jsx)(el,{onClick:a})})]})})};var ep=l(46587),ej=l(18847),eS=l.n(ej),eg=l(31771);let ev=e=>{let{lastChapter:t}=e;return(0,n.jsx)(eg.E,{bold:!0,fontSize:u.Z.M,marginBottom:s.K.SS,children:t})},eb=()=>(0,n.jsx)(eg.E,{bold:!0,fontSize:u.Z.M,marginBottom:s.K.SS,children:"最新話"}),eA=e=>{let{children:t,...l}=e;return(0,n.jsx)(r.A,{component:"span",...l,children:t})},ef=(0,i.memo)(e=>{let{loading:t,isRead:l,lastChapterName:i,lastChapterSubName:s}=e;return t?(0,n.jsx)(h.A,{variant:"text",width:"10em"}):(0,n.jsxs)(m.A,{direction:"row",component:"span",children:[(0,n.jsxs)(eA,{flexShrink:0,children:[l?"最後に読んだ話":"はじめから読む",":"]}),(0,n.jsxs)(eg.E,{component:"span",fontSize:"inherit",bold:!0,lineClamp:1,children:[(0,n.jsx)(eA,{children:i}),(0,n.jsx)(eA,{ml:"1em",children:s})]})]})});var eC=l(80744);let ey=e=>{let{data:t,renderItem:l,keyExtractor:i}=e;return(0,n.jsx)(j.A,{direction:"row",spacing:s.K.S,container:!0,children:t.map((e,t)=>(0,n.jsx)(j.A,{sx:[{display:3===t?"none":void 0},{display:{md:"block"}}],size:{xs:4,md:3},children:l({item:e,index:t})},i?i(e,t):t))})};var ew=l(86047);let ek=(0,i.memo)(()=>(0,n.jsx)(ey,{data:[void 0,void 0,void 0,void 0],renderItem:()=>(0,n.jsx)(ew.yr,{})}));var eI=l(96048),eP=l(94403),eL=l(25772),eN=l(56701),eM=l(22384);let eK=(0,i.memo)(e=>{let{chaptersWithStatus:t,openPurchaseModal:l,isPurchased:s,isRented:r,isSerialEnd:a}=e,o=(0,i.useCallback)((e,t)=>()=>{l(e,t,a).then()},[l,a]);return(0,n.jsx)(ey,{keyExtractor:e=>String(e.chapter.id),data:t,renderItem:e=>{var t,l;let{item:i}=e;return(0,n.jsx)(eM.Rd,{eventName:p.W_.SelectItem,items:[{itemId:i.chapter.id.toString(),itemListName:i.chapter.titleName,itemName:i.chapter.name}],children:(0,n.jsx)(ew.TX,{onClick:o(i.chapter,i.chapterStatus),chapter:i.chapter,isSerialEnd:a,isPurchased:null!=(t=s(i.chapter.id))&&t,isRented:null!=(l=r(i.chapter.id))&&l,chapterStatus:i.chapterStatus})})}})});eK.displayName="NewChaptersContainerItemMain";let eB=e=>{let{chaptersWithStatus:t,...l}=e;return t?(0,n.jsx)(eK,{chaptersWithStatus:t,...l}):(0,n.jsx)(ek,{})};var eT=l(39486),eR=l(68466);let ez=(0,i.memo)(e=>{let{titleId:t,isLoggedIn:l,isSerialEnd:i}=e,{data:s}=eI.L.useDataInfinite({titleId:t,sort:eP.x8.Desc},{limit:4}),{data:r}=eT.j.useData({titleId:t},l),{chaptersWithStatus:a}=(0,eR.A)(s,r),{isPurchased:o,isRented:d}=(0,eN.JL)(t),{openPurchaseChapter:c}=(0,eL.D)({titleId:t});return(0,n.jsx)(eB,{chaptersWithStatus:a,openPurchaseModal:c,isPurchased:o,isRented:d,isSerialEnd:i})});var eE=l(15051),eD=l(23579),e_=l(34684);let eW=e=>{let{total:t,variant:l,onClick:i}=e;return(0,n.jsxs)(Q.hj,{"data-table":eE.cM.Chapter,endIcon:(0,n.jsx)(V.tj,{}),sx:{mt:s.K.S,width:"100%"},onClick:i,variant:l,children:["全",t,"話"]})},eF=e=>{let{children:t,onClick:l}=e;return(0,n.jsx)(Q.hj,{endIcon:(0,n.jsx)(V.tj,{}),sx:{mt:s.K.S,width:"100%"},onClick:l,children:t})},eO=e=>{let{totalBuyOutCoin:t,isPremiumOnly:l}=e,i=!t||null===l;return(0,n.jsx)(m.A,{direction:"row",alignItems:"center",spacing:s.K.SS,children:i?"まとめ購入":(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e_.M,{width:20,height:20,children:l?(0,n.jsx)(eD.eL,{}):(0,n.jsx)(eD.pT,{})}
1),(0,n.jsxs)(r.A,{children:[t.toLocaleString(),"で全話購入可能です"]})]})})},eZ=e=>{let{onClick:t,totalBuyOutCoin:l,isPremiumOnly:i}=e;return(0,n.jsx)(eF,{onClick:t,children:(0,n.jsx)(eO,{totalBuyOutCoin:l,isPremiumOnly:i})})},eG=e=>{let{onClick:t}=e;return(0,n.jsx)(eF,{onClick:t,children:(0,n.jsx)(h.A,{width:100})})},eH=(0,i.memo)(e=>{let{disableTotalBuyOutCoin:t,openMultiplePurchase:l,titleId:i,totalCoin:s,isPremiumOnly:r}=e;return void 0===t?(0,n.jsx)(eG,{onClick:l}):(0,n.jsx)(eM.Rd,{eventName:p.W_.SelectContent,contentType:p.Sx.TitleTopMultiplePurchaseButton,contentId:i,children:(0,n.jsx)(eZ,{onClick:l,totalBuyOutCoin:t?null:s,isPremiumOnly:t?null:r})})});var eU=l(36287);let eq=eS()(()=>l.e(1693).then(l.bind(l,21693)),{loadableGenerated:{webpack:()=>[21693]},ssr:!1}),eY=e=>{let{total:t,showPurchase:l,multiplePurchase:a,titleId:o,chapterList:d,lastChapter:c,isLoggedIn:u,isSerialEnd:m}=e,{drawerOpen:h,openAllChapter:x,closeDrawer:j}=(e=>{let[t,l,n]=(0,eU.C)(!1),s=(0,i.useCallback)(()=>{l(),(0,eo.$m)({eventName:p.W_.SelectContent,contentType:p.Sx.TitleTopSeriesAllChapterButton,contentId:e})},[l,e]);return(0,i.useMemo)(()=>({drawerOpen:t,openAllChapter:s,closeDrawer:n}),[t,s,n])})(o);return(0,n.jsxs)(r.A,{children:[(0,n.jsx)(eb,{}),(0,n.jsx)(ep.f,{fallback:(0,n.jsx)(ek,{}),keepMounted:!0,children:(0,n.jsx)(ez,{isSerialEnd:m,titleId:o,isLoggedIn:u})}),(0,n.jsx)(eW,{onClick:x,variant:"contained",total:t}),(0,n.jsx)(r.A,{sx:{mt:s.K.S},children:(0,n.jsx)(ev,{lastChapter:c})}),(0,n.jsx)(ep.f,{fallback:(0,n.jsx)(eC.N,{}),keepMounted:!0,children:d}),a,(0,n.jsx)(eW,{onClick:x,variant:l?"outlined":"contained",total:t}),(0,n.jsx)(eq,{isSerialEnd:m,open:h,closeDrawer:j,titleId:o})]})},eJ=e=>{let{multiplePurchase:t,chapterList:l,lastChapter:i}=e;return(0,n.jsxs)(r.A,{children:[(0,n.jsx)(ev,{lastChapter:i}),(0,n.jsx)(d.U,{keepMounted:!0,loadingNode:(0,n.jsx)(eC.N,{}),children:l}),t]})},e$=e=>{let{isFullChapter:t,total:l,showPurchase:i,multiplePurchase:s,titleId:r,chapterList:a,lastChapter:o,isLoggedIn:d,isSerialEnd:c}=e;return(0,n.jsx)(t?eY:eJ,{showPurchase:i,total:l,isSerialEnd:c,isLoggedIn:d,multiplePurchase:s,lastChapter:o,chapterList:a,titleId:r})},eV=(0,i.memo)(e=>{let{titleId:t,isStayFree:l,total:i,isFullChapter:a,showPurchase:o,chapterList:d,lastChapter:c,multiplePurchase:u,stayFreeProgressBar:m,isSerialEnd:h,isLoggedIn:x=!1}=e;return(0,n.jsxs)(r.A,{pt:s.K.M,children:[l?(0,n.jsx)(r.A,{sx:{mb:s.K.S,p:0},children:(0,n.jsx)(ex,{stayFreeProgressBar:m})}):null,(0,n.jsx)(e$,{isSerialEnd:h,isLoggedIn:x,isFullChapter:a,showPurchase:o,total:i,multiplePurchase:u,lastChapter:c,chapterList:d,titleId:t})]})});var eX=l(76252),eQ=l(93052);let e0={xs:u.Z.SP.S,md:u.Z.PC.M},e1=e=>{let{color:t,label:l,progress:i,id:r}=e;return(0,n.jsxs)(m.A,{alignItems:{xs:"flex-start",sm:"center"},direction:{xs:"column",sm:"row"},flex:1,flexWrap:"nowrap",spacing:s.K.SS,children:[(0,n.jsx)(eg.E,{component:"p",sx:{color:t},bold:!0,fontSize:e0,children:l||" "}),(0,n.jsx)(eQ.Y,{id:r,progress:i,progressColor:t,width:"100%",rootSx:{maxWidth:{xs:146,md:262},flex:1}})]})},e2=()=>(0,n.jsx)(e1,{color:e=>{let{palette:t}=e;return t.mainGrey.main},label:"",progress:0}),e4=(0,eX.A)(j.A)({paddingLeft:s.K.SP.S}),e3=e=>{let{children:t}=e;return(0,n.jsx)(e4,{size:"grow",children:(0,n.jsx)(d.U,{component:i.Fragment,keepMounted:!0,loadingNode:(0,n.jsx)(e2,{}),children:t})})};var e6=l(26458),e5=l(43374),e7=l(1253),e8=l(31314);let e9=e=>{let{titleId:t,userId:l}=e,{localTitleStayFreeStatus:s,localMutate:r}=((e,t)=>{let[l,n]=((e,t)=>{let l=(0,e6.useLiveQuery)(()=>e5.YZ.getByTitleId(e,t),[e,t],null),n=(0,i.useMemo)(()=>"object"==typeof l,[l]);return[l,n]})(e,t);return{localTitleStayFreeStatus:l,isLoading:n,localMutate:(0,e7.l)(e,t)}})(t,l);(0,i.useEffect)(()=>{r().then()},[r]);let a=(0,i.useMemo)(()=>null==s?void 0:s.data,[s]);if(!a)return(0,n.jsx)(e2,{});let o=(0,e8.vw)(a.canReadStayFreeTimeLeft),d=(0,e8.XD)(a.stayFreeSecond,a.canReadStayFreeTimeLeft),c=a.canReadStayFreeTimeLeft<=0;return(0,n.jsx)(e1,{color:eu.A.palette.stayFree.main,label:c?"チャージ完了!":"回復まであと".concat(o),progress:d,id:t})},te=(0,i.memo)(e=>{let{titleId:t,userId:l}=e;return(0,n.jsx)(e3,{children:(0,n.jsx)(e9,{userId:l,titleId:t})})}),tt=(0,X.Ay)(e=>{let{children:t,...l}=e;return(0,n.jsx)(eg.E,{component:"p",bold:!0,fontSize:u.Z.M,...l,children:t})})(e=>{let{theme:t}=e;return{color:t.palette.stayFree.main,fontSize:u.Z.SP.S,[t.breakpoints.up("md")]:{fontSize:u.Z.PC.M}}}),tl=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(tt,{children:"ログインして待てばタダで読もう!"})}),tn=(0,i.memo)(()=>(0,n.jsx)(e3,{children:(0,n.jsx)(tl,{})}));var ti=l(80625),ts=l(92231);let tr=(0,i.memo)(e=>{let{titleId:t,chaptersWithStatus:l,titleReadInfo:r,mutate:a,isSerialEnd:o}=e,{now:d}=(0,ts.rK)(),{openPurchaseChapter:c}=(0,eL.D)({titleId:t,onSuccess:()=>{a().then()}}),u=(0,i.useCallback)(e=>()=>{c(e.chapter,e.chapterStatus).then()},[c]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(m.A,{spacing:s.K.SS,children:l.map(e=>{var t,l;let i=e.chapter,s=e.chapterStatus,a=!!(null==r?void 0:r.alreadyReadChapter
1s[i.id]),c=i.id===(null==r||null==(t=r.lastReadChapter)?void 0:t.id),m=i.id===(null==r||null==(l=r.lastReadChapter)?void 0:l.id);return(0,n.jsx)(eM.Rd,{eventName:p.W_.SelectItem,itemListName:C.L.Series,items:[{itemId:i.id.toString(),itemListName:i.titleName,itemName:i.name}],children:(0,n.jsx)(ti.N,{onClick:u(e),isSerialEnd:o,item:i,read:a,lastRead:c,current:m,isPurchased:!1,isRented:!1,titleIsAllowPassCommentPage:i.isPassCommentPage,now:d(),chapterStatus:s})},i.id)})})})}),ta=(0,i.memo)(e=>{let{titleId:t,noCursor:l,isSerialEnd:s}=e,{chapterList:r,titleReadInfo:a,mutate:o}=(e=>{var t;let{titleId:l,noCursor:n}=e,s=(0,e6.useLiveQuery)(()=>e5.S3.get(l),[l]),{data:r,mutate:a}=eI.L.useDataPaginated({limit:5,titleId:l,cursor:n||null==s||null==(t=s.lastReadChapter)?void 0:t.id,sort:eP.x8.Asc});return{chapterList:(0,i.useMemo)(()=>{if(r)return r.flat().reverse()},[r]),titleReadInfo:s,mutate:a}})({titleId:t,noCursor:l}),{data:d}=eT.j.useData({titleId:t},!1),{chaptersWithStatus:c}=(0,eR.A)(r,d);return c&&a?(0,n.jsx)(tr,{titleId:t,isSerialEnd:s,chaptersWithStatus:c,titleReadInfo:a,mutate:o}):(0,n.jsx)(eC.N,{})});var to=l(46853),td=l(99942);let tc=e=>{let{open:t,onClose:l,removeDialog:i,children:s}=e;return(0,n.jsx)(td.c,{open:t,handleClose:l,removeDialog:i,config:{maxWidth:640},children:s})},tu=(0,X.Ay)(m.A)(e=>{let{theme:t}=e;return t.unstable_sx({maxHeight:{xs:"100%",md:"70vh"},height:{xs:"100%",md:"70vh"},backgroundColor:t.palette.background.paper,width:"100%"})}),tm=(0,X.Ay)(m.A)(e=>{let{theme:t}=e;return t.unstable_sx({justifyContent:"space-between",alignItems:"center",height:50,minHeight:50,px:s.K.PC.S,borderBottom:"1px solid ".concat(t.palette.mainGrey.main)})}),th=(0,X.Ay)(r.A)(e=>{let{theme:t}=e;return t.unstable_sx({overflow:"auto",px:s.K.PC.S,pb:s.K.M})}),tx=(0,X.Ay)(m.A)(e=>{let{theme:t}=e;return t.unstable_sx({justifyContent:"space-between",alignItems:"center",pt:s.K.S,pb:s.K.SS})}),tp=(0,X.Ay)(m.A)(e=>{let{theme:t}=e;return t.unstable_sx({p:s.K.PC.S,justifyContent:"space-between",alignItems:"center",borderTop:"1px solid ".concat(t.palette.mainGrey.main),mt:"auto",minHeight:"fit-content"})}),tj=(0,X.Ay)(r.A)(e=>{let{theme:t}=e;return t.unstable_sx({minWidth:"fit-content",mr:s.K.SS})}),tS=(0,X.Ay)(r.A)(e=>{let{theme:t}=e;return t.unstable_sx({fontSize:0,width:{xs:16,md:20},height:{xs:16,md:20}})});var tg=l(64774),tv=l(42826);let tb=()=>(0,n.jsxs)(tm,{direction:"row",children:[(0,n.jsx)(eg.E,{bold:!0,fontSize:u.Z.L,children:"まとめ購入"}),(0,n.jsx)(Q.hj,{isSmall:!0,variant:"outlined",children:(0,n.jsx)(h.A,{variant:"text",width:"4em"})})]}),tA=()=>(0,n.jsxs)(tp,{direction:"row",children:[(0,n.jsxs)(r.A,{children:[(0,n.jsx)(h.A,{variant:"text",width:"10em"}),(0,n.jsx)(h.A,{variant:"text",width:"4em"})]}),(0,n.jsx)(Q.hj,{children:(0,n.jsx)(h.A,{variant:"text",width:"4em"})})]});var tf=l(73871);let tC=(0,X.Ay)(h.A)(e=>{let{theme:t}=e;return t.unstable_sx({width:{xs:(0,tf.UC)(84),sm:(0,tf.oh)(84),md:256},height:{xs:30,md:38},borderRadius:32,border:"1px solid",borderColor:t.palette.mainGrey.main,alignSelf:"flex-end"})}),ty=()=>(0,n.jsxs)(tx,{direction:"row",children:[(0,n.jsx)(h.A,{variant:"text",width:"7rem"}),(0,n.jsx)(tC,{variant:"rectangular"})]}),tw=(0,X.Ay)(m.A)(e=>{let{theme:t}=e;return t.unstable_sx({pb:s.K.M})}),tk=()=>(0,n.jsx)(tw,{spacing:s.K.PC.SS,children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,n.jsx)(ew.Xr,{},"ChapterSelectableSkeleton-".concat(String(t))))}),tI=()=>(0,n.jsxs)(th,{children:[(0,n.jsx)(ty,{}),(0,n.jsx)(tk,{})]}),tP=()=>(0,n.jsxs)(tu,{children:[(0,n.jsx)(tb,{}),(0,n.jsx)(tI,{}),(0,n.jsx)(tA,{})]}),tL=e=>{let{handleClickAll:t,hasChecked:l}=e;return(0,n.jsxs)(tm,{direction:"row",children:[(0,n.jsx)(eg.E,{bold:!0,fontSize:u.Z.L,children:"まとめ購入"}),(0,n.jsx)(Q.hj,{isSmall:!0,variant:"outlined",onClick:t,children:l?"選択解除":"全選択"})]})};var tN=l(50992),tM=l(44834);let tK=new Map([[tN.d.FromLatest,eP.x8.Desc],[tN.d.FromFirst,eP.x8.Asc]]),tB=(0,i.memo)(e=>{let{tabType:t,titleId:l,handleChangeSort:i}=e,{data:s}=o.E.Detail.useData({titleId:l});return(0,n.jsxs)(tx,{direction:"row",children:[(0,n.jsxs)(eg.E,{fontSize:u.Z.M,children:["全",null==s?void 0:s.count.chapters,"話"]}),(0,n.jsx)(ew.hc,{value:t,onChange:i})]})}),tT=e=>{var t;let{data:l,setSize:a,isReachingEnd:o,error:c,isLoading:u}=e.chapterListInfiniteData,h=(0,$.tg)(),{data:x,isLoading:p,error:j}=eT.j.useData({titleId:e.titleId},h),{chaptersWithStatus:S}=(0,eR.A)(l,x),g=(0,i.useCallback)(()=>{a(e=>e+1).then()},[a]);return u||p||!S?(0,n.jsx)(tk,{}):!l||!x||c||j?(0,n.jsx)(tv.k,{children:(0,tg.xp)(null!=(t=null!=c?c:j)?t:tg.$9.NG)}):(0,n.jsx)(d.G,{onIntercept:g,end:o,loadingNode:(0,n.jsx)(tk,{}),children:(0,n.jsx)(m.A,{spacing:s.K.PC.SS,sx:[!o&&{mb:s.K.PC.SS}],children:S.map(t=>(0,n.jsx)(ep.f,{fallback:(0,n.jsx)(r.A,{height:{xs:89,md:106}}),options:{rootMargin:"318px"},children:e.renderChapter(t.chapter,t.chapterStatus)},t.chapter.id))})},e.sort)},tR=(0,i.memo)(e=>{let{titleId:t,renderChapter:l}=e,{sort:s,tabType:r,chapterListInfiniteData:a,handleChangeSort:o}=(e=>{let{titleId:t}=e,[l,n]=(0,i.useState)(eP.x8.Desc),s=to.j.List.usePurchasableListData({titleId:t}),r=to.j.List.useDataInfinite({titleId:t,sort:l},{limit:15}),a=(0,i.useCallback)(e=>{let t=tK.get(e);
1if(!t)throw Error("typeSortMapにkeyに対応したsortが実装されていません。");n(t),(0,eo.$m)({eventName:p.W_.SelectContent,contentType:tM.r.TabTMultiplePurchase,contentId:e})},[n]),o=(0,i.useMemo)(()=>(e=>{let t=Array.from(tK.entries()).find(t=>{let[,l]=t;return l===e});if(!t)throw Error("typeSortMapにsortが実装されていません。");return t[0]})(l),[l]);return{sort:l,tabType:o,purchasableListData:s,chapterListInfiniteData:r,handleChangeSort:a}})({titleId:t});return(0,n.jsxs)(th,{children:[(0,n.jsx)(tB,{tabType:r,titleId:t,handleChangeSort:o}),(0,n.jsx)(tT,{titleId:t,sort:s,chapterListInfiniteData:a,renderChapter:l})]})});var tz=l(97847);class tE{get size(){return this.totalAmounts.length}get isPremiumAmountOnly(){return!!this.premiumTotal&&!this.anyTotal}get total(){return void 0!==this.memoizedTotal||(this.memoizedTotal=this.sum(this.totalAmounts)),this.memoizedTotal}get premiumTotal(){return void 0!==this.memoizedPremiumTotal||(this.memoizedPremiumTotal=this.sum(this.premiumAmountList)),this.memoizedPremiumTotal}get anyTotal(){return void 0!==this.memoizedAnyTotal||(this.memoizedAnyTotal=this.sum(this.anyAmountList)),this.memoizedAnyTotal}get premiumAmount(){return new tz.sg(this.premiumTotal)}get anyAmount(){return new tz.Vo(this.anyTotal)}sum(e){return e.reduce((e,t)=>e+t.value,0)}static create(e){return new tE(e)}constructor(e){this.totalAmounts=e;let t=e.reduce(tD,{any:[],premium:[]});this.premiumAmountList=t.premium,this.anyAmountList=t.any}}let tD=(e,t)=>(t.isPremiumOnly?e.premium.push(t):e.any.push(t),e),t_=(0,X.Ay)(eg.E)(e=>{let{theme:t}=e;return t.unstable_sx({fontSize:u.Z.M,color:t.palette.secondary.main})}),tW=(0,X.Ay)(eg.E)(e=>{let{theme:t}=e;return t.unstable_sx({fontSize:u.Z.S,ml:"1em"})}),tF=e=>{let{data:t,checkedIdList:l,onPurchase:r,countChapters:a,disabled:o}=e,d=(0,i.useMemo)(()=>(e=>{let t=new Map;return e.forEach(e=>{t.set(e.id,(0,tz.pd)(e.purchaseUseCoin,e.isPurchasePremium))}),t})(t.chapters),[t.chapters]),c=(0,i.useMemo)(()=>new tE(l.reduce((e,t)=>(d.has(t)&&e.push(d.get(t)),e),[])),[d,l]),h=(0,i.useCallback)(()=>{null==r||r(l)},[r,l]);return(0,n.jsxs)(tp,{direction:"row",children:[(0,n.jsxs)(tj,{children:[(0,n.jsxs)(m.A,{direction:"row",alignItems:"flex-end",children:[(0,n.jsx)(t_,{bold:!0,children:"購入金額"}),(0,n.jsxs)(tW,{children:[c.size,"/",a.toLocaleString(),"話"]})]}),(0,n.jsxs)(m.A,{direction:"row",alignItems:"center",spacing:s.K.SS,children:[(0,n.jsx)(tS,{children:c.isPremiumAmountOnly?(0,n.jsx)(eD.eL,{}):(0,n.jsx)(eD.pT,{})}),(0,n.jsx)(eg.E,{bold:!0,fontSize:u.Z.M,children:c.total.toLocaleString()})]})]}),(0,n.jsx)(Q.hj,{onClick:h,disabled:o,children:"購入する"})]})},tO=(0,i.memo)(e=>{let{titleId:t,...l}=e,{data:i}=to.j.List.usePurchasableListData({titleId:t}),{data:s}=o.E.Detail.useData({titleId:t});return i&&s?(0,n.jsx)(tF,{data:i,countChapters:s.count.chapters,...l}):null});var tZ=l(79991);let tG=e=>{let{data:t,buyOutCheckedChapterData:l,onPurchase:s,buyOutChapterList:r,mutatePurchasableChapterList:a,mutateUserPurchaseData:o,localLastReadChapterId:d,isSerialEnd:c,...u}=e,{titleId:m}=u,h=(0,$.tg)(),{isPurchased:x,isRented:p}=(0,eN.JL)(m),j=(0,i.useMemo)(()=>{var e,t;return null!=(t=null==(e=l[m])?void 0:e.chapters)?t:{}},[l,m]),{data:S}=tZ.g.useReadData({titleId:m}),g=(0,i.useMemo)(()=>{let e=new Map;return t.chapters.forEach(t=>{let{id:l}=t;return e.set(l,!0)}),e},[t.chapters]),v=(0,i.useMemo)(()=>{let e=new Map;return null==r||r.forEach(t=>e.set(t,!0)),e},[r]),b=(0,i.useMemo)(()=>Object.keys(j).map(e=>Number(e)),[j]),A=!!b.length,f=(0,i.useCallback)(e=>()=>{let t=!b.includes(e);e5.hz.put({chapterId:e,titleId:m,checked:t}).then()},[b,m]),C=(0,i.useCallback)(()=>{let e=t.chapters.map(e=>{let{id:t}=e;return{titleId:m,chapterId:t}});e5.hz.bulkPut({items:e,titleId:m,checked:!A}).then()},[t,A,m]),y=(0,i.useCallback)(()=>{o().then(),a().then(e=>{if(!(null==e?void 0:e.data))return;let t=e.data.chapters.reduce((e,t)=>(b.includes(t.id)&&e.push(t.id),e),[]);null==s||s(t)})},[b,a,o,s]);return(0,i.useEffect)(()=>{b.forEach(e=>{g.has(e)||e5.hz.deleteByChapterId(e).then()})},[b,g]),(0,n.jsxs)(tu,{children:[(0,n.jsx)(tL,{handleClickAll:C,hasChecked:A}),(0,n.jsx)(tR,{titleId:m,renderChapter:(e,t)=>{var l,i,s,r;let{rentalUseCoin:a,isPreRead:o,isFreeCampaign:u,purchaseUseCoin:m}=t,b=(0,ew.cS)({rentalUseCoin:a,isPreRead:o,isFreeCampaign:u});return(0,n.jsx)(ew.g_,{chapterId:e.id,checked:j[e.id],onClick:f(e.id),...e,isPurchasable:g.has(e.id),isBuyout:v.has(e.id),isFree:b&&["free","freecampaign"].includes(b),thumbnail:(0,n.jsx)(ew.ES,{data:e,width:{xs:118,md:138},height:{xs:87,md:104},isSmall:!0,className:"seriesThumb",hidePrereadCoinIcon:!0,isPurchased:null!=(i=x(e.id))&&i,chapterStatus:t,isSerialEnd:c}),icon:(0,n.jsx)(ew.EG,{chapter:e,chapterStatus:t,isPurchased:null!=(s=x(e.id))&&s,isRented:null!=(r=p(e.id))&&r,showCoinOnly:!0}),label:(0,ew.d8)(e.isLatestChapter,h?(null==S||null==(l=S.lastReadChapter)?void 0:l.id)===e.id:e.id===d,!1),purchaseUseCoin:m})}}),(0,n.jsx)(tO,{titleId:m,checkedIdList:b,onPurchase:y,disabled:!A})]})},tH=e=>{var t;let{titleId:l,onPurchase:i,isSerialEnd:s}=e,{data:r,error:a,isLoading:o,mutate:d}=to.j.List.usePurchasableListData({titleId:l}),c=(0,e6.useLiveQuery)(()=>e5.hz.get(l),[l]),m=(0,e6.useLiveQuery)(()=>e5.S3.get(l),[l]),{getBuyOutList:h,mutate:x}=(0,eN.JL)(l),p=h(),j=(0,$.tg)();
1return o||!c||j&&!p?(0,n.jsx)(tP,{}):!r||a?(0,n.jsxs)(tu,{children:[(0,n.jsx)(tm,{direction:"row",children:(0,n.jsx)(eg.E,{bold:!0,fontSize:u.Z.L,children:"まとめ購入"})}),(0,n.jsx)(tv.k,{children:(0,tg.xp)(null!=a?a:tg.$9.NG)})]}):(0,n.jsx)(tG,{titleId:l,localLastReadChapterId:null==m||null==(t=m.lastReadChapter)?void 0:t.id,data:r,mutatePurchasableChapterList:d,mutateUserPurchaseData:x,buyOutCheckedChapterData:c,buyOutChapterList:p,onPurchase:i,isSerialEnd:s})};var tU=l(62142),tq=l(69196);let tY=e=>{let{chapterNum:t}=e;return(0,n.jsxs)(r.A,{sx:{my:{xs:s.K.SP.S,md:s.K.PC.M}},children:[(0,n.jsxs)(eg.E,{bold:!0,fontSize:u.Z.M,mb:s.K.SS,children:[t,"話分購入しますか?"]}),(0,n.jsx)(eg.E,{fontSize:u.Z.M,children:"閲覧期限 無期限"})]})};var tJ=l(51953);let t$=e=>{let{chapterNum:t,onClickBuy:l,onCancel:i,userCoin:s,consumeCoin:r,loadingBuyout:a,disabledBuyout:o,removeDialog:d,open:c}=e;return(0,n.jsxs)(tJ.yH,{open:c,onClose:i,removeDialog:d,onCancel:i,title:"まとめ購入",actions:(0,n.jsx)(tq.jv,{disabled:o,loading:a,premium:null==r?void 0:r.premium,bonus:null==r?void 0:r.bonus,onClick:l}),children:[(0,n.jsx)(tY,{chapterNum:t}),(0,n.jsx)(tU.h,{coin:s})]})};var tV=l(13014);let tX=e=>{let{amount:t,lackAmount:l,onCancel:i,onClickBuyCoin:s,coin:r,isPremiumOnly:a,chapterNum:o,removeDialog:d,open:c}=e;return(0,n.jsxs)(tV.qU,{open:c,isPremium:a,amount:t,lackAmount:l,onCancel:i,onClickBuyCoin:s,removeDialog:d,children:[(0,n.jsx)(tY,{chapterNum:o}),(0,n.jsx)(tV.hX,{coin:r})]})};var tQ=l(11032),t0=l(65907),t1=l(46143),t2=l(51460),t4=l(54045),t3=l(40209),t6=l(82270);let t5={Idle:"Idle",Select:"Select",SelectDetect:"SelectDetect",Buy:"Buy",NoCoin:"NoCoin",NoLoggedIn:"NoLoggedIn",Processing:"Processing",Error:"Error",Success:"Success"};var t7=l(7957),t8=l(52373),t9=l(51359),le=l(12584);let lt=e=>{let{status:t,action:l,coin:s,chapterIds:r,titleId:a,amountSummary:o,paymentSummary:d,open:c,removeDialog:u,isSerialEnd:m}=e,{user:h}=(0,A.l)(),{closeDialog:x}=(0,ei.s)(),p=(0,i.useCallback)(()=>h.coin.buy().ref(t8.n.PopupPurchase).push(),[h]),j=(0,i.useCallback)(e=>{l.start(e)},[l]),S=t===t5.Select,g=t===t5.NoCoin,v=t===t5.Buy,b=t===t5.NoLoggedIn,f=r.length,C=(0,i.useCallback)(()=>{x()},[x]);return a?b?(0,n.jsx)(le.l,{open:c,handleClose:C,removeDialog:u,children:(0,n.jsx)(t9.DialogLoginContent,{})}):S?(0,n.jsx)(tc,{open:c,removeDialog:u,onClose:C,children:(0,n.jsx)(tH,{onPurchase:j,titleId:a,isSerialEnd:m})}):v?(0,n.jsx)(t$,{open:c,userCoin:s,consumeCoin:(null==d?void 0:d.consume)?d.consume:void 0,chapterNum:f,onCancel:C,onClickBuy:l.buy,removeDialog:u}):g?(0,n.jsx)(tX,{open:c,chapterNum:f,amount:null==o?void 0:o.total,coin:s,isPremiumOnly:null==o?void 0:o.isPremiumAmountOnly,onCancel:C,onClickBuyCoin:p,lackAmount:null==d?void 0:d.lack,removeDialog:u}):(0,n.jsx)(le.l,{open:c,handleClose:C,removeDialog:u,config:{hideCloseButton:!0},children:(0,n.jsx)(t7.A,{color:"secondary"})}):null},ll=e=>{let{titleId:t,open:l,removeDialog:s,isSerialEnd:r}=e,a=(e=>{let{titleId:t,onSuccess:l,onError:n}=e,s=(0,$.tg)(),{closeDialog:r}=(0,ei.s)(),[a,o]=(0,i.useState)(t5.Idle),[d,c]=(0,i.useState)([]),{showErrorMessage:u,showInfo:m}=(0,t1.M)(),h=!!d.length,{data:x,mutate:p,error:j}=eI.L.usePurchaseUseCoinList(h?{titleId:t,chapterIds:d}:void 0),{mutate:S}=(0,t2.bY)(d),{mutate:g}=(0,e8._x)(t),{userCoin:v}=(0,t4.b)(),[b]=(0,t3.A)({onSuccess(){m("まとめ購入しました"),null==l||l(),S().then(),g().then(),o(t5.Success),r()},onError(e){let t=e instanceof t6.U?e.code:tg.su.NG;null==n||n(t),o(t5.Error),u(t),r()}}),A=(0,i.useMemo)(()=>v?t0.K.create({coin:v}):void 0,[v]),f=(0,i.useMemo)(()=>x?new tz.Vo(x.allUseCoin):void 0,[x]),C=(0,i.useMemo)(()=>x?new tz.sg(x.premiumUseCoin):void 0,[x]),y=(0,i.useMemo)(()=>{if(f&&C)return tE.create([f,C])},[f,C]),w=(0,i.useMemo)(()=>{if(y&&A)return(0,tQ.kI)(y,A)},[A,y]),k=!!w&&!!A&&void 0!==s,I=(0,i.useCallback)(()=>{w&&t&&a!==t5.Processing&&(o(t5.Processing),b.multiplebuyout({titleId:t,chapterIds:d,summary:w}))},[a,b,d,w,t]),P=(0,i.useCallback)(()=>{o(t5.Select)},[]),L=(0,i.useCallback)(e=>{c(e)},[]),N=(0,i.useCallback)(e=>{if(!s)return void o(t5.NoLoggedIn);e.length&&(L(e),p(void 0),o(t5.SelectDetect))},[s,p,L]),M=(0,i.useCallback)(()=>{o(t5.Idle)},[]);return(0,i.useEffect)(()=>
1{if(k&&a===t5.SelectDetect){if(w.lack)return void o(t5.NoCoin);o(t5.Buy)}},[w,p,a,k]),(0,i.useEffect)(()=>{c([])},[t]),(0,i.useEffect)(()=>{j&&(u(j),o(t5.Idle))},[u,j]),{action:{cancel:M,buy:I,select:P,start:N},titleId:t,status:a,amountSummary:y,paymentSummary:w,coin:A,chapterIds:d}})({titleId:t});return(0,i.useEffect)(()=>{a.status===t5.Idle&&a.action.select()},[a.action,a.status]),(0,n.jsx)(lt,{open:l,removeDialog:s,isSerialEnd:r,...a})},ln=e=>{let{titleId:t,isSerialEnd:l}=e,{addDialog:s}=(0,ei.s)();return{openMultiplePurchase:(0,i.useCallback)(()=>{s(e=>(0,n.jsx)(ll,{open:e.open,removeDialog:e.removeDialog,titleId:t,isSerialEnd:l}),{key:"multiplePurchaseModal"})},[s,t,l])}},li=(0,i.memo)(e=>{let{titleId:t,isStayFree:l,isChapterPurchasable:s,totalChapterPurchaseUseCoin:r,isPurchaseChapterAllPremium:a,chapterCount:o,isSerialEnd:d}=e,{lastRead:c,multiplePurchase:u}=((e,t)=>{let l=(e=>{var t;let l=(0,e6.useLiveQuery)(()=>e5.S3.get(e),[e]),{data:n}=eI.L.useDataInfinite({titleId:e,sort:eP.x8.Asc},{limit:5,cursor:null==l||null==(t=l.lastReadChapter)?void 0:t.id}),s=(0,i.useMemo)(()=>{if(!n||!l)return;let e=n.flat();return l.alreadyReadChapters.length?e.find(e=>{var t;return e.id===(null==(t=l.lastReadChapter)?void 0:t.id)}):e[0]},[l,n]);if(l&&n)return{isRead:!!(null==l?void 0:l.alreadyReadChapters.length),lastChapterSubName:null==s?void 0:s.subName,lastChapterName:null==s?void 0:s.name}})(e),n=((e,t)=>{let{openMultiplePurchase:l}=ln({titleId:e,isSerialEnd:t});return(0,i.useMemo)(()=>({disableTotalBuyOutCoin:!1,open:l}),[l])})(e,t);return(0,i.useMemo)(()=>({lastRead:l,multiplePurchase:n}),[l,n])})(t,d),m=5<o;return(0,n.jsx)(eV,{titleId:t,isSerialEnd:d,isStayFree:l,isFullChapter:m,total:o,showPurchase:s,lastChapter:(0,n.jsx)(ef,{loading:!c,isRead:null==c?void 0:c.isRead,lastChapterName:null==c?void 0:c.lastChapterName,lastChapterSubName:null==c?void 0:c.lastChapterSubName}
1),chapterList:(0,n.jsx)(ta,{isSerialEnd:d,titleId:t,noCursor:!m}),stayFreeProgressBar:(0,n.jsx)(tn,{}),multiplePurchase:s&&(0,n.jsx)(eH,{titleId:t,totalCoin:r,isPremiumOnly:a,openMultiplePurchase:u.open,disableTotalBuyOutCoin:u.disableTotalBuyOutCoin})})});var ls=l(65973);let lr=(0,i.memo)(e=>{let{userId:t,titleId:l,isStayFree:s,isChapterPurchasable:r,totalChapterPurchaseUseCoin:a,isSerialEnd:d,isPurchaseChapterAllPremium:c,chapterCount:u}=e,{lastRead:m,multiplePurchase:h}=((e,t)=>{let l=(e=>{let{data:t}=o.E.ReadStatus.useReadData({titleId:e}),{data:l}=to.j.List.useUserListData({limit:5,titleId:e}),n=(0,i.useMemo)(()=>{if(!l||!t)return;let e=l.flat();return t.isRead?e.find(e=>{var l;return e.id===(null==(l=t.lastReadChapter)?void 0:l.id)}):e[0]},[t,l]);if(t&&n)return{isRead:t.isRead,lastChapterSubName:null==n?void 0:n.subName,lastChapterName:null==n?void 0:n.name}})(e),n=((e,t)=>{let{openMultiplePurchase:l}=ln({titleId:e,isSerialEnd:t}),{getBuyOutList:n}=(0,eN.JL)(e),s=null==n?void 0:n(),r=(null==s?void 0:s.length)===void 0,a=!!(null==s?void 0:s.length),o=r?void 0:a;return(0,i.useMemo)(()=>({disableTotalBuyOutCoin:o,open:l}),[l,o])})(e,t);return(0,i.useMemo)(()=>({lastRead:l,multiplePurchase:n}),[l,n])})(l,d),x=5<u;return(0,n.jsx)(eV,{isSerialEnd:d,titleId:l,isLoggedIn:!0,isStayFree:s,isFullChapter:x,total:u,showPurchase:r,chapterList:(0,n.jsx)(ls.H,{isSerialEnd:d,titleId:l,noCursor:!x}),lastChapter:(0,n.jsx)(ef,{loading:!m,isRead:null==m?void 0:m.isRead,lastChapterName:null==m?void 0:m.lastChapterName,lastChapterSubName:null==m?void 0:m.lastChapterSubName}),stayFreeProgressBar:(0,n.jsx)(te,{titleId:l,userId:t}),multiplePurchase:r&&(0,n.jsx)(eH,{titleId:l,totalCoin:a,isPremiumOnly:c,openMultiplePurchase:h.open,disableTotalBuyOutCoin:h.disableTotalBuyOutCoin})})});var la=l(67116),lo=l(93417),ld=l(45844),lc=l(81630),lu=l(24121),lm=l(89099);let lh=e=>{let t=(0,lm.useRouter)(),l=lu.b.List.useDataInfinite(e?{titleId:e.titleId,isWebOnly:e.isWebOnly?lc.D.Only:lc.D.All}:void 0),{setSize:n,mutate:s}=l,r=(0,i.useCallback)(()=>{n(e=>e+1).then()},[n]);return(0,i.useEffect)(()=>{let e=()=>s();return t.events.on("routeChangeStart",e),()=>{n(1),t.events.off("routeChangeStart",e)}},[n,s,t]),{handleIntersection:r,...l}},lx=()=>(0,n.jsxs)(m.A,{spacing:s.K.SS,mt:s.K.M,children:[(0,n.jsx)(lo.A,{isPurchased:void 0}),(0,n.jsx)(lo.A,{isPurchased:void 0})]}),lp={rootMargin:"200px"};var lj=l(48560),lS=l(63987),lg=l(59090),lv=l(28981),lb=l(94380);let lA=(0,i.memo)(e=>{let{children:t,variant:l,disabled:i,onClick:s,href:r}=e,a={variant:l,href:r,onClick:s,disabled:i,endIcon:(0,n.jsx)(V.tj,{})},o={width:"100%",maxWidth:{xs:"auto",md:Q.uD}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Q.hj,{isSmall:!0,...a,sx:[o,{display:{xs:"flex",md:"none"},minWidth:0,py:"6px",height:"100%",minHeight:Q.Ji}],children:t}),(0,n.jsx)(Q.hj,{...a,sx:[o,{display:{xs:"none",md:"flex"}}],children:t})]})});lA.displayName="SingleBookButtonBase";let lf=(0,X.Ay)(b.A)(e=>{let{theme:t}=e;return t.unstable_sx({fontSize:u.Z.M,color:t.palette.primary.main,lineHeight:1.5,mr:s.K.SS,whiteSpace:"nowrap"})}),lC=(0,X.Ay)(lj.K)(e=>{let{theme:t}=e;return t.unstable_sx({["& .".concat(lj.q.container)]:{width:{xs:114,md:166},height:{xs:162,md:237}}})}),ly=e=>{var t,l;let{data:a,isPurchased:o}=e,{openSingleBook:d}=(0,lS.s)(),{isReadingFromDataType:c}=(0,lg.$c)(),x=o?"読む":"立ち読み",{singleBookId:S,singleBookHref:g}=(e=>{let{viewer:t}=(0,A.l)(),{id:l}=null!=e?e:{id:0,startAt:new Date(0)},[n,s]=(0,i.useState)(),r=(null==e?void 0:e.type)===lb._S.Chapter,a=(null==e?void 0:e.type)===lb._S.Normal;(0,i.useEffect)(()=>{let t=async e=>{var t;let{data:l}=await lv.$.getChapter({singleBookId:e});s(null!=(t=null==l?void 0:l.lastChapterId)?t:null==l?void 0:l.firstChapterId)};r&&t(e.id)},[e,r]);let o=(0,i.useMemo)(()=>{if(l){if(n)return t.singleChapter(l,n).path;if(a)return t.single(l).path}},[a,n,l,t]);return{isSingleBookChapter:r,chapterId:n,singleBookHref:o,singleBookId:l}})(a),v=(0,i.useCallback)(()=>{d(S)},[d,S]),f=(0,lm.useRouter)(),w=(0,i.useCallback)(()=>{f.push(null!=g?g:"")},[g,f]);return(0,n.jsx)(r.A,{py:s.K.S,sx:[{"&:first-of-type":{pt:0},"&:not(:first-of-type)":{borderColor:e=>e.palette.mainGrey.main,borderWidth:1,borderStyle:"solid none none none"},backgroundColor:e=>e.palette.reading.main},c(eE.Ji.SingleBook,S)&&{backgroundColor:e=>e.palette.reading.light}],children:(0,n.jsxs)(j.A,{flexWrap:"wrap",container:!0,spacing:1.5,children:[(0,n.jsx)(j.A,{height:"auto",position:"relative",children:(0,n.jsx)(lC,{data:a,isPurchased:o})}
1),(0,n.jsx)(j.A,{flex:1,children:(0,n.jsx)(y.A,{sx:{borderRadius:0,boxShadow:"none",height:"100%",backgroundColor:"transparent"},children:(0,n.jsx)(m.A,{height:"100%",children:a&&void 0!==o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(m.A,{direction:"row",justifyContent:"space-between",children:[(0,n.jsxs)(m.A,{direction:"row",flexWrap:"wrap",children:[(0,n.jsx)(lf,{component:"h3",bold:!0,children:a.name}),(0,n.jsx)(b.A,{component:"span",bold:!1,fontSize:u.Z.M,color:"headline.light",children:a.stories})]}),o&&(0,n.jsx)(b.A,{color:"secondary",fontSize:u.Z.M,bold:!0,ml:"auto",children:"購入済み"})]}),a.discountRatio>0&&!o&&(0,n.jsx)(b.A,{component:"p",fontSize:{xs:u.Z.SP.S,md:u.Z.PC.M},mt:s.K.SS,children:a.discountDescription}),(0,n.jsx)(r.A,{mt:"auto",children:(0,n.jsxs)(j.A,{spacing:s.K.S,direction:{xs:"column",sm:"row"},p:0,container:!0,children:[(o||a.isPreRead)&&(0,n.jsx)(j.A,{size:{xs:12,sm:6,md:"grow"},maxWidth:{xs:"none",md:"min(50%, 262px)"},children:(0,n.jsx)(eM.Rd,{eventName:p.W_.SelectItem,itemListName:C.L.SingleBook,items:[{itemId:S.toString(),itemName:null!=(t=null==a?void 0:a.name)?t:"",itemCategory:x}],children:(0,n.jsx)(lA,{onClick:w,disabled:!g,variant:o?"contained":"outlined",children:x})})}),!o&&(0,n.jsx)(j.A,{size:{xs:12,sm:6,md:"grow"},maxWidth:{xs:"none",md:"min(50%, 262px)"},children:(0,n.jsx)(eM.Rd,{eventName:p.W_.SelectItem,itemListName:C.L.SingleBook,items:[{itemId:S.toString(),itemName:null!=(l=null==a?void 0:a.name)?l:""}],children:(0,n.jsxs)(lA,{onClick:v,children:[(0,n.jsx)(r.A,{component:"span",children:"購入する"}),(0,n.jsxs)(r.A,{component:"span",display:"inline-flex",alignItems:"center",children:["(",(0,n.jsx)(r.A,{width:20,height:20,mr:s.K.SS,children:(0,n.jsx)(eD.eL,{})}),a.price,")"]})]})})})]})})]}):(0,n.jsxs)(m.A,{children:[(0,n.jsx)(h.A,{width:"80%"}),(0,n.jsx)(h.A,{width:"30%"})]})})})})]})})};ly.displayName="TitleContentsSingleBooksItemBase";let lw=(0,i.memo)(ly);var lk=l(70206);let lI={value:C.L.Series,label:"連載"},lP={value:C.L.SingleBook,label:"巻読み"},lL={value:C.L.Item,label:"スペコン"},lN={value:C.L.Web,label:"WEB限定"};var lM=l(14249),lK=l(63059),lB=l(63965),lT=l(58706);let lR=(0,X.Ay)(lM.Yn)(e=>{let{theme:t}=e;return t.unstable_sx({mb:s.K.M})}),lz=()=>(0,n.jsxs)(lR,{children:[(0,n.jsx)(lK.KQ,{className:lB.Tn.hideScrollbar,children:(0,n.jsx)(lK.p7,{value:"skeleton",slots:{root:lT.A},sx:{height:"48px",width:{xs:"calc(100% / 4)",md:"calc(100% / 4)"}},children:(0,n.jsx)(h.A,{width:"70%"})})}),(0,n.jsx)(lK.x1,{})]}),lE=e=>{let{singleBooks:t,titleId:l,purchasedIdSet:s}=e,[r,a]=(0,i.useState)(10),o=(0,i.useMemo)(()=>r>=t.length,[t,r]),c=(0,i.useCallback)(()=>{o||a(e=>e+10)},[o]),u=(0,i.useMemo)(()=>t.slice(0,r),[t,r]);return(0,n.jsx)(m.A,{children:(0,n.jsx)(d.G,{mt:"2px",onIntercept:c,end:o,keepMounted:!0,children:u.map(e=>{var t;let i=null!=(t=null==s?void 0:s.has(e.id))&&t;return(0,n.jsx)(lw,{type:C.L.SingleBook,data:e,titleId:l,isPurchased:i},e.id)})})})};lE.displayName="TitleContentsSingleBooksAllTab";let lD=e=>{let{titleId:t,purchasedData:l}=e;return void 0===l||0===l.length?(0,n.jsxs)(tv.k,{children:["この作品の巻読みを所持していません。",(0,n.jsx)("br",{}),"すきな巻読みを手にいれよう!"]}):(0,n.jsx)(m.A,{children:l.map(e=>(0,n.jsx)(lw,{type:C.L.SingleBook,data:e,titleId:t,isPurchased:!0},e.id))})};lD.displayName="TitleContentsSingleBooksPurchasedTab";let l_={Purchased:"purchased",All:"all"},lW=e=>{var t,l;let{titleId:a,singleBooks:o,purchasedData:d,purchasedIdSet:c}=e,[u,m]=(0,i.useState)(l_.All),h=(0,ld.B)(),x=(0,i.useCallback)(e=>{m(e),(0,eo.$m)({eventName:p.W_.SelectContent,contentType:tM.r.TabTitleSingleBook,contentId:e})},[m]),j=[{label:"購入済み(".concat(null!=(t=null==d?void 0:d.length)?t:0,"/").concat(null!=(l=null==o?void 0:o.length)?l:0,")"),value:l_.Purchased},{label:"全て",value:l_.All}];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(lM.tU,{tabs:j,value:u,onChange:x,variant:lM._r.Circle,sx:{mt:s.K.M,mb:s.K.SS}}),h?(0,n.jsx)(r.A,{mt:s.K.SS,children:j.map(e=>(0,n.jsx)(r.A,{display:u!==e.value?"none":"block",children:"purchased"===e.value?(0,n.jsx)(lD,{titleId:a,purchasedData:d}):(0,n.jsx)(lE,{singleBooks:o,titleId:a,purchasedIdSet:c})},e.value))}):(0,n.jsx)(r.A,{sx:{height:"100vh"}})]})};var lF=l(77119);let lO=e=>{let{titleId:t,userId:l,singleBooks:s}=e,{cacheData:r}=(0,lF.Y)(t,l),a=(0,i.useMemo)(()=>null==s?void 0:s.filter(e=>null==r?void 0:r.has(e.id)),[s,r]);return(0,n.jsx)(lW,{titleId:t,singleBooks:s,purchasedData:a,purchasedIdSet:r})},lZ=!1,lG=i.forwardRef(function(e,t){return lZ||(console.warn("MUI: The Skeleton component was moved from the lab to the core.\n\nYou should use `import { Skeleton } from '@mui/material'`\nor `import Skeleton from '@mui/material/Skeleton'`"),lZ=!0),(0,n.jsx)(h.A,{ref:t,...e})}),lH=e=>{let{titleId:t}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(lG,{width:150,sx:{maxWidth:"50%",mt:s.K.M}}),(0,n.jsxs)(r.A,{mt:s.K.SS,children:[(0,n.jsx)(lw,{type:C.L.SingleBook,titleId:t,isPurchased:void 0}),(0,n.jsx)(lw,{type:C.L.SingleBook,titleId:t,isPurchased:void 0})]})]})};var lU=l(92183);let lq={[C.L.Series]:e=>{let{isLoggedIn:t,titleId:l,detailData:i}=e,s=(0,$.wS)(),r={titleId:l,isStayFree:i.isStayFree,chapterCount:i.count.chapters,isChapterPurchasable:i.isChapterPurchasable,totalChapterPurchaseUseCoin:i.totalChapterPurchaseUseCoin,isPurchaseChapterAllPremium:i.isPurchaseChapterAllPremium,isSerialEnd:i.serialType===la.J.End};return s&&t?(0,n.jsx)(lr,{userId:s,...r}):(0,n.jsx)(li,{...r})},[C.L.SingleBook]:e=>{let{titleId:t}=e,l=(0,$.wS)(),i=(0,$.tg)(),{data:s}=lv.$.List.useData({titleId:t});return void 0!==i&&(!i||l)&&s?i&&l?(0,n.jsx)(lO,{titleId:t,userId:l,singleBooks:s}):(0,n.jsx)(lW,{titleId:t,singleBooks:s}):(0,n.jsx)(lH,{titleId:t})},[C.L.Item]:e=>{let{titleId:t}=e,l=(0,ld.B)(),{error:i,isLoading:a,data:o,isReachingEnd:c,handleIntersection:h}=lh({titleId:t,isWebOnly:!1}),{isPurchased:x}=(0,eN.xf)(t);return l?a?(0,n.jsx)(lx,{}):!o||i?(0,n.jsx)(b.A,{fontSize:u.Z.M,bold:!0,stackSx:{p:s.K.M},children:(0,tg.xp)(null!=i?i:tg.$9.NG)}):(0,n.jsx)(d.G,{options:lp,onIntercept:h,end:c,keepMounted:!0,mt:s.K.PC.S,children:(0,n.jsx)(m.A,{spacing:s.K.SS,children:o.flat().map(e=>(0,n.jsx)(lo.A,{data:e,contentType:p.Sx.TitleTopItemContent,isPurchased:x(e.id)},e.id))})}):(0,n.jsx)(r.A,{sx:{height:"100vh"}})},[C.L.Web]:e=>{let{titleId:t}=e,{isPurchased:l}=(0,eN.xf)(t),{isLoading:i,data:a}=lh({titleId:t,isWebOnly:!0});return i||!a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.A,{width:150,sx:{maxWidth:"50%",mt:s.K.M}}),(0,n.jsxs)(r.A,{mt:s.K.SS,children:[(0,n.jsx)(lw,{type:C.L.SingleBook,titleId:t,isPurchased:void 0}),(0,n.jsx)(lw,{type:C.L.SingleBook,titleId:t,isPurchased:void 0})]})]}):(0,n.jsx)(r.A,{mt:s.K.PC.S,children:(0,n.jsx)(m.A,{spacing:s.K.SS,children:a.flat().map(e=>(0,n.jsx)(lo.A,{data:e,contentType:p.Sx.TitleTopItemContent,isPurchased:l(e.id)},e.id))})})}},lY=e=>{let{titleId:t,defaultContentType:l,data:i,isLoading:s}=e,r=(0,$.tg)(),{isApp:a}=(0,lU.N)();return s||a&&!r?(0,n.jsx)(l$,{}):i?(0,n.jsx)(lJ,{data:i,titleId:t,isApp:a,isLoggedIn:!!r,defaultContentType:l}):null},lJ=e=>{let{titleId:t,data:l,isLoggedIn:s,defaultContentType:r,isApp:a}=e,{activeTab:o,tabTitleProps:d}=(e=>{let{defaultContentType:t,isApp:l,...n}=e,s=(0,lm.useRouter)(),r=((e,t)=>{let l=[],{count:n}=e,{chapters:i,singleBook:s,item:r}=n;return i>0&&l.push(lI),s.normal&&l.push(lP),(r.normal||r.webOnly)&&l.push(lL),r.webOnly&&!t&&l.push(lN),l})(n,l),[a,o]=(0,i.useState)(((e,t)=>{var l;return e||(null!=(l=null==t?void 0:t.value)?l:C.L.Series)})(t,r[0])),d=(0,i.useCallback)((e,l)=>{var n,i;let{shallow:a}=l;if(s.query.tab){o(s.query.tab),delete s.query.tab,s.replace({pathname:s.pathname,query:s.query},void 0,{shallow:!0}).then();return}a||(t?o(t):o(null!=(i=null==(n=r[0])?void 0:n.value)?i:C.L.Series))},[t,s,r]);return(0,i.useEffect)(()=>(s.events.on("routeChangeComplete",d),()=>{s.events.off("routeChangeComplete",d)}),[d,s.events]),{activeTab:a,tabTitleProps:{tabs:r,activeTab:a,changeHandler:e=>{o(e),(0,eo.$m)({eventName:p.W_.SelectContent,contentType:tM.r.TabTitle,contentId:e})}}}})({count:l.count,defaultContentType:r,isApp:a}),c=lq[o];return(0,n.jsx)(lV,{tab:(0,n.jsx)(lk.R,{quarterWidth:!0,...d}),content:(0,n.jsx)(c,{titleId:t,isLoggedIn:s,detailData:l})})},l$=()=>(0,n.jsx)(lV,{tab:(0,n.jsx)(lz,{}),content:(0,n.jsx)(eC.N,{})}),lV=e=>{let{tab:t,content:l}=e;return(0,n.jsx)(c.wn,{sx:{mb:{xs:0,sm:s.K.SP.L,md:s.K.PC.L}},children:(0,n.jsx)(c.RG,{children:(0,n.jsxs)(r.A,{children:[t,(0,n.jsx)(r.A,{children:l})]})})})};var lX=l(43969);let lQ=e=>{let{titleId:t,defaultContentType:l}=e,{isLoading:c,data:u,error:m}=o.E.Detail.useData({titleId:t});(0,lX.z)(!!u);let h=(0,i.useCallback)(()=>{var e,t,l,n;return!!u&&((null==(e=u.banners)?void 0:e.bannerList.length)!==0||(null==(t=u.singleBookReleaseInformations)?void 0:t.length)!==0||(null==(l=u.titleInformations)?void 0:l.length)!==0)&&(null==(n=u.recommends)?void 0:n.length)!==0},[u]);return m?null:(0,n.jsx)(r.A,{mt:s.K.M,mb:s.K.L,px:s.K.M,children:(0,n.jsxs)(r.A,{display:"grid",gridTemplateColumns:{xs:"minmax(0, 1fr)",sm:"minmax(0, 1fr) 1.85fr"},gridTemplateRows:"auto 1fr",columnGap:s.K.M,rowGap:s.K.S,maxWidth:1232,mx:"auto",sx:{direction:{xs:"ltr",sm:"rtl"}},children:[(0,n.jsxs)(r.A,{sx:{direction:"ltr"},children:[(0,n.jsx)(N,{singleBookReleaseInformations:null==u?void 0:u.singleBookReleaseInformations,hideSp:!0}),(0,n.jsx)(x,{informations:null==u?void 0:u.titleInformations}),(0,n.jsx)(J,{banners:null==u?void 0:u.banners}),h()&&(0,n.jsx)(a.A,{sx:{display:{xs:"none",sm:"block"}}})]}),(0,n.jsx)(r.A,{gridRow:"span 2",sx:{direction:"ltr"},children:(0,n.jsx)(lY,{isLoading:c,data:u,titleId:t,defaultContentType:l})}),(0,n.jsxs)(r.A,{sx:{direction:"ltr"},children:[(0,n.jsx)(N,{singleBookReleaseInformations:null==u?void 0:u.singleBookReleaseInformations,hidePc:!0,hideTab:!0}),(0,n.jsx)(d.U,{keepMounted:!0,children:(0,n.jsx)(U,{titleId:t})})]})]})})}},70206:(e,t,l)=>{l.d(t,{R:()=>b});var n=l(37876),i=l(58706),s=l(99284),r=l(63059),a=l(14249),o=l(14232),d=l(54773),c=l(9227),u=l(2066),m=l(77224),h=l(16956);let x=(0,d.Ay)(c.A)(e=>{let{theme:t}=e;return t.unstable_sx({alignItems:"center",mr:u.K.SS})}),p=(0,d.Ay)(m.Wg)(e=>{let{theme:t}=e;return t.unstable_sx({fontSize:{xs:12,md:16}})}),j=(0,d.Ay)(m.k_)(e=>{let{theme:t}=e;return t.unstable_sx({display:{xs:"none",md:"block"},fontSize:20})}),S=e=>{let{isOnlyWeb:t,isNew:l}=e;return t||l?(0,n.jsxs)(x,{direction:"row",spacing:u.K.SS,children:[l&&(0,n.jsx)(p,{color:"error",bgcolor:h.A.palette.background.default}),t&&(0,n.jsx)(j,{})]}):null};var g=l(63965),v=l(69241);let b=e=>{let{tabs:t,activeTab:l,className:d,changeHandler:c,disabledWebOnlyStyle:u,quarterWidth:m}=e,h=(0,o.useCallback)((e,t)=>{null==c||c(t)},[c]);return(0,n.jsxs)(a.Yn,{onChange:h,className:d,value:l,children:[(0,n.jsx)(r.KQ,{className:g.Tn.hideScrollbar,children:null==t?void 0:t.map(e=>{let{value:l,label:a,isNew:o}=e,d=!u&&l===s.L.Web;return(0,n.jsxs)(r.p7,{value:l,slots:{root:i.A},tabCount:m?null==t?void 0:t.length:void 0,className:(0,v.A)(m&&r.Re.quarterWidth,d&&r.Re.webOnly),children:[(0,n.jsx)(S,{isOnlyWeb:d,isNew:o}),a]},l)})}),(0,n.jsx)(r.x1,{})]})}},75193:(e,t,l)=>{l.d(t,{l:()=>x});var n=l(37876),i=l(22384),s=l(27431),r=l(18243),a=l(53476),o=l(92183),d=l(99674),c=l(54773),u=l(69241);
1let m={hoverable:"Banner-hoverable"},h=(0,c.Ay)(d.A)(()=>({transition:"all .2s ease",["&.".concat(m.hoverable,":hover")]:{opacity:.5}})),x=e=>{let{id:t,gaItemListName:l,dimension:d,src:c,alt:x,href:p,display:j}=e,{isApp:S}=(0,o.N)();return(0,n.jsx)(i.Rd,{eventName:a.W_.SelectItem,itemListName:l,items:[{itemId:t.toString(),itemName:x,itemVariant:a.Vb.HomeBlockBanner}],children:(0,n.jsx)(h,{display:j,className:(0,u.A)(!S&&m.hoverable),children:(0,n.jsx)(r.A,{href:p,children:(0,n.jsx)(s._V,{responsive:!0,src:c,dimension:d,alt:x,"data-chromatic":"ignore"})})})})}}}]);

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.