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D,EAAQ5H,eACtC0M,EAASc,gBAAiB,GAe9B,OAVIlB,IACW,SAATnK,IACFuK,EAASa,aAAe,GACxBb,EAASoB,kCAAmC,GAI9CpB,EAASQ,WAAa,IAGjBR","sources":["webpack://_N_E/./src/components/commons/popup/NoticeWholePurchaseInfoPopup.tsx","webpack://_N_E/./src/components/commons/popup/WholePurchaseInfoPopup.tsx","webpack://_N_E/./src/components/commons/popup/wholePurchasePopup/StoryGamePCPopupContainer.tsx","webpack://_N_E/./src/components/commons/popup/wholePurchasePopup/StoryGameMobilePopupContainer.tsx","webpack://_N_E/./src/components/commons/popup/wholePurchasePopup/StoryGameWholePurchaseInfoPopup.tsx","webpack://_N_E/./src/hooks/useCheckAdByRemoteConfig.ts","webpack://_N_E/./src/lib/firebase.ts","webpack://_N_E/./src/service/chapterListService.ts"],"sourcesContent":["import React from 'react';\nimport { useRouter } from 'next/router';\nimport useTranslation from 'next-translate/useTranslation';\nimport { css } from '@emotion/react';\nimport theme from '@styles/theme';\nimport WarningPopupContainer from '@components/commons/popup/container/WarningPopupContainer';\n\ninterface INoticeWholePurchaseInfoPopup {\n isShow: boolean;\n storyId?: number;\n onClose: () => void;\n}\n\nconst NoticeWholePurchaseInfoPopup = ({\n isShow,\n storyId = 0,\n onClose,\n}: INoticeWholePurchaseInfoPopup) => {\n const { t } = useTranslation();\n const router = useRouter();\n\n const handleContinueInAppButtonClick = async () => {\n await router.push({\n pathname: '/auth',\n query: {\n url: `/story/${storyId}`,\n },\n });\n onClose();\n };\n\n if (!isShow) {\n return null;\n }\n\n return (\n \n
\n
\n \n \n
\n
\n );\n};\n\nconst container = css`\n display: flex;\n flex-direction: column;\n align-items: center;\n font-family: 'Apple SD Gothic Neo';\n\n .content {\n width: 18.75rem;\n }\n\n .app-button {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 1.5em;\n width: 100%;\n height: 3.25em;\n cursor: pointer;\n background-color: ${theme.colors.primary500};\n color: ${theme.colors.white};\n font-weight: 700;\n line-height: 1.375em;\n border-radius: 0.5em;\n font-size: 1em;\n }\n\n .web-button {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-top: 1em;\n font-weight: 400;\n width: 100%;\n font-size: 0.875em;\n color: ${theme.colors.primary500};\n line-height: 1.375em;\n cursor: pointer;\n }\n`;\n\nexport default NoticeWholePurchaseInfoPopup;\n","import React, { useEffect, useState } from 'react';\nimport useTranslation from 'next-translate/useTranslation';\nimport { useRouter } from 'next/router';\nimport { useMutation } from '@apollo/client';\n\nimport theme from '@styles/theme';\nimport { css } from '@emotion/react';\nimport {\n SaleIcon,\n TimeIcon,\n AutoRenewIcon,\n HourGlassIcon,\n CoinColorIcon,\n} from 'public/assets';\nimport { PURCHASE_STORY } from '@api/story';\nimport FullScreenPopupContainer from './container/FullScreenPopupContainer';\nimport { useGetUserQuery } from '@/operations/queries/user/__generated__/getUser.generated';\n\nimport {\n payTicketAll,\n viewPurchaseStoryPopup,\n touchPurchaseStoryPopup,\n viewAllChapterPurchasePopup,\n payTicketForStory,\n} from '@lib/eventManager';\nimport { Story_Play_Type } from '@/baseType';\nimport { useAppDispatch } from '@/store/hooks';\nimport { alertMessage, setToastMessage } from '@/slices/alertSlice';\nimport { SERVER_ERROR_CODE, STORAGE_KEY } from '@/common/values';\n\nimport SPImage from '../image/SPImage';\nimport NoticeWholePurchaseInfoPopup from './NoticeWholePurchaseInfoPopup';\n\ninterface IWholePurchaseInfoPopup {\n storyName?: string;\n storyId?: number;\n chapterIndex?: number;\n originalCoin?: number;\n lastPreviewChapterIndex?: number;\n storyCoin: number;\n isShow: boolean;\n onClose: () => void;\n nextChapterId?: number;\n storyBundleId?: number;\n storyLanguage?: string;\n storyGenre?: string;\n playType?: Story_Play_Type;\n coverImage?: string;\n discountRate: number;\n hasAdultChapter: boolean;\n}\n\ninterface IBenefitItem {\n icon: 'sale' | 'time' | 'autoRenew' | 'hourGlass';\n topText: string;\n bottomText: string;\n delay: number;\n}\n\nconst BenefitItem = ({ icon, topText, bottomText, delay }: IBenefitItem) => {\n return (\n
\n {icon === 'sale' ? (\n \n ) : icon === 'time' ? (\n \n ) : icon === 'autoRenew' ? (\n \n ) : (\n \n )}\n
\n

{topText}

\n

{bottomText}

\n
\n
\n );\n};\n\nconst WholePurchaseInfoPopup = ({\n storyName,\n storyId,\n storyCoin,\n chapterIndex,\n originalCoin,\n lastPreviewChapterIndex,\n isShow,\n onClose,\n nextChapterId,\n storyBundleId,\n storyLanguage,\n storyGenre,\n playType,\n coverImage,\n discountRate,\n hasAdultChapter,\n}: IWholePurchaseInfoPopup) => {\n const { t } = useTranslation();\n const router = useRouter();\n const dispatch = useAppDispatch();\n\n const [\n showNoticeWholePurchaseInfoPopup,\n setShowNoticeWholePurchaseInfoPopup,\n ] = useState(false);\n const { data: userData } = useGetUserQuery();\n\n const [purchaseStoryMutate] = useMutation<{\n purchaseStory: { ok: number };\n }>(PURCHASE_STORY, {\n onCompleted: (data) => {\n if (data.purchaseStory.ok === 1) {\n router.reload();\n onClose();\n payTicketAll({\n storyId: storyId,\n ticketCount: storyCoin,\n storyNameAndChapterIndex: `${storyName}_${chapterIndex}`,\n });\n payTicketForStory({\n amount: storyCoin,\n storyId: storyId || 0,\n storyBundleId,\n storyName: storyName || '',\n storyLanguage,\n storyGenre,\n playType:\n playType === Story_Play_Type.Interactive ? 'interactive' : 'novel',\n });\n // nextChapter 아이디 정보가 있으면 다음화로 이동, 없으면 작품상세화면으로 이동.\n // TODO: 로직 개선 필요\n if (nextChapterId) {\n router.replace({\n pathname: `/chatstory/${nextChapterId}`,\n query: {\n prevScreen: 'chat',\n },\n });\n } else {\n router.replace(`/story/${storyId}`);\n }\n } else {\n onClose();\n dispatch(\n alertMessage({\n message: t('common_popup_description_error_occurred'),\n type: 'warning',\n }),\n );\n }\n },\n onError: (error) => {\n onClose();\n if (\n error.message.includes(SERVER_ERROR_CODE.ADULT_VERIFICATION_REQUIRED)\n ) {\n dispatch(\n setToastMessage(t('payment_toast_all_chapter_19_chapter_included')),\n );\n\n const redirectInfo = JSON.stringify({\n redirectUrl: `/story/${storyId}`,\n createdAt: new Date(),\n });\n localStorage.setItem(STORAGE_KEY.REDIRECT_INFO, redirectInfo);\n\n router.replace({\n pathname: `/adult`,\n query: {\n url: `/story/${storyId}`,\n storyId,\n },\n });\n return;\n }\n dispatch(setToastMessage(t('common_popup_description_error_occurred')));\n },\n });\n\n useEffect(() => {\n if (!isShow) return;\n\n viewPurchaseStoryPopup({\n storyName,\n storyId,\n fullPrice: originalCoin,\n price: storyCoin,\n userCoin: userData?.getUser?.currentCoin,\n });\n\n viewAllChapterPurchasePopup({\n storyName,\n storyId: String(storyId),\n fullCoin: originalCoin,\n coin: storyCoin,\n lastPreviewChapterIndex,\n purchasedChapter: storyCoin,\n contentType: 'interactive',\n });\n }, [isShow]);\n\n const onPurchase = async () => {\n touchPurchaseStoryPopup({\n storyName,\n storyId,\n fullPrice: originalCoin,\n price: storyCoin,\n userCoin: userData?.getUser?.currentCoin,\n });\n\n if (userData?.getUser?.isAnonymous) {\n setShowNoticeWholePurchaseInfoPopup(true);\n return;\n }\n\n if (\n hasAdultChapter &&\n !userData?.getUser?.certificatedAt &&\n userData?.getUser?.isExpiredCertification\n ) {\n dispatch(\n setToastMessage(t('payment_toast_all_chapter_19_chapter_included')),\n );\n const redirectInfo = JSON.stringify({\n redirectUrl: `/story/${storyId}`,\n createdAt: new Date(),\n });\n localStorage.setItem(STORAGE_KEY.REDIRECT_INFO, redirectInfo);\n\n await router.push({\n pathname: '/adult',\n query: {\n url: `/story/${storyId}`,\n storyId,\n },\n });\n onClose();\n return;\n }\n\n if ((userData?.getUser?.currentCoin || 0) < storyCoin) {\n const redirectInfo = JSON.stringify({\n redirectUrl: `/story/${storyId}`,\n createdAt: new Date(),\n });\n localStorage.setItem(STORAGE_KEY.REDIRECT_INFO, redirectInfo);\n\n await router.push({\n pathname: '/store',\n query: {\n coin: storyCoin,\n url: `/story/${storyId}`,\n },\n });\n onClose();\n return;\n }\n\n purchaseStoryMutate({\n variables: {\n storyId: storyId,\n price: storyCoin,\n },\n });\n };\n\n if (!isShow) {\n return null;\n }\n\n return (\n \n
\n
\n
\n
\n {coverImage && (\n \n )}\n
\n
\n
\n

\n {t('store_screen_label_benefit_unlimited_pass')}\n

\n

\n {t('storydetail_popup_label_purchase_now_benefit', {\n storyName,\n })}\n

\n
\n
\n
\n
\n \n \n \n \n
\n {/* TODO: 공통 Button 컴포넌트 사용하기 */}\n
\n \n
\n
\n {\n onClose();\n setShowNoticeWholePurchaseInfoPopup(false);\n }}\n />\n \n );\n};\n\nconst container = css`\n width: 100%;\n display: flex;\n flex-direction: column;\n color: ${theme.colors.white};\n font-family: 'Apple SD Gothic Neo';\n align-items: center;\n justify-content: center;\n font-size: 18px;\n height: 100%;\n\n .cover {\n width: 100%;\n\n .image-wrapper {\n position: absolute;\n top: 0;\n width: 100%;\n height: 375px;\n }\n\n .dark-layer {\n position: absolute;\n width: 800px;\n z-index: 1;\n\n @media screen and (max-width: ${theme.devices.mobile}) {\n width: 100%;\n }\n }\n\n .dark-layer.top {\n top: 0;\n height: 124px;\n background: linear-gradient(\n 180deg,\n rgba(37, 37, 38, 0.6) 0%,\n rgba(37, 37, 38, 0) 100%\n );\n }\n\n .dark-layer.bottom {\n top: 158px;\n display: flex;\n justify-content: center;\n height: 217px;\n background: linear-gradient(180deg, rgba(36, 37, 38, 0) 0%, #1a1a1a 100%);\n\n .title-wrapper {\n position: absolute;\n bottom: -1.875em;\n display: flex;\n align-items: center;\n flex-direction: column;\n gap: 0.5em;\n\n .title {\n font-weight: 700;\n font-size: 1.5em;\n line-height: 28px;\n }\n\n .description {\n font-weight: 400;\n font-size: 0.8125em;\n line-height: 18px;\n }\n }\n }\n }\n\n .benefit-list {\n flex-direction: column;\n position: absolute;\n top: 405px;\n display: flex;\n justify-content: center;\n height: calc(100vh - 421px);\n min-height: 514px;\n padding: 0 1em 72px;\n }\n\n .button-wrapper {\n position: fixed;\n bottom: 0;\n z-index: 1;\n display: flex;\n margin: 1.25em 1em;\n\n .whole-purchase-button {\n flex-basis: 100%;\n width: calc(800px - 2.5em);\n height: 52px;\n border-radius: 0.375em;\n font: ${theme.font.body1Bold};\n cursor: pointer;\n background-color: ${theme.colors.primary500};\n color: ${theme.colors.white};\n border: 0.0625em solid ${theme.colors.primary500};\n\n .whole-purchase-button-text {\n display: flex;\n justify-content: center;\n gap: 0.25em;\n }\n\n @media screen and (max-width: ${theme.devices.mobile}) {\n width: calc(100vw - 2em);\n }\n }\n }\n\n @media screen and (max-width: ${theme.devices.mobile}) {\n font-size: 16px;\n }\n`;\n\nconst benefitItemWrapper = ({ delay }: { delay: number }) => css`\n display: flex;\n gap: 1em;\n margin-bottom: 1.25em;\n animation: up ${delay}s ease-out;\n\n &:last-child {\n margin-bottom: 0;\n }\n\n .icon {\n flex-shrink: 0;\n }\n\n .benefit-text {\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n\n .top-text {\n font-weight: 400;\n font-size: 0.8125em;\n line-height: 1.125em;\n }\n\n .bottom-text {\n font-weight: 700;\n font-size: 1em;\n line-height: 1.375em;\n }\n }\n\n @keyframes up {\n 0% {\n transform: translateY(200px);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n`;\n\nexport default WholePurchaseInfoPopup;\n","import React from 'react';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport theme from '@styles/theme';\nimport { css } from '@emotion/react';\nimport { Coin1Icon, NavCloseBtn } from 'public/assets';\n\nimport { insertCommas } from '@/common/utils';\nimport { CoinProductFragment } from '@/operations/queries/story/__generated__/useGetStoryGameDetail.generated';\nimport SPImage from '../../image/SPImage';\n\nimport {\n StorygameAutorenewIcon,\n StorygameHourglassIcon,\n StorygameSaleIcon,\n StorygameTimeIcon,\n} from 'public/assets';\n\ninterface IStoryGameBenefitItem {\n icon: 'sale' | 'time' | 'autoRenew' | 'hourGlass';\n text: string;\n delay: number;\n}\n\nconst StoryGameBenefitItem = ({ icon, text, delay }: IStoryGameBenefitItem) => {\n return (\n
\n
\n {icon === 'sale' ? (\n \n ) : icon === 'time' ? (\n \n ) : icon === 'autoRenew' ? (\n \n ) : (\n \n )}\n
\n
\n

{text}

\n
\n
\n );\n};\n\ninterface IStoryGamePCPopupContainer {\n storyName?: string;\n originalCoin?: number;\n storyCoin: number;\n onClose: () => void;\n coverImage?: string;\n discountRate: number;\n coinProduct?: CoinProductFragment | null;\n onPurchase: () => void;\n}\n\nconst StoryGamePCPopupContainer = ({\n storyName,\n storyCoin,\n originalCoin,\n onClose,\n coverImage,\n discountRate,\n coinProduct,\n onPurchase,\n}: IStoryGamePCPopupContainer) => {\n const { t } = useTranslation();\n\n return (\n
\n
\n
\n \n
\n
\n
\n {coverImage && (\n \n )}\n
\n
\n

{storyName}

\n

\n {t('store_screen_label_benefit_unlimited_pass')}\n

\n

\n {t('storydetail_popup_label_purchase_now_benefit', {\n storyName,\n })}\n

\n
\n
\n
\n
\n \n \n \n \n
\n
\n
Total
\n
\n {coinProduct ? (\n <>\n {coinProduct.price /\n (coinProduct.originalPrice || coinProduct.price) !==\n 1 && (\n <>\n
\n -\n {(coinProduct.price /\n (coinProduct.originalPrice || coinProduct.price)) *\n 100}\n %\n
\n
\n

\n {insertCommas(coinProduct.originalPrice)}\n

\n
\n \n )}\n
\n

\n {t('payment_screen_description_price_monetary_unit', {\n value: insertCommas(coinProduct.price),\n })}\n

\n
\n \n ) : (\n <>\n {storyCoin / (originalCoin || storyCoin) !== 1 && (\n <>\n
\n -{(storyCoin / (originalCoin || storyCoin)) * 100}%\n
\n
\n \n

{originalCoin}

\n
\n \n )}\n
\n \n

{storyCoin}

\n
\n \n )}\n
\n
\n \n
\n
\n
\n );\n};\n\nconst container = css`\n width: 26.25rem;\n display: flex;\n flex-direction: column;\n color: ${theme.colors.white};\n align-items: center;\n height: 100%;\n background: black;\n position: relative;\n\n .back-icon {\n position: absolute;\n bottom: -50px;\n z-index: 100;\n left: 50%;\n transform: translateX(-50%);\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.1);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .header {\n height: 3rem;\n position: fixed;\n display: flex;\n justify-content: center;\n align-items: center;\n color: #fff;\n text-align: center;\n ${theme.fontV3.body.body02Medium}\n }\n\n .content-wrapper {\n background: rgba(255, 255, 255, 0.1);\n width: 100%;\n height: 100%;\n z-index: 1;\n border-bottom-left-radius: 0.5rem;\n border-bottom-right-radius: 0.5rem;\n }\n\n .cover {\n width: 100%;\n padding-bottom: 0.75rem;\n\n .image-wrapper {\n position: relative;\n width: 26.25rem;\n padding-bottom: 70%;\n\n img {\n border-top-left-radius: 0.5rem;\n border-top-right-radius: 0.5rem;\n }\n }\n\n .title-wrapper {\n margin-top: 1rem;\n width: 100%;\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n gap: 0.5em;\n backdrop-filter: blur(8px);\n padding: 0 1.5rem;\n\n .story-name {\n color: #9457eb;\n ${theme.fontV3.body.body04Reg}\n }\n\n .title {\n color: #fff;\n ${theme.fontV3.body.body02Medium}\n }\n\n .description {\n color: rgba(255, 255, 255, 0.5);\n ${theme.fontV3.body.body06Reg}\n }\n }\n }\n\n .benefit-list {\n align-self: flex-start;\n flex-direction: column;\n width: 100%;\n backdrop-filter: blur(8px);\n padding: 0 1.5rem;\n border-bottom-left-radius: 0.5rem;\n border-bottom-right-radius: 0.5rem;\n\n .scroll-area {\n overflow-y: scroll;\n margin-bottom: 1.5rem;\n }\n\n ::-webkit-scrollbar {\n display: none;\n }\n }\n\n .dark-layer {\n position: fixed;\n bottom: env(safe-area-inset-bottom);\n width: 100vw;\n flex-direction: column;\n align-items: center;\n background: linear-gradient(0deg, #000 75%, rgba(0, 0, 0, 0) 100%);\n z-index: 1;\n }\n\n .price {\n display: flex;\n justify-content: space-between;\n color: rgba(255, 255, 255, 0.5);\n margin-bottom: 16px;\n ${theme.fontV3.body.body04Reg}\n\n .price-right-wrapper {\n display: flex;\n align-items: center;\n\n .discount-percent {\n width: 100%;\n height: 1.0625rem;\n padding: 0.125rem 0.25rem;\n border-radius: 0.125rem;\n background: #ff3a58;\n color: #fff;\n text-align: center;\n ${theme.fontV3.body.caption02Reg}\n }\n\n .coin-wrapper {\n display: flex;\n justify-content: center;\n align-center: center;\n margin-left: 0.375rem;\n\n .coin-number {\n padding-top: 2px;\n color: white;\n }\n }\n\n .coin-wrapper.origin {\n opacity: 0.5;\n text-decoration: line-through;\n }\n\n .coin-wrapper.discount {\n flex-shrink: 0;\n }\n }\n }\n\n .whole-purchase-button {\n width: 23.25rem;\n height: 3rem;\n border-radius: 0.375em;\n cursor: pointer;\n background-color: ${theme.colors.primary500};\n color: ${theme.colors.white};\n border: 0.0625em solid ${theme.colors.primary500};\n ${theme.fontV3.body.body03Reg}\n margin-bottom: 1.5rem;\n\n .whole-purchase-button-text {\n display: flex;\n justify-content: center;\n gap: 0.25em;\n }\n }\n`;\n\nconst benefitItemWrapper = ({ delay }: { delay: number }) => css`\n display: flex;\n gap: 1.5rem;\n padding: 0.75rem 1rem;\n animation: up ${delay}s ease-out;\n align-items: center;\n margin-bottom: 0.375rem;\n border-radius: 0.375rem;\n background: rgba(255, 255, 255, 0.05);\n\n .icon-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n &:last-child {\n margin-bottom: 0;\n }\n\n .icon {\n flex-shrink: 0;\n }\n\n .benefit-text {\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n color: rgba(255, 255, 255, 0.75);\n padding-top: 0.0625rem;\n\n .text {\n color: rgba(255, 255, 255, 0.75);\n ${theme.fontV3.body.body04Reg}\n }\n }\n\n @keyframes up {\n 0% {\n transform: translateY(200px);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n`;\n\nexport default StoryGamePCPopupContainer;\n","import React from 'react';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport theme from '@styles/theme';\nimport { css } from '@emotion/react';\nimport {\n Coin1Icon,\n StorygameSaleIconMobile,\n StorygameTimeIconMobile,\n StorygameAutorenewIconMobile,\n StorygameHourglassIconMobile,\n NavCloseBtn,\n} from 'public/assets';\n\nimport { insertCommas } from '@/common/utils';\nimport { CoinProductFragment } from '@/operations/queries/story/__generated__/useGetStoryGameDetail.generated';\nimport SPImage from '../../image/SPImage';\n\ninterface IMobilePopupContainer {\n storyName?: string;\n originalCoin?: number;\n storyCoin: number;\n onClose: () => void;\n coverImage?: string;\n discountRate: number;\n coinProduct?: CoinProductFragment | null;\n onPurchase: () => void;\n}\n\ninterface IStoryGameBenefitItem {\n icon: 'sale' | 'time' | 'autoRenew' | 'hourGlass';\n text: string;\n delay: number;\n}\n\nconst StoryGameBenefitItem = ({ icon, text, delay }: IStoryGameBenefitItem) => {\n return (\n
\n
\n {icon === 'sale' ? (\n \n ) : icon === 'time' ? (\n \n ) : icon === 'autoRenew' ? (\n \n ) : (\n \n )}\n
\n
\n

{text}

\n
\n
\n );\n};\n\nconst StoryGameMobilePopupContainer = ({\n storyName,\n storyCoin,\n originalCoin,\n onClose,\n coverImage,\n discountRate,\n coinProduct,\n onPurchase,\n}: IMobilePopupContainer) => {\n const { t } = useTranslation();\n\n return (\n
\n
\n \n
\n
\n
\n {coverImage && (\n \n )}\n
\n
\n

{storyName}

\n

\n {t('store_screen_label_benefit_unlimited_pass')}\n

\n

\n {t('storydetail_popup_label_purchase_now_benefit', {\n storyName,\n })}\n

\n
\n
\n
\n \n \n \n \n
\n
\n
\n
\n
Total
\n
\n {coinProduct ? (\n <>\n {coinProduct.price /\n (coinProduct.originalPrice || coinProduct.price) !==\n 1 && (\n <>\n
\n -\n {(coinProduct.price /\n (coinProduct.originalPrice || coinProduct.price)) *\n 100}\n %\n
\n
\n

\n {insertCommas(coinProduct.originalPrice)}\n

\n
\n \n )}\n
\n

\n {t('payment_screen_description_price_monetary_unit', {\n value: insertCommas(coinProduct.price),\n })}\n

\n
\n \n ) : (\n <>\n {storyCoin / (originalCoin || storyCoin) !== 1 && (\n <>\n
\n -{(storyCoin / (originalCoin || storyCoin)) * 100}%\n
\n
\n \n

{originalCoin}

\n
\n \n )}\n
\n \n

{storyCoin}

\n
\n \n )}\n
\n
\n \n
\n
\n );\n};\n\nconst mobileContainer = css`\n width: 100%;\n display: flex;\n flex-direction: column;\n color: ${theme.colors.white};\n align-items: center;\n height: 100%;\n overflow: hidden;\n background: black;\n padding: 0 1.5rem;\n\n .header {\n height: 3rem;\n position: fixed;\n display: flex;\n align-items: center;\n color: #fff;\n }\n\n .cover {\n width: 100%;\n padding-bottom: 0.75rem;\n padding-top: 0.625rem;\n\n .image-wrapper {\n position: relative;\n width: 100%;\n padding-bottom: 70%;\n border-radius: 0.5rem;\n\n img {\n border-radius: 0.5rem;\n }\n }\n\n .title-wrapper {\n margin-top: 12px;\n width: 100%;\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n gap: 0.5em;\n backdrop-filter: blur(8px);\n\n .story-name {\n color: #9457eb;\n ${theme.fontV3.body.body04Reg}\n }\n\n .title {\n color: #fff;\n ${theme.fontV3.body.body02Medium}\n }\n\n .description {\n color: rgba(255, 255, 255, 0.5);\n ${theme.fontV3.body.body06Reg}\n }\n }\n }\n\n .benefit-list {\n width: 100%;\n align-self: flex-start;\n flex-direction: column;\n display: flex;\n padding-bottom: 8.5rem;\n overflow-y: scroll;\n backdrop-filter: blur(8px);\n height: 15.625rem;\n\n ::-webkit-scrollbar {\n display: none;\n }\n }\n\n .dark-layer {\n position: fixed;\n bottom: env(safe-area-inset-bottom);\n width: 100vw;\n height: 8.5rem;\n flex-direction: column;\n align-items: center;\n background: linear-gradient(0deg, #000 75%, rgba(0, 0, 0, 0) 100%);\n z-index: 1;\n }\n\n .button-wrapper {\n width: 100%;\n padding: 0 1.5rem;\n position: fixed;\n bottom: env(safe-area-inset-bottom);\n z-index: 1;\n display: flex;\n margin: 1.25em 1em;\n flex-direction: column;\n\n .price {\n display: flex;\n justify-content: space-between;\n color: rgba(255, 255, 255, 0.5);\n margin-bottom: 16px;\n ${theme.fontV3.body.body04Reg}\n\n .price-right-wrapper {\n display: flex;\n align-items: center;\n\n .discount-percent {\n width: 100%;\n height: 1.0625rem;\n padding: 0.125rem 0.25rem;\n border-radius: 0.125rem;\n background: #ff3a58;\n color: #fff;\n text-align: center;\n ${theme.fontV3.body.caption02Reg}\n }\n\n .coin-wrapper {\n display: flex;\n justify-content: center;\n align-center: center;\n margin-left: 0.375rem;\n\n .coin-number {\n padding-top: 2px;\n color: white;\n }\n }\n\n .coin-wrapper.origin {\n opacity: 0.5;\n text-decoration: line-through;\n }\n\n .coin-wrapper.discount {\n flex-shrink: 0;\n }\n }\n }\n\n .whole-purchase-button {\n width: 100%;\n height: 3rem;\n border-radius: 0.375em;\n cursor: pointer;\n background-color: ${theme.colors.primary500};\n color: ${theme.colors.white};\n border: 0.0625em solid ${theme.colors.primary500};\n ${theme.fontV3.body.body03Reg}\n\n .whole-purchase-button-text {\n display: flex;\n justify-content: center;\n gap: 0.25em;\n }\n }\n }\n`;\n\nconst benefitItemWrapper = ({ delay }: { delay: number }) => css`\n display: flex;\n gap: 1.5rem;\n padding: 0.75rem 1rem;\n animation: up ${delay}s ease-out;\n align-items: center;\n margin-bottom: 0.375rem;\n border-radius: 0.375rem;\n background: rgba(255, 255, 255, 0.05);\n\n .icon-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n &:last-child {\n margin-bottom: 0;\n }\n\n .icon {\n flex-shrink: 0;\n }\n\n .benefit-text {\n display: flex;\n flex-direction: column;\n gap: 0.5em;\n color: rgba(255, 255, 255, 0.75);\n padding-top: 0.0625rem;\n\n .text {\n color: rgba(255, 255, 255, 0.75);\n ${theme.fontV3.body.body04Reg}\n }\n }\n\n @keyframes up {\n 0% {\n transform: translateY(200px);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n`;\n\nexport default StoryGameMobilePopupContainer;\n","import React, { useEffect, useState } from 'react';\nimport useTranslation from 'next-translate/useTranslation';\nimport { useRouter } from 'next/router';\nimport { useMutation } from '@apollo/client';\n\nimport { css } from '@emotion/react';\nimport { PURCHASE_STORY } from '@api/story';\nimport FullScreenPopupContainer from '../container/FullScreenPopupContainer';\nimport { useGetUserQuery } from '@/operations/queries/user/__generated__/getUser.generated';\n\nimport {\n payTicketAll,\n viewPurchaseStoryPopup,\n touchPurchaseStoryPopup,\n viewAllChapterPurchasePopup,\n payTicketForStory,\n} from '@lib/eventManager';\nimport { Story_Play_Type } from '@/baseType';\nimport { useAppDispatch } from '@/store/hooks';\nimport { alertMessage, setToastMessage } from '@/slices/alertSlice';\nimport { SERVER_ERROR_CODE, STORAGE_KEY } from '@/common/values';\n\nimport NoticeWholePurchaseInfoPopup from '../NoticeWholePurchaseInfoPopup';\nimport { isMobileDevice } from '@/common/utils';\nimport {\n updateUserForApp,\n goAdultCertForApp,\n goStoreForApp,\n showToastForApp,\n} from '@/lib/webview';\nimport { CoinProductFragment } from '@/operations/queries/story/__generated__/useGetStoryGameDetail.generated';\nimport StoryGamePCPopupContainer from './StoryGamePCPopupContainer';\nimport StoryGameMobilePopupContainer from './StoryGameMobilePopupContainer';\nimport theme from '@/styles/theme';\nimport Image from 'next/image';\n\ninterface IWholePurchaseInfoPopup {\n storyName?: string;\n storyId?: number;\n chapterIndex?: number;\n originalCoin?: number;\n lastPreviewChapterIndex?: number;\n storyCoin: number;\n isShow: boolean;\n onClose: () => void;\n storyBundleId?: number;\n storyLanguage?: string;\n storyGenre?: string;\n playType?: Story_Play_Type;\n coverImage?: string;\n discountRate: number;\n hasAdultChapter: boolean;\n coinProduct?: CoinProductFragment | null;\n}\n\nconst StoryGameWholePurchaseInfoPopup = ({\n storyName,\n storyId,\n storyCoin,\n chapterIndex,\n originalCoin,\n lastPreviewChapterIndex,\n isShow,\n onClose,\n storyBundleId,\n storyLanguage,\n storyGenre,\n playType,\n coverImage,\n discountRate,\n hasAdultChapter,\n coinProduct,\n}: IWholePurchaseInfoPopup) => {\n const { t } = useTranslation();\n const router = useRouter();\n const dispatch = useAppDispatch();\n\n const [\n showNoticeWholePurchaseInfoPopup,\n setShowNoticeWholePurchaseInfoPopup,\n ] = useState(false);\n const { data: userData } = useGetUserQuery();\n\n const [purchaseStoryMutate] = useMutation<{\n purchaseStory: { ok: number };\n }>(PURCHASE_STORY, {\n onCompleted: (data) => {\n if (data.purchaseStory.ok === 1) {\n router.reload();\n isMobileDevice() && updateUserForApp();\n onClose();\n payTicketAll({\n storyId: storyId,\n ticketCount: storyCoin,\n storyNameAndChapterIndex: `${storyName}_${chapterIndex}`,\n });\n payTicketForStory({\n amount: storyCoin,\n storyId: storyId || 0,\n storyBundleId,\n storyName: storyName || '',\n storyLanguage,\n storyGenre,\n playType: 'storygame',\n });\n router.replace(`/story/${storyId}`);\n } else {\n onClose();\n dispatch(\n alertMessage({\n message: t('common_popup_description_error_occurred'),\n type: 'warning',\n }),\n );\n }\n },\n onError: (error) => {\n onClose();\n if (\n error.message.includes(SERVER_ERROR_CODE.ADULT_VERIFICATION_REQUIRED)\n ) {\n if (isMobileDevice()) {\n showToastForApp(t('payment_toast_all_chapter_19_chapter_included'));\n goAdultCertForApp({ callbackScreenType: 'story' });\n } else {\n dispatch(\n setToastMessage(t('payment_toast_all_chapter_19_chapter_included')),\n );\n\n const redirectInfo = JSON.stringify({\n redirectUrl: `/story/${storyId}`,\n createdAt: new Date(),\n });\n localStorage.setItem(STORAGE_KEY.REDIRECT_INFO, redirectInfo);\n\n router.replace({\n pathname: `/adult`,\n query: {\n url: `/story/${storyId}`,\n storyId,\n },\n });\n }\n return;\n }\n dispatch(setToastMessage(t('common_popup_description_error_occurred')));\n },\n });\n\n useEffect(() => {\n if (!isShow) return;\n\n viewPurchaseStoryPopup({\n storyName,\n storyId,\n fullPrice: originalCoin,\n price: storyCoin,\n userCoin: userData?.getUser?.currentCoin,\n });\n\n viewAllChapterPurchasePopup({\n storyName,\n storyId: String(storyId),\n fullCoin: originalCoin,\n coin: storyCoin,\n lastPreviewChapterIndex,\n purchasedChapter: storyCoin,\n contentType: 'interactive',\n });\n }, [isShow]);\n\n const onPurchase = async () => {\n touchPurchaseStoryPopup({\n storyName,\n storyId,\n fullPrice: originalCoin,\n price: storyCoin,\n userCoin: userData?.getUser?.currentCoin,\n });\n\n if (userData?.getUser?.isAnonymous && !coinProduct) {\n setShowNoticeWholePurchaseInfoPopup(true);\n return;\n }\n\n if (\n hasAdultChapter &&\n !userData?.getUser?.certificatedAt &&\n userData?.getUser?.isExpiredCertification\n ) {\n if (isMobileDevice()) {\n showToastForApp(t('payment_toast_all_chapter_19_chapter_included'));\n goAdultCertForApp({ callbackScreenType: 'story' });\n } else {\n dispatch(\n setToastMessage(t('payment_toast_all_chapter_19_chapter_included')),\n );\n const redirectInfo = JSON.stringify({\n redirectUrl: `/story/${storyId}`,\n createdAt: new Date(),\n });\n localStorage.setItem(STORAGE_KEY.REDIRECT_INFO, redirectInfo);\n\n await router.push({\n pathname: '/adult',\n query: {\n url: `/story/${storyId}`,\n storyId,\n },\n });\n }\n onClose();\n return;\n }\n\n if ((userData?.getUser?.currentCoin || 0) < storyCoin) {\n const redirectInfo = JSON.stringify({\n redirectUrl: `/story/${storyId}`,\n createdAt: new Date(),\n });\n if (isMobileDevice()) {\n goStoreForApp({ callbackScreenType: 'story' });\n } else {\n localStorage.setItem(STORAGE_KEY.REDIRECT_INFO, redirectInfo);\n\n // 통구매 작품 상품 정보가 있으면 payment로 바로 보내기\n if (coinProduct) {\n await router.push({\n pathname: '/payment',\n query: {\n inappCoinId: coinProduct.inappCoinId,\n storyProductId: storyId,\n url: `/story/${storyId}`,\n },\n });\n } else {\n await router.push({\n pathname: '/store',\n query: {\n coin: storyCoin,\n url: `/story/${storyId}`,\n },\n });\n }\n }\n onClose();\n return;\n }\n\n purchaseStoryMutate({\n variables: {\n storyId: storyId,\n price: storyCoin,\n },\n });\n };\n\n if (!isShow) {\n return null;\n }\n\n return (\n \n
\n
\n {coverImage && (\n \n )}\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n {\n onClose();\n setShowNoticeWholePurchaseInfoPopup(false);\n }}\n />\n \n );\n};\n\nconst wrapper = css`\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n\n .pc {\n display: block;\n }\n .mobile {\n display: none;\n width: 100%;\n }\n\n @media screen and (max-width: ${theme.devices.mobile}) {\n .pc {\n display: none;\n }\n .mobile {\n display: block;\n }\n }\n`;\nconst backgroundImage = css`\n position: absolute;\n cursor: pointer;\n object-fit: fill;\n width: 100vw;\n height: 100%;\n top: 0;\n background: black;\n\n .background-image-wrapper {\n position: absolute;\n width: 100vw;\n height: calc(100vw * 9 / 16);\n opacity: 0.25;\n }\n\n .dimmed {\n position: absolute;\n top: 0;\n width: 100vw;\n height: calc(100vw * 9 / 16);\n background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 57.01%);\n backdrop-filter: blur(8px);\n }\n`;\n\nconst popupWrapper = css`\n width: 100vw;\n display: flex;\n justify-content: center;\n\n .header {\n width: 100%;\n padding: initial;\n height: 3rem;\n display: flex;\n align-items: center;\n padding: 0.75rem 1.5rem;\n position: relative;\n\n .back-icon {\n position: absolute;\n left: 1.5rem;\n top: 0.75rem;\n }\n }\n`;\n\nexport default StoryGameWholePurchaseInfoPopup;\n","import { useEffect, useState, useMemo } from 'react';\nimport { checkAdEnabled } from '@service/chapterListService';\nimport { RootState } from '@store/store';\nimport { useAppSelector, useAppDispatch } from '@store/hooks';\nimport { STORAGE_KEY } from '@common/values';\nimport { setAdInfo } from '@/slices/chatChapterSlice';\nimport {\n useGetAdInfoChapterQuery,\n useGetAdInfoStoryQuery,\n useGetAdInfoUserQuery,\n} from '@/operations/queries/novelChapter/__generated__/useGetAdInfo.generated';\nimport { isMobileDevice } from '@/common/utils';\n\ninterface IChapterAd {\n storyId?: number;\n chapterId?: number;\n}\n\nconst getWatchedAdChapterId = () => {\n return (\n typeof window !== 'undefined' &&\n sessionStorage.getItem(STORAGE_KEY.WATCHED_AD_CHAPTER_ID)\n );\n};\n\nconst useCheckAdByRemoteConfig = ({ storyId, chapterId }: IChapterAd) => {\n const {\n data: userData,\n error: userError,\n loading: userLoading,\n } = useGetAdInfoUserQuery({\n fetchPolicy: 'network-only',\n });\n const {\n data: chapterData,\n error: chapterError,\n loading: chapterLoading,\n } = useGetAdInfoChapterQuery({\n variables: {\n chapterId: chapterId!,\n },\n skip: !chapterId,\n fetchPolicy: 'no-cache',\n });\n const {\n data: storyData,\n error: storyError,\n loading: storyLoading,\n } = useGetAdInfoStoryQuery({\n variables: {\n storyId: storyId!,\n },\n skip: !storyId,\n fetchPolicy: 'network-only',\n });\n\n const [isShowAdIcon, setIsShowAdIcon] = useState(false);\n const [isShowAd, setIsShowAd] = useState();\n const dispatch = useAppDispatch();\n const isRestarting = useAppSelector(\n (state: RootState) => state.chapter.isRestarting,\n );\n\n const adInfoStorage = useAppSelector(\n (state: RootState) => state.chapter.adInfoStorage,\n );\n\n const [watchedAdChapterId, setWatchedAdChapterId] = useState(\n getWatchedAdChapterId(),\n );\n\n useEffect(() => {\n const handleChangeStorage = () => {\n setWatchedAdChapterId(getWatchedAdChapterId());\n };\n\n // sessionStorage 정보가 업데이트되면 리렌더링\n window.addEventListener('storage', handleChangeStorage);\n return () => window.removeEventListener('storage', handleChangeStorage);\n }, []);\n\n const checkAd = async () => {\n if (!storyId || !chapterId || !chapterData || !storyData) return;\n\n // remote-config 설정에 따라 광고를 보여주는 스토리인가?\n let isAdEnabled = adInfoStorage[storyId];\n\n if (isAdEnabled === undefined) {\n isAdEnabled = await checkAdEnabled({ storyId });\n dispatch(setAdInfo({ storyId, isAdEnabled }));\n }\n // 무료인가?\n const isFree =\n chapterData?.getChapter.freedAt !== null ||\n chapterData.getChapter.price === 0 ||\n (chapterData.getChapter.freeDependencyChapterIndex !== null &&\n chapterData.getChapter.freeDependencyPeriod !== null &&\n chapterData.getChapter.remainingTimeToFree === 0 &&\n chapterData.getChapter.freedAt !== null);\n\n // 전체구매했는가?\n const isAllChapterPurchased =\n chapterData.getChapter.userPurchasedChapter !== null;\n // 통구매 작품이고 통구매했는가?\n const isWholePurchase =\n storyData?.story.purchasable && storyData?.story.purchased;\n\n // 프리미엄(구독권)유저인가?\n const isPremium = userData?.getUser?.isPremium;\n const userPlayedChapters = storyData.story.lastPlay\n ? storyData.story.lastPlay?.playedChapters\n : [];\n // 최종화 엔딩에 도달했나?\n const hasReachedFinalEnding = userPlayedChapters?.some(\n (chapter) => chapter.ending?.isFinal === true,\n );\n const playingChapterIds = userPlayedChapters?.map(\n (chapter) => chapter.chapterId,\n );\n // 회차를 플레이 중인가?\n const isPlaying = playingChapterIds.some((id) => id === chapterId);\n // 유저가 해당 챕터의 광고를 이미 봤나?\n const isWatchedAdChapter =\n Number(sessionStorage.getItem(STORAGE_KEY.WATCHED_AD_CHAPTER_ID)) ===\n chapterId;\n\n // showAdIcon state 값 정의\n if (\n (isAdEnabled &&\n isFree &&\n !isAllChapterPurchased &&\n !isWholePurchase &&\n !isPremium &&\n !hasReachedFinalEnding) ||\n (chapterData.getChapter.adsOn &&\n isFree &&\n !isAllChapterPurchased &&\n !isWholePurchase &&\n !isPremium &&\n !hasReachedFinalEnding)\n ) {\n setIsShowAdIcon(true);\n }\n // showAd state 값 정의\n\n let showAd;\n\n if (\n (isAdEnabled &&\n isFree &&\n !isAllChapterPurchased &&\n !isWatchedAdChapter &&\n !isWholePurchase &&\n !isPremium) ||\n (chapterData.getChapter.adsOn &&\n isFree &&\n !isAllChapterPurchased &&\n !isWatchedAdChapter &&\n !isWholePurchase &&\n !isPremium)\n ) {\n if (isRestarting) {\n showAd = true;\n } else {\n if (!isPlaying) {\n showAd = true;\n }\n }\n }\n\n // 모바일 앱 디바이스에서 웹뷰형태로 실행된 경우 광고를 보여주지 않는다.\n if (isMobileDevice()) {\n showAd = false;\n }\n\n setIsShowAd(showAd ? true : false);\n };\n\n useMemo(() => {\n checkAd();\n }, [\n storyId,\n chapterId,\n adInfoStorage,\n watchedAdChapterId,\n chapterData,\n storyData,\n ]);\n\n return {\n isShowAdIcon,\n isShowAd,\n setIsShowAd,\n error: chapterError || storyError || userError,\n loading: chapterLoading || storyLoading || userLoading,\n };\n};\n\nexport default useCheckAdByRemoteConfig;\n","import { initializeApp } from 'firebase/app';\n\nconst firebaseConfig = {\n apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,\n authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,\n databaseURL: process.env.NEXT_PUBLIC_FIREBASE_DATABASE_URL,\n projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,\n storageBucket: process.env.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET,\n messagingSenderId: process.env.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID,\n appId: process.env.NEXT_PUBLIC_FIREBASE_APP_ID,\n measurementId: process.env.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID,\n};\n\nexport const firebaseApp = initializeApp(firebaseConfig);\n","import { Translate } from 'next-translate';\nimport { ChapterForButton, ChapterState } from '@customTypes/chapter';\nimport { LastPlayedStory } from '@customTypes/story';\nimport { formatWaitingTime, convertCharName } from '@common/utils';\nimport {\n getRemoteConfig,\n fetchAndActivate,\n getBoolean,\n} from 'firebase/remote-config';\nimport { firebaseApp } from '@lib/firebase';\n\nexport interface IViewData {\n storyId: number;\n storyName: string;\n chapterId: number;\n chapterIndex: number;\n chapterPrice: number;\n mainImageUrl?: string;\n price: number;\n storyPrice: number;\n discountRate: number;\n originalPrice: number;\n chapterName: string;\n hasGraphIcon: boolean;\n hasNewBadge: boolean;\n hasBGM: boolean;\n subText: string;\n endingText: string;\n subTextColor: string;\n isLocked: boolean;\n isGray: boolean;\n isDisable: boolean;\n toastMessage: string;\n showEndingView: boolean;\n showStat: boolean;\n showTimeLeap: boolean;\n thumbnail?: string;\n endingId?: number;\n coinForRestart?: number;\n needWholePurchase: boolean;\n introImageUrl?: string;\n freedAt?: string | null;\n freeDependencyChapterIndex?: number | null;\n isTimeLeapFree: boolean;\n purchasable?: boolean;\n purchased?: boolean;\n hasAdultChapter?: boolean;\n showPrice?: boolean;\n shouldShowTimeLeapOnChapterClick?: boolean;\n}\n\ninterface IGetChapterType {\n data: ChapterForButton;\n playingChapterIds: number[];\n endingChapterIds: number[];\n isWholePurchase: boolean;\n isWholePurchased: boolean;\n lastPreviewIndex?: number | null;\n finalEndingChapterIndex?: number | null;\n}\n\nexport const checkAdEnabled = ({ storyId }: { storyId: number }) => {\n const remoteConfig = getRemoteConfig(firebaseApp);\n\n return fetchAndActivate(remoteConfig)\n .then(() => {\n return getBoolean(remoteConfig, `admob_enabled_story_${storyId}`);\n })\n .catch(() => {\n return false;\n });\n};\n\nexport const getChapterType = ({\n data,\n playingChapterIds = [],\n endingChapterIds = [],\n finalEndingChapterIndex,\n isWholePurchase,\n isWholePurchased,\n lastPreviewIndex = 0,\n}: IGetChapterType): ChapterState => {\n const isFree = data?.freedAt !== null || data.price === 0;\n\n const isWaitingTimeZero =\n data?.freeDependencyChapterIndex !== null &&\n data?.freeDependencyPeriod !== null &&\n data?.remainingTimeToFree === 0 &&\n isFree;\n const isEnding = endingChapterIds.find((id) => id === data.chapterId);\n const isPlaying = playingChapterIds.find((id) => id === data.chapterId);\n const isAllChapterPurchased = data?.userPurchasedChapter !== null;\n\n let chapterType: ChapterState = 'NEED_PURCHASE';\n if (isPlaying) {\n if (isEnding) {\n chapterType = 'DONE';\n\n if (finalEndingChapterIndex) {\n // 최종화 엔딩 도달, 최종화 엔딩 도달 회차의 이후 회차인 경우 dismiss\n if (data.chapterIndex > finalEndingChapterIndex) {\n chapterType = isFree ? 'DISMISS' : 'DISMISS_AND_NEED_PURCHASED';\n } else {\n // 최종화 엔딩 도달, 최종화 엔딩 도달 회차의 이전 회차인 경우 done\n chapterType = 'DONE';\n }\n }\n } else {\n chapterType = 'READING';\n }\n } else {\n if (\n isFree ||\n isWholePurchase ||\n isWaitingTimeZero ||\n isAllChapterPurchased\n ) {\n chapterType = 'ACTIVE';\n }\n }\n\n // 통구매작품이고, 사용자가 아직 구매 안했고, lastPreviewIndex가 chapterIndex보다 작으면\n if (\n isWholePurchase &&\n !isWholePurchased &&\n lastPreviewIndex &&\n lastPreviewIndex < data.chapterIndex\n ) {\n chapterType = 'WHOLE_AND_NEED_PURCHASED';\n }\n\n if (finalEndingChapterIndex && data.chapterIndex > finalEndingChapterIndex) {\n chapterType = isFree ? 'DISMISS' : 'DISMISS_AND_NEED_PURCHASED';\n }\n\n return chapterType;\n};\n\ninterface IGetChapterViewData {\n t: Translate;\n storyId: number;\n price: number;\n storyPrice: number;\n discountRate: number;\n originalPrice: number;\n storyName: string;\n chapters: ChapterForButton[];\n chapter: ChapterForButton;\n isWholePurchase: boolean;\n isWholePurchased: boolean;\n lastPreviewIndex?: number | null;\n lastPlay?: LastPlayedStory | null;\n coinForRestart?: number;\n thumbnail?: string;\n introImageUrl?: string;\n mainImageUrl?: string;\n purchasable?: boolean;\n purchased?: boolean;\n hasAdultChapter?: boolean;\n isStoryGame?: boolean;\n}\n\nexport const getChapterViewData = ({\n t,\n storyId,\n storyName,\n price,\n discountRate,\n storyPrice,\n originalPrice,\n chapters,\n chapter,\n lastPlay,\n coinForRestart,\n thumbnail,\n isWholePurchase,\n isWholePurchased,\n lastPreviewIndex,\n introImageUrl,\n mainImageUrl,\n purchasable,\n purchased,\n hasAdultChapter,\n isStoryGame,\n}: IGetChapterViewData): IViewData => {\n const userPlayedChapters = lastPlay ? lastPlay?.playedChapters : [];\n const endingChapterIds = userPlayedChapters\n ?.filter((chapter) => chapter.ending)\n .map((chapter) => chapter.chapterId);\n const finalEnding = userPlayedChapters?.find(\n (chapter) => chapter.ending?.isFinal === true,\n );\n const finalEndingChapterIndex = chapters.find(\n (chapter) => chapter.chapterId === finalEnding?.chapterId,\n )?.chapterIndex;\n const endingId = endingChapterIds.find((id) => id === chapter.chapterId);\n\n const playingChapterIds = userPlayedChapters?.map(\n (chapter) => chapter.chapterId,\n );\n const isPlaying = playingChapterIds.find((id) => id === chapter.chapterId);\n const type = getChapterType({\n data: chapter,\n playingChapterIds,\n endingChapterIds,\n finalEndingChapterIndex,\n isWholePurchase,\n isWholePurchased,\n lastPreviewIndex,\n });\n\n const viewData: IViewData = {\n thumbnail,\n introImageUrl,\n chapterId: chapter?.chapterId,\n chapterPrice: chapter?.price,\n chapterIndex: chapter?.chapterIndex,\n mainImageUrl,\n storyId,\n price,\n storyPrice,\n originalPrice,\n discountRate,\n storyName,\n chapterName: chapter?.name,\n hasGraphIcon: false,\n hasNewBadge: false,\n hasBGM: false,\n subText: '',\n endingText: '',\n subTextColor: 'gray600',\n isLocked: false,\n isGray: false,\n isDisable: false,\n toastMessage: '',\n showEndingView: false,\n showStat: false,\n showTimeLeap: false,\n coinForRestart: coinForRestart,\n needWholePurchase: false,\n freedAt: chapter?.freedAt,\n freeDependencyChapterIndex: chapter?.freeDependencyChapterIndex,\n isTimeLeapFree: false,\n purchasable,\n purchased,\n hasAdultChapter,\n showPrice: false,\n shouldShowTimeLeapOnChapterClick: false,\n };\n\n if (chapter?.hasBGM) {\n viewData.hasBGM = true;\n }\n\n if (chapter?.hasGraphIcon) {\n viewData.hasGraphIcon = true;\n\n if (endingId) {\n viewData.showStat = true;\n viewData.endingId = endingId;\n }\n }\n\n if (chapter?.hasNewBadge) {\n viewData.hasNewBadge = true;\n }\n\n if (chapter?.isTimeLeapFree) {\n viewData.isTimeLeapFree = true;\n }\n\n if (type !== 'READING') {\n if (chapter?.chapterIndex > 1) {\n const firstChapter = chapters.find((item) => item.chapterIndex === 1);\n const currentPlayingChapter = chapters.find(\n (item) => item.chapterId === lastPlay?.currentPlayingChapter.chapterId,\n );\n const isCurrentChapterEnding = !!lastPlay?.currentPlayingChapter.ending;\n const nextChapter = chapters.find(\n (item) =>\n lastPlay &&\n item.chapterIndex ===\n lastPlay.currentPlayingChapter.chapter.chapterIndex + 1,\n );\n\n if (\n isCurrentChapterEnding &&\n chapter.chapterId !== nextChapter?.chapterId\n ) {\n viewData.toastMessage = `${t(\n 'storydetail_popup_description_start_with_chapter_name',\n {\n value: nextChapter?.name,\n },\n )}`;\n }\n\n if (\n !isCurrentChapterEnding &&\n chapter.chapterId !== firstChapter?.chapterId\n ) {\n viewData.toastMessage = `${t(\n 'storydetail_popup_description_start_with_chapter_name',\n {\n value: currentPlayingChapter\n ? currentPlayingChapter.name\n : firstChapter?.name,\n },\n )}`;\n }\n }\n }\n\n if (type === 'ACTIVE') {\n // 첫번째 기스무 챕터 인덱스\n const firstIndexOfWaiting = chapters.find(\n (chapter) => chapter.freeDependencyChapterIndex,\n )?.chapterIndex;\n\n if (\n firstIndexOfWaiting &&\n chapter.chapterIndex === firstIndexOfWaiting - 1\n ) {\n viewData.subText = t('storydetail_screen_label_free_for_now');\n viewData.subTextColor = 'primary500';\n }\n if (\n chapter?.freeDependencyPeriod !== null &&\n chapter?.remainingTimeToFree === 0\n ) {\n // 지금 보면 무료 백로그 처리\n viewData.subText = t('storydetail_screen_label_free_for_now');\n viewData.subTextColor = 'primary500';\n }\n } else if (type === 'READING') {\n viewData.isGray = true;\n viewData.showTimeLeap = true;\n } else if (type === 'DONE') {\n viewData.showTimeLeap = true;\n viewData.toastMessage = t('storydetail_popup_description_already_played');\n viewData.isGray = true;\n\n const endingChapter = userPlayedChapters?.filter(\n (data) => data.chapterId === chapter.chapterId,\n )[0];\n\n if (lastPlay) {\n viewData.endingText = convertCharName(\n endingChapter?.ending?.displayName || endingChapter?.ending?.name || '',\n lastPlay.firstName || '',\n lastPlay.lastName || '',\n );\n }\n\n if (finalEndingChapterIndex === chapter.chapterIndex) {\n viewData.showEndingView = true;\n }\n } else if (type === 'NEED_PURCHASE') {\n viewData.isLocked = true;\n\n if (chapter.freeDependencyPeriod === null) {\n // 기스무 아닌 챕터(기간 후 무료 회차)\n if (chapter.remainingTimeToFree && chapter.remainingTimeToFree > 0) {\n viewData.subText = formatWaitingTime({\n seconds: chapter.remainingTimeToFree,\n t,\n });\n }\n } else {\n //기스무 챕터\n if (chapter.remainingTimeToFree && chapter.remainingTimeToFree > 0) {\n viewData.subText = formatWaitingTime({\n seconds: chapter.remainingTimeToFree,\n t,\n });\n viewData.subTextColor = 'primary500';\n } else if (\n chapter.remainingTimeToFree &&\n chapter.remainingTimeToFree === 0\n ) {\n viewData.subText = t('storydetail_screen_label_free_for_now');\n viewData.subTextColor = 'primary500';\n } else {\n viewData.subText = t(\n 'storydetail_screen_label_description_free_after_day',\n {\n value: '?',\n },\n );\n }\n }\n } else if (type === 'WHOLE_AND_NEED_PURCHASED') {\n viewData.isLocked = true;\n viewData.needWholePurchase = true;\n\n if (isPlaying) {\n viewData.isGray = true;\n viewData.showTimeLeap = true;\n }\n } else if (type === 'DISMISS_AND_NEED_PURCHASED') {\n viewData.isGray = true;\n viewData.isDisable = true;\n viewData.isLocked = true;\n viewData.showTimeLeap = false;\n\n const endingChapter = userPlayedChapters?.filter(\n (data) => data.chapterId === chapter.chapterId,\n )[0];\n\n if (lastPlay) {\n viewData.endingText = convertCharName(\n endingChapter?.ending?.displayName || endingChapter?.ending?.name || '',\n lastPlay.firstName || '',\n lastPlay.lastName || '',\n );\n }\n\n if (chapter.remainingTimeToFree && chapter.remainingTimeToFree > 0) {\n // 조기엔딩일 경우여도 기간무는 n 분후 무료 표시\n viewData.subText = formatWaitingTime({\n seconds: chapter.remainingTimeToFree,\n t,\n });\n }\n\n if (finalEndingChapterIndex === chapter.chapterIndex) {\n viewData.showEndingView = true;\n }\n } else if (type === 'DISMISS') {\n viewData.isGray = true;\n viewData.isDisable = true;\n\n const endingChapter = userPlayedChapters?.filter(\n (data) => data.chapterId === chapter.chapterId,\n )[0];\n if (lastPlay) {\n viewData.endingText = convertCharName(\n endingChapter?.ending?.displayName || endingChapter?.ending?.name || '',\n lastPlay.firstName || '',\n lastPlay.lastName || '',\n );\n }\n\n if (finalEndingChapterIndex === chapter.chapterIndex) {\n viewData.showEndingView = true;\n }\n }\n\n // 스토리 게임 작품인 경우 일부 조건이 변경된다. 아래에서 변경된 조건을 재정의한다.\n if (isStoryGame) {\n if (type === 'DONE') {\n viewData.toastMessage = '';\n viewData.shouldShowTimeLeapOnChapterClick = true;\n }\n\n // 회차 완료 후 엔딩명을 노출하지 않는다.\n viewData.endingText = '';\n }\n\n return viewData;\n};\n"],"names":["container","css","theme","isShow","storyId","onClose","t","useTranslation","router","useRouter","handleContinueInAppButtonClick","push","pathname","query","url","title","className","onClick","BenefitItem","icon","topText","bottomText","delay","benefitItemWrapper","width","height","storyName","storyCoin","chapterIndex","originalCoin","lastPreviewChapterIndex","nextChapterId","storyBundleId","storyLanguage","storyGenre","playType","coverImage","discountRate","hasAdultChapter","dispatch","useAppDispatch","useState","showNoticeWholePurchaseInfoPopup","setShowNoticeWholePurchaseInfoPopup","userData","useGetUserQuery","data","useMutation","PURCHASE_STORY","onCompleted","purchaseStory","ok","reload","payTicketAll","ticketCount","storyNameAndChapterIndex","payTicketForStory","amount","Story_Play_Type","replace","prevScreen","alertMessage","message","type","onError","error","includes","SERVER_ERROR_CODE","setToastMessage","redirectInfo","JSON","stringify","redirectUrl","createdAt","Date","localStorage","setItem","STORAGE_KEY","purchaseStoryMutate","useEffect","viewPurchaseStoryPopup","fullPrice","price","userCoin","getUser","currentCoin","viewAllChapterPurchasePopup","String","fullCoin","coin","purchasedChapter","contentType","onPurchase","touchPurchaseStoryPopup","isAnonymous","certificatedAt","isExpiredCertification","variables","src","objectFit","layout","value","StoryGameBenefitItem","text","coinProduct","fill","SPImage","originalPrice","insertCommas","mobileContainer","wrapper","backgroundImage","popupWrapper","isMobileDevice","updateUserForApp","showToastForApp","goAdultCertForApp","callbackScreenType","goStoreForApp","inappCoinId","storyProductId","FullScreenPopupContainer","customCSS","hasHeader","alt","sizes","NoticeWholePurchaseInfoPopup","getWatchedAdChapterId","sessionStorage","getItem","chapterId","useGetAdInfoUserQuery","fetchPolicy","userError","userLoading","loading","useGetAdInfoChapterQuery","skip","chapterData","chapterError","chapterLoading","useGetAdInfoStoryQuery","storyData","storyError","storyLoading","isShowAdIcon","setIsShowAdIcon","isShowAd","setIsShowAd","isRestarting","useAppSelector","state","chapter","adInfoStorage","watchedAdChapterId","setWatchedAdChapterId","handleChangeStorage","window","addEventListener","removeEventListener","checkAd","undefined","isAdEnabled","checkAdEnabled","setAdInfo","isFree","getChapter","freedAt","freeDependencyChapterIndex","freeDependencyPeriod","remainingTimeToFree","isAllChapterPurchased","userPurchasedChapter","isWholePurchase","story","purchasable","purchased","isPremium","userPlayedChapters","lastPlay","playedChapters","hasReachedFinalEnding","some","ending","isFinal","playingChapterIds","map","isPlaying","id","isWatchedAdChapter","Number","adsOn","showAd","useMemo","firebaseApp","initializeApp","apiKey","process","authDomain","databaseURL","projectId","storageBucket","messagingSenderId","appId","measurementId","remoteConfig","getRemoteConfig","fetchAndActivate","then","getBoolean","getChapterType","endingChapterIds","finalEndingChapterIndex","isWholePurchased","lastPreviewIndex","isWaitingTimeZero","isEnding","find","chapterType","getChapterViewData","storyPrice","chapters","coinForRestart","thumbnail","introImageUrl","mainImageUrl","isStoryGame","filter","finalEnding","endingId","viewData","chapterPrice","chapterName","name","hasGraphIcon","hasNewBadge","hasBGM","subText","endingText","subTextColor","isLocked","isGray","isDisable","toastMessage","showEndingView","showStat","showTimeLeap","needWholePurchase","isTimeLeapFree","showPrice","shouldShowTimeLeapOnChapterClick","firstChapter","item","currentPlayingChapter","isCurrentChapterEnding","nextChapter","firstIndexOfWaiting","endingChapter","convertCharName","displayName","firstName","lastName","formatWaitingTime","seconds"],"sourceRoot":""}