PageSourceSearch

https://www.bomtoon.tw/_next/static/chunks/3489-47c03df373b25da1.js

js bomtoon.tw collected 2026-10-02 10:56:46 UTC 13,343 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3489],{3489:function(e,t,i){i.d(t,{Z:function(){return em}});var o=i(97458),n=i(86418),s=i(52983),l=i(57887),d=i(21958),r=i(76284),a=i(94714),c=i(75930),u=i(16906),p=i(93544),f=i(9957),h=i(52113),x=i(70475),m=i(69107),g=i.n(m),v=i(63119),w=i(26764),y=i(16497),b=i(79635),I=i(90635),C=i(38112),j=i(94058);let k=l.default.div.withConfig({componentId:"sc-d1e16118-0"})(["position:relative;z-index:100;"]),S=l.default.div.withConfig({componentId:"sc-d1e16118-1"})(["display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:48px;padding-left:16px;padding-right:16px;"," cursor:pointer;user-select:none;"],e=>e.showDetail?(0,l.css)(["border-top-left-radius:8px;border-top-right-radius:8px;border-top:solid 1px #e1e1e1;border-left:solid 1px #e1e1e1;border-right:solid 1px #e1e1e1;"]):(0,l.css)(["border-radius:8px;border:solid 1px #e1e1e1;"])),Z=l.default.div.withConfig({componentId:"sc-d1e16118-2"})(["position:absolute;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding-left:16px;padding-right:16px;border-bottom-right-radius:8px;border-bottom-left-radius:8px;border:solid 1px #e1e1e1;cursor:pointer;user-select:none;width:100%;background-color:#fff;"]),P=l.default.ul.withConfig({componentId:"sc-d1e16118-3"})(["margin:0;padding:0;list-style-type:none;max-height:1000000px;line-height:1.3;box-sizing:border-box;width:100%;"]),z=l.default.li.withConfig({componentId:"sc-d1e16118-4"})(["display:flex;justify-content:left;align-items:center;width:100%;height:","em;list-style:none;"],e=>{let{height:t}=e;return t}),M=l.default.label.withConfig({componentId:"sc-d1e16118-5"})(["position:relative;cursor:pointer;display:flex;padding-left:30px;width:100%;"]),D=l.default.i.withConfig({componentId:"sc-d1e16118-6"})(["position:absolute;left:0;right:0;top:0;bottom:auto;width:20px;height:20px;background-image:url(",");background-color:#fff;border-radius:100%;"],e=>e.isOn?"/images/common/radio-on-19.svg":"/images/common/radio-19.svg"),T=l.default.input.withConfig({componentId:"sc-d1e16118-7"})(["-webkit-appearance:none;-webkit-border-radius:0;vertical-align:middle;"]),E=l.default.h4.withConfig({componentId:"sc-d1e16118-8"})(["display:flex;margin:0;padding:0;font-weight:500;"]),_=(0,l.default)(c.Z).attrs(e=>{let{theme:t,isDesktop:i}=e;return{size:i?12:14,color:t.colors.defaultText,weight:"medium"}}).withConfig({componentId:"sc-d1e16118-9"})([""]),A=(0,l.default)(c.Z).attrs(e=>{let{theme:t,isDesktop:i}=e;return{size:i?12:14,decoration:"underline",color:t.colors.Gray.B600}}).withConfig({componentId:"sc-d1e16118-10"})([""]);var O=e=>{let{selectedMethod:t,setSelectedMethod:i,liHeight:n=4.21}=e,{ip:l}=(0,C.useRouter)().query,d=(0,v.Ce)(),{accessToken:a}=(0,h.Z)(),{showModal:u,openModal:m,closeModal:O}=(0,b.Z)(),[B,R]=(0,s.useState)(null),[Y,$]=(0,s.useState)(!1),[N,U]=(0,s.useState)(!1),F=(0,s.useCallback)(e=>{d&&e!=N?U(e):!d&&e?m():d||e||O()},[O,d,m,N]),X=(0,s.useCallback)(e=>{i(e),F(!1)},[F,i]),G=(0,s.useCallback)(async()=>{if("string"==typeof l&&!(0,j.xb)(l))return l;{let e=await (0,y.I)();if(e.result)return e.result}return""},[l]);(0,s.useEffect)(()=>{Y||G().then(e=>{(0,f.UR)(a,x.$e.episode,!w.lX.is_app&&!d,e).then(e=>{e.result&&(R(e.result),i(null!=t?t:e.result[0]),$(!0))})})},[a,Y,d]);let H=(0,s.useCallback)(e=>{i(e),U(!1)},[i]);return(0,o.jsxs)(k,{children:[(0,o.jsxs)(S,{showDetail:N,onClick:()=>F(!N),children:[(0,o.jsx)(_,{text:null==t?void 0:t.displayText,isDesktop:d}),(0,o.jsx)(A,{text:"##t.shop.changeMethod",isDesktop:d})]}),N?(0,o.jsx)(Z,{children:(0,o.jsx)(P,{children:g()(B,e=>(0,o.jsx)(z,{height:n,children:(0,o.jsxs)(M,{onClick:()=>H(e),children:[(0,o.jsxs)(E,{children:[e.iconImage?(0,o.jsx)(p.Z,{src:e.iconImage,width:42,he
1ight:18}):null,(0,o.jsx)(r.gC,{size:6}),(0,o.jsx)(c.Z,{text:e.displayText,size:12,weight:"medium"})]}),(0,o.jsx)(T,{type:"radio",value:e.paymentProviderId}),(0,o.jsx)(D,{isOn:e.paymentProviderId==(null==t?void 0:t.paymentProviderId)})]})},e.paymentProviderId))})}):null,B?(0,o.jsx)(I.Z,{type:"viewer",payMethods:B,selectedOthers:t,onChangePayMethodOthers:X,modalProps:{show:u,onClose:O,modalStyle:"FullScreen"}}):null]})},B=i(38618),R=i(49911),Y=i(59410),$=i(18961),N=i.n($),U=i(74854),F=i(1647);let X=(0,l.default)(d.ZP).withConfig({componentId:"sc-e413a57c-0"})(["position:relative;width:100%;height:auto;"]),G=l.default.div.withConfig({componentId:"sc-e413a57c-1"})(["padding:",";"],e=>{let{isDesktop:t}=e;return t?"0 30px":"0 16px"}),H=l.default.div.withConfig({componentId:"sc-e413a57c-2"})(["display:flex;flex-direction:column;align-items:flex-start;overflow:hidden;border-bottom:1px solid #e1e1e1;margin:","px 0 0;padding-bottom:16px;"],e=>{let{isDesktop:t}=e;return t?90:70}),L=l.default.div.withConfig({componentId:"sc-e413a57c-3"})(["display:flex;flex-direction:column;border-bottom:1px solid #e1e1e1;padding:",";"],e=>{let{isDesktop:t}=e;return t?"14px 0":"40px 0 20px"}),q=l.default.div.withConfig({componentId:"sc-e413a57c-4"})(["display:flex;flex-direction:column;padding:20px 0;"]),J=l.default.div.withConfig({componentId:"sc-e413a57c-5"})(["display:flex;flex-direction:column;background-color:#f5f5f5;overflow:hidden;padding:",";"],e=>{let{isDesktop:t}=e;return t?"0 30px 0":"0"}),W=l.default.div.withConfig({componentId:"sc-e413a57c-6"})(["display:flex;",""],e=>{let{isDesktop:t}=e;return t?(0,l.css)(["flex-direction:column;align-items:flex-end;justify-content:center;"]):(0,l.css)(["width:50%;justify-content:space-between;align-items:center;"])}),V=l.default.div.withConfig({componentId:"sc-e413a57c-7"})(["display:flex;flex-direction:row;justify-content:space-between;width:100%;margin:10px 0;"]),K=l.default.div.withConfig({componentId:"sc-e413a57c-8"})(["border-radius:8px;overflow:hidden;"]),Q=(0,l.default)(c.Z).attrs(e=>{let{theme:t}=e;return{weight:"bold",color:t.colors.primary}}).withConfig({componentId:"sc-e413a57c-9"})([""]),ee=l.default.div.withConfig({componentId:"sc-e413a57c-10"})(["display:flex;justify-content:space-between;width:100%;"]),et=l.default.div.withConfig({componentId:"sc-e413a57c-11"})(["display:flex;justify-content:flex-end;"]);var ei=e=>{var t,i,n;let{purchaseType:l,purchaseData:d,selectedMethod:p,setSelectedMethod:f,isCheckCaution:h,setIsCheckCaution:m,isSaveMethod:g,setIsSaveMethod:w,isPermanent:y}=e,b=(0,v.Ce)(),I=(0,Y.Z)(),{coin:C}=(0,F.Z)(),j=(0,s.useMemo)(()=>y?null==d?void 0:d.permanentCoin:l==x.Oz.buy?null==d?void 0:d.possessionCoin:null==d?void 0:d.rentCoin,[y,null==d?void 0:d.permanentCoin,null==d?void 0:d.possessionCoin,null==d?void 0:d.rentCoin,l]),k=(0,s.useMemo)(()=>(null==C?void 0:C.coin)+(null==C?void 0:C.bonusCoin)+(null==C?void 0:C.freeCoin),[null==C?void 0:C.bonusCoin,null==C?void 0:C.coin,null==C?void 0:C.freeCoin]),S=(0,s.useMemo)(()=>{var e;return null==d?void 0:null===(e=d.paymentInfo)||void 0===e?void 0:e.paymentAsset},[null==d?void 0:null===(t=d.paymentInfo)||void 0===t?void 0:t.paymentAsset]);return(0,o.jsxs)(X,{autoHide:!0,children:[(0,o.jsxs)(G,{isDesktop:b,children:[(0,o.jsxs)(H,{isDesktop:b,children:[(0,o.jsx)(c.Z,{text:null==d?void 0:d.contentsTitle,size:b?14:16,weight:"medium"}),(0,o.jsxs)(V,{children:[(0,o.jsx)(K,{children:(0,o.jsx)(u.Z,{width:b?100:154,ratio:b?.6:94/154,alt:null==d?void 0:d.episodeTitle,src:(null==d?void 0:d.thumbnails)?null==d?void 0:null===(i=d.thumbnails[0])||void 0===i?void 0:i.imagePath:"",useFadeIn:!0})}),(0,o.jsxs)(W,{isDesktop:b,children:[(0,o.jsx)(c.Z,{text:null==d?void 0:d.episodeTitle,size:14,weight:"medium"}),(0,o.jsx)(c.Z,{text:N()(U.default.detail.coinFormat,{price:j}),size:12,color:R.Z.colors.primary})]})]}),(0,o.jsx)(a.Z,{text:l==x.Oz.buy?"##t.msg.purchase.episodePossessionInfo":"##t.msg.purchase.episodeRentInfo",size:b?10:12,color:R.Z.colors.Gray.B600})]}),(0,o.jsxs)(L,{isDesktop:b,children:[(0,o.jsx)(c.Z,{text:"##t.shop.payGuide",size:b?14:16,weight:"medium",margin:"0 0 8px 0"}),b?null:(0,o.jsx)(r.iz,{color:"#1b1b1b",margin:"8px 0 20px 0"}),(0,o.jsx)(O,{selectedMethod:p,setSelectedMethod:f,liHeight:3})]}),(0,o.jsxs)(q,{children:[(0,o.jsxs)(ee,{children:[(0,o.jsx)(c.Z,{text:U.default.detail.charge.paymentAmount,size:b?12:14,weight:"medium"}),(0,o.jsx)(Q,{text:I(null==d?void 0:null===(n=d.paymentInfo)||void 0===n?void 0:n.paymentPrice),size:b?20:24})]}),(0,o.jsxs)(et,{children:[(0,o.jsx)(c.Z,{text:N()(U.default.detail.charge.total_1,{purchaseCoin:j,myCoin:k}
1),size:b?12:14,color:"#676767"}),(0,o.jsx)(c.Z,{text:N()(U.default.detail.charge.total_2,{paymentCoin:S}),size:b?12:14,color:R.Z.colors.primary,margin:"0 0 0 3px"})]})]})]}),(0,o.jsx)(J,{isDesktop:b,children:(0,o.jsx)(B.Z,{isCheckCaution:h,setIsCheckCaution:m,isSaveMethod:g,setIsSaveMethod:w,methodItem:p,showPayCheckSection:!0,titleTextSize:b?12:14,noticeTextSize:b?10:14,checkTextSize:b?11:14,isBorder:!1,taxType:x.E_.dutyFree,isSmall:!0})})]})},eo=i(258),en=i(73400),es=i(37902),el=i(70682),ed=i(15566),er=i(28676),ea=i(69326);let ec=l.default.div.withConfig({componentId:"sc-418d1675-0"})(["position:relative;display:flex;flex-direction:column;"," background-color:#fff;overflow:hidden;"],e=>{let{isDesktop:t}=e;return t?(0,l.css)(["width:312px;height:448px;border-radius:12px;"]):(0,l.css)(["width:100vw;height:100vh;"])}),eu=l.default.div.withConfig({componentId:"sc-418d1675-1"})(["position:absolute;right:0;top:0;"]),ep=l.default.div.withConfig({componentId:"sc-418d1675-2"})(["padding:",";"],e=>{let{isDesktop:t}=e;return t?"0 30px":0}),ef=l.default.div.withConfig({componentId:"sc-418d1675-3"})(["position:fixed;z-index:500;display:flex;justify-content:center;background:#ffffff;color:#1b1b1b;",""],e=>{let{isDesktop:t}=e;return t?(0,l.css)(["width:252px;border-bottom:1px solid #1b1b1b;padding-top:35px;padding-bottom:10px;"]):(0,l.css)(["align-items:center;width:100%;height:50px;font-size:16px;border-bottom:1px solid #f5f5f5;"])}),eh=(0,l.default)(c.Z).attrs(e=>{let{theme:t}=e;return{size:16,color:t.colors.defaultText,weight:500,textAlign:"left"}}).withConfig({componentId:"sc-418d1675-4"})([""]),ex=l.default.div.withConfig({componentId:"sc-418d1675-5"})(["display:flex;justify-content:center;align-items:center;width:100%;cursor:pointer;"," background-color:#ff35ad;"],e=>{let{isDesktop:t}=e;return t?(0,l.css)(["border-bottom-left-radius:12px;border-bottom-right-radius:12px;min-height:48px;"]):(0,l.css)(["min-height:56px;font-size:16px;"])});var em=e=>{var t,i;let{onClose:l,purchaseType:d,contentAlias:r,epAlias:a,isPermanent:u}=e,p=(0,C.useRouter)(),f=(0,v.Ce)(),{accessToken:m}=(0,h.Z)(),{coin:g}=(0,F.Z)(),[y,b]=(0,s.useState)(null),[I,j]=(0,s.useState)(!1),{openScroll:k}
1=(0,ed.y)(),[S,Z]=(0,s.useState)(!1),[P,z]=(0,s.useState)(null),[M,D]=(0,s.useState)(!1),T=(0,s.useRef)(null),E=(0,s.useMemo)(()=>{var e;return null==y?void 0:null===(e=y.paymentInfo)||void 0===e?void 0:e.paymentAsset},[null==y?void 0:null===(t=y.paymentInfo)||void 0===t?void 0:t.paymentAsset]),_=(0,s.useMemo)(()=>g?(null==g?void 0:g.coin)+(null==g?void 0:g.bonusCoin)+(null==g?void 0:g.freeCoin):0,[g]),A=(0,s.useCallback)(()=>{if(!S){alert(U.default.shop.payment.nonCheckCautions);return}let e=0==d?x.Yc.rent:x.Yc.possession;u&&(e=x.Yc.permanent);let t={paymentId:"0",coinProductId:"",episodeId:null==y?void 0:y.episodeId.toString(),purchaseType:e,amount:y.paymentInfo.paymentPrice,paymentMenu:x.$e.episode,serviceId:"".concat(eo.default.API_HEADER_ID),accessToken:m.token,redirectUrl:"".concat("https://www.bomtoon.tw","/callback/payment"),couponId:"0",couponUserId:"0",shippingAddress:null};w.lX.is_app?t.platform=w.lX.platform_name:(t.platform=f?"WEB":"MOBILE",(0,en.setCookie)(null,es.$.platform,f?"WEB":"MOBILE",{maxAge:3600,path:"/"})),null!=P&&(t.paymentId=P.paymentProviderId.toString());let i=es.$.savePayMethodSingle;M?window.localStorage.setItem(i,JSON.stringify(P)):window.localStorage.removeItem(i),sessionStorage.setItem(es.$.episodePurchase,"Y"),sessionStorage.setItem(es.$.useReturnUrlPaymentFails,p.asPath),(0,ea.cP)({contentsId:y.contentsId}),T.current.onPayment(t,null!=f&&f),w.lX.is_android||l(),k()},[S,d,u,null==y?void 0:y.episodeId,null==y?void 0:null===(i=y.paymentInfo)||void 0===i?void 0:i.paymentPrice,null==y?void 0:y.contentsId,null==m?void 0:m.token,P,M,null==p?void 0:p.asPath,f,l,k]);return((0,s.useEffect)(()=>{if(!I&&m){let e=1==d?x.Yc.possession:x.Yc.rent;u&&(e=x.Yc.permanent),(0,er.cV)(r,a,m,e,"DETAIL").then(e=>{e.result&&(b(e.result),_<e.result.permanentCoin?j(!1):j(!0))})}},[m,I]),(0,s.useEffect)(()=>{try{let e=window.localStorage.getItem(es.$.savePayMethodSingle),t=JSON.parse(e);z(t)}catch(e){console.error(e)}},[]),m&&y)?(0,o.jsxs)(ec,{isDesktop:f,children:[(0,o.jsx)(ep,{isDesktop:f,children:(0,o.jsxs)(ef,{isDesktop:f,children:[(0,o.jsx)(eh,{text:"##t.detail.charge.title"}),f?null:(0,o.jsx)(eu,{children:(0,o.jsx)(n.P,{onPressed:l})})]})}),(0,o.jsx)(ei,{purchaseType:d,purchaseData:y,selectedMethod:P,setSelectedMethod:z,isCheckCaution:S,setIsCheckCaution:Z,isSaveMethod:M,setIsSaveMethod:D,isPermanent:u}),(0,o.jsx)(ex,{onClick:A,isDesktop:f,children:(0,o.jsx)(c.Z,{text:N()(U.default.detail.charge.chargeButton,{paymentCoin:E}),size:16,weight:"medium",color:"#fff",textAlign:"center"})}),(0,o.jsx)(el.Z,{flexUrl:null==P?void 0:P.paymentRequestUrl,paymentProviderName:null==P?void 0:P.paymentProviderName,ref:T})]}):null}}}]);
2//# sourceMappingURL=3489-47c03df373b25da1.js.map

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.